123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- var Kae=Object.defineProperty;var Jae=(t,e,n)=>e in t?Kae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ese=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var iT=(t,e,n)=>(Jae(t,typeof e!="symbol"?e+"":e,n),n);var Kat=ese((ks,Ps)=>{const tse=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}};tse();function RM(t,e){const n=Object.create(null),r=t.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return e?i=>!!n[i.toLowerCase()]:i=>!!n[i]}function vt(t){if(Xe(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],i=Ot(r)?ose(r):vt(r);if(i)for(const o in i)e[o]=i[o]}return e}else{if(Ot(t))return t;if(Jt(t))return t}}const nse=/;(?![^(]*\))/g,rse=/:([^]+)/,ise=/\/\*.*?\*\//gs;function ose(t){const e={};return t.replace(ise,"").split(nse).forEach(n=>{if(n){const r=n.split(rse);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function V(t){let e="";if(Ot(t))e=t;else if(Xe(t))for(let n=0;n<t.length;n++){const r=V(t[n]);r&&(e+=r+" ")}else if(Jt(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function Yl(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Ot(e)&&(t.class=V(e)),n&&(t.style=vt(n)),t}const ase="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",sse=RM(ase);function eQ(t){return!!t||t===""}function lse(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Qg(t[r],e[r]);return n}function Qg(t,e){if(t===e)return!0;let n=uf(t),r=uf(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=e0(t),r=e0(e),n||r)return t===e;if(n=Xe(t),r=Xe(e),n||r)return n&&r?lse(t,e):!1;if(n=Jt(t),r=Jt(e),n||r){if(!n||!r)return!1;const i=Object.keys(t).length,o=Object.keys(e).length;if(i!==o)return!1;for(const a in t){const s=t.hasOwnProperty(a),l=e.hasOwnProperty(a);if(s&&!l||!s&&l||!Qg(t[a],e[a]))return!1}}return String(t)===String(e)}function tQ(t,e){return t.findIndex(n=>Qg(n,e))}const Ve=t=>Ot(t)?t:t==null?"":Xe(t)||Jt(t)&&(t.toString===rQ||!St(t.toString))?JSON.stringify(t,nQ,2):String(t),nQ=(t,e)=>e&&e.__v_isRef?nQ(t,e.value):Cg(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:oS(e)?{[`Set(${e.size})`]:[...e.values()]}:Jt(e)&&!Xe(e)&&!n0(e)?String(e):e,bi={},Sg=[],ir=()=>{},use=()=>!1,cse=/^on[^a-z]/,iS=t=>cse.test(t),$M=t=>t.startsWith("onUpdate:"),yo=Object.assign,NM=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},dse=Object.prototype.hasOwnProperty,Mn=(t,e)=>dse.call(t,e),Xe=Array.isArray,Cg=t=>hb(t)==="[object Map]",oS=t=>hb(t)==="[object Set]",uf=t=>hb(t)==="[object Date]",St=t=>typeof t=="function",Ot=t=>typeof t=="string",e0=t=>typeof t=="symbol",Jt=t=>t!==null&&typeof t=="object",t0=t=>Jt(t)&&St(t.then)&&St(t.catch),rQ=Object.prototype.toString,hb=t=>rQ.call(t),fse=t=>hb(t).slice(8,-1),n0=t=>hb(t)==="[object Object]",DM=t=>Ot(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,h1=RM(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),aS=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},hse=/-(\w)/g,$s=aS(t=>t.replace(hse,(e,n)=>n?n.toUpperCase():"")),pse=/\B([A-Z])/g,$f=aS(t=>t.replace(pse,"-$1").toLowerCase()),pb=aS(t=>t.charAt(0).toUpperCase()+t.slice(1)),vy=aS(t=>t?`on${pb(t)}`:""),r0=(t,e)=>!Object.is(t,e),p1=(t,e)=>{for(let n=0;n<t.length;n++)t[n](e)},ow=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},X2=t=>{const e=parseFloat(t);return isNaN(e)?t:e},gse=t=>{const e=Ot(t)?Number(t):NaN;return isNaN(e)?t:e};let b3;const mse=()=>b3||(b3=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let xs;class iQ{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=xs,!e&&xs&&(this.index=(xs.scopes||(xs.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=xs;try{return xs=this,e()}finally{xs=n}}}on(){xs=this}off(){xs=this.parent}stop(e){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function vse(t){return new iQ(t)}function yse(t,e=xs){e&&e.active&&e.effects.push(t)}function oQ(){return xs}function aQ(t){xs&&xs.cleanups.push(t)}const LM=t=>{const e=new Set(t);return e.w=0,e.n=0,e},sQ=t=>(t.w&cf)>0,lQ=t=>(t.n&cf)>0,bse=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=cf},_se=t=>{const{deps:e}=t;if(e.length){let n=0;for(let r=0;r<e.length;r++){const i=e[r];sQ(i)&&!lQ(i)?i.delete(t):e[n++]=i,i.w&=~cf,i.n&=~cf}e.length=n}},aw=new WeakMap;let ey=0,cf=1;const Z2=30;let Xl;const jh=Symbol(""),q2=Symbol("");class IM{constructor(e,n=null,r){this.fn=e,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,yse(this,r)}run(){if(!this.active)return this.fn();let e=Xl,n=ef;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=Xl,Xl=this,ef=!0,cf=1<<++ey,ey<=Z2?bse(this):_3(this),this.fn()}finally{ey<=Z2&&_se(this),cf=1<<--ey,Xl=this.parent,ef=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){Xl===this?this.deferStop=!0:this.active&&(_3(this),this.onStop&&this.onStop(),this.active=!1)}}function _3(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let ef=!0;const uQ=[];function Am(){uQ.push(ef),ef=!1}function Mm(){const t=uQ.pop();ef=t===void 0?!0:t}function Ja(t,e,n){if(ef&&Xl){let r=aw.get(t);r||aw.set(t,r=new Map);let i=r.get(n);i||r.set(n,i=LM()),cQ(i)}}function cQ(t,e){let n=!1;ey<=Z2?lQ(t)||(t.n|=cf,n=!sQ(t)):n=!t.has(Xl),n&&(t.add(Xl),Xl.deps.push(t))}function Xc(t,e,n,r,i,o){const a=aw.get(t);if(!a)return;let s=[];if(e==="clear")s=[...a.values()];else if(n==="length"&&Xe(t)){const l=Number(r);a.forEach((u,c)=>{(c==="length"||c>=l)&&s.push(u)})}else switch(n!==void 0&&s.push(a.get(n)),e){case"add":Xe(t)?DM(n)&&s.push(a.get("length")):(s.push(a.get(jh)),Cg(t)&&s.push(a.get(q2)));break;case"delete":Xe(t)||(s.push(a.get(jh)),Cg(t)&&s.push(a.get(q2)));break;case"set":Cg(t)&&s.push(a.get(jh));break}if(s.length===1)s[0]&&Y2(s[0]);else{const l=[];for(const u of s)u&&l.push(...u);Y2(LM(l))}}function Y2(t,e){const n=Xe(t)?t:[...t];for(const r of n)r.computed&&O3(r);for(const r of n)r.computed||O3(r)}function O3(t,e){(t!==Xl||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}function Ose(t,e){var n;return(n=aw.get(t))===null||n===void 0?void 0:n.get(e)}const wse=RM("__proto__,__v_isRef,__isVue"),dQ=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(e0)),xse=BM(),Sse=BM(!1,!0),Cse=BM(!0),w3=Ese();function Ese(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const r=Dn(this);for(let o=0,a=this.length;o<a;o++)Ja(r,"get",o+"");const i=r[e](...n);return i===-1||i===!1?r[e](...n.map(Dn)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...n){Am();const r=Dn(this)[e].apply(this,n);return Mm(),r}}),t}function Tse(t){const e=Dn(this);return Ja(e,"has",t),e.hasOwnProperty(t)}function BM(t=!1,e=!1){return function(r,i,o){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&o===(t?e?zse:mQ:e?gQ:pQ).get(r))return r;const a=Xe(r);if(!t){if(a&&Mn(w3,i))return Reflect.get(w3,i,o);if(i==="hasOwnProperty")return Tse}const s=Reflect.get(r,i,o);return(e0(i)?dQ.has(i):wse(i))||(t||Ja(r,"get",i),e)?s:Tr(s)?a&&DM(i)?s:s.value:Jt(s)?t?Rm(s):vn(s):s}}const kse=fQ(),Pse=fQ(!0);function fQ(t=!1){return function(n,r,i,o){let a=n[r];if(zg(a)&&Tr(a)&&!Tr(i))return!1;if(!t&&(!sw(i)&&!zg(i)&&(a=Dn(a),i=Dn(i)),!Xe(n)&&Tr(a)&&!Tr(i)))return a.value=i,!0;const s=Xe(n)&&DM(r)?Number(r)<n.length:Mn(n,r),l=Reflect.set(n,r,i,o);return n===Dn(o)&&(s?r0(i,a)&&Xc(n,"set",r,i):Xc(n,"add",r,i)),l}}function Ase(t,e){const n=Mn(t,e);t[e];const r=Reflect.deleteProperty(t,e);return r&&n&&Xc(t,"delete",e,void 0),r}function Mse(t,e){const n=Reflect.has(t,e);return(!e0(e)||!dQ.has(e))&&Ja(t,"has",e),n}function Rse(t){return Ja(t,"iterate",Xe(t)?"length":jh),Reflect.ownKeys(t)}const hQ={get:xse,set:kse,deleteProperty:Ase,has:Mse,ownKeys:Rse},$se={get:Cse,set(t,e){return!0},deleteProperty(t,e){return!0}},Nse=yo({},hQ,{get:Sse,set:Pse}),FM=t=>t,sS=t=>Reflect.getPrototypeOf(t);function H_(t,e,n=!1,r=!1){t=t.__v_raw;const i=Dn(t),o=Dn(e);n||(e!==o&&Ja(i,"get",e),Ja(i,"get",o));const{has:a}=sS(i),s=r?FM:n?QM:i0;if(a.call(i,e))return s(t.get(e));if(a.call(i,o))return s(t.get(o));t!==i&&t.get(e)}function U_(t,e=!1){const n=this.__v_raw,r=Dn(n),i=Dn(t);return e||(t!==i&&Ja(r,"has",t),Ja(r,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)}function X_(t,e=!1){return t=t.__v_raw,!e&&Ja(Dn(t),"iterate",jh),Reflect.get(t,"size",t)}function x3(t){t=Dn(t);const e=Dn(this);return sS(e).has.call(e,t)||(e.add(t),Xc(e,"add",t,t)),this}function S3(t,e){e=Dn(e);const n=Dn(this),{has:r,get:i}=sS(n);let o=r.call(n,t);o||(t=Dn(t),o=r.call(n,t));const a=i.call(n,t);return n.set(t,e),o?r0(e,a)&&Xc(n,"set",t,e):Xc(n,"add",t,e),this}function C3(t){const e=Dn(this),{has:n,get:r}=sS(e);let i=n.call(e,t);i||(t=Dn(t),i=n.call(e,t)),r&&r.call(e,t);const o=e.delete(t);return i&&Xc(e,"delete",t,void 0),o}function E3(){const t=Dn(this),e=t.size!==0,n=t.clear();return e&&Xc(t,"clear",void 0,void 0),n}function Z_(t,e){return function(r,i){const o=this,a=o.__v_raw,s=Dn(a),l=e?FM:t?QM:i0;return!t&&Ja(s,"iterate",jh),a.forEach((u,c)=>r.call(i,l(u),l(c),o))}}function q_(t,e,n){return function(...r){const i=this.__v_raw,o=Dn(i),a=Cg(o),s=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,u=i[t](...r),c=n?FM:e?QM:i0;return!e&&Ja(o,"iterate",l?q2:jh),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:s?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Td(t){return function(...e){return t==="delete"?!1:this}}function Dse(){const t={get(o){return H_(this,o)},get size(){return X_(this)},has:U_,add:x3,set:S3,delete:C3,clear:E3,forEach:Z_(!1,!1)},e={get(o){return H_(this,o,!1,!0)},get size(){return X_(this)},has:U_,add:x3,set:S3,delete:C3,clear:E3,forEach:Z_(!1,!0)},n={get(o){return H_(this,o,!0)},get size(){return X_(this,!0)},has(o){return U_.call(this,o,!0)},add:Td("add"),set:Td("set"),delete:Td("delete"),clear:Td("clear"),forEach:Z_(!0,!1)},r={get(o){return H_(this,o,!0,!0)},get size(){return X_(this,!0)},has(o){return U_.call(this,o,!0)},add:Td("add"),set:Td("set"),delete:Td("delete"),clear:Td("clear"),forEach:Z_(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=q_(o,!1,!1),n[o]=q_(o,!0,!1),e[o]=q_(o,!1,!0),r[o]=q_(o,!0,!0)}),[t,n,e,r]}const[Lse,Ise,Bse,Fse]=Dse();function VM(t,e){const n=e?t?Fse:Bse:t?Ise:Lse;return(r,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?r:Reflect.get(Mn(n,i)&&i in r?n:r,i,o)}const Vse={get:VM(!1,!1)},jse={get:VM(!1,!0)},Qse={get:VM(!0,!1)},pQ=new WeakMap,gQ=new WeakMap,mQ=new WeakMap,zse=new WeakMap;function Wse(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Hse(t){return t.__v_skip||!Object.isExtensible(t)?0:Wse(fse(t))}function vn(t){return zg(t)?t:jM(t,!1,hQ,Vse,pQ)}function vQ(t){return jM(t,!1,Nse,jse,gQ)}function Rm(t){return jM(t,!0,$se,Qse,mQ)}function jM(t,e,n,r,i){if(!Jt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=i.get(t);if(o)return o;const a=Hse(t);if(a===0)return t;const s=new Proxy(t,a===2?r:n);return i.set(t,s),s}function Eg(t){return zg(t)?Eg(t.__v_raw):!!(t&&t.__v_isReactive)}function zg(t){return!!(t&&t.__v_isReadonly)}function sw(t){return!!(t&&t.__v_isShallow)}function yQ(t){return Eg(t)||zg(t)}function Dn(t){const e=t&&t.__v_raw;return e?Dn(e):t}function Qc(t){return ow(t,"__v_skip",!0),t}const i0=t=>Jt(t)?vn(t):t,QM=t=>Jt(t)?Rm(t):t;function zM(t){ef&&Xl&&(t=Dn(t),cQ(t.dep||(t.dep=LM())))}function WM(t,e){t=Dn(t);const n=t.dep;n&&Y2(n)}function Tr(t){return!!(t&&t.__v_isRef===!0)}function F(t){return bQ(t,!1)}function yr(t){return bQ(t,!0)}function bQ(t,e){return Tr(t)?t:new Use(t,e)}class Use{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:Dn(e),this._value=n?e:i0(e)}get value(){return zM(this),this._value}set value(e){const n=this.__v_isShallow||sw(e)||zg(e);e=n?e:Dn(e),r0(e,this._rawValue)&&(this._rawValue=e,this._value=n?e:i0(e),WM(this))}}function p(t){return Tr(t)?t.value:t}const Xse={get:(t,e,n)=>p(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const i=t[e];return Tr(i)&&!Tr(n)?(i.value=n,!0):Reflect.set(t,e,n,r)}};function _Q(t){return Eg(t)?t:new Proxy(t,Xse)}class Zse{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=e(()=>zM(this),()=>WM(this));this._get=n,this._set=r}get value(){return this._get()}set value(e){this._set(e)}}function qse(t){return new Zse(t)}function Mi(t){const e=Xe(t)?new Array(t.length):{};for(const n in t)e[n]=Gn(t,n);return e}class Yse{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return Ose(Dn(this._object),this._key)}}function Gn(t,e,n){const r=t[e];return Tr(r)?r:new Yse(t,e,n)}var OQ;class Gse{constructor(e,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[OQ]=!1,this._dirty=!0,this.effect=new IM(e,()=>{this._dirty||(this._dirty=!0,WM(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const e=Dn(this);return zM(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}OQ="__v_isReadonly";function Kse(t,e,n=!1){let r,i;const o=St(t);return o?(r=t,i=ir):(r=t.get,i=t.set),new Gse(r,i,o||!i,n)}function Jse(t,...e){}function tf(t,e,n,r){let i;try{i=r?t(...r):t()}catch(o){lS(o,e,n)}return i}function dl(t,e,n,r){if(St(t)){const o=tf(t,e,n,r);return o&&t0(o)&&o.catch(a=>{lS(a,e,n)}),o}const i=[];for(let o=0;o<t.length;o++)i.push(dl(t[o],e,n,r));return i}function lS(t,e,n,r=!0){const i=e?e.vnode:null;if(e){let o=e.parent;const a=e.proxy,s=n;for(;o;){const u=o.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](t,a,s)===!1)return}o=o.parent}const l=e.appContext.config.errorHandler;if(l){tf(l,null,10,[t,a,s]);return}}ele(t,n,i,r)}function ele(t,e,n,r=!0){console.error(t)}let o0=!1,G2=!1;const ta=[];let Nu=0;const Tg=[];let Nc=null,yh=0;const wQ=Promise.resolve();let HM=null;function xt(t){const e=HM||wQ;return t?e.then(this?t.bind(this):t):e}function tle(t){let e=Nu+1,n=ta.length;for(;e<n;){const r=e+n>>>1;a0(ta[r])<t?e=r+1:n=r}return e}function UM(t){(!ta.length||!ta.includes(t,o0&&t.allowRecurse?Nu+1:Nu))&&(t.id==null?ta.push(t):ta.splice(tle(t.id),0,t),xQ())}function xQ(){!o0&&!G2&&(G2=!0,HM=wQ.then(CQ))}function nle(t){const e=ta.indexOf(t);e>Nu&&ta.splice(e,1)}function rle(t){Xe(t)?Tg.push(...t):(!Nc||!Nc.includes(t,t.allowRecurse?yh+1:yh))&&Tg.push(t),xQ()}function T3(t,e=o0?Nu+1:0){for(;e<ta.length;e++){const n=ta[e];n&&n.pre&&(ta.splice(e,1),e--,n())}}function SQ(t){if(Tg.length){const e=[...new Set(Tg)];if(Tg.length=0,Nc){Nc.push(...e);return}for(Nc=e,Nc.sort((n,r)=>a0(n)-a0(r)),yh=0;yh<Nc.length;yh++)Nc[yh]();Nc=null,yh=0}}const a0=t=>t.id==null?1/0:t.id,ile=(t,e)=>{const n=a0(t)-a0(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function CQ(t){G2=!1,o0=!0,ta.sort(ile);const e=ir;try{for(Nu=0;Nu<ta.length;Nu++){const n=ta[Nu];n&&n.active!==!1&&tf(n,null,14)}}finally{Nu=0,ta.length=0,SQ(),o0=!1,HM=null,(ta.length||Tg.length)&&CQ()}}function ole(t,e,...n){if(t.isUnmounted)return;const r=t.vnode.props||bi;let i=n;const o=e.startsWith("update:"),a=o&&e.slice(7);if(a&&a in r){const c=`${a==="modelValue"?"model":a}Modifiers`,{number:d,trim:f}=r[c]||bi;f&&(i=n.map(h=>Ot(h)?h.trim():h)),d&&(i=n.map(X2))}let s,l=r[s=vy(e)]||r[s=vy($s(e))];!l&&o&&(l=r[s=vy($f(e))]),l&&dl(l,t,6,i);const u=r[s+"Once"];if(u){if(!t.emitted)t.emitted={};else if(t.emitted[s])return;t.emitted[s]=!0,dl(u,t,6,i)}}function EQ(t,e,n=!1){const r=e.emitsCache,i=r.get(t);if(i!==void 0)return i;const o=t.emits;let a={},s=!1;if(!St(t)){const l=u=>{const c=EQ(u,e,!0);c&&(s=!0,yo(a,c))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!s?(Jt(t)&&r.set(t,null),null):(Xe(o)?o.forEach(l=>a[l]=null):yo(a,o),Jt(t)&&r.set(t,a),a)}function uS(t,e){return!t||!iS(e)?!1:(e=e.slice(2).replace(/Once$/,""),Mn(t,e[0].toLowerCase()+e.slice(1))||Mn(t,$f(e))||Mn(t,e))}let Lo=null,cS=null;function lw(t){const e=Lo;return Lo=t,cS=t&&t.type.__scopeId||null,e}function ale(t){cS=t}function sle(){cS=null}function j(t,e=Lo,n){if(!e||t._n)return t;const r=(...i)=>{r._d&&B3(-1);const o=lw(e);let a;try{a=t(...i)}finally{lw(o),r._d&&B3(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function oT(t){const{type:e,vnode:n,proxy:r,withProxy:i,props:o,propsOptions:[a],slots:s,attrs:l,emit:u,render:c,renderCache:d,data:f,setupState:h,ctx:g,inheritAttrs:m}=t;let y,b;const w=lw(t);try{if(n.shapeFlag&4){const x=i||r;y=Mu(c.call(x,x,d,o,h,f,g)),b=l}else{const x=e;y=Mu(x.length>1?x(o,{attrs:l,slots:s,emit:u}):x(o,null)),b=e.props?l:lle(l)}}catch(x){Oy.length=0,lS(x,t,1),y=B(aa)}let O=y;if(b&&m!==!1){const x=Object.keys(b),{shapeFlag:S}=O;x.length&&S&7&&(a&&x.some($M)&&(b=ule(b,a)),O=Zc(O,b))}return n.dirs&&(O=Zc(O),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition&&(O.transition=n.transition),y=O,lw(w),y}const lle=t=>{let e;for(const n in t)(n==="class"||n==="style"||iS(n))&&((e||(e={}))[n]=t[n]);return e},ule=(t,e)=>{const n={};for(const r in t)(!$M(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function cle(t,e,n){const{props:r,children:i,component:o}=t,{props:a,children:s,patchFlag:l}=e,u=o.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?k3(r,a,u):!!a;if(l&8){const c=e.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(a[f]!==r[f]&&!uS(u,f))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===a?!1:r?a?k3(r,a,u):!0:!!a;return!1}function k3(t,e,n){const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(e[o]!==t[o]&&!uS(n,o))return!0}return!1}function dle({vnode:t,parent:e},n){for(;e&&e.subTree===t;)(t=e.vnode).el=n,e=e.parent}const fle=t=>t.__isSuspense;function hle(t,e){e&&e.pendingBranch?Xe(t)?e.effects.push(...t):e.effects.push(t):rle(t)}function gn(t,e){if(Vi){let n=Vi.provides;const r=Vi.parent&&Vi.parent.provides;r===n&&(n=Vi.provides=Object.create(r)),n[t]=e}}function ht(t,e,n=!1){const r=Vi||Lo;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&t in i)return i[t];if(arguments.length>1)return n&&St(e)?e.call(r.proxy):e}}function Bo(t,e){return XM(t,null,e)}const Y_={};function Fe(t,e,n){return XM(t,e,n)}function XM(t,e,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:a}=bi){const s=oQ()===(Vi==null?void 0:Vi.scope)?Vi:null;let l,u=!1,c=!1;if(Tr(t)?(l=()=>t.value,u=sw(t)):Eg(t)?(l=()=>t,r=!0):Xe(t)?(c=!0,u=t.some(O=>Eg(O)||sw(O)),l=()=>t.map(O=>{if(Tr(O))return O.value;if(Eg(O))return Mh(O);if(St(O))return tf(O,s,2)})):St(t)?e?l=()=>tf(t,s,2):l=()=>{if(!(s&&s.isUnmounted))return d&&d(),dl(t,s,3,[f])}:l=ir,e&&r){const O=l;l=()=>Mh(O())}let d,f=O=>{d=b.onStop=()=>{tf(O,s,4)}},h;if(c0)if(f=ir,e?n&&dl(e,s,3,[l(),c?[]:void 0,f]):l(),i==="sync"){const O=eue();h=O.__watcherHandles||(O.__watcherHandles=[])}else return ir;let g=c?new Array(t.length).fill(Y_):Y_;const m=()=>{if(!!b.active)if(e){const O=b.run();(r||u||(c?O.some((x,S)=>r0(x,g[S])):r0(O,g)))&&(d&&d(),dl(e,s,3,[O,g===Y_?void 0:c&&g[0]===Y_?[]:g,f]),g=O)}else b.run()};m.allowRecurse=!!e;let y;i==="sync"?y=m:i==="post"?y=()=>Fa(m,s&&s.suspense):(m.pre=!0,s&&(m.id=s.uid),y=()=>UM(m));const b=new IM(l,y);e?n?m():g=b.run():i==="post"?Fa(b.run.bind(b),s&&s.suspense):b.run();const w=()=>{b.stop(),s&&s.scope&&NM(s.scope.effects,b)};return h&&h.push(w),w}function ple(t,e,n){const r=this.proxy,i=Ot(t)?t.includes(".")?TQ(r,t):()=>r[t]:t.bind(r,r);let o;St(e)?o=e:(o=e.handler,n=e);const a=Vi;Wg(this);const s=XM(i,o.bind(r),n);return a?Wg(a):Qh(),s}function TQ(t,e){const n=e.split(".");return()=>{let r=t;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function Mh(t,e){if(!Jt(t)||t.__v_skip||(e=e||new Set,e.has(t)))return t;if(e.add(t),Tr(t))Mh(t.value,e);else if(Xe(t))for(let n=0;n<t.length;n++)Mh(t[n],e);else if(oS(t)||Cg(t))t.forEach(n=>{Mh(n,e)});else if(n0(t))for(const n in t)Mh(t[n],e);return t}function kQ(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ft(()=>{t.isMounted=!0}),pr(()=>{t.isUnmounting=!0}),t}const qs=[Function,Array],gle={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:qs,onEnter:qs,onAfterEnter:qs,onEnterCancelled:qs,onBeforeLeave:qs,onLeave:qs,onAfterLeave:qs,onLeaveCancelled:qs,onBeforeAppear:qs,onAppear:qs,onAfterAppear:qs,onAppearCancelled:qs},setup(t,{slots:e}){const n=tn(),r=kQ();let i;return()=>{const o=e.default&&ZM(e.default(),!0);if(!o||!o.length)return;let a=o[0];if(o.length>1){for(const m of o)if(m.type!==aa){a=m;break}}const s=Dn(t),{mode:l}=s;if(r.isLeaving)return aT(a);const u=P3(a);if(!u)return aT(a);const c=s0(u,s,r,n);l0(u,c);const d=n.subTree,f=d&&P3(d);let h=!1;const{getTransitionKey:g}=u.type;if(g){const m=g();i===void 0?i=m:m!==i&&(i=m,h=!0)}if(f&&f.type!==aa&&(!bh(u,f)||h)){const m=s0(f,s,r,n);if(l0(f,m),l==="out-in")return r.isLeaving=!0,m.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},aT(a);l==="in-out"&&u.type!==aa&&(m.delayLeave=(y,b,w)=>{const O=AQ(r,f);O[String(f.key)]=f,y._leaveCb=()=>{b(),y._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=w})}return a}}},PQ=gle;function AQ(t,e){const{leavingVNodes:n}=t;let r=n.get(e.type);return r||(r=Object.create(null),n.set(e.type,r)),r}function s0(t,e,n,r){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:s,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:d,onLeave:f,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:m,onAppear:y,onAfterAppear:b,onAppearCancelled:w}=e,O=String(t.key),x=AQ(n,t),S=(T,P)=>{T&&dl(T,r,9,P)},C=(T,P)=>{const A=P[1];S(T,P),Xe(T)?T.every(D=>D.length<=1)&&A():T.length<=1&&A()},E={mode:o,persisted:a,beforeEnter(T){let P=s;if(!n.isMounted)if(i)P=m||s;else return;T._leaveCb&&T._leaveCb(!0);const A=x[O];A&&bh(t,A)&&A.el._leaveCb&&A.el._leaveCb(),S(P,[T])},enter(T){let P=l,A=u,D=c;if(!n.isMounted)if(i)P=y||l,A=b||u,D=w||c;else return;let $=!1;const N=T._enterCb=z=>{$||($=!0,z?S(D,[T]):S(A,[T]),E.delayedLeave&&E.delayedLeave(),T._enterCb=void 0)};P?C(P,[T,N]):N()},leave(T,P){const A=String(t.key);if(T._enterCb&&T._enterCb(!0),n.isUnmounting)return P();S(d,[T]);let D=!1;const $=T._leaveCb=N=>{D||(D=!0,P(),N?S(g,[T]):S(h,[T]),T._leaveCb=void 0,x[A]===t&&delete x[A])};x[A]=t,f?C(f,[T,$]):$()},clone(T){return s0(T,e,n,r)}};return E}function aT(t){if(dS(t))return t=Zc(t),t.children=null,t}function P3(t){return dS(t)?t.children?t.children[0]:void 0:t}function l0(t,e){t.shapeFlag&6&&t.component?l0(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function ZM(t,e=!1,n){let r=[],i=0;for(let o=0;o<t.length;o++){let a=t[o];const s=n==null?a.key:String(n)+String(a.key!=null?a.key:o);a.type===dt?(a.patchFlag&128&&i++,r=r.concat(ZM(a.children,e,s))):(e||a.type!==aa)&&r.push(s!=null?Zc(a,{key:s}):a)}if(i>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}function ue(t){return St(t)?{setup:t,name:t.name}:t}const yy=t=>!!t.type.__asyncLoader,dS=t=>t.type.__isKeepAlive;function qM(t,e){RQ(t,"a",e)}function MQ(t,e){RQ(t,"da",e)}function RQ(t,e,n=Vi){const r=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(fS(e,r,n),n){let i=n.parent;for(;i&&i.parent;)dS(i.parent.vnode)&&mle(r,e,n,i),i=i.parent}}function mle(t,e,n,r){const i=fS(e,t,r,!0);od(()=>{NM(r[e],i)},n)}function fS(t,e,n=Vi,r=!1){if(n){const i=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...a)=>{if(n.isUnmounted)return;Am(),Wg(n);const s=dl(e,n,t,a);return Qh(),Mm(),s});return r?i.unshift(o):i.push(o),o}}const id=t=>(e,n=Vi)=>(!c0||t==="sp")&&fS(t,(...r)=>e(...r),n),hS=id("bm"),Ft=id("m"),$Q=id("bu"),ac=id("u"),pr=id("bum"),od=id("um"),vle=id("sp"),yle=id("rtg"),ble=id("rtc");function _le(t,e=Vi){fS("ec",t,e)}function zt(t,e){const n=Lo;if(n===null)return t;const r=mS(n)||n.proxy,i=t.dirs||(t.dirs=[]);for(let o=0;o<e.length;o++){let[a,s,l,u=bi]=e[o];a&&(St(a)&&(a={mounted:a,updated:a}),a.deep&&Mh(s),i.push({dir:a,instance:r,value:s,oldValue:void 0,arg:l,modifiers:u}))}return t}function sh(t,e,n,r){const i=t.dirs,o=e&&e.dirs;for(let a=0;a<i.length;a++){const s=i[a];o&&(s.oldValue=o[a].value);let l=s.dir[r];l&&(Am(),dl(l,n,8,[t.el,s,t,e]),Mm())}}const YM="components",Ole="directives";function rn(t,e){return GM(YM,t,!0,e)||t}const NQ=Symbol();function on(t){return Ot(t)?GM(YM,t,!1)||t:t||NQ}function pS(t){return GM(Ole,t)}function GM(t,e,n=!0,r=!1){const i=Lo||Vi;if(i){const o=i.type;if(t===YM){const s=Gle(o,!1);if(s&&(s===e||s===$s(e)||s===pb($s(e))))return o}const a=A3(i[t]||o[t],e)||A3(i.appContext[t],e);return!a&&r?o:a}}function A3(t,e){return t&&(t[e]||t[$s(e)]||t[pb($s(e))])}function Ht(t,e,n,r){let i;const o=n&&n[r];if(Xe(t)||Ot(t)){i=new Array(t.length);for(let a=0,s=t.length;a<s;a++)i[a]=e(t[a],a,void 0,o&&o[a])}else if(typeof t=="number"){i=new Array(t);for(let a=0;a<t;a++)i[a]=e(a+1,a,void 0,o&&o[a])}else if(Jt(t))if(t[Symbol.iterator])i=Array.from(t,(a,s)=>e(a,s,void 0,o&&o[s]));else{const a=Object.keys(t);i=new Array(a.length);for(let s=0,l=a.length;s<l;s++){const u=a[s];i[s]=e(t[u],u,s,o&&o[s])}}else i=[];return n&&(n[r]=i),i}function es(t,e){for(let n=0;n<e.length;n++){const r=e[n];if(Xe(r))for(let i=0;i<r.length;i++)t[r[i].name]=r[i].fn;else r&&(t[r.name]=r.key?(...i)=>{const o=r.fn(...i);return o&&(o.key=r.key),o}:r.fn)}return t}function Ee(t,e,n={},r,i){if(Lo.isCE||Lo.parent&&yy(Lo.parent)&&Lo.parent.isCE)return e!=="default"&&(n.name=e),B("slot",n,r&&r());let o=t[e];o&&o._c&&(o._d=!1),R();const a=o&&DQ(o(n)),s=xe(dt,{key:n.key||a&&a.key||`_${e}`},a||(r?r():[]),a&&t._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function DQ(t){return t.some(e=>Jr(e)?!(e.type===aa||e.type===dt&&!DQ(e.children)):!0)?t:null}function wle(t,e){const n={};for(const r in t)n[e&&/[A-Z]/.test(r)?`on:${r}`:vy(r)]=t[r];return n}const K2=t=>t?UQ(t)?mS(t)||t.proxy:K2(t.parent):null,by=yo(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>K2(t.parent),$root:t=>K2(t.root),$emit:t=>t.emit,$options:t=>KM(t),$forceUpdate:t=>t.f||(t.f=()=>UM(t.update)),$nextTick:t=>t.n||(t.n=xt.bind(t.proxy)),$watch:t=>ple.bind(t)}),sT=(t,e)=>t!==bi&&!t.__isScriptSetup&&Mn(t,e),xle={get({_:t},e){const{ctx:n,setupState:r,data:i,props:o,accessCache:a,type:s,appContext:l}=t;let u;if(e[0]!=="$"){const h=a[e];if(h!==void 0)switch(h){case 1:return r[e];case 2:return i[e];case 4:return n[e];case 3:return o[e]}else{if(sT(r,e))return a[e]=1,r[e];if(i!==bi&&Mn(i,e))return a[e]=2,i[e];if((u=t.propsOptions[0])&&Mn(u,e))return a[e]=3,o[e];if(n!==bi&&Mn(n,e))return a[e]=4,n[e];J2&&(a[e]=0)}}const c=by[e];let d,f;if(c)return e==="$attrs"&&Ja(t,"get",e),c(t);if((d=s.__cssModules)&&(d=d[e]))return d;if(n!==bi&&Mn(n,e))return a[e]=4,n[e];if(f=l.config.globalProperties,Mn(f,e))return f[e]},set({_:t},e,n){const{data:r,setupState:i,ctx:o}=t;return sT(i,e)?(i[e]=n,!0):r!==bi&&Mn(r,e)?(r[e]=n,!0):Mn(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!n[a]||t!==bi&&Mn(t,a)||sT(e,a)||(s=o[0])&&Mn(s,a)||Mn(r,a)||Mn(by,a)||Mn(i.config.globalProperties,a)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Mn(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};let J2=!0;function Sle(t){const e=KM(t),n=t.proxy,r=t.ctx;J2=!1,e.beforeCreate&&M3(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:g,activated:m,deactivated:y,beforeDestroy:b,beforeUnmount:w,destroyed:O,unmounted:x,render:S,renderTracked:C,renderTriggered:E,errorCaptured:T,serverPrefetch:P,expose:A,inheritAttrs:D,components:$,directives:N,filters:z}=e;if(u&&Cle(u,r,null,t.appContext.config.unwrapInjectedRef),a)for(const X in a){const Q=a[X];St(Q)&&(r[X]=Q.bind(n))}if(i){const X=i.call(n,n);Jt(X)&&(t.data=vn(X))}if(J2=!0,o)for(const X in o){const Q=o[X],W=St(Q)?Q.bind(n,n):St(Q.get)?Q.get.bind(n,n):ir,G=!St(Q)&&St(Q.set)?Q.set.bind(n):ir,K=M({get:W,set:G});Object.defineProperty(r,X,{enumerable:!0,configurable:!0,get:()=>K.value,set:oe=>K.value=oe})}if(s)for(const X in s)LQ(s[X],r,n,X);if(l){const X=St(l)?l.call(n):l;Reflect.ownKeys(X).forEach(Q=>{gn(Q,X[Q])})}c&&M3(c,t,"c");function L(X,Q){Xe(Q)?Q.forEach(W=>X(W.bind(n))):Q&&X(Q.bind(n))}if(L(hS,d),L(Ft,f),L($Q,h),L(ac,g),L(qM,m),L(MQ,y),L(_le,T),L(ble,C),L(yle,E),L(pr,w),L(od,x),L(vle,P),Xe(A))if(A.length){const X=t.exposed||(t.exposed={});A.forEach(Q=>{Object.defineProperty(X,Q,{get:()=>n[Q],set:W=>n[Q]=W})})}else t.exposed||(t.exposed={});S&&t.render===ir&&(t.render=S),D!=null&&(t.inheritAttrs=D),$&&(t.components=$),N&&(t.directives=N)}function Cle(t,e,n=ir,r=!1){Xe(t)&&(t=ek(t));for(const i in t){const o=t[i];let a;Jt(o)?"default"in o?a=ht(o.from||i,o.default,!0):a=ht(o.from||i):a=ht(o),Tr(a)&&r?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>a.value,set:s=>a.value=s}):e[i]=a}}function M3(t,e,n){dl(Xe(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function LQ(t,e,n,r){const i=r.includes(".")?TQ(n,r):()=>n[r];if(Ot(t)){const o=e[t];St(o)&&Fe(i,o)}else if(St(t))Fe(i,t.bind(n));else if(Jt(t))if(Xe(t))t.forEach(o=>LQ(o,e,n,r));else{const o=St(t.handler)?t.handler.bind(n):e[t.handler];St(o)&&Fe(i,o,t)}}function KM(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=t.appContext,s=o.get(e);let l;return s?l=s:!i.length&&!n&&!r?l=e:(l={},i.length&&i.forEach(u=>uw(l,u,a,!0)),uw(l,e,a)),Jt(e)&&o.set(e,l),l}function uw(t,e,n,r=!1){const{mixins:i,extends:o}=e;o&&uw(t,o,n,!0),i&&i.forEach(a=>uw(t,a,n,!0));for(const a in e)if(!(r&&a==="expose")){const s=Ele[a]||n&&n[a];t[a]=s?s(t[a],e[a]):e[a]}return t}const Ele={data:R3,props:mh,emits:mh,methods:mh,computed:mh,beforeCreate:ma,created:ma,beforeMount:ma,mounted:ma,beforeUpdate:ma,updated:ma,beforeDestroy:ma,beforeUnmount:ma,destroyed:ma,unmounted:ma,activated:ma,deactivated:ma,errorCaptured:ma,serverPrefetch:ma,components:mh,directives:mh,watch:kle,provide:R3,inject:Tle};function R3(t,e){return e?t?function(){return yo(St(t)?t.call(this,this):t,St(e)?e.call(this,this):e)}:e:t}function Tle(t,e){return mh(ek(t),ek(e))}function ek(t){if(Xe(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function ma(t,e){return t?[...new Set([].concat(t,e))]:e}function mh(t,e){return t?yo(yo(Object.create(null),t),e):e}function kle(t,e){if(!t)return e;if(!e)return t;const n=yo(Object.create(null),t);for(const r in e)n[r]=ma(t[r],e[r]);return n}function Ple(t,e,n,r=!1){const i={},o={};ow(o,gS,1),t.propsDefaults=Object.create(null),IQ(t,e,i,o);for(const a in t.propsOptions[0])a in i||(i[a]=void 0);n?t.props=r?i:vQ(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function Ale(t,e,n,r){const{props:i,attrs:o,vnode:{patchFlag:a}}=t,s=Dn(i),[l]=t.propsOptions;let u=!1;if((r||a>0)&&!(a&16)){if(a&8){const c=t.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(uS(t.emitsOptions,f))continue;const h=e[f];if(l)if(Mn(o,f))h!==o[f]&&(o[f]=h,u=!0);else{const g=$s(f);i[g]=tk(l,s,g,h,t,!1)}else h!==o[f]&&(o[f]=h,u=!0)}}}else{IQ(t,e,i,o)&&(u=!0);let c;for(const d in s)(!e||!Mn(e,d)&&((c=$f(d))===d||!Mn(e,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=tk(l,s,d,void 0,t,!0)):delete i[d]);if(o!==s)for(const d in o)(!e||!Mn(e,d)&&!0)&&(delete o[d],u=!0)}u&&Xc(t,"set","$attrs")}function IQ(t,e,n,r){const[i,o]=t.propsOptions;let a=!1,s;if(e)for(let l in e){if(h1(l))continue;const u=e[l];let c;i&&Mn(i,c=$s(l))?!o||!o.includes(c)?n[c]=u:(s||(s={}))[c]=u:uS(t.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,a=!0)}if(o){const l=Dn(n),u=s||bi;for(let c=0;c<o.length;c++){const d=o[c];n[d]=tk(i,l,d,u[d],t,!Mn(u,d))}}return a}function tk(t,e,n,r,i,o){const a=t[n];if(a!=null){const s=Mn(a,"default");if(s&&r===void 0){const l=a.default;if(a.type!==Function&&St(l)){const{propsDefaults:u}=i;n in u?r=u[n]:(Wg(i),r=u[n]=l.call(null,e),Qh())}else r=l}a[0]&&(o&&!s?r=!1:a[1]&&(r===""||r===$f(n))&&(r=!0))}return r}function BQ(t,e,n=!1){const r=e.propsCache,i=r.get(t);if(i)return i;const o=t.props,a={},s=[];let l=!1;if(!St(t)){const c=d=>{l=!0;const[f,h]=BQ(d,e,!0);yo(a,f),h&&s.push(...h)};!n&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}if(!o&&!l)return Jt(t)&&r.set(t,Sg),Sg;if(Xe(o))for(let c=0;c<o.length;c++){const d=$s(o[c]);$3(d)&&(a[d]=bi)}else if(o)for(const c in o){const d=$s(c);if($3(d)){const f=o[c],h=a[d]=Xe(f)||St(f)?{type:f}:Object.assign({},f);if(h){const g=L3(Boolean,h.type),m=L3(String,h.type);h[0]=g>-1,h[1]=m<0||g<m,(g>-1||Mn(h,"default"))&&s.push(d)}}}const u=[a,s];return Jt(t)&&r.set(t,u),u}function $3(t){return t[0]!=="$"}function N3(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function D3(t,e){return N3(t)===N3(e)}function L3(t,e){return Xe(e)?e.findIndex(n=>D3(n,t)):St(e)&&D3(e,t)?0:-1}const FQ=t=>t[0]==="_"||t==="$stable",JM=t=>Xe(t)?t.map(Mu):[Mu(t)],Mle=(t,e,n)=>{if(e._n)return e;const r=j((...i)=>JM(e(...i)),n);return r._c=!1,r},VQ=(t,e,n)=>{const r=t._ctx;for(const i in t){if(FQ(i))continue;const o=t[i];if(St(o))e[i]=Mle(i,o,r);else if(o!=null){const a=JM(o);e[i]=()=>a}}},jQ=(t,e)=>{const n=JM(e);t.slots.default=()=>n},Rle=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=Dn(e),ow(e,"_",n)):VQ(e,t.slots={})}else t.slots={},e&&jQ(t,e);ow(t.slots,gS,1)},$le=(t,e,n)=>{const{vnode:r,slots:i}=t;let o=!0,a=bi;if(r.shapeFlag&32){const s=e._;s?n&&s===1?o=!1:(yo(i,e),!n&&s===1&&delete i._):(o=!e.$stable,VQ(e,i)),a=e}else e&&(jQ(t,e),a={default:1});if(o)for(const s in i)!FQ(s)&&!(s in a)&&delete i[s]};function QQ(){return{app:null,config:{isNativeTag:use,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Nle=0;function Dle(t,e){return function(r,i=null){St(r)||(r=Object.assign({},r)),i!=null&&!Jt(i)&&(i=null);const o=QQ(),a=new Set;let s=!1;const l=o.app={_uid:Nle++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:tue,get config(){return o.config},set config(u){},use(u,...c){return a.has(u)||(u&&St(u.install)?(a.add(u),u.install(l,...c)):St(u)&&(a.add(u),u(l,...c))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,c){return c?(o.components[u]=c,l):o.components[u]},directive(u,c){return c?(o.directives[u]=c,l):o.directives[u]},mount(u,c,d){if(!s){const f=B(r,i);return f.appContext=o,c&&e?e(f,u):t(f,u,d),s=!0,l._container=u,u.__vue_app__=l,mS(f.component)||f.component.proxy}},unmount(){s&&(t(null,l._container),delete l._container.__vue_app__)},provide(u,c){return o.provides[u]=c,l}};return l}}function nk(t,e,n,r,i=!1){if(Xe(t)){t.forEach((f,h)=>nk(f,e&&(Xe(e)?e[h]:e),n,r,i));return}if(yy(r)&&!i)return;const o=r.shapeFlag&4?mS(r.component)||r.component.proxy:r.el,a=i?null:o,{i:s,r:l}=t,u=e&&e.r,c=s.refs===bi?s.refs={}:s.refs,d=s.setupState;if(u!=null&&u!==l&&(Ot(u)?(c[u]=null,Mn(d,u)&&(d[u]=null)):Tr(u)&&(u.value=null)),St(l))tf(l,s,12,[a,c]);else{const f=Ot(l),h=Tr(l);if(f||h){const g=()=>{if(t.f){const m=f?Mn(d,l)?d[l]:c[l]:l.value;i?Xe(m)&&NM(m,o):Xe(m)?m.includes(o)||m.push(o):f?(c[l]=[o],Mn(d,l)&&(d[l]=c[l])):(l.value=[o],t.k&&(c[t.k]=l.value))}else f?(c[l]=a,Mn(d,l)&&(d[l]=a)):h&&(l.value=a,t.k&&(c[t.k]=a))};a?(g.id=-1,Fa(g,n)):g()}}}const Fa=hle;function Lle(t){return Ile(t)}function Ile(t,e){const n=mse();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:s,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=ir,insertStaticContent:g}=t,m=(q,de,ke,Ie=null,se=null,ye=null,Ae=!1,Z=null,te=!!de.dynamicChildren)=>{if(q===de)return;q&&!bh(q,de)&&(Ie=ie(q),oe(q,se,ye,!0),q=null),de.patchFlag===-2&&(te=!1,de.dynamicChildren=null);const{type:le,ref:Te,shapeFlag:pe}=de;switch(le){case $m:y(q,de,ke,Ie);break;case aa:b(q,de,ke,Ie);break;case lT:q==null&&w(de,ke,Ie,Ae);break;case dt:$(q,de,ke,Ie,se,ye,Ae,Z,te);break;default:pe&1?S(q,de,ke,Ie,se,ye,Ae,Z,te):pe&6?N(q,de,ke,Ie,se,ye,Ae,Z,te):(pe&64||pe&128)&&le.process(q,de,ke,Ie,se,ye,Ae,Z,te,he)}Te!=null&&se&&nk(Te,q&&q.ref,ye,de||q,!de)},y=(q,de,ke,Ie)=>{if(q==null)r(de.el=s(de.children),ke,Ie);else{const se=de.el=q.el;de.children!==q.children&&u(se,de.children)}},b=(q,de,ke,Ie)=>{q==null?r(de.el=l(de.children||""),ke,Ie):de.el=q.el},w=(q,de,ke,Ie)=>{[q.el,q.anchor]=g(q.children,de,ke,Ie,q.el,q.anchor)},O=({el:q,anchor:de},ke,Ie)=>{let se;for(;q&&q!==de;)se=f(q),r(q,ke,Ie),q=se;r(de,ke,Ie)},x=({el:q,anchor:de})=>{let ke;for(;q&&q!==de;)ke=f(q),i(q),q=ke;i(de)},S=(q,de,ke,Ie,se,ye,Ae,Z,te)=>{Ae=Ae||de.type==="svg",q==null?C(de,ke,Ie,se,ye,Ae,Z,te):P(q,de,se,ye,Ae,Z,te)},C=(q,de,ke,Ie,se,ye,Ae,Z)=>{let te,le;const{type:Te,props:pe,shapeFlag:Oe,transition:Re,dirs:je}=q;if(te=q.el=a(q.type,ye,pe&&pe.is,pe),Oe&8?c(te,q.children):Oe&16&&T(q.children,te,null,Ie,se,ye&&Te!=="foreignObject",Ae,Z),je&&sh(q,null,Ie,"created"),E(te,q,q.scopeId,Ae,Ie),pe){for(const Je in pe)Je!=="value"&&!h1(Je)&&o(te,Je,null,pe[Je],ye,q.children,Ie,se,U);"value"in pe&&o(te,"value",null,pe.value),(le=pe.onVnodeBeforeMount)&&wu(le,Ie,q)}je&&sh(q,null,Ie,"beforeMount");const Ke=(!se||se&&!se.pendingBranch)&&Re&&!Re.persisted;Ke&&Re.beforeEnter(te),r(te,de,ke),((le=pe&&pe.onVnodeMounted)||Ke||je)&&Fa(()=>{le&&wu(le,Ie,q),Ke&&Re.enter(te),je&&sh(q,null,Ie,"mounted")},se)},E=(q,de,ke,Ie,se)=>{if(ke&&h(q,ke),Ie)for(let ye=0;ye<Ie.length;ye++)h(q,Ie[ye]);if(se){let ye=se.subTree;if(de===ye){const Ae=se.vnode;E(q,Ae,Ae.scopeId,Ae.slotScopeIds,se.parent)}}},T=(q,de,ke,Ie,se,ye,Ae,Z,te=0)=>{for(let le=te;le<q.length;le++){const Te=q[le]=Z?Dd(q[le]):Mu(q[le]);m(null,Te,de,ke,Ie,se,ye,Ae,Z)}},P=(q,de,ke,Ie,se,ye,Ae)=>{const Z=de.el=q.el;let{patchFlag:te,dynamicChildren:le,dirs:Te}=de;te|=q.patchFlag&16;const pe=q.props||bi,Oe=de.props||bi;let Re;ke&&lh(ke,!1),(Re=Oe.onVnodeBeforeUpdate)&&wu(Re,ke,de,q),Te&&sh(de,q,ke,"beforeUpdate"),ke&&lh(ke,!0);const je=se&&de.type!=="foreignObject";if(le?A(q.dynamicChildren,le,Z,ke,Ie,je,ye):Ae||Q(q,de,Z,null,ke,Ie,je,ye,!1),te>0){if(te&16)D(Z,de,pe,Oe,ke,Ie,se);else if(te&2&&pe.class!==Oe.class&&o(Z,"class",null,Oe.class,se),te&4&&o(Z,"style",pe.style,Oe.style,se),te&8){const Ke=de.dynamicProps;for(let Je=0;Je<Ke.length;Je++){const at=Ke[Je],kt=pe[at],jt=Oe[at];(jt!==kt||at==="value")&&o(Z,at,kt,jt,se,q.children,ke,Ie,U)}}te&1&&q.children!==de.children&&c(Z,de.children)}else!Ae&&le==null&&D(Z,de,pe,Oe,ke,Ie,se);((Re=Oe.onVnodeUpdated)||Te)&&Fa(()=>{Re&&wu(Re,ke,de,q),Te&&sh(de,q,ke,"updated")},Ie)},A=(q,de,ke,Ie,se,ye,Ae)=>{for(let Z=0;Z<de.length;Z++){const te=q[Z],le=de[Z],Te=te.el&&(te.type===dt||!bh(te,le)||te.shapeFlag&70)?d(te.el):ke;m(te,le,Te,null,Ie,se,ye,Ae,!0)}},D=(q,de,ke,Ie,se,ye,Ae)=>{if(ke!==Ie){if(ke!==bi)for(const Z in ke)!h1(Z)&&!(Z in Ie)&&o(q,Z,ke[Z],null,Ae,de.children,se,ye,U);for(const Z in Ie){if(h1(Z))continue;const te=Ie[Z],le=ke[Z];te!==le&&Z!=="value"&&o(q,Z,le,te,Ae,de.children,se,ye,U)}"value"in Ie&&o(q,"value",ke.value,Ie.value)}},$=(q,de,ke,Ie,se,ye,Ae,Z,te)=>{const le=de.el=q?q.el:s(""),Te=de.anchor=q?q.anchor:s("");let{patchFlag:pe,dynamicChildren:Oe,slotScopeIds:Re}=de;Re&&(Z=Z?Z.concat(Re):Re),q==null?(r(le,ke,Ie),r(Te,ke,Ie),T(de.children,ke,Te,se,ye,Ae,Z,te)):pe>0&&pe&64&&Oe&&q.dynamicChildren?(A(q.dynamicChildren,Oe,ke,se,ye,Ae,Z),(de.key!=null||se&&de===se.subTree)&&eR(q,de,!0)):Q(q,de,ke,Te,se,ye,Ae,Z,te)},N=(q,de,ke,Ie,se,ye,Ae,Z,te)=>{de.slotScopeIds=Z,q==null?de.shapeFlag&512?se.ctx.activate(de,ke,Ie,Ae,te):z(de,ke,Ie,se,ye,Ae,te):I(q,de,te)},z=(q,de,ke,Ie,se,ye,Ae)=>{const Z=q.component=Xle(q,Ie,se);if(dS(q)&&(Z.ctx.renderer=he),Zle(Z),Z.asyncDep){if(se&&se.registerDep(Z,L),!q.el){const te=Z.subTree=B(aa);b(null,te,de,ke)}return}L(Z,q,de,ke,se,ye,Ae)},I=(q,de,ke)=>{const Ie=de.component=q.component;if(cle(q,de,ke))if(Ie.asyncDep&&!Ie.asyncResolved){X(Ie,de,ke);return}else Ie.next=de,nle(Ie.update),Ie.update();else de.el=q.el,Ie.vnode=de},L=(q,de,ke,Ie,se,ye,Ae)=>{const Z=()=>{if(q.isMounted){let{next:Te,bu:pe,u:Oe,parent:Re,vnode:je}=q,Ke=Te,Je;lh(q,!1),Te?(Te.el=je.el,X(q,Te,Ae)):Te=je,pe&&p1(pe),(Je=Te.props&&Te.props.onVnodeBeforeUpdate)&&wu(Je,Re,Te,je),lh(q,!0);const at=oT(q),kt=q.subTree;q.subTree=at,m(kt,at,d(kt.el),ie(kt),q,se,ye),Te.el=at.el,Ke===null&&dle(q,at.el),Oe&&Fa(Oe,se),(Je=Te.props&&Te.props.onVnodeUpdated)&&Fa(()=>wu(Je,Re,Te,je),se)}else{let Te;const{el:pe,props:Oe}=de,{bm:Re,m:je,parent:Ke}=q,Je=yy(de);if(lh(q,!1),Re&&p1(Re),!Je&&(Te=Oe&&Oe.onVnodeBeforeMount)&&wu(Te,Ke,de),lh(q,!0),pe&&Me){const at=()=>{q.subTree=oT(q),Me(pe,q.subTree,q,se,null)};Je?de.type.__asyncLoader().then(()=>!q.isUnmounted&&at()):at()}else{const at=q.subTree=oT(q);m(null,at,ke,Ie,q,se,ye),de.el=at.el}if(je&&Fa(je,se),!Je&&(Te=Oe&&Oe.onVnodeMounted)){const at=de;Fa(()=>wu(Te,Ke,at),se)}(de.shapeFlag&256||Ke&&yy(Ke.vnode)&&Ke.vnode.shapeFlag&256)&&q.a&&Fa(q.a,se),q.isMounted=!0,de=ke=Ie=null}},te=q.effect=new IM(Z,()=>UM(le),q.scope),le=q.update=()=>te.run();le.id=q.uid,lh(q,!0),le()},X=(q,de,ke)=>{de.component=q;const Ie=q.vnode.props;q.vnode=de,q.next=null,Ale(q,de.props,Ie,ke),$le(q,de.children,ke),Am(),T3(),Mm()},Q=(q,de,ke,Ie,se,ye,Ae,Z,te=!1)=>{const le=q&&q.children,Te=q?q.shapeFlag:0,pe=de.children,{patchFlag:Oe,shapeFlag:Re}=de;if(Oe>0){if(Oe&128){G(le,pe,ke,Ie,se,ye,Ae,Z,te);return}else if(Oe&256){W(le,pe,ke,Ie,se,ye,Ae,Z,te);return}}Re&8?(Te&16&&U(le,se,ye),pe!==le&&c(ke,pe)):Te&16?Re&16?G(le,pe,ke,Ie,se,ye,Ae,Z,te):U(le,se,ye,!0):(Te&8&&c(ke,""),Re&16&&T(pe,ke,Ie,se,ye,Ae,Z,te))},W=(q,de,ke,Ie,se,ye,Ae,Z,te)=>{q=q||Sg,de=de||Sg;const le=q.length,Te=de.length,pe=Math.min(le,Te);let Oe;for(Oe=0;Oe<pe;Oe++){const Re=de[Oe]=te?Dd(de[Oe]):Mu(de[Oe]);m(q[Oe],Re,ke,null,se,ye,Ae,Z,te)}le>Te?U(q,se,ye,!0,!1,pe):T(de,ke,Ie,se,ye,Ae,Z,te,pe)},G=(q,de,ke,Ie,se,ye,Ae,Z,te)=>{let le=0;const Te=de.length;let pe=q.length-1,Oe=Te-1;for(;le<=pe&&le<=Oe;){const Re=q[le],je=de[le]=te?Dd(de[le]):Mu(de[le]);if(bh(Re,je))m(Re,je,ke,null,se,ye,Ae,Z,te);else break;le++}for(;le<=pe&&le<=Oe;){const Re=q[pe],je=de[Oe]=te?Dd(de[Oe]):Mu(de[Oe]);if(bh(Re,je))m(Re,je,ke,null,se,ye,Ae,Z,te);else break;pe--,Oe--}if(le>pe){if(le<=Oe){const Re=Oe+1,je=Re<Te?de[Re].el:Ie;for(;le<=Oe;)m(null,de[le]=te?Dd(de[le]):Mu(de[le]),ke,je,se,ye,Ae,Z,te),le++}}else if(le>Oe)for(;le<=pe;)oe(q[le],se,ye,!0),le++;else{const Re=le,je=le,Ke=new Map;for(le=je;le<=Oe;le++){const De=de[le]=te?Dd(de[le]):Mu(de[le]);De.key!=null&&Ke.set(De.key,le)}let Je,at=0;const kt=Oe-je+1;let jt=!1,Pe=0;const nt=new Array(kt);for(le=0;le<kt;le++)nt[le]=0;for(le=Re;le<=pe;le++){const De=q[le];if(at>=kt){oe(De,se,ye,!0);continue}let ce;if(De.key!=null)ce=Ke.get(De.key);else for(Je=je;Je<=Oe;Je++)if(nt[Je-je]===0&&bh(De,de[Je])){ce=Je;break}ce===void 0?oe(De,se,ye,!0):(nt[ce-je]=le+1,ce>=Pe?Pe=ce:jt=!0,m(De,de[ce],ke,null,se,ye,Ae,Z,te),at++)}const fe=jt?Ble(nt):Sg;for(Je=fe.length-1,le=kt-1;le>=0;le--){const De=je+le,ce=de[De],qe=De+1<Te?de[De+1].el:Ie;nt[le]===0?m(null,ce,ke,qe,se,ye,Ae,Z,te):jt&&(Je<0||le!==fe[Je]?K(ce,ke,qe,2):Je--)}}},K=(q,de,ke,Ie,se=null)=>{const{el:ye,type:Ae,transition:Z,children:te,shapeFlag:le}=q;if(le&6){K(q.component.subTree,de,ke,Ie);return}if(le&128){q.suspense.move(de,ke,Ie);return}if(le&64){Ae.move(q,de,ke,he);return}if(Ae===dt){r(ye,de,ke);for(let pe=0;pe<te.length;pe++)K(te[pe],de,ke,Ie);r(q.anchor,de,ke);return}if(Ae===lT){O(q,de,ke);return}if(Ie!==2&&le&1&&Z)if(Ie===0)Z.beforeEnter(ye),r(ye,de,ke),Fa(()=>Z.enter(ye),se);else{const{leave:pe,delayLeave:Oe,afterLeave:Re}=Z,je=()=>r(ye,de,ke),Ke=()=>{pe(ye,()=>{je(),Re&&Re()})};Oe?Oe(ye,je,Ke):Ke()}else r(ye,de,ke)},oe=(q,de,ke,Ie=!1,se=!1)=>{const{type:ye,props:Ae,ref:Z,children:te,dynamicChildren:le,shapeFlag:Te,patchFlag:pe,dirs:Oe}=q;if(Z!=null&&nk(Z,null,ke,q,!0),Te&256){de.ctx.deactivate(q);return}const Re=Te&1&&Oe,je=!yy(q);let Ke;if(je&&(Ke=Ae&&Ae.onVnodeBeforeUnmount)&&wu(Ke,de,q),Te&6)Ce(q.component,ke,Ie);else{if(Te&128){q.suspense.unmount(ke,Ie);return}Re&&sh(q,null,de,"beforeUnmount"),Te&64?q.type.remove(q,de,ke,se,he,Ie):le&&(ye!==dt||pe>0&&pe&64)?U(le,de,ke,!1,!0):(ye===dt&&pe&384||!se&&Te&16)&&U(te,de,ke),Ie&&ne(q)}(je&&(Ke=Ae&&Ae.onVnodeUnmounted)||Re)&&Fa(()=>{Ke&&wu(Ke,de,q),Re&&sh(q,null,de,"unmounted")},ke)},ne=q=>{const{type:de,el:ke,anchor:Ie,transition:se}=q;if(de===dt){_e(ke,Ie);return}if(de===lT){x(q);return}const ye=()=>{i(ke),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(q.shapeFlag&1&&se&&!se.persisted){const{leave:Ae,delayLeave:Z}=se,te=()=>Ae(ke,ye);Z?Z(q.el,ye,te):te()}else ye()},_e=(q,de)=>{let ke;for(;q!==de;)ke=f(q),i(q),q=ke;i(de)},Ce=(q,de,ke)=>{const{bum:Ie,scope:se,update:ye,subTree:Ae,um:Z}=q;Ie&&p1(Ie),se.stop(),ye&&(ye.active=!1,oe(Ae,q,de,ke)),Z&&Fa(Z,de),Fa(()=>{q.isUnmounted=!0},de),de&&de.pendingBranch&&!de.isUnmounted&&q.asyncDep&&!q.asyncResolved&&q.suspenseId===de.pendingId&&(de.deps--,de.deps===0&&de.resolve())},U=(q,de,ke,Ie=!1,se=!1,ye=0)=>{for(let Ae=ye;Ae<q.length;Ae++)oe(q[Ae],de,ke,Ie,se)},ie=q=>q.shapeFlag&6?ie(q.component.subTree):q.shapeFlag&128?q.suspense.next():f(q.anchor||q.el),ee=(q,de,ke)=>{q==null?de._vnode&&oe(de._vnode,null,null,!0):m(de._vnode||null,q,de,null,null,null,ke),T3(),SQ(),de._vnode=q},he={p:m,um:oe,m:K,r:ne,mt:z,mc:T,pc:Q,pbc:A,n:ie,o:t};let $e,Me;return e&&([$e,Me]=e(he)),{render:ee,hydrate:$e,createApp:Dle(ee,$e)}}function lh({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function eR(t,e,n=!1){const r=t.children,i=e.children;if(Xe(r)&&Xe(i))for(let o=0;o<r.length;o++){const a=r[o];let s=i[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[o]=Dd(i[o]),s.el=a.el),n||eR(a,s)),s.type===$m&&(s.el=a.el)}}function Ble(t){const e=t.slice(),n=[0];let r,i,o,a,s;const l=t.length;for(r=0;r<l;r++){const u=t[r];if(u!==0){if(i=n[n.length-1],t[i]<u){e[r]=i,n.push(r);continue}for(o=0,a=n.length-1;o<a;)s=o+a>>1,t[n[s]]<u?o=s+1:a=s;u<t[n[o]]&&(o>0&&(e[r]=n[o-1]),n[o]=r)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=e[a];return n}const Fle=t=>t.__isTeleport,_y=t=>t&&(t.disabled||t.disabled===""),I3=t=>typeof SVGElement!="undefined"&&t instanceof SVGElement,rk=(t,e)=>{const n=t&&t.to;return Ot(n)?e?e(n):null:n},Vle={__isTeleport:!0,process(t,e,n,r,i,o,a,s,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:g,createText:m,createComment:y}}=u,b=_y(e.props);let{shapeFlag:w,children:O,dynamicChildren:x}=e;if(t==null){const S=e.el=m(""),C=e.anchor=m("");h(S,n,r),h(C,n,r);const E=e.target=rk(e.props,g),T=e.targetAnchor=m("");E&&(h(T,E),a=a||I3(E));const P=(A,D)=>{w&16&&c(O,A,D,i,o,a,s,l)};b?P(n,C):E&&P(E,T)}else{e.el=t.el;const S=e.anchor=t.anchor,C=e.target=t.target,E=e.targetAnchor=t.targetAnchor,T=_y(t.props),P=T?n:C,A=T?S:E;if(a=a||I3(C),x?(f(t.dynamicChildren,x,P,i,o,a,s),eR(t,e,!0)):l||d(t,e,P,A,i,o,a,s,!1),b)T||G_(e,n,S,u,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const D=e.target=rk(e.props,g);D&&G_(e,D,null,u,0)}else T&&G_(e,C,E,u,1)}zQ(e)},remove(t,e,n,r,{um:i,o:{remove:o}},a){const{shapeFlag:s,children:l,anchor:u,targetAnchor:c,target:d,props:f}=t;if(d&&o(c),(a||!_y(f))&&(o(u),s&16))for(let h=0;h<l.length;h++){const g=l[h];i(g,e,n,!0,!!g.dynamicChildren)}},move:G_,hydrate:jle};function G_(t,e,n,{o:{insert:r},m:i},o=2){o===0&&r(t.targetAnchor,e,n);const{el:a,anchor:s,shapeFlag:l,children:u,props:c}=t,d=o===2;if(d&&r(a,e,n),(!d||_y(c))&&l&16)for(let f=0;f<u.length;f++)i(u[f],e,n,2);d&&r(s,e,n)}function jle(t,e,n,r,i,o,{o:{nextSibling:a,parentNode:s,querySelector:l}},u){const c=e.target=rk(e.props,l);if(c){const d=c._lpa||c.firstChild;if(e.shapeFlag&16)if(_y(e.props))e.anchor=u(a(t),e,s(t),n,r,i,o),e.targetAnchor=d;else{e.anchor=a(t);let f=d;for(;f;)if(f=a(f),f&&f.nodeType===8&&f.data==="teleport anchor"){e.targetAnchor=f,c._lpa=e.targetAnchor&&a(e.targetAnchor);break}u(d,e,c,n,r,i,o)}zQ(e)}return e.anchor&&a(e.anchor)}const Qle=Vle;function zQ(t){const e=t.ctx;if(e&&e.ut){let n=t.children[0].el;for(;n!==t.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",e.uid),n=n.nextSibling;e.ut()}}const dt=Symbol(void 0),$m=Symbol(void 0),aa=Symbol(void 0),lT=Symbol(void 0),Oy=[];let Gl=null;function R(t=!1){Oy.push(Gl=t?null:[])}function zle(){Oy.pop(),Gl=Oy[Oy.length-1]||null}let u0=1;function B3(t){u0+=t}function WQ(t){return t.dynamicChildren=u0>0?Gl||Sg:null,zle(),u0>0&&Gl&&Gl.push(t),t}function Y(t,e,n,r,i,o){return WQ(J(t,e,n,r,i,o,!0))}function xe(t,e,n,r,i){return WQ(B(t,e,n,r,i,!0))}function Jr(t){return t?t.__v_isVNode===!0:!1}function bh(t,e){return t.type===e.type&&t.key===e.key}const gS="__vInternal",HQ=({key:t})=>t!=null?t:null,g1=({ref:t,ref_key:e,ref_for:n})=>t!=null?Ot(t)||Tr(t)||St(t)?{i:Lo,r:t,k:e,f:!!n}:t:null;function J(t,e=null,n=null,r=0,i=null,o=t===dt?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&HQ(e),ref:e&&g1(e),scopeId:cS,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Lo};return s?(tR(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=Ot(n)?8:16),u0>0&&!a&&Gl&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Gl.push(l),l}const B=Wle;function Wle(t,e=null,n=null,r=0,i=null,o=!1){if((!t||t===NQ)&&(t=aa),Jr(t)){const s=Zc(t,e,!0);return n&&tR(s,n),u0>0&&!o&&Gl&&(s.shapeFlag&6?Gl[Gl.indexOf(t)]=s:Gl.push(s)),s.patchFlag|=-2,s}if(Kle(t)&&(t=t.__vccOpts),e){e=df(e);let{class:s,style:l}=e;s&&!Ot(s)&&(e.class=V(s)),Jt(l)&&(yQ(l)&&!Xe(l)&&(l=yo({},l)),e.style=vt(l))}const a=Ot(t)?1:fle(t)?128:Fle(t)?64:Jt(t)?4:St(t)?2:0;return J(t,e,n,r,i,a,o,!0)}function df(t){return t?yQ(t)||gS in t?yo({},t):t:null}function Zc(t,e,n=!1){const{props:r,ref:i,patchFlag:o,children:a}=t,s=e?an(r||{},e):r;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:s,key:s&&HQ(s),ref:e&&e.ref?n&&i?Xe(i)?i.concat(g1(e)):[i,g1(e)]:g1(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==dt?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Zc(t.ssContent),ssFallback:t.ssFallback&&Zc(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function Ue(t=" ",e=0){return B($m,null,t,e)}function Se(t="",e=!1){return e?(R(),xe(aa,null,t)):B(aa,null,t)}function Mu(t){return t==null||typeof t=="boolean"?B(aa):Xe(t)?B(dt,null,t.slice()):typeof t=="object"?Dd(t):B($m,null,String(t))}function Dd(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Zc(t)}function tR(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(Xe(e))n=16;else if(typeof e=="object")if(r&65){const i=e.default;i&&(i._c&&(i._d=!1),tR(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!(gS in e)?e._ctx=Lo:i===3&&Lo&&(Lo.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else St(e)?(e={default:e,_ctx:Lo},n=32):(e=String(e),r&64?(n=16,e=[Ue(e)]):n=8);t.children=e,t.shapeFlag|=n}function an(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const i in r)if(i==="class")e.class!==r.class&&(e.class=V([e.class,r.class]));else if(i==="style")e.style=vt([e.style,r.style]);else if(iS(i)){const o=e[i],a=r[i];a&&o!==a&&!(Xe(o)&&o.includes(a))&&(e[i]=o?[].concat(o,a):a)}else i!==""&&(e[i]=r[i])}return e}function wu(t,e,n,r=null){dl(t,e,7,[n,r])}const Hle=QQ();let Ule=0;function Xle(t,e,n){const r=t.type,i=(e?e.appContext:t.appContext)||Hle,o={uid:Ule++,vnode:t,type:r,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new iQ(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:BQ(r,i),emitsOptions:EQ(r,i),emit:null,emitted:null,propsDefaults:bi,inheritAttrs:r.inheritAttrs,ctx:bi,data:bi,props:bi,attrs:bi,slots:bi,refs:bi,setupState:bi,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=ole.bind(null,o),t.ce&&t.ce(o),o}let Vi=null;const tn=()=>Vi||Lo,Wg=t=>{Vi=t,t.scope.on()},Qh=()=>{Vi&&Vi.scope.off(),Vi=null};function UQ(t){return t.vnode.shapeFlag&4}let c0=!1;function Zle(t,e=!1){c0=e;const{props:n,children:r}=t.vnode,i=UQ(t);Ple(t,n,i,e),Rle(t,r);const o=i?qle(t,e):void 0;return c0=!1,o}function qle(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=Qc(new Proxy(t.ctx,xle));const{setup:r}=n;if(r){const i=t.setupContext=r.length>1?ZQ(t):null;Wg(t),Am();const o=tf(r,t,0,[t.props,i]);if(Mm(),Qh(),t0(o)){if(o.then(Qh,Qh),e)return o.then(a=>{F3(t,a,e)}).catch(a=>{lS(a,t,0)});t.asyncDep=o}else F3(t,o,e)}else XQ(t,e)}function F3(t,e,n){St(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Jt(e)&&(t.setupState=_Q(e)),XQ(t,n)}let V3;function XQ(t,e,n){const r=t.type;if(!t.render){if(!e&&V3&&!r.render){const i=r.template||KM(t).template;if(i){const{isCustomElement:o,compilerOptions:a}=t.appContext.config,{delimiters:s,compilerOptions:l}=r,u=yo(yo({isCustomElement:o,delimiters:s},a),l);r.render=V3(i,u)}}t.render=r.render||ir}Wg(t),Am(),Sle(t),Mm(),Qh()}function Yle(t){return new Proxy(t.attrs,{get(e,n){return Ja(t,"get","$attrs"),e[n]}})}function ZQ(t){const e=r=>{t.exposed=r||{}};let n;return{get attrs(){return n||(n=Yle(t))},slots:t.slots,emit:t.emit,expose:e}}function mS(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(_Q(Qc(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in by)return by[n](t)},has(e,n){return n in e||n in by}}))}function Gle(t,e=!0){return St(t)?t.displayName||t.name:t.name||e&&t.__name}function Kle(t){return St(t)&&"__vccOpts"in t}const M=(t,e)=>Kse(t,e,c0);function Ni(){return qQ().slots}function Nf(){return qQ().attrs}function qQ(){const t=tn();return t.setupContext||(t.setupContext=ZQ(t))}function Tt(t,e,n){const r=arguments.length;return r===2?Jt(e)&&!Xe(e)?Jr(e)?B(t,null,[e]):B(t,e):B(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Jr(n)&&(n=[n]),B(t,e,n))}const Jle=Symbol(""),eue=()=>ht(Jle),tue="3.2.47",nue="http://www.w3.org/2000/svg",_h=typeof document!="undefined"?document:null,j3=_h&&_h.createElement("template"),rue={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const i=e?_h.createElementNS(nue,t):_h.createElement(t,n?{is:n}:void 0);return t==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:t=>_h.createTextNode(t),createComment:t=>_h.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>_h.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,i,o){const a=n?n.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{j3.innerHTML=r?`<svg>${t}</svg>`:t;const s=j3.content;if(r){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}e.insertBefore(s,n)}return[a?a.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}};function iue(t,e,n){const r=t._vtc;r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}function oue(t,e,n){const r=t.style,i=Ot(n);if(n&&!i){if(e&&!Ot(e))for(const o in e)n[o]==null&&ik(r,o,"");for(const o in n)ik(r,o,n[o])}else{const o=r.display;i?e!==n&&(r.cssText=n):e&&t.removeAttribute("style"),"_vod"in t&&(r.display=o)}}const Q3=/\s*!important$/;function ik(t,e,n){if(Xe(n))n.forEach(r=>ik(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=aue(t,e);Q3.test(n)?t.setProperty($f(r),n.replace(Q3,""),"important"):t[r]=n}}const z3=["Webkit","Moz","ms"],uT={};function aue(t,e){const n=uT[e];if(n)return n;let r=$s(e);if(r!=="filter"&&r in t)return uT[e]=r;r=pb(r);for(let i=0;i<z3.length;i++){const o=z3[i]+r;if(o in t)return uT[e]=o}return e}const W3="http://www.w3.org/1999/xlink";function sue(t,e,n,r,i){if(r&&e.startsWith("xlink:"))n==null?t.removeAttributeNS(W3,e.slice(6,e.length)):t.setAttributeNS(W3,e,n);else{const o=sse(e);n==null||o&&!eQ(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)}}function lue(t,e,n,r,i,o,a){if(e==="innerHTML"||e==="textContent"){r&&a(r,i,o),t[e]=n==null?"":n;return}if(e==="value"&&t.tagName!=="PROGRESS"&&!t.tagName.includes("-")){t._value=n;const l=n==null?"":n;(t.value!==l||t.tagName==="OPTION")&&(t.value=l),n==null&&t.removeAttribute(e);return}let s=!1;if(n===""||n==null){const l=typeof t[e];l==="boolean"?n=eQ(n):n==null&&l==="string"?(n="",s=!0):l==="number"&&(n=0,s=!0)}try{t[e]=n}catch{}s&&t.removeAttribute(e)}function Qd(t,e,n,r){t.addEventListener(e,n,r)}function uue(t,e,n,r){t.removeEventListener(e,n,r)}function cue(t,e,n,r,i=null){const o=t._vei||(t._vei={}),a=o[e];if(r&&a)a.value=r;else{const[s,l]=due(e);if(r){const u=o[e]=pue(r,i);Qd(t,s,u,l)}else a&&(uue(t,s,a,l),o[e]=void 0)}}const H3=/(?:Once|Passive|Capture)$/;function due(t){let e;if(H3.test(t)){e={};let r;for(;r=t.match(H3);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):$f(t.slice(2)),e]}let cT=0;const fue=Promise.resolve(),hue=()=>cT||(fue.then(()=>cT=0),cT=Date.now());function pue(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;dl(gue(r,n.value),e,5,[r])};return n.value=t,n.attached=hue(),n}function gue(t,e){if(Xe(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>i=>!i._stopped&&r&&r(i))}else return e}const U3=/^on[a-z]/,mue=(t,e,n,r,i=!1,o,a,s,l)=>{e==="class"?iue(t,r,i):e==="style"?oue(t,n,r):iS(e)?$M(e)||cue(t,e,n,r,a):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):vue(t,e,r,i))?lue(t,e,r,o,a,s,l):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),sue(t,e,r,i))};function vue(t,e,n,r){return r?!!(e==="innerHTML"||e==="textContent"||e in t&&U3.test(e)&&St(n)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||U3.test(e)&&Ot(n)?!1:e in t}const kd="transition",Rv="animation",zi=(t,{slots:e})=>Tt(PQ,GQ(t),e);zi.displayName="Transition";const YQ={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},yue=zi.props=yo({},PQ.props,YQ),uh=(t,e=[])=>{Xe(t)?t.forEach(n=>n(...e)):t&&t(...e)},X3=t=>t?Xe(t)?t.some(e=>e.length>1):t.length>1:!1;function GQ(t){const e={};for(const $ in t)$ in YQ||(e[$]=t[$]);if(t.css===!1)return e;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=t,g=bue(i),m=g&&g[0],y=g&&g[1],{onBeforeEnter:b,onEnter:w,onEnterCancelled:O,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=b,onAppear:E=w,onAppearCancelled:T=O}=e,P=($,N,z)=>{Ad($,N?c:s),Ad($,N?u:a),z&&z()},A=($,N)=>{$._isLeaving=!1,Ad($,d),Ad($,h),Ad($,f),N&&N()},D=$=>(N,z)=>{const I=$?E:w,L=()=>P(N,$,z);uh(I,[N,L]),Z3(()=>{Ad(N,$?l:o),$c(N,$?c:s),X3(I)||q3(N,r,m,L)})};return yo(e,{onBeforeEnter($){uh(b,[$]),$c($,o),$c($,a)},onBeforeAppear($){uh(C,[$]),$c($,l),$c($,u)},onEnter:D(!1),onAppear:D(!0),onLeave($,N){$._isLeaving=!0;const z=()=>A($,N);$c($,d),JQ(),$c($,f),Z3(()=>{!$._isLeaving||(Ad($,d),$c($,h),X3(x)||q3($,r,y,z))}),uh(x,[$,z])},onEnterCancelled($){P($,!1),uh(O,[$])},onAppearCancelled($){P($,!0),uh(T,[$])},onLeaveCancelled($){A($),uh(S,[$])}})}function bue(t){if(t==null)return null;if(Jt(t))return[dT(t.enter),dT(t.leave)];{const e=dT(t);return[e,e]}}function dT(t){return gse(t)}function $c(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t._vtc||(t._vtc=new Set)).add(e)}function Ad(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.remove(r));const{_vtc:n}=t;n&&(n.delete(e),n.size||(t._vtc=void 0))}function Z3(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let _ue=0;function q3(t,e,n,r){const i=t._endId=++_ue,o=()=>{i===t._endId&&r()};if(n)return setTimeout(o,n);const{type:a,timeout:s,propCount:l}=KQ(t,e);if(!a)return r();const u=a+"end";let c=0;const d=()=>{t.removeEventListener(u,f),o()},f=h=>{h.target===t&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},s+1),t.addEventListener(u,f)}function KQ(t,e){const n=window.getComputedStyle(t),r=g=>(n[g]||"").split(", "),i=r(`${kd}Delay`),o=r(`${kd}Duration`),a=Y3(i,o),s=r(`${Rv}Delay`),l=r(`${Rv}Duration`),u=Y3(s,l);let c=null,d=0,f=0;e===kd?a>0&&(c=kd,d=a,f=o.length):e===Rv?u>0&&(c=Rv,d=u,f=l.length):(d=Math.max(a,u),c=d>0?a>u?kd:Rv:null,f=c?c===kd?o.length:l.length:0);const h=c===kd&&/\b(transform|all)(,|$)/.test(r(`${kd}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Y3(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,r)=>G3(n)+G3(t[r])))}function G3(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function JQ(){return document.body.offsetHeight}const e7=new WeakMap,t7=new WeakMap,n7={name:"TransitionGroup",props:yo({},yue,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=tn(),r=kQ();let i,o;return ac(()=>{if(!i.length)return;const a=t.moveClass||`${t.name||"v"}-move`;if(!Cue(i[0].el,n.vnode.el,a))return;i.forEach(wue),i.forEach(xue);const s=i.filter(Sue);JQ(),s.forEach(l=>{const u=l.el,c=u.style;$c(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u._moveCb=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u._moveCb=null,Ad(u,a))};u.addEventListener("transitionend",d)})}),()=>{const a=Dn(t),s=GQ(a);let l=a.tag||dt;i=o,o=e.default?ZM(e.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&l0(c,s0(c,s,r,n))}if(i)for(let u=0;u<i.length;u++){const c=i[u];l0(c,s0(c,s,r,n)),e7.set(c,c.el.getBoundingClientRect())}return B(l,null,o)}}},Oue=t=>delete t.mode;n7.props;const r7=n7;function wue(t){const e=t.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function xue(t){t7.set(t,t.el.getBoundingClientRect())}function Sue(t){const e=e7.get(t),n=t7.get(t),r=e.left-n.left,i=e.top-n.top;if(r||i){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${i}px)`,o.transitionDuration="0s",t}}function Cue(t,e,n){const r=t.cloneNode();t._vtc&&t._vtc.forEach(a=>{a.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(r);const{hasTransform:o}=KQ(r);return i.removeChild(r),o}const Hg=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Xe(e)?n=>p1(e,n):e};function Eue(t){t.target.composing=!0}function K3(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const vS={created(t,{modifiers:{lazy:e,trim:n,number:r}},i){t._assign=Hg(i);const o=r||i.props&&i.props.type==="number";Qd(t,e?"change":"input",a=>{if(a.target.composing)return;let s=t.value;n&&(s=s.trim()),o&&(s=X2(s)),t._assign(s)}),n&&Qd(t,"change",()=>{t.value=t.value.trim()}),e||(Qd(t,"compositionstart",Eue),Qd(t,"compositionend",K3),Qd(t,"change",K3))},mounted(t,{value:e}){t.value=e==null?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:n,trim:r,number:i}},o){if(t._assign=Hg(o),t.composing||document.activeElement===t&&t.type!=="range"&&(n||r&&t.value.trim()===e||(i||t.type==="number")&&X2(t.value)===e))return;const a=e==null?"":e;t.value!==a&&(t.value=a)}},cw={deep:!0,created(t,e,n){t._assign=Hg(n),Qd(t,"change",()=>{const r=t._modelValue,i=o7(t),o=t.checked,a=t._assign;if(Xe(r)){const s=tQ(r,i),l=s!==-1;if(o&&!l)a(r.concat(i));else if(!o&&l){const u=[...r];u.splice(s,1),a(u)}}else if(oS(r)){const s=new Set(r);o?s.add(i):s.delete(i),a(s)}else a(a7(t,o))})},mounted:J3,beforeUpdate(t,e,n){t._assign=Hg(n),J3(t,e,n)}};function J3(t,{value:e,oldValue:n},r){t._modelValue=e,Xe(e)?t.checked=tQ(e,r.props.value)>-1:oS(e)?t.checked=e.has(r.props.value):e!==n&&(t.checked=Qg(e,a7(t,!0)))}const i7={created(t,{value:e},n){t.checked=Qg(e,n.props.value),t._assign=Hg(n),Qd(t,"change",()=>{t._assign(o7(t))})},beforeUpdate(t,{value:e,oldValue:n},r){t._assign=Hg(r),e!==n&&(t.checked=Qg(e,r.props.value))}};function o7(t){return"_value"in t?t._value:t.value}function a7(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const Tue=["ctrl","shift","alt","meta"],kue={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>Tue.some(n=>t[`${n}Key`]&&!e.includes(n))},At=(t,e)=>(n,...r)=>{for(let i=0;i<e.length;i++){const o=kue[e[i]];if(o&&o(n,e))return}return t(n,...r)},Pue={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},br=(t,e)=>n=>{if(!("key"in n))return;const r=$f(n.key);if(e.some(i=>i===r||Pue[i]===r))return t(n)},Bn={beforeMount(t,{value:e},{transition:n}){t._vod=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):$v(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),$v(t,!0),r.enter(t)):r.leave(t,()=>{$v(t,!1)}):$v(t,e))},beforeUnmount(t,{value:e}){$v(t,e)}};function $v(t,e){t.style.display=e?t._vod:"none"}const Aue=yo({patchProp:mue},rue);let e4;function s7(){return e4||(e4=Lle(Aue))}const ff=(...t)=>{s7().render(...t)},yS=(...t)=>{const e=s7().createApp(...t),{mount:n}=e;return e.mount=r=>{const i=Mue(r);if(!i)return;const o=e._component;!St(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},e};function Mue(t){return Ot(t)?document.querySelector(t):t}const Rue="2.9.1",t4=Symbol("INSTALLED_KEY"),l7=Symbol(),wy="el",$ue="is-",ch=(t,e,n,r,i)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),r&&(o+=`__${r}`),i&&(o+=`--${i}`),o},u7=Symbol("namespaceContextKey"),nR=t=>{const e=t||(tn()?ht(u7,F(wy)):F(wy));return M(()=>p(e)||wy)},Qe=(t,e)=>{const n=nR(e);return{namespace:n,b:(m="")=>ch(n.value,t,m,"",""),e:m=>m?ch(n.value,t,"",m,""):"",m:m=>m?ch(n.value,t,"","",m):"",be:(m,y)=>m&&y?ch(n.value,t,m,y,""):"",em:(m,y)=>m&&y?ch(n.value,t,"",m,y):"",bm:(m,y)=>m&&y?ch(n.value,t,m,"",y):"",bem:(m,y,b)=>m&&y&&b?ch(n.value,t,m,y,b):"",is:(m,...y)=>{const b=y.length>=1?y[0]:!0;return m&&b?`${$ue}${m}`:""},cssVar:m=>{const y={};for(const b in m)m[b]&&(y[`--${n.value}-${b}`]=m[b]);return y},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const y={};for(const b in m)m[b]&&(y[`--${n.value}-${t}-${b}`]=m[b]);return y},cssVarBlockName:m=>`--${n.value}-${t}-${m}`}};var Nue=typeof global=="object"&&global&&global.Object===Object&&global,c7=Nue,Due=typeof self=="object"&&self&&self.Object===Object&&self,Lue=c7||Due||Function("return this")(),Oo=Lue,Iue=Oo.Symbol,la=Iue,d7=Object.prototype,Bue=d7.hasOwnProperty,Fue=d7.toString,Nv=la?la.toStringTag:void 0;function Vue(t){var e=Bue.call(t,Nv),n=t[Nv];try{t[Nv]=void 0;var r=!0}catch{}var i=Fue.call(t);return r&&(e?t[Nv]=n:delete t[Nv]),i}var jue=Object.prototype,Que=jue.toString;function zue(t){return Que.call(t)}var Wue="[object Null]",Hue="[object Undefined]",n4=la?la.toStringTag:void 0;function ka(t){return t==null?t===void 0?Hue:Wue:n4&&n4 in Object(t)?Vue(t):zue(t)}function Ri(t){return t!=null&&typeof t=="object"}var Uue="[object Symbol]";function Ns(t){return typeof t=="symbol"||Ri(t)&&ka(t)==Uue}var Xue=0/0;function r4(t){return typeof t=="number"?t:Ns(t)?Xue:+t}function Ci(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Zue=Array.isArray,Fn=Zue,que=1/0,i4=la?la.prototype:void 0,o4=i4?i4.toString:void 0;function Ds(t){if(typeof t=="string")return t;if(Fn(t))return Ci(t,Ds)+"";if(Ns(t))return o4?o4.call(t):"";var e=t+"";return e=="0"&&1/t==-que?"-0":e}function bS(t,e){return function(n,r){var i;if(n===void 0&&r===void 0)return e;if(n!==void 0&&(i=n),r!==void 0){if(i===void 0)return r;typeof n=="string"||typeof r=="string"?(n=Ds(n),r=Ds(r)):(n=r4(n),r=r4(r)),i=t(n,r)}return i}}var Yue=bS(function(t,e){return t+e},0),Gue=Yue,Kue=/\s/;function f7(t){for(var e=t.length;e--&&Kue.test(t.charAt(e)););return e}var Jue=/^\s+/;function h7(t){return t&&t.slice(0,f7(t)+1).replace(Jue,"")}function Oi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var a4=0/0,ece=/^[-+]0x[0-9a-f]+$/i,tce=/^0b[01]+$/i,nce=/^0o[0-7]+$/i,rce=parseInt;function fl(t){if(typeof t=="number")return t;if(Ns(t))return a4;if(Oi(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Oi(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=h7(t);var n=tce.test(t);return n||nce.test(t)?rce(t.slice(2),n?2:8):ece.test(t)?a4:+t}var s4=1/0,ice=17976931348623157e292;function zc(t){if(!t)return t===0?t:0;if(t=fl(t),t===s4||t===-s4){var e=t<0?-1:1;return e*ice}return t===t?t:0}function Kn(t){var e=zc(t),n=e%1;return e===e?n?e-n:e:0}var oce="Expected a function";function ace(t,e){if(typeof e!="function")throw new TypeError(oce);return t=Kn(t),function(){if(--t<1)return e.apply(this,arguments)}}function Pa(t){return t}var sce="[object AsyncFunction]",lce="[object Function]",uce="[object GeneratorFunction]",cce="[object Proxy]";function ad(t){if(!Oi(t))return!1;var e=ka(t);return e==lce||e==uce||e==sce||e==cce}var dce=Oo["__core-js_shared__"],m1=dce,l4=function(){var t=/[^.]+$/.exec(m1&&m1.keys&&m1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function fce(t){return!!l4&&l4 in t}var hce=Function.prototype,pce=hce.toString;function yp(t){if(t!=null){try{return pce.call(t)}catch{}try{return t+""}catch{}}return""}var gce=/[\\^$.*+?()[\]{}|]/g,mce=/^\[object .+?Constructor\]$/,vce=Function.prototype,yce=Object.prototype,bce=vce.toString,_ce=yce.hasOwnProperty,Oce=RegExp("^"+bce.call(_ce).replace(gce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p7(t){if(!Oi(t)||fce(t))return!1;var e=ad(t)?Oce:mce;return e.test(yp(t))}function wce(t,e){return t==null?void 0:t[e]}function bp(t,e){var n=wce(t,e);return p7(n)?n:void 0}var xce=bp(Oo,"WeakMap"),d0=xce,Sce=d0&&new d0,dw=Sce,Cce=dw?function(t,e){return dw.set(t,e),t}:Pa,g7=Cce,u4=Object.create,Ece=function(){function t(){}return function(e){if(!Oi(e))return{};if(u4)return u4(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Nm=Ece;function f0(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Nm(t.prototype),r=t.apply(n,e);return Oi(r)?r:n}}var Tce=1;function kce(t,e,n){var r=e&Tce,i=f0(t);function o(){var a=this&&this!==Oo&&this instanceof o?i:t;return a.apply(r?n:this,arguments)}return o}function Ls(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var Pce=Math.max;function m7(t,e,n,r){for(var i=-1,o=t.length,a=n.length,s=-1,l=e.length,u=Pce(o-a,0),c=Array(l+u),d=!r;++s<l;)c[s]=e[s];for(;++i<a;)(d||i<o)&&(c[n[i]]=t[i]);for(;u--;)c[s++]=t[i++];return c}var Ace=Math.max;function v7(t,e,n,r){for(var i=-1,o=t.length,a=-1,s=n.length,l=-1,u=e.length,c=Ace(o-s,0),d=Array(c+u),f=!r;++i<c;)d[i]=t[i];for(var h=i;++l<u;)d[h+l]=e[l];for(;++a<s;)(f||i<o)&&(d[h+n[a]]=t[i++]);return d}function Mce(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}function _S(){}var Rce=4294967295;function Sr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Rce,this.__views__=[]}Sr.prototype=Nm(_S.prototype);Sr.prototype.constructor=Sr;function kg(){}var $ce=dw?function(t){return dw.get(t)}:kg,rR=$ce,Nce={},Pg=Nce,Dce=Object.prototype,Lce=Dce.hasOwnProperty;function v1(t){for(var e=t.name+"",n=Pg[e],r=Lce.call(Pg,e)?n.length:0;r--;){var i=n[r],o=i.func;if(o==null||o==t)return i.name}return e}function vl(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}vl.prototype=Nm(_S.prototype);vl.prototype.constructor=vl;function Za(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function y7(t){if(t instanceof Sr)return t.clone();var e=new vl(t.__wrapped__,t.__chain__);return e.__actions__=Za(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Ice=Object.prototype,Bce=Ice.hasOwnProperty;function me(t){if(Ri(t)&&!Fn(t)&&!(t instanceof Sr)){if(t instanceof vl)return t;if(Bce.call(t,"__wrapped__"))return y7(t)}return new vl(t)}me.prototype=_S.prototype;me.prototype.constructor=me;function ok(t){var e=v1(t),n=me[e];if(typeof n!="function"||!(e in Sr.prototype))return!1;if(t===n)return!0;var r=rR(n);return!!r&&t===r[0]}var Fce=800,Vce=16,jce=Date.now;function b7(t){var e=0,n=0;return function(){var r=jce(),i=Vce-(r-n);if(n=r,i>0){if(++e>=Fce)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Qce=b7(g7),_7=Qce,zce=/\{\n\/\* \[wrapped with (.+)\] \*/,Wce=/,? & /;function Hce(t){var e=t.match(zce);return e?e[1].split(Wce):[]}var Uce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Xce(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Uce,`{
- /* [wrapped with `+e+`] */
- `)}function iR(t){return function(){return t}}var Zce=function(){try{var t=bp(Object,"defineProperty");return t({},"",{}),t}catch{}}(),fw=Zce,qce=fw?function(t,e){return fw(t,"toString",{configurable:!0,enumerable:!1,value:iR(e),writable:!0})}:Pa,Yce=qce,Gce=b7(Yce),oR=Gce;function El(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function OS(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function O7(t){return t!==t}function Kce(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Dm(t,e,n){return e===e?Kce(t,e,n):OS(t,O7,n)}function wS(t,e){var n=t==null?0:t.length;return!!n&&Dm(t,e,0)>-1}var Jce=1,ede=2,tde=8,nde=16,rde=32,ide=64,ode=128,ade=256,sde=512,lde=[["ary",ode],["bind",Jce],["bindKey",ede],["curry",tde],["curryRight",nde],["flip",sde],["partial",rde],["partialRight",ide],["rearg",ade]];function ude(t,e){return El(lde,function(n){var r="_."+n[0];e&n[1]&&!wS(t,r)&&t.push(r)}),t.sort()}function w7(t,e,n){var r=e+"";return oR(t,Xce(r,ude(Hce(r),n)))}var cde=1,dde=2,fde=4,hde=8,c4=32,d4=64;function x7(t,e,n,r,i,o,a,s,l,u){var c=e&hde,d=c?a:void 0,f=c?void 0:a,h=c?o:void 0,g=c?void 0:o;e|=c?c4:d4,e&=~(c?d4:c4),e&fde||(e&=~(cde|dde));var m=[t,e,i,h,d,g,f,s,l,u],y=n.apply(void 0,m);return ok(t)&&_7(y,m),y.placeholder=r,w7(y,t,e)}function Lm(t){var e=t;return e.placeholder}var pde=9007199254740991,gde=/^(?:0|[1-9]\d*)$/;function sd(t,e){var n=typeof t;return e=e==null?pde:e,!!e&&(n=="number"||n!="symbol"&&gde.test(t))&&t>-1&&t%1==0&&t<e}var mde=Math.min;function vde(t,e){for(var n=t.length,r=mde(e.length,n),i=Za(t);r--;){var o=e[r];t[r]=sd(o,n)?i[o]:void 0}return t}var f4="__lodash_placeholder__";function hf(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];(a===e||a===f4)&&(t[n]=f4,o[i++]=n)}return o}var yde=1,bde=2,_de=8,Ode=16,wde=128,xde=512;function xS(t,e,n,r,i,o,a,s,l,u){var c=e&wde,d=e&yde,f=e&bde,h=e&(_de|Ode),g=e&xde,m=f?void 0:f0(t);function y(){for(var b=arguments.length,w=Array(b),O=b;O--;)w[O]=arguments[O];if(h)var x=Lm(y),S=Mce(w,x);if(r&&(w=m7(w,r,i,h)),o&&(w=v7(w,o,a,h)),b-=S,h&&b<u){var C=hf(w,x);return x7(t,e,xS,y.placeholder,n,w,C,s,l,u-b)}var E=d?n:this,T=f?E[t]:t;return b=w.length,s?w=vde(w,s):g&&b>1&&w.reverse(),c&&l<b&&(w.length=l),this&&this!==Oo&&this instanceof y&&(T=m||f0(T)),T.apply(E,w)}return y}function Sde(t,e,n){var r=f0(t);function i(){for(var o=arguments.length,a=Array(o),s=o,l=Lm(i);s--;)a[s]=arguments[s];var u=o<3&&a[0]!==l&&a[o-1]!==l?[]:hf(a,l);if(o-=u.length,o<n)return x7(t,e,xS,i.placeholder,void 0,a,u,void 0,void 0,n-o);var c=this&&this!==Oo&&this instanceof i?r:t;return Ls(c,this,a)}return i}var Cde=1;function Ede(t,e,n,r){var i=e&Cde,o=f0(t);function a(){for(var s=-1,l=arguments.length,u=-1,c=r.length,d=Array(c+l),f=this&&this!==Oo&&this instanceof a?o:t;++u<c;)d[u]=r[u];for(;l--;)d[u++]=arguments[++s];return Ls(f,i?n:this,d)}return a}var h4="__lodash_placeholder__",fT=1,Tde=2,kde=4,p4=8,Dv=128,g4=256,Pde=Math.min;function Ade(t,e){var n=t[1],r=e[1],i=n|r,o=i<(fT|Tde|Dv),a=r==Dv&&n==p4||r==Dv&&n==g4&&t[7].length<=e[8]||r==(Dv|g4)&&e[7].length<=e[8]&&n==p4;if(!(o||a))return t;r&fT&&(t[2]=e[2],i|=n&fT?0:kde);var s=e[3];if(s){var l=t[3];t[3]=l?m7(l,s,e[4]):s,t[4]=l?hf(t[3],h4):e[4]}return s=e[5],s&&(l=t[5],t[5]=l?v7(l,s,e[6]):s,t[6]=l?hf(t[5],h4):e[6]),s=e[7],s&&(t[7]=s),r&Dv&&(t[8]=t[8]==null?e[8]:Pde(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}var Mde="Expected a function",m4=1,Rde=2,hT=8,pT=16,gT=32,v4=64,y4=Math.max;function ld(t,e,n,r,i,o,a,s){var l=e&Rde;if(!l&&typeof t!="function")throw new TypeError(Mde);var u=r?r.length:0;if(u||(e&=~(gT|v4),r=i=void 0),a=a===void 0?a:y4(Kn(a),0),s=s===void 0?s:Kn(s),u-=i?i.length:0,e&v4){var c=r,d=i;r=i=void 0}var f=l?void 0:rR(t),h=[t,e,n,r,i,c,d,o,a,s];if(f&&Ade(h,f),t=h[0],e=h[1],n=h[2],r=h[3],i=h[4],s=h[9]=h[9]===void 0?l?0:t.length:y4(h[9]-u,0),!s&&e&(hT|pT)&&(e&=~(hT|pT)),!e||e==m4)var g=kce(t,e,n);else e==hT||e==pT?g=Sde(t,e,s):(e==gT||e==(m4|gT))&&!i.length?g=Ede(t,e,n,r):g=xS.apply(void 0,h);var m=f?g7:_7;return w7(m(g,h),t,e)}var $de=128;function S7(t,e,n){return e=n?void 0:e,e=t&&e==null?t.length:e,ld(t,$de,void 0,void 0,void 0,void 0,e)}function ud(t,e,n){e=="__proto__"&&fw?fw(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function hu(t,e){return t===e||t!==t&&e!==e}var Nde=Object.prototype,Dde=Nde.hasOwnProperty;function gb(t,e,n){var r=t[e];(!(Dde.call(t,e)&&hu(r,n))||n===void 0&&!(e in t))&&ud(t,e,n)}function sc(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=r?r(n[s],t[s],s,n,t):void 0;l===void 0&&(l=t[s]),i?ud(n,s,l):gb(n,s,l)}return n}var b4=Math.max;function C7(t,e,n){return e=b4(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=b4(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),Ls(t,this,s)}}function cr(t,e){return oR(C7(t,e,Pa),t+"")}var Lde=9007199254740991;function SS(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Lde}function as(t){return t!=null&&SS(t.length)&&!ad(t)}function Sa(t,e,n){if(!Oi(n))return!1;var r=typeof e;return(r=="number"?as(n)&&sd(e,n.length):r=="string"&&e in n)?hu(n[e],t):!1}function Im(t){return cr(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&Sa(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e})}var Ide=Object.prototype;function mb(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Ide;return t===n}function aR(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Bde="[object Arguments]";function _4(t){return Ri(t)&&ka(t)==Bde}var E7=Object.prototype,Fde=E7.hasOwnProperty,Vde=E7.propertyIsEnumerable,jde=_4(function(){return arguments}())?_4:function(t){return Ri(t)&&Fde.call(t,"callee")&&!Vde.call(t,"callee")},Jh=jde;function sR(){return!1}var T7=typeof ks=="object"&&ks&&!ks.nodeType&&ks,O4=T7&&typeof Ps=="object"&&Ps&&!Ps.nodeType&&Ps,Qde=O4&&O4.exports===T7,w4=Qde?Oo.Buffer:void 0,zde=w4?w4.isBuffer:void 0,Wde=zde||sR,pf=Wde,Hde="[object Arguments]",Ude="[object Array]",Xde="[object Boolean]",Zde="[object Date]",qde="[object Error]",Yde="[object Function]",Gde="[object Map]",Kde="[object Number]",Jde="[object Object]",efe="[object RegExp]",tfe="[object Set]",nfe="[object String]",rfe="[object WeakMap]",ife="[object ArrayBuffer]",ofe="[object DataView]",afe="[object Float32Array]",sfe="[object Float64Array]",lfe="[object Int8Array]",ufe="[object Int16Array]",cfe="[object Int32Array]",dfe="[object Uint8Array]",ffe="[object Uint8ClampedArray]",hfe="[object Uint16Array]",pfe="[object Uint32Array]",vi={};vi[afe]=vi[sfe]=vi[lfe]=vi[ufe]=vi[cfe]=vi[dfe]=vi[ffe]=vi[hfe]=vi[pfe]=!0;vi[Hde]=vi[Ude]=vi[ife]=vi[Xde]=vi[ofe]=vi[Zde]=vi[qde]=vi[Yde]=vi[Gde]=vi[Kde]=vi[Jde]=vi[efe]=vi[tfe]=vi[nfe]=vi[rfe]=!1;function gfe(t){return Ri(t)&&SS(t.length)&&!!vi[ka(t)]}function Is(t){return function(e){return t(e)}}var k7=typeof ks=="object"&&ks&&!ks.nodeType&&ks,xy=k7&&typeof Ps=="object"&&Ps&&!Ps.nodeType&&Ps,mfe=xy&&xy.exports===k7,mT=mfe&&c7.process,vfe=function(){try{var t=xy&&xy.require&&xy.require("util").types;return t||mT&&mT.binding&&mT.binding("util")}catch{}}(),yl=vfe,x4=yl&&yl.isTypedArray,yfe=x4?Is(x4):gfe,Bm=yfe,bfe=Object.prototype,_fe=bfe.hasOwnProperty;function P7(t,e){var n=Fn(t),r=!n&&Jh(t),i=!n&&!r&&pf(t),o=!n&&!r&&!i&&Bm(t),a=n||r||i||o,s=a?aR(t.length,String):[],l=s.length;for(var u in t)(e||_fe.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||sd(u,l)))&&s.push(u);return s}function A7(t,e){return function(n){return t(e(n))}}var Ofe=A7(Object.keys,Object),wfe=Ofe,xfe=Object.prototype,Sfe=xfe.hasOwnProperty;function lR(t){if(!mb(t))return wfe(t);var e=[];for(var n in Object(t))Sfe.call(t,n)&&n!="constructor"&&e.push(n);return e}function uo(t){return as(t)?P7(t):lR(t)}var Cfe=Object.prototype,Efe=Cfe.hasOwnProperty,Tfe=Im(function(t,e){if(mb(e)||as(e)){sc(e,uo(e),t);return}for(var n in e)Efe.call(e,n)&&gb(t,n,e[n])}),Nr=Tfe;function kfe(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var Pfe=Object.prototype,Afe=Pfe.hasOwnProperty;function Mfe(t){if(!Oi(t))return kfe(t);var e=mb(t),n=[];for(var r in t)r=="constructor"&&(e||!Afe.call(t,r))||n.push(r);return n}function ss(t){return as(t)?P7(t,!0):Mfe(t)}var Rfe=Im(function(t,e){sc(e,ss(e),t)}),S4=Rfe,$fe=Im(function(t,e,n,r){sc(e,ss(e),t,r)}),hw=$fe,Nfe=Im(function(t,e,n,r){sc(e,uo(e),t,r)}),Dfe=Nfe,Lfe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ife=/^\w*$/;function uR(t,e){if(Fn(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Ns(t)?!0:Ife.test(t)||!Lfe.test(t)||e!=null&&t in Object(e)}var Bfe=bp(Object,"create"),h0=Bfe;function Ffe(){this.__data__=h0?h0(null):{},this.size=0}function Vfe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var jfe="__lodash_hash_undefined__",Qfe=Object.prototype,zfe=Qfe.hasOwnProperty;function Wfe(t){var e=this.__data__;if(h0){var n=e[t];return n===jfe?void 0:n}return zfe.call(e,t)?e[t]:void 0}var Hfe=Object.prototype,Ufe=Hfe.hasOwnProperty;function Xfe(t){var e=this.__data__;return h0?e[t]!==void 0:Ufe.call(e,t)}var Zfe="__lodash_hash_undefined__";function qfe(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=h0&&e===void 0?Zfe:e,this}function ep(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ep.prototype.clear=Ffe;ep.prototype.delete=Vfe;ep.prototype.get=Wfe;ep.prototype.has=Xfe;ep.prototype.set=qfe;function Yfe(){this.__data__=[],this.size=0}function CS(t,e){for(var n=t.length;n--;)if(hu(t[n][0],e))return n;return-1}var Gfe=Array.prototype,Kfe=Gfe.splice;function Jfe(t){var e=this.__data__,n=CS(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Kfe.call(e,n,1),--this.size,!0}function ehe(t){var e=this.__data__,n=CS(e,t);return n<0?void 0:e[n][1]}function the(t){return CS(this.__data__,t)>-1}function nhe(t,e){var n=this.__data__,r=CS(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function cd(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}cd.prototype.clear=Yfe;cd.prototype.delete=Jfe;cd.prototype.get=ehe;cd.prototype.has=the;cd.prototype.set=nhe;var rhe=bp(Oo,"Map"),p0=rhe;function ihe(){this.size=0,this.__data__={hash:new ep,map:new(p0||cd),string:new ep}}function ohe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ES(t,e){var n=t.__data__;return ohe(e)?n[typeof e=="string"?"string":"hash"]:n.map}function ahe(t){var e=ES(this,t).delete(t);return this.size-=e?1:0,e}function she(t){return ES(this,t).get(t)}function lhe(t){return ES(this,t).has(t)}function uhe(t,e){var n=ES(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function dd(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dd.prototype.clear=ihe;dd.prototype.delete=ahe;dd.prototype.get=she;dd.prototype.has=lhe;dd.prototype.set=uhe;var che="Expected a function";function vb(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(che);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(vb.Cache||dd),n}vb.Cache=dd;var dhe=500;function fhe(t){var e=vb(t,function(r){return n.size===dhe&&n.clear(),r}),n=e.cache;return e}var hhe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,phe=/\\(\\)?/g,ghe=fhe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(hhe,function(n,r,i,o){e.push(i?o.replace(phe,"$1"):r||n)}),e}),M7=ghe;function Zr(t){return t==null?"":Ds(t)}function Df(t,e){return Fn(t)?t:uR(t,e)?[t]:M7(Zr(t))}var mhe=1/0;function lc(t){if(typeof t=="string"||Ns(t))return t;var e=t+"";return e=="0"&&1/t==-mhe?"-0":e}function _p(t,e){e=Df(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[lc(e[n++])];return n&&n==r?t:void 0}function Kr(t,e,n){var r=t==null?void 0:_p(t,e);return r===void 0?n:r}function cR(t,e){for(var n=-1,r=e.length,i=Array(r),o=t==null;++n<r;)i[n]=o?void 0:Kr(t,e[n]);return i}function Lf(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var C4=la?la.isConcatSpreadable:void 0;function vhe(t){return Fn(t)||Jh(t)||!!(C4&&t&&t[C4])}function zo(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=vhe),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?zo(s,e-1,n,r,i):Lf(i,s):r||(i[i.length]=s)}return i}function dR(t){var e=t==null?0:t.length;return e?zo(t,1):[]}function fd(t){return oR(C7(t,void 0,dR),t+"")}var yhe=fd(cR),bhe=yhe,_he=A7(Object.getPrototypeOf,Object),TS=_he,Ohe="[object Object]",whe=Function.prototype,xhe=Object.prototype,R7=whe.toString,She=xhe.hasOwnProperty,Che=R7.call(Object);function yb(t){if(!Ri(t)||ka(t)!=Ohe)return!1;var e=TS(t);if(e===null)return!0;var n=She.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&R7.call(n)==Che}var Ehe="[object DOMException]",The="[object Error]";function fR(t){if(!Ri(t))return!1;var e=ka(t);return e==The||e==Ehe||typeof t.message=="string"&&typeof t.name=="string"&&!yb(t)}var khe=cr(function(t,e){try{return Ls(t,void 0,e)}catch(n){return fR(n)?n:new Error(n)}}),$7=khe,Phe="Expected a function";function N7(t,e){var n;if(typeof e!="function")throw new TypeError(Phe);return t=Kn(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var Ahe=1,Mhe=32,hR=cr(function(t,e,n){var r=Ahe;if(n.length){var i=hf(n,Lm(hR));r|=Mhe}return ld(t,r,e,n,i)});hR.placeholder={};var D7=hR,Rhe=fd(function(t,e){return El(e,function(n){n=lc(n),ud(t,n,D7(t[n],t))}),t}),$he=Rhe,Nhe=1,Dhe=2,Lhe=32,pR=cr(function(t,e,n){var r=Nhe|Dhe;if(n.length){var i=hf(n,Lm(pR));r|=Lhe}return ld(e,r,t,n,i)});pR.placeholder={};var Ihe=pR;function bl(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function If(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:bl(t,e,n)}var Bhe="\\ud800-\\udfff",Fhe="\\u0300-\\u036f",Vhe="\\ufe20-\\ufe2f",jhe="\\u20d0-\\u20ff",Qhe=Fhe+Vhe+jhe,zhe="\\ufe0e\\ufe0f",Whe="\\u200d",Hhe=RegExp("["+Whe+Bhe+Qhe+zhe+"]");function Fm(t){return Hhe.test(t)}function Uhe(t){return t.split("")}var L7="\\ud800-\\udfff",Xhe="\\u0300-\\u036f",Zhe="\\ufe20-\\ufe2f",qhe="\\u20d0-\\u20ff",Yhe=Xhe+Zhe+qhe,Ghe="\\ufe0e\\ufe0f",Khe="["+L7+"]",ak="["+Yhe+"]",sk="\\ud83c[\\udffb-\\udfff]",Jhe="(?:"+ak+"|"+sk+")",I7="[^"+L7+"]",B7="(?:\\ud83c[\\udde6-\\uddff]){2}",F7="[\\ud800-\\udbff][\\udc00-\\udfff]",epe="\\u200d",V7=Jhe+"?",j7="["+Ghe+"]?",tpe="(?:"+epe+"(?:"+[I7,B7,F7].join("|")+")"+j7+V7+")*",npe=j7+V7+tpe,rpe="(?:"+[I7+ak+"?",ak,B7,F7,Khe].join("|")+")",ipe=RegExp(sk+"(?="+sk+")|"+rpe+npe,"g");function ope(t){return t.match(ipe)||[]}function su(t){return Fm(t)?ope(t):Uhe(t)}function Q7(t){return function(e){e=Zr(e);var n=Fm(e)?su(e):void 0,r=n?n[0]:e.charAt(0),i=n?If(n,1).join(""):e.slice(1);return r[t]()+i}}var ape=Q7("toUpperCase"),gR=ape;function z7(t){return gR(Zr(t).toLowerCase())}function mR(t,e,n,r){var i=-1,o=t==null?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function vR(t){return function(e){return t==null?void 0:t[e]}}var spe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},lpe=vR(spe),upe=lpe,cpe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dpe="\\u0300-\\u036f",fpe="\\ufe20-\\ufe2f",hpe="\\u20d0-\\u20ff",ppe=dpe+fpe+hpe,gpe="["+ppe+"]",mpe=RegExp(gpe,"g");function W7(t){return t=Zr(t),t&&t.replace(cpe,upe).replace(mpe,"")}var vpe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function ype(t){return t.match(vpe)||[]}var bpe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function _pe(t){return bpe.test(t)}var H7="\\ud800-\\udfff",Ope="\\u0300-\\u036f",wpe="\\ufe20-\\ufe2f",xpe="\\u20d0-\\u20ff",Spe=Ope+wpe+xpe,U7="\\u2700-\\u27bf",X7="a-z\\xdf-\\xf6\\xf8-\\xff",Cpe="\\xac\\xb1\\xd7\\xf7",Epe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Tpe="\\u2000-\\u206f",kpe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Z7="A-Z\\xc0-\\xd6\\xd8-\\xde",Ppe="\\ufe0e\\ufe0f",q7=Cpe+Epe+Tpe+kpe,Y7="['\u2019]",E4="["+q7+"]",Ape="["+Spe+"]",G7="\\d+",Mpe="["+U7+"]",K7="["+X7+"]",J7="[^"+H7+q7+G7+U7+X7+Z7+"]",Rpe="\\ud83c[\\udffb-\\udfff]",$pe="(?:"+Ape+"|"+Rpe+")",Npe="[^"+H7+"]",e9="(?:\\ud83c[\\udde6-\\uddff]){2}",t9="[\\ud800-\\udbff][\\udc00-\\udfff]",og="["+Z7+"]",Dpe="\\u200d",T4="(?:"+K7+"|"+J7+")",Lpe="(?:"+og+"|"+J7+")",k4="(?:"+Y7+"(?:d|ll|m|re|s|t|ve))?",P4="(?:"+Y7+"(?:D|LL|M|RE|S|T|VE))?",n9=$pe+"?",r9="["+Ppe+"]?",Ipe="(?:"+Dpe+"(?:"+[Npe,e9,t9].join("|")+")"+r9+n9+")*",Bpe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fpe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vpe=r9+n9+Ipe,jpe="(?:"+[Mpe,e9,t9].join("|")+")"+Vpe,Qpe=RegExp([og+"?"+K7+"+"+k4+"(?="+[E4,og,"$"].join("|")+")",Lpe+"+"+P4+"(?="+[E4,og+T4,"$"].join("|")+")",og+"?"+T4+"+"+k4,og+"+"+P4,Fpe,Bpe,G7,jpe].join("|"),"g");function zpe(t){return t.match(Qpe)||[]}function i9(t,e,n){return t=Zr(t),e=n?void 0:e,e===void 0?_pe(t)?zpe(t):ype(t):t.match(e)||[]}var Wpe="['\u2019]",Hpe=RegExp(Wpe,"g");function Vm(t){return function(e){return mR(i9(W7(e).replace(Hpe,"")),t,"")}}var Upe=Vm(function(t,e,n){return e=e.toLowerCase(),t+(n?z7(e):e)}),Xpe=Upe;function No(){if(!arguments.length)return[];var t=arguments[0];return Fn(t)?t:[t]}var Zpe=Oo.isFinite,qpe=Math.min;function yR(t){var e=Math[t];return function(n,r){if(n=fl(n),r=r==null?0:qpe(Kn(r),292),r&&Zpe(n)){var i=(Zr(n)+"e").split("e"),o=e(i[0]+"e"+(+i[1]+r));return i=(Zr(o)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return e(n)}}var Ype=yR("ceil"),Gpe=Ype;function o9(t){var e=me(t);return e.__chain__=!0,e}var Kpe=Math.ceil,Jpe=Math.max;function ege(t,e,n){(n?Sa(t,e,n):e===void 0)?e=1:e=Jpe(Kn(e),0);var r=t==null?0:t.length;if(!r||e<1)return[];for(var i=0,o=0,a=Array(Kpe(r/e));i<r;)a[o++]=bl(t,i,i+=e);return a}function Op(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function tge(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=fl(n),n=n===n?n:0),e!==void 0&&(e=fl(e),e=e===e?e:0),Op(fl(t),e,n)}function nge(){this.__data__=new cd,this.size=0}function rge(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function ige(t){return this.__data__.get(t)}function oge(t){return this.__data__.has(t)}var age=200;function sge(t,e){var n=this.__data__;if(n instanceof cd){var r=n.__data__;if(!p0||r.length<age-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new dd(r)}return n.set(t,e),this.size=n.size,this}function tu(t){var e=this.__data__=new cd(t);this.size=e.size}tu.prototype.clear=nge;tu.prototype.delete=rge;tu.prototype.get=ige;tu.prototype.has=oge;tu.prototype.set=sge;function a9(t,e){return t&&sc(e,uo(e),t)}function lge(t,e){return t&&sc(e,ss(e),t)}var s9=typeof ks=="object"&&ks&&!ks.nodeType&&ks,A4=s9&&typeof Ps=="object"&&Ps&&!Ps.nodeType&&Ps,uge=A4&&A4.exports===s9,M4=uge?Oo.Buffer:void 0,R4=M4?M4.allocUnsafe:void 0;function l9(t,e){if(e)return t.slice();var n=t.length,r=R4?R4(n):new t.constructor(n);return t.copy(r),r}function Bf(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function bR(){return[]}var cge=Object.prototype,dge=cge.propertyIsEnumerable,$4=Object.getOwnPropertySymbols,fge=$4?function(t){return t==null?[]:(t=Object(t),Bf($4(t),function(e){return dge.call(t,e)}))}:bR,_R=fge;function hge(t,e){return sc(t,_R(t),e)}var pge=Object.getOwnPropertySymbols,gge=pge?function(t){for(var e=[];t;)Lf(e,_R(t)),t=TS(t);return e}:bR,u9=gge;function mge(t,e){return sc(t,u9(t),e)}function c9(t,e,n){var r=e(t);return Fn(t)?r:Lf(r,n(t))}function lk(t){return c9(t,uo,_R)}function OR(t){return c9(t,ss,u9)}var vge=bp(Oo,"DataView"),uk=vge,yge=bp(Oo,"Promise"),ck=yge,bge=bp(Oo,"Set"),Ag=bge,N4="[object Map]",_ge="[object Object]",D4="[object Promise]",L4="[object Set]",I4="[object WeakMap]",B4="[object DataView]",Oge=yp(uk),wge=yp(p0),xge=yp(ck),Sge=yp(Ag),Cge=yp(d0),vh=ka;(uk&&vh(new uk(new ArrayBuffer(1)))!=B4||p0&&vh(new p0)!=N4||ck&&vh(ck.resolve())!=D4||Ag&&vh(new Ag)!=L4||d0&&vh(new d0)!=I4)&&(vh=function(t){var e=ka(t),n=e==_ge?t.constructor:void 0,r=n?yp(n):"";if(r)switch(r){case Oge:return B4;case wge:return N4;case xge:return D4;case Sge:return L4;case Cge:return I4}return e});var Gu=vh,Ege=Object.prototype,Tge=Ege.hasOwnProperty;function kge(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Tge.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Pge=Oo.Uint8Array,pw=Pge;function wR(t){var e=new t.constructor(t.byteLength);return new pw(e).set(new pw(t)),e}function Age(t,e){var n=e?wR(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Mge=/\w*$/;function Rge(t){var e=new t.constructor(t.source,Mge.exec(t));return e.lastIndex=t.lastIndex,e}var F4=la?la.prototype:void 0,V4=F4?F4.valueOf:void 0;function $ge(t){return V4?Object(V4.call(t)):{}}function d9(t,e){var n=e?wR(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Nge="[object Boolean]",Dge="[object Date]",Lge="[object Map]",Ige="[object Number]",Bge="[object RegExp]",Fge="[object Set]",Vge="[object String]",jge="[object Symbol]",Qge="[object ArrayBuffer]",zge="[object DataView]",Wge="[object Float32Array]",Hge="[object Float64Array]",Uge="[object Int8Array]",Xge="[object Int16Array]",Zge="[object Int32Array]",qge="[object Uint8Array]",Yge="[object Uint8ClampedArray]",Gge="[object Uint16Array]",Kge="[object Uint32Array]";function Jge(t,e,n){var r=t.constructor;switch(e){case Qge:return wR(t);case Nge:case Dge:return new r(+t);case zge:return Age(t,n);case Wge:case Hge:case Uge:case Xge:case Zge:case qge:case Yge:case Gge:case Kge:return d9(t,n);case Lge:return new r;case Ige:case Vge:return new r(t);case Bge:return Rge(t);case Fge:return new r;case jge:return $ge(t)}}function f9(t){return typeof t.constructor=="function"&&!mb(t)?Nm(TS(t)):{}}var eme="[object Map]";function tme(t){return Ri(t)&&Gu(t)==eme}var j4=yl&&yl.isMap,nme=j4?Is(j4):tme,h9=nme,rme="[object Set]";function ime(t){return Ri(t)&&Gu(t)==rme}var Q4=yl&&yl.isSet,ome=Q4?Is(Q4):ime,p9=ome,ame=1,sme=2,lme=4,g9="[object Arguments]",ume="[object Array]",cme="[object Boolean]",dme="[object Date]",fme="[object Error]",m9="[object Function]",hme="[object GeneratorFunction]",pme="[object Map]",gme="[object Number]",v9="[object Object]",mme="[object RegExp]",vme="[object Set]",yme="[object String]",bme="[object Symbol]",_me="[object WeakMap]",Ome="[object ArrayBuffer]",wme="[object DataView]",xme="[object Float32Array]",Sme="[object Float64Array]",Cme="[object Int8Array]",Eme="[object Int16Array]",Tme="[object Int32Array]",kme="[object Uint8Array]",Pme="[object Uint8ClampedArray]",Ame="[object Uint16Array]",Mme="[object Uint32Array]",ui={};ui[g9]=ui[ume]=ui[Ome]=ui[wme]=ui[cme]=ui[dme]=ui[xme]=ui[Sme]=ui[Cme]=ui[Eme]=ui[Tme]=ui[pme]=ui[gme]=ui[v9]=ui[mme]=ui[vme]=ui[yme]=ui[bme]=ui[kme]=ui[Pme]=ui[Ame]=ui[Mme]=!0;ui[fme]=ui[m9]=ui[_me]=!1;function hl(t,e,n,r,i,o){var a,s=e&ame,l=e&sme,u=e&lme;if(n&&(a=i?n(t,r,i,o):n(t)),a!==void 0)return a;if(!Oi(t))return t;var c=Fn(t);if(c){if(a=kge(t),!s)return Za(t,a)}else{var d=Gu(t),f=d==m9||d==hme;if(pf(t))return l9(t,s);if(d==v9||d==g9||f&&!i){if(a=l||f?{}:f9(t),!s)return l?mge(t,lge(a,t)):hge(t,a9(a,t))}else{if(!ui[d])return i?t:{};a=Jge(t,d,s)}}o||(o=new tu);var h=o.get(t);if(h)return h;o.set(t,a),p9(t)?t.forEach(function(y){a.add(hl(y,e,n,y,t,o))}):h9(t)&&t.forEach(function(y,b){a.set(b,hl(y,e,n,b,t,o))});var g=u?l?OR:lk:l?ss:uo,m=c?void 0:g(t);return El(m||t,function(y,b){m&&(b=y,y=t[b]),gb(a,b,hl(y,e,n,b,t,o))}),a}var Rme=4;function dk(t){return hl(t,Rme)}var $me=1,Nme=4;function Nn(t){return hl(t,$me|Nme)}var Dme=1,Lme=4;function Ime(t,e){return e=typeof e=="function"?e:void 0,hl(t,Dme|Lme,e)}var Bme=4;function Fme(t,e){return e=typeof e=="function"?e:void 0,hl(t,Bme,e)}function Vme(){return new vl(this.value(),this.__chain__)}function jme(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function Qme(){var t=arguments.length;if(!t)return[];for(var e=Array(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Lf(Fn(n)?Za(n):[n],zo(e,1))}var zme="__lodash_hash_undefined__";function Wme(t){return this.__data__.set(t,zme),this}function Hme(t){return this.__data__.has(t)}function tp(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new dd;++e<n;)this.add(t[e])}tp.prototype.add=tp.prototype.push=Wme;tp.prototype.has=Hme;function xR(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function g0(t,e){return t.has(e)}var Ume=1,Xme=2;function y9(t,e,n,r,i,o){var a=n&Ume,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var d=-1,f=!0,h=n&Xme?new tp:void 0;for(o.set(t,e),o.set(e,t);++d<s;){var g=t[d],m=e[d];if(r)var y=a?r(m,g,d,e,t,o):r(g,m,d,t,e,o);if(y!==void 0){if(y)continue;f=!1;break}if(h){if(!xR(e,function(b,w){if(!g0(h,w)&&(g===b||i(g,b,n,r,o)))return h.push(w)})){f=!1;break}}else if(!(g===m||i(g,m,n,r,o))){f=!1;break}}return o.delete(t),o.delete(e),f}function SR(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function kS(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Zme=1,qme=2,Yme="[object Boolean]",Gme="[object Date]",Kme="[object Error]",Jme="[object Map]",eve="[object Number]",tve="[object RegExp]",nve="[object Set]",rve="[object String]",ive="[object Symbol]",ove="[object ArrayBuffer]",ave="[object DataView]",z4=la?la.prototype:void 0,vT=z4?z4.valueOf:void 0;function sve(t,e,n,r,i,o,a){switch(n){case ave:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ove:return!(t.byteLength!=e.byteLength||!o(new pw(t),new pw(e)));case Yme:case Gme:case eve:return hu(+t,+e);case Kme:return t.name==e.name&&t.message==e.message;case tve:case rve:return t==e+"";case Jme:var s=SR;case nve:var l=r&Zme;if(s||(s=kS),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=qme,a.set(t,e);var c=y9(s(t),s(e),r,i,o,a);return a.delete(t),c;case ive:if(vT)return vT.call(t)==vT.call(e)}return!1}var lve=1,uve=Object.prototype,cve=uve.hasOwnProperty;function dve(t,e,n,r,i,o){var a=n&lve,s=lk(t),l=s.length,u=lk(e),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in e:cve.call(e,f)))return!1}var h=o.get(t),g=o.get(e);if(h&&g)return h==e&&g==t;var m=!0;o.set(t,e),o.set(e,t);for(var y=a;++d<l;){f=s[d];var b=t[f],w=e[f];if(r)var O=a?r(w,b,f,e,t,o):r(b,w,f,t,e,o);if(!(O===void 0?b===w||i(b,w,n,r,o):O)){m=!1;break}y||(y=f=="constructor")}if(m&&!y){var x=t.constructor,S=e.constructor;x!=S&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var fve=1,W4="[object Arguments]",H4="[object Array]",K_="[object Object]",hve=Object.prototype,U4=hve.hasOwnProperty;function pve(t,e,n,r,i,o){var a=Fn(t),s=Fn(e),l=a?H4:Gu(t),u=s?H4:Gu(e);l=l==W4?K_:l,u=u==W4?K_:u;var c=l==K_,d=u==K_,f=l==u;if(f&&pf(t)){if(!pf(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new tu),a||Bm(t)?y9(t,e,n,r,i,o):sve(t,e,l,n,r,i,o);if(!(n&fve)){var h=c&&U4.call(t,"__wrapped__"),g=d&&U4.call(e,"__wrapped__");if(h||g){var m=h?t.value():t,y=g?e.value():e;return o||(o=new tu),i(m,y,n,r,o)}}return f?(o||(o=new tu),dve(t,e,n,r,i,o)):!1}function bb(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ri(t)&&!Ri(e)?t!==t&&e!==e:pve(t,e,n,r,bb,i)}var gve=1,mve=2;function CR(t,e,n,r){var i=n.length,o=i,a=!r;if(t==null)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){s=n[i];var l=s[0],u=t[l],c=s[1];if(a&&s[2]){if(u===void 0&&!(l in t))return!1}else{var d=new tu;if(r)var f=r(u,c,l,t,e,d);if(!(f===void 0?bb(c,u,gve|mve,r,d):f))return!1}}return!0}function b9(t){return t===t&&!Oi(t)}function ER(t){for(var e=uo(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,b9(i)]}return e}function _9(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function O9(t){var e=ER(t);return e.length==1&&e[0][2]?_9(e[0][0],e[0][1]):function(n){return n===t||CR(n,t,e)}}function vve(t,e){return t!=null&&e in Object(t)}function w9(t,e,n){e=Df(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var a=lc(e[r]);if(!(o=t!=null&&n(t,a)))break;t=t[a]}return o||++r!=i?o:(i=t==null?0:t.length,!!i&&SS(i)&&sd(a,i)&&(Fn(t)||Jh(t)))}function TR(t,e){return t!=null&&w9(t,e,vve)}var yve=1,bve=2;function x9(t,e){return uR(t)&&b9(e)?_9(lc(t),e):function(n){var r=Kr(n,t);return r===void 0&&r===e?TR(n,t):bb(e,r,yve|bve)}}function kR(t){return function(e){return e==null?void 0:e[t]}}function _ve(t){return function(e){return _p(e,t)}}function S9(t){return uR(t)?kR(lc(t)):_ve(t)}function Qn(t){return typeof t=="function"?t:t==null?Pa:typeof t=="object"?Fn(t)?x9(t[0],t[1]):O9(t):S9(t)}var Ove="Expected a function";function wve(t){var e=t==null?0:t.length,n=Qn;return t=e?Ci(t,function(r){if(typeof r[1]!="function")throw new TypeError(Ove);return[n(r[0]),r[1]]}):[],cr(function(r){for(var i=-1;++i<e;){var o=t[i];if(Ls(o[0],this,r))return Ls(o[1],this,r)}})}function C9(t,e,n){var r=n.length;if(t==null)return!r;for(t=Object(t);r--;){var i=n[r],o=e[i],a=t[i];if(a===void 0&&!(i in t)||!o(a))return!1}return!0}function xve(t){var e=uo(t);return function(n){return C9(n,t,e)}}var Sve=1;function Cve(t){return xve(hl(t,Sve))}function Eve(t,e){return e==null||C9(t,e,uo(e))}function Tve(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function E9(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var l=a[t?s:++i];if(n(o[l],l,o)===!1)break}return e}}var kve=E9(),PR=kve;function uc(t,e){return t&&PR(t,e,uo)}function T9(t,e){return function(n,r){if(n==null)return n;if(!as(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}var Pve=T9(uc),Ff=Pve;function Ave(t,e,n,r){return Ff(t,function(i,o,a){e(r,i,n(i),a)}),r}function PS(t,e){return function(n,r){var i=Fn(n)?Tve:Ave,o=e?e():{};return i(n,t,Qn(r),o)}}var Mve=Object.prototype,Rve=Mve.hasOwnProperty,$ve=PS(function(t,e,n){Rve.call(t,n)?++t[n]:ud(t,n,1)}),Nve=$ve;function Dve(t,e){var n=Nm(t);return e==null?n:a9(n,e)}var Lve=8;function AR(t,e,n){e=n?void 0:e;var r=ld(t,Lve,void 0,void 0,void 0,void 0,void 0,e);return r.placeholder=AR.placeholder,r}AR.placeholder={};var Ive=16;function MR(t,e,n){e=n?void 0:e;var r=ld(t,Ive,void 0,void 0,void 0,void 0,void 0,e);return r.placeholder=MR.placeholder,r}MR.placeholder={};var Bve=function(){return Oo.Date.now()},y1=Bve,Fve="Expected a function",Vve=Math.max,jve=Math.min;function Qo(t,e,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,f=!0;if(typeof t!="function")throw new TypeError(Fve);e=fl(e)||0,Oi(n)&&(c=!!n.leading,d="maxWait"in n,o=d?Vve(fl(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f);function h(C){var E=r,T=i;return r=i=void 0,u=C,a=t.apply(T,E),a}function g(C){return u=C,s=setTimeout(b,e),c?h(C):a}function m(C){var E=C-l,T=C-u,P=e-E;return d?jve(P,o-T):P}function y(C){var E=C-l,T=C-u;return l===void 0||E>=e||E<0||d&&T>=o}function b(){var C=y1();if(y(C))return w(C);s=setTimeout(b,m(C))}function w(C){return s=void 0,f&&r?h(C):(r=i=void 0,a)}function O(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function x(){return s===void 0?a:w(y1())}function S(){var C=y1(),E=y(C);if(r=arguments,i=this,l=C,E){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(b,e),h(l)}return s===void 0&&(s=setTimeout(b,e)),a}return S.cancel=O,S.flush=x,S}function Qve(t,e){return t==null||t!==t?e:t}var k9=Object.prototype,zve=k9.hasOwnProperty,Wve=cr(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&Sa(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],a=ss(o),s=-1,l=a.length;++s<l;){var u=a[s],c=t[u];(c===void 0||hu(c,k9[u])&&!zve.call(t,u))&&(t[u]=o[u])}return t}),Hve=Wve;function fk(t,e,n){(n!==void 0&&!hu(t[e],n)||n===void 0&&!(e in t))&&ud(t,e,n)}function ji(t){return Ri(t)&&as(t)}function hk(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function P9(t){return sc(t,ss(t))}function Uve(t,e,n,r,i,o,a){var s=hk(t,n),l=hk(e,n),u=a.get(l);if(u){fk(t,n,u);return}var c=o?o(s,l,n+"",t,e,a):void 0,d=c===void 0;if(d){var f=Fn(l),h=!f&&pf(l),g=!f&&!h&&Bm(l);c=l,f||h||g?Fn(s)?c=s:ji(s)?c=Za(s):h?(d=!1,c=l9(l,!0)):g?(d=!1,c=d9(l,!0)):c=[]:yb(l)||Jh(l)?(c=s,Jh(s)?c=P9(s):(!Oi(s)||ad(s))&&(c=f9(l))):d=!1}d&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),fk(t,n,c)}function AS(t,e,n,r,i){t!==e&&PR(e,function(o,a){if(i||(i=new tu),Oi(o))Uve(t,e,a,n,AS,r,i);else{var s=r?r(hk(t,a),o,a+"",t,e,i):void 0;s===void 0&&(s=o),fk(t,a,s)}},ss)}function A9(t,e,n,r,i,o){return Oi(t)&&Oi(e)&&(o.set(e,t),AS(t,e,void 0,A9,o),o.delete(e)),t}var Xve=Im(function(t,e,n,r){AS(t,e,n,r)}),M9=Xve,Zve=cr(function(t){return t.push(void 0,A9),Ls(M9,void 0,t)}),qve=Zve,Yve="Expected a function";function R9(t,e,n){if(typeof t!="function")throw new TypeError(Yve);return setTimeout(function(){t.apply(void 0,n)},e)}var Gve=cr(function(t,e){return R9(t,1,e)}),Kve=Gve,Jve=cr(function(t,e,n){return R9(t,fl(e)||0,n)}),eye=Jve;function RR(t,e,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}var tye=200;function _b(t,e,n,r){var i=-1,o=wS,a=!0,s=t.length,l=[],u=e.length;if(!s)return l;n&&(e=Ci(e,Is(n))),r?(o=RR,a=!1):e.length>=tye&&(o=g0,a=!1,e=new tp(e));e:for(;++i<s;){var c=t[i],d=n==null?c:n(c);if(c=r||c!==0?c:0,a&&d===d){for(var f=u;f--;)if(e[f]===d)continue e;l.push(c)}else o(e,d,r)||l.push(c)}return l}var nye=cr(function(t,e){return ji(t)?_b(t,zo(e,1,ji,!0)):[]}),rye=nye;function ts(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var iye=cr(function(t,e){var n=ts(e);return ji(n)&&(n=void 0),ji(t)?_b(t,zo(e,1,ji,!0),Qn(n)):[]}),oye=iye,aye=cr(function(t,e){var n=ts(e);return ji(n)&&(n=void 0),ji(t)?_b(t,zo(e,1,ji,!0),void 0,n):[]}),sye=aye,lye=bS(function(t,e){return t/e},1),uye=lye;function cye(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:Kn(e),bl(t,e<0?0:e,r)):[]}function dye(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:Kn(e),e=r-e,bl(t,0,e<0?0:e)):[]}function MS(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?bl(t,r?0:o,r?o+1:i):bl(t,r?o+1:0,r?i:o)}function fye(t,e){return t&&t.length?MS(t,Qn(e),!0,!0):[]}function hye(t,e){return t&&t.length?MS(t,Qn(e),!0):[]}function cc(t){return typeof t=="function"?t:Pa}function In(t,e){var n=Fn(t)?El:Ff;return n(t,cc(e))}function pye(t,e){for(var n=t==null?0:t.length;n--&&e(t[n],n,t)!==!1;);return t}var gye=E9(!0),$9=gye;function $R(t,e){return t&&$9(t,e,uo)}var mye=T9($R,!0),N9=mye;function X4(t,e){var n=Fn(t)?pye:N9;return n(t,cc(e))}function vye(t,e,n){t=Zr(t),e=Ds(e);var r=t.length;n=n===void 0?r:Op(Kn(n),0,r);var i=n;return n-=e.length,n>=0&&t.slice(n,i)==e}function yye(t,e){return Ci(e,function(n){return[n,t[n]]})}function bye(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=[r,r]}),n}var _ye="[object Map]",Oye="[object Set]";function D9(t){return function(e){var n=Gu(e);return n==_ye?SR(e):n==Oye?bye(e):yye(e,t(e))}}var wye=D9(uo),Ku=wye,xye=D9(ss),Z4=xye,Sye={"&":"&","<":"<",">":">",'"':""","'":"'"},Cye=vR(Sye),Eye=Cye,L9=/[&<>"']/g,Tye=RegExp(L9.source);function I9(t){return t=Zr(t),t&&Tye.test(t)?t.replace(L9,Eye):t}var B9=/[\\^$.*+?()[\]{}|]/g,kye=RegExp(B9.source);function Pye(t){return t=Zr(t),t&&kye.test(t)?t.replace(B9,"\\$&"):t}function F9(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Aye(t,e){var n=!0;return Ff(t,function(r,i,o){return n=!!e(r,i,o),n}),n}function Mye(t,e,n){var r=Fn(t)?F9:Aye;return n&&Sa(t,e,n)&&(e=void 0),r(t,Qn(e))}var Rye=4294967295;function V9(t){return t?Op(Kn(t),0,Rye):0}function $ye(t,e,n,r){var i=t.length;for(n=Kn(n),n<0&&(n=-n>i?0:i+n),r=r===void 0||r>i?i:Kn(r),r<0&&(r+=i),r=n>r?0:V9(r);n<r;)t[n++]=e;return t}function Nye(t,e,n,r){var i=t==null?0:t.length;return i?(n&&typeof n!="number"&&Sa(t,e,n)&&(n=0,r=i),$ye(t,e,n,r)):[]}function j9(t,e){var n=[];return Ff(t,function(r,i,o){e(r,i,o)&&n.push(r)}),n}function ty(t,e){var n=Fn(t)?Bf:j9;return n(t,Qn(e))}function Q9(t){return function(e,n,r){var i=Object(e);if(!as(e)){var o=Qn(n);e=uo(e),n=function(s){return o(i[s],s,i)}}var a=t(e,n,r);return a>-1?i[o?e[a]:a]:void 0}}var Dye=Math.max;function NR(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:Kn(n);return i<0&&(i=Dye(r+i,0)),OS(t,Qn(e),i)}var Lye=Q9(NR),gf=Lye;function z9(t,e,n){var r;return n(t,function(i,o,a){if(e(i,o,a))return r=o,!1}),r}function Iye(t,e){return z9(t,Qn(e),uc)}var Bye=Math.max,Fye=Math.min;function RS(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=r-1;return n!==void 0&&(i=Kn(n),i=n<0?Bye(r+i,0):Fye(i,r-1)),OS(t,Qn(e),i,!0)}var Vye=Q9(RS),jye=Vye;function Qye(t,e){return z9(t,Qn(e),$R)}function q4(t){return t&&t.length?t[0]:void 0}function W9(t,e){var n=-1,r=as(t)?Array(t.length):[];return Ff(t,function(i,o,a){r[++n]=e(i,o,a)}),r}function Ca(t,e){var n=Fn(t)?Ci:W9;return n(t,Qn(e))}function H9(t,e){return zo(Ca(t,e),1)}var zye=1/0;function Wye(t,e){return zo(Ca(t,e),zye)}function Hye(t,e,n){return n=n===void 0?1:Kn(n),zo(Ca(t,e),n)}var Uye=1/0;function U9(t){var e=t==null?0:t.length;return e?zo(t,Uye):[]}function Xye(t,e){var n=t==null?0:t.length;return n?(e=e===void 0?1:Kn(e),zo(t,e)):[]}var Zye=512;function qye(t){return ld(t,Zye)}var Yye=yR("floor"),Gye=Yye,Kye="Expected a function",Jye=8,e0e=32,t0e=128,n0e=256;function X9(t){return fd(function(e){var n=e.length,r=n,i=vl.prototype.thru;for(t&&e.reverse();r--;){var o=e[r];if(typeof o!="function")throw new TypeError(Kye);if(i&&!a&&v1(o)=="wrapper")var a=new vl([],!0)}for(r=a?r:n;++r<n;){o=e[r];var s=v1(o),l=s=="wrapper"?rR(o):void 0;l&&ok(l[0])&&l[1]==(t0e|Jye|e0e|n0e)&&!l[4].length&&l[9]==1?a=a[v1(l[0])].apply(a,l[3]):a=o.length==1&&ok(o)?a[s]():a.thru(o)}return function(){var u=arguments,c=u[0];if(a&&u.length==1&&Fn(c))return a.plant(c).value();for(var d=0,f=n?e[d].apply(this,u):c;++d<n;)f=e[d].call(this,f);return f}})}var r0e=X9(),i0e=r0e,o0e=X9(!0),a0e=o0e;function s0e(t,e){return t==null?t:PR(t,cc(e),ss)}function l0e(t,e){return t==null?t:$9(t,cc(e),ss)}function u0e(t,e){return t&&uc(t,cc(e))}function c0e(t,e){return t&&$R(t,cc(e))}function Ug(t){for(var e=-1,n=t==null?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}function $S(t,e){return Bf(e,function(n){return ad(t[n])})}function d0e(t){return t==null?[]:$S(t,uo(t))}function f0e(t){return t==null?[]:$S(t,ss(t))}var h0e=Object.prototype,p0e=h0e.hasOwnProperty,g0e=PS(function(t,e,n){p0e.call(t,n)?t[n].push(e):ud(t,n,[e])}),m0e=g0e;function DR(t,e){return t>e}function NS(t){return function(e,n){return typeof e=="string"&&typeof n=="string"||(e=fl(e),n=fl(n)),t(e,n)}}var v0e=NS(DR),y0e=v0e,b0e=NS(function(t,e){return t>=e}),_0e=b0e,O0e=Object.prototype,w0e=O0e.hasOwnProperty;function x0e(t,e){return t!=null&&w0e.call(t,e)}function Xg(t,e){return t!=null&&w9(t,e,x0e)}var S0e=Math.max,C0e=Math.min;function E0e(t,e,n){return t>=C0e(e,n)&&t<S0e(e,n)}function T0e(t,e,n){return e=zc(e),n===void 0?(n=e,e=0):n=zc(n),t=fl(t),E0e(t,e,n)}var k0e="[object String]";function DS(t){return typeof t=="string"||!Fn(t)&&Ri(t)&&ka(t)==k0e}function LR(t,e){return Ci(e,function(n){return t[n]})}function jm(t){return t==null?[]:LR(t,uo(t))}var P0e=Math.max;function A0e(t,e,n,r){t=as(t)?t:jm(t),n=n&&!r?Kn(n):0;var i=t.length;return n<0&&(n=P0e(i+n,0)),DS(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Dm(t,e,n)>-1}var M0e=Math.max;function Z9(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:Kn(n);return i<0&&(i=M0e(r+i,0)),Dm(t,e,i)}function R0e(t){var e=t==null?0:t.length;return e?bl(t,0,-1):[]}var $0e=Math.min;function IR(t,e,n){for(var r=n?RR:wS,i=t[0].length,o=t.length,a=o,s=Array(o),l=1/0,u=[];a--;){var c=t[a];a&&e&&(c=Ci(c,Is(e))),l=$0e(c.length,l),s[a]=!n&&(e||i>=120&&c.length>=120)?new tp(a&&c):void 0}c=t[0];var d=-1,f=s[0];e:for(;++d<i&&u.length<l;){var h=c[d],g=e?e(h):h;if(h=n||h!==0?h:0,!(f?g0(f,g):r(u,g,n))){for(a=o;--a;){var m=s[a];if(!(m?g0(m,g):r(t[a],g,n)))continue e}f&&f.push(g),u.push(h)}}return u}function BR(t){return ji(t)?t:[]}var N0e=cr(function(t){var e=Ci(t,BR);return e.length&&e[0]===t[0]?IR(e):[]}),D0e=N0e,L0e=cr(function(t){var e=ts(t),n=Ci(t,BR);return e===ts(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?IR(n,Qn(e)):[]}),I0e=L0e,B0e=cr(function(t){var e=ts(t),n=Ci(t,BR);return e=typeof e=="function"?e:void 0,e&&n.pop(),n.length&&n[0]===t[0]?IR(n,void 0,e):[]}),F0e=B0e;function V0e(t,e,n,r){return uc(t,function(i,o,a){e(r,n(i),o,a)}),r}function q9(t,e){return function(n,r){return V0e(n,t,e(r),{})}}var j0e=Object.prototype,Q0e=j0e.toString,z0e=q9(function(t,e,n){e!=null&&typeof e.toString!="function"&&(e=Q0e.call(e)),t[e]=n},iR(Pa)),W0e=z0e,Y9=Object.prototype,H0e=Y9.hasOwnProperty,U0e=Y9.toString,X0e=q9(function(t,e,n){e!=null&&typeof e.toString!="function"&&(e=U0e.call(e)),H0e.call(t,e)?t[e].push(n):t[e]=[n]},Qn),Z0e=X0e;function G9(t,e){return e.length<2?t:_p(t,bl(e,0,-1))}function Ob(t,e,n){e=Df(e,t),t=G9(t,e);var r=t==null?t:t[lc(ts(e))];return r==null?void 0:Ls(r,t,n)}var q0e=cr(Ob),Y0e=q0e,G0e=cr(function(t,e,n){var r=-1,i=typeof e=="function",o=as(t)?Array(t.length):[];return Ff(t,function(a){o[++r]=i?Ls(e,a,n):Ob(a,e,n)}),o}),K0e=G0e,J0e="[object ArrayBuffer]";function ebe(t){return Ri(t)&&ka(t)==J0e}var Y4=yl&&yl.isArrayBuffer,tbe=Y4?Is(Y4):ebe,nbe=tbe,rbe="[object Boolean]";function gw(t){return t===!0||t===!1||Ri(t)&&ka(t)==rbe}var ibe="[object Date]";function obe(t){return Ri(t)&&ka(t)==ibe}var G4=yl&&yl.isDate,abe=G4?Is(G4):obe,sbe=abe;function lbe(t){return Ri(t)&&t.nodeType===1&&!yb(t)}var ube="[object Map]",cbe="[object Set]",dbe=Object.prototype,fbe=dbe.hasOwnProperty;function FR(t){if(t==null)return!0;if(as(t)&&(Fn(t)||typeof t=="string"||typeof t.splice=="function"||pf(t)||Bm(t)||Jh(t)))return!t.length;var e=Gu(t);if(e==ube||e==cbe)return!t.size;if(mb(t))return!lR(t).length;for(var n in t)if(fbe.call(t,n))return!1;return!0}function Qi(t,e){return bb(t,e)}function hbe(t,e,n){n=typeof n=="function"?n:void 0;var r=n?n(t,e):void 0;return r===void 0?bb(t,e,void 0,n):!!r}var pbe=Oo.isFinite;function gbe(t){return typeof t=="number"&&pbe(t)}function K9(t){return typeof t=="number"&&t==Kn(t)}function mbe(t,e){return t===e||CR(t,e,ER(e))}function vbe(t,e,n){return n=typeof n=="function"?n:void 0,CR(t,e,ER(e),n)}var ybe="[object Number]";function J9(t){return typeof t=="number"||Ri(t)&&ka(t)==ybe}function bbe(t){return J9(t)&&t!=+t}var _be=m1?ad:sR,Obe=_be,wbe="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.";function xbe(t){if(Obe(t))throw new Error(wbe);return p7(t)}function Lr(t){return t==null}function Sbe(t){return t===null}var Cbe="[object RegExp]";function Ebe(t){return Ri(t)&&ka(t)==Cbe}var K4=yl&&yl.isRegExp,Tbe=K4?Is(K4):Ebe,VR=Tbe,J4=9007199254740991;function kbe(t){return K9(t)&&t>=-J4&&t<=J4}function qc(t){return t===void 0}var Pbe="[object WeakMap]";function Abe(t){return Ri(t)&&Gu(t)==Pbe}var Mbe="[object WeakSet]";function Rbe(t){return Ri(t)&&ka(t)==Mbe}var $be=1;function Nbe(t){return Qn(typeof t=="function"?t:hl(t,$be))}var Dbe=Array.prototype,Lbe=Dbe.join;function Ibe(t,e){return t==null?"":Lbe.call(t,e)}var Bbe=Vm(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Fbe=Bbe,Vbe=PS(function(t,e,n){ud(t,n,e)}),jbe=Vbe;function Qbe(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}var zbe=Math.max,Wbe=Math.min;function Hbe(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=r;return n!==void 0&&(i=Kn(n),i=i<0?zbe(r+i,0):Wbe(i,r-1)),e===e?Qbe(t,e,i):OS(t,O7,i,!0)}var Ube=Vm(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Xbe=Ube,Zbe=Q7("toLowerCase"),qbe=Zbe;function jR(t,e){return t<e}var Ybe=NS(jR),Gbe=Ybe,Kbe=NS(function(t,e){return t<=e}),Jbe=Kbe;function ez(t,e){var n={};return e=Qn(e),uc(t,function(r,i,o){ud(n,e(r,i,o),r)}),n}function e_e(t,e){var n={};return e=Qn(e),uc(t,function(r,i,o){ud(n,i,e(r,i,o))}),n}var t_e=1;function n_e(t){return O9(hl(t,t_e))}var r_e=1;function i_e(t,e){return x9(t,hl(e,r_e))}function LS(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=e(o);if(a!=null&&(s===void 0?a===a&&!Ns(a):n(a,s)))var s=a,l=o}return l}function o_e(t){return t&&t.length?LS(t,Pa,DR):void 0}function a_e(t,e){return t&&t.length?LS(t,Qn(e),DR):void 0}function QR(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);o!==void 0&&(n=n===void 0?o:n+o)}return n}var s_e=0/0;function tz(t,e){var n=t==null?0:t.length;return n?QR(t,e)/n:s_e}function l_e(t){return tz(t,Pa)}function u_e(t,e){return tz(t,Qn(e))}var c_e=Im(function(t,e,n){AS(t,e,n)}),mf=c_e,d_e=cr(function(t,e){return function(n){return Ob(n,t,e)}}),f_e=d_e,h_e=cr(function(t,e){return function(n){return Ob(t,n,e)}}),p_e=h_e;function g_e(t){return t&&t.length?LS(t,Pa,jR):void 0}function m_e(t,e){return t&&t.length?LS(t,Qn(e),jR):void 0}function nz(t,e,n){var r=uo(e),i=$S(e,r),o=!(Oi(n)&&"chain"in n)||!!n.chain,a=ad(t);return El(i,function(s){var l=e[s];t[s]=l,a&&(t.prototype[s]=function(){var u=this.__chain__;if(o||u){var c=t(this.__wrapped__),d=c.__actions__=Za(this.__actions__);return d.push({func:l,args:arguments,thisArg:t}),c.__chain__=u,c}return l.apply(t,Lf([this.value()],arguments))})}),t}var v_e=bS(function(t,e){return t*e},1),y_e=v_e,b_e="Expected a function";function wb(t){if(typeof t!="function")throw new TypeError(b_e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function __e(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}var O_e="[object Map]",w_e="[object Set]",yT=la?la.iterator:void 0;function rz(t){if(!t)return[];if(as(t))return DS(t)?su(t):Za(t);if(yT&&t[yT])return __e(t[yT]());var e=Gu(t),n=e==O_e?SR:e==w_e?kS:jm;return n(t)}function x_e(){this.__values__===void 0&&(this.__values__=rz(this.value()));var t=this.__index__>=this.__values__.length,e=t?void 0:this.__values__[this.__index__++];return{done:t,value:e}}function iz(t,e){var n=t.length;if(!!n)return e+=e<0?n:0,sd(e,n)?t[e]:void 0}function S_e(t,e){return t&&t.length?iz(t,Kn(e)):void 0}function C_e(t){return t=Kn(t),cr(function(e){return iz(e,t)})}function zR(t,e){return e=Df(e,t),t=G9(t,e),t==null||delete t[lc(ts(e))]}function E_e(t){return yb(t)?void 0:t}var T_e=1,k_e=2,P_e=4,A_e=fd(function(t,e){var n={};if(t==null)return n;var r=!1;e=Ci(e,function(o){return o=Df(o,t),r||(r=o.length>1),o}),sc(t,OR(t),n),r&&(n=hl(n,T_e|k_e|P_e,E_e));for(var i=e.length;i--;)zR(n,e[i]);return n}),oz=A_e;function xb(t,e,n,r){if(!Oi(t))return t;e=Df(e,t);for(var i=-1,o=e.length,a=o-1,s=t;s!=null&&++i<o;){var l=lc(e[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=a){var c=s[l];u=r?r(c,l,s):void 0,u===void 0&&(u=Oi(c)?c:sd(e[i+1])?[]:{})}gb(s,l,u),s=s[l]}return t}function az(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=_p(t,a);n(s,a)&&xb(o,Df(a,t),s)}return o}function sz(t,e){if(t==null)return{};var n=Ci(OR(t),function(r){return[r]});return e=Qn(e),az(t,n,function(r,i){return e(r,i[0])})}function M_e(t,e){return sz(t,wb(Qn(e)))}function R_e(t){return N7(2,t)}function $_e(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function lz(t,e){if(t!==e){var n=t!==void 0,r=t===null,i=t===t,o=Ns(t),a=e!==void 0,s=e===null,l=e===e,u=Ns(e);if(!s&&!u&&!o&&t>e||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&t<e||u&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}function N_e(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var l=lz(i[r],o[r]);if(l){if(r>=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return t.index-e.index}function uz(t,e,n){e.length?e=Ci(e,function(o){return Fn(o)?function(a){return _p(a,o.length===1?o[0]:o)}:o}):e=[Pa];var r=-1;e=Ci(e,Is(Qn));var i=W9(t,function(o,a,s){var l=Ci(e,function(u){return u(o)});return{criteria:l,index:++r,value:o}});return $_e(i,function(o,a){return N_e(o,a,n)})}function D_e(t,e,n,r){return t==null?[]:(Fn(e)||(e=e==null?[]:[e]),n=r?void 0:n,Fn(n)||(n=n==null?[]:[n]),uz(t,e,n))}function WR(t){return fd(function(e){return e=Ci(e,Is(Qn)),cr(function(n){var r=this;return t(e,function(i){return Ls(i,r,n)})})})}var L_e=WR(Ci),I_e=L_e,B_e=cr,F_e=B_e,V_e=Math.min,j_e=F_e(function(t,e){e=e.length==1&&Fn(e[0])?Ci(e[0],Is(Qn)):Ci(zo(e,1),Is(Qn));var n=e.length;return cr(function(r){for(var i=-1,o=V_e(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Ls(t,this,r)})}),Q_e=j_e,z_e=WR(F9),W_e=z_e,H_e=WR(xR),U_e=H_e,X_e=9007199254740991,Z_e=Math.floor;function pk(t,e){var n="";if(!t||e<1||e>X_e)return n;do e%2&&(n+=t),e=Z_e(e/2),e&&(t+=t);while(e);return n}var q_e=kR("length"),Y_e=q_e,cz="\\ud800-\\udfff",G_e="\\u0300-\\u036f",K_e="\\ufe20-\\ufe2f",J_e="\\u20d0-\\u20ff",eOe=G_e+K_e+J_e,tOe="\\ufe0e\\ufe0f",nOe="["+cz+"]",gk="["+eOe+"]",mk="\\ud83c[\\udffb-\\udfff]",rOe="(?:"+gk+"|"+mk+")",dz="[^"+cz+"]",fz="(?:\\ud83c[\\udde6-\\uddff]){2}",hz="[\\ud800-\\udbff][\\udc00-\\udfff]",iOe="\\u200d",pz=rOe+"?",gz="["+tOe+"]?",oOe="(?:"+iOe+"(?:"+[dz,fz,hz].join("|")+")"+gz+pz+")*",aOe=gz+pz+oOe,sOe="(?:"+[dz+gk+"?",gk,fz,hz,nOe].join("|")+")",e5=RegExp(mk+"(?="+mk+")|"+sOe+aOe,"g");function lOe(t){for(var e=e5.lastIndex=0;e5.test(t);)++e;return e}function Qm(t){return Fm(t)?lOe(t):Y_e(t)}var uOe=Math.ceil;function mw(t,e){e=e===void 0?" ":Ds(e);var n=e.length;if(n<2)return n?pk(e,t):e;var r=pk(e,uOe(t/Qm(e)));return Fm(e)?If(su(r),0,t).join(""):r.slice(0,t)}var cOe=Math.ceil,dOe=Math.floor;function fOe(t,e,n){t=Zr(t),e=Kn(e);var r=e?Qm(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return mw(dOe(i),n)+t+mw(cOe(i),n)}function hOe(t,e,n){t=Zr(t),e=Kn(e);var r=e?Qm(t):0;return e&&r<e?t+mw(e-r,n):t}function pOe(t,e,n){t=Zr(t),e=Kn(e);var r=e?Qm(t):0;return e&&r<e?mw(e-r,n)+t:t}var gOe=/^\s+/,mOe=Oo.parseInt;function vOe(t,e,n){return n||e==null?e=0:e&&(e=+e),mOe(Zr(t).replace(gOe,""),e||0)}var yOe=32,HR=cr(function(t,e){var n=hf(e,Lm(HR));return ld(t,yOe,void 0,e,n)});HR.placeholder={};var mz=HR,bOe=64,UR=cr(function(t,e){var n=hf(e,Lm(UR));return ld(t,bOe,void 0,e,n)});UR.placeholder={};var _Oe=UR,OOe=PS(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),wOe=OOe;function xOe(t,e){return az(t,e,function(n,r){return TR(t,r)})}var SOe=fd(function(t,e){return t==null?{}:xOe(t,e)}),vo=SOe;function COe(t){for(var e,n=this;n instanceof _S;){var r=y7(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e}function EOe(t){return function(e){return t==null?void 0:_p(t,e)}}function TOe(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}var kOe=Array.prototype,t5=kOe.splice;function XR(t,e,n,r){var i=r?TOe:Dm,o=-1,a=e.length,s=t;for(t===e&&(e=Za(e)),n&&(s=Ci(t,Is(n)));++o<a;)for(var l=0,u=e[o],c=n?n(u):u;(l=i(s,c,l,r))>-1;)s!==t&&t5.call(s,l,1),t5.call(t,l,1);return t}function vz(t,e){return t&&t.length&&e&&e.length?XR(t,e):t}var POe=cr(vz),AOe=POe;function MOe(t,e,n){return t&&t.length&&e&&e.length?XR(t,e,Qn(n)):t}function ROe(t,e,n){return t&&t.length&&e&&e.length?XR(t,e,void 0,n):t}var $Oe=Array.prototype,NOe=$Oe.splice;function yz(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;sd(i)?NOe.call(t,i,1):zR(t,i)}}return t}var DOe=fd(function(t,e){var n=t==null?0:t.length,r=cR(t,e);return yz(t,Ci(e,function(i){return sd(i,n)?+i:i}).sort(lz)),r}),LOe=DOe,IOe=Math.floor,BOe=Math.random;function ZR(t,e){return t+IOe(BOe()*(e-t+1))}var FOe=parseFloat,VOe=Math.min,jOe=Math.random;function QOe(t,e,n){if(n&&typeof n!="boolean"&&Sa(t,e,n)&&(e=n=void 0),n===void 0&&(typeof e=="boolean"?(n=e,e=void 0):typeof t=="boolean"&&(n=t,t=void 0)),t===void 0&&e===void 0?(t=0,e=1):(t=zc(t),e===void 0?(e=t,t=0):e=zc(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=jOe();return VOe(t+i*(e-t+FOe("1e-"+((i+"").length-1))),e)}return ZR(t,e)}var zOe=Math.ceil,WOe=Math.max;function HOe(t,e,n,r){for(var i=-1,o=WOe(zOe((e-t)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=t,t+=n;return a}function bz(t){return function(e,n,r){return r&&typeof r!="number"&&Sa(e,n,r)&&(n=r=void 0),e=zc(e),n===void 0?(n=e,e=0):n=zc(n),r=r===void 0?e<n?1:-1:zc(r),HOe(e,n,r,t)}}var UOe=bz(),XOe=UOe,ZOe=bz(!0),qOe=ZOe,YOe=256,GOe=fd(function(t,e){return ld(t,YOe,void 0,void 0,void 0,e)}),KOe=GOe;function _z(t,e,n,r,i){return i(t,function(o,a,s){n=r?(r=!1,o):e(n,o,a,s)}),n}function Oz(t,e,n){var r=Fn(t)?mR:_z,i=arguments.length<3;return r(t,Qn(e),n,i,Ff)}function JOe(t,e,n,r){var i=t==null?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function e1e(t,e,n){var r=Fn(t)?JOe:_z,i=arguments.length<3;return r(t,Qn(e),n,i,N9)}function t1e(t,e){var n=Fn(t)?Bf:j9;return n(t,wb(Qn(e)))}function n1e(t,e){var n=[];if(!(t&&t.length))return n;var r=-1,i=[],o=t.length;for(e=Qn(e);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return yz(t,i),n}function r1e(t,e,n){return(n?Sa(t,e,n):e===void 0)?e=1:e=Kn(e),pk(Zr(t),e)}function i1e(){var t=arguments,e=Zr(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var o1e="Expected a function";function a1e(t,e){if(typeof t!="function")throw new TypeError(o1e);return e=e===void 0?e:Kn(e),cr(t,e)}function s1e(t,e,n){e=Df(e,t);var r=-1,i=e.length;for(i||(i=1,t=void 0);++r<i;){var o=t==null?void 0:t[lc(e[r])];o===void 0&&(r=i,o=n),t=ad(o)?o.call(t):o}return t}var l1e=Array.prototype,u1e=l1e.reverse;function vk(t){return t==null?t:u1e.call(t)}var c1e=yR("round"),d1e=c1e;function wz(t){var e=t.length;return e?t[ZR(0,e-1)]:void 0}function f1e(t){return wz(jm(t))}function h1e(t){var e=Fn(t)?wz:f1e;return e(t)}function IS(t,e){var n=-1,r=t.length,i=r-1;for(e=e===void 0?r:e;++n<e;){var o=ZR(n,i),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}function p1e(t,e){return IS(Za(t),Op(e,0,t.length))}function g1e(t,e){var n=jm(t);return IS(n,Op(e,0,n.length))}function m1e(t,e,n){(n?Sa(t,e,n):e===void 0)?e=1:e=Kn(e);var r=Fn(t)?p1e:g1e;return r(t,e)}function qR(t,e,n){return t==null?t:xb(t,e,n)}function v1e(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:xb(t,e,n,r)}function y1e(t){return IS(Za(t))}function b1e(t){return IS(jm(t))}function _1e(t){var e=Fn(t)?y1e:b1e;return e(t)}var O1e="[object Map]",w1e="[object Set]";function x1e(t){if(t==null)return 0;if(as(t))return DS(t)?Qm(t):t.length;var e=Gu(t);return e==O1e||e==w1e?t.size:lR(t).length}function S1e(t,e,n){var r=t==null?0:t.length;return r?(n&&typeof n!="number"&&Sa(t,e,n)?(e=0,n=r):(e=e==null?0:Kn(e),n=n===void 0?r:Kn(n)),bl(t,e,n)):[]}var C1e=Vm(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),E1e=C1e;function T1e(t,e){var n;return Ff(t,function(r,i,o){return n=e(r,i,o),!n}),!!n}function k1e(t,e,n){var r=Fn(t)?xR:T1e;return n&&Sa(t,e,n)&&(e=void 0),r(t,Qn(e))}var P1e=cr(function(t,e){if(t==null)return[];var n=e.length;return n>1&&Sa(t,e[0],e[1])?e=[]:n>2&&Sa(e[0],e[1],e[2])&&(e=[e[0]]),uz(t,zo(e,1),[])}),xz=P1e,A1e=4294967295,M1e=A1e-1,R1e=Math.floor,$1e=Math.min;function YR(t,e,n,r){var i=0,o=t==null?0:t.length;if(o===0)return 0;e=n(e);for(var a=e!==e,s=e===null,l=Ns(e),u=e===void 0;i<o;){var c=R1e((i+o)/2),d=n(t[c]),f=d!==void 0,h=d===null,g=d===d,m=Ns(d);if(a)var y=r||g;else u?y=g&&(r||f):s?y=g&&f&&(r||!h):l?y=g&&f&&!h&&(r||!m):h||m?y=!1:y=r?d<=e:d<e;y?i=c+1:o=c}return $1e(o,M1e)}var N1e=4294967295,D1e=N1e>>>1;function BS(t,e,n){var r=0,i=t==null?r:t.length;if(typeof e=="number"&&e===e&&i<=D1e){for(;r<i;){var o=r+i>>>1,a=t[o];a!==null&&!Ns(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return YR(t,e,Pa,n)}function L1e(t,e){return BS(t,e)}function I1e(t,e,n){return YR(t,e,Qn(n))}function B1e(t,e){var n=t==null?0:t.length;if(n){var r=BS(t,e);if(r<n&&hu(t[r],e))return r}return-1}function F1e(t,e){return BS(t,e,!0)}function V1e(t,e,n){return YR(t,e,Qn(n),!0)}function j1e(t,e){var n=t==null?0:t.length;if(n){var r=BS(t,e,!0)-1;if(hu(t[r],e))return r}return-1}function Sz(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!hu(s,l)){var l=s;o[i++]=a===0?0:a}}return o}function Q1e(t){return t&&t.length?Sz(t):[]}function z1e(t,e){return t&&t.length?Sz(t,Qn(e)):[]}var W1e=4294967295;function H1e(t,e,n){return n&&typeof n!="number"&&Sa(t,e,n)&&(e=n=void 0),n=n===void 0?W1e:n>>>0,n?(t=Zr(t),t&&(typeof e=="string"||e!=null&&!VR(e))&&(e=Ds(e),!e&&Fm(t))?If(su(t),0,n):t.split(e,n)):[]}var U1e="Expected a function",X1e=Math.max;function Z1e(t,e){if(typeof t!="function")throw new TypeError(U1e);return e=e==null?0:X1e(Kn(e),0),cr(function(n){var r=n[e],i=If(n,0,e);return r&&Lf(i,r),Ls(t,this,i)})}var q1e=Vm(function(t,e,n){return t+(n?" ":"")+gR(e)}),Y1e=q1e;function G1e(t,e,n){return t=Zr(t),n=n==null?0:Op(Kn(n),0,t.length),e=Ds(e),t.slice(n,n+e.length)==e}function K1e(){return{}}function J1e(){return""}function ewe(){return!0}var twe=bS(function(t,e){return t-e},0),nwe=twe;function rwe(t){return t&&t.length?QR(t,Pa):0}function iwe(t,e){return t&&t.length?QR(t,Qn(e)):0}function owe(t){var e=t==null?0:t.length;return e?bl(t,1,e):[]}function awe(t,e,n){return t&&t.length?(e=n||e===void 0?1:Kn(e),bl(t,0,e<0?0:e)):[]}function swe(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:Kn(e),e=r-e,bl(t,e<0?0:e,r)):[]}function lwe(t,e){return t&&t.length?MS(t,Qn(e),!1,!0):[]}function uwe(t,e){return t&&t.length?MS(t,Qn(e)):[]}function cwe(t,e){return e(t),t}var Cz=Object.prototype,dwe=Cz.hasOwnProperty;function n5(t,e,n,r){return t===void 0||hu(t,Cz[n])&&!dwe.call(r,n)?e:t}var fwe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function hwe(t){return"\\"+fwe[t]}var pwe=/<%=([\s\S]+?)%>/g,Ez=pwe,gwe=/<%-([\s\S]+?)%>/g,mwe=gwe,vwe=/<%([\s\S]+?)%>/g,ywe=vwe,bwe={escape:mwe,evaluate:ywe,interpolate:Ez,variable:"",imports:{_:{escape:I9}}},yk=bwe,_we="Invalid `variable` option passed into `_.template`",Owe=/\b__p \+= '';/g,wwe=/\b(__p \+=) '' \+/g,xwe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Swe=/[()=,{}\[\]\/\s]/,Cwe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,J_=/($^)/,Ewe=/['\n\r\u2028\u2029\\]/g,Twe=Object.prototype,r5=Twe.hasOwnProperty;function kwe(t,e,n){var r=yk.imports._.templateSettings||yk;n&&Sa(t,e,n)&&(e=void 0),t=Zr(t),e=hw({},e,r,n5);var i=hw({},e.imports,r.imports,n5),o=uo(i),a=LR(i,o),s,l,u=0,c=e.interpolate||J_,d="__p += '",f=RegExp((e.escape||J_).source+"|"+c.source+"|"+(c===Ez?Cwe:J_).source+"|"+(e.evaluate||J_).source+"|$","g"),h=r5.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+`
- `:"";t.replace(f,function(y,b,w,O,x,S){return w||(w=O),d+=t.slice(u,S).replace(Ewe,hwe),b&&(s=!0,d+=`' +
- __e(`+b+`) +
- '`),x&&(l=!0,d+=`';
- `+x+`;
- __p += '`),w&&(d+=`' +
- ((__t = (`+w+`)) == null ? '' : __t) +
- '`),u=S+y.length,y}),d+=`';
- `;var g=r5.call(e,"variable")&&e.variable;if(!g)d=`with (obj) {
- `+d+`
- }
- `;else if(Swe.test(g))throw new Error(_we);d=(l?d.replace(Owe,""):d).replace(wwe,"$1").replace(xwe,"$1;"),d="function("+(g||"obj")+`) {
- `+(g?"":`obj || (obj = {});
- `)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(l?`, __j = Array.prototype.join;
- function print() { __p += __j.call(arguments, '') }
- `:`;
- `)+d+`return __p
- }`;var m=$7(function(){return Function(o,h+"return "+d).apply(void 0,a)});if(m.source=d,fR(m))throw m;return m}var Pwe="Expected a function";function Wc(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(Pwe);return Oi(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Qo(t,e,{leading:r,maxWait:e,trailing:i})}function Sb(t,e){return e(t)}var Awe=9007199254740991,bT=4294967295,Mwe=Math.min;function Rwe(t,e){if(t=Kn(t),t<1||t>Awe)return[];var n=bT,r=Mwe(t,bT);e=cc(e),t-=bT;for(var i=aR(r,e);++n<t;)e(n);return i}function $we(){return this}function Tz(t,e){var n=t;return n instanceof Sr&&(n=n.value()),mR(e,function(r,i){return i.func.apply(i.thisArg,Lf([r],i.args))},n)}function _T(){return Tz(this.__wrapped__,this.__actions__)}function Nwe(t){return Zr(t).toLowerCase()}function Dwe(t){return Fn(t)?Ci(t,lc):Ns(t)?[t]:Za(M7(Zr(t)))}var i5=9007199254740991;function Lwe(t){return t?Op(Kn(t),-i5,i5):t===0?t:0}function Iwe(t){return Zr(t).toUpperCase()}function Bwe(t,e,n){var r=Fn(t),i=r||pf(t)||Bm(t);if(e=Qn(e),n==null){var o=t&&t.constructor;i?n=r?new o:[]:Oi(t)?n=ad(o)?Nm(TS(t)):{}:n={}}return(i?El:uc)(t,function(a,s,l){return e(n,a,s,l)}),n}function kz(t,e){for(var n=t.length;n--&&Dm(e,t[n],0)>-1;);return n}function Pz(t,e){for(var n=-1,r=t.length;++n<r&&Dm(e,t[n],0)>-1;);return n}function Fwe(t,e,n){if(t=Zr(t),t&&(n||e===void 0))return h7(t);if(!t||!(e=Ds(e)))return t;var r=su(t),i=su(e),o=Pz(r,i),a=kz(r,i)+1;return If(r,o,a).join("")}function Vwe(t,e,n){if(t=Zr(t),t&&(n||e===void 0))return t.slice(0,f7(t)+1);if(!t||!(e=Ds(e)))return t;var r=su(t),i=kz(r,su(e))+1;return If(r,0,i).join("")}var jwe=/^\s+/;function Qwe(t,e,n){if(t=Zr(t),t&&(n||e===void 0))return t.replace(jwe,"");if(!t||!(e=Ds(e)))return t;var r=su(t),i=Pz(r,su(e));return If(r,i).join("")}var zwe=30,Wwe="...",Hwe=/\w*$/;function Uwe(t,e){var n=zwe,r=Wwe;if(Oi(e)){var i="separator"in e?e.separator:i;n="length"in e?Kn(e.length):n,r="omission"in e?Ds(e.omission):r}t=Zr(t);var o=t.length;if(Fm(t)){var a=su(t);o=a.length}if(n>=o)return t;var s=n-Qm(r);if(s<1)return r;var l=a?If(a,0,s).join(""):t.slice(0,s);if(i===void 0)return l+r;if(a&&(s+=l.length-s),VR(i)){if(t.slice(s).search(i)){var u,c=l;for(i.global||(i=RegExp(i.source,Zr(Hwe.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(t.indexOf(Ds(i),s)!=s){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+r}function Xwe(t){return S7(t,1)}var Zwe={"&":"&","<":"<",">":">",""":'"',"'":"'"},qwe=vR(Zwe),Ywe=qwe,Az=/&(?:amp|lt|gt|quot|#39);/g,Gwe=RegExp(Az.source);function Kwe(t){return t=Zr(t),t&&Gwe.test(t)?t.replace(Az,Ywe):t}var Jwe=1/0,exe=Ag&&1/kS(new Ag([,-0]))[1]==Jwe?function(t){return new Ag(t)}:kg,txe=exe,nxe=200;function vf(t,e,n){var r=-1,i=wS,o=t.length,a=!0,s=[],l=s;if(n)a=!1,i=RR;else if(o>=nxe){var u=e?null:txe(t);if(u)return kS(u);a=!1,i=g0,l=new tp}else l=e?[]:s;e:for(;++r<o;){var c=t[r],d=e?e(c):c;if(c=n||c!==0?c:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;e&&l.push(d),s.push(c)}else i(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s}var rxe=cr(function(t){return vf(zo(t,1,ji,!0))}),b1=rxe,ixe=cr(function(t){var e=ts(t);return ji(e)&&(e=void 0),vf(zo(t,1,ji,!0),Qn(e))}),oxe=ixe,axe=cr(function(t){var e=ts(t);return e=typeof e=="function"?e:void 0,vf(zo(t,1,ji,!0),void 0,e)}),sxe=axe;function lxe(t){return t&&t.length?vf(t):[]}function uxe(t,e){return t&&t.length?vf(t,Qn(e)):[]}function cxe(t,e){return e=typeof e=="function"?e:void 0,t&&t.length?vf(t,void 0,e):[]}var dxe=0;function fxe(t){var e=++dxe;return Zr(t)+e}function hxe(t,e){return t==null?!0:zR(t,e)}var pxe=Math.max;function GR(t){if(!(t&&t.length))return[];var e=0;return t=Bf(t,function(n){if(ji(n))return e=pxe(n.length,e),!0}),aR(e,function(n){return Ci(t,kR(n))})}function Mz(t,e){if(!(t&&t.length))return[];var n=GR(t);return e==null?n:Ci(n,function(r){return Ls(e,void 0,r)})}function Rz(t,e,n,r){return xb(t,e,n(_p(t,e)),r)}function gxe(t,e,n){return t==null?t:Rz(t,e,cc(n))}function mxe(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:Rz(t,e,cc(n),r)}var vxe=Vm(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),yxe=vxe;function bxe(t){return t==null?[]:LR(t,ss(t))}var _xe=cr(function(t,e){return ji(t)?_b(t,e):[]}),Oxe=_xe;function wxe(t,e){return mz(cc(e),t)}var xxe=fd(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(o){return cR(o,t)};return e>1||this.__actions__.length||!(r instanceof Sr)||!sd(n)?this.thru(i):(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:Sb,args:[i],thisArg:void 0}),new vl(r,this.__chain__).thru(function(o){return e&&!o.length&&o.push(void 0),o}))}),Sxe=xxe;function Cxe(){return o9(this)}function Exe(){var t=this.__wrapped__;if(t instanceof Sr){var e=t;return this.__actions__.length&&(e=new Sr(this)),e=e.reverse(),e.__actions__.push({func:Sb,args:[vk],thisArg:void 0}),new vl(e,this.__chain__)}return this.thru(vk)}function KR(t,e,n){var r=t.length;if(r<2)return r?vf(t[0]):[];for(var i=-1,o=Array(r);++i<r;)for(var a=t[i],s=-1;++s<r;)s!=i&&(o[i]=_b(o[i]||a,t[s],e,n));return vf(zo(o,1),e,n)}var Txe=cr(function(t){return KR(Bf(t,ji))}),kxe=Txe,Pxe=cr(function(t){var e=ts(t);return ji(e)&&(e=void 0),KR(Bf(t,ji),Qn(e))}),Axe=Pxe,Mxe=cr(function(t){var e=ts(t);return e=typeof e=="function"?e:void 0,KR(Bf(t,ji),void 0,e)}),Rxe=Mxe,$xe=cr(GR),Nxe=$xe;function $z(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var s=r<o?e[r]:void 0;n(a,t[r],s)}return a}function Dxe(t,e){return $z(t||[],e||[],gb)}function Lxe(t,e){return $z(t||[],e||[],xb)}var Ixe=cr(function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n=typeof n=="function"?(t.pop(),n):void 0,Mz(t,n)}),Bxe=Ixe,sn={chunk:ege,compact:jme,concat:Qme,difference:rye,differenceBy:oye,differenceWith:sye,drop:cye,dropRight:dye,dropRightWhile:fye,dropWhile:hye,fill:Nye,findIndex:NR,findLastIndex:RS,first:q4,flatten:dR,flattenDeep:U9,flattenDepth:Xye,fromPairs:Ug,head:q4,indexOf:Z9,initial:R0e,intersection:D0e,intersectionBy:I0e,intersectionWith:F0e,join:Ibe,last:ts,lastIndexOf:Hbe,nth:S_e,pull:AOe,pullAll:vz,pullAllBy:MOe,pullAllWith:ROe,pullAt:LOe,remove:n1e,reverse:vk,slice:S1e,sortedIndex:L1e,sortedIndexBy:I1e,sortedIndexOf:B1e,sortedLastIndex:F1e,sortedLastIndexBy:V1e,sortedLastIndexOf:j1e,sortedUniq:Q1e,sortedUniqBy:z1e,tail:owe,take:awe,takeRight:swe,takeRightWhile:lwe,takeWhile:uwe,union:b1,unionBy:oxe,unionWith:sxe,uniq:lxe,uniqBy:uxe,uniqWith:cxe,unzip:GR,unzipWith:Mz,without:Oxe,xor:kxe,xorBy:Axe,xorWith:Rxe,zip:Nxe,zipObject:Dxe,zipObjectDeep:Lxe,zipWith:Bxe},ti={countBy:Nve,each:In,eachRight:X4,every:Mye,filter:ty,find:gf,findLast:jye,flatMap:H9,flatMapDeep:Wye,flatMapDepth:Hye,forEach:In,forEachRight:X4,groupBy:m0e,includes:A0e,invokeMap:K0e,keyBy:jbe,map:Ca,orderBy:D_e,partition:wOe,reduce:Oz,reduceRight:e1e,reject:t1e,sample:h1e,sampleSize:m1e,shuffle:_1e,size:x1e,some:k1e,sortBy:xz},Fxe={now:y1},Di={after:ace,ary:S7,before:N7,bind:D7,bindKey:Ihe,curry:AR,curryRight:MR,debounce:Qo,defer:Kve,delay:eye,flip:qye,memoize:vb,negate:wb,once:R_e,overArgs:Q_e,partial:mz,partialRight:_Oe,rearg:KOe,rest:a1e,spread:Z1e,throttle:Wc,unary:Xwe,wrap:wxe},_n={castArray:No,clone:dk,cloneDeep:Nn,cloneDeepWith:Ime,cloneWith:Fme,conformsTo:Eve,eq:hu,gt:y0e,gte:_0e,isArguments:Jh,isArray:Fn,isArrayBuffer:nbe,isArrayLike:as,isArrayLikeObject:ji,isBoolean:gw,isBuffer:pf,isDate:sbe,isElement:lbe,isEmpty:FR,isEqual:Qi,isEqualWith:hbe,isError:fR,isFinite:gbe,isFunction:ad,isInteger:K9,isLength:SS,isMap:h9,isMatch:mbe,isMatchWith:vbe,isNaN:bbe,isNative:xbe,isNil:Lr,isNull:Sbe,isNumber:J9,isObject:Oi,isObjectLike:Ri,isPlainObject:yb,isRegExp:VR,isSafeInteger:kbe,isSet:p9,isString:DS,isSymbol:Ns,isTypedArray:Bm,isUndefined:qc,isWeakMap:Abe,isWeakSet:Rbe,lt:Gbe,lte:Jbe,toArray:rz,toFinite:zc,toInteger:Kn,toLength:V9,toNumber:fl,toPlainObject:P9,toSafeInteger:Lwe,toString:Zr},Aa={add:Gue,ceil:Gpe,divide:uye,floor:Gye,max:o_e,maxBy:a_e,mean:l_e,meanBy:u_e,min:g_e,minBy:m_e,multiply:y_e,round:d1e,subtract:nwe,sum:rwe,sumBy:iwe},JR={clamp:tge,inRange:T0e,random:QOe},Vn={assign:Nr,assignIn:S4,assignInWith:hw,assignWith:Dfe,at:bhe,create:Dve,defaults:Hve,defaultsDeep:qve,entries:Ku,entriesIn:Z4,extend:S4,extendWith:hw,findKey:Iye,findLastKey:Qye,forIn:s0e,forInRight:l0e,forOwn:u0e,forOwnRight:c0e,functions:d0e,functionsIn:f0e,get:Kr,has:Xg,hasIn:TR,invert:W0e,invertBy:Z0e,invoke:Y0e,keys:uo,keysIn:ss,mapKeys:ez,mapValues:e_e,merge:mf,mergeWith:M9,omit:oz,omitBy:M_e,pick:vo,pickBy:sz,result:s1e,set:qR,setWith:v1e,toPairs:Ku,toPairsIn:Z4,transform:Bwe,unset:hxe,update:gxe,updateWith:mxe,values:jm,valuesIn:bxe},dc={at:Sxe,chain:o9,commit:Vme,lodash:me,next:x_e,plant:COe,reverse:Exe,tap:cwe,thru:Sb,toIterator:$we,toJSON:_T,value:_T,valueOf:_T,wrapperChain:Cxe},Qr={camelCase:Xpe,capitalize:z7,deburr:W7,endsWith:vye,escape:I9,escapeRegExp:Pye,kebabCase:Fbe,lowerCase:Xbe,lowerFirst:qbe,pad:fOe,padEnd:hOe,padStart:pOe,parseInt:vOe,repeat:r1e,replace:i1e,snakeCase:E1e,split:H1e,startCase:Y1e,startsWith:G1e,template:kwe,templateSettings:yk,toLower:Nwe,toUpper:Iwe,trim:Fwe,trimEnd:Vwe,trimStart:Qwe,truncate:Uwe,unescape:Kwe,upperCase:yxe,upperFirst:gR,words:i9},qr={attempt:$7,bindAll:$he,cond:wve,conforms:Cve,constant:iR,defaultTo:Qve,flow:i0e,flowRight:a0e,identity:Pa,iteratee:Nbe,matches:n_e,matchesProperty:i_e,method:f_e,methodOf:p_e,mixin:nz,noop:kg,nthArg:C_e,over:I_e,overEvery:W_e,overSome:U_e,property:S9,propertyOf:EOe,range:XOe,rangeRight:qOe,stubArray:bR,stubFalse:sR,stubObject:K1e,stubString:J1e,stubTrue:ewe,times:Rwe,toPath:Dwe,uniqueId:fxe};function Vxe(){var t=new Sr(this.__wrapped__);return t.__actions__=Za(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Za(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Za(this.__views__),t}function jxe(){if(this.__filtered__){var t=new Sr(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}var Qxe=Math.max,zxe=Math.min;function Wxe(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=zxe(e,t+a);break;case"takeRight":t=Qxe(t,e-a);break}}return{start:t,end:e}}var Hxe=1,Uxe=2,Xxe=Math.min;function Zxe(){var t=this.__wrapped__.value(),e=this.__dir__,n=Fn(t),r=e<0,i=n?t.length:0,o=Wxe(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,d=c.length,f=0,h=Xxe(l,this.__takeCount__);if(!n||!r&&i==l&&h==l)return Tz(t,this.__actions__);var g=[];e:for(;l--&&f<h;){u+=e;for(var m=-1,y=t[u];++m<d;){var b=c[m],w=b.iteratee,O=b.type,x=w(y);if(O==Uxe)y=x;else if(!x){if(O==Hxe)continue e;break e}}g[f++]=y}return g}/**
- * @license
- * Lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="es" -o ./`
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */var qxe="4.17.21",Yxe=2,Gxe=1,Kxe=3,Nz=4294967295,Jxe=Array.prototype,eSe=Object.prototype,Dz=eSe.hasOwnProperty,o5=la?la.iterator:void 0,tSe=Math.max,a5=Math.min,e$=function(t){return function(e,n,r){if(r==null){var i=Oi(n),o=i&&uo(n),a=o&&o.length&&$S(n,o);(a?a.length:i)||(r=n,n=e,e=this)}return t(e,n,r)}}(nz);me.after=Di.after;me.ary=Di.ary;me.assign=Vn.assign;me.assignIn=Vn.assignIn;me.assignInWith=Vn.assignInWith;me.assignWith=Vn.assignWith;me.at=Vn.at;me.before=Di.before;me.bind=Di.bind;me.bindAll=qr.bindAll;me.bindKey=Di.bindKey;me.castArray=_n.castArray;me.chain=dc.chain;me.chunk=sn.chunk;me.compact=sn.compact;me.concat=sn.concat;me.cond=qr.cond;me.conforms=qr.conforms;me.constant=qr.constant;me.countBy=ti.countBy;me.create=Vn.create;me.curry=Di.curry;me.curryRight=Di.curryRight;me.debounce=Di.debounce;me.defaults=Vn.defaults;me.defaultsDeep=Vn.defaultsDeep;me.defer=Di.defer;me.delay=Di.delay;me.difference=sn.difference;me.differenceBy=sn.differenceBy;me.differenceWith=sn.differenceWith;me.drop=sn.drop;me.dropRight=sn.dropRight;me.dropRightWhile=sn.dropRightWhile;me.dropWhile=sn.dropWhile;me.fill=sn.fill;me.filter=ti.filter;me.flatMap=ti.flatMap;me.flatMapDeep=ti.flatMapDeep;me.flatMapDepth=ti.flatMapDepth;me.flatten=sn.flatten;me.flattenDeep=sn.flattenDeep;me.flattenDepth=sn.flattenDepth;me.flip=Di.flip;me.flow=qr.flow;me.flowRight=qr.flowRight;me.fromPairs=sn.fromPairs;me.functions=Vn.functions;me.functionsIn=Vn.functionsIn;me.groupBy=ti.groupBy;me.initial=sn.initial;me.intersection=sn.intersection;me.intersectionBy=sn.intersectionBy;me.intersectionWith=sn.intersectionWith;me.invert=Vn.invert;me.invertBy=Vn.invertBy;me.invokeMap=ti.invokeMap;me.iteratee=qr.iteratee;me.keyBy=ti.keyBy;me.keys=uo;me.keysIn=Vn.keysIn;me.map=ti.map;me.mapKeys=Vn.mapKeys;me.mapValues=Vn.mapValues;me.matches=qr.matches;me.matchesProperty=qr.matchesProperty;me.memoize=Di.memoize;me.merge=Vn.merge;me.mergeWith=Vn.mergeWith;me.method=qr.method;me.methodOf=qr.methodOf;me.mixin=e$;me.negate=wb;me.nthArg=qr.nthArg;me.omit=Vn.omit;me.omitBy=Vn.omitBy;me.once=Di.once;me.orderBy=ti.orderBy;me.over=qr.over;me.overArgs=Di.overArgs;me.overEvery=qr.overEvery;me.overSome=qr.overSome;me.partial=Di.partial;me.partialRight=Di.partialRight;me.partition=ti.partition;me.pick=Vn.pick;me.pickBy=Vn.pickBy;me.property=qr.property;me.propertyOf=qr.propertyOf;me.pull=sn.pull;me.pullAll=sn.pullAll;me.pullAllBy=sn.pullAllBy;me.pullAllWith=sn.pullAllWith;me.pullAt=sn.pullAt;me.range=qr.range;me.rangeRight=qr.rangeRight;me.rearg=Di.rearg;me.reject=ti.reject;me.remove=sn.remove;me.rest=Di.rest;me.reverse=sn.reverse;me.sampleSize=ti.sampleSize;me.set=Vn.set;me.setWith=Vn.setWith;me.shuffle=ti.shuffle;me.slice=sn.slice;me.sortBy=ti.sortBy;me.sortedUniq=sn.sortedUniq;me.sortedUniqBy=sn.sortedUniqBy;me.split=Qr.split;me.spread=Di.spread;me.tail=sn.tail;me.take=sn.take;me.takeRight=sn.takeRight;me.takeRightWhile=sn.takeRightWhile;me.takeWhile=sn.takeWhile;me.tap=dc.tap;me.throttle=Di.throttle;me.thru=Sb;me.toArray=_n.toArray;me.toPairs=Vn.toPairs;me.toPairsIn=Vn.toPairsIn;me.toPath=qr.toPath;me.toPlainObject=_n.toPlainObject;me.transform=Vn.transform;me.unary=Di.unary;me.union=sn.union;me.unionBy=sn.unionBy;me.unionWith=sn.unionWith;me.uniq=sn.uniq;me.uniqBy=sn.uniqBy;me.uniqWith=sn.uniqWith;me.unset=Vn.unset;me.unzip=sn.unzip;me.unzipWith=sn.unzipWith;me.update=Vn.update;me.updateWith=Vn.updateWith;me.values=Vn.values;me.valuesIn=Vn.valuesIn;me.without=sn.without;me.words=Qr.words;me.wrap=Di.wrap;me.xor=sn.xor;me.xorBy=sn.xorBy;me.xorWith=sn.xorWith;me.zip=sn.zip;me.zipObject=sn.zipObject;me.zipObjectDeep=sn.zipObjectDeep;me.zipWith=sn.zipWith;me.entries=Vn.toPairs;me.entriesIn=Vn.toPairsIn;me.extend=Vn.assignIn;me.extendWith=Vn.assignInWith;e$(me,me);me.add=Aa.add;me.attempt=qr.attempt;me.camelCase=Qr.camelCase;me.capitalize=Qr.capitalize;me.ceil=Aa.ceil;me.clamp=JR.clamp;me.clone=_n.clone;me.cloneDeep=_n.cloneDeep;me.cloneDeepWith=_n.cloneDeepWith;me.cloneWith=_n.cloneWith;me.conformsTo=_n.conformsTo;me.deburr=Qr.deburr;me.defaultTo=qr.defaultTo;me.divide=Aa.divide;me.endsWith=Qr.endsWith;me.eq=_n.eq;me.escape=Qr.escape;me.escapeRegExp=Qr.escapeRegExp;me.every=ti.every;me.find=ti.find;me.findIndex=sn.findIndex;me.findKey=Vn.findKey;me.findLast=ti.findLast;me.findLastIndex=sn.findLastIndex;me.findLastKey=Vn.findLastKey;me.floor=Aa.floor;me.forEach=ti.forEach;me.forEachRight=ti.forEachRight;me.forIn=Vn.forIn;me.forInRight=Vn.forInRight;me.forOwn=Vn.forOwn;me.forOwnRight=Vn.forOwnRight;me.get=Vn.get;me.gt=_n.gt;me.gte=_n.gte;me.has=Vn.has;me.hasIn=Vn.hasIn;me.head=sn.head;me.identity=Pa;me.includes=ti.includes;me.indexOf=sn.indexOf;me.inRange=JR.inRange;me.invoke=Vn.invoke;me.isArguments=_n.isArguments;me.isArray=Fn;me.isArrayBuffer=_n.isArrayBuffer;me.isArrayLike=_n.isArrayLike;me.isArrayLikeObject=_n.isArrayLikeObject;me.isBoolean=_n.isBoolean;me.isBuffer=_n.isBuffer;me.isDate=_n.isDate;me.isElement=_n.isElement;me.isEmpty=_n.isEmpty;me.isEqual=_n.isEqual;me.isEqualWith=_n.isEqualWith;me.isError=_n.isError;me.isFinite=_n.isFinite;me.isFunction=_n.isFunction;me.isInteger=_n.isInteger;me.isLength=_n.isLength;me.isMap=_n.isMap;me.isMatch=_n.isMatch;me.isMatchWith=_n.isMatchWith;me.isNaN=_n.isNaN;me.isNative=_n.isNative;me.isNil=_n.isNil;me.isNull=_n.isNull;me.isNumber=_n.isNumber;me.isObject=Oi;me.isObjectLike=_n.isObjectLike;me.isPlainObject=_n.isPlainObject;me.isRegExp=_n.isRegExp;me.isSafeInteger=_n.isSafeInteger;me.isSet=_n.isSet;me.isString=_n.isString;me.isSymbol=_n.isSymbol;me.isTypedArray=_n.isTypedArray;me.isUndefined=_n.isUndefined;me.isWeakMap=_n.isWeakMap;me.isWeakSet=_n.isWeakSet;me.join=sn.join;me.kebabCase=Qr.kebabCase;me.last=ts;me.lastIndexOf=sn.lastIndexOf;me.lowerCase=Qr.lowerCase;me.lowerFirst=Qr.lowerFirst;me.lt=_n.lt;me.lte=_n.lte;me.max=Aa.max;me.maxBy=Aa.maxBy;me.mean=Aa.mean;me.meanBy=Aa.meanBy;me.min=Aa.min;me.minBy=Aa.minBy;me.stubArray=qr.stubArray;me.stubFalse=qr.stubFalse;me.stubObject=qr.stubObject;me.stubString=qr.stubString;me.stubTrue=qr.stubTrue;me.multiply=Aa.multiply;me.nth=sn.nth;me.noop=qr.noop;me.now=Fxe.now;me.pad=Qr.pad;me.padEnd=Qr.padEnd;me.padStart=Qr.padStart;me.parseInt=Qr.parseInt;me.random=JR.random;me.reduce=ti.reduce;me.reduceRight=ti.reduceRight;me.repeat=Qr.repeat;me.replace=Qr.replace;me.result=Vn.result;me.round=Aa.round;me.sample=ti.sample;me.size=ti.size;me.snakeCase=Qr.snakeCase;me.some=ti.some;me.sortedIndex=sn.sortedIndex;me.sortedIndexBy=sn.sortedIndexBy;me.sortedIndexOf=sn.sortedIndexOf;me.sortedLastIndex=sn.sortedLastIndex;me.sortedLastIndexBy=sn.sortedLastIndexBy;me.sortedLastIndexOf=sn.sortedLastIndexOf;me.startCase=Qr.startCase;me.startsWith=Qr.startsWith;me.subtract=Aa.subtract;me.sum=Aa.sum;me.sumBy=Aa.sumBy;me.template=Qr.template;me.times=qr.times;me.toFinite=_n.toFinite;me.toInteger=Kn;me.toLength=_n.toLength;me.toLower=Qr.toLower;me.toNumber=_n.toNumber;me.toSafeInteger=_n.toSafeInteger;me.toString=_n.toString;me.toUpper=Qr.toUpper;me.trim=Qr.trim;me.trimEnd=Qr.trimEnd;me.trimStart=Qr.trimStart;me.truncate=Qr.truncate;me.unescape=Qr.unescape;me.uniqueId=qr.uniqueId;me.upperCase=Qr.upperCase;me.upperFirst=Qr.upperFirst;me.each=ti.forEach;me.eachRight=ti.forEachRight;me.first=sn.head;e$(me,function(){var t={};return uc(me,function(e,n){Dz.call(me.prototype,n)||(t[n]=e)}),t}(),{chain:!1});me.VERSION=qxe;(me.templateSettings=Qr.templateSettings).imports._=me;El(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){me[t].placeholder=me});El(["drop","take"],function(t,e){Sr.prototype[t]=function(n){n=n===void 0?1:tSe(Kn(n),0);var r=this.__filtered__&&!e?new Sr(this):this.clone();return r.__filtered__?r.__takeCount__=a5(n,r.__takeCount__):r.__views__.push({size:a5(n,Nz),type:t+(r.__dir__<0?"Right":"")}),r},Sr.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}});El(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==Gxe||n==Kxe;Sr.prototype[t]=function(i){var o=this.clone();return o.__iteratees__.push({iteratee:Qn(i),type:n}),o.__filtered__=o.__filtered__||r,o}});El(["head","last"],function(t,e){var n="take"+(e?"Right":"");Sr.prototype[t]=function(){return this[n](1).value()[0]}});El(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");Sr.prototype[t]=function(){return this.__filtered__?new Sr(this):this[n](1)}});Sr.prototype.compact=function(){return this.filter(Pa)};Sr.prototype.find=function(t){return this.filter(t).head()};Sr.prototype.findLast=function(t){return this.reverse().find(t)};Sr.prototype.invokeMap=cr(function(t,e){return typeof t=="function"?new Sr(this):this.map(function(n){return Ob(n,t,e)})});Sr.prototype.reject=function(t){return this.filter(wb(Qn(t)))};Sr.prototype.slice=function(t,e){t=Kn(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Sr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==void 0&&(e=Kn(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)};Sr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()};Sr.prototype.toArray=function(){return this.take(Nz)};uc(Sr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=me[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);!i||(me.prototype[e]=function(){var a=this.__wrapped__,s=r?[1]:arguments,l=a instanceof Sr,u=s[0],c=l||Fn(a),d=function(b){var w=i.apply(me,Lf([b],s));return r&&f?w[0]:w};c&&n&&typeof u=="function"&&u.length!=1&&(l=c=!1);var f=this.__chain__,h=!!this.__actions__.length,g=o&&!f,m=l&&!h;if(!o&&c){a=m?a:new Sr(this);var y=t.apply(a,s);return y.__actions__.push({func:Sb,args:[d],thisArg:void 0}),new vl(y,f)}return g&&m?t.apply(this,s):(y=this.thru(d),g?r?y.value()[0]:y.value():y)})});El(["pop","push","shift","sort","splice","unshift"],function(t){var e=Jxe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);me.prototype[t]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Fn(o)?o:[],i)}return this[n](function(a){return e.apply(Fn(a)?a:[],i)})}});uc(Sr.prototype,function(t,e){var n=me[e];if(n){var r=n.name+"";Dz.call(Pg,r)||(Pg[r]=[]),Pg[r].push({name:e,func:n})}});Pg[xS(void 0,Yxe).name]=[{name:"wrapper",func:void 0}];Sr.prototype.clone=Vxe;Sr.prototype.reverse=jxe;Sr.prototype.value=Zxe;me.prototype.at=dc.at;me.prototype.chain=dc.wrapperChain;me.prototype.commit=dc.commit;me.prototype.next=dc.next;me.prototype.plant=dc.plant;me.prototype.reverse=dc.reverse;me.prototype.toJSON=me.prototype.valueOf=me.prototype.value=dc.value;me.prototype.first=me.prototype.head;o5&&(me.prototype[o5]=dc.toIterator);const ar=t=>t===void 0,wr=t=>typeof t=="boolean",Et=t=>typeof t=="number",Cs=t=>!t&&t!==0||Xe(t)&&t.length===0||Jt(t)&&!Object.keys(t).length,As=t=>typeof Element=="undefined"?!1:t instanceof Element,np=t=>Lr(t),nSe=t=>Ot(t)?!Number.isNaN(Number(t)):!1,FS=t=>t===window;var rSe=Object.defineProperty,iSe=Object.defineProperties,oSe=Object.getOwnPropertyDescriptors,s5=Object.getOwnPropertySymbols,aSe=Object.prototype.hasOwnProperty,sSe=Object.prototype.propertyIsEnumerable,l5=(t,e,n)=>e in t?rSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lSe=(t,e)=>{for(var n in e||(e={}))aSe.call(e,n)&&l5(t,n,e[n]);if(s5)for(var n of s5(e))sSe.call(e,n)&&l5(t,n,e[n]);return t},uSe=(t,e)=>iSe(t,oSe(e));function bk(t,e){var n;const r=yr();return Bo(()=>{r.value=t()},uSe(lSe({},e),{flush:(n=e==null?void 0:e.flush)!=null?n:"sync"})),Rm(r)}var u5;const wn=typeof window!="undefined",cSe=t=>typeof t!="undefined",_k=t=>typeof t=="function",dSe=t=>typeof t=="string",Zg=()=>{},Ok=wn&&((u5=window==null?void 0:window.navigator)==null?void 0:u5.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function yf(t){return typeof t=="function"?t():p(t)}function Lz(t,e){function n(...r){return new Promise((i,o)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return n}function fSe(t,e={}){let n,r,i=Zg;const o=s=>{clearTimeout(s),i(),i=Zg};return s=>{const l=yf(t),u=yf(e.maxWait);return n&&o(n),l<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(s())):new Promise((c,d)=>{i=e.rejectOnCancel?d:c,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,c(s())},u)),n=setTimeout(()=>{r&&o(r),r=null,c(s())},l)})}}function hSe(t,e=!0,n=!0,r=!1){let i=0,o,a=!0,s=Zg,l;const u=()=>{o&&(clearTimeout(o),o=void 0,s(),s=Zg)};return d=>{const f=yf(t),h=Date.now()-i,g=()=>l=d();return u(),f<=0?(i=Date.now(),g()):(h>f&&(n||!a)?(i=Date.now(),g()):e&&(l=new Promise((m,y)=>{s=r?y:m,o=setTimeout(()=>{i=Date.now(),a=!0,m(g()),u()},Math.max(0,f-h))})),!n&&!o&&(o=setTimeout(()=>a=!0,f)),a=!1,l)}}function pSe(t){return t}function gSe(t,e){let n,r,i;const o=F(!0),a=()=>{o.value=!0,i()};Fe(t,a,{flush:"sync"});const s=_k(e)?e:e.get,l=_k(e)?void 0:e.set,u=qse((c,d)=>(r=c,i=d,{get(){return o.value&&(n=s(),o.value=!1),r(),n},set(f){l==null||l(f)}}));return Object.isExtensible(u)&&(u.trigger=a),u}function Cb(t){return oQ()?(aQ(t),!0):!1}function mSe(t,e=200,n={}){return Lz(fSe(e,n),t)}function vSe(t,e=200,n={}){const r=F(t.value),i=mSe(()=>{r.value=t.value},e,n);return Fe(t,()=>i()),r}function Iz(t,e=200,n=!1,r=!0,i=!1){return Lz(hSe(e,n,r,i),t)}function t$(t,e=!0){tn()?Ft(t):e?t():xt(t)}function rp(t,e,n={}){const{immediate:r=!0}=n,i=F(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function s(){i.value=!1,a()}function l(...u){a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,t(...u)},yf(e))}return r&&(i.value=!0,wn&&l()),Cb(s),{isPending:Rm(i),start:l,stop:s}}function ba(t){var e;const n=yf(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Vf=wn?window:void 0,ySe=wn?window.document:void 0;function sr(...t){let e,n,r,i;if(dSe(t[0])||Array.isArray(t[0])?([n,r,i]=t,e=Vf):[e,n,r,i]=t,!e)return Zg;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=Fe(()=>[ba(e),yf(i)],([c,d])=>{a(),c&&o.push(...n.flatMap(f=>r.map(h=>s(c,f,h,d))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Cb(u),u}let c5=!1;function n$(t,e,n={}){const{window:r=Vf,ignore:i=[],capture:o=!0,detectIframe:a=!1}=n;if(!r)return;Ok&&!c5&&(c5=!0,Array.from(r.document.body.children).forEach(f=>f.addEventListener("click",Zg)));let s=!0;const l=f=>i.some(h=>{if(typeof h=="string")return Array.from(r.document.querySelectorAll(h)).some(g=>g===f.target||f.composedPath().includes(g));{const g=ba(h);return g&&(f.target===g||f.composedPath().includes(g))}}),c=[sr(r,"click",f=>{const h=ba(t);if(!(!h||h===f.target||f.composedPath().includes(h))){if(f.detail===0&&(s=!l(f)),!s){s=!0;return}e(f)}},{passive:!0,capture:o}),sr(r,"pointerdown",f=>{const h=ba(t);h&&(s=!f.composedPath().includes(h)&&!l(f))},{passive:!0}),a&&sr(r,"blur",f=>{var h;const g=ba(t);((h=r.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(g!=null&&g.contains(r.document.activeElement))&&e(f)})].filter(Boolean);return()=>c.forEach(f=>f())}function bSe(t={}){var e;const{window:n=Vf}=t,r=(e=t.document)!=null?e:n==null?void 0:n.document,i=gSe(()=>null,()=>r==null?void 0:r.activeElement);return n&&(sr(n,"blur",o=>{o.relatedTarget===null&&i.trigger()},!0),sr(n,"focus",i.trigger,!0)),i}function Bz(t,e=!1){const n=F(),r=()=>n.value=Boolean(t());return r(),t$(r,e),n}function _Se(t){return JSON.parse(JSON.stringify(t))}const wk=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},xk="__vueuse_ssr_handlers__";wk[xk]=wk[xk]||{};wk[xk];function OSe(t,e,{window:n=Vf,initialValue:r=""}={}){const i=F(r),o=M(()=>{var a;return ba(e)||((a=n==null?void 0:n.document)==null?void 0:a.documentElement)});return Fe([o,()=>yf(t)],([a,s])=>{var l;if(a&&n){const u=(l=n.getComputedStyle(a).getPropertyValue(s))==null?void 0:l.trim();i.value=u||r}},{immediate:!0}),Fe(i,a=>{var s;(s=o.value)!=null&&s.style&&o.value.style.setProperty(yf(t),a)}),i}function wSe({document:t=ySe}={}){if(!t)return F("visible");const e=F(t.visibilityState);return sr(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var d5=Object.getOwnPropertySymbols,xSe=Object.prototype.hasOwnProperty,SSe=Object.prototype.propertyIsEnumerable,CSe=(t,e)=>{var n={};for(var r in t)xSe.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&d5)for(var r of d5(t))e.indexOf(r)<0&&SSe.call(t,r)&&(n[r]=t[r]);return n};function Hr(t,e,n={}){const r=n,{window:i=Vf}=r,o=CSe(r,["window"]);let a;const s=Bz(()=>i&&"ResizeObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=Fe(()=>ba(t),d=>{l(),s.value&&i&&d&&(a=new ResizeObserver(e),a.observe(d,o))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return Cb(c),{isSupported:s,stop:c}}function f5(t,e={}){const{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:o=!0}=e,a=F(0),s=F(0),l=F(0),u=F(0),c=F(0),d=F(0),f=F(0),h=F(0);function g(){const m=ba(t);if(!m){n&&(a.value=0,s.value=0,l.value=0,u.value=0,c.value=0,d.value=0,f.value=0,h.value=0);return}const y=m.getBoundingClientRect();a.value=y.height,s.value=y.bottom,l.value=y.left,u.value=y.right,c.value=y.top,d.value=y.width,f.value=y.x,h.value=y.y}return Hr(t,g),Fe(()=>ba(t),m=>!m&&g()),i&&sr("scroll",g,{capture:!0,passive:!0}),r&&sr("resize",g,{passive:!0}),t$(()=>{o&&g()}),{height:a,bottom:s,left:l,right:u,top:c,width:d,x:f,y:h,update:g}}var h5=Object.getOwnPropertySymbols,ESe=Object.prototype.hasOwnProperty,TSe=Object.prototype.propertyIsEnumerable,kSe=(t,e)=>{var n={};for(var r in t)ESe.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&h5)for(var r of h5(t))e.indexOf(r)<0&&TSe.call(t,r)&&(n[r]=t[r]);return n};function Fz(t,e,n={}){const r=n,{window:i=Vf}=r,o=kSe(r,["window"]);let a;const s=Bz(()=>i&&"MutationObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=Fe(()=>ba(t),d=>{l(),s.value&&i&&d&&(a=new MutationObserver(e),a.observe(d,o))},{immediate:!0}),c=()=>{l(),u()};return Cb(c),{isSupported:s,stop:c}}var p5;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(p5||(p5={}));var PSe=Object.defineProperty,g5=Object.getOwnPropertySymbols,ASe=Object.prototype.hasOwnProperty,MSe=Object.prototype.propertyIsEnumerable,m5=(t,e,n)=>e in t?PSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RSe=(t,e)=>{for(var n in e||(e={}))ASe.call(e,n)&&m5(t,n,e[n]);if(g5)for(var n of g5(e))MSe.call(e,n)&&m5(t,n,e[n]);return t};const $Se={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};RSe({linear:pSe},$Se);function Vz(t,e,n,r={}){var i,o,a;const{clone:s=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d}=r,f=tn(),h=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((a=(o=f==null?void 0:f.proxy)==null?void 0:o.$emit)==null?void 0:a.bind(f==null?void 0:f.proxy));let g=u;e||(e="modelValue"),g=u||g||`update:${e.toString()}`;const m=b=>s?_k(s)?s(b):_Se(b):b,y=()=>cSe(t[e])?m(t[e]):d;if(l){const b=y(),w=F(b);return Fe(()=>t[e],O=>w.value=m(O)),Fe(w,O=>{(O!==t[e]||c)&&h(g,O)},{deep:c}),w}else return M({get(){return y()},set(b){h(g,b)}})}function NSe({window:t=Vf}={}){if(!t)return F(!1);const e=F(t.document.hasFocus());return sr(t,"blur",()=>{e.value=!1}),sr(t,"focus",()=>{e.value=!0}),e}function DSe(t={}){const{window:e=Vf,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:o=!0}=t,a=F(n),s=F(r),l=()=>{e&&(o?(a.value=e.innerWidth,s.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,s.value=e.document.documentElement.clientHeight))};return l(),t$(l),sr("resize",l,{passive:!0}),i&&sr("orientationchange",l,{passive:!0}),{width:a,height:s}}class LSe extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function Wi(t,e){throw new LSe(`[${t}] ${e}`)}const v5={current:0},y5=F(0),jz=2e3,b5=Symbol("elZIndexContextKey"),Qz=Symbol("zIndexContextKey"),zm=t=>{const e=tn()?ht(b5,v5):v5,n=t||(tn()?ht(Qz,void 0):void 0),r=M(()=>{const a=p(n);return Et(a)?a:jz}),i=M(()=>r.value+y5.value),o=()=>(e.current++,y5.value=e.current,i.value);return!wn&&ht(b5),{initialZIndex:r,currentZIndex:i,nextZIndex:o}};var ISe={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const BSe=t=>(e,n)=>FSe(e,n,p(t)),FSe=(t,e,n)=>Kr(n,t,t).replace(/\{(\w+)\}/g,(r,i)=>{var o;return`${(o=e==null?void 0:e[i])!=null?o:`{${i}}`}`}),VSe=t=>{const e=M(()=>p(t).name),n=Tr(t)?t:F(t);return{lang:e,locale:n,t:BSe(t)}},zz=Symbol("localeContextKey"),xn=t=>{const e=t||ht(zz,F());return VSe(M(()=>e.value||ISe))},Wz="__epPropKey",we=t=>t,jSe=t=>Jt(t)&&!!t[Wz],pu=(t,e)=>{if(!Jt(t)||jSe(t))return t;const{values:n,required:r,default:i,type:o,validator:a}=t,l={type:o,required:!!r,validator:n||a?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),Mn(t,"default")&&d.push(i),c||(c=d.includes(u))),a&&(c||(c=a(u))),!c&&d.length>0){const f=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");Jse(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[Wz]:!0};return Mn(t,"default")&&(l.default=i),l},Ze=t=>Ug(Object.entries(t).map(([e,n])=>[e,pu(n,e)])),fc=["","default","small","large"],$i=pu({type:String,values:fc,required:!1}),Hz=Symbol("size"),Uz=()=>{const t=ht(Hz,{});return M(()=>p(t.size)||"")},Xz=Symbol("emptyValuesContextKey"),QSe=["",void 0,null],zSe=void 0,Wm=Ze({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:t=>St(t)?!t():!t}}),VS=(t,e)=>{const n=tn()?ht(Xz,F({})):F({}),r=M(()=>t.emptyValues||n.value.emptyValues||QSe),i=M(()=>St(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:St(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:zSe),o=a=>r.value.includes(a);return r.value.includes(i.value),{emptyValues:r,valueOnClear:i,isEmptyValue:o}},qg=t=>Object.keys(t),Zz=t=>Object.entries(t),_1=(t,e,n)=>({get value(){return Kr(t,e,n)},set value(r){qR(t,e,r)}}),vw=F();function jS(t,e=void 0){const n=tn()?ht(l7,vw):vw;return t?M(()=>{var r,i;return(i=(r=n.value)==null?void 0:r[t])!=null?i:e}):n}function QS(t,e){const n=jS(),r=Qe(t,M(()=>{var s;return((s=n.value)==null?void 0:s.namespace)||wy})),i=xn(M(()=>{var s;return(s=n.value)==null?void 0:s.locale})),o=zm(M(()=>{var s;return((s=n.value)==null?void 0:s.zIndex)||jz})),a=M(()=>{var s;return p(e)||((s=n.value)==null?void 0:s.size)||""});return r$(M(()=>p(n)||{})),{ns:r,locale:i,zIndex:o,size:a}}const r$=(t,e,n=!1)=>{var r;const i=!!tn(),o=i?jS():void 0,a=(r=e==null?void 0:e.provide)!=null?r:i?gn:void 0;if(!a)return;const s=M(()=>{const l=p(t);return o!=null&&o.value?WSe(o.value,l):l});return a(l7,s),a(zz,M(()=>s.value.locale)),a(u7,M(()=>s.value.namespace)),a(Qz,M(()=>s.value.zIndex)),a(Hz,{size:M(()=>s.value.size||"")}),a(Xz,M(()=>({emptyValues:s.value.emptyValues,valueOnClear:s.value.valueOnClear}))),(n||!vw.value)&&(vw.value=s.value),s},WSe=(t,e)=>{const n=[...new Set([...qg(t),...qg(e)])],r={};for(const i of n)r[i]=e[i]!==void 0?e[i]:t[i];return r},HSe=(t=[])=>({version:Rue,install:(n,r)=>{n[t4]||(n[t4]=!0,t.forEach(i=>n.use(i)),r&&r$(r,n,!0))}}),Ut="update:modelValue",dr="change",Fo="input",USe=Ze({zIndex:{type:we([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),XSe={scroll:({scrollTop:t,fixed:e})=>Et(t)&&wr(e),[dr]:t=>wr(t)};var Ye=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};function ZSe(t,e,n,r){const i=n-e;return t/=r/2,t<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e}const bf=t=>wn?window.requestAnimationFrame(t):setTimeout(t,16),ip=t=>wn?window.cancelAnimationFrame(t):clearTimeout(t),qz=(t="")=>t.split(" ").filter(e=>!!e.trim()),Ha=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},il=(t,e)=>{!t||!e.trim()||t.classList.add(...qz(e))},sa=(t,e)=>{!t||!e.trim()||t.classList.remove(...qz(e))},Fc=(t,e)=>{var n;if(!wn||!t||!e)return"";let r=$s(e);r==="float"&&(r="cssFloat");try{const i=t.style[r];if(i)return i;const o=(n=document.defaultView)==null?void 0:n.getComputedStyle(t,"");return o?o[r]:""}catch{return t.style[r]}},Yz=(t,e,n)=>{if(!(!t||!e))if(Jt(e))Zz(e).forEach(([r,i])=>Yz(t,r,i));else{const r=$s(e);t.style[r]=n}};function pi(t,e="px"){if(!t)return"";if(Et(t)||nSe(t))return`${t}${e}`;if(Ot(t))return t}const qSe=(t,e)=>{if(!wn)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],r=Fc(t,n);return["scroll","auto","overlay"].some(i=>r.includes(i))},i$=(t,e)=>{if(!wn)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(qSe(n,e))return n;n=n.parentNode}return n};let eO;const Gz=t=>{var e;if(!wn)return 0;if(eO!==void 0)return eO;const n=document.createElement("div");n.className=`${t}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const r=n.offsetWidth;n.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",n.appendChild(i);const o=i.offsetWidth;return(e=n.parentNode)==null||e.removeChild(n),eO=r-o,eO};function o$(t,e){if(!wn)return;if(!e){t.scrollTop=0;return}const n=[];let r=e.offsetParent;for(;r!==null&&t!==r&&t.contains(r);)n.push(r),r=r.offsetParent;const i=e.offsetTop+n.reduce((l,u)=>l+u.offsetTop,0),o=i+e.offsetHeight,a=t.scrollTop,s=a+t.clientHeight;i<a?t.scrollTop=i:o>s&&(t.scrollTop=o-t.clientHeight)}function YSe(t,e,n,r,i){const o=Date.now();let a;const s=()=>{const u=Date.now()-o,c=ZSe(u>r?r:u,e,n,r);FS(t)?t.scrollTo(window.pageXOffset,c):t.scrollTop=c,u<r?a=bf(s):St(i)&&i()};return s(),()=>{a&&ip(a)}}const _5=(t,e)=>FS(e)?t.ownerDocument.documentElement:e,O5=t=>FS(t)?window.scrollY:t.scrollTop,Kz="ElAffix",GSe=ue({name:Kz}),KSe=ue({...GSe,props:USe,emits:XSe,setup(t,{expose:e,emit:n}){const r=t,i=Qe("affix"),o=yr(),a=yr(),s=yr(),{height:l}=DSe(),{height:u,width:c,top:d,bottom:f,update:h}=f5(a,{windowScroll:!1}),g=f5(o),m=F(!1),y=F(0),b=F(0),w=M(()=>({height:m.value?`${u.value}px`:"",width:m.value?`${c.value}px`:""})),O=M(()=>{if(!m.value)return{};const C=r.offset?pi(r.offset):0;return{height:`${u.value}px`,width:`${c.value}px`,top:r.position==="top"?C:"",bottom:r.position==="bottom"?C:"",transform:b.value?`translateY(${b.value}px)`:"",zIndex:r.zIndex}}),x=()=>{if(!s.value)return;y.value=s.value instanceof Window?document.documentElement.scrollTop:s.value.scrollTop||0;const{position:C,target:E,offset:T}=r,P=T+u.value;if(C==="top")if(E){const A=g.bottom.value-P;m.value=T>d.value&&g.bottom.value>0,b.value=A<0?A:0}else m.value=T>d.value;else if(E){const A=l.value-g.top.value-P;m.value=l.value-T<f.value&&l.value>g.top.value,b.value=A<0?-A:0}else m.value=l.value-T<f.value},S=()=>{h(),n("scroll",{scrollTop:y.value,fixed:m.value})};return Fe(m,C=>n("change",C)),Ft(()=>{var C;r.target?(o.value=(C=document.querySelector(r.target))!=null?C:void 0,o.value||Wi(Kz,`Target does not exist: ${r.target}`)):o.value=document.documentElement,s.value=i$(a.value,!0),h()}),sr(s,"scroll",S),Bo(x),e({update:x,updateRoot:h}),(C,E)=>(R(),Y("div",{ref_key:"root",ref:a,class:V(p(i).b()),style:vt(p(w))},[J("div",{class:V({[p(i).m("fixed")]:m.value}),style:vt(p(O))},[Ee(C.$slots,"default")],6)],6))}});var JSe=Ye(KSe,[["__file","affix.vue"]]);const Vt=(t,e)=>{if(t.install=n=>{for(const r of[t,...Object.values(e!=null?e:{})])n.component(r.name,r)},e)for(const[n,r]of Object.entries(e))t[n]=r;return t},Jz=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),eCe=(t,e)=>(t.install=n=>{n.directive(e,t)},t),ni=t=>(t.install=ir,t),tCe=Vt(JSe),nCe=Ze({size:{type:we([Number,String])},color:{type:String}}),rCe=ue({name:"ElIcon",inheritAttrs:!1}),iCe=ue({...rCe,props:nCe,setup(t){const e=t,n=Qe("icon"),r=M(()=>{const{size:i,color:o}=e;return!i&&!o?{}:{fontSize:ar(i)?void 0:pi(i),"--color":o}});return(i,o)=>(R(),Y("i",an({class:p(n).b(),style:p(r)},i.$attrs),[Ee(i.$slots,"default")],16))}});var oCe=Ye(iCe,[["__file","icon.vue"]]);const mt=Vt(oCe);/*! Element Plus Icons Vue v2.3.1 */var aCe=ue({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),hd=aCe,sCe=ue({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),_f=sCe,lCe=ue({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),_a=lCe,uCe=ue({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),a$=uCe,cCe=ue({name:"Back",__name:"back",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),J("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),dCe=cCe,fCe=ue({name:"BottomLeft",__name:"bottom-left",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M256 768h416a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V352a32 32 0 0 1 64 0z"}),J("path",{fill:"currentColor",d:"M246.656 822.656a32 32 0 0 1-45.312-45.312l544-544a32 32 0 0 1 45.312 45.312l-544 544z"})]))}}),zS=fCe,hCe=ue({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),pCe=hCe,gCe=ue({name:"CaretRight",__name:"caret-right",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),eW=gCe,mCe=ue({name:"CaretTop",__name:"caret-top",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),vCe=mCe,yCe=ue({name:"Check",__name:"check",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Eb=yCe,bCe=ue({name:"CircleCheckFilled",__name:"circle-check-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),_Ce=bCe,OCe=ue({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),J("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),s$=OCe,wCe=ue({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),l$=wCe,xCe=ue({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),J("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),pd=xCe,SCe=ue({name:"Clock",__name:"clock",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),J("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),J("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),tW=SCe,CCe=ue({name:"Close",__name:"close",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Oa=CCe,ECe=ue({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Of=ECe,TCe=ue({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),wf=TCe,kCe=ue({name:"Delete",__name:"delete",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),u$=kCe,PCe=ue({name:"Document",__name:"document",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),ACe=PCe,MCe=ue({name:"Edit",__name:"edit",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),J("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),nW=MCe,RCe=ue({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),Hm=RCe,$Ce=ue({name:"Hide",__name:"hide",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),J("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),NCe=$Ce,DCe=ue({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),c$=DCe,LCe=ue({name:"Loading",__name:"loading",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),Ju=LCe,ICe=ue({name:"MapLocation",__name:"map-location",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),J("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256m345.6 192L960 960H672v-64H352v64H64l102.4-256zm-68.928 0H235.328l-76.8 192h706.944z"})]))}}),BCe=ICe,FCe=ue({name:"Minus",__name:"minus",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),VCe=FCe,jCe=ue({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),Sy=jCe,QCe=ue({name:"More",__name:"more",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),zCe=QCe,WCe=ue({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),HCe=WCe,UCe=ue({name:"Plus",__name:"plus",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),yw=UCe,XCe=ue({name:"QuestionFilled",__name:"question-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),ZCe=XCe,qCe=ue({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),YCe=qCe,GCe=ue({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),rW=GCe,KCe=ue({name:"RemoveFilled",__name:"remove-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"})]))}}),JCe=KCe,eEe=ue({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),tEe=eEe,nEe=ue({name:"Search",__name:"search",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),d$=nEe,rEe=ue({name:"SortDown",__name:"sort-down",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),iEe=rEe,oEe=ue({name:"SortUp",__name:"sort-up",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),aEe=oEe,sEe=ue({name:"StarFilled",__name:"star-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}}),tO=sEe,lEe=ue({name:"Star",__name:"star",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),uEe=lEe,cEe=ue({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),f$=cEe,dEe=ue({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),fEe=dEe,hEe=ue({name:"View",__name:"view",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),pEe=hEe,gEe=ue({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),WS=gEe,mEe=ue({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),iW=mEe,vEe=ue({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(R(),Y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),yEe=vEe;const fr=we([String,Object,Function]),h$={Close:Oa},p$={Close:Oa,SuccessFilled:f$,InfoFilled:c$,WarningFilled:WS,CircleCloseFilled:l$},xf={success:f$,warning:WS,error:l$,info:c$},HS={validating:Ju,success:s$,error:pd},bEe=["light","dark"],_Ee=Ze({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:qg(xf),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:bEe,default:"light"}}),OEe={close:t=>t instanceof MouseEvent},wEe=ue({name:"ElAlert"}),xEe=ue({...wEe,props:_Ee,emits:OEe,setup(t,{emit:e}){const n=t,{Close:r}=p$,i=Ni(),o=Qe("alert"),a=F(!0),s=M(()=>xf[n.type]),l=M(()=>!!(n.description||i.default)),u=c=>{a.value=!1,e("close",c)};return(c,d)=>(R(),xe(zi,{name:p(o).b("fade"),persisted:""},{default:j(()=>[zt(J("div",{class:V([p(o).b(),p(o).m(c.type),p(o).is("center",c.center),p(o).is(c.effect)]),role:"alert"},[c.showIcon&&p(s)?(R(),xe(p(mt),{key:0,class:V([p(o).e("icon"),{[p(o).is("big")]:p(l)}])},{default:j(()=>[(R(),xe(on(p(s))))]),_:1},8,["class"])):Se("v-if",!0),J("div",{class:V(p(o).e("content"))},[c.title||c.$slots.title?(R(),Y("span",{key:0,class:V([p(o).e("title"),{"with-description":p(l)}])},[Ee(c.$slots,"title",{},()=>[Ue(Ve(c.title),1)])],2)):Se("v-if",!0),p(l)?(R(),Y("p",{key:1,class:V(p(o).e("description"))},[Ee(c.$slots,"default",{},()=>[Ue(Ve(c.description),1)])],2)):Se("v-if",!0),c.closable?(R(),Y(dt,{key:2},[c.closeText?(R(),Y("div",{key:0,class:V([p(o).e("close-btn"),p(o).is("customed")]),onClick:u},Ve(c.closeText),3)):(R(),xe(p(mt),{key:1,class:V(p(o).e("close-btn")),onClick:u},{default:j(()=>[B(p(r))]),_:1},8,["class"]))],64)):Se("v-if",!0)],2)],2),[[Bn,a.value]])]),_:3},8,["name"]))}});var SEe=Ye(xEe,[["__file","alert.vue"]]);const oW=Vt(SEe),US=()=>wn&&/firefox/i.test(window.navigator.userAgent);let Bl;const CEe=`
- height:0 !important;
- visibility:hidden !important;
- ${US()?"":"overflow:hidden !important;"}
- position:absolute !important;
- z-index:-1000 !important;
- top:0 !important;
- right:0 !important;
- `,EEe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function TEe(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),r=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),i=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:EEe.map(a=>`${a}:${e.getPropertyValue(a)}`).join(";"),paddingSize:r,borderSize:i,boxSizing:n}}function w5(t,e=1,n){var r;Bl||(Bl=document.createElement("textarea"),document.body.appendChild(Bl));const{paddingSize:i,borderSize:o,boxSizing:a,contextStyle:s}=TEe(t);Bl.setAttribute("style",`${s};${CEe}`),Bl.value=t.value||t.placeholder||"";let l=Bl.scrollHeight;const u={};a==="border-box"?l=l+o:a==="content-box"&&(l=l-i),Bl.value="";const c=Bl.scrollHeight-i;if(Et(e)){let d=c*e;a==="border-box"&&(d=d+i+o),l=Math.max(d,l),u.minHeight=`${d}px`}if(Et(n)){let d=c*n;a==="border-box"&&(d=d+i+o),l=Math.min(d,l)}return u.height=`${l}px`,(r=Bl.parentNode)==null||r.removeChild(Bl),Bl=void 0,u}const ei=t=>t,kEe=Ze({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),wo=t=>vo(kEe,t),g$=Ze({id:{type:String,default:void 0},size:$i,disabled:Boolean,modelValue:{type:we([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:we([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:fr},prefixIcon:{type:fr},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:we([Object,Array,String]),default:()=>ei({})},autofocus:Boolean,rows:{type:Number,default:2},...wo(["ariaLabel"])}),PEe={[Ut]:t=>Ot(t),input:t=>Ot(t),change:t=>Ot(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},AEe=["class","style"],MEe=/^on[A-Z]/,Tb=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,r=M(()=>((n==null?void 0:n.value)||[]).concat(AEe)),i=tn();return M(i?()=>{var o;return Ug(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([a])=>!r.value.includes(a)&&!(e&&MEe.test(a))))}:()=>({}))},wp=Symbol("formContextKey"),ec=Symbol("formItemContextKey"),x5={prefix:Math.floor(Math.random()*1e4),current:0},REe=Symbol("elIdInjection"),m$=()=>tn()?ht(REe,x5):x5,bo=t=>{const e=m$(),n=nR();return bk(()=>p(t)||`${n.value}-id-${e.prefix}-${e.current++}`)},Wo=()=>{const t=ht(wp,void 0),e=ht(ec,void 0);return{form:t,formItem:e}},Tl=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:r})=>{n||(n=F(!1)),r||(r=F(!1));const i=F();let o;const a=M(()=>{var s;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((s=e.inputIds)==null?void 0:s.length)<=1)});return Ft(()=>{o=Fe([Gn(t,"id"),n],([s,l])=>{const u=s!=null?s:l?void 0:bo().value;u!==i.value&&(e!=null&&e.removeInputId&&(i.value&&e.removeInputId(i.value),!(r!=null&&r.value)&&!l&&u&&e.addInputId(u)),i.value=u)},{immediate:!0})}),od(()=>{o&&o(),e!=null&&e.removeInputId&&i.value&&e.removeInputId(i.value)}),{isLabeledByFormItem:a,inputId:i}},aW=t=>{const e=tn();return M(()=>{var n,r;return(r=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:r[t]})},ki=(t,e={})=>{const n=F(void 0),r=e.prop?n:aW("size"),i=e.global?n:Uz(),o=e.form?{size:void 0}:ht(wp,void 0),a=e.formItem?{size:void 0}:ht(ec,void 0);return M(()=>r.value||p(t)||(a==null?void 0:a.size)||(o==null?void 0:o.size)||i.value||"")},Ho=t=>{const e=aW("disabled"),n=ht(wp,void 0);return M(()=>e.value||p(t)||(n==null?void 0:n.disabled)||!1)};function jf(t,{beforeFocus:e,afterFocus:n,beforeBlur:r,afterBlur:i}={}){const o=tn(),{emit:a}=o,s=yr(),l=F(!1),u=f=>{(St(e)?e(f):!1)||l.value||(l.value=!0,a("focus",f),n==null||n())},c=f=>{var h;(St(r)?r(f):!1)||f.relatedTarget&&((h=s.value)==null?void 0:h.contains(f.relatedTarget))||(l.value=!1,a("blur",f),i==null||i())},d=()=>{var f,h;((f=s.value)==null?void 0:f.contains(document.activeElement))&&s.value!==document.activeElement||(h=t.value)==null||h.focus()};return Fe(s,f=>{f&&f.setAttribute("tabindex","-1")}),sr(s,"focus",u,!0),sr(s,"blur",c,!0),sr(s,"click",d,!0),{isFocused:l,wrapperRef:s,handleFocus:u,handleBlur:c}}const $Ee=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t);function kb({afterComposition:t,emit:e}){const n=F(!1),r=s=>{e==null||e("compositionstart",s),n.value=!0},i=s=>{var l;e==null||e("compositionupdate",s);const u=(l=s.target)==null?void 0:l.value,c=u[u.length-1]||"";n.value=!$Ee(c)},o=s=>{e==null||e("compositionend",s),n.value&&(n.value=!1,xt(()=>t(s)))};return{isComposing:n,handleComposition:s=>{s.type==="compositionend"?o(s):i(s)},handleCompositionStart:r,handleCompositionUpdate:i,handleCompositionEnd:o}}function NEe(t){let e;function n(){if(t.value==null)return;const{selectionStart:i,selectionEnd:o,value:a}=t.value;if(i==null||o==null)return;const s=a.slice(0,Math.max(0,i)),l=a.slice(Math.max(0,o));e={selectionStart:i,selectionEnd:o,value:a,beforeTxt:s,afterTxt:l}}function r(){if(t.value==null||e==null)return;const{value:i}=t.value,{beforeTxt:o,afterTxt:a,selectionStart:s}=e;if(o==null||a==null||s==null)return;let l=i.length;if(i.endsWith(a))l=i.length-a.length;else if(i.startsWith(o))l=o.length;else{const u=o[s-1],c=i.indexOf(u,s-1);c!==-1&&(l=c+1)}t.value.setSelectionRange(l,l)}return[n,r]}const DEe=ue({name:"ElInput",inheritAttrs:!1}),LEe=ue({...DEe,props:g$,emits:PEe,setup(t,{expose:e,emit:n}){const r=t,i=Nf(),o=Tb(),a=Ni(),s=M(()=>[r.type==="textarea"?m.b():g.b(),g.m(f.value),g.is("disabled",h.value),g.is("exceed",oe.value),{[g.b("group")]:a.prepend||a.append,[g.m("prefix")]:a.prefix||r.prefixIcon,[g.m("suffix")]:a.suffix||r.suffixIcon||r.clearable||r.showPassword,[g.bm("suffix","password-clear")]:Q.value&&W.value,[g.b("hidden")]:r.type==="hidden"},i.class]),l=M(()=>[g.e("wrapper"),g.is("focus",T.value)]),{form:u,formItem:c}=Wo(),{inputId:d}=Tl(r,{formItemContext:c}),f=ki(),h=Ho(),g=Qe("input"),m=Qe("textarea"),y=yr(),b=yr(),w=F(!1),O=F(!1),x=F(),S=yr(r.inputStyle),C=M(()=>y.value||b.value),{wrapperRef:E,isFocused:T,handleFocus:P,handleBlur:A}=jf(C,{beforeFocus(){return h.value},afterBlur(){var Oe;r.validateEvent&&((Oe=c==null?void 0:c.validate)==null||Oe.call(c,"blur").catch(Re=>void 0))}}),D=M(()=>{var Oe;return(Oe=u==null?void 0:u.statusIcon)!=null?Oe:!1}),$=M(()=>(c==null?void 0:c.validateState)||""),N=M(()=>$.value&&HS[$.value]),z=M(()=>O.value?pEe:NCe),I=M(()=>[i.style]),L=M(()=>[r.inputStyle,S.value,{resize:r.resize}]),X=M(()=>Lr(r.modelValue)?"":String(r.modelValue)),Q=M(()=>r.clearable&&!h.value&&!r.readonly&&!!X.value&&(T.value||w.value)),W=M(()=>r.showPassword&&!h.value&&!!X.value&&(!!X.value||T.value)),G=M(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!h.value&&!r.readonly&&!r.showPassword),K=M(()=>X.value.length),oe=M(()=>!!G.value&&K.value>Number(r.maxlength)),ne=M(()=>!!a.suffix||!!r.suffixIcon||Q.value||r.showPassword||G.value||!!$.value&&D.value),[_e,Ce]=NEe(y);Hr(b,Oe=>{if(ee(),!G.value||r.resize!=="both")return;const Re=Oe[0],{width:je}=Re.contentRect;x.value={right:`calc(100% - ${je+15+6}px)`}});const U=()=>{const{type:Oe,autosize:Re}=r;if(!(!wn||Oe!=="textarea"||!b.value))if(Re){const je=Jt(Re)?Re.minRows:void 0,Ke=Jt(Re)?Re.maxRows:void 0,Je=w5(b.value,je,Ke);S.value={overflowY:"hidden",...Je},xt(()=>{b.value.offsetHeight,S.value=Je})}else S.value={minHeight:w5(b.value).minHeight}},ee=(Oe=>{let Re=!1;return()=>{var je;if(Re||!r.autosize)return;((je=b.value)==null?void 0:je.offsetParent)===null||(Oe(),Re=!0)}})(U),he=()=>{const Oe=C.value,Re=r.formatter?r.formatter(X.value):X.value;!Oe||Oe.value===Re||(Oe.value=Re)},$e=async Oe=>{_e();let{value:Re}=Oe.target;if(r.formatter&&(Re=r.parser?r.parser(Re):Re),!q.value){if(Re===X.value){he();return}n(Ut,Re),n("input",Re),await xt(),he(),Ce()}},Me=Oe=>{n("change",Oe.target.value)},{isComposing:q,handleCompositionStart:de,handleCompositionUpdate:ke,handleCompositionEnd:Ie}=kb({emit:n,afterComposition:$e}),se=()=>{_e(),O.value=!O.value,setTimeout(Ce)},ye=()=>{var Oe;return(Oe=C.value)==null?void 0:Oe.focus()},Ae=()=>{var Oe;return(Oe=C.value)==null?void 0:Oe.blur()},Z=Oe=>{w.value=!1,n("mouseleave",Oe)},te=Oe=>{w.value=!0,n("mouseenter",Oe)},le=Oe=>{n("keydown",Oe)},Te=()=>{var Oe;(Oe=C.value)==null||Oe.select()},pe=()=>{n(Ut,""),n("change",""),n("clear"),n("input","")};return Fe(()=>r.modelValue,()=>{var Oe;xt(()=>U()),r.validateEvent&&((Oe=c==null?void 0:c.validate)==null||Oe.call(c,"change").catch(Re=>void 0))}),Fe(X,()=>he()),Fe(()=>r.type,async()=>{await xt(),he(),U()}),Ft(()=>{!r.formatter&&r.parser,he(),xt(U)}),e({input:y,textarea:b,ref:C,textareaStyle:L,autosize:Gn(r,"autosize"),isComposing:q,focus:ye,blur:Ae,select:Te,clear:pe,resizeTextarea:U}),(Oe,Re)=>(R(),Y("div",{class:V([p(s),{[p(g).bm("group","append")]:Oe.$slots.append,[p(g).bm("group","prepend")]:Oe.$slots.prepend}]),style:vt(p(I)),onMouseenter:te,onMouseleave:Z},[Se(" input "),Oe.type!=="textarea"?(R(),Y(dt,{key:0},[Se(" prepend slot "),Oe.$slots.prepend?(R(),Y("div",{key:0,class:V(p(g).be("group","prepend"))},[Ee(Oe.$slots,"prepend")],2)):Se("v-if",!0),J("div",{ref_key:"wrapperRef",ref:E,class:V(p(l))},[Se(" prefix slot "),Oe.$slots.prefix||Oe.prefixIcon?(R(),Y("span",{key:0,class:V(p(g).e("prefix"))},[J("span",{class:V(p(g).e("prefix-inner"))},[Ee(Oe.$slots,"prefix"),Oe.prefixIcon?(R(),xe(p(mt),{key:0,class:V(p(g).e("icon"))},{default:j(()=>[(R(),xe(on(Oe.prefixIcon)))]),_:1},8,["class"])):Se("v-if",!0)],2)],2)):Se("v-if",!0),J("input",an({id:p(d),ref_key:"input",ref:y,class:p(g).e("inner")},p(o),{minlength:Oe.minlength,maxlength:Oe.maxlength,type:Oe.showPassword?O.value?"text":"password":Oe.type,disabled:p(h),readonly:Oe.readonly,autocomplete:Oe.autocomplete,tabindex:Oe.tabindex,"aria-label":Oe.ariaLabel,placeholder:Oe.placeholder,style:Oe.inputStyle,form:Oe.form,autofocus:Oe.autofocus,role:Oe.containerRole,onCompositionstart:p(de),onCompositionupdate:p(ke),onCompositionend:p(Ie),onInput:$e,onChange:Me,onKeydown:le}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","onCompositionstart","onCompositionupdate","onCompositionend"]),Se(" suffix slot "),p(ne)?(R(),Y("span",{key:1,class:V(p(g).e("suffix"))},[J("span",{class:V(p(g).e("suffix-inner"))},[!p(Q)||!p(W)||!p(G)?(R(),Y(dt,{key:0},[Ee(Oe.$slots,"suffix"),Oe.suffixIcon?(R(),xe(p(mt),{key:0,class:V(p(g).e("icon"))},{default:j(()=>[(R(),xe(on(Oe.suffixIcon)))]),_:1},8,["class"])):Se("v-if",!0)],64)):Se("v-if",!0),p(Q)?(R(),xe(p(mt),{key:1,class:V([p(g).e("icon"),p(g).e("clear")]),onMousedown:At(p(ir),["prevent"]),onClick:pe},{default:j(()=>[B(p(pd))]),_:1},8,["class","onMousedown"])):Se("v-if",!0),p(W)?(R(),xe(p(mt),{key:2,class:V([p(g).e("icon"),p(g).e("password")]),onClick:se},{default:j(()=>[(R(),xe(on(p(z))))]),_:1},8,["class"])):Se("v-if",!0),p(G)?(R(),Y("span",{key:3,class:V(p(g).e("count"))},[J("span",{class:V(p(g).e("count-inner"))},Ve(p(K))+" / "+Ve(Oe.maxlength),3)],2)):Se("v-if",!0),p($)&&p(N)&&p(D)?(R(),xe(p(mt),{key:4,class:V([p(g).e("icon"),p(g).e("validateIcon"),p(g).is("loading",p($)==="validating")])},{default:j(()=>[(R(),xe(on(p(N))))]),_:1},8,["class"])):Se("v-if",!0)],2)],2)):Se("v-if",!0)],2),Se(" append slot "),Oe.$slots.append?(R(),Y("div",{key:1,class:V(p(g).be("group","append"))},[Ee(Oe.$slots,"append")],2)):Se("v-if",!0)],64)):(R(),Y(dt,{key:1},[Se(" textarea "),J("textarea",an({id:p(d),ref_key:"textarea",ref:b,class:[p(m).e("inner"),p(g).is("focus",p(T))]},p(o),{minlength:Oe.minlength,maxlength:Oe.maxlength,tabindex:Oe.tabindex,disabled:p(h),readonly:Oe.readonly,autocomplete:Oe.autocomplete,style:p(L),"aria-label":Oe.ariaLabel,placeholder:Oe.placeholder,form:Oe.form,autofocus:Oe.autofocus,rows:Oe.rows,role:Oe.containerRole,onCompositionstart:p(de),onCompositionupdate:p(ke),onCompositionend:p(Ie),onInput:$e,onFocus:p(P),onBlur:p(A),onChange:Me,onKeydown:le}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),p(G)?(R(),Y("span",{key:0,style:vt(x.value),class:V(p(g).e("count"))},Ve(p(K))+" / "+Ve(Oe.maxlength),7)):Se("v-if",!0)],64))],38))}});var IEe=Ye(LEe,[["__file","input.vue"]]);const hi=Vt(IEe),zp=4,sW={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},BEe=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),v$=Symbol("scrollbarContextKey"),FEe=Ze({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),VEe="Thumb",jEe=ue({__name:"thumb",props:FEe,setup(t){const e=t,n=ht(v$),r=Qe("scrollbar");n||Wi(VEe,"can not inject scrollbar context");const i=F(),o=F(),a=F({}),s=F(!1);let l=!1,u=!1,c=wn?document.onselectstart:null;const d=M(()=>sW[e.vertical?"vertical":"horizontal"]),f=M(()=>BEe({size:e.size,move:e.move,bar:d.value})),h=M(()=>i.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/e.ratio/o.value[d.value.offset]),g=C=>{var E;if(C.stopPropagation(),C.ctrlKey||[1,2].includes(C.button))return;(E=window.getSelection())==null||E.removeAllRanges(),y(C);const T=C.currentTarget;!T||(a.value[d.value.axis]=T[d.value.offset]-(C[d.value.client]-T.getBoundingClientRect()[d.value.direction]))},m=C=>{if(!o.value||!i.value||!n.wrapElement)return;const E=Math.abs(C.target.getBoundingClientRect()[d.value.direction]-C[d.value.client]),T=o.value[d.value.offset]/2,P=(E-T)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=P*n.wrapElement[d.value.scrollSize]/100},y=C=>{C.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",b),document.addEventListener("mouseup",w),c=document.onselectstart,document.onselectstart=()=>!1},b=C=>{if(!i.value||!o.value||l===!1)return;const E=a.value[d.value.axis];if(!E)return;const T=(i.value.getBoundingClientRect()[d.value.direction]-C[d.value.client])*-1,P=o.value[d.value.offset]-E,A=(T-P)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=A*n.wrapElement[d.value.scrollSize]/100},w=()=>{l=!1,a.value[d.value.axis]=0,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",w),S(),u&&(s.value=!1)},O=()=>{u=!1,s.value=!!e.size},x=()=>{u=!0,s.value=l};pr(()=>{S(),document.removeEventListener("mouseup",w)});const S=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return sr(Gn(n,"scrollbarElement"),"mousemove",O),sr(Gn(n,"scrollbarElement"),"mouseleave",x),(C,E)=>(R(),xe(zi,{name:p(r).b("fade"),persisted:""},{default:j(()=>[zt(J("div",{ref_key:"instance",ref:i,class:V([p(r).e("bar"),p(r).is(p(d).key)]),onMousedown:m},[J("div",{ref_key:"thumb",ref:o,class:V(p(r).e("thumb")),style:vt(p(f)),onMousedown:g},null,38)],34),[[Bn,C.always||s.value]])]),_:1},8,["name"]))}});var S5=Ye(jEe,[["__file","thumb.vue"]]);const QEe=Ze({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),zEe=ue({__name:"bar",props:QEe,setup(t,{expose:e}){const n=t,r=ht(v$),i=F(0),o=F(0),a=F(""),s=F(""),l=F(1),u=F(1);return e({handleScroll:f=>{if(f){const h=f.offsetHeight-zp,g=f.offsetWidth-zp;o.value=f.scrollTop*100/h*l.value,i.value=f.scrollLeft*100/g*u.value}},update:()=>{const f=r==null?void 0:r.wrapElement;if(!f)return;const h=f.offsetHeight-zp,g=f.offsetWidth-zp,m=h**2/f.scrollHeight,y=g**2/f.scrollWidth,b=Math.max(m,n.minSize),w=Math.max(y,n.minSize);l.value=m/(h-m)/(b/(h-b)),u.value=y/(g-y)/(w/(g-w)),s.value=b+zp<h?`${b}px`:"",a.value=w+zp<g?`${w}px`:""}}),(f,h)=>(R(),Y(dt,null,[B(S5,{move:i.value,ratio:u.value,size:a.value,always:f.always},null,8,["move","ratio","size","always"]),B(S5,{move:o.value,ratio:l.value,size:s.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}});var WEe=Ye(zEe,[["__file","bar.vue"]]);const HEe=Ze({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:we([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...wo(["ariaLabel","ariaOrientation"])}),UEe={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(Et)},XEe="ElScrollbar",ZEe=ue({name:XEe}),qEe=ue({...ZEe,props:HEe,emits:UEe,setup(t,{expose:e,emit:n}){const r=t,i=Qe("scrollbar");let o,a,s=0,l=0;const u=F(),c=F(),d=F(),f=F(),h=M(()=>{const S={};return r.height&&(S.height=pi(r.height)),r.maxHeight&&(S.maxHeight=pi(r.maxHeight)),[r.wrapStyle,S]}),g=M(()=>[r.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!r.native}]),m=M(()=>[i.e("view"),r.viewClass]),y=()=>{var S;c.value&&((S=f.value)==null||S.handleScroll(c.value),s=c.value.scrollTop,l=c.value.scrollLeft,n("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function b(S,C){Jt(S)?c.value.scrollTo(S):Et(S)&&Et(C)&&c.value.scrollTo(S,C)}const w=S=>{!Et(S)||(c.value.scrollTop=S)},O=S=>{!Et(S)||(c.value.scrollLeft=S)},x=()=>{var S;(S=f.value)==null||S.update()};return Fe(()=>r.noresize,S=>{S?(o==null||o(),a==null||a()):({stop:o}=Hr(d,x),a=sr("resize",x))},{immediate:!0}),Fe(()=>[r.maxHeight,r.height],()=>{r.native||xt(()=>{var S;x(),c.value&&((S=f.value)==null||S.handleScroll(c.value))})}),gn(v$,vn({scrollbarElement:u,wrapElement:c})),qM(()=>{c.value&&(c.value.scrollTop=s,c.value.scrollLeft=l)}),Ft(()=>{r.native||xt(()=>{x()})}),ac(()=>x()),e({wrapRef:c,update:x,scrollTo:b,setScrollTop:w,setScrollLeft:O,handleScroll:y}),(S,C)=>(R(),Y("div",{ref_key:"scrollbarRef",ref:u,class:V(p(i).b())},[J("div",{ref_key:"wrapRef",ref:c,class:V(p(g)),style:vt(p(h)),tabindex:S.tabindex,onScroll:y},[(R(),xe(on(S.tag),{id:S.id,ref_key:"resizeRef",ref:d,class:V(p(m)),style:vt(S.viewStyle),role:S.role,"aria-label":S.ariaLabel,"aria-orientation":S.ariaOrientation},{default:j(()=>[Ee(S.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),S.native?Se("v-if",!0):(R(),xe(WEe,{key:0,ref_key:"barRef",ref:f,always:S.always,"min-size":S.minSize},null,8,["always","min-size"]))],2))}});var YEe=Ye(qEe,[["__file","scrollbar.vue"]]);const gu=Vt(YEe),y$=Symbol("popper"),lW=Symbol("popperContent"),GEe=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],uW=Ze({role:{type:String,values:GEe,default:"tooltip"}}),KEe=ue({name:"ElPopper",inheritAttrs:!1}),JEe=ue({...KEe,props:uW,setup(t,{expose:e}){const n=t,r=F(),i=F(),o=F(),a=F(),s=M(()=>n.role),l={triggerRef:r,popperInstanceRef:i,contentRef:o,referenceRef:a,role:s};return e(l),gn(y$,l),(u,c)=>Ee(u.$slots,"default")}});var eTe=Ye(JEe,[["__file","popper.vue"]]);const cW=Ze({arrowOffset:{type:Number,default:5}}),tTe=ue({name:"ElPopperArrow",inheritAttrs:!1}),nTe=ue({...tTe,props:cW,setup(t,{expose:e}){const n=t,r=Qe("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:a}=ht(lW,void 0);return Fe(()=>n.arrowOffset,s=>{i.value=s}),pr(()=>{o.value=void 0}),e({arrowRef:o}),(s,l)=>(R(),Y("span",{ref_key:"arrowRef",ref:o,class:V(p(r).e("arrow")),style:vt(p(a)),"data-popper-arrow":""},null,6))}});var rTe=Ye(nTe,[["__file","arrow.vue"]]);const dW=Ze({virtualRef:{type:we(Object)},virtualTriggering:Boolean,onMouseenter:{type:we(Function)},onMouseleave:{type:we(Function)},onClick:{type:we(Function)},onKeydown:{type:we(Function)},onFocus:{type:we(Function)},onBlur:{type:we(Function)},onContextmenu:{type:we(Function)},id:String,open:Boolean}),fW=Symbol("elForwardRef"),iTe=t=>{gn(fW,{setForwardRef:n=>{t.value=n}})},oTe=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),aTe='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',sTe=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,C5=t=>Array.from(t.querySelectorAll(aTe)).filter(e=>Sk(e)&&sTe(e)),Sk=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return!(t.type==="hidden"||t.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},O1=function(t,e,...n){let r;e.includes("mouse")||e.includes("click")?r="MouseEvents":e.includes("key")?r="KeyboardEvent":r="HTMLEvents";const i=document.createEvent(r);return i.initEvent(e,...n),t.dispatchEvent(i),t},hW=t=>!t.getAttribute("aria-owns"),pW=(t,e,n)=>{const{parentNode:r}=t;if(!r)return null;const i=r.querySelectorAll(n),o=Array.prototype.indexOf.call(i,t);return i[o+e]||null},w1=t=>{!t||(t.focus(),!hW(t)&&t.click())},lTe="ElOnlyChild",gW=ue({name:lTe,setup(t,{slots:e,attrs:n}){var r;const i=ht(fW),o=oTe((r=i==null?void 0:i.setForwardRef)!=null?r:ir);return()=>{var a;const s=(a=e.default)==null?void 0:a.call(e,n);if(!s||s.length>1)return null;const l=mW(s);return l?zt(Zc(l,n),[[o]]):null}}});function mW(t){if(!t)return null;const e=t;for(const n of e){if(Jt(n))switch(n.type){case aa:continue;case $m:case"svg":return E5(n);case dt:return mW(n.children);default:return n}return E5(n)}return null}function E5(t){const e=Qe("only-child");return B("span",{class:e.e("content")},[t])}const uTe=ue({name:"ElPopperTrigger",inheritAttrs:!1}),cTe=ue({...uTe,props:dW,setup(t,{expose:e}){const n=t,{role:r,triggerRef:i}=ht(y$,void 0);iTe(i);const o=M(()=>s.value?n.id:void 0),a=M(()=>{if(r&&r.value==="tooltip")return n.open&&n.id?n.id:void 0}),s=M(()=>{if(r&&r.value!=="tooltip")return r.value}),l=M(()=>s.value?`${n.open}`:void 0);let u;const c=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Ft(()=>{Fe(()=>n.virtualRef,d=>{d&&(i.value=ba(d))},{immediate:!0}),Fe(i,(d,f)=>{u==null||u(),u=void 0,As(d)&&(c.forEach(h=>{var g;const m=n[h];m&&(d.addEventListener(h.slice(2).toLowerCase(),m),(g=f==null?void 0:f.removeEventListener)==null||g.call(f,h.slice(2).toLowerCase(),m))}),Sk(d)&&(u=Fe([o,a,s,l],h=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((g,m)=>{Lr(h[m])?d.removeAttribute(g):d.setAttribute(g,h[m])})},{immediate:!0}))),As(f)&&Sk(f)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(h=>f.removeAttribute(h))},{immediate:!0})}),pr(()=>{if(u==null||u(),u=void 0,i.value&&As(i.value)){const d=i.value;c.forEach(f=>{const h=n[f];h&&d.removeEventListener(f.slice(2).toLowerCase(),h)}),i.value=void 0}}),e({triggerRef:i}),(d,f)=>d.virtualTriggering?Se("v-if",!0):(R(),xe(p(gW),an({key:0},d.$attrs,{"aria-controls":p(o),"aria-describedby":p(a),"aria-expanded":p(l),"aria-haspopup":p(s)}),{default:j(()=>[Ee(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var dTe=Ye(cTe,[["__file","trigger.vue"]]);const OT="focus-trap.focus-after-trapped",wT="focus-trap.focus-after-released",fTe="focus-trap.focusout-prevented",T5={cancelable:!0,bubbles:!1},hTe={cancelable:!0,bubbles:!1},k5="focusAfterTrapped",P5="focusAfterReleased",b$=Symbol("elFocusTrap"),_$=F(),XS=F(0),O$=F(0);let nO=0;const vW=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},A5=(t,e)=>{for(const n of t)if(!pTe(n,e))return n},pTe=(t,e)=>{if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},gTe=t=>{const e=vW(t),n=A5(e,t),r=A5(e.reverse(),t);return[n,r]},mTe=t=>t instanceof HTMLInputElement&&"select"in t,Md=(t,e)=>{if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),O$.value=window.performance.now(),t!==n&&mTe(t)&&e&&t.select()}};function M5(t,e){const n=[...t],r=t.indexOf(e);return r!==-1&&n.splice(r,1),n}const vTe=()=>{let t=[];return{push:r=>{const i=t[0];i&&r!==i&&i.pause(),t=M5(t,r),t.unshift(r)},remove:r=>{var i,o;t=M5(t,r),(o=(i=t[0])==null?void 0:i.resume)==null||o.call(i)}}},yTe=(t,e=!1)=>{const n=document.activeElement;for(const r of t)if(Md(r,e),document.activeElement!==n)return},R5=vTe(),bTe=()=>XS.value>O$.value,rO=()=>{_$.value="pointer",XS.value=window.performance.now()},$5=()=>{_$.value="keyboard",XS.value=window.performance.now()},_Te=()=>(Ft(()=>{nO===0&&(document.addEventListener("mousedown",rO),document.addEventListener("touchstart",rO),document.addEventListener("keydown",$5)),nO++}),pr(()=>{nO--,nO<=0&&(document.removeEventListener("mousedown",rO),document.removeEventListener("touchstart",rO),document.removeEventListener("keydown",$5))}),{focusReason:_$,lastUserFocusTimestamp:XS,lastAutomatedFocusTimestamp:O$}),iO=t=>new CustomEvent(fTe,{...hTe,detail:t}),ut={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let ag=[];const N5=t=>{t.code===ut.esc&&ag.forEach(e=>e(t))},OTe=t=>{Ft(()=>{ag.length===0&&document.addEventListener("keydown",N5),wn&&ag.push(t)}),pr(()=>{ag=ag.filter(e=>e!==t),ag.length===0&&wn&&document.removeEventListener("keydown",N5)})},wTe=ue({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[k5,P5,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=F();let r,i;const{focusReason:o}=_Te();OTe(g=>{t.trapped&&!a.paused&&e("release-requested",g)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=g=>{if(!t.loop&&!t.trapped||a.paused)return;const{code:m,altKey:y,ctrlKey:b,metaKey:w,currentTarget:O,shiftKey:x}=g,{loop:S}=t,C=m===ut.tab&&!y&&!b&&!w,E=document.activeElement;if(C&&E){const T=O,[P,A]=gTe(T);if(P&&A){if(!x&&E===A){const $=iO({focusReason:o.value});e("focusout-prevented",$),$.defaultPrevented||(g.preventDefault(),S&&Md(P,!0))}else if(x&&[P,T].includes(E)){const $=iO({focusReason:o.value});e("focusout-prevented",$),$.defaultPrevented||(g.preventDefault(),S&&Md(A,!0))}}else if(E===T){const $=iO({focusReason:o.value});e("focusout-prevented",$),$.defaultPrevented||g.preventDefault()}}};gn(b$,{focusTrapRef:n,onKeydown:s}),Fe(()=>t.focusTrapEl,g=>{g&&(n.value=g)},{immediate:!0}),Fe([n],([g],[m])=>{g&&(g.addEventListener("keydown",s),g.addEventListener("focusin",c),g.addEventListener("focusout",d)),m&&(m.removeEventListener("keydown",s),m.removeEventListener("focusin",c),m.removeEventListener("focusout",d))});const l=g=>{e(k5,g)},u=g=>e(P5,g),c=g=>{const m=p(n);if(!m)return;const y=g.target,b=g.relatedTarget,w=y&&m.contains(y);t.trapped||b&&m.contains(b)||(r=b),w&&e("focusin",g),!a.paused&&t.trapped&&(w?i=y:Md(i,!0))},d=g=>{const m=p(n);if(!(a.paused||!m))if(t.trapped){const y=g.relatedTarget;!Lr(y)&&!m.contains(y)&&setTimeout(()=>{if(!a.paused&&t.trapped){const b=iO({focusReason:o.value});e("focusout-prevented",b),b.defaultPrevented||Md(i,!0)}},0)}else{const y=g.target;y&&m.contains(y)||e("focusout",g)}};async function f(){await xt();const g=p(n);if(g){R5.push(a);const m=g.contains(document.activeElement)?r:document.activeElement;if(r=m,!g.contains(m)){const b=new Event(OT,T5);g.addEventListener(OT,l),g.dispatchEvent(b),b.defaultPrevented||xt(()=>{let w=t.focusStartEl;Ot(w)||(Md(w),document.activeElement!==w&&(w="first")),w==="first"&&yTe(vW(g),!0),(document.activeElement===m||w==="container")&&Md(g)})}}}function h(){const g=p(n);if(g){g.removeEventListener(OT,l);const m=new CustomEvent(wT,{...T5,detail:{focusReason:o.value}});g.addEventListener(wT,u),g.dispatchEvent(m),!m.defaultPrevented&&(o.value=="keyboard"||!bTe()||g.contains(document.activeElement))&&Md(r!=null?r:document.body),g.removeEventListener(wT,u),R5.remove(a)}}return Ft(()=>{t.trapped&&f(),Fe(()=>t.trapped,g=>{g?f():h()})}),pr(()=>{t.trapped&&h(),n.value&&(n.value.removeEventListener("keydown",s),n.value.removeEventListener("focusin",c),n.value.removeEventListener("focusout",d),n.value=void 0)}),{onKeydown:s}}});function xTe(t,e,n,r,i,o){return Ee(t.$slots,"default",{handleKeydown:t.onKeydown})}var Um=Ye(wTe,[["render",xTe],["__file","focus-trap.vue"]]),qa="top",_l="bottom",Ol="right",Ya="left",w$="auto",Pb=[qa,_l,Ol,Ya],Yg="start",m0="end",STe="clippingParents",yW="viewport",Lv="popper",CTe="reference",D5=Pb.reduce(function(t,e){return t.concat([e+"-"+Yg,e+"-"+m0])},[]),gd=[].concat(Pb,[w$]).reduce(function(t,e){return t.concat([e,e+"-"+Yg,e+"-"+m0])},[]),ETe="beforeRead",TTe="read",kTe="afterRead",PTe="beforeMain",ATe="main",MTe="afterMain",RTe="beforeWrite",$Te="write",NTe="afterWrite",DTe=[ETe,TTe,kTe,PTe,ATe,MTe,RTe,$Te,NTe];function tc(t){return t?(t.nodeName||"").toLowerCase():null}function mu(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Gg(t){var e=mu(t).Element;return t instanceof e||t instanceof Element}function pl(t){var e=mu(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function x$(t){if(typeof ShadowRoot=="undefined")return!1;var e=mu(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function LTe(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!pl(o)||!tc(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function ITe(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!pl(i)||!tc(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var bW={name:"applyStyles",enabled:!0,phase:"write",fn:LTe,effect:ITe,requires:["computeStyles"]};function Hu(t){return t.split("-")[0]}var zh=Math.max,bw=Math.min,Kg=Math.round;function Jg(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,i=1;if(pl(t)&&e){var o=t.offsetHeight,a=t.offsetWidth;a>0&&(r=Kg(n.width)/a||1),o>0&&(i=Kg(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function S$(t){var e=Jg(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function _W(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&x$(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Yc(t){return mu(t).getComputedStyle(t)}function BTe(t){return["table","td","th"].indexOf(tc(t))>=0}function Qf(t){return((Gg(t)?t.ownerDocument:t.document)||window.document).documentElement}function ZS(t){return tc(t)==="html"?t:t.assignedSlot||t.parentNode||(x$(t)?t.host:null)||Qf(t)}function L5(t){return!pl(t)||Yc(t).position==="fixed"?null:t.offsetParent}function FTe(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&pl(t)){var r=Yc(t);if(r.position==="fixed")return null}var i=ZS(t);for(x$(i)&&(i=i.host);pl(i)&&["html","body"].indexOf(tc(i))<0;){var o=Yc(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Ab(t){for(var e=mu(t),n=L5(t);n&&BTe(n)&&Yc(n).position==="static";)n=L5(n);return n&&(tc(n)==="html"||tc(n)==="body"&&Yc(n).position==="static")?e:n||FTe(t)||e}function C$(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Cy(t,e,n){return zh(t,bw(e,n))}function VTe(t,e,n){var r=Cy(t,e,n);return r>n?n:r}function OW(){return{top:0,right:0,bottom:0,left:0}}function wW(t){return Object.assign({},OW(),t)}function xW(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var jTe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,wW(typeof t!="number"?t:xW(t,Pb))};function QTe(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Hu(n.placement),l=C$(s),u=[Ya,Ol].indexOf(s)>=0,c=u?"height":"width";if(!(!o||!a)){var d=jTe(i.padding,n),f=S$(o),h=l==="y"?qa:Ya,g=l==="y"?_l:Ol,m=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],y=a[l]-n.rects.reference[l],b=Ab(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,O=m/2-y/2,x=d[h],S=w-f[c]-d[g],C=w/2-f[c]/2+O,E=Cy(x,C,S),T=l;n.modifiersData[r]=(e={},e[T]=E,e.centerOffset=E-C,e)}}function zTe(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!_W(e.elements.popper,i)||(e.elements.arrow=i))}var WTe={name:"arrow",enabled:!0,phase:"main",fn:QTe,effect:zTe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function em(t){return t.split("-")[1]}var HTe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UTe(t){var e=t.x,n=t.y,r=window,i=r.devicePixelRatio||1;return{x:Kg(e*i)/i||0,y:Kg(n*i)/i||0}}function I5(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,f=a.x,h=f===void 0?0:f,g=a.y,m=g===void 0?0:g,y=typeof c=="function"?c({x:h,y:m}):{x:h,y:m};h=y.x,m=y.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),O=Ya,x=qa,S=window;if(u){var C=Ab(n),E="clientHeight",T="clientWidth";if(C===mu(n)&&(C=Qf(n),Yc(C).position!=="static"&&s==="absolute"&&(E="scrollHeight",T="scrollWidth")),C=C,i===qa||(i===Ya||i===Ol)&&o===m0){x=_l;var P=d&&C===S&&S.visualViewport?S.visualViewport.height:C[E];m-=P-r.height,m*=l?1:-1}if(i===Ya||(i===qa||i===_l)&&o===m0){O=Ol;var A=d&&C===S&&S.visualViewport?S.visualViewport.width:C[T];h-=A-r.width,h*=l?1:-1}}var D=Object.assign({position:s},u&&HTe),$=c===!0?UTe({x:h,y:m}):{x:h,y:m};if(h=$.x,m=$.y,l){var N;return Object.assign({},D,(N={},N[x]=w?"0":"",N[O]=b?"0":"",N.transform=(S.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",N))}return Object.assign({},D,(e={},e[x]=w?m+"px":"",e[O]=b?h+"px":"",e.transform="",e))}function XTe(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Hu(e.placement),variation:em(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,I5(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,I5(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var SW={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:XTe,data:{}},oO={passive:!0};function ZTe(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=mu(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,oO)}),s&&l.addEventListener("resize",n.update,oO),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,oO)}),s&&l.removeEventListener("resize",n.update,oO)}}var CW={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ZTe,data:{}},qTe={left:"right",right:"left",bottom:"top",top:"bottom"};function x1(t){return t.replace(/left|right|bottom|top/g,function(e){return qTe[e]})}var YTe={start:"end",end:"start"};function B5(t){return t.replace(/start|end/g,function(e){return YTe[e]})}function E$(t){var e=mu(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function T$(t){return Jg(Qf(t)).left+E$(t).scrollLeft}function GTe(t){var e=mu(t),n=Qf(t),r=e.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+T$(t),y:s}}function KTe(t){var e,n=Qf(t),r=E$(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=zh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=zh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+T$(t),l=-r.scrollTop;return Yc(i||n).direction==="rtl"&&(s+=zh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function k$(t){var e=Yc(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function EW(t){return["html","body","#document"].indexOf(tc(t))>=0?t.ownerDocument.body:pl(t)&&k$(t)?t:EW(ZS(t))}function Ey(t,e){var n;e===void 0&&(e=[]);var r=EW(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=mu(r),a=i?[o].concat(o.visualViewport||[],k$(r)?r:[]):r,s=e.concat(a);return i?s:s.concat(Ey(ZS(a)))}function Ck(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function JTe(t){var e=Jg(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function F5(t,e){return e===yW?Ck(GTe(t)):Gg(e)?JTe(e):Ck(KTe(Qf(t)))}function e2e(t){var e=Ey(ZS(t)),n=["absolute","fixed"].indexOf(Yc(t).position)>=0,r=n&&pl(t)?Ab(t):t;return Gg(r)?e.filter(function(i){return Gg(i)&&_W(i,r)&&tc(i)!=="body"}):[]}function t2e(t,e,n){var r=e==="clippingParents"?e2e(t):[].concat(e),i=[].concat(r,[n]),o=i[0],a=i.reduce(function(s,l){var u=F5(t,l);return s.top=zh(u.top,s.top),s.right=bw(u.right,s.right),s.bottom=bw(u.bottom,s.bottom),s.left=zh(u.left,s.left),s},F5(t,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function TW(t){var e=t.reference,n=t.element,r=t.placement,i=r?Hu(r):null,o=r?em(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(i){case qa:l={x:a,y:e.y-n.height};break;case _l:l={x:a,y:e.y+e.height};break;case Ol:l={x:e.x+e.width,y:s};break;case Ya:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var u=i?C$(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Yg:l[u]=l[u]-(e[c]/2-n[c]/2);break;case m0:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function v0(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.boundary,a=o===void 0?STe:o,s=n.rootBoundary,l=s===void 0?yW:s,u=n.elementContext,c=u===void 0?Lv:u,d=n.altBoundary,f=d===void 0?!1:d,h=n.padding,g=h===void 0?0:h,m=wW(typeof g!="number"?g:xW(g,Pb)),y=c===Lv?CTe:Lv,b=t.rects.popper,w=t.elements[f?y:c],O=t2e(Gg(w)?w:w.contextElement||Qf(t.elements.popper),a,l),x=Jg(t.elements.reference),S=TW({reference:x,element:b,strategy:"absolute",placement:i}),C=Ck(Object.assign({},b,S)),E=c===Lv?C:x,T={top:O.top-E.top+m.top,bottom:E.bottom-O.bottom+m.bottom,left:O.left-E.left+m.left,right:E.right-O.right+m.right},P=t.modifiersData.offset;if(c===Lv&&P){var A=P[i];Object.keys(T).forEach(function(D){var $=[Ol,_l].indexOf(D)>=0?1:-1,N=[qa,_l].indexOf(D)>=0?"y":"x";T[D]+=A[N]*$})}return T}function n2e(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?gd:l,c=em(r),d=c?s?D5:D5.filter(function(g){return em(g)===c}):Pb,f=d.filter(function(g){return u.indexOf(g)>=0});f.length===0&&(f=d);var h=f.reduce(function(g,m){return g[m]=v0(t,{placement:m,boundary:i,rootBoundary:o,padding:a})[Hu(m)],g},{});return Object.keys(h).sort(function(g,m){return h[g]-h[m]})}function r2e(t){if(Hu(t)===w$)return[];var e=x1(t);return[B5(t),e,B5(e)]}function i2e(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,g=h===void 0?!0:h,m=n.allowedAutoPlacements,y=e.options.placement,b=Hu(y),w=b===y,O=l||(w||!g?[x1(y)]:r2e(y)),x=[y].concat(O).reduce(function(_e,Ce){return _e.concat(Hu(Ce)===w$?n2e(e,{placement:Ce,boundary:c,rootBoundary:d,padding:u,flipVariations:g,allowedAutoPlacements:m}):Ce)},[]),S=e.rects.reference,C=e.rects.popper,E=new Map,T=!0,P=x[0],A=0;A<x.length;A++){var D=x[A],$=Hu(D),N=em(D)===Yg,z=[qa,_l].indexOf($)>=0,I=z?"width":"height",L=v0(e,{placement:D,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),X=z?N?Ol:Ya:N?_l:qa;S[I]>C[I]&&(X=x1(X));var Q=x1(X),W=[];if(o&&W.push(L[$]<=0),s&&W.push(L[X]<=0,L[Q]<=0),W.every(function(_e){return _e})){P=D,T=!1;break}E.set(D,W)}if(T)for(var G=g?3:1,K=function(_e){var Ce=x.find(function(U){var ie=E.get(U);if(ie)return ie.slice(0,_e).every(function(ee){return ee})});if(Ce)return P=Ce,"break"},oe=G;oe>0;oe--){var ne=K(oe);if(ne==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}var o2e={name:"flip",enabled:!0,phase:"main",fn:i2e,requiresIfExists:["offset"],data:{_skip:!1}};function V5(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function j5(t){return[qa,Ol,_l,Ya].some(function(e){return t[e]>=0})}function a2e(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=v0(e,{elementContext:"reference"}),s=v0(e,{altBoundary:!0}),l=V5(a,r),u=V5(s,i,o),c=j5(l),d=j5(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}var s2e={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:a2e};function l2e(t,e,n){var r=Hu(t),i=[Ya,qa].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Ya,Ol].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function u2e(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,a=gd.reduce(function(c,d){return c[d]=l2e(d,e.rects,o),c},{}),s=a[e.placement],l=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=a}var c2e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:u2e};function d2e(t){var e=t.state,n=t.name;e.modifiersData[n]=TW({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var kW={name:"popperOffsets",enabled:!0,phase:"read",fn:d2e,data:{}};function f2e(t){return t==="x"?"y":"x"}function h2e(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,g=n.tetherOffset,m=g===void 0?0:g,y=v0(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=Hu(e.placement),w=em(e.placement),O=!w,x=C$(b),S=f2e(x),C=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,P=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,A=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,$={x:0,y:0};if(C){if(o){var N,z=x==="y"?qa:Ya,I=x==="y"?_l:Ol,L=x==="y"?"height":"width",X=C[x],Q=X+y[z],W=X-y[I],G=h?-T[L]/2:0,K=w===Yg?E[L]:T[L],oe=w===Yg?-T[L]:-E[L],ne=e.elements.arrow,_e=h&&ne?S$(ne):{width:0,height:0},Ce=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:OW(),U=Ce[z],ie=Ce[I],ee=Cy(0,E[L],_e[L]),he=O?E[L]/2-G-ee-U-A.mainAxis:K-ee-U-A.mainAxis,$e=O?-E[L]/2+G+ee+ie+A.mainAxis:oe+ee+ie+A.mainAxis,Me=e.elements.arrow&&Ab(e.elements.arrow),q=Me?x==="y"?Me.clientTop||0:Me.clientLeft||0:0,de=(N=D==null?void 0:D[x])!=null?N:0,ke=X+he-de-q,Ie=X+$e-de,se=Cy(h?bw(Q,ke):Q,X,h?zh(W,Ie):W);C[x]=se,$[x]=se-X}if(s){var ye,Ae=x==="x"?qa:Ya,Z=x==="x"?_l:Ol,te=C[S],le=S==="y"?"height":"width",Te=te+y[Ae],pe=te-y[Z],Oe=[qa,Ya].indexOf(b)!==-1,Re=(ye=D==null?void 0:D[S])!=null?ye:0,je=Oe?Te:te-E[le]-T[le]-Re+A.altAxis,Ke=Oe?te+E[le]+T[le]-Re-A.altAxis:pe,Je=h&&Oe?VTe(je,te,Ke):Cy(h?je:Te,te,h?Ke:pe);C[S]=Je,$[S]=Je-te}e.modifiersData[r]=$}}var p2e={name:"preventOverflow",enabled:!0,phase:"main",fn:h2e,requiresIfExists:["offset"]};function g2e(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function m2e(t){return t===mu(t)||!pl(t)?E$(t):g2e(t)}function v2e(t){var e=t.getBoundingClientRect(),n=Kg(e.width)/t.offsetWidth||1,r=Kg(e.height)/t.offsetHeight||1;return n!==1||r!==1}function y2e(t,e,n){n===void 0&&(n=!1);var r=pl(e),i=pl(e)&&v2e(e),o=Qf(e),a=Jg(t,i),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((tc(e)!=="body"||k$(o))&&(s=m2e(e)),pl(e)?(l=Jg(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=T$(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function b2e(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&i(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function _2e(t){var e=b2e(t);return DTe.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function O2e(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function w2e(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Q5={placement:"bottom",modifiers:[],strategy:"absolute"};function z5(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function P$(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?Q5:i;return function(a,s,l){l===void 0&&(l=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Q5,o),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},c=[],d=!1,f={state:u,setOptions:function(m){var y=typeof m=="function"?m(u.options):m;g(),u.options=Object.assign({},o,u.options,y),u.scrollParents={reference:Gg(a)?Ey(a):a.contextElement?Ey(a.contextElement):[],popper:Ey(s)};var b=_2e(w2e([].concat(r,u.options.modifiers)));return u.orderedModifiers=b.filter(function(w){return w.enabled}),h(),f.update()},forceUpdate:function(){if(!d){var m=u.elements,y=m.reference,b=m.popper;if(z5(y,b)){u.rects={reference:y2e(y,Ab(b),u.options.strategy==="fixed"),popper:S$(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(T){return u.modifiersData[T.name]=Object.assign({},T.data)});for(var w=0;w<u.orderedModifiers.length;w++){if(u.reset===!0){u.reset=!1,w=-1;continue}var O=u.orderedModifiers[w],x=O.fn,S=O.options,C=S===void 0?{}:S,E=O.name;typeof x=="function"&&(u=x({state:u,options:C,name:E,instance:f})||u)}}}},update:O2e(function(){return new Promise(function(m){f.forceUpdate(),m(u)})}),destroy:function(){g(),d=!0}};if(!z5(a,s))return f;f.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function h(){u.orderedModifiers.forEach(function(m){var y=m.name,b=m.options,w=b===void 0?{}:b,O=m.effect;if(typeof O=="function"){var x=O({state:u,name:y,instance:f,options:w}),S=function(){};c.push(x||S)}})}function g(){c.forEach(function(m){return m()}),c=[]}return f}}P$();var x2e=[CW,kW,SW,bW];P$({defaultModifiers:x2e});var S2e=[CW,kW,SW,bW,c2e,o2e,p2e,WTe,s2e],C2e=P$({defaultModifiers:S2e});const E2e=["fixed","absolute"],T2e=Ze({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:we(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:gd,default:"bottom"},popperOptions:{type:we(Object),default:()=>({})},strategy:{type:String,values:E2e,default:"absolute"}}),PW=Ze({...T2e,id:String,style:{type:we([String,Array,Object])},className:{type:we([String,Array,Object])},effect:{type:we(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:we([String,Array,Object])},popperStyle:{type:we([String,Array,Object])},referenceEl:{type:we(Object)},triggerTargetEl:{type:we(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...wo(["ariaLabel"])}),k2e={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},P2e=(t,e)=>{const n=F(!1),r=F();return{focusStartRef:r,trapped:n,onFocusAfterReleased:u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(r.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:u=>{t.visible&&!n.value&&(u.target&&(r.value=u.target),n.value=!0)},onFocusoutPrevented:u=>{t.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,e("close")}}},A2e=(t,e=[])=>{const{placement:n,strategy:r,popperOptions:i}=t,o={placement:n,strategy:r,...i,modifiers:[...R2e(t),...e]};return $2e(o,i==null?void 0:i.modifiers),o},M2e=t=>{if(!!wn)return ba(t)};function R2e(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:r}=t;return[{name:"offset",options:{offset:[0,e!=null?e:12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function $2e(t,e){e&&(t.modifiers=[...t.modifiers,...e!=null?e:[]])}const N2e=(t,e,n={})=>{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=D2e(l);Object.assign(a.value,u)},requires:["computeStyles"]},i=M(()=>{const{onFirstUpdate:l,placement:u,strategy:c,modifiers:d}=p(n);return{onFirstUpdate:l,placement:u||"bottom",strategy:c||"absolute",modifiers:[...d||[],r,{name:"applyStyles",enabled:!1}]}}),o=yr(),a=F({styles:{popper:{position:p(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=()=>{!o.value||(o.value.destroy(),o.value=void 0)};return Fe(i,l=>{const u=p(o);u&&u.setOptions(l)},{deep:!0}),Fe([t,e],([l,u])=>{s(),!(!l||!u)&&(o.value=C2e(l,u,p(i)))}),pr(()=>{s()}),{state:M(()=>{var l;return{...((l=p(o))==null?void 0:l.state)||{}}}),styles:M(()=>p(a).styles),attributes:M(()=>p(a).attributes),update:()=>{var l;return(l=p(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=p(o))==null?void 0:l.forceUpdate()},instanceRef:M(()=>p(o))}};function D2e(t){const e=Object.keys(t.elements),n=Ug(e.map(i=>[i,t.styles[i]||{}])),r=Ug(e.map(i=>[i,t.attributes[i]]));return{styles:n,attributes:r}}const L2e=0,I2e=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:r,role:i}=ht(y$,void 0),o=F(),a=F(),s=M(()=>({name:"eventListeners",enabled:!!t.visible})),l=M(()=>{var b;const w=p(o),O=(b=p(a))!=null?b:L2e;return{name:"arrow",enabled:!qc(w),options:{element:w,padding:O}}}),u=M(()=>({onFirstUpdate:()=>{g()},...A2e(t,[p(l),p(s)])})),c=M(()=>M2e(t.referenceEl)||p(r)),{attributes:d,state:f,styles:h,update:g,forceUpdate:m,instanceRef:y}=N2e(c,n,u);return Fe(y,b=>e.value=b),Ft(()=>{Fe(()=>{var b;return(b=p(c))==null?void 0:b.getBoundingClientRect()},()=>{g()})}),{attributes:d,arrowRef:o,contentRef:n,instanceRef:y,state:f,styles:h,role:i,forceUpdate:m,update:g}},B2e=(t,{attributes:e,styles:n,role:r})=>{const{nextZIndex:i}=zm(),o=Qe("popper"),a=M(()=>p(e).popper),s=F(Et(t.zIndex)?t.zIndex:i()),l=M(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),u=M(()=>[{zIndex:p(s)},p(n).popper,t.popperStyle||{}]),c=M(()=>r.value==="dialog"?"false":void 0),d=M(()=>p(n).arrow||{});return{ariaModal:c,arrowStyle:d,contentAttrs:a,contentClass:l,contentStyle:u,contentZIndex:s,updateZIndex:()=>{s.value=Et(t.zIndex)?t.zIndex:i()}}},F2e=ue({name:"ElPopperContent"}),V2e=ue({...F2e,props:PW,emits:k2e,setup(t,{expose:e,emit:n}){const r=t,{focusStartRef:i,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:l,onFocusoutPrevented:u,onReleaseRequested:c}=P2e(r,n),{attributes:d,arrowRef:f,contentRef:h,styles:g,instanceRef:m,role:y,update:b}=I2e(r),{ariaModal:w,arrowStyle:O,contentAttrs:x,contentClass:S,contentStyle:C,updateZIndex:E}=B2e(r,{styles:g,attributes:d,role:y}),T=ht(ec,void 0),P=F();gn(lW,{arrowStyle:O,arrowRef:f,arrowOffset:P}),T&&gn(ec,{...T,addInputId:ir,removeInputId:ir});let A;const D=(N=!0)=>{b(),N&&E()},$=()=>{D(!1),r.visible&&r.focusOnShow?o.value=!0:r.visible===!1&&(o.value=!1)};return Ft(()=>{Fe(()=>r.triggerTargetEl,(N,z)=>{A==null||A(),A=void 0;const I=p(N||h.value),L=p(z||h.value);As(I)&&(A=Fe([y,()=>r.ariaLabel,w,()=>r.id],X=>{["role","aria-label","aria-modal","id"].forEach((Q,W)=>{Lr(X[W])?I.removeAttribute(Q):I.setAttribute(Q,X[W])})},{immediate:!0})),L!==I&&As(L)&&["role","aria-label","aria-modal","id"].forEach(X=>{L.removeAttribute(X)})},{immediate:!0}),Fe(()=>r.visible,$,{immediate:!0})}),pr(()=>{A==null||A(),A=void 0}),e({popperContentRef:h,popperInstanceRef:m,updatePopper:D,contentStyle:C}),(N,z)=>(R(),Y("div",an({ref_key:"contentRef",ref:h},p(x),{style:p(C),class:p(S),tabindex:"-1",onMouseenter:I=>N.$emit("mouseenter",I),onMouseleave:I=>N.$emit("mouseleave",I)}),[B(p(Um),{trapped:p(o),"trap-on-focus-in":!0,"focus-trap-el":p(h),"focus-start-el":p(i),onFocusAfterTrapped:p(s),onFocusAfterReleased:p(a),onFocusin:p(l),onFocusoutPrevented:p(u),onReleaseRequested:p(c)},{default:j(()=>[Ee(N.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var j2e=Ye(V2e,[["__file","content.vue"]]);const AW=Vt(eTe),qS=Symbol("elTooltip");function W5(){let t;const e=(r,i)=>{n(),t=window.setTimeout(r,i)},n=()=>window.clearTimeout(t);return Cb(()=>n()),{registerTimeout:e,cancelTimeout:n}}const Q2e=Ze({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),z2e=({showAfter:t,hideAfter:e,autoClose:n,open:r,close:i})=>{const{registerTimeout:o}=W5(),{registerTimeout:a,cancelTimeout:s}=W5();return{onOpen:c=>{o(()=>{r(c);const d=p(n);Et(d)&&d>0&&a(()=>{i(c)},d)},p(t))},onClose:c=>{s(),o(()=>{i(c)},p(e))}}},io=Ze({...Q2e,...PW,appendTo:{type:we([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:we(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...wo(["ariaLabel"])}),y0=Ze({...dW,disabled:Boolean,trigger:{type:we([String,Array]),default:"hover"},triggerKeys:{type:we(Array),default:()=>[ut.enter,ut.numpadEnter,ut.space]}}),W2e=pu({type:we(Boolean),default:null}),H2e=pu({type:we(Function)}),U2e=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,r=[e],i={[t]:W2e,[n]:H2e};return{useModelToggle:({indicator:a,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:c,onHide:d})=>{const f=tn(),{emit:h}=f,g=f.props,m=M(()=>St(g[n])),y=M(()=>g[t]===null),b=E=>{a.value!==!0&&(a.value=!0,s&&(s.value=E),St(c)&&c(E))},w=E=>{a.value!==!1&&(a.value=!1,s&&(s.value=E),St(d)&&d(E))},O=E=>{if(g.disabled===!0||St(u)&&!u())return;const T=m.value&&wn;T&&h(e,!0),(y.value||!T)&&b(E)},x=E=>{if(g.disabled===!0||!wn)return;const T=m.value&&wn;T&&h(e,!1),(y.value||!T)&&w(E)},S=E=>{!wr(E)||(g.disabled&&E?m.value&&h(e,!1):a.value!==E&&(E?b():w()))},C=()=>{a.value?x():O()};return Fe(()=>g[t],S),l&&f.appContext.config.globalProperties.$route!==void 0&&Fe(()=>({...f.proxy.$route}),()=>{l.value&&a.value&&x()}),Ft(()=>{S(g[t])}),{hide:x,show:O,toggle:C,hasUpdateHandler:m}},useModelToggleProps:i,useModelToggleEmits:r}},{useModelToggleProps:X2e,useModelToggleEmits:Z2e,useModelToggle:q2e}=U2e("visible"),Y2e=Ze({...uW,...X2e,...io,...y0,...cW,showArrow:{type:Boolean,default:!0}}),G2e=[...Z2e,"before-show","before-hide","show","hide","open","close"],K2e=(t,e)=>Xe(t)?t.includes(e):t===e,Wp=(t,e,n)=>r=>{K2e(p(t),e)&&n(r)},fi=(t,e,{checkForDefaultPrevented:n=!0}={})=>i=>{const o=t==null?void 0:t(i);if(n===!1||!o)return e==null?void 0:e(i)},H5=t=>e=>e.pointerType==="mouse"?t(e):void 0,J2e=ue({name:"ElTooltipTrigger"}),eke=ue({...J2e,props:y0,setup(t,{expose:e}){const n=t,r=Qe("tooltip"),{controlled:i,id:o,open:a,onOpen:s,onClose:l,onToggle:u}=ht(qS,void 0),c=F(null),d=()=>{if(p(i)||n.disabled)return!0},f=Gn(n,"trigger"),h=fi(d,Wp(f,"hover",s)),g=fi(d,Wp(f,"hover",l)),m=fi(d,Wp(f,"click",x=>{x.button===0&&u(x)})),y=fi(d,Wp(f,"focus",s)),b=fi(d,Wp(f,"focus",l)),w=fi(d,Wp(f,"contextmenu",x=>{x.preventDefault(),u(x)})),O=fi(d,x=>{const{code:S}=x;n.triggerKeys.includes(S)&&(x.preventDefault(),u(x))});return e({triggerRef:c}),(x,S)=>(R(),xe(p(dTe),{id:p(o),"virtual-ref":x.virtualRef,open:p(a),"virtual-triggering":x.virtualTriggering,class:V(p(r).e("trigger")),onBlur:p(b),onClick:p(m),onContextmenu:p(w),onFocus:p(y),onMouseenter:p(h),onMouseleave:p(g),onKeydown:p(O)},{default:j(()=>[Ee(x.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var tke=Ye(eke,[["__file","trigger.vue"]]);const nke=Ze({to:{type:we([String,Object]),required:!0},disabled:Boolean}),rke=ue({__name:"teleport",props:nke,setup(t){return(e,n)=>e.disabled?Ee(e.$slots,"default",{key:0}):(R(),xe(Qle,{key:1,to:e.to},[Ee(e.$slots,"default")],8,["to"]))}});var ike=Ye(rke,[["__file","teleport.vue"]]);const Xm=Vt(ike),MW=()=>{const t=nR(),e=m$(),n=M(()=>`${t.value}-popper-container-${e.prefix}`),r=M(()=>`#${n.value}`);return{id:n,selector:r}},oke=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},ake=()=>{const{id:t,selector:e}=MW();return hS(()=>{!wn||document.body.querySelector(e.value)||oke(t.value)}),{id:t,selector:e}},ske=ue({name:"ElTooltipContent",inheritAttrs:!1}),lke=ue({...ske,props:io,setup(t,{expose:e}){const n=t,{selector:r}=MW(),i=Qe("tooltip"),o=F();let a;const{controlled:s,id:l,open:u,trigger:c,onClose:d,onOpen:f,onShow:h,onHide:g,onBeforeShow:m,onBeforeHide:y}=ht(qS,void 0),b=M(()=>n.transition||`${i.namespace.value}-fade-in-linear`),w=M(()=>n.persistent);pr(()=>{a==null||a()});const O=M(()=>p(w)?!0:p(u)),x=M(()=>n.disabled?!1:p(u)),S=M(()=>n.appendTo||r.value),C=M(()=>{var L;return(L=n.style)!=null?L:{}}),E=F(!0),T=()=>{g(),E.value=!0},P=()=>{if(p(s))return!0},A=fi(P,()=>{n.enterable&&p(c)==="hover"&&f()}),D=fi(P,()=>{p(c)==="hover"&&d()}),$=()=>{var L,X;(X=(L=o.value)==null?void 0:L.updatePopper)==null||X.call(L),m==null||m()},N=()=>{y==null||y()},z=()=>{h(),a=n$(M(()=>{var L;return(L=o.value)==null?void 0:L.popperContentRef}),()=>{if(p(s))return;p(c)!=="hover"&&d()})},I=()=>{n.virtualTriggering||d()};return Fe(()=>p(u),L=>{L?E.value=!1:a==null||a()},{flush:"post"}),Fe(()=>n.content,()=>{var L,X;(X=(L=o.value)==null?void 0:L.updatePopper)==null||X.call(L)}),e({contentRef:o}),(L,X)=>(R(),xe(p(Xm),{disabled:!L.teleported,to:p(S)},{default:j(()=>[B(zi,{name:p(b),onAfterLeave:T,onBeforeEnter:$,onAfterEnter:z,onBeforeLeave:N},{default:j(()=>[p(O)?zt((R(),xe(p(j2e),an({key:0,id:p(l),ref_key:"contentRef",ref:o},L.$attrs,{"aria-label":L.ariaLabel,"aria-hidden":E.value,"boundaries-padding":L.boundariesPadding,"fallback-placements":L.fallbackPlacements,"gpu-acceleration":L.gpuAcceleration,offset:L.offset,placement:L.placement,"popper-options":L.popperOptions,strategy:L.strategy,effect:L.effect,enterable:L.enterable,pure:L.pure,"popper-class":L.popperClass,"popper-style":[L.popperStyle,p(C)],"reference-el":L.referenceEl,"trigger-target-el":L.triggerTargetEl,visible:p(x),"z-index":L.zIndex,onMouseenter:p(A),onMouseleave:p(D),onBlur:I,onClose:p(d)}),{default:j(()=>[Ee(L.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[Bn,p(x)]]):Se("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var uke=Ye(lke,[["__file","content.vue"]]);const cke=ue({name:"ElTooltip"}),dke=ue({...cke,props:Y2e,emits:G2e,setup(t,{expose:e,emit:n}){const r=t;ake();const i=bo(),o=F(),a=F(),s=()=>{var b;const w=p(o);w&&((b=w.popperInstanceRef)==null||b.update())},l=F(!1),u=F(),{show:c,hide:d,hasUpdateHandler:f}=q2e({indicator:l,toggleReason:u}),{onOpen:h,onClose:g}=z2e({showAfter:Gn(r,"showAfter"),hideAfter:Gn(r,"hideAfter"),autoClose:Gn(r,"autoClose"),open:c,close:d}),m=M(()=>wr(r.visible)&&!f.value);gn(qS,{controlled:m,id:i,open:Rm(l),trigger:Gn(r,"trigger"),onOpen:b=>{h(b)},onClose:b=>{g(b)},onToggle:b=>{p(l)?g(b):h(b)},onShow:()=>{n("show",u.value)},onHide:()=>{n("hide",u.value)},onBeforeShow:()=>{n("before-show",u.value)},onBeforeHide:()=>{n("before-hide",u.value)},updatePopper:s}),Fe(()=>r.disabled,b=>{b&&l.value&&(l.value=!1)});const y=b=>{var w,O;const x=(O=(w=a.value)==null?void 0:w.contentRef)==null?void 0:O.popperContentRef,S=(b==null?void 0:b.relatedTarget)||document.activeElement;return x&&x.contains(S)};return MQ(()=>l.value&&d()),e({popperRef:o,contentRef:a,isFocusInsideContent:y,updatePopper:s,onOpen:h,onClose:g,hide:d}),(b,w)=>(R(),xe(p(AW),{ref_key:"popperRef",ref:o,role:b.role},{default:j(()=>[B(tke,{disabled:b.disabled,trigger:b.trigger,"trigger-keys":b.triggerKeys,"virtual-ref":b.virtualRef,"virtual-triggering":b.virtualTriggering},{default:j(()=>[b.$slots.default?Ee(b.$slots,"default",{key:0}):Se("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),B(uke,{ref_key:"contentRef",ref:a,"aria-label":b.ariaLabel,"boundaries-padding":b.boundariesPadding,content:b.content,disabled:b.disabled,effect:b.effect,enterable:b.enterable,"fallback-placements":b.fallbackPlacements,"hide-after":b.hideAfter,"gpu-acceleration":b.gpuAcceleration,offset:b.offset,persistent:b.persistent,"popper-class":b.popperClass,"popper-style":b.popperStyle,placement:b.placement,"popper-options":b.popperOptions,pure:b.pure,"raw-content":b.rawContent,"reference-el":b.referenceEl,"trigger-target-el":b.triggerTargetEl,"show-after":b.showAfter,strategy:b.strategy,teleported:b.teleported,transition:b.transition,"virtual-triggering":b.virtualTriggering,"z-index":b.zIndex,"append-to":b.appendTo},{default:j(()=>[Ee(b.$slots,"content",{},()=>[b.rawContent?(R(),Y("span",{key:0,innerHTML:b.content},null,8,["innerHTML"])):(R(),Y("span",{key:1},Ve(b.content),1))]),b.showArrow?(R(),xe(p(rTe),{key:0,"arrow-offset":b.arrowOffset},null,8,["arrow-offset"])):Se("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var fke=Ye(dke,[["__file","tooltip.vue"]]);const Hi=Vt(fke),hke=Ze({valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:we(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:we([Function,Array]),default:ir},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:{type:Boolean,default:!1},hideLoading:{type:Boolean,default:!1},teleported:io.teleported,highlightFirstItem:{type:Boolean,default:!1},fitInputWidth:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:String,...wo(["ariaLabel"])}),pke={[Ut]:t=>Ot(t),[Fo]:t=>Ot(t),[dr]:t=>Ot(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,select:t=>Jt(t)},RW="ElAutocomplete",gke=ue({name:RW,inheritAttrs:!1}),mke=ue({...gke,props:hke,emits:pke,setup(t,{expose:e,emit:n}){const r=t,i=Tb(),o=Nf(),a=Ho(),s=Qe("autocomplete"),l=F(),u=F(),c=F(),d=F();let f=!1,h=!1;const g=F([]),m=F(-1),y=F(""),b=F(!1),w=F(!1),O=F(!1),x=bo(),S=M(()=>o.style),C=M(()=>(g.value.length>0||O.value)&&b.value),E=M(()=>!r.hideLoading&&O.value),T=M(()=>l.value?Array.from(l.value.$el.querySelectorAll("input")):[]),P=()=>{C.value&&(y.value=`${l.value.$el.offsetWidth}px`)},A=()=>{m.value=-1},D=async ie=>{if(w.value)return;const ee=he=>{O.value=!1,!w.value&&(Xe(he)?(g.value=he,m.value=r.highlightFirstItem?0:-1):Wi(RW,"autocomplete suggestions must be an array"))};if(O.value=!0,Xe(r.fetchSuggestions))ee(r.fetchSuggestions);else{const he=await r.fetchSuggestions(ie,ee);Xe(he)&&ee(he)}},$=Qo(D,r.debounce),N=ie=>{const ee=!!ie;if(n(Fo,ie),n(Ut,ie),w.value=!1,b.value||(b.value=ee),!r.triggerOnFocus&&!ie){w.value=!0,g.value=[];return}$(ie)},z=ie=>{var ee;a.value||(((ee=ie.target)==null?void 0:ee.tagName)!=="INPUT"||T.value.includes(document.activeElement))&&(b.value=!0)},I=ie=>{n(dr,ie)},L=ie=>{h?h=!1:(b.value=!0,n("focus",ie),r.triggerOnFocus&&!f&&$(String(r.modelValue)))},X=ie=>{setTimeout(()=>{var ee;if((ee=c.value)!=null&&ee.isFocusInsideContent()){h=!0;return}b.value&&K(),n("blur",ie)})},Q=()=>{b.value=!1,n(Ut,""),n("clear")},W=async()=>{C.value&&m.value>=0&&m.value<g.value.length?_e(g.value[m.value]):r.selectWhenUnmatched&&(n("select",{value:r.modelValue}),g.value=[],m.value=-1)},G=ie=>{C.value&&(ie.preventDefault(),ie.stopPropagation(),K())},K=()=>{b.value=!1},oe=()=>{var ie;(ie=l.value)==null||ie.focus()},ne=()=>{var ie;(ie=l.value)==null||ie.blur()},_e=async ie=>{n(Fo,ie[r.valueKey]),n(Ut,ie[r.valueKey]),n("select",ie),g.value=[],m.value=-1},Ce=ie=>{if(!C.value||O.value)return;if(ie<0){m.value=-1;return}ie>=g.value.length&&(ie=g.value.length-1);const ee=u.value.querySelector(`.${s.be("suggestion","wrap")}`),$e=ee.querySelectorAll(`.${s.be("suggestion","list")} li`)[ie],Me=ee.scrollTop,{offsetTop:q,scrollHeight:de}=$e;q+de>Me+ee.clientHeight&&(ee.scrollTop+=de),q<Me&&(ee.scrollTop-=de),m.value=ie,l.value.ref.setAttribute("aria-activedescendant",`${x.value}-item-${m.value}`)},U=n$(d,()=>{C.value&&K()});return pr(()=>{U==null||U()}),Ft(()=>{l.value.ref.setAttribute("role","textbox"),l.value.ref.setAttribute("aria-autocomplete","list"),l.value.ref.setAttribute("aria-controls","id"),l.value.ref.setAttribute("aria-activedescendant",`${x.value}-item-${m.value}`),f=l.value.ref.hasAttribute("readonly")}),e({highlightedIndex:m,activated:b,loading:O,inputRef:l,popperRef:c,suggestions:g,handleSelect:_e,handleKeyEnter:W,focus:oe,blur:ne,close:K,highlight:Ce,getData:D}),(ie,ee)=>(R(),xe(p(Hi),{ref_key:"popperRef",ref:c,visible:p(C),placement:ie.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[p(s).e("popper"),ie.popperClass],teleported:ie.teleported,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${p(s).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:P,onHide:A},{content:j(()=>[J("div",{ref_key:"regionRef",ref:u,class:V([p(s).b("suggestion"),p(s).is("loading",p(E))]),style:vt({[ie.fitInputWidth?"width":"minWidth"]:y.value,outline:"none"}),role:"region"},[B(p(gu),{id:p(x),tag:"ul","wrap-class":p(s).be("suggestion","wrap"),"view-class":p(s).be("suggestion","list"),role:"listbox"},{default:j(()=>[p(E)?(R(),Y("li",{key:0},[Ee(ie.$slots,"loading",{},()=>[B(p(mt),{class:V(p(s).is("loading"))},{default:j(()=>[B(p(Ju))]),_:1},8,["class"])])])):(R(!0),Y(dt,{key:1},Ht(g.value,(he,$e)=>(R(),Y("li",{id:`${p(x)}-item-${$e}`,key:$e,class:V({highlighted:m.value===$e}),role:"option","aria-selected":m.value===$e,onClick:Me=>_e(he)},[Ee(ie.$slots,"default",{item:he},()=>[Ue(Ve(he[ie.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"])],6)]),default:j(()=>[J("div",{ref_key:"listboxRef",ref:d,class:V([p(s).b(),ie.$attrs.class]),style:vt(p(S)),role:"combobox","aria-haspopup":"listbox","aria-expanded":p(C),"aria-owns":p(x)},[B(p(hi),an({ref_key:"inputRef",ref:l},p(i),{clearable:ie.clearable,disabled:p(a),name:ie.name,"model-value":ie.modelValue,"aria-label":ie.ariaLabel,onInput:N,onChange:I,onFocus:L,onBlur:X,onClear:Q,onKeydown:[br(At(he=>Ce(m.value-1),["prevent"]),["up"]),br(At(he=>Ce(m.value+1),["prevent"]),["down"]),br(W,["enter"]),br(K,["tab"]),br(G,["esc"])],onMousedown:z}),es({_:2},[ie.$slots.prepend?{name:"prepend",fn:j(()=>[Ee(ie.$slots,"prepend")])}:void 0,ie.$slots.append?{name:"append",fn:j(()=>[Ee(ie.$slots,"append")])}:void 0,ie.$slots.prefix?{name:"prefix",fn:j(()=>[Ee(ie.$slots,"prefix")])}:void 0,ie.$slots.suffix?{name:"suffix",fn:j(()=>[Ee(ie.$slots,"suffix")])}:void 0]),1040,["clearable","disabled","name","model-value","aria-label","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","transition"]))}});var vke=Ye(mke,[["__file","autocomplete.vue"]]);const yke=Vt(vke),bke=Ze({size:{type:[Number,String],values:fc,default:"",validator:t=>Et(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:fr},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:we(String),default:"cover"}}),_ke={error:t=>t instanceof Event},Oke=ue({name:"ElAvatar"}),wke=ue({...Oke,props:bke,emits:_ke,setup(t,{emit:e}){const n=t,r=Qe("avatar"),i=F(!1),o=M(()=>{const{size:u,icon:c,shape:d}=n,f=[r.b()];return Ot(u)&&f.push(r.m(u)),c&&f.push(r.m("icon")),d&&f.push(r.m(d)),f}),a=M(()=>{const{size:u}=n;return Et(u)?r.cssVarBlock({size:pi(u)||""}):void 0}),s=M(()=>({objectFit:n.fit}));Fe(()=>n.src,()=>i.value=!1);function l(u){i.value=!0,e("error",u)}return(u,c)=>(R(),Y("span",{class:V(p(o)),style:vt(p(a))},[(u.src||u.srcSet)&&!i.value?(R(),Y("img",{key:0,src:u.src,alt:u.alt,srcset:u.srcSet,style:vt(p(s)),onError:l},null,44,["src","alt","srcset"])):u.icon?(R(),xe(p(mt),{key:1},{default:j(()=>[(R(),xe(on(u.icon)))]),_:1})):Ee(u.$slots,"default",{key:2})],6))}});var xke=Ye(wke,[["__file","avatar.vue"]]);const Ske=Vt(xke),Cke={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},Eke={click:t=>t instanceof MouseEvent},Tke=(t,e,n)=>{const r=yr(),i=yr(),o=F(!1),a=()=>{r.value&&(o.value=r.value.scrollTop>=t.visibilityHeight)},s=u=>{var c;(c=r.value)==null||c.scrollTo({top:0,behavior:"smooth"}),e("click",u)},l=Iz(a,300,!0);return sr(i,"scroll",l),Ft(()=>{var u;i.value=document,r.value=document.documentElement,t.target&&(r.value=(u=document.querySelector(t.target))!=null?u:void 0,r.value||Wi(n,`target does not exist: ${t.target}`),i.value=r.value),a()}),{visible:o,handleClick:s}},$W="ElBacktop",kke=ue({name:$W}),Pke=ue({...kke,props:Cke,emits:Eke,setup(t,{emit:e}){const n=t,r=Qe("backtop"),{handleClick:i,visible:o}=Tke(n,e,$W),a=M(()=>({right:`${n.right}px`,bottom:`${n.bottom}px`}));return(s,l)=>(R(),xe(zi,{name:`${p(r).namespace.value}-fade-in`},{default:j(()=>[p(o)?(R(),Y("div",{key:0,style:vt(p(a)),class:V(p(r).b()),onClick:At(p(i),["stop"])},[Ee(s.$slots,"default",{},()=>[B(p(mt),{class:V(p(r).e("icon"))},{default:j(()=>[B(p(vCe))]),_:1},8,["class"])])],14,["onClick"])):Se("v-if",!0)]),_:3},8,["name"]))}});var Ake=Ye(Pke,[["__file","backtop.vue"]]);const Mke=Vt(Ake),Rke=Ze({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:we([String,Object,Array])},offset:{type:we(Array),default:[0,0]},badgeClass:{type:String}}),$ke=ue({name:"ElBadge"}),Nke=ue({...$ke,props:Rke,setup(t,{expose:e}){const n=t,r=Qe("badge"),i=M(()=>n.isDot?"":Et(n.value)&&Et(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),o=M(()=>{var a,s,l,u,c;return[{backgroundColor:n.color,marginRight:pi(-((s=(a=n.offset)==null?void 0:a[0])!=null?s:0)),marginTop:pi((u=(l=n.offset)==null?void 0:l[1])!=null?u:0)},(c=n.badgeStyle)!=null?c:{}]});return e({content:i}),(a,s)=>(R(),Y("div",{class:V(p(r).b())},[Ee(a.$slots,"default"),B(zi,{name:`${p(r).namespace.value}-zoom-in-center`,persisted:""},{default:j(()=>[zt(J("sup",{class:V([p(r).e("content"),p(r).em("content",a.type),p(r).is("fixed",!!a.$slots.default),p(r).is("dot",a.isDot),p(r).is("hide-zero",!a.showZero&&n.value===0),a.badgeClass]),style:vt(p(o))},[Ee(a.$slots,"content",{value:p(i)},()=>[Ue(Ve(p(i)),1)])],6),[[Bn,!a.hidden&&(p(i)||a.isDot||a.$slots.content)]])]),_:3},8,["name"])],2))}});var Dke=Ye(Nke,[["__file","badge.vue"]]);const NW=Vt(Dke),DW=Symbol("breadcrumbKey"),Lke=Ze({separator:{type:String,default:"/"},separatorIcon:{type:fr}}),Ike=ue({name:"ElBreadcrumb"}),Bke=ue({...Ike,props:Lke,setup(t){const e=t,{t:n}=xn(),r=Qe("breadcrumb"),i=F();return gn(DW,e),Ft(()=>{const o=i.value.querySelectorAll(`.${r.e("item")}`);o.length&&o[o.length-1].setAttribute("aria-current","page")}),(o,a)=>(R(),Y("div",{ref_key:"breadcrumb",ref:i,class:V(p(r).b()),"aria-label":p(n)("el.breadcrumb.label"),role:"navigation"},[Ee(o.$slots,"default")],10,["aria-label"]))}});var Fke=Ye(Bke,[["__file","breadcrumb.vue"]]);const Vke=Ze({to:{type:we([String,Object]),default:""},replace:Boolean}),jke=ue({name:"ElBreadcrumbItem"}),Qke=ue({...jke,props:Vke,setup(t){const e=t,n=tn(),r=ht(DW,void 0),i=Qe("breadcrumb"),o=n.appContext.config.globalProperties.$router,a=F(),s=()=>{!e.to||!o||(e.replace?o.replace(e.to):o.push(e.to))};return(l,u)=>{var c,d;return R(),Y("span",{class:V(p(i).e("item"))},[J("span",{ref_key:"link",ref:a,class:V([p(i).e("inner"),p(i).is("link",!!l.to)]),role:"link",onClick:s},[Ee(l.$slots,"default")],2),(c=p(r))!=null&&c.separatorIcon?(R(),xe(p(mt),{key:0,class:V(p(i).e("separator"))},{default:j(()=>[(R(),xe(on(p(r).separatorIcon)))]),_:1},8,["class"])):(R(),Y("span",{key:1,class:V(p(i).e("separator")),role:"presentation"},Ve((d=p(r))==null?void 0:d.separator),3))],2)}}});var LW=Ye(Qke,[["__file","breadcrumb-item.vue"]]);const zke=Vt(Fke,{BreadcrumbItem:LW}),Wke=ni(LW),IW=Symbol("buttonGroupContextKey"),nf=({from:t,replacement:e,scope:n,version:r,ref:i,type:o="API"},a)=>{Fe(()=>p(a),s=>{},{immediate:!0})},Hke=(t,e)=>{nf({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},M(()=>t.type==="text"));const n=ht(IW,void 0),r=jS("button"),{form:i}=Wo(),o=ki(M(()=>n==null?void 0:n.size)),a=Ho(),s=F(),l=Ni(),u=M(()=>t.type||(n==null?void 0:n.type)||""),c=M(()=>{var g,m,y;return(y=(m=t.autoInsertSpace)!=null?m:(g=r.value)==null?void 0:g.autoInsertSpace)!=null?y:!1}),d=M(()=>t.tag==="button"?{ariaDisabled:a.value||t.loading,disabled:a.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),f=M(()=>{var g;const m=(g=l.default)==null?void 0:g.call(l);if(c.value&&(m==null?void 0:m.length)===1){const y=m[0];if((y==null?void 0:y.type)===$m){const b=y.children;return/^\p{Unified_Ideograph}{2}$/u.test(b.trim())}}return!1});return{_disabled:a,_size:o,_type:u,_ref:s,_props:d,shouldAddSpace:f,handleClick:g=>{if(a.value||t.loading){g.stopPropagation();return}t.nativeType==="reset"&&(i==null||i.resetFields()),e("click",g)}}},Ek=["default","primary","success","warning","info","danger","text",""],Uke=["button","submit","reset"],Tk=Ze({size:$i,disabled:Boolean,type:{type:String,values:Ek,default:""},icon:{type:fr},nativeType:{type:String,values:Uke,default:"button"},loading:Boolean,loadingIcon:{type:fr,default:()=>Ju},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:we([String,Object]),default:"button"}}),Xke={click:t=>t instanceof MouseEvent};function Vo(t,e){Zke(t)&&(t="100%");var n=qke(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function aO(t){return Math.min(1,Math.max(0,t))}function Zke(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function qke(t){return typeof t=="string"&&t.indexOf("%")!==-1}function BW(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function sO(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Rh(t){return t.length===1?"0"+t:String(t)}function Yke(t,e,n){return{r:Vo(t,255)*255,g:Vo(e,255)*255,b:Vo(n,255)*255}}function U5(t,e,n){t=Vo(t,255),e=Vo(e,255),n=Vo(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s:a,l:s}}function xT(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Gke(t,e,n){var r,i,o;if(t=Vo(t,360),e=Vo(e,100),n=Vo(n,100),e===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+e):n+e-n*e,s=2*n-a;r=xT(s,a,t+1/3),i=xT(s,a,t),o=xT(s,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function X5(t,e,n){t=Vo(t,255),e=Vo(e,255),n=Vo(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case t:o=(e-n)/s+(e<n?6:0);break;case e:o=(n-t)/s+2;break;case n:o=(t-e)/s+4;break}o/=6}return{h:o,s:l,v:a}}function Kke(t,e,n){t=Vo(t,360)*6,e=Vo(e,100),n=Vo(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6,u=[n,a,o,o,s,n][l],c=[s,n,n,a,o,o][l],d=[o,o,s,n,n,a][l];return{r:u*255,g:c*255,b:d*255}}function Z5(t,e,n,r){var i=[Rh(Math.round(t).toString(16)),Rh(Math.round(e).toString(16)),Rh(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Jke(t,e,n,r,i){var o=[Rh(Math.round(t).toString(16)),Rh(Math.round(e).toString(16)),Rh(Math.round(n).toString(16)),Rh(ePe(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function ePe(t){return Math.round(parseFloat(t)*255).toString(16)}function q5(t){return Os(t)/255}function Os(t){return parseInt(t,16)}function tPe(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var kk={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function nPe(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=oPe(t)),typeof t=="object"&&(Ac(t.r)&&Ac(t.g)&&Ac(t.b)?(e=Yke(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Ac(t.h)&&Ac(t.s)&&Ac(t.v)?(r=sO(t.s),i=sO(t.v),e=Kke(t.h,r,i),a=!0,s="hsv"):Ac(t.h)&&Ac(t.s)&&Ac(t.l)&&(r=sO(t.s),o=sO(t.l),e=Gke(t.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=BW(n),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var rPe="[-\\+]?\\d+%?",iPe="[-\\+]?\\d*\\.\\d+%?",Wd="(?:".concat(iPe,")|(?:").concat(rPe,")"),ST="[\\s|\\(]+(".concat(Wd,")[,|\\s]+(").concat(Wd,")[,|\\s]+(").concat(Wd,")\\s*\\)?"),CT="[\\s|\\(]+(".concat(Wd,")[,|\\s]+(").concat(Wd,")[,|\\s]+(").concat(Wd,")[,|\\s]+(").concat(Wd,")\\s*\\)?"),jl={CSS_UNIT:new RegExp(Wd),rgb:new RegExp("rgb"+ST),rgba:new RegExp("rgba"+CT),hsl:new RegExp("hsl"+ST),hsla:new RegExp("hsla"+CT),hsv:new RegExp("hsv"+ST),hsva:new RegExp("hsva"+CT),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function oPe(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(kk[t])t=kk[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=jl.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=jl.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=jl.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=jl.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=jl.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=jl.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=jl.hex8.exec(t),n?{r:Os(n[1]),g:Os(n[2]),b:Os(n[3]),a:q5(n[4]),format:e?"name":"hex8"}:(n=jl.hex6.exec(t),n?{r:Os(n[1]),g:Os(n[2]),b:Os(n[3]),format:e?"name":"hex"}:(n=jl.hex4.exec(t),n?{r:Os(n[1]+n[1]),g:Os(n[2]+n[2]),b:Os(n[3]+n[3]),a:q5(n[4]+n[4]),format:e?"name":"hex8"}:(n=jl.hex3.exec(t),n?{r:Os(n[1]+n[1]),g:Os(n[2]+n[2]),b:Os(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function Ac(t){return Boolean(jl.CSS_UNIT.exec(String(t)))}var FW=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var r;if(e instanceof t)return e;typeof e=="number"&&(e=tPe(e)),this.originalInput=e;var i=nPe(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,r,i,o=e.r/255,a=e.g/255,s=e.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=BW(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=X5(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=X5(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=U5(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=U5(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),Z5(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),Jke(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(r,")"):"rgba(".concat(e,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Vo(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(Vo(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+Z5(this.r,this.g,this.b,!1),n=0,r=Object.entries(kk);n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(e===a)return o}return!1},t.prototype.toString=function(e){var n=Boolean(e);e=e!=null?e:this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=aO(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=aO(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=aO(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=aO(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var r=this.toRgb(),i=new t(e).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new t(a)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(new t(r));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push(new t({h:r,s:i,v:o})),o=(o+s)%1;return a},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),r=new t(e).toRgb(),i=n.a+r.a*(1-n.a);return new t({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),r=n.h,i=[this],o=360/e,a=1;a<e;a++)i.push(new t({h:(r+a*o)%360,s:n.s,l:n.l}));return i},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function Pd(t,e=20){return t.mix("#141414",e).toString()}function aPe(t){const e=Ho(),n=Qe("button");return M(()=>{let r={},i=t.color;if(i){const o=i.match(/var\((.*?)\)/);o&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const a=new FW(i),s=t.dark?a.tint(20).toString():Pd(a,20);if(t.plain)r=n.cssVarBlock({"bg-color":t.dark?Pd(a,90):a.tint(90).toString(),"text-color":i,"border-color":t.dark?Pd(a,50):a.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":s,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":s}),e.value&&(r[n.cssVarBlockName("disabled-bg-color")]=t.dark?Pd(a,90):a.tint(90).toString(),r[n.cssVarBlockName("disabled-text-color")]=t.dark?Pd(a,50):a.tint(50).toString(),r[n.cssVarBlockName("disabled-border-color")]=t.dark?Pd(a,80):a.tint(80).toString());else{const l=t.dark?Pd(a,30):a.tint(30).toString(),u=a.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(r=n.cssVarBlock({"bg-color":i,"text-color":u,"border-color":i,"hover-bg-color":l,"hover-text-color":u,"hover-border-color":l,"active-bg-color":s,"active-border-color":s}),e.value){const c=t.dark?Pd(a,50):a.tint(50).toString();r[n.cssVarBlockName("disabled-bg-color")]=c,r[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,r[n.cssVarBlockName("disabled-border-color")]=c}}}return r})}const sPe=ue({name:"ElButton"}),lPe=ue({...sPe,props:Tk,emits:Xke,setup(t,{expose:e,emit:n}){const r=t,i=aPe(r),o=Qe("button"),{_ref:a,_size:s,_type:l,_disabled:u,_props:c,shouldAddSpace:d,handleClick:f}=Hke(r,n),h=M(()=>[o.b(),o.m(l.value),o.m(s.value),o.is("disabled",u.value),o.is("loading",r.loading),o.is("plain",r.plain),o.is("round",r.round),o.is("circle",r.circle),o.is("text",r.text),o.is("link",r.link),o.is("has-bg",r.bg)]);return e({ref:a,size:s,type:l,disabled:u,shouldAddSpace:d}),(g,m)=>(R(),xe(on(g.tag),an({ref_key:"_ref",ref:a},p(c),{class:p(h),style:p(i),onClick:p(f)}),{default:j(()=>[g.loading?(R(),Y(dt,{key:0},[g.$slots.loading?Ee(g.$slots,"loading",{key:0}):(R(),xe(p(mt),{key:1,class:V(p(o).is("loading"))},{default:j(()=>[(R(),xe(on(g.loadingIcon)))]),_:1},8,["class"]))],64)):g.icon||g.$slots.icon?(R(),xe(p(mt),{key:1},{default:j(()=>[g.icon?(R(),xe(on(g.icon),{key:0})):Ee(g.$slots,"icon",{key:1})]),_:3})):Se("v-if",!0),g.$slots.default?(R(),Y("span",{key:2,class:V({[p(o).em("text","expand")]:p(d)})},[Ee(g.$slots,"default")],2)):Se("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var uPe=Ye(lPe,[["__file","button.vue"]]);const cPe={size:Tk.size,type:Tk.type},dPe=ue({name:"ElButtonGroup"}),fPe=ue({...dPe,props:cPe,setup(t){const e=t;gn(IW,vn({size:Gn(e,"size"),type:Gn(e,"type")}));const n=Qe("button");return(r,i)=>(R(),Y("div",{class:V(p(n).b("group"))},[Ee(r.$slots,"default")],2))}});var VW=Ye(fPe,[["__file","button-group.vue"]]);const lr=Vt(uPe,{ButtonGroup:VW}),jW=ni(VW);var Ai=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},QW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ai,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",c="week",d="month",f="quarter",h="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var I=["th","st","nd","rd"],L=z%100;return"["+z+(I[(L-20)%10]||I[L]||I[0])+"]"}},O=function(z,I,L){var X=String(z);return!X||X.length>=I?z:""+Array(I+1-X.length).join(L)+z},x={s:O,z:function(z){var I=-z.utcOffset(),L=Math.abs(I),X=Math.floor(L/60),Q=L%60;return(I<=0?"+":"-")+O(X,2,"0")+":"+O(Q,2,"0")},m:function z(I,L){if(I.date()<L.date())return-z(L,I);var X=12*(L.year()-I.year())+(L.month()-I.month()),Q=I.clone().add(X,d),W=L-Q<0,G=I.clone().add(X+(W?-1:1),d);return+(-(X+(L-Q)/(W?Q-G:G-Q))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:d,y:h,w:c,d:u,D:g,h:l,m:s,s:a,ms:o,Q:f}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},S="en",C={};C[S]=w;var E="$isDayjsObject",T=function(z){return z instanceof $||!(!z||!z[E])},P=function z(I,L,X){var Q;if(!I)return S;if(typeof I=="string"){var W=I.toLowerCase();C[W]&&(Q=W),L&&(C[W]=L,Q=W);var G=I.split("-");if(!Q&&G.length>1)return z(G[0])}else{var K=I.name;C[K]=I,Q=K}return!X&&Q&&(S=Q),Q||!X&&S},A=function(z,I){if(T(z))return z.clone();var L=typeof I=="object"?I:{};return L.date=z,L.args=arguments,new $(L)},D=x;D.l=P,D.i=T,D.w=function(z,I){return A(z,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var $=function(){function z(L){this.$L=P(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[E]=!0}var I=z.prototype;return I.parse=function(L){this.$d=function(X){var Q=X.date,W=X.utc;if(Q===null)return new Date(NaN);if(D.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var G=Q.match(y);if(G){var K=G[2]-1||0,oe=(G[7]||"0").substring(0,3);return W?new Date(Date.UTC(G[1],K,G[3]||1,G[4]||0,G[5]||0,G[6]||0,oe)):new Date(G[1],K,G[3]||1,G[4]||0,G[5]||0,G[6]||0,oe)}}return new Date(Q)}(L),this.init()},I.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},I.$utils=function(){return D},I.isValid=function(){return this.$d.toString()!==m},I.isSame=function(L,X){var Q=A(L);return this.startOf(X)<=Q&&Q<=this.endOf(X)},I.isAfter=function(L,X){return A(L)<this.startOf(X)},I.isBefore=function(L,X){return this.endOf(X)<A(L)},I.$g=function(L,X,Q){return D.u(L)?this[X]:this.set(Q,L)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(L,X){var Q=this,W=!!D.u(X)||X,G=D.p(L),K=function(he,$e){var Me=D.w(Q.$u?Date.UTC(Q.$y,$e,he):new Date(Q.$y,$e,he),Q);return W?Me:Me.endOf(u)},oe=function(he,$e){return D.w(Q.toDate()[he].apply(Q.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice($e)),Q)},ne=this.$W,_e=this.$M,Ce=this.$D,U="set"+(this.$u?"UTC":"");switch(G){case h:return W?K(1,0):K(31,11);case d:return W?K(1,_e):K(0,_e+1);case c:var ie=this.$locale().weekStart||0,ee=(ne<ie?ne+7:ne)-ie;return K(W?Ce-ee:Ce+(6-ee),_e);case u:case g:return oe(U+"Hours",0);case l:return oe(U+"Minutes",1);case s:return oe(U+"Seconds",2);case a:return oe(U+"Milliseconds",3);default:return this.clone()}},I.endOf=function(L){return this.startOf(L,!1)},I.$set=function(L,X){var Q,W=D.p(L),G="set"+(this.$u?"UTC":""),K=(Q={},Q[u]=G+"Date",Q[g]=G+"Date",Q[d]=G+"Month",Q[h]=G+"FullYear",Q[l]=G+"Hours",Q[s]=G+"Minutes",Q[a]=G+"Seconds",Q[o]=G+"Milliseconds",Q)[W],oe=W===u?this.$D+(X-this.$W):X;if(W===d||W===h){var ne=this.clone().set(g,1);ne.$d[K](oe),ne.init(),this.$d=ne.set(g,Math.min(this.$D,ne.daysInMonth())).$d}else K&&this.$d[K](oe);return this.init(),this},I.set=function(L,X){return this.clone().$set(L,X)},I.get=function(L){return this[D.p(L)]()},I.add=function(L,X){var Q,W=this;L=Number(L);var G=D.p(X),K=function(_e){var Ce=A(W);return D.w(Ce.date(Ce.date()+Math.round(_e*L)),W)};if(G===d)return this.set(d,this.$M+L);if(G===h)return this.set(h,this.$y+L);if(G===u)return K(1);if(G===c)return K(7);var oe=(Q={},Q[s]=r,Q[l]=i,Q[a]=n,Q)[G]||1,ne=this.$d.getTime()+L*oe;return D.w(ne,this)},I.subtract=function(L,X){return this.add(-1*L,X)},I.format=function(L){var X=this,Q=this.$locale();if(!this.isValid())return Q.invalidDate||m;var W=L||"YYYY-MM-DDTHH:mm:ssZ",G=D.z(this),K=this.$H,oe=this.$m,ne=this.$M,_e=Q.weekdays,Ce=Q.months,U=Q.meridiem,ie=function($e,Me,q,de){return $e&&($e[Me]||$e(X,W))||q[Me].slice(0,de)},ee=function($e){return D.s(K%12||12,$e,"0")},he=U||function($e,Me,q){var de=$e<12?"AM":"PM";return q?de.toLowerCase():de};return W.replace(b,function($e,Me){return Me||function(q){switch(q){case"YY":return String(X.$y).slice(-2);case"YYYY":return D.s(X.$y,4,"0");case"M":return ne+1;case"MM":return D.s(ne+1,2,"0");case"MMM":return ie(Q.monthsShort,ne,Ce,3);case"MMMM":return ie(Ce,ne);case"D":return X.$D;case"DD":return D.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return ie(Q.weekdaysMin,X.$W,_e,2);case"ddd":return ie(Q.weekdaysShort,X.$W,_e,3);case"dddd":return _e[X.$W];case"H":return String(K);case"HH":return D.s(K,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return he(K,oe,!0);case"A":return he(K,oe,!1);case"m":return String(oe);case"mm":return D.s(oe,2,"0");case"s":return String(X.$s);case"ss":return D.s(X.$s,2,"0");case"SSS":return D.s(X.$ms,3,"0");case"Z":return G}return null}($e)||G.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(L,X,Q){var W,G=this,K=D.p(X),oe=A(L),ne=(oe.utcOffset()-this.utcOffset())*r,_e=this-oe,Ce=function(){return D.m(G,oe)};switch(K){case h:W=Ce()/12;break;case d:W=Ce();break;case f:W=Ce()/3;break;case c:W=(_e-ne)/6048e5;break;case u:W=(_e-ne)/864e5;break;case l:W=_e/i;break;case s:W=_e/r;break;case a:W=_e/n;break;default:W=_e}return Q?W:D.a(W)},I.daysInMonth=function(){return this.endOf(d).$D},I.$locale=function(){return C[this.$L]},I.locale=function(L,X){if(!L)return this.$L;var Q=this.clone(),W=P(L,X,!0);return W&&(Q.$L=W),Q},I.clone=function(){return D.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},z}(),N=$.prototype;return A.prototype=N,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",d],["$y",h],["$D",g]].forEach(function(z){N[z[1]]=function(I){return this.$g(I,z[0],z[1])}}),A.extend=function(z,I){return z.$i||(z(I,$,A),z.$i=!0),A},A.locale=P,A.isDayjs=T,A.unix=function(z){return A(1e3*z)},A.en=C[S],A.Ls=C,A.p={},A})})(QW);var It=QW.exports;const ET=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],rf=t=>Array.from(Array.from({length:t}).keys()),zW=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),WW=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),Y5=function(t,e){const n=uf(t),r=uf(e);return n&&r?t.getTime()===e.getTime():!n&&!r?t===e:!1},G5=function(t,e){const n=Xe(t),r=Xe(e);return n&&r?t.length!==e.length?!1:t.every((i,o)=>Y5(i,e[o])):!n&&!r?Y5(t,e):!1},K5=function(t,e,n){const r=Cs(e)||e==="x"?It(t).locale(n):It(t,e).locale(n);return r.isValid()?r:void 0},J5=function(t,e,n){return Cs(e)?t:e==="x"?+t:It(t).locale(n).format(e)},TT=(t,e)=>{var n;const r=[],i=e==null?void 0:e();for(let o=0;o<t;o++)r.push((n=i==null?void 0:i.includes(o))!=null?n:!1);return r},lO=t=>Xe(t)?t.map(e=>e.toDate()):t.toDate(),hPe=(t,e)=>{const n=t.subtract(1,"month").endOf("month").date();return rf(e).map((r,i)=>n-(e-i-1))},pPe=t=>{const e=t.daysInMonth();return rf(e).map((n,r)=>r+1)},gPe=t=>rf(t.length/7).map(e=>{const n=e*7;return t.slice(n,n+7)}),mPe=Ze({selectedDay:{type:we(Object)},range:{type:we(Array)},date:{type:we(Object),required:!0},hideHeader:{type:Boolean}}),vPe={pick:t=>Jt(t)};var HW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ai,function(){return function(n,r,i){var o=r.prototype,a=function(d){return d&&(d.indexOf?d:d.s)},s=function(d,f,h,g,m){var y=d.name?d:d.$locale(),b=a(y[f]),w=a(y[h]),O=b||w.map(function(S){return S.slice(0,g)});if(!m)return O;var x=y.weekStart;return O.map(function(S,C){return O[(C+(x||0))%7]})},l=function(){return i.Ls[i.locale()]},u=function(d,f){return d.formats[f]||function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,m,y){return m||y.slice(1)})}(d.formats[f.toUpperCase()])},c=function(){var d=this;return{months:function(f){return f?f.format("MMMM"):s(d,"months")},monthsShort:function(f){return f?f.format("MMM"):s(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):s(d,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):s(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):s(d,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return u(d.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return c.bind(this)()},i.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(f){return u(d,f)},meridiem:d.meridiem,ordinal:d.ordinal}},i.months=function(){return s(l(),"months")},i.monthsShort=function(){return s(l(),"monthsShort","months",3)},i.weekdays=function(d){return s(l(),"weekdays",null,null,d)},i.weekdaysShort=function(d){return s(l(),"weekdaysShort","weekdays",3,d)},i.weekdaysMin=function(d){return s(l(),"weekdaysMin","weekdays",2,d)}}})})(HW);var UW=HW.exports;const yPe=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],kT=["sun","mon","tue","wed","thu","fri","sat"],bPe=(t,e)=>{It.extend(UW);const n=It.localeData().firstDayOfWeek(),{t:r,lang:i}=xn(),o=It().locale(i.value),a=M(()=>!!t.range&&!!t.range.length),s=M(()=>{let f=[];if(a.value){const[h,g]=t.range,m=rf(g.date()-h.date()+1).map(w=>({text:h.date()+w,type:"current"}));let y=m.length%7;y=y===0?0:7-y;const b=rf(y).map((w,O)=>({text:O+1,type:"next"}));f=m.concat(b)}else{const h=t.date.startOf("month").day(),g=hPe(t.date,(h-n+7)%7).map(w=>({text:w,type:"prev"})),m=pPe(t.date).map(w=>({text:w,type:"current"}));f=[...g,...m];const y=7-(f.length%7||7),b=rf(y).map((w,O)=>({text:O+1,type:"next"}));f=f.concat(b)}return gPe(f)}),l=M(()=>{const f=n;return f===0?kT.map(h=>r(`el.datepicker.weeks.${h}`)):kT.slice(f).concat(kT.slice(0,f)).map(h=>r(`el.datepicker.weeks.${h}`))}),u=(f,h)=>{switch(h){case"prev":return t.date.startOf("month").subtract(1,"month").date(f);case"next":return t.date.startOf("month").add(1,"month").date(f);case"current":return t.date.date(f)}};return{now:o,isInRange:a,rows:s,weekDays:l,getFormattedDate:u,handlePickDay:({text:f,type:h})=>{const g=u(f,h);e("pick",g)},getSlotData:({text:f,type:h})=>{const g=u(f,h);return{isSelected:g.isSame(t.selectedDay),type:`${h}-month`,day:g.format("YYYY-MM-DD"),date:g.toDate()}}}},_Pe=ue({name:"DateTable"}),OPe=ue({..._Pe,props:mPe,emits:vPe,setup(t,{expose:e,emit:n}){const r=t,{isInRange:i,now:o,rows:a,weekDays:s,getFormattedDate:l,handlePickDay:u,getSlotData:c}=bPe(r,n),d=Qe("calendar-table"),f=Qe("calendar-day"),h=({text:g,type:m})=>{const y=[m];if(m==="current"){const b=l(g,m);b.isSame(r.selectedDay,"day")&&y.push(f.is("selected")),b.isSame(o,"day")&&y.push(f.is("today"))}return y};return e({getFormattedDate:l}),(g,m)=>(R(),Y("table",{class:V([p(d).b(),p(d).is("range",p(i))]),cellspacing:"0",cellpadding:"0"},[g.hideHeader?Se("v-if",!0):(R(),Y("thead",{key:0},[J("tr",null,[(R(!0),Y(dt,null,Ht(p(s),y=>(R(),Y("th",{key:y,scope:"col"},Ve(y),1))),128))])])),J("tbody",null,[(R(!0),Y(dt,null,Ht(p(a),(y,b)=>(R(),Y("tr",{key:b,class:V({[p(d).e("row")]:!0,[p(d).em("row","hide-border")]:b===0&&g.hideHeader})},[(R(!0),Y(dt,null,Ht(y,(w,O)=>(R(),Y("td",{key:O,class:V(h(w)),onClick:x=>p(u)(w)},[J("div",{class:V(p(f).b())},[Ee(g.$slots,"date-cell",{data:p(c)(w)},()=>[J("span",null,Ve(w.text),1)])],2)],10,["onClick"]))),128))],2))),128))])],2))}});var eB=Ye(OPe,[["__file","date-table.vue"]]);const wPe=(t,e)=>{const n=t.endOf("month"),r=e.startOf("month"),o=n.isSame(r,"week")?r.add(1,"week"):r;return[[t,n],[o.startOf("week"),e]]},xPe=(t,e)=>{const n=t.endOf("month"),r=t.add(1,"month").startOf("month"),i=n.isSame(r,"week")?r.add(1,"week"):r,o=i.endOf("month"),a=e.startOf("month"),s=o.isSame(a,"week")?a.add(1,"week"):a;return[[t,n],[i.startOf("week"),o],[s.startOf("week"),e]]},SPe=(t,e,n)=>{const{lang:r}=xn(),i=F(),o=It().locale(r.value),a=M({get(){return t.modelValue?l.value:i.value},set(y){if(!y)return;i.value=y;const b=y.toDate();e(Fo,b),e(Ut,b)}}),s=M(()=>{if(!t.range||!Xe(t.range)||t.range.length!==2||t.range.some(O=>!uf(O)))return[];const y=t.range.map(O=>It(O).locale(r.value)),[b,w]=y;return b.isAfter(w)?[]:b.isSame(w,"month")?h(b,w):b.add(1,"month").month()!==w.month()?[]:h(b,w)}),l=M(()=>t.modelValue?It(t.modelValue).locale(r.value):a.value||(s.value.length?s.value[0][0]:o)),u=M(()=>l.value.subtract(1,"month").date(1)),c=M(()=>l.value.add(1,"month").date(1)),d=M(()=>l.value.subtract(1,"year").date(1)),f=M(()=>l.value.add(1,"year").date(1)),h=(y,b)=>{const w=y.startOf("week"),O=b.endOf("week"),x=w.get("month"),S=O.get("month");return x===S?[[w,O]]:(x+1)%12===S?wPe(w,O):x+2===S||(x+1)%11===S?xPe(w,O):[]},g=y=>{a.value=y};return{calculateValidatedDateRange:h,date:l,realSelectedDay:a,pickDay:g,selectDate:y=>{const w={"prev-month":u.value,"next-month":c.value,"prev-year":d.value,"next-year":f.value,today:o}[y];w.isSame(l.value,"day")||g(w)},validatedRange:s}},CPe=t=>Xe(t)&&t.length===2&&t.every(e=>uf(e)),EPe=Ze({modelValue:{type:Date},range:{type:we(Array),validator:CPe}}),TPe={[Ut]:t=>uf(t),[Fo]:t=>uf(t)},kPe="ElCalendar",PPe=ue({name:kPe}),APe=ue({...PPe,props:EPe,emits:TPe,setup(t,{expose:e,emit:n}){const r=t,i=Qe("calendar"),{calculateValidatedDateRange:o,date:a,pickDay:s,realSelectedDay:l,selectDate:u,validatedRange:c}=SPe(r,n),{t:d}=xn(),f=M(()=>{const h=`el.datepicker.month${a.value.format("M")}`;return`${a.value.year()} ${d("el.datepicker.year")} ${d(h)}`});return e({selectedDay:l,pickDay:s,selectDate:u,calculateValidatedDateRange:o}),(h,g)=>(R(),Y("div",{class:V(p(i).b())},[J("div",{class:V(p(i).e("header"))},[Ee(h.$slots,"header",{date:p(f)},()=>[J("div",{class:V(p(i).e("title"))},Ve(p(f)),3),p(c).length===0?(R(),Y("div",{key:0,class:V(p(i).e("button-group"))},[B(p(jW),null,{default:j(()=>[B(p(lr),{size:"small",onClick:m=>p(u)("prev-month")},{default:j(()=>[Ue(Ve(p(d)("el.datepicker.prevMonth")),1)]),_:1},8,["onClick"]),B(p(lr),{size:"small",onClick:m=>p(u)("today")},{default:j(()=>[Ue(Ve(p(d)("el.datepicker.today")),1)]),_:1},8,["onClick"]),B(p(lr),{size:"small",onClick:m=>p(u)("next-month")},{default:j(()=>[Ue(Ve(p(d)("el.datepicker.nextMonth")),1)]),_:1},8,["onClick"])]),_:1})],2)):Se("v-if",!0)])],2),p(c).length===0?(R(),Y("div",{key:0,class:V(p(i).e("body"))},[B(eB,{date:p(a),"selected-day":p(l),onPick:p(s)},es({_:2},[h.$slots["date-cell"]?{name:"date-cell",fn:j(m=>[Ee(h.$slots,"date-cell",Yl(df(m)))])}:void 0]),1032,["date","selected-day","onPick"])],2)):(R(),Y("div",{key:1,class:V(p(i).e("body"))},[(R(!0),Y(dt,null,Ht(p(c),(m,y)=>(R(),xe(eB,{key:y,date:m[0],"selected-day":p(l),range:m,"hide-header":y!==0,onPick:p(s)},es({_:2},[h.$slots["date-cell"]?{name:"date-cell",fn:j(b=>[Ee(h.$slots,"date-cell",Yl(df(b)))])}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var MPe=Ye(APe,[["__file","calendar.vue"]]);const RPe=Vt(MPe),$Pe=Ze({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:we([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),NPe=ue({name:"ElCard"}),DPe=ue({...NPe,props:$Pe,setup(t){const e=Qe("card");return(n,r)=>(R(),Y("div",{class:V([p(e).b(),p(e).is(`${n.shadow}-shadow`)])},[n.$slots.header||n.header?(R(),Y("div",{key:0,class:V(p(e).e("header"))},[Ee(n.$slots,"header",{},()=>[Ue(Ve(n.header),1)])],2)):Se("v-if",!0),J("div",{class:V([p(e).e("body"),n.bodyClass]),style:vt(n.bodyStyle)},[Ee(n.$slots,"default")],6),n.$slots.footer||n.footer?(R(),Y("div",{key:1,class:V(p(e).e("footer"))},[Ee(n.$slots,"footer",{},()=>[Ue(Ve(n.footer),1)])],2)):Se("v-if",!0)],2))}});var LPe=Ye(DPe,[["__file","card.vue"]]);const IPe=Vt(LPe),BPe=Ze({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},cardScale:{type:Number,default:.83},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:Boolean}),FPe={change:(t,e)=>[t,e].every(Et)},XW=Symbol("carouselContextKey"),Pk="ElCarouselItem";var Js=(t=>(t[t.TEXT=1]="TEXT",t[t.CLASS=2]="CLASS",t[t.STYLE=4]="STYLE",t[t.PROPS=8]="PROPS",t[t.FULL_PROPS=16]="FULL_PROPS",t[t.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",t[t.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",t[t.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",t[t.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",t[t.NEED_PATCH=512]="NEED_PATCH",t[t.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",t[t.HOISTED=-1]="HOISTED",t[t.BAIL=-2]="BAIL",t))(Js||{});function Ak(t){return Jr(t)&&t.type===dt}function VPe(t){return Jr(t)&&t.type===aa}function jPe(t){return Jr(t)&&!Ak(t)&&!VPe(t)}const QPe=t=>{if(!Jr(t))return{};const e=t.props||{},n=(Jr(t.type)?t.type.props:void 0)||{},r={};return Object.keys(n).forEach(i=>{Mn(n[i],"default")&&(r[i]=n[i].default)}),Object.keys(e).forEach(i=>{r[$s(i)]=e[i]}),r},zPe=t=>{if(!Xe(t)||t.length>1)throw new Error("expect to receive a single Vue element child");return t[0]},of=t=>{const e=Xe(t)?t:[t],n=[];return e.forEach(r=>{var i;Xe(r)?n.push(...of(r)):Jr(r)&&((i=r.component)==null?void 0:i.subTree)?n.push(r,...of(r.component.subTree)):Jr(r)&&Xe(r.children)?n.push(...of(r.children)):n.push(r)}),n},WPe=(t,e,n)=>of(t.subTree).filter(o=>{var a;return Jr(o)&&((a=o.type)==null?void 0:a.name)===e&&!!o.component}).map(o=>o.component.uid).map(o=>n[o]).filter(o=>!!o),A$=(t,e)=>{const n={},r=yr([]);return{children:r,addChild:a=>{n[a.uid]=a,r.value=WPe(t,e,n)},removeChild:a=>{delete n[a],r.value=r.value.filter(s=>s.uid!==a)}}},tB=300,HPe=(t,e,n)=>{const{children:r,addChild:i,removeChild:o}=A$(tn(),Pk),a=Ni(),s=F(-1),l=F(null),u=F(!1),c=F(),d=F(0),f=F(!0),h=F(!0),g=F(!1),m=M(()=>t.arrow!=="never"&&!p(w)),y=M(()=>r.value.some(U=>U.props.label.toString().length>0)),b=M(()=>t.type==="card"),w=M(()=>t.direction==="vertical"),O=M(()=>t.height!=="auto"?{height:t.height}:{height:`${d.value}px`,overflow:"hidden"}),x=Wc(U=>{A(U)},tB,{trailing:!0}),S=Wc(U=>{W(U)},tB),C=U=>f.value?s.value<=1?U<=1:U>1:!0;function E(){l.value&&(clearInterval(l.value),l.value=null)}function T(){t.interval<=0||!t.autoplay||l.value||(l.value=setInterval(()=>P(),t.interval))}const P=()=>{h.value||(g.value=!0),h.value=!1,s.value<r.value.length-1?s.value=s.value+1:t.loop?s.value=0:g.value=!1};function A(U){if(h.value||(g.value=!0),h.value=!1,Ot(U)){const he=r.value.filter($e=>$e.props.name===U);he.length>0&&(U=r.value.indexOf(he[0]))}if(U=Number(U),Number.isNaN(U)||U!==Math.floor(U))return;const ie=r.value.length,ee=s.value;U<0?s.value=t.loop?ie-1:0:U>=ie?s.value=t.loop?0:ie-1:s.value=U,ee===s.value&&D(ee),oe()}function D(U){r.value.forEach((ie,ee)=>{ie.translateItem(ee,s.value,U)})}function $(U,ie){var ee,he,$e,Me;const q=p(r),de=q.length;if(de===0||!U.states.inStage)return!1;const ke=ie+1,Ie=ie-1,se=de-1,ye=q[se].states.active,Ae=q[0].states.active,Z=(he=(ee=q[ke])==null?void 0:ee.states)==null?void 0:he.active,te=(Me=($e=q[Ie])==null?void 0:$e.states)==null?void 0:Me.active;return ie===se&&Ae||Z?"left":ie===0&&ye||te?"right":!1}function N(){u.value=!0,t.pauseOnHover&&E()}function z(){u.value=!1,T()}function I(){g.value=!1}function L(U){p(w)||r.value.forEach((ie,ee)=>{U===$(ie,ee)&&(ie.states.hover=!0)})}function X(){p(w)||r.value.forEach(U=>{U.states.hover=!1})}function Q(U){U!==s.value&&(h.value||(g.value=!0)),s.value=U}function W(U){t.trigger==="hover"&&U!==s.value&&(s.value=U,h.value||(g.value=!0))}function G(){A(s.value-1)}function K(){A(s.value+1)}function oe(){E(),t.pauseOnHover||T()}function ne(U){t.height==="auto"&&(d.value=U)}function _e(){var U;const ie=(U=a.default)==null?void 0:U.call(a);if(!ie)return null;const he=of(ie).filter($e=>Jr($e)&&$e.type.name===Pk);return(he==null?void 0:he.length)===2&&t.loop&&!b.value?(f.value=!0,he):(f.value=!1,null)}Fe(()=>s.value,(U,ie)=>{D(ie),f.value&&(U=U%2,ie=ie%2),ie>-1&&e("change",U,ie)}),Fe(()=>t.autoplay,U=>{U?T():E()}),Fe(()=>t.loop,()=>{A(s.value)}),Fe(()=>t.interval,()=>{oe()});const Ce=yr();return Ft(()=>{Fe(()=>r.value,()=>{r.value.length>0&&A(t.initialIndex)},{immediate:!0}),Ce.value=Hr(c.value,()=>{D()}),T()}),pr(()=>{E(),c.value&&Ce.value&&Ce.value.stop()}),gn(XW,{root:c,isCardType:b,isVertical:w,items:r,loop:t.loop,cardScale:t.cardScale,addItem:i,removeItem:o,setActiveItem:A,setContainerHeight:ne}),{root:c,activeIndex:s,arrowDisplay:m,hasLabel:y,hover:u,isCardType:b,isTransitioning:g,items:r,isVertical:w,containerStyle:O,isItemsTwoLength:f,handleButtonEnter:L,handleTransitionEnd:I,handleButtonLeave:X,handleIndicatorClick:Q,handleMouseEnter:N,handleMouseLeave:z,setActiveItem:A,prev:G,next:K,PlaceholderItem:_e,isTwoLengthShow:C,throttledArrowClick:x,throttledIndicatorHover:S}},UPe="ElCarousel",XPe=ue({name:UPe}),ZPe=ue({...XPe,props:BPe,emits:FPe,setup(t,{expose:e,emit:n}){const r=t,{root:i,activeIndex:o,arrowDisplay:a,hasLabel:s,hover:l,isCardType:u,items:c,isVertical:d,containerStyle:f,handleButtonEnter:h,handleButtonLeave:g,isTransitioning:m,handleIndicatorClick:y,handleMouseEnter:b,handleMouseLeave:w,handleTransitionEnd:O,setActiveItem:x,prev:S,next:C,PlaceholderItem:E,isTwoLengthShow:T,throttledArrowClick:P,throttledIndicatorHover:A}=HPe(r,n),D=Qe("carousel"),{t:$}=xn(),N=M(()=>{const L=[D.b(),D.m(r.direction)];return p(u)&&L.push(D.m("card")),L}),z=M(()=>{const L=[D.e("container")];return r.motionBlur&&p(m)&&c.value.length>1&&L.push(p(d)?`${D.namespace.value}-transitioning-vertical`:`${D.namespace.value}-transitioning`),L}),I=M(()=>{const L=[D.e("indicators"),D.em("indicators",r.direction)];return p(s)&&L.push(D.em("indicators","labels")),r.indicatorPosition==="outside"&&L.push(D.em("indicators","outside")),p(d)&&L.push(D.em("indicators","right")),L});return e({activeIndex:o,setActiveItem:x,prev:S,next:C}),(L,X)=>(R(),Y("div",{ref_key:"root",ref:i,class:V(p(N)),onMouseenter:At(p(b),["stop"]),onMouseleave:At(p(w),["stop"])},[p(a)?(R(),xe(zi,{key:0,name:"carousel-arrow-left",persisted:""},{default:j(()=>[zt(J("button",{type:"button",class:V([p(D).e("arrow"),p(D).em("arrow","left")]),"aria-label":p($)("el.carousel.leftArrow"),onMouseenter:Q=>p(h)("left"),onMouseleave:p(g),onClick:At(Q=>p(P)(p(o)-1),["stop"])},[B(p(mt),null,{default:j(()=>[B(p(_f))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[Bn,(L.arrow==="always"||p(l))&&(r.loop||p(o)>0)]])]),_:1})):Se("v-if",!0),p(a)?(R(),xe(zi,{key:1,name:"carousel-arrow-right",persisted:""},{default:j(()=>[zt(J("button",{type:"button",class:V([p(D).e("arrow"),p(D).em("arrow","right")]),"aria-label":p($)("el.carousel.rightArrow"),onMouseenter:Q=>p(h)("right"),onMouseleave:p(g),onClick:At(Q=>p(P)(p(o)+1),["stop"])},[B(p(mt),null,{default:j(()=>[B(p(_a))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[Bn,(L.arrow==="always"||p(l))&&(r.loop||p(o)<p(c).length-1)]])]),_:1})):Se("v-if",!0),J("div",{class:V(p(z)),style:vt(p(f)),onTransitionend:p(O)},[B(p(E)),Ee(L.$slots,"default")],46,["onTransitionend"]),L.indicatorPosition!=="none"?(R(),Y("ul",{key:2,class:V(p(I))},[(R(!0),Y(dt,null,Ht(p(c),(Q,W)=>zt((R(),Y("li",{key:W,class:V([p(D).e("indicator"),p(D).em("indicator",L.direction),p(D).is("active",W===p(o))]),onMouseenter:G=>p(A)(W),onClick:At(G=>p(y)(W),["stop"])},[J("button",{class:V(p(D).e("button")),"aria-label":p($)("el.carousel.indicator",{index:W+1})},[p(s)?(R(),Y("span",{key:0},Ve(Q.props.label),1)):Se("v-if",!0)],10,["aria-label"])],42,["onMouseenter","onClick"])),[[Bn,p(T)(W)]])),128))],2)):Se("v-if",!0),r.motionBlur?(R(),Y("svg",{key:3,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},[J("defs",null,[J("filter",{id:"elCarouselHorizontal"},[J("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),J("filter",{id:"elCarouselVertical"},[J("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])])])):Se("v-if",!0)],42,["onMouseenter","onMouseleave"]))}});var qPe=Ye(ZPe,[["__file","carousel.vue"]]);const YPe=Ze({name:{type:String,default:""},label:{type:[String,Number],default:""}}),GPe=t=>{const e=ht(XW),n=tn(),r=F(),i=F(!1),o=F(0),a=F(1),s=F(!1),l=F(!1),u=F(!1),c=F(!1),{isCardType:d,isVertical:f,cardScale:h}=e;function g(O,x,S){const C=S-1,E=x-1,T=x+1,P=S/2;return x===0&&O===C?-1:x===C&&O===0?S:O<E&&x-O>=P?S+1:O>T&&O-x>=P?-2:O}function m(O,x){var S,C;const E=p(f)?((S=e.root.value)==null?void 0:S.offsetHeight)||0:((C=e.root.value)==null?void 0:C.offsetWidth)||0;return u.value?E*((2-h)*(O-x)+1)/4:O<x?-(1+h)*E/4:(3+h)*E/4}function y(O,x,S){const C=e.root.value;return C?((S?C.offsetHeight:C.offsetWidth)||0)*(O-x):0}const b=(O,x,S)=>{var C;const E=p(d),T=(C=e.items.value.length)!=null?C:Number.NaN,P=O===x;!E&&!ar(S)&&(c.value=P||O===S),!P&&T>2&&e.loop&&(O=g(O,x,T));const A=p(f);s.value=P,E?(u.value=Math.round(Math.abs(O-x))<=1,o.value=m(O,x),a.value=p(s)?1:h):o.value=y(O,x,A),l.value=!0,P&&r.value&&e.setContainerHeight(r.value.offsetHeight)};function w(){if(e&&p(d)){const O=e.items.value.findIndex(({uid:x})=>x===n.uid);e.setActiveItem(O)}}return Ft(()=>{e.addItem({props:t,states:vn({hover:i,translate:o,scale:a,active:s,ready:l,inStage:u,animating:c}),uid:n.uid,translateItem:b})}),od(()=>{e.removeItem(n.uid)}),{carouselItemRef:r,active:s,animating:c,hover:i,inStage:u,isVertical:f,translate:o,isCardType:d,scale:a,ready:l,handleItemClick:w}},KPe=ue({name:Pk}),JPe=ue({...KPe,props:YPe,setup(t){const e=t,n=Qe("carousel"),{carouselItemRef:r,active:i,animating:o,hover:a,inStage:s,isVertical:l,translate:u,isCardType:c,scale:d,ready:f,handleItemClick:h}=GPe(e),g=M(()=>[n.e("item"),n.is("active",i.value),n.is("in-stage",s.value),n.is("hover",a.value),n.is("animating",o.value),{[n.em("item","card")]:c.value,[n.em("item","card-vertical")]:c.value&&l.value}]),m=M(()=>{const b=`${`translate${p(l)?"Y":"X"}`}(${p(u)}px)`,w=`scale(${p(d)})`;return{transform:[b,w].join(" ")}});return(y,b)=>zt((R(),Y("div",{ref_key:"carouselItemRef",ref:r,class:V(p(g)),style:vt(p(m)),onClick:p(h)},[p(c)?zt((R(),Y("div",{key:0,class:V(p(n).e("mask"))},null,2)),[[Bn,!p(i)]]):Se("v-if",!0),Ee(y.$slots,"default")],14,["onClick"])),[[Bn,p(f)]])}});var ZW=Ye(JPe,[["__file","carousel-item.vue"]]);const eAe=Vt(qPe,{CarouselItem:ZW}),tAe=ni(ZW),qW={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:$i,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...wo(["ariaControls"])},YW={[Ut]:t=>Ot(t)||Et(t)||wr(t),change:t=>Ot(t)||Et(t)||wr(t)},Zm=Symbol("checkboxGroupContextKey"),nAe=({model:t,isChecked:e})=>{const n=ht(Zm,void 0),r=M(()=>{var o,a;const s=(o=n==null?void 0:n.max)==null?void 0:o.value,l=(a=n==null?void 0:n.min)==null?void 0:a.value;return!ar(s)&&t.value.length>=s&&!e.value||!ar(l)&&t.value.length<=l&&e.value});return{isDisabled:Ho(M(()=>(n==null?void 0:n.disabled.value)||r.value)),isLimitDisabled:r}},rAe=(t,{model:e,isLimitExceeded:n,hasOwnLabel:r,isDisabled:i,isLabeledByFormItem:o})=>{const a=ht(Zm,void 0),{formItem:s}=Wo(),{emit:l}=tn();function u(g){var m,y,b,w;return[!0,t.trueValue,t.trueLabel].includes(g)?(y=(m=t.trueValue)!=null?m:t.trueLabel)!=null?y:!0:(w=(b=t.falseValue)!=null?b:t.falseLabel)!=null?w:!1}function c(g,m){l("change",u(g),m)}function d(g){if(n.value)return;const m=g.target;l("change",u(m.checked),g)}async function f(g){n.value||!r.value&&!i.value&&o.value&&(g.composedPath().some(b=>b.tagName==="LABEL")||(e.value=u([!1,t.falseValue,t.falseLabel].includes(e.value)),await xt(),c(e.value,g)))}const h=M(()=>(a==null?void 0:a.validateEvent)||t.validateEvent);return Fe(()=>t.modelValue,()=>{h.value&&(s==null||s.validate("change").catch(g=>void 0))}),{handleChange:d,onClickRoot:f}},iAe=t=>{const e=F(!1),{emit:n}=tn(),r=ht(Zm,void 0),i=M(()=>ar(r)===!1),o=F(!1),a=M({get(){var s,l;return i.value?(s=r==null?void 0:r.modelValue)==null?void 0:s.value:(l=t.modelValue)!=null?l:e.value},set(s){var l,u;i.value&&Xe(s)?(o.value=((l=r==null?void 0:r.max)==null?void 0:l.value)!==void 0&&s.length>(r==null?void 0:r.max.value)&&s.length>a.value.length,o.value===!1&&((u=r==null?void 0:r.changeEvent)==null||u.call(r,s))):(n(Ut,s),e.value=s)}});return{model:a,isGroup:i,isLimitExceeded:o}},oAe=(t,e,{model:n})=>{const r=ht(Zm,void 0),i=F(!1),o=M(()=>np(t.value)?t.label:t.value),a=M(()=>{const c=n.value;return wr(c)?c:Xe(c)?Jt(o.value)?c.map(Dn).some(d=>Qi(d,o.value)):c.map(Dn).includes(o.value):c!=null?c===t.trueValue||c===t.trueLabel:!!c}),s=ki(M(()=>{var c;return(c=r==null?void 0:r.size)==null?void 0:c.value}),{prop:!0}),l=ki(M(()=>{var c;return(c=r==null?void 0:r.size)==null?void 0:c.value})),u=M(()=>!!e.default||!np(o.value));return{checkboxButtonSize:s,isChecked:a,isFocused:i,checkboxSize:l,hasOwnLabel:u,actualValue:o}},GW=(t,e)=>{const{formItem:n}=Wo(),{model:r,isGroup:i,isLimitExceeded:o}=iAe(t),{isFocused:a,isChecked:s,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,actualValue:d}=oAe(t,e,{model:r}),{isDisabled:f}=nAe({model:r,isChecked:s}),{inputId:h,isLabeledByFormItem:g}=Tl(t,{formItemContext:n,disableIdGeneration:c,disableIdManagement:i}),{handleChange:m,onClickRoot:y}=rAe(t,{model:r,isLimitExceeded:o,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:g});return(()=>{function w(){var O,x;Xe(r.value)&&!r.value.includes(d.value)?r.value.push(d.value):r.value=(x=(O=t.trueValue)!=null?O:t.trueLabel)!=null?x:!0}t.checked&&w()})(),nf({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},M(()=>i.value&&np(t.value))),nf({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},M(()=>!!t.trueLabel)),nf({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},M(()=>!!t.falseLabel)),{inputId:h,isLabeledByFormItem:g,isChecked:s,isDisabled:f,isFocused:a,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,model:r,actualValue:d,handleChange:m,onClickRoot:y}},aAe=ue({name:"ElCheckbox"}),sAe=ue({...aAe,props:qW,emits:YW,setup(t){const e=t,n=Ni(),{inputId:r,isLabeledByFormItem:i,isChecked:o,isDisabled:a,isFocused:s,checkboxSize:l,hasOwnLabel:u,model:c,actualValue:d,handleChange:f,onClickRoot:h}=GW(e,n),g=Qe("checkbox"),m=M(()=>[g.b(),g.m(l.value),g.is("disabled",a.value),g.is("bordered",e.border),g.is("checked",o.value)]),y=M(()=>[g.e("input"),g.is("disabled",a.value),g.is("checked",o.value),g.is("indeterminate",e.indeterminate),g.is("focus",s.value)]);return(b,w)=>(R(),xe(on(!p(u)&&p(i)?"span":"label"),{class:V(p(m)),"aria-controls":b.indeterminate?b.ariaControls:null,onClick:p(h)},{default:j(()=>{var O,x,S,C;return[J("span",{class:V(p(y))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?zt((R(),Y("input",{key:0,id:p(r),"onUpdate:modelValue":E=>Tr(c)?c.value=E:null,class:V(p(g).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:p(a),"true-value":(x=(O=b.trueValue)!=null?O:b.trueLabel)!=null?x:!0,"false-value":(C=(S=b.falseValue)!=null?S:b.falseLabel)!=null?C:!1,onChange:p(f),onFocus:E=>s.value=!0,onBlur:E=>s.value=!1,onClick:At(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[cw,p(c)]]):zt((R(),Y("input",{key:1,id:p(r),"onUpdate:modelValue":E=>Tr(c)?c.value=E:null,class:V(p(g).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:p(a),value:p(d),name:b.name,tabindex:b.tabindex,onChange:p(f),onFocus:E=>s.value=!0,onBlur:E=>s.value=!1,onClick:At(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[cw,p(c)]]),J("span",{class:V(p(g).e("inner"))},null,2)],2),p(u)?(R(),Y("span",{key:0,class:V(p(g).e("label"))},[Ee(b.$slots,"default"),b.$slots.default?Se("v-if",!0):(R(),Y(dt,{key:0},[Ue(Ve(b.label),1)],64))],2)):Se("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var lAe=Ye(sAe,[["__file","checkbox.vue"]]);const uAe=ue({name:"ElCheckboxButton"}),cAe=ue({...uAe,props:qW,emits:YW,setup(t){const e=t,n=Ni(),{isFocused:r,isChecked:i,isDisabled:o,checkboxButtonSize:a,model:s,actualValue:l,handleChange:u}=GW(e,n),c=ht(Zm,void 0),d=Qe("checkbox"),f=M(()=>{var g,m,y,b;const w=(m=(g=c==null?void 0:c.fill)==null?void 0:g.value)!=null?m:"";return{backgroundColor:w,borderColor:w,color:(b=(y=c==null?void 0:c.textColor)==null?void 0:y.value)!=null?b:"",boxShadow:w?`-1px 0 0 0 ${w}`:void 0}}),h=M(()=>[d.b("button"),d.bm("button",a.value),d.is("disabled",o.value),d.is("checked",i.value),d.is("focus",r.value)]);return(g,m)=>{var y,b,w,O;return R(),Y("label",{class:V(p(h))},[g.trueValue||g.falseValue||g.trueLabel||g.falseLabel?zt((R(),Y("input",{key:0,"onUpdate:modelValue":x=>Tr(s)?s.value=x:null,class:V(p(d).be("button","original")),type:"checkbox",name:g.name,tabindex:g.tabindex,disabled:p(o),"true-value":(b=(y=g.trueValue)!=null?y:g.trueLabel)!=null?b:!0,"false-value":(O=(w=g.falseValue)!=null?w:g.falseLabel)!=null?O:!1,onChange:p(u),onFocus:x=>r.value=!0,onBlur:x=>r.value=!1,onClick:At(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[cw,p(s)]]):zt((R(),Y("input",{key:1,"onUpdate:modelValue":x=>Tr(s)?s.value=x:null,class:V(p(d).be("button","original")),type:"checkbox",name:g.name,tabindex:g.tabindex,disabled:p(o),value:p(l),onChange:p(u),onFocus:x=>r.value=!0,onBlur:x=>r.value=!1,onClick:At(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[cw,p(s)]]),g.$slots.default||g.label?(R(),Y("span",{key:2,class:V(p(d).be("button","inner")),style:vt(p(i)?p(f):void 0)},[Ee(g.$slots,"default",{},()=>[Ue(Ve(g.label),1)])],6)):Se("v-if",!0)],2)}}});var KW=Ye(cAe,[["__file","checkbox-button.vue"]]);const dAe=Ze({modelValue:{type:we(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:$i,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),fAe={[Ut]:t=>Xe(t),change:t=>Xe(t)},hAe=ue({name:"ElCheckboxGroup"}),pAe=ue({...hAe,props:dAe,emits:fAe,setup(t,{emit:e}){const n=t,r=Qe("checkbox"),{formItem:i}=Wo(),{inputId:o,isLabeledByFormItem:a}=Tl(n,{formItemContext:i}),s=async u=>{e(Ut,u),await xt(),e("change",u)},l=M({get(){return n.modelValue},set(u){s(u)}});return gn(Zm,{...vo(Mi(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:s}),Fe(()=>n.modelValue,()=>{n.validateEvent&&(i==null||i.validate("change").catch(u=>void 0))}),(u,c)=>{var d;return R(),xe(on(u.tag),{id:p(o),class:V(p(r).b("group")),role:"group","aria-label":p(a)?void 0:u.ariaLabel||"checkbox-group","aria-labelledby":p(a)?(d=p(i))==null?void 0:d.labelId:void 0},{default:j(()=>[Ee(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var JW=Ye(pAe,[["__file","checkbox-group.vue"]]);const Bs=Vt(lAe,{CheckboxButton:KW,CheckboxGroup:JW}),gAe=ni(KW),eH=ni(JW),tH=Ze({modelValue:{type:[String,Number,Boolean],default:void 0},size:$i,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),mAe=Ze({...tH,border:Boolean}),nH={[Ut]:t=>Ot(t)||Et(t)||wr(t),[dr]:t=>Ot(t)||Et(t)||wr(t)},rH=Symbol("radioGroupKey"),iH=(t,e)=>{const n=F(),r=ht(rH,void 0),i=M(()=>!!r),o=M(()=>np(t.value)?t.label:t.value),a=M({get(){return i.value?r.modelValue:t.modelValue},set(d){i.value?r.changeEvent(d):e&&e(Ut,d),n.value.checked=t.modelValue===o.value}}),s=ki(M(()=>r==null?void 0:r.size)),l=Ho(M(()=>r==null?void 0:r.disabled)),u=F(!1),c=M(()=>l.value||i.value&&a.value!==o.value?-1:0);return nf({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},M(()=>i.value&&np(t.value))),{radioRef:n,isGroup:i,radioGroup:r,focus:u,size:s,disabled:l,tabIndex:c,modelValue:a,actualValue:o}},vAe=ue({name:"ElRadio"}),yAe=ue({...vAe,props:mAe,emits:nH,setup(t,{emit:e}){const n=t,r=Qe("radio"),{radioRef:i,radioGroup:o,focus:a,size:s,disabled:l,modelValue:u,actualValue:c}=iH(n,e);function d(){xt(()=>e("change",u.value))}return(f,h)=>{var g;return R(),Y("label",{class:V([p(r).b(),p(r).is("disabled",p(l)),p(r).is("focus",p(a)),p(r).is("bordered",f.border),p(r).is("checked",p(u)===p(c)),p(r).m(p(s))])},[J("span",{class:V([p(r).e("input"),p(r).is("disabled",p(l)),p(r).is("checked",p(u)===p(c))])},[zt(J("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":m=>Tr(u)?u.value=m:null,class:V(p(r).e("original")),value:p(c),name:f.name||((g=p(o))==null?void 0:g.name),disabled:p(l),checked:p(u)===p(c),type:"radio",onFocus:m=>a.value=!0,onBlur:m=>a.value=!1,onChange:d,onClick:At(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[i7,p(u)]]),J("span",{class:V(p(r).e("inner"))},null,2)],2),J("span",{class:V(p(r).e("label")),onKeydown:At(()=>{},["stop"])},[Ee(f.$slots,"default",{},()=>[Ue(Ve(f.label),1)])],42,["onKeydown"])],2)}}});var bAe=Ye(yAe,[["__file","radio.vue"]]);const _Ae=Ze({...tH}),OAe=ue({name:"ElRadioButton"}),wAe=ue({...OAe,props:_Ae,setup(t){const e=t,n=Qe("radio"),{radioRef:r,focus:i,size:o,disabled:a,modelValue:s,radioGroup:l,actualValue:u}=iH(e),c=M(()=>({backgroundColor:(l==null?void 0:l.fill)||"",borderColor:(l==null?void 0:l.fill)||"",boxShadow:l!=null&&l.fill?`-1px 0 0 0 ${l.fill}`:"",color:(l==null?void 0:l.textColor)||""}));return(d,f)=>{var h;return R(),Y("label",{class:V([p(n).b("button"),p(n).is("active",p(s)===p(u)),p(n).is("disabled",p(a)),p(n).is("focus",p(i)),p(n).bm("button",p(o))])},[zt(J("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":g=>Tr(s)?s.value=g:null,class:V(p(n).be("button","original-radio")),value:p(u),type:"radio",name:d.name||((h=p(l))==null?void 0:h.name),disabled:p(a),onFocus:g=>i.value=!0,onBlur:g=>i.value=!1,onClick:At(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[i7,p(s)]]),J("span",{class:V(p(n).be("button","inner")),style:vt(p(s)===p(u)?p(c):{}),onKeydown:At(()=>{},["stop"])},[Ee(d.$slots,"default",{},()=>[Ue(Ve(d.label),1)])],46,["onKeydown"])],2)}}});var oH=Ye(wAe,[["__file","radio-button.vue"]]);const xAe=Ze({id:{type:String,default:void 0},size:$i,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),SAe=nH,CAe=ue({name:"ElRadioGroup"}),EAe=ue({...CAe,props:xAe,emits:SAe,setup(t,{emit:e}){const n=t,r=Qe("radio"),i=bo(),o=F(),{formItem:a}=Wo(),{inputId:s,isLabeledByFormItem:l}=Tl(n,{formItemContext:a}),u=d=>{e(Ut,d),xt(()=>e("change",d))};Ft(()=>{const d=o.value.querySelectorAll("[type=radio]"),f=d[0];!Array.from(d).some(h=>h.checked)&&f&&(f.tabIndex=0)});const c=M(()=>n.name||i.value);return gn(rH,vn({...Mi(n),changeEvent:u,name:c})),Fe(()=>n.modelValue,()=>{n.validateEvent&&(a==null||a.validate("change").catch(d=>void 0))}),(d,f)=>(R(),Y("div",{id:p(s),ref_key:"radioGroupRef",ref:o,class:V(p(r).b("group")),role:"radiogroup","aria-label":p(l)?void 0:d.ariaLabel||"radio-group","aria-labelledby":p(l)?p(a).labelId:void 0},[Ee(d.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var aH=Ye(EAe,[["__file","radio-group.vue"]]);const sH=Vt(bAe,{RadioButton:oH,RadioGroup:aH}),TAe=ni(aH),kAe=ni(oH);var PAe=ue({name:"NodeContent",setup(){return{ns:Qe("cascader-node")}},render(){const{ns:t}=this,{node:e,panel:n}=this.$parent,{data:r,label:i}=e,{renderLabelFn:o}=n;return Tt("span",{class:t.e("label")},o?o({node:e,data:r}):i)}});const M$=Symbol(),AAe=ue({name:"ElCascaderNode",components:{ElCheckbox:Bs,ElRadio:sH,NodeContent:PAe,ElIcon:mt,Check:Eb,Loading:Ju,ArrowRight:_a},props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(t,{emit:e}){const n=ht(M$),r=Qe("cascader-node"),i=M(()=>n.isHoverMenu),o=M(()=>n.config.multiple),a=M(()=>n.config.checkStrictly),s=M(()=>{var C;return(C=n.checkedNodes[0])==null?void 0:C.uid}),l=M(()=>t.node.isDisabled),u=M(()=>t.node.isLeaf),c=M(()=>a.value&&!u.value||!l.value),d=M(()=>h(n.expandingNode)),f=M(()=>a.value&&n.checkedNodes.some(h)),h=C=>{var E;const{level:T,uid:P}=t.node;return((E=C==null?void 0:C.pathNodes[T-1])==null?void 0:E.uid)===P},g=()=>{d.value||n.expandNode(t.node)},m=C=>{const{node:E}=t;C!==E.checked&&n.handleCheckChange(E,C)},y=()=>{n.lazyLoad(t.node,()=>{u.value||g()})},b=C=>{!i.value||(w(),!u.value&&e("expand",C))},w=()=>{const{node:C}=t;!c.value||C.loading||(C.loaded?g():y())},O=()=>{i.value&&!u.value||(u.value&&!l.value&&!a.value&&!o.value?S(!0):w())},x=C=>{a.value?(m(C),t.node.loaded&&g()):S(C)},S=C=>{t.node.loaded?(m(C),!a.value&&g()):y()};return{panel:n,isHoverMenu:i,multiple:o,checkStrictly:a,checkedNodeId:s,isDisabled:l,isLeaf:u,expandable:c,inExpandingPath:d,inCheckedPath:f,ns:r,handleHoverExpand:b,handleExpand:w,handleClick:O,handleCheck:S,handleSelectCheck:x}}});function MAe(t,e,n,r,i,o){const a=rn("el-checkbox"),s=rn("el-radio"),l=rn("check"),u=rn("el-icon"),c=rn("node-content"),d=rn("loading"),f=rn("arrow-right");return R(),Y("li",{id:`${t.menuId}-${t.node.uid}`,role:"menuitem","aria-haspopup":!t.isLeaf,"aria-owns":t.isLeaf?null:t.menuId,"aria-expanded":t.inExpandingPath,tabindex:t.expandable?-1:void 0,class:V([t.ns.b(),t.ns.is("selectable",t.checkStrictly),t.ns.is("active",t.node.checked),t.ns.is("disabled",!t.expandable),t.inExpandingPath&&"in-active-path",t.inCheckedPath&&"in-checked-path"]),onMouseenter:t.handleHoverExpand,onFocus:t.handleHoverExpand,onClick:t.handleClick},[Se(" prefix "),t.multiple?(R(),xe(a,{key:0,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:t.isDisabled,onClick:At(()=>{},["stop"]),"onUpdate:modelValue":t.handleSelectCheck},null,8,["model-value","indeterminate","disabled","onClick","onUpdate:modelValue"])):t.checkStrictly?(R(),xe(s,{key:1,"model-value":t.checkedNodeId,label:t.node.uid,disabled:t.isDisabled,"onUpdate:modelValue":t.handleSelectCheck,onClick:At(()=>{},["stop"])},{default:j(()=>[Se(`
- Add an empty element to avoid render label,
- do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
- `),J("span")]),_:1},8,["model-value","label","disabled","onUpdate:modelValue","onClick"])):t.isLeaf&&t.node.checked?(R(),xe(u,{key:2,class:V(t.ns.e("prefix"))},{default:j(()=>[B(l)]),_:1},8,["class"])):Se("v-if",!0),Se(" content "),B(c),Se(" postfix "),t.isLeaf?Se("v-if",!0):(R(),Y(dt,{key:3},[t.node.loading?(R(),xe(u,{key:0,class:V([t.ns.is("loading"),t.ns.e("postfix")])},{default:j(()=>[B(d)]),_:1},8,["class"])):(R(),xe(u,{key:1,class:V(["arrow-right",t.ns.e("postfix")])},{default:j(()=>[B(f)]),_:1},8,["class"]))],64))],42,["id","aria-haspopup","aria-owns","aria-expanded","tabindex","onMouseenter","onFocus","onClick"])}var RAe=Ye(AAe,[["render",MAe],["__file","node.vue"]]);const $Ae=ue({name:"ElCascaderMenu",components:{Loading:Ju,ElIcon:mt,ElScrollbar:gu,ElCascaderNode:RAe},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(t){const e=tn(),n=Qe("cascader-menu"),{t:r}=xn(),i=bo();let o=null,a=null;const s=ht(M$),l=F(null),u=M(()=>!t.nodes.length),c=M(()=>!s.initialLoaded),d=M(()=>`${i.value}-${t.index}`),f=y=>{o=y.target},h=y=>{if(!(!s.isHoverMenu||!o||!l.value))if(o.contains(y.target)){g();const b=e.vnode.el,{left:w}=b.getBoundingClientRect(),{offsetWidth:O,offsetHeight:x}=b,S=y.clientX-w,C=o.offsetTop,E=C+o.offsetHeight;l.value.innerHTML=`
- <path style="pointer-events: auto;" fill="transparent" d="M${S} ${C} L${O} 0 V${C} Z" />
- <path style="pointer-events: auto;" fill="transparent" d="M${S} ${E} L${O} ${x} V${E} Z" />
- `}else a||(a=window.setTimeout(m,s.config.hoverThreshold))},g=()=>{!a||(clearTimeout(a),a=null)},m=()=>{!l.value||(l.value.innerHTML="",g())};return{ns:n,panel:s,hoverZone:l,isEmpty:u,isLoading:c,menuId:d,t:r,handleExpand:f,handleMouseMove:h,clearHoverZone:m}}});function NAe(t,e,n,r,i,o){const a=rn("el-cascader-node"),s=rn("loading"),l=rn("el-icon"),u=rn("el-scrollbar");return R(),xe(u,{key:t.menuId,tag:"ul",role:"menu",class:V(t.ns.b()),"wrap-class":t.ns.e("wrap"),"view-class":[t.ns.e("list"),t.ns.is("empty",t.isEmpty)],onMousemove:t.handleMouseMove,onMouseleave:t.clearHoverZone},{default:j(()=>{var c;return[(R(!0),Y(dt,null,Ht(t.nodes,d=>(R(),xe(a,{key:d.uid,node:d,"menu-id":t.menuId,onExpand:t.handleExpand},null,8,["node","menu-id","onExpand"]))),128)),t.isLoading?(R(),Y("div",{key:0,class:V(t.ns.e("empty-text"))},[B(l,{size:"14",class:V(t.ns.is("loading"))},{default:j(()=>[B(s)]),_:1},8,["class"]),Ue(" "+Ve(t.t("el.cascader.loading")),1)],2)):t.isEmpty?(R(),Y("div",{key:1,class:V(t.ns.e("empty-text"))},[Ee(t.$slots,"empty",{},()=>[Ue(Ve(t.t("el.cascader.noData")),1)])],2)):(c=t.panel)!=null&&c.isHoverMenu?(R(),Y("svg",{key:2,ref:"hoverZone",class:V(t.ns.e("hover-zone"))},null,2)):Se("v-if",!0)]}),_:3},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}var DAe=Ye($Ae,[["render",NAe],["__file","menu.vue"]]);const R$=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Du=t=>pb(t);let LAe=0;const IAe=t=>{const e=[t];let{parent:n}=t;for(;n;)e.unshift(n),n=n.parent;return e};class tm{constructor(e,n,r,i=!1){this.data=e,this.config=n,this.parent=r,this.root=i,this.uid=LAe++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:o,label:a,children:s}=n,l=e[s],u=IAe(this);this.level=i?0:r?r.level+1:1,this.value=e[o],this.label=e[a],this.pathNodes=u,this.pathValues=u.map(c=>c.value),this.pathLabels=u.map(c=>c.label),this.childrenData=l,this.children=(l||[]).map(c=>new tm(c,n,this)),this.loaded=!n.lazy||this.isLeaf||!Cs(l)}get isDisabled(){const{data:e,parent:n,config:r}=this,{disabled:i,checkStrictly:o}=r;return(St(i)?i(e,this):!!e[i])||!o&&(n==null?void 0:n.isDisabled)}get isLeaf(){const{data:e,config:n,childrenData:r,loaded:i}=this,{lazy:o,leaf:a}=n,s=St(a)?a(e,this):e[a];return ar(s)?o&&!i?!1:!(Xe(r)&&r.length):!!s}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(e){const{childrenData:n,children:r}=this,i=new tm(e,this.config,this);return Xe(n)?n.push(e):this.childrenData=[e],r.push(i),i}calcText(e,n){const r=e?this.pathLabels.join(n):this.label;return this.text=r,r}broadcast(e,...n){const r=`onParent${Du(e)}`;this.children.forEach(i=>{i&&(i.broadcast(e,...n),i[r]&&i[r](...n))})}emit(e,...n){const{parent:r}=this,i=`onChild${Du(e)}`;r&&(r[i]&&r[i](...n),r.emit(e,...n))}onParentCheck(e){this.isDisabled||this.setCheckState(e)}onChildCheck(){const{children:e}=this,n=e.filter(i=>!i.isDisabled),r=n.length?n.every(i=>i.checked):!1;this.setCheckState(r)}setCheckState(e){const n=this.children.length,r=this.children.reduce((i,o)=>{const a=o.checked?1:o.indeterminate?.5:0;return i+a},0);this.checked=this.loaded&&this.children.filter(i=>!i.isDisabled).every(i=>i.loaded&&i.checked)&&e,this.indeterminate=this.loaded&&r!==n&&r>0}doCheck(e){if(this.checked===e)return;const{checkStrictly:n,multiple:r}=this.config;n||!r?this.checked=e:(this.broadcast("check",e),this.setCheckState(e),this.emit("check"))}}const Mk=(t,e)=>t.reduce((n,r)=>(r.isLeaf?n.push(r):(!e&&n.push(r),n=n.concat(Mk(r.children,e))),n),[]);class nB{constructor(e,n){this.config=n;const r=(e||[]).map(i=>new tm(i,this.config));this.nodes=r,this.allNodes=Mk(r,!1),this.leafNodes=Mk(r,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,n){const r=n?n.appendChild(e):new tm(e,this.config);n||this.nodes.push(r),this.allNodes.push(r),r.isLeaf&&this.leafNodes.push(r)}appendNodes(e,n){e.forEach(r=>this.appendNode(r,n))}getNodeByValue(e,n=!1){return!e&&e!==0?null:this.getFlattedNodes(n).find(i=>Qi(i.value,e)||Qi(i.pathValues,e))||null}getSameNode(e){return e&&this.getFlattedNodes(!1).find(({value:r,level:i})=>Qi(e.value,r)&&e.level===i)||null}}const lH=Ze({modelValue:{type:we([Number,String,Array])},options:{type:we(Array),default:()=>[]},props:{type:we(Object),default:()=>({})}}),BAe={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:ir,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},FAe=t=>M(()=>({...BAe,...t.props})),rB=t=>{if(!t)return 0;const e=t.id.split("-");return Number(e[e.length-2])},VAe=t=>{if(!t)return;const e=t.querySelector("input");e?e.click():hW(t)&&t.click()},jAe=(t,e)=>{const n=e.slice(0),r=n.map(o=>o.uid),i=t.reduce((o,a)=>{const s=r.indexOf(a.uid);return s>-1&&(o.push(a),n.splice(s,1),r.splice(s,1)),o},[]);return i.push(...n),i},iB=t=>[...new Set(t)],ya=t=>!t&&t!==0?[]:Xe(t)?t:[t],QAe=ue({name:"ElCascaderPanel",components:{ElCascaderMenu:DAe},props:{...lH,border:{type:Boolean,default:!0},renderLabel:Function},emits:[Ut,dr,"close","expand-change"],setup(t,{emit:e,slots:n}){let r=!1;const i=Qe("cascader"),o=FAe(t);let a=null;const s=F(!0),l=F([]),u=F(null),c=F([]),d=F(null),f=F([]),h=M(()=>o.value.expandTrigger==="hover"),g=M(()=>t.renderLabel||n.default),m=()=>{const{options:$}=t,N=o.value;r=!1,a=new nB($,N),c.value=[a.getNodes()],N.lazy&&Cs(t.options)?(s.value=!1,y(void 0,z=>{z&&(a=new nB(z,N),c.value=[a.getNodes()]),s.value=!0,T(!1,!0)})):T(!1,!0)},y=($,N)=>{const z=o.value;$=$||new tm({},z,void 0,!0),$.loading=!0;const I=L=>{const X=$,Q=X.root?null:X;L&&(a==null||a.appendNodes(L,Q)),X.loading=!1,X.loaded=!0,X.childrenData=X.childrenData||[],N&&N(L)};z.lazyLoad($,I)},b=($,N)=>{var z;const{level:I}=$,L=c.value.slice(0,I);let X;$.isLeaf?X=$.pathNodes[I-2]:(X=$,L.push($.children)),((z=d.value)==null?void 0:z.uid)!==(X==null?void 0:X.uid)&&(d.value=$,c.value=L,!N&&e("expand-change",($==null?void 0:$.pathValues)||[]))},w=($,N,z=!0)=>{const{checkStrictly:I,multiple:L}=o.value,X=f.value[0];r=!0,!L&&(X==null||X.doCheck(!1)),$.doCheck(N),E(),z&&!L&&!I&&e("close"),!z&&!L&&!I&&O($)},O=$=>{!$||($=$.parent,O($),$&&b($))},x=$=>a==null?void 0:a.getFlattedNodes($),S=$=>{var N;return(N=x($))==null?void 0:N.filter(z=>z.checked!==!1)},C=()=>{f.value.forEach($=>$.doCheck(!1)),E(),c.value=c.value.slice(0,1),d.value=null,e("expand-change",[])},E=()=>{var $;const{checkStrictly:N,multiple:z}=o.value,I=f.value,L=S(!N),X=jAe(I,L),Q=X.map(W=>W.valueByOption);f.value=X,u.value=z?Q:($=Q[0])!=null?$:null},T=($=!1,N=!1)=>{const{modelValue:z}=t,{lazy:I,multiple:L,checkStrictly:X}=o.value,Q=!X;if(!(!s.value||r||!N&&Qi(z,u.value)))if(I&&!$){const G=iB(U9(ya(z))).map(K=>a==null?void 0:a.getNodeByValue(K)).filter(K=>!!K&&!K.loaded&&!K.loading);G.length?G.forEach(K=>{y(K,()=>T(!1,N))}):T(!0,N)}else{const W=L?ya(z):[z],G=iB(W.map(K=>a==null?void 0:a.getNodeByValue(K,Q)));P(G,N),u.value=Nn(z)}},P=($,N=!0)=>{const{checkStrictly:z}=o.value,I=f.value,L=$.filter(W=>!!W&&(z||W.isLeaf)),X=a==null?void 0:a.getSameNode(d.value),Q=N&&X||L[0];Q?Q.pathNodes.forEach(W=>b(W,!0)):d.value=null,I.forEach(W=>W.doCheck(!1)),vn(L).forEach(W=>W.doCheck(!0)),f.value=L,xt(A)},A=()=>{!wn||l.value.forEach($=>{const N=$==null?void 0:$.$el;if(N){const z=N.querySelector(`.${i.namespace.value}-scrollbar__wrap`),I=N.querySelector(`.${i.b("node")}.${i.is("active")}`)||N.querySelector(`.${i.b("node")}.in-active-path`);o$(z,I)}})},D=$=>{const N=$.target,{code:z}=$;switch(z){case ut.up:case ut.down:{$.preventDefault();const I=z===ut.up?-1:1;w1(pW(N,I,`.${i.b("node")}[tabindex="-1"]`));break}case ut.left:{$.preventDefault();const I=l.value[rB(N)-1],L=I==null?void 0:I.$el.querySelector(`.${i.b("node")}[aria-expanded="true"]`);w1(L);break}case ut.right:{$.preventDefault();const I=l.value[rB(N)+1],L=I==null?void 0:I.$el.querySelector(`.${i.b("node")}[tabindex="-1"]`);w1(L);break}case ut.enter:case ut.numpadEnter:VAe(N);break}};return gn(M$,vn({config:o,expandingNode:d,checkedNodes:f,isHoverMenu:h,initialLoaded:s,renderLabelFn:g,lazyLoad:y,expandNode:b,handleCheckChange:w})),Fe([o,()=>t.options],m,{deep:!0,immediate:!0}),Fe(()=>t.modelValue,()=>{r=!1,T()},{deep:!0}),Fe(()=>u.value,$=>{Qi($,t.modelValue)||(e(Ut,$),e(dr,$))}),$Q(()=>l.value=[]),Ft(()=>!Cs(t.modelValue)&&T()),{ns:i,menuList:l,menus:c,checkedNodes:f,handleKeyDown:D,handleCheckChange:w,getFlattedNodes:x,getCheckedNodes:S,clearCheckedNodes:C,calculateCheckedValue:E,scrollToExpandingNode:A}}});function zAe(t,e,n,r,i,o){const a=rn("el-cascader-menu");return R(),Y("div",{class:V([t.ns.b("panel"),t.ns.is("bordered",t.border)]),onKeydown:t.handleKeyDown},[(R(!0),Y(dt,null,Ht(t.menus,(s,l)=>(R(),xe(a,{key:l,ref_for:!0,ref:u=>t.menuList[l]=u,index:l,nodes:[...s]},{empty:j(()=>[Ee(t.$slots,"empty")]),_:2},1032,["index","nodes"]))),128))],42,["onKeydown"])}var WAe=Ye(QAe,[["render",zAe],["__file","index.vue"]]);const uH=Vt(WAe),Gc=Ze({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:fc},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),HAe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},UAe=ue({name:"ElTag"}),XAe=ue({...UAe,props:Gc,emits:HAe,setup(t,{emit:e}){const n=t,r=ki(),i=Qe("tag"),o=M(()=>{const{type:u,hit:c,effect:d,closable:f,round:h}=n;return[i.b(),i.is("closable",f),i.m(u||"primary"),i.m(r.value),i.m(d),i.is("hit",c),i.is("round",h)]}),a=u=>{e("close",u)},s=u=>{e("click",u)},l=u=>{var c,d,f;(f=(d=(c=u==null?void 0:u.component)==null?void 0:c.subTree)==null?void 0:d.component)!=null&&f.bum&&(u.component.subTree.component.bum=null)};return(u,c)=>u.disableTransitions?(R(),Y("span",{key:0,class:V(p(o)),style:vt({backgroundColor:u.color}),onClick:s},[J("span",{class:V(p(i).e("content"))},[Ee(u.$slots,"default")],2),u.closable?(R(),xe(p(mt),{key:0,class:V(p(i).e("close")),onClick:At(a,["stop"])},{default:j(()=>[B(p(Oa))]),_:1},8,["class","onClick"])):Se("v-if",!0)],6)):(R(),xe(zi,{key:1,name:`${p(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:j(()=>[J("span",{class:V(p(o)),style:vt({backgroundColor:u.color}),onClick:s},[J("span",{class:V(p(i).e("content"))},[Ee(u.$slots,"default")],2),u.closable?(R(),xe(p(mt),{key:0,class:V(p(i).e("close")),onClick:At(a,["stop"])},{default:j(()=>[B(p(Oa))]),_:1},8,["class","onClick"])):Se("v-if",!0)],6)]),_:3},8,["name"]))}});var ZAe=Ye(XAe,[["__file","tag.vue"]]);const ns=Vt(ZAe),qAe=Ze({...lH,size:$i,placeholder:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:we(Function),default:(t,e)=>t.text.includes(e)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:{type:Boolean,default:!1},debounce:{type:Number,default:300},beforeFilter:{type:we(Function),default:()=>!0},placement:{type:we(String),values:gd,default:"bottom-start"},fallbackPlacements:{type:we(Array),default:["bottom-start","bottom","top-start","top","right","left"]},popperClass:{type:String,default:""},teleported:io.teleported,tagType:{...Gc.type,default:"info"},tagEffect:{...Gc.effect,default:"light"},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...Wm}),YAe={[Ut]:t=>!0,[dr]:t=>!0,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,visibleChange:t=>wr(t),expandChange:t=>!!t,removeTag:t=>!!t},Rd=new Map;if(wn){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of Rd.values())for(const{documentHandler:r}of n)r(e,t);t=void 0}})}function oB(t,e){let n=[];return Xe(e.arg)?n=e.arg:As(e.arg)&&n.push(e.arg),function(r,i){const o=e.instance.popperRef,a=r.target,s=i==null?void 0:i.target,l=!e||!e.instance,u=!a||!s,c=t.contains(a)||t.contains(s),d=t===a,f=n.length&&n.some(g=>g==null?void 0:g.contains(a))||n.length&&n.includes(s),h=o&&(o.contains(a)||o.contains(s));l||u||c||d||f||h||e.value(r,i)}}const Kc={beforeMount(t,e){Rd.has(t)||Rd.set(t,[]),Rd.get(t).push({documentHandler:oB(t,e),bindingFn:e.value})},updated(t,e){Rd.has(t)||Rd.set(t,[]);const n=Rd.get(t),r=n.findIndex(o=>o.bindingFn===e.oldValue),i={documentHandler:oB(t,e),bindingFn:e.value};r>=0?n.splice(r,1,i):n.push(i)},unmounted(t){Rd.delete(t)}},GAe="ElCascader",KAe=ue({name:GAe}),JAe=ue({...KAe,props:qAe,emits:YAe,setup(t,{expose:e,emit:n}){const r=t,i={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:fe})=>{const{modifiersData:De,placement:ce}=fe;["right","left","bottom","top"].includes(ce)||(De.arrow.x=35)},requires:["arrow"]}]},o=Nf();let a=0,s=0;const l=Qe("cascader"),u=Qe("input"),{t:c}=xn(),{form:d,formItem:f}=Wo(),{valueOnClear:h}=VS(r),{isComposing:g,handleComposition:m}=kb({afterComposition(fe){var De;const ce=(De=fe.target)==null?void 0:De.value;Pe(ce)}}),y=F(null),b=F(null),w=F(null),O=F(null),x=F(null),S=F(!1),C=F(!1),E=F(!1),T=F(!1),P=F(""),A=F(""),D=F([]),$=F([]),N=F([]),z=M(()=>o.style),I=M(()=>r.disabled||(d==null?void 0:d.disabled)),L=M(()=>r.placeholder||c("el.cascader.placeholder")),X=M(()=>A.value||D.value.length>0||g.value?"":L.value),Q=ki(),W=M(()=>Q.value==="small"?"small":"default"),G=M(()=>!!r.props.multiple),K=M(()=>!r.filterable||G.value),oe=M(()=>G.value?A.value:P.value),ne=M(()=>{var fe;return((fe=O.value)==null?void 0:fe.checkedNodes)||[]}),_e=M(()=>!r.clearable||I.value||E.value||!C.value?!1:!!ne.value.length),Ce=M(()=>{const{showAllLevels:fe,separator:De}=r,ce=ne.value;return ce.length?G.value?"":ce[0].calcText(fe,De):""}),U=M(()=>(f==null?void 0:f.validateState)||""),ie=M({get(){return Nn(r.modelValue)},set(fe){const De=fe!=null?fe:h.value;n(Ut,De),n(dr,De),r.validateEvent&&(f==null||f.validate("change").catch(ce=>void 0))}}),ee=M(()=>[l.b(),l.m(Q.value),l.is("disabled",I.value),o.class]),he=M(()=>[u.e("icon"),"icon-arrow-down",l.is("reverse",S.value)]),$e=M(()=>l.is("focus",S.value||T.value)),Me=M(()=>{var fe,De;return(De=(fe=y.value)==null?void 0:fe.popperRef)==null?void 0:De.contentRef}),q=fe=>{var De,ce,qe;I.value||(fe=fe!=null?fe:!S.value,fe!==S.value&&(S.value=fe,(ce=(De=b.value)==null?void 0:De.input)==null||ce.setAttribute("aria-expanded",`${fe}`),fe?(de(),xt((qe=O.value)==null?void 0:qe.scrollToExpandingNode)):r.filterable&&Re(),n("visibleChange",fe)))},de=()=>{xt(()=>{var fe;(fe=y.value)==null||fe.updatePopper()})},ke=()=>{E.value=!1},Ie=fe=>{const{showAllLevels:De,separator:ce}=r;return{node:fe,key:fe.uid,text:fe.calcText(De,ce),hitState:!1,closable:!I.value&&!fe.isDisabled,isCollapseTag:!1}},se=fe=>{var De;const ce=fe.node;ce.doCheck(!1),(De=O.value)==null||De.calculateCheckedValue(),n("removeTag",ce.valueByOption)},ye=()=>{if(!G.value)return;const fe=ne.value,De=[],ce=[];if(fe.forEach(qe=>ce.push(Ie(qe))),$.value=ce,fe.length){fe.slice(0,r.maxCollapseTags).forEach(Zt=>De.push(Ie(Zt)));const qe=fe.slice(r.maxCollapseTags),Mt=qe.length;Mt&&(r.collapseTags?De.push({key:-1,text:`+ ${Mt}`,closable:!1,isCollapseTag:!0}):qe.forEach(Zt=>De.push(Ie(Zt))))}D.value=De},Ae=()=>{var fe,De;const{filterMethod:ce,showAllLevels:qe,separator:Mt}=r,Zt=(De=(fe=O.value)==null?void 0:fe.getFlattedNodes(!r.props.checkStrictly))==null?void 0:De.filter(Sn=>Sn.isDisabled?!1:(Sn.calcText(qe,Mt),ce(Sn,oe.value)));G.value&&(D.value.forEach(Sn=>{Sn.hitState=!1}),$.value.forEach(Sn=>{Sn.hitState=!1})),E.value=!0,N.value=Zt,de()},Z=()=>{var fe;let De;E.value&&x.value?De=x.value.$el.querySelector(`.${l.e("suggestion-item")}`):De=(fe=O.value)==null?void 0:fe.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`),De&&(De.focus(),!E.value&&De.click())},te=()=>{var fe,De;const ce=(fe=b.value)==null?void 0:fe.input,qe=w.value,Mt=(De=x.value)==null?void 0:De.$el;if(!(!wn||!ce)){if(Mt){const Zt=Mt.querySelector(`.${l.e("suggestion-list")}`);Zt.style.minWidth=`${ce.offsetWidth}px`}if(qe){const{offsetHeight:Zt}=qe,Sn=D.value.length>0?`${Math.max(Zt,a)-2}px`:`${a}px`;ce.style.height=Sn,de()}}},le=fe=>{var De;return(De=O.value)==null?void 0:De.getCheckedNodes(fe)},Te=fe=>{de(),n("expandChange",fe)},pe=fe=>{if(!g.value)switch(fe.code){case ut.enter:case ut.numpadEnter:q();break;case ut.down:q(!0),xt(Z),fe.preventDefault();break;case ut.esc:S.value===!0&&(fe.preventDefault(),fe.stopPropagation(),q(!1));break;case ut.tab:q(!1);break}},Oe=()=>{var fe;(fe=O.value)==null||fe.clearCheckedNodes(),!S.value&&r.filterable&&Re(),q(!1),n("clear")},Re=()=>{const{value:fe}=Ce;P.value=fe,A.value=fe},je=fe=>{var De,ce;const{checked:qe}=fe;G.value?(De=O.value)==null||De.handleCheckChange(fe,!qe,!1):(!qe&&((ce=O.value)==null||ce.handleCheckChange(fe,!0,!1)),q(!1))},Ke=fe=>{const De=fe.target,{code:ce}=fe;switch(ce){case ut.up:case ut.down:{const qe=ce===ut.up?-1:1;w1(pW(De,qe,`.${l.e("suggestion-item")}[tabindex="-1"]`));break}case ut.enter:case ut.numpadEnter:De.click();break}},Je=()=>{const fe=D.value,De=fe[fe.length-1];s=A.value?0:s+1,!(!De||!s||r.collapseTags&&fe.length>1)&&(De.hitState?se(De):De.hitState=!0)},at=fe=>{const De=fe.target,ce=l.e("search-input");De.className===ce&&(T.value=!0),n("focus",fe)},kt=fe=>{T.value=!1,n("blur",fe)},jt=Qo(()=>{const{value:fe}=oe;if(!fe)return;const De=r.beforeFilter(fe);t0(De)?De.then(Ae).catch(()=>{}):De!==!1?Ae():ke()},r.debounce),Pe=(fe,De)=>{!S.value&&q(!0),!(De!=null&&De.isComposing)&&(fe?jt():ke())},nt=fe=>Number.parseFloat(OSe(u.cssVarName("input-height"),fe).value)-2;return Fe(E,de),Fe([ne,I,()=>r.collapseTags],ye),Fe(D,()=>{xt(()=>te())}),Fe(Q,async()=>{await xt();const fe=b.value.input;a=nt(fe)||a,te()}),Fe(Ce,Re,{immediate:!0}),Ft(()=>{const fe=b.value.input,De=nt(fe);a=fe.offsetHeight||De,Hr(fe,te)}),e({getCheckedNodes:le,cascaderPanelRef:O,togglePopperVisible:q,contentRef:Me,presentText:Ce}),(fe,De)=>(R(),xe(p(Hi),{ref_key:"tooltipRef",ref:y,visible:S.value,teleported:fe.teleported,"popper-class":[p(l).e("dropdown"),fe.popperClass],"popper-options":i,"fallback-placements":fe.fallbackPlacements,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:fe.placement,transition:`${p(l).namespace.value}-zoom-in-top`,effect:"light",pure:"",persistent:fe.persistent,onHide:ke},{default:j(()=>[zt((R(),Y("div",{class:V(p(ee)),style:vt(p(z)),onClick:()=>q(p(K)?void 0:!0),onKeydown:pe,onMouseenter:ce=>C.value=!0,onMouseleave:ce=>C.value=!1},[B(p(hi),{ref_key:"input",ref:b,modelValue:P.value,"onUpdate:modelValue":ce=>P.value=ce,placeholder:p(X),readonly:p(K),disabled:p(I),"validate-event":!1,size:p(Q),class:V(p($e)),tabindex:p(G)&&fe.filterable&&!p(I)?-1:void 0,onCompositionstart:p(m),onCompositionupdate:p(m),onCompositionend:p(m),onFocus:at,onBlur:kt,onInput:Pe},{suffix:j(()=>[p(_e)?(R(),xe(p(mt),{key:"clear",class:V([p(u).e("icon"),"icon-circle-close"]),onClick:At(Oe,["stop"])},{default:j(()=>[B(p(pd))]),_:1},8,["class","onClick"])):(R(),xe(p(mt),{key:"arrow-down",class:V(p(he)),onClick:At(ce=>q(),["stop"])},{default:j(()=>[B(p(hd))]),_:1},8,["class","onClick"]))]),_:1},8,["modelValue","onUpdate:modelValue","placeholder","readonly","disabled","size","class","tabindex","onCompositionstart","onCompositionupdate","onCompositionend"]),p(G)?(R(),Y("div",{key:0,ref_key:"tagWrapper",ref:w,class:V([p(l).e("tags"),p(l).is("validate",Boolean(p(U)))])},[(R(!0),Y(dt,null,Ht(D.value,ce=>(R(),xe(p(ns),{key:ce.key,type:fe.tagType,size:p(W),effect:fe.tagEffect,hit:ce.hitState,closable:ce.closable,"disable-transitions":"",onClose:qe=>se(ce)},{default:j(()=>[ce.isCollapseTag===!1?(R(),Y("span",{key:0},Ve(ce.text),1)):(R(),xe(p(Hi),{key:1,disabled:S.value||!fe.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:"light"},{default:j(()=>[J("span",null,Ve(ce.text),1)]),content:j(()=>[J("div",{class:V(p(l).e("collapse-tags"))},[(R(!0),Y(dt,null,Ht($.value.slice(fe.maxCollapseTags),(qe,Mt)=>(R(),Y("div",{key:Mt,class:V(p(l).e("collapse-tag"))},[(R(),xe(p(ns),{key:qe.key,class:"in-tooltip",type:fe.tagType,size:p(W),effect:fe.tagEffect,hit:qe.hitState,closable:qe.closable,"disable-transitions":"",onClose:Zt=>se(qe)},{default:j(()=>[J("span",null,Ve(qe.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))],2))),128))],2)]),_:2},1032,["disabled"]))]),_:2},1032,["type","size","effect","hit","closable","onClose"]))),128)),fe.filterable&&!p(I)?zt((R(),Y("input",{key:0,"onUpdate:modelValue":ce=>A.value=ce,type:"text",class:V(p(l).e("search-input")),placeholder:p(Ce)?"":p(L),onInput:ce=>Pe(A.value,ce),onClick:At(ce=>q(!0),["stop"]),onKeydown:br(Je,["delete"]),onCompositionstart:p(m),onCompositionupdate:p(m),onCompositionend:p(m),onFocus:at,onBlur:kt},null,42,["onUpdate:modelValue","placeholder","onInput","onClick","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend"])),[[vS,A.value]]):Se("v-if",!0)],2)):Se("v-if",!0)],46,["onClick","onMouseenter","onMouseleave"])),[[p(Kc),()=>q(!1),p(Me)]])]),content:j(()=>[zt(B(p(uH),{ref_key:"cascaderPanelRef",ref:O,modelValue:p(ie),"onUpdate:modelValue":ce=>Tr(ie)?ie.value=ce:null,options:fe.options,props:r.props,border:!1,"render-label":fe.$slots.default,onExpandChange:Te,onClose:ce=>fe.$nextTick(()=>q(!1))},{empty:j(()=>[Ee(fe.$slots,"empty")]),_:3},8,["modelValue","onUpdate:modelValue","options","props","render-label","onClose"]),[[Bn,!E.value]]),fe.filterable?zt((R(),xe(p(gu),{key:0,ref_key:"suggestionPanel",ref:x,tag:"ul",class:V(p(l).e("suggestion-panel")),"view-class":p(l).e("suggestion-list"),onKeydown:Ke},{default:j(()=>[N.value.length?(R(!0),Y(dt,{key:0},Ht(N.value,ce=>(R(),Y("li",{key:ce.uid,class:V([p(l).e("suggestion-item"),p(l).is("checked",ce.checked)]),tabindex:-1,onClick:qe=>je(ce)},[J("span",null,Ve(ce.text),1),ce.checked?(R(),xe(p(mt),{key:0},{default:j(()=>[B(p(Eb))]),_:1})):Se("v-if",!0)],10,["onClick"]))),128)):Ee(fe.$slots,"empty",{key:1},()=>[J("li",{class:V(p(l).e("empty-text"))},Ve(p(c)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[Bn,E.value]]):Se("v-if",!0)]),_:3},8,["visible","teleported","popper-class","fallback-placements","placement","transition","persistent"]))}});var eMe=Ye(JAe,[["__file","cascader.vue"]]);const tMe=Vt(eMe),nMe=Ze({checked:Boolean,disabled:Boolean,type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),rMe={"update:checked":t=>wr(t),[dr]:t=>wr(t)},iMe=ue({name:"ElCheckTag"}),oMe=ue({...iMe,props:nMe,emits:rMe,setup(t,{emit:e}){const n=t,r=Qe("check-tag"),i=M(()=>n.disabled),o=M(()=>[r.b(),r.is("checked",n.checked),r.is("disabled",i.value),r.m(n.type||"primary")]),a=()=>{if(i.value)return;const s=!n.checked;e(dr,s),e("update:checked",s)};return(s,l)=>(R(),Y("span",{class:V(p(o)),onClick:a},[Ee(s.$slots,"default")],2))}});var aMe=Ye(oMe,[["__file","check-tag.vue"]]);const sMe=Vt(aMe),lMe=Ze({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:we([Number,Object]),default:()=>ei({})},sm:{type:we([Number,Object]),default:()=>ei({})},md:{type:we([Number,Object]),default:()=>ei({})},lg:{type:we([Number,Object]),default:()=>ei({})},xl:{type:we([Number,Object]),default:()=>ei({})}}),cH=Symbol("rowContextKey"),uMe=ue({name:"ElCol"}),cMe=ue({...uMe,props:lMe,setup(t){const e=t,{gutter:n}=ht(cH,{gutter:M(()=>0)}),r=Qe("col"),i=M(()=>{const a={};return n.value&&(a.paddingLeft=a.paddingRight=`${n.value/2}px`),a}),o=M(()=>{const a=[];return["span","offset","pull","push"].forEach(u=>{const c=e[u];Et(c)&&(u==="span"?a.push(r.b(`${e[u]}`)):c>0&&a.push(r.b(`${u}-${e[u]}`)))}),["xs","sm","md","lg","xl"].forEach(u=>{Et(e[u])?a.push(r.b(`${u}-${e[u]}`)):Jt(e[u])&&Object.entries(e[u]).forEach(([c,d])=>{a.push(c!=="span"?r.b(`${u}-${c}-${d}`):r.b(`${u}-${d}`))})}),n.value&&a.push(r.is("guttered")),[r.b(),a]});return(a,s)=>(R(),xe(on(a.tag),{class:V(p(o)),style:vt(p(i))},{default:j(()=>[Ee(a.$slots,"default")]),_:3},8,["class","style"]))}});var dMe=Ye(cMe,[["__file","col.vue"]]);const co=Vt(dMe),aB=t=>Et(t)||Ot(t)||Xe(t),fMe=Ze({accordion:Boolean,modelValue:{type:we([Array,String,Number]),default:()=>ei([])}}),hMe={[Ut]:aB,[dr]:aB},dH=Symbol("collapseContextKey"),pMe=(t,e)=>{const n=F(No(t.modelValue)),r=o=>{n.value=o;const a=t.accordion?n.value[0]:n.value;e(Ut,a),e(dr,a)},i=o=>{if(t.accordion)r([n.value[0]===o?"":o]);else{const a=[...n.value],s=a.indexOf(o);s>-1?a.splice(s,1):a.push(o),r(a)}};return Fe(()=>t.modelValue,()=>n.value=No(t.modelValue),{deep:!0}),gn(dH,{activeNames:n,handleItemClick:i}),{activeNames:n,setActiveNames:r}},gMe=()=>{const t=Qe("collapse");return{rootKls:M(()=>t.b())}},mMe=ue({name:"ElCollapse"}),vMe=ue({...mMe,props:fMe,emits:hMe,setup(t,{expose:e,emit:n}){const r=t,{activeNames:i,setActiveNames:o}=pMe(r,n),{rootKls:a}=gMe();return e({activeNames:i,setActiveNames:o}),(s,l)=>(R(),Y("div",{class:V(p(a))},[Ee(s.$slots,"default")],2))}});var yMe=Ye(vMe,[["__file","collapse.vue"]]);const bMe=ue({name:"ElCollapseTransition"}),_Me=ue({...bMe,setup(t){const e=Qe("collapse-transition"),n=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},r={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){n(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){n(i)},leaveCancelled(i){n(i)}};return(i,o)=>(R(),xe(zi,an({name:p(e).b()},wle(r)),{default:j(()=>[Ee(i.$slots,"default")]),_:3},16,["name"]))}});var OMe=Ye(_Me,[["__file","collapse-transition.vue"]]);const YS=Vt(OMe),wMe=Ze({title:{type:String,default:""},name:{type:we([String,Number]),default:void 0},icon:{type:fr,default:_a},disabled:Boolean}),xMe=t=>{const e=ht(dH),{namespace:n}=Qe("collapse"),r=F(!1),i=F(!1),o=m$(),a=M(()=>o.current++),s=M(()=>{var f;return(f=t.name)!=null?f:`${n.value}-id-${o.prefix}-${p(a)}`}),l=M(()=>e==null?void 0:e.activeNames.value.includes(p(s)));return{focusing:r,id:a,isActive:l,handleFocus:()=>{setTimeout(()=>{i.value?i.value=!1:r.value=!0},50)},handleHeaderClick:()=>{t.disabled||(e==null||e.handleItemClick(p(s)),r.value=!1,i.value=!0)},handleEnterClick:()=>{e==null||e.handleItemClick(p(s))}}},SMe=(t,{focusing:e,isActive:n,id:r})=>{const i=Qe("collapse"),o=M(()=>[i.b("item"),i.is("active",p(n)),i.is("disabled",t.disabled)]),a=M(()=>[i.be("item","header"),i.is("active",p(n)),{focusing:p(e)&&!t.disabled}]),s=M(()=>[i.be("item","arrow"),i.is("active",p(n))]),l=M(()=>i.be("item","wrap")),u=M(()=>i.be("item","content")),c=M(()=>i.b(`content-${p(r)}`)),d=M(()=>i.b(`head-${p(r)}`));return{arrowKls:s,headKls:a,rootKls:o,itemWrapperKls:l,itemContentKls:u,scopedContentId:c,scopedHeadId:d}},CMe=ue({name:"ElCollapseItem"}),EMe=ue({...CMe,props:wMe,setup(t,{expose:e}){const n=t,{focusing:r,id:i,isActive:o,handleFocus:a,handleHeaderClick:s,handleEnterClick:l}=xMe(n),{arrowKls:u,headKls:c,rootKls:d,itemWrapperKls:f,itemContentKls:h,scopedContentId:g,scopedHeadId:m}=SMe(n,{focusing:r,isActive:o,id:i});return e({isActive:o}),(y,b)=>(R(),Y("div",{class:V(p(d))},[J("button",{id:p(m),class:V(p(c)),"aria-expanded":p(o),"aria-controls":p(g),"aria-describedby":p(g),tabindex:y.disabled?-1:0,type:"button",onClick:p(s),onKeydown:br(At(p(l),["stop","prevent"]),["space","enter"]),onFocus:p(a),onBlur:w=>r.value=!1},[Ee(y.$slots,"title",{},()=>[Ue(Ve(y.title),1)]),Ee(y.$slots,"icon",{isActive:p(o)},()=>[B(p(mt),{class:V(p(u))},{default:j(()=>[(R(),xe(on(y.icon)))]),_:1},8,["class"])])],42,["id","aria-expanded","aria-controls","aria-describedby","tabindex","onClick","onKeydown","onFocus","onBlur"]),B(p(YS),null,{default:j(()=>[zt(J("div",{id:p(g),role:"region",class:V(p(f)),"aria-hidden":!p(o),"aria-labelledby":p(m)},[J("div",{class:V(p(h))},[Ee(y.$slots,"default")],2)],10,["id","aria-hidden","aria-labelledby"]),[[Bn,p(o)]])]),_:3})],2))}});var fH=Ye(EMe,[["__file","collapse-item.vue"]]);const GS=Vt(yMe,{CollapseItem:fH}),KS=ni(fH),TMe=Ze({color:{type:we(Object),required:!0},vertical:{type:Boolean,default:!1}});let PT=!1;function b0(t,e){if(!wn)return;const n=function(o){var a;(a=e.drag)==null||a.call(e,o)},r=function(o){var a;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",r),document.onselectstart=null,document.ondragstart=null,PT=!1,(a=e.end)==null||a.call(e,o)},i=function(o){var a;PT||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",r),document.addEventListener("touchmove",n),document.addEventListener("touchend",r),PT=!0,(a=e.start)==null||a.call(e,o))};t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!1})}const kMe=(t,e)=>{if(!wn||!t||!e)return!1;const n=t.getBoundingClientRect();let r;return e instanceof Element?r=e.getBoundingClientRect():r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right},sB=t=>{let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e},Rk=(t,e)=>Math.abs(sB(t)-sB(e)),$$=t=>{let e,n;return t.type==="touchend"?(n=t.changedTouches[0].clientY,e=t.changedTouches[0].clientX):t.type.startsWith("touch")?(n=t.touches[0].clientY,e=t.touches[0].clientX):(n=t.clientY,e=t.clientX),{clientX:e,clientY:n}},PMe=t=>{const e=tn(),{t:n}=xn(),r=yr(),i=yr(),o=M(()=>t.color.get("alpha")),a=M(()=>n("el.colorpicker.alphaLabel"));function s(d){var f;d.target!==r.value&&l(d),(f=r.value)==null||f.focus()}function l(d){if(!i.value||!r.value)return;const h=e.vnode.el.getBoundingClientRect(),{clientX:g,clientY:m}=$$(d);if(t.vertical){let y=m-h.top;y=Math.max(r.value.offsetHeight/2,y),y=Math.min(y,h.height-r.value.offsetHeight/2),t.color.set("alpha",Math.round((y-r.value.offsetHeight/2)/(h.height-r.value.offsetHeight)*100))}else{let y=g-h.left;y=Math.max(r.value.offsetWidth/2,y),y=Math.min(y,h.width-r.value.offsetWidth/2),t.color.set("alpha",Math.round((y-r.value.offsetWidth/2)/(h.width-r.value.offsetWidth)*100))}}function u(d){const{code:f,shiftKey:h}=d,g=h?10:1;switch(f){case ut.left:case ut.down:d.preventDefault(),d.stopPropagation(),c(-g);break;case ut.right:case ut.up:d.preventDefault(),d.stopPropagation(),c(g);break}}function c(d){let f=o.value+d;f=f<0?0:f>100?100:f,t.color.set("alpha",f)}return{thumb:r,bar:i,alpha:o,alphaLabel:a,handleDrag:l,handleClick:s,handleKeydown:u}},AMe=(t,{bar:e,thumb:n,handleDrag:r})=>{const i=tn(),o=Qe("color-alpha-slider"),a=F(0),s=F(0),l=F();function u(){if(!n.value||t.vertical)return 0;const w=i.vnode.el,O=t.color.get("alpha");return w?Math.round(O*(w.offsetWidth-n.value.offsetWidth/2)/100):0}function c(){if(!n.value)return 0;const w=i.vnode.el;if(!t.vertical)return 0;const O=t.color.get("alpha");return w?Math.round(O*(w.offsetHeight-n.value.offsetHeight/2)/100):0}function d(){if(t.color&&t.color.value){const{r:w,g:O,b:x}=t.color.toRgb();return`linear-gradient(to right, rgba(${w}, ${O}, ${x}, 0) 0%, rgba(${w}, ${O}, ${x}, 1) 100%)`}return""}function f(){a.value=u(),s.value=c(),l.value=d()}Ft(()=>{if(!e.value||!n.value)return;const w={drag:O=>{r(O)},end:O=>{r(O)}};b0(e.value,w),b0(n.value,w),f()}),Fe(()=>t.color.get("alpha"),()=>f()),Fe(()=>t.color.value,()=>f());const h=M(()=>[o.b(),o.is("vertical",t.vertical)]),g=M(()=>o.e("bar")),m=M(()=>o.e("thumb")),y=M(()=>({background:l.value})),b=M(()=>({left:pi(a.value),top:pi(s.value)}));return{rootKls:h,barKls:g,barStyle:y,thumbKls:m,thumbStyle:b,update:f}},MMe="ElColorAlphaSlider",RMe=ue({name:MMe}),$Me=ue({...RMe,props:TMe,setup(t,{expose:e}){const n=t,{alpha:r,alphaLabel:i,bar:o,thumb:a,handleDrag:s,handleClick:l,handleKeydown:u}=PMe(n),{rootKls:c,barKls:d,barStyle:f,thumbKls:h,thumbStyle:g,update:m}=AMe(n,{bar:o,thumb:a,handleDrag:s});return e({update:m,bar:o,thumb:a}),(y,b)=>(R(),Y("div",{class:V(p(c))},[J("div",{ref_key:"bar",ref:o,class:V(p(d)),style:vt(p(f)),onClick:p(l)},null,14,["onClick"]),J("div",{ref_key:"thumb",ref:a,class:V(p(h)),style:vt(p(g)),"aria-label":p(i),"aria-valuenow":p(r),"aria-orientation":y.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:p(u)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var NMe=Ye($Me,[["__file","alpha-slider.vue"]]);const DMe=ue({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=Qe("color-hue-slider"),n=tn(),r=F(),i=F(),o=F(0),a=F(0),s=M(()=>t.color.get("hue"));Fe(()=>s.value,()=>{f()});function l(h){h.target!==r.value&&u(h)}function u(h){if(!i.value||!r.value)return;const m=n.vnode.el.getBoundingClientRect(),{clientX:y,clientY:b}=$$(h);let w;if(t.vertical){let O=b-m.top;O=Math.min(O,m.height-r.value.offsetHeight/2),O=Math.max(r.value.offsetHeight/2,O),w=Math.round((O-r.value.offsetHeight/2)/(m.height-r.value.offsetHeight)*360)}else{let O=y-m.left;O=Math.min(O,m.width-r.value.offsetWidth/2),O=Math.max(r.value.offsetWidth/2,O),w=Math.round((O-r.value.offsetWidth/2)/(m.width-r.value.offsetWidth)*360)}t.color.set("hue",w)}function c(){if(!r.value)return 0;const h=n.vnode.el;if(t.vertical)return 0;const g=t.color.get("hue");return h?Math.round(g*(h.offsetWidth-r.value.offsetWidth/2)/360):0}function d(){if(!r.value)return 0;const h=n.vnode.el;if(!t.vertical)return 0;const g=t.color.get("hue");return h?Math.round(g*(h.offsetHeight-r.value.offsetHeight/2)/360):0}function f(){o.value=c(),a.value=d()}return Ft(()=>{if(!i.value||!r.value)return;const h={drag:g=>{u(g)},end:g=>{u(g)}};b0(i.value,h),b0(r.value,h),f()}),{bar:i,thumb:r,thumbLeft:o,thumbTop:a,hueValue:s,handleClick:l,update:f,ns:e}}});function LMe(t,e,n,r,i,o){return R(),Y("div",{class:V([t.ns.b(),t.ns.is("vertical",t.vertical)])},[J("div",{ref:"bar",class:V(t.ns.e("bar")),onClick:t.handleClick},null,10,["onClick"]),J("div",{ref:"thumb",class:V(t.ns.e("thumb")),style:vt({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var IMe=Ye(DMe,[["render",LMe],["__file","hue-slider.vue"]]);const BMe=Ze({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:$i,popperClass:{type:String,default:""},tabindex:{type:[String,Number],default:0},teleported:io.teleported,predefine:{type:we(Array)},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),FMe={[Ut]:t=>Ot(t)||Lr(t),[dr]:t=>Ot(t)||Lr(t),activeChange:t=>Ot(t)||Lr(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},hH=Symbol("colorPickerContextKey"),lB=function(t,e,n){return[t,e*n/((t=(2-e)*n)<1?t:2-t)||0,t/2]},VMe=function(t){return Ot(t)&&t.includes(".")&&Number.parseFloat(t)===1},jMe=function(t){return Ot(t)&&t.includes("%")},Mg=function(t,e){VMe(t)&&(t="100%");const n=jMe(t);return t=Math.min(e,Math.max(0,Number.parseFloat(`${t}`))),n&&(t=Number.parseInt(`${t*e}`,10)/100),Math.abs(t-e)<1e-6?1:t%e/Number.parseFloat(e)},uB={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},S1=t=>{t=Math.min(Math.round(t),255);const e=Math.floor(t/16),n=t%16;return`${uB[e]||e}${uB[n]||n}`},cB=function({r:t,g:e,b:n}){return Number.isNaN(+t)||Number.isNaN(+e)||Number.isNaN(+n)?"":`#${S1(t)}${S1(e)}${S1(n)}`},AT={A:10,B:11,C:12,D:13,E:14,F:15},dh=function(t){return t.length===2?(AT[t[0].toUpperCase()]||+t[0])*16+(AT[t[1].toUpperCase()]||+t[1]):AT[t[1].toUpperCase()]||+t[1]},QMe=function(t,e,n){e=e/100,n=n/100;let r=e;const i=Math.max(n,.01);n*=2,e*=n<=1?n:2-n,r*=i<=1?i:2-i;const o=(n+e)/2,a=n===0?2*r/(i+r):2*e/(n+e);return{h:t,s:a*100,v:o*100}},dB=(t,e,n)=>{t=Mg(t,255),e=Mg(e,255),n=Mg(n,255);const r=Math.max(t,e,n),i=Math.min(t,e,n);let o;const a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case t:{o=(e-n)/s+(e<n?6:0);break}case e:{o=(n-t)/s+2;break}case n:{o=(t-e)/s+4;break}}o/=6}return{h:o*360,s:l*100,v:a*100}},Iv=function(t,e,n){t=Mg(t,360)*6,e=Mg(e,100),n=Mg(n,100);const r=Math.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6,u=[n,a,o,o,s,n][l],c=[s,n,n,a,o,o][l],d=[o,o,s,n,n,a][l];return{r:Math.round(u*255),g:Math.round(c*255),b:Math.round(d*255)}};class Ty{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const n in e)Mn(e,n)&&(this[n]=e[n]);e.value?this.fromString(e.value):this.doOnChange()}set(e,n){if(arguments.length===1&&typeof e=="object"){for(const r in e)Mn(e,r)&&this.set(r,e[r]);return}this[`_${e}`]=n,this.doOnChange()}get(e){return e==="alpha"?Math.floor(this[`_${e}`]):this[`_${e}`]}toRgb(){return Iv(this._hue,this._saturation,this._value)}fromString(e){if(!e){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const n=(r,i,o)=>{this._hue=Math.max(0,Math.min(360,r)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,o)),this.doOnChange()};if(e.includes("hsl")){const r=e.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:i,s:o,v:a}=QMe(r[0],r[1],r[2]);n(i,o,a)}}else if(e.includes("hsv")){const r=e.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3&&n(r[0],r[1],r[2])}else if(e.includes("rgb")){const r=e.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:i,s:o,v:a}=dB(r[0],r[1],r[2]);n(i,o,a)}}else if(e.includes("#")){const r=e.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))return;let i,o,a;r.length===3?(i=dh(r[0]+r[0]),o=dh(r[1]+r[1]),a=dh(r[2]+r[2])):(r.length===6||r.length===8)&&(i=dh(r.slice(0,2)),o=dh(r.slice(2,4)),a=dh(r.slice(4,6))),r.length===8?this._alpha=dh(r.slice(6))/255*100:(r.length===3||r.length===6)&&(this._alpha=100);const{h:s,s:l,v:u}=dB(i,o,a);n(s,l,u)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:n,_value:r,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const a=lB(e,n/100,r/100);this.value=`hsla(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${e}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${cB(Iv(e,n,r))}${S1(i*255/100)}`;break}default:{const{r:a,g:s,b:l}=Iv(e,n,r);this.value=`rgba(${a}, ${s}, ${l}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const a=lB(e,n/100,r/100);this.value=`hsl(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${e}, ${Math.round(n)}%, ${Math.round(r)}%)`;break}case"rgb":{const{r:a,g:s,b:l}=Iv(e,n,r);this.value=`rgb(${a}, ${s}, ${l})`;break}default:this.value=cB(Iv(e,n,r))}}}const zMe=ue({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(t){const e=Qe("color-predefine"),{currentColor:n}=ht(hH),r=F(o(t.colors,t.color));Fe(()=>n.value,a=>{const s=new Ty;s.fromString(a),r.value.forEach(l=>{l.selected=s.compare(l)})}),Bo(()=>{r.value=o(t.colors,t.color)});function i(a){t.color.fromString(t.colors[a])}function o(a,s){return a.map(l=>{const u=new Ty;return u.enableAlpha=t.enableAlpha,u.format="rgba",u.fromString(l),u.selected=u.value===s.value,u})}return{rgbaColors:r,handleSelect:i,ns:e}}});function WMe(t,e,n,r,i,o){return R(),Y("div",{class:V(t.ns.b())},[J("div",{class:V(t.ns.e("colors"))},[(R(!0),Y(dt,null,Ht(t.rgbaColors,(a,s)=>(R(),Y("div",{key:t.colors[s],class:V([t.ns.e("color-selector"),t.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:l=>t.handleSelect(s)},[J("div",{style:vt({backgroundColor:a.value})},null,4)],10,["onClick"]))),128))],2)],2)}var HMe=Ye(zMe,[["render",WMe],["__file","predefine.vue"]]);const UMe=ue({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=Qe("color-svpanel"),n=tn(),r=F(0),i=F(0),o=F("hsl(0, 100%, 50%)"),a=M(()=>{const u=t.color.get("hue"),c=t.color.get("value");return{hue:u,value:c}});function s(){const u=t.color.get("saturation"),c=t.color.get("value"),d=n.vnode.el,{clientWidth:f,clientHeight:h}=d;i.value=u*f/100,r.value=(100-c)*h/100,o.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}function l(u){const d=n.vnode.el.getBoundingClientRect(),{clientX:f,clientY:h}=$$(u);let g=f-d.left,m=h-d.top;g=Math.max(0,g),g=Math.min(g,d.width),m=Math.max(0,m),m=Math.min(m,d.height),i.value=g,r.value=m,t.color.set({saturation:g/d.width*100,value:100-m/d.height*100})}return Fe(()=>a.value,()=>{s()}),Ft(()=>{b0(n.vnode.el,{drag:u=>{l(u)},end:u=>{l(u)}}),s()}),{cursorTop:r,cursorLeft:i,background:o,colorValue:a,handleDrag:l,update:s,ns:e}}});function XMe(t,e,n,r,i,o){return R(),Y("div",{class:V(t.ns.b()),style:vt({backgroundColor:t.background})},[J("div",{class:V(t.ns.e("white"))},null,2),J("div",{class:V(t.ns.e("black"))},null,2),J("div",{class:V(t.ns.e("cursor")),style:vt({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},[J("div")],6)],6)}var ZMe=Ye(UMe,[["render",XMe],["__file","sv-panel.vue"]]);const qMe=ue({name:"ElColorPicker"}),YMe=ue({...qMe,props:BMe,emits:FMe,setup(t,{expose:e,emit:n}){const r=t,{t:i}=xn(),o=Qe("color"),{formItem:a}=Wo(),s=ki(),l=Ho(),{inputId:u,isLabeledByFormItem:c}=Tl(r,{formItemContext:a}),d=F(),f=F(),h=F(),g=F(),m=F(),y=F(),{isFocused:b,handleFocus:w,handleBlur:O}=jf(m,{beforeFocus(){return l.value},beforeBlur(he){var $e;return($e=g.value)==null?void 0:$e.isFocusInsideContent(he)},afterBlur(){I(!1),W()}});let x=!0;const S=vn(new Ty({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue})),C=F(!1),E=F(!1),T=F(""),P=M(()=>!r.modelValue&&!E.value?"transparent":z(S,r.showAlpha)),A=M(()=>!r.modelValue&&!E.value?"":S.value),D=M(()=>c.value?void 0:r.ariaLabel||i("el.colorpicker.defaultLabel")),$=M(()=>c.value?a==null?void 0:a.labelId:void 0),N=M(()=>[o.b("picker"),o.is("disabled",l.value),o.bm("picker",s.value),o.is("focused",b.value)]);function z(he,$e){if(!(he instanceof Ty))throw new TypeError("color should be instance of _color Class");const{r:Me,g:q,b:de}=he.toRgb();return $e?`rgba(${Me}, ${q}, ${de}, ${he.get("alpha")/100})`:`rgb(${Me}, ${q}, ${de})`}function I(he){C.value=he}const L=Qo(I,100,{leading:!0});function X(){l.value||I(!0)}function Q(){L(!1),W()}function W(){xt(()=>{r.modelValue?S.fromString(r.modelValue):(S.value="",xt(()=>{E.value=!1}))})}function G(){l.value||L(!C.value)}function K(){S.fromString(T.value)}function oe(){const he=S.value;n(Ut,he),n("change",he),r.validateEvent&&(a==null||a.validate("change").catch($e=>void 0)),L(!1),xt(()=>{const $e=new Ty({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue});S.compare($e)||W()})}function ne(){L(!1),n(Ut,null),n("change",null),r.modelValue!==null&&r.validateEvent&&(a==null||a.validate("change").catch(he=>void 0)),W()}function _e(){!C.value||(Q(),b.value&&ie())}function Ce(he){he.preventDefault(),he.stopPropagation(),I(!1),W()}function U(he){switch(he.code){case ut.enter:case ut.numpadEnter:case ut.space:he.preventDefault(),he.stopPropagation(),X(),y.value.focus();break;case ut.esc:Ce(he);break}}function ie(){m.value.focus()}function ee(){m.value.blur()}return Ft(()=>{r.modelValue&&(T.value=A.value)}),Fe(()=>r.modelValue,he=>{he?he&&he!==S.value&&(x=!1,S.fromString(he)):E.value=!1}),Fe(()=>[r.colorFormat,r.showAlpha],()=>{S.enableAlpha=r.showAlpha,S.format=r.colorFormat||S.format,S.doOnChange(),n(Ut,S.value)}),Fe(()=>A.value,he=>{T.value=he,x&&n("activeChange",he),x=!0}),Fe(()=>S.value,()=>{!r.modelValue&&!E.value&&(E.value=!0)}),Fe(()=>C.value,()=>{xt(()=>{var he,$e,Me;(he=d.value)==null||he.update(),($e=f.value)==null||$e.update(),(Me=h.value)==null||Me.update()})}),gn(hH,{currentColor:A}),e({color:S,show:X,hide:Q,focus:ie,blur:ee}),(he,$e)=>(R(),xe(p(Hi),{ref_key:"popper",ref:g,visible:C.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[p(o).be("picker","panel"),p(o).b("dropdown"),he.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:he.teleported,transition:`${p(o).namespace.value}-zoom-in-top`,persistent:"",onHide:Me=>I(!1)},{content:j(()=>[zt((R(),Y("div",{onKeydown:br(Ce,["esc"])},[J("div",{class:V(p(o).be("dropdown","main-wrapper"))},[B(IMe,{ref_key:"hue",ref:d,class:"hue-slider",color:p(S),vertical:""},null,8,["color"]),B(ZMe,{ref_key:"sv",ref:f,color:p(S)},null,8,["color"])],2),he.showAlpha?(R(),xe(NMe,{key:0,ref_key:"alpha",ref:h,color:p(S)},null,8,["color"])):Se("v-if",!0),he.predefine?(R(),xe(HMe,{key:1,ref:"predefine","enable-alpha":he.showAlpha,color:p(S),colors:he.predefine},null,8,["enable-alpha","color","colors"])):Se("v-if",!0),J("div",{class:V(p(o).be("dropdown","btns"))},[J("span",{class:V(p(o).be("dropdown","value"))},[B(p(hi),{ref_key:"inputRef",ref:y,modelValue:T.value,"onUpdate:modelValue":Me=>T.value=Me,"validate-event":!1,size:"small",onKeyup:br(K,["enter"]),onBlur:K},null,8,["modelValue","onUpdate:modelValue","onKeyup"])],2),B(p(lr),{class:V(p(o).be("dropdown","link-btn")),text:"",size:"small",onClick:ne},{default:j(()=>[Ue(Ve(p(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),B(p(lr),{plain:"",size:"small",class:V(p(o).be("dropdown","btn")),onClick:oe},{default:j(()=>[Ue(Ve(p(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,["onKeydown"])),[[p(Kc),_e]])]),default:j(()=>[J("div",an({id:p(u),ref_key:"triggerRef",ref:m},he.$attrs,{class:p(N),role:"button","aria-label":p(D),"aria-labelledby":p($),"aria-description":p(i)("el.colorpicker.description",{color:he.modelValue||""}),"aria-disabled":p(l),tabindex:p(l)?-1:he.tabindex,onKeydown:U,onFocus:p(w),onBlur:p(O)}),[p(l)?(R(),Y("div",{key:0,class:V(p(o).be("picker","mask"))},null,2)):Se("v-if",!0),J("div",{class:V(p(o).be("picker","trigger")),onClick:G},[J("span",{class:V([p(o).be("picker","color"),p(o).is("alpha",he.showAlpha)])},[J("span",{class:V(p(o).be("picker","color-inner")),style:vt({backgroundColor:p(P)})},[zt(B(p(mt),{class:V([p(o).be("picker","icon"),p(o).is("icon-arrow-down")])},{default:j(()=>[B(p(hd))]),_:1},8,["class"]),[[Bn,he.modelValue||E.value]]),zt(B(p(mt),{class:V([p(o).be("picker","empty"),p(o).is("icon-close")])},{default:j(()=>[B(p(Oa))]),_:1},8,["class"]),[[Bn,!he.modelValue&&!E.value]])],6)],2)],2)],16,["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex","onFocus","onBlur"])]),_:1},8,["visible","popper-class","teleported","transition","onHide"]))}});var GMe=Ye(YMe,[["__file","color-picker.vue"]]);const KMe=Vt(GMe),JMe=Ze({a11y:{type:Boolean,default:!0},locale:{type:we(Object)},size:$i,button:{type:we(Object)},experimentalFeatures:{type:we(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:we(Object)},zIndex:Number,namespace:{type:String,default:"el"},...Wm}),Wl={},eRe=ue({name:"ElConfigProvider",props:JMe,setup(t,{slots:e}){Fe(()=>t.message,r=>{Object.assign(Wl,r!=null?r:{})},{immediate:!0,deep:!0});const n=r$(t);return()=>Ee(e,"default",{config:n==null?void 0:n.value})}}),pH=Vt(eRe),tRe=ue({name:"ElContainer"}),nRe=ue({...tRe,props:{direction:{type:String}},setup(t){const e=t,n=Ni(),r=Qe("container"),i=M(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(a=>{const s=a.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(o,a)=>(R(),Y("section",{class:V([p(r).b(),p(r).is("vertical",p(i))])},[Ee(o.$slots,"default")],2))}});var rRe=Ye(nRe,[["__file","container.vue"]]);const iRe=ue({name:"ElAside"}),oRe=ue({...iRe,props:{width:{type:String,default:null}},setup(t){const e=t,n=Qe("aside"),r=M(()=>e.width?n.cssVarBlock({width:e.width}):{});return(i,o)=>(R(),Y("aside",{class:V(p(n).b()),style:vt(p(r))},[Ee(i.$slots,"default")],6))}});var gH=Ye(oRe,[["__file","aside.vue"]]);const aRe=ue({name:"ElFooter"}),sRe=ue({...aRe,props:{height:{type:String,default:null}},setup(t){const e=t,n=Qe("footer"),r=M(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(R(),Y("footer",{class:V(p(n).b()),style:vt(p(r))},[Ee(i.$slots,"default")],6))}});var mH=Ye(sRe,[["__file","footer.vue"]]);const lRe=ue({name:"ElHeader"}),uRe=ue({...lRe,props:{height:{type:String,default:null}},setup(t){const e=t,n=Qe("header"),r=M(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(R(),Y("header",{class:V(p(n).b()),style:vt(p(r))},[Ee(i.$slots,"default")],6))}});var vH=Ye(uRe,[["__file","header.vue"]]);const cRe=ue({name:"ElMain"}),dRe=ue({...cRe,setup(t){const e=Qe("main");return(n,r)=>(R(),Y("main",{class:V(p(e).b())},[Ee(n.$slots,"default")],2))}});var yH=Ye(dRe,[["__file","main.vue"]]);const fRe=Vt(rRe,{Aside:gH,Footer:mH,Header:vH,Main:yH}),hRe=ni(gH),pRe=ni(mH),gRe=ni(vH),mRe=ni(yH);var bH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ai,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(y){return(y=+y)+(y>68?1900:2e3)},c=function(y){return function(b){this[y]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var w=b.match(/([+-]|\d\d)/g),O=60*w[1]+(+w[2]||0);return O===0?0:w[0]==="+"?-O:O}(y)}],f=function(y){var b=l[y];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(y,b){var w,O=l.meridiem;if(O){for(var x=1;x<=24;x+=1)if(y.indexOf(O(x,0,b))>-1){w=x>12;break}}else w=y===(b?"pm":"PM");return w},g={A:[s,function(y){this.afternoon=h(y,!1)}],a:[s,function(y){this.afternoon=h(y,!0)}],Q:[i,function(y){this.month=3*(y-1)+1}],S:[i,function(y){this.milliseconds=100*+y}],SS:[o,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,c("seconds")],ss:[a,c("seconds")],m:[a,c("minutes")],mm:[a,c("minutes")],H:[a,c("hours")],h:[a,c("hours")],HH:[a,c("hours")],hh:[a,c("hours")],D:[a,c("day")],DD:[o,c("day")],Do:[s,function(y){var b=l.ordinal,w=y.match(/\d+/);if(this.day=w[0],b)for(var O=1;O<=31;O+=1)b(O).replace(/\[|\]/g,"")===y&&(this.day=O)}],w:[a,c("week")],ww:[o,c("week")],M:[a,c("month")],MM:[o,c("month")],MMM:[s,function(y){var b=f("months"),w=(f("monthsShort")||b.map(function(O){return O.slice(0,3)})).indexOf(y)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[s,function(y){var b=f("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,c("year")],YY:[o,function(y){this.year=u(y)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function m(y){var b,w;b=y,w=l&&l.formats;for(var O=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,D,$){var N=$&&$.toUpperCase();return D||w[$]||n[$]||w[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(z,I,L){return I||L.slice(1)})})).match(r),x=O.length,S=0;S<x;S+=1){var C=O[S],E=g[C],T=E&&E[0],P=E&&E[1];O[S]=P?{regex:T,parser:P}:C.replace(/^\[|\]$/g,"")}return function(A){for(var D={},$=0,N=0;$<x;$+=1){var z=O[$];if(typeof z=="string")N+=z.length;else{var I=z.regex,L=z.parser,X=A.slice(N),Q=I.exec(X)[0];L.call(D,Q),A=A.replace(Q,"")}}return function(W){var G=W.afternoon;if(G!==void 0){var K=W.hours;G?K<12&&(W.hours+=12):K===12&&(W.hours=0),delete W.afternoon}}(D),D}}return function(y,b,w){w.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var O=b.prototype,x=O.parse;O.parse=function(S){var C=S.date,E=S.utc,T=S.args;this.$u=E;var P=T[1];if(typeof P=="string"){var A=T[2]===!0,D=T[3]===!0,$=A||D,N=T[2];D&&(N=T[2]),l=this.$locale(),!A&&N&&(l=w.Ls[N]),this.$d=function(X,Q,W,G){try{if(["x","X"].indexOf(Q)>-1)return new Date((Q==="X"?1e3:1)*X);var K=m(Q)(X),oe=K.year,ne=K.month,_e=K.day,Ce=K.hours,U=K.minutes,ie=K.seconds,ee=K.milliseconds,he=K.zone,$e=K.week,Me=new Date,q=_e||(oe||ne?1:Me.getDate()),de=oe||Me.getFullYear(),ke=0;oe&&!ne||(ke=ne>0?ne-1:Me.getMonth());var Ie,se=Ce||0,ye=U||0,Ae=ie||0,Z=ee||0;return he?new Date(Date.UTC(de,ke,q,se,ye,Ae,Z+60*he.offset*1e3)):W?new Date(Date.UTC(de,ke,q,se,ye,Ae,Z)):(Ie=new Date(de,ke,q,se,ye,Ae,Z),$e&&(Ie=G(Ie).week($e).toDate()),Ie)}catch{return new Date("")}}(C,P,E,w),this.init(),N&&N!==!0&&(this.$L=this.locale(N).$L),$&&C!=this.format(P)&&(this.$d=new Date("")),l={}}else if(P instanceof Array)for(var z=P.length,I=1;I<=z;I+=1){T[1]=P[I-1];var L=w.apply(this,T);if(L.isValid()){this.$d=L.$d,this.$L=L.$L,this.init();break}I===z&&(this.$d=new Date(""))}else x.call(this,S)}}})})(bH);var N$=bH.exports,_H={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ai,function(){return function(n,r){var i=r.prototype,o=i.format;i.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return o.bind(this)(a);var u=this.$utils(),c=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return u.s(s.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),d==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return d}});return o.bind(this)(c)}}})})(_H);var vRe=_H.exports,OH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ai,function(){var n="week",r="year";return function(i,o,a){var s=o.prototype;s.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var c=a(this).startOf(r).add(1,r).date(u),d=a(this).endOf(n);if(c.isBefore(d))return 1}var f=a(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),h=this.diff(f,n,!0);return h<0?a(this).startOf("week").week():Math.ceil(h)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(OH);var yRe=OH.exports,wH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ai,function(){return function(n,r){r.prototype.weekYear=function(){var i=this.month(),o=this.week(),a=this.year();return o===1&&i===11?a+1:i===0&&o>=52?a-1:a}}})})(wH);var bRe=wH.exports,xH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ai,function(){return function(n,r,i){r.prototype.dayOfYear=function(o){var a=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return o==null?a:this.add(o-a,"day")}}})})(xH);var _Re=xH.exports,SH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ai,function(){return function(n,r){r.prototype.isSameOrAfter=function(i,o){return this.isSame(i,o)||this.isAfter(i,o)}}})})(SH);var ORe=SH.exports,CH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ai,function(){return function(n,r){r.prototype.isSameOrBefore=function(i,o){return this.isSame(i,o)||this.isBefore(i,o)}}})})(CH);var wRe=CH.exports;const fB=["hours","minutes","seconds"],$k="HH:mm:ss",sg="YYYY-MM-DD",xRe={date:sg,dates:sg,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${sg} ${$k}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:sg,datetimerange:`${sg} ${$k}`},EH=Ze({disabledHours:{type:we(Function)},disabledMinutes:{type:we(Function)},disabledSeconds:{type:we(Function)}}),TH=Ze({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),D$=Ze({id:{type:we([Array,String])},name:{type:we([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:we([String,Object]),default:pd},editable:{type:Boolean,default:!0},prefixIcon:{type:we([String,Object]),default:""},size:$i,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})},modelValue:{type:we([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:we([Date,Array])},defaultTime:{type:we([Date,Array])},isRange:Boolean,...EH,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:we([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:we(String),values:gd,default:"bottom"},fallbackPlacements:{type:we(Array),default:["bottom","top","right","left"]},...Wm,...wo(["ariaLabel"]),showNow:{type:Boolean,default:!0}}),SRe=Ze({id:{type:we(Array)},name:{type:we(Array)},modelValue:{type:we([Array,String])},startPlaceholder:String,endPlaceholder:String}),CRe=ue({name:"PickerRangeTrigger",inheritAttrs:!1}),ERe=ue({...CRe,props:SRe,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const r=Tb(),i=Qe("date"),o=Qe("range"),a=F(),s=F(),{wrapperRef:l,isFocused:u}=jf(a),c=x=>{n("click",x)},d=x=>{n("mouseenter",x)},f=x=>{n("mouseleave",x)},h=x=>{n("mouseenter",x)},g=x=>{n("startInput",x)},m=x=>{n("endInput",x)},y=x=>{n("startChange",x)},b=x=>{n("endChange",x)};return e({focus:()=>{var x;(x=a.value)==null||x.focus()},blur:()=>{var x,S;(x=a.value)==null||x.blur(),(S=s.value)==null||S.blur()}}),(x,S)=>(R(),Y("div",{ref_key:"wrapperRef",ref:l,class:V([p(i).is("active",p(u)),x.$attrs.class]),style:vt(x.$attrs.style),onClick:c,onMouseenter:d,onMouseleave:f,onTouchstartPassive:h},[Ee(x.$slots,"prefix"),J("input",an(p(r),{id:x.id&&x.id[0],ref_key:"inputRef",ref:a,name:x.name&&x.name[0],placeholder:x.startPlaceholder,value:x.modelValue&&x.modelValue[0],class:p(o).b("input"),onInput:g,onChange:y}),null,16,["id","name","placeholder","value"]),Ee(x.$slots,"range-separator"),J("input",an(p(r),{id:x.id&&x.id[1],ref_key:"endInputRef",ref:s,name:x.name&&x.name[1],placeholder:x.endPlaceholder,value:x.modelValue&&x.modelValue[1],class:p(o).b("input"),onInput:m,onChange:b}),null,16,["id","name","placeholder","value"]),Ee(x.$slots,"suffix")],38))}});var TRe=Ye(ERe,[["__file","picker-range-trigger.vue"]]);const kRe=ue({name:"Picker"}),PRe=ue({...kRe,props:D$,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const r=t,i=Nf(),{lang:o}=xn(),a=Qe("date"),s=Qe("input"),l=Qe("range"),{form:u,formItem:c}=Wo(),d=ht("ElPopperOptions",{}),{valueOnClear:f}=VS(r,null),h=F(),g=F(),m=F(!1),y=F(!1),b=F(null);let w=!1;const{isFocused:O,handleFocus:x,handleBlur:S}=jf(g,{beforeFocus(){return r.readonly||W.value},afterFocus(){m.value=!0},beforeBlur(ce){var qe;return!w&&((qe=h.value)==null?void 0:qe.isFocusInsideContent(ce))},afterBlur(){te(),m.value=!1,w=!1,r.validateEvent&&(c==null||c.validate("blur").catch(ce=>void 0))}}),C=M(()=>[a.b("editor"),a.bm("editor",r.type),s.e("wrapper"),a.is("disabled",W.value),a.is("active",m.value),l.b("editor"),se?l.bm("editor",se.value):"",i.class]),E=M(()=>[s.e("icon"),l.e("close-icon"),ee.value?"":l.e("close-icon--hidden")]);Fe(m,ce=>{ce?xt(()=>{ce&&(b.value=r.modelValue)}):(Z.value=null,xt(()=>{T(r.modelValue)}))});const T=(ce,qe)=>{(qe||!G5(ce,b.value))&&(n("change",ce),r.validateEvent&&(c==null||c.validate("change").catch(Mt=>void 0)))},P=ce=>{if(!G5(r.modelValue,ce)){let qe;Xe(ce)?qe=ce.map(Mt=>J5(Mt,r.valueFormat,o.value)):ce&&(qe=J5(ce,r.valueFormat,o.value)),n("update:modelValue",ce&&qe,o.value)}},A=ce=>{n("keydown",ce)},D=M(()=>g.value?Array.from(g.value.$el.querySelectorAll("input")):[]),$=(ce,qe,Mt)=>{const Zt=D.value;!Zt.length||(!Mt||Mt==="min"?(Zt[0].setSelectionRange(ce,qe),Zt[0].focus()):Mt==="max"&&(Zt[1].setSelectionRange(ce,qe),Zt[1].focus()))},N=(ce="",qe=!1)=>{m.value=qe;let Mt;Xe(ce)?Mt=ce.map(Zt=>Zt.toDate()):Mt=ce&&ce.toDate(),Z.value=null,P(Mt)},z=()=>{y.value=!0},I=()=>{n("visible-change",!0)},L=()=>{y.value=!1,m.value=!1,n("visible-change",!1)},X=()=>{m.value=!0},Q=()=>{m.value=!1},W=M(()=>r.disabled||(u==null?void 0:u.disabled)),G=M(()=>{let ce;if($e.value?kt.value.getDefaultValue&&(ce=kt.value.getDefaultValue()):Xe(r.modelValue)?ce=r.modelValue.map(qe=>K5(qe,r.valueFormat,o.value)):ce=K5(r.modelValue,r.valueFormat,o.value),kt.value.getRangeAvailableTime){const qe=kt.value.getRangeAvailableTime(ce);Qi(qe,ce)||(ce=qe,$e.value||P(lO(ce)))}return Xe(ce)&&ce.some(qe=>!qe)&&(ce=[]),ce}),K=M(()=>{if(!kt.value.panelReady)return"";const ce=Te(G.value);return Xe(Z.value)?[Z.value[0]||ce&&ce[0]||"",Z.value[1]||ce&&ce[1]||""]:Z.value!==null?Z.value:!ne.value&&$e.value||!m.value&&$e.value?"":ce?_e.value||Ce.value||U.value?ce.join(", "):ce:""}),oe=M(()=>r.type.includes("time")),ne=M(()=>r.type.startsWith("time")),_e=M(()=>r.type==="dates"),Ce=M(()=>r.type==="months"),U=M(()=>r.type==="years"),ie=M(()=>r.prefixIcon||(oe.value?tW:pCe)),ee=F(!1),he=ce=>{r.readonly||W.value||(ee.value&&(ce.stopPropagation(),kt.value.handleClear?kt.value.handleClear():P(f.value),T(f.value,!0),ee.value=!1,L()),n("clear"))},$e=M(()=>{const{modelValue:ce}=r;return!ce||Xe(ce)&&!ce.filter(Boolean).length}),Me=async ce=>{var qe;r.readonly||W.value||(((qe=ce.target)==null?void 0:qe.tagName)!=="INPUT"||O.value)&&(m.value=!0)},q=()=>{r.readonly||W.value||!$e.value&&r.clearable&&(ee.value=!0)},de=()=>{ee.value=!1},ke=ce=>{var qe;r.readonly||W.value||(((qe=ce.touches[0].target)==null?void 0:qe.tagName)!=="INPUT"||O.value)&&(m.value=!0)},Ie=M(()=>r.type.includes("range")),se=ki(),ye=M(()=>{var ce,qe;return(qe=(ce=p(h))==null?void 0:ce.popperRef)==null?void 0:qe.contentRef}),Ae=n$(g,ce=>{const qe=p(ye),Mt=ba(g);qe&&(ce.target===qe||ce.composedPath().includes(qe))||ce.target===Mt||Mt&&ce.composedPath().includes(Mt)||(m.value=!1)});pr(()=>{Ae==null||Ae()});const Z=F(null),te=()=>{if(Z.value){const ce=le(K.value);ce&&pe(ce)&&(P(lO(ce)),Z.value=null)}Z.value===""&&(P(f.value),T(f.value),Z.value=null)},le=ce=>ce?kt.value.parseUserInput(ce):null,Te=ce=>ce?kt.value.formatToString(ce):null,pe=ce=>kt.value.isValidValue(ce),Oe=async ce=>{if(r.readonly||W.value)return;const{code:qe}=ce;if(A(ce),qe===ut.esc){m.value===!0&&(m.value=!1,ce.preventDefault(),ce.stopPropagation());return}if(qe===ut.down&&(kt.value.handleFocusPicker&&(ce.preventDefault(),ce.stopPropagation()),m.value===!1&&(m.value=!0,await xt()),kt.value.handleFocusPicker)){kt.value.handleFocusPicker();return}if(qe===ut.tab){w=!0;return}if(qe===ut.enter||qe===ut.numpadEnter){(Z.value===null||Z.value===""||pe(le(K.value)))&&(te(),m.value=!1),ce.stopPropagation();return}if(Z.value){ce.stopPropagation();return}kt.value.handleKeydownInput&&kt.value.handleKeydownInput(ce)},Re=ce=>{Z.value=ce,m.value||(m.value=!0)},je=ce=>{const qe=ce.target;Z.value?Z.value=[qe.value,Z.value[1]]:Z.value=[qe.value,null]},Ke=ce=>{const qe=ce.target;Z.value?Z.value=[Z.value[0],qe.value]:Z.value=[null,qe.value]},Je=()=>{var ce;const qe=Z.value,Mt=le(qe&&qe[0]),Zt=p(G);if(Mt&&Mt.isValid()){Z.value=[Te(Mt),((ce=K.value)==null?void 0:ce[1])||null];const Sn=[Mt,Zt&&(Zt[1]||null)];pe(Sn)&&(P(lO(Sn)),Z.value=null)}},at=()=>{var ce;const qe=p(Z),Mt=le(qe&&qe[1]),Zt=p(G);if(Mt&&Mt.isValid()){Z.value=[((ce=p(K))==null?void 0:ce[0])||null,Te(Mt)];const Sn=[Zt&&Zt[0],Mt];pe(Sn)&&(P(lO(Sn)),Z.value=null)}},kt=F({}),jt=ce=>{kt.value[ce[0]]=ce[1],kt.value.panelReady=!0},Pe=ce=>{n("calendar-change",ce)},nt=(ce,qe,Mt)=>{n("panel-change",ce,qe,Mt)},fe=()=>{var ce;(ce=g.value)==null||ce.focus()},De=()=>{var ce;(ce=g.value)==null||ce.blur()};return gn("EP_PICKER_BASE",{props:r}),e({focus:fe,blur:De,handleOpen:X,handleClose:Q,onPick:N}),(ce,qe)=>(R(),xe(p(Hi),an({ref_key:"refPopper",ref:h,visible:m.value,effect:"light",pure:"",trigger:"click"},ce.$attrs,{role:"dialog",teleported:"",transition:`${p(a).namespace.value}-zoom-in-top`,"popper-class":[`${p(a).namespace.value}-picker__popper`,ce.popperClass],"popper-options":p(d),"fallback-placements":ce.fallbackPlacements,"gpu-acceleration":!1,placement:ce.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:z,onShow:I,onHide:L}),{default:j(()=>[p(Ie)?(R(),xe(TRe,{key:1,id:ce.id,ref_key:"inputRef",ref:g,"model-value":p(K),name:ce.name,disabled:p(W),readonly:!ce.editable||ce.readonly,"start-placeholder":ce.startPlaceholder,"end-placeholder":ce.endPlaceholder,class:V(p(C)),style:vt(ce.$attrs.style),"aria-label":ce.ariaLabel,tabindex:ce.tabindex,autocomplete:"off",role:"combobox",onClick:Me,onFocus:p(x),onBlur:p(S),onStartInput:je,onStartChange:Je,onEndInput:Ke,onEndChange:at,onMousedown:Me,onMouseenter:q,onMouseleave:de,onTouchstartPassive:ke,onKeydown:Oe},{prefix:j(()=>[p(ie)?(R(),xe(p(mt),{key:0,class:V([p(s).e("icon"),p(l).e("icon")])},{default:j(()=>[(R(),xe(on(p(ie))))]),_:1},8,["class"])):Se("v-if",!0)]),"range-separator":j(()=>[Ee(ce.$slots,"range-separator",{},()=>[J("span",{class:V(p(l).b("separator"))},Ve(ce.rangeSeparator),3)])]),suffix:j(()=>[ce.clearIcon?(R(),xe(p(mt),{key:0,class:V(p(E)),onMousedown:At(p(ir),["prevent"]),onClick:he},{default:j(()=>[(R(),xe(on(ce.clearIcon)))]),_:1},8,["class","onMousedown"])):Se("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(R(),xe(p(hi),{key:0,id:ce.id,ref_key:"inputRef",ref:g,"container-role":"combobox","model-value":p(K),name:ce.name,size:p(se),disabled:p(W),placeholder:ce.placeholder,class:V([p(a).b("editor"),p(a).bm("editor",ce.type),ce.$attrs.class]),style:vt(ce.$attrs.style),readonly:!ce.editable||ce.readonly||p(_e)||p(Ce)||p(U)||ce.type==="week","aria-label":ce.ariaLabel,tabindex:ce.tabindex,"validate-event":!1,onInput:Re,onFocus:p(x),onBlur:p(S),onKeydown:Oe,onChange:te,onMousedown:Me,onMouseenter:q,onMouseleave:de,onTouchstartPassive:ke,onClick:At(()=>{},["stop"])},{prefix:j(()=>[p(ie)?(R(),xe(p(mt),{key:0,class:V(p(s).e("icon")),onMousedown:At(Me,["prevent"]),onTouchstartPassive:ke},{default:j(()=>[(R(),xe(on(p(ie))))]),_:1},8,["class","onMousedown"])):Se("v-if",!0)]),suffix:j(()=>[ee.value&&ce.clearIcon?(R(),xe(p(mt),{key:0,class:V(`${p(s).e("icon")} clear-icon`),onMousedown:At(p(ir),["prevent"]),onClick:he},{default:j(()=>[(R(),xe(on(ce.clearIcon)))]),_:1},8,["class","onMousedown"])):Se("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))]),content:j(()=>[Ee(ce.$slots,"default",{visible:m.value,actualVisible:y.value,parsedValue:p(G),format:ce.format,dateFormat:ce.dateFormat,timeFormat:ce.timeFormat,unlinkPanels:ce.unlinkPanels,type:ce.type,defaultValue:ce.defaultValue,showNow:ce.showNow,onPick:N,onSelectRange:$,onSetPickerOption:jt,onCalendarChange:Pe,onPanelChange:nt,onMousedown:At(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var kH=Ye(PRe,[["__file","picker.vue"]]);const ARe=Ze({...TH,datetimeRole:String,parsedValue:{type:we(Object)}}),PH=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const r=(a,s,l,u)=>{const c={hour:t,minute:e,second:n};let d=a;return["hour","minute","second"].forEach(f=>{if(c[f]){let h;const g=c[f];switch(f){case"minute":{h=g(d.hour(),s,u);break}case"second":{h=g(d.hour(),d.minute(),s,u);break}default:{h=g(s,u);break}}if((h==null?void 0:h.length)&&!h.includes(d[f]())){const m=l?0:h.length-1;d=d[f](h[m])}}}),d},i={};return{timePickerOptions:i,getAvailableTime:r,onSetOption:([a,s])=>{i[a]=s}}},MT=t=>{const e=(r,i)=>r||i,n=r=>r!==!0;return t.map(e).filter(n)},AH=(t,e,n)=>({getHoursList:(a,s)=>TT(24,t&&(()=>t==null?void 0:t(a,s))),getMinutesList:(a,s,l)=>TT(60,e&&(()=>e==null?void 0:e(a,s,l))),getSecondsList:(a,s,l,u)=>TT(60,n&&(()=>n==null?void 0:n(a,s,l,u)))}),MH=(t,e,n)=>{const{getHoursList:r,getMinutesList:i,getSecondsList:o}=AH(t,e,n);return{getAvailableHours:(u,c)=>MT(r(u,c)),getAvailableMinutes:(u,c,d)=>MT(i(u,c,d)),getAvailableSeconds:(u,c,d,f)=>MT(o(u,c,d,f))}},RH=t=>{const e=F(t.parsedValue);return Fe(()=>t.visible,n=>{n||(e.value=t.parsedValue)}),e},MRe=Ze({role:{type:String,required:!0},spinnerDate:{type:we(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:we(String),default:""},...EH}),RRe=100,$Re=600,_w={beforeMount(t,e){const n=e.value,{interval:r=RRe,delay:i=$Re}=St(n)?{}:n;let o,a;const s=()=>St(n)?n():n.handler(),l=()=>{a&&(clearTimeout(a),a=void 0),o&&(clearInterval(o),o=void 0)};t.addEventListener("mousedown",u=>{u.button===0&&(l(),s(),document.addEventListener("mouseup",()=>l(),{once:!0}),a=setTimeout(()=>{o=setInterval(()=>{s()},r)},i))})}},NRe=ue({__name:"basic-time-spinner",props:MRe,emits:["change","select-range","set-option"],setup(t,{emit:e}){const n=t,r=ht("EP_PICKER_BASE"),{isRange:i}=r.props,o=Qe("time"),{getHoursList:a,getMinutesList:s,getSecondsList:l}=AH(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let u=!1;const c=F(),d=F(),f=F(),h=F(),g={hours:d,minutes:f,seconds:h},m=M(()=>n.showSeconds?fB:fB.slice(0,2)),y=M(()=>{const{spinnerDate:K}=n,oe=K.hour(),ne=K.minute(),_e=K.second();return{hours:oe,minutes:ne,seconds:_e}}),b=M(()=>{const{hours:K,minutes:oe}=p(y),{role:ne,spinnerDate:_e}=n,Ce=i?void 0:_e;return{hours:a(ne,Ce),minutes:s(K,ne,Ce),seconds:l(K,oe,ne,Ce)}}),w=M(()=>{const{hours:K,minutes:oe,seconds:ne}=p(y);return{hours:ET(K,23),minutes:ET(oe,59),seconds:ET(ne,59)}}),O=Qo(K=>{u=!1,C(K)},200),x=K=>{if(!!!n.amPmMode)return"";const ne=n.amPmMode==="A";let _e=K<12?" am":" pm";return ne&&(_e=_e.toUpperCase()),_e},S=K=>{let oe;switch(K){case"hours":oe=[0,2];break;case"minutes":oe=[3,5];break;case"seconds":oe=[6,8];break}const[ne,_e]=oe;e("select-range",ne,_e),c.value=K},C=K=>{P(K,p(y)[K])},E=()=>{C("hours"),C("minutes"),C("seconds")},T=K=>K.querySelector(`.${o.namespace.value}-scrollbar__wrap`),P=(K,oe)=>{if(n.arrowControl)return;const ne=p(g[K]);ne&&ne.$el&&(T(ne.$el).scrollTop=Math.max(0,oe*A(K)))},A=K=>{const oe=p(g[K]),ne=oe==null?void 0:oe.$el.querySelector("li");return ne&&Number.parseFloat(Fc(ne,"height"))||0},D=()=>{N(1)},$=()=>{N(-1)},N=K=>{c.value||S("hours");const oe=c.value,ne=p(y)[oe],_e=c.value==="hours"?24:60,Ce=z(oe,ne,K,_e);I(oe,Ce),P(oe,Ce),xt(()=>S(oe))},z=(K,oe,ne,_e)=>{let Ce=(oe+ne+_e)%_e;const U=p(b)[K];for(;U[Ce]&&Ce!==oe;)Ce=(Ce+ne+_e)%_e;return Ce},I=(K,oe)=>{if(p(b)[K][oe])return;const{hours:Ce,minutes:U,seconds:ie}=p(y);let ee;switch(K){case"hours":ee=n.spinnerDate.hour(oe).minute(U).second(ie);break;case"minutes":ee=n.spinnerDate.hour(Ce).minute(oe).second(ie);break;case"seconds":ee=n.spinnerDate.hour(Ce).minute(U).second(oe);break}e("change",ee)},L=(K,{value:oe,disabled:ne})=>{ne||(I(K,oe),S(K),P(K,oe))},X=K=>{const oe=p(g[K]);if(!oe)return;u=!0,O(K);const ne=Math.min(Math.round((T(oe.$el).scrollTop-(Q(K)*.5-10)/A(K)+3)/A(K)),K==="hours"?23:59);I(K,ne)},Q=K=>p(g[K]).$el.offsetHeight,W=()=>{const K=oe=>{const ne=p(g[oe]);ne&&ne.$el&&(T(ne.$el).onscroll=()=>{X(oe)})};K("hours"),K("minutes"),K("seconds")};Ft(()=>{xt(()=>{!n.arrowControl&&W(),E(),n.role==="start"&&S("hours")})});const G=(K,oe)=>{g[oe].value=K!=null?K:void 0};return e("set-option",[`${n.role}_scrollDown`,N]),e("set-option",[`${n.role}_emitSelectRange`,S]),Fe(()=>n.spinnerDate,()=>{u||E()}),(K,oe)=>(R(),Y("div",{class:V([p(o).b("spinner"),{"has-seconds":K.showSeconds}])},[K.arrowControl?Se("v-if",!0):(R(!0),Y(dt,{key:0},Ht(p(m),ne=>(R(),xe(p(gu),{key:ne,ref_for:!0,ref:_e=>G(_e,ne),class:V(p(o).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":p(o).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:_e=>S(ne),onMousemove:_e=>C(ne)},{default:j(()=>[(R(!0),Y(dt,null,Ht(p(b)[ne],(_e,Ce)=>(R(),Y("li",{key:Ce,class:V([p(o).be("spinner","item"),p(o).is("active",Ce===p(y)[ne]),p(o).is("disabled",_e)]),onClick:U=>L(ne,{value:Ce,disabled:_e})},[ne==="hours"?(R(),Y(dt,{key:0},[Ue(Ve(("0"+(K.amPmMode?Ce%12||12:Ce)).slice(-2))+Ve(x(Ce)),1)],64)):(R(),Y(dt,{key:1},[Ue(Ve(("0"+Ce).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),K.arrowControl?(R(!0),Y(dt,{key:1},Ht(p(m),ne=>(R(),Y("div",{key:ne,class:V([p(o).be("spinner","wrapper"),p(o).is("arrow")]),onMouseenter:_e=>S(ne)},[zt((R(),xe(p(mt),{class:V(["arrow-up",p(o).be("spinner","arrow")])},{default:j(()=>[B(p(a$))]),_:1},8,["class"])),[[p(_w),$]]),zt((R(),xe(p(mt),{class:V(["arrow-down",p(o).be("spinner","arrow")])},{default:j(()=>[B(p(hd))]),_:1},8,["class"])),[[p(_w),D]]),J("ul",{class:V(p(o).be("spinner","list"))},[(R(!0),Y(dt,null,Ht(p(w)[ne],(_e,Ce)=>(R(),Y("li",{key:Ce,class:V([p(o).be("spinner","item"),p(o).is("active",_e===p(y)[ne]),p(o).is("disabled",p(b)[ne][_e])])},[p(Et)(_e)?(R(),Y(dt,{key:0},[ne==="hours"?(R(),Y(dt,{key:0},[Ue(Ve(("0"+(K.amPmMode?_e%12||12:_e)).slice(-2))+Ve(x(_e)),1)],64)):(R(),Y(dt,{key:1},[Ue(Ve(("0"+_e).slice(-2)),1)],64))],64)):Se("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):Se("v-if",!0)],2))}});var Nk=Ye(NRe,[["__file","basic-time-spinner.vue"]]);const DRe=ue({__name:"panel-time-pick",props:ARe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,r=ht("EP_PICKER_BASE"),{arrowControl:i,disabledHours:o,disabledMinutes:a,disabledSeconds:s,defaultValue:l}=r.props,{getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}=MH(o,a,s),f=Qe("time"),{t:h,lang:g}=xn(),m=F([0,2]),y=RH(n),b=M(()=>ar(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),w=M(()=>n.format.includes("ss")),O=M(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),x=Q=>{const W=It(Q).locale(g.value),G=z(W);return W.isSame(G)},S=()=>{e("pick",y.value,!1)},C=(Q=!1,W=!1)=>{W||e("pick",n.parsedValue,Q)},E=Q=>{if(!n.visible)return;const W=z(Q).millisecond(0);e("pick",W,!0)},T=(Q,W)=>{e("select-range",Q,W),m.value=[Q,W]},P=Q=>{const W=[0,3].concat(w.value?[6]:[]),G=["hours","minutes"].concat(w.value?["seconds"]:[]),oe=(W.indexOf(m.value[0])+Q+W.length)%W.length;D.start_emitSelectRange(G[oe])},A=Q=>{const W=Q.code,{left:G,right:K,up:oe,down:ne}=ut;if([G,K].includes(W)){P(W===G?-1:1),Q.preventDefault();return}if([oe,ne].includes(W)){const _e=W===oe?-1:1;D.start_scrollDown(_e),Q.preventDefault();return}},{timePickerOptions:D,onSetOption:$,getAvailableTime:N}=PH({getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}),z=Q=>N(Q,n.datetimeRole||"",!0),I=Q=>Q?It(Q,n.format).locale(g.value):null,L=Q=>Q?Q.format(n.format):null,X=()=>It(l).locale(g.value);return e("set-picker-option",["isValidValue",x]),e("set-picker-option",["formatToString",L]),e("set-picker-option",["parseUserInput",I]),e("set-picker-option",["handleKeydownInput",A]),e("set-picker-option",["getRangeAvailableTime",z]),e("set-picker-option",["getDefaultValue",X]),(Q,W)=>(R(),xe(zi,{name:p(b)},{default:j(()=>[Q.actualVisible||Q.visible?(R(),Y("div",{key:0,class:V(p(f).b("panel"))},[J("div",{class:V([p(f).be("panel","content"),{"has-seconds":p(w)}])},[B(Nk,{ref:"spinner",role:Q.datetimeRole||"start","arrow-control":p(i),"show-seconds":p(w),"am-pm-mode":p(O),"spinner-date":Q.parsedValue,"disabled-hours":p(o),"disabled-minutes":p(a),"disabled-seconds":p(s),onChange:E,onSetOption:p($),onSelectRange:T},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),J("div",{class:V(p(f).be("panel","footer"))},[J("button",{type:"button",class:V([p(f).be("panel","btn"),"cancel"]),onClick:S},Ve(p(h)("el.datepicker.cancel")),3),J("button",{type:"button",class:V([p(f).be("panel","btn"),"confirm"]),onClick:G=>C()},Ve(p(h)("el.datepicker.confirm")),11,["onClick"])],2)],2)):Se("v-if",!0)]),_:1},8,["name"]))}});var Ow=Ye(DRe,[["__file","panel-time-pick.vue"]]);const LRe=Ze({...TH,parsedValue:{type:we(Array)}}),IRe=ue({__name:"panel-time-range",props:LRe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,r=(Me,q)=>{const de=[];for(let ke=Me;ke<=q;ke++)de.push(ke);return de},{t:i,lang:o}=xn(),a=Qe("time"),s=Qe("picker"),l=ht("EP_PICKER_BASE"),{arrowControl:u,disabledHours:c,disabledMinutes:d,disabledSeconds:f,defaultValue:h}=l.props,g=M(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),x.value?"has-seconds":""]),m=M(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),x.value?"has-seconds":""]),y=M(()=>n.parsedValue[0]),b=M(()=>n.parsedValue[1]),w=RH(n),O=()=>{e("pick",w.value,!1)},x=M(()=>n.format.includes("ss")),S=M(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),C=(Me=!1)=>{e("pick",[y.value,b.value],Me)},E=Me=>{A(Me.millisecond(0),b.value)},T=Me=>{A(y.value,Me.millisecond(0))},P=Me=>{const q=Me.map(ke=>It(ke).locale(o.value)),de=K(q);return q[0].isSame(de[0])&&q[1].isSame(de[1])},A=(Me,q)=>{!n.visible||e("pick",[Me,q],!0)},D=M(()=>y.value>b.value),$=F([0,2]),N=(Me,q)=>{e("select-range",Me,q,"min"),$.value=[Me,q]},z=M(()=>x.value?11:8),I=(Me,q)=>{e("select-range",Me,q,"max");const de=p(z);$.value=[Me+de,q+de]},L=Me=>{const q=x.value?[0,3,6,11,14,17]:[0,3,8,11],de=["hours","minutes"].concat(x.value?["seconds"]:[]),Ie=(q.indexOf($.value[0])+Me+q.length)%q.length,se=q.length/2;Ie<se?Ce.start_emitSelectRange(de[Ie]):Ce.end_emitSelectRange(de[Ie-se])},X=Me=>{const q=Me.code,{left:de,right:ke,up:Ie,down:se}=ut;if([de,ke].includes(q)){L(q===de?-1:1),Me.preventDefault();return}if([Ie,se].includes(q)){const ye=q===Ie?-1:1,Ae=$.value[0]<z.value?"start":"end";Ce[`${Ae}_scrollDown`](ye),Me.preventDefault();return}},Q=(Me,q)=>{const de=c?c(Me):[],ke=Me==="start",se=(q||(ke?b.value:y.value)).hour(),ye=ke?r(se+1,23):r(0,se-1);return b1(de,ye)},W=(Me,q,de)=>{const ke=d?d(Me,q):[],Ie=q==="start",se=de||(Ie?b.value:y.value),ye=se.hour();if(Me!==ye)return ke;const Ae=se.minute(),Z=Ie?r(Ae+1,59):r(0,Ae-1);return b1(ke,Z)},G=(Me,q,de,ke)=>{const Ie=f?f(Me,q,de):[],se=de==="start",ye=ke||(se?b.value:y.value),Ae=ye.hour(),Z=ye.minute();if(Me!==Ae||q!==Z)return Ie;const te=ye.second(),le=se?r(te+1,59):r(0,te-1);return b1(Ie,le)},K=([Me,q])=>[U(Me,"start",!0,q),U(q,"end",!1,Me)],{getAvailableHours:oe,getAvailableMinutes:ne,getAvailableSeconds:_e}=MH(Q,W,G),{timePickerOptions:Ce,getAvailableTime:U,onSetOption:ie}=PH({getAvailableHours:oe,getAvailableMinutes:ne,getAvailableSeconds:_e}),ee=Me=>Me?Xe(Me)?Me.map(q=>It(q,n.format).locale(o.value)):It(Me,n.format).locale(o.value):null,he=Me=>Me?Xe(Me)?Me.map(q=>q.format(n.format)):Me.format(n.format):null,$e=()=>{if(Xe(h))return h.map(q=>It(q).locale(o.value));const Me=It(h).locale(o.value);return[Me,Me.add(60,"m")]};return e("set-picker-option",["formatToString",he]),e("set-picker-option",["parseUserInput",ee]),e("set-picker-option",["isValidValue",P]),e("set-picker-option",["handleKeydownInput",X]),e("set-picker-option",["getDefaultValue",$e]),e("set-picker-option",["getRangeAvailableTime",K]),(Me,q)=>Me.actualVisible?(R(),Y("div",{key:0,class:V([p(a).b("range-picker"),p(s).b("panel")])},[J("div",{class:V(p(a).be("range-picker","content"))},[J("div",{class:V(p(a).be("range-picker","cell"))},[J("div",{class:V(p(a).be("range-picker","header"))},Ve(p(i)("el.datepicker.startTime")),3),J("div",{class:V(p(g))},[B(Nk,{ref:"minSpinner",role:"start","show-seconds":p(x),"am-pm-mode":p(S),"arrow-control":p(u),"spinner-date":p(y),"disabled-hours":Q,"disabled-minutes":W,"disabled-seconds":G,onChange:E,onSetOption:p(ie),onSelectRange:N},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),J("div",{class:V(p(a).be("range-picker","cell"))},[J("div",{class:V(p(a).be("range-picker","header"))},Ve(p(i)("el.datepicker.endTime")),3),J("div",{class:V(p(m))},[B(Nk,{ref:"maxSpinner",role:"end","show-seconds":p(x),"am-pm-mode":p(S),"arrow-control":p(u),"spinner-date":p(b),"disabled-hours":Q,"disabled-minutes":W,"disabled-seconds":G,onChange:T,onSetOption:p(ie),onSelectRange:I},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),J("div",{class:V(p(a).be("panel","footer"))},[J("button",{type:"button",class:V([p(a).be("panel","btn"),"cancel"]),onClick:de=>O()},Ve(p(i)("el.datepicker.cancel")),11,["onClick"]),J("button",{type:"button",class:V([p(a).be("panel","btn"),"confirm"]),disabled:p(D),onClick:de=>C()},Ve(p(i)("el.datepicker.confirm")),11,["disabled","onClick"])],2)],2)):Se("v-if",!0)}});var BRe=Ye(IRe,[["__file","panel-time-range.vue"]]);It.extend(N$);var FRe=ue({name:"ElTimePicker",install:null,props:{...D$,isRange:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,e){const n=F(),[r,i]=t.isRange?["timerange",BRe]:["time",Ow],o=a=>e.emit("update:modelValue",a);return gn("ElPopperOptions",t.popperOptions),e.expose({focus:()=>{var a;(a=n.value)==null||a.focus()},blur:()=>{var a;(a=n.value)==null||a.blur()},handleOpen:()=>{var a;(a=n.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=n.value)==null||a.handleClose()}}),()=>{var a;const s=(a=t.format)!=null?a:$k;return B(kH,an(t,{ref:n,type:r,format:s,"onUpdate:modelValue":o}),{default:l=>B(i,l,null)})}}});const VRe=Vt(FRe),JS=Symbol(),jRe=Ze({...D$,type:{type:we(String),default:"date"}}),QRe=["date","dates","year","years","month","months","week","range"],L$=Ze({disabledDate:{type:we(Function)},date:{type:we(Object),required:!0},minDate:{type:we(Object)},maxDate:{type:we(Object)},parsedValue:{type:we([Object,Array])},rangeState:{type:we(Object),default:()=>({endDate:null,selecting:!1})}}),$H=Ze({type:{type:we(String),required:!0,values:yPe},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0}}),I$=Ze({unlinkPanels:Boolean,parsedValue:{type:we(Array)}}),B$=t=>({type:String,values:QRe,default:t}),zRe=Ze({...$H,parsedValue:{type:we([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),nm=t=>{if(!Xe(t))return!1;const[e,n]=t;return It.isDayjs(e)&&It.isDayjs(n)&&e.isSameOrBefore(n)},F$=(t,{lang:e,unit:n,unlinkPanels:r})=>{let i;if(Xe(t)){let[o,a]=t.map(s=>It(s).locale(e));return r||(a=o.add(1,n)),[o,a]}else t?i=It(t):i=It();return i=i.locale(e),[i,i.add(1,n)]},WRe=(t,e,{columnIndexOffset:n,startDate:r,nextEndDate:i,now:o,unit:a,relativeDateGetter:s,setCellMetadata:l,setRowMetadata:u})=>{for(let c=0;c<t.row;c++){const d=e[c];for(let f=0;f<t.column;f++){let h=d[f+n];h||(h={row:c,column:f,type:"normal",inRange:!1,start:!1,end:!1});const g=c*t.column+f,m=s(g);h.dayjs=m,h.date=m.toDate(),h.timestamp=m.valueOf(),h.type="normal",h.inRange=!!(r&&m.isSameOrAfter(r,a)&&i&&m.isSameOrBefore(i,a))||!!(r&&m.isSameOrBefore(r,a)&&i&&m.isSameOrAfter(i,a)),r!=null&&r.isSameOrAfter(i)?(h.start=!!i&&m.isSame(i,a),h.end=r&&m.isSame(r,a)):(h.start=!!r&&m.isSame(r,a),h.end=!!i&&m.isSame(i,a)),m.isSame(o,a)&&(h.type="today"),l==null||l(h,{rowIndex:c,columnIndex:f}),d[f+n]=h}u==null||u(d)}},ww=(t,e,n)=>{const r=It().locale(n).startOf("month").month(e).year(t),i=r.daysInMonth();return rf(i).map(o=>r.add(o,"day").toDate())},_0=(t,e,n,r)=>{const i=It().year(t).month(e).startOf("month"),o=ww(t,e,n).find(a=>!(r!=null&&r(a)));return o?It(o).locale(n):i.locale(n)},Dk=(t,e,n)=>{const r=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const i=t.month();if(!ww(r,i,e).every(n))return _0(r,i,e,n);for(let o=0;o<12;o++)if(!ww(r,o,e).every(n))return _0(r,o,e,n);return t},HRe=Ze({...L$,cellClassName:{type:we(Function)},showWeekNumber:Boolean,selectionMode:B$("date")}),URe=["changerange","pick","select"],Lk=(t="")=>["normal","today"].includes(t),XRe=(t,e)=>{const{lang:n}=xn(),r=F(),i=F(),o=F(),a=F(),s=F([[],[],[],[],[],[]]);let l=!1;const u=t.date.$locale().weekStart||7,c=t.date.locale("en").localeData().weekdaysShort().map(W=>W.toLowerCase()),d=M(()=>u>3?7-u:-u),f=M(()=>{const W=t.date.startOf("month");return W.subtract(W.day()||7,"day")}),h=M(()=>c.concat(c).slice(u,u+7)),g=M(()=>dR(p(x)).some(W=>W.isCurrent)),m=M(()=>{const W=t.date.startOf("month"),G=W.day()||7,K=W.daysInMonth(),oe=W.subtract(1,"month").daysInMonth();return{startOfMonthDay:G,dateCountOfMonth:K,dateCountOfLastMonth:oe}}),y=M(()=>t.selectionMode==="dates"?ya(t.parsedValue):[]),b=(W,{count:G,rowIndex:K,columnIndex:oe})=>{const{startOfMonthDay:ne,dateCountOfMonth:_e,dateCountOfLastMonth:Ce}=p(m),U=p(d);if(K>=0&&K<=1){const ie=ne+U<0?7+ne+U:ne+U;if(oe+K*7>=ie)return W.text=G,!0;W.text=Ce-(ie-oe%7)+1+K*7,W.type="prev-month"}else return G<=_e?W.text=G:(W.text=G-_e,W.type="next-month"),!0;return!1},w=(W,{columnIndex:G,rowIndex:K},oe)=>{const{disabledDate:ne,cellClassName:_e}=t,Ce=p(y),U=b(W,{count:oe,rowIndex:K,columnIndex:G}),ie=W.dayjs.toDate();return W.selected=Ce.find(ee=>ee.isSame(W.dayjs,"day")),W.isSelected=!!W.selected,W.isCurrent=C(W),W.disabled=ne==null?void 0:ne(ie),W.customClass=_e==null?void 0:_e(ie),U},O=W=>{if(t.selectionMode==="week"){const[G,K]=t.showWeekNumber?[1,7]:[0,6],oe=Q(W[G+1]);W[G].inRange=oe,W[G].start=oe,W[K].inRange=oe,W[K].end=oe}},x=M(()=>{const{minDate:W,maxDate:G,rangeState:K,showWeekNumber:oe}=t,ne=p(d),_e=p(s),Ce="day";let U=1;if(oe)for(let ie=0;ie<6;ie++)_e[ie][0]||(_e[ie][0]={type:"week",text:p(f).add(ie*7+1,Ce).week()});return WRe({row:6,column:7},_e,{startDate:W,columnIndexOffset:oe?1:0,nextEndDate:K.endDate||G||K.selecting&&W||null,now:It().locale(p(n)).startOf(Ce),unit:Ce,relativeDateGetter:ie=>p(f).add(ie-ne,Ce),setCellMetadata:(...ie)=>{w(...ie,U)&&(U+=1)},setRowMetadata:O}),_e});Fe(()=>t.date,async()=>{var W;(W=p(r))!=null&&W.contains(document.activeElement)&&(await xt(),await S())});const S=async()=>{var W;return(W=p(i))==null?void 0:W.focus()},C=W=>t.selectionMode==="date"&&Lk(W.type)&&E(W,t.parsedValue),E=(W,G)=>G?It(G).locale(p(n)).isSame(t.date.date(Number(W.text)),"day"):!1,T=(W,G)=>{const K=W*7+(G-(t.showWeekNumber?1:0))-p(d);return p(f).add(K,"day")},P=W=>{var G;if(!t.rangeState.selecting)return;let K=W.target;if(K.tagName==="SPAN"&&(K=(G=K.parentNode)==null?void 0:G.parentNode),K.tagName==="DIV"&&(K=K.parentNode),K.tagName!=="TD")return;const oe=K.parentNode.rowIndex-1,ne=K.cellIndex;p(x)[oe][ne].disabled||(oe!==p(o)||ne!==p(a))&&(o.value=oe,a.value=ne,e("changerange",{selecting:!0,endDate:T(oe,ne)}))},A=W=>!p(g)&&(W==null?void 0:W.text)===1&&W.type==="normal"||W.isCurrent,D=W=>{l||p(g)||t.selectionMode!=="date"||X(W,!0)},$=W=>{!W.target.closest("td")||(l=!0)},N=W=>{!W.target.closest("td")||(l=!1)},z=W=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:W,maxDate:null}),e("select",!0)):(W>=t.minDate?e("pick",{minDate:t.minDate,maxDate:W}):e("pick",{minDate:W,maxDate:t.minDate}),e("select",!1))},I=W=>{const G=W.week(),K=`${W.year()}w${G}`;e("pick",{year:W.year(),week:G,value:K,date:W.startOf("week")})},L=(W,G)=>{const K=G?ya(t.parsedValue).filter(oe=>(oe==null?void 0:oe.valueOf())!==W.valueOf()):ya(t.parsedValue).concat([W]);e("pick",K)},X=(W,G=!1)=>{const K=W.target.closest("td");if(!K)return;const oe=K.parentNode.rowIndex-1,ne=K.cellIndex,_e=p(x)[oe][ne];if(_e.disabled||_e.type==="week")return;const Ce=T(oe,ne);switch(t.selectionMode){case"range":{z(Ce);break}case"date":{e("pick",Ce,G);break}case"week":{I(Ce);break}case"dates":{L(Ce,!!_e.selected);break}}},Q=W=>{if(t.selectionMode!=="week")return!1;let G=t.date.startOf("day");if(W.type==="prev-month"&&(G=G.subtract(1,"month")),W.type==="next-month"&&(G=G.add(1,"month")),G=G.date(Number.parseInt(W.text,10)),t.parsedValue&&!Xe(t.parsedValue)){const K=(t.parsedValue.day()-u+7)%7-1;return t.parsedValue.subtract(K,"day").isSame(G,"day")}return!1};return{WEEKS:h,rows:x,tbodyRef:r,currentCellRef:i,focus:S,isCurrent:C,isWeekActive:Q,isSelectedCell:A,handlePickDate:X,handleMouseUp:N,handleMouseDown:$,handleMouseMove:P,handleFocus:D}},ZRe=(t,{isCurrent:e,isWeekActive:n})=>{const r=Qe("date-table"),{t:i}=xn(),o=M(()=>[r.b(),{"is-week-mode":t.selectionMode==="week"}]),a=M(()=>i("el.datepicker.dateTablePrompt")),s=M(()=>i("el.datepicker.week"));return{tableKls:o,tableLabel:a,weekLabel:s,getCellClasses:c=>{const d=[];return Lk(c.type)&&!c.disabled?(d.push("available"),c.type==="today"&&d.push("today")):d.push(c.type),e(c)&&d.push("current"),c.inRange&&(Lk(c.type)||t.selectionMode==="week")&&(d.push("in-range"),c.start&&d.push("start-date"),c.end&&d.push("end-date")),c.disabled&&d.push("disabled"),c.selected&&d.push("selected"),c.customClass&&d.push(c.customClass),d.join(" ")},getRowKls:c=>[r.e("row"),{current:n(c)}],t:i}},qRe=Ze({cell:{type:we(Object)}});var V$=ue({name:"ElDatePickerCell",props:qRe,setup(t){const e=Qe("date-table-cell"),{slots:n}=ht(JS);return()=>{const{cell:r}=t;return Ee(n,"default",{...r},()=>{var i;return[B("div",{class:e.b()},[B("span",{class:e.e("text")},[(i=r==null?void 0:r.renderText)!=null?i:r==null?void 0:r.text])])]})}}});const YRe=ue({__name:"basic-date-table",props:HRe,emits:URe,setup(t,{expose:e,emit:n}){const r=t,{WEEKS:i,rows:o,tbodyRef:a,currentCellRef:s,focus:l,isCurrent:u,isWeekActive:c,isSelectedCell:d,handlePickDate:f,handleMouseUp:h,handleMouseDown:g,handleMouseMove:m,handleFocus:y}=XRe(r,n),{tableLabel:b,tableKls:w,weekLabel:O,getCellClasses:x,getRowKls:S,t:C}=ZRe(r,{isCurrent:u,isWeekActive:c});return e({focus:l}),(E,T)=>(R(),Y("table",{"aria-label":p(b),class:V(p(w)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:p(f),onMousemove:p(m),onMousedown:At(p(g),["prevent"]),onMouseup:p(h)},[J("tbody",{ref_key:"tbodyRef",ref:a},[J("tr",null,[E.showWeekNumber?(R(),Y("th",{key:0,scope:"col"},Ve(p(O)),1)):Se("v-if",!0),(R(!0),Y(dt,null,Ht(p(i),(P,A)=>(R(),Y("th",{key:A,"aria-label":p(C)("el.datepicker.weeksFull."+P),scope:"col"},Ve(p(C)("el.datepicker.weeks."+P)),9,["aria-label"]))),128))]),(R(!0),Y(dt,null,Ht(p(o),(P,A)=>(R(),Y("tr",{key:A,class:V(p(S)(P[1]))},[(R(!0),Y(dt,null,Ht(P,(D,$)=>(R(),Y("td",{key:`${A}.${$}`,ref_for:!0,ref:N=>p(d)(D)&&(s.value=N),class:V(p(x)(D)),"aria-current":D.isCurrent?"date":void 0,"aria-selected":D.isCurrent,tabindex:p(d)(D)?0:-1,onFocus:p(y)},[B(p(V$),{cell:D},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var Ik=Ye(YRe,[["__file","basic-date-table.vue"]]);const GRe=Ze({...L$,selectionMode:B$("month")}),KRe=ue({__name:"basic-month-table",props:GRe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,i=Qe("month-table"),{t:o,lang:a}=xn(),s=F(),l=F(),u=F(r.date.locale("en").localeData().monthsShort().map(O=>O.toLowerCase())),c=F([[],[],[]]),d=F(),f=F(),h=M(()=>{var O,x;const S=c.value,C=It().locale(a.value).startOf("month");for(let E=0;E<3;E++){const T=S[E];for(let P=0;P<4;P++){const A=T[P]||(T[P]={row:E,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});A.type="normal";const D=E*4+P,$=r.date.startOf("year").month(D),N=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;A.inRange=!!(r.minDate&&$.isSameOrAfter(r.minDate,"month")&&N&&$.isSameOrBefore(N,"month"))||!!(r.minDate&&$.isSameOrBefore(r.minDate,"month")&&N&&$.isSameOrAfter(N,"month")),(O=r.minDate)!=null&&O.isSameOrAfter(N)?(A.start=!!(N&&$.isSame(N,"month")),A.end=r.minDate&&$.isSame(r.minDate,"month")):(A.start=!!(r.minDate&&$.isSame(r.minDate,"month")),A.end=!!(N&&$.isSame(N,"month"))),C.isSame($)&&(A.type="today"),A.text=D,A.disabled=((x=r.disabledDate)==null?void 0:x.call(r,$.toDate()))||!1}}return S}),g=()=>{var O;(O=l.value)==null||O.focus()},m=O=>{const x={},S=r.date.year(),C=new Date,E=O.text;return x.disabled=r.disabledDate?ww(S,E,a.value).every(r.disabledDate):!1,x.current=ya(r.parsedValue).findIndex(T=>It.isDayjs(T)&&T.year()===S&&T.month()===E)>=0,x.today=C.getFullYear()===S&&C.getMonth()===E,O.inRange&&(x["in-range"]=!0,O.start&&(x["start-date"]=!0),O.end&&(x["end-date"]=!0)),x},y=O=>{const x=r.date.year(),S=O.text;return ya(r.date).findIndex(C=>C.year()===x&&C.month()===S)>=0},b=O=>{var x;if(!r.rangeState.selecting)return;let S=O.target;if(S.tagName==="SPAN"&&(S=(x=S.parentNode)==null?void 0:x.parentNode),S.tagName==="DIV"&&(S=S.parentNode),S.tagName!=="TD")return;const C=S.parentNode.rowIndex,E=S.cellIndex;h.value[C][E].disabled||(C!==d.value||E!==f.value)&&(d.value=C,f.value=E,n("changerange",{selecting:!0,endDate:r.date.startOf("year").month(C*4+E)}))},w=O=>{var x;const S=(x=O.target)==null?void 0:x.closest("td");if((S==null?void 0:S.tagName)!=="TD"||Ha(S,"disabled"))return;const C=S.cellIndex,T=S.parentNode.rowIndex*4+C,P=r.date.startOf("year").month(T);if(r.selectionMode==="months"){if(O.type==="keydown"){n("pick",ya(r.parsedValue),!1);return}const A=_0(r.date.year(),T,a.value,r.disabledDate),D=Ha(S,"current")?ya(r.parsedValue).filter($=>($==null?void 0:$.month())!==A.month()):ya(r.parsedValue).concat([It(A)]);n("pick",D)}else r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&P>=r.minDate?n("pick",{minDate:r.minDate,maxDate:P}):n("pick",{minDate:P,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:P,maxDate:null}),n("select",!0)):n("pick",T)};return Fe(()=>r.date,async()=>{var O,x;(O=s.value)!=null&&O.contains(document.activeElement)&&(await xt(),(x=l.value)==null||x.focus())}),e({focus:g}),(O,x)=>(R(),Y("table",{role:"grid","aria-label":p(o)("el.datepicker.monthTablePrompt"),class:V(p(i).b()),onClick:w,onMousemove:b},[J("tbody",{ref_key:"tbodyRef",ref:s},[(R(!0),Y(dt,null,Ht(p(h),(S,C)=>(R(),Y("tr",{key:C},[(R(!0),Y(dt,null,Ht(S,(E,T)=>(R(),Y("td",{key:T,ref_for:!0,ref:P=>y(E)&&(l.value=P),class:V(m(E)),"aria-selected":`${y(E)}`,"aria-label":p(o)(`el.datepicker.month${+E.text+1}`),tabindex:y(E)?0:-1,onKeydown:[br(At(w,["prevent","stop"]),["space"]),br(At(w,["prevent","stop"]),["enter"])]},[B(p(V$),{cell:{...E,renderText:p(o)("el.datepicker.months."+u.value[E.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var Bk=Ye(KRe,[["__file","basic-month-table.vue"]]);const JRe=Ze({...L$,selectionMode:B$("year")}),e$e=ue({__name:"basic-year-table",props:JRe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,i=(x,S)=>{const C=It(String(x)).locale(S).startOf("year"),T=C.endOf("year").dayOfYear();return rf(T).map(P=>C.add(P,"day").toDate())},o=Qe("year-table"),{t:a,lang:s}=xn(),l=F(),u=F(),c=M(()=>Math.floor(r.date.year()/10)*10),d=F([[],[],[]]),f=F(),h=F(),g=M(()=>{var x;const S=d.value,C=It().locale(s.value).startOf("year");for(let E=0;E<3;E++){const T=S[E];for(let P=0;P<4&&!(E*4+P>=10);P++){let A=T[P];A||(A={row:E,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),A.type="normal";const D=E*4+P+c.value,$=It().year(D),N=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;A.inRange=!!(r.minDate&&$.isSameOrAfter(r.minDate,"year")&&N&&$.isSameOrBefore(N,"year"))||!!(r.minDate&&$.isSameOrBefore(r.minDate,"year")&&N&&$.isSameOrAfter(N,"year")),(x=r.minDate)!=null&&x.isSameOrAfter(N)?(A.start=!!(N&&$.isSame(N,"year")),A.end=!!(r.minDate&&$.isSame(r.minDate,"year"))):(A.start=!!(r.minDate&&$.isSame(r.minDate,"year")),A.end=!!(N&&$.isSame(N,"year"))),C.isSame($)&&(A.type="today"),A.text=D;const I=$.toDate();A.disabled=r.disabledDate&&r.disabledDate(I)||!1,T[P]=A}}return S}),m=()=>{var x;(x=u.value)==null||x.focus()},y=x=>{const S={},C=It().locale(s.value),E=x.text;return S.disabled=r.disabledDate?i(E,s.value).every(r.disabledDate):!1,S.today=C.year()===E,S.current=ya(r.parsedValue).findIndex(T=>T.year()===E)>=0,x.inRange&&(S["in-range"]=!0,x.start&&(S["start-date"]=!0),x.end&&(S["end-date"]=!0)),S},b=x=>{const S=x.text;return ya(r.date).findIndex(C=>C.year()===S)>=0},w=x=>{var S;const C=(S=x.target)==null?void 0:S.closest("td");if(!C||!C.textContent||Ha(C,"disabled"))return;const E=C.cellIndex,P=C.parentNode.rowIndex*4+E+c.value,A=It().year(P);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&A>=r.minDate?n("pick",{minDate:r.minDate,maxDate:A}):n("pick",{minDate:A,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:A,maxDate:null}),n("select",!0));else if(r.selectionMode==="years"){if(x.type==="keydown"){n("pick",ya(r.parsedValue),!1);return}const D=Dk(A.startOf("year"),s.value,r.disabledDate),$=Ha(C,"current")?ya(r.parsedValue).filter(N=>(N==null?void 0:N.year())!==P):ya(r.parsedValue).concat([D]);n("pick",$)}else n("pick",P)},O=x=>{var S;if(!r.rangeState.selecting)return;const C=(S=x.target)==null?void 0:S.closest("td");if(!C)return;const E=C.parentNode.rowIndex,T=C.cellIndex;g.value[E][T].disabled||(E!==f.value||T!==h.value)&&(f.value=E,h.value=T,n("changerange",{selecting:!0,endDate:It().year(c.value).add(E*4+T,"year")}))};return Fe(()=>r.date,async()=>{var x,S;(x=l.value)!=null&&x.contains(document.activeElement)&&(await xt(),(S=u.value)==null||S.focus())}),e({focus:m}),(x,S)=>(R(),Y("table",{role:"grid","aria-label":p(a)("el.datepicker.yearTablePrompt"),class:V(p(o).b()),onClick:w,onMousemove:O},[J("tbody",{ref_key:"tbodyRef",ref:l},[(R(!0),Y(dt,null,Ht(p(g),(C,E)=>(R(),Y("tr",{key:E},[(R(!0),Y(dt,null,Ht(C,(T,P)=>(R(),Y("td",{key:`${E}_${P}`,ref_for:!0,ref:A=>b(T)&&(u.value=A),class:V(["available",y(T)]),"aria-selected":b(T),"aria-label":String(T.text),tabindex:b(T)?0:-1,onKeydown:[br(At(w,["prevent","stop"]),["space"]),br(At(w,["prevent","stop"]),["enter"])]},[B(p(V$),{cell:T},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var Fk=Ye(e$e,[["__file","basic-year-table.vue"]]);const t$e=ue({__name:"panel-date-pick",props:zRe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=t,r=(Pe,nt,fe)=>!0,i=Qe("picker-panel"),o=Qe("date-picker"),a=Nf(),s=Ni(),{t:l,lang:u}=xn(),c=ht("EP_PICKER_BASE"),d=ht(qS),{shortcuts:f,disabledDate:h,cellClassName:g,defaultTime:m}=c.props,y=Gn(c.props,"defaultValue"),b=F(),w=F(It().locale(u.value)),O=F(!1);let x=!1;const S=M(()=>It(m).locale(u.value)),C=M(()=>w.value.month()),E=M(()=>w.value.year()),T=F([]),P=F(null),A=F(null),D=Pe=>T.value.length>0?r(Pe,T.value,n.format||"HH:mm:ss"):!0,$=Pe=>m&&!Ie.value&&!O.value&&!x?S.value.year(Pe.year()).month(Pe.month()).date(Pe.date()):ie.value?Pe.millisecond(0):Pe.startOf("day"),N=(Pe,...nt)=>{if(!Pe)e("pick",Pe,...nt);else if(Xe(Pe)){const fe=Pe.map($);e("pick",fe,...nt)}else e("pick",$(Pe),...nt);P.value=null,A.value=null,O.value=!1,x=!1},z=async(Pe,nt)=>{if(G.value==="date"){Pe=Pe;let fe=n.parsedValue?n.parsedValue.year(Pe.year()).month(Pe.month()).date(Pe.date()):Pe;D(fe)||(fe=T.value[0][0].year(Pe.year()).month(Pe.month()).date(Pe.date())),w.value=fe,N(fe,ie.value||nt),n.type==="datetime"&&(await xt(),Je())}else G.value==="week"?N(Pe.date):G.value==="dates"&&N(Pe,!0)},I=Pe=>{const nt=Pe?"add":"subtract";w.value=w.value[nt](1,"month"),jt("month")},L=Pe=>{const nt=w.value,fe=Pe?"add":"subtract";w.value=X.value==="year"?nt[fe](10,"year"):nt[fe](1,"year"),jt("year")},X=F("date"),Q=M(()=>{const Pe=l("el.datepicker.year");if(X.value==="year"){const nt=Math.floor(E.value/10)*10;return Pe?`${nt} ${Pe} - ${nt+9} ${Pe}`:`${nt} - ${nt+9}`}return`${E.value} ${Pe}`}),W=Pe=>{const nt=St(Pe.value)?Pe.value():Pe.value;if(nt){x=!0,N(It(nt).locale(u.value));return}Pe.onClick&&Pe.onClick({attrs:a,slots:s,emit:e})},G=M(()=>{const{type:Pe}=n;return["week","month","months","year","years","dates"].includes(Pe)?Pe:"date"}),K=M(()=>G.value==="dates"||G.value==="months"||G.value==="years"),oe=M(()=>G.value==="date"?X.value:G.value),ne=M(()=>!!f.length),_e=async(Pe,nt)=>{G.value==="month"?(w.value=_0(w.value.year(),Pe,u.value,h),N(w.value,!1)):G.value==="months"?N(Pe,nt!=null?nt:!0):(w.value=_0(w.value.year(),Pe,u.value,h),X.value="date",["month","year","date","week"].includes(G.value)&&(N(w.value,!0),await xt(),Je())),jt("month")},Ce=async(Pe,nt)=>{if(G.value==="year"){const fe=w.value.startOf("year").year(Pe);w.value=Dk(fe,u.value,h),N(w.value,!1)}else if(G.value==="years")N(Pe,nt!=null?nt:!0);else{const fe=w.value.year(Pe);w.value=Dk(fe,u.value,h),X.value="month",["month","year","date","week"].includes(G.value)&&(N(w.value,!0),await xt(),Je())}jt("year")},U=async Pe=>{X.value=Pe,await xt(),Je()},ie=M(()=>n.type==="datetime"||n.type==="datetimerange"),ee=M(()=>{const Pe=ie.value||G.value==="dates",nt=G.value==="years",fe=G.value==="months",De=X.value==="date",ce=X.value==="year",qe=X.value==="month";return Pe&&De||nt&&ce||fe&&qe}),he=M(()=>h?n.parsedValue?Xe(n.parsedValue)?h(n.parsedValue[0].toDate()):h(n.parsedValue.toDate()):!0:!1),$e=()=>{if(K.value)N(n.parsedValue);else{let Pe=n.parsedValue;if(!Pe){const nt=It(m).locale(u.value),fe=Ke();Pe=nt.year(fe.year()).month(fe.month()).date(fe.date())}w.value=Pe,N(Pe)}},Me=M(()=>h?h(It().locale(u.value).toDate()):!1),q=()=>{const nt=It().locale(u.value).toDate();O.value=!0,(!h||!h(nt))&&D(nt)&&(w.value=It().locale(u.value),N(w.value))},de=M(()=>n.timeFormat||WW(n.format)),ke=M(()=>n.dateFormat||zW(n.format)),Ie=M(()=>{if(A.value)return A.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||w.value).format(de.value)}),se=M(()=>{if(P.value)return P.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||w.value).format(ke.value)}),ye=F(!1),Ae=()=>{ye.value=!0},Z=()=>{ye.value=!1},te=Pe=>({hour:Pe.hour(),minute:Pe.minute(),second:Pe.second(),year:Pe.year(),month:Pe.month(),date:Pe.date()}),le=(Pe,nt,fe)=>{const{hour:De,minute:ce,second:qe}=te(Pe),Mt=n.parsedValue?n.parsedValue.hour(De).minute(ce).second(qe):Pe;w.value=Mt,N(w.value,!0),fe||(ye.value=nt)},Te=Pe=>{const nt=It(Pe,de.value).locale(u.value);if(nt.isValid()&&D(nt)){const{year:fe,month:De,date:ce}=te(w.value);w.value=nt.year(fe).month(De).date(ce),A.value=null,ye.value=!1,N(w.value,!0)}},pe=Pe=>{const nt=It(Pe,ke.value).locale(u.value);if(nt.isValid()){if(h&&h(nt.toDate()))return;const{hour:fe,minute:De,second:ce}=te(w.value);w.value=nt.hour(fe).minute(De).second(ce),P.value=null,N(w.value,!0)}},Oe=Pe=>It.isDayjs(Pe)&&Pe.isValid()&&(h?!h(Pe.toDate()):!0),Re=Pe=>Xe(Pe)?Pe.map(nt=>nt.format(n.format)):Pe.format(n.format),je=Pe=>It(Pe,n.format).locale(u.value),Ke=()=>{const Pe=It(y.value).locale(u.value);if(!y.value){const nt=S.value;return It().hour(nt.hour()).minute(nt.minute()).second(nt.second()).locale(u.value)}return Pe},Je=async()=>{var Pe;["week","month","year","date"].includes(G.value)&&((Pe=b.value)==null||Pe.focus(),G.value==="week"&&kt(ut.down))},at=Pe=>{const{code:nt}=Pe;[ut.up,ut.down,ut.left,ut.right,ut.home,ut.end,ut.pageUp,ut.pageDown].includes(nt)&&(kt(nt),Pe.stopPropagation(),Pe.preventDefault()),[ut.enter,ut.space,ut.numpadEnter].includes(nt)&&P.value===null&&A.value===null&&(Pe.preventDefault(),N(w.value,!1))},kt=Pe=>{var nt;const{up:fe,down:De,left:ce,right:qe,home:Mt,end:Zt,pageUp:Sn,pageDown:kr}=ut,zn={year:{[fe]:-4,[De]:4,[ce]:-1,[qe]:1,offset:(Yt,Ge)=>Yt.setFullYear(Yt.getFullYear()+Ge)},month:{[fe]:-4,[De]:4,[ce]:-1,[qe]:1,offset:(Yt,Ge)=>Yt.setMonth(Yt.getMonth()+Ge)},week:{[fe]:-1,[De]:1,[ce]:-1,[qe]:1,offset:(Yt,Ge)=>Yt.setDate(Yt.getDate()+Ge*7)},date:{[fe]:-7,[De]:7,[ce]:-1,[qe]:1,[Mt]:Yt=>-Yt.getDay(),[Zt]:Yt=>-Yt.getDay()+6,[Sn]:Yt=>-new Date(Yt.getFullYear(),Yt.getMonth(),0).getDate(),[kr]:Yt=>new Date(Yt.getFullYear(),Yt.getMonth()+1,0).getDate(),offset:(Yt,Ge)=>Yt.setDate(Yt.getDate()+Ge)}},Ln=w.value.toDate();for(;Math.abs(w.value.diff(Ln,"year",!0))<1;){const Yt=zn[oe.value];if(!Yt)return;if(Yt.offset(Ln,St(Yt[Pe])?Yt[Pe](Ln):(nt=Yt[Pe])!=null?nt:0),h&&h(Ln))break;const Ge=It(Ln).locale(u.value);w.value=Ge,e("pick",Ge,!0);break}},jt=Pe=>{e("panel-change",w.value.toDate(),Pe,X.value)};return Fe(()=>G.value,Pe=>{if(["month","year"].includes(Pe)){X.value=Pe;return}else if(Pe==="years"){X.value="year";return}else if(Pe==="months"){X.value="month";return}X.value="date"},{immediate:!0}),Fe(()=>X.value,()=>{d==null||d.updatePopper()}),Fe(()=>y.value,Pe=>{Pe&&(w.value=Ke())},{immediate:!0}),Fe(()=>n.parsedValue,Pe=>{if(Pe){if(K.value||Xe(Pe))return;w.value=Pe}else w.value=Ke()},{immediate:!0}),e("set-picker-option",["isValidValue",Oe]),e("set-picker-option",["formatToString",Re]),e("set-picker-option",["parseUserInput",je]),e("set-picker-option",["handleFocusPicker",Je]),(Pe,nt)=>(R(),Y("div",{class:V([p(i).b(),p(o).b(),{"has-sidebar":Pe.$slots.sidebar||p(ne),"has-time":p(ie)}])},[J("div",{class:V(p(i).e("body-wrapper"))},[Ee(Pe.$slots,"sidebar",{class:V(p(i).e("sidebar"))}),p(ne)?(R(),Y("div",{key:0,class:V(p(i).e("sidebar"))},[(R(!0),Y(dt,null,Ht(p(f),(fe,De)=>(R(),Y("button",{key:De,type:"button",class:V(p(i).e("shortcut")),onClick:ce=>W(fe)},Ve(fe.text),11,["onClick"]))),128))],2)):Se("v-if",!0),J("div",{class:V(p(i).e("body"))},[p(ie)?(R(),Y("div",{key:0,class:V(p(o).e("time-header"))},[J("span",{class:V(p(o).e("editor-wrap"))},[B(p(hi),{placeholder:p(l)("el.datepicker.selectDate"),"model-value":p(se),size:"small","validate-event":!1,onInput:fe=>P.value=fe,onChange:pe},null,8,["placeholder","model-value","onInput"])],2),zt((R(),Y("span",{class:V(p(o).e("editor-wrap"))},[B(p(hi),{placeholder:p(l)("el.datepicker.selectTime"),"model-value":p(Ie),size:"small","validate-event":!1,onFocus:Ae,onInput:fe=>A.value=fe,onChange:Te},null,8,["placeholder","model-value","onInput"]),B(p(Ow),{visible:ye.value,format:p(de),"parsed-value":w.value,onPick:le},null,8,["visible","format","parsed-value"])],2)),[[p(Kc),Z]])],2)):Se("v-if",!0),zt(J("div",{class:V([p(o).e("header"),(X.value==="year"||X.value==="month")&&p(o).e("header--bordered")])},[J("span",{class:V(p(o).e("prev-btn"))},[J("button",{type:"button","aria-label":p(l)("el.datepicker.prevYear"),class:V(["d-arrow-left",p(i).e("icon-btn")]),onClick:fe=>L(!1)},[Ee(Pe.$slots,"prev-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(Of))]),_:1})])],10,["aria-label","onClick"]),zt(J("button",{type:"button","aria-label":p(l)("el.datepicker.prevMonth"),class:V([p(i).e("icon-btn"),"arrow-left"]),onClick:fe=>I(!1)},[Ee(Pe.$slots,"prev-month",{},()=>[B(p(mt),null,{default:j(()=>[B(p(_f))]),_:1})])],10,["aria-label","onClick"]),[[Bn,X.value==="date"]])],2),J("span",{role:"button",class:V(p(o).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:br(fe=>U("year"),["enter"]),onClick:fe=>U("year")},Ve(p(Q)),43,["onKeydown","onClick"]),zt(J("span",{role:"button","aria-live":"polite",tabindex:"0",class:V([p(o).e("header-label"),{active:X.value==="month"}]),onKeydown:br(fe=>U("month"),["enter"]),onClick:fe=>U("month")},Ve(p(l)(`el.datepicker.month${p(C)+1}`)),43,["onKeydown","onClick"]),[[Bn,X.value==="date"]]),J("span",{class:V(p(o).e("next-btn"))},[zt(J("button",{type:"button","aria-label":p(l)("el.datepicker.nextMonth"),class:V([p(i).e("icon-btn"),"arrow-right"]),onClick:fe=>I(!0)},[Ee(Pe.$slots,"next-month",{},()=>[B(p(mt),null,{default:j(()=>[B(p(_a))]),_:1})])],10,["aria-label","onClick"]),[[Bn,X.value==="date"]]),J("button",{type:"button","aria-label":p(l)("el.datepicker.nextYear"),class:V([p(i).e("icon-btn"),"d-arrow-right"]),onClick:fe=>L(!0)},[Ee(Pe.$slots,"next-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(wf))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[Bn,X.value!=="time"]]),J("div",{class:V(p(i).e("content")),onKeydown:at},[X.value==="date"?(R(),xe(Ik,{key:0,ref_key:"currentViewRef",ref:b,"selection-mode":p(G),date:w.value,"parsed-value":Pe.parsedValue,"disabled-date":p(h),"cell-class-name":p(g),onPick:z},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):Se("v-if",!0),X.value==="year"?(R(),xe(Fk,{key:1,ref_key:"currentViewRef",ref:b,"selection-mode":p(G),date:w.value,"disabled-date":p(h),"parsed-value":Pe.parsedValue,onPick:Ce},null,8,["selection-mode","date","disabled-date","parsed-value"])):Se("v-if",!0),X.value==="month"?(R(),xe(Bk,{key:2,ref_key:"currentViewRef",ref:b,"selection-mode":p(G),date:w.value,"parsed-value":Pe.parsedValue,"disabled-date":p(h),onPick:_e},null,8,["selection-mode","date","parsed-value","disabled-date"])):Se("v-if",!0)],34)],2)],2),zt(J("div",{class:V(p(i).e("footer"))},[zt(B(p(lr),{text:"",size:"small",class:V(p(i).e("link-btn")),disabled:p(Me),onClick:q},{default:j(()=>[Ue(Ve(p(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Bn,!p(K)&&Pe.showNow]]),B(p(lr),{plain:"",size:"small",class:V(p(i).e("link-btn")),disabled:p(he),onClick:$e},{default:j(()=>[Ue(Ve(p(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[Bn,p(ee)]])],2))}});var n$e=Ye(t$e,[["__file","panel-date-pick.vue"]]);const r$e=Ze({...$H,...I$,visible:Boolean}),NH=t=>{const{emit:e}=tn(),n=Nf(),r=Ni();return o=>{const a=St(o.value)?o.value():o.value;if(a){e("pick",[It(a[0]).locale(t.value),It(a[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:r,emit:e})}},DH=(t,{defaultValue:e,leftDate:n,rightDate:r,unit:i,onParsedValueChanged:o})=>{const{emit:a}=tn(),{pickerNs:s}=ht(JS),l=Qe("date-range-picker"),{t:u,lang:c}=xn(),d=NH(c),f=F(),h=F(),g=F({endDate:null,selecting:!1}),m=x=>{g.value=x},y=(x=!1)=>{const S=p(f),C=p(h);nm([S,C])&&a("pick",[S,C],x)},b=x=>{g.value.selecting=x,x||(g.value.endDate=null)},w=x=>{if(Xe(x)&&x.length===2){const[S,C]=x;f.value=S,n.value=S,h.value=C,o(p(f),p(h))}else O()},O=()=>{const[x,S]=F$(p(e),{lang:p(c),unit:i,unlinkPanels:t.unlinkPanels});f.value=void 0,h.value=void 0,n.value=x,r.value=S};return Fe(e,x=>{x&&O()},{immediate:!0}),Fe(()=>t.parsedValue,w,{immediate:!0}),{minDate:f,maxDate:h,rangeState:g,lang:c,ppNs:s,drpNs:l,handleChangeRange:m,handleRangeConfirm:y,handleShortcutClick:d,onSelect:b,onReset:w,t:u}},uO="month",i$e=ue({__name:"panel-date-range",props:r$e,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(t,{emit:e}){const n=t,r=ht("EP_PICKER_BASE"),{disabledDate:i,cellClassName:o,defaultTime:a,clearable:s}=r.props,l=Gn(r.props,"format"),u=Gn(r.props,"shortcuts"),c=Gn(r.props,"defaultValue"),{lang:d}=xn(),f=F(It().locale(d.value)),h=F(It().locale(d.value).add(1,uO)),{minDate:g,maxDate:m,rangeState:y,ppNs:b,drpNs:w,handleChangeRange:O,handleRangeConfirm:x,handleShortcutClick:S,onSelect:C,onReset:E,t:T}=DH(n,{defaultValue:c,leftDate:f,rightDate:h,unit:uO,onParsedValueChanged:nt});Fe(()=>n.visible,fe=>{!fe&&y.value.selecting&&(E(n.parsedValue),C(!1))});const P=F({min:null,max:null}),A=F({min:null,max:null}),D=M(()=>`${f.value.year()} ${T("el.datepicker.year")} ${T(`el.datepicker.month${f.value.month()+1}`)}`),$=M(()=>`${h.value.year()} ${T("el.datepicker.year")} ${T(`el.datepicker.month${h.value.month()+1}`)}`),N=M(()=>f.value.year()),z=M(()=>f.value.month()),I=M(()=>h.value.year()),L=M(()=>h.value.month()),X=M(()=>!!u.value.length),Q=M(()=>P.value.min!==null?P.value.min:g.value?g.value.format(ne.value):""),W=M(()=>P.value.max!==null?P.value.max:m.value||g.value?(m.value||g.value).format(ne.value):""),G=M(()=>A.value.min!==null?A.value.min:g.value?g.value.format(oe.value):""),K=M(()=>A.value.max!==null?A.value.max:m.value||g.value?(m.value||g.value).format(oe.value):""),oe=M(()=>n.timeFormat||WW(l.value)),ne=M(()=>n.dateFormat||zW(l.value)),_e=fe=>nm(fe)&&(i?!i(fe[0].toDate())&&!i(fe[1].toDate()):!0),Ce=()=>{f.value=f.value.subtract(1,"year"),n.unlinkPanels||(h.value=f.value.add(1,"month")),de("year")},U=()=>{f.value=f.value.subtract(1,"month"),n.unlinkPanels||(h.value=f.value.add(1,"month")),de("month")},ie=()=>{n.unlinkPanels?h.value=h.value.add(1,"year"):(f.value=f.value.add(1,"year"),h.value=f.value.add(1,"month")),de("year")},ee=()=>{n.unlinkPanels?h.value=h.value.add(1,"month"):(f.value=f.value.add(1,"month"),h.value=f.value.add(1,"month")),de("month")},he=()=>{f.value=f.value.add(1,"year"),de("year")},$e=()=>{f.value=f.value.add(1,"month"),de("month")},Me=()=>{h.value=h.value.subtract(1,"year"),de("year")},q=()=>{h.value=h.value.subtract(1,"month"),de("month")},de=fe=>{e("panel-change",[f.value.toDate(),h.value.toDate()],fe)},ke=M(()=>{const fe=(z.value+1)%12,De=z.value+1>=12?1:0;return n.unlinkPanels&&new Date(N.value+De,fe)<new Date(I.value,L.value)}),Ie=M(()=>n.unlinkPanels&&I.value*12+L.value-(N.value*12+z.value+1)>=12),se=M(()=>!(g.value&&m.value&&!y.value.selecting&&nm([g.value,m.value]))),ye=M(()=>n.type==="datetime"||n.type==="datetimerange"),Ae=(fe,De)=>{if(!!fe)return a?It(a[De]||a).locale(d.value).year(fe.year()).month(fe.month()).date(fe.date()):fe},Z=(fe,De=!0)=>{const ce=fe.minDate,qe=fe.maxDate,Mt=Ae(ce,0),Zt=Ae(qe,1);m.value===Zt&&g.value===Mt||(e("calendar-change",[ce.toDate(),qe&&qe.toDate()]),m.value=Zt,g.value=Mt,!(!De||ye.value)&&x())},te=F(!1),le=F(!1),Te=()=>{te.value=!1},pe=()=>{le.value=!1},Oe=(fe,De)=>{P.value[De]=fe;const ce=It(fe,ne.value).locale(d.value);if(ce.isValid()){if(i&&i(ce.toDate()))return;De==="min"?(f.value=ce,g.value=(g.value||f.value).year(ce.year()).month(ce.month()).date(ce.date()),!n.unlinkPanels&&(!m.value||m.value.isBefore(g.value))&&(h.value=ce.add(1,"month"),m.value=g.value.add(1,"month"))):(h.value=ce,m.value=(m.value||h.value).year(ce.year()).month(ce.month()).date(ce.date()),!n.unlinkPanels&&(!g.value||g.value.isAfter(m.value))&&(f.value=ce.subtract(1,"month"),g.value=m.value.subtract(1,"month")))}},Re=(fe,De)=>{P.value[De]=null},je=(fe,De)=>{A.value[De]=fe;const ce=It(fe,oe.value).locale(d.value);ce.isValid()&&(De==="min"?(te.value=!0,g.value=(g.value||f.value).hour(ce.hour()).minute(ce.minute()).second(ce.second())):(le.value=!0,m.value=(m.value||h.value).hour(ce.hour()).minute(ce.minute()).second(ce.second()),h.value=m.value))},Ke=(fe,De)=>{A.value[De]=null,De==="min"?(f.value=g.value,te.value=!1,(!m.value||m.value.isBefore(g.value))&&(m.value=g.value)):(h.value=m.value,le.value=!1,m.value&&m.value.isBefore(g.value)&&(g.value=m.value))},Je=(fe,De,ce)=>{A.value.min||(fe&&(f.value=fe,g.value=(g.value||f.value).hour(fe.hour()).minute(fe.minute()).second(fe.second())),ce||(te.value=De),(!m.value||m.value.isBefore(g.value))&&(m.value=g.value,h.value=fe))},at=(fe,De,ce)=>{A.value.max||(fe&&(h.value=fe,m.value=(m.value||h.value).hour(fe.hour()).minute(fe.minute()).second(fe.second())),ce||(le.value=De),m.value&&m.value.isBefore(g.value)&&(g.value=m.value))},kt=()=>{f.value=F$(p(c),{lang:p(d),unit:"month",unlinkPanels:n.unlinkPanels})[0],h.value=f.value.add(1,"month"),m.value=void 0,g.value=void 0,e("pick",null)},jt=fe=>Xe(fe)?fe.map(De=>De.format(l.value)):fe.format(l.value),Pe=fe=>Xe(fe)?fe.map(De=>It(De,l.value).locale(d.value)):It(fe,l.value).locale(d.value);function nt(fe,De){if(n.unlinkPanels&&De){const ce=(fe==null?void 0:fe.year())||0,qe=(fe==null?void 0:fe.month())||0,Mt=De.year(),Zt=De.month();h.value=ce===Mt&&qe===Zt?De.add(1,uO):De}else h.value=f.value.add(1,uO),De&&(h.value=h.value.hour(De.hour()).minute(De.minute()).second(De.second()))}return e("set-picker-option",["isValidValue",_e]),e("set-picker-option",["parseUserInput",Pe]),e("set-picker-option",["formatToString",jt]),e("set-picker-option",["handleClear",kt]),(fe,De)=>(R(),Y("div",{class:V([p(b).b(),p(w).b(),{"has-sidebar":fe.$slots.sidebar||p(X),"has-time":p(ye)}])},[J("div",{class:V(p(b).e("body-wrapper"))},[Ee(fe.$slots,"sidebar",{class:V(p(b).e("sidebar"))}),p(X)?(R(),Y("div",{key:0,class:V(p(b).e("sidebar"))},[(R(!0),Y(dt,null,Ht(p(u),(ce,qe)=>(R(),Y("button",{key:qe,type:"button",class:V(p(b).e("shortcut")),onClick:Mt=>p(S)(ce)},Ve(ce.text),11,["onClick"]))),128))],2)):Se("v-if",!0),J("div",{class:V(p(b).e("body"))},[p(ye)?(R(),Y("div",{key:0,class:V(p(w).e("time-header"))},[J("span",{class:V(p(w).e("editors-wrap"))},[J("span",{class:V(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",disabled:p(y).selecting,placeholder:p(T)("el.datepicker.startDate"),class:V(p(w).e("editor")),"model-value":p(Q),"validate-event":!1,onInput:ce=>Oe(ce,"min"),onChange:ce=>Re(ce,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),zt((R(),Y("span",{class:V(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",class:V(p(w).e("editor")),disabled:p(y).selecting,placeholder:p(T)("el.datepicker.startTime"),"model-value":p(G),"validate-event":!1,onFocus:ce=>te.value=!0,onInput:ce=>je(ce,"min"),onChange:ce=>Ke(ce,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),B(p(Ow),{visible:te.value,format:p(oe),"datetime-role":"start","parsed-value":f.value,onPick:Je},null,8,["visible","format","parsed-value"])],2)),[[p(Kc),Te]])],2),J("span",null,[B(p(mt),null,{default:j(()=>[B(p(_a))]),_:1})]),J("span",{class:V([p(w).e("editors-wrap"),"is-right"])},[J("span",{class:V(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",class:V(p(w).e("editor")),disabled:p(y).selecting,placeholder:p(T)("el.datepicker.endDate"),"model-value":p(W),readonly:!p(g),"validate-event":!1,onInput:ce=>Oe(ce,"max"),onChange:ce=>Re(ce,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),zt((R(),Y("span",{class:V(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",class:V(p(w).e("editor")),disabled:p(y).selecting,placeholder:p(T)("el.datepicker.endTime"),"model-value":p(K),readonly:!p(g),"validate-event":!1,onFocus:ce=>p(g)&&(le.value=!0),onInput:ce=>je(ce,"max"),onChange:ce=>Ke(ce,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),B(p(Ow),{"datetime-role":"end",visible:le.value,format:p(oe),"parsed-value":h.value,onPick:at},null,8,["visible","format","parsed-value"])],2)),[[p(Kc),pe]])],2)],2)):Se("v-if",!0),J("div",{class:V([[p(b).e("content"),p(w).e("content")],"is-left"])},[J("div",{class:V(p(w).e("header"))},[J("button",{type:"button",class:V([p(b).e("icon-btn"),"d-arrow-left"]),"aria-label":p(T)("el.datepicker.prevYear"),onClick:Ce},[Ee(fe.$slots,"prev-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(Of))]),_:1})])],10,["aria-label"]),J("button",{type:"button",class:V([p(b).e("icon-btn"),"arrow-left"]),"aria-label":p(T)("el.datepicker.prevMonth"),onClick:U},[Ee(fe.$slots,"prev-month",{},()=>[B(p(mt),null,{default:j(()=>[B(p(_f))]),_:1})])],10,["aria-label"]),fe.unlinkPanels?(R(),Y("button",{key:0,type:"button",disabled:!p(Ie),class:V([[p(b).e("icon-btn"),{"is-disabled":!p(Ie)}],"d-arrow-right"]),"aria-label":p(T)("el.datepicker.nextYear"),onClick:he},[Ee(fe.$slots,"next-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(wf))]),_:1})])],10,["disabled","aria-label"])):Se("v-if",!0),fe.unlinkPanels?(R(),Y("button",{key:1,type:"button",disabled:!p(ke),class:V([[p(b).e("icon-btn"),{"is-disabled":!p(ke)}],"arrow-right"]),"aria-label":p(T)("el.datepicker.nextMonth"),onClick:$e},[Ee(fe.$slots,"next-month",{},()=>[B(p(mt),null,{default:j(()=>[B(p(_a))]),_:1})])],10,["disabled","aria-label"])):Se("v-if",!0),J("div",null,Ve(p(D)),1)],2),B(Ik,{"selection-mode":"range",date:f.value,"min-date":p(g),"max-date":p(m),"range-state":p(y),"disabled-date":p(i),"cell-class-name":p(o),onChangerange:p(O),onPick:Z,onSelect:p(C)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),J("div",{class:V([[p(b).e("content"),p(w).e("content")],"is-right"])},[J("div",{class:V(p(w).e("header"))},[fe.unlinkPanels?(R(),Y("button",{key:0,type:"button",disabled:!p(Ie),class:V([[p(b).e("icon-btn"),{"is-disabled":!p(Ie)}],"d-arrow-left"]),"aria-label":p(T)("el.datepicker.prevYear"),onClick:Me},[Ee(fe.$slots,"prev-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(Of))]),_:1})])],10,["disabled","aria-label"])):Se("v-if",!0),fe.unlinkPanels?(R(),Y("button",{key:1,type:"button",disabled:!p(ke),class:V([[p(b).e("icon-btn"),{"is-disabled":!p(ke)}],"arrow-left"]),"aria-label":p(T)("el.datepicker.prevMonth"),onClick:q},[Ee(fe.$slots,"prev-month",{},()=>[B(p(mt),null,{default:j(()=>[B(p(_f))]),_:1})])],10,["disabled","aria-label"])):Se("v-if",!0),J("button",{type:"button","aria-label":p(T)("el.datepicker.nextYear"),class:V([p(b).e("icon-btn"),"d-arrow-right"]),onClick:ie},[Ee(fe.$slots,"next-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(wf))]),_:1})])],10,["aria-label"]),J("button",{type:"button",class:V([p(b).e("icon-btn"),"arrow-right"]),"aria-label":p(T)("el.datepicker.nextMonth"),onClick:ee},[Ee(fe.$slots,"next-month",{},()=>[B(p(mt),null,{default:j(()=>[B(p(_a))]),_:1})])],10,["aria-label"]),J("div",null,Ve(p($)),1)],2),B(Ik,{"selection-mode":"range",date:h.value,"min-date":p(g),"max-date":p(m),"range-state":p(y),"disabled-date":p(i),"cell-class-name":p(o),onChangerange:p(O),onPick:Z,onSelect:p(C)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),p(ye)?(R(),Y("div",{key:0,class:V(p(b).e("footer"))},[p(s)?(R(),xe(p(lr),{key:0,text:"",size:"small",class:V(p(b).e("link-btn")),onClick:kt},{default:j(()=>[Ue(Ve(p(T)("el.datepicker.clear")),1)]),_:1},8,["class"])):Se("v-if",!0),B(p(lr),{plain:"",size:"small",class:V(p(b).e("link-btn")),disabled:p(se),onClick:ce=>p(x)(!1)},{default:j(()=>[Ue(Ve(p(T)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):Se("v-if",!0)],2))}});var o$e=Ye(i$e,[["__file","panel-date-range.vue"]]);const a$e=Ze({...I$}),s$e=["pick","set-picker-option","calendar-change"],l$e=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:r}=xn(),i=()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},o=()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},a=()=>{e.value=e.value.add(1,"year")},s=()=>{n.value=n.value.subtract(1,"year")},l=M(()=>`${e.value.year()} ${r("el.datepicker.year")}`),u=M(()=>`${n.value.year()} ${r("el.datepicker.year")}`),c=M(()=>e.value.year()),d=M(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year());return{leftPrevYear:i,rightNextYear:o,leftNextYear:a,rightPrevYear:s,leftLabel:l,rightLabel:u,leftYear:c,rightYear:d}},cO="year",u$e=ue({name:"DatePickerMonthRange"}),c$e=ue({...u$e,props:a$e,emits:s$e,setup(t,{emit:e}){const n=t,{lang:r}=xn(),i=ht("EP_PICKER_BASE"),{shortcuts:o,disabledDate:a}=i.props,s=Gn(i.props,"format"),l=Gn(i.props,"defaultValue"),u=F(It().locale(r.value)),c=F(It().locale(r.value).add(1,cO)),{minDate:d,maxDate:f,rangeState:h,ppNs:g,drpNs:m,handleChangeRange:y,handleRangeConfirm:b,handleShortcutClick:w,onSelect:O}=DH(n,{defaultValue:l,leftDate:u,rightDate:c,unit:cO,onParsedValueChanged:Q}),x=M(()=>!!o.length),{leftPrevYear:S,rightNextYear:C,leftNextYear:E,rightPrevYear:T,leftLabel:P,rightLabel:A,leftYear:D,rightYear:$}=l$e({unlinkPanels:Gn(n,"unlinkPanels"),leftDate:u,rightDate:c}),N=M(()=>n.unlinkPanels&&$.value>D.value+1),z=(W,G=!0)=>{const K=W.minDate,oe=W.maxDate;f.value===oe&&d.value===K||(e("calendar-change",[K.toDate(),oe&&oe.toDate()]),f.value=oe,d.value=K,G&&b())},I=()=>{u.value=F$(p(l),{lang:p(r),unit:"year",unlinkPanels:n.unlinkPanels})[0],c.value=u.value.add(1,"year"),e("pick",null)},L=W=>Xe(W)?W.map(G=>G.format(s.value)):W.format(s.value),X=W=>Xe(W)?W.map(G=>It(G,s.value).locale(r.value)):It(W,s.value).locale(r.value);function Q(W,G){if(n.unlinkPanels&&G){const K=(W==null?void 0:W.year())||0,oe=G.year();c.value=K===oe?G.add(1,cO):G}else c.value=u.value.add(1,cO)}return e("set-picker-option",["isValidValue",nm]),e("set-picker-option",["formatToString",L]),e("set-picker-option",["parseUserInput",X]),e("set-picker-option",["handleClear",I]),(W,G)=>(R(),Y("div",{class:V([p(g).b(),p(m).b(),{"has-sidebar":Boolean(W.$slots.sidebar)||p(x)}])},[J("div",{class:V(p(g).e("body-wrapper"))},[Ee(W.$slots,"sidebar",{class:V(p(g).e("sidebar"))}),p(x)?(R(),Y("div",{key:0,class:V(p(g).e("sidebar"))},[(R(!0),Y(dt,null,Ht(p(o),(K,oe)=>(R(),Y("button",{key:oe,type:"button",class:V(p(g).e("shortcut")),onClick:ne=>p(w)(K)},Ve(K.text),11,["onClick"]))),128))],2)):Se("v-if",!0),J("div",{class:V(p(g).e("body"))},[J("div",{class:V([[p(g).e("content"),p(m).e("content")],"is-left"])},[J("div",{class:V(p(m).e("header"))},[J("button",{type:"button",class:V([p(g).e("icon-btn"),"d-arrow-left"]),onClick:p(S)},[Ee(W.$slots,"prev-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(Of))]),_:1})])],10,["onClick"]),W.unlinkPanels?(R(),Y("button",{key:0,type:"button",disabled:!p(N),class:V([[p(g).e("icon-btn"),{[p(g).is("disabled")]:!p(N)}],"d-arrow-right"]),onClick:p(E)},[Ee(W.$slots,"next-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(wf))]),_:1})])],10,["disabled","onClick"])):Se("v-if",!0),J("div",null,Ve(p(P)),1)],2),B(Bk,{"selection-mode":"range",date:u.value,"min-date":p(d),"max-date":p(f),"range-state":p(h),"disabled-date":p(a),onChangerange:p(y),onPick:z,onSelect:p(O)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),J("div",{class:V([[p(g).e("content"),p(m).e("content")],"is-right"])},[J("div",{class:V(p(m).e("header"))},[W.unlinkPanels?(R(),Y("button",{key:0,type:"button",disabled:!p(N),class:V([[p(g).e("icon-btn"),{"is-disabled":!p(N)}],"d-arrow-left"]),onClick:p(T)},[Ee(W.$slots,"prev-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(Of))]),_:1})])],10,["disabled","onClick"])):Se("v-if",!0),J("button",{type:"button",class:V([p(g).e("icon-btn"),"d-arrow-right"]),onClick:p(C)},[Ee(W.$slots,"next-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(wf))]),_:1})])],10,["onClick"]),J("div",null,Ve(p(A)),1)],2),B(Bk,{"selection-mode":"range",date:c.value,"min-date":p(d),"max-date":p(f),"range-state":p(h),"disabled-date":p(a),onChangerange:p(y),onPick:z,onSelect:p(O)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var d$e=Ye(c$e,[["__file","panel-month-range.vue"]]);const f$e=Ze({...I$}),h$e=["pick","set-picker-option","calendar-change"],p$e=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const r=()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},i=()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},o=()=>{e.value=e.value.add(10,"year")},a=()=>{n.value=n.value.subtract(10,"year")},s=M(()=>{const d=Math.floor(e.value.year()/10)*10;return`${d}-${d+9}`}),l=M(()=>{const d=Math.floor(n.value.year()/10)*10;return`${d}-${d+9}`}),u=M(()=>Math.floor(e.value.year()/10)*10+9),c=M(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:r,rightNextYear:i,leftNextYear:o,rightPrevYear:a,leftLabel:s,rightLabel:l,leftYear:u,rightYear:c}},hB="year",g$e=ue({name:"DatePickerYearRange"}),m$e=ue({...g$e,props:f$e,emits:h$e,setup(t,{emit:e}){const n=t,{lang:r}=xn(),i=F(It().locale(r.value)),o=F(i.value.add(10,"year")),{pickerNs:a}=ht(JS),s=Qe("date-range-picker"),l=M(()=>!!z.length),u=M(()=>[a.b(),s.b(),{"has-sidebar":Boolean(Ni().sidebar)||l.value}]),c=M(()=>({content:[a.e("content"),s.e("content"),"is-left"],arrowLeftBtn:[a.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),{[a.is("disabled")]:!S.value},"d-arrow-right"]})),d=M(()=>({content:[a.e("content"),s.e("content"),"is-right"],arrowLeftBtn:[a.e("icon-btn"),{"is-disabled":!S.value},"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),"d-arrow-right"]})),f=NH(r),{leftPrevYear:h,rightNextYear:g,leftNextYear:m,rightPrevYear:y,leftLabel:b,rightLabel:w,leftYear:O,rightYear:x}=p$e({unlinkPanels:Gn(n,"unlinkPanels"),leftDate:i,rightDate:o}),S=M(()=>n.unlinkPanels&&x.value>O.value+1),C=F(),E=F(),T=F({endDate:null,selecting:!1}),P=ne=>{T.value=ne},A=(ne,_e=!0)=>{const Ce=ne.minDate,U=ne.maxDate;E.value===U&&C.value===Ce||(e("calendar-change",[Ce.toDate(),U&&U.toDate()]),E.value=U,C.value=Ce,_e&&D())},D=(ne=!1)=>{nm([C.value,E.value])&&e("pick",[C.value,E.value],ne)},$=ne=>{T.value.selecting=ne,ne||(T.value.endDate=null)},N=ht("EP_PICKER_BASE"),{shortcuts:z,disabledDate:I}=N.props,L=Gn(N.props,"format"),X=Gn(N.props,"defaultValue"),Q=()=>{let ne;if(Xe(X.value)){const _e=It(X.value[0]);let Ce=It(X.value[1]);return n.unlinkPanels||(Ce=_e.add(10,hB)),[_e,Ce]}else X.value?ne=It(X.value):ne=It();return ne=ne.locale(r.value),[ne,ne.add(10,hB)]};Fe(()=>X.value,ne=>{if(ne){const _e=Q();i.value=_e[0],o.value=_e[1]}},{immediate:!0}),Fe(()=>n.parsedValue,ne=>{if(ne&&ne.length===2)if(C.value=ne[0],E.value=ne[1],i.value=C.value,n.unlinkPanels&&E.value){const _e=C.value.year(),Ce=E.value.year();o.value=_e===Ce?E.value.add(10,"year"):E.value}else o.value=i.value.add(10,"year");else{const _e=Q();C.value=void 0,E.value=void 0,i.value=_e[0],o.value=_e[1]}},{immediate:!0});const W=ne=>Xe(ne)?ne.map(_e=>It(_e,L.value).locale(r.value)):It(ne,L.value).locale(r.value),G=ne=>Xe(ne)?ne.map(_e=>_e.format(L.value)):ne.format(L.value),K=ne=>nm(ne)&&(I?!I(ne[0].toDate())&&!I(ne[1].toDate()):!0),oe=()=>{const ne=Q();i.value=ne[0],o.value=ne[1],E.value=void 0,C.value=void 0,e("pick",null)};return e("set-picker-option",["isValidValue",K]),e("set-picker-option",["parseUserInput",W]),e("set-picker-option",["formatToString",G]),e("set-picker-option",["handleClear",oe]),(ne,_e)=>(R(),Y("div",{class:V(p(u))},[J("div",{class:V(p(a).e("body-wrapper"))},[Ee(ne.$slots,"sidebar",{class:V(p(a).e("sidebar"))}),p(l)?(R(),Y("div",{key:0,class:V(p(a).e("sidebar"))},[(R(!0),Y(dt,null,Ht(p(z),(Ce,U)=>(R(),Y("button",{key:U,type:"button",class:V(p(a).e("shortcut")),onClick:ie=>p(f)(Ce)},Ve(Ce.text),11,["onClick"]))),128))],2)):Se("v-if",!0),J("div",{class:V(p(a).e("body"))},[J("div",{class:V(p(c).content)},[J("div",{class:V(p(s).e("header"))},[J("button",{type:"button",class:V(p(c).arrowLeftBtn),onClick:p(h)},[Ee(ne.$slots,"prev-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(Of))]),_:1})])],10,["onClick"]),ne.unlinkPanels?(R(),Y("button",{key:0,type:"button",disabled:!p(S),class:V(p(c).arrowRightBtn),onClick:p(m)},[Ee(ne.$slots,"next-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(wf))]),_:1})])],10,["disabled","onClick"])):Se("v-if",!0),J("div",null,Ve(p(b)),1)],2),B(Fk,{"selection-mode":"range",date:i.value,"min-date":C.value,"max-date":E.value,"range-state":T.value,"disabled-date":p(I),onChangerange:P,onPick:A,onSelect:$},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),J("div",{class:V(p(d).content)},[J("div",{class:V(p(s).e("header"))},[ne.unlinkPanels?(R(),Y("button",{key:0,type:"button",disabled:!p(S),class:V(p(d).arrowLeftBtn),onClick:p(y)},[Ee(ne.$slots,"prev-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(Of))]),_:1})])],10,["disabled","onClick"])):Se("v-if",!0),J("button",{type:"button",class:V(p(d).arrowRightBtn),onClick:p(g)},[Ee(ne.$slots,"next-year",{},()=>[B(p(mt),null,{default:j(()=>[B(p(wf))]),_:1})])],10,["onClick"]),J("div",null,Ve(p(w)),1)],2),B(Fk,{"selection-mode":"range",date:o.value,"min-date":C.value,"max-date":E.value,"range-state":T.value,"disabled-date":p(I),onChangerange:P,onPick:A,onSelect:$},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var v$e=Ye(m$e,[["__file","panel-year-range.vue"]]);const y$e=function(t){switch(t){case"daterange":case"datetimerange":return o$e;case"monthrange":return d$e;case"yearrange":return v$e;default:return n$e}};It.extend(UW);It.extend(vRe);It.extend(N$);It.extend(yRe);It.extend(bRe);It.extend(_Re);It.extend(ORe);It.extend(wRe);var b$e=ue({name:"ElDatePicker",install:null,props:jRe,emits:["update:modelValue"],setup(t,{expose:e,emit:n,slots:r}){const i=Qe("picker-panel");gn("ElPopperOptions",vn(Gn(t,"popperOptions"))),gn(JS,{slots:r,pickerNs:i});const o=F();e({focus:()=>{var l;(l=o.value)==null||l.focus()},blur:()=>{var l;(l=o.value)==null||l.blur()},handleOpen:()=>{var l;(l=o.value)==null||l.handleOpen()},handleClose:()=>{var l;(l=o.value)==null||l.handleClose()}});const s=l=>{n("update:modelValue",l)};return()=>{var l;const u=(l=t.format)!=null?l:xRe[t.type]||sg,c=y$e(t.type);return B(kH,an(t,{format:u,type:t.type,ref:o,"onUpdate:modelValue":s}),{default:d=>B(c,d,{"prev-month":r["prev-month"],"next-month":r["next-month"],"prev-year":r["prev-year"],"next-year":r["next-year"]}),"range-separator":r["range-separator"]})}}});const _$e=Vt(b$e),j$=Symbol("elDescriptions");var Bv=ue({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup(){return{descriptions:ht(j$,{})}},render(){var t;const e=QPe(this.cell),n=(((t=this.cell)==null?void 0:t.dirs)||[]).map(b=>{const{dir:w,arg:O,modifiers:x,value:S}=b;return[w,S,O,x]}),{border:r,direction:i}=this.descriptions,o=i==="vertical",a=()=>{var b,w,O;return((O=(w=(b=this.cell)==null?void 0:b.children)==null?void 0:w.label)==null?void 0:O.call(w))||e.label},s=()=>{var b,w,O;return(O=(w=(b=this.cell)==null?void 0:b.children)==null?void 0:w.default)==null?void 0:O.call(w)},l=e.span,u=e.rowspan,c=e.align?`is-${e.align}`:"",d=e.labelAlign?`is-${e.labelAlign}`:c,f=e.className,h=e.labelClassName,g=this.type==="label"&&(e.labelWidth||this.descriptions.labelWidth)||e.width,m={width:pi(g),minWidth:pi(e.minWidth)},y=Qe("descriptions");switch(this.type){case"label":return zt(Tt(this.tag,{style:m,class:[y.e("cell"),y.e("label"),y.is("bordered-label",r),y.is("vertical-label",o),d,h],colSpan:o?l:1,rowspan:o?1:u},a()),n);case"content":return zt(Tt(this.tag,{style:m,class:[y.e("cell"),y.e("content"),y.is("bordered-content",r),y.is("vertical-content",o),c,f],colSpan:o?l:l*2-1,rowspan:o?u*2-1:u},s()),n);default:{const b=a();return zt(Tt("td",{style:m,class:[y.e("cell"),c],colSpan:l,rowspan:u},[Lr(b)?void 0:Tt("span",{class:[y.e("label"),h]},b),Tt("span",{class:[y.e("content"),f]},s())]),n)}}}});const O$e=Ze({row:{type:we(Array),default:()=>[]}}),w$e=ue({name:"ElDescriptionsRow"}),x$e=ue({...w$e,props:O$e,setup(t){const e=ht(j$,{});return(n,r)=>p(e).direction==="vertical"?(R(),Y(dt,{key:0},[J("tr",null,[(R(!0),Y(dt,null,Ht(n.row,(i,o)=>(R(),xe(p(Bv),{key:`tr1-${o}`,cell:i,tag:"th",type:"label"},null,8,["cell"]))),128))]),J("tr",null,[(R(!0),Y(dt,null,Ht(n.row,(i,o)=>(R(),xe(p(Bv),{key:`tr2-${o}`,cell:i,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(R(),Y("tr",{key:1},[(R(!0),Y(dt,null,Ht(n.row,(i,o)=>(R(),Y(dt,{key:`tr3-${o}`},[p(e).border?(R(),Y(dt,{key:0},[B(p(Bv),{cell:i,tag:"td",type:"label"},null,8,["cell"]),B(p(Bv),{cell:i,tag:"td",type:"content"},null,8,["cell"])],64)):(R(),xe(p(Bv),{key:1,cell:i,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}});var S$e=Ye(x$e,[["__file","descriptions-row.vue"]]);const C$e=Ze({border:Boolean,column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:$i,title:{type:String,default:""},extra:{type:String,default:""},labelWidth:{type:[String,Number],default:""}}),E$e=ue({name:"ElDescriptions"}),T$e=ue({...E$e,props:C$e,setup(t){const e=t,n=Qe("descriptions"),r=ki(),i=Ni();gn(j$,e);const o=M(()=>[n.b(),n.m(r.value)]),a=(l,u,c,d=!1)=>(l.props||(l.props={}),u>c&&(l.props.span=c),d&&(l.props.span=u),l),s=()=>{if(!i.default)return[];const l=of(i.default()).filter(g=>{var m;return((m=g==null?void 0:g.type)==null?void 0:m.name)==="ElDescriptionsItem"}),u=[];let c=[],d=e.column,f=0;const h=[];return l.forEach((g,m)=>{var y,b,w;const O=((y=g.props)==null?void 0:y.span)||1,x=((b=g.props)==null?void 0:b.rowspan)||1,S=u.length;if(h[S]||(h[S]=0),x>1)for(let C=1;C<x;C++)h[w=S+C]||(h[w]=0),h[S+C]++,f++;if(h[S]>0&&(d-=h[S],h[S]=0),m<l.length-1&&(f+=O>d?d:O),m===l.length-1){const C=e.column-f%e.column;c.push(a(g,C,d,!0)),u.push(c);return}O<d?(d-=O,c.push(g)):(c.push(a(g,O,d)),u.push(c),d=e.column,c=[])}),u};return(l,u)=>(R(),Y("div",{class:V(p(o))},[l.title||l.extra||l.$slots.title||l.$slots.extra?(R(),Y("div",{key:0,class:V(p(n).e("header"))},[J("div",{class:V(p(n).e("title"))},[Ee(l.$slots,"title",{},()=>[Ue(Ve(l.title),1)])],2),J("div",{class:V(p(n).e("extra"))},[Ee(l.$slots,"extra",{},()=>[Ue(Ve(l.extra),1)])],2)],2)):Se("v-if",!0),J("div",{class:V(p(n).e("body"))},[J("table",{class:V([p(n).e("table"),p(n).is("bordered",l.border)])},[J("tbody",null,[(R(!0),Y(dt,null,Ht(s(),(c,d)=>(R(),xe(S$e,{key:d,row:c},null,8,["row"]))),128))])],2)],2)],2))}});var k$e=Ye(T$e,[["__file","description.vue"]]);const P$e=Ze({label:{type:String,default:""},span:{type:Number,default:1},rowspan:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},labelWidth:{type:[String,Number],default:""},align:{type:String,default:"left"},labelAlign:{type:String,default:""},className:{type:String,default:""},labelClassName:{type:String,default:""}}),LH=ue({name:"ElDescriptionsItem",props:P$e}),IH=Vt(k$e,{DescriptionsItem:LH}),BH=ni(LH),Q$=t=>{if(!t)return{onClick:ir,onMousedown:ir,onMouseup:ir};let e=!1,n=!1;return{onClick:a=>{e&&n&&t(a),e=n=!1},onMousedown:a=>{e=a.target===a.currentTarget},onMouseup:a=>{n=a.target===a.currentTarget}}},A$e=Ze({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:we([String,Array,Object])},zIndex:{type:we([String,Number])}}),M$e={click:t=>t instanceof MouseEvent},R$e="overlay";var $$e=ue({name:"ElOverlay",props:A$e,emits:M$e,setup(t,{slots:e,emit:n}){const r=Qe(R$e),i=l=>{n("click",l)},{onClick:o,onMousedown:a,onMouseup:s}=Q$(t.customMaskEvent?void 0:i);return()=>t.mask?B("div",{class:[r.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:a,onMouseup:s},[Ee(e,"default")],Js.STYLE|Js.CLASS|Js.PROPS,["onClick","onMouseup","onMousedown"]):Tt("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[Ee(e,"default")])}});const z$=$$e,FH=Symbol("dialogInjectionKey"),VH=Ze({center:Boolean,alignCenter:Boolean,closeIcon:{type:fr},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),N$e={close:()=>!0},jH=(t,e,n,r)=>{let i={offsetX:0,offsetY:0};const o=u=>{const c=u.clientX,d=u.clientY,{offsetX:f,offsetY:h}=i,g=t.value.getBoundingClientRect(),m=g.left,y=g.top,b=g.width,w=g.height,O=document.documentElement.clientWidth,x=document.documentElement.clientHeight,S=-m+f,C=-y+h,E=O-m-b+f,T=x-y-w+h,P=D=>{let $=f+D.clientX-c,N=h+D.clientY-d;r!=null&&r.value||($=Math.min(Math.max($,S),E),N=Math.min(Math.max(N,C),T)),i={offsetX:$,offsetY:N},t.value&&(t.value.style.transform=`translate(${pi($)}, ${pi(N)})`)},A=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",A)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",A)},a=()=>{e.value&&t.value&&e.value.addEventListener("mousedown",o)},s=()=>{e.value&&t.value&&e.value.removeEventListener("mousedown",o)},l=()=>{i={offsetX:0,offsetY:0},t.value&&(t.value.style.transform="none")};return Ft(()=>{Bo(()=>{n.value?a():s()})}),pr(()=>{s()}),{resetPosition:l}},eC=(...t)=>e=>{t.forEach(n=>{St(n)?n(e):n.value=e})},D$e=ue({name:"ElDialogContent"}),L$e=ue({...D$e,props:VH,emits:N$e,setup(t,{expose:e}){const n=t,{t:r}=xn(),{Close:i}=h$,{dialogRef:o,headerRef:a,bodyId:s,ns:l,style:u}=ht(FH),{focusTrapRef:c}=ht(b$),d=M(()=>[l.b(),l.is("fullscreen",n.fullscreen),l.is("draggable",n.draggable),l.is("align-center",n.alignCenter),{[l.m("center")]:n.center}]),f=eC(c,o),h=M(()=>n.draggable),g=M(()=>n.overflow),{resetPosition:m}=jH(o,a,h,g);return e({resetPosition:m}),(y,b)=>(R(),Y("div",{ref:p(f),class:V(p(d)),style:vt(p(u)),tabindex:"-1"},[J("header",{ref_key:"headerRef",ref:a,class:V([p(l).e("header"),{"show-close":y.showClose}])},[Ee(y.$slots,"header",{},()=>[J("span",{role:"heading","aria-level":y.ariaLevel,class:V(p(l).e("title"))},Ve(y.title),11,["aria-level"])]),y.showClose?(R(),Y("button",{key:0,"aria-label":p(r)("el.dialog.close"),class:V(p(l).e("headerbtn")),type:"button",onClick:w=>y.$emit("close")},[B(p(mt),{class:V(p(l).e("close"))},{default:j(()=>[(R(),xe(on(y.closeIcon||p(i))))]),_:1},8,["class"])],10,["aria-label","onClick"])):Se("v-if",!0)],2),J("div",{id:p(s),class:V(p(l).e("body"))},[Ee(y.$slots,"default")],10,["id"]),y.$slots.footer?(R(),Y("footer",{key:0,class:V(p(l).e("footer"))},[Ee(y.$slots,"footer")],2)):Se("v-if",!0)],6))}});var I$e=Ye(L$e,[["__file","dialog-content.vue"]]);const QH=Ze({...VH,appendToBody:Boolean,appendTo:{type:we([String,Object]),default:"body"},beforeClose:{type:we(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),zH={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Ut]:t=>wr(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},W$=(t,e={})=>{Tr(t)||Wi("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||Qe("popup"),r=M(()=>n.bm("parent","hidden"));if(!wn||Ha(document.body,r.value))return;let i=0,o=!1,a="0";const s=()=>{setTimeout(()=>{typeof document!="undefined"&&(sa(document==null?void 0:document.body,r.value),o&&document&&(document.body.style.width=a))},200)};Fe(t,l=>{if(!l){s();return}o=!Ha(document.body,r.value),o&&(a=document.body.style.width),i=Gz(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,c=Fc(document.body,"overflowY");i>0&&(u||c==="scroll")&&o&&(document.body.style.width=`calc(100% - ${i}px)`),il(document.body,r.value)}),aQ(()=>s())},WH=(t,e)=>{var n;const i=tn().emit,{nextZIndex:o}=zm();let a="";const s=bo(),l=bo(),u=F(!1),c=F(!1),d=F(!1),f=F((n=t.zIndex)!=null?n:o());let h,g;const m=jS("namespace",wy),y=M(()=>{const I={},L=`--${m.value}-dialog`;return t.fullscreen||(t.top&&(I[`${L}-margin-top`]=t.top),t.width&&(I[`${L}-width`]=pi(t.width))),I}),b=M(()=>t.alignCenter?{display:"flex"}:{});function w(){i("opened")}function O(){i("closed"),i(Ut,!1),t.destroyOnClose&&(d.value=!1)}function x(){i("close")}function S(){g==null||g(),h==null||h(),t.openDelay&&t.openDelay>0?{stop:h}=rp(()=>P(),t.openDelay):P()}function C(){h==null||h(),g==null||g(),t.closeDelay&&t.closeDelay>0?{stop:g}=rp(()=>A(),t.closeDelay):A()}function E(){function I(L){L||(c.value=!0,u.value=!1)}t.beforeClose?t.beforeClose(I):C()}function T(){t.closeOnClickModal&&E()}function P(){!wn||(u.value=!0)}function A(){u.value=!1}function D(){i("openAutoFocus")}function $(){i("closeAutoFocus")}function N(I){var L;((L=I.detail)==null?void 0:L.focusReason)==="pointer"&&I.preventDefault()}t.lockScroll&&W$(u);function z(){t.closeOnPressEscape&&E()}return Fe(()=>t.modelValue,I=>{I?(c.value=!1,S(),d.value=!0,f.value=qc(t.zIndex)?o():f.value++,xt(()=>{i("open"),e.value&&(e.value.scrollTop=0)})):u.value&&C()}),Fe(()=>t.fullscreen,I=>{!e.value||(I?(a=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=a)}),Ft(()=>{t.modelValue&&(u.value=!0,d.value=!0,S())}),{afterEnter:w,afterLeave:O,beforeLeave:x,handleClose:E,onModalClick:T,close:C,doClose:A,onOpenAutoFocus:D,onCloseAutoFocus:$,onCloseRequested:z,onFocusoutPrevented:N,titleId:s,bodyId:l,closed:c,style:y,overlayDialogStyle:b,rendered:d,visible:u,zIndex:f}},B$e=ue({name:"ElDialog",inheritAttrs:!1}),F$e=ue({...B$e,props:QH,emits:zH,setup(t,{expose:e}){const n=t,r=Ni();nf({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},M(()=>!!r.title));const i=Qe("dialog"),o=F(),a=F(),s=F(),{visible:l,titleId:u,bodyId:c,style:d,overlayDialogStyle:f,rendered:h,zIndex:g,afterEnter:m,afterLeave:y,beforeLeave:b,handleClose:w,onModalClick:O,onOpenAutoFocus:x,onCloseAutoFocus:S,onCloseRequested:C,onFocusoutPrevented:E}=WH(n,o);gn(FH,{dialogRef:o,headerRef:a,bodyId:c,ns:i,rendered:h,style:d});const T=Q$(O),P=M(()=>n.draggable&&!n.fullscreen);return e({visible:l,dialogContentRef:s,resetPosition:()=>{var D;(D=s.value)==null||D.resetPosition()}}),(D,$)=>(R(),xe(p(Xm),{to:D.appendTo,disabled:D.appendTo!=="body"?!1:!D.appendToBody},{default:j(()=>[B(zi,{name:"dialog-fade",onAfterEnter:p(m),onAfterLeave:p(y),onBeforeLeave:p(b),persisted:""},{default:j(()=>[zt(B(p(z$),{"custom-mask-event":"",mask:D.modal,"overlay-class":D.modalClass,"z-index":p(g)},{default:j(()=>[J("div",{role:"dialog","aria-modal":"true","aria-label":D.title||void 0,"aria-labelledby":D.title?void 0:p(u),"aria-describedby":p(c),class:V(`${p(i).namespace.value}-overlay-dialog`),style:vt(p(f)),onClick:p(T).onClick,onMousedown:p(T).onMousedown,onMouseup:p(T).onMouseup},[B(p(Um),{loop:"",trapped:p(l),"focus-start-el":"container",onFocusAfterTrapped:p(x),onFocusAfterReleased:p(S),onFocusoutPrevented:p(E),onReleaseRequested:p(C)},{default:j(()=>[p(h)?(R(),xe(I$e,an({key:0,ref_key:"dialogContentRef",ref:s},D.$attrs,{center:D.center,"align-center":D.alignCenter,"close-icon":D.closeIcon,draggable:p(P),overflow:D.overflow,fullscreen:D.fullscreen,"show-close":D.showClose,title:D.title,"aria-level":D.headerAriaLevel,onClose:p(w)}),es({header:j(()=>[D.$slots.title?Ee(D.$slots,"title",{key:1}):Ee(D.$slots,"header",{key:0,close:p(w),titleId:p(u),titleClass:p(i).e("title")})]),default:j(()=>[Ee(D.$slots,"default")]),_:2},[D.$slots.footer?{name:"footer",fn:j(()=>[Ee(D.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):Se("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[Bn,p(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var V$e=Ye(F$e,[["__file","dialog.vue"]]);const Ma=Vt(V$e),j$e=Ze({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:we(String),default:"solid"}}),Q$e=ue({name:"ElDivider"}),z$e=ue({...Q$e,props:j$e,setup(t){const e=t,n=Qe("divider"),r=M(()=>n.cssVar({"border-style":e.borderStyle}));return(i,o)=>(R(),Y("div",{class:V([p(n).b(),p(n).m(i.direction)]),style:vt(p(r)),role:"separator"},[i.$slots.default&&i.direction!=="vertical"?(R(),Y("div",{key:0,class:V([p(n).e("text"),p(n).is(i.contentPosition)])},[Ee(i.$slots,"default")],2)):Se("v-if",!0)],6))}});var W$e=Ye(z$e,[["__file","divider.vue"]]);const HH=Vt(W$e),H$e=Ze({...QH,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),U$e=zH,X$e=ue({name:"ElDrawer",inheritAttrs:!1}),Z$e=ue({...X$e,props:H$e,emits:U$e,setup(t,{expose:e}){const n=t,r=Ni();nf({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},M(()=>!!r.title));const i=F(),o=F(),a=Qe("drawer"),{t:s}=xn(),{afterEnter:l,afterLeave:u,beforeLeave:c,visible:d,rendered:f,titleId:h,bodyId:g,zIndex:m,onModalClick:y,onOpenAutoFocus:b,onCloseAutoFocus:w,onFocusoutPrevented:O,onCloseRequested:x,handleClose:S}=WH(n,i),C=M(()=>n.direction==="rtl"||n.direction==="ltr"),E=M(()=>pi(n.size));return e({handleClose:S,afterEnter:l,afterLeave:u}),(T,P)=>(R(),xe(p(Xm),{to:T.appendTo,disabled:T.appendTo!=="body"?!1:!T.appendToBody},{default:j(()=>[B(zi,{name:p(a).b("fade"),onAfterEnter:p(l),onAfterLeave:p(u),onBeforeLeave:p(c),persisted:""},{default:j(()=>[zt(B(p(z$),{mask:T.modal,"overlay-class":T.modalClass,"z-index":p(m),onClick:p(y)},{default:j(()=>[B(p(Um),{loop:"",trapped:p(d),"focus-trap-el":i.value,"focus-start-el":o.value,onFocusAfterTrapped:p(b),onFocusAfterReleased:p(w),onFocusoutPrevented:p(O),onReleaseRequested:p(x)},{default:j(()=>[J("div",an({ref_key:"drawerRef",ref:i,"aria-modal":"true","aria-label":T.title||void 0,"aria-labelledby":T.title?void 0:p(h),"aria-describedby":p(g)},T.$attrs,{class:[p(a).b(),T.direction,p(d)&&"open"],style:p(C)?"width: "+p(E):"height: "+p(E),role:"dialog",onClick:At(()=>{},["stop"])}),[J("span",{ref_key:"focusStartRef",ref:o,class:V(p(a).e("sr-focus")),tabindex:"-1"},null,2),T.withHeader?(R(),Y("header",{key:0,class:V(p(a).e("header"))},[T.$slots.title?Ee(T.$slots,"title",{key:1},()=>[Se(" DEPRECATED SLOT ")]):Ee(T.$slots,"header",{key:0,close:p(S),titleId:p(h),titleClass:p(a).e("title")},()=>[T.$slots.title?Se("v-if",!0):(R(),Y("span",{key:0,id:p(h),role:"heading","aria-level":T.headerAriaLevel,class:V(p(a).e("title"))},Ve(T.title),11,["id","aria-level"]))]),T.showClose?(R(),Y("button",{key:2,"aria-label":p(s)("el.drawer.close"),class:V(p(a).e("close-btn")),type:"button",onClick:p(S)},[B(p(mt),{class:V(p(a).e("close"))},{default:j(()=>[B(p(Oa))]),_:1},8,["class"])],10,["aria-label","onClick"])):Se("v-if",!0)],2)):Se("v-if",!0),p(f)?(R(),Y("div",{key:1,id:p(g),class:V(p(a).e("body"))},[Ee(T.$slots,"default")],10,["id"])):Se("v-if",!0),T.$slots.footer?(R(),Y("div",{key:2,class:V(p(a).e("footer"))},[Ee(T.$slots,"footer")],2)):Se("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[Bn,p(d)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var q$e=Ye(Z$e,[["__file","drawer.vue"]]);const H$=Vt(q$e),Y$e=ue({inheritAttrs:!1});function G$e(t,e,n,r,i,o){return Ee(t.$slots,"default")}var K$e=Ye(Y$e,[["render",G$e],["__file","collection.vue"]]);const J$e=ue({name:"ElCollectionItem",inheritAttrs:!1});function eNe(t,e,n,r,i,o){return Ee(t.$slots,"default")}var tNe=Ye(J$e,[["render",eNe],["__file","collection-item.vue"]]);const UH="data-el-collection-item",XH=t=>{const e=`El${t}Collection`,n=`${e}Item`,r=Symbol(e),i=Symbol(n),o={...K$e,name:e,setup(){const s=F(null),l=new Map;gn(r,{itemMap:l,getItems:()=>{const c=p(s);if(!c)return[];const d=Array.from(c.querySelectorAll(`[${UH}]`));return[...l.values()].sort((h,g)=>d.indexOf(h.ref)-d.indexOf(g.ref))},collectionRef:s})}},a={...tNe,name:n,setup(s,{attrs:l}){const u=F(null),c=ht(r,void 0);gn(i,{collectionItemRef:u}),Ft(()=>{const d=p(u);d&&c.itemMap.set(d,{ref:d,...l})}),pr(()=>{const d=p(u);c.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:a}},nNe=Ze({style:{type:we([String,Array,Object])},currentTabId:{type:we(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:we(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:rNe,ElCollectionItem:iNe,COLLECTION_INJECTION_KEY:U$,COLLECTION_ITEM_INJECTION_KEY:oNe}=XH("RovingFocusGroup"),X$=Symbol("elRovingFocusGroup"),ZH=Symbol("elRovingFocusGroupItem"),aNe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},sNe=(t,e)=>{if(e!=="rtl")return t;switch(t){case ut.right:return ut.left;case ut.left:return ut.right;default:return t}},lNe=(t,e,n)=>{const r=sNe(t.code,n);if(!(e==="vertical"&&[ut.left,ut.right].includes(r))&&!(e==="horizontal"&&[ut.up,ut.down].includes(r)))return aNe[r]},uNe=(t,e)=>t.map((n,r)=>t[(r+e)%t.length]),Z$=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},pB="currentTabIdChange",gB="rovingFocusGroup.entryFocus",cNe={bubbles:!1,cancelable:!0},dNe=ue({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:nNe,emits:[pB,"entryFocus"],setup(t,{emit:e}){var n;const r=F((n=t.currentTabId||t.defaultCurrentTabId)!=null?n:null),i=F(!1),o=F(!1),a=F(null),{getItems:s}=ht(U$,void 0),l=M(()=>[{outline:"none"},t.style]),u=m=>{e(pB,m)},c=()=>{i.value=!0},d=fi(m=>{var y;(y=t.onMousedown)==null||y.call(t,m)},()=>{o.value=!0}),f=fi(m=>{var y;(y=t.onFocus)==null||y.call(t,m)},m=>{const y=!p(o),{target:b,currentTarget:w}=m;if(b===w&&y&&!p(i)){const O=new Event(gB,cNe);if(w==null||w.dispatchEvent(O),!O.defaultPrevented){const x=s().filter(P=>P.focusable),S=x.find(P=>P.active),C=x.find(P=>P.id===p(r)),T=[S,C,...x].filter(Boolean).map(P=>P.ref);Z$(T)}}o.value=!1}),h=fi(m=>{var y;(y=t.onBlur)==null||y.call(t,m)},()=>{i.value=!1}),g=(...m)=>{e("entryFocus",...m)};gn(X$,{currentTabbedId:Rm(r),loop:Gn(t,"loop"),tabIndex:M(()=>p(i)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:l,orientation:Gn(t,"orientation"),dir:Gn(t,"dir"),onItemFocus:u,onItemShiftTab:c,onBlur:h,onFocus:f,onMousedown:d}),Fe(()=>t.currentTabId,m=>{r.value=m!=null?m:null}),sr(a,gB,g)}});function fNe(t,e,n,r,i,o){return Ee(t.$slots,"default")}var hNe=Ye(dNe,[["render",fNe],["__file","roving-focus-group-impl.vue"]]);const pNe=ue({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:rNe,ElRovingFocusGroupImpl:hNe}});function gNe(t,e,n,r,i,o){const a=rn("el-roving-focus-group-impl"),s=rn("el-focus-group-collection");return R(),xe(s,null,{default:j(()=>[B(a,Yl(df(t.$attrs)),{default:j(()=>[Ee(t.$slots,"default")]),_:3},16)]),_:3})}var mNe=Ye(pNe,[["render",gNe],["__file","roving-focus-group.vue"]]);const C1=Ze({trigger:y0.trigger,triggerKeys:{type:we(Array),default:()=>[ut.enter,ut.numpadEnter,ut.space,ut.down]},effect:{...io.effect,default:"light"},type:{type:we(String)},placement:{type:we(String),default:"bottom"},popperOptions:{type:we(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:we([Number,String]),default:0},maxHeight:{type:we([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:we(Object)},teleported:io.teleported}),qH=Ze({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:fr}}),vNe=Ze({onKeydown:{type:we(Function)}}),yNe=[ut.down,ut.pageDown,ut.home],YH=[ut.up,ut.pageUp,ut.end],bNe=[...yNe,...YH],{ElCollection:_Ne,ElCollectionItem:ONe,COLLECTION_INJECTION_KEY:wNe,COLLECTION_ITEM_INJECTION_KEY:xNe}=XH("Dropdown"),tC=Symbol("elDropdown"),{ButtonGroup:SNe}=lr,CNe=ue({name:"ElDropdown",components:{ElButton:lr,ElButtonGroup:SNe,ElScrollbar:gu,ElDropdownCollection:_Ne,ElTooltip:Hi,ElRovingFocusGroup:mNe,ElOnlyChild:gW,ElIcon:mt,ArrowDown:hd},props:C1,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=tn(),r=Qe("dropdown"),{t:i}=xn(),o=F(),a=F(),s=F(null),l=F(null),u=F(null),c=F(null),d=F(!1),f=M(()=>({maxHeight:pi(t.maxHeight)})),h=M(()=>[r.m(x.value)]),g=M(()=>No(t.trigger)),m=bo().value,y=M(()=>t.id||m);Fe([o,g],([L,X],[Q])=>{var W,G,K;(W=Q==null?void 0:Q.$el)!=null&&W.removeEventListener&&Q.$el.removeEventListener("pointerenter",C),(G=L==null?void 0:L.$el)!=null&&G.removeEventListener&&L.$el.removeEventListener("pointerenter",C),((K=L==null?void 0:L.$el)==null?void 0:K.addEventListener)&&X.includes("hover")&&L.$el.addEventListener("pointerenter",C)},{immediate:!0}),pr(()=>{var L,X;(X=(L=o.value)==null?void 0:L.$el)!=null&&X.removeEventListener&&o.value.$el.removeEventListener("pointerenter",C)});function b(){w()}function w(){var L;(L=s.value)==null||L.onClose()}function O(){var L;(L=s.value)==null||L.onOpen()}const x=ki();function S(...L){e("command",...L)}function C(){var L,X;(X=(L=o.value)==null?void 0:L.$el)==null||X.focus()}function E(){}function T(){const L=p(l);g.value.includes("hover")&&(L==null||L.focus()),c.value=null}function P(L){c.value=L}function A(L){d.value||(L.preventDefault(),L.stopImmediatePropagation())}function D(){e("visible-change",!0)}function $(L){(L==null?void 0:L.type)==="keydown"&&l.value.focus()}function N(){e("visible-change",!1)}return gn(tC,{contentRef:l,role:M(()=>t.role),triggerId:y,isUsingKeyboard:d,onItemEnter:E,onItemLeave:T}),gn("elDropdown",{instance:n,dropdownSize:x,handleClick:b,commandHandler:S,trigger:Gn(t,"trigger"),hideOnClick:Gn(t,"hideOnClick")}),{t:i,ns:r,scrollbar:u,wrapStyle:f,dropdownTriggerKls:h,dropdownSize:x,triggerId:y,currentTabId:c,handleCurrentTabIdChange:P,handlerMainButtonClick:L=>{e("click",L)},handleEntryFocus:A,handleClose:w,handleOpen:O,handleBeforeShowTooltip:D,handleShowTooltip:$,handleBeforeHideTooltip:N,onFocusAfterTrapped:L=>{var X,Q;L.preventDefault(),(Q=(X=l.value)==null?void 0:X.focus)==null||Q.call(X,{preventScroll:!0})},popperRef:s,contentRef:l,triggeringElementRef:o,referenceElementRef:a}}});function ENe(t,e,n,r,i,o){var a;const s=rn("el-dropdown-collection"),l=rn("el-roving-focus-group"),u=rn("el-scrollbar"),c=rn("el-only-child"),d=rn("el-tooltip"),f=rn("el-button"),h=rn("arrow-down"),g=rn("el-icon"),m=rn("el-button-group");return R(),Y("div",{class:V([t.ns.b(),t.ns.is("disabled",t.disabled)])},[B(d,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"manual-mode":!0,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"reference-element":(a=t.referenceElementRef)==null?void 0:a.$el,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-after":t.trigger==="hover"?t.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":t.triggeringElementRef,"virtual-triggering":t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,pure:"",persistent:"",onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},es({content:j(()=>[B(u,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:j(()=>[B(l,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange,onEntryFocus:t.handleEntryFocus},{default:j(()=>[B(s,null,{default:j(()=>[Ee(t.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:j(()=>[B(c,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:j(()=>[Ee(t.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(R(),xe(m,{key:0},{default:j(()=>[B(f,an({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:j(()=>[Ee(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),B(f,an({id:t.triggerId,ref:"triggeringElementRef"},t.buttonProps,{role:"button",size:t.dropdownSize,type:t.type,class:t.ns.e("caret-button"),disabled:t.disabled,tabindex:t.tabindex,"aria-label":t.t("el.dropdown.toggleDropdown")}),{default:j(()=>[B(g,{class:V(t.ns.e("icon"))},{default:j(()=>[B(h)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):Se("v-if",!0)],2)}var TNe=Ye(CNe,[["render",ENe],["__file","dropdown.vue"]]);const kNe=ue({components:{ElRovingFocusCollectionItem:iNe},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,loop:r,onItemFocus:i,onItemShiftTab:o}=ht(X$,void 0),{getItems:a}=ht(U$,void 0),s=bo(),l=F(null),u=fi(h=>{e("mousedown",h)},h=>{t.focusable?i(p(s)):h.preventDefault()}),c=fi(h=>{e("focus",h)},()=>{i(p(s))}),d=fi(h=>{e("keydown",h)},h=>{const{code:g,shiftKey:m,target:y,currentTarget:b}=h;if(g===ut.tab&&m){o();return}if(y!==b)return;const w=lNe(h);if(w){h.preventDefault();let x=a().filter(S=>S.focusable).map(S=>S.ref);switch(w){case"last":{x.reverse();break}case"prev":case"next":{w==="prev"&&x.reverse();const S=x.indexOf(b);x=r.value?uNe(x,S+1):x.slice(S+1);break}}xt(()=>{Z$(x)})}}),f=M(()=>n.value===p(s));return gn(ZH,{rovingFocusGroupItemRef:l,tabIndex:M(()=>p(f)?0:-1),handleMousedown:u,handleFocus:c,handleKeydown:d}),{id:s,handleKeydown:d,handleFocus:c,handleMousedown:u}}});function PNe(t,e,n,r,i,o){const a=rn("el-roving-focus-collection-item");return R(),xe(a,{id:t.id,focusable:t.focusable,active:t.active},{default:j(()=>[Ee(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var ANe=Ye(kNe,[["render",PNe],["__file","roving-focus-item.vue"]]);const MNe=ue({name:"DropdownItemImpl",components:{ElIcon:mt},props:qH,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=Qe("dropdown"),{role:r}=ht(tC,void 0),{collectionItemRef:i}=ht(xNe,void 0),{collectionItemRef:o}=ht(oNe,void 0),{rovingFocusGroupItemRef:a,tabIndex:s,handleFocus:l,handleKeydown:u,handleMousedown:c}=ht(ZH,void 0),d=eC(i,o,a),f=M(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),h=fi(g=>{if([ut.enter,ut.numpadEnter,ut.space].includes(g.code))return g.preventDefault(),g.stopImmediatePropagation(),e("clickimpl",g),!0},u);return{ns:n,itemRef:d,dataset:{[UH]:""},role:f,tabIndex:s,handleFocus:l,handleKeydown:h,handleMousedown:c}}});function RNe(t,e,n,r,i,o){const a=rn("el-icon");return R(),Y(dt,null,[t.divided?(R(),Y("li",{key:0,role:"separator",class:V(t.ns.bem("menu","item","divided"))},null,2)):Se("v-if",!0),J("li",an({ref:t.itemRef},{...t.dataset,...t.$attrs},{"aria-disabled":t.disabled,class:[t.ns.be("menu","item"),t.ns.is("disabled",t.disabled)],tabindex:t.tabIndex,role:t.role,onClick:s=>t.$emit("clickimpl",s),onFocus:t.handleFocus,onKeydown:At(t.handleKeydown,["self"]),onMousedown:t.handleMousedown,onPointermove:s=>t.$emit("pointermove",s),onPointerleave:s=>t.$emit("pointerleave",s)}),[t.icon?(R(),xe(a,{key:0},{default:j(()=>[(R(),xe(on(t.icon)))]),_:1})):Se("v-if",!0),Ee(t.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var $Ne=Ye(MNe,[["render",RNe],["__file","dropdown-item-impl.vue"]]);const GH=()=>{const t=ht("elDropdown",{}),e=M(()=>t==null?void 0:t.dropdownSize);return{elDropdown:t,_elDropdownSize:e}},NNe=ue({name:"ElDropdownItem",components:{ElDropdownCollectionItem:ONe,ElRovingFocusItem:ANe,ElDropdownItemImpl:$Ne},inheritAttrs:!1,props:qH,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:r}=GH(),i=tn(),o=F(null),a=M(()=>{var h,g;return(g=(h=p(o))==null?void 0:h.textContent)!=null?g:""}),{onItemEnter:s,onItemLeave:l}=ht(tC,void 0),u=fi(h=>(e("pointermove",h),h.defaultPrevented),H5(h=>{if(t.disabled){l(h);return}const g=h.currentTarget;g===document.activeElement||g.contains(document.activeElement)||(s(h),h.defaultPrevented||g==null||g.focus())})),c=fi(h=>(e("pointerleave",h),h.defaultPrevented),H5(l)),d=fi(h=>{if(!t.disabled)return e("click",h),h.type!=="keydown"&&h.defaultPrevented},h=>{var g,m,y;if(t.disabled){h.stopImmediatePropagation();return}(g=r==null?void 0:r.hideOnClick)!=null&&g.value&&((m=r.handleClick)==null||m.call(r)),(y=r.commandHandler)==null||y.call(r,t.command,i,h)}),f=M(()=>({...t,...n}));return{handleClick:d,handlePointerMove:u,handlePointerLeave:c,textContent:a,propsAndAttrs:f}}});function DNe(t,e,n,r,i,o){var a;const s=rn("el-dropdown-item-impl"),l=rn("el-roving-focus-item"),u=rn("el-dropdown-collection-item");return R(),xe(u,{disabled:t.disabled,"text-value":(a=t.textValue)!=null?a:t.textContent},{default:j(()=>[B(l,{focusable:!t.disabled},{default:j(()=>[B(s,an(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),{default:j(()=>[Ee(t.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var KH=Ye(NNe,[["render",DNe],["__file","dropdown-item.vue"]]);const LNe=ue({name:"ElDropdownMenu",props:vNe,setup(t){const e=Qe("dropdown"),{_elDropdownSize:n}=GH(),r=n.value,{focusTrapRef:i,onKeydown:o}=ht(b$,void 0),{contentRef:a,role:s,triggerId:l}=ht(tC,void 0),{collectionRef:u,getItems:c}=ht(wNe,void 0),{rovingFocusGroupRef:d,rovingFocusGroupRootStyle:f,tabIndex:h,onBlur:g,onFocus:m,onMousedown:y}=ht(X$,void 0),{collectionRef:b}=ht(U$,void 0),w=M(()=>[e.b("menu"),e.bm("menu",r==null?void 0:r.value)]),O=eC(a,u,i,d,b),x=fi(C=>{var E;(E=t.onKeydown)==null||E.call(t,C)},C=>{const{currentTarget:E,code:T,target:P}=C;if(E.contains(P),ut.tab===T&&C.stopImmediatePropagation(),C.preventDefault(),P!==p(a)||!bNe.includes(T))return;const D=c().filter($=>!$.disabled).map($=>$.ref);YH.includes(T)&&D.reverse(),Z$(D)});return{size:r,rovingFocusGroupRootStyle:f,tabIndex:h,dropdownKls:w,role:s,triggerId:l,dropdownListWrapperRef:O,handleKeydown:C=>{x(C),o(C)},onBlur:g,onFocus:m,onMousedown:y}}});function INe(t,e,n,r,i,o){return R(),Y("ul",{ref:t.dropdownListWrapperRef,class:V(t.dropdownKls),style:vt(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onBlur:t.onBlur,onFocus:t.onFocus,onKeydown:At(t.handleKeydown,["self"]),onMousedown:At(t.onMousedown,["self"])},[Ee(t.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var JH=Ye(LNe,[["render",INe],["__file","dropdown-menu.vue"]]);const BNe=Vt(TNe,{DropdownItem:KH,DropdownMenu:JH}),FNe=ni(KH),VNe=ni(JH),jNe=ue({name:"ImgEmpty"}),QNe=ue({...jNe,setup(t){const e=Qe("empty"),n=bo();return(r,i)=>(R(),Y("svg",{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[J("defs",null,[J("linearGradient",{id:`linearGradient-1-${p(n)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),J("linearGradient",{id:`linearGradient-2-${p(n)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),J("rect",{id:`path-3-${p(n)}`,x:"0",y:"0",width:"17",height:"36"},null,8,["id"])]),J("g",{id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[J("g",{id:"B-type",transform:"translate(-1268.000000, -535.000000)"},[J("g",{id:"Group-2",transform:"translate(1268.000000, 535.000000)"},[J("path",{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${p(e).cssVarBlockName("fill-color-3")})`},null,8,["fill"]),J("polygon",{id:"Rectangle-Copy-14",fill:`var(${p(e).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,["fill"]),J("g",{id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},[J("polygon",{id:"Rectangle-Copy-10",fill:`var(${p(e).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,["fill"]),J("polygon",{id:"Rectangle-Copy-11",fill:`var(${p(e).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,["fill"]),J("rect",{id:"Rectangle-Copy-12",fill:`url(#linearGradient-1-${p(n)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,["fill"]),J("polygon",{id:"Rectangle-Copy-13",fill:`var(${p(e).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,["fill"])]),J("rect",{id:"Rectangle-Copy-15",fill:`url(#linearGradient-2-${p(n)})`,x:"13",y:"45",width:"40",height:"36"},null,8,["fill"]),J("g",{id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"},[J("use",{id:"Mask",fill:`var(${p(e).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${p(n)}`},null,8,["fill","xlink:href"]),J("polygon",{id:"Rectangle-Copy",fill:`var(${p(e).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${p(n)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,["fill","mask"])]),J("polygon",{id:"Rectangle-Copy-18",fill:`var(${p(e).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,["fill"])])])])]))}});var zNe=Ye(QNe,[["__file","img-empty.vue"]]);const WNe=Ze({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),HNe=ue({name:"ElEmpty"}),UNe=ue({...HNe,props:WNe,setup(t){const e=t,{t:n}=xn(),r=Qe("empty"),i=M(()=>e.description||n("el.table.emptyText")),o=M(()=>({width:pi(e.imageSize)}));return(a,s)=>(R(),Y("div",{class:V(p(r).b())},[J("div",{class:V(p(r).e("image")),style:vt(p(o))},[a.image?(R(),Y("img",{key:0,src:a.image,ondragstart:"return false"},null,8,["src"])):Ee(a.$slots,"image",{key:1},()=>[B(zNe)])],6),J("div",{class:V(p(r).e("description"))},[a.$slots.description?Ee(a.$slots,"description",{key:0}):(R(),Y("p",{key:1},Ve(p(i)),1))],2),a.$slots.default?(R(),Y("div",{key:0,class:V(p(r).e("bottom"))},[Ee(a.$slots,"default")],2)):Se("v-if",!0)],2))}});var XNe=Ye(UNe,[["__file","empty.vue"]]);const eU=Vt(XNe),ZNe=Ze({size:{type:String,values:fc},disabled:Boolean}),qNe=Ze({...ZNe,model:Object,rules:{type:we(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),YNe={validate:(t,e,n)=>(Xe(t)||Ot(t))&&wr(e)&&Ot(n)};function GNe(){const t=F([]),e=M(()=>{if(!t.value.length)return"0";const o=Math.max(...t.value);return o?`${o}px`:""});function n(o){const a=t.value.indexOf(o);return a===-1&&e.value,a}function r(o,a){if(o&&a){const s=n(a);t.value.splice(s,1,o)}else o&&t.value.push(o)}function i(o){const a=n(o);a>-1&&t.value.splice(a,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:i}}const dO=(t,e)=>{const n=No(e);return n.length>0?t.filter(r=>r.prop&&n.includes(r.prop)):t},KNe="ElForm",JNe=ue({name:KNe}),eDe=ue({...JNe,props:qNe,emits:YNe,setup(t,{expose:e,emit:n}){const r=t,i=[],o=ki(),a=Qe("form"),s=M(()=>{const{labelPosition:O,inline:x}=r;return[a.b(),a.m(o.value||"default"),{[a.m(`label-${O}`)]:O,[a.m("inline")]:x}]}),l=O=>i.find(x=>x.prop===O),u=O=>{i.push(O)},c=O=>{O.prop&&i.splice(i.indexOf(O),1)},d=(O=[])=>{!r.model||dO(i,O).forEach(x=>x.resetField())},f=(O=[])=>{dO(i,O).forEach(x=>x.clearValidate())},h=M(()=>!!r.model),g=O=>{if(i.length===0)return[];const x=dO(i,O);return x.length?x:[]},m=async O=>b(void 0,O),y=async(O=[])=>{if(!h.value)return!1;const x=g(O);if(x.length===0)return!0;let S={};for(const C of x)try{await C.validate("")}catch(E){S={...S,...E}}return Object.keys(S).length===0?!0:Promise.reject(S)},b=async(O=[],x)=>{const S=!St(x);try{const C=await y(O);return C===!0&&await(x==null?void 0:x(C)),C}catch(C){if(C instanceof Error)throw C;const E=C;return r.scrollToError&&w(Object.keys(E)[0]),await(x==null?void 0:x(!1,E)),S&&Promise.reject(E)}},w=O=>{var x;const S=dO(i,O)[0];S&&((x=S.$el)==null||x.scrollIntoView(r.scrollIntoViewOptions))};return Fe(()=>r.rules,()=>{r.validateOnRuleChange&&m().catch(O=>void 0)},{deep:!0}),gn(wp,vn({...Mi(r),emit:n,resetFields:d,clearValidate:f,validateField:b,getField:l,addField:u,removeField:c,...GNe()})),e({validate:m,validateField:b,resetFields:d,clearValidate:f,scrollToField:w,fields:i}),(O,x)=>(R(),Y("form",{class:V(p(s))},[Ee(O.$slots,"default")],2))}});var tDe=Ye(eDe,[["__file","form.vue"]]);function $h(){return $h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$h.apply(this,arguments)}function nDe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,O0(t,e)}function Vk(t){return Vk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vk(t)}function O0(t,e){return O0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},O0(t,e)}function rDe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function E1(t,e,n){return rDe()?E1=Reflect.construct.bind():E1=function(i,o,a){var s=[null];s.push.apply(s,o);var l=Function.bind.apply(i,s),u=new l;return a&&O0(u,a.prototype),u},E1.apply(null,arguments)}function iDe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function jk(t){var e=typeof Map=="function"?new Map:void 0;return jk=function(r){if(r===null||!iDe(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return E1(r,arguments,Vk(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),O0(i,r)},jk(t)}var oDe=/%[sdj%]/g,aDe=function(){};typeof process!="undefined"&&process.env;function Qk(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function Es(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var a=t.replace(oDe,function(s){if(s==="%%")return"%";if(i>=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function sDe(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function so(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||sDe(e)&&typeof t=="string"&&!t)}function lDe(t,e,n){var r=[],i=0,o=t.length;function a(s){r.push.apply(r,s||[]),i++,i===o&&n(r)}t.forEach(function(s){e(s,a)})}function mB(t,e,n){var r=0,i=t.length;function o(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s<i?e(t[s],o):n([])}o([])}function uDe(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var vB=function(t){nDe(e,t);function e(n,r){var i;return i=t.call(this,"Async Validation Error")||this,i.errors=n,i.fields=r,i}return e}(jk(Error));function cDe(t,e,n,r,i){if(e.first){var o=new Promise(function(f,h){var g=function(b){return r(b),b.length?h(new vB(b,Qk(b))):f(i)},m=uDe(t);mB(m,n,g)});return o.catch(function(f){return f}),o}var a=e.firstFields===!0?Object.keys(t):e.firstFields||[],s=Object.keys(t),l=s.length,u=0,c=[],d=new Promise(function(f,h){var g=function(y){if(c.push.apply(c,y),u++,u===l)return r(c),c.length?h(new vB(c,Qk(c))):f(i)};s.length||(r(c),f(i)),s.forEach(function(m){var y=t[m];a.indexOf(m)!==-1?mB(y,n,g):lDe(y,n,g)})});return d.catch(function(f){return f}),d}function dDe(t){return!!(t&&t.message!==void 0)}function fDe(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function yB(t,e){return function(n){var r;return t.fullFields?r=fDe(e,t.fullFields):r=e[n.field||t.fullField],dDe(n)?(n.field=n.field||t.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||t.fullField}}}function bB(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];typeof r=="object"&&typeof t[n]=="object"?t[n]=$h({},t[n],r):t[n]=r}}return t}var tU=function(e,n,r,i,o,a){e.required&&(!r.hasOwnProperty(e.field)||so(n,a||e.type))&&i.push(Es(o.messages.required,e.fullField))},hDe=function(e,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Es(o.messages.whitespace,e.fullField))},fO,pDe=function(){if(fO)return fO;var t="[a-fA-F\\d:]",e=function(x){return x&&x.includeBoundaries?"(?:(?<=\\s|^)(?="+t+")|(?<="+t+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=(`
- (?:
- (?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
- (?:`+r+":){6}(?:"+n+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
- (?:`+r+":){5}(?::"+n+"|(?::"+r+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
- (?:`+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
- (?:`+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
- (?:`+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
- (?:`+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
- (?::(?:(?::`+r+"){0,5}:"+n+"|(?::"+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
- )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
- `).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),a=new RegExp("^"+n+"$"),s=new RegExp("^"+i+"$"),l=function(x){return x&&x.exact?o:new RegExp("(?:"+e(x)+n+e(x)+")|(?:"+e(x)+i+e(x)+")","g")};l.v4=function(O){return O&&O.exact?a:new RegExp(""+e(O)+n+e(O),"g")},l.v6=function(O){return O&&O.exact?s:new RegExp(""+e(O)+i+e(O),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,f=l.v6().source,h="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",m="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",b='(?:[/?#][^\\s"]*)?',w="(?:"+u+"|www\\.)"+c+"(?:localhost|"+d+"|"+f+"|"+h+g+m+")"+y+b;return fO=new RegExp("(?:^"+w+"$)","i"),fO},_B={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ny={integer:function(e){return ny.number(e)&&parseInt(e,10)===e},float:function(e){return ny.number(e)&&!ny.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!ny.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(_B.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(pDe())},hex:function(e){return typeof e=="string"&&!!e.match(_B.hex)}},gDe=function(e,n,r,i,o){if(e.required&&n===void 0){tU(e,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?ny[s](n)||i.push(Es(o.messages.types[s],e.fullField,e.type)):s&&typeof n!==e.type&&i.push(Es(o.messages.types[s],e.fullField,e.type))},mDe=function(e,n,r,i,o){var a=typeof e.len=="number",s=typeof e.min=="number",l=typeof e.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,f=typeof n=="number",h=typeof n=="string",g=Array.isArray(n);if(f?d="number":h?d="string":g&&(d="array"),!d)return!1;g&&(c=n.length),h&&(c=n.replace(u,"_").length),a?c!==e.len&&i.push(Es(o.messages[d].len,e.fullField,e.len)):s&&!l&&c<e.min?i.push(Es(o.messages[d].min,e.fullField,e.min)):l&&!s&&c>e.max?i.push(Es(o.messages[d].max,e.fullField,e.max)):s&&l&&(c<e.min||c>e.max)&&i.push(Es(o.messages[d].range,e.fullField,e.min,e.max))},Hp="enum",vDe=function(e,n,r,i,o){e[Hp]=Array.isArray(e[Hp])?e[Hp]:[],e[Hp].indexOf(n)===-1&&i.push(Es(o.messages[Hp],e.fullField,e[Hp].join(", ")))},yDe=function(e,n,r,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(Es(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(n)||i.push(Es(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},xr={required:tU,whitespace:hDe,type:gDe,range:mDe,enum:vDe,pattern:yDe},bDe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n,"string")&&!e.required)return r();xr.required(e,n,i,a,o,"string"),so(n,"string")||(xr.type(e,n,i,a,o),xr.range(e,n,i,a,o),xr.pattern(e,n,i,a,o),e.whitespace===!0&&xr.whitespace(e,n,i,a,o))}r(a)},_De=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n)&&!e.required)return r();xr.required(e,n,i,a,o),n!==void 0&&xr.type(e,n,i,a,o)}r(a)},ODe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),so(n)&&!e.required)return r();xr.required(e,n,i,a,o),n!==void 0&&(xr.type(e,n,i,a,o),xr.range(e,n,i,a,o))}r(a)},wDe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n)&&!e.required)return r();xr.required(e,n,i,a,o),n!==void 0&&xr.type(e,n,i,a,o)}r(a)},xDe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n)&&!e.required)return r();xr.required(e,n,i,a,o),so(n)||xr.type(e,n,i,a,o)}r(a)},SDe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n)&&!e.required)return r();xr.required(e,n,i,a,o),n!==void 0&&(xr.type(e,n,i,a,o),xr.range(e,n,i,a,o))}r(a)},CDe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n)&&!e.required)return r();xr.required(e,n,i,a,o),n!==void 0&&(xr.type(e,n,i,a,o),xr.range(e,n,i,a,o))}r(a)},EDe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();xr.required(e,n,i,a,o,"array"),n!=null&&(xr.type(e,n,i,a,o),xr.range(e,n,i,a,o))}r(a)},TDe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n)&&!e.required)return r();xr.required(e,n,i,a,o),n!==void 0&&xr.type(e,n,i,a,o)}r(a)},kDe="enum",PDe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n)&&!e.required)return r();xr.required(e,n,i,a,o),n!==void 0&&xr[kDe](e,n,i,a,o)}r(a)},ADe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n,"string")&&!e.required)return r();xr.required(e,n,i,a,o),so(n,"string")||xr.pattern(e,n,i,a,o)}r(a)},MDe=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n,"date")&&!e.required)return r();if(xr.required(e,n,i,a,o),!so(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),xr.type(e,l,i,a,o),l&&xr.range(e,l.getTime(),i,a,o)}}r(a)},RDe=function(e,n,r,i,o){var a=[],s=Array.isArray(n)?"array":typeof n;xr.required(e,n,i,a,o,s),r(a)},RT=function(e,n,r,i,o){var a=e.type,s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(so(n,a)&&!e.required)return r();xr.required(e,n,i,s,o,a),so(n,a)||xr.type(e,n,i,s,o)}r(s)},$De=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(so(n)&&!e.required)return r();xr.required(e,n,i,a,o)}r(a)},ky={string:bDe,method:_De,number:ODe,boolean:wDe,regexp:xDe,integer:SDe,float:CDe,array:EDe,object:TDe,enum:PDe,pattern:ADe,date:MDe,url:RT,hex:RT,email:RT,required:RDe,any:$De};function zk(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Wk=zk(),Mb=function(){function t(n){this.rules=null,this._messages=Wk,this.define(n)}var e=t.prototype;return e.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(o){var a=r[o];i.rules[o]=Array.isArray(a)?a:[a]})},e.messages=function(r){return r&&(this._messages=bB(zk(),r)),this._messages},e.validate=function(r,i,o){var a=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var s=r,l=i,u=o;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,s),Promise.resolve(s);function c(m){var y=[],b={};function w(x){if(Array.isArray(x)){var S;y=(S=y).concat.apply(S,x)}else y.push(x)}for(var O=0;O<m.length;O++)w(m[O]);y.length?(b=Qk(y),u(y,b)):u(null,s)}if(l.messages){var d=this.messages();d===Wk&&(d=zk()),bB(d,l.messages),l.messages=d}else l.messages=this.messages();var f={},h=l.keys||Object.keys(this.rules);h.forEach(function(m){var y=a.rules[m],b=s[m];y.forEach(function(w){var O=w;typeof O.transform=="function"&&(s===r&&(s=$h({},s)),b=s[m]=O.transform(b)),typeof O=="function"?O={validator:O}:O=$h({},O),O.validator=a.getValidationMethod(O),O.validator&&(O.field=m,O.fullField=O.fullField||m,O.type=a.getType(O),f[m]=f[m]||[],f[m].push({rule:O,value:b,source:s,field:m}))})});var g={};return cDe(f,l,function(m,y){var b=m.rule,w=(b.type==="object"||b.type==="array")&&(typeof b.fields=="object"||typeof b.defaultField=="object");w=w&&(b.required||!b.required&&m.value),b.field=m.field;function O(C,E){return $h({},E,{fullField:b.fullField+"."+C,fullFields:b.fullFields?[].concat(b.fullFields,[C]):[C]})}function x(C){C===void 0&&(C=[]);var E=Array.isArray(C)?C:[C];!l.suppressWarning&&E.length&&t.warning("async-validator:",E),E.length&&b.message!==void 0&&(E=[].concat(b.message));var T=E.map(yB(b,s));if(l.first&&T.length)return g[b.field]=1,y(T);if(!w)y(T);else{if(b.required&&!m.value)return b.message!==void 0?T=[].concat(b.message).map(yB(b,s)):l.error&&(T=[l.error(b,Es(l.messages.required,b.field))]),y(T);var P={};b.defaultField&&Object.keys(m.value).map(function($){P[$]=b.defaultField}),P=$h({},P,m.rule.fields);var A={};Object.keys(P).forEach(function($){var N=P[$],z=Array.isArray(N)?N:[N];A[$]=z.map(O.bind(null,$))});var D=new t(A);D.messages(l.messages),m.rule.options&&(m.rule.options.messages=l.messages,m.rule.options.error=l.error),D.validate(m.value,m.rule.options||l,function($){var N=[];T&&T.length&&N.push.apply(N,T),$&&$.length&&N.push.apply(N,$),y(N.length?N:null)})}}var S;if(b.asyncValidator)S=b.asyncValidator(b,m.value,x,m.source,l);else if(b.validator){try{S=b.validator(b,m.value,x,m.source,l)}catch(C){console.error==null||console.error(C),l.suppressValidatorError||setTimeout(function(){throw C},0),x(C.message)}S===!0?x():S===!1?x(typeof b.message=="function"?b.message(b.fullField||b.field):b.message||(b.fullField||b.field)+" fails"):S instanceof Array?x(S):S instanceof Error&&x(S.message)}S&&S.then&&S.then(function(){return x()},function(C){return x(C)})},function(m){c(m)},s)},e.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!ky.hasOwnProperty(r.type))throw new Error(Es("Unknown rule type %s",r.type));return r.type||"string"},e.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var i=Object.keys(r),o=i.indexOf("message");return o!==-1&&i.splice(o,1),i.length===1&&i[0]==="required"?ky.required:ky[this.getType(r)]||void 0},t}();Mb.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");ky[e]=n};Mb.warning=aDe;Mb.messages=Wk;Mb.validators=ky;const NDe=["","error","validating","success"],DDe=Ze({label:String,labelWidth:{type:[String,Number],default:""},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:we([String,Array])},required:{type:Boolean,default:void 0},rules:{type:we([Object,Array])},error:String,validateStatus:{type:String,values:NDe},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:fc}}),OB="ElLabelWrap";var LDe=ue({name:OB,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=ht(wp,void 0),r=ht(ec);r||Wi(OB,"usage: <el-form-item><label-wrap /></el-form-item>");const i=Qe("form"),o=F(),a=F(0),s=()=>{var c;if((c=o.value)!=null&&c.firstElementChild){const d=window.getComputedStyle(o.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(c="update")=>{xt(()=>{e.default&&t.isAutoWidth&&(c==="update"?a.value=s():c==="remove"&&(n==null||n.deregisterLabelWidth(a.value)))})},u=()=>l("update");return Ft(()=>{u()}),pr(()=>{l("remove")}),ac(()=>u()),Fe(a,(c,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(c,d))}),Hr(M(()=>{var c,d;return(d=(c=o.value)==null?void 0:c.firstElementChild)!=null?d:null}),u),()=>{var c,d;if(!e)return null;const{isAutoWidth:f}=t;if(f){const h=n==null?void 0:n.autoLabelWidth,g=r==null?void 0:r.hasLabel,m={};if(g&&h&&h!=="auto"){const y=Math.max(0,Number.parseInt(h,10)-a.value),w=(r.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";y&&(m[w]=`${y}px`)}return B("div",{ref:o,class:[i.be("item","label-wrap")],style:m},[(c=e.default)==null?void 0:c.call(e)])}else return B(dt,{ref:o},[(d=e.default)==null?void 0:d.call(e)])}}});const IDe=ue({name:"ElFormItem"}),BDe=ue({...IDe,props:DDe,setup(t,{expose:e}){const n=t,r=Ni(),i=ht(wp,void 0),o=ht(ec,void 0),a=ki(void 0,{formItem:!1}),s=Qe("form-item"),l=bo().value,u=F([]),c=F(""),d=vSe(c,100),f=F(""),h=F();let g,m=!1;const y=M(()=>n.labelPosition||(i==null?void 0:i.labelPosition)),b=M(()=>{if(y.value==="top")return{};const ee=pi(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return ee?{width:ee}:{}}),w=M(()=>{if(y.value==="top"||(i==null?void 0:i.inline))return{};if(!n.label&&!n.labelWidth&&A)return{};const ee=pi(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return!n.label&&!r.label?{marginLeft:ee}:{}}),O=M(()=>[s.b(),s.m(a.value),s.is("error",c.value==="error"),s.is("validating",c.value==="validating"),s.is("success",c.value==="success"),s.is("required",I.value||n.required),s.is("no-asterisk",i==null?void 0:i.hideRequiredAsterisk),(i==null?void 0:i.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[s.m("feedback")]:i==null?void 0:i.statusIcon,[s.m(`label-${y.value}`)]:y.value}]),x=M(()=>wr(n.inlineMessage)?n.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),S=M(()=>[s.e("error"),{[s.em("error","inline")]:x.value}]),C=M(()=>n.prop?Ot(n.prop)?n.prop:n.prop.join("."):""),E=M(()=>!!(n.label||r.label)),T=M(()=>n.for||(u.value.length===1?u.value[0]:void 0)),P=M(()=>!T.value&&E.value),A=!!o,D=M(()=>{const ee=i==null?void 0:i.model;if(!(!ee||!n.prop))return _1(ee,n.prop).value}),$=M(()=>{const{required:ee}=n,he=[];n.rules&&he.push(...No(n.rules));const $e=i==null?void 0:i.rules;if($e&&n.prop){const Me=_1($e,n.prop).value;Me&&he.push(...No(Me))}if(ee!==void 0){const Me=he.map((q,de)=>[q,de]).filter(([q])=>Object.keys(q).includes("required"));if(Me.length>0)for(const[q,de]of Me)q.required!==ee&&(he[de]={...q,required:ee});else he.push({required:ee})}return he}),N=M(()=>$.value.length>0),z=ee=>$.value.filter($e=>!$e.trigger||!ee?!0:Xe($e.trigger)?$e.trigger.includes(ee):$e.trigger===ee).map(({trigger:$e,...Me})=>Me),I=M(()=>$.value.some(ee=>ee.required)),L=M(()=>{var ee;return d.value==="error"&&n.showMessage&&((ee=i==null?void 0:i.showMessage)!=null?ee:!0)}),X=M(()=>`${n.label||""}${(i==null?void 0:i.labelSuffix)||""}`),Q=ee=>{c.value=ee},W=ee=>{var he,$e;const{errors:Me,fields:q}=ee;(!Me||!q)&&console.error(ee),Q("error"),f.value=Me?($e=(he=Me==null?void 0:Me[0])==null?void 0:he.message)!=null?$e:`${n.prop} is required`:"",i==null||i.emit("validate",n.prop,!1,f.value)},G=()=>{Q("success"),i==null||i.emit("validate",n.prop,!0,"")},K=async ee=>{const he=C.value;return new Mb({[he]:ee}).validate({[he]:D.value},{firstFields:!0}).then(()=>(G(),!0)).catch(Me=>(W(Me),Promise.reject(Me)))},oe=async(ee,he)=>{if(m||!n.prop)return!1;const $e=St(he);if(!N.value)return he==null||he(!1),!1;const Me=z(ee);return Me.length===0?(he==null||he(!0),!0):(Q("validating"),K(Me).then(()=>(he==null||he(!0),!0)).catch(q=>{const{fields:de}=q;return he==null||he(!1,de),$e?!1:Promise.reject(de)}))},ne=()=>{Q(""),f.value="",m=!1},_e=async()=>{const ee=i==null?void 0:i.model;if(!ee||!n.prop)return;const he=_1(ee,n.prop);m=!0,he.value=dk(g),await xt(),ne(),m=!1},Ce=ee=>{u.value.includes(ee)||u.value.push(ee)},U=ee=>{u.value=u.value.filter(he=>he!==ee)};Fe(()=>n.error,ee=>{f.value=ee||"",Q(ee?"error":"")},{immediate:!0}),Fe(()=>n.validateStatus,ee=>Q(ee||""));const ie=vn({...Mi(n),$el:h,size:a,validateState:c,labelId:l,inputIds:u,isGroup:P,hasLabel:E,fieldValue:D,addInputId:Ce,removeInputId:U,resetField:_e,clearValidate:ne,validate:oe});return gn(ec,ie),Ft(()=>{n.prop&&(i==null||i.addField(ie),g=dk(D.value))}),pr(()=>{i==null||i.removeField(ie)}),e({size:a,validateMessage:f,validateState:c,validate:oe,clearValidate:ne,resetField:_e}),(ee,he)=>{var $e;return R(),Y("div",{ref_key:"formItemRef",ref:h,class:V(p(O)),role:p(P)?"group":void 0,"aria-labelledby":p(P)?p(l):void 0},[B(p(LDe),{"is-auto-width":p(b).width==="auto","update-all":(($e=p(i))==null?void 0:$e.labelWidth)==="auto"},{default:j(()=>[p(E)?(R(),xe(on(p(T)?"label":"div"),{key:0,id:p(l),for:p(T),class:V(p(s).e("label")),style:vt(p(b))},{default:j(()=>[Ee(ee.$slots,"label",{label:p(X)},()=>[Ue(Ve(p(X)),1)])]),_:3},8,["id","for","class","style"])):Se("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),J("div",{class:V(p(s).e("content")),style:vt(p(w))},[Ee(ee.$slots,"default"),B(r7,{name:`${p(s).namespace.value}-zoom-in-top`},{default:j(()=>[p(L)?Ee(ee.$slots,"error",{key:0,error:f.value},()=>[J("div",{class:V(p(S))},Ve(f.value),3)]):Se("v-if",!0)]),_:3},8,["name"])],6)],10,["role","aria-labelledby"])}}});var nU=Ye(BDe,[["__file","form-item.vue"]]);const kl=Vt(tDe,{FormItem:nU}),Pl=ni(nU),FDe=Ze({urlList:{type:we(Array),default:()=>ei([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:we(String)}}),VDe={close:()=>!0,switch:t=>Et(t),rotate:t=>Et(t)},jDe=ue({name:"ElImageViewer"}),QDe=ue({...jDe,props:FDe,emits:VDe,setup(t,{expose:e,emit:n}){var r;const i=t,o={CONTAIN:{name:"contain",icon:Qc(Hm)},ORIGINAL:{name:"original",icon:Qc(tEe)}},{t:a}=xn(),s=Qe("image-viewer"),{nextZIndex:l}=zm(),u=F(),c=F([]),d=vse(),f=F(!0),h=F(i.initialIndex),g=yr(o.CONTAIN),m=F({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),y=F((r=i.zIndex)!=null?r:l()),b=M(()=>{const{urlList:oe}=i;return oe.length<=1}),w=M(()=>h.value===0),O=M(()=>h.value===i.urlList.length-1),x=M(()=>i.urlList[h.value]),S=M(()=>[s.e("btn"),s.e("prev"),s.is("disabled",!i.infinite&&w.value)]),C=M(()=>[s.e("btn"),s.e("next"),s.is("disabled",!i.infinite&&O.value)]),E=M(()=>{const{scale:oe,deg:ne,offsetX:_e,offsetY:Ce,enableTransition:U}=m.value;let ie=_e/oe,ee=Ce/oe;const he=ne*Math.PI/180,$e=Math.cos(he),Me=Math.sin(he);ie=ie*$e+ee*Me,ee=ee*$e-_e/oe*Me;const q={transform:`scale(${oe}) rotate(${ne}deg) translate(${ie}px, ${ee}px)`,transition:U?"transform .3s":""};return g.value.name===o.CONTAIN.name&&(q.maxWidth=q.maxHeight="100%"),q});function T(){A(),n("close")}function P(){const oe=Wc(_e=>{switch(_e.code){case ut.esc:i.closeOnPressEscape&&T();break;case ut.space:I();break;case ut.left:X();break;case ut.up:W("zoomIn");break;case ut.right:Q();break;case ut.down:W("zoomOut");break}}),ne=Wc(_e=>{const Ce=_e.deltaY||_e.deltaX;W(Ce<0?"zoomIn":"zoomOut",{zoomRate:i.zoomRate,enableTransition:!1})});d.run(()=>{sr(document,"keydown",oe),sr(document,"wheel",ne)})}function A(){d.stop()}function D(){f.value=!1}function $(oe){f.value=!1,oe.target.alt=a("el.image.error")}function N(oe){if(f.value||oe.button!==0||!u.value)return;m.value.enableTransition=!1;const{offsetX:ne,offsetY:_e}=m.value,Ce=oe.pageX,U=oe.pageY,ie=Wc(he=>{m.value={...m.value,offsetX:ne+he.pageX-Ce,offsetY:_e+he.pageY-U}}),ee=sr(document,"mousemove",ie);sr(document,"mouseup",()=>{ee()}),oe.preventDefault()}function z(){m.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function I(){if(f.value)return;const oe=qg(o),ne=Object.values(o),_e=g.value.name,U=(ne.findIndex(ie=>ie.name===_e)+1)%oe.length;g.value=o[oe[U]],z()}function L(oe){const ne=i.urlList.length;h.value=(oe+ne)%ne}function X(){w.value&&!i.infinite||L(h.value-1)}function Q(){O.value&&!i.infinite||L(h.value+1)}function W(oe,ne={}){if(f.value)return;const{minScale:_e,maxScale:Ce}=i,{zoomRate:U,rotateDeg:ie,enableTransition:ee}={zoomRate:i.zoomRate,rotateDeg:90,enableTransition:!0,...ne};switch(oe){case"zoomOut":m.value.scale>_e&&(m.value.scale=Number.parseFloat((m.value.scale/U).toFixed(3)));break;case"zoomIn":m.value.scale<Ce&&(m.value.scale=Number.parseFloat((m.value.scale*U).toFixed(3)));break;case"clockwise":m.value.deg+=ie,n("rotate",m.value.deg);break;case"anticlockwise":m.value.deg-=ie,n("rotate",m.value.deg);break}m.value.enableTransition=ee}function G(oe){var ne;((ne=oe.detail)==null?void 0:ne.focusReason)==="pointer"&&oe.preventDefault()}function K(){i.closeOnPressEscape&&T()}return Fe(x,()=>{xt(()=>{const oe=c.value[0];oe!=null&&oe.complete||(f.value=!0)})}),Fe(h,oe=>{z(),n("switch",oe)}),Ft(()=>{P()}),e({setActiveItem:L}),(oe,ne)=>(R(),xe(p(Xm),{to:"body",disabled:!oe.teleported},{default:j(()=>[B(zi,{name:"viewer-fade",appear:""},{default:j(()=>[J("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:V(p(s).e("wrapper")),style:vt({zIndex:y.value})},[B(p(Um),{loop:"",trapped:"","focus-trap-el":u.value,"focus-start-el":"container",onFocusoutPrevented:G,onReleaseRequested:K},{default:j(()=>[J("div",{class:V(p(s).e("mask")),onClick:At(_e=>oe.hideOnClickModal&&T(),["self"])},null,10,["onClick"]),Se(" CLOSE "),J("span",{class:V([p(s).e("btn"),p(s).e("close")]),onClick:T},[B(p(mt),null,{default:j(()=>[B(p(Oa))]),_:1})],2),Se(" ARROW "),p(b)?Se("v-if",!0):(R(),Y(dt,{key:0},[J("span",{class:V(p(S)),onClick:X},[B(p(mt),null,{default:j(()=>[B(p(_f))]),_:1})],2),J("span",{class:V(p(C)),onClick:Q},[B(p(mt),null,{default:j(()=>[B(p(_a))]),_:1})],2)],64)),Se(" ACTIONS "),J("div",{class:V([p(s).e("btn"),p(s).e("actions")])},[J("div",{class:V(p(s).e("actions__inner"))},[B(p(mt),{onClick:_e=>W("zoomOut")},{default:j(()=>[B(p(yEe))]),_:1},8,["onClick"]),B(p(mt),{onClick:_e=>W("zoomIn")},{default:j(()=>[B(p(iW))]),_:1},8,["onClick"]),J("i",{class:V(p(s).e("actions__divider"))},null,2),B(p(mt),{onClick:I},{default:j(()=>[(R(),xe(on(p(g).icon)))]),_:1}),J("i",{class:V(p(s).e("actions__divider"))},null,2),B(p(mt),{onClick:_e=>W("anticlockwise")},{default:j(()=>[B(p(YCe))]),_:1},8,["onClick"]),B(p(mt),{onClick:_e=>W("clockwise")},{default:j(()=>[B(p(rW))]),_:1},8,["onClick"])],2)],2),Se(" CANVAS "),J("div",{class:V(p(s).e("canvas"))},[(R(!0),Y(dt,null,Ht(oe.urlList,(_e,Ce)=>zt((R(),Y("img",{ref_for:!0,ref:U=>c.value[Ce]=U,key:_e,src:_e,style:vt(p(E)),class:V(p(s).e("img")),crossorigin:oe.crossorigin,onLoad:D,onError:$,onMousedown:N},null,46,["src","crossorigin"])),[[Bn,Ce===h.value]])),128))],2),Ee(oe.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}});var zDe=Ye(QDe,[["__file","image-viewer.vue"]]);const rU=Vt(zDe),WDe=Ze({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:we([String,Object])},previewSrcList:{type:we(Array),default:()=>ei([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:we(String)}}),HDe={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>Et(t),close:()=>!0,show:()=>!0},UDe=ue({name:"ElImage",inheritAttrs:!1}),XDe=ue({...UDe,props:WDe,emits:HDe,setup(t,{emit:e}){const n=t;let r="";const{t:i}=xn(),o=Qe("image"),a=Nf(),s=M(()=>Ug(Object.entries(a).filter(([Q])=>/^(data-|on[A-Z])/i.test(Q)||["id","style"].includes(Q)))),l=Tb({excludeListeners:!0,excludeKeys:M(()=>Object.keys(s.value))}),u=F(),c=F(!1),d=F(!0),f=F(!1),h=F(),g=F(),m=wn&&"loading"in HTMLImageElement.prototype;let y,b;const w=M(()=>[o.e("inner"),x.value&&o.e("preview"),d.value&&o.is("loading")]),O=M(()=>{const{fit:Q}=n;return wn&&Q?{objectFit:Q}:{}}),x=M(()=>{const{previewSrcList:Q}=n;return Xe(Q)&&Q.length>0}),S=M(()=>{const{previewSrcList:Q,initialIndex:W}=n;let G=W;return W>Q.length-1&&(G=0),G}),C=M(()=>n.loading==="eager"?!1:!m&&n.loading==="lazy"||n.lazy),E=()=>{!wn||(d.value=!0,c.value=!1,u.value=n.src)};function T(Q){d.value=!1,c.value=!1,e("load",Q)}function P(Q){d.value=!1,c.value=!0,e("error",Q)}function A(){kMe(h.value,g.value)&&(E(),N())}const D=Iz(A,200,!0);async function $(){var Q;if(!wn)return;await xt();const{scrollContainer:W}=n;As(W)?g.value=W:Ot(W)&&W!==""?g.value=(Q=document.querySelector(W))!=null?Q:void 0:h.value&&(g.value=i$(h.value)),g.value&&(y=sr(g,"scroll",D),setTimeout(()=>A(),100))}function N(){!wn||!g.value||!D||(y==null||y(),g.value=void 0)}function z(Q){if(!!Q.ctrlKey){if(Q.deltaY<0)return Q.preventDefault(),!1;if(Q.deltaY>0)return Q.preventDefault(),!1}}function I(){!x.value||(b=sr("wheel",z,{passive:!1}),r=document.body.style.overflow,document.body.style.overflow="hidden",f.value=!0,e("show"))}function L(){b==null||b(),document.body.style.overflow=r,f.value=!1,e("close")}function X(Q){e("switch",Q)}return Fe(()=>n.src,()=>{C.value?(d.value=!0,c.value=!1,N(),$()):E()}),Ft(()=>{C.value?$():E()}),(Q,W)=>(R(),Y("div",an({ref_key:"container",ref:h},p(s),{class:[p(o).b(),Q.$attrs.class]}),[c.value?Ee(Q.$slots,"error",{key:0},()=>[J("div",{class:V(p(o).e("error"))},Ve(p(i)("el.image.error")),3)]):(R(),Y(dt,{key:1},[u.value!==void 0?(R(),Y("img",an({key:0},p(l),{src:u.value,loading:Q.loading,style:p(O),class:p(w),crossorigin:Q.crossorigin,onClick:I,onLoad:T,onError:P}),null,16,["src","loading","crossorigin"])):Se("v-if",!0),d.value?(R(),Y("div",{key:1,class:V(p(o).e("wrapper"))},[Ee(Q.$slots,"placeholder",{},()=>[J("div",{class:V(p(o).e("placeholder"))},null,2)])],2)):Se("v-if",!0)],64)),p(x)?(R(),Y(dt,{key:2},[f.value?(R(),xe(p(rU),{key:0,"z-index":Q.zIndex,"initial-index":p(S),infinite:Q.infinite,"zoom-rate":Q.zoomRate,"min-scale":Q.minScale,"max-scale":Q.maxScale,"url-list":Q.previewSrcList,crossorigin:Q.crossorigin,"hide-on-click-modal":Q.hideOnClickModal,teleported:Q.previewTeleported,"close-on-press-escape":Q.closeOnPressEscape,onClose:L,onSwitch:X},{default:j(()=>[Q.$slots.viewer?(R(),Y("div",{key:0},[Ee(Q.$slots,"viewer")])):Se("v-if",!0)]),_:3},8,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","url-list","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):Se("v-if",!0)],64)):Se("v-if",!0)],16))}});var ZDe=Ye(XDe,[["__file","image.vue"]]);const iU=Vt(ZDe),qDe=Ze({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:$i,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:t=>t===null||Et(t)||["min","max"].includes(t),default:null},name:String,placeholder:String,precision:{type:Number,validator:t=>t>=0&&t===Number.parseInt(`${t}`,10)},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),YDe={[dr]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Fo]:t=>Et(t)||Lr(t),[Ut]:t=>Et(t)||Lr(t)},GDe=ue({name:"ElInputNumber"}),KDe=ue({...GDe,props:qDe,emits:YDe,setup(t,{expose:e,emit:n}){const r=t,{t:i}=xn(),o=Qe("input-number"),a=F(),s=vn({currentValue:r.modelValue,userInput:null}),{formItem:l}=Wo(),u=M(()=>Et(r.modelValue)&&r.modelValue<=r.min),c=M(()=>Et(r.modelValue)&&r.modelValue>=r.max),d=M(()=>{const I=b(r.step);return ar(r.precision)?Math.max(b(r.modelValue),I):(I>r.precision,r.precision)}),f=M(()=>r.controls&&r.controlsPosition==="right"),h=ki(),g=Ho(),m=M(()=>{if(s.userInput!==null)return s.userInput;let I=s.currentValue;if(Lr(I))return"";if(Et(I)){if(Number.isNaN(I))return"";ar(r.precision)||(I=I.toFixed(r.precision))}return I}),y=(I,L)=>{if(ar(L)&&(L=d.value),L===0)return Math.round(I);let X=String(I);const Q=X.indexOf(".");if(Q===-1||!X.replace(".","").split("")[Q+L])return I;const K=X.length;return X.charAt(K-1)==="5"&&(X=`${X.slice(0,Math.max(0,K-1))}6`),Number.parseFloat(Number(X).toFixed(L))},b=I=>{if(Lr(I))return 0;const L=I.toString(),X=L.indexOf(".");let Q=0;return X!==-1&&(Q=L.length-X-1),Q},w=(I,L=1)=>Et(I)?y(I+r.step*L):s.currentValue,O=()=>{if(r.readonly||g.value||c.value)return;const I=Number(m.value)||0,L=w(I);C(L),n(Fo,s.currentValue),N()},x=()=>{if(r.readonly||g.value||u.value)return;const I=Number(m.value)||0,L=w(I,-1);C(L),n(Fo,s.currentValue),N()},S=(I,L)=>{const{max:X,min:Q,step:W,precision:G,stepStrictly:K,valueOnClear:oe}=r;X<Q&&Wi("InputNumber","min should not be greater than max.");let ne=Number(I);if(Lr(I)||Number.isNaN(ne))return null;if(I===""){if(oe===null)return null;ne=Ot(oe)?{min:Q,max:X}[oe]:oe}return K&&(ne=y(Math.round(ne/W)*W,G),ne!==I&&L&&n(Ut,ne)),ar(G)||(ne=y(ne,G)),(ne>X||ne<Q)&&(ne=ne>X?X:Q,L&&n(Ut,ne)),ne},C=(I,L=!0)=>{var X;const Q=s.currentValue,W=S(I);if(!L){n(Ut,W);return}Q===W&&I||(s.userInput=null,n(Ut,W),Q!==W&&n(dr,W,Q),r.validateEvent&&((X=l==null?void 0:l.validate)==null||X.call(l,"change").catch(G=>void 0)),s.currentValue=W)},E=I=>{s.userInput=I;const L=I===""?null:Number(I);n(Fo,L),C(L,!1)},T=I=>{const L=I!==""?Number(I):"";(Et(L)&&!Number.isNaN(L)||I==="")&&C(L),N(),s.userInput=null},P=()=>{var I,L;(L=(I=a.value)==null?void 0:I.focus)==null||L.call(I)},A=()=>{var I,L;(L=(I=a.value)==null?void 0:I.blur)==null||L.call(I)},D=I=>{n("focus",I)},$=I=>{var L,X;s.userInput=null,US()&&s.currentValue===null&&((L=a.value)==null?void 0:L.input)&&(a.value.input.value=""),n("blur",I),r.validateEvent&&((X=l==null?void 0:l.validate)==null||X.call(l,"blur").catch(Q=>void 0))},N=()=>{s.currentValue!==r.modelValue&&(s.currentValue=r.modelValue)},z=I=>{document.activeElement===I.target&&I.preventDefault()};return Fe(()=>r.modelValue,(I,L)=>{const X=S(I,!0);s.userInput===null&&X!==L&&(s.currentValue=X)},{immediate:!0}),Ft(()=>{var I;const{min:L,max:X,modelValue:Q}=r,W=(I=a.value)==null?void 0:I.input;if(W.setAttribute("role","spinbutton"),Number.isFinite(X)?W.setAttribute("aria-valuemax",String(X)):W.removeAttribute("aria-valuemax"),Number.isFinite(L)?W.setAttribute("aria-valuemin",String(L)):W.removeAttribute("aria-valuemin"),W.setAttribute("aria-valuenow",s.currentValue||s.currentValue===0?String(s.currentValue):""),W.setAttribute("aria-disabled",String(g.value)),!Et(Q)&&Q!=null){let G=Number(Q);Number.isNaN(G)&&(G=null),n(Ut,G)}W.addEventListener("wheel",z,{passive:!1})}),ac(()=>{var I,L;const X=(I=a.value)==null?void 0:I.input;X==null||X.setAttribute("aria-valuenow",`${(L=s.currentValue)!=null?L:""}`)}),e({focus:P,blur:A}),(I,L)=>(R(),Y("div",{class:V([p(o).b(),p(o).m(p(h)),p(o).is("disabled",p(g)),p(o).is("without-controls",!I.controls),p(o).is("controls-right",p(f))]),onDragstart:At(()=>{},["prevent"])},[I.controls?zt((R(),Y("span",{key:0,role:"button","aria-label":p(i)("el.inputNumber.decrease"),class:V([p(o).e("decrease"),p(o).is("disabled",p(u))]),onKeydown:br(x,["enter"])},[Ee(I.$slots,"decrease-icon",{},()=>[B(p(mt),null,{default:j(()=>[p(f)?(R(),xe(p(hd),{key:0})):(R(),xe(p(VCe),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[p(_w),x]]):Se("v-if",!0),I.controls?zt((R(),Y("span",{key:1,role:"button","aria-label":p(i)("el.inputNumber.increase"),class:V([p(o).e("increase"),p(o).is("disabled",p(c))]),onKeydown:br(O,["enter"])},[Ee(I.$slots,"increase-icon",{},()=>[B(p(mt),null,{default:j(()=>[p(f)?(R(),xe(p(a$),{key:0})):(R(),xe(p(yw),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[p(_w),O]]):Se("v-if",!0),B(p(hi),{id:I.id,ref_key:"input",ref:a,type:"number",step:I.step,"model-value":p(m),placeholder:I.placeholder,readonly:I.readonly,disabled:p(g),size:p(h),max:I.max,min:I.min,name:I.name,"aria-label":I.ariaLabel,"validate-event":!1,onKeydown:[br(At(O,["prevent"]),["up"]),br(At(x,["prevent"]),["down"])],onBlur:$,onFocus:D,onInput:E,onChange:T},es({_:2},[I.$slots.prefix?{name:"prefix",fn:j(()=>[Ee(I.$slots,"prefix")])}:void 0,I.$slots.suffix?{name:"suffix",fn:j(()=>[Ee(I.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var JDe=Ye(KDe,[["__file","input-number.vue"]]);const oU=Vt(JDe),eLe=Ze({modelValue:{type:we(Array)},max:Number,tagType:{...Gc.type,default:"info"},tagEffect:Gc.effect,trigger:{type:we(String),default:ut.enter},draggable:{type:Boolean,default:!1},size:$i,clearable:Boolean,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:String,default:"off"},ariaLabel:String}),tLe={[Ut]:t=>Xe(t)||ar(t),[dr]:t=>Xe(t)||ar(t),[Fo]:t=>Ot(t),"add-tag":t=>Ot(t),"remove-tag":t=>Ot(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0};function nLe({props:t,emit:e,formItem:n}){const r=Ho(),i=ki(),o=yr(),a=F(),s=M(()=>["small"].includes(i.value)?"small":"default"),l=M(()=>{var P;return(P=t.modelValue)!=null&&P.length?void 0:t.placeholder}),u=M(()=>!(t.readonly||r.value)),c=M(()=>{var P,A;return ar(t.max)?!1:((A=(P=t.modelValue)==null?void 0:P.length)!=null?A:0)>=t.max}),d=P=>{if(c.value){a.value=void 0;return}S.value||e(Fo,P.target.value)},f=P=>{var A;if(!S.value)switch(P.code){case t.trigger:P.preventDefault(),P.stopPropagation(),h();break;case ut.numpadEnter:t.trigger===ut.enter&&(P.preventDefault(),P.stopPropagation(),h());break;case ut.backspace:!a.value&&((A=t.modelValue)==null?void 0:A.length)&&(P.preventDefault(),P.stopPropagation(),g(t.modelValue.length-1));break}},h=()=>{var P,A;const D=(P=a.value)==null?void 0:P.trim();if(!D||c.value)return;const $=[...(A=t.modelValue)!=null?A:[],D];e(Ut,$),e(dr,$),e("add-tag",D),a.value=void 0},g=P=>{var A;const D=((A=t.modelValue)!=null?A:[]).slice(),[$]=D.splice(P,1);e(Ut,D),e(dr,D),e("remove-tag",$)},m=()=>{a.value=void 0,e(Ut,void 0),e(dr,void 0),e("clear")},y=(P,A,D)=>{var $;const N=(($=t.modelValue)!=null?$:[]).slice(),[z]=N.splice(P,1),I=A>P&&D==="before"?-1:A<P&&D==="after"?1:0;N.splice(A+I,0,z),e(Ut,N),e(dr,N)},b=()=>{var P;(P=o.value)==null||P.focus()},w=()=>{var P;(P=o.value)==null||P.blur()},{wrapperRef:O,isFocused:x}=jf(o,{beforeFocus(){return r.value},afterBlur(){var P;h(),t.validateEvent&&((P=n==null?void 0:n.validate)==null||P.call(n,"blur").catch(A=>void 0))}}),{isComposing:S,handleCompositionStart:C,handleCompositionUpdate:E,handleCompositionEnd:T}=kb({afterComposition:d});return Fe(()=>t.modelValue,()=>{var P;t.validateEvent&&((P=n==null?void 0:n.validate)==null||P.call(n,dr).catch(A=>void 0))}),{inputRef:o,wrapperRef:O,isFocused:x,isComposing:S,inputValue:a,size:i,tagSize:s,placeholder:l,closable:u,disabled:r,inputLimit:c,handleDragged:y,handleInput:d,handleKeydown:f,handleAddTag:h,handleRemoveTag:g,handleClear:m,handleCompositionStart:C,handleCompositionUpdate:E,handleCompositionEnd:T,focus:b,blur:w}}function rLe(){const t=F(!1);return{hovering:t,handleMouseEnter:()=>{t.value=!0},handleMouseLeave:()=>{t.value=!1}}}function iLe(){const t=yr(),e=F(0),n=11,r=M(()=>({minWidth:`${Math.max(e.value,n)}px`}));return Hr(t,()=>{var o,a;e.value=(a=(o=t.value)==null?void 0:o.getBoundingClientRect().width)!=null?a:0}),{calculatorRef:t,calculatorWidth:e,inputStyle:r}}function oLe({wrapperRef:t,handleDragged:e,afterDragged:n}){const r=Qe("input-tag"),i=yr(),o=F(!1);let a,s,l,u;function c(g){return`.${r.e("inner")} .${r.namespace.value}-tag:nth-child(${g+1})`}function d(g,m){a=m,s=t.value.querySelector(c(m)),s&&(s.style.opacity="0.5"),g.dataTransfer.effectAllowed="move"}function f(g,m){if(l=m,g.preventDefault(),g.dataTransfer.dropEffect="move",ar(a)||a===m){o.value=!1;return}const y=t.value.querySelector(c(m)).getBoundingClientRect(),b=a+1!==m,w=a-1!==m,O=g.clientX-y.left,x=b?w?.5:1:-1,S=w?b?.5:0:1;O<=y.width*x?u="before":O>y.width*S?u="after":u=void 0;const C=t.value.querySelector(`.${r.e("inner")}`),E=C.getBoundingClientRect(),T=Number.parseFloat(Fc(C,"gap"))/2,P=y.top-E.top;let A=-9999;if(u==="before")A=Math.max(y.left-E.left-T,Math.floor(-T/2));else if(u==="after"){const D=y.right-E.left;A=D+(E.width===D?Math.floor(T/2):T)}Yz(i.value,{top:`${P}px`,left:`${A}px`}),o.value=!!u}function h(g){g.preventDefault(),s&&(s.style.opacity=""),u&&!ar(a)&&!ar(l)&&a!==l&&e(a,l,u),o.value=!1,a=void 0,s=null,l=void 0,u=void 0,n==null||n()}return{dropIndicatorRef:i,showDropIndicator:o,handleDragStart:d,handleDragOver:f,handleDragEnd:h}}function aLe({props:t,isFocused:e,hovering:n,disabled:r,inputValue:i,size:o,validateState:a,validateIcon:s,needStatusIcon:l}){const u=Nf(),c=Ni(),d=Qe("input-tag"),f=Qe("input"),h=M(()=>[d.b(),d.is("focused",e.value),d.is("hovering",n.value),d.is("disabled",r.value),d.m(o.value),d.e("wrapper"),u.class]),g=M(()=>[u.style]),m=M(()=>{var w,O;return[d.e("inner"),d.is("draggable",t.draggable),d.is("left-space",!((w=t.modelValue)!=null&&w.length)&&!c.prefix),d.is("right-space",!((O=t.modelValue)!=null&&O.length)&&!b.value)]}),y=M(()=>{var w;return t.clearable&&!r.value&&!t.readonly&&(((w=t.modelValue)==null?void 0:w.length)||i.value)&&(e.value||n.value)}),b=M(()=>c.suffix||y.value||a.value&&s.value&&l.value);return{ns:d,nsInput:f,containerKls:h,containerStyle:g,innerKls:m,showClear:y,showSuffix:b}}const sLe=ue({name:"ElInputTag",inheritAttrs:!1}),lLe=ue({...sLe,props:eLe,emits:tLe,setup(t,{expose:e,emit:n}){const r=t,i=Tb(),o=Ni(),{form:a,formItem:s}=Wo(),{inputId:l}=Tl(r,{formItemContext:s}),u=M(()=>{var q;return(q=a==null?void 0:a.statusIcon)!=null?q:!1}),c=M(()=>(s==null?void 0:s.validateState)||""),d=M(()=>c.value&&HS[c.value]),{inputRef:f,wrapperRef:h,isFocused:g,inputValue:m,size:y,tagSize:b,placeholder:w,closable:O,disabled:x,handleDragged:S,handleInput:C,handleKeydown:E,handleRemoveTag:T,handleClear:P,handleCompositionStart:A,handleCompositionUpdate:D,handleCompositionEnd:$,focus:N,blur:z}=nLe({props:r,emit:n,formItem:s}),{hovering:I,handleMouseEnter:L,handleMouseLeave:X}=rLe(),{calculatorRef:Q,inputStyle:W}=iLe(),{dropIndicatorRef:G,showDropIndicator:K,handleDragStart:oe,handleDragOver:ne,handleDragEnd:_e}=oLe({wrapperRef:h,handleDragged:S,afterDragged:N}),{ns:Ce,nsInput:U,containerKls:ie,containerStyle:ee,innerKls:he,showClear:$e,showSuffix:Me}=aLe({props:r,hovering:I,isFocused:g,inputValue:m,disabled:x,size:y,validateState:c,validateIcon:d,needStatusIcon:u});return e({focus:N,blur:z}),(q,de)=>(R(),Y("div",{ref_key:"wrapperRef",ref:h,class:V(p(ie)),style:vt(p(ee)),onMouseenter:p(L),onMouseleave:p(X)},[p(o).prefix?(R(),Y("div",{key:0,class:V(p(Ce).e("prefix"))},[Ee(q.$slots,"prefix")],2)):Se("v-if",!0),J("div",{class:V(p(he))},[(R(!0),Y(dt,null,Ht(q.modelValue,(ke,Ie)=>(R(),xe(p(ns),{key:Ie,size:p(b),closable:p(O),type:q.tagType,effect:q.tagEffect,draggable:p(O)&&q.draggable,"disable-transitions":"",onClose:se=>p(T)(Ie),onDragstart:se=>p(oe)(se,Ie),onDragover:se=>p(ne)(se,Ie),onDragend:p(_e),onDrop:At(()=>{},["stop"])},{default:j(()=>[Ee(q.$slots,"tag",{value:ke,index:Ie},()=>[Ue(Ve(ke),1)])]),_:2},1032,["size","closable","type","effect","draggable","onClose","onDragstart","onDragover","onDragend","onDrop"]))),128)),J("div",{class:V(p(Ce).e("input-wrapper"))},[zt(J("input",an({id:p(l),ref_key:"inputRef",ref:f,"onUpdate:modelValue":ke=>Tr(m)?m.value=ke:null},p(i),{type:"text",minlength:q.minlength,maxlength:q.maxlength,disabled:p(x),readonly:q.readonly,autocomplete:q.autocomplete,tabindex:q.tabindex,placeholder:p(w),autofocus:q.autofocus,ariaLabel:q.ariaLabel,class:p(Ce).e("input"),style:p(W),onCompositionstart:p(A),onCompositionupdate:p(D),onCompositionend:p($),onInput:p(C),onKeydown:p(E)}),null,16,["id","onUpdate:modelValue","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onKeydown"]),[[vS,p(m)]]),J("span",{ref_key:"calculatorRef",ref:Q,"aria-hidden":"true",class:V(p(Ce).e("input-calculator")),textContent:Ve(p(m))},null,10,["textContent"])],2),zt(J("div",{ref_key:"dropIndicatorRef",ref:G,class:V(p(Ce).e("drop-indicator"))},null,2),[[Bn,p(K)]])],2),p(Me)?(R(),Y("div",{key:1,class:V(p(Ce).e("suffix"))},[Ee(q.$slots,"suffix"),p($e)?(R(),xe(p(mt),{key:0,class:V([p(Ce).e("icon"),p(Ce).e("clear")]),onMousedown:At(p(ir),["prevent"]),onClick:p(P)},{default:j(()=>[B(p(pd))]),_:1},8,["class","onMousedown","onClick"])):Se("v-if",!0),p(c)&&p(d)&&p(u)?(R(),xe(p(mt),{key:1,class:V([p(U).e("icon"),p(U).e("validateIcon"),p(U).is("loading",p(c)==="validating")])},{default:j(()=>[(R(),xe(on(p(d))))]),_:1},8,["class"])):Se("v-if",!0)],2)):Se("v-if",!0)],46,["onMouseenter","onMouseleave"]))}});var uLe=Ye(lLe,[["__file","input-tag.vue"]]);const cLe=Vt(uLe),dLe=Ze({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:fr}}),fLe={click:t=>t instanceof MouseEvent},hLe=ue({name:"ElLink"}),pLe=ue({...hLe,props:dLe,emits:fLe,setup(t,{emit:e}){const n=t,r=Qe("link"),i=M(()=>[r.b(),r.m(n.type),r.is("disabled",n.disabled),r.is("underline",n.underline&&!n.disabled)]);function o(a){n.disabled||e("click",a)}return(a,s)=>(R(),Y("a",{class:V(p(i)),href:a.disabled||!a.href?void 0:a.href,target:a.disabled||!a.href?void 0:a.target,onClick:o},[a.icon?(R(),xe(p(mt),{key:0},{default:j(()=>[(R(),xe(on(a.icon)))]),_:1})):Se("v-if",!0),a.$slots.default?(R(),Y("span",{key:1,class:V(p(r).e("inner"))},[Ee(a.$slots,"default")],2)):Se("v-if",!0),a.$slots.icon?Ee(a.$slots,"icon",{key:2}):Se("v-if",!0)],10,["href","target"]))}});var gLe=Ye(pLe,[["__file","link.vue"]]);const mLe=Vt(gLe);class vLe{constructor(e,n){this.parent=e,this.domNode=n,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){const e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,n=>{n.addEventListener("keydown",r=>{let i=!1;switch(r.code){case ut.down:{this.gotoSubIndex(this.subIndex+1),i=!0;break}case ut.up:{this.gotoSubIndex(this.subIndex-1),i=!0;break}case ut.tab:{O1(e,"mouseleave");break}case ut.enter:case ut.numpadEnter:case ut.space:{i=!0,r.currentTarget.click();break}}return i&&(r.preventDefault(),r.stopPropagation()),!1})})}}class yLe{constructor(e,n){this.domNode=e,this.submenu=null,this.submenu=null,this.init(n)}init(e){this.domNode.setAttribute("tabindex","0");const n=this.domNode.querySelector(`.${e}-menu`);n&&(this.submenu=new vLe(this,n)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{let n=!1;switch(e.code){case ut.down:{O1(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break}case ut.up:{O1(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break}case ut.tab:{O1(e.currentTarget,"mouseleave");break}case ut.enter:case ut.numpadEnter:case ut.space:{n=!0,e.currentTarget.click();break}}n&&e.preventDefault()})}}class bLe{constructor(e,n){this.domNode=e,this.init(n)}init(e){const n=this.domNode.childNodes;Array.from(n).forEach(r=>{r.nodeType===1&&new yLe(r,e)})}}const _Le=ue({name:"ElMenuCollapseTransition",setup(){const t=Qe("menu");return{listeners:{onBeforeEnter:n=>n.style.opacity="0.2",onEnter(n,r){il(n,`${t.namespace.value}-opacity-transition`),n.style.opacity="1",r()},onAfterEnter(n){sa(n,`${t.namespace.value}-opacity-transition`),n.style.opacity=""},onBeforeLeave(n){n.dataset||(n.dataset={}),Ha(n,t.m("collapse"))?(sa(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),il(n,t.m("collapse"))):(il(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),sa(n,t.m("collapse"))),n.style.width=`${n.scrollWidth}px`,n.style.overflow="hidden"},onLeave(n){il(n,"horizontal-collapse-transition"),n.style.width=`${n.dataset.scrollWidth}px`}}}}});function OLe(t,e,n,r,i,o){return R(),xe(zi,an({mode:"out-in"},t.listeners),{default:j(()=>[Ee(t.$slots,"default")]),_:3},16)}var wLe=Ye(_Le,[["render",OLe],["__file","menu-collapse-transition.vue"]]);function aU(t,e){const n=M(()=>{let i=t.parent;const o=[e.value];for(;i.type.name!=="ElMenu";)i.props.index&&o.unshift(i.props.index),i=i.parent;return o});return{parentMenu:M(()=>{let i=t.parent;for(;i&&!["ElMenu","ElSubMenu"].includes(i.type.name);)i=i.parent;return i}),indexPath:n}}function xLe(t){return M(()=>{const n=t.backgroundColor;return n?new FW(n).shade(20).toString():""})}const sU=(t,e)=>{const n=Qe("menu");return M(()=>n.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":xLe(t).value||"","active-color":t.activeTextColor||"",level:`${e}`}))},SLe=Ze({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:fr},expandOpenIcon:{type:fr},collapseCloseIcon:{type:fr},collapseOpenIcon:{type:fr}}),$T="ElSubMenu";var q$=ue({name:$T,props:SLe,setup(t,{slots:e,expose:n}){const r=tn(),{indexPath:i,parentMenu:o}=aU(r,M(()=>t.index)),a=Qe("menu"),s=Qe("sub-menu"),l=ht("rootMenu");l||Wi($T,"can not inject root menu");const u=ht(`subMenu:${o.value.uid}`);u||Wi($T,"can not inject sub menu");const c=F({}),d=F({});let f;const h=F(!1),g=F(),m=F(null),y=M(()=>T.value==="horizontal"&&w.value?"bottom-start":"right-start"),b=M(()=>T.value==="horizontal"&&w.value||T.value==="vertical"&&!l.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?C.value?t.expandOpenIcon:t.expandCloseIcon:hd:t.collapseCloseIcon&&t.collapseOpenIcon?C.value?t.collapseOpenIcon:t.collapseCloseIcon:_a),w=M(()=>u.level===0),O=M(()=>{const G=t.teleported;return G===void 0?w.value:G}),x=M(()=>l.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),S=M(()=>T.value==="horizontal"&&w.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),C=M(()=>l.openedMenus.includes(t.index)),E=M(()=>{let G=!1;return Object.values(c.value).forEach(K=>{K.active&&(G=!0)}),Object.values(d.value).forEach(K=>{K.active&&(G=!0)}),G}),T=M(()=>l.props.mode),P=vn({index:t.index,indexPath:i,active:E}),A=sU(l.props,u.level+1),D=M(()=>{var G;return(G=t.popperOffset)!=null?G:l.props.popperOffset}),$=M(()=>{var G;return(G=t.popperClass)!=null?G:l.props.popperClass}),N=M(()=>{var G;return(G=t.showTimeout)!=null?G:l.props.showTimeout}),z=M(()=>{var G;return(G=t.hideTimeout)!=null?G:l.props.hideTimeout}),I=()=>{var G,K,oe;return(oe=(K=(G=m.value)==null?void 0:G.popperRef)==null?void 0:K.popperInstanceRef)==null?void 0:oe.destroy()},L=G=>{G||I()},X=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||t.disabled||l.handleSubMenuClick({index:t.index,indexPath:i.value,active:E.value})},Q=(G,K=N.value)=>{var oe;if(G.type!=="focus"){if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||t.disabled){u.mouseInChild.value=!0;return}u.mouseInChild.value=!0,f==null||f(),{stop:f}=rp(()=>{l.openMenu(t.index,i.value)},K),O.value&&((oe=o.value.vnode.el)==null||oe.dispatchEvent(new MouseEvent("mouseenter")))}},W=(G=!1)=>{var K;if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"){u.mouseInChild.value=!1;return}f==null||f(),u.mouseInChild.value=!1,{stop:f}=rp(()=>!h.value&&l.closeMenu(t.index,i.value),z.value),O.value&&G&&((K=u.handleMouseleave)==null||K.call(u,!0))};Fe(()=>l.props.collapse,G=>L(Boolean(G)));{const G=oe=>{d.value[oe.index]=oe},K=oe=>{delete d.value[oe.index]};gn(`subMenu:${r.uid}`,{addSubMenu:G,removeSubMenu:K,handleMouseleave:W,mouseInChild:h,level:u.level+1})}return n({opened:C}),Ft(()=>{l.addSubMenu(P),u.addSubMenu(P)}),pr(()=>{u.removeSubMenu(P),l.removeSubMenu(P)}),()=>{var G;const K=[(G=e.title)==null?void 0:G.call(e),Tt(mt,{class:s.e("icon-arrow"),style:{transform:C.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>Ot(b.value)?Tt(r.appContext.components[b.value]):Tt(b.value)})],oe=l.isMenuPopup?Tt(Hi,{ref:m,visible:C.value,effect:"light",pure:!0,offset:D.value,showArrow:!1,persistent:!0,popperClass:$.value,placement:y.value,teleported:O.value,fallbackPlacements:S.value,transition:x.value,gpuAcceleration:!1},{content:()=>{var ne;return Tt("div",{class:[a.m(T.value),a.m("popup-container"),$.value],onMouseenter:_e=>Q(_e,100),onMouseleave:()=>W(!0),onFocus:_e=>Q(_e,100)},[Tt("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${y.value}`)],style:A.value},[(ne=e.default)==null?void 0:ne.call(e)])])},default:()=>Tt("div",{class:s.e("title"),onClick:X},K)}):Tt(dt,{},[Tt("div",{class:s.e("title"),ref:g,onClick:X},K),Tt(YS,{},{default:()=>{var ne;return zt(Tt("ul",{role:"menu",class:[a.b(),a.m("inline")],style:A.value},[(ne=e.default)==null?void 0:ne.call(e)]),[[Bn,C.value]])}})]);return Tt("li",{class:[s.b(),s.is("active",E.value),s.is("opened",C.value),s.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:C.value,onMouseenter:Q,onMouseleave:()=>W(),onFocus:Q},[oe])}}});const CLe=Ze({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:we(Array),default:()=>ei([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:fr,default:()=>zCe},popperEffect:{type:we(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),NT=t=>Xe(t)&&t.every(e=>Ot(e)),ELe={close:(t,e)=>Ot(t)&&NT(e),open:(t,e)=>Ot(t)&&NT(e),select:(t,e,n,r)=>Ot(t)&&NT(e)&&Jt(n)&&(r===void 0||r instanceof Promise)};var TLe=ue({name:"ElMenu",props:CLe,emits:ELe,setup(t,{emit:e,slots:n,expose:r}){const i=tn(),o=i.appContext.config.globalProperties.$router,a=F(),s=Qe("menu"),l=Qe("sub-menu"),u=F(-1),c=F(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),d=F(t.defaultActive),f=F({}),h=F({}),g=M(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),m=()=>{const I=d.value&&f.value[d.value];if(!I||t.mode==="horizontal"||t.collapse)return;I.indexPath.forEach(X=>{const Q=h.value[X];Q&&y(X,Q.indexPath)})},y=(I,L)=>{c.value.includes(I)||(t.uniqueOpened&&(c.value=c.value.filter(X=>L.includes(X))),c.value.push(I),e("open",I,L))},b=I=>{const L=c.value.indexOf(I);L!==-1&&c.value.splice(L,1)},w=(I,L)=>{b(I),e("close",I,L)},O=({index:I,indexPath:L})=>{c.value.includes(I)?w(I,L):y(I,L)},x=I=>{(t.mode==="horizontal"||t.collapse)&&(c.value=[]);const{index:L,indexPath:X}=I;if(!(Lr(L)||Lr(X)))if(t.router&&o){const Q=I.route||L,W=o.push(Q).then(G=>(G||(d.value=L),G));e("select",L,X,{index:L,indexPath:X,route:Q},W)}else d.value=L,e("select",L,X,{index:L,indexPath:X})},S=I=>{const L=f.value,X=L[I]||d.value&&L[d.value]||L[t.defaultActive];X?d.value=X.index:d.value=I},C=I=>{const L=getComputedStyle(I),X=Number.parseInt(L.marginLeft,10),Q=Number.parseInt(L.marginRight,10);return I.offsetWidth+X+Q||0},E=()=>{var I,L;if(!a.value)return-1;const X=Array.from((L=(I=a.value)==null?void 0:I.childNodes)!=null?L:[]).filter(Ce=>Ce.nodeName!=="#comment"&&(Ce.nodeName!=="#text"||Ce.nodeValue)),Q=64,W=getComputedStyle(a.value),G=Number.parseInt(W.paddingLeft,10),K=Number.parseInt(W.paddingRight,10),oe=a.value.clientWidth-G-K;let ne=0,_e=0;return X.forEach((Ce,U)=>{ne+=C(Ce),ne<=oe-Q&&(_e=U+1)}),_e===X.length?-1:_e},T=I=>h.value[I].indexPath,P=(I,L=33.34)=>{let X;return()=>{X&&clearTimeout(X),X=setTimeout(()=>{I()},L)}};let A=!0;const D=()=>{if(u.value===E())return;const I=()=>{u.value=-1,xt(()=>{u.value=E()})};A?I():P(I)(),A=!1};Fe(()=>t.defaultActive,I=>{f.value[I]||(d.value=""),S(I)}),Fe(()=>t.collapse,I=>{I&&(c.value=[])}),Fe(f.value,m);let $;Bo(()=>{t.mode==="horizontal"&&t.ellipsis?$=Hr(a,D).stop:$==null||$()});const N=F(!1);{const I=W=>{h.value[W.index]=W},L=W=>{delete h.value[W.index]};gn("rootMenu",vn({props:t,openedMenus:c,items:f,subMenus:h,activeIndex:d,isMenuPopup:g,addMenuItem:W=>{f.value[W.index]=W},removeMenuItem:W=>{delete f.value[W.index]},addSubMenu:I,removeSubMenu:L,openMenu:y,closeMenu:w,handleMenuItemClick:x,handleSubMenuClick:O})),gn(`subMenu:${i.uid}`,{addSubMenu:I,removeSubMenu:L,mouseInChild:N,level:0})}Ft(()=>{t.mode==="horizontal"&&new bLe(i.vnode.el,s.namespace.value)}),r({open:L=>{const{indexPath:X}=h.value[L];X.forEach(Q=>y(Q,X))},close:b,handleResize:D});const z=sU(t,0);return()=>{var I,L;let X=(L=(I=n.default)==null?void 0:I.call(n))!=null?L:[];const Q=[];if(t.mode==="horizontal"&&a.value){const K=of(X),oe=u.value===-1?K:K.slice(0,u.value),ne=u.value===-1?[]:K.slice(u.value);(ne==null?void 0:ne.length)&&t.ellipsis&&(X=oe,Q.push(Tt(q$,{index:"sub-menu-more",class:l.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>Tt(mt,{class:l.e("icon-more")},{default:()=>Tt(t.ellipsisIcon)}),default:()=>ne})))}const W=t.closeOnClickOutside?[[Kc,()=>{!c.value.length||N.value||(c.value.forEach(K=>e("close",K,T(K))),c.value=[])}]]:[],G=zt(Tt("ul",{key:String(t.collapse),role:"menubar",ref:a,style:z.value,class:{[s.b()]:!0,[s.m(t.mode)]:!0,[s.m("collapse")]:t.collapse}},[...X,...Q]),W);return t.collapseTransition&&t.mode==="vertical"?Tt(wLe,()=>G):G}}});const kLe=Ze({index:{type:we([String,null]),default:null},route:{type:we([String,Object])},disabled:Boolean}),PLe={click:t=>Ot(t.index)&&Xe(t.indexPath)},DT="ElMenuItem",ALe=ue({name:DT,components:{ElTooltip:Hi},props:kLe,emits:PLe,setup(t,{emit:e}){const n=tn(),r=ht("rootMenu"),i=Qe("menu"),o=Qe("menu-item");r||Wi(DT,"can not inject root menu");const{parentMenu:a,indexPath:s}=aU(n,Gn(t,"index")),l=ht(`subMenu:${a.value.uid}`);l||Wi(DT,"can not inject sub menu");const u=M(()=>t.index===r.activeIndex),c=vn({index:t.index,indexPath:s,active:u}),d=()=>{t.disabled||(r.handleMenuItemClick({index:t.index,indexPath:s.value,route:t.route}),e("click",c))};return Ft(()=>{l.addSubMenu(c),r.addMenuItem(c)}),pr(()=>{l.removeSubMenu(c),r.removeMenuItem(c)}),{parentMenu:a,rootMenu:r,active:u,nsMenu:i,nsMenuItem:o,handleClick:d}}});function MLe(t,e,n,r,i,o){const a=rn("el-tooltip");return R(),Y("li",{class:V([t.nsMenuItem.b(),t.nsMenuItem.is("active",t.active),t.nsMenuItem.is("disabled",t.disabled)]),role:"menuitem",tabindex:"-1",onClick:t.handleClick},[t.parentMenu.type.name==="ElMenu"&&t.rootMenu.props.collapse&&t.$slots.title?(R(),xe(a,{key:0,effect:t.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:j(()=>[Ee(t.$slots,"title")]),default:j(()=>[J("div",{class:V(t.nsMenu.be("tooltip","trigger"))},[Ee(t.$slots,"default")],2)]),_:3},8,["effect"])):(R(),Y(dt,{key:1},[Ee(t.$slots,"default"),Ee(t.$slots,"title")],64))],10,["onClick"])}var lU=Ye(ALe,[["render",MLe],["__file","menu-item.vue"]]);const RLe={title:String},$Le="ElMenuItemGroup",NLe=ue({name:$Le,props:RLe,setup(){return{ns:Qe("menu-item-group")}}});function DLe(t,e,n,r,i,o){return R(),Y("li",{class:V(t.ns.b())},[J("div",{class:V(t.ns.e("title"))},[t.$slots.title?Ee(t.$slots,"title",{key:1}):(R(),Y(dt,{key:0},[Ue(Ve(t.title),1)],64))],2),J("ul",null,[Ee(t.$slots,"default")])],2)}var uU=Ye(NLe,[["render",DLe],["__file","menu-item-group.vue"]]);const LLe=Vt(TLe,{MenuItem:lU,MenuItemGroup:uU,SubMenu:q$}),ILe=ni(lU),BLe=ni(uU),FLe=ni(q$),VLe=Ze({icon:{type:fr,default:()=>dCe},title:String,content:{type:String,default:""}}),jLe={back:()=>!0},QLe=ue({name:"ElPageHeader"}),zLe=ue({...QLe,props:VLe,emits:jLe,setup(t,{emit:e}){const n=Ni(),{t:r}=xn(),i=Qe("page-header"),o=M(()=>[i.b(),{[i.m("has-breadcrumb")]:!!n.breadcrumb,[i.m("has-extra")]:!!n.extra,[i.is("contentful")]:!!n.default}]);function a(){e("back")}return(s,l)=>(R(),Y("div",{class:V(p(o))},[s.$slots.breadcrumb?(R(),Y("div",{key:0,class:V(p(i).e("breadcrumb"))},[Ee(s.$slots,"breadcrumb")],2)):Se("v-if",!0),J("div",{class:V(p(i).e("header"))},[J("div",{class:V(p(i).e("left"))},[J("div",{class:V(p(i).e("back")),role:"button",tabindex:"0",onClick:a},[s.icon||s.$slots.icon?(R(),Y("div",{key:0,"aria-label":s.title||p(r)("el.pageHeader.title"),class:V(p(i).e("icon"))},[Ee(s.$slots,"icon",{},()=>[s.icon?(R(),xe(p(mt),{key:0},{default:j(()=>[(R(),xe(on(s.icon)))]),_:1})):Se("v-if",!0)])],10,["aria-label"])):Se("v-if",!0),J("div",{class:V(p(i).e("title"))},[Ee(s.$slots,"title",{},()=>[Ue(Ve(s.title||p(r)("el.pageHeader.title")),1)])],2)],2),B(p(HH),{direction:"vertical"}),J("div",{class:V(p(i).e("content"))},[Ee(s.$slots,"content",{},()=>[Ue(Ve(s.content),1)])],2)],2),s.$slots.extra?(R(),Y("div",{key:0,class:V(p(i).e("extra"))},[Ee(s.$slots,"extra")],2)):Se("v-if",!0)],2),s.$slots.default?(R(),Y("div",{key:1,class:V(p(i).e("main"))},[Ee(s.$slots,"default")],2)):Se("v-if",!0)],2))}});var WLe=Ye(zLe,[["__file","page-header.vue"]]);const HLe=Vt(WLe),cU=Symbol("elPaginationKey"),ULe=Ze({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:fr}}),XLe={click:t=>t instanceof MouseEvent},ZLe=ue({name:"ElPaginationPrev"}),qLe=ue({...ZLe,props:ULe,emits:XLe,setup(t){const e=t,{t:n}=xn(),r=M(()=>e.disabled||e.currentPage<=1);return(i,o)=>(R(),Y("button",{type:"button",class:"btn-prev",disabled:p(r),"aria-label":i.prevText||p(n)("el.pagination.prev"),"aria-disabled":p(r),onClick:a=>i.$emit("click",a)},[i.prevText?(R(),Y("span",{key:0},Ve(i.prevText),1)):(R(),xe(p(mt),{key:1},{default:j(()=>[(R(),xe(on(i.prevIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var YLe=Ye(qLe,[["__file","prev.vue"]]);const GLe=Ze({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:fr}}),KLe=ue({name:"ElPaginationNext"}),JLe=ue({...KLe,props:GLe,emits:["click"],setup(t){const e=t,{t:n}=xn(),r=M(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(i,o)=>(R(),Y("button",{type:"button",class:"btn-next",disabled:p(r),"aria-label":i.nextText||p(n)("el.pagination.next"),"aria-disabled":p(r),onClick:a=>i.$emit("click",a)},[i.nextText?(R(),Y("span",{key:0},Ve(i.nextText),1)):(R(),xe(p(mt),{key:1},{default:j(()=>[(R(),xe(on(i.nextIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var eIe=Ye(JLe,[["__file","next.vue"]]);const dU=Symbol("ElSelectGroup"),qm=Symbol("ElSelect");function tIe(t,e){const n=ht(qm),r=ht(dU,{disabled:!1}),i=M(()=>c(No(n.props.modelValue),t.value)),o=M(()=>{var h;if(n.props.multiple){const g=No((h=n.props.modelValue)!=null?h:[]);return!i.value&&g.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),a=M(()=>t.label||(Jt(t.value)?"":t.value)),s=M(()=>t.value||t.label||""),l=M(()=>t.disabled||e.groupDisabled||o.value),u=tn(),c=(h=[],g)=>{if(Jt(t.value)){const m=n.props.valueKey;return h&&h.some(y=>Dn(Kr(y,m))===Kr(g,m))}else return h&&h.includes(g)},d=()=>{!t.disabled&&!r.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(u.proxy))},f=h=>{const g=new RegExp(R$(h),"i");e.visible=g.test(a.value)||t.created};return Fe(()=>a.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Fe(()=>t.value,(h,g)=>{const{remote:m,valueKey:y}=n.props;if(h!==g&&(n.onOptionDestroy(g,u.proxy),n.onOptionCreate(u.proxy)),!t.created&&!m){if(y&&Jt(h)&&Jt(g)&&h[y]===g[y])return;n.setSelected()}}),Fe(()=>r.disabled,()=>{e.groupDisabled=r.disabled},{immediate:!0}),{select:n,currentLabel:a,currentValue:s,itemSelected:i,isDisabled:l,hoverItem:d,updateOption:f}}const nIe=ue({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const e=Qe("select"),n=bo(),r=M(()=>[e.be("dropdown","item"),e.is("disabled",p(s)),e.is("selected",p(a)),e.is("hovering",p(f))]),i=vn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:a,isDisabled:s,select:l,hoverItem:u,updateOption:c}=tIe(t,i),{visible:d,hover:f}=Mi(i),h=tn().proxy;l.onOptionCreate(h),pr(()=>{const m=h.value,{selected:y}=l.states,b=y.some(w=>w.value===h.value);xt(()=>{l.states.cachedOptions.get(m)===h&&!b&&l.states.cachedOptions.delete(m)}),l.onOptionDestroy(m,h)});function g(){s.value||l.handleOptionSelect(h)}return{ns:e,id:n,containerKls:r,currentLabel:o,itemSelected:a,isDisabled:s,select:l,hoverItem:u,updateOption:c,visible:d,hover:f,selectOptionClick:g,states:i}}});function rIe(t,e,n,r,i,o){return zt((R(),Y("li",{id:t.id,class:V(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMousemove:t.hoverItem,onClick:At(t.selectOptionClick,["stop"])},[Ee(t.$slots,"default",{},()=>[J("span",null,Ve(t.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[Bn,t.visible]])}var Y$=Ye(nIe,[["render",rIe],["__file","option.vue"]]);const iIe=ue({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=ht(qm),e=Qe("select"),n=M(()=>t.props.popperClass),r=M(()=>t.props.multiple),i=M(()=>t.props.fitInputWidth),o=F("");function a(){var s;o.value=`${(s=t.selectRef)==null?void 0:s.offsetWidth}px`}return Ft(()=>{a(),Hr(t.selectRef,a)}),{ns:e,minWidth:o,popperClass:n,isMultiple:r,isFitInputWidth:i}}});function oIe(t,e,n,r,i,o){return R(),Y("div",{class:V([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:vt({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(R(),Y("div",{key:0,class:V(t.ns.be("dropdown","header"))},[Ee(t.$slots,"header")],2)):Se("v-if",!0),Ee(t.$slots,"default"),t.$slots.footer?(R(),Y("div",{key:1,class:V(t.ns.be("dropdown","footer"))},[Ee(t.$slots,"footer")],2)):Se("v-if",!0)],6)}var aIe=Ye(iIe,[["render",oIe],["__file","select-dropdown.vue"]]);const sIe=11,lIe=(t,e)=>{const{t:n}=xn(),r=bo(),i=Qe("select"),o=Qe("input"),a=vn({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),s=F(null),l=F(null),u=F(null),c=F(null),d=F(null),f=F(null),h=F(null),g=F(null),m=F(null),y=F(null),b=F(null),w=F(null),{isComposing:O,handleCompositionStart:x,handleCompositionUpdate:S,handleCompositionEnd:C}=kb({afterComposition:ot=>at(ot)}),{wrapperRef:E,isFocused:T,handleBlur:P}=jf(d,{beforeFocus(){return X.value},afterFocus(){t.automaticDropdown&&!A.value&&(A.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(ot){var Rt,Nt;return((Rt=u.value)==null?void 0:Rt.isFocusInsideContent(ot))||((Nt=c.value)==null?void 0:Nt.isFocusInsideContent(ot))},afterBlur(){A.value=!1,a.menuVisibleOnFocus=!1}}),A=F(!1),D=F(),{form:$,formItem:N}=Wo(),{inputId:z}=Tl(t,{formItemContext:N}),{valueOnClear:I,isEmptyValue:L}=VS(t),X=M(()=>t.disabled||($==null?void 0:$.disabled)),Q=M(()=>Xe(t.modelValue)?t.modelValue.length>0:!L(t.modelValue)),W=M(()=>{var ot;return(ot=$==null?void 0:$.statusIcon)!=null?ot:!1}),G=M(()=>t.clearable&&!X.value&&a.inputHovering&&Q.value),K=M(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),oe=M(()=>i.is("reverse",K.value&&A.value)),ne=M(()=>(N==null?void 0:N.validateState)||""),_e=M(()=>HS[ne.value]),Ce=M(()=>t.remote?300:0),U=M(()=>t.loading?t.loadingText||n("el.select.loading"):t.remote&&!a.inputValue&&a.options.size===0?!1:t.filterable&&a.inputValue&&a.options.size>0&&ie.value===0?t.noMatchText||n("el.select.noMatch"):a.options.size===0?t.noDataText||n("el.select.noData"):null),ie=M(()=>ee.value.filter(ot=>ot.visible).length),ee=M(()=>{const ot=Array.from(a.options.values()),Rt=[];return a.optionValues.forEach(Nt=>{const Br=ot.findIndex(gi=>gi.value===Nt);Br>-1&&Rt.push(ot[Br])}),Rt.length>=ot.length?Rt:ot}),he=M(()=>Array.from(a.cachedOptions.values())),$e=M(()=>{const ot=ee.value.filter(Rt=>!Rt.created).some(Rt=>Rt.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!ot}),Me=()=>{t.filterable&&St(t.filterMethod)||t.filterable&&t.remote&&St(t.remoteMethod)||ee.value.forEach(ot=>{var Rt;(Rt=ot.updateOption)==null||Rt.call(ot,a.inputValue)})},q=ki(),de=M(()=>["small"].includes(q.value)?"small":"default"),ke=M({get(){return A.value&&U.value!==!1},set(ot){A.value=ot}}),Ie=M(()=>{if(t.multiple&&!ar(t.modelValue))return No(t.modelValue).length===0&&!a.inputValue;const ot=Xe(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||ar(ot)?!a.inputValue:!0}),se=M(()=>{var ot;const Rt=(ot=t.placeholder)!=null?ot:n("el.select.placeholder");return t.multiple||!Q.value?Rt:a.selectedLabel}),ye=M(()=>Ok?null:"mouseenter");Fe(()=>t.modelValue,(ot,Rt)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",Ae("")),te(),!Qi(ot,Rt)&&t.validateEvent&&(N==null||N.validate("change").catch(Nt=>void 0))},{flush:"post",deep:!0}),Fe(()=>A.value,ot=>{ot?Ae(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),e("visible-change",ot)}),Fe(()=>a.options.entries(),()=>{!wn||(te(),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value&&Z())},{flush:"post"}),Fe(()=>a.hoveringIndex,ot=>{Et(ot)&&ot>-1?D.value=ee.value[ot]||{}:D.value={},ee.value.forEach(Rt=>{Rt.hover=D.value===Rt})}),Bo(()=>{a.isBeforeHide||Me()});const Ae=ot=>{a.previousQuery===ot||O.value||(a.previousQuery=ot,t.filterable&&St(t.filterMethod)?t.filterMethod(ot):t.filterable&&t.remote&&St(t.remoteMethod)&&t.remoteMethod(ot),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value?xt(Z):xt(Te))},Z=()=>{const ot=ee.value.filter(gi=>gi.visible&&!gi.disabled&&!gi.states.groupDisabled),Rt=ot.find(gi=>gi.created),Nt=ot[0],Br=ee.value.map(gi=>gi.value);a.hoveringIndex=qe(Br,Rt||Nt)},te=()=>{if(t.multiple)a.selectedLabel="";else{const Rt=Xe(t.modelValue)?t.modelValue[0]:t.modelValue,Nt=le(Rt);a.selectedLabel=Nt.currentLabel,a.selected=[Nt];return}const ot=[];ar(t.modelValue)||No(t.modelValue).forEach(Rt=>{ot.push(le(Rt))}),a.selected=ot},le=ot=>{let Rt;const Nt=n0(ot);for(let ho=a.cachedOptions.size-1;ho>=0;ho--){const Eo=he.value[ho];if(Nt?Kr(Eo.value,t.valueKey)===Kr(ot,t.valueKey):Eo.value===ot){Rt={value:ot,currentLabel:Eo.currentLabel,get isDisabled(){return Eo.isDisabled}};break}}if(Rt)return Rt;const Br=Nt?ot.label:ot!=null?ot:"";return{value:ot,currentLabel:Br}},Te=()=>{a.hoveringIndex=ee.value.findIndex(ot=>a.selected.some(Rt=>Jn(Rt)===Jn(ot)))},pe=()=>{a.selectionWidth=l.value.getBoundingClientRect().width},Oe=()=>{a.calculatorWidth=f.value.getBoundingClientRect().width},Re=()=>{a.collapseItemWidth=b.value.getBoundingClientRect().width},je=()=>{var ot,Rt;(Rt=(ot=u.value)==null?void 0:ot.updatePopper)==null||Rt.call(ot)},Ke=()=>{var ot,Rt;(Rt=(ot=c.value)==null?void 0:ot.updatePopper)==null||Rt.call(ot)},Je=()=>{a.inputValue.length>0&&!A.value&&(A.value=!0),Ae(a.inputValue)},at=ot=>{if(a.inputValue=ot.target.value,t.remote)kt();else return Je()},kt=Qo(()=>{Je()},Ce.value),jt=ot=>{Qi(t.modelValue,ot)||e(dr,ot)},Pe=ot=>RS(ot,Rt=>{const Nt=a.cachedOptions.get(Rt);return Nt&&!Nt.disabled&&!Nt.states.groupDisabled}),nt=ot=>{if(!!t.multiple&&ot.code!==ut.delete&&ot.target.value.length<=0){const Rt=No(t.modelValue).slice(),Nt=Pe(Rt);if(Nt<0)return;const Br=Rt[Nt];Rt.splice(Nt,1),e(Ut,Rt),jt(Rt),e("remove-tag",Br)}},fe=(ot,Rt)=>{const Nt=a.selected.indexOf(Rt);if(Nt>-1&&!X.value){const Br=No(t.modelValue).slice();Br.splice(Nt,1),e(Ut,Br),jt(Br),e("remove-tag",Rt.value)}ot.stopPropagation(),Ln()},De=ot=>{ot.stopPropagation();const Rt=t.multiple?[]:I.value;if(t.multiple)for(const Nt of a.selected)Nt.isDisabled&&Rt.push(Nt.value);e(Ut,Rt),jt(Rt),a.hoveringIndex=-1,A.value=!1,e("clear"),Ln()},ce=ot=>{var Rt;if(t.multiple){const Nt=No((Rt=t.modelValue)!=null?Rt:[]).slice(),Br=qe(Nt,ot);Br>-1?Nt.splice(Br,1):(t.multipleLimit<=0||Nt.length<t.multipleLimit)&&Nt.push(ot.value),e(Ut,Nt),jt(Nt),ot.created&&Ae(""),t.filterable&&!t.reserveKeyword&&(a.inputValue="")}else e(Ut,ot.value),jt(ot.value),A.value=!1;Ln(),!A.value&&xt(()=>{Mt(ot)})},qe=(ot=[],Rt)=>ar(Rt)?-1:Jt(Rt.value)?ot.findIndex(Nt=>Qi(Kr(Nt,t.valueKey),Jn(Rt))):ot.indexOf(Rt.value),Mt=ot=>{var Rt,Nt,Br,gi,ho;const Eo=Xe(ot)?ot[0]:ot;let eo=null;if(Eo!=null&&Eo.value){const To=ee.value.filter(ds=>ds.value===Eo.value);To.length>0&&(eo=To[0].$el)}if(u.value&&eo){const To=(gi=(Br=(Nt=(Rt=u.value)==null?void 0:Rt.popperRef)==null?void 0:Nt.contentRef)==null?void 0:Br.querySelector)==null?void 0:gi.call(Br,`.${i.be("dropdown","wrap")}`);To&&o$(To,eo)}(ho=w.value)==null||ho.handleScroll()},Zt=ot=>{a.options.set(ot.value,ot),a.cachedOptions.set(ot.value,ot)},Sn=(ot,Rt)=>{a.options.get(ot)===Rt&&a.options.delete(ot)},kr=M(()=>{var ot,Rt;return(Rt=(ot=u.value)==null?void 0:ot.popperRef)==null?void 0:Rt.contentRef}),zn=()=>{a.isBeforeHide=!1,xt(()=>Mt(a.selected))},Ln=()=>{var ot;(ot=d.value)==null||ot.focus()},Yt=()=>{var ot;if(A.value){A.value=!1,xt(()=>{var Rt;return(Rt=d.value)==null?void 0:Rt.blur()});return}(ot=d.value)==null||ot.blur()},Ge=ot=>{De(ot)},$t=ot=>{if(A.value=!1,T.value){const Rt=new FocusEvent("focus",ot);xt(()=>P(Rt))}},bn=()=>{a.inputValue.length>0?a.inputValue="":A.value=!1},dn=()=>{X.value||(Ok&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:A.value=!A.value)},Pr=()=>{if(!A.value)dn();else{const ot=ee.value[a.hoveringIndex];ot&&!ot.isDisabled&&ce(ot)}},Jn=ot=>Jt(ot.value)?Kr(ot.value,t.valueKey):ot.value,Xi=M(()=>ee.value.filter(ot=>ot.visible).every(ot=>ot.isDisabled)),Ji=M(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),si=M(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),Vs=ot=>{if(!A.value){A.value=!0;return}if(!(a.options.size===0||ie.value===0||O.value)&&!Xi.value){ot==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):ot==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Rt=ee.value[a.hoveringIndex];(Rt.isDisabled||!Rt.visible)&&Vs(ot),xt(()=>Mt(D.value))}},cs=()=>{if(!l.value)return 0;const ot=window.getComputedStyle(l.value);return Number.parseFloat(ot.gap||"6px")},_r=M(()=>{const ot=cs();return{maxWidth:`${b.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-ot:a.selectionWidth}px`}}),$l=M(()=>({maxWidth:`${a.selectionWidth}px`})),ca=M(()=>({width:`${Math.max(a.calculatorWidth,sIe)}px`}));return Hr(l,pe),Hr(f,Oe),Hr(m,je),Hr(E,je),Hr(y,Ke),Hr(b,Re),Ft(()=>{te()}),{inputId:z,contentId:r,nsSelect:i,nsInput:o,states:a,isFocused:T,expanded:A,optionsArray:ee,hoverOption:D,selectSize:q,filteredOptionsCount:ie,resetCalculatorWidth:Oe,updateTooltip:je,updateTagTooltip:Ke,debouncedOnInputChange:kt,onInput:at,deletePrevTag:nt,deleteTag:fe,deleteSelected:De,handleOptionSelect:ce,scrollToOption:Mt,hasModelValue:Q,shouldShowPlaceholder:Ie,currentPlaceholder:se,mouseEnterEventName:ye,needStatusIcon:W,showClose:G,iconComponent:K,iconReverse:oe,validateState:ne,validateIcon:_e,showNewOption:$e,updateOptions:Me,collapseTagSize:de,setSelected:te,selectDisabled:X,emptyText:U,handleCompositionStart:x,handleCompositionUpdate:S,handleCompositionEnd:C,onOptionCreate:Zt,onOptionDestroy:Sn,handleMenuEnter:zn,focus:Ln,blur:Yt,handleClearClick:Ge,handleClickOutside:$t,handleEsc:bn,toggleMenu:dn,selectOption:Pr,getValueKey:Jn,navigateOptions:Vs,dropdownMenuVisible:ke,showTagList:Ji,collapseTagList:si,tagStyle:_r,collapseTagStyle:$l,inputStyle:ca,popperRef:kr,inputRef:d,tooltipRef:u,tagTooltipRef:c,calculatorRef:f,prefixRef:h,suffixRef:g,selectRef:s,wrapperRef:E,selectionRef:l,scrollbarRef:w,menuRef:m,tagMenuRef:y,collapseItemRef:b}};var uIe=ue({name:"ElOptions",setup(t,{slots:e}){const n=ht(qm);let r=[];return()=>{var i,o;const a=(i=e.default)==null?void 0:i.call(e),s=[];function l(u){!Xe(u)||u.forEach(c=>{var d,f,h,g;const m=(d=(c==null?void 0:c.type)||{})==null?void 0:d.name;m==="ElOptionGroup"?l(!Ot(c.children)&&!Xe(c.children)&&St((f=c.children)==null?void 0:f.default)?(h=c.children)==null?void 0:h.default():c.children):m==="ElOption"?s.push((g=c.props)==null?void 0:g.value):Xe(c.children)&&l(c.children)})}return a.length&&l((o=a[0])==null?void 0:o.children),Qi(s,r)||(r=s,n&&(n.states.optionValues=s)),a}}});const cIe=Ze({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:$i,effect:{type:we(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:io.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:fr,default:pd},fitInputWidth:Boolean,suffixIcon:{type:fr,default:hd},tagType:{...Gc.type,default:"info"},tagEffect:{...Gc.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:we(String),values:gd,default:"bottom-start"},fallbackPlacements:{type:we(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:String,...Wm,...wo(["ariaLabel"])}),wB="ElSelect",dIe=ue({name:wB,componentName:wB,components:{ElSelectMenu:aIe,ElOption:Y$,ElOptions:uIe,ElTag:ns,ElScrollbar:gu,ElTooltip:Hi,ElIcon:mt},directives:{ClickOutside:Kc},props:cIe,emits:[Ut,dr,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const n=M(()=>{const{modelValue:a,multiple:s}=t,l=s?[]:void 0;return Xe(a)?s?a:l:s?l:a}),r=vn({...Mi(t),modelValue:n}),i=lIe(r,e);gn(qm,vn({props:r,states:i.states,optionsArray:i.optionsArray,handleOptionSelect:i.handleOptionSelect,onOptionCreate:i.onOptionCreate,onOptionDestroy:i.onOptionDestroy,selectRef:i.selectRef,setSelected:i.setSelected}));const o=M(()=>t.multiple?i.states.selected.map(a=>a.currentLabel):i.states.selectedLabel);return{...i,modelValue:n,selectedLabel:o}}});function fIe(t,e,n,r,i,o){const a=rn("el-tag"),s=rn("el-tooltip"),l=rn("el-icon"),u=rn("el-option"),c=rn("el-options"),d=rn("el-scrollbar"),f=rn("el-select-menu"),h=pS("click-outside");return zt((R(),Y("div",{ref:"selectRef",class:V([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),[vy(t.mouseEnterEventName)]:g=>t.states.inputHovering=!0,onMouseleave:g=>t.states.inputHovering=!1},[B(s,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:g=>t.states.isBeforeHide=!1},{default:j(()=>{var g;return[J("div",{ref:"wrapperRef",class:V([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:At(t.toggleMenu,["prevent"])},[t.$slots.prefix?(R(),Y("div",{key:0,ref:"prefixRef",class:V(t.nsSelect.e("prefix"))},[Ee(t.$slots,"prefix")],2)):Se("v-if",!0),J("div",{ref:"selectionRef",class:V([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?Ee(t.$slots,"tag",{key:0},()=>[(R(!0),Y(dt,null,Ht(t.showTagList,m=>(R(),Y("div",{key:t.getValueKey(m),class:V(t.nsSelect.e("selected-item"))},[B(a,{closable:!t.selectDisabled&&!m.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:vt(t.tagStyle),onClose:y=>t.deleteTag(y,m)},{default:j(()=>[J("span",{class:V(t.nsSelect.e("tags-text"))},[Ee(t.$slots,"label",{label:m.currentLabel,value:m.value},()=>[Ue(Ve(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(R(),xe(s,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:j(()=>[J("div",{ref:"collapseItemRef",class:V(t.nsSelect.e("selected-item"))},[B(a,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:vt(t.collapseTagStyle)},{default:j(()=>[J("span",{class:V(t.nsSelect.e("tags-text"))}," + "+Ve(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:j(()=>[J("div",{ref:"tagMenuRef",class:V(t.nsSelect.e("selection"))},[(R(!0),Y(dt,null,Ht(t.collapseTagList,m=>(R(),Y("div",{key:t.getValueKey(m),class:V(t.nsSelect.e("selected-item"))},[B(a,{class:"in-tooltip",closable:!t.selectDisabled&&!m.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:y=>t.deleteTag(y,m)},{default:j(()=>[J("span",{class:V(t.nsSelect.e("tags-text"))},[Ee(t.$slots,"label",{label:m.currentLabel,value:m.value},()=>[Ue(Ve(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):Se("v-if",!0)]):Se("v-if",!0),J("div",{class:V([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[zt(J("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":m=>t.states.inputValue=m,type:"text",name:t.name,class:V([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:vt(t.inputStyle),tabindex:t.tabindex,role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((g=t.hoverOption)==null?void 0:g.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[br(At(m=>t.navigateOptions("next"),["stop","prevent"]),["down"]),br(At(m=>t.navigateOptions("prev"),["stop","prevent"]),["up"]),br(At(t.handleEsc,["stop","prevent"]),["esc"]),br(At(t.selectOption,["stop","prevent"]),["enter"]),br(At(t.deletePrevTag,["stop"]),["delete"])],onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onInput:t.onInput,onClick:At(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[vS,t.states.inputValue]]),t.filterable?(R(),Y("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:V(t.nsSelect.e("input-calculator")),textContent:Ve(t.states.inputValue)},null,10,["textContent"])):Se("v-if",!0)],2),t.shouldShowPlaceholder?(R(),Y("div",{key:1,class:V([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?Ee(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[J("span",null,Ve(t.currentPlaceholder),1)]):(R(),Y("span",{key:1},Ve(t.currentPlaceholder),1))],2)):Se("v-if",!0)],2),J("div",{ref:"suffixRef",class:V(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(R(),xe(l,{key:0,class:V([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:j(()=>[(R(),xe(on(t.iconComponent)))]),_:1},8,["class"])):Se("v-if",!0),t.showClose&&t.clearIcon?(R(),xe(l,{key:1,class:V([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:j(()=>[(R(),xe(on(t.clearIcon)))]),_:1},8,["class","onClick"])):Se("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(R(),xe(l,{key:2,class:V([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:j(()=>[(R(),xe(on(t.validateIcon)))]),_:1},8,["class"])):Se("v-if",!0)],2)],10,["onClick"])]}),content:j(()=>[B(f,{ref:"menuRef"},{default:j(()=>[t.$slots.header?(R(),Y("div",{key:0,class:V(t.nsSelect.be("dropdown","header")),onClick:At(()=>{},["stop"])},[Ee(t.$slots,"header")],10,["onClick"])):Se("v-if",!0),zt(B(d,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:V([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:j(()=>[t.showNewOption?(R(),xe(u,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):Se("v-if",!0),B(c,null,{default:j(()=>[Ee(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[Bn,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(R(),Y("div",{key:1,class:V(t.nsSelect.be("dropdown","loading"))},[Ee(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(R(),Y("div",{key:2,class:V(t.nsSelect.be("dropdown","empty"))},[Ee(t.$slots,"empty",{},()=>[J("span",null,Ve(t.emptyText),1)])],2)):Se("v-if",!0),t.$slots.footer?(R(),Y("div",{key:3,class:V(t.nsSelect.be("dropdown","footer")),onClick:At(()=>{},["stop"])},[Ee(t.$slots,"footer")],10,["onClick"])):Se("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[h,t.handleClickOutside,t.popperRef]])}var hIe=Ye(dIe,[["render",fIe],["__file","select.vue"]]);const pIe=ue({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Qe("select"),n=F(null),r=tn(),i=F([]);gn(dU,vn({...Mi(t)}));const o=M(()=>i.value.some(u=>u.visible===!0)),a=u=>{var c,d;return((c=u.type)==null?void 0:c.name)==="ElOption"&&!!((d=u.component)!=null&&d.proxy)},s=u=>{const c=No(u),d=[];return c.forEach(f=>{var h,g;a(f)?d.push(f.component.proxy):(h=f.children)!=null&&h.length?d.push(...s(f.children)):(g=f.component)!=null&&g.subTree&&d.push(...s(f.component.subTree))}),d},l=()=>{i.value=s(r.subTree)};return Ft(()=>{l()}),Fz(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function gIe(t,e,n,r,i,o){return zt((R(),Y("ul",{ref:"groupRef",class:V(t.ns.be("group","wrap"))},[J("li",{class:V(t.ns.be("group","title"))},Ve(t.label),3),J("li",null,[J("ul",{class:V(t.ns.b("group"))},[Ee(t.$slots,"default")],2)])],2)),[[Bn,t.visible]])}var fU=Ye(pIe,[["render",gIe],["__file","option-group.vue"]]);const wl=Vt(hIe,{Option:Y$,OptionGroup:fU}),Jc=ni(Y$),mIe=ni(fU),G$=()=>ht(cU,{}),vIe=Ze({pageSize:{type:Number,required:!0},pageSizes:{type:we(Array),default:()=>ei([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:fc},appendSizeTo:String}),yIe=ue({name:"ElPaginationSizes"}),bIe=ue({...yIe,props:vIe,emits:["page-size-change"],setup(t,{emit:e}){const n=t,{t:r}=xn(),i=Qe("pagination"),o=G$(),a=F(n.pageSize);Fe(()=>n.pageSizes,(u,c)=>{if(!Qi(u,c)&&Xe(u)){const d=u.includes(n.pageSize)?n.pageSize:n.pageSizes[0];e("page-size-change",d)}}),Fe(()=>n.pageSize,u=>{a.value=u});const s=M(()=>n.pageSizes);function l(u){var c;u!==a.value&&(a.value=u,(c=o.handleSizeChange)==null||c.call(o,Number(u)))}return(u,c)=>(R(),Y("span",{class:V(p(i).e("sizes"))},[B(p(wl),{"model-value":a.value,disabled:u.disabled,"popper-class":u.popperClass,size:u.size,teleported:u.teleported,"validate-event":!1,"append-to":u.appendSizeTo,onChange:l},{default:j(()=>[(R(!0),Y(dt,null,Ht(p(s),d=>(R(),xe(p(Jc),{key:d,value:d,label:d+p(r)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported","append-to"])],2))}});var _Ie=Ye(bIe,[["__file","sizes.vue"]]);const OIe=Ze({size:{type:String,values:fc}}),wIe=ue({name:"ElPaginationJumper"}),xIe=ue({...wIe,props:OIe,setup(t){const{t:e}=xn(),n=Qe("pagination"),{pageCount:r,disabled:i,currentPage:o,changeEvent:a}=G$(),s=F(),l=M(()=>{var d;return(d=s.value)!=null?d:o==null?void 0:o.value});function u(d){s.value=d?+d:""}function c(d){d=Math.trunc(+d),a==null||a(d),s.value=void 0}return(d,f)=>(R(),Y("span",{class:V(p(n).e("jump")),disabled:p(i)},[J("span",{class:V([p(n).e("goto")])},Ve(p(e)("el.pagination.goto")),3),B(p(hi),{size:d.size,class:V([p(n).e("editor"),p(n).is("in-pagination")]),min:1,max:p(r),disabled:p(i),"model-value":p(l),"validate-event":!1,"aria-label":p(e)("el.pagination.page"),type:"number","onUpdate:modelValue":u,onChange:c},null,8,["size","class","max","disabled","model-value","aria-label"]),J("span",{class:V([p(n).e("classifier")])},Ve(p(e)("el.pagination.pageClassifier")),3)],10,["disabled"]))}});var SIe=Ye(xIe,[["__file","jumper.vue"]]);const CIe=Ze({total:{type:Number,default:1e3}}),EIe=ue({name:"ElPaginationTotal"}),TIe=ue({...EIe,props:CIe,setup(t){const{t:e}=xn(),n=Qe("pagination"),{disabled:r}=G$();return(i,o)=>(R(),Y("span",{class:V(p(n).e("total")),disabled:p(r)},Ve(p(e)("el.pagination.total",{total:i.total})),11,["disabled"]))}});var kIe=Ye(TIe,[["__file","total.vue"]]);const PIe=Ze({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),AIe=ue({name:"ElPaginationPager"}),MIe=ue({...AIe,props:PIe,emits:["change"],setup(t,{emit:e}){const n=t,r=Qe("pager"),i=Qe("icon"),{t:o}=xn(),a=F(!1),s=F(!1),l=F(!1),u=F(!1),c=F(!1),d=F(!1),f=M(()=>{const x=n.pagerCount,S=(x-1)/2,C=Number(n.currentPage),E=Number(n.pageCount);let T=!1,P=!1;E>x&&(C>x-S&&(T=!0),C<E-S&&(P=!0));const A=[];if(T&&!P){const D=E-(x-2);for(let $=D;$<E;$++)A.push($)}else if(!T&&P)for(let D=2;D<x;D++)A.push(D);else if(T&&P){const D=Math.floor(x/2)-1;for(let $=C-D;$<=C+D;$++)A.push($)}else for(let D=2;D<E;D++)A.push(D);return A}),h=M(()=>["more","btn-quickprev",i.b(),r.is("disabled",n.disabled)]),g=M(()=>["more","btn-quicknext",i.b(),r.is("disabled",n.disabled)]),m=M(()=>n.disabled?-1:0);Bo(()=>{const x=(n.pagerCount-1)/2;a.value=!1,s.value=!1,n.pageCount>n.pagerCount&&(n.currentPage>n.pagerCount-x&&(a.value=!0),n.currentPage<n.pageCount-x&&(s.value=!0))});function y(x=!1){n.disabled||(x?l.value=!0:u.value=!0)}function b(x=!1){x?c.value=!0:d.value=!0}function w(x){const S=x.target;if(S.tagName.toLowerCase()==="li"&&Array.from(S.classList).includes("number")){const C=Number(S.textContent);C!==n.currentPage&&e("change",C)}else S.tagName.toLowerCase()==="li"&&Array.from(S.classList).includes("more")&&O(x)}function O(x){const S=x.target;if(S.tagName.toLowerCase()==="ul"||n.disabled)return;let C=Number(S.textContent);const E=n.pageCount,T=n.currentPage,P=n.pagerCount-2;S.className.includes("more")&&(S.className.includes("quickprev")?C=T-P:S.className.includes("quicknext")&&(C=T+P)),Number.isNaN(+C)||(C<1&&(C=1),C>E&&(C=E)),C!==T&&e("change",C)}return(x,S)=>(R(),Y("ul",{class:V(p(r).b()),onClick:O,onKeyup:br(w,["enter"])},[x.pageCount>0?(R(),Y("li",{key:0,class:V([[p(r).is("active",x.currentPage===1),p(r).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===1,"aria-label":p(o)("el.pagination.currentPage",{pager:1}),tabindex:p(m)}," 1 ",10,["aria-current","aria-label","tabindex"])):Se("v-if",!0),a.value?(R(),Y("li",{key:1,class:V(p(h)),tabindex:p(m),"aria-label":p(o)("el.pagination.prevPages",{pager:x.pagerCount-2}),onMouseenter:C=>y(!0),onMouseleave:C=>l.value=!1,onFocus:C=>b(!0),onBlur:C=>c.value=!1},[(l.value||c.value)&&!x.disabled?(R(),xe(p(Of),{key:0})):(R(),xe(p(Sy),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):Se("v-if",!0),(R(!0),Y(dt,null,Ht(p(f),C=>(R(),Y("li",{key:C,class:V([[p(r).is("active",x.currentPage===C),p(r).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===C,"aria-label":p(o)("el.pagination.currentPage",{pager:C}),tabindex:p(m)},Ve(C),11,["aria-current","aria-label","tabindex"]))),128)),s.value?(R(),Y("li",{key:2,class:V(p(g)),tabindex:p(m),"aria-label":p(o)("el.pagination.nextPages",{pager:x.pagerCount-2}),onMouseenter:C=>y(),onMouseleave:C=>u.value=!1,onFocus:C=>b(),onBlur:C=>d.value=!1},[(u.value||d.value)&&!x.disabled?(R(),xe(p(wf),{key:0})):(R(),xe(p(Sy),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):Se("v-if",!0),x.pageCount>1?(R(),Y("li",{key:3,class:V([[p(r).is("active",x.currentPage===x.pageCount),p(r).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===x.pageCount,"aria-label":p(o)("el.pagination.currentPage",{pager:x.pageCount}),tabindex:p(m)},Ve(x.pageCount),11,["aria-current","aria-label","tabindex"])):Se("v-if",!0)],42,["onKeyup"]))}});var RIe=Ye(MIe,[["__file","pager.vue"]]);const ga=t=>typeof t!="number",$Ie=Ze({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>Et(t)&&Math.trunc(t)===t&&t>4&&t<22&&t%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:we(Array),default:()=>ei([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:fr,default:()=>_f},nextText:{type:String,default:""},nextIcon:{type:fr,default:()=>_a},teleported:{type:Boolean,default:!0},small:Boolean,size:$i,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),NIe={"update:current-page":t=>Et(t),"update:page-size":t=>Et(t),"size-change":t=>Et(t),change:(t,e)=>Et(t)&&Et(e),"current-change":t=>Et(t),"prev-click":t=>Et(t),"next-click":t=>Et(t)},xB="ElPagination";var DIe=ue({name:xB,props:$Ie,emits:NIe,setup(t,{emit:e,slots:n}){const{t:r}=xn(),i=Qe("pagination"),o=tn().vnode.props||{},a=Uz(),s=M(()=>{var S;return t.small?"small":(S=t.size)!=null?S:a.value});nf({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},M(()=>!!t.small));const l="onUpdate:currentPage"in o||"onUpdate:current-page"in o||"onCurrentChange"in o,u="onUpdate:pageSize"in o||"onUpdate:page-size"in o||"onSizeChange"in o,c=M(()=>{if(ga(t.total)&&ga(t.pageCount)||!ga(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(ga(t.pageCount)){if(!ga(t.total)&&!ga(t.pageSize)&&!u)return!1}else if(!u)return!1}return!0}),d=F(ga(t.defaultPageSize)?10:t.defaultPageSize),f=F(ga(t.defaultCurrentPage)?1:t.defaultCurrentPage),h=M({get(){return ga(t.pageSize)?d.value:t.pageSize},set(S){ga(t.pageSize)&&(d.value=S),u&&(e("update:page-size",S),e("size-change",S))}}),g=M(()=>{let S=0;return ga(t.pageCount)?ga(t.total)||(S=Math.max(1,Math.ceil(t.total/h.value))):S=t.pageCount,S}),m=M({get(){return ga(t.currentPage)?f.value:t.currentPage},set(S){let C=S;S<1?C=1:S>g.value&&(C=g.value),ga(t.currentPage)&&(f.value=C),l&&(e("update:current-page",C),e("current-change",C))}});Fe(g,S=>{m.value>S&&(m.value=S)}),Fe([m,h],S=>{e("change",...S)},{flush:"post"});function y(S){m.value=S}function b(S){h.value=S;const C=g.value;m.value>C&&(m.value=C)}function w(){t.disabled||(m.value-=1,e("prev-click",m.value))}function O(){t.disabled||(m.value+=1,e("next-click",m.value))}function x(S,C){S&&(S.props||(S.props={}),S.props.class=[S.props.class,C].join(" "))}return gn(cU,{pageCount:g,disabled:M(()=>t.disabled),currentPage:m,changeEvent:y,handleSizeChange:b}),()=>{var S,C;if(!c.value)return r("el.pagination.deprecationWarning"),null;if(!t.layout||t.hideOnSinglePage&&g.value<=1)return null;const E=[],T=[],P=Tt("div",{class:i.e("rightwrapper")},T),A={prev:Tt(YLe,{disabled:t.disabled,currentPage:m.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:w}),jumper:Tt(SIe,{size:s.value}),pager:Tt(RIe,{currentPage:m.value,pageCount:g.value,pagerCount:t.pagerCount,onChange:y,disabled:t.disabled}),next:Tt(eIe,{disabled:t.disabled,currentPage:m.value,pageCount:g.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:O}),sizes:Tt(_Ie,{pageSize:h.value,pageSizes:t.pageSizes,popperClass:t.popperClass,disabled:t.disabled,teleported:t.teleported,size:s.value,appendSizeTo:t.appendSizeTo}),slot:(C=(S=n==null?void 0:n.default)==null?void 0:S.call(n))!=null?C:null,total:Tt(kIe,{total:ga(t.total)?0:t.total})},D=t.layout.split(",").map(N=>N.trim());let $=!1;return D.forEach(N=>{if(N==="->"){$=!0;return}$?T.push(A[N]):E.push(A[N])}),x(E[0],i.is("first")),x(E[E.length-1],i.is("last")),$&&T.length>0&&(x(T[0],i.is("first")),x(T[T.length-1],i.is("last")),E.push(P)),Tt("div",{class:[i.b(),i.is("background",t.background),i.m(s.value)]},E)}}});const nC=Vt(DIe),LIe=Ze({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:Ek,default:"primary"},cancelButtonType:{type:String,values:Ek,default:"text"},icon:{type:fr,default:()=>ZCe},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:io.teleported,persistent:io.persistent,width:{type:[String,Number],default:150}}),IIe={confirm:t=>t instanceof MouseEvent,cancel:t=>t instanceof MouseEvent},BIe=ue({name:"ElPopconfirm"}),FIe=ue({...BIe,props:LIe,emits:IIe,setup(t,{emit:e}){const n=t,{t:r}=xn(),i=Qe("popconfirm"),o=F(),a=()=>{var f,h;(h=(f=o.value)==null?void 0:f.onClose)==null||h.call(f)},s=M(()=>({width:pi(n.width)})),l=f=>{e("confirm",f),a()},u=f=>{e("cancel",f),a()},c=M(()=>n.confirmButtonText||r("el.popconfirm.confirmButtonText")),d=M(()=>n.cancelButtonText||r("el.popconfirm.cancelButtonText"));return(f,h)=>(R(),xe(p(Hi),an({ref_key:"tooltipRef",ref:o,trigger:"click",effect:"light"},f.$attrs,{"popper-class":`${p(i).namespace.value}-popover`,"popper-style":p(s),teleported:f.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":f.hideAfter,persistent:f.persistent}),{content:j(()=>[J("div",{class:V(p(i).b())},[J("div",{class:V(p(i).e("main"))},[!f.hideIcon&&f.icon?(R(),xe(p(mt),{key:0,class:V(p(i).e("icon")),style:vt({color:f.iconColor})},{default:j(()=>[(R(),xe(on(f.icon)))]),_:1},8,["class","style"])):Se("v-if",!0),Ue(" "+Ve(f.title),1)],2),J("div",{class:V(p(i).e("action"))},[Ee(f.$slots,"actions",{confirm:l,cancel:u},()=>[B(p(lr),{size:"small",type:f.cancelButtonType==="text"?"":f.cancelButtonType,text:f.cancelButtonType==="text",onClick:u},{default:j(()=>[Ue(Ve(p(d)),1)]),_:1},8,["type","text"]),B(p(lr),{size:"small",type:f.confirmButtonType==="text"?"":f.confirmButtonType,text:f.confirmButtonType==="text",onClick:l},{default:j(()=>[Ue(Ve(p(c)),1)]),_:1},8,["type","text"])])],2)],2)]),default:j(()=>[f.$slots.reference?Ee(f.$slots,"reference",{key:0}):Se("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var VIe=Ye(FIe,[["__file","popconfirm.vue"]]);const jIe=Vt(VIe),QIe=Ze({trigger:y0.trigger,placement:C1.placement,disabled:y0.disabled,visible:io.visible,transition:io.transition,popperOptions:C1.popperOptions,tabindex:C1.tabindex,content:io.content,popperStyle:io.popperStyle,popperClass:io.popperClass,enterable:{...io.enterable,default:!0},effect:{...io.effect,default:"light"},teleported:io.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),zIe={"update:visible":t=>wr(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},WIe="onUpdate:visible",HIe=ue({name:"ElPopover"}),UIe=ue({...HIe,props:QIe,emits:zIe,setup(t,{expose:e,emit:n}){const r=t,i=M(()=>r[WIe]),o=Qe("popover"),a=F(),s=M(()=>{var y;return(y=p(a))==null?void 0:y.popperRef}),l=M(()=>[{width:pi(r.width)},r.popperStyle]),u=M(()=>[o.b(),r.popperClass,{[o.m("plain")]:!!r.content}]),c=M(()=>r.transition===`${o.namespace.value}-fade-in-linear`),d=()=>{var y;(y=a.value)==null||y.hide()},f=()=>{n("before-enter")},h=()=>{n("before-leave")},g=()=>{n("after-enter")},m=()=>{n("update:visible",!1),n("after-leave")};return e({popperRef:s,hide:d}),(y,b)=>(R(),xe(p(Hi),an({ref_key:"tooltipRef",ref:a},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":p(u),"popper-style":p(l),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":p(c),"onUpdate:visible":p(i),onBeforeShow:f,onBeforeHide:h,onShow:g,onHide:m}),{content:j(()=>[y.title?(R(),Y("div",{key:0,class:V(p(o).e("title")),role:"title"},Ve(y.title),3)):Se("v-if",!0),Ee(y.$slots,"default",{},()=>[Ue(Ve(y.content),1)])]),default:j(()=>[y.$slots.reference?Ee(y.$slots,"reference",{key:0}):Se("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var XIe=Ye(UIe,[["__file","popover.vue"]]);const SB=(t,e)=>{const n=e.arg||e.value,r=n==null?void 0:n.popperRef;r&&(r.triggerRef=t)};var ZIe={mounted(t,e){SB(t,e)},updated(t,e){SB(t,e)}};const qIe="popover",hU=eCe(ZIe,qIe),YIe=Vt(XIe,{directive:hU}),GIe=Ze({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:t=>t>=0&&t<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:we(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:we([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:we(Function),default:t=>`${t}%`}}),KIe=ue({name:"ElProgress"}),JIe=ue({...KIe,props:GIe,setup(t){const e=t,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},r=Qe("progress"),i=M(()=>{const O={width:`${e.percentage}%`,animationDuration:`${e.duration}s`},x=w(e.percentage);return x.includes("gradient")?O.background=x:O.backgroundColor=x,O}),o=M(()=>(e.strokeWidth/e.width*100).toFixed(1)),a=M(()=>["circle","dashboard"].includes(e.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),s=M(()=>{const O=a.value,x=e.type==="dashboard";return`
- M 50 50
- m 0 ${x?"":"-"}${O}
- a ${O} ${O} 0 1 1 0 ${x?"-":""}${O*2}
- a ${O} ${O} 0 1 1 0 ${x?"":"-"}${O*2}
- `}),l=M(()=>2*Math.PI*a.value),u=M(()=>e.type==="dashboard"?.75:1),c=M(()=>`${-1*l.value*(1-u.value)/2}px`),d=M(()=>({strokeDasharray:`${l.value*u.value}px, ${l.value}px`,strokeDashoffset:c.value})),f=M(()=>({strokeDasharray:`${l.value*u.value*(e.percentage/100)}px, ${l.value}px`,strokeDashoffset:c.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),h=M(()=>{let O;return e.color?O=w(e.percentage):O=n[e.status]||n.default,O}),g=M(()=>e.status==="warning"?WS:e.type==="line"?e.status==="success"?s$:pd:e.status==="success"?Eb:Oa),m=M(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),y=M(()=>e.format(e.percentage));function b(O){const x=100/O.length;return O.map((C,E)=>Ot(C)?{color:C,percentage:(E+1)*x}:C).sort((C,E)=>C.percentage-E.percentage)}const w=O=>{var x;const{color:S}=e;if(St(S))return S(O);if(Ot(S))return S;{const C=b(S);for(const E of C)if(E.percentage>O)return E.color;return(x=C[C.length-1])==null?void 0:x.color}};return(O,x)=>(R(),Y("div",{class:V([p(r).b(),p(r).m(O.type),p(r).is(O.status),{[p(r).m("without-text")]:!O.showText,[p(r).m("text-inside")]:O.textInside}]),role:"progressbar","aria-valuenow":O.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[O.type==="line"?(R(),Y("div",{key:0,class:V(p(r).b("bar"))},[J("div",{class:V(p(r).be("bar","outer")),style:vt({height:`${O.strokeWidth}px`})},[J("div",{class:V([p(r).be("bar","inner"),{[p(r).bem("bar","inner","indeterminate")]:O.indeterminate},{[p(r).bem("bar","inner","striped")]:O.striped},{[p(r).bem("bar","inner","striped-flow")]:O.stripedFlow}]),style:vt(p(i))},[(O.showText||O.$slots.default)&&O.textInside?(R(),Y("div",{key:0,class:V(p(r).be("bar","innerText"))},[Ee(O.$slots,"default",{percentage:O.percentage},()=>[J("span",null,Ve(p(y)),1)])],2)):Se("v-if",!0)],6)],6)],2)):(R(),Y("div",{key:1,class:V(p(r).b("circle")),style:vt({height:`${O.width}px`,width:`${O.width}px`})},[(R(),Y("svg",{viewBox:"0 0 100 100"},[J("path",{class:V(p(r).be("circle","track")),d:p(s),stroke:`var(${p(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":O.strokeLinecap,"stroke-width":p(o),fill:"none",style:vt(p(d))},null,14,["d","stroke","stroke-linecap","stroke-width"]),J("path",{class:V(p(r).be("circle","path")),d:p(s),stroke:p(h),fill:"none",opacity:O.percentage?1:0,"stroke-linecap":O.strokeLinecap,"stroke-width":p(o),style:vt(p(f))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(O.showText||O.$slots.default)&&!O.textInside?(R(),Y("div",{key:2,class:V(p(r).e("text")),style:vt({fontSize:`${p(m)}px`})},[Ee(O.$slots,"default",{percentage:O.percentage},()=>[O.status?(R(),xe(p(mt),{key:1},{default:j(()=>[(R(),xe(on(p(g))))]),_:1})):(R(),Y("span",{key:0},Ve(p(y)),1))])],6)):Se("v-if",!0)],10,["aria-valuenow"]))}});var e3e=Ye(JIe,[["__file","progress.vue"]]);const pU=Vt(e3e),t3e=Ze({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:we([Array,Object]),default:()=>ei(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:we([Array,Object]),default:()=>[tO,tO,tO]},voidIcon:{type:fr,default:()=>uEe},disabledVoidIcon:{type:fr,default:()=>tO},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:we(Array),default:()=>ei(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:$i,clearable:Boolean,...wo(["ariaLabel"])}),n3e={[dr]:t=>Et(t),[Ut]:t=>Et(t)},r3e=ue({name:"ElRate"}),i3e=ue({...r3e,props:t3e,emits:n3e,setup(t,{expose:e,emit:n}){const r=t;function i(L,X){const Q=K=>Jt(K),W=Object.keys(X).map(K=>+K).filter(K=>{const oe=X[K];return(Q(oe)?oe.excluded:!1)?L<K:L<=K}).sort((K,oe)=>K-oe),G=X[W[0]];return Q(G)&&G.value||G}const o=ht(wp,void 0),a=ht(ec,void 0),s=ki(),l=Qe("rate"),{inputId:u,isLabeledByFormItem:c}=Tl(r,{formItemContext:a}),d=F(r.modelValue),f=F(-1),h=F(!0),g=M(()=>[l.b(),l.m(s.value)]),m=M(()=>r.disabled||(o==null?void 0:o.disabled)),y=M(()=>l.cssVarBlock({"void-color":r.voidColor,"disabled-void-color":r.disabledVoidColor,"fill-color":x.value})),b=M(()=>{let L="";return r.showScore?L=r.scoreTemplate.replace(/\{\s*value\s*\}/,m.value?`${r.modelValue}`:`${d.value}`):r.showText&&(L=r.texts[Math.ceil(d.value)-1]),L}),w=M(()=>r.modelValue*100-Math.floor(r.modelValue)*100),O=M(()=>Xe(r.colors)?{[r.lowThreshold]:r.colors[0],[r.highThreshold]:{value:r.colors[1],excluded:!0},[r.max]:r.colors[2]}:r.colors),x=M(()=>{const L=i(d.value,O.value);return Jt(L)?"":L}),S=M(()=>{let L="";return m.value?L=`${w.value}%`:r.allowHalf&&(L="50%"),{color:x.value,width:L}}),C=M(()=>{let L=Xe(r.icons)?[...r.icons]:{...r.icons};return L=Qc(L),Xe(L)?{[r.lowThreshold]:L[0],[r.highThreshold]:{value:L[1],excluded:!0},[r.max]:L[2]}:L}),E=M(()=>i(r.modelValue,C.value)),T=M(()=>m.value?Ot(r.disabledVoidIcon)?r.disabledVoidIcon:Qc(r.disabledVoidIcon):Ot(r.voidIcon)?r.voidIcon:Qc(r.voidIcon)),P=M(()=>i(d.value,C.value));function A(L){const X=m.value&&w.value>0&&L-1<r.modelValue&&L>r.modelValue,Q=r.allowHalf&&h.value&&L-.5<=d.value&&L>d.value;return X||Q}function D(L){r.clearable&&L===r.modelValue&&(L=0),n(Ut,L),r.modelValue!==L&&n("change",L)}function $(L){m.value||(r.allowHalf&&h.value?D(d.value):D(L))}function N(L){if(m.value)return;let X=d.value;const Q=L.code;return Q===ut.up||Q===ut.right?(r.allowHalf?X+=.5:X+=1,L.stopPropagation(),L.preventDefault()):(Q===ut.left||Q===ut.down)&&(r.allowHalf?X-=.5:X-=1,L.stopPropagation(),L.preventDefault()),X=X<0?0:X,X=X>r.max?r.max:X,n(Ut,X),n("change",X),X}function z(L,X){if(!m.value){if(r.allowHalf&&X){let Q=X.target;Ha(Q,l.e("item"))&&(Q=Q.querySelector(`.${l.e("icon")}`)),(Q.clientWidth===0||Ha(Q,l.e("decimal")))&&(Q=Q.parentNode),h.value=X.offsetX*2<=Q.clientWidth,d.value=h.value?L-.5:L}else d.value=L;f.value=L}}function I(){m.value||(r.allowHalf&&(h.value=r.modelValue!==Math.floor(r.modelValue)),d.value=r.modelValue,f.value=-1)}return Fe(()=>r.modelValue,L=>{d.value=L,h.value=r.modelValue!==Math.floor(r.modelValue)}),r.modelValue||n(Ut,0),e({setCurrentValue:z,resetCurrentValue:I}),(L,X)=>{var Q;return R(),Y("div",{id:p(u),class:V([p(g),p(l).is("disabled",p(m))]),role:"slider","aria-label":p(c)?void 0:L.ariaLabel||"rating","aria-labelledby":p(c)?(Q=p(a))==null?void 0:Q.labelId:void 0,"aria-valuenow":d.value,"aria-valuetext":p(b)||void 0,"aria-valuemin":"0","aria-valuemax":L.max,tabindex:"0",style:vt(p(y)),onKeydown:N},[(R(!0),Y(dt,null,Ht(L.max,(W,G)=>(R(),Y("span",{key:G,class:V(p(l).e("item")),onMousemove:K=>z(W,K),onMouseleave:I,onClick:K=>$(W)},[B(p(mt),{class:V([p(l).e("icon"),{hover:f.value===W},p(l).is("active",W<=d.value)])},{default:j(()=>[A(W)?Se("v-if",!0):(R(),Y(dt,{key:0},[zt((R(),xe(on(p(P)),null,null,512)),[[Bn,W<=d.value]]),zt((R(),xe(on(p(T)),null,null,512)),[[Bn,!(W<=d.value)]])],64)),A(W)?(R(),Y(dt,{key:1},[(R(),xe(on(p(T)),{class:V([p(l).em("decimal","box")])},null,8,["class"])),B(p(mt),{style:vt(p(S)),class:V([p(l).e("icon"),p(l).e("decimal")])},{default:j(()=>[(R(),xe(on(p(E))))]),_:1},8,["style","class"])],64)):Se("v-if",!0)]),_:2},1032,["class"])],42,["onMousemove","onClick"]))),128)),L.showText||L.showScore?(R(),Y("span",{key:0,class:V(p(l).e("text")),style:vt({color:L.textColor})},Ve(p(b)),7)):Se("v-if",!0)],46,["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"])}}});var o3e=Ye(i3e,[["__file","rate.vue"]]);const a3e=Vt(o3e),pg={success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},CB={[pg.success]:_Ce,[pg.warning]:WS,[pg.error]:l$,[pg.info]:c$},s3e=Ze({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["success","warning","info","error"],default:"info"}}),l3e=ue({name:"ElResult"}),u3e=ue({...l3e,props:s3e,setup(t){const e=t,n=Qe("result"),r=M(()=>{const i=e.icon,o=i&&pg[i]?pg[i]:"icon-info",a=CB[o]||CB["icon-info"];return{class:o,component:a}});return(i,o)=>(R(),Y("div",{class:V(p(n).b())},[J("div",{class:V(p(n).e("icon"))},[Ee(i.$slots,"icon",{},()=>[p(r).component?(R(),xe(on(p(r).component),{key:0,class:V(p(r).class)},null,8,["class"])):Se("v-if",!0)])],2),i.title||i.$slots.title?(R(),Y("div",{key:0,class:V(p(n).e("title"))},[Ee(i.$slots,"title",{},()=>[J("p",null,Ve(i.title),1)])],2)):Se("v-if",!0),i.subTitle||i.$slots["sub-title"]?(R(),Y("div",{key:1,class:V(p(n).e("subtitle"))},[Ee(i.$slots,"sub-title",{},()=>[J("p",null,Ve(i.subTitle),1)])],2)):Se("v-if",!0),i.$slots.extra?(R(),Y("div",{key:2,class:V(p(n).e("extra"))},[Ee(i.$slots,"extra")],2)):Se("v-if",!0)],2))}});var c3e=Ye(u3e,[["__file","result.vue"]]);const d3e=Vt(c3e),f3e=["start","center","end","space-around","space-between","space-evenly"],h3e=["top","middle","bottom"],p3e=Ze({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:f3e,default:"start"},align:{type:String,values:h3e}}),g3e=ue({name:"ElRow"}),m3e=ue({...g3e,props:p3e,setup(t){const e=t,n=Qe("row"),r=M(()=>e.gutter);gn(cH,{gutter:r});const i=M(()=>{const a={};return e.gutter&&(a.marginRight=a.marginLeft=`-${e.gutter/2}px`),a}),o=M(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(a,s)=>(R(),xe(on(a.tag),{class:V(p(o)),style:vt(p(i))},{default:j(()=>[Ee(a.$slots,"default")]),_:3},8,["class","style"]))}});var v3e=Ye(m3e,[["__file","row.vue"]]);const fo=Vt(v3e),y3e=ue({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup(){return{ns:Qe("select")}}});function b3e(t,e,n,r,i,o){return R(),Y("div",{class:V(t.ns.be("group","title")),style:vt({...t.style,lineHeight:`${t.height}px`})},Ve(t.item.label),7)}var _3e=Ye(y3e,[["render",b3e],["__file","group-item.vue"]]);function O3e(t,{emit:e}){return{hoverItem:()=>{t.disabled||e("hover",t.index)},selectOptionClick:()=>{t.disabled||e("select",t.item,t.index)}}}const gU={label:"label",value:"value",disabled:"disabled",options:"options"};function rC(t){const e=M(()=>({...gU,...t.props}));return{aliasProps:e,getLabel:a=>Kr(a,e.value.label),getValue:a=>Kr(a,e.value.value),getDisabled:a=>Kr(a,e.value.disabled),getOptions:a=>Kr(a,e.value.options)}}const w3e=Ze({allowCreate:Boolean,autocomplete:{type:we(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:fr,default:pd},effect:{type:we(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:we([Array,String,Number,Boolean,Object])},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:we(Array),required:!0},placeholder:{type:String},teleported:io.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})},remote:Boolean,size:$i,props:{type:we(Object),default:()=>gU},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},showArrow:{type:Boolean,default:!0},placement:{type:we(String),values:gd,default:"bottom-start"},fallbackPlacements:{type:we(Array),default:["bottom-start","top-start","right","left"]},tagType:{...Gc.type,default:"info"},tagEffect:{...Gc.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:String,...Wm,...wo(["ariaLabel"])}),x3e=Ze({data:Array,disabled:Boolean,hovering:Boolean,item:{type:we(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),S3e={[Ut]:t=>!0,[dr]:t=>!0,"remove-tag":t=>!0,"visible-change":t=>!0,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},C3e={hover:t=>Et(t),select:(t,e)=>!0},K$=Symbol("ElSelectV2Injection"),E3e=ue({props:x3e,emits:C3e,setup(t,{emit:e}){const n=ht(K$),r=Qe("select"),{hoverItem:i,selectOptionClick:o}=O3e(t,{emit:e}),{getLabel:a}=rC(n.props);return{ns:r,hoverItem:i,selectOptionClick:o,getLabel:a}}});function T3e(t,e,n,r,i,o){return R(),Y("li",{"aria-selected":t.selected,style:vt(t.style),class:V([t.ns.be("dropdown","item"),t.ns.is("selected",t.selected),t.ns.is("disabled",t.disabled),t.ns.is("created",t.created),t.ns.is("hovering",t.hovering)]),onMousemove:t.hoverItem,onClick:At(t.selectOptionClick,["stop"])},[Ee(t.$slots,"default",{item:t.item,index:t.index,disabled:t.disabled},()=>[J("span",null,Ve(t.getLabel(t.item)),1)])],46,["aria-selected","onMousemove","onClick"])}var k3e=Ye(E3e,[["render",T3e],["__file","option-item.vue"]]),EB=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function P3e(t,e){return!!(t===e||EB(t)&&EB(e))}function A3e(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!P3e(t[n],e[n]))return!1;return!0}function M3e(t,e){e===void 0&&(e=A3e);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var a=t.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}const mU=()=>{const e=tn().proxy.$props;return M(()=>{const n=(r,i,o)=>({});return e.perfMode?vb(n):M3e(n)})},Hk=50,xw="itemRendered",Sw="scroll",gg="forward",Cw="backward",ol="auto",iC="smart",w0="start",ju="center",x0="end",rm="horizontal",J$="vertical",R3e="ltr",Rg="rtl",S0="negative",eN="positive-ascending",tN="positive-descending",$3e={[rm]:"left",[J$]:"top"},N3e=20,D3e={[rm]:"deltaX",[J$]:"deltaY"},L3e=({atEndEdge:t,atStartEdge:e,layout:n},r)=>{let i,o=0;const a=l=>l<0&&e.value||l>0&&t.value;return{hasReachedEdge:a,onWheel:l=>{ip(i);const u=l[D3e[n.value]];a(o)&&a(o+u)||(o+=u,US()||l.preventDefault(),i=bf(()=>{r(o),o=0}))}}},Uk=pu({type:we([Number,Function]),required:!0}),Xk=pu({type:Number}),Zk=pu({type:Number,default:2}),I3e=pu({type:String,values:["ltr","rtl"],default:"ltr"}),qk=pu({type:Number,default:0}),Ew=pu({type:Number,required:!0}),vU=pu({type:String,values:["horizontal","vertical"],default:J$}),yU=Ze({className:{type:String,default:""},containerElement:{type:we([String,Object]),default:"div"},data:{type:we(Array),default:()=>ei([])},direction:I3e,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:we([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),bU=Ze({cache:Zk,estimatedItemSize:Xk,layout:vU,initScrollOffset:qk,total:Ew,itemSize:Uk,...yU}),Yk={type:Number,default:6},_U={type:Number,default:0},OU={type:Number,default:2},Wh=Ze({columnCache:Zk,columnWidth:Uk,estimatedColumnWidth:Xk,estimatedRowHeight:Xk,initScrollLeft:qk,initScrollTop:qk,itemKey:{type:we(Function),default:({columnIndex:t,rowIndex:e})=>`${e}:${t}`},rowCache:Zk,rowHeight:Uk,totalColumn:Ew,totalRow:Ew,hScrollbarSize:Yk,vScrollbarSize:Yk,scrollbarStartGap:_U,scrollbarEndGap:OU,role:String,...yU}),wU=Ze({alwaysOn:Boolean,class:String,layout:vU,total:Ew,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:Yk,startGap:_U,endGap:OU,visible:Boolean}),Nh=(t,e)=>t<e?gg:Cw,C0=t=>t===R3e||t===Rg||t===rm,TB=t=>t===Rg;let Up=null;function Tw(t=!1){if(Up===null||t){const e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";const r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Up=tN:(e.scrollLeft=1,e.scrollLeft===0?Up=S0:Up=eN),document.body.removeChild(e),Up}return Up}function B3e({move:t,size:e,bar:n},r){const i={},o=`translate${n.axis}(${t}px)`;return i[n.size]=e,i.transform=o,i.msTransform=o,i.webkitTransform=o,r==="horizontal"?i.height="100%":i.width="100%",i}const Gk=ue({name:"ElVirtualScrollBar",props:wU,emits:["scroll","start-move","stop-move"],setup(t,{emit:e}){const n=M(()=>t.startGap+t.endGap),r=Qe("virtual-scrollbar"),i=Qe("scrollbar"),o=F(),a=F();let s=null,l=null;const u=vn({isDragging:!1,traveled:0}),c=M(()=>sW[t.layout]),d=M(()=>t.clientSize-p(n)),f=M(()=>({position:"absolute",width:`${rm===t.layout?d.value:t.scrollbarSize}px`,height:`${rm===t.layout?t.scrollbarSize:d.value}px`,[$3e[t.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),h=M(()=>{const C=t.ratio,E=t.clientSize;if(C>=100)return Number.POSITIVE_INFINITY;if(C>=50)return C*E/100;const T=E/3;return Math.floor(Math.min(Math.max(C*E,N3e),T))}),g=M(()=>{if(!Number.isFinite(h.value))return{display:"none"};const C=`${h.value}px`;return B3e({bar:c.value,size:C,move:u.traveled},t.layout)}),m=M(()=>Math.floor(t.clientSize-h.value-p(n))),y=()=>{window.addEventListener("mousemove",x),window.addEventListener("mouseup",O);const C=p(a);!C||(l=document.onselectstart,document.onselectstart=()=>!1,C.addEventListener("touchmove",x,{passive:!0}),C.addEventListener("touchend",O))},b=()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",O),document.onselectstart=l,l=null;const C=p(a);!C||(C.removeEventListener("touchmove",x),C.removeEventListener("touchend",O))},w=C=>{C.stopImmediatePropagation(),!(C.ctrlKey||[1,2].includes(C.button))&&(u.isDragging=!0,u[c.value.axis]=C.currentTarget[c.value.offset]-(C[c.value.client]-C.currentTarget.getBoundingClientRect()[c.value.direction]),e("start-move"),y())},O=()=>{u.isDragging=!1,u[c.value.axis]=0,e("stop-move"),b()},x=C=>{const{isDragging:E}=u;if(!E||!a.value||!o.value)return;const T=u[c.value.axis];if(!T)return;ip(s);const P=(o.value.getBoundingClientRect()[c.value.direction]-C[c.value.client])*-1,A=a.value[c.value.offset]-T,D=P-A;s=bf(()=>{u.traveled=Math.max(t.startGap,Math.min(D,m.value)),e("scroll",D,m.value)})},S=C=>{const E=Math.abs(C.target.getBoundingClientRect()[c.value.direction]-C[c.value.client]),T=a.value[c.value.offset]/2,P=E-T;u.traveled=Math.max(0,Math.min(P,m.value)),e("scroll",P,m.value)};return Fe(()=>t.scrollFrom,C=>{u.isDragging||(u.traveled=Math.ceil(C*m.value))}),pr(()=>{b()}),()=>Tt("div",{role:"presentation",ref:o,class:[r.b(),t.class,(t.alwaysOn||u.isDragging)&&"always-on"],style:f.value,onMousedown:At(S,["stop","prevent"]),onTouchstartPrevent:w},Tt("div",{ref:a,class:i.e("thumb"),style:g.value,onMousedown:w},[]))}}),xU=({name:t,getOffset:e,getItemSize:n,getItemOffset:r,getEstimatedTotalSize:i,getStartIndexForOffset:o,getStopIndexForStartIndex:a,initCache:s,clearCache:l,validateProps:u})=>ue({name:t!=null?t:"ElVirtualList",props:bU,emits:[xw,Sw],setup(c,{emit:d,expose:f}){u(c);const h=tn(),g=Qe("vl"),m=F(s(c,h)),y=mU(),b=F(),w=F(),O=F(),x=F({isScrolling:!1,scrollDir:"forward",scrollOffset:Et(c.initScrollOffset)?c.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:c.scrollbarAlwaysOn}),S=M(()=>{const{total:ne,cache:_e}=c,{isScrolling:Ce,scrollDir:U,scrollOffset:ie}=p(x);if(ne===0)return[0,0,0,0];const ee=o(c,ie,p(m)),he=a(c,ee,ie,p(m)),$e=!Ce||U===Cw?Math.max(1,_e):1,Me=!Ce||U===gg?Math.max(1,_e):1;return[Math.max(0,ee-$e),Math.max(0,Math.min(ne-1,he+Me)),ee,he]}),C=M(()=>i(c,p(m))),E=M(()=>C0(c.layout)),T=M(()=>[{position:"relative",[`overflow-${E.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:c.direction,height:Et(c.height)?`${c.height}px`:c.height,width:Et(c.width)?`${c.width}px`:c.width},c.style]),P=M(()=>{const ne=p(C),_e=p(E);return{height:_e?"100%":`${ne}px`,pointerEvents:p(x).isScrolling?"none":void 0,width:_e?`${ne}px`:"100%"}}),A=M(()=>E.value?c.width:c.height),{onWheel:D}=L3e({atStartEdge:M(()=>x.value.scrollOffset<=0),atEndEdge:M(()=>x.value.scrollOffset>=C.value),layout:M(()=>c.layout)},ne=>{var _e,Ce;(Ce=(_e=O.value).onMouseUp)==null||Ce.call(_e),X(Math.min(x.value.scrollOffset+ne,C.value-A.value))});sr(b,"wheel",D,{passive:!1});const $=()=>{const{total:ne}=c;if(ne>0){const[ie,ee,he,$e]=p(S);d(xw,ie,ee,he,$e)}const{scrollDir:_e,scrollOffset:Ce,updateRequested:U}=p(x);d(Sw,_e,Ce,U)},N=ne=>{const{clientHeight:_e,scrollHeight:Ce,scrollTop:U}=ne.currentTarget,ie=p(x);if(ie.scrollOffset===U)return;const ee=Math.max(0,Math.min(U,Ce-_e));x.value={...ie,isScrolling:!0,scrollDir:Nh(ie.scrollOffset,ee),scrollOffset:ee,updateRequested:!1},xt(G)},z=ne=>{const{clientWidth:_e,scrollLeft:Ce,scrollWidth:U}=ne.currentTarget,ie=p(x);if(ie.scrollOffset===Ce)return;const{direction:ee}=c;let he=Ce;if(ee===Rg)switch(Tw()){case S0:{he=-Ce;break}case tN:{he=U-_e-Ce;break}}he=Math.max(0,Math.min(he,U-_e)),x.value={...ie,isScrolling:!0,scrollDir:Nh(ie.scrollOffset,he),scrollOffset:he,updateRequested:!1},xt(G)},I=ne=>{p(E)?z(ne):N(ne),$()},L=(ne,_e)=>{const Ce=(C.value-A.value)/_e*ne;X(Math.min(C.value-A.value,Ce))},X=ne=>{ne=Math.max(ne,0),ne!==p(x).scrollOffset&&(x.value={...p(x),scrollOffset:ne,scrollDir:Nh(p(x).scrollOffset,ne),updateRequested:!0},xt(G))},Q=(ne,_e=ol)=>{const{scrollOffset:Ce}=p(x);ne=Math.max(0,Math.min(ne,c.total-1)),X(e(c,ne,_e,Ce,p(m)))},W=ne=>{const{direction:_e,itemSize:Ce,layout:U}=c,ie=y.value(l&&Ce,l&&U,l&&_e);let ee;if(Mn(ie,String(ne)))ee=ie[ne];else{const he=r(c,ne,p(m)),$e=n(c,ne,p(m)),Me=p(E),q=_e===Rg,de=Me?he:0;ie[ne]=ee={position:"absolute",left:q?void 0:`${de}px`,right:q?`${de}px`:void 0,top:Me?0:`${he}px`,height:Me?"100%":`${$e}px`,width:Me?`${$e}px`:"100%"}}return ee},G=()=>{x.value.isScrolling=!1,xt(()=>{y.value(-1,null,null)})},K=()=>{const ne=b.value;ne&&(ne.scrollTop=0)};Ft(()=>{if(!wn)return;const{initScrollOffset:ne}=c,_e=p(b);Et(ne)&&_e&&(p(E)?_e.scrollLeft=ne:_e.scrollTop=ne),$()}),ac(()=>{const{direction:ne,layout:_e}=c,{scrollOffset:Ce,updateRequested:U}=p(x),ie=p(b);if(U&&ie)if(_e===rm)if(ne===Rg)switch(Tw()){case S0:{ie.scrollLeft=-Ce;break}case eN:{ie.scrollLeft=Ce;break}default:{const{clientWidth:ee,scrollWidth:he}=ie;ie.scrollLeft=he-ee-Ce;break}}else ie.scrollLeft=Ce;else ie.scrollTop=Ce}),qM(()=>{p(b).scrollTop=p(x).scrollOffset});const oe={ns:g,clientSize:A,estimatedTotalSize:C,windowStyle:T,windowRef:b,innerRef:w,innerStyle:P,itemsToRender:S,scrollbarRef:O,states:x,getItemStyle:W,onScroll:I,onScrollbarScroll:L,onWheel:D,scrollTo:X,scrollToItem:Q,resetScrollTop:K};return f({windowRef:b,innerRef:w,getItemStyleCache:y,scrollTo:X,scrollToItem:Q,resetScrollTop:K,states:x}),oe},render(c){var d;const{$slots:f,className:h,clientSize:g,containerElement:m,data:y,getItemStyle:b,innerElement:w,itemsToRender:O,innerStyle:x,layout:S,total:C,onScroll:E,onScrollbarScroll:T,states:P,useIsScrolling:A,windowStyle:D,ns:$}=c,[N,z]=O,I=on(m),L=on(w),X=[];if(C>0)for(let K=N;K<=z;K++)X.push(Tt(dt,{key:K},(d=f.default)==null?void 0:d.call(f,{data:y,index:K,isScrolling:A?P.isScrolling:void 0,style:b(K)})));const Q=[Tt(L,{style:x,ref:"innerRef"},Ot(L)?X:{default:()=>X})],W=Tt(Gk,{ref:"scrollbarRef",clientSize:g,layout:S,onScroll:T,ratio:g*100/this.estimatedTotalSize,scrollFrom:P.scrollOffset/(this.estimatedTotalSize-g),total:C}),G=Tt(I,{class:[$.e("window"),h],style:D,onScroll:E,ref:"windowRef",key:0},Ot(I)?[Q]:{default:()=>[Q]});return Tt("div",{key:0,class:[$.e("wrapper"),P.scrollbarAlwaysOn?"always-on":""]},[G,W])}}),SU=xU({name:"ElFixedSizeList",getItemOffset:({itemSize:t},e)=>e*t,getItemSize:({itemSize:t})=>t,getEstimatedTotalSize:({total:t,itemSize:e})=>e*t,getOffset:({height:t,total:e,itemSize:n,layout:r,width:i},o,a,s)=>{const l=C0(r)?i:t,u=Math.max(0,e*n-l),c=Math.min(u,o*n),d=Math.max(0,(o+1)*n-l);switch(a===iC&&(s>=d-l&&s<=c+l?a=ol:a=ju),a){case w0:return c;case x0:return d;case ju:{const f=Math.round(d+(c-d)/2);return f<Math.ceil(l/2)?0:f>u+Math.floor(l/2)?u:f}case ol:default:return s>=d&&s<=c?s:s<d?d:c}},getStartIndexForOffset:({total:t,itemSize:e},n)=>Math.max(0,Math.min(t-1,Math.floor(n/e))),getStopIndexForStartIndex:({height:t,total:e,itemSize:n,layout:r,width:i},o,a)=>{const s=o*n,l=C0(r)?i:t,u=Math.ceil((l+a-s)/n);return Math.max(0,Math.min(e-1,o+u-1))},initCache(){},clearCache:!0,validateProps(){}}),mg=(t,e,n)=>{const{itemSize:r}=t,{items:i,lastVisitedIndex:o}=n;if(e>o){let a=0;if(o>=0){const s=i[o];a=s.offset+s.size}for(let s=o+1;s<=e;s++){const l=r(s);i[s]={offset:a,size:l},a+=l}n.lastVisitedIndex=e}return i[e]},F3e=(t,e,n)=>{const{items:r,lastVisitedIndex:i}=e;return(i>0?r[i].offset:0)>=n?CU(t,e,0,i,n):V3e(t,e,Math.max(0,i),n)},CU=(t,e,n,r,i)=>{for(;n<=r;){const o=n+Math.floor((r-n)/2),a=mg(t,o,e).offset;if(a===i)return o;a<i?n=o+1:a>i&&(r=o-1)}return Math.max(0,n-1)},V3e=(t,e,n,r)=>{const{total:i}=t;let o=1;for(;n<i&&mg(t,n,e).offset<r;)n+=o,o*=2;return CU(t,e,Math.floor(n/2),Math.min(n,i-1),r)},kB=({total:t},{items:e,estimatedItemSize:n,lastVisitedIndex:r})=>{let i=0;if(r>=t&&(r=t-1),r>=0){const s=e[r];i=s.offset+s.size}const a=(t-r-1)*n;return i+a},j3e=xU({name:"ElDynamicSizeList",getItemOffset:(t,e,n)=>mg(t,e,n).offset,getItemSize:(t,e,{items:n})=>n[e].size,getEstimatedTotalSize:kB,getOffset:(t,e,n,r,i)=>{const{height:o,layout:a,width:s}=t,l=C0(a)?s:o,u=mg(t,e,i),c=kB(t,i),d=Math.max(0,Math.min(c-l,u.offset)),f=Math.max(0,u.offset-l+u.size);switch(n===iC&&(r>=f-l&&r<=d+l?n=ol:n=ju),n){case w0:return d;case x0:return f;case ju:return Math.round(f+(d-f)/2);case ol:default:return r>=f&&r<=d?r:r<f?f:d}},getStartIndexForOffset:(t,e,n)=>F3e(t,n,e),getStopIndexForStartIndex:(t,e,n,r)=>{const{height:i,total:o,layout:a,width:s}=t,l=C0(a)?s:i,u=mg(t,e,r),c=n+l;let d=u.offset+u.size,f=e;for(;f<o-1&&d<c;)f++,d+=mg(t,f,r).size;return f},initCache({estimatedItemSize:t=Hk},e){const n={items:{},estimatedItemSize:t,lastVisitedIndex:-1};return n.clearCacheAfterIndex=(r,i=!0)=>{var o,a;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,r-1),(o=e.exposed)==null||o.getItemStyleCache(-1),i&&((a=e.proxy)==null||a.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:t})=>{}}),Q3e={loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number};var z3e=ue({name:"ElSelectDropdown",props:Q3e,setup(t,{slots:e,expose:n}){const r=ht(K$),i=Qe("select"),{getLabel:o,getValue:a,getDisabled:s}=rC(r.props),l=F([]),u=F(),c=M(()=>t.data.length);Fe(()=>c.value,()=>{var D,$;($=(D=r.tooltipRef.value).updatePopper)==null||$.call(D)});const d=M(()=>ar(r.props.estimatedOptionHeight)),f=M(()=>d.value?{itemSize:r.props.itemHeight}:{estimatedSize:r.props.estimatedOptionHeight,itemSize:D=>l.value[D]}),h=(D=[],$)=>{const{props:{valueKey:N}}=r;return Jt($)?D&&D.some(z=>Dn(Kr(z,N))===Kr($,N)):D.includes($)},g=(D,$)=>{if(Jt($)){const{valueKey:N}=r.props;return Kr(D,N)===Kr($,N)}else return D===$},m=(D,$)=>r.props.multiple?h(D,a($)):g(D,a($)),y=(D,$)=>{const{disabled:N,multiple:z,multipleLimit:I}=r.props;return N||!$&&(z?I>0&&D.length>=I:!1)},b=D=>t.hoveringIndex===D;n({listRef:u,isSized:d,isItemDisabled:y,isItemHovering:b,isItemSelected:m,scrollToItem:D=>{const $=u.value;$&&$.scrollToItem(D)},resetScrollTop:()=>{const D=u.value;D&&D.resetScrollTop()}});const S=D=>{const{index:$,data:N,style:z}=D,I=p(d),{itemSize:L,estimatedSize:X}=p(f),{modelValue:Q}=r.props,{onSelect:W,onHover:G}=r,K=N[$];if(K.type==="Group")return B(_3e,{item:K,style:z,height:I?L:X},null);const oe=m(Q,K),ne=y(Q,oe),_e=b($);return B(k3e,an(D,{selected:oe,disabled:s(K)||ne,created:!!K.created,hovering:_e,item:K,onSelect:W,onHover:G}),{default:Ce=>{var U;return((U=e.default)==null?void 0:U.call(e,Ce))||B("span",null,[o(K)])}})},{onKeyboardNavigate:C,onKeyboardSelect:E}=r,T=()=>{C("forward")},P=()=>{C("backward")},A=D=>{const{code:$}=D,{tab:N,esc:z,down:I,up:L,enter:X,numpadEnter:Q}=ut;switch($!==N&&(D.preventDefault(),D.stopPropagation()),$){case N:case z:break;case I:T();break;case L:P();break;case X:case Q:E();break}};return()=>{var D,$,N,z;const{data:I,width:L}=t,{height:X,multiple:Q,scrollbarAlwaysOn:W}=r.props,G=p(d)?SU:j3e;return B("div",{class:[i.b("dropdown"),i.is("multiple",Q)],style:{width:`${L}px`}},[(D=e.header)==null?void 0:D.call(e),(($=e.loading)==null?void 0:$.call(e))||((N=e.empty)==null?void 0:N.call(e))||B(G,an({ref:u},p(f),{className:i.be("dropdown","list"),scrollbarAlwaysOn:W,data:I,height:X,width:L,total:I.length,onKeydown:A}),{default:K=>B(S,K,null)}),(z=e.footer)==null?void 0:z.call(e)])}}});function W3e(t,e){const{aliasProps:n,getLabel:r,getValue:i}=rC(t),o=F(0),a=F(),s=M(()=>t.allowCreate&&t.filterable);function l(h){const g=m=>r(m)===h;return t.options&&t.options.some(g)||e.createdOptions.some(g)}function u(h){!s.value||(t.multiple&&h.created?o.value++:a.value=h)}function c(h){if(s.value)if(h&&h.length>0){if(l(h))return;const g={[n.value.value]:h,[n.value.label]:h,created:!0,[n.value.disabled]:!1};e.createdOptions.length>=o.value?e.createdOptions[o.value]=g:e.createdOptions.push(g)}else if(t.multiple)e.createdOptions.length=o.value;else{const g=a.value;e.createdOptions.length=0,g&&g.created&&e.createdOptions.push(g)}}function d(h){if(!s.value||!h||!h.created||h.created&&t.reserveKeyword&&e.inputValue===r(h))return;const g=e.createdOptions.findIndex(m=>i(m)===i(h));~g&&(e.createdOptions.splice(g,1),o.value--)}function f(){s.value&&(e.createdOptions.length=0,o.value=0)}return{createNewOption:c,removeNewOption:d,selectNewOption:u,clearAllNewOption:f}}const H3e=11,U3e=(t,e)=>{const{t:n}=xn(),r=Qe("select"),i=Qe("input"),{form:o,formItem:a}=Wo(),{inputId:s}=Tl(t,{formItemContext:a}),{aliasProps:l,getLabel:u,getValue:c,getDisabled:d,getOptions:f}=rC(t),{valueOnClear:h,isEmptyValue:g}=VS(t),m=vn({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),y=F(-1),b=F(),w=F(),O=F(),x=F(),S=F(),C=F(),E=F(),T=F(),P=F(),A=F(),D=F(),{isComposing:$,handleCompositionStart:N,handleCompositionEnd:z,handleCompositionUpdate:I}=kb({afterComposition:tt=>gi(tt)}),{wrapperRef:L,isFocused:X,handleBlur:Q}=jf(S,{beforeFocus(){return oe.value},afterFocus(){t.automaticDropdown&&!K.value&&(K.value=!0,m.menuVisibleOnFocus=!0)},beforeBlur(tt){var Dt,ae;return((Dt=O.value)==null?void 0:Dt.isFocusInsideContent(tt))||((ae=x.value)==null?void 0:ae.isFocusInsideContent(tt))},afterBlur(){K.value=!1,m.menuVisibleOnFocus=!1}}),W=F([]),G=F([]),K=F(!1),oe=M(()=>t.disabled||(o==null?void 0:o.disabled)),ne=M(()=>{var tt;return(tt=o==null?void 0:o.statusIcon)!=null?tt:!1}),_e=M(()=>{const tt=G.value.length*t.itemHeight;return tt>t.height?t.height:tt}),Ce=M(()=>t.multiple?Xe(t.modelValue)&&t.modelValue.length>0:!g(t.modelValue)),U=M(()=>t.clearable&&!oe.value&&m.inputHovering&&Ce.value),ie=M(()=>t.remote&&t.filterable?"":hd),ee=M(()=>ie.value&&r.is("reverse",K.value)),he=M(()=>(a==null?void 0:a.validateState)||""),$e=M(()=>{if(!!he.value)return HS[he.value]}),Me=M(()=>t.remote?300:0),q=M(()=>t.loading?t.loadingText||n("el.select.loading"):t.remote&&!m.inputValue&&W.value.length===0?!1:t.filterable&&m.inputValue&&W.value.length>0&&G.value.length===0?t.noMatchText||n("el.select.noMatch"):W.value.length===0?t.noDataText||n("el.select.noData"):null),de=tt=>{const Dt=ae=>{if(t.filterable&&St(t.filterMethod)||t.filterable&&t.remote&&St(t.remoteMethod))return!0;const Le=new RegExp(R$(tt),"i");return tt?Le.test(u(ae)||""):!0};return t.loading?[]:[...m.createdOptions,...t.options].reduce((ae,Le)=>{const gt=f(Le);if(Xe(gt)){const Bt=gt.filter(Dt);Bt.length>0&&ae.push({label:u(Le),type:"Group"},...Bt)}else(t.remote||Dt(Le))&&ae.push(Le);return ae},[])},ke=()=>{W.value=de(""),G.value=de(m.inputValue)},Ie=M(()=>{const tt=new Map;return W.value.forEach((Dt,ae)=>{tt.set(Yt(c(Dt)),{option:Dt,index:ae})}),tt}),se=M(()=>{const tt=new Map;return G.value.forEach((Dt,ae)=>{tt.set(Yt(c(Dt)),{option:Dt,index:ae})}),tt}),ye=M(()=>G.value.every(tt=>d(tt))),Ae=ki(),Z=M(()=>Ae.value==="small"?"small":"default"),te=()=>{var tt;y.value=((tt=b.value)==null?void 0:tt.offsetWidth)||200},le=()=>{if(!w.value)return 0;const tt=window.getComputedStyle(w.value);return Number.parseFloat(tt.gap||"6px")},Te=M(()=>{const tt=le();return{maxWidth:`${D.value&&t.maxCollapseTags===1?m.selectionWidth-m.collapseItemWidth-tt:m.selectionWidth}px`}}),pe=M(()=>({maxWidth:`${m.selectionWidth}px`})),Oe=M(()=>({width:`${Math.max(m.calculatorWidth,H3e)}px`})),Re=M(()=>Xe(t.modelValue)?t.modelValue.length===0&&!m.inputValue:t.filterable?!m.inputValue:!0),je=M(()=>{var tt;const Dt=(tt=t.placeholder)!=null?tt:n("el.select.placeholder");return t.multiple||!Ce.value?Dt:m.selectedLabel}),Ke=M(()=>{var tt,Dt;return(Dt=(tt=O.value)==null?void 0:tt.popperRef)==null?void 0:Dt.contentRef}),Je=M(()=>{if(t.multiple){const tt=t.modelValue.length;if(t.modelValue.length>0&&se.value.has(t.modelValue[tt-1])){const{index:Dt}=se.value.get(t.modelValue[tt-1]);return Dt}}else if(!g(t.modelValue)&&se.value.has(t.modelValue)){const{index:tt}=se.value.get(t.modelValue);return tt}return-1}),at=M({get(){return K.value&&q.value!==!1},set(tt){K.value=tt}}),kt=M(()=>t.multiple?t.collapseTags?m.cachedOptions.slice(0,t.maxCollapseTags):m.cachedOptions:[]),jt=M(()=>t.multiple?t.collapseTags?m.cachedOptions.slice(t.maxCollapseTags):[]:[]),{createNewOption:Pe,removeNewOption:nt,selectNewOption:fe,clearAllNewOption:De}=W3e(t,m),ce=()=>{oe.value||(m.menuVisibleOnFocus?m.menuVisibleOnFocus=!1:K.value=!K.value)},qe=()=>{m.inputValue.length>0&&!K.value&&(K.value=!0),Pe(m.inputValue),Zt(m.inputValue)},Mt=Qo(qe,Me.value),Zt=tt=>{m.previousQuery===tt||$.value||(m.previousQuery=tt,t.filterable&&St(t.filterMethod)?t.filterMethod(tt):t.filterable&&t.remote&&St(t.remoteMethod)&&t.remoteMethod(tt),t.defaultFirstOption&&(t.filterable||t.remote)&&G.value.length?xt(Sn):xt(Br))},Sn=()=>{const tt=G.value.filter(Le=>!Le.disabled&&Le.type!=="Group"),Dt=tt.find(Le=>Le.created),ae=tt[0];m.hoveringIndex=Ln(G.value,Dt||ae)},kr=tt=>{Qi(t.modelValue,tt)||e(dr,tt)},zn=tt=>{e(Ut,tt),kr(tt),m.previousValue=t.multiple?String(tt):tt},Ln=(tt=[],Dt)=>{if(!Jt(Dt))return tt.indexOf(Dt);const ae=t.valueKey;let Le=-1;return tt.some((gt,Bt)=>Kr(gt,ae)===Kr(Dt,ae)?(Le=Bt,!0):!1),Le},Yt=tt=>Jt(tt)?Kr(tt,t.valueKey):tt,Ge=()=>{te()},$t=()=>{m.selectionWidth=w.value.getBoundingClientRect().width},bn=()=>{m.calculatorWidth=C.value.getBoundingClientRect().width},dn=()=>{m.collapseItemWidth=D.value.getBoundingClientRect().width},Pr=()=>{var tt,Dt;(Dt=(tt=O.value)==null?void 0:tt.updatePopper)==null||Dt.call(tt)},Jn=()=>{var tt,Dt;(Dt=(tt=x.value)==null?void 0:tt.updatePopper)==null||Dt.call(tt)},Xi=tt=>{if(t.multiple){let Dt=t.modelValue.slice();const ae=Ln(Dt,c(tt));ae>-1?(Dt=[...Dt.slice(0,ae),...Dt.slice(ae+1)],m.cachedOptions.splice(ae,1),nt(tt)):(t.multipleLimit<=0||Dt.length<t.multipleLimit)&&(Dt=[...Dt,c(tt)],m.cachedOptions.push(tt),fe(tt)),zn(Dt),tt.created&&Zt(""),t.filterable&&!t.reserveKeyword&&(m.inputValue="")}else m.selectedLabel=u(tt),zn(c(tt)),K.value=!1,fe(tt),tt.created||De();si()},Ji=(tt,Dt)=>{let ae=t.modelValue.slice();const Le=Ln(ae,c(Dt));Le>-1&&!oe.value&&(ae=[...t.modelValue.slice(0,Le),...t.modelValue.slice(Le+1)],m.cachedOptions.splice(Le,1),zn(ae),e("remove-tag",c(Dt)),nt(Dt)),tt.stopPropagation(),si()},si=()=>{var tt;(tt=S.value)==null||tt.focus()},Vs=()=>{var tt;if(K.value){K.value=!1,xt(()=>{var Dt;return(Dt=S.value)==null?void 0:Dt.blur()});return}(tt=S.value)==null||tt.blur()},cs=()=>{m.inputValue.length>0?m.inputValue="":K.value=!1},_r=tt=>RS(tt,Dt=>!m.cachedOptions.some(ae=>c(ae)===Dt&&d(ae))),$l=tt=>{if(!!t.multiple&&tt.code!==ut.delete&&m.inputValue.length===0){tt.preventDefault();const Dt=t.modelValue.slice(),ae=_r(Dt);if(ae<0)return;const Le=Dt[ae];Dt.splice(ae,1);const gt=m.cachedOptions[ae];m.cachedOptions.splice(ae,1),nt(gt),zn(Dt),e("remove-tag",Le)}},ca=()=>{let tt;Xe(t.modelValue)?tt=[]:tt=h.value,t.multiple?m.cachedOptions=[]:m.selectedLabel="",K.value=!1,zn(tt),e("clear"),De(),si()},ot=(tt,Dt=void 0)=>{const ae=G.value;if(!["forward","backward"].includes(tt)||oe.value||ae.length<=0||ye.value||$.value)return;if(!K.value)return ce();Dt===void 0&&(Dt=m.hoveringIndex);let Le=-1;tt==="forward"?(Le=Dt+1,Le>=ae.length&&(Le=0)):tt==="backward"&&(Le=Dt-1,(Le<0||Le>=ae.length)&&(Le=ae.length-1));const gt=ae[Le];if(d(gt)||gt.type==="Group")return ot(tt,Le);m.hoveringIndex=Le,eo(Le)},Rt=()=>{if(K.value)~m.hoveringIndex&&G.value[m.hoveringIndex]&&Xi(G.value[m.hoveringIndex]);else return ce()},Nt=tt=>{m.hoveringIndex=tt!=null?tt:-1},Br=()=>{t.multiple?m.hoveringIndex=G.value.findIndex(tt=>t.modelValue.some(Dt=>Yt(Dt)===Yt(tt))):m.hoveringIndex=G.value.findIndex(tt=>Yt(tt)===Yt(t.modelValue))},gi=tt=>{if(m.inputValue=tt.target.value,t.remote)Mt();else return qe()},ho=tt=>{if(K.value=!1,X.value){const Dt=new FocusEvent("focus",tt);Q(Dt)}},Eo=()=>(m.isBeforeHide=!1,xt(()=>{~Je.value&&eo(m.hoveringIndex)})),eo=tt=>{P.value.scrollToItem(tt)},To=(tt,Dt)=>{const ae=Yt(tt);if(Ie.value.has(ae)){const{option:Le}=Ie.value.get(ae);return Le}if(Dt&&Dt.length){const Le=Dt.find(gt=>Yt(c(gt))===ae);if(Le)return Le}return{[l.value.value]:tt,[l.value.label]:tt}},ds=(tt=!1)=>{if(t.multiple)if(t.modelValue.length>0){const Dt=m.cachedOptions.slice();m.cachedOptions.length=0,m.previousValue=t.modelValue.toString();for(const ae of t.modelValue){const Le=To(ae,Dt);m.cachedOptions.push(Le)}}else m.cachedOptions=[],m.previousValue=void 0;else if(Ce.value){m.previousValue=t.modelValue;const Dt=G.value,ae=Dt.findIndex(Le=>Yt(c(Le))===Yt(t.modelValue));~ae?m.selectedLabel=u(Dt[ae]):(!m.selectedLabel||tt)&&(m.selectedLabel=Yt(t.modelValue))}else m.selectedLabel="",m.previousValue=void 0;De(),te()};return Fe(K,tt=>{tt?Zt(""):(m.inputValue="",m.previousQuery=null,m.isBeforeHide=!0,Pe("")),e("visible-change",tt)}),Fe(()=>t.modelValue,(tt,Dt)=>{var ae;(!tt||Xe(tt)&&tt.length===0||t.multiple&&!Qi(tt.toString(),m.previousValue)||!t.multiple&&Yt(tt)!==Yt(m.previousValue))&&ds(!0),!Qi(tt,Dt)&&t.validateEvent&&((ae=a==null?void 0:a.validate)==null||ae.call(a,"change").catch(gt=>void 0))},{deep:!0}),Fe(()=>t.options,()=>{const tt=S.value;(!tt||tt&&document.activeElement!==tt)&&ds()},{deep:!0,flush:"post"}),Fe(()=>G.value,()=>P.value&&xt(P.value.resetScrollTop)),Bo(()=>{m.isBeforeHide||ke()}),Bo(()=>{const{valueKey:tt,options:Dt}=t,ae=new Map;for(const Le of Dt){const gt=c(Le);let Bt=gt;if(Jt(Bt)&&(Bt=Kr(gt,tt)),ae.get(Bt))break;ae.set(Bt,!0)}}),Ft(()=>{ds()}),Hr(b,Ge),Hr(w,$t),Hr(C,bn),Hr(P,Pr),Hr(L,Pr),Hr(A,Jn),Hr(D,dn),{inputId:s,collapseTagSize:Z,currentPlaceholder:je,expanded:K,emptyText:q,popupHeight:_e,debounce:Me,allOptions:W,filteredOptions:G,iconComponent:ie,iconReverse:ee,tagStyle:Te,collapseTagStyle:pe,inputStyle:Oe,popperSize:y,dropdownMenuVisible:at,hasModelValue:Ce,shouldShowPlaceholder:Re,selectDisabled:oe,selectSize:Ae,needStatusIcon:ne,showClearBtn:U,states:m,isFocused:X,nsSelect:r,nsInput:i,calculatorRef:C,inputRef:S,menuRef:P,tagMenuRef:A,tooltipRef:O,tagTooltipRef:x,selectRef:b,wrapperRef:L,selectionRef:w,prefixRef:E,suffixRef:T,collapseItemRef:D,popperRef:Ke,validateState:he,validateIcon:$e,showTagList:kt,collapseTagList:jt,debouncedOnInputChange:Mt,deleteTag:Ji,getLabel:u,getValue:c,getDisabled:d,getValueKey:Yt,handleClear:ca,handleClickOutside:ho,handleDel:$l,handleEsc:cs,focus:si,blur:Vs,handleMenuEnter:Eo,handleResize:Ge,resetSelectionWidth:$t,resetCalculatorWidth:bn,updateTooltip:Pr,updateTagTooltip:Jn,updateOptions:ke,toggleMenu:ce,scrollTo:eo,onInput:gi,onKeyboardNavigate:ot,onKeyboardSelect:Rt,onSelect:Xi,onHover:Nt,handleCompositionStart:N,handleCompositionEnd:z,handleCompositionUpdate:I}},X3e=ue({name:"ElSelectV2",components:{ElSelectMenu:z3e,ElTag:ns,ElTooltip:Hi,ElIcon:mt},directives:{ClickOutside:Kc},props:w3e,emits:S3e,setup(t,{emit:e}){const n=M(()=>{const{modelValue:o,multiple:a}=t,s=a?[]:void 0;return Xe(o)?a?o:s:a?s:o}),r=U3e(vn({...Mi(t),modelValue:n}),e);gn(K$,{props:vn({...Mi(t),height:r.popupHeight,modelValue:n}),expanded:r.expanded,tooltipRef:r.tooltipRef,onSelect:r.onSelect,onHover:r.onHover,onKeyboardNavigate:r.onKeyboardNavigate,onKeyboardSelect:r.onKeyboardSelect});const i=M(()=>t.multiple?r.states.cachedOptions.map(o=>o.label):r.states.selectedLabel);return{...r,modelValue:n,selectedLabel:i}}});function Z3e(t,e,n,r,i,o){const a=rn("el-tag"),s=rn("el-tooltip"),l=rn("el-icon"),u=rn("el-select-menu"),c=pS("click-outside");return zt((R(),Y("div",{ref:"selectRef",class:V([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),onMouseenter:d=>t.states.inputHovering=!0,onMouseleave:d=>t.states.inputHovering=!1},[B(s,{ref:"tooltipRef",visible:t.dropdownMenuVisible,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,placement:t.placement,pure:"",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:d=>t.states.isBeforeHide=!1},{default:j(()=>[J("div",{ref:"wrapperRef",class:V([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:At(t.toggleMenu,["prevent"])},[t.$slots.prefix?(R(),Y("div",{key:0,ref:"prefixRef",class:V(t.nsSelect.e("prefix"))},[Ee(t.$slots,"prefix")],2)):Se("v-if",!0),J("div",{ref:"selectionRef",class:V([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.modelValue.length)])},[t.multiple?Ee(t.$slots,"tag",{key:0},()=>[(R(!0),Y(dt,null,Ht(t.showTagList,d=>(R(),Y("div",{key:t.getValueKey(t.getValue(d)),class:V(t.nsSelect.e("selected-item"))},[B(a,{closable:!t.selectDisabled&&!t.getDisabled(d),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:vt(t.tagStyle),onClose:f=>t.deleteTag(f,d)},{default:j(()=>[J("span",{class:V(t.nsSelect.e("tags-text"))},[Ee(t.$slots,"label",{label:t.getLabel(d),value:t.getValue(d)},()=>[Ue(Ve(t.getLabel(d)),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.modelValue.length>t.maxCollapseTags?(R(),xe(s,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:j(()=>[J("div",{ref:"collapseItemRef",class:V(t.nsSelect.e("selected-item"))},[B(a,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,style:vt(t.collapseTagStyle),"disable-transitions":""},{default:j(()=>[J("span",{class:V(t.nsSelect.e("tags-text"))}," + "+Ve(t.modelValue.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:j(()=>[J("div",{ref:"tagMenuRef",class:V(t.nsSelect.e("selection"))},[(R(!0),Y(dt,null,Ht(t.collapseTagList,d=>(R(),Y("div",{key:t.getValueKey(t.getValue(d)),class:V(t.nsSelect.e("selected-item"))},[B(a,{class:"in-tooltip",closable:!t.selectDisabled&&!t.getDisabled(d),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:f=>t.deleteTag(f,d)},{default:j(()=>[J("span",{class:V(t.nsSelect.e("tags-text"))},[Ee(t.$slots,"label",{label:t.getLabel(d),value:t.getValue(d)},()=>[Ue(Ve(t.getLabel(d)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):Se("v-if",!0)]):Se("v-if",!0),J("div",{class:V([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[zt(J("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":d=>t.states.inputValue=d,style:vt(t.inputStyle),autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":t.expanded,"aria-label":t.ariaLabel,class:V([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,role:"combobox",readonly:!t.filterable,spellcheck:"false",type:"text",name:t.name,onInput:t.onInput,onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onKeydown:[br(At(d=>t.onKeyboardNavigate("backward"),["stop","prevent"]),["up"]),br(At(d=>t.onKeyboardNavigate("forward"),["stop","prevent"]),["down"]),br(At(t.onKeyboardSelect,["stop","prevent"]),["enter"]),br(At(t.handleEsc,["stop","prevent"]),["esc"]),br(At(t.handleDel,["stop"]),["delete"])],onClick:At(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","autocomplete","tabindex","aria-expanded","aria-label","disabled","readonly","name","onInput","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown","onClick"]),[[vS,t.states.inputValue]]),t.filterable?(R(),Y("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:V(t.nsSelect.e("input-calculator")),textContent:Ve(t.states.inputValue)},null,10,["textContent"])):Se("v-if",!0)],2),t.shouldShowPlaceholder?(R(),Y("div",{key:1,class:V([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?Ee(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[J("span",null,Ve(t.currentPlaceholder),1)]):(R(),Y("span",{key:1},Ve(t.currentPlaceholder),1))],2)):Se("v-if",!0)],2),J("div",{ref:"suffixRef",class:V(t.nsSelect.e("suffix"))},[t.iconComponent?zt((R(),xe(l,{key:0,class:V([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.iconReverse])},{default:j(()=>[(R(),xe(on(t.iconComponent)))]),_:1},8,["class"])),[[Bn,!t.showClearBtn]]):Se("v-if",!0),t.showClearBtn&&t.clearIcon?(R(),xe(l,{key:1,class:V([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.nsSelect.e("clear")]),onClick:At(t.handleClear,["prevent","stop"])},{default:j(()=>[(R(),xe(on(t.clearIcon)))]),_:1},8,["class","onClick"])):Se("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(R(),xe(l,{key:2,class:V([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:j(()=>[(R(),xe(on(t.validateIcon)))]),_:1},8,["class"])):Se("v-if",!0)],2)],10,["onClick"])]),content:j(()=>[B(u,{ref:"menuRef",data:t.filteredOptions,width:t.popperSize,"hovering-index":t.states.hoveringIndex,"scrollbar-always-on":t.scrollbarAlwaysOn},es({default:j(d=>[Ee(t.$slots,"default",Yl(df(d)))]),_:2},[t.$slots.header?{name:"header",fn:j(()=>[J("div",{class:V(t.nsSelect.be("dropdown","header"))},[Ee(t.$slots,"header")],2)])}:void 0,t.$slots.loading&&t.loading?{name:"loading",fn:j(()=>[J("div",{class:V(t.nsSelect.be("dropdown","loading"))},[Ee(t.$slots,"loading")],2)])}:t.loading||t.filteredOptions.length===0?{name:"empty",fn:j(()=>[J("div",{class:V(t.nsSelect.be("dropdown","empty"))},[Ee(t.$slots,"empty",{},()=>[J("span",null,Ve(t.emptyText),1)])],2)])}:void 0,t.$slots.footer?{name:"footer",fn:j(()=>[J("div",{class:V(t.nsSelect.be("dropdown","footer"))},[Ee(t.$slots,"footer")],2)])}:void 0]),1032,["data","width","hovering-index","scrollbar-always-on"])]),_:3},8,["visible","teleported","popper-class","popper-options","fallback-placements","effect","placement","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],42,["onMouseenter","onMouseleave"])),[[c,t.handleClickOutside,t.popperRef]])}var q3e=Ye(X3e,[["render",Z3e],["__file","select.vue"]]);const Y3e=Vt(q3e),G3e=Ze({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:we([Number,Object])}}),K3e=Ze({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),J3e=ue({name:"ElSkeletonItem"}),e4e=ue({...J3e,props:K3e,setup(t){const e=Qe("skeleton");return(n,r)=>(R(),Y("div",{class:V([p(e).e("item"),p(e).e(n.variant)])},[n.variant==="image"?(R(),xe(p(HCe),{key:0})):Se("v-if",!0)],2))}});var kw=Ye(e4e,[["__file","skeleton-item.vue"]]);const t4e=(t,e=0)=>{if(e===0)return t;const n=Jt(e)&&Boolean(e.initVal),r=F(n);let i=null;const o=s=>{if(ar(s)){r.value=t.value;return}i&&clearTimeout(i),i=setTimeout(()=>{r.value=t.value},s)},a=s=>{s==="leading"?Et(e)?o(e):o(e.leading):Jt(e)?o(e.trailing):r.value=!1};return Ft(()=>a("leading")),Fe(()=>t.value,s=>{a(s?"leading":"trailing")}),r},n4e=ue({name:"ElSkeleton"}),r4e=ue({...n4e,props:G3e,setup(t,{expose:e}){const n=t,r=Qe("skeleton"),i=t4e(Gn(n,"loading"),n.throttle);return e({uiLoading:i}),(o,a)=>p(i)?(R(),Y("div",an({key:0,class:[p(r).b(),p(r).is("animated",o.animated)]},o.$attrs),[(R(!0),Y(dt,null,Ht(o.count,s=>(R(),Y(dt,{key:s},[p(i)?Ee(o.$slots,"template",{key:s},()=>[B(kw,{class:V(p(r).is("first")),variant:"p"},null,8,["class"]),(R(!0),Y(dt,null,Ht(o.rows,l=>(R(),xe(kw,{key:l,class:V([p(r).e("paragraph"),p(r).is("last",l===o.rows&&o.rows>1)]),variant:"p"},null,8,["class"]))),128))]):Se("v-if",!0)],64))),128))],16)):Ee(o.$slots,"default",Yl(an({key:1},o.$attrs)))}});var i4e=Ye(r4e,[["__file","skeleton.vue"]]);const o4e=Vt(i4e,{SkeletonItem:kw}),a4e=ni(kw),EU=Symbol("sliderContextKey"),s4e=Ze({modelValue:{type:we([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:$i,inputSize:$i,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:we(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:we(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:gd,default:"top"},marks:{type:we(Object)},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),LT=t=>Et(t)||Xe(t)&&t.every(Et),l4e={[Ut]:LT,[Fo]:LT,[dr]:LT},u4e=Ze({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:gd,default:"top"}}),c4e={[Ut]:t=>Et(t)},d4e=(t,e,n)=>{const r=F(),i=F(!1),o=M(()=>e.value instanceof Function),a=M(()=>o.value&&e.value(t.modelValue)||t.modelValue),s=Qo(()=>{n.value&&(i.value=!0)},50),l=Qo(()=>{n.value&&(i.value=!1)},50);return{tooltip:r,tooltipVisible:i,formatValue:a,displayTooltip:s,hideTooltip:l}},f4e=(t,e,n)=>{const{disabled:r,min:i,max:o,step:a,showTooltip:s,precision:l,sliderSize:u,formatTooltip:c,emitChange:d,resetSize:f,updateDragging:h}=ht(EU),{tooltip:g,tooltipVisible:m,formatValue:y,displayTooltip:b,hideTooltip:w}=d4e(t,c,s),O=F(),x=M(()=>`${(t.modelValue-i.value)/(o.value-i.value)*100}%`),S=M(()=>t.vertical?{bottom:x.value}:{left:x.value}),C=()=>{e.hovering=!0,b()},E=()=>{e.hovering=!1,e.dragging||w()},T=oe=>{r.value||(oe.preventDefault(),Q(oe),window.addEventListener("mousemove",W),window.addEventListener("touchmove",W),window.addEventListener("mouseup",G),window.addEventListener("touchend",G),window.addEventListener("contextmenu",G),O.value.focus())},P=oe=>{r.value||(e.newPosition=Number.parseFloat(x.value)+oe/(o.value-i.value)*100,K(e.newPosition),d())},A=()=>{P(-a.value)},D=()=>{P(a.value)},$=()=>{P(-a.value*4)},N=()=>{P(a.value*4)},z=()=>{r.value||(K(0),d())},I=()=>{r.value||(K(100),d())},L=oe=>{let ne=!0;switch(oe.code){case ut.left:case ut.down:A();break;case ut.right:case ut.up:D();break;case ut.home:z();break;case ut.end:I();break;case ut.pageDown:$();break;case ut.pageUp:N();break;default:ne=!1;break}ne&&oe.preventDefault()},X=oe=>{let ne,_e;return oe.type.startsWith("touch")?(_e=oe.touches[0].clientY,ne=oe.touches[0].clientX):(_e=oe.clientY,ne=oe.clientX),{clientX:ne,clientY:_e}},Q=oe=>{e.dragging=!0,e.isClick=!0;const{clientX:ne,clientY:_e}=X(oe);t.vertical?e.startY=_e:e.startX=ne,e.startPosition=Number.parseFloat(x.value),e.newPosition=e.startPosition},W=oe=>{if(e.dragging){e.isClick=!1,b(),f();let ne;const{clientX:_e,clientY:Ce}=X(oe);t.vertical?(e.currentY=Ce,ne=(e.startY-e.currentY)/u.value*100):(e.currentX=_e,ne=(e.currentX-e.startX)/u.value*100),e.newPosition=e.startPosition+ne,K(e.newPosition)}},G=()=>{e.dragging&&(setTimeout(()=>{e.dragging=!1,e.hovering||w(),e.isClick||K(e.newPosition),d()},0),window.removeEventListener("mousemove",W),window.removeEventListener("touchmove",W),window.removeEventListener("mouseup",G),window.removeEventListener("touchend",G),window.removeEventListener("contextmenu",G))},K=async oe=>{if(oe===null||Number.isNaN(+oe))return;oe<0?oe=0:oe>100&&(oe=100);const ne=100/((o.value-i.value)/a.value);let Ce=Math.round(oe/ne)*ne*(o.value-i.value)*.01+i.value;Ce=Number.parseFloat(Ce.toFixed(l.value)),Ce!==t.modelValue&&n(Ut,Ce),!e.dragging&&t.modelValue!==e.oldValue&&(e.oldValue=t.modelValue),await xt(),e.dragging&&b(),g.value.updatePopper()};return Fe(()=>e.dragging,oe=>{h(oe)}),sr(O,"touchstart",T,{passive:!1}),{disabled:r,button:O,tooltip:g,tooltipVisible:m,showTooltip:s,wrapperStyle:S,formatValue:y,handleMouseEnter:C,handleMouseLeave:E,onButtonDown:T,onKeyDown:L,setPosition:K}},h4e=ue({name:"ElSliderButton"}),p4e=ue({...h4e,props:u4e,emits:c4e,setup(t,{expose:e,emit:n}){const r=t,i=Qe("slider"),o=vn({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:r.modelValue}),{disabled:a,button:s,tooltip:l,showTooltip:u,tooltipVisible:c,wrapperStyle:d,formatValue:f,handleMouseEnter:h,handleMouseLeave:g,onButtonDown:m,onKeyDown:y,setPosition:b}=f4e(r,o,n),{hovering:w,dragging:O}=Mi(o);return e({onButtonDown:m,onKeyDown:y,setPosition:b,hovering:w,dragging:O}),(x,S)=>(R(),Y("div",{ref_key:"button",ref:s,class:V([p(i).e("button-wrapper"),{hover:p(w),dragging:p(O)}]),style:vt(p(d)),tabindex:p(a)?-1:0,onMouseenter:p(h),onMouseleave:p(g),onMousedown:p(m),onFocus:p(h),onBlur:p(g),onKeydown:p(y)},[B(p(Hi),{ref_key:"tooltip",ref:l,visible:p(c),placement:x.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":x.tooltipClass,disabled:!p(u),persistent:p(u)},{content:j(()=>[J("span",null,Ve(p(f)),1)]),default:j(()=>[J("div",{class:V([p(i).e("button"),{hover:p(w),dragging:p(O)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var PB=Ye(p4e,[["__file","button.vue"]]);const g4e=Ze({mark:{type:we([String,Object]),default:void 0}});var m4e=ue({name:"ElSliderMarker",props:g4e,setup(t){const e=Qe("slider"),n=M(()=>Ot(t.mark)?t.mark:t.mark.label),r=M(()=>Ot(t.mark)?void 0:t.mark.style);return()=>Tt("div",{class:e.e("marks-text"),style:r.value},n.value)}});const v4e=(t,e,n)=>{const{form:r,formItem:i}=Wo(),o=yr(),a=F(),s=F(),l={firstButton:a,secondButton:s},u=M(()=>t.disabled||(r==null?void 0:r.disabled)||!1),c=M(()=>Math.min(e.firstValue,e.secondValue)),d=M(()=>Math.max(e.firstValue,e.secondValue)),f=M(()=>t.range?`${100*(d.value-c.value)/(t.max-t.min)}%`:`${100*(e.firstValue-t.min)/(t.max-t.min)}%`),h=M(()=>t.range?`${100*(c.value-t.min)/(t.max-t.min)}%`:"0%"),g=M(()=>t.vertical?{height:t.height}:{}),m=M(()=>t.vertical?{height:f.value,bottom:h.value}:{width:f.value,left:h.value}),y=()=>{o.value&&(e.sliderSize=o.value[`client${t.vertical?"Height":"Width"}`])},b=$=>{const N=t.min+$*(t.max-t.min)/100;if(!t.range)return a;let z;return Math.abs(c.value-N)<Math.abs(d.value-N)?z=e.firstValue<e.secondValue?"firstButton":"secondButton":z=e.firstValue>e.secondValue?"firstButton":"secondButton",l[z]},w=$=>{const N=b($);return N.value.setPosition($),N},O=$=>{e.firstValue=$!=null?$:t.min,S(t.range?[c.value,d.value]:$!=null?$:t.min)},x=$=>{e.secondValue=$,t.range&&S([c.value,d.value])},S=$=>{n(Ut,$),n(Fo,$)},C=async()=>{await xt(),n(dr,t.range?[c.value,d.value]:t.modelValue)},E=$=>{var N,z,I,L,X,Q;if(u.value||e.dragging)return;y();let W=0;if(t.vertical){const G=(I=(z=(N=$.touches)==null?void 0:N.item(0))==null?void 0:z.clientY)!=null?I:$.clientY;W=(o.value.getBoundingClientRect().bottom-G)/e.sliderSize*100}else{const G=(Q=(X=(L=$.touches)==null?void 0:L.item(0))==null?void 0:X.clientX)!=null?Q:$.clientX,K=o.value.getBoundingClientRect().left;W=(G-K)/e.sliderSize*100}if(!(W<0||W>100))return w(W)};return{elFormItem:i,slider:o,firstButton:a,secondButton:s,sliderDisabled:u,minValue:c,maxValue:d,runwayStyle:g,barStyle:m,resetSize:y,setPosition:w,emitChange:C,onSliderWrapperPrevent:$=>{var N,z;(((N=l.firstButton.value)==null?void 0:N.dragging)||((z=l.secondButton.value)==null?void 0:z.dragging))&&$.preventDefault()},onSliderClick:$=>{E($)&&C()},onSliderDown:async $=>{const N=E($);N&&(await xt(),N.value.onButtonDown($))},onSliderMarkerDown:$=>{u.value||e.dragging||w($)},setFirstValue:O,setSecondValue:x}},y4e=(t,e,n,r)=>({stops:M(()=>{if(!t.showStops||t.min>t.max)return[];if(t.step===0)return[];const a=(t.max-t.min)/t.step,s=100*t.step/(t.max-t.min),l=Array.from({length:a-1}).map((u,c)=>(c+1)*s);return t.range?l.filter(u=>u<100*(n.value-t.min)/(t.max-t.min)||u>100*(r.value-t.min)/(t.max-t.min)):l.filter(u=>u>100*(e.firstValue-t.min)/(t.max-t.min))}),getStopStyle:a=>t.vertical?{bottom:`${a}%`}:{left:`${a}%`}}),b4e=t=>M(()=>t.marks?Object.keys(t.marks).map(Number.parseFloat).sort((n,r)=>n-r).filter(n=>n<=t.max&&n>=t.min).map(n=>({point:n,position:(n-t.min)*100/(t.max-t.min),mark:t.marks[n]})):[]),_4e=(t,e,n,r,i,o)=>{const a=u=>{i(Ut,u),i(Fo,u)},s=()=>t.range?![n.value,r.value].every((u,c)=>u===e.oldValue[c]):t.modelValue!==e.oldValue,l=()=>{var u,c;t.min>t.max&&Wi("Slider","min should not be greater than max.");const d=t.modelValue;t.range&&Xe(d)?d[1]<t.min?a([t.min,t.min]):d[0]>t.max?a([t.max,t.max]):d[0]<t.min?a([t.min,d[1]]):d[1]>t.max?a([d[0],t.max]):(e.firstValue=d[0],e.secondValue=d[1],s()&&(t.validateEvent&&((u=o==null?void 0:o.validate)==null||u.call(o,"change").catch(f=>void 0)),e.oldValue=d.slice())):!t.range&&Et(d)&&!Number.isNaN(d)&&(d<t.min?a(t.min):d>t.max?a(t.max):(e.firstValue=d,s()&&(t.validateEvent&&((c=o==null?void 0:o.validate)==null||c.call(o,"change").catch(f=>void 0)),e.oldValue=d)))};l(),Fe(()=>e.dragging,u=>{u||l()}),Fe(()=>t.modelValue,(u,c)=>{e.dragging||Xe(u)&&Xe(c)&&u.every((d,f)=>d===c[f])&&e.firstValue===u[0]&&e.secondValue===u[1]||l()},{deep:!0}),Fe(()=>[t.min,t.max],()=>{l()})},O4e=(t,e,n)=>{const r=F();return Ft(async()=>{t.range?(Xe(t.modelValue)?(e.firstValue=Math.max(t.min,t.modelValue[0]),e.secondValue=Math.min(t.max,t.modelValue[1])):(e.firstValue=t.min,e.secondValue=t.max),e.oldValue=[e.firstValue,e.secondValue]):(!Et(t.modelValue)||Number.isNaN(t.modelValue)?e.firstValue=t.min:e.firstValue=Math.min(t.max,Math.max(t.min,t.modelValue)),e.oldValue=e.firstValue),sr(window,"resize",n),await xt(),n()}),{sliderWrapper:r}},w4e=ue({name:"ElSlider"}),x4e=ue({...w4e,props:s4e,emits:l4e,setup(t,{expose:e,emit:n}){const r=t,i=Qe("slider"),{t:o}=xn(),a=vn({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:s,slider:l,firstButton:u,secondButton:c,sliderDisabled:d,minValue:f,maxValue:h,runwayStyle:g,barStyle:m,resetSize:y,emitChange:b,onSliderWrapperPrevent:w,onSliderClick:O,onSliderDown:x,onSliderMarkerDown:S,setFirstValue:C,setSecondValue:E}=v4e(r,a,n),{stops:T,getStopStyle:P}=y4e(r,a,f,h),{inputId:A,isLabeledByFormItem:D}=Tl(r,{formItemContext:s}),$=ki(),N=M(()=>r.inputSize||$.value),z=M(()=>r.ariaLabel||o("el.slider.defaultLabel",{min:r.min,max:r.max})),I=M(()=>r.range?r.rangeStartLabel||o("el.slider.defaultRangeStartLabel"):z.value),L=M(()=>r.formatValueText?r.formatValueText(ne.value):`${ne.value}`),X=M(()=>r.rangeEndLabel||o("el.slider.defaultRangeEndLabel")),Q=M(()=>r.formatValueText?r.formatValueText(_e.value):`${_e.value}`),W=M(()=>[i.b(),i.m($.value),i.is("vertical",r.vertical),{[i.m("with-input")]:r.showInput}]),G=b4e(r);_4e(r,a,f,h,n,s);const K=M(()=>{const ie=[r.min,r.max,r.step].map(ee=>{const he=`${ee}`.split(".")[1];return he?he.length:0});return Math.max.apply(null,ie)}),{sliderWrapper:oe}=O4e(r,a,y),{firstValue:ne,secondValue:_e,sliderSize:Ce}=Mi(a),U=ie=>{a.dragging=ie};return sr(oe,"touchstart",w,{passive:!1}),sr(oe,"touchmove",w,{passive:!1}),gn(EU,{...Mi(r),sliderSize:Ce,disabled:d,precision:K,emitChange:b,resetSize:y,updateDragging:U}),e({onSliderClick:O}),(ie,ee)=>{var he,$e;return R(),Y("div",{id:ie.range?p(A):void 0,ref_key:"sliderWrapper",ref:oe,class:V(p(W)),role:ie.range?"group":void 0,"aria-label":ie.range&&!p(D)?p(z):void 0,"aria-labelledby":ie.range&&p(D)?(he=p(s))==null?void 0:he.labelId:void 0},[J("div",{ref_key:"slider",ref:l,class:V([p(i).e("runway"),{"show-input":ie.showInput&&!ie.range},p(i).is("disabled",p(d))]),style:vt(p(g)),onMousedown:p(x),onTouchstartPassive:p(x)},[J("div",{class:V(p(i).e("bar")),style:vt(p(m))},null,6),B(PB,{id:ie.range?void 0:p(A),ref_key:"firstButton",ref:u,"model-value":p(ne),vertical:ie.vertical,"tooltip-class":ie.tooltipClass,placement:ie.placement,role:"slider","aria-label":ie.range||!p(D)?p(I):void 0,"aria-labelledby":!ie.range&&p(D)?($e=p(s))==null?void 0:$e.labelId:void 0,"aria-valuemin":ie.min,"aria-valuemax":ie.range?p(_e):ie.max,"aria-valuenow":p(ne),"aria-valuetext":p(L),"aria-orientation":ie.vertical?"vertical":"horizontal","aria-disabled":p(d),"onUpdate:modelValue":p(C)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),ie.range?(R(),xe(PB,{key:0,ref_key:"secondButton",ref:c,"model-value":p(_e),vertical:ie.vertical,"tooltip-class":ie.tooltipClass,placement:ie.placement,role:"slider","aria-label":p(X),"aria-valuemin":p(ne),"aria-valuemax":ie.max,"aria-valuenow":p(_e),"aria-valuetext":p(Q),"aria-orientation":ie.vertical?"vertical":"horizontal","aria-disabled":p(d),"onUpdate:modelValue":p(E)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):Se("v-if",!0),ie.showStops?(R(),Y("div",{key:1},[(R(!0),Y(dt,null,Ht(p(T),(Me,q)=>(R(),Y("div",{key:q,class:V(p(i).e("stop")),style:vt(p(P)(Me))},null,6))),128))])):Se("v-if",!0),p(G).length>0?(R(),Y(dt,{key:2},[J("div",null,[(R(!0),Y(dt,null,Ht(p(G),(Me,q)=>(R(),Y("div",{key:q,style:vt(p(P)(Me.position)),class:V([p(i).e("stop"),p(i).e("marks-stop")])},null,6))),128))]),J("div",{class:V(p(i).e("marks"))},[(R(!0),Y(dt,null,Ht(p(G),(Me,q)=>(R(),xe(p(m4e),{key:q,mark:Me.mark,style:vt(p(P)(Me.position)),onMousedown:At(de=>p(S)(Me.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):Se("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),ie.showInput&&!ie.range?(R(),xe(p(oU),{key:0,ref:"input","model-value":p(ne),class:V(p(i).e("input")),step:ie.step,disabled:p(d),controls:ie.showInputControls,min:ie.min,max:ie.max,precision:p(K),debounce:ie.debounce,size:p(N),"onUpdate:modelValue":p(C),onChange:p(b)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):Se("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var S4e=Ye(x4e,[["__file","slider.vue"]]);const C4e=Vt(S4e),E4e=Ze({prefixCls:{type:String}}),AB=ue({name:"ElSpaceItem",props:E4e,setup(t,{slots:e}){const n=Qe("space"),r=M(()=>`${t.prefixCls||n.b()}__item`);return()=>Tt("div",{class:r.value},Ee(e,"default"))}}),MB={small:8,default:12,large:16};function T4e(t){const e=Qe("space"),n=M(()=>[e.b(),e.m(t.direction),t.class]),r=F(0),i=F(0),o=M(()=>{const s=t.wrap||t.fill?{flexWrap:"wrap"}:{},l={alignItems:t.alignment},u={rowGap:`${i.value}px`,columnGap:`${r.value}px`};return[s,l,u,t.style]}),a=M(()=>t.fill?{flexGrow:1,minWidth:`${t.fillRatio}%`}:{});return Bo(()=>{const{size:s="small",wrap:l,direction:u,fill:c}=t;if(Xe(s)){const[d=0,f=0]=s;r.value=d,i.value=f}else{let d;Et(s)?d=s:d=MB[s||"small"]||MB.small,(l||c)&&u==="horizontal"?r.value=i.value=d:u==="horizontal"?(r.value=d,i.value=0):(i.value=d,r.value=0)}}),{classes:n,containerStyle:o,itemStyle:a}}const k4e=Ze({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:we([String,Object,Array]),default:""},style:{type:we([String,Array,Object]),default:""},alignment:{type:we(String),default:"center"},prefixCls:{type:String},spacer:{type:we([Object,String,Number,Array]),default:null,validator:t=>Jr(t)||Et(t)||Ot(t)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:fc,validator:t=>Et(t)||Xe(t)&&t.length===2&&t.every(Et)}}),P4e=ue({name:"ElSpace",props:k4e,setup(t,{slots:e}){const{classes:n,containerStyle:r,itemStyle:i}=T4e(t);function o(a,s="",l=[]){const{prefixCls:u}=t;return a.forEach((c,d)=>{Ak(c)?Xe(c.children)&&c.children.forEach((f,h)=>{Ak(f)&&Xe(f.children)?o(f.children,`${s+h}-`,l):l.push(B(AB,{style:i.value,prefixCls:u,key:`nested-${s+h}`},{default:()=>[f]},Js.PROPS|Js.STYLE,["style","prefixCls"]))}):jPe(c)&&l.push(B(AB,{style:i.value,prefixCls:u,key:`LoopKey${s+d}`},{default:()=>[c]},Js.PROPS|Js.STYLE,["style","prefixCls"]))}),l}return()=>{var a;const{spacer:s,direction:l}=t,u=Ee(e,"default",{key:0},()=>[]);if(((a=u.children)!=null?a:[]).length===0)return null;if(Xe(u.children)){let c=o(u.children);if(s){const d=c.length-1;c=c.reduce((f,h,g)=>{const m=[...f,h];return g!==d&&m.push(B("span",{style:[i.value,l==="vertical"?"width: 100%":null],key:g},[Jr(s)?s:Ue(s,Js.TEXT)],Js.STYLE)),m},[])}return B("div",{class:n.value,style:r.value},c,Js.STYLE|Js.CLASS)}return u.children}}}),A4e=Vt(P4e),M4e=Ze({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:we([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:we([String,Object,Array])}}),R4e=ue({name:"ElStatistic"}),$4e=ue({...R4e,props:M4e,setup(t,{expose:e}){const n=t,r=Qe("statistic"),i=M(()=>{const{value:o,formatter:a,precision:s,decimalSeparator:l,groupSeparator:u}=n;if(St(a))return a(o);if(!Et(o)||Number.isNaN(o))return o;let[c,d=""]=String(o).split(".");return d=d.padEnd(s,"0").slice(0,s>0?s:0),c=c.replace(/\B(?=(\d{3})+(?!\d))/g,u),[c,d].join(d?l:"")});return e({displayValue:i}),(o,a)=>(R(),Y("div",{class:V(p(r).b())},[o.$slots.title||o.title?(R(),Y("div",{key:0,class:V(p(r).e("head"))},[Ee(o.$slots,"title",{},()=>[Ue(Ve(o.title),1)])],2)):Se("v-if",!0),J("div",{class:V(p(r).e("content"))},[o.$slots.prefix||o.prefix?(R(),Y("div",{key:0,class:V(p(r).e("prefix"))},[Ee(o.$slots,"prefix",{},()=>[J("span",null,Ve(o.prefix),1)])],2)):Se("v-if",!0),J("span",{class:V(p(r).e("number")),style:vt(o.valueStyle)},Ve(p(i)),7),o.$slots.suffix||o.suffix?(R(),Y("div",{key:1,class:V(p(r).e("suffix"))},[Ee(o.$slots,"suffix",{},()=>[J("span",null,Ve(o.suffix),1)])],2)):Se("v-if",!0)],2)],2))}});var N4e=Ye($4e,[["__file","statistic.vue"]]);const TU=Vt(N4e),D4e=Ze({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:we([Number,Object]),default:0},valueStyle:{type:we([String,Object,Array])}}),L4e={finish:()=>!0,[dr]:t=>Et(t)},I4e=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],RB=t=>Et(t)?new Date(t).getTime():t.valueOf(),$B=(t,e)=>{let n=t;const r=/\[([^\]]*)]/g;return I4e.reduce((o,[a,s])=>{const l=new RegExp(`${a}+(?![^\\[\\]]*\\])`,"g");if(l.test(o)){const u=Math.floor(n/s);return n-=u*s,o.replace(l,c=>String(u).padStart(c.length,"0"))}return o},e).replace(r,"$1")},B4e=ue({name:"ElCountdown"}),F4e=ue({...B4e,props:D4e,emits:L4e,setup(t,{expose:e,emit:n}){const r=t;let i;const o=F(0),a=M(()=>$B(o.value,r.format)),s=c=>$B(c,r.format),l=()=>{i&&(ip(i),i=void 0)},u=()=>{const c=RB(r.value),d=()=>{let f=c-Date.now();n("change",f),f<=0?(f=0,l(),n("finish")):i=bf(d),o.value=f};i=bf(d)};return Ft(()=>{o.value=RB(r.value)-Date.now(),Fe(()=>[r.value,r.format],()=>{l(),u()},{immediate:!0})}),pr(()=>{l()}),e({displayValue:a}),(c,d)=>(R(),xe(p(TU),{value:o.value,title:c.title,prefix:c.prefix,suffix:c.suffix,"value-style":c.valueStyle,formatter:s},es({_:2},[Ht(c.$slots,(f,h)=>({name:h,fn:j(()=>[Ee(c.$slots,h)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var V4e=Ye(F4e,[["__file","countdown.vue"]]);const j4e=Vt(V4e),Q4e=Ze({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),z4e={[dr]:(t,e)=>[t,e].every(Et)},W4e=ue({name:"ElSteps"}),H4e=ue({...W4e,props:Q4e,emits:z4e,setup(t,{emit:e}){const n=t,r=Qe("steps"),{children:i,addChild:o,removeChild:a}=A$(tn(),"ElStep");return Fe(i,()=>{i.value.forEach((s,l)=>{s.setIndex(l)})}),gn("ElSteps",{props:n,steps:i,addStep:o,removeStep:a}),Fe(()=>n.active,(s,l)=>{e(dr,s,l)}),(s,l)=>(R(),Y("div",{class:V([p(r).b(),p(r).m(s.simple?"simple":s.direction)])},[Ee(s.$slots,"default")],2))}});var U4e=Ye(H4e,[["__file","steps.vue"]]);const X4e=Ze({title:{type:String,default:""},icon:{type:fr},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),Z4e=ue({name:"ElStep"}),q4e=ue({...Z4e,props:X4e,setup(t){const e=t,n=Qe("step"),r=F(-1),i=F({}),o=F(""),a=ht("ElSteps"),s=tn();Ft(()=>{Fe([()=>a.props.active,()=>a.props.processStatus,()=>a.props.finishStatus],([C])=>{x(C)},{immediate:!0})}),pr(()=>{a.removeStep(S.uid)});const l=M(()=>e.status||o.value),u=M(()=>{const C=a.steps.value[r.value-1];return C?C.currentStatus:"wait"}),c=M(()=>a.props.alignCenter),d=M(()=>a.props.direction==="vertical"),f=M(()=>a.props.simple),h=M(()=>a.steps.value.length),g=M(()=>{var C;return((C=a.steps.value[h.value-1])==null?void 0:C.uid)===(s==null?void 0:s.uid)}),m=M(()=>f.value?"":a.props.space),y=M(()=>[n.b(),n.is(f.value?"simple":a.props.direction),n.is("flex",g.value&&!m.value&&!c.value),n.is("center",c.value&&!d.value&&!f.value)]),b=M(()=>{const C={flexBasis:Et(m.value)?`${m.value}px`:m.value?m.value:`${100/(h.value-(c.value?0:1))}%`};return d.value||g.value&&(C.maxWidth=`${100/h.value}%`),C}),w=C=>{r.value=C},O=C=>{const E=C==="wait",T={transitionDelay:`${E?"-":""}${150*r.value}ms`},P=C===a.props.processStatus||E?0:100;T.borderWidth=P&&!f.value?"1px":0,T[a.props.direction==="vertical"?"height":"width"]=`${P}%`,i.value=T},x=C=>{C>r.value?o.value=a.props.finishStatus:C===r.value&&u.value!=="error"?o.value=a.props.processStatus:o.value="wait";const E=a.steps.value[r.value-1];E&&E.calcProgress(o.value)},S=vn({uid:s.uid,currentStatus:l,setIndex:w,calcProgress:O});return a.addStep(S),(C,E)=>(R(),Y("div",{style:vt(p(b)),class:V(p(y))},[Se(" icon & line "),J("div",{class:V([p(n).e("head"),p(n).is(p(l))])},[p(f)?Se("v-if",!0):(R(),Y("div",{key:0,class:V(p(n).e("line"))},[J("i",{class:V(p(n).e("line-inner")),style:vt(i.value)},null,6)],2)),J("div",{class:V([p(n).e("icon"),p(n).is(C.icon||C.$slots.icon?"icon":"text")])},[Ee(C.$slots,"icon",{},()=>[C.icon?(R(),xe(p(mt),{key:0,class:V(p(n).e("icon-inner"))},{default:j(()=>[(R(),xe(on(C.icon)))]),_:1},8,["class"])):p(l)==="success"?(R(),xe(p(mt),{key:1,class:V([p(n).e("icon-inner"),p(n).is("status")])},{default:j(()=>[B(p(Eb))]),_:1},8,["class"])):p(l)==="error"?(R(),xe(p(mt),{key:2,class:V([p(n).e("icon-inner"),p(n).is("status")])},{default:j(()=>[B(p(Oa))]),_:1},8,["class"])):p(f)?Se("v-if",!0):(R(),Y("div",{key:3,class:V(p(n).e("icon-inner"))},Ve(r.value+1),3))])],2)],2),Se(" title & description "),J("div",{class:V(p(n).e("main"))},[J("div",{class:V([p(n).e("title"),p(n).is(p(l))])},[Ee(C.$slots,"title",{},()=>[Ue(Ve(C.title),1)])],2),p(f)?(R(),Y("div",{key:0,class:V(p(n).e("arrow"))},null,2)):(R(),Y("div",{key:1,class:V([p(n).e("description"),p(n).is(p(l))])},[Ee(C.$slots,"description",{},()=>[Ue(Ve(C.description),1)])],2))],2)],6))}});var kU=Ye(q4e,[["__file","item.vue"]]);const Y4e=Vt(U4e,{Step:kU}),G4e=ni(kU),PU=t=>["",...fc].includes(t),K4e=Ze({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:PU},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:fr},activeActionIcon:{type:fr},activeIcon:{type:fr},inactiveIcon:{type:fr},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:we(Function)},id:String,tabindex:{type:[String,Number]},...wo(["ariaLabel"])}),J4e={[Ut]:t=>wr(t)||Ot(t)||Et(t),[dr]:t=>wr(t)||Ot(t)||Et(t),[Fo]:t=>wr(t)||Ot(t)||Et(t)},AU="ElSwitch",e5e=ue({name:AU}),t5e=ue({...e5e,props:K4e,emits:J4e,setup(t,{expose:e,emit:n}){const r=t,{formItem:i}=Wo(),o=ki(),a=Qe("switch"),{inputId:s}=Tl(r,{formItemContext:i}),l=Ho(M(()=>r.loading)),u=F(r.modelValue!==!1),c=F(),d=F(),f=M(()=>[a.b(),a.m(o.value),a.is("disabled",l.value),a.is("checked",b.value)]),h=M(()=>[a.e("label"),a.em("label","left"),a.is("active",!b.value)]),g=M(()=>[a.e("label"),a.em("label","right"),a.is("active",b.value)]),m=M(()=>({width:pi(r.width)}));Fe(()=>r.modelValue,()=>{u.value=!0});const y=M(()=>u.value?r.modelValue:!1),b=M(()=>y.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(y.value)||(n(Ut,r.inactiveValue),n(dr,r.inactiveValue),n(Fo,r.inactiveValue)),Fe(b,S=>{var C;c.value.checked=S,r.validateEvent&&((C=i==null?void 0:i.validate)==null||C.call(i,"change").catch(E=>void 0))});const w=()=>{const S=b.value?r.inactiveValue:r.activeValue;n(Ut,S),n(dr,S),n(Fo,S),xt(()=>{c.value.checked=b.value})},O=()=>{if(l.value)return;const{beforeChange:S}=r;if(!S){w();return}const C=S();[t0(C),wr(C)].includes(!0)||Wi(AU,"beforeChange must return type `Promise<boolean>` or `boolean`"),t0(C)?C.then(T=>{T&&w()}).catch(T=>{}):C&&w()},x=()=>{var S,C;(C=(S=c.value)==null?void 0:S.focus)==null||C.call(S)};return Ft(()=>{c.value.checked=b.value}),e({focus:x,checked:b}),(S,C)=>(R(),Y("div",{class:V(p(f)),onClick:At(O,["prevent"])},[J("input",{id:p(s),ref_key:"input",ref:c,class:V(p(a).e("input")),type:"checkbox",role:"switch","aria-checked":p(b),"aria-disabled":p(l),"aria-label":S.ariaLabel,name:S.name,"true-value":S.activeValue,"false-value":S.inactiveValue,disabled:p(l),tabindex:S.tabindex,onChange:w,onKeydown:br(O,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!S.inlinePrompt&&(S.inactiveIcon||S.inactiveText)?(R(),Y("span",{key:0,class:V(p(h))},[S.inactiveIcon?(R(),xe(p(mt),{key:0},{default:j(()=>[(R(),xe(on(S.inactiveIcon)))]),_:1})):Se("v-if",!0),!S.inactiveIcon&&S.inactiveText?(R(),Y("span",{key:1,"aria-hidden":p(b)},Ve(S.inactiveText),9,["aria-hidden"])):Se("v-if",!0)],2)):Se("v-if",!0),J("span",{ref_key:"core",ref:d,class:V(p(a).e("core")),style:vt(p(m))},[S.inlinePrompt?(R(),Y("div",{key:0,class:V(p(a).e("inner"))},[S.activeIcon||S.inactiveIcon?(R(),xe(p(mt),{key:0,class:V(p(a).is("icon"))},{default:j(()=>[(R(),xe(on(p(b)?S.activeIcon:S.inactiveIcon)))]),_:1},8,["class"])):S.activeText||S.inactiveText?(R(),Y("span",{key:1,class:V(p(a).is("text")),"aria-hidden":!p(b)},Ve(p(b)?S.activeText:S.inactiveText),11,["aria-hidden"])):Se("v-if",!0)],2)):Se("v-if",!0),J("div",{class:V(p(a).e("action"))},[S.loading?(R(),xe(p(mt),{key:0,class:V(p(a).is("loading"))},{default:j(()=>[B(p(Ju))]),_:1},8,["class"])):p(b)?Ee(S.$slots,"active-action",{key:1},()=>[S.activeActionIcon?(R(),xe(p(mt),{key:0},{default:j(()=>[(R(),xe(on(S.activeActionIcon)))]),_:1})):Se("v-if",!0)]):p(b)?Se("v-if",!0):Ee(S.$slots,"inactive-action",{key:2},()=>[S.inactiveActionIcon?(R(),xe(p(mt),{key:0},{default:j(()=>[(R(),xe(on(S.inactiveActionIcon)))]),_:1})):Se("v-if",!0)])],2)],6),!S.inlinePrompt&&(S.activeIcon||S.activeText)?(R(),Y("span",{key:1,class:V(p(g))},[S.activeIcon?(R(),xe(p(mt),{key:0},{default:j(()=>[(R(),xe(on(S.activeIcon)))]),_:1})):Se("v-if",!0),!S.activeIcon&&S.activeText?(R(),Y("span",{key:1,"aria-hidden":!p(b)},Ve(S.activeText),9,["aria-hidden"])):Se("v-if",!0)],2)):Se("v-if",!0)],10,["onClick"]))}});var n5e=Ye(t5e,[["__file","switch.vue"]]);const Ym=Vt(n5e),IT=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},r5e=function(t,e,n,r,i){if(!e&&!r&&(!i||Xe(i)&&!i.length))return t;Ot(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=r?null:function(s,l){return i?(Xe(i)||(i=[i]),i.map(u=>Ot(u)?Kr(s,u):u(s,l,t))):(e!=="$key"&&Jt(s)&&"$value"in s&&(s=s.$value),[Jt(s)?Kr(s,e):s])},a=function(s,l){if(r)return r(s.value,l.value);for(let u=0,c=s.key.length;u<c;u++){if(s.key[u]<l.key[u])return-1;if(s.key[u]>l.key[u])return 1}return 0};return t.map((s,l)=>({value:s,index:l,key:o?o(s,l):null})).sort((s,l)=>{let u=a(s,l);return u||(u=s.index-l.index),u*+n}).map(s=>s.value)},MU=function(t,e){let n=null;return t.columns.forEach(r=>{r.id===e&&(n=r)}),n},i5e=function(t,e){let n=null;for(let r=0;r<t.columns.length;r++){const i=t.columns[r];if(i.columnKey===e){n=i;break}}return n||Wi("ElTable",`No column matching with column-key: ${e}`),n},NB=function(t,e,n){const r=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return r?MU(t,r[0]):null},na=(t,e)=>{if(!t)throw new Error("Row is required when get row identity");if(Ot(e)){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let r=t;for(const i of n)r=r[i];return`${r}`}else if(St(e))return e.call(null,t)},Dh=function(t,e){const n={};return(t||[]).forEach((r,i)=>{n[na(r,e)]={row:r,index:i}}),n};function o5e(t,e){const n={};let r;for(r in t)n[r]=t[r];for(r in e)if(Mn(e,r)){const i=e[r];typeof i!="undefined"&&(n[r]=i)}return n}function nN(t){return t===""||t!==void 0&&(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function RU(t){return t===""||t!==void 0&&(t=nN(t),Number.isNaN(t)&&(t=80)),t}function a5e(t){return Et(t)?t:Ot(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function s5e(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function Pw(t,e,n,r,i,o){let a=o!=null?o:0,s=!1;const l=t.indexOf(e),u=l!==-1,c=i==null?void 0:i.call(null,e,o),d=h=>{h==="add"?t.push(e):t.splice(l,1),s=!0},f=h=>{let g=0;const m=(r==null?void 0:r.children)&&h[r.children];return m&&Xe(m)&&(g+=m.length,m.forEach(y=>{g+=f(y)})),g};return(!i||c)&&(wr(n)?n&&!u?d("add"):!n&&u&&d("remove"):d(u?"remove":"add")),!(r!=null&&r.checkStrictly)&&(r==null?void 0:r.children)&&Xe(e[r.children])&&e[r.children].forEach(h=>{Pw(t,h,n!=null?n:!u,r,i,a+1),a+=f(h)+1}),s}function l5e(t,e,n="children",r="hasChildren"){const i=a=>!(Xe(a)&&a.length);function o(a,s,l){e(a,s,l),s.forEach(u=>{if(u[r]){e(u,null,l+1);return}const c=u[n];i(c)||o(u,c,l+1)})}t.forEach(a=>{if(a[r]){e(a,null,0);return}const s=a[n];i(s)||o(a,s,0)})}const DB=(t,e)=>({content:e,...t,popperOptions:{strategy:"fixed",...t.popperOptions}});let Ks=null;function u5e(t,e,n,r){if((Ks==null?void 0:Ks.trigger)===n){mf(Ks.vm.component.props,DB(t,e));return}Ks==null||Ks();const i=r==null?void 0:r.refs.tableWrapper,o=i==null?void 0:i.dataset.prefix,a=B(Hi,{virtualTriggering:!0,virtualRef:n,appendTo:i,placement:"top",transition:"none",offset:0,hideAfter:0,...DB(t,e)});a.appContext={...r.appContext,...r};const s=document.createElement("div");ff(a,s),a.component.exposed.onOpen();const l=i==null?void 0:i.querySelector(`.${o}-scrollbar__wrap`);Ks=()=>{ff(null,s),l==null||l.removeEventListener("scroll",Ks),Ks=null},Ks.trigger=n,Ks.vm=a,l==null||l.addEventListener("scroll",Ks)}function $U(t){return t.children?H9(t.children,$U):[t]}function LB(t,e){return t+e.colSpan}const NU=(t,e,n,r)=>{let i=0,o=t;const a=n.states.columns.value;if(r){const l=$U(r[t]);i=a.slice(0,a.indexOf(l[0])).reduce(LB,0),o=i+l.reduce(LB,0)-1}else i=t;let s;switch(e){case"left":o<n.states.fixedLeafColumnsLength.value&&(s="left");break;case"right":i>=a.length-n.states.rightFixedLeafColumnsLength.value&&(s="right");break;default:o<n.states.fixedLeafColumnsLength.value?s="left":i>=a.length-n.states.rightFixedLeafColumnsLength.value&&(s="right")}return s?{direction:s,start:i,after:o}:{}},rN=(t,e,n,r,i,o=0)=>{const a=[],{direction:s,start:l,after:u}=NU(e,n,r,i);if(s){const c=s==="left";a.push(`${t}-fixed-column--${s}`),c&&u+o===r.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):!c&&l-o===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&a.push("is-first-column")}return a};function IB(t,e){return t+(e.realWidth===null||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const iN=(t,e,n,r)=>{const{direction:i,start:o=0,after:a=0}=NU(t,e,n,r);if(!i)return;const s={},l=i==="left",u=n.states.columns.value;return l?s.left=u.slice(0,o).reduce(IB,0):s.right=u.slice(a+1).reverse().reduce(IB,0),s},im=(t,e)=>{!t||Number.isNaN(t[e])||(t[e]=`${t[e]}px`)};function c5e(t){const e=tn(),n=F(!1),r=F([]);return{updateExpandRows:()=>{const l=t.data.value||[],u=t.rowKey.value;if(n.value)r.value=l.slice();else if(u){const c=Dh(r.value,u);r.value=l.reduce((d,f)=>{const h=na(f,u);return c[h]&&d.push(f),d},[])}else r.value=[]},toggleRowExpansion:(l,u)=>{Pw(r.value,l,u)&&e.emit("expand-change",l,r.value.slice())},setExpandRowKeys:l=>{e.store.assertRowKey();const u=t.data.value||[],c=t.rowKey.value,d=Dh(u,c);r.value=l.reduce((f,h)=>{const g=d[h];return g&&f.push(g.row),f},[])},isRowExpanded:l=>{const u=t.rowKey.value;return u?!!Dh(r.value,u)[na(l,u)]:r.value.includes(l)},states:{expandRows:r,defaultExpandAll:n}}}function d5e(t){const e=tn(),n=F(null),r=F(null),i=u=>{e.store.assertRowKey(),n.value=u,a(u)},o=()=>{n.value=null},a=u=>{const{data:c,rowKey:d}=t;let f=null;d.value&&(f=(p(c)||[]).find(h=>na(h,d.value)===u)),r.value=f,e.emit("current-change",r.value,null)};return{setCurrentRowKey:i,restoreCurrentRowKey:o,setCurrentRowByKey:a,updateCurrentRow:u=>{const c=r.value;if(u&&u!==c){r.value=u,e.emit("current-change",r.value,c);return}!u&&c&&(r.value=null,e.emit("current-change",null,c))},updateCurrentRowData:()=>{const u=t.rowKey.value,c=t.data.value||[],d=r.value;if(!c.includes(d)&&d){if(u){const f=na(d,u);a(f)}else r.value=null;r.value===null&&e.emit("current-change",null,d)}else n.value&&(a(n.value),o())},states:{_currentRowKey:n,currentRow:r}}}function f5e(t){const e=F([]),n=F({}),r=F(16),i=F(!1),o=F({}),a=F("hasChildren"),s=F("children"),l=F(!1),u=tn(),c=M(()=>{if(!t.rowKey.value)return{};const O=t.data.value||[];return f(O)}),d=M(()=>{const O=t.rowKey.value,x=Object.keys(o.value),S={};return x.length&&x.forEach(C=>{if(o.value[C].length){const E={children:[]};o.value[C].forEach(T=>{const P=na(T,O);E.children.push(P),T[a.value]&&!S[P]&&(S[P]={children:[]})}),S[C]=E}}),S}),f=O=>{const x=t.rowKey.value,S={};return l5e(O,(C,E,T)=>{const P=na(C,x);Xe(E)?S[P]={children:E.map(A=>na(A,x)),level:T}:i.value&&(S[P]={children:[],lazy:!0,level:T})},s.value,a.value),S},h=(O=!1,x=(S=>(S=u.store)==null?void 0:S.states.defaultExpandAll.value)())=>{var S;const C=c.value,E=d.value,T=Object.keys(C),P={};if(T.length){const A=p(n),D=[],$=(z,I)=>{if(O)return e.value?x||e.value.includes(I):!!(x||(z==null?void 0:z.expanded));{const L=x||e.value&&e.value.includes(I);return!!((z==null?void 0:z.expanded)||L)}};T.forEach(z=>{const I=A[z],L={...C[z]};if(L.expanded=$(I,z),L.lazy){const{loaded:X=!1,loading:Q=!1}=I||{};L.loaded=!!X,L.loading=!!Q,D.push(z)}P[z]=L});const N=Object.keys(E);i.value&&N.length&&D.length&&N.forEach(z=>{const I=A[z],L=E[z].children;if(D.includes(z)){if(P[z].children.length!==0)throw new Error("[ElTable]children must be an empty array.");P[z].children=L}else{const{loaded:X=!1,loading:Q=!1}=I||{};P[z]={lazy:!0,loaded:!!X,loading:!!Q,expanded:$(I,z),children:L,level:""}}})}n.value=P,(S=u.store)==null||S.updateTableScrollY()};Fe(()=>e.value,()=>{h(!0)}),Fe(()=>c.value,()=>{h()}),Fe(()=>d.value,()=>{h()});const g=O=>{e.value=O,h()},m=(O,x)=>{u.store.assertRowKey();const S=t.rowKey.value,C=na(O,S),E=C&&n.value[C];if(C&&E&&"expanded"in E){const T=E.expanded;x=ar(x)?!E.expanded:x,n.value[C].expanded=x,T!==x&&u.emit("expand-change",O,x),u.store.updateTableScrollY()}},y=O=>{u.store.assertRowKey();const x=t.rowKey.value,S=na(O,x),C=n.value[S];i.value&&C&&"loaded"in C&&!C.loaded?b(O,S,C):m(O,void 0)},b=(O,x,S)=>{const{load:C}=u.props;C&&!n.value[x].loaded&&(n.value[x].loading=!0,C(O,S,E=>{if(!Xe(E))throw new TypeError("[ElTable] data must be an array");n.value[x].loading=!1,n.value[x].loaded=!0,n.value[x].expanded=!0,E.length&&(o.value[x]=E),u.emit("expand-change",O,!0)}))};return{loadData:b,loadOrToggle:y,toggleTreeExpansion:m,updateTreeExpandKeys:g,updateTreeData:h,updateKeyChildren:(O,x)=>{const{lazy:S,rowKey:C}=u.props;if(!!S){if(!C)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[O]&&(o.value[O]=x)}},normalize:f,states:{expandRowKeys:e,treeData:n,indent:r,lazy:i,lazyTreeNodeMap:o,lazyColumnIdentifier:a,childrenColumnName:s,checkStrictly:l}}}const h5e=(t,e)=>{const n=e.sortingColumn;return!n||Ot(n.sortable)?t:r5e(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},T1=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,T1(n.children)):e.push(n)}),e};function p5e(){var t;const e=tn(),{size:n}=Mi((t=e.proxy)==null?void 0:t.$props),r=F(null),i=F([]),o=F([]),a=F(!1),s=F([]),l=F([]),u=F([]),c=F([]),d=F([]),f=F([]),h=F([]),g=F([]),m=[],y=F(0),b=F(0),w=F(0),O=F(!1),x=F([]),S=F(!1),C=F(!1),E=F(null),T=F({}),P=F(null),A=F(null),D=F(null),$=F(null),N=F(null);Fe(i,()=>{var Pe;e.state&&(Q(!1),e.props.tableLayout==="auto"&&((Pe=e.refs.tableHeaderRef)==null||Pe.updateFixedColumnStyle()))},{deep:!0});const z=()=>{if(!r.value)throw new Error("[ElTable] prop row-key is required")},I=Pe=>{var nt;(nt=Pe.children)==null||nt.forEach(fe=>{fe.fixed=Pe.fixed,I(fe)})};let L;const X=()=>{s.value.forEach(ce=>{I(ce)}),c.value=s.value.filter(ce=>ce.fixed===!0||ce.fixed==="left"),d.value=s.value.filter(ce=>ce.fixed==="right"),ar(L)&&s.value[0]&&s.value[0].type==="selection"&&(L=Boolean(s.value[0].fixed)),c.value.length>0&&s.value[0]&&s.value[0].type==="selection"&&(s.value[0].fixed?c.value.some(qe=>qe.type!=="selection")?L=void 0:(s.value[0].fixed=L,L||c.value.shift()):(s.value[0].fixed=!0,c.value.unshift(s.value[0])));const Pe=s.value.filter(ce=>!ce.fixed);l.value=[].concat(c.value).concat(Pe).concat(d.value);const nt=T1(Pe),fe=T1(c.value),De=T1(d.value);y.value=nt.length,b.value=fe.length,w.value=De.length,u.value=[].concat(fe).concat(nt).concat(De),a.value=c.value.length>0||d.value.length>0},Q=(Pe,nt=!1)=>{Pe&&X(),nt?e.state.doLayout():e.state.debouncedUpdateLayout()},W=Pe=>x.value.some(nt=>Qi(nt,Pe)),G=()=>{O.value=!1;const Pe=x.value;x.value=[],Pe.length&&e.emit("selection-change",[])},K=()=>{let Pe;if(r.value){Pe=[];const nt=Dh(x.value,r.value),fe=Dh(i.value,r.value);for(const De in nt)Mn(nt,De)&&!fe[De]&&Pe.push(nt[De].row)}else Pe=x.value.filter(nt=>!i.value.includes(nt));if(Pe.length){const nt=x.value.filter(fe=>!Pe.includes(fe));x.value=nt,e.emit("selection-change",nt.slice())}},oe=()=>(x.value||[]).slice(),ne=(Pe,nt,fe=!0,De=!1)=>{var ce,qe,Mt,Zt;const Sn={children:(qe=(ce=e==null?void 0:e.store)==null?void 0:ce.states)==null?void 0:qe.childrenColumnName.value,checkStrictly:(Zt=(Mt=e==null?void 0:e.store)==null?void 0:Mt.states)==null?void 0:Zt.checkStrictly.value};if(Pw(x.value,Pe,nt,Sn,De?void 0:E.value)){const zn=(x.value||[]).slice();fe&&e.emit("select",zn,Pe),e.emit("selection-change",zn)}},_e=()=>{var Pe,nt;const fe=C.value?!O.value:!(O.value||x.value.length);O.value=fe;let De=!1,ce=0;const qe=(nt=(Pe=e==null?void 0:e.store)==null?void 0:Pe.states)==null?void 0:nt.rowKey.value,{childrenColumnName:Mt}=e.store.states,Zt={children:Mt.value,checkStrictly:!1};i.value.forEach((Sn,kr)=>{const zn=kr+ce;Pw(x.value,Sn,fe,Zt,E.value,zn)&&(De=!0),ce+=ie(na(Sn,qe))}),De&&e.emit("selection-change",x.value?x.value.slice():[]),e.emit("select-all",(x.value||[]).slice())},Ce=()=>{const Pe=Dh(x.value,r.value);i.value.forEach(nt=>{const fe=na(nt,r.value),De=Pe[fe];De&&(x.value[De.index]=nt)})},U=()=>{var Pe;if(((Pe=i.value)==null?void 0:Pe.length)===0){O.value=!1;return}const{childrenColumnName:nt}=e.store.states,fe=r.value?Dh(x.value,r.value):void 0;let De=0,ce=0;const qe=Sn=>fe?!!fe[na(Sn,r.value)]:x.value.includes(Sn),Mt=Sn=>{var kr;for(const zn of Sn){const Ln=E.value&&E.value.call(null,zn,De);if(qe(zn))ce++;else if(!E.value||Ln)return!1;if(De++,((kr=zn[nt.value])==null?void 0:kr.length)&&!Mt(zn[nt.value]))return!1}return!0},Zt=Mt(i.value||[]);O.value=ce===0?!1:Zt},ie=Pe=>{var nt;if(!e||!e.store)return 0;const{treeData:fe}=e.store.states;let De=0;const ce=(nt=fe.value[Pe])==null?void 0:nt.children;return ce&&(De+=ce.length,ce.forEach(qe=>{De+=ie(qe)})),De},ee=(Pe,nt)=>{Xe(Pe)||(Pe=[Pe]);const fe={};return Pe.forEach(De=>{T.value[De.id]=nt,fe[De.columnKey||De.id]=nt}),fe},he=(Pe,nt,fe)=>{A.value&&A.value!==Pe&&(A.value.order=null),A.value=Pe,D.value=nt,$.value=fe},$e=()=>{let Pe=p(o);Object.keys(T.value).forEach(nt=>{const fe=T.value[nt];if(!fe||fe.length===0)return;const De=MU({columns:u.value},nt);De&&De.filterMethod&&(Pe=Pe.filter(ce=>fe.some(qe=>De.filterMethod.call(null,qe,ce,De))))}),P.value=Pe},Me=()=>{i.value=h5e(P.value,{sortingColumn:A.value,sortProp:D.value,sortOrder:$.value})},q=(Pe=void 0)=>{Pe&&Pe.filter||$e(),Me()},de=Pe=>{const{tableHeaderRef:nt}=e.refs;if(!nt)return;const fe=Object.assign({},nt.filterPanels),De=Object.keys(fe);if(!!De.length)if(Ot(Pe)&&(Pe=[Pe]),Xe(Pe)){const ce=Pe.map(qe=>i5e({columns:u.value},qe));De.forEach(qe=>{const Mt=ce.find(Zt=>Zt.id===qe);Mt&&(Mt.filteredValue=[])}),e.store.commit("filterChange",{column:ce,values:[],silent:!0,multi:!0})}else De.forEach(ce=>{const qe=u.value.find(Mt=>Mt.id===ce);qe&&(qe.filteredValue=[])}),T.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},ke=()=>{!A.value||(he(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:Ie,toggleRowExpansion:se,updateExpandRows:ye,states:Ae,isRowExpanded:Z}=c5e({data:i,rowKey:r}),{updateTreeExpandKeys:te,toggleTreeExpansion:le,updateTreeData:Te,updateKeyChildren:pe,loadOrToggle:Oe,states:Re}=f5e({data:i,rowKey:r}),{updateCurrentRowData:je,updateCurrentRow:Ke,setCurrentRowKey:Je,states:at}=d5e({data:i,rowKey:r});return{assertRowKey:z,updateColumns:X,scheduleLayout:Q,isSelected:W,clearSelection:G,cleanSelection:K,getSelectionRows:oe,toggleRowSelection:ne,_toggleAllSelection:_e,toggleAllSelection:null,updateSelectionByRowKey:Ce,updateAllSelected:U,updateFilters:ee,updateCurrentRow:Ke,updateSort:he,execFilter:$e,execSort:Me,execQuery:q,clearFilter:de,clearSort:ke,toggleRowExpansion:se,setExpandRowKeysAdapter:Pe=>{Ie(Pe),te(Pe)},setCurrentRowKey:Je,toggleRowExpansionAdapter:(Pe,nt)=>{u.value.some(({type:De})=>De==="expand")?se(Pe,nt):le(Pe,nt)},isRowExpanded:Z,updateExpandRows:ye,updateCurrentRowData:je,loadOrToggle:Oe,updateTreeData:Te,updateKeyChildren:pe,states:{tableSize:n,rowKey:r,data:i,_data:o,isComplex:a,_columns:s,originColumns:l,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:h,rightFixedLeafColumns:g,updateOrderFns:m,leafColumnsLength:y,fixedLeafColumnsLength:b,rightFixedLeafColumnsLength:w,isAllSelected:O,selection:x,reserveSelection:S,selectOnIndeterminate:C,selectable:E,filters:T,filteredData:P,sortingColumn:A,sortProp:D,sortOrder:$,hoverRow:N,...Ae,...Re,...at}}}function Kk(t,e){return t.map(n=>{var r;return n.id===e.id?e:((r=n.children)!=null&&r.length&&(n.children=Kk(n.children,e)),n)})}function Jk(t){t.forEach(e=>{var n,r;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(r=e.children)!=null&&r.length&&Jk(e.children)}),t.sort((e,n)=>e.no-n.no)}function g5e(){const t=tn(),e=p5e();return{ns:Qe("table"),...e,mutations:{setData(a,s){const l=p(a._data)!==s;a.data.value=s,a._data.value=s,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),p(a.reserveSelection)?(t.store.assertRowKey(),t.store.updateSelectionByRowKey()):l?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(a,s,l,u){const c=p(a._columns);let d=[];l?(l&&!l.children&&(l.children=[]),l.children.push(s),d=Kk(c,l)):(c.push(s),d=c),Jk(d),a._columns.value=d,a.updateOrderFns.push(u),s.type==="selection"&&(a.selectable.value=s.selectable,a.reserveSelection.value=s.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(a,s){var l;((l=s.getColumnIndex)==null?void 0:l.call(s))!==s.no&&(Jk(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,s,l,u){const c=p(a._columns)||[];if(l)l.children.splice(l.children.findIndex(f=>f.id===s.id),1),xt(()=>{var f;((f=l.children)==null?void 0:f.length)===0&&delete l.children}),a._columns.value=Kk(c,l);else{const f=c.indexOf(s);f>-1&&(c.splice(f,1),a._columns.value=c)}const d=a.updateOrderFns.indexOf(u);d>-1&&a.updateOrderFns.splice(d,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(a,s){const{prop:l,order:u,init:c}=s;if(l){const d=p(a.columns).find(f=>f.property===l);d&&(d.order=u,t.store.updateSort(d,l,u),t.store.commit("changeSortCondition",{init:c}))}},changeSortCondition(a,s){const{sortingColumn:l,sortProp:u,sortOrder:c}=a,d=p(l),f=p(u),h=p(c);h===null&&(a.sortingColumn.value=null,a.sortProp.value=null);const g={filter:!0};t.store.execQuery(g),(!s||!(s.silent||s.init))&&t.emit("sort-change",{column:d,prop:f,order:h}),t.store.updateTableScrollY()},filterChange(a,s){const{column:l,values:u,silent:c}=s,d=t.store.updateFilters(l,u);t.store.execQuery(),c||t.emit("filter-change",d),t.store.updateTableScrollY()},toggleAllSelection(){t.store.toggleAllSelection()},rowSelectedChanged(a,s){t.store.toggleRowSelection(s),t.store.updateAllSelected()},setHoverRow(a,s){a.hoverRow.value=s},setCurrentRow(a,s){t.store.updateCurrentRow(s)}},commit:function(a,...s){const l=t.store.mutations;if(l[a])l[a].apply(t,[t.store.states].concat(s));else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){xt(()=>t.layout.updateScrollY.apply(t.layout))}}}const Py={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data",["treeProps.hasChildren"]:{key:"lazyColumnIdentifier",default:"hasChildren"},["treeProps.children"]:{key:"childrenColumnName",default:"children"},["treeProps.checkStrictly"]:{key:"checkStrictly",default:!1}};function m5e(t,e){if(!t)throw new Error("Table is required.");const n=g5e();return n.toggleAllSelection=Qo(n._toggleAllSelection,10),Object.keys(Py).forEach(r=>{DU(LU(e,r),r,n)}),v5e(n,e),n}function v5e(t,e){Object.keys(Py).forEach(n=>{Fe(()=>LU(e,n),r=>{DU(r,n,t)})})}function DU(t,e,n){let r=t,i=Py[e];typeof Py[e]=="object"&&(i=i.key,r=r||Py[e].default),n.states[i].value=r}function LU(t,e){if(e.includes(".")){const n=e.split(".");let r=t;return n.forEach(i=>{r=r[i]}),r}else return t[e]}class y5e{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=F(null),this.scrollX=F(!1),this.scrollY=F(!1),this.bodyWidth=F(null),this.fixedWidth=F(null),this.rightFixedWidth=F(null),this.gutterWidth=0;for(const n in e)Mn(e,n)&&(Tr(this[n])?this[n].value=e[n]:this[n]=e[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n==null?void 0:n.wrapRef)){let r=!0;const i=this.scrollY.value;return r=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=r,i!==r}return!1}setHeight(e,n="height"){if(!wn)return;const r=this.table.vnode.el;if(e=a5e(e),this.height.value=Number(e),!r&&(e||e===0))return xt(()=>this.setHeight(e,n));Et(e)?(r.style[n]=`${e}px`,this.updateElsHeight()):Ot(e)&&(r.style[n]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(r=>{r.isColumnGroup?e.push.apply(e,r.columns):e.push(r)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let n=e;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!wn)return;const e=this.fit,n=this.table.vnode.el.clientWidth;let r=0;const i=this.getFlattenColumns(),o=i.filter(l=>!Et(l.width));if(i.forEach(l=>{Et(l.width)&&l.realWidth&&(l.realWidth=null)}),o.length>0&&e){if(i.forEach(l=>{r+=Number(l.width||l.minWidth||80)}),r<=n){this.scrollX.value=!1;const l=n-r;if(o.length===1)o[0].realWidth=Number(o[0].minWidth||80)+l;else{const u=o.reduce((f,h)=>f+Number(h.minWidth||80),0),c=l/u;let d=0;o.forEach((f,h)=>{if(h===0)return;const g=Math.floor(Number(f.minWidth||80)*c);d+=g,f.realWidth=Number(f.minWidth||80)+g}),o[0].realWidth=Number(o[0].minWidth||80)+l-d}}else this.scrollX.value=!0,o.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(r,n),this.table.state.resizeState.value.width=this.bodyWidth.value}else i.forEach(l=>{!l.width&&!l.minWidth?l.realWidth=80:l.realWidth=Number(l.width||l.minWidth),r+=l.realWidth}),this.scrollX.value=r>n,this.bodyWidth.value=r;const a=this.store.states.fixedColumns.value;if(a.length>0){let l=0;a.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.fixedWidth.value=l}const s=this.store.states.rightFixedColumns.value;if(s.length>0){let l=0;s.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=l}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&this.observers.splice(n,1)}notifyObservers(e){this.observers.forEach(r=>{var i,o;switch(e){case"columns":(i=r.state)==null||i.onColumnsChange(this);break;case"scrollable":(o=r.state)==null||o.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}}const{CheckboxGroup:b5e}=Bs,_5e=ue({name:"ElTableFilterPanel",components:{ElCheckbox:Bs,ElCheckboxGroup:b5e,ElScrollbar:gu,ElTooltip:Hi,ElIcon:mt,ArrowDown:hd,ArrowUp:a$},directives:{ClickOutside:Kc},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:{type:String}},setup(t){const e=tn(),{t:n}=xn(),r=Qe("table-filter"),i=e==null?void 0:e.parent;i.filterPanels.value[t.column.id]||(i.filterPanels.value[t.column.id]=e);const o=F(!1),a=F(null),s=M(()=>t.column&&t.column.filters),l=M(()=>t.column.filterClassName?`${r.b()} ${t.column.filterClassName}`:r.b()),u=M({get:()=>{var S;return(((S=t.column)==null?void 0:S.filteredValue)||[])[0]},set:S=>{c.value&&(typeof S!="undefined"&&S!==null?c.value.splice(0,1,S):c.value.splice(0,1))}}),c=M({get(){return t.column?t.column.filteredValue||[]:[]},set(S){t.column&&t.upDataColumn("filteredValue",S)}}),d=M(()=>t.column?t.column.filterMultiple:!0),f=S=>S.value===u.value,h=()=>{o.value=!1},g=S=>{S.stopPropagation(),o.value=!o.value},m=()=>{o.value=!1},y=()=>{O(c.value),h()},b=()=>{c.value=[],O(c.value),h()},w=S=>{u.value=S,O(typeof S!="undefined"&&S!==null?c.value:[]),h()},O=S=>{t.store.commit("filterChange",{column:t.column,values:S}),t.store.updateAllSelected()};Fe(o,S=>{t.column&&t.upDataColumn("filterOpened",S)},{immediate:!0});const x=M(()=>{var S,C;return(C=(S=a.value)==null?void 0:S.popperRef)==null?void 0:C.contentRef});return{tooltipVisible:o,multiple:d,filterClassName:l,filteredValue:c,filterValue:u,filters:s,handleConfirm:y,handleReset:b,handleSelect:w,isActive:f,t:n,ns:r,showFilterPanel:g,hideFilterPanel:m,popperPaneRef:x,tooltip:a}}});function O5e(t,e,n,r,i,o){const a=rn("el-checkbox"),s=rn("el-checkbox-group"),l=rn("el-scrollbar"),u=rn("arrow-up"),c=rn("arrow-down"),d=rn("el-icon"),f=rn("el-tooltip"),h=pS("click-outside");return R(),xe(f,{ref:"tooltip",visible:t.tooltipVisible,offset:0,placement:t.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":t.filterClassName,persistent:"","append-to":t.appendTo},{content:j(()=>[t.multiple?(R(),Y("div",{key:0},[J("div",{class:V(t.ns.e("content"))},[B(l,{"wrap-class":t.ns.e("wrap")},{default:j(()=>[B(s,{modelValue:t.filteredValue,"onUpdate:modelValue":g=>t.filteredValue=g,class:V(t.ns.e("checkbox-group"))},{default:j(()=>[(R(!0),Y(dt,null,Ht(t.filters,g=>(R(),xe(a,{key:g.value,value:g.value},{default:j(()=>[Ue(Ve(g.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"])]),_:1},8,["wrap-class"])],2),J("div",{class:V(t.ns.e("bottom"))},[J("button",{class:V({[t.ns.is("disabled")]:t.filteredValue.length===0}),disabled:t.filteredValue.length===0,type:"button",onClick:t.handleConfirm},Ve(t.t("el.table.confirmFilter")),11,["disabled","onClick"]),J("button",{type:"button",onClick:t.handleReset},Ve(t.t("el.table.resetFilter")),9,["onClick"])],2)])):(R(),Y("ul",{key:1,class:V(t.ns.e("list"))},[J("li",{class:V([t.ns.e("list-item"),{[t.ns.is("active")]:t.filterValue===void 0||t.filterValue===null}]),onClick:g=>t.handleSelect(null)},Ve(t.t("el.table.clearFilter")),11,["onClick"]),(R(!0),Y(dt,null,Ht(t.filters,g=>(R(),Y("li",{key:g.value,class:V([t.ns.e("list-item"),t.ns.is("active",t.isActive(g))]),label:g.value,onClick:m=>t.handleSelect(g.value)},Ve(g.text),11,["label","onClick"]))),128))],2))]),default:j(()=>[zt((R(),Y("span",{class:V([`${t.ns.namespace.value}-table__column-filter-trigger`,`${t.ns.namespace.value}-none-outline`]),onClick:t.showFilterPanel},[B(d,null,{default:j(()=>[Ee(t.$slots,"filter-icon",{},()=>[t.column.filterOpened?(R(),xe(u,{key:0})):(R(),xe(c,{key:1}))])]),_:3})],10,["onClick"])),[[h,t.hideFilterPanel,t.popperPaneRef]])]),_:3},8,["visible","placement","popper-class","append-to"])}var w5e=Ye(_5e,[["render",O5e],["__file","filter-panel.vue"]]);function IU(t){const e=tn();hS(()=>{n.value.addObserver(e)}),Ft(()=>{r(n.value),i(n.value)}),ac(()=>{r(n.value),i(n.value)}),od(()=>{n.value.removeObserver(e)});const n=M(()=>{const o=t.layout;if(!o)throw new Error("Can not find table layout.");return o}),r=o=>{var a;const s=((a=t.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const l=o.getFlattenColumns(),u={};l.forEach(c=>{u[c.id]=c});for(let c=0,d=s.length;c<d;c++){const f=s[c],h=f.getAttribute("name"),g=u[h];g&&f.setAttribute("width",g.realWidth||g.width)}},i=o=>{var a,s;const l=((a=t.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,d=l.length;c<d;c++)l[c].setAttribute("width",o.scrollY.value?o.gutterWidth:"0");const u=((s=t.vnode.el)==null?void 0:s.querySelectorAll("th.gutter"))||[];for(let c=0,d=u.length;c<d;c++){const f=u[c];f.style.width=o.scrollY.value?`${o.gutterWidth}px`:"0",f.style.display=o.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:r,onScrollableChange:i}}const hc=Symbol("ElTable");function x5e(t,e){const n=tn(),r=ht(hc),i=m=>{m.stopPropagation()},o=(m,y)=>{!y.filters&&y.sortable?g(m,y,!1):y.filterable&&!y.sortable&&i(m),r==null||r.emit("header-click",y,m)},a=(m,y)=>{r==null||r.emit("header-contextmenu",y,m)},s=F(null),l=F(!1),u=F({}),c=(m,y)=>{if(!!wn&&!(y.children&&y.children.length>0)&&s.value&&t.border){l.value=!0;const b=r;e("set-drag-visible",!0);const O=(b==null?void 0:b.vnode.el).getBoundingClientRect().left,x=n.vnode.el.querySelector(`th.${y.id}`),S=x.getBoundingClientRect(),C=S.left-O+30;il(x,"noclick"),u.value={startMouseLeft:m.clientX,startLeft:S.right-O,startColumnLeft:S.left-O,tableLeft:O};const E=b==null?void 0:b.refs.resizeProxy;E.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const T=A=>{const D=A.clientX-u.value.startMouseLeft,$=u.value.startLeft+D;E.style.left=`${Math.max(C,$)}px`},P=()=>{if(l.value){const{startColumnLeft:A,startLeft:D}=u.value,N=Number.parseInt(E.style.left,10)-A;y.width=y.realWidth=N,b==null||b.emit("header-dragend",y.width,D-A,y,m),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,s.value=null,u.value={},e("set-drag-visible",!1)}document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{sa(x,"noclick")},0)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",P)}},d=(m,y)=>{var b;if(y.children&&y.children.length>0)return;const w=m.target;if(!As(w))return;const O=w==null?void 0:w.closest("th");if(!(!y||!y.resizable||!O)&&!l.value&&t.border){const x=O.getBoundingClientRect(),S=document.body.style,C=((b=O.parentNode)==null?void 0:b.lastElementChild)===O;x.width>12&&x.right-m.pageX<8&&!C?(S.cursor="col-resize",Ha(O,"is-sortable")&&(O.style.cursor="col-resize"),s.value=y):l.value||(S.cursor="",Ha(O,"is-sortable")&&(O.style.cursor="pointer"),s.value=null)}},f=()=>{!wn||(document.body.style.cursor="")},h=({order:m,sortOrders:y})=>{if(m==="")return y[0];const b=y.indexOf(m||null);return y[b>y.length-2?0:b+1]},g=(m,y,b)=>{var w;m.stopPropagation();const O=y.order===b?null:b||h(y),x=(w=m.target)==null?void 0:w.closest("th");if(x&&Ha(x,"noclick")){sa(x,"noclick");return}if(!y.sortable)return;const S=m.currentTarget;if(["ascending","descending"].some(A=>Ha(S,A)&&!y.sortOrders.includes(A)))return;const C=t.store.states;let E=C.sortProp.value,T;const P=C.sortingColumn.value;(P!==y||P===y&&P.order===null)&&(P&&(P.order=null),C.sortingColumn.value=y,E=y.property),O?T=y.order=O:T=y.order=null,C.sortProp.value=E,C.sortOrder.value=T,r==null||r.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:a,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:g,handleFilterClick:i}}function S5e(t){const e=ht(hc),n=Qe("table");return{getHeaderRowStyle:s=>{const l=e==null?void 0:e.props.headerRowStyle;return St(l)?l.call(null,{rowIndex:s}):l},getHeaderRowClass:s=>{const l=[],u=e==null?void 0:e.props.headerRowClassName;return Ot(u)?l.push(u):St(u)&&l.push(u.call(null,{rowIndex:s})),l.join(" ")},getHeaderCellStyle:(s,l,u,c)=>{var d;let f=(d=e==null?void 0:e.props.headerCellStyle)!=null?d:{};St(f)&&(f=f.call(null,{rowIndex:s,columnIndex:l,row:u,column:c}));const h=iN(l,c.fixed,t.store,u);return im(h,"left"),im(h,"right"),Object.assign({},f,h)},getHeaderCellClass:(s,l,u,c)=>{const d=rN(n.b(),l,c.fixed,t.store,u),f=[c.id,c.order,c.headerAlign,c.className,c.labelClassName,...d];c.children||f.push("is-leaf"),c.sortable&&f.push("is-sortable");const h=e==null?void 0:e.props.headerCellClassName;return Ot(h)?f.push(h):St(h)&&f.push(h.call(null,{rowIndex:s,columnIndex:l,row:u,column:c})),f.push(n.e("cell")),f.filter(g=>Boolean(g)).join(" ")}}}const BU=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,BU(n.children))):e.push(n)}),e},FU=t=>{let e=1;const n=(o,a)=>{if(a&&(o.level=a.level+1,e<o.level&&(e=o.level)),o.children){let s=0;o.children.forEach(l=>{n(l,o),s+=l.colSpan}),o.colSpan=s}else o.colSpan=1};t.forEach(o=>{o.level=1,n(o,void 0)});const r=[];for(let o=0;o<e;o++)r.push([]);return BU(t).forEach(o=>{o.children?(o.rowSpan=1,o.children.forEach(a=>a.isSubColumn=!0)):o.rowSpan=e-o.level+1,r[o.level-1].push(o)}),r};function C5e(t){const e=ht(hc),n=M(()=>FU(t.store.states.originColumns.value));return{isGroup:M(()=>{const o=n.value.length>1;return o&&e&&(e.state.isGroup.value=!0),o}),toggleAllSelection:o=>{o.stopPropagation(),e==null||e.store.commit("toggleAllSelection")},columnRows:n}}var E5e=ue({name:"ElTableHeader",components:{ElCheckbox:Bs},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String}},setup(t,{emit:e}){const n=tn(),r=ht(hc),i=Qe("table"),o=F({}),{onColumnsChange:a,onScrollableChange:s}=IU(r),l=(r==null?void 0:r.props.tableLayout)==="auto",u=vn(new Map),c=F(),d=()=>{setTimeout(()=>{u.size>0&&(u.forEach((A,D)=>{const $=c.value.querySelector(`.${D.replace(/\s/g,".")}`);if($){const N=$.getBoundingClientRect().width;A.width=N}}),u.clear())})};Fe(u,d),Ft(async()=>{await xt(),await xt();const{prop:A,order:D}=t.defaultSort;r==null||r.store.commit("sort",{prop:A,order:D,init:!0}),d()});const{handleHeaderClick:f,handleHeaderContextMenu:h,handleMouseDown:g,handleMouseMove:m,handleMouseOut:y,handleSortClick:b,handleFilterClick:w}=x5e(t,e),{getHeaderRowStyle:O,getHeaderRowClass:x,getHeaderCellStyle:S,getHeaderCellClass:C}=S5e(t),{isGroup:E,toggleAllSelection:T,columnRows:P}=C5e(t);return n.state={onColumnsChange:a,onScrollableChange:s},n.filterPanels=o,{ns:i,filterPanels:o,onColumnsChange:a,onScrollableChange:s,columnRows:P,getHeaderRowClass:x,getHeaderRowStyle:O,getHeaderCellClass:C,getHeaderCellStyle:S,handleHeaderClick:f,handleHeaderContextMenu:h,handleMouseDown:g,handleMouseMove:m,handleMouseOut:y,handleSortClick:b,handleFilterClick:w,isGroup:E,toggleAllSelection:T,saveIndexSelection:u,isTableLayoutAuto:l,theadRef:c,updateFixedColumnStyle:d}},render(){const{ns:t,isGroup:e,columnRows:n,getHeaderCellStyle:r,getHeaderCellClass:i,getHeaderRowClass:o,getHeaderRowStyle:a,handleHeaderClick:s,handleHeaderContextMenu:l,handleMouseDown:u,handleMouseMove:c,handleSortClick:d,handleMouseOut:f,store:h,$parent:g,saveIndexSelection:m,isTableLayoutAuto:y}=this;let b=1;return Tt("thead",{ref:"theadRef",class:{[t.is("group")]:e}},n.map((w,O)=>Tt("tr",{class:o(O),key:O,style:a(O)},w.map((x,S)=>{x.rowSpan>b&&(b=x.rowSpan);const C=i(O,S,w,x);return y&&x.fixed&&m.set(C,x),Tt("th",{class:C,colspan:x.colSpan,key:`${x.id}-thead`,rowspan:x.rowSpan,style:r(O,S,w,x),onClick:E=>{E.currentTarget.classList.contains("noclick")||s(E,x)},onContextmenu:E=>l(E,x),onMousedown:E=>u(E,x),onMousemove:E=>c(E,x),onMouseout:f},[Tt("div",{class:["cell",x.filteredValue&&x.filteredValue.length>0?"highlight":""]},[x.renderHeader?x.renderHeader({column:x,$index:S,store:h,_self:g}):x.label,x.sortable&&Tt("span",{onClick:E=>d(E,x),class:"caret-wrapper"},[Tt("i",{onClick:E=>d(E,x,"ascending"),class:"sort-caret ascending"}),Tt("i",{onClick:E=>d(E,x,"descending"),class:"sort-caret descending"})]),x.filterable&&Tt(w5e,{store:h,placement:x.filterPlacement||"bottom-start",appendTo:g.appendFilterPanelTo,column:x,upDataColumn:(E,T)=>{x[E]=T}},{"filter-icon":()=>x.renderFilterIcon?x.renderFilterIcon({filterOpened:x.filterOpened}):null})])])}))))}});function BT(t,e,n=.03){return t-e>n}function T5e(t){const e=ht(hc),n=F(""),r=F(Tt("div")),i=(g,m,y)=>{var b;const w=e,O=IT(g);let x;const S=(b=w==null?void 0:w.vnode.el)==null?void 0:b.dataset.prefix;O&&(x=NB({columns:t.store.states.columns.value},O,S),x&&(w==null||w.emit(`cell-${y}`,m,x,O,g))),w==null||w.emit(`row-${y}`,m,x,g)},o=(g,m)=>{i(g,m,"dblclick")},a=(g,m)=>{t.store.commit("setCurrentRow",m),i(g,m,"click")},s=(g,m)=>{i(g,m,"contextmenu")},l=Qo(g=>{t.store.commit("setHoverRow",g)},30),u=Qo(()=>{t.store.commit("setHoverRow",null)},30),c=g=>{const m=window.getComputedStyle(g,null),y=Number.parseInt(m.paddingLeft,10)||0,b=Number.parseInt(m.paddingRight,10)||0,w=Number.parseInt(m.paddingTop,10)||0,O=Number.parseInt(m.paddingBottom,10)||0;return{left:y,right:b,top:w,bottom:O}},d=(g,m,y)=>{let b=m.target.parentNode;for(;g>1&&(b=b==null?void 0:b.nextSibling,!(!b||b.nodeName!=="TR"));)y(b,"hover-row hover-fixed-row"),g--};return{handleDoubleClick:o,handleClick:a,handleContextMenu:s,handleMouseEnter:l,handleMouseLeave:u,handleCellMouseEnter:(g,m,y)=>{var b;const w=e,O=IT(g),x=(b=w==null?void 0:w.vnode.el)==null?void 0:b.dataset.prefix;if(O){const X=NB({columns:t.store.states.columns.value},O,x);O.rowSpan>1&&d(O.rowSpan,g,il);const Q=w.hoverState={cell:O,column:X,row:m};w==null||w.emit("cell-mouse-enter",Q.row,Q.column,Q.cell,g)}if(!y)return;const S=g.target.querySelector(".cell");if(!(Ha(S,`${x}-tooltip`)&&S.childNodes.length))return;const C=document.createRange();C.setStart(S,0),C.setEnd(S,S.childNodes.length);const{width:E,height:T}=C.getBoundingClientRect(),{width:P,height:A}=S.getBoundingClientRect(),{top:D,left:$,right:N,bottom:z}=c(S),I=$+N,L=D+z;(BT(E+I,P)||BT(T+L,A)||BT(S.scrollWidth,P))&&u5e(y,O.innerText||O.textContent,O,w)},handleCellMouseLeave:g=>{const m=IT(g);if(!m)return;m.rowSpan>1&&d(m.rowSpan,g,sa);const y=e==null?void 0:e.hoverState;e==null||e.emit("cell-mouse-leave",y==null?void 0:y.row,y==null?void 0:y.column,y==null?void 0:y.cell,g)},tooltipContent:n,tooltipTrigger:r}}function k5e(t){const e=ht(hc),n=Qe("table");return{getRowStyle:(u,c)=>{const d=e==null?void 0:e.props.rowStyle;return St(d)?d.call(null,{row:u,rowIndex:c}):d||null},getRowClass:(u,c)=>{const d=[n.e("row")];(e==null?void 0:e.props.highlightCurrentRow)&&u===t.store.states.currentRow.value&&d.push("current-row"),t.stripe&&c%2===1&&d.push(n.em("row","striped"));const f=e==null?void 0:e.props.rowClassName;return Ot(f)?d.push(f):St(f)&&d.push(f.call(null,{row:u,rowIndex:c})),d},getCellStyle:(u,c,d,f)=>{const h=e==null?void 0:e.props.cellStyle;let g=h!=null?h:{};St(h)&&(g=h.call(null,{rowIndex:u,columnIndex:c,row:d,column:f}));const m=iN(c,t==null?void 0:t.fixed,t.store);return im(m,"left"),im(m,"right"),Object.assign({},g,m)},getCellClass:(u,c,d,f,h)=>{const g=rN(n.b(),c,t==null?void 0:t.fixed,t.store,void 0,h),m=[f.id,f.align,f.className,...g],y=e==null?void 0:e.props.cellClassName;return Ot(y)?m.push(y):St(y)&&m.push(y.call(null,{rowIndex:u,columnIndex:c,row:d,column:f})),m.push(n.e("cell")),m.filter(b=>Boolean(b)).join(" ")},getSpan:(u,c,d,f)=>{let h=1,g=1;const m=e==null?void 0:e.props.spanMethod;if(St(m)){const y=m({row:u,column:c,rowIndex:d,columnIndex:f});Xe(y)?(h=y[0],g=y[1]):typeof y=="object"&&(h=y.rowspan,g=y.colspan)}return{rowspan:h,colspan:g}},getColspanRealWidth:(u,c,d)=>{if(c<1)return u[d].realWidth;const f=u.map(({realWidth:h,width:g})=>h||g).slice(d,d+c);return Number(f.reduce((h,g)=>Number(h)+Number(g),-1))}}}const P5e=ue({name:"TableTdWrapper"}),A5e=ue({...P5e,props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(R(),Y("td",{colspan:t.colspan,rowspan:t.rowspan},[Ee(e.$slots,"default")],8,["colspan","rowspan"]))}});var M5e=Ye(A5e,[["__file","td-wrapper.vue"]]);function R5e(t){const e=ht(hc),n=Qe("table"),{handleDoubleClick:r,handleClick:i,handleContextMenu:o,handleMouseEnter:a,handleMouseLeave:s,handleCellMouseEnter:l,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:d}=T5e(t),{getRowStyle:f,getRowClass:h,getCellStyle:g,getCellClass:m,getSpan:y,getColspanRealWidth:b}=k5e(t),w=M(()=>t.store.states.columns.value.findIndex(({type:E})=>E==="default")),O=(E,T)=>{const P=e.props.rowKey;return P?na(E,P):T},x=(E,T,P,A=!1)=>{const{tooltipEffect:D,tooltipOptions:$,store:N}=t,{indent:z,columns:I}=N.states,L=h(E,T);let X=!0;return P&&(L.push(n.em("row",`level-${P.level}`)),X=P.display),Tt("tr",{style:[X?null:{display:"none"},f(E,T)],class:L,key:O(E,T),onDblclick:W=>r(W,E),onClick:W=>i(W,E),onContextmenu:W=>o(W,E),onMouseenter:()=>a(T),onMouseleave:s},I.value.map((W,G)=>{const{rowspan:K,colspan:oe}=y(E,W,T,G);if(!K||!oe)return null;const ne=Object.assign({},W);ne.realWidth=b(I.value,oe,G);const _e={store:t.store,_self:t.context||e,column:ne,row:E,$index:T,cellIndex:G,expanded:A};G===w.value&&P&&(_e.treeNode={indent:P.level*z.value,level:P.level},wr(P.expanded)&&(_e.treeNode.expanded=P.expanded,"loading"in P&&(_e.treeNode.loading=P.loading),"noLazyChildren"in P&&(_e.treeNode.noLazyChildren=P.noLazyChildren)));const Ce=`${O(E,T)},${G}`,U=ne.columnKey||ne.rawColumnKey||"",ie=W.showOverflowTooltip&&mf({effect:D},$,W.showOverflowTooltip);return Tt(M5e,{style:g(T,G,E,W),class:m(T,G,E,W,oe-1),key:`${U}${Ce}`,rowspan:K,colspan:oe,onMouseenter:ee=>l(ee,E,ie),onMouseleave:u},{default:()=>S(G,W,_e)})}))},S=(E,T,P)=>T.renderCell(P);return{wrappedRowRender:(E,T)=>{const P=t.store,{isRowExpanded:A,assertRowKey:D}=P,{treeData:$,lazyTreeNodeMap:N,childrenColumnName:z,rowKey:I}=P.states,L=P.states.columns.value;if(L.some(({type:Q})=>Q==="expand")){const Q=A(E),W=x(E,T,void 0,Q),G=e.renderExpanded;return Q?G?[[W,Tt("tr",{key:`expanded-row__${W.key}`},[Tt("td",{colspan:L.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[G({row:E,$index:T,store:P,expanded:Q})])])]]:(console.error("[Element Error]renderExpanded is required."),W):[[W]]}else if(Object.keys($.value).length){D();const Q=na(E,I.value);let W=$.value[Q],G=null;W&&(G={expanded:W.expanded,level:W.level,display:!0},wr(W.lazy)&&(wr(W.loaded)&&W.loaded&&(G.noLazyChildren=!(W.children&&W.children.length)),G.loading=W.loading));const K=[x(E,T,G)];if(W){let oe=0;const ne=(Ce,U)=>{!(Ce&&Ce.length&&U)||Ce.forEach(ie=>{const ee={display:U.display&&U.expanded,level:U.level+1,expanded:!1,noLazyChildren:!1,loading:!1},he=na(ie,I.value);if(he==null)throw new Error("For nested data item, row-key is required.");if(W={...$.value[he]},W&&(ee.expanded=W.expanded,W.level=W.level||ee.level,W.display=!!(W.expanded&&ee.display),wr(W.lazy)&&(wr(W.loaded)&&W.loaded&&(ee.noLazyChildren=!(W.children&&W.children.length)),ee.loading=W.loading)),oe++,K.push(x(ie,T+oe,ee)),W){const $e=N.value[he]||ie[z.value];ne($e,W)}})};W.display=!0;const _e=N.value[Q]||E[z.value];ne(_e,W)}return K}else return x(E,T,void 0)},tooltipContent:c,tooltipTrigger:d}}const $5e={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var N5e=ue({name:"ElTableBody",props:$5e,setup(t){const e=tn(),n=ht(hc),r=Qe("table"),{wrappedRowRender:i,tooltipContent:o,tooltipTrigger:a}=R5e(t),{onColumnsChange:s,onScrollableChange:l}=IU(n),u=[];return Fe(t.store.states.hoverRow,(c,d)=>{var f;const h=e==null?void 0:e.vnode.el,g=Array.from((h==null?void 0:h.children)||[]).filter(b=>b==null?void 0:b.classList.contains(`${r.e("row")}`));let m=c;const y=(f=g[m])==null?void 0:f.childNodes;if(y!=null&&y.length){let b=0;Array.from(y).reduce((O,x,S)=>{var C,E;return((C=y[S])==null?void 0:C.colSpan)>1&&(b=(E=y[S])==null?void 0:E.colSpan),x.nodeName!=="TD"&&b===0&&O.push(S),b>0&&b--,O},[]).forEach(O=>{var x;for(m=c;m>0;){const S=(x=g[m-1])==null?void 0:x.childNodes;if(S[O]&&S[O].nodeName==="TD"&&S[O].rowSpan>1){il(S[O],"hover-cell"),u.push(S[O]);break}m--}})}else u.forEach(b=>sa(b,"hover-cell")),u.length=0;!t.store.states.isComplex.value||!wn||bf(()=>{const b=g[d],w=g[c];b&&!b.classList.contains("hover-fixed-row")&&sa(b,"hover-row"),w&&il(w,"hover-row")})}),od(()=>{var c;(c=Ks)==null||c()}),{ns:r,onColumnsChange:s,onScrollableChange:l,wrappedRowRender:i,tooltipContent:o,tooltipTrigger:a}},render(){const{wrappedRowRender:t,store:e}=this,n=e.states.data.value||[];return Tt("tbody",{tabIndex:-1},[n.reduce((r,i)=>r.concat(t(i,r.length)),[])])}});function D5e(){const t=ht(hc),e=t==null?void 0:t.store,n=M(()=>e.states.fixedLeafColumnsLength.value),r=M(()=>e.states.rightFixedColumns.value.length),i=M(()=>e.states.columns.value.length),o=M(()=>e.states.fixedColumns.value.length),a=M(()=>e.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:r,columnsCount:i,leftFixedCount:o,rightFixedCount:a,columns:e.states.columns}}function L5e(t){const{columns:e}=D5e(),n=Qe("table");return{getCellClasses:(o,a)=>{const s=o[a],l=[n.e("cell"),s.id,s.align,s.labelClassName,...rN(n.b(),a,s.fixed,t.store)];return s.className&&l.push(s.className),s.children||l.push(n.is("leaf")),l},getCellStyles:(o,a)=>{const s=iN(a,o.fixed,t.store);return im(s,"left"),im(s,"right"),s},columns:e}}var I5e=ue({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(t){const{getCellClasses:e,getCellStyles:n,columns:r}=L5e(t);return{ns:Qe("table"),getCellClasses:e,getCellStyles:n,columns:r}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:r,sumText:i}=this,o=this.store.states.data.value;let a=[];return r?a=r({columns:t,data:o}):t.forEach((s,l)=>{if(l===0){a[l]=i;return}const u=o.map(h=>Number(h[s.property])),c=[];let d=!0;u.forEach(h=>{if(!Number.isNaN(+h)){d=!1;const g=`${h}`.split(".")[1];c.push(g?g.length:0)}});const f=Math.max.apply(null,c);d?a[l]="":a[l]=u.reduce((h,g)=>{const m=Number(g);return Number.isNaN(+m)?h:Number.parseFloat((h+g).toFixed(Math.min(f,20)))},0)}),Tt(Tt("tfoot",[Tt("tr",{},[...t.map((s,l)=>Tt("td",{key:l,colspan:s.colSpan,rowspan:s.rowSpan,class:n(t,l),style:e(s,l)},[Tt("div",{class:["cell",s.labelClassName]},[a[l]])]))])]))}});function B5e(t){return{setCurrentRow:d=>{t.commit("setCurrentRow",d)},getSelectionRows:()=>t.getSelectionRows(),toggleRowSelection:(d,f,h=!0)=>{t.toggleRowSelection(d,f,!1,h),t.updateAllSelected()},clearSelection:()=>{t.clearSelection()},clearFilter:d=>{t.clearFilter(d)},toggleAllSelection:()=>{t.commit("toggleAllSelection")},toggleRowExpansion:(d,f)=>{t.toggleRowExpansionAdapter(d,f)},clearSort:()=>{t.clearSort()},sort:(d,f)=>{t.commit("sort",{prop:d,order:f})},updateKeyChildren:(d,f)=>{t.updateKeyChildren(d,f)}}}function F5e(t,e,n,r){const i=F(!1),o=F(null),a=F(!1),s=Q=>{a.value=Q},l=F({width:null,height:null,headerHeight:null}),u=F(!1),c={display:"inline-block",verticalAlign:"middle"},d=F(),f=F(0),h=F(0),g=F(0),m=F(0),y=F(0);Bo(()=>{e.setHeight(t.height)}),Bo(()=>{e.setMaxHeight(t.maxHeight)}),Fe(()=>[t.currentRowKey,n.states.rowKey],([Q,W])=>{!p(W)||!p(Q)||n.setCurrentRowKey(`${Q}`)},{immediate:!0}),Fe(()=>t.data,Q=>{r.store.commit("setData",Q)},{immediate:!0,deep:!0}),Bo(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const b=()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},w=(Q,W)=>{const{pixelX:G,pixelY:K}=W;Math.abs(G)>=Math.abs(K)&&(r.refs.bodyWrapper.scrollLeft+=W.pixelX/5)},O=M(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),x=M(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),S=()=>{O.value&&e.updateElsHeight(),e.updateColumnsWidth(),requestAnimationFrame(P)};Ft(async()=>{await xt(),n.updateColumns(),A(),requestAnimationFrame(S);const Q=r.vnode.el,W=r.refs.headerWrapper;t.flexible&&Q&&Q.parentElement&&(Q.parentElement.style.minWidth="0"),l.value={width:d.value=Q.offsetWidth,height:Q.offsetHeight,headerHeight:t.showHeader&&W?W.offsetHeight:null},n.states.columns.value.forEach(G=>{G.filteredValue&&G.filteredValue.length&&r.store.commit("filterChange",{column:G,values:G.filteredValue,silent:!0})}),r.$ready=!0});const C=(Q,W)=>{if(!Q)return;const G=Array.from(Q.classList).filter(K=>!K.startsWith("is-scrolling-"));G.push(e.scrollX.value?W:"is-scrolling-none"),Q.className=G.join(" ")},E=Q=>{const{tableWrapper:W}=r.refs;C(W,Q)},T=Q=>{const{tableWrapper:W}=r.refs;return!!(W&&W.classList.contains(Q))},P=function(){if(!r.refs.scrollBarRef)return;if(!e.scrollX.value){const Ce="is-scrolling-none";T(Ce)||E(Ce);return}const Q=r.refs.scrollBarRef.wrapRef;if(!Q)return;const{scrollLeft:W,offsetWidth:G,scrollWidth:K}=Q,{headerWrapper:oe,footerWrapper:ne}=r.refs;oe&&(oe.scrollLeft=W),ne&&(ne.scrollLeft=W);const _e=K-G-1;W>=_e?E("is-scrolling-right"):E(W===0?"is-scrolling-left":"is-scrolling-middle")},A=()=>{!r.refs.scrollBarRef||(r.refs.scrollBarRef.wrapRef&&sr(r.refs.scrollBarRef.wrapRef,"scroll",P,{passive:!0}),t.fit?Hr(r.vnode.el,D):sr(window,"resize",D),Hr(r.refs.bodyWrapper,()=>{var Q,W;D(),(W=(Q=r.refs)==null?void 0:Q.scrollBarRef)==null||W.update()}))},D=()=>{var Q,W,G,K;const oe=r.vnode.el;if(!r.$ready||!oe)return;let ne=!1;const{width:_e,height:Ce,headerHeight:U}=l.value,ie=d.value=oe.offsetWidth;_e!==ie&&(ne=!0);const ee=oe.offsetHeight;(t.height||O.value)&&Ce!==ee&&(ne=!0);const he=t.tableLayout==="fixed"?r.refs.headerWrapper:(Q=r.refs.tableHeaderRef)==null?void 0:Q.$el;t.showHeader&&(he==null?void 0:he.offsetHeight)!==U&&(ne=!0),f.value=((W=r.refs.tableWrapper)==null?void 0:W.scrollHeight)||0,g.value=(he==null?void 0:he.scrollHeight)||0,m.value=((G=r.refs.footerWrapper)==null?void 0:G.offsetHeight)||0,y.value=((K=r.refs.appendWrapper)==null?void 0:K.offsetHeight)||0,h.value=f.value-g.value-m.value-y.value,ne&&(l.value={width:ie,height:ee,headerHeight:t.showHeader&&(he==null?void 0:he.offsetHeight)||0},S())},$=ki(),N=M(()=>{const{bodyWidth:Q,scrollY:W,gutterWidth:G}=e;return Q.value?`${Q.value-(W.value?G:0)}px`:""}),z=M(()=>t.maxHeight?"fixed":t.tableLayout),I=M(()=>{if(t.data&&t.data.length)return null;let Q="100%";t.height&&h.value&&(Q=`${h.value}px`);const W=d.value;return{width:W?`${W}px`:"",height:Q}}),L=M(()=>t.height?{height:"100%"}:t.maxHeight?Number.isNaN(Number(t.maxHeight))?{maxHeight:`calc(${t.maxHeight} - ${g.value+m.value}px)`}:{maxHeight:`${t.maxHeight-g.value-m.value}px`}:{});return{isHidden:i,renderExpanded:o,setDragVisible:s,isGroup:u,handleMouseLeave:b,handleHeaderFooterMousewheel:w,tableSize:$,emptyBlockStyle:I,handleFixedMousewheel:(Q,W)=>{const G=r.refs.bodyWrapper;if(Math.abs(W.spinY)>0){const K=G.scrollTop;W.pixelY<0&&K!==0&&Q.preventDefault(),W.pixelY>0&&G.scrollHeight-G.clientHeight>K&&Q.preventDefault(),G.scrollTop+=Math.ceil(W.pixelY/5)}else G.scrollLeft+=Math.ceil(W.pixelX/5)},resizeProxyVisible:a,bodyWidth:N,resizeState:l,doLayout:S,tableBodyStyles:x,tableLayout:z,scrollbarViewStyle:c,scrollbarStyle:L}}function V5e(t){const e=F(),n=()=>{const i=t.vnode.el.querySelector(".hidden-columns"),o={childList:!0,subtree:!0},a=t.store.states.updateOrderFns;e.value=new MutationObserver(()=>{a.forEach(s=>s())}),e.value.observe(i,o)};Ft(()=>{n()}),od(()=>{var r;(r=e.value)==null||r.disconnect()})}var j5e={data:{type:Array,default:()=>[]},size:$i,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0}};function VU(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(i=>i.width===void 0)&&(n=[]);const r=i=>{const o={key:`${t.tableLayout}_${i.id}`,style:{},name:void 0};return e?o.style={width:`${i.width}px`}:o.name=i.id,o};return Tt("colgroup",{},n.map(i=>Tt("col",r(i))))}VU.props=["columns","tableLayout"];const Q5e=()=>{const t=F(),e=(o,a)=>{const s=t.value;s&&s.scrollTo(o,a)},n=(o,a)=>{const s=t.value;s&&Et(a)&&["Top","Left"].includes(o)&&s[`setScroll${o}`](a)};return{scrollBarRef:t,scrollTo:e,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}};var BB=!1,Oh,eP,tP,k1,P1,jU,A1,nP,rP,iP,QU,oP,aP,zU,WU;function Ba(){if(!BB){BB=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(oP=/\b(iPhone|iP[ao]d)/.exec(t),aP=/\b(iP[ao]d)/.exec(t),iP=/Android/i.exec(t),zU=/FBAN\/\w+;/i.exec(t),WU=/Mobile/i.exec(t),QU=!!/Win64/.exec(t),e){Oh=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Oh&&document&&document.documentMode&&(Oh=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(t);jU=r?parseFloat(r[1])+4:Oh,eP=e[2]?parseFloat(e[2]):NaN,tP=e[3]?parseFloat(e[3]):NaN,k1=e[4]?parseFloat(e[4]):NaN,k1?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),P1=e&&e[1]?parseFloat(e[1]):NaN):P1=NaN}else Oh=eP=tP=P1=k1=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);A1=i?parseFloat(i[1].replace("_",".")):!0}else A1=!1;nP=!!n[2],rP=!!n[3]}else A1=nP=rP=!1}}var sP={ie:function(){return Ba()||Oh},ieCompatibilityMode:function(){return Ba()||jU>Oh},ie64:function(){return sP.ie()&&QU},firefox:function(){return Ba()||eP},opera:function(){return Ba()||tP},webkit:function(){return Ba()||k1},safari:function(){return sP.webkit()},chrome:function(){return Ba()||P1},windows:function(){return Ba()||nP},osx:function(){return Ba()||A1},linux:function(){return Ba()||rP},iphone:function(){return Ba()||oP},mobile:function(){return Ba()||oP||aP||iP||WU},nativeApp:function(){return Ba()||zU},android:function(){return Ba()||iP},ipad:function(){return Ba()||aP}},z5e=sP,hO=!!(typeof window<"u"&&window.document&&window.document.createElement),W5e={canUseDOM:hO,canUseWorkers:typeof Worker<"u",canUseEventListeners:hO&&!!(window.addEventListener||window.attachEvent),canUseViewport:hO&&!!window.screen,isInWorker:!hO},HU=W5e,UU;HU.canUseDOM&&(UU=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function H5e(t,e){if(!HU.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&UU&&t==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var U5e=H5e,FB=10,VB=40,jB=800;function XU(t){var e=0,n=0,r=0,i=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),r=e*FB,i=n*FB,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||i)&&t.deltaMode&&(t.deltaMode==1?(r*=VB,i*=VB):(r*=jB,i*=jB)),r&&!e&&(e=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:i}}XU.getEventType=function(){return z5e.firefox()?"DOMMouseScroll":U5e("wheel")?"wheel":"mousewheel"};var X5e=XU;/**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @param {?boolean} capture Check if the capture phase is supported.
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */const Z5e=function(t,e){if(t&&t.addEventListener){const n=function(r){const i=X5e(r);e&&Reflect.apply(e,this,[r,i])};t.addEventListener("wheel",n,{passive:!0})}},q5e={beforeMount(t,e){Z5e(t,e.value)}};let Y5e=1;const G5e=ue({name:"ElTable",directives:{Mousewheel:q5e},components:{TableHeader:E5e,TableBody:N5e,TableFooter:I5e,ElScrollbar:gu,hColgroup:VU},props:j5e,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(t){const{t:e}=xn(),n=Qe("table"),r=tn();gn(hc,r);const i=m5e(r,t);r.store=i;const o=new y5e({store:r.store,table:r,fit:t.fit,showHeader:t.showHeader});r.layout=o;const a=M(()=>(i.states.data.value||[]).length===0),{setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:g,sort:m,updateKeyChildren:y}=B5e(i),{isHidden:b,renderExpanded:w,setDragVisible:O,isGroup:x,handleMouseLeave:S,handleHeaderFooterMousewheel:C,tableSize:E,emptyBlockStyle:T,handleFixedMousewheel:P,resizeProxyVisible:A,bodyWidth:D,resizeState:$,doLayout:N,tableBodyStyles:z,tableLayout:I,scrollbarViewStyle:L,scrollbarStyle:X}=F5e(t,o,i,r),{scrollBarRef:Q,scrollTo:W,setScrollLeft:G,setScrollTop:K}=Q5e(),oe=Qo(N,50),ne=`${n.namespace.value}-table_${Y5e++}`;r.tableId=ne,r.state={isGroup:x,resizeState:$,doLayout:N,debouncedUpdateLayout:oe};const _e=M(()=>{var ie;return(ie=t.sumText)!=null?ie:e("el.table.sumText")}),Ce=M(()=>{var ie;return(ie=t.emptyText)!=null?ie:e("el.table.emptyText")}),U=M(()=>FU(i.states.originColumns.value)[0]);return V5e(r),pr(()=>{oe.cancel()}),{ns:n,layout:o,store:i,columns:U,handleHeaderFooterMousewheel:C,handleMouseLeave:S,tableId:ne,tableSize:E,isHidden:b,isEmpty:a,renderExpanded:w,resizeProxyVisible:A,resizeState:$,isGroup:x,bodyWidth:D,tableBodyStyles:z,emptyBlockStyle:T,debouncedUpdateLayout:oe,handleFixedMousewheel:P,setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:g,doLayout:N,sort:m,updateKeyChildren:y,t:e,setDragVisible:O,context:r,computedSumText:_e,computedEmptyText:Ce,tableLayout:I,scrollbarViewStyle:L,scrollbarStyle:X,scrollBarRef:Q,scrollTo:W,setScrollLeft:G,setScrollTop:K}}});function K5e(t,e,n,r,i,o){const a=rn("hColgroup"),s=rn("table-header"),l=rn("table-body"),u=rn("table-footer"),c=rn("el-scrollbar"),d=pS("mousewheel");return R(),Y("div",{ref:"tableWrapper",class:V([{[t.ns.m("fit")]:t.fit,[t.ns.m("striped")]:t.stripe,[t.ns.m("border")]:t.border||t.isGroup,[t.ns.m("hidden")]:t.isHidden,[t.ns.m("group")]:t.isGroup,[t.ns.m("fluid-height")]:t.maxHeight,[t.ns.m("scrollable-x")]:t.layout.scrollX.value,[t.ns.m("scrollable-y")]:t.layout.scrollY.value,[t.ns.m("enable-row-hover")]:!t.store.states.isComplex.value,[t.ns.m("enable-row-transition")]:(t.store.states.data.value||[]).length!==0&&(t.store.states.data.value||[]).length<100,"has-footer":t.showSummary},t.ns.m(t.tableSize),t.className,t.ns.b(),t.ns.m(`layout-${t.tableLayout}`)]),style:vt(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:t.handleMouseLeave},[J("div",{class:V(t.ns.e("inner-wrapper"))},[J("div",{ref:"hiddenColumns",class:"hidden-columns"},[Ee(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?zt((R(),Y("div",{key:0,ref:"headerWrapper",class:V(t.ns.e("header-wrapper"))},[J("table",{ref:"tableHeader",class:V(t.ns.e("header")),style:vt(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),B(s,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):Se("v-if",!0),J("div",{ref:"bodyWrapper",class:V(t.ns.e("body-wrapper"))},[B(c,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex,onScroll:f=>t.$emit("scroll",f)},{default:j(()=>[J("table",{ref:"tableBody",class:V(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:vt({width:t.bodyWidth,tableLayout:t.tableLayout})},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(R(),xe(s,{key:0,ref:"tableHeaderRef",class:V(t.ns.e("body-header")),border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):Se("v-if",!0),B(l,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.tooltipEffect,"tooltip-options":t.tooltipOptions,"row-style":t.rowStyle,store:t.store,stripe:t.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),t.showSummary&&t.tableLayout==="auto"?(R(),xe(u,{key:1,class:V(t.ns.e("body-footer")),border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):Se("v-if",!0)],6),t.isEmpty?(R(),Y("div",{key:0,ref:"emptyBlock",style:vt(t.emptyBlockStyle),class:V(t.ns.e("empty-block"))},[J("span",{class:V(t.ns.e("empty-text"))},[Ee(t.$slots,"empty",{},()=>[Ue(Ve(t.computedEmptyText),1)])],2)],6)):Se("v-if",!0),t.$slots.append?(R(),Y("div",{key:1,ref:"appendWrapper",class:V(t.ns.e("append-wrapper"))},[Ee(t.$slots,"append")],2)):Se("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","onScroll"])],2),t.showSummary&&t.tableLayout==="fixed"?zt((R(),Y("div",{key:1,ref:"footerWrapper",class:V(t.ns.e("footer-wrapper"))},[J("table",{class:V(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:vt(t.tableBodyStyles)},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),B(u,{border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[Bn,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):Se("v-if",!0),t.border||t.isGroup?(R(),Y("div",{key:2,class:V(t.ns.e("border-left-patch"))},null,2)):Se("v-if",!0)],2),zt(J("div",{ref:"resizeProxy",class:V(t.ns.e("column-resize-proxy"))},null,2),[[Bn,t.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var J5e=Ye(G5e,[["render",K5e],["__file","table.vue"]]);const eBe={selection:"table-column--selection",expand:"table__expand-column"},tBe={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},nBe=t=>eBe[t]||"",rBe={selection:{renderHeader({store:t,column:e}){function n(){return t.states.data.value&&t.states.data.value.length===0}return Tt(Bs,{disabled:n(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":t.toggleAllSelection,modelValue:t.states.isAllSelected.value,ariaLabel:e.label})},renderCell({row:t,column:e,store:n,$index:r}){return Tt(Bs,{disabled:e.selectable?!e.selectable.call(null,t,r):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:i=>i.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:e.label})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const r=t.index;return Et(r)?n=e+r:St(r)&&(n=r(e)),Tt("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({row:t,store:e,expanded:n}){const{ns:r}=e,i=[r.e("expand-icon")];return n&&i.push(r.em("expand-icon","expanded")),Tt("div",{class:i,onClick:function(a){a.stopPropagation(),e.toggleRowExpansion(t)}},{default:()=>[Tt(mt,null,{default:()=>[Tt(_a)]})]})},sortable:!1,resizable:!1}};function iBe({row:t,column:e,$index:n}){var r;const i=e.property,o=i&&_1(t,i).value;return e&&e.formatter?e.formatter(t,e,o,n):((r=o==null?void 0:o.toString)==null?void 0:r.call(o))||""}function oBe({row:t,treeNode:e,store:n},r=!1){const{ns:i}=n;if(!e)return r?[Tt("span",{class:i.e("placeholder")})]:null;const o=[],a=function(s){s.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(Tt("span",{class:i.e("indent"),style:{"padding-left":`${e.indent}px`}})),wr(e.expanded)&&!e.noLazyChildren){const s=[i.e("expand-icon"),e.expanded?i.em("expand-icon","expanded"):""];let l=_a;e.loading&&(l=Ju),o.push(Tt("div",{class:s,onClick:a},{default:()=>[Tt(mt,{class:{[i.is("loading")]:e.loading}},{default:()=>[Tt(l)]})]}))}else o.push(Tt("span",{class:i.e("placeholder")}));return o}function QB(t,e){return t.reduce((n,r)=>(n[r]=r,n),e)}function aBe(t,e){const n=tn();return{registerComplexWatchers:()=>{const o=["fixed"],a={realWidth:"width",realMinWidth:"minWidth"},s=QB(o,a);Object.keys(s).forEach(l=>{const u=a[l];Mn(e,u)&&Fe(()=>e[u],c=>{let d=c;u==="width"&&l==="realWidth"&&(d=nN(c)),u==="minWidth"&&l==="realMinWidth"&&(d=RU(c)),n.columnConfig.value[u]=d,n.columnConfig.value[l]=d;const f=u==="fixed";t.value.store.scheduleLayout(f)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},s=QB(o,a);Object.keys(s).forEach(l=>{const u=a[l];Mn(e,u)&&Fe(()=>e[u],c=>{n.columnConfig.value[l]=c})})}}}function sBe(t,e,n){const r=tn(),i=F(""),o=F(!1),a=F(),s=F(),l=Qe("table");Bo(()=>{a.value=t.align?`is-${t.align}`:null,a.value}),Bo(()=>{s.value=t.headerAlign?`is-${t.headerAlign}`:a.value,s.value});const u=M(()=>{let x=r.vnode.vParent||r.parent;for(;x&&!x.tableId&&!x.columnId;)x=x.vnode.vParent||x.parent;return x}),c=M(()=>{const{store:x}=r.parent;if(!x)return!1;const{treeData:S}=x.states,C=S.value;return C&&Object.keys(C).length>0}),d=F(nN(t.width)),f=F(RU(t.minWidth)),h=x=>(d.value&&(x.width=d.value),f.value&&(x.minWidth=f.value),!d.value&&f.value&&(x.width=void 0),x.minWidth||(x.minWidth=80),x.realWidth=Number(x.width===void 0?x.minWidth:x.width),x),g=x=>{const S=x.type,C=rBe[S]||{};Object.keys(C).forEach(T=>{const P=C[T];T!=="className"&&P!==void 0&&(x[T]=P)});const E=nBe(S);if(E){const T=`${p(l.namespace)}-${E}`;x.className=x.className?`${x.className} ${T}`:T}return x},m=x=>{Xe(x)?x.forEach(C=>S(C)):S(x);function S(C){var E;((E=C==null?void 0:C.type)==null?void 0:E.name)==="ElTableColumn"&&(C.vParent=r)}};return{columnId:i,realAlign:a,isSubColumn:o,realHeaderAlign:s,columnOrTableParent:u,setColumnWidth:h,setColumnForcedProps:g,setColumnRenders:x=>{t.renderHeader||x.type!=="selection"&&(x.renderHeader=C=>(r.columnConfig.value.label,Ee(e,"header",C,()=>[x.label]))),e["filter-icon"]&&(x.renderFilterIcon=C=>Ee(e,"filter-icon",C));let S=x.renderCell;return x.type==="expand"?(x.renderCell=C=>Tt("div",{class:"cell"},[S(C)]),n.value.renderExpanded=C=>e.default?e.default(C):e.default):(S=S||iBe,x.renderCell=C=>{let E=null;if(e.default){const N=e.default(C);E=N.some(z=>z.type!==aa)?N:S(C)}else E=S(C);const{columns:T}=n.value.store.states,P=T.value.findIndex(N=>N.type==="default"),A=c.value&&C.cellIndex===P,D=oBe(C,A),$={class:"cell",style:{}};return x.showOverflowTooltip&&($.class=`${$.class} ${p(l.namespace)}-tooltip`,$.style={width:`${(C.column.realWidth||Number(C.column.width))-1}px`}),m(E),Tt("div",$,[D,E])}),x},getPropsData:(...x)=>x.reduce((S,C)=>(Xe(C)&&C.forEach(E=>{S[E]=t[E]}),S),{}),getColumnElIndex:(x,S)=>Array.prototype.indexOf.call(x,S),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var lBe={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:t=>t.every(e=>["ascending","descending",null].includes(e))}};let uBe=1;var ZU=ue({name:"ElTableColumn",components:{ElCheckbox:Bs},props:lBe,setup(t,{slots:e}){const n=tn(),r=F({}),i=M(()=>{let O=n.parent;for(;O&&!O.tableId;)O=O.parent;return O}),{registerNormalWatchers:o,registerComplexWatchers:a}=aBe(i,t),{columnId:s,isSubColumn:l,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:h,getPropsData:g,getColumnElIndex:m,realAlign:y,updateColumnOrder:b}=sBe(t,e,i),w=c.value;s.value=`${w.tableId||w.columnId}_column_${uBe++}`,hS(()=>{l.value=i.value!==w;const O=t.type||"default",x=t.sortable===""?!0:t.sortable,S=ar(t.showOverflowTooltip)?w.props.showOverflowTooltip:t.showOverflowTooltip,C={...tBe[O],id:s.value,type:O,property:t.prop||t.property,align:y,headerAlign:u,showOverflowTooltip:S,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:x,index:t.index,rawColumnKey:n.vnode.key};let D=g(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);D=o5e(C,D),D=s5e(h,d,f)(D),r.value=D,o(),a()}),Ft(()=>{var O;const x=c.value,S=l.value?x.vnode.el.children:(O=x.refs.hiddenColumns)==null?void 0:O.children,C=()=>m(S||[],n.vnode.el);r.value.getColumnIndex=C,C()>-1&&i.value.store.commit("insertColumn",r.value,l.value?x.columnConfig.value:null,b)}),pr(()=>{const O=r.value.getColumnIndex;(O?O():-1)>-1&&i.value.store.commit("removeColumn",r.value,l.value?w.columnConfig.value:null,b)}),n.columnId=s.value,n.columnConfig=r},render(){var t,e,n;try{const r=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),i=[];if(Xe(r))for(const a of r)((n=a.type)==null?void 0:n.name)==="ElTableColumn"||a.shapeFlag&2?i.push(a):a.type===dt&&Xe(a.children)&&a.children.forEach(s=>{(s==null?void 0:s.patchFlag)!==1024&&!Ot(s==null?void 0:s.children)&&i.push(s)});return Tt("div",i)}catch{return Tt("div",[])}}});const Rb=Vt(J5e,{TableColumn:ZU}),$b=ni(ZU);var E0=(t=>(t.ASC="asc",t.DESC="desc",t))(E0||{}),T0=(t=>(t.CENTER="center",t.RIGHT="right",t))(T0||{}),qU=(t=>(t.LEFT="left",t.RIGHT="right",t))(qU||{});const lP={asc:"desc",desc:"asc"},k0=Symbol("placeholder"),cBe=(t,e,n)=>{var r;const i={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:t.flexGrow||0,flexShrink:t.flexShrink||1}};n||(i.flexShrink=1);const o={...(r=t.style)!=null?r:{},...i,flexBasis:"auto",width:t.width};return e||(t.maxWidth&&(o.maxWidth=t.maxWidth),t.minWidth&&(o.minWidth=t.minWidth)),o};function dBe(t,e,n){const r=M(()=>p(e).map((y,b)=>{var w,O;return{...y,key:(O=(w=y.key)!=null?w:y.dataKey)!=null?O:b}})),i=M(()=>p(r).filter(y=>!y.hidden)),o=M(()=>p(i).filter(y=>y.fixed==="left"||y.fixed===!0)),a=M(()=>p(i).filter(y=>y.fixed==="right")),s=M(()=>p(i).filter(y=>!y.fixed)),l=M(()=>{const y=[];return p(o).forEach(b=>{y.push({...b,placeholderSign:k0})}),p(s).forEach(b=>{y.push(b)}),p(a).forEach(b=>{y.push({...b,placeholderSign:k0})}),y}),u=M(()=>p(o).length||p(a).length),c=M(()=>p(r).reduce((y,b)=>(y[b.key]=cBe(b,p(n),t.fixed),y),{})),d=M(()=>p(i).reduce((y,b)=>y+b.width,0)),f=y=>p(r).find(b=>b.key===y),h=y=>p(c)[y],g=(y,b)=>{y.width=b};function m(y){var b;const{key:w}=y.currentTarget.dataset;if(!w)return;const{sortState:O,sortBy:x}=t;let S=E0.ASC;Jt(O)?S=lP[O[w]]:S=lP[x.order],(b=t.onColumnSort)==null||b.call(t,{column:f(w),key:w,order:S})}return{columns:r,columnsStyles:c,columnsTotalWidth:d,fixedColumnsOnLeft:o,fixedColumnsOnRight:a,hasFixedColumns:u,mainColumns:l,normalColumns:s,visibleColumns:i,getColumn:f,getColumnStyle:h,updateColumnWidth:g,onColumnSorted:m}}const fBe=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,onMaybeEndReached:i})=>{const o=F({scrollLeft:0,scrollTop:0});function a(h){var g,m,y;const{scrollTop:b}=h;(g=e.value)==null||g.scrollTo(h),(m=n.value)==null||m.scrollToTop(b),(y=r.value)==null||y.scrollToTop(b)}function s(h){o.value=h,a(h)}function l(h){o.value.scrollTop=h,a(p(o))}function u(h){var g,m;o.value.scrollLeft=h,(m=(g=e.value)==null?void 0:g.scrollTo)==null||m.call(g,p(o))}function c(h){var g;s(h),(g=t.onScroll)==null||g.call(t,h)}function d({scrollTop:h}){const{scrollTop:g}=p(o);h!==g&&l(h)}function f(h,g="auto"){var m;(m=e.value)==null||m.scrollToRow(h,g)}return Fe(()=>p(o).scrollTop,(h,g)=>{h>g&&i()}),{scrollPos:o,scrollTo:s,scrollToLeft:u,scrollToTop:l,scrollToRow:f,onScroll:c,onVerticalScroll:d}},hBe=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,tableInstance:i,ns:o,isScrolling:a})=>{const s=tn(),{emit:l}=s,u=yr(!1),c=F(t.defaultExpandedRowKeys||[]),d=F(-1),f=yr(null),h=F({}),g=F({}),m=yr({}),y=yr({}),b=yr({}),w=M(()=>Et(t.estimatedRowHeight));function O(A){var D;(D=t.onRowsRendered)==null||D.call(t,A),A.rowCacheEnd>p(d)&&(d.value=A.rowCacheEnd)}function x({hovered:A,rowKey:D}){if(a.value)return;i.vnode.el.querySelectorAll(`[rowkey="${String(D)}"]`).forEach(z=>{A?z.classList.add(o.is("hovered")):z.classList.remove(o.is("hovered"))})}function S({expanded:A,rowData:D,rowIndex:$,rowKey:N}){var z,I;const L=[...p(c)],X=L.indexOf(N);A?X===-1&&L.push(N):X>-1&&L.splice(X,1),c.value=L,l("update:expandedRowKeys",L),(z=t.onRowExpand)==null||z.call(t,{expanded:A,rowData:D,rowIndex:$,rowKey:N}),(I=t.onExpandedRowsChange)==null||I.call(t,L)}const C=Qo(()=>{var A,D,$,N;u.value=!0,h.value={...p(h),...p(g)},E(p(f),!1),g.value={},f.value=null,(A=e.value)==null||A.forceUpdate(),(D=n.value)==null||D.forceUpdate(),($=r.value)==null||$.forceUpdate(),(N=s.proxy)==null||N.$forceUpdate(),u.value=!1},0);function E(A,D=!1){!p(w)||[e,n,r].forEach($=>{const N=p($);N&&N.resetAfterRowIndex(A,D)})}function T(A,D,$){const N=p(f);(N===null||N>$)&&(f.value=$),g.value[A]=D}function P({rowKey:A,height:D,rowIndex:$},N){N?N===qU.RIGHT?b.value[A]=D:m.value[A]=D:y.value[A]=D;const z=Math.max(...[m,b,y].map(I=>I.value[A]||0));p(h)[A]!==z&&(T(A,z,$),C())}return{expandedRowKeys:c,lastRenderedRowIndex:d,isDynamic:w,isResetting:u,rowHeights:h,resetAfterIndex:E,onRowExpanded:S,onRowHovered:x,onRowsRendered:O,onRowHeightChange:P}},pBe=(t,{expandedRowKeys:e,lastRenderedRowIndex:n,resetAfterIndex:r})=>{const i=F({}),o=M(()=>{const s={},{data:l,rowKey:u}=t,c=p(e);if(!c||!c.length)return l;const d=[],f=new Set;c.forEach(g=>f.add(g));let h=l.slice();for(h.forEach(g=>s[g[u]]=0);h.length>0;){const g=h.shift();d.push(g),f.has(g[u])&&Xe(g.children)&&g.children.length>0&&(h=[...g.children,...h],g.children.forEach(m=>s[m[u]]=s[g[u]]+1))}return i.value=s,d}),a=M(()=>{const{data:s,expandColumnKey:l}=t;return l?p(o):s});return Fe(a,(s,l)=>{s!==l&&(n.value=-1,r(0,!0))}),{data:a,depthMap:i}},gBe=(t,e)=>t+e,M1=t=>Xe(t)?t.reduce(gBe,0):t,op=(t,e,n={})=>St(t)?t(e):t!=null?t:n,Hd=t=>(["width","maxWidth","minWidth","height"].forEach(e=>{t[e]=pi(t[e])}),t),YU=t=>Jr(t)?e=>Tt(t,e):t,mBe=(t,{columnsTotalWidth:e,rowsHeight:n,fixedColumnsOnLeft:r,fixedColumnsOnRight:i})=>{const o=M(()=>{const{fixed:w,width:O,vScrollbarSize:x}=t,S=O-x;return w?Math.max(Math.round(p(e)),S):S}),a=M(()=>p(o)+t.vScrollbarSize),s=M(()=>{const{height:w=0,maxHeight:O=0,footerHeight:x,hScrollbarSize:S}=t;if(O>0){const C=p(h),E=p(n),P=p(f)+C+E+S;return Math.min(P,O-x)}return w-x}),l=M(()=>{const{maxHeight:w}=t,O=p(s);if(Et(w)&&w>0)return O;const x=p(n)+p(f)+p(h);return Math.min(O,x)}),u=w=>w.width,c=M(()=>M1(p(r).map(u))),d=M(()=>M1(p(i).map(u))),f=M(()=>M1(t.headerHeight)),h=M(()=>{var w;return(((w=t.fixedData)==null?void 0:w.length)||0)*t.rowHeight}),g=M(()=>p(s)-p(f)-p(h)),m=M(()=>{const{style:w={},height:O,width:x}=t;return Hd({...w,height:O,width:x})}),y=M(()=>Hd({height:t.footerHeight})),b=M(()=>({top:pi(p(f)),bottom:pi(t.footerHeight),width:pi(t.width)}));return{bodyWidth:o,fixedTableHeight:l,mainTableHeight:s,leftTableWidth:c,rightTableWidth:d,headerWidth:a,windowHeight:g,footerHeight:y,emptyStyle:b,rootStyle:m,headerHeight:f}};function vBe(t){const e=F(),n=F(),r=F(),{columns:i,columnsStyles:o,columnsTotalWidth:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,hasFixedColumns:u,mainColumns:c,onColumnSorted:d}=dBe(t,Gn(t,"columns"),Gn(t,"fixed")),{scrollTo:f,scrollToLeft:h,scrollToTop:g,scrollToRow:m,onScroll:y,onVerticalScroll:b,scrollPos:w}=fBe(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,onMaybeEndReached:de}),O=Qe("table-v2"),x=tn(),S=yr(!1),{expandedRowKeys:C,lastRenderedRowIndex:E,isDynamic:T,isResetting:P,rowHeights:A,resetAfterIndex:D,onRowExpanded:$,onRowHeightChange:N,onRowHovered:z,onRowsRendered:I}=hBe(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,tableInstance:x,ns:O,isScrolling:S}),{data:L,depthMap:X}=pBe(t,{expandedRowKeys:C,lastRenderedRowIndex:E,resetAfterIndex:D}),Q=M(()=>{const{estimatedRowHeight:ke,rowHeight:Ie}=t,se=p(L);return Et(ke)?Object.values(p(A)).reduce((ye,Ae)=>ye+Ae,0):se.length*Ie}),{bodyWidth:W,fixedTableHeight:G,mainTableHeight:K,leftTableWidth:oe,rightTableWidth:ne,headerWidth:_e,windowHeight:Ce,footerHeight:U,emptyStyle:ie,rootStyle:ee,headerHeight:he}=mBe(t,{columnsTotalWidth:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,rowsHeight:Q}),$e=F(),Me=M(()=>{const ke=p(L).length===0;return Xe(t.fixedData)?t.fixedData.length===0&&ke:ke});function q(ke){const{estimatedRowHeight:Ie,rowHeight:se,rowKey:ye}=t;return Ie?p(A)[p(L)[ke][ye]]||Ie:se}function de(){const{onEndReached:ke}=t;if(!ke)return;const{scrollTop:Ie}=p(w),se=p(Q),ye=p(Ce),Ae=se-(Ie+ye)+t.hScrollbarSize;p(E)>=0&&se===Ie+p(K)-p(he)&&ke(Ae)}return Fe(()=>t.expandedRowKeys,ke=>C.value=ke,{deep:!0}),{columns:i,containerRef:$e,mainTableRef:e,leftTableRef:n,rightTableRef:r,isDynamic:T,isResetting:P,isScrolling:S,hasFixedColumns:u,columnsStyles:o,columnsTotalWidth:a,data:L,expandedRowKeys:C,depthMap:X,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,mainColumns:c,bodyWidth:W,emptyStyle:ie,rootStyle:ee,headerWidth:_e,footerHeight:U,mainTableHeight:K,fixedTableHeight:G,leftTableWidth:oe,rightTableWidth:ne,showEmpty:Me,getRowHeight:q,onColumnSorted:d,onRowHovered:z,onRowExpanded:$,onRowsRendered:I,onRowHeightChange:N,scrollTo:f,scrollToLeft:h,scrollToTop:g,scrollToRow:m,onScroll:y,onVerticalScroll:b}}const oN=Symbol("tableV2"),GU=String,Nb={type:we(Array),required:!0},aN={type:we(Array)},KU={...aN,required:!0},yBe=String,zB={type:we(Array),default:()=>ei([])},wh={type:Number,required:!0},JU={type:we([String,Number,Symbol]),default:"id"},WB={type:we(Object)},Lh=Ze({class:String,columns:Nb,columnsStyles:{type:we(Object),required:!0},depth:Number,expandColumnKey:yBe,estimatedRowHeight:{...Wh.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:we(Function)},onRowHover:{type:we(Function)},onRowHeightChange:{type:we(Function)},rowData:{type:we(Object),required:!0},rowEventHandlers:{type:we(Object)},rowIndex:{type:Number,required:!0},rowKey:JU,style:{type:we(Object)}}),FT={type:Number,required:!0},sN=Ze({class:String,columns:Nb,fixedHeaderData:{type:we(Array)},headerData:{type:we(Array),required:!0},headerHeight:{type:we([Number,Array]),default:50},rowWidth:FT,rowHeight:{type:Number,default:50},height:FT,width:FT}),R1=Ze({columns:Nb,data:KU,fixedData:aN,estimatedRowHeight:Lh.estimatedRowHeight,width:wh,height:wh,headerWidth:wh,headerHeight:sN.headerHeight,bodyWidth:wh,rowHeight:wh,cache:bU.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:Wh.scrollbarAlwaysOn,scrollbarStartGap:Wh.scrollbarStartGap,scrollbarEndGap:Wh.scrollbarEndGap,class:GU,style:WB,containerStyle:WB,getRowHeight:{type:we(Function),required:!0},rowKey:Lh.rowKey,onRowsRendered:{type:we(Function)},onScroll:{type:we(Function)}}),bBe=Ze({cache:R1.cache,estimatedRowHeight:Lh.estimatedRowHeight,rowKey:JU,headerClass:{type:we([String,Function])},headerProps:{type:we([Object,Function])},headerCellProps:{type:we([Object,Function])},headerHeight:sN.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:we([String,Function])},rowProps:{type:we([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:we([Object,Function])},columns:Nb,data:KU,dataGetter:{type:we(Function)},fixedData:aN,expandColumnKey:Lh.expandColumnKey,expandedRowKeys:zB,defaultExpandedRowKeys:zB,class:GU,fixed:Boolean,style:{type:we(Object)},width:wh,height:wh,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:Wh.hScrollbarSize,vScrollbarSize:Wh.vScrollbarSize,scrollbarAlwaysOn:wU.alwaysOn,sortBy:{type:we(Object),default:()=>({})},sortState:{type:we(Object),default:void 0},onColumnSort:{type:we(Function)},onExpandedRowsChange:{type:we(Function)},onEndReached:{type:we(Function)},onRowExpand:Lh.onRowExpand,onScroll:R1.onScroll,onRowsRendered:R1.onRowsRendered,rowEventHandlers:Lh.rowEventHandlers}),_Be="ElTableV2Header",OBe=ue({name:_Be,props:sN,setup(t,{slots:e,expose:n}){const r=Qe("table-v2"),i=ht("tableV2GridScrollLeft"),o=F(),a=M(()=>Hd({width:t.width,height:t.height})),s=M(()=>Hd({width:t.rowWidth,height:t.height})),l=M(()=>No(p(t.headerHeight))),u=f=>{const h=p(o);xt(()=>{h!=null&&h.scroll&&h.scroll({left:f})})},c=()=>{const f=r.e("fixed-header-row"),{columns:h,fixedHeaderData:g,rowHeight:m}=t;return g==null?void 0:g.map((y,b)=>{var w;const O=Hd({height:m,width:"100%"});return(w=e.fixed)==null?void 0:w.call(e,{class:f,columns:h,rowData:y,rowIndex:-(b+1),style:O})})},d=()=>{const f=r.e("dynamic-header-row"),{columns:h}=t;return p(l).map((g,m)=>{var y;const b=Hd({width:"100%",height:g});return(y=e.dynamic)==null?void 0:y.call(e,{class:f,columns:h,headerIndex:m,style:b})})};return ac(()=>{i!=null&&i.value&&u(i.value)}),n({scrollToLeft:u}),()=>{if(!(t.height<=0))return B("div",{ref:o,class:t.class,style:p(a),role:"rowgroup"},[B("div",{style:p(s),class:r.e("header")},[d(),c()])])}}});var wBe=OBe;const xBe=({atXEndEdge:t,atXStartEdge:e,atYEndEdge:n,atYStartEdge:r},i)=>{let o=null,a=0,s=0;const l=(c,d)=>{const f=c<=0&&e.value||c>=0&&t.value,h=d<=0&&r.value||d>=0&&n.value;return f&&h};return{hasReachedEdge:l,onWheel:c=>{ip(o);let d=c.deltaX,f=c.deltaY;Math.abs(d)>Math.abs(f)?f=0:d=0,c.shiftKey&&f!==0&&(d=f,f=0),!(l(a,s)&&l(a+d,s+f))&&(a+=d,s+=f,c.preventDefault(),o=bf(()=>{i(a,s),a=0,s=0}))}}},eX=({name:t,clearCache:e,getColumnPosition:n,getColumnStartIndexForOffset:r,getColumnStopIndexForStartIndex:i,getEstimatedTotalHeight:o,getEstimatedTotalWidth:a,getColumnOffset:s,getRowOffset:l,getRowPosition:u,getRowStartIndexForOffset:c,getRowStopIndexForStartIndex:d,initCache:f,injectToInstance:h,validateProps:g})=>ue({name:t!=null?t:"ElVirtualList",props:Wh,emits:[xw,Sw],setup(m,{emit:y,expose:b,slots:w}){const O=Qe("vl");g(m);const x=tn(),S=F(f(m,x));h==null||h(x,S);const C=F(),E=F(),T=F(),P=F(null),A=F({isScrolling:!1,scrollLeft:Et(m.initScrollLeft)?m.initScrollLeft:0,scrollTop:Et(m.initScrollTop)?m.initScrollTop:0,updateRequested:!1,xAxisScrollDir:gg,yAxisScrollDir:gg}),D=mU(),$=M(()=>Number.parseInt(`${m.height}`,10)),N=M(()=>Number.parseInt(`${m.width}`,10)),z=M(()=>{const{totalColumn:ye,totalRow:Ae,columnCache:Z}=m,{isScrolling:te,xAxisScrollDir:le,scrollLeft:Te}=p(A);if(ye===0||Ae===0)return[0,0,0,0];const pe=r(m,Te,p(S)),Oe=i(m,pe,Te,p(S)),Re=!te||le===Cw?Math.max(1,Z):1,je=!te||le===gg?Math.max(1,Z):1;return[Math.max(0,pe-Re),Math.max(0,Math.min(ye-1,Oe+je)),pe,Oe]}),I=M(()=>{const{totalColumn:ye,totalRow:Ae,rowCache:Z}=m,{isScrolling:te,yAxisScrollDir:le,scrollTop:Te}=p(A);if(ye===0||Ae===0)return[0,0,0,0];const pe=c(m,Te,p(S)),Oe=d(m,pe,Te,p(S)),Re=!te||le===Cw?Math.max(1,Z):1,je=!te||le===gg?Math.max(1,Z):1;return[Math.max(0,pe-Re),Math.max(0,Math.min(Ae-1,Oe+je)),pe,Oe]}),L=M(()=>o(m,p(S))),X=M(()=>a(m,p(S))),Q=M(()=>{var ye;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:m.direction,height:Et(m.height)?`${m.height}px`:m.height,width:Et(m.width)?`${m.width}px`:m.width},(ye=m.style)!=null?ye:{}]}),W=M(()=>{const ye=`${p(X)}px`;return{height:`${p(L)}px`,pointerEvents:p(A).isScrolling?"none":void 0,width:ye}}),G=()=>{const{totalColumn:ye,totalRow:Ae}=m;if(ye>0&&Ae>0){const[Oe,Re,je,Ke]=p(z),[Je,at,kt,jt]=p(I);y(xw,{columnCacheStart:Oe,columnCacheEnd:Re,rowCacheStart:Je,rowCacheEnd:at,columnVisibleStart:je,columnVisibleEnd:Ke,rowVisibleStart:kt,rowVisibleEnd:jt})}const{scrollLeft:Z,scrollTop:te,updateRequested:le,xAxisScrollDir:Te,yAxisScrollDir:pe}=p(A);y(Sw,{xAxisScrollDir:Te,scrollLeft:Z,yAxisScrollDir:pe,scrollTop:te,updateRequested:le})},K=ye=>{const{clientHeight:Ae,clientWidth:Z,scrollHeight:te,scrollLeft:le,scrollTop:Te,scrollWidth:pe}=ye.currentTarget,Oe=p(A);if(Oe.scrollTop===Te&&Oe.scrollLeft===le)return;let Re=le;if(TB(m.direction))switch(Tw()){case S0:Re=-le;break;case tN:Re=pe-Z-le;break}A.value={...Oe,isScrolling:!0,scrollLeft:Re,scrollTop:Math.max(0,Math.min(Te,te-Ae)),updateRequested:!0,xAxisScrollDir:Nh(Oe.scrollLeft,Re),yAxisScrollDir:Nh(Oe.scrollTop,Te)},xt(()=>ee()),he(),G()},oe=(ye,Ae)=>{const Z=p($),te=(L.value-Z)/Ae*ye;Ce({scrollTop:Math.min(L.value-Z,te)})},ne=(ye,Ae)=>{const Z=p(N),te=(X.value-Z)/Ae*ye;Ce({scrollLeft:Math.min(X.value-Z,te)})},{onWheel:_e}=xBe({atXStartEdge:M(()=>A.value.scrollLeft<=0),atXEndEdge:M(()=>A.value.scrollLeft>=X.value-p(N)),atYStartEdge:M(()=>A.value.scrollTop<=0),atYEndEdge:M(()=>A.value.scrollTop>=L.value-p($))},(ye,Ae)=>{var Z,te,le,Te;(te=(Z=E.value)==null?void 0:Z.onMouseUp)==null||te.call(Z),(Te=(le=T.value)==null?void 0:le.onMouseUp)==null||Te.call(le);const pe=p(N),Oe=p($);Ce({scrollLeft:Math.min(A.value.scrollLeft+ye,X.value-pe),scrollTop:Math.min(A.value.scrollTop+Ae,L.value-Oe)})});sr(C,"wheel",_e,{passive:!1});const Ce=({scrollLeft:ye=A.value.scrollLeft,scrollTop:Ae=A.value.scrollTop})=>{ye=Math.max(ye,0),Ae=Math.max(Ae,0);const Z=p(A);Ae===Z.scrollTop&&ye===Z.scrollLeft||(A.value={...Z,xAxisScrollDir:Nh(Z.scrollLeft,ye),yAxisScrollDir:Nh(Z.scrollTop,Ae),scrollLeft:ye,scrollTop:Ae,updateRequested:!0},xt(()=>ee()),he(),G())},U=(ye=0,Ae=0,Z=ol)=>{const te=p(A);Ae=Math.max(0,Math.min(Ae,m.totalColumn-1)),ye=Math.max(0,Math.min(ye,m.totalRow-1));const le=Gz(O.namespace.value),Te=p(S),pe=o(m,Te),Oe=a(m,Te);Ce({scrollLeft:s(m,Ae,Z,te.scrollLeft,Te,Oe>m.width?le:0),scrollTop:l(m,ye,Z,te.scrollTop,Te,pe>m.height?le:0)})},ie=(ye,Ae)=>{const{columnWidth:Z,direction:te,rowHeight:le}=m,Te=D.value(e&&Z,e&&le,e&&te),pe=`${ye},${Ae}`;if(Mn(Te,pe))return Te[pe];{const[,Oe]=n(m,Ae,p(S)),Re=p(S),je=TB(te),[Ke,Je]=u(m,ye,Re),[at]=n(m,Ae,Re);return Te[pe]={position:"absolute",left:je?void 0:`${Oe}px`,right:je?`${Oe}px`:void 0,top:`${Je}px`,height:`${Ke}px`,width:`${at}px`},Te[pe]}},ee=()=>{A.value.isScrolling=!1,xt(()=>{D.value(-1,null,null)})};Ft(()=>{if(!wn)return;const{initScrollLeft:ye,initScrollTop:Ae}=m,Z=p(C);Z&&(Et(ye)&&(Z.scrollLeft=ye),Et(Ae)&&(Z.scrollTop=Ae)),G()});const he=()=>{const{direction:ye}=m,{scrollLeft:Ae,scrollTop:Z,updateRequested:te}=p(A),le=p(C);if(te&&le){if(ye===Rg)switch(Tw()){case S0:{le.scrollLeft=-Ae;break}case eN:{le.scrollLeft=Ae;break}default:{const{clientWidth:Te,scrollWidth:pe}=le;le.scrollLeft=pe-Te-Ae;break}}else le.scrollLeft=Math.max(0,Ae);le.scrollTop=Math.max(0,Z)}},{resetAfterColumnIndex:$e,resetAfterRowIndex:Me,resetAfter:q}=x.proxy;b({windowRef:C,innerRef:P,getItemStyleCache:D,scrollTo:Ce,scrollToItem:U,states:A,resetAfterColumnIndex:$e,resetAfterRowIndex:Me,resetAfter:q});const de=()=>{const{scrollbarAlwaysOn:ye,scrollbarStartGap:Ae,scrollbarEndGap:Z,totalColumn:te,totalRow:le}=m,Te=p(N),pe=p($),Oe=p(X),Re=p(L),{scrollLeft:je,scrollTop:Ke}=p(A),Je=Tt(Gk,{ref:E,alwaysOn:ye,startGap:Ae,endGap:Z,class:O.e("horizontal"),clientSize:Te,layout:"horizontal",onScroll:ne,ratio:Te*100/Oe,scrollFrom:je/(Oe-Te),total:le,visible:!0}),at=Tt(Gk,{ref:T,alwaysOn:ye,startGap:Ae,endGap:Z,class:O.e("vertical"),clientSize:pe,layout:"vertical",onScroll:oe,ratio:pe*100/Re,scrollFrom:Ke/(Re-pe),total:te,visible:!0});return{horizontalScrollbar:Je,verticalScrollbar:at}},ke=()=>{var ye;const[Ae,Z]=p(z),[te,le]=p(I),{data:Te,totalColumn:pe,totalRow:Oe,useIsScrolling:Re,itemKey:je}=m,Ke=[];if(Oe>0&&pe>0)for(let Je=te;Je<=le;Je++)for(let at=Ae;at<=Z;at++){const kt=je({columnIndex:at,data:Te,rowIndex:Je});Ke.push(Tt(dt,{key:kt},(ye=w.default)==null?void 0:ye.call(w,{columnIndex:at,data:Te,isScrolling:Re?p(A).isScrolling:void 0,style:ie(Je,at),rowIndex:Je})))}return Ke},Ie=()=>{const ye=on(m.innerElement),Ae=ke();return[Tt(ye,{style:p(W),ref:P},Ot(ye)?Ae:{default:()=>Ae})]};return()=>{const ye=on(m.containerElement),{horizontalScrollbar:Ae,verticalScrollbar:Z}=de(),te=Ie();return Tt("div",{key:0,class:O.e("wrapper"),role:m.role},[Tt(ye,{class:m.className,style:p(Q),onScroll:K,ref:C},Ot(ye)?te:{default:()=>te}),Ae,Z])}}}),{max:Aw,min:tX,floor:nX}=Math,SBe={column:"columnWidth",row:"rowHeight"},uP={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Lc=(t,e,n,r)=>{const[i,o,a]=[n[r],t[SBe[r]],n[uP[r]]];if(e>a){let s=0;if(a>=0){const l=i[a];s=l.offset+l.size}for(let l=a+1;l<=e;l++){const u=o(l);i[l]={offset:s,size:u},s+=u}n[uP[r]]=e}return i[e]},rX=(t,e,n,r,i,o)=>{for(;n<=r;){const a=n+nX((r-n)/2),s=Lc(t,a,e,o).offset;if(s===i)return a;s<i?n=a+1:r=a-1}return Aw(0,n-1)},CBe=(t,e,n,r,i)=>{const o=i==="column"?t.totalColumn:t.totalRow;let a=1;for(;n<o&&Lc(t,n,e,i).offset<r;)n+=a,a*=2;return rX(t,e,nX(n/2),tX(n,o-1),r,i)},HB=(t,e,n,r)=>{const[i,o]=[e[r],e[uP[r]]];return(o>0?i[o].offset:0)>=n?rX(t,e,0,o,n,r):CBe(t,e,Aw(0,o),n,r)},iX=({totalRow:t},{estimatedRowHeight:e,lastVisitedRowIndex:n,row:r})=>{let i=0;if(n>=t&&(n=t-1),n>=0){const s=r[n];i=s.offset+s.size}const a=(t-n-1)*e;return i+a},oX=({totalColumn:t},{column:e,estimatedColumnWidth:n,lastVisitedColumnIndex:r})=>{let i=0;if(r>t&&(r=t-1),r>=0){const s=e[r];i=s.offset+s.size}const a=(t-r-1)*n;return i+a},EBe={column:oX,row:iX},UB=(t,e,n,r,i,o,a)=>{const[s,l]=[o==="row"?t.height:t.width,EBe[o]],u=Lc(t,e,i,o),c=l(t,i),d=Aw(0,tX(c-s,u.offset)),f=Aw(0,u.offset-s+a+u.size);switch(n===iC&&(r>=f-s&&r<=d+s?n=ol:n=ju),n){case w0:return d;case x0:return f;case ju:return Math.round(f+(d-f)/2);case ol:default:return r>=f&&r<=d?r:f>d||r<f?f:d}},TBe=eX({name:"ElDynamicSizeGrid",getColumnPosition:(t,e,n)=>{const r=Lc(t,e,n,"column");return[r.size,r.offset]},getRowPosition:(t,e,n)=>{const r=Lc(t,e,n,"row");return[r.size,r.offset]},getColumnOffset:(t,e,n,r,i,o)=>UB(t,e,n,r,i,"column",o),getRowOffset:(t,e,n,r,i,o)=>UB(t,e,n,r,i,"row",o),getColumnStartIndexForOffset:(t,e,n)=>HB(t,n,e,"column"),getColumnStopIndexForStartIndex:(t,e,n,r)=>{const i=Lc(t,e,r,"column"),o=n+t.width;let a=i.offset+i.size,s=e;for(;s<t.totalColumn-1&&a<o;)s++,a+=Lc(t,e,r,"column").size;return s},getEstimatedTotalHeight:iX,getEstimatedTotalWidth:oX,getRowStartIndexForOffset:(t,e,n)=>HB(t,n,e,"row"),getRowStopIndexForStartIndex:(t,e,n,r)=>{const{totalRow:i,height:o}=t,a=Lc(t,e,r,"row"),s=n+o;let l=a.size+a.offset,u=e;for(;u<i-1&&l<s;)u++,l+=Lc(t,u,r,"row").size;return u},injectToInstance:(t,e)=>{const n=({columnIndex:o,rowIndex:a},s)=>{var l,u;s=ar(s)?!0:s,Et(o)&&(e.value.lastVisitedColumnIndex=Math.min(e.value.lastVisitedColumnIndex,o-1)),Et(a)&&(e.value.lastVisitedRowIndex=Math.min(e.value.lastVisitedRowIndex,a-1)),(l=t.exposed)==null||l.getItemStyleCache.value(-1,null,null),s&&((u=t.proxy)==null||u.$forceUpdate())},r=(o,a)=>{n({columnIndex:o},a)},i=(o,a)=>{n({rowIndex:o},a)};Object.assign(t.proxy,{resetAfterColumnIndex:r,resetAfterRowIndex:i,resetAfter:n})},initCache:({estimatedColumnWidth:t=Hk,estimatedRowHeight:e=Hk})=>({column:{},estimatedColumnWidth:t,estimatedRowHeight:e,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:t,rowHeight:e})=>{}}),kBe=eX({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:t},e)=>[t,e*t],getRowPosition:({rowHeight:t},e)=>[t,e*t],getEstimatedTotalHeight:({totalRow:t,rowHeight:e})=>e*t,getEstimatedTotalWidth:({totalColumn:t,columnWidth:e})=>e*t,getColumnOffset:({totalColumn:t,columnWidth:e,width:n},r,i,o,a,s)=>{n=Number(n);const l=Math.max(0,t*e-n),u=Math.min(l,r*e),c=Math.max(0,r*e-n+s+e);switch(i==="smart"&&(o>=c-n&&o<=u+n?i=ol:i=ju),i){case w0:return u;case x0:return c;case ju:{const d=Math.round(c+(u-c)/2);return d<Math.ceil(n/2)?0:d>l+Math.floor(n/2)?l:d}case ol:default:return o>=c&&o<=u?o:c>u||o<c?c:u}},getRowOffset:({rowHeight:t,height:e,totalRow:n},r,i,o,a,s)=>{e=Number(e);const l=Math.max(0,n*t-e),u=Math.min(l,r*t),c=Math.max(0,r*t-e+s+t);switch(i===iC&&(o>=c-e&&o<=u+e?i=ol:i=ju),i){case w0:return u;case x0:return c;case ju:{const d=Math.round(c+(u-c)/2);return d<Math.ceil(e/2)?0:d>l+Math.floor(e/2)?l:d}case ol:default:return o>=c&&o<=u?o:c>u||o<c?c:u}},getColumnStartIndexForOffset:({columnWidth:t,totalColumn:e},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getColumnStopIndexForStartIndex:({columnWidth:t,totalColumn:e,width:n},r,i)=>{const o=r*t,a=Math.ceil((n+i-o)/t);return Math.max(0,Math.min(e-1,r+a-1))},getRowStartIndexForOffset:({rowHeight:t,totalRow:e},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getRowStopIndexForStartIndex:({rowHeight:t,totalRow:e,height:n},r,i)=>{const o=r*t,a=Math.ceil((n+i-o)/t);return Math.max(0,Math.min(e-1,r+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:t,rowHeight:e})=>{}}),PBe="ElTableV2Grid",ABe=t=>{const e=F(),n=F(),r=F(0),i=M(()=>{const{data:y,rowHeight:b,estimatedRowHeight:w}=t;if(!w)return y.length*b}),o=M(()=>{const{fixedData:y,rowHeight:b}=t;return((y==null?void 0:y.length)||0)*b}),a=M(()=>M1(t.headerHeight)),s=M(()=>{const{height:y}=t;return Math.max(0,y-p(a)-p(o))}),l=M(()=>p(a)+p(o)>0),u=({data:y,rowIndex:b})=>y[b][t.rowKey];function c({rowCacheStart:y,rowCacheEnd:b,rowVisibleStart:w,rowVisibleEnd:O}){var x;(x=t.onRowsRendered)==null||x.call(t,{rowCacheStart:y,rowCacheEnd:b,rowVisibleStart:w,rowVisibleEnd:O})}function d(y,b){var w;(w=n.value)==null||w.resetAfterRowIndex(y,b)}function f(y,b){const w=p(e),O=p(n);Jt(y)?(w==null||w.scrollToLeft(y.scrollLeft),r.value=y.scrollLeft,O==null||O.scrollTo(y)):(w==null||w.scrollToLeft(y),r.value=y,O==null||O.scrollTo({scrollLeft:y,scrollTop:b}))}function h(y){var b;(b=p(n))==null||b.scrollTo({scrollTop:y})}function g(y,b){var w;(w=p(n))==null||w.scrollToItem(y,1,b)}function m(){var y,b;(y=p(n))==null||y.$forceUpdate(),(b=p(e))==null||b.$forceUpdate()}return{bodyRef:n,forceUpdate:m,fixedRowHeight:o,gridHeight:s,hasHeader:l,headerHeight:a,headerRef:e,totalHeight:i,itemKey:u,onItemRendered:c,resetAfterRowIndex:d,scrollTo:f,scrollToTop:h,scrollToRow:g,scrollLeft:r}},MBe=ue({name:PBe,props:R1,setup(t,{slots:e,expose:n}){const{ns:r}=ht(oN),{bodyRef:i,fixedRowHeight:o,gridHeight:a,hasHeader:s,headerRef:l,headerHeight:u,totalHeight:c,forceUpdate:d,itemKey:f,onItemRendered:h,resetAfterRowIndex:g,scrollTo:m,scrollToTop:y,scrollToRow:b,scrollLeft:w}=ABe(t);gn("tableV2GridScrollLeft",w),n({forceUpdate:d,totalHeight:c,scrollTo:m,scrollToTop:y,scrollToRow:b,resetAfterRowIndex:g});const O=()=>t.bodyWidth;return()=>{const{cache:x,columns:S,data:C,fixedData:E,useIsScrolling:T,scrollbarAlwaysOn:P,scrollbarEndGap:A,scrollbarStartGap:D,style:$,rowHeight:N,bodyWidth:z,estimatedRowHeight:I,headerWidth:L,height:X,width:Q,getRowHeight:W,onScroll:G}=t,K=Et(I),oe=K?TBe:kBe,ne=p(u);return B("div",{role:"table",class:[r.e("table"),t.class],style:$},[B(oe,{ref:i,data:C,useIsScrolling:T,itemKey:f,columnCache:0,columnWidth:K?O:z,totalColumn:1,totalRow:C.length,rowCache:x,rowHeight:K?W:N,width:Q,height:p(a),class:r.e("body"),role:"rowgroup",scrollbarStartGap:D,scrollbarEndGap:A,scrollbarAlwaysOn:P,onScroll:G,onItemRendered:h,perfMode:!1},{default:_e=>{var Ce;const U=C[_e.rowIndex];return(Ce=e.row)==null?void 0:Ce.call(e,{..._e,columns:S,rowData:U})}}),p(s)&&B(wBe,{ref:l,class:r.e("header-wrapper"),columns:S,headerData:C,headerHeight:t.headerHeight,fixedHeaderData:E,rowWidth:L,rowHeight:N,width:Q,height:Math.min(ne+p(o),X)},{dynamic:e.header,fixed:e.row})])}}});var lN=MBe;function RBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Jr(t)}const $Be=(t,{slots:e})=>{const{mainTableRef:n,...r}=t;return B(lN,an({ref:n},r),RBe(e)?e:{default:()=>[e]})};var NBe=$Be;function DBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Jr(t)}const LBe=(t,{slots:e})=>{if(!t.columns.length)return;const{leftTableRef:n,...r}=t;return B(lN,an({ref:n},r),DBe(e)?e:{default:()=>[e]})};var IBe=LBe;function BBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Jr(t)}const FBe=(t,{slots:e})=>{if(!t.columns.length)return;const{rightTableRef:n,...r}=t;return B(lN,an({ref:n},r),BBe(e)?e:{default:()=>[e]})};var VBe=FBe;const jBe=t=>{const{isScrolling:e}=ht(oN),n=F(!1),r=F(),i=M(()=>Et(t.estimatedRowHeight)&&t.rowIndex>=0),o=(l=!1)=>{const u=p(r);if(!u)return;const{columns:c,onRowHeightChange:d,rowKey:f,rowIndex:h,style:g}=t,{height:m}=u.getBoundingClientRect();n.value=!0,xt(()=>{if(l||m!==Number.parseInt(g.height)){const y=c[0],b=(y==null?void 0:y.placeholderSign)===k0;d==null||d({rowKey:f,height:m,rowIndex:h},y&&!b&&y.fixed)}})},a=M(()=>{const{rowData:l,rowIndex:u,rowKey:c,onRowHover:d}=t,f=t.rowEventHandlers||{},h={};return Object.entries(f).forEach(([g,m])=>{St(m)&&(h[g]=y=>{m({event:y,rowData:l,rowIndex:u,rowKey:c})})}),d&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:g,hovered:m})=>{const y=h[g];h[g]=b=>{d({event:b,hovered:m,rowData:l,rowIndex:u,rowKey:c}),y==null||y(b)}}),h}),s=l=>{const{onRowExpand:u,rowData:c,rowIndex:d,rowKey:f}=t;u==null||u({expanded:l,rowData:c,rowIndex:d,rowKey:f})};return Ft(()=>{p(i)&&o(!0)}),{isScrolling:e,measurable:i,measured:n,rowRef:r,eventHandlers:a,onExpand:s}},QBe="ElTableV2TableRow",zBe=ue({name:QBe,props:Lh,setup(t,{expose:e,slots:n,attrs:r}){const{eventHandlers:i,isScrolling:o,measurable:a,measured:s,rowRef:l,onExpand:u}=jBe(t);return e({onExpand:u}),()=>{const{columns:c,columnsStyles:d,expandColumnKey:f,depth:h,rowData:g,rowIndex:m,style:y}=t;let b=c.map((w,O)=>{const x=Xe(g.children)&&g.children.length>0&&w.key===f;return n.cell({column:w,columns:c,columnIndex:O,depth:h,style:d[w.key],rowData:g,rowIndex:m,isScrolling:p(o),expandIconProps:x?{rowData:g,rowIndex:m,onExpand:u}:void 0})});if(n.row&&(b=n.row({cells:b.map(w=>Xe(w)&&w.length===1?w[0]:w),style:y,columns:c,depth:h,rowData:g,rowIndex:m,isScrolling:p(o)})),p(a)){const{height:w,...O}=y||{},x=p(s);return B("div",an({ref:l,class:t.class,style:x?y:O,role:"row"},r,p(i)),[b])}return B("div",an(r,{ref:l,class:t.class,style:y,role:"row"},p(i)),[b])}}});var WBe=zBe;function HBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Jr(t)}const UBe=(t,{slots:e})=>{const{columns:n,columnsStyles:r,depthMap:i,expandColumnKey:o,expandedRowKeys:a,estimatedRowHeight:s,hasFixedColumns:l,rowData:u,rowIndex:c,style:d,isScrolling:f,rowProps:h,rowClass:g,rowKey:m,rowEventHandlers:y,ns:b,onRowHovered:w,onRowExpanded:O}=t,x=op(g,{columns:n,rowData:u,rowIndex:c},""),S=op(h,{columns:n,rowData:u,rowIndex:c}),C=u[m],E=i[C]||0,T=Boolean(o),P=c<0,A=[b.e("row"),x,{[b.e(`row-depth-${E}`)]:T&&c>=0,[b.is("expanded")]:T&&a.includes(C),[b.is("fixed")]:!E&&P,[b.is("customized")]:Boolean(e.row)}],D=l?w:void 0,$={...S,columns:n,columnsStyles:r,class:A,depth:E,expandColumnKey:o,estimatedRowHeight:P?void 0:s,isScrolling:f,rowIndex:c,rowData:u,rowKey:C,rowEventHandlers:y,style:d};return B(WBe,an($,{onRowExpand:O,onMouseenter:I=>{D==null||D({hovered:!0,rowKey:C,event:I,rowData:u,rowIndex:c})},onMouseleave:I=>{D==null||D({hovered:!1,rowKey:C,event:I,rowData:u,rowIndex:c})},rowkey:C}),HBe(e)?e:{default:()=>[e]})};var XBe=UBe;const uN=(t,{slots:e})=>{var n;const{cellData:r,style:i}=t,o=((n=r==null?void 0:r.toString)==null?void 0:n.call(r))||"",a=Ee(e,"default",t,()=>[o]);return B("div",{class:t.class,title:o,style:i},[a])};uN.displayName="ElTableV2Cell";uN.inheritAttrs=!1;var ZBe=uN;const qBe=t=>{const{expanded:e,expandable:n,onExpand:r,style:i,size:o}=t,a={onClick:n?()=>r(!e):void 0,class:t.class};return B(mt,an(a,{size:o,style:i}),{default:()=>[B(_a,null,null)]})};var YBe=qBe;const aX=({columns:t,column:e,columnIndex:n,depth:r,expandIconProps:i,isScrolling:o,rowData:a,rowIndex:s,style:l,expandedRowKeys:u,ns:c,cellProps:d,expandColumnKey:f,indentSize:h,iconSize:g,rowKey:m},{slots:y})=>{const b=Hd(l);if(e.placeholderSign===k0)return B("div",{class:c.em("row-cell","placeholder"),style:b},null);const{cellRenderer:w,dataKey:O,dataGetter:x}=e,S=St(x)?x({columns:t,column:e,columnIndex:n,rowData:a,rowIndex:s}):Kr(a,O!=null?O:""),C=op(d,{cellData:S,columns:t,column:e,columnIndex:n,rowIndex:s,rowData:a}),E={class:c.e("cell-text"),columns:t,column:e,columnIndex:n,cellData:S,isScrolling:o,rowData:a,rowIndex:s},T=YU(w),P=T?T(E):Ee(y,"default",E,()=>[B(ZBe,E,null)]),A=[c.e("row-cell"),e.class,e.align===T0.CENTER&&c.is("align-center"),e.align===T0.RIGHT&&c.is("align-right")],D=s>=0&&f&&e.key===f,$=s>=0&&u.includes(a[m]);let N;const z=`margin-inline-start: ${r*h}px;`;return D&&(Jt(i)?N=B(YBe,an(i,{class:[c.e("expand-icon"),c.is("expanded",$)],size:g,expanded:$,style:z,expandable:!0}),null):N=B("div",{style:[z,`width: ${g}px; height: ${g}px;`].join(" ")},null)),B("div",an({class:A,style:b},C,{role:"cell"}),[N,P])};aX.inheritAttrs=!1;var XB=aX;const GBe=Ze({class:String,columns:Nb,columnsStyles:{type:we(Object),required:!0},headerIndex:Number,style:{type:we(Object)}}),KBe=ue({name:"ElTableV2HeaderRow",props:GBe,setup(t,{slots:e}){return()=>{const{columns:n,columnsStyles:r,headerIndex:i,style:o}=t;let a=n.map((s,l)=>e.cell({columns:n,column:s,columnIndex:l,headerIndex:i,style:r[s.key]}));return e.header&&(a=e.header({cells:a.map(s=>Xe(s)&&s.length===1?s[0]:s),columns:n,headerIndex:i})),B("div",{class:t.class,style:o,role:"row"},[a])}}});var JBe=KBe;function e8e(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Jr(t)}const t8e=({columns:t,columnsStyles:e,headerIndex:n,style:r,headerClass:i,headerProps:o,ns:a},{slots:s})=>{const l={columns:t,headerIndex:n},u=[a.e("header-row"),op(i,l,""),{[a.is("customized")]:Boolean(s.header)}],c={...op(o,l),columnsStyles:e,class:u,columns:t,headerIndex:n,style:r};return B(JBe,c,e8e(s)?s:{default:()=>[s]})};var n8e=t8e;const cN=(t,{slots:e})=>Ee(e,"default",t,()=>{var n,r;return[B("div",{class:t.class,title:(n=t.column)==null?void 0:n.title},[(r=t.column)==null?void 0:r.title])]});cN.displayName="ElTableV2HeaderCell";cN.inheritAttrs=!1;var r8e=cN;const i8e=t=>{const{sortOrder:e}=t;return B(mt,{size:14,class:t.class},{default:()=>[e===E0.ASC?B(aEe,null,null):B(iEe,null,null)]})};var o8e=i8e;const a8e=(t,{slots:e})=>{const{column:n,ns:r,style:i,onColumnSorted:o}=t,a=Hd(i);if(n.placeholderSign===k0)return B("div",{class:r.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:s,headerClass:l,sortable:u}=n,c={...t,class:r.e("header-cell-text")},d=YU(s),f=d?d(c):Ee(e,"default",c,()=>[B(r8e,c,null)]),{sortBy:h,sortState:g,headerCellProps:m}=t;let y,b;if(g){const x=g[n.key];y=Boolean(lP[x]),b=y?x:E0.ASC}else y=n.key===h.key,b=y?h.order:E0.ASC;const w=[r.e("header-cell"),op(l,t,""),n.align===T0.CENTER&&r.is("align-center"),n.align===T0.RIGHT&&r.is("align-right"),u&&r.is("sortable")],O={...op(m,t),onClick:n.sortable?o:void 0,class:w,style:a,["data-key"]:n.key};return B("div",an(O,{role:"columnheader"}),[f,u&&B(o8e,{class:[r.e("sort-icon"),y&&r.is("sorting")],sortOrder:b},null)])};var ZB=a8e;const sX=(t,{slots:e})=>{var n;return B("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};sX.displayName="ElTableV2Footer";var s8e=sX;const lX=(t,{slots:e})=>{const n=Ee(e,"default",{},()=>[B(eU,null,null)]);return B("div",{class:t.class,style:t.style},[n])};lX.displayName="ElTableV2Empty";var l8e=lX;const uX=(t,{slots:e})=>{var n;return B("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};uX.displayName="ElTableV2Overlay";var u8e=uX;function Fv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Jr(t)}const c8e="ElTableV2",d8e=ue({name:c8e,props:bBe,setup(t,{slots:e,expose:n}){const r=Qe("table-v2"),{columnsStyles:i,fixedColumnsOnLeft:o,fixedColumnsOnRight:a,mainColumns:s,mainTableHeight:l,fixedTableHeight:u,leftTableWidth:c,rightTableWidth:d,data:f,depthMap:h,expandedRowKeys:g,hasFixedColumns:m,mainTableRef:y,leftTableRef:b,rightTableRef:w,isDynamic:O,isResetting:x,isScrolling:S,bodyWidth:C,emptyStyle:E,rootStyle:T,headerWidth:P,footerHeight:A,showEmpty:D,scrollTo:$,scrollToLeft:N,scrollToTop:z,scrollToRow:I,getRowHeight:L,onColumnSorted:X,onRowHeightChange:Q,onRowHovered:W,onRowExpanded:G,onRowsRendered:K,onScroll:oe,onVerticalScroll:ne}=vBe(t);return n({scrollTo:$,scrollToLeft:N,scrollToTop:z,scrollToRow:I}),gn(oN,{ns:r,isResetting:x,isScrolling:S}),()=>{const{cache:_e,cellProps:Ce,estimatedRowHeight:U,expandColumnKey:ie,fixedData:ee,headerHeight:he,headerClass:$e,headerProps:Me,headerCellProps:q,sortBy:de,sortState:ke,rowHeight:Ie,rowClass:se,rowEventHandlers:ye,rowKey:Ae,rowProps:Z,scrollbarAlwaysOn:te,indentSize:le,iconSize:Te,useIsScrolling:pe,vScrollbarSize:Oe,width:Re}=t,je=p(f),Ke={cache:_e,class:r.e("main"),columns:p(s),data:je,fixedData:ee,estimatedRowHeight:U,bodyWidth:p(C)+Oe,headerHeight:he,headerWidth:p(P),height:p(l),mainTableRef:y,rowKey:Ae,rowHeight:Ie,scrollbarAlwaysOn:te,scrollbarStartGap:2,scrollbarEndGap:Oe,useIsScrolling:pe,width:Re,getRowHeight:L,onRowsRendered:K,onScroll:oe},Je=p(c),at=p(u),kt={cache:_e,class:r.e("left"),columns:p(o),data:je,estimatedRowHeight:U,leftTableRef:b,rowHeight:Ie,bodyWidth:Je,headerWidth:Je,headerHeight:he,height:at,rowKey:Ae,scrollbarAlwaysOn:te,scrollbarStartGap:2,scrollbarEndGap:Oe,useIsScrolling:pe,width:Je,getRowHeight:L,onScroll:ne},Pe=p(d)+Oe,nt={cache:_e,class:r.e("right"),columns:p(a),data:je,estimatedRowHeight:U,rightTableRef:w,rowHeight:Ie,bodyWidth:Pe,headerWidth:Pe,headerHeight:he,height:at,rowKey:Ae,scrollbarAlwaysOn:te,scrollbarStartGap:2,scrollbarEndGap:Oe,width:Pe,style:`--${p(r.namespace)}-table-scrollbar-size: ${Oe}px`,useIsScrolling:pe,getRowHeight:L,onScroll:ne},fe=p(i),De={ns:r,depthMap:p(h),columnsStyles:fe,expandColumnKey:ie,expandedRowKeys:p(g),estimatedRowHeight:U,hasFixedColumns:p(m),rowProps:Z,rowClass:se,rowKey:Ae,rowEventHandlers:ye,onRowHovered:W,onRowExpanded:G,onRowHeightChange:Q},ce={cellProps:Ce,expandColumnKey:ie,indentSize:le,iconSize:Te,rowKey:Ae,expandedRowKeys:p(g),ns:r},qe={ns:r,headerClass:$e,headerProps:Me,columnsStyles:fe},Mt={ns:r,sortBy:de,sortState:ke,headerCellProps:q,onColumnSorted:X},Zt={row:zn=>B(XBe,an(zn,De),{row:e.row,cell:Ln=>{let Yt;return e.cell?B(XB,an(Ln,ce,{style:fe[Ln.column.key]}),Fv(Yt=e.cell(Ln))?Yt:{default:()=>[Yt]}):B(XB,an(Ln,ce,{style:fe[Ln.column.key]}),null)}}),header:zn=>B(n8e,an(zn,qe),{header:e.header,cell:Ln=>{let Yt;return e["header-cell"]?B(ZB,an(Ln,Mt,{style:fe[Ln.column.key]}),Fv(Yt=e["header-cell"](Ln))?Yt:{default:()=>[Yt]}):B(ZB,an(Ln,Mt,{style:fe[Ln.column.key]}),null)}})},Sn=[t.class,r.b(),r.e("root"),{[r.is("dynamic")]:p(O)}],kr={class:r.e("footer"),style:p(A)};return B("div",{class:Sn,style:p(T)},[B(NBe,Ke,Fv(Zt)?Zt:{default:()=>[Zt]}),B(IBe,kt,Fv(Zt)?Zt:{default:()=>[Zt]}),B(VBe,nt,Fv(Zt)?Zt:{default:()=>[Zt]}),e.footer&&B(s8e,kr,{default:e.footer}),p(D)&&B(l8e,{class:r.e("empty"),style:p(E)},{default:e.empty}),e.overlay&&B(u8e,{class:r.e("overlay")},{default:e.overlay})])}}});var f8e=d8e;const h8e=Ze({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:we(Function)}}),p8e=t=>{const e=F(),n=F(0),r=F(0);let i;return Ft(()=>{i=Hr(e,([o])=>{const{width:a,height:s}=o.contentRect,{paddingLeft:l,paddingRight:u,paddingTop:c,paddingBottom:d}=getComputedStyle(o.target),f=Number.parseInt(l)||0,h=Number.parseInt(u)||0,g=Number.parseInt(c)||0,m=Number.parseInt(d)||0;n.value=a-f-h,r.value=s-g-m}).stop}),pr(()=>{i==null||i()}),Fe([n,r],([o,a])=>{var s;(s=t.onResize)==null||s.call(t,{width:o,height:a})}),{sizer:e,width:n,height:r}},g8e=ue({name:"ElAutoResizer",props:h8e,setup(t,{slots:e}){const n=Qe("auto-resizer"),{height:r,width:i,sizer:o}=p8e(t),a={width:"100%",height:"100%"};return()=>{var s;return B("div",{ref:o,class:n.b(),style:a},[(s=e.default)==null?void 0:s.call(e,{height:r.value,width:i.value})])}}});var m8e=g8e;const v8e=Vt(f8e),y8e=Vt(m8e),oC=Symbol("tabsRootContextKey"),b8e=Ze({tabs:{type:we(Array),default:()=>ei([])}}),cX="ElTabBar",_8e=ue({name:cX}),O8e=ue({..._8e,props:b8e,setup(t,{expose:e}){const n=t,r=tn(),i=ht(oC);i||Wi(cX,"<el-tabs><el-tab-bar /></el-tabs>");const o=Qe("tabs"),a=F(),s=F(),l=()=>{let h=0,g=0;const m=["top","bottom"].includes(i.props.tabPosition)?"width":"height",y=m==="width"?"x":"y",b=y==="x"?"left":"top";return n.tabs.every(w=>{var O,x;const S=(x=(O=r.parent)==null?void 0:O.refs)==null?void 0:x[`tab-${w.uid}`];if(!S)return!1;if(!w.active)return!0;h=S[`offset${Du(b)}`],g=S[`client${Du(m)}`];const C=window.getComputedStyle(S);return m==="width"&&(g-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),h+=Number.parseFloat(C.paddingLeft)),!1}),{[m]:`${g}px`,transform:`translate${Du(y)}(${h}px)`}},u=()=>s.value=l(),c=[],d=()=>{var h;c.forEach(m=>m.stop()),c.length=0;const g=(h=r.parent)==null?void 0:h.refs;if(!!g){for(const m in g)if(m.startsWith("tab-")){const y=g[m];y&&c.push(Hr(y,u))}}};Fe(()=>n.tabs,async()=>{await xt(),u(),d()},{immediate:!0});const f=Hr(a,()=>u());return pr(()=>{c.forEach(h=>h.stop()),c.length=0,f.stop()}),e({ref:a,update:u}),(h,g)=>(R(),Y("div",{ref_key:"barRef",ref:a,class:V([p(o).e("active-bar"),p(o).is(p(i).props.tabPosition)]),style:vt(s.value)},null,6))}});var w8e=Ye(O8e,[["__file","tab-bar.vue"]]);const x8e=Ze({panes:{type:we(Array),default:()=>ei([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),S8e={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},qB="ElTabNav",C8e=ue({name:qB,props:x8e,emits:S8e,setup(t,{expose:e,emit:n}){const r=ht(oC);r||Wi(qB,"<el-tabs><tab-nav /></el-tabs>");const i=Qe("tabs"),o=wSe(),a=NSe(),s=F(),l=F(),u=F(),c=F(),d=F(!1),f=F(0),h=F(!1),g=F(!0),m=M(()=>["top","bottom"].includes(r.props.tabPosition)?"width":"height"),y=M(()=>({transform:`translate${m.value==="width"?"X":"Y"}(-${f.value}px)`})),b=()=>{if(!s.value)return;const T=s.value[`offset${Du(m.value)}`],P=f.value;if(!P)return;const A=P>T?P-T:0;f.value=A},w=()=>{if(!s.value||!l.value)return;const T=l.value[`offset${Du(m.value)}`],P=s.value[`offset${Du(m.value)}`],A=f.value;if(T-A<=P)return;const D=T-A>P*2?A+P:T-P;f.value=D},O=async()=>{const T=l.value;if(!d.value||!u.value||!s.value||!T)return;await xt();const P=u.value.querySelector(".is-active");if(!P)return;const A=s.value,D=["top","bottom"].includes(r.props.tabPosition),$=P.getBoundingClientRect(),N=A.getBoundingClientRect(),z=D?T.offsetWidth-N.width:T.offsetHeight-N.height,I=f.value;let L=I;D?($.left<N.left&&(L=I-(N.left-$.left)),$.right>N.right&&(L=I+$.right-N.right)):($.top<N.top&&(L=I-(N.top-$.top)),$.bottom>N.bottom&&(L=I+($.bottom-N.bottom))),L=Math.max(L,0),f.value=Math.min(L,z)},x=()=>{var T;if(!l.value||!s.value)return;t.stretch&&((T=c.value)==null||T.update());const P=l.value[`offset${Du(m.value)}`],A=s.value[`offset${Du(m.value)}`],D=f.value;A<P?(d.value=d.value||{},d.value.prev=D,d.value.next=D+A<P,P-D<A&&(f.value=P-A)):(d.value=!1,D>0&&(f.value=0))},S=T=>{let P=0;switch(T.code){case ut.left:case ut.up:P=-1;break;case ut.right:case ut.down:P=1;break;default:return}const A=Array.from(T.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let $=A.indexOf(T.target)+P;$<0?$=A.length-1:$>=A.length&&($=0),A[$].focus({preventScroll:!0}),A[$].click(),C()},C=()=>{g.value&&(h.value=!0)},E=()=>h.value=!1;return Fe(o,T=>{T==="hidden"?g.value=!1:T==="visible"&&setTimeout(()=>g.value=!0,50)}),Fe(a,T=>{T?setTimeout(()=>g.value=!0,50):g.value=!1}),Hr(u,x),Ft(()=>setTimeout(()=>O(),0)),ac(()=>x()),e({scrollToActiveTab:O,removeFocus:E}),()=>{const T=d.value?[B("span",{class:[i.e("nav-prev"),i.is("disabled",!d.value.prev)],onClick:b},[B(mt,null,{default:()=>[B(_f,null,null)]})]),B("span",{class:[i.e("nav-next"),i.is("disabled",!d.value.next)],onClick:w},[B(mt,null,{default:()=>[B(_a,null,null)]})])]:null,P=t.panes.map((A,D)=>{var $,N,z,I;const L=A.uid,X=A.props.disabled,Q=(N=($=A.props.name)!=null?$:A.index)!=null?N:`${D}`,W=!X&&(A.isClosable||t.editable);A.index=`${D}`;const G=W?B(mt,{class:"is-icon-close",onClick:ne=>n("tabRemove",A,ne)},{default:()=>[B(Oa,null,null)]}):null,K=((I=(z=A.slots).label)==null?void 0:I.call(z))||A.props.label,oe=!X&&A.active?0:-1;return B("div",{ref:`tab-${L}`,class:[i.e("item"),i.is(r.props.tabPosition),i.is("active",A.active),i.is("disabled",X),i.is("closable",W),i.is("focus",h.value)],id:`tab-${Q}`,key:`tab-${L}`,"aria-controls":`pane-${Q}`,role:"tab","aria-selected":A.active,tabindex:oe,onFocus:()=>C(),onBlur:()=>E(),onClick:ne=>{E(),n("tabClick",A,Q,ne)},onKeydown:ne=>{W&&(ne.code===ut.delete||ne.code===ut.backspace)&&n("tabRemove",A,ne)}},[K,G])});return B("div",{ref:u,class:[i.e("nav-wrap"),i.is("scrollable",!!d.value),i.is(r.props.tabPosition)]},[T,B("div",{class:i.e("nav-scroll"),ref:s},[B("div",{class:[i.e("nav"),i.is(r.props.tabPosition),i.is("stretch",t.stretch&&["top","bottom"].includes(r.props.tabPosition))],ref:l,style:y.value,role:"tablist",onKeydown:S},[t.type?null:B(w8e,{ref:c,tabs:[...t.panes]},null),P])])])}}}),E8e=Ze({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:we(Function),default:()=>!0},stretch:Boolean}),VT=t=>Ot(t)||Et(t),T8e={[Ut]:t=>VT(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>VT(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>VT(t),tabAdd:()=>!0},k8e=ue({name:"ElTabs",props:E8e,emits:T8e,setup(t,{emit:e,slots:n,expose:r}){var i;const o=Qe("tabs"),a=M(()=>["left","right"].includes(t.tabPosition)),{children:s,addChild:l,removeChild:u}=A$(tn(),"ElTabPane"),c=F(),d=F((i=t.modelValue)!=null?i:"0"),f=async(b,w=!1)=>{var O,x,S;if(!(d.value===b||ar(b)))try{await((O=t.beforeLeave)==null?void 0:O.call(t,b,d.value))!==!1&&(d.value=b,w&&(e(Ut,b),e("tabChange",b)),(S=(x=c.value)==null?void 0:x.removeFocus)==null||S.call(x))}catch{}},h=(b,w,O)=>{b.props.disabled||(f(w,!0),e("tabClick",b,O))},g=(b,w)=>{b.props.disabled||ar(b.props.name)||(w.stopPropagation(),e("edit",b.props.name,"remove"),e("tabRemove",b.props.name))},m=()=>{e("edit",void 0,"add"),e("tabAdd")};Fe(()=>t.modelValue,b=>f(b)),Fe(d,async()=>{var b;await xt(),(b=c.value)==null||b.scrollToActiveTab()}),gn(oC,{props:t,currentName:d,registerPane:b=>{s.value.push(b)},sortPane:l,unregisterPane:u}),r({currentName:d});const y=({render:b})=>b();return()=>{const b=n["add-icon"],w=t.editable||t.addable?B("div",{class:[o.e("new-tab"),a.value&&o.e("new-tab-vertical")],tabindex:"0",onClick:m,onKeydown:S=>{[ut.enter,ut.numpadEnter].includes(S.code)&&m()}},[b?Ee(n,"add-icon"):B(mt,{class:o.is("icon-plus")},{default:()=>[B(yw,null,null)]})]):null,O=B("div",{class:[o.e("header"),a.value&&o.e("header-vertical"),o.is(t.tabPosition)]},[B(y,{render:()=>{const S=s.value.some(C=>C.slots.label);return B(C8e,{ref:c,currentName:d.value,editable:t.editable,type:t.type,panes:s.value,stretch:t.stretch,onTabClick:h,onTabRemove:g},{$stable:!S})}},null),w]),x=B("div",{class:o.e("content")},[Ee(n,"default")]);return B("div",{class:[o.b(),o.m(t.tabPosition),{[o.m("card")]:t.type==="card",[o.m("border-card")]:t.type==="border-card"}]},[x,O])}}});var P8e=k8e;const A8e=Ze({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),dX="ElTabPane",M8e=ue({name:dX}),R8e=ue({...M8e,props:A8e,setup(t){const e=t,n=tn(),r=Ni(),i=ht(oC);i||Wi(dX,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=Qe("tab-pane"),a=F(),s=M(()=>e.closable||i.props.closable),l=bk(()=>{var h;return i.currentName.value===((h=e.name)!=null?h:a.value)}),u=F(l.value),c=M(()=>{var h;return(h=e.name)!=null?h:a.value}),d=bk(()=>!e.lazy||u.value||l.value);Fe(l,h=>{h&&(u.value=!0)});const f=vn({uid:n.uid,slots:r,props:e,paneName:c,active:l,index:a,isClosable:s});return i.registerPane(f),Ft(()=>{i.sortPane(f)}),od(()=>{i.unregisterPane(f.uid)}),(h,g)=>p(d)?zt((R(),Y("div",{key:0,id:`pane-${p(c)}`,class:V(p(o).b()),role:"tabpanel","aria-hidden":!p(l),"aria-labelledby":`tab-${p(c)}`},[Ee(h.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[Bn,p(l)]]):Se("v-if",!0)}});var fX=Ye(R8e,[["__file","tab-pane.vue"]]);const xp=Vt(P8e,{TabPane:fX}),Sp=ni(fX),$8e=Ze({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:fc,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),N8e=ue({name:"ElText"}),D8e=ue({...N8e,props:$8e,setup(t){const e=t,n=ki(),r=Qe("text"),i=M(()=>[r.b(),r.m(e.type),r.m(n.value),r.is("truncated",e.truncated),r.is("line-clamp",!ar(e.lineClamp))]);return(o,a)=>(R(),xe(on(o.tag),{class:V(p(i)),style:vt({"-webkit-line-clamp":o.lineClamp})},{default:j(()=>[Ee(o.$slots,"default")]),_:3},8,["class","style"]))}});var L8e=Ye(D8e,[["__file","text.vue"]]);const aC=Vt(L8e),I8e=Ze({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:we(String),default:"light"},clearable:{type:Boolean,default:!0},size:$i,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:we([String,Object]),default:()=>tW},clearIcon:{type:we([String,Object]),default:()=>pd},...Wm}),Vc=t=>{const e=(t||"").split(":");if(e.length>=2){let n=Number.parseInt(e[0],10);const r=Number.parseInt(e[1],10),i=t.toUpperCase();return i.includes("AM")&&n===12?n=0:i.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:r}}return null},jT=(t,e)=>{const n=Vc(t);if(!n)return-1;const r=Vc(e);if(!r)return-1;const i=n.minutes+n.hours*60,o=r.minutes+r.hours*60;return i===o?0:i>o?1:-1},YB=t=>`${t}`.padStart(2,"0"),lg=t=>`${YB(t.hours)}:${YB(t.minutes)}`,B8e=(t,e)=>{const n=Vc(t);if(!n)return"";const r=Vc(e);if(!r)return"";const i={hours:n.hours,minutes:n.minutes};return i.minutes+=r.minutes,i.hours+=r.hours,i.hours+=Math.floor(i.minutes/60),i.minutes=i.minutes%60,lg(i)},F8e=ue({name:"ElTimeSelect"}),V8e=ue({...F8e,props:I8e,emits:["change","blur","focus","clear","update:modelValue"],setup(t,{expose:e}){const n=t;It.extend(N$);const{Option:r}=wl,i=Qe("input"),o=F(),a=Ho(),{lang:s}=xn(),l=M(()=>n.modelValue),u=M(()=>{const b=Vc(n.start);return b?lg(b):null}),c=M(()=>{const b=Vc(n.end);return b?lg(b):null}),d=M(()=>{const b=Vc(n.step);return b?lg(b):null}),f=M(()=>{const b=Vc(n.minTime||"");return b?lg(b):null}),h=M(()=>{const b=Vc(n.maxTime||"");return b?lg(b):null}),g=M(()=>{const b=[];if(n.start&&n.end&&n.step){let w=u.value,O;for(;w&&c.value&&jT(w,c.value)<=0;)O=It(w,"HH:mm").locale(s.value).format(n.format),b.push({value:O,disabled:jT(w,f.value||"-1:-1")<=0||jT(w,h.value||"100:100")>=0}),w=B8e(w,d.value)}return b});return e({blur:()=>{var b,w;(w=(b=o.value)==null?void 0:b.blur)==null||w.call(b)},focus:()=>{var b,w;(w=(b=o.value)==null?void 0:b.focus)==null||w.call(b)}}),(b,w)=>(R(),xe(p(wl),{ref_key:"select",ref:o,"model-value":p(l),disabled:p(a),clearable:b.clearable,"clear-icon":b.clearIcon,size:b.size,effect:b.effect,placeholder:b.placeholder,"default-first-option":"",filterable:b.editable,"empty-values":b.emptyValues,"value-on-clear":b.valueOnClear,"onUpdate:modelValue":O=>b.$emit("update:modelValue",O),onChange:O=>b.$emit("change",O),onBlur:O=>b.$emit("blur",O),onFocus:O=>b.$emit("focus",O),onClear:()=>b.$emit("clear")},{prefix:j(()=>[b.prefixIcon?(R(),xe(p(mt),{key:0,class:V(p(i).e("prefix-icon"))},{default:j(()=>[(R(),xe(on(b.prefixIcon)))]),_:1},8,["class"])):Se("v-if",!0)]),default:j(()=>[(R(!0),Y(dt,null,Ht(p(g),O=>(R(),xe(p(r),{key:O.value,label:O.value,value:O.value,disabled:O.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","onUpdate:modelValue","onChange","onBlur","onFocus","onClear"]))}});var j8e=Ye(V8e,[["__file","time-select.vue"]]);const Q8e=Vt(j8e),z8e=ue({name:"ElTimeline",setup(t,{slots:e}){const n=Qe("timeline");return gn("timeline",e),()=>Tt("ul",{class:[n.b()]},[Ee(e,"default")])}}),W8e=Ze({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:fr},hollow:Boolean}),H8e=ue({name:"ElTimelineItem"}),U8e=ue({...H8e,props:W8e,setup(t){const e=t,n=Qe("timeline-item"),r=M(()=>[n.e("node"),n.em("node",e.size||""),n.em("node",e.type||""),n.is("hollow",e.hollow)]);return(i,o)=>(R(),Y("li",{class:V([p(n).b(),{[p(n).e("center")]:i.center}])},[J("div",{class:V(p(n).e("tail"))},null,2),i.$slots.dot?Se("v-if",!0):(R(),Y("div",{key:0,class:V(p(r)),style:vt({backgroundColor:i.color})},[i.icon?(R(),xe(p(mt),{key:0,class:V(p(n).e("icon"))},{default:j(()=>[(R(),xe(on(i.icon)))]),_:1},8,["class"])):Se("v-if",!0)],6)),i.$slots.dot?(R(),Y("div",{key:1,class:V(p(n).e("dot"))},[Ee(i.$slots,"dot")],2)):Se("v-if",!0),J("div",{class:V(p(n).e("wrapper"))},[!i.hideTimestamp&&i.placement==="top"?(R(),Y("div",{key:0,class:V([p(n).e("timestamp"),p(n).is("top")])},Ve(i.timestamp),3)):Se("v-if",!0),J("div",{class:V(p(n).e("content"))},[Ee(i.$slots,"default")],2),!i.hideTimestamp&&i.placement==="bottom"?(R(),Y("div",{key:1,class:V([p(n).e("timestamp"),p(n).is("bottom")])},Ve(i.timestamp),3)):Se("v-if",!0)],2)],2))}});var hX=Ye(U8e,[["__file","timeline-item.vue"]]);const X8e=Vt(z8e,{TimelineItem:hX}),Z8e=ni(hX),pX=Ze({nowrap:Boolean});var gX=(t=>(t.top="top",t.bottom="bottom",t.left="left",t.right="right",t))(gX||{});const q8e=Object.values(gX),dN=Ze({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:we(Object),default:null}}),Y8e=Ze({side:{type:we(String),values:q8e,required:!0}}),G8e=["absolute","fixed"],K8e=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],fN=Ze({arrowPadding:{type:we(Number),default:5},effect:{type:we(String),default:"light"},contentClass:String,placement:{type:we(String),values:K8e,default:"bottom"},reference:{type:we(Object),default:null},offset:{type:Number,default:8},strategy:{type:we(String),values:G8e,default:"absolute"},showArrow:Boolean,...wo(["ariaLabel"])}),hN=Ze({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:we(Function)},"onUpdate:open":{type:we(Function)}}),Xp={type:we(Function)},pN=Ze({onBlur:Xp,onClick:Xp,onFocus:Xp,onMouseDown:Xp,onMouseEnter:Xp,onMouseLeave:Xp}),J8e=Ze({...hN,...dN,...pN,...fN,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:we(Object),default:null},teleported:Boolean,to:{type:we(String),default:"body"}}),sC=Symbol("tooltipV2"),mX=Symbol("tooltipV2Content"),QT="tooltip_v2.open",e6e=ue({name:"ElTooltipV2Root"}),t6e=ue({...e6e,props:hN,setup(t,{expose:e}){const n=t,r=F(n.defaultOpen),i=F(null),o=M({get:()=>np(n.open)?r.value:n.open,set:y=>{var b;r.value=y,(b=n["onUpdate:open"])==null||b.call(n,y)}}),a=M(()=>Et(n.delayDuration)&&n.delayDuration>0),{start:s,stop:l}=rp(()=>{o.value=!0},M(()=>n.delayDuration),{immediate:!1}),u=Qe("tooltip-v2"),c=bo(),d=()=>{l(),o.value=!0},f=()=>{p(a)?s():d()},h=d,g=()=>{l(),o.value=!1};return Fe(o,y=>{var b;y&&(document.dispatchEvent(new CustomEvent(QT)),h()),(b=n.onOpenChange)==null||b.call(n,y)}),Ft(()=>{document.addEventListener(QT,g)}),pr(()=>{l(),document.removeEventListener(QT,g)}),gn(sC,{contentId:c,triggerRef:i,ns:u,onClose:g,onDelayOpen:f,onOpen:h}),e({onOpen:h,onClose:g}),(y,b)=>Ee(y.$slots,"default",{open:p(o)})}});var n6e=Ye(t6e,[["__file","root.vue"]]);const r6e=ue({name:"ElTooltipV2Arrow"}),i6e=ue({...r6e,props:{...dN,...Y8e},setup(t){const e=t,{ns:n}=ht(sC),{arrowRef:r}=ht(mX),i=M(()=>{const{style:o,width:a,height:s}=e,l=n.namespace.value;return{[`--${l}-tooltip-v2-arrow-width`]:`${a}px`,[`--${l}-tooltip-v2-arrow-height`]:`${s}px`,[`--${l}-tooltip-v2-arrow-border-width`]:`${a/2}px`,[`--${l}-tooltip-v2-arrow-cover-width`]:a/2-1,...o||{}}});return(o,a)=>(R(),Y("span",{ref_key:"arrowRef",ref:r,style:vt(p(i)),class:V(p(n).e("arrow"))},null,6))}});var GB=Ye(i6e,[["__file","arrow.vue"]]);const om=Math.min,Hh=Math.max,Mw=Math.round,pO=Math.floor,Uu=t=>({x:t,y:t}),o6e={left:"right",right:"left",bottom:"top",top:"bottom"},a6e={start:"end",end:"start"};function cP(t,e,n){return Hh(t,om(e,n))}function Db(t,e){return typeof t=="function"?t(e):t}function ap(t){return t.split("-")[0]}function Lb(t){return t.split("-")[1]}function vX(t){return t==="x"?"y":"x"}function gN(t){return t==="y"?"height":"width"}function am(t){return["top","bottom"].includes(ap(t))?"y":"x"}function mN(t){return vX(am(t))}function s6e(t,e,n){n===void 0&&(n=!1);const r=Lb(t),i=mN(t),o=gN(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=Rw(a)),[a,Rw(a)]}function l6e(t){const e=Rw(t);return[dP(t),e,dP(e)]}function dP(t){return t.replace(/start|end/g,e=>a6e[e])}function u6e(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:a;default:return[]}}function c6e(t,e,n,r){const i=Lb(t);let o=u6e(ap(t),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),e&&(o=o.concat(o.map(dP)))),o}function Rw(t){return t.replace(/left|right|bottom|top/g,e=>o6e[e])}function d6e(t){return{top:0,right:0,bottom:0,left:0,...t}}function yX(t){return typeof t!="number"?d6e(t):{top:t,right:t,bottom:t,left:t}}function $w(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function KB(t,e,n){let{reference:r,floating:i}=t;const o=am(e),a=mN(e),s=gN(a),l=ap(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Lb(e)){case"start":h[a]-=f*(n&&u?-1:1);break;case"end":h[a]+=f*(n&&u?-1:1);break}return h}const f6e=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=KB(u,r,l),f=r,h={},g=0;for(let m=0;m<s.length;m++){const{name:y,fn:b}=s[m],{x:w,y:O,data:x,reset:S}=await b({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:a,elements:{reference:t,floating:e}});c=w!=null?w:c,d=O!=null?O:d,h={...h,[y]:{...h[y],...x}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:c,y:d}=KB(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function vN(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Db(e,t),g=yX(h),y=s[f?d==="floating"?"reference":"floating":d],b=$w(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),w=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),x=await(o.isElement==null?void 0:o.isElement(O))?await(o.getScale==null?void 0:o.getScale(O))||{x:1,y:1}:{x:1,y:1},S=$w(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:O,strategy:l}):w);return{top:(b.top-S.top+g.top)/x.y,bottom:(S.bottom-b.bottom+g.bottom)/x.y,left:(b.left-S.left+g.left)/x.x,right:(S.right-b.right+g.right)/x.x}}const h6e=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=e,{element:u,padding:c=0}=Db(t,e)||{};if(u==null)return{};const d=yX(c),f={x:n,y:r},h=mN(i),g=gN(h),m=await a.getDimensions(u),y=h==="y",b=y?"top":"left",w=y?"bottom":"right",O=y?"clientHeight":"clientWidth",x=o.reference[g]+o.reference[h]-f[h]-o.floating[g],S=f[h]-o.reference[h],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=C?C[O]:0;(!E||!await(a.isElement==null?void 0:a.isElement(C)))&&(E=s.floating[O]||o.floating[g]);const T=x/2-S/2,P=E/2-m[g]/2-1,A=om(d[b],P),D=om(d[w],P),$=A,N=E-m[g]-D,z=E/2-m[g]/2+T,I=cP($,z,N),L=!l.arrow&&Lb(i)!=null&&z!==I&&o.reference[g]/2-(z<$?A:D)-m[g]/2<0,X=L?z<$?z-$:z-N:0;return{[h]:f[h]+X,data:{[h]:I,centerOffset:z-I-X,...L&&{alignmentOffset:X}},reset:L}}}),p6e=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=Db(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=ap(i),w=am(s),O=ap(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=f||(O||!m?[Rw(s)]:l6e(s)),C=g!=="none";!f&&C&&S.push(...c6e(s,m,g,x));const E=[s,...S],T=await vN(e,y),P=[];let A=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&P.push(T[b]),d){const z=s6e(i,a,x);P.push(T[z[0]],T[z[1]])}if(A=[...A,{placement:i,overflows:P}],!P.every(z=>z<=0)){var D,$;const z=(((D=o.flip)==null?void 0:D.index)||0)+1,I=E[z];if(I)return{data:{index:z,overflows:A},reset:{placement:I}};let L=($=A.filter(X=>X.overflows[0]<=0).sort((X,Q)=>X.overflows[1]-Q.overflows[1])[0])==null?void 0:$.placement;if(!L)switch(h){case"bestFit":{var N;const X=(N=A.filter(Q=>{if(C){const W=am(Q.placement);return W===w||W==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(W=>W>0).reduce((W,G)=>W+G,0)]).sort((Q,W)=>Q[1]-W[1])[0])==null?void 0:N[0];X&&(L=X);break}case"initialPlacement":L=s;break}if(i!==L)return{reset:{placement:L}}}return{}}}};async function g6e(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ap(n),s=Lb(n),l=am(n)==="y",u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d=Db(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(h=s==="end"?g*-1:g),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const m6e=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=e,l=await g6e(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},v6e=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...l}=Db(t,e),u={x:n,y:r},c=await vN(e,l),d=am(ap(i)),f=vX(d);let h=u[f],g=u[d];if(o){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=h+c[y],O=h-c[b];h=cP(w,h,O)}if(a){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=g+c[y],O=g-c[b];g=cP(w,g,O)}const m=s.fn({...e,[f]:h,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:o,[d]:a}}}}}};function lC(){return typeof window!="undefined"}function Gm(t){return bX(t)?(t.nodeName||"").toLowerCase():"#document"}function Ms(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pc(t){var e;return(e=(bX(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function bX(t){return lC()?t instanceof Node||t instanceof Ms(t).Node:!1}function lu(t){return lC()?t instanceof Element||t instanceof Ms(t).Element:!1}function nc(t){return lC()?t instanceof HTMLElement||t instanceof Ms(t).HTMLElement:!1}function JB(t){return!lC()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof Ms(t).ShadowRoot}function Ib(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=uu(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function y6e(t){return["table","td","th"].includes(Gm(t))}function uC(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function yN(t){const e=bN(),n=lu(t)?uu(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function b6e(t){let e=Sf(t);for(;nc(e)&&!sm(e);){if(yN(e))return e;if(uC(e))return null;e=Sf(e)}return null}function bN(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sm(t){return["html","body","#document"].includes(Gm(t))}function uu(t){return Ms(t).getComputedStyle(t)}function cC(t){return lu(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Sf(t){if(Gm(t)==="html")return t;const e=t.assignedSlot||t.parentNode||JB(t)&&t.host||pc(t);return JB(e)?e.host:e}function _X(t){const e=Sf(t);return sm(e)?t.ownerDocument?t.ownerDocument.body:t.body:nc(e)&&Ib(e)?e:_X(e)}function P0(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=_X(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),a=Ms(i);if(o){const s=fP(a);return e.concat(a,a.visualViewport||[],Ib(i)?i:[],s&&n?P0(s):[])}return e.concat(i,P0(i,[],n))}function fP(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function OX(t){const e=uu(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=nc(t),o=i?t.offsetWidth:n,a=i?t.offsetHeight:r,s=Mw(n)!==o||Mw(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function _N(t){return lu(t)?t:t.contextElement}function $g(t){const e=_N(t);if(!nc(e))return Uu(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=OX(e);let a=(o?Mw(n.width):n.width)/r,s=(o?Mw(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const _6e=Uu(0);function wX(t){const e=Ms(t);return!bN()||!e.visualViewport?_6e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function O6e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ms(t)?!1:e}function sp(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=_N(t);let a=Uu(1);e&&(r?lu(r)&&(a=$g(r)):a=$g(t));const s=O6e(o,n,r)?wX(o):Uu(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const f=Ms(o),h=r&&lu(r)?Ms(r):r;let g=f,m=fP(g);for(;m&&r&&h!==g;){const y=$g(m),b=m.getBoundingClientRect(),w=uu(m),O=b.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,x=b.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=O,u+=x,g=Ms(m),m=fP(g)}}return $w({width:c,height:d,x:l,y:u})}function ON(t,e){const n=cC(t).scrollLeft;return e?e.left+n:sp(pc(t)).left+n}function xX(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:ON(t,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function w6e(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",a=pc(r),s=e?uC(e.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Uu(1);const c=Uu(0),d=nc(r);if((d||!d&&!o)&&((Gm(r)!=="body"||Ib(a))&&(l=cC(r)),nc(r))){const h=sp(r);u=$g(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const f=a&&!d&&!o?xX(a,l,!0):Uu(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function x6e(t){return Array.from(t.getClientRects())}function S6e(t){const e=pc(t),n=cC(t),r=t.ownerDocument.body,i=Hh(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Hh(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ON(t);const s=-n.scrollTop;return uu(r).direction==="rtl"&&(a+=Hh(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function C6e(t,e){const n=Ms(t),r=pc(t),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=bN();(!u||u&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function E6e(t,e){const n=sp(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=nc(t)?$g(t):Uu(1),a=t.clientWidth*o.x,s=t.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function e8(t,e,n){let r;if(e==="viewport")r=C6e(t,n);else if(e==="document")r=S6e(pc(t));else if(lu(e))r=E6e(e,n);else{const i=wX(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return $w(r)}function SX(t,e){const n=Sf(t);return n===e||!lu(n)||sm(n)?!1:uu(n).position==="fixed"||SX(n,e)}function T6e(t,e){const n=e.get(t);if(n)return n;let r=P0(t,[],!1).filter(s=>lu(s)&&Gm(s)!=="body"),i=null;const o=uu(t).position==="fixed";let a=o?Sf(t):t;for(;lu(a)&&!sm(a);){const s=uu(a),l=yN(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ib(a)&&!l&&SX(t,a))?r=r.filter(c=>c!==a):i=s,a=Sf(a)}return e.set(t,r),r}function k6e(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?uC(e)?[]:T6e(e,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const d=e8(e,c,i);return u.top=Hh(d.top,u.top),u.right=om(d.right,u.right),u.bottom=om(d.bottom,u.bottom),u.left=Hh(d.left,u.left),u},e8(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function P6e(t){const{width:e,height:n}=OX(t);return{width:e,height:n}}function A6e(t,e,n){const r=nc(e),i=pc(e),o=n==="fixed",a=sp(t,!0,o,e);let s={scrollLeft:0,scrollTop:0};const l=Uu(0);if(r||!r&&!o)if((Gm(e)!=="body"||Ib(i))&&(s=cC(e)),r){const f=sp(e,!0,o,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&(l.x=ON(i));const u=i&&!r&&!o?xX(i,s):Uu(0),c=a.left+s.scrollLeft-l.x-u.x,d=a.top+s.scrollTop-l.y-u.y;return{x:c,y:d,width:a.width,height:a.height}}function zT(t){return uu(t).position==="static"}function t8(t,e){if(!nc(t)||uu(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pc(t)===n&&(n=n.ownerDocument.body),n}function CX(t,e){const n=Ms(t);if(uC(t))return n;if(!nc(t)){let i=Sf(t);for(;i&&!sm(i);){if(lu(i)&&!zT(i))return i;i=Sf(i)}return n}let r=t8(t,e);for(;r&&y6e(r)&&zT(r);)r=t8(r,e);return r&&sm(r)&&zT(r)&&!yN(r)?n:r||b6e(t)||n}const M6e=async function(t){const e=this.getOffsetParent||CX,n=this.getDimensions,r=await n(t.floating);return{reference:A6e(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function R6e(t){return uu(t).direction==="rtl"}const $6e={convertOffsetParentRelativeRectToViewportRelativeRect:w6e,getDocumentElement:pc,getClippingRect:k6e,getOffsetParent:CX,getElementRects:M6e,getClientRects:x6e,getDimensions:P6e,getScale:$g,isElement:lu,isRTL:R6e};function N6e(t,e){let n=null,r;const i=pc(t);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:c,width:d,height:f}=t.getBoundingClientRect();if(s||e(),!d||!f)return;const h=pO(c),g=pO(i.clientWidth-(u+d)),m=pO(i.clientHeight-(c+f)),y=pO(u),w={rootMargin:-h+"px "+-g+"px "+-m+"px "+-y+"px",threshold:Hh(0,om(1,l))||1};let O=!0;function x(S){const C=S[0].intersectionRatio;if(C!==l){if(!O)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{n=new IntersectionObserver(x,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(t)}return a(!0),o}function D6e(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=_N(t),c=i||o?[...u?P0(u):[],...P0(e)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&s?N6e(u,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var O;(O=h)==null||O.observe(e)})),n()}),u&&!l&&h.observe(u),h.observe(e));let g,m=l?sp(t):null;l&&y();function y(){const b=sp(t);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&n(),m=b,g=requestAnimationFrame(y)}return n(),()=>{var b;c.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const L6e=vN,EX=m6e,I6e=v6e,B6e=p6e,TX=h6e,kX=(t,e,n)=>{const r=new Map,i={platform:$6e,...n},o={...i.platform,_c:r};return f6e(t,e,{...i,platform:o})},F6e=Ze({style:{type:we([String,Object,Array]),default:()=>({})}}),V6e=ue({name:"ElVisuallyHidden"}),j6e=ue({...V6e,props:F6e,setup(t){const e=t,n=M(()=>[e.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]);return(r,i)=>(R(),Y("span",an(r.$attrs,{style:p(n)}),[Ee(r.$slots,"default")],16))}});var Q6e=Ye(j6e,[["__file","visual-hidden.vue"]]);Ze({});const z6e=t=>{if(!wn)return;if(!t)return t;const e=ba(t);return e||(Tr(t)?e:t)},W6e=({middleware:t,placement:e,strategy:n})=>{const r=F(),i=F(),o=F(),a=F(),s=F({}),l={x:o,y:a,placement:e,strategy:n,middlewareData:s},u=async()=>{if(!wn)return;const c=z6e(r),d=ba(i);if(!c||!d)return;const f=await kX(c,d,{placement:p(e),strategy:p(n),middleware:p(t)});qg(l).forEach(h=>{l[h].value=f[h]})};return Ft(()=>{Bo(()=>{u()})}),{...l,update:u,referenceRef:r,contentRef:i}},H6e=({arrowRef:t,padding:e})=>({name:"arrow",options:{element:t,padding:e},fn(n){const r=p(t);return r?TX({element:r,padding:e}).fn(n):{}}}),U6e=ue({name:"ElTooltipV2Content"}),X6e=ue({...U6e,props:{...fN,...pX},setup(t){const e=t,{triggerRef:n,contentId:r}=ht(sC),i=F(e.placement),o=F(e.strategy),a=F(null),{referenceRef:s,contentRef:l,middlewareData:u,x:c,y:d,update:f}=W6e({placement:i,strategy:o,middleware:M(()=>{const O=[EX(e.offset)];return e.showArrow&&O.push(H6e({arrowRef:a})),O})}),h=zm().nextZIndex(),g=Qe("tooltip-v2"),m=M(()=>i.value.split("-")[0]),y=M(()=>({position:p(o),top:`${p(d)||0}px`,left:`${p(c)||0}px`,zIndex:h})),b=M(()=>{if(!e.showArrow)return{};const{arrow:O}=p(u);return{[`--${g.namespace.value}-tooltip-v2-arrow-x`]:`${O==null?void 0:O.x}px`||"",[`--${g.namespace.value}-tooltip-v2-arrow-y`]:`${O==null?void 0:O.y}px`||""}}),w=M(()=>[g.e("content"),g.is("dark",e.effect==="dark"),g.is(p(o)),e.contentClass]);return Fe(a,()=>f()),Fe(()=>e.placement,O=>i.value=O),Ft(()=>{Fe(()=>e.reference||n.value,O=>{s.value=O||void 0},{immediate:!0})}),gn(mX,{arrowRef:a}),(O,x)=>(R(),Y("div",{ref_key:"contentRef",ref:l,style:vt(p(y)),"data-tooltip-v2-root":""},[O.nowrap?Se("v-if",!0):(R(),Y("div",{key:0,"data-side":p(m),class:V(p(w))},[Ee(O.$slots,"default",{contentStyle:p(y),contentClass:p(w)}),B(p(Q6e),{id:p(r),role:"tooltip"},{default:j(()=>[O.ariaLabel?(R(),Y(dt,{key:0},[Ue(Ve(O.ariaLabel),1)],64)):Ee(O.$slots,"default",{key:1})]),_:3},8,["id"]),Ee(O.$slots,"arrow",{style:vt(p(b)),side:p(m)})],10,["data-side"]))],4))}});var n8=Ye(X6e,[["__file","content.vue"]]);const Z6e=Ze({setRef:{type:we(Function),required:!0},onlyChild:Boolean});var q6e=ue({props:Z6e,setup(t,{slots:e}){const n=F(),r=eC(n,i=>{i?t.setRef(i.nextElementSibling):t.setRef(null)});return()=>{var i;const[o]=((i=e.default)==null?void 0:i.call(e))||[],a=t.onlyChild?zPe(o.children):o.children;return B(dt,{ref:r},[a])}}});const Y6e=ue({name:"ElTooltipV2Trigger"}),G6e=ue({...Y6e,props:{...pX,...pN},setup(t){const e=t,{onClose:n,onOpen:r,onDelayOpen:i,triggerRef:o,contentId:a}=ht(sC);let s=!1;const l=w=>{o.value=w},u=()=>{s=!1},c=fi(e.onMouseEnter,i),d=fi(e.onMouseLeave,n),f=fi(e.onMouseDown,()=>{n(),s=!0,document.addEventListener("mouseup",u,{once:!0})}),h=fi(e.onFocus,()=>{s||r()}),g=fi(e.onBlur,n),m=fi(e.onClick,w=>{w.detail===0&&n()}),y={blur:g,click:m,focus:h,mousedown:f,mouseenter:c,mouseleave:d},b=(w,O,x)=>{w&&Object.entries(O).forEach(([S,C])=>{w[x](S,C)})};return Fe(o,(w,O)=>{b(w,y,"addEventListener"),b(O,y,"removeEventListener"),w&&w.setAttribute("aria-describedby",a.value)}),pr(()=>{b(o.value,y,"removeEventListener"),document.removeEventListener("mouseup",u)}),(w,O)=>w.nowrap?(R(),xe(p(q6e),{key:0,"set-ref":l,"only-child":""},{default:j(()=>[Ee(w.$slots,"default")]),_:3})):(R(),Y("button",an({key:1,ref_key:"triggerRef",ref:o},w.$attrs),[Ee(w.$slots,"default")],16))}});var K6e=Ye(G6e,[["__file","trigger.vue"]]);const J6e=ue({name:"ElTooltipV2"}),eFe=ue({...J6e,props:J8e,setup(t){const n=Mi(t),r=vn(vo(n,Object.keys(dN))),i=vn(vo(n,Object.keys(fN))),o=vn(vo(n,Object.keys(hN))),a=vn(vo(n,Object.keys(pN)));return(s,l)=>(R(),xe(n6e,Yl(df(o)),{default:j(({open:u})=>[B(K6e,an(a,{nowrap:""}),{default:j(()=>[Ee(s.$slots,"trigger")]),_:3},16),B(p(Xm),{to:s.to,disabled:!s.teleported},{default:j(()=>[s.fullTransition?(R(),xe(zi,Yl(an({key:0},s.transitionProps)),{default:j(()=>[s.alwaysOn||u?(R(),xe(n8,Yl(an({key:0},i)),{arrow:j(({style:c,side:d})=>[s.showArrow?(R(),xe(GB,an({key:0},r,{style:c,side:d}),null,16,["style","side"])):Se("v-if",!0)]),default:j(()=>[Ee(s.$slots,"default")]),_:3},16)):Se("v-if",!0)]),_:2},1040)):(R(),Y(dt,{key:1},[s.alwaysOn||u?(R(),xe(n8,Yl(an({key:0},i)),{arrow:j(({style:c,side:d})=>[s.showArrow?(R(),xe(GB,an({key:0},r,{style:c,side:d}),null,16,["style","side"])):Se("v-if",!0)]),default:j(()=>[Ee(s.$slots,"default")]),_:3},16)):Se("v-if",!0)],64))]),_:2},1032,["to","disabled"])]),_:3},16))}});var tFe=Ye(eFe,[["__file","tooltip.vue"]]);const nFe=Vt(tFe),PX="left-check-change",AX="right-check-change",ug=Ze({data:{type:we(Array),default:()=>[]},titles:{type:we(Array),default:()=>[]},buttonTexts:{type:we(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:we(Function)},leftDefaultChecked:{type:we(Array),default:()=>[]},rightDefaultChecked:{type:we(Array),default:()=>[]},renderContent:{type:we(Function)},modelValue:{type:we(Array),default:()=>[]},format:{type:we(Object),default:()=>({})},filterable:Boolean,props:{type:we(Object),default:()=>ei({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),hP=(t,e)=>[t,e].every(Xe)||Xe(t)&&Lr(e),rFe={[dr]:(t,e,n)=>[t,n].every(Xe)&&["left","right"].includes(e),[Ut]:t=>Xe(t),[PX]:hP,[AX]:hP},pP="checked-change",iFe=Ze({data:ug.data,optionRender:{type:we(Function)},placeholder:String,title:String,filterable:Boolean,format:ug.format,filterMethod:ug.filterMethod,defaultChecked:ug.leftDefaultChecked,props:ug.props}),oFe={[pP]:hP},Bb=t=>{const e={label:"label",key:"key",disabled:"disabled"};return M(()=>({...e,...t.props}))},aFe=(t,e,n)=>{const r=Bb(t),i=M(()=>t.data.filter(c=>St(t.filterMethod)?t.filterMethod(e.query,c):String(c[r.value.label]||c[r.value.key]).toLowerCase().includes(e.query.toLowerCase()))),o=M(()=>i.value.filter(c=>!c[r.value.disabled])),a=M(()=>{const c=e.checked.length,d=t.data.length,{noChecked:f,hasChecked:h}=t.format;return f&&h?c>0?h.replace(/\${checked}/g,c.toString()).replace(/\${total}/g,d.toString()):f.replace(/\${total}/g,d.toString()):`${c}/${d}`}),s=M(()=>{const c=e.checked.length;return c>0&&c<o.value.length}),l=()=>{const c=o.value.map(d=>d[r.value.key]);e.allChecked=c.length>0&&c.every(d=>e.checked.includes(d))},u=c=>{e.checked=c?o.value.map(d=>d[r.value.key]):[]};return Fe(()=>e.checked,(c,d)=>{if(l(),e.checkChangeByUser){const f=c.concat(d).filter(h=>!c.includes(h)||!d.includes(h));n(pP,c,f)}else n(pP,c),e.checkChangeByUser=!0}),Fe(o,()=>{l()}),Fe(()=>t.data,()=>{const c=[],d=i.value.map(f=>f[r.value.key]);e.checked.forEach(f=>{d.includes(f)&&c.push(f)}),e.checkChangeByUser=!1,e.checked=c}),Fe(()=>t.defaultChecked,(c,d)=>{if(d&&c.length===d.length&&c.every(g=>d.includes(g)))return;const f=[],h=o.value.map(g=>g[r.value.key]);c.forEach(g=>{h.includes(g)&&f.push(g)}),e.checkChangeByUser=!1,e.checked=f},{immediate:!0}),{filteredData:i,checkableData:o,checkedSummary:a,isIndeterminate:s,updateAllChecked:l,handleAllCheckedChange:u}},sFe=ue({name:"ElTransferPanel"}),lFe=ue({...sFe,props:iFe,emits:oFe,setup(t,{expose:e,emit:n}){const r=t,i=Ni(),o=({option:O})=>O,{t:a}=xn(),s=Qe("transfer"),l=vn({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),u=Bb(r),{filteredData:c,checkedSummary:d,isIndeterminate:f,handleAllCheckedChange:h}=aFe(r,l,n),g=M(()=>!Cs(l.query)&&Cs(c.value)),m=M(()=>!Cs(i.default()[0].children)),{checked:y,allChecked:b,query:w}=Mi(l);return e({query:w}),(O,x)=>(R(),Y("div",{class:V(p(s).b("panel"))},[J("p",{class:V(p(s).be("panel","header"))},[B(p(Bs),{modelValue:p(b),"onUpdate:modelValue":S=>Tr(b)?b.value=S:null,indeterminate:p(f),"validate-event":!1,onChange:p(h)},{default:j(()=>[Ue(Ve(O.title)+" ",1),J("span",null,Ve(p(d)),1)]),_:1},8,["modelValue","onUpdate:modelValue","indeterminate","onChange"])],2),J("div",{class:V([p(s).be("panel","body"),p(s).is("with-footer",p(m))])},[O.filterable?(R(),xe(p(hi),{key:0,modelValue:p(w),"onUpdate:modelValue":S=>Tr(w)?w.value=S:null,class:V(p(s).be("panel","filter")),size:"default",placeholder:O.placeholder,"prefix-icon":p(d$),clearable:"","validate-event":!1},null,8,["modelValue","onUpdate:modelValue","class","placeholder","prefix-icon"])):Se("v-if",!0),zt(B(p(eH),{modelValue:p(y),"onUpdate:modelValue":S=>Tr(y)?y.value=S:null,"validate-event":!1,class:V([p(s).is("filterable",O.filterable),p(s).be("panel","list")])},{default:j(()=>[(R(!0),Y(dt,null,Ht(p(c),S=>(R(),xe(p(Bs),{key:S[p(u).key],class:V(p(s).be("panel","item")),value:S[p(u).key],disabled:S[p(u).disabled],"validate-event":!1},{default:j(()=>{var C;return[B(o,{option:(C=O.optionRender)==null?void 0:C.call(O,S)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"]),[[Bn,!p(g)&&!p(Cs)(O.data)]]),zt(J("div",{class:V(p(s).be("panel","empty"))},[Ee(O.$slots,"empty",{},()=>[Ue(Ve(p(g)?p(a)("el.transfer.noMatch"):p(a)("el.transfer.noData")),1)])],2),[[Bn,p(g)||p(Cs)(O.data)]])],2),p(m)?(R(),Y("p",{key:0,class:V(p(s).be("panel","footer"))},[Ee(O.$slots,"default")],2)):Se("v-if",!0)],2))}});var r8=Ye(lFe,[["__file","transfer-panel.vue"]]);const uFe=t=>{const e=Bb(t),n=M(()=>t.data.reduce((o,a)=>(o[a[e.value.key]]=a)&&o,{})),r=M(()=>t.data.filter(o=>!t.modelValue.includes(o[e.value.key]))),i=M(()=>t.targetOrder==="original"?t.data.filter(o=>t.modelValue.includes(o[e.value.key])):t.modelValue.reduce((o,a)=>{const s=n.value[a];return s&&o.push(s),o},[]));return{sourceData:r,targetData:i}},cFe=(t,e,n)=>{const r=Bb(t),i=(s,l,u)=>{n(Ut,s),n(dr,s,l,u)};return{addToLeft:()=>{const s=t.modelValue.slice();e.rightChecked.forEach(l=>{const u=s.indexOf(l);u>-1&&s.splice(u,1)}),i(s,"left",e.rightChecked)},addToRight:()=>{let s=t.modelValue.slice();const l=t.data.filter(u=>{const c=u[r.value.key];return e.leftChecked.includes(c)&&!t.modelValue.includes(c)}).map(u=>u[r.value.key]);s=t.targetOrder==="unshift"?l.concat(s):s.concat(l),t.targetOrder==="original"&&(s=t.data.filter(u=>s.includes(u[r.value.key])).map(u=>u[r.value.key])),i(s,"right",e.leftChecked)}}},dFe=(t,e)=>({onSourceCheckedChange:(i,o)=>{t.leftChecked=i,o&&e(PX,i,o)},onTargetCheckedChange:(i,o)=>{t.rightChecked=i,o&&e(AX,i,o)}}),fFe=ue({name:"ElTransfer"}),hFe=ue({...fFe,props:ug,emits:rFe,setup(t,{expose:e,emit:n}){const r=t,i=Ni(),{t:o}=xn(),a=Qe("transfer"),{formItem:s}=Wo(),l=vn({leftChecked:[],rightChecked:[]}),u=Bb(r),{sourceData:c,targetData:d}=uFe(r),{onSourceCheckedChange:f,onTargetCheckedChange:h}=dFe(l,n),{addToLeft:g,addToRight:m}=cFe(r,l,n),y=F(),b=F(),w=T=>{switch(T){case"left":y.value.query="";break;case"right":b.value.query="";break}},O=M(()=>r.buttonTexts.length===2),x=M(()=>r.titles[0]||o("el.transfer.titles.0")),S=M(()=>r.titles[1]||o("el.transfer.titles.1")),C=M(()=>r.filterPlaceholder||o("el.transfer.filterPlaceholder"));Fe(()=>r.modelValue,()=>{var T;r.validateEvent&&((T=s==null?void 0:s.validate)==null||T.call(s,"change").catch(P=>void 0))});const E=M(()=>T=>{var P;if(r.renderContent)return r.renderContent(Tt,T);const A=(((P=i.default)==null?void 0:P.call(i,{option:T}))||[]).filter(D=>D.type!==aa);return A.length?A:Tt("span",T[u.value.label]||T[u.value.key])});return e({clearQuery:w,leftPanel:y,rightPanel:b}),(T,P)=>(R(),Y("div",{class:V(p(a).b())},[B(r8,{ref_key:"leftPanel",ref:y,data:p(c),"option-render":p(E),placeholder:p(C),title:p(x),filterable:T.filterable,format:T.format,"filter-method":T.filterMethod,"default-checked":T.leftDefaultChecked,props:r.props,onCheckedChange:p(f)},{empty:j(()=>[Ee(T.$slots,"left-empty")]),default:j(()=>[Ee(T.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),J("div",{class:V(p(a).e("buttons"))},[B(p(lr),{type:"primary",class:V([p(a).e("button"),p(a).is("with-texts",p(O))]),disabled:p(Cs)(l.rightChecked),onClick:p(g)},{default:j(()=>[B(p(mt),null,{default:j(()=>[B(p(_f))]),_:1}),p(ar)(T.buttonTexts[0])?Se("v-if",!0):(R(),Y("span",{key:0},Ve(T.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),B(p(lr),{type:"primary",class:V([p(a).e("button"),p(a).is("with-texts",p(O))]),disabled:p(Cs)(l.leftChecked),onClick:p(m)},{default:j(()=>[p(ar)(T.buttonTexts[1])?Se("v-if",!0):(R(),Y("span",{key:0},Ve(T.buttonTexts[1]),1)),B(p(mt),null,{default:j(()=>[B(p(_a))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),B(r8,{ref_key:"rightPanel",ref:b,data:p(d),"option-render":p(E),placeholder:p(C),filterable:T.filterable,format:T.format,"filter-method":T.filterMethod,title:p(S),"default-checked":T.rightDefaultChecked,props:r.props,onCheckedChange:p(h)},{empty:j(()=>[Ee(T.$slots,"right-empty")]),default:j(()=>[Ee(T.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var pFe=Ye(hFe,[["__file","transfer.vue"]]);const gFe=Vt(pFe),Ng="$treeNodeId",i8=function(t,e){!e||e[Ng]||Object.defineProperty(e,Ng,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},wN=function(t,e){return t?e[t]:e[Ng]},gP=(t,e,n)=>{const r=t.value.currentNode;n();const i=t.value.currentNode;r!==i&&e("current-change",i?i.data:null,i)},mP=t=>{let e=!0,n=!0,r=!0;for(let i=0,o=t.length;i<o;i++){const a=t[i];(a.checked!==!0||a.indeterminate)&&(e=!1,a.disabled||(r=!1)),(a.checked!==!1||a.indeterminate)&&(n=!1)}return{all:e,none:n,allWithoutDisable:r,half:!e&&!n}},ry=function(t){if(t.childNodes.length===0||t.loading)return;const{all:e,none:n,half:r}=mP(t.childNodes);e?(t.checked=!0,t.indeterminate=!1):r?(t.checked=!1,t.indeterminate=!0):n&&(t.checked=!1,t.indeterminate=!1);const i=t.parent;!i||i.level===0||t.store.checkStrictly||ry(i)},gO=function(t,e){const n=t.store.props,r=t.data||{},i=n[e];if(St(i))return i(r,t);if(Ot(i))return r[i];if(ar(i)){const o=r[e];return o===void 0?"":o}};let mFe=0;class Uh{constructor(e){this.id=mFe++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in e)Mn(e,n)&&(this[n]=e[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const e=this.store;if(!e)throw new Error("[Node]store is required!");e.registerNode(this);const n=e.props;if(n&&typeof n.isLeaf!="undefined"){const o=gO(this,"isLeaf");wr(o)&&(this.isLeafByUser=o)}if(e.lazy!==!0&&this.data?(this.setData(this.data),e.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&e.lazy&&e.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Xe(this.data)||i8(this,this.data),!this.data)return;const r=e.defaultExpandedKeys,i=e.key;i&&r&&r.includes(this.key)&&this.expand(null,e.autoExpandParent),i&&e.currentNodeKey!==void 0&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(e){Xe(e)||i8(this,e),this.data=e,this.childNodes=[];let n;this.level===0&&Xe(this.data)?n=this.data:n=gO(this,"children")||[];for(let r=0,i=n.length;r<i;r++)this.insertChild({data:n[r]})}get label(){return gO(this,"label")}get key(){const e=this.store.key;return this.data?this.data[e]:null}get disabled(){return gO(this,"disabled")}get nextSibling(){const e=this.parent;if(e){const n=e.childNodes.indexOf(this);if(n>-1)return e.childNodes[n+1]}return null}get previousSibling(){const e=this.parent;if(e){const n=e.childNodes.indexOf(this);if(n>-1)return n>0?e.childNodes[n-1]:null}return null}contains(e,n=!0){return(this.childNodes||[]).some(r=>r===e||n&&r.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,n,r){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof Uh)){if(!r){const i=this.getChildren(!0);i.includes(e.data)||(ar(n)||n<0?i.push(e.data):i.splice(n,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=vn(new Uh(e)),e instanceof Uh&&e.initialize()}e.level=this.level+1,ar(n)||n<0?this.childNodes.push(e):this.childNodes.splice(n,0,e),this.updateLeafState()}insertBefore(e,n){let r;n&&(r=this.childNodes.indexOf(n)),this.insertChild(e,r)}insertAfter(e,n){let r;n&&(r=this.childNodes.indexOf(n),r!==-1&&(r+=1)),this.insertChild(e,r)}removeChild(e){const n=this.getChildren()||[],r=n.indexOf(e.data);r>-1&&n.splice(r,1);const i=this.childNodes.indexOf(e);i>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(e){let n=null;for(let r=0;r<this.childNodes.length;r++)if(this.childNodes[r].data===e){n=this.childNodes[r];break}n&&this.removeChild(n)}expand(e,n){const r=()=>{if(n){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,e&&e(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Xe(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||ry(this),r())}):r()}doCreateChildren(e,n={}){e.forEach(r=>{this.insertChild(Object.assign({data:r},n),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(e=>{e.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser!="undefined"){this.isLeaf=this.isLeafByUser;return}const e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0;return}this.isLeaf=!1}setChecked(e,n,r,i){if(this.indeterminate=e==="half",this.checked=e===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:s}=mP(this.childNodes);!this.isLeaf&&!a&&s&&(this.checked=!1,e=!1);const l=()=>{if(n){const u=this.childNodes;for(let f=0,h=u.length;f<h;f++){const g=u[f];i=i||e!==!1;const m=g.disabled?g.checked:i;g.setChecked(m,n,!0,i)}const{half:c,all:d}=mP(u);d||(this.checked=d,this.indeterminate=c)}};if(this.shouldLoadData()){this.loadData(()=>{l(),ry(this)},{checked:e!==!1});return}else l()}const o=this.parent;!o||o.level===0||r||ry(o)}getChildren(e=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const r=this.store.props;let i="children";return r&&(i=r.children||"children"),n[i]===void 0&&(n[i]=null),e&&!n[i]&&(n[i]=[]),n[i]}updateChildren(){const e=this.getChildren()||[],n=this.childNodes.map(o=>o.data),r={},i=[];e.forEach((o,a)=>{const s=o[Ng];!!s&&n.findIndex(u=>u[Ng]===s)>=0?r[s]={index:a,data:o}:i.push({index:a,data:o})}),this.store.lazy||n.forEach(o=>{r[o[Ng]]||this.removeChildByData(o)}),i.forEach(({index:o,data:a})=>{this.insertChild({data:a},o)}),this.updateLeafState()}loadData(e,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const r=o=>{this.childNodes=[],this.doCreateChildren(o,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,o)},i=()=>{this.loading=!1};this.store.load(this,r,i)}else e&&e.call(this)}eachNode(e){const n=[this];for(;n.length;){const r=n.shift();n.unshift(...r.childNodes),e(r)}}reInitChecked(){this.store.checkStrictly||ry(this)}}class vFe{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const n in e)Mn(e,n)&&(this[n]=e[n]);this.nodesMap={}}initialize(){if(this.root=new Uh({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,n=>{this.root.doCreateChildren(n),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(e){const n=this.filterNodeMethod,r=this.lazy,i=function(o){const a=o.root?o.root.childNodes:o.childNodes;if(a.forEach(s=>{s.visible=n.call(s,e,s.data,s),i(s)}),!o.visible&&a.length){let s=!0;s=!a.some(l=>l.visible),o.root?o.root.visible=s===!1:o.visible=s===!1}!e||o.visible&&!o.isLeaf&&(!r||o.loaded)&&o.expand()};i(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof Uh)return e;const n=Jt(e)?wN(this.key,e):e;return this.nodesMap[n]||null}insertBefore(e,n){const r=this.getNode(n);r.parent.insertBefore({data:e},r)}insertAfter(e,n){const r=this.getNode(n);r.parent.insertAfter({data:e},r)}remove(e){const n=this.getNode(e);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(e,n){const r=np(n)?this.root:this.getNode(n);r&&r.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],n=this.nodesMap;e.forEach(r=>{const i=n[r];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const n=this.key;!e||!e.data||(n?e.key!==void 0&&(this.nodesMap[e.key]=e):this.nodesMap[e.id]=e)}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(r=>{this.deregisterNode(r)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,n=!1){const r=[],i=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(s=>{(s.checked||n&&s.indeterminate)&&(!e||e&&s.isLeaf)&&r.push(s.data),i(s)})};return i(this),r}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const e=[],n=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(o=>{o.indeterminate&&e.push(o.data),n(o)})};return n(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],n=this.nodesMap;for(const r in n)Mn(n,r)&&e.push(n[r]);return e}updateChildren(e,n){const r=this.nodesMap[e];if(!r)return;const i=r.childNodes;for(let o=i.length-1;o>=0;o--){const a=i[o];this.remove(a.data)}for(let o=0,a=n.length;o<a;o++){const s=n[o];this.append(s,r.data)}}_setCheckedKeys(e,n=!1,r){const i=this._getAllNodes().sort((l,u)=>l.level-u.level),o=Object.create(null),a=Object.keys(r);i.forEach(l=>l.setChecked(!1,!1));const s=l=>{l.childNodes.forEach(u=>{var c;o[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let l=0,u=i.length;l<u;l++){const c=i[l],d=c.data[e].toString();if(!a.includes(d)){c.checked&&!o[d]&&c.setChecked(!1,!1);continue}if(c.childNodes.length&&s(c),c.isLeaf||this.checkStrictly){c.setChecked(!0,!1);continue}if(c.setChecked(!0,!0),n){c.setChecked(!1,!1);const h=function(g){g.childNodes.forEach(y=>{y.isLeaf||y.setChecked(!1,!1),h(y)})};h(c)}}}setCheckedNodes(e,n=!1){const r=this.key,i={};e.forEach(o=>{i[(o||{})[r]]=!0}),this._setCheckedKeys(r,n,i)}setCheckedKeys(e,n=!1){this.defaultCheckedKeys=e;const r=this.key,i={};e.forEach(o=>{i[o]=!0}),this._setCheckedKeys(r,n,i)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(n=>{const r=this.getNode(n);r&&r.expand(null,this.autoExpandParent)})}setChecked(e,n,r){const i=this.getNode(e);i&&i.setChecked(!!n,r)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,n=!0){const r=e[this.key],i=this.nodesMap[r];this.setCurrentNode(i),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,n=!0){if(this.currentNodeKey=e,e==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const r=this.getNode(e);r&&(this.setCurrentNode(r),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const yFe=ue({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=Qe("tree"),n=ht("NodeInstance"),r=ht("RootTree");return()=>{const i=t.node,{data:o,store:a}=i;return t.renderContent?t.renderContent(Tt,{_self:n,node:i,data:o,store:a}):Ee(r.ctx.slots,"default",{node:i,data:o},()=>[Tt("span",{class:e.be("node","label")},[i.label])])}}});var bFe=Ye(yFe,[["__file","tree-node-content.vue"]]);function MX(t){const e=ht("TreeNodeMap",null),n={treeNodeExpand:r=>{t.node!==r&&t.node.collapse()},children:[]};return e&&e.children.push(n),gn("TreeNodeMap",n),{broadcastExpanded:r=>{if(!!t.accordion)for(const i of n.children)i.treeNodeExpand(r)}}}const RX=Symbol("dragEvents");function _Fe({props:t,ctx:e,el$:n,dropIndicator$:r,store:i}){const o=Qe("tree"),a=F({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return gn(RX,{treeNodeDragStart:({event:c,treeNode:d})=>{if(St(t.allowDrag)&&!t.allowDrag(d.node))return c.preventDefault(),!1;c.dataTransfer.effectAllowed="move";try{c.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=d,e.emit("node-drag-start",d.node,c)},treeNodeDragOver:({event:c,treeNode:d})=>{const f=d,h=a.value.dropNode;h&&h.node.id!==f.node.id&&sa(h.$el,o.is("drop-inner"));const g=a.value.draggingNode;if(!g||!f)return;let m=!0,y=!0,b=!0,w=!0;St(t.allowDrop)&&(m=t.allowDrop(g.node,f.node,"prev"),w=y=t.allowDrop(g.node,f.node,"inner"),b=t.allowDrop(g.node,f.node,"next")),c.dataTransfer.dropEffect=y||m||b?"move":"none",(m||y||b)&&(h==null?void 0:h.node.id)!==f.node.id&&(h&&e.emit("node-drag-leave",g.node,h.node,c),e.emit("node-drag-enter",g.node,f.node,c)),m||y||b?a.value.dropNode=f:a.value.dropNode=null,f.node.nextSibling===g.node&&(b=!1),f.node.previousSibling===g.node&&(m=!1),f.node.contains(g.node,!1)&&(y=!1),(g.node===f.node||g.node.contains(f.node))&&(m=!1,y=!1,b=!1);const O=f.$el.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),x=n.value.getBoundingClientRect();let S;const C=m?y?.25:b?.45:1:-1,E=b?y?.75:m?.55:0:1;let T=-9999;const P=c.clientY-O.top;P<O.height*C?S="before":P>O.height*E?S="after":y?S="inner":S="none";const A=f.$el.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),D=r.value;S==="before"?T=A.top-x.top:S==="after"&&(T=A.bottom-x.top),D.style.top=`${T}px`,D.style.left=`${A.right-x.left}px`,S==="inner"?il(f.$el,o.is("drop-inner")):sa(f.$el,o.is("drop-inner")),a.value.showDropIndicator=S==="before"||S==="after",a.value.allowDrop=a.value.showDropIndicator||w,a.value.dropType=S,e.emit("node-drag-over",g.node,f.node,c)},treeNodeDragEnd:c=>{const{draggingNode:d,dropType:f,dropNode:h}=a.value;if(c.preventDefault(),c.dataTransfer&&(c.dataTransfer.dropEffect="move"),d&&h){const g={data:d.node.data};f!=="none"&&d.node.remove(),f==="before"?h.node.parent.insertBefore(g,h.node):f==="after"?h.node.parent.insertAfter(g,h.node):f==="inner"&&h.node.insertChild(g),f!=="none"&&(i.value.registerNode(g),i.value.key&&d.node.eachNode(m=>{var y;(y=i.value.nodesMap[m.data[i.value.key]])==null||y.setChecked(m.checked,!i.value.checkStrictly)})),sa(h.$el,o.is("drop-inner")),e.emit("node-drag-end",d.node,h.node,f,c),f!=="none"&&e.emit("node-drop",d.node,h.node,f,c)}d&&!h&&e.emit("node-drag-end",d.node,null,f,c),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}const OFe=ue({name:"ElTreeNode",components:{ElCollapseTransition:YS,ElCheckbox:Bs,NodeContent:bFe,ElIcon:mt,Loading:Ju},props:{node:{type:Uh,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(t,e){const n=Qe("tree"),{broadcastExpanded:r}=MX(t),i=ht("RootTree"),o=F(!1),a=F(!1),s=F(null),l=F(null),u=F(null),c=ht(RX),d=tn();gn("NodeInstance",d),t.node.expanded&&(o.value=!0,a.value=!0);const f=i.props.props.children||"children";Fe(()=>{const P=t.node.data[f];return P&&[...P]},()=>{t.node.updateChildren()}),Fe(()=>t.node.indeterminate,P=>{m(t.node.checked,P)}),Fe(()=>t.node.checked,P=>{m(P,t.node.indeterminate)}),Fe(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),Fe(()=>t.node.expanded,P=>{xt(()=>o.value=P),P&&(a.value=!0)});const h=P=>wN(i.props.nodeKey,P.data),g=P=>{const A=t.props.class;if(!A)return{};let D;if(St(A)){const{data:$}=P;D=A($,P)}else D=A;return Ot(D)?{[D]:!0}:D},m=(P,A)=>{(s.value!==P||l.value!==A)&&i.ctx.emit("check-change",t.node.data,P,A),s.value=P,l.value=A},y=P=>{gP(i.store,i.ctx.emit,()=>{var A;if((A=i==null?void 0:i.props)==null?void 0:A.nodeKey){const $=h(t.node);i.store.value.setCurrentNodeKey($)}else i.store.value.setCurrentNode(t.node)}),i.currentNode.value=t.node,i.props.expandOnClickNode&&w(),i.props.checkOnClickNode&&!t.node.disabled&&O(null,{target:{checked:!t.node.checked}}),i.ctx.emit("node-click",t.node.data,t.node,d,P)},b=P=>{i.instance.vnode.props.onNodeContextmenu&&(P.stopPropagation(),P.preventDefault()),i.ctx.emit("node-contextmenu",P,t.node.data,t.node,d)},w=()=>{t.node.isLeaf||(o.value?(i.ctx.emit("node-collapse",t.node.data,t.node,d),t.node.collapse()):t.node.expand(()=>{e.emit("node-expand",t.node.data,t.node,d)}))},O=(P,A)=>{t.node.setChecked(A.target.checked,!i.props.checkStrictly),xt(()=>{const D=i.store.value;i.ctx.emit("check",t.node.data,{checkedNodes:D.getCheckedNodes(),checkedKeys:D.getCheckedKeys(),halfCheckedNodes:D.getHalfCheckedNodes(),halfCheckedKeys:D.getHalfCheckedKeys()})})};return{ns:n,node$:u,tree:i,expanded:o,childNodeRendered:a,oldChecked:s,oldIndeterminate:l,getNodeKey:h,getNodeClass:g,handleSelectChange:m,handleClick:y,handleContextMenu:b,handleExpandIconClick:w,handleCheckChange:O,handleChildNodeExpand:(P,A,D)=>{r(A),i.ctx.emit("node-expand",P,A,D)},handleDragStart:P=>{!i.props.draggable||c.treeNodeDragStart({event:P,treeNode:t})},handleDragOver:P=>{P.preventDefault(),i.props.draggable&&c.treeNodeDragOver({event:P,treeNode:{$el:u.value,node:t.node}})},handleDrop:P=>{P.preventDefault()},handleDragEnd:P=>{!i.props.draggable||c.treeNodeDragEnd(P)},CaretRight:eW}}});function wFe(t,e,n,r,i,o){const a=rn("el-icon"),s=rn("el-checkbox"),l=rn("loading"),u=rn("node-content"),c=rn("el-tree-node"),d=rn("el-collapse-transition");return zt((R(),Y("div",{ref:"node$",class:V([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:At(t.handleClick,["stop"]),onContextmenu:t.handleContextMenu,onDragstart:At(t.handleDragStart,["stop"]),onDragover:At(t.handleDragOver,["stop"]),onDragend:At(t.handleDragEnd,["stop"]),onDrop:At(t.handleDrop,["stop"])},[J("div",{class:V(t.ns.be("node","content")),style:vt({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(R(),xe(a,{key:0,class:V([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:At(t.handleExpandIconClick,["stop"])},{default:j(()=>[(R(),xe(on(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):Se("v-if",!0),t.showCheckbox?(R(),xe(s,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:At(()=>{},["stop"]),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):Se("v-if",!0),t.node.loading?(R(),xe(a,{key:2,class:V([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:j(()=>[B(l)]),_:1},8,["class"])):Se("v-if",!0),B(u,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),B(d,null,{default:j(()=>[!t.renderAfterExpand||t.childNodeRendered?zt((R(),Y("div",{key:0,class:V(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded},[(R(!0),Y(dt,null,Ht(t.node.childNodes,f=>(R(),xe(c,{key:t.getNodeKey(f),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:f,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded"])),[[Bn,t.expanded]]):Se("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[Bn,t.node.visible]])}var xFe=Ye(OFe,[["render",wFe],["__file","tree-node.vue"]]);function SFe({el$:t},e){const n=Qe("tree"),r=yr([]),i=yr([]);Ft(()=>{a()}),ac(()=>{r.value=Array.from(t.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"))}),Fe(i,s=>{s.forEach(l=>{l.setAttribute("tabindex","-1")})}),sr(t,"keydown",s=>{const l=s.target;if(!l.className.includes(n.b("node")))return;const u=s.code;r.value=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));const c=r.value.indexOf(l);let d;if([ut.up,ut.down].includes(u)){if(s.preventDefault(),u===ut.up){d=c===-1?0:c!==0?c-1:r.value.length-1;const h=d;for(;!e.value.getNode(r.value[d].dataset.key).canFocus;){if(d--,d===h){d=-1;break}d<0&&(d=r.value.length-1)}}else{d=c===-1?0:c<r.value.length-1?c+1:0;const h=d;for(;!e.value.getNode(r.value[d].dataset.key).canFocus;){if(d++,d===h){d=-1;break}d>=r.value.length&&(d=0)}}d!==-1&&r.value[d].focus()}[ut.left,ut.right].includes(u)&&(s.preventDefault(),l.click());const f=l.querySelector('[type="checkbox"]');[ut.enter,ut.numpadEnter,ut.space].includes(u)&&f&&(s.preventDefault(),f.click())});const a=()=>{var s;r.value=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"));const l=t.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(l.length){l[0].setAttribute("tabindex","0");return}(s=r.value[0])==null||s.setAttribute("tabindex","0")}}const CFe=ue({name:"ElTree",components:{ElTreeNode:xFe},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:fr}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(t,e){const{t:n}=xn(),r=Qe("tree"),i=ht(qm,null),o=F(new vFe({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));o.value.initialize();const a=F(o.value.root),s=F(null),l=F(null),u=F(null),{broadcastExpanded:c}=MX(t),{dragState:d}=_Fe({props:t,ctx:e,el$:l,dropIndicator$:u,store:o});SFe({el$:l},o);const f=M(()=>{const{childNodes:Q}=a.value,W=i?i.hasFilteredOptions!==0:!1;return(!Q||Q.length===0||Q.every(({visible:G})=>!G))&&!W});Fe(()=>t.currentNodeKey,Q=>{o.value.setCurrentNodeKey(Q)}),Fe(()=>t.defaultCheckedKeys,Q=>{o.value.setDefaultCheckedKey(Q)}),Fe(()=>t.defaultExpandedKeys,Q=>{o.value.setDefaultExpandedKeys(Q)}),Fe(()=>t.data,Q=>{o.value.setData(Q)},{deep:!0}),Fe(()=>t.checkStrictly,Q=>{o.value.checkStrictly=Q});const h=Q=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");o.value.filter(Q)},g=Q=>wN(t.nodeKey,Q.data),m=Q=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const W=o.value.getNode(Q);if(!W)return[];const G=[W.data];let K=W.parent;for(;K&&K!==a.value;)G.push(K.data),K=K.parent;return G.reverse()},y=(Q,W)=>o.value.getCheckedNodes(Q,W),b=Q=>o.value.getCheckedKeys(Q),w=()=>{const Q=o.value.getCurrentNode();return Q?Q.data:null},O=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Q=w();return Q?Q[t.nodeKey]:null},x=(Q,W)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");o.value.setCheckedNodes(Q,W)},S=(Q,W)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");o.value.setCheckedKeys(Q,W)},C=(Q,W,G)=>{o.value.setChecked(Q,W,G)},E=()=>o.value.getHalfCheckedNodes(),T=()=>o.value.getHalfCheckedKeys(),P=(Q,W=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");gP(o,e.emit,()=>{c(Q),o.value.setUserCurrentNode(Q,W)})},A=(Q,W=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");gP(o,e.emit,()=>{c(),o.value.setCurrentNodeKey(Q,W)})},D=Q=>o.value.getNode(Q),$=Q=>{o.value.remove(Q)},N=(Q,W)=>{o.value.append(Q,W)},z=(Q,W)=>{o.value.insertBefore(Q,W)},I=(Q,W)=>{o.value.insertAfter(Q,W)},L=(Q,W,G)=>{c(W),e.emit("node-expand",Q,W,G)},X=(Q,W)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");o.value.updateChildren(Q,W)};return gn("RootTree",{ctx:e,props:t,store:o,root:a,currentNode:s,instance:tn()}),gn(ec,void 0),{ns:r,store:o,root:a,currentNode:s,dragState:d,el$:l,dropIndicator$:u,isEmpty:f,filter:h,getNodeKey:g,getNodePath:m,getCheckedNodes:y,getCheckedKeys:b,getCurrentNode:w,getCurrentKey:O,setCheckedNodes:x,setCheckedKeys:S,setChecked:C,getHalfCheckedNodes:E,getHalfCheckedKeys:T,setCurrentNode:P,setCurrentKey:A,t:n,getNode:D,remove:$,append:N,insertBefore:z,insertAfter:I,handleNodeExpand:L,updateKeyChildren:X}}});function EFe(t,e,n,r,i,o){const a=rn("el-tree-node");return R(),Y("div",{ref:"el$",class:V([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(R(!0),Y(dt,null,Ht(t.root.childNodes,s=>(R(),xe(a,{key:t.getNodeKey(s),node:s,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(R(),Y("div",{key:0,class:V(t.ns.e("empty-block"))},[Ee(t.$slots,"empty",{},()=>{var s;return[J("span",{class:V(t.ns.e("empty-text"))},Ve((s=t.emptyText)!=null?s:t.t("el.tree.emptyText")),3)]})],2)):Se("v-if",!0),zt(J("div",{ref:"dropIndicator$",class:V(t.ns.e("drop-indicator"))},null,2),[[Bn,t.dragState.showDropIndicator]])],2)}var TFe=Ye(CFe,[["render",EFe],["__file","tree.vue"]]);const A0=Vt(TFe),kFe=(t,{attrs:e,emit:n},{select:r,tree:i,key:o})=>{const a=Qe("tree-select");return Fe(()=>t.data,()=>{t.filterable&&xt(()=>{var l,u;(u=i.value)==null||u.filter((l=r.value)==null?void 0:l.states.inputValue)})},{flush:"post"}),{...vo(Mi(t),Object.keys(wl.props)),...e,"onUpdate:modelValue":l=>n(Ut,l),valueKey:o,popperClass:M(()=>{const l=[a.e("popper")];return t.popperClass&&l.push(t.popperClass),l.join(" ")}),filterMethod:(l="")=>{var u;t.filterMethod?t.filterMethod(l):t.remoteMethod?t.remoteMethod(l):(u=i.value)==null||u.filter(l)}}},PFe=ue({extends:Jc,setup(t,e){const n=Jc.setup(t,e);delete n.selectOptionClick;const r=tn().proxy;return xt(()=>{n.select.states.cachedOptions.get(r.value)||n.select.onOptionCreate(r)}),Fe(()=>e.attrs.visible,i=>{n.states.visible=i},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function vP(t){return t||t===0}function xN(t){return Xe(t)&&t.length}function Zp(t){return Xe(t)?t:vP(t)?[t]:[]}function $1(t,e,n,r,i){for(let o=0;o<t.length;o++){const a=t[o];if(e(a,o,t,i))return r?r(a,o,t,i):a;{const s=n(a);if(xN(s)){const l=$1(s,e,n,r,a);if(l)return l}}}}function N1(t,e,n,r){for(let i=0;i<t.length;i++){const o=t[i];e(o,i,t,r);const a=n(o);xN(a)&&N1(a,e,n,o)}}const AFe=(t,{attrs:e,slots:n,emit:r},{select:i,tree:o,key:a})=>{Fe(()=>t.modelValue,()=>{t.showCheckbox&&xt(()=>{const f=o.value;f&&!Qi(f.getCheckedKeys(),Zp(t.modelValue))&&f.setCheckedKeys(Zp(t.modelValue))})},{immediate:!0,deep:!0});const s=M(()=>({value:a.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...t.props})),l=(f,h)=>{var g;const m=s.value[f];return St(m)?m(h,(g=o.value)==null?void 0:g.getNode(l("value",h))):h[m]},u=Zp(t.modelValue).map(f=>$1(t.data||[],h=>l("value",h)===f,h=>l("children",h),(h,g,m,y)=>y&&l("value",y))).filter(f=>vP(f)),c=M(()=>{if(!t.renderAfterExpand&&!t.lazy)return[];const f=[];return N1(t.data.concat(t.cacheData),h=>{const g=l("value",h);f.push({value:g,currentLabel:l("label",h),isDisabled:l("disabled",h)})},h=>l("children",h)),f}),d=()=>{var f;return(f=o.value)==null?void 0:f.getCheckedKeys().filter(h=>{var g;const m=(g=o.value)==null?void 0:g.getNode(h);return!Lr(m)&&Cs(m.childNodes)})};return{...vo(Mi(t),Object.keys(A0.props)),...e,nodeKey:a,expandOnClickNode:M(()=>!t.checkStrictly&&t.expandOnClickNode),defaultExpandedKeys:M(()=>t.defaultExpandedKeys?t.defaultExpandedKeys.concat(u):u),renderContent:(f,{node:h,data:g,store:m})=>f(PFe,{value:l("value",g),label:l("label",g),disabled:l("disabled",g),visible:h.visible},t.renderContent?()=>t.renderContent(f,{node:h,data:g,store:m}):n.default?()=>n.default({node:h,data:g,store:m}):void 0),filterNodeMethod:(f,h,g)=>t.filterNodeMethod?t.filterNodeMethod(f,h,g):f?new RegExp(R$(f),"i").test(l("label",h)||""):!0,onNodeClick:(f,h,g)=>{var m,y,b,w;if((m=e.onNodeClick)==null||m.call(e,f,h,g),!(t.showCheckbox&&t.checkOnClickNode)){if(!t.showCheckbox&&(t.checkStrictly||h.isLeaf)){if(!l("disabled",f)){const O=(y=i.value)==null?void 0:y.states.options.get(l("value",f));(b=i.value)==null||b.handleOptionSelect(O)}}else t.expandOnClickNode&&g.proxy.handleExpandIconClick();(w=i.value)==null||w.focus()}},onCheck:(f,h)=>{var g;if(!t.showCheckbox)return;const m=l("value",f),y={};N1([o.value.store.root],x=>y[x.key]=x,x=>x.childNodes);const b=h.checkedKeys,w=t.multiple?Zp(t.modelValue).filter(x=>!(x in y)&&!b.includes(x)):[],O=w.concat(b);if(t.checkStrictly)r(Ut,t.multiple?O:O.includes(m)?m:void 0);else if(t.multiple){const x=d();r(Ut,w.concat(x))}else{const x=$1([f],E=>!xN(l("children",E))&&!l("disabled",E),E=>l("children",E)),S=x?l("value",x):void 0,C=vP(t.modelValue)&&!!$1([f],E=>l("value",E)===t.modelValue,E=>l("children",E));r(Ut,S===t.modelValue||C?void 0:S)}xt(()=>{var x;const S=Zp(t.modelValue);o.value.setCheckedKeys(S),(x=e.onCheck)==null||x.call(e,f,{checkedKeys:o.value.getCheckedKeys(),checkedNodes:o.value.getCheckedNodes(),halfCheckedKeys:o.value.getHalfCheckedKeys(),halfCheckedNodes:o.value.getHalfCheckedNodes()})}),(g=i.value)==null||g.focus()},onNodeExpand:(f,h,g)=>{var m;(m=e.onNodeExpand)==null||m.call(e,f,h,g),xt(()=>{if(!t.checkStrictly&&t.lazy&&t.multiple&&h.checked){const y={},b=o.value.getCheckedKeys();N1([o.value.store.root],x=>y[x.key]=x,x=>x.childNodes);const w=Zp(t.modelValue).filter(x=>!(x in y)&&!b.includes(x)),O=d();r(Ut,w.concat(O))}})},cacheOptions:c}};var MFe=ue({props:{data:{type:Array,default:()=>[]}},setup(t){const e=ht(qm);return Fe(()=>t.data,()=>{var n;t.data.forEach(i=>{e.states.cachedOptions.has(i.value)||e.states.cachedOptions.set(i.value,i)});const r=((n=e.selectRef)==null?void 0:n.querySelectorAll("input"))||[];wn&&!Array.from(r).includes(document.activeElement)&&e.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const RFe=ue({name:"ElTreeSelect",inheritAttrs:!1,props:{...wl.props,...A0.props,cacheData:{type:Array,default:()=>[]}},setup(t,e){const{slots:n,expose:r}=e,i=F(),o=F(),a=M(()=>t.nodeKey||t.valueKey||"value"),s=kFe(t,e,{select:i,tree:o,key:a}),{cacheOptions:l,...u}=AFe(t,e,{select:i,tree:o,key:a}),c=vn({});return r(c),Ft(()=>{Object.assign(c,{...vo(o.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...vo(i.value,["focus","blur","selectedLabel"])})}),()=>Tt(wl,vn({...s,ref:d=>i.value=d}),{...n,default:()=>[Tt(MFe,{data:l.value}),Tt(A0,vn({...u,ref:d=>o.value=d}))]})}});var $Fe=Ye(RFe,[["__file","tree-select.vue"]]);const NFe=Vt($Fe),SN=Symbol(),DFe={key:-1,level:-1,data:{}};var iy=(t=>(t.KEY="id",t.LABEL="label",t.CHILDREN="children",t.DISABLED="disabled",t.CLASS="",t))(iy||{}),yP=(t=>(t.ADD="add",t.DELETE="delete",t))(yP||{});const $X={type:Number,default:26},LFe=Ze({data:{type:we(Array),default:()=>ei([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:we(Object),default:()=>ei({children:"children",label:"label",disabled:"disabled",value:"id",class:""})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:we(Array),default:()=>ei([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:we(Array),default:()=>ei([])},indent:{type:Number,default:16},itemSize:$X,icon:{type:fr},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:we([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:we(Function)},perfMode:{type:Boolean,default:!0}}),IFe=Ze({node:{type:we(Object),default:()=>ei(DFe)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:$X}),BFe=Ze({node:{type:we(Object),required:!0}}),NX="node-click",DX="node-drop",LX="node-expand",IX="node-collapse",BX="current-change",FX="check",VX="check-change",jX="node-contextmenu",FFe={[NX]:(t,e,n)=>t&&e&&n,[DX]:(t,e,n)=>t&&e&&n,[LX]:(t,e)=>t&&e,[IX]:(t,e)=>t&&e,[BX]:(t,e)=>t&&e,[FX]:(t,e)=>t&&e,[VX]:(t,e)=>t&&wr(e),[jX]:(t,e,n)=>t&&e&&n},VFe={click:(t,e)=>!!(t&&e),drop:(t,e)=>!!(t&&e),toggle:t=>!!t,check:(t,e)=>t&&wr(e)};function jFe(t,e){const n=F(new Set),r=F(new Set),{emit:i}=tn();Fe([()=>e.value,()=>t.defaultCheckedKeys],()=>xt(()=>{w(t.defaultCheckedKeys)}),{immediate:!0});const o=()=>{if(!e.value||!t.showCheckbox||t.checkStrictly)return;const{levelTreeNodeMap:O,maxLevel:x}=e.value,S=n.value,C=new Set;for(let E=x-1;E>=1;--E){const T=O.get(E);!T||T.forEach(P=>{const A=P.children;if(A){let D=!0,$=!1;for(const N of A){const z=N.key;if(S.has(z))$=!0;else if(C.has(z)){D=!1,$=!0;break}else D=!1}D?S.add(P.key):$?(C.add(P.key),S.delete(P.key)):(S.delete(P.key),C.delete(P.key))}})}r.value=C},a=O=>n.value.has(O.key),s=O=>r.value.has(O.key),l=(O,x,S=!0,C=!0)=>{const E=n.value,T=(P,A)=>{E[A?yP.ADD:yP.DELETE](P.key);const D=P.children;!t.checkStrictly&&D&&D.forEach($=>{$.disabled||T($,A)})};T(O,x),C&&o(),S&&u(O,x)},u=(O,x)=>{const{checkedNodes:S,checkedKeys:C}=g(),{halfCheckedNodes:E,halfCheckedKeys:T}=m();i(FX,O.data,{checkedKeys:C,checkedNodes:S,halfCheckedKeys:T,halfCheckedNodes:E}),i(VX,O.data,x)};function c(O=!1){return g(O).checkedKeys}function d(O=!1){return g(O).checkedNodes}function f(){return m().halfCheckedKeys}function h(){return m().halfCheckedNodes}function g(O=!1){const x=[],S=[];if((e==null?void 0:e.value)&&t.showCheckbox){const{treeNodeMap:C}=e.value;n.value.forEach(E=>{const T=C.get(E);T&&(!O||O&&T.isLeaf)&&(S.push(E),x.push(T.data))})}return{checkedKeys:S,checkedNodes:x}}function m(){const O=[],x=[];if((e==null?void 0:e.value)&&t.showCheckbox){const{treeNodeMap:S}=e.value;r.value.forEach(C=>{const E=S.get(C);E&&(x.push(C),O.push(E.data))})}return{halfCheckedNodes:O,halfCheckedKeys:x}}function y(O){n.value.clear(),r.value.clear(),xt(()=>{w(O)})}function b(O,x){if((e==null?void 0:e.value)&&t.showCheckbox){const S=e.value.treeNodeMap.get(O);S&&l(S,x,!1)}}function w(O){if(e!=null&&e.value){const{treeNodeMap:x}=e.value;if(t.showCheckbox&&x&&(O==null?void 0:O.length)>0){for(const S of O){const C=x.get(S);C&&!a(C)&&l(C,!0,!1,!1)}o()}}}return{updateCheckedKeys:o,toggleCheckbox:l,isChecked:a,isIndeterminate:s,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:h,setChecked:b,setCheckedKeys:y}}function QFe(t,e){const n=F(new Set([])),r=F(new Set([])),i=M(()=>St(t.filterMethod));function o(s){var l;if(!i.value)return;const u=new Set,c=r.value,d=n.value,f=[],h=((l=e.value)==null?void 0:l.treeNodes)||[],g=t.filterMethod;d.clear();function m(y){y.forEach(b=>{f.push(b),g!=null&&g(s,b.data,b)?f.forEach(O=>{u.add(O.key)}):b.isLeaf&&d.add(b.key);const w=b.children;if(w&&m(w),!b.isLeaf){if(!u.has(b.key))d.add(b.key);else if(w){let O=!0;for(const x of w)if(!d.has(x.key)){O=!1;break}O?c.add(b.key):c.delete(b.key)}}f.pop()})}return m(h),u}function a(s){return r.value.has(s.key)}return{hiddenExpandIconKeySet:r,hiddenNodeKeySet:n,doFilter:o,isForceHiddenExpandIcon:a}}function zFe(t,e){const n=F(new Set(t.defaultExpandedKeys)),r=F(),i=yr(),o=F();Fe(()=>t.currentNodeKey,q=>{r.value=q},{immediate:!0}),Fe(()=>t.data,q=>{ee(q)},{immediate:!0});const{isIndeterminate:a,isChecked:s,toggleCheckbox:l,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:d,getHalfCheckedNodes:f,setChecked:h,setCheckedKeys:g}=jFe(t,i),{doFilter:m,hiddenNodeKeySet:y,isForceHiddenExpandIcon:b}=QFe(t,i),w=M(()=>{var q;return((q=t.props)==null?void 0:q.value)||iy.KEY}),O=M(()=>{var q;return((q=t.props)==null?void 0:q.children)||iy.CHILDREN}),x=M(()=>{var q;return((q=t.props)==null?void 0:q.disabled)||iy.DISABLED}),S=M(()=>{var q;return((q=t.props)==null?void 0:q.label)||iy.LABEL}),C=M(()=>{var q;const de=n.value,ke=y.value,Ie=[],se=((q=i.value)==null?void 0:q.treeNodes)||[],ye=[];for(let Ae=se.length-1;Ae>=0;--Ae)ye.push(se[Ae]);for(;ye.length;){const Ae=ye.pop();if(!ke.has(Ae.key)&&(Ie.push(Ae),Ae.children&&de.has(Ae.key)))for(let Z=Ae.children.length-1;Z>=0;--Z)ye.push(Ae.children[Z])}return Ie}),E=M(()=>C.value.length>0);function T(q){const de=new Map,ke=new Map;let Ie=1;function se(Ae,Z=1,te=void 0){var le;const Te=[];for(const pe of Ae){const Oe=D(pe),Re={level:Z,key:Oe,data:pe};Re.label=N(pe),Re.parent=te;const je=A(pe);Re.disabled=$(pe),Re.isLeaf=!je||je.length===0,je&&je.length&&(Re.children=se(je,Z+1,Re)),Te.push(Re),de.set(Oe,Re),ke.has(Z)||ke.set(Z,[]),(le=ke.get(Z))==null||le.push(Re)}return Z>Ie&&(Ie=Z),Te}const ye=se(q);return{treeNodeMap:de,levelTreeNodeMap:ke,maxLevel:Ie,treeNodes:ye}}function P(q){const de=m(q);de&&(n.value=de)}function A(q){return q[O.value]}function D(q){return q?q[w.value]:""}function $(q){return q[x.value]}function N(q){return q[S.value]}function z(q){n.value.has(q.key)?K(q):G(q)}function I(q){const de=new Set,ke=i.value.treeNodeMap;q.forEach(Ie=>{let se=ke.get(Ie);for(;se&&!de.has(se.key);)de.add(se.key),se=se.parent}),n.value=de}function L(q,de){e(NX,q.data,q,de),Q(q),t.expandOnClickNode&&z(q),t.showCheckbox&&t.checkOnClickNode&&!q.disabled&&l(q,!s(q),!0)}function X(q,de){e(DX,q.data,q,de)}function Q(q){_e(q)||(r.value=q.key,e(BX,q.data,q))}function W(q,de){l(q,de)}function G(q){const de=n.value;if(i.value&&t.accordion){const{treeNodeMap:ke}=i.value;de.forEach(Ie=>{const se=ke.get(Ie);q&&q.level===(se==null?void 0:se.level)&&de.delete(Ie)})}de.add(q.key),e(LX,q.data,q)}function K(q){n.value.delete(q.key),e(IX,q.data,q)}function oe(q){return n.value.has(q.key)}function ne(q){return!!q.disabled}function _e(q){const de=r.value;return de!==void 0&&de===q.key}function Ce(){var q,de;if(!!r.value)return(de=(q=i.value)==null?void 0:q.treeNodeMap.get(r.value))==null?void 0:de.data}function U(){return r.value}function ie(q){r.value=q}function ee(q){xt(()=>i.value=T(q))}function he(q){var de;const ke=Jt(q)?D(q):q;return(de=i.value)==null?void 0:de.treeNodeMap.get(ke)}function $e(q,de="auto"){const ke=he(q);ke&&o.value&&o.value.scrollToItem(C.value.indexOf(ke),de)}function Me(q){var de;(de=o.value)==null||de.scrollTo(q)}return{tree:i,flattenTree:C,isNotEmpty:E,listRef:o,getKey:D,getChildren:A,toggleExpand:z,toggleCheckbox:l,isExpanded:oe,isChecked:s,isIndeterminate:a,isDisabled:ne,isCurrent:_e,isForceHiddenExpandIcon:b,handleNodeClick:L,handleNodeDrop:X,handleNodeCheck:W,getCurrentNode:Ce,getCurrentKey:U,setCurrentKey:ie,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:d,getHalfCheckedNodes:f,setChecked:h,setCheckedKeys:g,filter:P,setData:ee,getNode:he,expandNode:G,collapseNode:K,setExpandedKeys:I,scrollToNode:$e,scrollTo:Me}}var WFe=ue({name:"ElTreeNodeContent",props:BFe,setup(t){const e=ht(SN),n=Qe("tree");return()=>{const r=t.node,{data:i}=r;return e!=null&&e.ctx.slots.default?e.ctx.slots.default({node:r,data:i}):Tt("span",{class:n.be("node","label")},[r==null?void 0:r.label])}}});const HFe=ue({name:"ElTreeNode"}),UFe=ue({...HFe,props:IFe,emits:VFe,setup(t,{emit:e}){const n=t,r=ht(SN),i=Qe("tree"),o=M(()=>{var h;return(h=r==null?void 0:r.props.indent)!=null?h:16}),a=M(()=>{var h;return(h=r==null?void 0:r.props.icon)!=null?h:eW}),s=h=>{const g=r==null?void 0:r.props.props.class;if(!g)return{};let m;if(St(g)){const{data:y}=h;m=g(y,h)}else m=g;return Ot(m)?{[m]:!0}:m},l=h=>{e("click",n.node,h)},u=h=>{e("drop",n.node,h)},c=()=>{e("toggle",n.node)},d=h=>{e("check",n.node,h)},f=h=>{var g,m,y,b;(y=(m=(g=r==null?void 0:r.instance)==null?void 0:g.vnode)==null?void 0:m.props)!=null&&y.onNodeContextmenu&&(h.stopPropagation(),h.preventDefault()),r==null||r.ctx.emit(jX,h,(b=n.node)==null?void 0:b.data,n.node)};return(h,g)=>{var m,y,b;return R(),Y("div",{ref:"node$",class:V([p(i).b("node"),p(i).is("expanded",h.expanded),p(i).is("current",h.current),p(i).is("focusable",!h.disabled),p(i).is("checked",!h.disabled&&h.checked),s(h.node)]),role:"treeitem",tabindex:"-1","aria-expanded":h.expanded,"aria-disabled":h.disabled,"aria-checked":h.checked,"data-key":(m=h.node)==null?void 0:m.key,onClick:At(l,["stop"]),onContextmenu:f,onDragover:At(()=>{},["prevent"]),onDragenter:At(()=>{},["prevent"]),onDrop:At(u,["stop"])},[J("div",{class:V(p(i).be("node","content")),style:vt({paddingLeft:`${(h.node.level-1)*p(o)}px`,height:h.itemSize+"px"})},[p(a)?(R(),xe(p(mt),{key:0,class:V([p(i).is("leaf",!!((y=h.node)!=null&&y.isLeaf)),p(i).is("hidden",h.hiddenExpandIcon),{expanded:!((b=h.node)!=null&&b.isLeaf)&&h.expanded},p(i).be("node","expand-icon")]),onClick:At(c,["stop"])},{default:j(()=>[(R(),xe(on(p(a))))]),_:1},8,["class","onClick"])):Se("v-if",!0),h.showCheckbox?(R(),xe(p(Bs),{key:1,"model-value":h.checked,indeterminate:h.indeterminate,disabled:h.disabled,onChange:d,onClick:At(()=>{},["stop"])},null,8,["model-value","indeterminate","disabled","onClick"])):Se("v-if",!0),B(p(WFe),{node:h.node},null,8,["node"])],6)],42,["aria-expanded","aria-disabled","aria-checked","data-key","onClick","onDragover","onDragenter","onDrop"])}}});var XFe=Ye(UFe,[["__file","tree-node.vue"]]);const ZFe=ue({name:"ElTreeV2"}),qFe=ue({...ZFe,props:LFe,emits:FFe,setup(t,{expose:e,emit:n}){const r=t,i=Ni(),o=M(()=>r.itemSize);gn(SN,{ctx:{emit:n,slots:i},props:r,instance:tn()}),gn(ec,void 0);const{t:a}=xn(),s=Qe("tree"),{flattenTree:l,isNotEmpty:u,listRef:c,toggleExpand:d,isExpanded:f,isIndeterminate:h,isChecked:g,isDisabled:m,isCurrent:y,isForceHiddenExpandIcon:b,handleNodeClick:w,handleNodeDrop:O,handleNodeCheck:x,toggleCheckbox:S,getCurrentNode:C,getCurrentKey:E,setCurrentKey:T,getCheckedKeys:P,getCheckedNodes:A,getHalfCheckedKeys:D,getHalfCheckedNodes:$,setChecked:N,setCheckedKeys:z,filter:I,setData:L,getNode:X,expandNode:Q,collapseNode:W,setExpandedKeys:G,scrollToNode:K,scrollTo:oe}=zFe(r,n);return e({toggleCheckbox:S,getCurrentNode:C,getCurrentKey:E,setCurrentKey:T,getCheckedKeys:P,getCheckedNodes:A,getHalfCheckedKeys:D,getHalfCheckedNodes:$,setChecked:N,setCheckedKeys:z,filter:I,setData:L,getNode:X,expandNode:Q,collapseNode:W,setExpandedKeys:G,scrollToNode:K,scrollTo:oe}),(ne,_e)=>(R(),Y("div",{class:V([p(s).b(),{[p(s).m("highlight-current")]:ne.highlightCurrent}]),role:"tree"},[p(u)?(R(),xe(p(SU),{key:0,ref_key:"listRef",ref:c,"class-name":p(s).b("virtual-list"),data:p(l),total:p(l).length,height:ne.height,"item-size":p(o),"perf-mode":ne.perfMode},{default:j(({data:Ce,index:U,style:ie})=>[(R(),xe(XFe,{key:Ce[U].key,style:vt(ie),node:Ce[U],expanded:p(f)(Ce[U]),"show-checkbox":ne.showCheckbox,checked:p(g)(Ce[U]),indeterminate:p(h)(Ce[U]),"item-size":p(o),disabled:p(m)(Ce[U]),current:p(y)(Ce[U]),"hidden-expand-icon":p(b)(Ce[U]),onClick:p(w),onToggle:p(d),onCheck:p(x),onDrop:p(O)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(R(),Y("div",{key:1,class:V(p(s).e("empty-block"))},[Ee(ne.$slots,"empty",{},()=>{var Ce;return[J("span",{class:V(p(s).e("empty-text"))},Ve((Ce=ne.emptyText)!=null?Ce:p(a)("el.tree.emptyText")),3)]})],2))],2))}});var YFe=Ye(qFe,[["__file","tree.vue"]]);const GFe=Vt(YFe),QX=Symbol("uploadContextKey"),KFe="ElUpload";class JFe extends Error{constructor(e,n,r,i){super(e),this.name="UploadAjaxError",this.status=n,this.method=r,this.url=i}}function o8(t,e,n){let r;return n.response?r=`${n.response.error||n.response}`:n.responseText?r=`${n.responseText}`:r=`fail to ${e.method} ${t} ${n.status}`,new JFe(r,n.status,e.method,t)}function eVe(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const tVe=t=>{typeof XMLHttpRequest=="undefined"&&Wi(KFe,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,n=t.action;e.upload&&e.upload.addEventListener("progress",o=>{const a=o;a.percent=o.total>0?o.loaded/o.total*100:0,t.onProgress(a)});const r=new FormData;if(t.data)for(const[o,a]of Object.entries(t.data))Xe(a)&&a.length?r.append(o,...a):r.append(o,a);r.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(o8(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(o8(n,t,e));t.onSuccess(eVe(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const i=t.headers||{};if(i instanceof Headers)i.forEach((o,a)=>e.setRequestHeader(a,o));else for(const[o,a]of Object.entries(i))Lr(a)||e.setRequestHeader(o,String(a));return e.send(r),e},zX=["text","picture","picture-card"];let nVe=1;const bP=()=>Date.now()+nVe++,WX=Ze({action:{type:String,default:"#"},headers:{type:we(Object)},method:{type:String,default:"post"},data:{type:we([Object,Function,Promise]),default:()=>ei({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:we(Array),default:()=>ei([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:zX,default:"text"},httpRequest:{type:we(Function),default:tVe},disabled:Boolean,limit:Number}),rVe=Ze({...WX,beforeUpload:{type:we(Function),default:ir},beforeRemove:{type:we(Function)},onRemove:{type:we(Function),default:ir},onChange:{type:we(Function),default:ir},onPreview:{type:we(Function),default:ir},onSuccess:{type:we(Function),default:ir},onProgress:{type:we(Function),default:ir},onError:{type:we(Function),default:ir},onExceed:{type:we(Function),default:ir},crossorigin:{type:we(String)}}),iVe=Ze({files:{type:we(Array),default:()=>ei([])},disabled:{type:Boolean,default:!1},handlePreview:{type:we(Function),default:ir},listType:{type:String,values:zX,default:"text"},crossorigin:{type:we(String)}}),oVe={remove:t=>!!t},aVe=ue({name:"ElUploadList"}),sVe=ue({...aVe,props:iVe,emits:oVe,setup(t,{emit:e}){const n=t,{t:r}=xn(),i=Qe("upload"),o=Qe("icon"),a=Qe("list"),s=Ho(),l=F(!1),u=M(()=>[i.b("list"),i.bm("list",n.listType),i.is("disabled",n.disabled)]),c=d=>{e("remove",d)};return(d,f)=>(R(),xe(r7,{tag:"ul",class:V(p(u)),name:p(a).b()},{default:j(()=>[(R(!0),Y(dt,null,Ht(d.files,(h,g)=>(R(),Y("li",{key:h.uid||h.name,class:V([p(i).be("list","item"),p(i).is(h.status),{focusing:l.value}]),tabindex:"0",onKeydown:br(m=>!p(s)&&c(h),["delete"]),onFocus:m=>l.value=!0,onBlur:m=>l.value=!1,onClick:m=>l.value=!1},[Ee(d.$slots,"default",{file:h,index:g},()=>[d.listType==="picture"||h.status!=="uploading"&&d.listType==="picture-card"?(R(),Y("img",{key:0,class:V(p(i).be("list","item-thumbnail")),src:h.url,crossorigin:d.crossorigin,alt:""},null,10,["src","crossorigin"])):Se("v-if",!0),h.status==="uploading"||d.listType!=="picture-card"?(R(),Y("div",{key:1,class:V(p(i).be("list","item-info"))},[J("a",{class:V(p(i).be("list","item-name")),onClick:At(m=>d.handlePreview(h),["prevent"])},[B(p(mt),{class:V(p(o).m("document"))},{default:j(()=>[B(p(ACe))]),_:1},8,["class"]),J("span",{class:V(p(i).be("list","item-file-name")),title:h.name},Ve(h.name),11,["title"])],10,["onClick"]),h.status==="uploading"?(R(),xe(p(pU),{key:0,type:d.listType==="picture-card"?"circle":"line","stroke-width":d.listType==="picture-card"?6:2,percentage:Number(h.percentage),style:vt(d.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):Se("v-if",!0)],2)):Se("v-if",!0),J("label",{class:V(p(i).be("list","item-status-label"))},[d.listType==="text"?(R(),xe(p(mt),{key:0,class:V([p(o).m("upload-success"),p(o).m("circle-check")])},{default:j(()=>[B(p(s$))]),_:1},8,["class"])):["picture-card","picture"].includes(d.listType)?(R(),xe(p(mt),{key:1,class:V([p(o).m("upload-success"),p(o).m("check")])},{default:j(()=>[B(p(Eb))]),_:1},8,["class"])):Se("v-if",!0)],2),p(s)?Se("v-if",!0):(R(),xe(p(mt),{key:2,class:V(p(o).m("close")),onClick:m=>c(h)},{default:j(()=>[B(p(Oa))]),_:2},1032,["class","onClick"])),Se(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),Se(" This is a bug which needs to be fixed "),Se(" TODO: Fix the incorrect navigation interaction "),p(s)?Se("v-if",!0):(R(),Y("i",{key:3,class:V(p(o).m("close-tip"))},Ve(p(r)("el.upload.deleteTip")),3)),d.listType==="picture-card"?(R(),Y("span",{key:4,class:V(p(i).be("list","item-actions"))},[J("span",{class:V(p(i).be("list","item-preview")),onClick:m=>d.handlePreview(h)},[B(p(mt),{class:V(p(o).m("zoom-in"))},{default:j(()=>[B(p(iW))]),_:1},8,["class"])],10,["onClick"]),p(s)?Se("v-if",!0):(R(),Y("span",{key:0,class:V(p(i).be("list","item-delete")),onClick:m=>c(h)},[B(p(mt),{class:V(p(o).m("delete"))},{default:j(()=>[B(p(u$))]),_:1},8,["class"])],10,["onClick"]))],2)):Se("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),Ee(d.$slots,"append")]),_:3},8,["class","name"]))}});var a8=Ye(sVe,[["__file","upload-list.vue"]]);const lVe=Ze({disabled:{type:Boolean,default:!1}}),uVe={file:t=>Xe(t)},HX="ElUploadDrag",cVe=ue({name:HX}),dVe=ue({...cVe,props:lVe,emits:uVe,setup(t,{emit:e}){ht(QX)||Wi(HX,"usage: <el-upload><el-upload-dragger /></el-upload>");const r=Qe("upload"),i=F(!1),o=Ho(),a=l=>{if(o.value)return;i.value=!1,l.stopPropagation();const u=Array.from(l.dataTransfer.files);e("file",u)},s=()=>{o.value||(i.value=!0)};return(l,u)=>(R(),Y("div",{class:V([p(r).b("dragger"),p(r).is("dragover",i.value)]),onDrop:At(a,["prevent"]),onDragover:At(s,["prevent"]),onDragleave:At(c=>i.value=!1,["prevent"])},[Ee(l.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var fVe=Ye(dVe,[["__file","upload-dragger.vue"]]);const hVe=Ze({...WX,beforeUpload:{type:we(Function),default:ir},onRemove:{type:we(Function),default:ir},onStart:{type:we(Function),default:ir},onSuccess:{type:we(Function),default:ir},onProgress:{type:we(Function),default:ir},onError:{type:we(Function),default:ir},onExceed:{type:we(Function),default:ir}}),pVe=ue({name:"ElUploadContent",inheritAttrs:!1}),gVe=ue({...pVe,props:hVe,setup(t,{expose:e}){const n=t,r=Qe("upload"),i=Ho(),o=yr({}),a=yr(),s=m=>{if(m.length===0)return;const{autoUpload:y,limit:b,fileList:w,multiple:O,onStart:x,onExceed:S}=n;if(b&&w.length+m.length>b){S(m,w);return}O||(m=m.slice(0,1));for(const C of m){const E=C;E.uid=bP(),x(E),y&&l(E)}},l=async m=>{if(a.value.value="",!n.beforeUpload)return c(m);let y,b={};try{const O=n.data,x=n.beforeUpload(m);b=n0(n.data)?Nn(n.data):n.data,y=await x,n0(n.data)&&Qi(O,b)&&(b=Nn(n.data))}catch{y=!1}if(y===!1){n.onRemove(m);return}let w=m;y instanceof Blob&&(y instanceof File?w=y:w=new File([y],m.name,{type:m.type})),c(Object.assign(w,{uid:m.uid}),b)},u=async(m,y)=>St(m)?m(y):m,c=async(m,y)=>{const{headers:b,data:w,method:O,withCredentials:x,name:S,action:C,onProgress:E,onSuccess:T,onError:P,httpRequest:A}=n;try{y=await u(y!=null?y:w,m)}catch{n.onRemove(m);return}const{uid:D}=m,$={headers:b||{},withCredentials:x,file:m,data:y,method:O,filename:S,action:C,onProgress:z=>{E(z,m)},onSuccess:z=>{T(z,m),delete o.value[D]},onError:z=>{P(z,m),delete o.value[D]}},N=A($);o.value[D]=N,N instanceof Promise&&N.then($.onSuccess,$.onError)},d=m=>{const y=m.target.files;!y||s(Array.from(y))},f=()=>{i.value||(a.value.value="",a.value.click())},h=()=>{f()};return e({abort:m=>{Zz(o.value).filter(m?([b])=>String(m.uid)===b:()=>!0).forEach(([b,w])=>{w instanceof XMLHttpRequest&&w.abort(),delete o.value[b]})},upload:l}),(m,y)=>(R(),Y("div",{class:V([p(r).b(),p(r).m(m.listType),p(r).is("drag",m.drag),p(r).is("disabled",p(i))]),tabindex:p(i)?"-1":"0",onClick:f,onKeydown:br(At(h,["self"]),["enter","space"])},[m.drag?(R(),xe(fVe,{key:0,disabled:p(i),onFile:s},{default:j(()=>[Ee(m.$slots,"default")]),_:3},8,["disabled"])):Ee(m.$slots,"default",{key:1}),J("input",{ref_key:"inputRef",ref:a,class:V(p(r).e("input")),name:m.name,disabled:p(i),multiple:m.multiple,accept:m.accept,type:"file",onChange:d,onClick:At(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var s8=Ye(gVe,[["__file","upload-content.vue"]]);const l8="ElUpload",u8=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},mVe=(t,e)=>{const n=Vz(t,"fileList",void 0,{passive:!0}),r=h=>n.value.find(g=>g.uid===h.uid);function i(h){var g;(g=e.value)==null||g.abort(h)}function o(h=["ready","uploading","success","fail"]){n.value=n.value.filter(g=>!h.includes(g.status))}function a(h){n.value=n.value.filter(g=>g!==h)}const s=(h,g)=>{const m=r(g);!m||(console.error(h),m.status="fail",a(m),t.onError(h,m,n.value),t.onChange(m,n.value))},l=(h,g)=>{const m=r(g);!m||(t.onProgress(h,m,n.value),m.status="uploading",m.percentage=Math.round(h.percent))},u=(h,g)=>{const m=r(g);!m||(m.status="success",m.response=h,t.onSuccess(h,m,n.value),t.onChange(m,n.value))},c=h=>{Lr(h.uid)&&(h.uid=bP());const g={name:h.name,percentage:0,status:"ready",size:h.size,raw:h,uid:h.uid};if(t.listType==="picture-card"||t.listType==="picture")try{g.url=URL.createObjectURL(h)}catch(m){m.message,t.onError(m,g,n.value)}n.value=[...n.value,g],t.onChange(g,n.value)},d=async h=>{const g=h instanceof File?r(h):h;g||Wi(l8,"file to be removed not found");const m=y=>{i(y),a(y),t.onRemove(y,n.value),u8(y)};t.beforeRemove?await t.beforeRemove(g,n.value)!==!1&&m(g):m(g)};function f(){n.value.filter(({status:h})=>h==="ready").forEach(({raw:h})=>{var g;return h&&((g=e.value)==null?void 0:g.upload(h))})}return Fe(()=>t.listType,h=>{h!=="picture-card"&&h!=="picture"||(n.value=n.value.map(g=>{const{raw:m,url:y}=g;if(!y&&m)try{g.url=URL.createObjectURL(m)}catch(b){t.onError(b,g,n.value)}return g}))}),Fe(n,h=>{for(const g of h)g.uid||(g.uid=bP()),g.status||(g.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:i,clearFiles:o,handleError:s,handleProgress:l,handleStart:c,handleSuccess:u,handleRemove:d,submit:f,revokeFileObjectURL:u8}},vVe=ue({name:"ElUpload"}),yVe=ue({...vVe,props:rVe,setup(t,{expose:e}){const n=t,r=Ho(),i=yr(),{abort:o,submit:a,clearFiles:s,uploadFiles:l,handleStart:u,handleError:c,handleRemove:d,handleSuccess:f,handleProgress:h,revokeFileObjectURL:g}=mVe(n,i),m=M(()=>n.listType==="picture-card"),y=M(()=>({...n,fileList:l.value,onStart:u,onProgress:h,onSuccess:f,onError:c,onRemove:d}));return pr(()=>{l.value.forEach(g)}),gn(QX,{accept:Gn(n,"accept")}),e({abort:o,submit:a,clearFiles:s,handleStart:u,handleRemove:d}),(b,w)=>(R(),Y("div",null,[p(m)&&b.showFileList?(R(),xe(a8,{key:0,disabled:p(r),"list-type":b.listType,files:p(l),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:p(d)},es({append:j(()=>[B(s8,an({ref_key:"uploadRef",ref:i},p(y)),{default:j(()=>[b.$slots.trigger?Ee(b.$slots,"trigger",{key:0}):Se("v-if",!0),!b.$slots.trigger&&b.$slots.default?Ee(b.$slots,"default",{key:1}):Se("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:j(({file:O,index:x})=>[Ee(b.$slots,"file",{file:O,index:x})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Se("v-if",!0),!p(m)||p(m)&&!b.showFileList?(R(),xe(s8,an({key:1,ref_key:"uploadRef",ref:i},p(y)),{default:j(()=>[b.$slots.trigger?Ee(b.$slots,"trigger",{key:0}):Se("v-if",!0),!b.$slots.trigger&&b.$slots.default?Ee(b.$slots,"default",{key:1}):Se("v-if",!0)]),_:3},16)):Se("v-if",!0),b.$slots.trigger?Ee(b.$slots,"default",{key:2}):Se("v-if",!0),Ee(b.$slots,"tip"),!p(m)&&b.showFileList?(R(),xe(a8,{key:3,disabled:p(r),"list-type":b.listType,files:p(l),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:p(d)},es({_:2},[b.$slots.file?{name:"default",fn:j(({file:O,index:x})=>[Ee(b.$slots,"file",{file:O,index:x})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Se("v-if",!0)]))}});var bVe=Ye(yVe,[["__file","upload.vue"]]);const UX=Vt(bVe),_Ve=Ze({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:we([String,Array]),default:"Element Plus"},font:{type:we(Object)},gap:{type:we(Array),default:()=>[100,100]},offset:{type:we(Array)}});function OVe(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function wVe(t){return Object.keys(t).map(e=>`${OVe(e)}: ${t[e]};`).join(" ")}function xVe(){return window.devicePixelRatio||1}const SVe=(t,e)=>{let n=!1;return t.removedNodes.length&&e&&(n=Array.from(t.removedNodes).includes(e)),t.type==="attributes"&&t.target===e&&(n=!0),n},XX=3;function WT(t,e,n=1){const r=document.createElement("canvas"),i=r.getContext("2d"),o=t*n,a=e*n;return r.setAttribute("width",`${o}px`),r.setAttribute("height",`${a}px`),i.save(),[i,r,o,a]}function CVe(){function t(e,n,r,i,o,a,s,l){const[u,c,d,f]=WT(i,o,r);if(e instanceof HTMLImageElement)u.drawImage(e,0,0,d,f);else{const{color:K,fontSize:oe,fontStyle:ne,fontWeight:_e,fontFamily:Ce,textAlign:U,textBaseline:ie}=a,ee=Number(oe)*r;u.font=`${ne} normal ${_e} ${ee}px/${o}px ${Ce}`,u.fillStyle=K,u.textAlign=U,u.textBaseline=ie;const he=Xe(e)?e:[e];he==null||he.forEach(($e,Me)=>{u.fillText($e!=null?$e:"",d/2,Me*(ee+XX*r))})}const h=Math.PI/180*Number(n),g=Math.max(i,o),[m,y,b]=WT(g,g,r);m.translate(b/2,b/2),m.rotate(h),d>0&&f>0&&m.drawImage(c,-d/2,-f/2);function w(K,oe){const ne=K*Math.cos(h)-oe*Math.sin(h),_e=K*Math.sin(h)+oe*Math.cos(h);return[ne,_e]}let O=0,x=0,S=0,C=0;const E=d/2,T=f/2;[[0-E,0-T],[0+E,0-T],[0+E,0+T],[0-E,0+T]].forEach(([K,oe])=>{const[ne,_e]=w(K,oe);O=Math.min(O,ne),x=Math.max(x,ne),S=Math.min(S,_e),C=Math.max(C,_e)});const A=O+b/2,D=S+b/2,$=x-O,N=C-S,z=s*r,I=l*r,L=($+z)*2,X=N+I,[Q,W]=WT(L,X);function G(K=0,oe=0){Q.drawImage(y,A,D,$,N,K,oe,$,N)}return G(),G($+z,-N/2-I/2),G($+z,+N/2+I/2),[W.toDataURL(),L/r,X/r]}return t}const EVe=ue({name:"ElWatermark"}),TVe=ue({...EVe,props:_Ve,setup(t){const e=t,n={position:"relative"},r=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.color)!=null?D:"rgba(0,0,0,.15)"}),i=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontSize)!=null?D:16}),o=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontWeight)!=null?D:"normal"}),a=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontStyle)!=null?D:"normal"}),s=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontFamily)!=null?D:"sans-serif"}),l=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.textAlign)!=null?D:"center"}),u=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.textBaseline)!=null?D:"hanging"}),c=M(()=>e.gap[0]),d=M(()=>e.gap[1]),f=M(()=>c.value/2),h=M(()=>d.value/2),g=M(()=>{var A,D;return(D=(A=e.offset)==null?void 0:A[0])!=null?D:f.value}),m=M(()=>{var A,D;return(D=(A=e.offset)==null?void 0:A[1])!=null?D:h.value}),y=()=>{const A={zIndex:e.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let D=g.value-f.value,$=m.value-h.value;return D>0&&(A.left=`${D}px`,A.width=`calc(100% - ${D}px)`,D=0),$>0&&(A.top=`${$}px`,A.height=`calc(100% - ${$}px)`,$=0),A.backgroundPosition=`${D}px ${$}px`,A},b=yr(null),w=yr(),O=F(!1),x=()=>{w.value&&(w.value.remove(),w.value=void 0)},S=(A,D)=>{var $;b.value&&w.value&&(O.value=!0,w.value.setAttribute("style",wVe({...y(),backgroundImage:`url('${A}')`,backgroundSize:`${Math.floor(D)}px`})),($=b.value)==null||$.append(w.value),setTimeout(()=>{O.value=!1}))},C=A=>{let D=120,$=64;const N=e.image,z=e.content,I=e.width,L=e.height;if(!N&&A.measureText){A.font=`${Number(i.value)}px ${s.value}`;const X=Xe(z)?z:[z],Q=X.map(W=>{const G=A.measureText(W);return[G.width,G.fontBoundingBoxAscent!==void 0?G.fontBoundingBoxAscent+G.fontBoundingBoxDescent:G.actualBoundingBoxAscent+G.actualBoundingBoxDescent]});D=Math.ceil(Math.max(...Q.map(W=>W[0]))),$=Math.ceil(Math.max(...Q.map(W=>W[1])))*X.length+(X.length-1)*XX}return[I!=null?I:D,L!=null?L:$]},E=CVe(),T=()=>{const D=document.createElement("canvas").getContext("2d"),$=e.image,N=e.content,z=e.rotate;if(D){w.value||(w.value=document.createElement("div"));const I=xVe(),[L,X]=C(D),Q=W=>{const[G,K]=E(W||"",z,I,L,X,{color:r.value,fontSize:i.value,fontStyle:a.value,fontWeight:o.value,fontFamily:s.value,textAlign:l.value,textBaseline:u.value},c.value,d.value);S(G,K)};if($){const W=new Image;W.onload=()=>{Q(W)},W.onerror=()=>{Q(N)},W.crossOrigin="anonymous",W.referrerPolicy="no-referrer",W.src=$}else Q(N)}};return Ft(()=>{T()}),Fe(()=>e,()=>{T()},{deep:!0,flush:"post"}),pr(()=>{x()}),Fz(b,A=>{O.value||A.forEach(D=>{SVe(D,w.value)&&(x(),T())})},{attributes:!0,subtree:!0,childList:!0}),(A,D)=>(R(),Y("div",{ref_key:"containerRef",ref:b,style:vt([n])},[Ee(A.$slots,"default")],4))}});var kVe=Ye(TVe,[["__file","watermark.vue"]]);const PVe=Vt(kVe),AVe=Ze({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:we(Object)},targetAreaClickable:{type:Boolean,default:!0}}),MVe=(t,e,n,r,i)=>{const o=F(null),a=()=>{let d;return Ot(t.value)?d=document.querySelector(t.value):St(t.value)?d=t.value():d=t.value,d},s=()=>{const d=a();if(!d||!e.value){o.value=null;return}RVe(d)||d.scrollIntoView(i.value);const{left:f,top:h,width:g,height:m}=d.getBoundingClientRect();o.value={left:f,top:h,width:g,height:m,radius:0}};Ft(()=>{Fe([e,t],()=>{s()},{immediate:!0}),window.addEventListener("resize",s)}),pr(()=>{window.removeEventListener("resize",s)});const l=d=>{var f;return(f=Xe(n.value.offset)?n.value.offset[d]:n.value.offset)!=null?f:6},u=M(()=>{var d;if(!o.value)return o.value;const f=l(0),h=l(1),g=((d=n.value)==null?void 0:d.radius)||2;return{left:o.value.left-f,top:o.value.top-h,width:o.value.width+f*2,height:o.value.height+h*2,radius:g}}),c=M(()=>{const d=a();return!r.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var f,h,g,m;return window.DOMRect.fromRect({width:((f=u.value)==null?void 0:f.width)||0,height:((h=u.value)==null?void 0:h.height)||0,x:((g=u.value)==null?void 0:g.left)||0,y:((m=u.value)==null?void 0:m.top)||0})}}});return{mergedPosInfo:u,triggerTarget:c}},dC=Symbol("ElTour");function RVe(t){const e=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:r,right:i,bottom:o,left:a}=t.getBoundingClientRect();return r>=0&&a>=0&&i<=e&&o<=n}const $Ve=(t,e,n,r,i,o,a,s)=>{const l=F(),u=F(),c=F({}),d={x:l,y:u,placement:r,strategy:i,middlewareData:c},f=M(()=>{const b=[EX(p(o)),B6e(),I6e(),NVe()];return p(s)&&p(n)&&b.push(TX({element:p(n)})),b}),h=async()=>{if(!wn)return;const b=p(t),w=p(e);if(!b||!w)return;const O=await kX(b,w,{placement:p(r),strategy:p(i),middleware:p(f)});qg(d).forEach(x=>{d[x].value=O[x]})},g=M(()=>{if(!p(t))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:p(a)};const{overflow:b}=p(c);return{position:p(i),zIndex:p(a),top:p(u)!=null?`${p(u)}px`:"",left:p(l)!=null?`${p(l)}px`:"",maxWidth:b!=null&&b.maxWidth?`${b==null?void 0:b.maxWidth}px`:""}}),m=M(()=>{if(!p(s))return{};const{arrow:b}=p(c);return{left:(b==null?void 0:b.x)!=null?`${b==null?void 0:b.x}px`:"",top:(b==null?void 0:b.y)!=null?`${b==null?void 0:b.y}px`:""}});let y;return Ft(()=>{const b=p(t),w=p(e);b&&w&&(y=D6e(b,w,h)),Bo(()=>{h()})}),pr(()=>{y&&y()}),{update:h,contentStyle:g,arrowStyle:m}},NVe=()=>({name:"overflow",async fn(t){const e=await L6e(t);let n=0;return e.left>0&&(n=e.left),e.right>0&&(n=e.right),{data:{maxWidth:t.rects.floating.width-n}}}}),DVe=ue({name:"ElTourMask",inheritAttrs:!1}),LVe=ue({...DVe,props:AVe,setup(t){const e=t,{ns:n}=ht(dC),r=M(()=>{var s,l;return(l=(s=e.pos)==null?void 0:s.radius)!=null?l:2}),i=M(()=>{const s=r.value,l=`a${s},${s} 0 0 1`;return{topRight:`${l} ${s},${s}`,bottomRight:`${l} ${-s},${s}`,bottomLeft:`${l} ${-s},${-s}`,topLeft:`${l} ${s},${-s}`}}),o=M(()=>{const s=window.innerWidth,l=window.innerHeight,u=i.value,c=`M${s},0 L0,0 L0,${l} L${s},${l} L${s},0 Z`,d=r.value;return e.pos?`${c} M${e.pos.left+d},${e.pos.top} h${e.pos.width-d*2} ${u.topRight} v${e.pos.height-d*2} ${u.bottomRight} h${-e.pos.width+d*2} ${u.bottomLeft} v${-e.pos.height+d*2} ${u.topLeft} z`:c}),a=M(()=>({fill:e.fill,pointerEvents:"auto",cursor:"auto"}));return W$(Gn(e,"visible"),{ns:n}),(s,l)=>s.visible?(R(),Y("div",an({key:0,class:p(n).e("mask"),style:{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:s.zIndex,pointerEvents:s.pos&&s.targetAreaClickable?"none":"auto"}},s.$attrs),[(R(),Y("svg",{style:{width:"100%",height:"100%"}},[J("path",{class:V(p(n).e("hollow")),style:vt(p(a)),d:p(o)},null,14,["d"])]))],16)):Se("v-if",!0)}});var IVe=Ye(LVe,[["__file","mask.vue"]]);const BVe=["absolute","fixed"],FVe=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],CN=Ze({placement:{type:we(String),values:FVe,default:"bottom"},reference:{type:we(Object),default:null},strategy:{type:we(String),values:BVe,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),VVe={close:()=>!0},jVe=ue({name:"ElTourContent"}),QVe=ue({...jVe,props:CN,emits:VVe,setup(t,{emit:e}){const n=t,r=F(n.placement),i=F(n.strategy),o=F(null),a=F(null);Fe(()=>n.placement,()=>{r.value=n.placement});const{contentStyle:s,arrowStyle:l}=$Ve(Gn(n,"reference"),o,a,r,i,Gn(n,"offset"),Gn(n,"zIndex"),Gn(n,"showArrow")),u=M(()=>r.value.split("-")[0]),{ns:c}=ht(dC),d=()=>{e("close")},f=h=>{h.detail.focusReason==="pointer"&&h.preventDefault()};return(h,g)=>(R(),Y("div",{ref_key:"contentRef",ref:o,style:vt(p(s)),class:V(p(c).e("content")),"data-side":p(u),tabindex:"-1"},[B(p(Um),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":o.value||void 0,onReleaseRequested:d,onFocusoutPrevented:f},{default:j(()=>[Ee(h.$slots,"default")]),_:3},8,["focus-trap-el"]),h.showArrow?(R(),Y("span",{key:0,ref_key:"arrowRef",ref:a,style:vt(p(l)),class:V(p(c).e("arrow"))},null,6)):Se("v-if",!0)],14,["data-side"]))}});var zVe=Ye(QVe,[["__file","content.vue"]]),WVe=ue({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(t,{slots:e,emit:n}){let r=0;return()=>{var i,o;const a=(i=e.default)==null?void 0:i.call(e),s=[];let l=0;function u(c){!Xe(c)||c.forEach(d=>{var f;((f=(d==null?void 0:d.type)||{})==null?void 0:f.name)==="ElTourStep"&&(s.push(d),l+=1)})}return a.length&&u(of((o=a[0])==null?void 0:o.children)),r!==l&&(r=l,n("update-total",l)),s.length?s[t.current]:null}}});const HVe=Ze({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:fr},placement:CN.placement,contentStyle:{type:we([Object])},mask:{type:we([Boolean,Object]),default:!0},gap:{type:we(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:we([Boolean,Object]),default:()=>({block:"center"})},type:{type:we(String)},appendTo:{type:we([String,Object]),default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),UVe={[Ut]:t=>wr(t),["update:current"]:t=>Et(t),close:t=>Et(t),finish:()=>!0,change:t=>Et(t)},XVe=ue({name:"ElTour"}),ZVe=ue({...XVe,props:HVe,emits:UVe,setup(t,{emit:e}){const n=t,r=Qe("tour"),i=F(0),o=F(),a=Vz(n,"current",e,{passive:!0}),s=M(()=>{var P;return(P=o.value)==null?void 0:P.target}),l=M(()=>[r.b(),y.value==="primary"?r.m("primary"):""]),u=M(()=>{var P;return((P=o.value)==null?void 0:P.placement)||n.placement}),c=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.contentStyle)!=null?A:n.contentStyle}),d=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.mask)!=null?A:n.mask}),f=M(()=>!!d.value&&n.modelValue),h=M(()=>wr(d.value)?void 0:d.value),g=M(()=>{var P,A;return!!s.value&&((A=(P=o.value)==null?void 0:P.showArrow)!=null?A:n.showArrow)}),m=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.scrollIntoViewOptions)!=null?A:n.scrollIntoViewOptions}),y=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.type)!=null?A:n.type}),{nextZIndex:b}=zm(),w=b(),O=M(()=>{var P;return(P=n.zIndex)!=null?P:w}),{mergedPosInfo:x,triggerTarget:S}=MVe(s,Gn(n,"modelValue"),Gn(n,"gap"),d,m);Fe(()=>n.modelValue,P=>{P||(a.value=0)});const C=()=>{n.closeOnPressEscape&&(e("update:modelValue",!1),e("close",a.value))},E=P=>{i.value=P},T=Ni();return gn(dC,{currentStep:o,current:a,total:i,showClose:Gn(n,"showClose"),closeIcon:Gn(n,"closeIcon"),mergedType:y,ns:r,slots:T,updateModelValue(P){e("update:modelValue",P)},onClose(){e("close",a.value)},onFinish(){e("finish")},onChange(){e("change",a.value)}}),(P,A)=>(R(),Y(dt,null,[B(p(Xm),{to:P.appendTo},{default:j(()=>{var D,$;return[J("div",an({class:p(l)},P.$attrs),[B(IVe,{visible:p(f),fill:(D=p(h))==null?void 0:D.color,style:vt(($=p(h))==null?void 0:$.style),pos:p(x),"z-index":p(O),"target-area-clickable":P.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),P.modelValue?(R(),xe(zVe,{key:p(a),reference:p(S),placement:p(u),"show-arrow":p(g),"z-index":p(O),style:vt(p(c)),onClose:C},{default:j(()=>[B(p(WVe),{current:p(a),onUpdateTotal:E},{default:j(()=>[Ee(P.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):Se("v-if",!0)],16)]}),_:3},8,["to"]),Se(" just for IDE "),Se("v-if",!0)],64))}});var qVe=Ye(ZVe,[["__file","tour.vue"]]);const YVe=Ze({target:{type:we([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:fr},showArrow:{type:Boolean,default:void 0},placement:CN.placement,mask:{type:we([Boolean,Object]),default:void 0},contentStyle:{type:we([Object])},prevButtonProps:{type:we(Object)},nextButtonProps:{type:we(Object)},scrollIntoViewOptions:{type:we([Boolean,Object]),default:void 0},type:{type:we(String)}}),GVe={close:()=>!0},KVe=ue({name:"ElTourStep"}),JVe=ue({...KVe,props:YVe,emits:GVe,setup(t,{emit:e}){const n=t,{Close:r}=h$,{t:i}=xn(),{currentStep:o,current:a,total:s,showClose:l,closeIcon:u,mergedType:c,ns:d,slots:f,updateModelValue:h,onClose:g,onFinish:m,onChange:y}=ht(dC);Fe(n,T=>{o.value=T},{immediate:!0});const b=M(()=>{var T;return(T=n.showClose)!=null?T:l.value}),w=M(()=>{var T,P;return(P=(T=n.closeIcon)!=null?T:u.value)!=null?P:r}),O=T=>{if(!!T)return oz(T,["children","onClick"])},x=()=>{var T,P;a.value-=1,(T=n.prevButtonProps)!=null&&T.onClick&&((P=n.prevButtonProps)==null||P.onClick()),y()},S=()=>{var T;a.value>=s.value-1?C():a.value+=1,(T=n.nextButtonProps)!=null&&T.onClick&&n.nextButtonProps.onClick(),y()},C=()=>{E(),m()},E=()=>{h(!1),g(),e("close")};return(T,P)=>(R(),Y(dt,null,[p(b)?(R(),Y("button",{key:0,"aria-label":"Close",class:V(p(d).e("closebtn")),type:"button",onClick:E},[B(p(mt),{class:V(p(d).e("close"))},{default:j(()=>[(R(),xe(on(p(w))))]),_:1},8,["class"])],2)):Se("v-if",!0),J("header",{class:V([p(d).e("header"),{"show-close":p(l)}])},[Ee(T.$slots,"header",{},()=>[J("span",{role:"heading",class:V(p(d).e("title"))},Ve(T.title),3)])],2),J("div",{class:V(p(d).e("body"))},[Ee(T.$slots,"default",{},()=>[J("span",null,Ve(T.description),1)])],2),J("footer",{class:V(p(d).e("footer"))},[J("div",{class:V(p(d).b("indicators"))},[p(f).indicators?(R(),xe(on(p(f).indicators),{key:0,current:p(a),total:p(s)},null,8,["current","total"])):(R(!0),Y(dt,{key:1},Ht(p(s),(A,D)=>(R(),Y("span",{key:A,class:V([p(d).b("indicator"),D===p(a)?"is-active":""])},null,2))),128))],2),J("div",{class:V(p(d).b("buttons"))},[p(a)>0?(R(),xe(p(lr),an({key:0,size:"small",type:p(c)},O(T.prevButtonProps),{onClick:x}),{default:j(()=>{var A,D;return[Ue(Ve((D=(A=T.prevButtonProps)==null?void 0:A.children)!=null?D:p(i)("el.tour.previous")),1)]}),_:1},16,["type"])):Se("v-if",!0),p(a)<=p(s)-1?(R(),xe(p(lr),an({key:1,size:"small",type:p(c)==="primary"?"default":"primary"},O(T.nextButtonProps),{onClick:S}),{default:j(()=>{var A,D;return[Ue(Ve((D=(A=T.nextButtonProps)==null?void 0:A.children)!=null?D:p(a)===p(s)-1?p(i)("el.tour.finish"):p(i)("el.tour.next")),1)]}),_:1},16,["type"])):Se("v-if",!0)],2)],2)],64))}});var ZX=Ye(JVe,[["__file","step.vue"]]);const eje=Vt(qVe,{TourStep:ZX}),tje=ni(ZX),nje=Ze({container:{type:we([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:we(String),default:"default"},direction:{type:we(String),default:"vertical"}}),rje={change:t=>Ot(t),click:(t,e)=>t instanceof MouseEvent&&(Ot(e)||ar(e))},qX=Symbol("anchor"),mO=t=>{if(!wn||t==="")return null;if(Ot(t))try{return document.querySelector(t)}catch{return null}return t};function ije(t){let e=0;const n=(...r)=>{e&&ip(e),e=bf(()=>{t(...r),e=0})};return n.cancel=()=>{ip(e),e=0},n}const oje=ue({name:"ElAnchor"}),aje=ue({...oje,props:nje,emits:rje,setup(t,{expose:e,emit:n}){const r=t,i=F(""),o=F(null),a=F(null),s=F(),l={};let u=!1,c=0;const d=Qe("anchor"),f=M(()=>[d.b(),r.type==="underline"?d.m("underline"):"",d.m(r.direction)]),h=T=>{l[T.href]=T.el},g=T=>{delete l[T]},m=T=>{i.value!==T&&(i.value=T,n("change",T))};let y=null;const b=T=>{if(!s.value)return;const P=mO(T);if(!P)return;y&&y(),u=!0;const A=_5(P,s.value),D=Rk(P,A),$=A.scrollHeight-A.clientHeight,N=Math.min(D-r.offset,$);y=YSe(s.value,c,N,r.duration,()=>{setTimeout(()=>{u=!1},20)})},w=T=>{T&&(m(T),b(T))},O=(T,P)=>{n("click",T,P),w(P)},x=ije(()=>{s.value&&(c=O5(s.value));const T=S();u||ar(T)||m(T)}),S=()=>{if(!s.value)return;const T=O5(s.value),P=[];for(const A of Object.keys(l)){const D=mO(A);if(!D)continue;const $=_5(D,s.value),N=Rk(D,$);P.push({top:N-r.offset-r.bound,href:A})}P.sort((A,D)=>A.top-D.top);for(let A=0;A<P.length;A++){const D=P[A],$=P[A+1];if(A===0&&T===0)return"";if(D.top<=T&&(!$||$.top>T))return D.href}},C=()=>{const T=mO(r.container);!T||FS(T)?s.value=window:s.value=T};sr(s,"scroll",x);const E=M(()=>{if(!o.value||!a.value||!i.value)return{};const T=l[i.value];if(!T)return{};const P=o.value.getBoundingClientRect(),A=a.value.getBoundingClientRect(),D=T.getBoundingClientRect();return r.direction==="horizontal"?{left:`${D.left-P.left}px`,width:`${D.width}px`,opacity:1}:{top:`${D.top-P.top+(D.height-A.height)/2}px`,opacity:1}});return Ft(()=>{C();const T=decodeURIComponent(window.location.hash);mO(T)?w(T):x()}),Fe(()=>r.container,()=>{C()}),gn(qX,{ns:d,direction:r.direction,currentAnchor:i,addLink:h,removeLink:g,handleClick:O}),e({scrollTo:w}),(T,P)=>(R(),Y("div",{ref_key:"anchorRef",ref:o,class:V(p(f))},[T.marker?(R(),Y("div",{key:0,ref_key:"markerRef",ref:a,class:V(p(d).e("marker")),style:vt(p(E))},null,6)):Se("v-if",!0),J("div",{class:V(p(d).e("list"))},[Ee(T.$slots,"default")],2)],2))}});var sje=Ye(aje,[["__file","anchor.vue"]]);const lje=Ze({title:String,href:String}),uje=ue({name:"ElAnchorLink"}),cje=ue({...uje,props:lje,setup(t){const e=t,n=F(null),{ns:r,direction:i,currentAnchor:o,addLink:a,removeLink:s,handleClick:l}=ht(qX),u=M(()=>[r.e("link"),r.is("active",o.value===e.href)]),c=d=>{l(d,e.href)};return Fe(()=>e.href,(d,f)=>{xt(()=>{f&&s(f),d&&a({href:d,el:n.value})})}),Ft(()=>{const{href:d}=e;d&&a({href:d,el:n.value})}),pr(()=>{const{href:d}=e;d&&s(d)}),(d,f)=>(R(),Y("div",{class:V(p(r).e("item"))},[J("a",{ref_key:"linkRef",ref:n,class:V(p(u)),href:d.href,onClick:c},[Ee(d.$slots,"default",{},()=>[Ue(Ve(d.title),1)])],10,["href"]),d.$slots["sub-link"]&&p(i)==="vertical"?(R(),Y("div",{key:0,class:V(p(r).e("list"))},[Ee(d.$slots,"sub-link")],2)):Se("v-if",!0)],2))}});var YX=Ye(cje,[["__file","anchor-link.vue"]]);const dje=Vt(sje,{AnchorLink:YX}),fje=ni(YX),hje=Ze({direction:{type:we(String),default:"horizontal"},options:{type:we(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},block:Boolean,size:$i,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...wo(["ariaLabel"])}),pje={[Ut]:t=>Ot(t)||Et(t)||wr(t),[dr]:t=>Ot(t)||Et(t)||wr(t)},gje=ue({name:"ElSegmented"}),mje=ue({...gje,props:hje,emits:pje,setup(t,{emit:e}){const n=t,r=Qe("segmented"),i=bo(),o=ki(),a=Ho(),{formItem:s}=Wo(),{inputId:l,isLabeledByFormItem:u}=Tl(n,{formItemContext:s}),c=F(null),d=bSe(),f=vn({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),h=P=>{const A=g(P);e(Ut,A),e(dr,A)},g=P=>Jt(P)?P.value:P,m=P=>Jt(P)?P.label:P,y=P=>!!(a.value||(Jt(P)?P.disabled:!1)),b=P=>n.modelValue===g(P),w=P=>n.options.find(A=>g(A)===P),O=P=>[r.e("item"),r.is("selected",b(P)),r.is("disabled",y(P))],x=()=>{if(!c.value)return;const P=c.value.querySelector(".is-selected"),A=c.value.querySelector(".is-selected input");if(!P||!A){f.width=0,f.height=0,f.translateX=0,f.translateY=0,f.focusVisible=!1;return}const D=P.getBoundingClientRect();f.isInit=!0,n.direction==="vertical"?(f.height=D.height,f.translateY=P.offsetTop):(f.width=D.width,f.translateX=P.offsetLeft);try{f.focusVisible=A.matches(":focus-visible")}catch{}},S=M(()=>[r.b(),r.m(o.value),r.is("block",n.block)]),C=M(()=>({width:n.direction==="vertical"?"100%":`${f.width}px`,height:n.direction==="vertical"?`${f.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${f.translateY}px)`:`translateX(${f.translateX}px)`,display:f.isInit?"block":"none"})),E=M(()=>[r.e("item-selected"),r.is("disabled",y(w(n.modelValue))),r.is("focus-visible",f.focusVisible)]),T=M(()=>n.name||i.value);return Hr(c,x),Fe(d,x),Fe(()=>n.modelValue,()=>{var P;x(),n.validateEvent&&((P=s==null?void 0:s.validate)==null||P.call(s,"change").catch(A=>void 0))},{flush:"post"}),(P,A)=>P.options.length?(R(),Y("div",{key:0,id:p(l),ref_key:"segmentedRef",ref:c,class:V(p(S)),role:"radiogroup","aria-label":p(u)?void 0:P.ariaLabel||"segmented","aria-labelledby":p(u)?p(s).labelId:void 0},[J("div",{class:V([p(r).e("group"),p(r).m(n.direction)])},[J("div",{style:vt(p(C)),class:V(p(E))},null,6),(R(!0),Y(dt,null,Ht(P.options,(D,$)=>(R(),Y("label",{key:$,class:V(O(D))},[J("input",{class:V(p(r).e("item-input")),type:"radio",name:p(T),disabled:y(D),checked:b(D),onChange:N=>h(D)},null,42,["name","disabled","checked","onChange"]),J("div",{class:V(p(r).e("item-label"))},[Ee(P.$slots,"default",{item:D},()=>[Ue(Ve(m(D)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):Se("v-if",!0)}});var vje=Ye(mje,[["__file","segmented.vue"]]);const yje=Vt(vje),bje=(t,e)=>{const n=t.toLowerCase();return(e.label||e.value).toLowerCase().includes(n)},_je=(t,e,n)=>{const{selectionEnd:r}=t;if(r===null)return;const i=t.value,o=No(e);let a=-1,s;for(let l=r-1;l>=0;--l){const u=i[l];if(u===n||u===`
- `||u==="\r"){a=l;continue}if(o.includes(u)){const c=a===-1?r:a;s={pattern:i.slice(l+1,c),start:l+1,end:c,prefix:u,prefixIndex:l,splitIndex:a,selectionEnd:r};break}}return s},Oje=(t,e={debug:!1,useSelectionEnd:!1})=>{const n=t.selectionStart!==null?t.selectionStart:0,r=t.selectionEnd!==null?t.selectionEnd:0,i=e.useSelectionEnd?r:n,o=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(e.debug){const f=document.querySelector("#input-textarea-caret-position-mirror-div");f!=null&&f.parentNode&&f.parentNode.removeChild(f)}const a=document.createElement("div");a.id="input-textarea-caret-position-mirror-div",document.body.appendChild(a);const s=a.style,l=window.getComputedStyle(t),u=t.nodeName==="INPUT";s.whiteSpace=u?"nowrap":"pre-wrap",u||(s.wordWrap="break-word"),s.position="absolute",e.debug||(s.visibility="hidden"),o.forEach(f=>{if(u&&f==="lineHeight")if(l.boxSizing==="border-box"){const h=Number.parseInt(l.height),g=Number.parseInt(l.paddingTop)+Number.parseInt(l.paddingBottom)+Number.parseInt(l.borderTopWidth)+Number.parseInt(l.borderBottomWidth),m=g+Number.parseInt(l.lineHeight);h>m?s.lineHeight=`${h-g}px`:h===m?s.lineHeight=l.lineHeight:s.lineHeight="0"}else s.lineHeight=l.height;else s[f]=l[f]}),US()?t.scrollHeight>Number.parseInt(l.height)&&(s.overflowY="scroll"):s.overflow="hidden",a.textContent=t.value.slice(0,Math.max(0,i)),u&&a.textContent&&(a.textContent=a.textContent.replace(/\s/g,"\xA0"));const c=document.createElement("span");c.textContent=t.value.slice(Math.max(0,i))||".",c.style.position="relative",c.style.left=`${-t.scrollLeft}px`,c.style.top=`${-t.scrollTop}px`,a.appendChild(c);const d={top:c.offsetTop+Number.parseInt(l.borderTopWidth),left:c.offsetLeft+Number.parseInt(l.borderLeftWidth),height:Number.parseInt(l.fontSize)*1.5};return e.debug?c.style.backgroundColor="#aaa":document.body.removeChild(a),d.left>=t.clientWidth&&(d.left=t.clientWidth),d},wje=Ze({...g$,options:{type:we(Array),default:()=>[]},prefix:{type:we([String,Array]),default:"@",validator:t=>Ot(t)?t.length===1:t.every(e=>Ot(e)&&e.length===1)},split:{type:String,default:" ",validator:t=>t.length===1},filterOption:{type:we([Boolean,Function]),default:()=>bje,validator:t=>t===!1?!0:St(t)},placement:{type:we(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:we(Function)},modelValue:String,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})}}),xje={[Ut]:t=>Ot(t),search:(t,e)=>Ot(t)&&Ot(e),select:(t,e)=>Ot(t.value)&&Ot(e),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},Sje=Ze({options:{type:we(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),Cje={select:t=>Ot(t.value)},Eje=ue({name:"ElMentionDropdown"}),Tje=ue({...Eje,props:Sje,emits:Cje,setup(t,{expose:e,emit:n}){const r=t,i=Qe("mention"),{t:o}=xn(),a=F(-1),s=F(),l=F(),u=F(),c=(O,x)=>[i.be("dropdown","item"),i.is("hovering",a.value===x),i.is("disabled",O.disabled||r.disabled)],d=O=>{O.disabled||r.disabled||n("select",O)},f=O=>{a.value=O},h=M(()=>r.disabled||r.options.every(O=>O.disabled)),g=M(()=>r.options[a.value]),m=()=>{!g.value||n("select",g.value)},y=O=>{const{options:x}=r;if(x.length===0||h.value)return;O==="next"?(a.value++,a.value===x.length&&(a.value=0)):O==="prev"&&(a.value--,a.value<0&&(a.value=x.length-1));const S=x[a.value];if(S.disabled){y(O);return}xt(()=>b(S))},b=O=>{var x,S,C,E;const{options:T}=r,P=T.findIndex(D=>D.value===O.value),A=(x=l.value)==null?void 0:x[P];if(A){const D=(C=(S=u.value)==null?void 0:S.querySelector)==null?void 0:C.call(S,`.${i.be("dropdown","wrap")}`);D&&o$(D,A)}(E=s.value)==null||E.handleScroll()};return Fe(()=>r.options,()=>{h.value||r.options.length===0?a.value=-1:a.value=0},{immediate:!0}),e({hoveringIndex:a,navigateOptions:y,selectHoverOption:m,hoverOption:g}),(O,x)=>(R(),Y("div",{ref_key:"dropdownRef",ref:u,class:V(p(i).b("dropdown"))},[O.$slots.header?(R(),Y("div",{key:0,class:V(p(i).be("dropdown","header"))},[Ee(O.$slots,"header")],2)):Se("v-if",!0),zt(B(p(gu),{id:O.contentId,ref_key:"scrollbarRef",ref:s,tag:"ul","wrap-class":p(i).be("dropdown","wrap"),"view-class":p(i).be("dropdown","list"),role:"listbox","aria-label":O.ariaLabel,"aria-orientation":"vertical"},{default:j(()=>[(R(!0),Y(dt,null,Ht(O.options,(S,C)=>(R(),Y("li",{id:`${O.contentId}-${C}`,ref_for:!0,ref_key:"optionRefs",ref:l,key:C,class:V(c(S,C)),role:"option","aria-disabled":S.disabled||O.disabled||void 0,"aria-selected":a.value===C,onMousemove:E=>f(C),onClick:At(E=>d(S),["stop"])},[Ee(O.$slots,"label",{item:S,index:C},()=>{var E;return[J("span",null,Ve((E=S.label)!=null?E:S.value),1)]})],42,["id","aria-disabled","aria-selected","onMousemove","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[Bn,O.options.length>0&&!O.loading]]),O.loading?(R(),Y("div",{key:1,class:V(p(i).be("dropdown","loading"))},[Ee(O.$slots,"loading",{},()=>[Ue(Ve(p(o)("el.mention.loading")),1)])],2)):Se("v-if",!0),O.$slots.footer?(R(),Y("div",{key:2,class:V(p(i).be("dropdown","footer"))},[Ee(O.$slots,"footer")],2)):Se("v-if",!0)],2))}});var kje=Ye(Tje,[["__file","mention-dropdown.vue"]]);const Pje=ue({name:"ElMention",inheritAttrs:!1}),Aje=ue({...Pje,props:wje,emits:xje,setup(t,{expose:e,emit:n}){const r=t,i=M(()=>vo(r,Object.keys(g$))),o=Qe("mention"),a=Ho(),s=bo(),l=F(),u=F(),c=F(),d=F(!1),f=F(),h=F(),g=M(()=>r.showArrow?r.placement:`${r.placement}-start`),m=M(()=>r.showArrow?["bottom","top"]:["bottom-start","top-start"]),y=M(()=>{const{filterOption:$,options:N}=r;return!h.value||!$?N:N.filter(z=>$(h.value.pattern,z))}),b=M(()=>d.value&&(!!y.value.length||r.loading)),w=M(()=>{var $;return`${s.value}-${($=c.value)==null?void 0:$.hoveringIndex}`}),O=$=>{n("update:modelValue",$),P()},x=$=>{var N,z,I,L;if(!(!("code"in $)||((N=l.value)==null?void 0:N.isComposing)))switch($.code){case ut.left:case ut.right:P();break;case ut.up:case ut.down:if(!d.value)return;$.preventDefault(),(z=c.value)==null||z.navigateOptions($.code===ut.up?"prev":"next");break;case ut.enter:case ut.numpadEnter:if(!d.value)return;$.preventDefault(),(I=c.value)!=null&&I.hoverOption?(L=c.value)==null||L.selectHoverOption():d.value=!1;break;case ut.esc:if(!d.value)return;$.preventDefault(),d.value=!1;break;case ut.backspace:if(r.whole&&h.value){const{splitIndex:X,selectionEnd:Q,pattern:W,prefixIndex:G,prefix:K}=h.value,oe=T();if(!oe)return;const ne=oe.value,_e=r.options.find(U=>U.value===W);if((St(r.checkIsWhole)?r.checkIsWhole(W,K):_e)&&X!==-1&&X+1===Q){$.preventDefault();const U=ne.slice(0,G)+ne.slice(X+1);n(Ut,U);const ie=G;xt(()=>{oe.selectionStart=ie,oe.selectionEnd=ie,D()})}}}},{wrapperRef:S}=jf(l,{beforeFocus(){return a.value},afterFocus(){P()},beforeBlur($){var N;return(N=u.value)==null?void 0:N.isFocusInsideContent($)},afterBlur(){d.value=!1}}),C=()=>{P()},E=$=>{if(!h.value)return;const N=T();if(!N)return;const z=N.value,{split:I}=r,L=z.slice(h.value.end),X=L.startsWith(I),Q=`${$.value}${X?"":I}`,W=z.slice(0,h.value.start)+Q+L;n(Ut,W),n("select",$,h.value.prefix);const G=h.value.start+Q.length+(X?1:0);xt(()=>{N.selectionStart=G,N.selectionEnd=G,N.focus(),D()})},T=()=>{var $,N;return r.type==="textarea"?($=l.value)==null?void 0:$.textarea:(N=l.value)==null?void 0:N.input},P=()=>{setTimeout(()=>{A(),D(),xt(()=>{var $;return($=u.value)==null?void 0:$.updatePopper()})},0)},A=()=>{const $=T();if(!$)return;const N=Oje($),z=$.getBoundingClientRect(),I=l.value.$el.getBoundingClientRect();f.value={position:"absolute",width:0,height:`${N.height}px`,left:`${N.left+z.left-I.left}px`,top:`${N.top+z.top-I.top}px`}},D=()=>{const $=T();if(document.activeElement!==$){d.value=!1;return}const{prefix:N,split:z}=r;if(h.value=_je($,N,z),h.value&&h.value.splitIndex===-1){d.value=!0,n("search",h.value.pattern,h.value.prefix);return}d.value=!1};return e({input:l,tooltip:u,dropdownVisible:b}),($,N)=>(R(),Y("div",{ref_key:"wrapperRef",ref:S,class:V(p(o).b())},[B(p(hi),an(an(p(i),$.$attrs),{ref_key:"elInputRef",ref:l,"model-value":$.modelValue,disabled:p(a),role:p(b)?"combobox":void 0,"aria-activedescendant":p(b)?p(w)||"":void 0,"aria-controls":p(b)?p(s):void 0,"aria-expanded":p(b)||void 0,"aria-label":$.ariaLabel,"aria-autocomplete":p(b)?"none":void 0,"aria-haspopup":p(b)?"listbox":void 0,onInput:O,onKeydown:x,onMousedown:C}),es({_:2},[Ht($.$slots,(z,I)=>({name:I,fn:j(L=>[Ee($.$slots,I,Yl(df(L)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),B(p(Hi),{ref_key:"tooltipRef",ref:u,visible:p(b),"popper-class":[p(o).e("popper"),$.popperClass],"popper-options":$.popperOptions,placement:p(g),"fallback-placements":p(m),effect:"light",pure:"",offset:$.offset,"show-arrow":$.showArrow},{default:j(()=>[J("div",{style:vt(f.value)},null,4)]),content:j(()=>{var z;return[B(kje,{ref_key:"dropdownRef",ref:c,options:p(y),disabled:p(a),loading:$.loading,"content-id":p(s),"aria-label":$.ariaLabel,onSelect:E,onClick:At((z=l.value)==null?void 0:z.focus,["stop"])},es({_:2},[Ht($.$slots,(I,L)=>({name:L,fn:j(X=>[Ee($.$slots,L,Yl(df(X)))])}))]),1032,["options","disabled","loading","content-id","aria-label","onClick"])]}),_:3},8,["visible","popper-class","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}});var Mje=Ye(Aje,[["__file","mention.vue"]]);const Rje=Vt(Mje);var $je=[tCe,oW,yke,y8e,Ske,Mke,NW,zke,Wke,lr,jW,RPe,IPe,eAe,tAe,tMe,uH,sMe,Bs,gAe,eH,co,GS,KS,YS,KMe,pH,fRe,hRe,pRe,gRe,mRe,_$e,IH,BH,Ma,HH,H$,BNe,FNe,VNe,eU,kl,Pl,mt,iU,rU,hi,oU,cLe,mLe,LLe,ILe,BLe,FLe,HLe,nC,jIe,YIe,AW,pU,sH,kAe,TAe,a3e,d3e,fo,gu,wl,Jc,mIe,Y3e,o4e,a4e,C4e,A4e,TU,j4e,Y4e,G4e,Ym,Rb,$b,v8e,xp,Sp,ns,aC,VRe,Q8e,X8e,Z8e,Hi,nFe,gFe,A0,NFe,GFe,UX,PVe,eje,tje,dje,fje,yje,Rje];const el="ElInfiniteScroll",Nje=50,Dje=200,Lje=0,Ije={delay:{type:Number,default:Dje},distance:{type:Number,default:Lje},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},EN=(t,e)=>Object.entries(Ije).reduce((n,[r,i])=>{var o,a;const{type:s,default:l}=i,u=t.getAttribute(`infinite-scroll-${r}`);let c=(a=(o=e[u])!=null?o:u)!=null?a:l;return c=c==="false"?!1:c,c=s(c),n[r]=Number.isNaN(c)?l:c,n},{}),GX=t=>{const{observer:e}=t[el];e&&(e.disconnect(),delete t[el].observer)},Bje=(t,e)=>{const{container:n,containerEl:r,instance:i,observer:o,lastScrollTop:a}=t[el],{disabled:s,distance:l}=EN(t,i),{clientHeight:u,scrollHeight:c,scrollTop:d}=r,f=d-a;if(t[el].lastScrollTop=d,o||s||f<0)return;let h=!1;if(n===t)h=c-(u+d)<=l;else{const{clientTop:g,scrollHeight:m}=t,y=Rk(t,r);h=d+u>=y+g+m-l}h&&e.call(i)};function HT(t,e){const{containerEl:n,instance:r}=t[el],{disabled:i}=EN(t,r);i||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?e.call(r):GX(t))}const Fje={async mounted(t,e){const{instance:n,value:r}=e;St(r)||Wi(el,"'v-infinite-scroll' binding value must be a function"),await xt();const{delay:i,immediate:o}=EN(t,n),a=i$(t,!0),s=a===window?document.documentElement:a,l=Wc(Bje.bind(null,t,r),i);if(!!a){if(t[el]={instance:n,container:a,containerEl:s,delay:i,cb:r,onScroll:l,lastScrollTop:s.scrollTop},o){const u=new MutationObserver(Wc(HT.bind(null,t,r),Nje));t[el].observer=u,u.observe(t,{childList:!0,subtree:!0}),HT(t,r)}a.addEventListener("scroll",l)}},unmounted(t){if(!t[el])return;const{container:e,onScroll:n}=t[el];e==null||e.removeEventListener("scroll",n),GX(t)},async updated(t){if(!t[el])await xt();else{const{containerEl:e,cb:n,observer:r}=t[el];e.clientHeight&&r&&HT(t,n)}}},_P=Fje;_P.install=t=>{t.directive("InfiniteScroll",_P)};const Vje=_P;function jje(t){let e;const n=F(!1),r=vn({...t,originalPosition:"",originalOverflow:"",visible:!1});function i(f){r.text=f}function o(){const f=r.parent,h=d.ns;if(!f.vLoadingAddClassList){let g=f.getAttribute("loading-number");g=Number.parseInt(g)-1,g?f.setAttribute("loading-number",g.toString()):(sa(f,h.bm("parent","relative")),f.removeAttribute("loading-number")),sa(f,h.bm("parent","hidden"))}a(),c.unmount()}function a(){var f,h;(h=(f=d.$el)==null?void 0:f.parentNode)==null||h.removeChild(d.$el)}function s(){var f;t.beforeClose&&!t.beforeClose()||(n.value=!0,clearTimeout(e),e=setTimeout(l,400),r.visible=!1,(f=t.closed)==null||f.call(t))}function l(){if(!n.value)return;const f=r.parent;n.value=!1,f.vLoadingAddClassList=void 0,o()}const u=ue({name:"ElLoading",setup(f,{expose:h}){const{ns:g,zIndex:m}=QS("loading");return h({ns:g,zIndex:m}),()=>{const y=r.spinner||r.svg,b=Tt("svg",{class:"circular",viewBox:r.svgViewBox?r.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[Tt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),w=r.text?Tt("p",{class:g.b("text")},[r.text]):void 0;return Tt(zi,{name:g.b("fade"),onAfterLeave:l},{default:j(()=>[zt(B("div",{style:{backgroundColor:r.background||""},class:[g.b("mask"),r.customClass,r.fullscreen?"is-fullscreen":""]},[Tt("div",{class:g.b("spinner")},[b,w])]),[[Bn,r.visible]])])})}}}),c=yS(u),d=c.mount(document.createElement("div"));return{...Mi(r),setText:i,removeElLoadingChild:a,close:s,handleAfterLeave:l,vm:d,get $el(){return d.$el}}}let vO;const OP=function(t={}){if(!wn)return;const e=Qje(t);if(e.fullscreen&&vO)return vO;const n=jje({...e,closed:()=>{var i;(i=e.closed)==null||i.call(e),e.fullscreen&&(vO=void 0)}});zje(e,e.parent,n),c8(e,e.parent,n),e.parent.vLoadingAddClassList=()=>c8(e,e.parent,n);let r=e.parent.getAttribute("loading-number");return r?r=`${Number.parseInt(r)+1}`:r="1",e.parent.setAttribute("loading-number",r),e.parent.appendChild(n.$el),xt(()=>n.visible.value=e.visible),e.fullscreen&&(vO=n),n},Qje=t=>{var e,n,r,i;let o;return Ot(t.target)?o=(e=document.querySelector(t.target))!=null?e:document.body:o=t.target||document.body,{parent:o===document.body||t.body?document.body:o,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:o===document.body&&((n=t.fullscreen)!=null?n:!0),lock:(r=t.lock)!=null?r:!1,customClass:t.customClass||"",visible:(i=t.visible)!=null?i:!0,beforeClose:t.beforeClose,closed:t.closed,target:o}},zje=async(t,e,n)=>{const{nextZIndex:r}=n.vm.zIndex||n.vm._.exposed.zIndex,i={};if(t.fullscreen)n.originalPosition.value=Fc(document.body,"position"),n.originalOverflow.value=Fc(document.body,"overflow"),i.zIndex=r();else if(t.parent===document.body){n.originalPosition.value=Fc(document.body,"position"),await xt();for(const o of["top","left"]){const a=o==="top"?"scrollTop":"scrollLeft";i[o]=`${t.target.getBoundingClientRect()[o]+document.body[a]+document.documentElement[a]-Number.parseInt(Fc(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Fc(e,"position");for(const[o,a]of Object.entries(i))n.$el.style[o]=a},c8=(t,e,n)=>{const r=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?sa(e,r.bm("parent","relative")):il(e,r.bm("parent","relative")),t.fullscreen&&t.lock?il(e,r.bm("parent","hidden")):sa(e,r.bm("parent","hidden"))},D1=Symbol("ElLoading"),d8=(t,e)=>{var n,r,i,o;const a=e.instance,s=f=>Jt(e.value)?e.value[f]:void 0,l=f=>{const h=Ot(f)&&(a==null?void 0:a[f])||f;return h&&F(h)},u=f=>l(s(f)||t.getAttribute(`element-loading-${$f(f)}`)),c=(n=s("fullscreen"))!=null?n:e.modifiers.fullscreen,d={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:c,target:(r=s("target"))!=null?r:c?void 0:t,body:(i=s("body"))!=null?i:e.modifiers.body,lock:(o=s("lock"))!=null?o:e.modifiers.lock};t[D1]={options:d,instance:OP(d)}},Wje=(t,e)=>{for(const n of Object.keys(e))Tr(e[n])&&(e[n].value=t[n])},wP={mounted(t,e){e.value&&d8(t,e)},updated(t,e){const n=t[D1];e.oldValue!==e.value&&(e.value&&!e.oldValue?d8(t,e):e.value&&e.oldValue?Jt(e.value)&&Wje(e.value,n.options):n==null||n.instance.close())},unmounted(t){var e;(e=t[D1])==null||e.instance.close(),t[D1]=null}},Hje={install(t){t.directive("loading",wP),t.config.globalProperties.$loading=OP},directive:wP,service:OP},KX=["success","info","warning","error"],Ko=ei({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:wn?document.body:void 0}),Uje=Ze({customClass:{type:String,default:Ko.customClass},center:{type:Boolean,default:Ko.center},dangerouslyUseHTMLString:{type:Boolean,default:Ko.dangerouslyUseHTMLString},duration:{type:Number,default:Ko.duration},icon:{type:fr,default:Ko.icon},id:{type:String,default:Ko.id},message:{type:we([String,Object,Function]),default:Ko.message},onClose:{type:we(Function),default:Ko.onClose},showClose:{type:Boolean,default:Ko.showClose},type:{type:String,values:KX,default:Ko.type},plain:{type:Boolean,default:Ko.plain},offset:{type:Number,default:Ko.offset},zIndex:{type:Number,default:Ko.zIndex},grouping:{type:Boolean,default:Ko.grouping},repeatNum:{type:Number,default:Ko.repeatNum}}),Xje={destroy:()=>!0},Kl=vQ([]),Zje=t=>{const e=Kl.findIndex(i=>i.id===t),n=Kl[e];let r;return e>0&&(r=Kl[e-1]),{current:n,prev:r}},qje=t=>{const{prev:e}=Zje(t);return e?e.vm.exposed.bottom.value:0},Yje=(t,e)=>Kl.findIndex(r=>r.id===t)>0?16:e,Gje=ue({name:"ElMessage"}),Kje=ue({...Gje,props:Uje,emits:Xje,setup(t,{expose:e}){const n=t,{Close:r}=p$,{ns:i,zIndex:o}=QS("message"),{currentZIndex:a,nextZIndex:s}=o,l=F(),u=F(!1),c=F(0);let d;const f=M(()=>n.type?n.type==="error"?"danger":n.type:"info"),h=M(()=>{const E=n.type;return{[i.bm("icon",E)]:E&&xf[E]}}),g=M(()=>n.icon||xf[n.type]||""),m=M(()=>qje(n.id)),y=M(()=>Yje(n.id,n.offset)+m.value),b=M(()=>c.value+y.value),w=M(()=>({top:`${y.value}px`,zIndex:a.value}));function O(){n.duration!==0&&({stop:d}=rp(()=>{S()},n.duration))}function x(){d==null||d()}function S(){u.value=!1}function C({code:E}){E===ut.esc&&S()}return Ft(()=>{O(),s(),u.value=!0}),Fe(()=>n.repeatNum,()=>{x(),O()}),sr(document,"keydown",C),Hr(l,()=>{c.value=l.value.getBoundingClientRect().height}),e({visible:u,bottom:b,close:S}),(E,T)=>(R(),xe(zi,{name:p(i).b("fade"),onBeforeLeave:E.onClose,onAfterLeave:P=>E.$emit("destroy"),persisted:""},{default:j(()=>[zt(J("div",{id:E.id,ref_key:"messageRef",ref:l,class:V([p(i).b(),{[p(i).m(E.type)]:E.type},p(i).is("center",E.center),p(i).is("closable",E.showClose),p(i).is("plain",E.plain),E.customClass]),style:vt(p(w)),role:"alert",onMouseenter:x,onMouseleave:O},[E.repeatNum>1?(R(),xe(p(NW),{key:0,value:E.repeatNum,type:p(f),class:V(p(i).e("badge"))},null,8,["value","type","class"])):Se("v-if",!0),p(g)?(R(),xe(p(mt),{key:1,class:V([p(i).e("icon"),p(h)])},{default:j(()=>[(R(),xe(on(p(g))))]),_:1},8,["class"])):Se("v-if",!0),Ee(E.$slots,"default",{},()=>[E.dangerouslyUseHTMLString?(R(),Y(dt,{key:1},[Se(" Caution here, message could've been compromised, never use user's input as message "),J("p",{class:V(p(i).e("content")),innerHTML:E.message},null,10,["innerHTML"])],2112)):(R(),Y("p",{key:0,class:V(p(i).e("content"))},Ve(E.message),3))]),E.showClose?(R(),xe(p(mt),{key:2,class:V(p(i).e("closeBtn")),onClick:At(S,["stop"])},{default:j(()=>[B(p(r))]),_:1},8,["class","onClick"])):Se("v-if",!0)],46,["id"]),[[Bn,u.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var Jje=Ye(Kje,[["__file","message.vue"]]);let eQe=1;const JX=t=>{const e=!t||Ot(t)||Jr(t)||St(t)?{message:t}:t,n={...Ko,...e};if(!n.appendTo)n.appendTo=document.body;else if(Ot(n.appendTo)){let r=document.querySelector(n.appendTo);As(r)||(r=document.body),n.appendTo=r}return wr(Wl.grouping)&&!n.grouping&&(n.grouping=Wl.grouping),Et(Wl.duration)&&n.duration===3e3&&(n.duration=Wl.duration),Et(Wl.offset)&&n.offset===16&&(n.offset=Wl.offset),wr(Wl.showClose)&&!n.showClose&&(n.showClose=Wl.showClose),n},tQe=t=>{const e=Kl.indexOf(t);if(e===-1)return;Kl.splice(e,1);const{handler:n}=t;n.close()},nQe=({appendTo:t,...e},n)=>{const r=`message_${eQe++}`,i=e.onClose,o=document.createElement("div"),a={...e,id:r,onClose:()=>{i==null||i(),tQe(c)},onDestroy:()=>{ff(null,o)}},s=B(Jje,a,St(a.message)||Jr(a.message)?{default:St(a.message)?a.message:()=>a.message}:null);s.appContext=n||lm._context,ff(s,o),t.appendChild(o.firstElementChild);const l=s.component,c={id:r,vnode:s,vm:l,handler:{close:()=>{l.exposed.visible.value=!1}},props:s.component.props};return c},lm=(t={},e)=>{if(!wn)return{close:()=>{}};const n=JX(t);if(n.grouping&&Kl.length){const i=Kl.find(({vnode:o})=>{var a;return((a=o.props)==null?void 0:a.message)===n.message});if(i)return i.props.repeatNum+=1,i.props.type=n.type,i.handler}if(Et(Wl.max)&&Kl.length>=Wl.max)return{close:()=>{}};const r=nQe(n,e);return Kl.push(r),r.handler};KX.forEach(t=>{lm[t]=(e={},n)=>{const r=JX(e);return lm({...r,type:t},n)}});function rQe(t){for(const e of Kl)(!t||t===e.props.type)&&e.handler.close()}lm.closeAll=rQe;lm._context=null;const jr=Jz(lm,"$message"),xP="_trap-focus-children",Ih=[],f8=t=>{if(Ih.length===0)return;const e=Ih[Ih.length-1][xP];if(e.length>0&&t.code===ut.tab){if(e.length===1){t.preventDefault(),document.activeElement!==e[0]&&e[0].focus();return}const n=t.shiftKey,r=t.target===e[0],i=t.target===e[e.length-1];r&&n&&(t.preventDefault(),e[e.length-1].focus()),i&&!n&&(t.preventDefault(),e[0].focus())}},iQe={beforeMount(t){t[xP]=C5(t),Ih.push(t),Ih.length<=1&&document.addEventListener("keydown",f8)},updated(t){xt(()=>{t[xP]=C5(t)})},unmounted(){Ih.shift(),Ih.length===0&&document.removeEventListener("keydown",f8)}},oQe=ue({name:"ElMessageBox",directives:{TrapFocus:iQe},components:{ElButton:lr,ElFocusTrap:Um,ElInput:hi,ElOverlay:z$,ElIcon:mt,...p$},inheritAttrs:!1,props:{buttonSize:{type:String,validator:PU},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:r,ns:i,size:o}=QS("message-box",M(()=>t.buttonSize)),{t:a}=n,{nextZIndex:s}=r,l=F(!1),u=vn({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:Qc(Ju),cancelButtonLoadingIcon:Qc(Ju),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:s()}),c=M(()=>{const L=u.type;return{[i.bm("icon",L)]:L&&xf[L]}}),d=bo(),f=bo(),h=M(()=>u.icon||xf[u.type]||""),g=M(()=>!!u.message),m=F(),y=F(),b=F(),w=F(),O=F(),x=M(()=>u.confirmButtonClass);Fe(()=>u.inputValue,async L=>{await xt(),t.boxType==="prompt"&&L!==null&&$()},{immediate:!0}),Fe(()=>l.value,L=>{var X,Q;L&&(t.boxType!=="prompt"&&(u.autofocus?b.value=(Q=(X=O.value)==null?void 0:X.$el)!=null?Q:m.value:b.value=m.value),u.zIndex=s()),t.boxType==="prompt"&&(L?xt().then(()=>{var W;w.value&&w.value.$el&&(u.autofocus?b.value=(W=N())!=null?W:m.value:b.value=m.value)}):(u.editorErrorMessage="",u.validateError=!1))});const S=M(()=>t.draggable),C=M(()=>t.overflow);jH(m,y,S,C),Ft(async()=>{await xt(),t.closeOnHashChange&&window.addEventListener("hashchange",E)}),pr(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",E)});function E(){!l.value||(l.value=!1,xt(()=>{u.action&&e("action",u.action)}))}const T=()=>{t.closeOnClickModal&&D(u.distinguishCancelAndClose?"close":"cancel")},P=Q$(T),A=L=>{if(u.inputType!=="textarea")return L.preventDefault(),D("confirm")},D=L=>{var X;t.boxType==="prompt"&&L==="confirm"&&!$()||(u.action=L,u.beforeClose?(X=u.beforeClose)==null||X.call(u,L,u,E):E())},$=()=>{if(t.boxType==="prompt"){const L=u.inputPattern;if(L&&!L.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;const X=u.inputValidator;if(St(X)){const Q=X(u.inputValue);if(Q===!1)return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;if(Ot(Q))return u.editorErrorMessage=Q,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},N=()=>{const L=w.value.$refs;return L.input||L.textarea},z=()=>{D("close")},I=()=>{t.closeOnPressEscape&&z()};return t.lockScroll&&W$(l),{...Mi(u),ns:i,overlayEvent:P,visible:l,hasMessage:g,typeClass:c,contentId:d,inputId:f,btnSize:o,iconComponent:h,confirmButtonClasses:x,rootRef:m,focusStartRef:b,headerRef:y,inputRef:w,confirmRef:O,doClose:E,handleClose:z,onCloseRequested:I,handleWrapperClick:T,handleInputEnter:A,handleAction:D,t:a}}});function aQe(t,e,n,r,i,o){const a=rn("el-icon"),s=rn("close"),l=rn("el-input"),u=rn("el-button"),c=rn("el-focus-trap"),d=rn("el-overlay");return R(),xe(zi,{name:"fade-in-linear",onAfterLeave:f=>t.$emit("vanish"),persisted:""},{default:j(()=>[zt(B(d,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:j(()=>[J("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:V(`${t.ns.namespace.value}-overlay-message-box`),onClick:t.overlayEvent.onClick,onMousedown:t.overlayEvent.onMousedown,onMouseup:t.overlayEvent.onMouseup},[B(c,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:j(()=>[J("div",{ref:"rootRef",class:V([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),{[t.ns.m("center")]:t.center}]),style:vt(t.customStyle),tabindex:"-1",onClick:At(()=>{},["stop"])},[t.title!==null&&t.title!==void 0?(R(),Y("div",{key:0,ref:"headerRef",class:V([t.ns.e("header"),{"show-close":t.showClose}])},[J("div",{class:V(t.ns.e("title"))},[t.iconComponent&&t.center?(R(),xe(a,{key:0,class:V([t.ns.e("status"),t.typeClass])},{default:j(()=>[(R(),xe(on(t.iconComponent)))]),_:1},8,["class"])):Se("v-if",!0),J("span",null,Ve(t.title),1)],2),t.showClose?(R(),Y("button",{key:0,type:"button",class:V(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:f=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),onKeydown:br(At(f=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[B(a,{class:V(t.ns.e("close"))},{default:j(()=>[B(s)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):Se("v-if",!0)],2)):Se("v-if",!0),J("div",{id:t.contentId,class:V(t.ns.e("content"))},[J("div",{class:V(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(R(),xe(a,{key:0,class:V([t.ns.e("status"),t.typeClass])},{default:j(()=>[(R(),xe(on(t.iconComponent)))]),_:1},8,["class"])):Se("v-if",!0),t.hasMessage?(R(),Y("div",{key:1,class:V(t.ns.e("message"))},[Ee(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(R(),xe(on(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(R(),xe(on(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0},{default:j(()=>[Ue(Ve(t.dangerouslyUseHTMLString?"":t.message),1)]),_:1},8,["for"]))])],2)):Se("v-if",!0)],2),zt(J("div",{class:V(t.ns.e("input"))},[B(l,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":f=>t.inputValue=f,type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:V({invalid:t.validateError}),onKeydown:br(t.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),J("div",{class:V(t.ns.e("errormsg")),style:vt({visibility:t.editorErrorMessage?"visible":"hidden"})},Ve(t.editorErrorMessage),7)],2),[[Bn,t.showInput]])],10,["id"]),J("div",{class:V(t.ns.e("btns"))},[t.showCancelButton?(R(),xe(u,{key:0,loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:V([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:f=>t.handleAction("cancel"),onKeydown:br(At(f=>t.handleAction("cancel"),["prevent"]),["enter"])},{default:j(()=>[Ue(Ve(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):Se("v-if",!0),zt(B(u,{ref:"confirmRef",type:"primary",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:V([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:f=>t.handleAction("confirm"),onKeydown:br(At(f=>t.handleAction("confirm"),["prevent"]),["enter"])},{default:j(()=>[Ue(Ve(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[Bn,t.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[Bn,t.visible]])]),_:3},8,["onAfterLeave"])}var sQe=Ye(oQe,[["render",aQe],["__file","index.vue"]]);const M0=new Map,lQe=t=>{let e=document.body;return t.appendTo&&(Ot(t.appendTo)&&(e=document.querySelector(t.appendTo)),As(t.appendTo)&&(e=t.appendTo),As(e)||(e=document.body)),e},uQe=(t,e,n=null)=>{const r=B(sQe,t,St(t.message)||Jr(t.message)?{default:St(t.message)?t.message:()=>t.message}:null);return r.appContext=n,ff(r,e),lQe(t).appendChild(e.firstElementChild),r.component},cQe=()=>document.createElement("div"),dQe=(t,e)=>{const n=cQe();t.onVanish=()=>{ff(null,n),M0.delete(i)},t.onAction=o=>{const a=M0.get(i);let s;t.showInput?s={value:i.inputValue,action:o}:s=o,t.callback?t.callback(s,r.proxy):o==="cancel"||o==="close"?t.distinguishCancelAndClose&&o!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(s)};const r=uQe(t,n,e),i=r.proxy;for(const o in t)Mn(t,o)&&!Mn(i.$props,o)&&(i[o]=t[o]);return i.visible=!0,i};function Km(t,e=null){if(!wn)return Promise.reject();let n;return Ot(t)||Jr(t)?t={message:t}:n=t.callback,new Promise((r,i)=>{const o=dQe(t,e!=null?e:Km._context);M0.set(o,{options:t,callback:n,resolve:r,reject:i})})}const fQe=["alert","confirm","prompt"],hQe={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};fQe.forEach(t=>{Km[t]=pQe(t)});function pQe(t){return(e,n,r,i)=>{let o="";return Jt(n)?(r=n,o=""):ar(n)?o="":o=n,Km(Object.assign({title:o,message:e,type:"",...hQe[t]},r,{boxType:t}),i)}}Km.close=()=>{M0.forEach((t,e)=>{e.doClose()}),M0.clear()};Km._context=null;const $d=Km;$d.install=t=>{$d._context=t._context,t.config.globalProperties.$msgbox=$d,t.config.globalProperties.$messageBox=$d,t.config.globalProperties.$alert=$d.alert,t.config.globalProperties.$confirm=$d.confirm,t.config.globalProperties.$prompt=$d.prompt};const Nw=$d,eZ=["success","info","warning","error"],gQe=Ze({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:fr},id:{type:String,default:""},message:{type:we([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:we(Function),default:()=>{}},onClose:{type:we(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...eZ,""],default:""},zIndex:Number}),mQe={destroy:()=>!0},vQe=ue({name:"ElNotification"}),yQe=ue({...vQe,props:gQe,emits:mQe,setup(t,{expose:e}){const n=t,{ns:r,zIndex:i}=QS("notification"),{nextZIndex:o,currentZIndex:a}=i,{Close:s}=h$,l=F(!1);let u;const c=M(()=>{const O=n.type;return O&&xf[n.type]?r.m(O):""}),d=M(()=>n.type&&xf[n.type]||n.icon),f=M(()=>n.position.endsWith("right")?"right":"left"),h=M(()=>n.position.startsWith("top")?"top":"bottom"),g=M(()=>{var O;return{[h.value]:`${n.offset}px`,zIndex:(O=n.zIndex)!=null?O:a.value}});function m(){n.duration>0&&({stop:u}=rp(()=>{l.value&&b()},n.duration))}function y(){u==null||u()}function b(){l.value=!1}function w({code:O}){O===ut.delete||O===ut.backspace?y():O===ut.esc?l.value&&b():m()}return Ft(()=>{m(),o(),l.value=!0}),sr(document,"keydown",w),e({visible:l,close:b}),(O,x)=>(R(),xe(zi,{name:p(r).b("fade"),onBeforeLeave:O.onClose,onAfterLeave:S=>O.$emit("destroy"),persisted:""},{default:j(()=>[zt(J("div",{id:O.id,class:V([p(r).b(),O.customClass,p(f)]),style:vt(p(g)),role:"alert",onMouseenter:y,onMouseleave:m,onClick:O.onClick},[p(d)?(R(),xe(p(mt),{key:0,class:V([p(r).e("icon"),p(c)])},{default:j(()=>[(R(),xe(on(p(d))))]),_:1},8,["class"])):Se("v-if",!0),J("div",{class:V(p(r).e("group"))},[J("h2",{class:V(p(r).e("title")),textContent:Ve(O.title)},null,10,["textContent"]),zt(J("div",{class:V(p(r).e("content")),style:vt(O.title?void 0:{margin:0})},[Ee(O.$slots,"default",{},()=>[O.dangerouslyUseHTMLString?(R(),Y(dt,{key:1},[Se(" Caution here, message could've been compromised, never use user's input as message "),J("p",{innerHTML:O.message},null,8,["innerHTML"])],2112)):(R(),Y("p",{key:0},Ve(O.message),1))])],6),[[Bn,O.message]]),O.showClose?(R(),xe(p(mt),{key:0,class:V(p(r).e("closeBtn")),onClick:At(b,["stop"])},{default:j(()=>[B(p(s))]),_:1},8,["class","onClick"])):Se("v-if",!0)],2)],46,["id","onClick"]),[[Bn,l.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var bQe=Ye(yQe,[["__file","notification.vue"]]);const Dw={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},SP=16;let _Qe=1;const um=function(t={},e){if(!wn)return{close:()=>{}};(Ot(t)||Jr(t))&&(t={message:t});const n=t.position||"top-right";let r=t.offset||0;Dw[n].forEach(({vm:c})=>{var d;r+=(((d=c.el)==null?void 0:d.offsetHeight)||0)+SP}),r+=SP;const i=`notification_${_Qe++}`,o=t.onClose,a={...t,offset:r,id:i,onClose:()=>{OQe(i,n,o)}};let s=document.body;As(t.appendTo)?s=t.appendTo:Ot(t.appendTo)&&(s=document.querySelector(t.appendTo)),As(s)||(s=document.body);const l=document.createElement("div"),u=B(bQe,a,St(a.message)?a.message:Jr(a.message)?()=>a.message:null);return u.appContext=ar(e)?um._context:e,u.props.onDestroy=()=>{ff(null,l)},ff(u,l),Dw[n].push({vm:u}),s.appendChild(l.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};eZ.forEach(t=>{um[t]=(e={},n)=>((Ot(e)||Jr(e))&&(e={message:e}),um({...e,type:t},n))});function OQe(t,e,n){const r=Dw[e],i=r.findIndex(({vm:u})=>{var c;return((c=u.component)==null?void 0:c.props.id)===t});if(i===-1)return;const{vm:o}=r[i];if(!o)return;n==null||n(o);const a=o.el.offsetHeight,s=e.split("-")[0];r.splice(i,1);const l=r.length;if(!(l<1))for(let u=i;u<l;u++){const{el:c,component:d}=r[u].vm,f=Number.parseInt(c.style[s],10)-a-SP;d.props.offset=f}}function wQe(){for(const t of Object.values(Dw))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}um.closeAll=wQe;um._context=null;const xQe=Jz(um,"$notify");var SQe=[Vje,Hje,jr,Nw,xQe,hU],CQe=HSe([...$je,...SQe]),tZ={name:"zh-cn",el:{breadcrumb:{label:"\u9762\u5305\u5C51"},colorpicker:{confirm:"\u786E\u5B9A",clear:"\u6E05\u7A7A",defaultLabel:"\u989C\u8272\u9009\u62E9\u5668",description:"\u5F53\u524D\u989C\u8272 {color}\uFF0C\u6309 Enter \u952E\u9009\u62E9\u65B0\u989C\u8272",alphaLabel:"\u9009\u62E9\u900F\u660E\u5EA6\u7684\u503C"},datepicker:{now:"\u6B64\u523B",today:"\u4ECA\u5929",cancel:"\u53D6\u6D88",clear:"\u6E05\u7A7A",confirm:"\u786E\u5B9A",dateTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u65E5\u671F",monthTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u6708\u4EFD",yearTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u5E74\u4EFD",selectedDate:"\u5DF2\u9009\u65E5\u671F",selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startDate:"\u5F00\u59CB\u65E5\u671F",startTime:"\u5F00\u59CB\u65F6\u95F4",endDate:"\u7ED3\u675F\u65E5\u671F",endTime:"\u7ED3\u675F\u65F6\u95F4",prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",prevMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",year:"\u5E74",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},weeksFull:{sun:"\u661F\u671F\u65E5",mon:"\u661F\u671F\u4E00",tue:"\u661F\u671F\u4E8C",wed:"\u661F\u671F\u4E09",thu:"\u661F\u671F\u56DB",fri:"\u661F\u671F\u4E94",sat:"\u661F\u671F\u516D"},months:{jan:"\u4E00\u6708",feb:"\u4E8C\u6708",mar:"\u4E09\u6708",apr:"\u56DB\u6708",may:"\u4E94\u6708",jun:"\u516D\u6708",jul:"\u4E03\u6708",aug:"\u516B\u6708",sep:"\u4E5D\u6708",oct:"\u5341\u6708",nov:"\u5341\u4E00\u6708",dec:"\u5341\u4E8C\u6708"}},inputNumber:{decrease:"\u51CF\u5C11\u6570\u503C",increase:"\u589E\u52A0\u6570\u503C"},select:{loading:"\u52A0\u8F7D\u4E2D",noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",placeholder:"\u8BF7\u9009\u62E9"},dropdown:{toggleDropdown:"\u5207\u6362\u4E0B\u62C9\u9009\u9879"},mention:{loading:"\u52A0\u8F7D\u4E2D"},cascader:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D",placeholder:"\u8BF7\u9009\u62E9",noData:"\u6682\u65E0\u6570\u636E"},pagination:{goto:"\u524D\u5F80",pagesize:"\u6761/\u9875",total:"\u5171 {total} \u6761",pageClassifier:"\u9875",page:"\u9875",prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",currentPage:"\u7B2C {pager} \u9875",prevPages:"\u5411\u524D {pager} \u9875",nextPages:"\u5411\u540E {pager} \u9875",deprecationWarning:"\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"},dialog:{close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},drawer:{close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},messagebox:{title:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",error:"\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!",close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},upload:{deleteTip:"\u6309 delete \u952E\u53EF\u5220\u9664",delete:"\u5220\u9664",preview:"\u67E5\u770B\u56FE\u7247",continue:"\u7EE7\u7EED\u4E0A\u4F20"},slider:{defaultLabel:"\u6ED1\u5757\u4ECB\u4E8E {min} \u81F3 {max}",defaultRangeStartLabel:"\u9009\u62E9\u8D77\u59CB\u503C",defaultRangeEndLabel:"\u9009\u62E9\u7ED3\u675F\u503C"},table:{emptyText:"\u6682\u65E0\u6570\u636E",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},tour:{next:"\u4E0B\u4E00\u6B65",previous:"\u4E0A\u4E00\u6B65",finish:"\u7ED3\u675F\u5BFC\u89C8"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"},transfer:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",titles:["\u5217\u8868 1","\u5217\u8868 2"],filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",noCheckedFormat:"\u5171 {total} \u9879",hasCheckedFormat:"\u5DF2\u9009 {checked}/{total} \u9879"},image:{error:"\u52A0\u8F7D\u5931\u8D25"},pageHeader:{title:"\u8FD4\u56DE"},popconfirm:{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"},carousel:{leftArrow:"\u4E0A\u4E00\u5F20\u5E7B\u706F\u7247",rightArrow:"\u4E0B\u4E00\u5F20\u5E7B\u706F\u7247",indicator:"\u5E7B\u706F\u7247\u5207\u6362\u81F3\u7D22\u5F15 {index}"}}},fC,tr,nZ,xh,h8,rZ,CP,iZ,TN,EP,TP,R0={},oZ=[],EQe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,hC=Array.isArray;function Ud(t,e){for(var n in e)t[n]=e[n];return t}function kN(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Kt(t,e,n){var r,i,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?fC.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return L1(t,a,r,i,null)}function L1(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++nZ:i,__i:-1,__u:0};return i==null&&tr.vnode!=null&&tr.vnode(o),o}function pC(){return{current:null}}function cm(t){return t.children}function ur(t,e){this.props=t,this.context=e}function dm(t,e){if(e==null)return t.__?dm(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?dm(t):null}function aZ(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return aZ(t)}}function p8(t){(!t.__d&&(t.__d=!0)&&xh.push(t)&&!Lw.__r++||h8!==tr.debounceRendering)&&((h8=tr.debounceRendering)||rZ)(Lw)}function Lw(){var t,e,n,r,i,o,a,s;for(xh.sort(CP);t=xh.shift();)t.__d&&(e=xh.length,r=void 0,o=(i=(n=t).__v).__e,a=[],s=[],n.__P&&((r=Ud({},i)).__v=i.__v+1,tr.vnode&&tr.vnode(r),PN(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,a,o==null?dm(i):o,!!(32&i.__u),s),r.__v=i.__v,r.__.__k[r.__i]=r,uZ(a,r,s),r.__e!=o&&aZ(r)),xh.length>e&&xh.sort(CP));Lw.__r=0}function sZ(t,e,n,r,i,o,a,s,l,u,c){var d,f,h,g,m,y,b=r&&r.__k||oZ,w=e.length;for(l=TQe(n,e,b,l,w),d=0;d<w;d++)(h=n.__k[d])!=null&&(f=h.__i===-1?R0:b[h.__i]||R0,h.__i=d,y=PN(t,h,f,i,o,a,s,l,u,c),g=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&AN(f.ref,null,h),c.push(h.ref,h.__c||g,h)),m==null&&g!=null&&(m=g),4&h.__u||f.__k===h.__k?l=lZ(h,l,t):typeof h.type=="function"&&y!==void 0?l=y:g&&(l=g.nextSibling),h.__u&=-7);return n.__e=m,l}function TQe(t,e,n,r,i){var o,a,s,l,u,c=n.length,d=c,f=0;for(t.__k=new Array(i),o=0;o<i;o++)(a=e[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(l=o+f,(a=t.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?L1(null,a,null,null,null):hC(a)?L1(cm,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?L1(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,s=null,(u=a.__i=kQe(a,n,l,d))!==-1&&(d--,(s=n[u])&&(s.__u|=2)),s==null||s.__v===null?(u==-1&&f--,typeof a.type!="function"&&(a.__u|=4)):u!=l&&(u==l-1?f--:u==l+1?f++:(u>l?f--:f++,a.__u|=4))):t.__k[o]=null;if(d)for(o=0;o<c;o++)(s=n[o])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=dm(s)),cZ(s,s));return r}function lZ(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=lZ(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=dm(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Iw(t,e){return e=e||[],t==null||typeof t=="boolean"||(hC(t)?t.some(function(n){Iw(n,e)}):e.push(t)),e}function kQe(t,e,n,r){var i,o,a=t.key,s=t.type,l=e[n];if(l===null||l&&a==l.key&&s===l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((l=e[i])&&(2&l.__u)==0&&a==l.key&&s===l.type)return i;i--}if(o<e.length){if((l=e[o])&&(2&l.__u)==0&&a==l.key&&s===l.type)return o;o++}}return-1}function g8(t,e,n){e[0]=="-"?t.setProperty(e,n==null?"":n):t[e]=n==null?"":typeof n!="number"||EQe.test(e)?n:n+"px"}function yO(t,e,n,r,i){var o;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||g8(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||g8(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(iZ,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=TN,t.addEventListener(e,o?TP:EP,o)):t.removeEventListener(e,o?TP:EP,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n==null?"":n;break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function m8(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=TN++;else if(e.t<n.u)return;return n(tr.event?tr.event(e):e)}}}function PN(t,e,n,r,i,o,a,s,l,u){var c,d,f,h,g,m,y,b,w,O,x,S,C,E,T,P,A,D=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[s=e.__e=n.__e]),(c=tr.__b)&&c(e);e:if(typeof D=="function")try{if(b=e.props,w="prototype"in D&&D.prototype.render,O=(c=D.contextType)&&r[c.__c],x=c?O?O.props.value:c.__:r,n.__c?y=(d=e.__c=n.__c).__=d.__E:(w?e.__c=d=new D(b,x):(e.__c=d=new ur(b,x),d.constructor=D,d.render=AQe),O&&O.sub(d),d.props=b,d.state||(d.state={}),d.context=x,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),w&&d.__s==null&&(d.__s=d.state),w&&D.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ud({},d.__s)),Ud(d.__s,D.getDerivedStateFromProps(b,d.__s))),h=d.props,g=d.state,d.__v=e,f)w&&D.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),w&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(w&&D.getDerivedStateFromProps==null&&b!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(b,x),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(b,d.__s,x)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(d.props=b,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function($){$&&($.__=e)}),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(b,d.__s,x),w&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,g,m)})}if(d.context=x,d.props=b,d.__P=t,d.__e=!1,C=tr.__r,E=0,w){for(d.state=d.__s,d.__d=!1,C&&C(e),c=d.render(d.props,d.state,d.context),T=0;T<d._sb.length;T++)d.__h.push(d._sb[T]);d._sb=[]}else do d.__d=!1,C&&C(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++E<25);d.state=d.__s,d.getChildContext!=null&&(r=Ud(Ud({},r),d.getChildContext())),w&&!f&&d.getSnapshotBeforeUpdate!=null&&(m=d.getSnapshotBeforeUpdate(h,g)),s=sZ(t,hC(P=c!=null&&c.type===cm&&c.key==null?c.props.children:c)?P:[P],e,n,r,i,o,a,s,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&a.push(d),y&&(d.__E=d.__=null)}catch($){if(e.__v=null,l||o!=null)if($.then){for(e.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,e.__e=s}else for(A=o.length;A--;)kN(o[A]);else e.__e=n.__e,e.__k=n.__k;tr.__e($,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):s=e.__e=PQe(n.__e,e,n,r,i,o,a,l,u);return(c=tr.diffed)&&c(e),128&e.__u?void 0:s}function uZ(t,e,n){for(var r=0;r<n.length;r++)AN(n[r],n[++r],n[++r]);tr.__c&&tr.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){tr.__e(o,i.__v)}})}function PQe(t,e,n,r,i,o,a,s,l){var u,c,d,f,h,g,m,y=n.props,b=e.props,w=e.type;if(w=="svg"?i="http://www.w3.org/2000/svg":w=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((h=o[u])&&"setAttribute"in h==!!w&&(w?h.localName==w:h.nodeType==3)){t=h,o[u]=null;break}}if(t==null){if(w==null)return document.createTextNode(b);t=document.createElementNS(i,w,b.is&&b),s&&(tr.__m&&tr.__m(e,o),s=!1),o=null}if(w===null)y===b||s&&t.data===b||(t.data=b);else{if(o=o&&fC.call(t.childNodes),y=n.props||R0,!s&&o!=null)for(y={},u=0;u<t.attributes.length;u++)y[(h=t.attributes[u]).name]=h.value;for(u in y)if(h=y[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=h;else if(!(u in b)){if(u=="value"&&"defaultValue"in b||u=="checked"&&"defaultChecked"in b)continue;yO(t,u,null,h,i)}}for(u in b)h=b[u],u=="children"?f=h:u=="dangerouslySetInnerHTML"?c=h:u=="value"?g=h:u=="checked"?m=h:s&&typeof h!="function"||y[u]===h||yO(t,u,h,y[u],i);if(c)s||d&&(c.__html===d.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(d&&(t.innerHTML=""),sZ(t,hC(f)?f:[f],e,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&dm(n,0),s,l),o!=null)for(u=o.length;u--;)kN(o[u]);s||(u="value",w=="progress"&&g==null?t.removeAttribute("value"):g!==void 0&&(g!==t[u]||w=="progress"&&!g||w=="option"&&g!==y[u])&&yO(t,u,g,y[u],i),u="checked",m!==void 0&&m!==t[u]&&yO(t,u,m,y[u],i))}return t}function AN(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){tr.__e(i,n)}}function cZ(t,e,n){var r,i;if(tr.unmount&&tr.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||AN(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){tr.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&cZ(r[i],e,n||typeof t.type!="function");n||kN(t.__e),t.__c=t.__=t.__e=void 0}function AQe(t,e,n){return this.constructor(t,n)}function MQe(t,e,n){var r,i,o,a;e==document&&(e=document.documentElement),tr.__&&tr.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],a=[],PN(e,t=(!r&&n||e).__k=Kt(cm,null,[t]),i||R0,R0,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?fC.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,a),uZ(o,t,a)}fC=oZ.slice,tr={__e:function(t,e,n,r){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},nZ=0,ur.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ud({},this.state),typeof t=="function"&&(t=t(Ud({},n),this.props)),t&&Ud(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),p8(this))},ur.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),p8(this))},ur.prototype.render=cm,xh=[],rZ=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,CP=function(t,e){return t.__v.__b-e.__v.__b},Lw.__r=0,iZ=/(PointerCapture)$|Capture$/i,TN=0,EP=m8(!1),TP=m8(!0);var RQe="An invariant failed, however the error is obfuscated because this is a production build.",Bw=[];Object.freeze(Bw);var MN={};Object.freeze(MN);function rs(){return++ln.mobxGuid}function $r(t){throw Xh(!1,t),"X"}function Xh(t,e){if(!t)throw new Error("[mobx] "+(e||RQe))}function dZ(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var bO=function(){};function $Qe(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function RN(t){return t!==null&&typeof t=="object"}function Jm(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function NQe(t){if(tv(t)||ls(t))return t;if(Array.isArray(t))return new Map(t);if(Jm(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return $r("Cannot convert to map from '"+t+"'")}function ev(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function DQe(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function LQe(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!n||n.configurable!==!1&&n.writable!==!1}function zf(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(r){return RN(r)&&r[n]===!0}}function tv(t){return t instanceof Map}function Fb(t){return t instanceof Set}function fZ(t){var e=new Set;for(var n in t)e.add(n);return Object.getOwnPropertySymbols(t).forEach(function(r){Object.getOwnPropertyDescriptor(t,r).enumerable&&e.add(r)}),Array.from(e)}function Xd(t){return t&&t.toString?t.toString():new String(t).toString()}function hZ(t){return t===null?null:typeof t=="object"?""+t:t}var IQe=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Rn=Symbol("mobx administration"),nv=function(){function t(e){e===void 0&&(e="Atom@"+rs()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Dr.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.reportObserved=function(){return SZ(this)},t.prototype.reportChanged=function(){nu(),s7e(this),ru()},t.prototype.toString=function(){return this.name},t}(),$N=zf("Atom",nv);function NN(t,e,n){e===void 0&&(e=bO),n===void 0&&(n=bO);var r=new nv(t);return e!==bO&&_7e(r,e),n!==bO&&AZ(r,n),r}function BQe(t,e){return t===e}function FQe(t,e){return jN(t,e)}function VQe(t,e){return jN(t,e,1)}function jQe(t,e){return Object.is(t,e)}var fm={identity:BQe,structural:FQe,default:jQe,shallow:VQe};/*! *****************************************************************************
- Copyright (c) Microsoft Corporation. All rights reserved.
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of the
- License at http://www.apache.org/licenses/LICENSE-2.0
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
- MERCHANTABLITY OR NON-INFRINGEMENT.
- See the Apache Version 2.0 License for specific language governing permissions
- and limitations under the License.
- ***************************************************************************** */var kP=function(t,e){return kP=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},kP(t,e)};function QQe(t,e){kP(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Fw=function(){return Fw=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Fw.apply(this,arguments)};function Lu(t){var e=typeof Symbol=="function"&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function vg(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function DN(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(vg(arguments[e]));return t}var Vw=Symbol("mobx did run lazy initializers"),oy=Symbol("mobx pending decorators"),zQe={},WQe={};function HQe(t,e){var n=e?zQe:WQe;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return lp(this),this[t]},set:function(r){lp(this),this[t]=r}})}function lp(t){var e,n;if(t[Vw]!==!0){var r=t[oy];if(r){ev(t,Vw,!0);var i=DN(Object.getOwnPropertySymbols(r),Object.keys(r));try{for(var o=Lu(i),a=o.next();!a.done;a=o.next()){var s=a.value,l=r[s];l.propertyCreator(t,l.prop,l.descriptor,l.decoratorTarget,l.decoratorArguments)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}}}function pZ(t,e){return function(){var r,i=function(a,s,l,u){if(u===!0)return e(a,s,l,a,r),null;if(!Object.prototype.hasOwnProperty.call(a,oy)){var c=a[oy];ev(a,oy,Fw({},c))}return a[oy][s]={prop:s,propertyCreator:e,descriptor:l,decoratorTarget:a,decoratorArguments:r},HQe(s,t)};return UQe(arguments)?(r=Bw,i.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),i)}}function UQe(t){return(t.length===2||t.length===3)&&(typeof t[1]=="string"||typeof t[1]=="symbol")||t.length===4&&t[3]===!0}function Vb(t,e,n){return mm(t)?t:Array.isArray(t)?st.array(t,{name:n}):Jm(t)?st.object(t,void 0,{name:n}):tv(t)?st.map(t,{name:n}):Fb(t)?st.set(t,{name:n}):t}function XQe(t,e,n){return t==null||Sl(t)||gc(t)||ls(t)||xl(t)?t:Array.isArray(t)?st.array(t,{name:n,deep:!1}):Jm(t)?st.object(t,void 0,{name:n,deep:!1}):tv(t)?st.map(t,{name:n,deep:!1}):Fb(t)?st.set(t,{name:n,deep:!1}):$r(!1)}function gC(t){return t}function ZQe(t,e,n){return jN(t,e)?e:t}function mC(t){Xh(t);var e=pZ(!0,function(r,i,o,a,s){var l=o?o.initializer?o.initializer.call(r):o.value:void 0;VN(r).addObservableProp(i,l,t)}),n=(typeof process!="undefined"&&process.env,e);return n.enhancer=t,n}var gZ={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(gZ);function cg(t){return t==null?gZ:typeof t=="string"?{name:t,deep:!0,proxy:!0}:t}var LN=mC(Vb),qQe=mC(XQe),mZ=mC(gC),YQe=mC(ZQe);function _O(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?gC:Vb}function GQe(t,e,n){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return LN.apply(null,arguments);if(mm(t))return t;var r=Jm(t)?st.object(t,e,n):Array.isArray(t)?st.array(t,e):tv(t)?st.map(t,e):Fb(t)?st.set(t,e):t;if(r!==t)return r;$r(!1)}var v8={box:function(t,e){arguments.length>2&&Vv("box");var n=cg(e);return new qh(t,_O(n),n.name,!0,n.equals)},array:function(t,e){arguments.length>2&&Vv("array");var n=cg(e);return L7e(t,_O(n),n.name)},map:function(t,e){arguments.length>2&&Vv("map");var n=cg(e);return new FN(t,_O(n),n.name)},set:function(t,e){arguments.length>2&&Vv("set");var n=cg(e);return new BZ(t,_O(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&Vv("object");var r=cg(n);if(r.proxy===!1)return NP({},t,e,r);var i=RZ(r),o=NP({},void 0,void 0,r),a=$7e(o);return $Z(a,t,e,i),a},ref:mZ,shallow:qQe,deep:LN,struct:YQe},st=GQe;Object.keys(v8).forEach(function(t){return st[t]=v8[t]});function Vv(t){$r("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var jw=pZ(!1,function(t,e,n,r,i){var o=n.get,a=n.set,s=i[0]||{};VN(t).addComputedProp(t,e,Fw({get:o,set:a,context:t},s))}),KQe=jw({equals:fm.structural}),Gr=function(e,n,r){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return jw.apply(null,arguments);var i=typeof n=="object"?n:{};return i.get=e,i.set=typeof n=="function"?n:i.set,i.name=i.name||e.name||"",new pm(i)};Gr.struct=KQe;var Dr;(function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"})(Dr||(Dr={}));var Xu;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(Xu||(Xu={}));var Qw=function(){function t(e){this.cause=e}return t}();function ay(t){return t instanceof Qw}function PP(t){switch(t.dependenciesState){case Dr.UP_TO_DATE:return!1;case Dr.NOT_TRACKING:case Dr.STALE:return!0;case Dr.POSSIBLY_STALE:{for(var e=IN(!0),n=rv(),r=t.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(gm(a)){if(ln.disableErrorBoundaries)a.get();else try{a.get()}catch{return af(n),Ay(e),!0}if(t.dependenciesState===Dr.STALE)return af(n),Ay(e),!0}}return bZ(t),af(n),Ay(e),!1}}}function hm(t){var e=t.observers.size>0;ln.computationDepth>0&&e&&$r(!1),!ln.allowStateChanges&&(e||ln.enforceActions==="strict")&&$r(!1)}function vZ(t,e,n){var r=IN(!0);bZ(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++ln.runId;var i=ln.trackingDerivation;ln.trackingDerivation=t;var o;if(ln.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new Qw(a)}return ln.trackingDerivation=i,JQe(t),Ay(r),o}function JQe(t){for(var e=t.observing,n=t.observing=t.newObserving,r=Dr.UP_TO_DATE,i=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,i!==a&&(n[i]=s),i++),s.dependenciesState>r&&(r=s.dependenciesState)}for(n.length=i,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&wZ(s,t),s.diffValue=0}for(;i--;){var s=n[i];s.diffValue===1&&(s.diffValue=0,a7e(s,t))}r!==Dr.UP_TO_DATE&&(t.dependenciesState=r,t.onBecomeStale())}function AP(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)wZ(e[n],t);t.dependenciesState=Dr.NOT_TRACKING}function yZ(t){var e=rv();try{return t()}finally{af(e)}}function rv(){var t=ln.trackingDerivation;return ln.trackingDerivation=null,t}function af(t){ln.trackingDerivation=t}function IN(t){var e=ln.allowStateReads;return ln.allowStateReads=t,e}function Ay(t){ln.allowStateReads=t}function bZ(t){if(t.dependenciesState!==Dr.UP_TO_DATE){t.dependenciesState=Dr.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=Dr.UP_TO_DATE}}var zw=0,e7e=1,y8=Object.getOwnPropertyDescriptor(function(){},"name");y8&&y8.configurable;function Zh(t,e,n){var r=function(){return _Z(t,e,n||this,arguments)};return r.isMobxAction=!0,r}function _Z(t,e,n,r){var i=t7e();try{return e.apply(n,r)}catch(o){throw i.error=o,o}finally{n7e(i)}}function t7e(t,e,n){var r=Ga(),i=0,o=rv();nu();var a=vC(!0),s=IN(!0),l={prevDerivation:o,prevAllowStateChanges:a,prevAllowStateReads:s,notifySpy:r,startTime:i,actionId:e7e++,parentActionId:zw};return zw=l.actionId,l}function n7e(t){zw!==t.actionId&&$r("invalid action stack. did you forget to finish an action?"),zw=t.parentActionId,t.error!==void 0&&(ln.suppressReactionErrors=!0),yC(t.prevAllowStateChanges),Ay(t.prevAllowStateReads),ru(),af(t.prevDerivation),t.notifySpy,ln.suppressReactionErrors=!1}function vC(t){var e=ln.allowStateChanges;return ln.allowStateChanges=t,e}function yC(t){ln.allowStateChanges=t}var qh=function(t){QQe(e,t);function e(n,r,i,o,a){i===void 0&&(i="ObservableValue@"+rs()),o===void 0&&(o=!0),a===void 0&&(a=fm.default);var s=t.call(this,i)||this;return s.enhancer=r,s.name=i,s.equals=a,s.hasUnreportedChange=!1,s.value=r(n,void 0,i),o&&Ga(),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var r=this.value;if(n=this.prepareNewValue(n),n!==ln.UNCHANGED){var i=Ga();this.setNewValue(n)}},e.prototype.prepareNewValue=function(n){if(hm(this),Zu(this)){var r=qu(this,{object:this,type:"update",newValue:n});if(!r)return ln.UNCHANGED;n=r.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?ln.UNCHANGED:n},e.prototype.setNewValue=function(n){var r=this.value;this.value=n,this.reportChanged(),iu(this)&&ou(this,{type:"update",object:this,newValue:n,oldValue:r})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return jb(this,n)},e.prototype.observe=function(n,r){return r&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Qb(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return hZ(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(nv),r7e=zf("ObservableValue",qh),pm=function(){function t(e){this.dependenciesState=Dr.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Dr.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+rs(),this.value=new Qw(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Xu.NONE,Xh(e.get,"missing option for computed: get"),this.derivation=e.get,this.name=e.name||"ComputedValue@"+rs(),e.set&&(this.setter=Zh(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?fm.structural:fm.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){u7e(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.get=function(){this.isComputing&&$r("Cycle detected in computation "+this.name+": "+this.derivation),ln.inBatch===0&&this.observers.size===0&&!this.keepAlive?PP(this)&&(this.warnAboutUntrackedRead(),nu(),this.value=this.computeValue(!1),ru()):(SZ(this),PP(this)&&this.trackAndCompute()&&l7e(this));var e=this.value;if(ay(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(ay(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Xh(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Xh(!1,!1)},t.prototype.trackAndCompute=function(){var e=this.value,n=this.dependenciesState===Dr.NOT_TRACKING,r=this.computeValue(!0),i=n||ay(e)||ay(r)||!this.equals(e,r);return i&&(this.value=r),i},t.prototype.computeValue=function(e){this.isComputing=!0,ln.computationDepth++;var n;if(e)n=vZ(this,this.derivation,this.scope);else if(ln.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(r){n=new Qw(r)}return ln.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(AP(this),this.value=void 0)},t.prototype.observe=function(e,n){var r=this,i=!0,o=void 0;return v7e(function(){var a=r.get();if(!i||n){var s=rv();e({type:"update",object:r,newValue:a,oldValue:o}),af(s)}i=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return hZ(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),gm=zf("ComputedValue",pm),I1=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),i7e={};function MP(){return typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:i7e}var B1=!0,OZ=!1,ln=function(){var t=MP();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(B1=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new I1().version&&(B1=!1),B1?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new I1):(setTimeout(function(){OZ||$r("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new I1)}();function o7e(){(ln.pendingReactions.length||ln.inBatch||ln.isRunningReactions)&&$r("isolateGlobalState should be called before MobX is running any reactions"),OZ=!0,B1&&(--MP().__mobxInstanceCount===0&&(MP().__mobxGlobals=void 0),ln=new I1)}function RP(){return ln}function a7e(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function wZ(t,e){t.observers.delete(e),t.observers.size===0&&xZ(t)}function xZ(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,ln.pendingUnobservations.push(t))}function nu(){ln.inBatch++}function ru(){if(--ln.inBatch===0){TZ();for(var t=ln.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.size===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof pm&&n.suspend())}ln.pendingUnobservations=[]}}function SZ(t){var e=ln.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.size===0&&ln.inBatch>0&&xZ(t),!1)}function s7e(t){t.lowestObserverState!==Dr.STALE&&(t.lowestObserverState=Dr.STALE,t.observers.forEach(function(e){e.dependenciesState===Dr.UP_TO_DATE&&(e.isTracing!==Xu.NONE&&CZ(e,t),e.onBecomeStale()),e.dependenciesState=Dr.STALE}))}function l7e(t){t.lowestObserverState!==Dr.STALE&&(t.lowestObserverState=Dr.STALE,t.observers.forEach(function(e){e.dependenciesState===Dr.POSSIBLY_STALE?e.dependenciesState=Dr.STALE:e.dependenciesState===Dr.UP_TO_DATE&&(t.lowestObserverState=Dr.UP_TO_DATE)}))}function u7e(t){t.lowestObserverState===Dr.UP_TO_DATE&&(t.lowestObserverState=Dr.POSSIBLY_STALE,t.observers.forEach(function(e){e.dependenciesState===Dr.UP_TO_DATE&&(e.dependenciesState=Dr.POSSIBLY_STALE,e.isTracing!==Xu.NONE&&CZ(e,t),e.onBecomeStale())}))}function CZ(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===Xu.BREAK){var n=[];EZ(w7e(t),n,1),new Function(`debugger;
- /*
- Tracing '`+t.name+`'
- You are entering this break point because derivation '`+t.name+"' is being traced and '"+e.name+`' is now forcing it to update.
- Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
- The stackframe you are looking for is at least ~6-8 stack-frames up.
- `+(t instanceof pm?t.derivation.toString().replace(/[*]\//g,"/"):"")+`
- The dependencies for this derivation are:
- `+n.join(`
- `)+`
- */
- `)()}}function EZ(t,e,n){if(e.length>=1e3){e.push("(and many more)");return}e.push(""+new Array(n).join(" ")+t.name),t.dependencies&&t.dependencies.forEach(function(r){return EZ(r,e,n+1)})}var $0=function(){function t(e,n,r,i){e===void 0&&(e="Reaction@"+rs()),i===void 0&&(i=!1),this.name=e,this.onInvalidate=n,this.errorHandler=r,this.requiresObservable=i,this.observing=[],this.newObserving=[],this.dependenciesState=Dr.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+rs(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Xu.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,ln.pendingReactions.push(this),TZ())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(nu(),this._isScheduled=!1,PP(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ga()}catch(e){this.reportExceptionInDerivation(e)}}ru()}},t.prototype.track=function(e){if(!this.isDisposed){nu(),this._isRunning=!0;var n=vZ(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&AP(this),ay(n)&&this.reportExceptionInDerivation(n.cause),ru()}},t.prototype.reportExceptionInDerivation=function(e){var n=this;if(this.errorHandler){this.errorHandler(e,this);return}if(ln.disableErrorBoundaries)throw e;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";ln.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,e),ln.globalReactionErrorHandlers.forEach(function(i){return i(e,n)})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(nu(),AP(this),ru()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[Rn]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){e===void 0&&(e=!1),A7e(this,e)},t}(),b8=100,$P=function(t){return t()};function TZ(){ln.inBatch>0||ln.isRunningReactions||$P(c7e)}function c7e(){ln.isRunningReactions=!0;for(var t=ln.pendingReactions,e=0;t.length>0;){++e===b8&&(console.error("Reaction doesn't converge to a stable state after "+b8+" iterations."+(" Probably there is a cycle in the reactive function: "+t[0])),t.splice(0));for(var n=t.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}ln.isRunningReactions=!1}var Ww=zf("Reaction",$0);function d7e(t){var e=$P;$P=function(n){return t(function(){return e(n)})}}function Ga(){return!1}function f7e(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function h7e(){$r(!1)}function _8(t){return function(e,n,r){if(r){if(r.value)return{value:Zh(t,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Zh(t,i.call(this))}}}return p7e(t).apply(this,arguments)}}function p7e(t){return function(e,n,r){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:function(){},set:function(i){ev(this,n,it(t,i))}})}}function g7e(t,e,n,r){return r===!0?(UT(t,e,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return UT(this,e,n.value||n.initializer.call(this)),this[e]},set:h7e}:{enumerable:!1,configurable:!0,set:function(i){UT(this,e,i)},get:function(){}}}var it=function(e,n,r,i){if(arguments.length===1&&typeof e=="function")return Zh(e.name||"<unnamed action>",e);if(arguments.length===2&&typeof n=="function")return Zh(e,n);if(arguments.length===1&&typeof e=="string")return _8(e);if(i===!0)ev(e,n,Zh(e.name||n,r.value,this));else return _8(n).apply(null,arguments)};it.bound=g7e;function m7e(t,e){var n=typeof t=="string"?t:t.name||"<unnamed action>",r=typeof t=="function"?t:e;return _Z(n,r,this,void 0)}function UT(t,e,n){ev(t,e,Zh(e,n.bind(t)))}function v7e(t,e){e===void 0&&(e=MN);var n=e&&e.name||t.name||"Autorun@"+rs(),r=!e.scheduler&&!e.delay,i;if(r)i=new $0(n,function(){this.track(s)},e.onError,e.requiresObservable);else{var o=kZ(e),a=!1;i=new $0(n,function(){a||(a=!0,o(function(){a=!1,i.isDisposed||i.track(s)}))},e.onError,e.requiresObservable)}function s(){t(i)}return i.schedule(),i.getDisposer()}var y7e=function(t){return t()};function kZ(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:y7e}function PZ(t,e,n){n===void 0&&(n=MN);var r=n.name||"Reaction@"+rs(),i=it(r,n.onError?b7e(n.onError,e):e),o=!n.scheduler&&!n.delay,a=kZ(n),s=!0,l=!1,u,c=n.compareStructural?fm.structural:n.equals||fm.default,d=new $0(r,function(){s||o?f():l||(l=!0,a(f))},n.onError,n.requiresObservable);function f(){if(l=!1,!d.isDisposed){var h=!1;d.track(function(){var g=t(d);h=s||!c(u,g),u=g}),s&&n.fireImmediately&&i(u,d),!s&&h===!0&&i(u,d),s&&(s=!1)}}return d.schedule(),d.getDisposer()}function b7e(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}function _7e(t,e,n){return MZ("onBecomeObserved",t,e,n)}function AZ(t,e,n){return MZ("onBecomeUnobserved",t,e,n)}function MZ(t,e,n,r){var i=typeof r=="function"?ed(e,n):ed(e),o=typeof r=="function"?r:n,a=t+"Listeners";i[a]?i[a].add(o):i[a]=new Set([o]);var s=i[t];return typeof s!="function"?$r(!1):function(){var l=i[a];l&&(l.delete(o),l.size===0&&delete i[a])}}function O7e(t){var e=t.enforceActions,n=t.computedRequiresReaction,r=t.computedConfigurable,i=t.disableErrorBoundaries,o=t.reactionScheduler,a=t.reactionRequiresObservable,s=t.observableRequiresReaction;if(t.isolateGlobalState===!0&&o7e(),e!==void 0){var l=void 0;switch(e){case!0:case"observed":l=!0;break;case!1:case"never":l=!1;break;case"strict":case"always":l="strict";break;default:$r("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}ln.enforceActions=l,ln.allowStateChanges=!(l===!0||l==="strict")}n!==void 0&&(ln.computedRequiresReaction=!!n),a!==void 0&&(ln.reactionRequiresObservable=!!a),s!==void 0&&(ln.observableRequiresReaction=!!s,ln.allowStateReads=!ln.observableRequiresReaction),r!==void 0&&(ln.computedConfigurable=!!r),i!==void 0&&(i===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),ln.disableErrorBoundaries=!!i),o&&d7e(o)}function NP(t,e,n,r){r=cg(r);var i=RZ(r);return lp(t),VN(t,r.name,i.enhancer),e&&$Z(t,e,n,i),t}function RZ(t){return t.defaultDecorator||(t.deep===!1?mZ:LN)}function $Z(t,e,n,r){var i,o,a,s;nu();try{var a=IQe(e);try{for(var l=Lu(a),u=l.next();!u.done;u=l.next()){var s=u.value,c=Object.getOwnPropertyDescriptor(e,s),d=n&&s in n?n[s]:c.get?jw:r,f=d(t,s,c,!0);f&&Object.defineProperty(t,s,f)}}catch(g){i={error:g}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}finally{ru()}}function w7e(t,e){return NZ(ed(t,e))}function NZ(t){var e={name:t.name};return t.observing&&t.observing.length>0&&(e.dependencies=$Qe(t.observing).map(NZ)),e}function DZ(t,e){if(t==null)return!1;if(e!==void 0){if(Sl(t)===!1||!t[Rn].values.has(e))return!1;var n=ed(t,e);return gm(n)}return gm(t)}function x7e(t){return arguments.length>1?$r(!1):DZ(t)}function O8(t,e){return typeof e!="string"?$r(!1):DZ(t,e)}function S7e(t,e){return t==null?!1:e!==void 0?Sl(t)?t[Rn].values.has(e):!1:Sl(t)||!!t[Rn]||$N(t)||Ww(t)||gm(t)}function mm(t){return arguments.length!==1&&$r(!1),S7e(t)}function vm(t){return Sl(t)?t[Rn].getKeys():ls(t)||xl(t)?Array.from(t.keys()):gc(t)?t.map(function(e,n){return n}):$r(!1)}function C7e(t){return Sl(t)?vm(t).map(function(e){return t[e]}):ls(t)?vm(t).map(function(e){return t.get(e)}):xl(t)?Array.from(t.values()):gc(t)?t.slice():$r(!1)}function E7e(t){return Sl(t)?vm(t).map(function(e){return[e,t[e]]}):ls(t)?vm(t).map(function(e){return[e,t.get(e)]}):xl(t)?Array.from(t.entries()):gc(t)?t.map(function(e,n){return[n,e]}):$r(!1)}function BN(t,e,n){if(arguments.length===2&&!xl(t)){nu();var r=e;try{for(var i in r)BN(t,i,r[i])}finally{ru()}return}if(Sl(t)){var o=t[Rn],a=o.values.get(e);a?o.write(e,n):o.addObservableProp(e,n,o.defaultEnhancer)}else if(ls(t))t.set(e,n);else if(xl(t))t.add(e);else if(gc(t))typeof e!="number"&&(e=parseInt(e,10)),Xh(e>=0,"Not a valid index: '"+e+"'"),nu(),e>=t.length&&(t.length=e+1),t[e]=n,ru();else return $r(!1)}function LZ(t,e,n,r){return typeof n=="function"?k7e(t,e,n,r):T7e(t,e,n)}function T7e(t,e,n){return zb(t).observe(e,n)}function k7e(t,e,n,r){return zb(t,e).observe(n,r)}var P7e={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function qp(t,e,n,r){return r.detectCycles&&t.set(e,n),n}function Nd(t,e,n){if(!e.recurseEverything&&!mm(t)||typeof t!="object")return t;if(t===null)return null;if(t instanceof Date)return t;if(r7e(t))return Nd(t.get(),e,n);mm(t)&&vm(t);var r=e.detectCycles===!0;if(r&&t!==null&&n.has(t))return n.get(t);if(gc(t)||Array.isArray(t)){var i=qp(n,t,[],e),o=t.map(function(h){return Nd(h,e,n)});i.length=o.length;for(var a=0,s=o.length;a<s;a++)i[a]=o[a];return i}if(xl(t)||Object.getPrototypeOf(t)===Set.prototype)if(e.exportMapsAsObjects===!1){var l=qp(n,t,new Set,e);return t.forEach(function(h){l.add(Nd(h,e,n))}),l}else{var u=qp(n,t,[],e);return t.forEach(function(h){u.push(Nd(h,e,n))}),u}if(ls(t)||Object.getPrototypeOf(t)===Map.prototype)if(e.exportMapsAsObjects===!1){var c=qp(n,t,new Map,e);return t.forEach(function(h,g){c.set(g,Nd(h,e,n))}),c}else{var d=qp(n,t,{},e);return t.forEach(function(h,g){d[g]=Nd(h,e,n)}),d}var f=qp(n,t,{},e);return fZ(t).forEach(function(h){f[h]=Nd(t[h],e,n)}),f}function Hl(t,e){typeof e=="boolean"&&(e={detectCycles:e}),e||(e=P7e),e.detectCycles=e.detectCycles===void 0?e.recurseEverything===!0:e.detectCycles===!0;var n;return e.detectCycles&&(n=new Map),Nd(t,e,n)}function A7e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!1;typeof t[t.length-1]=="boolean"&&(n=t.pop());var r=M7e(t);if(!r)return $r(!1);r.isTracing===Xu.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?Xu.BREAK:Xu.LOG}function M7e(t){switch(t.length){case 0:return ln.trackingDerivation;case 1:return ed(t[0]);case 2:return ed(t[0],t[1])}}function Zl(t,e){e===void 0&&(e=void 0),nu();try{return t.apply(e)}finally{ru()}}function OO(t){return t[Rn]}function wO(t){return typeof t=="string"||typeof t=="number"||typeof t=="symbol"}var R7e={has:function(t,e){if(e===Rn||e==="constructor"||e===Vw)return!0;var n=OO(t);return wO(e)?n.has(e):e in t},get:function(t,e){if(e===Rn||e==="constructor"||e===Vw)return t[e];var n=OO(t),r=n.values.get(e);if(r instanceof nv){var i=r.get();return i===void 0&&n.has(e),i}return wO(e)&&n.has(e),t[e]},set:function(t,e,n){return wO(e)?(BN(t,e,n),!0):!1},deleteProperty:function(t,e){if(!wO(e))return!1;var n=OO(t);return n.remove(e),!0},ownKeys:function(t){var e=OO(t);return e.keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return $r("Dynamic observable objects cannot be frozen"),!1}};function $7e(t){var e=new Proxy(t,R7e);return t[Rn].proxy=e,e}function Zu(t){return t.interceptors!==void 0&&t.interceptors.length>0}function jb(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),dZ(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function qu(t,e){var n=rv();try{for(var r=DN(t.interceptors||[]),i=0,o=r.length;i<o&&(e=r[i](e),Xh(!e||e.type,"Intercept handlers should return nothing or a change object"),!!e);i++);return e}finally{af(n)}}function iu(t){return t.changeListeners!==void 0&&t.changeListeners.length>0}function Qb(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),dZ(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function ou(t,e){var n=rv(),r=t.changeListeners;if(!!r){r=r.slice();for(var i=0,o=r.length;i<o;i++)r[i](e);af(n)}}var N7e=1e4,D7e={get:function(t,e){return e===Rn?t[Rn]:e==="length"?t[Rn].getArrayLength():typeof e=="number"?Ic.get.call(t,e):typeof e=="string"&&!isNaN(e)?Ic.get.call(t,parseInt(e)):Ic.hasOwnProperty(e)?Ic[e]:t[e]},set:function(t,e,n){return e==="length"&&t[Rn].setArrayLength(n),typeof e=="number"&&Ic.set.call(t,e,n),typeof e=="symbol"||isNaN(e)?t[e]=n:Ic.set.call(t,parseInt(e),n),!0},preventExtensions:function(t){return $r("Observable arrays cannot be frozen"),!1}};function L7e(t,e,n,r){n===void 0&&(n="ObservableArray@"+rs()),r===void 0&&(r=!1);var i=new IZ(n,e,r);DQe(i.values,Rn,i);var o=new Proxy(i.values,D7e);if(i.proxy=o,t&&t.length){var a=vC(!0);i.spliceWithArray(0,0,t),yC(a)}return o}var IZ=function(){function t(e,n,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new nv(e||"ObservableArray@"+rs()),this.enhancer=function(i,o){return n(i,o,e+"[..]")}}return t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.dehanceValues=function(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e},t.prototype.intercept=function(e){return jb(this,e)},t.prototype.observe=function(e,n){return n===void 0&&(n=!1),n&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Qb(this,e)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(e){if(typeof e!="number"||e<0)throw new Error("[mobx.array] Out of range: "+e);var n=this.values.length;if(e!==n)if(e>n){for(var r=new Array(e-n),i=0;i<e-n;i++)r[i]=void 0;this.spliceWithArray(n,0,r)}else this.spliceWithArray(e,n-e)},t.prototype.updateArrayLength=function(e,n){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=n},t.prototype.spliceWithArray=function(e,n,r){var i=this;hm(this.atom);var o=this.values.length;if(e===void 0?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),arguments.length===1?n=o-e:n==null?n=0:n=Math.max(0,Math.min(n,o-e)),r===void 0&&(r=Bw),Zu(this)){var a=qu(this,{object:this.proxy,type:"splice",index:e,removedCount:n,added:r});if(!a)return Bw;n=a.removedCount,r=a.added}r=r.length===0?r:r.map(function(l){return i.enhancer(l,void 0)});var s=this.spliceItemsIntoValues(e,n,r);return(n!==0||r.length!==0)&&this.notifyArraySplice(e,r,s),this.dehanceValues(s)},t.prototype.spliceItemsIntoValues=function(e,n,r){var i;if(r.length<N7e)return(i=this.values).splice.apply(i,DN([e,n],r));var o=this.values.slice(e,e+n);return this.values=this.values.slice(0,e).concat(r,this.values.slice(e+n)),o},t.prototype.notifyArrayChildUpdate=function(e,n,r){var i=!this.owned&&Ga(),o=iu(this),a=o||i?{object:this.proxy,type:"update",index:e,newValue:n,oldValue:r}:null;this.atom.reportChanged(),o&&ou(this,a)},t.prototype.notifyArraySplice=function(e,n,r){var i=!this.owned&&Ga(),o=iu(this),a=o||i?{object:this.proxy,type:"splice",index:e,removed:r,added:n,removedCount:r.length,addedCount:n.length}:null;this.atom.reportChanged(),o&&ou(this,a)},t}(),Ic={intercept:function(t){return this[Rn].intercept(t)},observe:function(t,e){e===void 0&&(e=!1);var n=this[Rn];return n.observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[Rn];return e.spliceWithArray(0,e.values.length,t)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=this[Rn];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray(t);case 2:return i.spliceWithArray(t,e)}return i.spliceWithArray(t,e,n)},spliceWithArray:function(t,e,n){var r=this[Rn];return r.spliceWithArray(t,e,n)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this[Rn];return n.spliceWithArray(n.values.length,0,t),n.values.length},pop:function(){return this.splice(Math.max(this[Rn].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this[Rn];return n.spliceWithArray(0,0,t),n.values.length},reverse:function(){var t=this.slice();return t.reverse.apply(t,arguments)},sort:function(t){var e=this.slice();return e.sort.apply(e,arguments)},remove:function(t){var e=this[Rn],n=e.dehanceValues(e.values).indexOf(t);return n>-1?(this.splice(n,1),!0):!1},get:function(t){var e=this[Rn];if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(t,e){var n=this[Rn],r=n.values;if(t<r.length){hm(n.atom);var i=r[t];if(Zu(n)){var o=qu(n,{type:"update",object:n.proxy,index:t,newValue:e});if(!o)return;e=o.newValue}e=n.enhancer(e,i);var a=e!==i;a&&(r[t]=e,n.notifyArrayChildUpdate(t,e,i))}else if(t===r.length)n.spliceWithArray(t,0,[e]);else throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+r.length)}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(t){typeof Array.prototype[t]=="function"&&(Ic[t]=function(){var e=this[Rn];e.atom.reportObserved();var n=e.dehanceValues(e.values);return n[t].apply(n,arguments)})});["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(t){typeof Array.prototype[t]=="function"&&(Ic[t]=function(e,n){var r=this,i=this[Rn];i.atom.reportObserved();var o=i.dehanceValues(i.values);return o[t](function(a,s){return e.call(n,a,s,r)},n)})});["reduce","reduceRight"].forEach(function(t){Ic[t]=function(){var e=this,n=this[Rn];n.atom.reportObserved();var r=arguments[0];return arguments[0]=function(i,o,a){return o=n.dehanceValue(o),r(i,o,a,e)},n.values[t].apply(n.values,arguments)}});var I7e=zf("ObservableArrayAdministration",IZ);function gc(t){return RN(t)&&I7e(t[Rn])}var w8,B7e={},FN=function(){function t(e,n,r){if(n===void 0&&(n=Vb),r===void 0&&(r="ObservableMap@"+rs()),this.enhancer=n,this.name=r,this[w8]=B7e,this._keysAtom=NN(this.name+".keys()"),this[Symbol.toStringTag]="Map",typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return t.prototype._has=function(e){return this._data.has(e)},t.prototype.has=function(e){var n=this;if(!ln.trackingDerivation)return this._has(e);var r=this._hasMap.get(e);if(!r){var i=r=new qh(this._has(e),gC,this.name+"."+Xd(e)+"?",!1);this._hasMap.set(e,i),AZ(i,function(){return n._hasMap.delete(e)})}return r.get()},t.prototype.set=function(e,n){var r=this._has(e);if(Zu(this)){var i=qu(this,{type:r?"update":"add",object:this,newValue:n,name:e});if(!i)return this;n=i.newValue}return r?this._updateValue(e,n):this._addValue(e,n),this},t.prototype.delete=function(e){var n=this;if(hm(this._keysAtom),Zu(this)){var r=qu(this,{type:"delete",object:this,name:e});if(!r)return!1}if(this._has(e)){var i=Ga(),o=iu(this),r=o||i?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return Zl(function(){n._keysAtom.reportChanged(),n._updateHasMapEntry(e,!1);var s=n._data.get(e);s.setNewValue(void 0),n._data.delete(e)}),o&&ou(this,r),!0}return!1},t.prototype._updateHasMapEntry=function(e,n){var r=this._hasMap.get(e);r&&r.setNewValue(n)},t.prototype._updateValue=function(e,n){var r=this._data.get(e);if(n=r.prepareNewValue(n),n!==ln.UNCHANGED){var i=Ga(),o=iu(this),a=o||i?{type:"update",object:this,oldValue:r.value,name:e,newValue:n}:null;r.setNewValue(n),o&&ou(this,a)}},t.prototype._addValue=function(e,n){var r=this;hm(this._keysAtom),Zl(function(){var s=new qh(n,r.enhancer,r.name+"."+Xd(e),!1);r._data.set(e,s),n=s.value,r._updateHasMapEntry(e,!0),r._keysAtom.reportChanged()});var i=Ga(),o=iu(this),a=o||i?{type:"add",object:this,name:e,newValue:n}:null;o&&ou(this,a)},t.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var e=this,n=this.keys();return Hw({next:function(){var r=n.next(),i=r.done,o=r.value;return{done:i,value:i?void 0:e.get(o)}}})},t.prototype.entries=function(){var e=this,n=this.keys();return Hw({next:function(){var r=n.next(),i=r.done,o=r.value;return{done:i,value:i?void 0:[o,e.get(o)]}}})},t.prototype[w8=Rn,Symbol.iterator]=function(){return this.entries()},t.prototype.forEach=function(e,n){var r,i;try{for(var o=Lu(this),a=o.next();!a.done;a=o.next()){var s=vg(a.value,2),l=s[0],u=s[1];e.call(n,u,l,this)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.merge=function(e){var n=this;return ls(e)&&(e=e.toJS()),Zl(function(){var r=vC(!0);try{Jm(e)?fZ(e).forEach(function(i){return n.set(i,e[i])}):Array.isArray(e)?e.forEach(function(i){var o=vg(i,2),a=o[0],s=o[1];return n.set(a,s)}):tv(e)?(e.constructor!==Map&&$r("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(i,o){return n.set(o,i)})):e!=null&&$r("Cannot initialize map from "+e)}finally{yC(r)}}),this},t.prototype.clear=function(){var e=this;Zl(function(){yZ(function(){var n,r;try{for(var i=Lu(e.keys()),o=i.next();!o.done;o=i.next()){var a=o.value;e.delete(a)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}})})},t.prototype.replace=function(e){var n=this;return Zl(function(){var r,i,o,a,s=NQe(e),l=new Map,u=!1;try{for(var c=Lu(n._data.keys()),d=c.next();!d.done;d=c.next()){var f=d.value;if(!s.has(f)){var h=n.delete(f);if(h)u=!0;else{var g=n._data.get(f);l.set(f,g)}}}}catch(T){r={error:T}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}try{for(var m=Lu(s.entries()),y=m.next();!y.done;y=m.next()){var b=vg(y.value,2),f=b[0],g=b[1],w=n._data.has(f);if(n.set(f,g),n._data.has(f)){var O=n._data.get(f);l.set(f,O),w||(u=!0)}}}catch(T){o={error:T}}finally{try{y&&!y.done&&(a=m.return)&&a.call(m)}finally{if(o)throw o.error}}if(!u)if(n._data.size!==l.size)n._keysAtom.reportChanged();else for(var x=n._data.keys(),S=l.keys(),C=x.next(),E=S.next();!C.done;){if(C.value!==E.value){n._keysAtom.reportChanged();break}C=x.next(),E=S.next()}n._data=l}),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var e,n,r={};try{for(var i=Lu(this),o=i.next();!o.done;o=i.next()){var a=vg(o.value,2),s=a[0],l=a[1];r[typeof s=="symbol"?s:Xd(s)]=l}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(n){return Xd(n)+": "+(""+e.get(n))}).join(", ")+" }]"},t.prototype.observe=function(e,n){return Qb(this,e)},t.prototype.intercept=function(e){return jb(this,e)},t}(),ls=zf("ObservableMap",FN),x8,F7e={},BZ=function(){function t(e,n,r){if(n===void 0&&(n=Vb),r===void 0&&(r="ObservableSet@"+rs()),this.name=r,this[x8]=F7e,this._data=new Set,this._atom=NN(this.name),this[Symbol.toStringTag]="Set",typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(i,o){return n(i,o,r)},e&&this.replace(e)}return t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.clear=function(){var e=this;Zl(function(){yZ(function(){var n,r;try{for(var i=Lu(e._data.values()),o=i.next();!o.done;o=i.next()){var a=o.value;e.delete(a)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}})})},t.prototype.forEach=function(e,n){var r,i;try{for(var o=Lu(this),a=o.next();!a.done;a=o.next()){var s=a.value;e.call(n,s,s,this)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(e){var n=this;if(hm(this._atom),Zu(this)){var r=qu(this,{type:"add",object:this,newValue:e});if(!r)return this}if(!this.has(e)){Zl(function(){n._data.add(n.enhancer(e,void 0)),n._atom.reportChanged()});var i=Ga(),o=iu(this),r=o||i?{type:"add",object:this,newValue:e}:null;o&&ou(this,r)}return this},t.prototype.delete=function(e){var n=this;if(Zu(this)){var r=qu(this,{type:"delete",object:this,oldValue:e});if(!r)return!1}if(this.has(e)){var i=Ga(),o=iu(this),r=o||i?{type:"delete",object:this,oldValue:e}:null;return Zl(function(){n._atom.reportChanged(),n._data.delete(e)}),o&&ou(this,r),!0}return!1},t.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},t.prototype.entries=function(){var e=0,n=Array.from(this.keys()),r=Array.from(this.values());return Hw({next:function(){var i=e;return e+=1,i<r.length?{value:[n[i],r[i]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var e=this,n=0,r=Array.from(this._data.values());return Hw({next:function(){return n<r.length?{value:e.dehanceValue(r[n++]),done:!1}:{done:!0}}})},t.prototype.replace=function(e){var n=this;return xl(e)&&(e=e.toJS()),Zl(function(){var r=vC(!0);try{Array.isArray(e)?(n.clear(),e.forEach(function(i){return n.add(i)})):Fb(e)?(n.clear(),e.forEach(function(i){return n.add(i)})):e!=null&&$r("Cannot initialize set from "+e)}finally{yC(r)}}),this},t.prototype.observe=function(e,n){return Qb(this,e)},t.prototype.intercept=function(e){return jb(this,e)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[x8=Rn,Symbol.iterator]=function(){return this.values()},t}(),xl=zf("ObservableSet",BZ),FZ=function(){function t(e,n,r,i){n===void 0&&(n=new Map),this.target=e,this.values=n,this.name=r,this.defaultEnhancer=i,this.keysAtom=new nv(r+".keys")}return t.prototype.read=function(e){return this.values.get(e).get()},t.prototype.write=function(e,n){var r=this.target,i=this.values.get(e);if(i instanceof pm){i.set(n);return}if(Zu(this)){var o=qu(this,{type:"update",object:this.proxy||r,name:e,newValue:n});if(!o)return;n=o.newValue}if(n=i.prepareNewValue(n),n!==ln.UNCHANGED){var a=iu(this),s=Ga(),o=a||s?{type:"update",object:this.proxy||r,oldValue:i.value,name:e,newValue:n}:null;i.setNewValue(n),a&&ou(this,o)}},t.prototype.has=function(e){var n=this.pendingKeys||(this.pendingKeys=new Map),r=n.get(e);if(r)return r.get();var i=!!this.values.get(e);return r=new qh(i,gC,this.name+"."+Xd(e)+"?",!1),n.set(e,r),r.get()},t.prototype.addObservableProp=function(e,n,r){r===void 0&&(r=this.defaultEnhancer);var i=this.target;if(Zu(this)){var o=qu(this,{object:this.proxy||i,name:e,type:"add",newValue:n});if(!o)return;n=o.newValue}var a=new qh(n,r,this.name+"."+Xd(e),!1);this.values.set(e,a),n=a.value,Object.defineProperty(i,e,V7e(e)),this.notifyPropertyAddition(e,n)},t.prototype.addComputedProp=function(e,n,r){var i=this.target;r.name=r.name||this.name+"."+Xd(n),this.values.set(n,new pm(r)),(e===i||LQe(e,n))&&Object.defineProperty(e,n,j7e(n))},t.prototype.remove=function(e){if(!!this.values.has(e)){var n=this.target;if(Zu(this)){var r=qu(this,{object:this.proxy||n,name:e,type:"remove"});if(!r)return}try{nu();var i=iu(this),o=Ga(),a=this.values.get(e),s=a&&a.get();if(a&&a.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var l=this.pendingKeys.get(e);l&&l.set(!1)}delete this.target[e];var r=i||o?{type:"remove",object:this.proxy||n,oldValue:s,name:e}:null;i&&ou(this,r)}finally{ru()}}},t.prototype.illegalAccess=function(e,n){console.warn("Property '"+n+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(e,n){return Qb(this,e)},t.prototype.intercept=function(e){return jb(this,e)},t.prototype.notifyPropertyAddition=function(e,n){var r=iu(this),i=Ga(),o=r||i?{type:"add",object:this.proxy||this.target,name:e,newValue:n}:null;if(r&&ou(this,o),this.pendingKeys){var a=this.pendingKeys.get(e);a&&a.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var e,n;this.keysAtom.reportObserved();var r=[];try{for(var i=Lu(this.values),o=i.next();!o.done;o=i.next()){var a=vg(o.value,2),s=a[0],l=a[1];l instanceof qh&&r.push(s)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},t}();function VN(t,e,n){if(e===void 0&&(e=""),n===void 0&&(n=Vb),Object.prototype.hasOwnProperty.call(t,Rn))return t[Rn];Jm(t)||(e=(t.constructor.name||"ObservableObject")+"@"+rs()),e||(e="ObservableObject@"+rs());var r=new FZ(t,new Map,Xd(e),n);return ev(t,Rn,r),r}var S8=Object.create(null),C8=Object.create(null);function V7e(t){return S8[t]||(S8[t]={configurable:!0,enumerable:!0,get:function(){return this[Rn].read(t)},set:function(e){this[Rn].write(t,e)}})}function E8(t){var e=t[Rn];return e||(lp(t),t[Rn])}function j7e(t){return C8[t]||(C8[t]={configurable:ln.computedConfigurable,enumerable:!1,get:function(){return E8(this).read(t)},set:function(e){E8(this).write(t,e)}})}var Q7e=zf("ObservableObjectAdministration",FZ);function Sl(t){return RN(t)?(lp(t),Q7e(t[Rn])):!1}function ed(t,e){if(typeof t=="object"&&t!==null){if(gc(t))return e!==void 0&&$r(!1),t[Rn].atom;if(xl(t))return t[Rn];if(ls(t)){var n=t;if(e===void 0)return n._keysAtom;var r=n._data.get(e)||n._hasMap.get(e);return r||$r(!1),r}if(lp(t),e&&!t[Rn]&&t[e],Sl(t)){if(!e)return $r(!1);var r=t[Rn].values.get(e);return r||$r(!1),r}if($N(t)||gm(t)||Ww(t))return t}else if(typeof t=="function"&&Ww(t[Rn]))return t[Rn];return $r(!1)}function zb(t,e){if(t||$r("Expecting some object"),e!==void 0)return zb(ed(t,e));if($N(t)||gm(t)||Ww(t)||ls(t)||xl(t))return t;if(lp(t),t[Rn])return t[Rn];$r(!1)}function z7e(t,e){var n;return e!==void 0?n=ed(t,e):Sl(t)||ls(t)||xl(t)?n=zb(t):n=ed(t),n.name}var T8=Object.prototype.toString;function jN(t,e,n){return n===void 0&&(n=-1),DP(t,e,n)}function DP(t,e,n,r,i){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var o=typeof t;if(o!=="function"&&o!=="object"&&typeof e!="object")return!1;var a=T8.call(t);if(a!==T8.call(e))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":n>=0&&n++;break}t=k8(t),e=k8(e);var s=a==="[object Array]";if(!s){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(typeof l=="function"&&l instanceof l&&typeof u=="function"&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),r=r||[],i=i||[];for(var c=r.length;c--;)if(r[c]===t)return i[c]===e;if(r.push(t),i.push(e),s){if(c=t.length,c!==e.length)return!1;for(;c--;)if(!DP(t[c],e[c],n-1,r,i))return!1}else{var d=Object.keys(t),f=void 0;if(c=d.length,Object.keys(e).length!==c)return!1;for(;c--;)if(f=d[c],!(W7e(e,f)&&DP(t[f],e[f],n-1,r,i)))return!1}return r.pop(),i.pop(),!0}function k8(t){return gc(t)?t.slice():tv(t)||ls(t)||Fb(t)||xl(t)?Array.from(t.entries()):t}function W7e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Hw(t){return t[Symbol.iterator]=H7e,t}function H7e(){return this}if(typeof Proxy=="undefined"||typeof Symbol=="undefined")throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");(function(){function t(){}if(t.name!=="testCodeMinification"&&!1)var e})();typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:f7e,extras:{getDebugName:z7e},$mobx:Rn});function U7e(t){return!(t.prototype&&t.prototype.render)&&!ur.isPrototypeOf(t)}function VZ(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.prefix,r=n===void 0?"":n,i=e.suffix,o=i===void 0?"":i,a=t.displayName||t.name||t.constructor&&t.constructor.name||"<component>";return r+a+o}var P8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jZ=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},QZ=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),zZ=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},WZ=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t},A8=console;function X7e(t){var e=RP().allowStateChanges;return RP().allowStateChanges=t,e}function Z7e(t){RP().allowStateChanges=t}function q7e(t,e,n,r,i){var o=X7e(t),a=void 0;try{a=e(n,r,i)}finally{Z7e(o)}return a}function M8(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=t[e],i=HZ[e],o=r?n===!0?function(){i.apply(this,arguments),r.apply(this,arguments)}:function(){r.apply(this,arguments),i.apply(this,arguments)}:i;t[e]=o}function R8(t,e){if(t==null||e==null||(typeof t=="undefined"?"undefined":P8(t))!=="object"||(typeof e=="undefined"?"undefined":P8(e))!=="object")return t!==e;var n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(var r=void 0,i=n.length-1;r=n[i];i--)if(e[r]!==t[r])return!0;return!1}var HZ={componentWillMount:function(){var e=this,n=VZ(this),r=!1,i=!1;function o(d){var f=this[d],h=NN("reactive "+d);Object.defineProperty(this,d,{configurable:!0,enumerable:!0,get:function(){return h.reportObserved(),f},set:function(m){!i&&R8(f,m)?(f=m,r=!0,h.reportChanged(),r=!1):f=m}})}o.call(this,"props"),o.call(this,"state");var a=this.render.bind(this),s=null,l=!1,u=function(){return s=new $0(n+".render()",function(){if(!l&&(l=!0,typeof e.componentWillReact=="function"&&e.componentWillReact(),e.__$mobxIsUnmounted!==!0)){var f=!0;try{i=!0,r||ur.prototype.forceUpdate.call(e),f=!1}finally{i=!1,f&&s.dispose()}}}),s.reactComponent=e,c.$mobx=s,e.render=c,c(e.props,e.state,e.context)},c=function(f,h,g){l=!1;var m=void 0,y=void 0;if(s.track(function(){try{y=q7e(!1,a,f,h,g)}catch(b){m=b}}),m)throw m;return y};this.render=u},componentWillUnmount:function(){this.render.$mobx&&this.render.$mobx.dispose(),this.__$mobxIsUnmounted=!0},componentDidMount:function(){},componentDidUpdate:function(){},shouldComponentUpdate:function(e,n){return this.state!==n?!0:R8(this.props,e)}};function QN(t){if(arguments.length>1&&A8.warn('Mobx observer: Using observer to inject stores is not supported. Use `@connect(["store1", "store2"]) ComponentClass instead or preferably, use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))``'),t.isMobxInjector===!0&&A8.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),U7e(t)){var e,n;return QN((n=e=function(i){zZ(o,i);function o(){return jZ(this,o),WZ(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return QZ(o,[{key:"render",value:function(){return t.call(this,this.props,this.context)}}]),o}(ur),e.displayName=VZ(t),n))}if(!t)throw new Error("Please pass a valid component to 'observer'");var r=t.prototype||t;return Y7e(r),t.isMobXReactObserver=!0,t}function Y7e(t){M8(t,"componentWillMount",!0),M8(t,"componentDidMount"),t.shouldComponentUpdate||(t.shouldComponentUpdate=HZ.shouldComponentUpdate)}var G7e=QN(function(t){var e=t.children;return e[0]()});G7e.displayName="Observer";var K7e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function J7e(t,e){return e={exports:{}},t(e,e.exports),e.exports}J7e(function(t,e){(function(n,r){t.exports=r()})(K7e,function(){var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i=Object.defineProperty,o=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,u=l&&l(Object);return function c(d,f,h){if(typeof f!="string"){if(u){var g=l(f);g&&g!==u&&c(d,g,h)}var m=o(f);a&&(m=m.concat(a(f)));for(var y=0;y<m.length;++y){var b=m[y];if(!n[b]&&!r[b]&&(!h||!h[b])){var w=s(f,b);try{i(d,b,w)}catch{}}}return d}return d}})});var $8={children:!0,key:!0,ref:!0},N8=console;(function(t){zZ(e,t);function e(){return jZ(this,e),WZ(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return QZ(e,[{key:"render",value:function(r){var i=r.children;return i.length>1?Kt("div",null," ",i," "):i[0]}},{key:"getChildContext",value:function(){var r={},i=this.context.mobxStores;if(i)for(var o in i)r[o]=i[o];for(var a in this.props)!$8[a]&&a!=="suppressChangedStoreWarning"&&(r[a]=this.props[a]);return{mobxStores:r}}},{key:"componentWillReceiveProps",value:function(r){if(Object.keys(r).length!==Object.keys(this.props).length&&N8.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"),!r.suppressChangedStoreWarning)for(var i in r)!$8[i]&&this.props[i]!==r[i]&&N8.warn("MobX Provider: Provided store '"+i+"' has changed. Please avoid replacing stores as the change might not propagate to all children")}}]),e})(ur);if(!ur)throw new Error("mobx-preact requires Preact to be available");var Ru,XT,D8,UZ=[],Mo=tr,L8=Mo.__b,I8=Mo.__r,B8=Mo.diffed,F8=Mo.__c,V8=Mo.unmount,j8=Mo.__;function e9e(){for(var t;t=UZ.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(F1),t.__H.__h.forEach(LP),t.__H.__h=[]}catch(e){t.__H.__h=[],Mo.__e(e,t.__v)}}Mo.__b=function(t){Ru=null,L8&&L8(t)},Mo.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),j8&&j8(t,e)},Mo.__r=function(t){I8&&I8(t);var e=(Ru=t.__c).__H;e&&(XT===Ru?(e.__h=[],Ru.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(F1),e.__h.forEach(LP),e.__h=[])),XT=Ru},Mo.diffed=function(t){B8&&B8(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(UZ.push(e)!==1&&D8===Mo.requestAnimationFrame||((D8=Mo.requestAnimationFrame)||t9e)(e9e)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),XT=Ru=null},Mo.__c=function(t,e){e.some(function(n){try{n.__h.forEach(F1),n.__h=n.__h.filter(function(r){return!r.__||LP(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Mo.__e(r,n.__v)}}),F8&&F8(t,e)},Mo.unmount=function(t){V8&&V8(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{F1(r)}catch(i){e=i}}),n.__H=void 0,e&&Mo.__e(e,n.__v))};var Q8=typeof requestAnimationFrame=="function";function t9e(t){var e,n=function(){clearTimeout(r),Q8&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Q8&&(e=requestAnimationFrame(n))}function F1(t){var e=Ru,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Ru=e}function LP(t){var e=Ru;t.__c=t.__(),Ru=e}function n9e(t,e){for(var n in e)t[n]=e[n];return t}function z8(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function W8(t,e){this.props=t,this.context=e}(W8.prototype=new ur).isPureReactComponent=!0,W8.prototype.shouldComponentUpdate=function(t,e){return z8(this.props,t)||z8(this.state,e)};var H8=tr.__b;tr.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),H8&&H8(t)};var r9e=tr.__e;tr.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}r9e(t,e,n,r)};var U8=tr.unmount;function XZ(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=n9e({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return XZ(r,e,n)})),t}function ZZ(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return ZZ(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function ZT(){this.__u=0,this.o=null,this.__b=null}function qZ(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function xO(){this.i=null,this.l=null}tr.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),U8&&U8(t)},(ZT.prototype=new ur).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=qZ(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=ZZ(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},ZT.prototype.componentWillUnmount=function(){this.o=[]},ZT.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=XZ(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&Kt(cm,null,t.fallback);return i&&(i.__u&=-33),[Kt(cm,null,e.__a?null:t.children),i]};var X8=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};(xO.prototype=new ur).__a=function(t){var e=this,n=qZ(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),X8(e,t,r)):i()};n?n(o):o()}},xO.prototype.render=function(t){this.i=null,this.l=new Map;var e=Iw(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},xO.prototype.componentDidUpdate=xO.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){X8(t,n,e)})};var i9e=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,o9e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,a9e=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,s9e=/[A-Z0-9]/g,l9e=typeof document!="undefined",u9e=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Z8(t,e,n){return e.__k==null&&(e.textContent=""),MQe(t,e),typeof n=="function"&&n(),t?t.__c:null}ur.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(ur.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var q8=tr.event;function c9e(){}function d9e(){return this.cancelBubble}function f9e(){return this.defaultPrevented}tr.event=function(t){return q8&&(t=q8(t)),t.persist=c9e,t.isPropagationStopped=d9e,t.isDefaultPrevented=f9e,t.nativeEvent=t};var h9e={enumerable:!1,configurable:!0,get:function(){return this.class}},Y8=tr.vnode;tr.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||l9e&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||u9e(n.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":a9e.test(a)&&(a=l):l=a="oninput":o&&o9e.test(a)?a=a.replace(s9e,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Iw(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Iw(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",h9e)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=i9e,Y8&&Y8(t)};var G8=tr.__r;tr.__r=function(t){G8&&G8(t),t.__c};var K8=tr.diffed;tr.diffed=function(t){K8&&K8(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value)};var p9e=0;function rt(t,e,n,r,i,o){e||(e={});var a,s,l=e;if("ref"in l)for(s in l={},e)s=="ref"?a=e[s]:l[s]=e[s];var u={type:t,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--p9e,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(a=t.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return tr.vnode&&tr.vnode(u),u}var g9e=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},N0;(function(t){function e(n){var r=g9e(n,[]),i=n.container;if(!i)throw new Error("Ensure the container of LogicFlow is specified and valid.");return Nr({},t.defaults,r)}t.get=e})(N0||(N0={}));(function(t){t.defaults={background:!1,grid:!1,textEdit:!0,snapline:!0,outline:!1,disabledTools:[]}})(N0||(N0={}));var J8={node:!1,edge:!1},m9e={node:!0,edge:!0},v9e=function(t){return!t||typeof t=="boolean"?Nn(t===!0?m9e:J8):mf(Nn(J8),t)},y9e=function(){return Kr(window,"navigator.userAgent","").match(/MSIE|Trident/)!==null};function ra(t){try{return JSON.parse(JSON.stringify(t))}catch{return t}}var SO=200,b9e=9999,_9e=10,Er;(function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"})(Er||(Er={}));var xi;(function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"})(xi||(xi={}));var qn;(function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.CUSTOM_HTML_NODE="custom-html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"})(qn||(qn={}));var cn;(function(t){t.ELEMENT_CLICK="element:click",t.NODE_ADD="node:add",t.NODE_DELETE="node:delete",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_GROUP_COPY="node:group-copy-add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.NODE_ROTATE="node:rotate",t.NODE_RESIZE="node:resize",t.NODE_FOCUS="node:focus",t.NODE_BLUR="node:blur",t.NODE_PROPERTIES_CHANGE="node:properties-change",t.NODE_PROPERTIES_DELETE="node:properties-delete",t.EDGE_ADD="edge:add",t.EDGE_DELETE="edge:delete",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_FOCUS="edge:focus",t.EDGE_BLUR="edge:blur",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.ANCHOR_DRAGEND="anchor:dragend",t.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",t.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",t.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",t.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",t.ADJUST_POINT_DRAG="adjustPoint:drag",t.ADJUST_POINT_DROP="adjustPoint:drop",t.ADJUST_POINT_DRAGEND="adjustPoint:dragend",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.TEXT_MOUSEDOWN="text:mousedown",t.TEXT_DRAGSTART="text:dragstart",t.TEXT_DRAG="text:drag",t.TEXT_DROP="text:drop",t.TEXT_CLICK="text:click",t.TEXT_DBCLICK="text:dbclick",t.TEXT_BLUR="text:blur",t.TEXT_MOUSEMOVE="text:mousemove",t.TEXT_MOUSEUP="text:mouseup",t.TEXT_FOCUS="text:focus",t.TEXT_ADD="text:add",t.TEXT_UPDATE="text:update",t.TEXT_CLEAR="text:clear",t.LABEL_MOUSEDOWN="label:mousedown",t.LABEL_DRAGSTART="label:dragstart",t.LABEL_DRAG="label:drag",t.LABEL_DROP="label:drop",t.LABEL_CLICK="label:click",t.LABEL_DBCLICK="label:dbclick",t.LABEL_BLUR="label:blur",t.LABEL_MOUSEMOVE="label:mousemove",t.LABEL_MOUSEUP="label:mouseup",t.LABEL_FOCUS="label:focus",t.LABEL_ADD="label:add",t.LABEL_UPDATE="label:update",t.LABEL_CLEAR="label:clear",t.LABEL_DELETE="label:delete",t.LABEL_SHOULD_ADD="label:should-add",t.LABEL_BATCH_ADD="label:batch-add",t.LABEL_SHOULD_UPDATE="label:should-update",t.LABEL_SHOULD_DELETE="label:should-delete",t.LABEL_BATCH_DELETE="label:batch-delete",t.LABEL_NOT_ALLOWED_ADD="label:not-allowed-add",t.HISTORY_CHANGE="history:change",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered",t.GRAPH_UPDATED="graph:updated"})(cn||(cn={}));var ql;(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"})(ql||(ql={}));var di;(function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"})(di||(di={}));var gl;(function(t){t.TEXT="text",t.LABEL="label"})(gl||(gl={}));var O9e=0,Al=function(){function t(e){var n=e.onDragStart,r=n===void 0?kg:n,i=e.onDragging,o=i===void 0?kg:i,a=e.onDragEnd,s=a===void 0?kg:a,l=e.eventType,u=l===void 0?"":l,c=e.eventCenter,d=e.step,f=d===void 0?1:d,h=e.isStopPropagation,g=h===void 0?!0:h,m=e.model,y=e.data,b=this;this.isDragging=!1,this.isStartDragging=!1,this.startX=0,this.startY=0,this.sumDeltaX=0,this.sumDeltaY=0,this.handleMouseDown=function(w){var O,x,S=window==null?void 0:window.document;if(w.button===O9e){b.isStopPropagation&&w.stopPropagation(),b.isStartDragging=!0,b.startX=w.clientX,b.startY=w.clientY,S.addEventListener("mousemove",b.handleMouseMove,!1),S.addEventListener("mouseup",b.handleMouseUp,!1);var C=(O=b.model)===null||O===void 0?void 0:O.getData();(x=b.eventCenter)===null||x===void 0||x.emit(cn["".concat(b.eventType,"_MOUSEDOWN")],{e:w,data:b.data||C}),b.startTime=new Date().getTime()}},this.handleMouseMove=function(w){var O,x;if(b.isStopPropagation&&w.stopPropagation(),!!b.isStartDragging&&(b.sumDeltaX+=w.clientX-b.startX,b.sumDeltaY+=w.clientY-b.startY,b.startX=w.clientX,b.startY=w.clientY,b.step<=1||Math.abs(b.sumDeltaX)>b.step||Math.abs(b.sumDeltaY)>b.step)){var S=b.sumDeltaX%b.step,C=b.sumDeltaY%b.step,E=b.sumDeltaX-S,T=b.sumDeltaY-C;b.sumDeltaX=S,b.sumDeltaY=C;var P=(O=b.model)===null||O===void 0?void 0:O.getData();b.isDragging||((x=b.eventCenter)===null||x===void 0||x.emit(cn["".concat(b.eventType,"_DRAGSTART")],{e:w,data:b.data||P}),b.onDragStart({event:w})),b.isDragging=!0,Promise.resolve().then(function(){var A,D;b.onDragging({deltaX:E,deltaY:T,event:w}),(A=b.eventCenter)===null||A===void 0||A.emit(cn["".concat(b.eventType,"_MOUSEMOVE")],{deltaX:E,deltaY:T,e:w,data:b.data||P}),(D=b.eventCenter)===null||D===void 0||D.emit(cn["".concat(b.eventType,"_DRAG")],{e:w,data:b.data||P})})}},this.handleMouseUp=function(w){var O=window.document;b.isStartDragging=!1,b.isStopPropagation&&w.stopPropagation(),Promise.resolve().then(function(){var x,S,C;O.removeEventListener("mousemove",b.handleMouseMove,!1),O.removeEventListener("mouseup",b.handleMouseUp,!1);var E=(x=b.model)===null||x===void 0?void 0:x.getData();(S=b.eventCenter)===null||S===void 0||S.emit(cn["".concat(b.eventType,"_MOUSEUP")],{e:w,data:b.data||E}),b.isDragging&&(b.isDragging=!1,b.onDragEnd({event:w}),(C=b.eventCenter)===null||C===void 0||C.emit(cn["".concat(b.eventType,"_DROP")],{e:w,data:b.data||E}))})},this.cancelDrag=function(){var w=window==null?void 0:window.document;w.removeEventListener("mousemove",b.handleMouseMove,!1),w.removeEventListener("mouseup",b.handleMouseUp,!1),b.onDragEnd({event:void 0}),b.isDragging=!1},this.destroy=function(){b.isStartDragging&&b.cancelDrag()},this.onDragStart=r,this.onDragging=o,this.onDragEnd=s,this.step=f,this.isStopPropagation=g,this.eventType=u,this.eventCenter=c,this.model=m,this.data=y}return t.prototype.setStep=function(e){this.step=e},t.prototype.setModel=function(e){this.model=e},t}(),w9e=function(t){var e=t.x,n=t.y,r=t.width,i=t.height;return{x:e-r/2,y:n-i/2,x1:e+r/2,y1:n+i/2}},x9e=function(t){var e=t.startPoint,n=t.endPoint,r=(e.x+n.x)/2,i=(e.y+n.y)/2,o=Math.abs(e.x-n.x)+10,a=Math.abs(e.y-n.y)+10;return{x:r-o/2,y:i-a/2,x1:r+o/2,y1:i+a/2}},S9e=function(t){var e=t.points,n=up(e),r=I0(n,8),i=r.x,o=r.y,a=r.width,s=r.height;return{x:i-a/2,y:o-s/2,x1:i+a/2,y1:o+s/2}},C9e=function(t){var e=t.path,n=zN(e),r=I0(n,8),i=r.x,o=r.y,a=r.width,s=r.height;return{x:i-a/2,y:o-s/2,x1:i+a/2,y1:o+s/2}},E9e=function(t){if(t.modelType===qn.LINE_EDGE)return x9e(t);if(t.modelType===qn.POLYLINE_EDGE)return S9e(t);if(t.modelType===qn.BEZIER_EDGE)return C9e(t)},T9e=function(t,e,n,r){var i=(e.y-t.y)*(r.x-n.x)-(t.x-e.x)*(n.y-r.y);if(i===0)return!1;var o=((e.x-t.x)*(r.x-n.x)*(n.y-t.y)+(e.y-t.y)*(r.x-n.x)*t.x-(r.y-n.y)*(e.x-t.x)*n.x)/i,a=-((e.y-t.y)*(r.y-n.y)*(n.x-t.x)+(e.x-t.x)*(r.y-n.y)*t.y-(r.x-n.x)*(e.y-t.y)*n.y)/i;return(o-t.x)*(o-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(o-n.x)*(o-r.x)<=0&&(a-n.y)*(a-r.y)<=0?{x:o,y:a}:!1},D0=function(t,e,n){var r=t.x,i=t.y,o=e.x,a=e.y,s=n.x,l=n.y,u=(l-a)/(s-o),c=a-u*o;return(r>=o&&r<=s||r<=o&&r>=s)&&(i>=a&&i<=l||i<=a&&i>=l)&&Math.abs(i-u*r-c)<Number.EPSILON},L0=function(t){var e=t.start,n=t.end,r=t.offset,i=t.verticalLength,o=t.type,a={leftX:0,leftY:0,rightX:0,rightY:0},s=Math.atan((n.y-e.y)/(n.x-e.x)),l=Math.atan(r/i),u=Math.sqrt(i*i+r*r);return o==="start"?n.x>=e.x?(a.leftX=e.x+u*Math.sin(s+l),a.leftY=e.y-u*Math.cos(s+l),a.rightX=e.x-u*Math.sin(s-l),a.rightY=e.y+u*Math.cos(s-l)):(a.leftX=e.x-u*Math.sin(s+l),a.leftY=e.y+u*Math.cos(s+l),a.rightX=e.x+u*Math.sin(s-l),a.rightY=e.y-u*Math.cos(s-l)):o==="end"&&(n.x>=e.x?(a.leftX=n.x+u*Math.sin(s-l),a.leftY=n.y-u*Math.cos(s-l),a.rightX=n.x-u*Math.sin(s+l),a.rightY=n.y+u*Math.cos(s+l)):(a.leftX=n.x-u*Math.sin(s-l),a.leftY=n.y+u*Math.cos(s-l),a.rightX=n.x+u*Math.sin(s+l),a.rightY=n.y-u*Math.cos(s+l))),a},yg=globalThis&&globalThis.__assign||function(){return yg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},yg.apply(this,arguments)},al=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Zd=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},k9e=function(t,e){return Math.abs(t.centerX-e.centerX)*2<t.width+e.width&&Math.abs(t.centerY-e.centerY)*2<t.height+e.height},IP=function(t){var e=[],n={};return t.forEach(function(r){var i="".concat(r.x,"-").concat(r.y);r.id=i,n[i]=r}),Object.keys(n).forEach(function(r){e.push(n[r])}),e},Uw=function(t,e){return t.width===0&&t.height===0?t:{x:t.x,y:t.y,centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},P9e=function(t,e){var n=Math.abs(t.x-e.centerX),r=Math.abs(t.y-e.centerY);return n/e.width>r/e.height?di.HORIZONTAL:di.VERTICAL},Xw=function(t,e,n){var r=P9e(n,e);return r===di.HORIZONTAL?{x:n.x>t.centerX?t.maxX:t.minX,y:n.y}:{x:n.x,y:n.y>t.centerY?t.maxY:t.minY}},e6=function(t,e){var n=Math.min(t.minX,e.minX),r=Math.min(t.minY,e.minY),i=Math.max(t.maxX,e.maxX),o=Math.max(t.maxY,e.maxY);return{x:(n+i)/2,y:(r+o)/2,centerX:(n+i)/2,centerY:(r+o)/2,minX:n,minY:r,maxX:i,maxY:o,height:o-r,width:i-n}},I0=function(t,e){t===void 0&&(t=[]);var n=[],r=[];t.forEach(function(c){n.push(c.x),r.push(c.y)});var i=Math.min.apply(Math,Zd([],al(n),!1)),o=Math.max.apply(Math,Zd([],al(n),!1)),a=Math.min.apply(Math,Zd([],al(r),!1)),s=Math.max.apply(Math,Zd([],al(r),!1)),l=o-i,u=s-a;return e&&(l+=e,u+=e),{centerX:(i+o)/2,centerY:(a+s)/2,maxX:o,maxY:s,minX:i,minY:a,x:(i+o)/2,y:(a+s)/2,height:u,width:l}},Zw=function(t){var e=t.minX,n=t.minY,r=t.maxX,i=t.maxY;return[{x:e,y:n},{x:r,y:n},{x:r,y:i},{x:e,y:i}]},CO=function(t,e){var n=t.x,r=t.y;return n<e.minX||n>e.maxX||r<e.minY||r>e.maxY},A9e=function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},M9e=function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},R9e=function(t,e){return Zd(Zd([],al(A9e(t,e.x)),!1),al(M9e(t,e.y)),!1)},BP=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},$9e=function(t,e){var n=-2,r=0;return e.forEach(function(i){i&&(t.x===i.x&&(r+=n),t.y===i.y&&(r+=n))}),r},t6=function(t,e,n,r,i){return BP(t,e)+BP(t,n)+$9e(t,[e,n,r,i])},YZ=function(t,e,n,r,i){i||(i=0),t.unshift(e[r]),n[r]&&n[r]!==r&&i<=100&&YZ(t,e,n,n[r],i+1)},N9e=function(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)},sy=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=r.x-n.x,s=r.y-n.y,l=(-o*(t.x-n.x)+i*(t.y-n.y))/(-a*o+i*s),u=(a*(t.y-n.y)-s*(t.x-n.x))/(-a*o+i*s);return l>=0&&l<=1&&u>=0&&u<=1},n6=function(t,e,n){if(n.width===0&&n.height===0)return!1;var r=al(Zw(n),4),i=r[0],o=r[1],a=r[2],s=r[3];return sy(t,e,i,o)||sy(t,e,i,s)||sy(t,e,o,a)||sy(t,e,a,s)},D9e=function(t,e,n,r){var i=[];return t.forEach(function(o){o!==e&&(o.x===e.x||o.y===e.y)&&!n6(o,e,n)&&!n6(o,e,r)&&i.push(o)}),IP(i)},L9e=function(t,e,n,r,i,o,a){var s=[],l=[e],u={},c={},d={};e.id&&(c[e.id]=0,d[e.id]=t6(e,n,e));var f={};t.forEach(function(m){m.id&&(f[m.id]=m)});for(var h=function(){var m,y=1/0;if(l.forEach(function(w){w.id&&d[w.id]<y&&(y=d[w.id],m=w)}),m===n&&n.id){var b=[];return YZ(b,f,u,n.id),{value:b}}if(!m)return{value:[e,n]};N9e(l,m),s.push(m),D9e(t,m,r,i).forEach(function(w){if(s.indexOf(w)===-1&&(l.indexOf(w)===-1&&l.push(w),(m==null?void 0:m.id)&&(w==null?void 0:w.id))){var O=d[m.id]+BP(m,w);if(c[w.id]&&O>=c[w.id])return;u[w.id]=m.id,c[w.id]=O,d[w.id]=c[w.id]+t6(w,n,e,o,a)}})};l.length;){var g=h();if(typeof g=="object")return g.value}return[e,n]},r6=function(t){return ja(t)},GZ=function(t){for(var e=1;e<t.length-1;){var n=t[e-1],r=t[e],i=t[e+1];n.x===r.x&&r.x===i.x||n.y===r.y&&r.y===i.y?t.splice(e,1):e++}return t},i6=function(t,e,n,r,i){var o=r6(n),a=r6(r),s=Uw(o,i),l=Uw(a,i),u=Xw(s,o,t),c=Xw(l,a,e);if(k9e(s,l)){var d=B9e(t,e,u,c);return Zd(Zd([t,u],al(d),!1),[c,e],!1)}var f=I0([u,c]),h=e6(s,f),g=e6(l,f),m=[];m=m.concat(Zw(h)),m=m.concat(Zw(g));var y={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[f,h,g].forEach(function(w){m=m.concat(R9e(w,y).filter(function(O){return CO(O,s)&&CO(O,l)}))}),[{x:u.x,y:c.y},{x:c.x,y:u.y}].forEach(function(w){CO(w,s)&&CO(w,l)&&m.push(w)}),m.unshift(u),m.push(c),m=IP(m);var b=L9e(m,u,c,o,a,t,e);return b.unshift(t),b.push(e),b.length>2&&(b=GZ(b)),IP(b)},I9e=function(t){if(t.length===1){var e=al(t,1),n=e[0];return[n,n]}else{for(var r=t[0],i=t[1],o=Jl(r.x,r.y,i.x,i.y),a=1;a<t.length-1;a++){var s=t[a],l=t[a+1],u=Jl(s.x,s.y,l.x,l.y);u>o&&(o=u,r=s,i=l)}return[r,i]}},o6=function(t,e,n){var r=qd(t,n),i=qd(e,n);return r&&i},a6=function(t,e,n){var r=qd(t,n),i=qd(e,n),o=r&&i,a=r||i;return!o&&a},s6=function(t,e,n){for(var r=void 0,i=ja(n),o=Zw(i),a=0;a<o.length;a++){var s=sy(t,e,o[a],o[(a+1)%o.length]);s&&(r=[o[a],o[(a+1)%o.length]])}if(r)return T9e(t,e,r[0],r[1])},qw=function(t,e){var n=void 0;return t.x===e.x?n=di.VERTICAL:t.y===e.y&&(n=di.HORIZONTAL),n},up=function(t){var e=t.split(" "),n=[];return e&&e.forEach(function(r){var i=al(r.split(","),2),o=i[0],a=i[1];n.push({x:Number(o),y:Number(a)})}),n},B9e=function(t,e,n,r){var i=[],o=qw(t,n),a=qw(e,r);if(o===a)t.y===n.y?(i.push({x:n.x,y:(n.y+r.y)/2}),i.push({x:r.x,y:(n.y+r.y)/2})):(i.push({x:(n.x+r.x)/2,y:n.y}),i.push({x:(n.x+r.x)/2,y:r.y}));else{var s={x:n.x,y:r.y},l=D0(s,t,n),u=D0(s,e,r);if(l||u)s={x:r.x,y:n.y};else{var c=l6(s,t,n),d=l6(s,e,r);c&&d&&(s={x:r.x,y:n.y})}i.push(s)}return i},l6=function(t,e,n){return t.x===e.x&&t.x===n.x||t.y===e.y&&t.y===n.y},KZ=function(t){if(!t)return 0;for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);t.match(/[A-Z]/)?e+=1.5:r>=1&&r<=126||r>=65376&&r<=65439?e+=1:e+=2}return e},F9e=function(t){var e=t.start,n=t.end,r;if(e.x===n.x&&e.y===n.y)r="";else{var i={start:e,end:n,offset:10,verticalLength:5},o=L0(yg(yg({},i),{type:"start"})),a=L0(yg(yg({},i),{type:"end"}));r="M".concat(o.leftX," ").concat(o.leftY,`
- L`).concat(o.rightX," ").concat(o.rightY,`
- L`).concat(a.rightX," ").concat(a.rightY,`
- L`).concat(a.leftX," ").concat(a.leftY," z")}return{d:r,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},u6=function(t){var e=t.start,n=t.end,r=t.sourceNode,i=t.targetNode,o=t.offset,a=ja(r),s=ja(i),l=Uw(a,o),u=Uw(s,o),c=Xw(l,a,e),d=Xw(u,s,n);return{sNext:c,ePre:d}},zN=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(","),n=EO(e[0]),r=EO(e[1]),i=EO(e[2]),o=EO(e[3]);return[n,r,i,o]},EO=function(t){var e=al(t.replace(/(^\s*)/g,"").split(" "),2),n=e[0],r=e[1];return{x:+n,y:+r}},c6=function(t,e){var n=al(t,4),r=n[0],i=n[1],o=n[2],a=n[3],s=Eze(r,i,o,a,e);return[s,t[3]]},JZ=function(t,e){for(var n=t.x,r=t.y,i=up(e),o=Number.MAX_SAFE_INTEGER,a,s=[],l=0;l<i.length;l++)s.push({start:i[l],end:i[(l+1)%i.length]});if(s.forEach(function(f){var h=f.start,g=f.end;if(h.x===g.x){var m={x:h.x,y:r},y=D0(m,h,g);if(y){var b=Math.abs(h.x-n);b<o&&(o=b,a=m)}}else if(h.y===g.y){var m={x:n,y:h.y},y=D0(m,h,g);if(y){var b=Math.abs(h.y-r);b<o&&(o=b,a=m)}}}),!a){var u=s[0],c=u.start,d=u.end;a={x:c.x+(d.x-c.x)/2,y:c.y+(d.y-c.y)/2}}return a},V9e=function(t){return vo(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},d6=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function j9e(t,e){return typeof e!="function"?function(n,r,i){return Object.assign({type:t.edgeType},i)}:function(n,r,i){var o=e(n,r,i);return o?typeof o=="string"?Object.assign({},i,{type:o}):Object.assign({type:o},i):{type:t.edgeType}}}var Q9e=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,i=0;return In(e,function(o){var a=KZ(o);i=a>i?a:i}),{width:Math.ceil(i/2)*r+r/4,height:n*(r+2)+r/4}},Yp=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},TO=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function ym(t,e,n){return n&&e*Math.round(t/e)||t}function z9e(t,e,n){if(!t)return[];var r=Math.min.apply(Math,TO([],Yp(t.map(function(m){return m[0]})),!1)),i=Math.max.apply(Math,TO([],Yp(t.map(function(m){return m[0]})),!1)),o=Math.min.apply(Math,TO([],Yp(t.map(function(m){return m[1]})),!1)),a=Math.max.apply(Math,TO([],Yp(t.map(function(m){return m[1]})),!1)),s=-r,l=-o,u=t.map(function(m){var y=Yp(m,2),b=y[0],w=y[1];return[b+s,w+l]}),c=i-r,d=a-o,f=e?e/c:1,h=n?n/d:1,g=Math.min(f,h);return u.map(function(m){var y=Yp(m,2),b=y[0],w=y[1];return[b*g,w*g]})}var qT=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},YT=function(t,e,n){var r=qT(t,2),i=r[0],o=r[1],a=qT(e,2),s=a[0],l=a[1],u=qT(n,2),c=u[0],d=u[1];return i>s&&i<c&&o>l&&o<d},eq=function(t,e){var n=e.multipleSelectKey,r=!1;switch(n){case"meta":r=t.metaKey;break;case"alt":r=t.altKey;break;case"shift":r=t.shiftKey;break;case"ctrl":r=t.ctrlKey;break;default:r=!1;break}return r},WN=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();function f6(t,e){return t instanceof jo&&e instanceof jo}var tq=function(t){WN(e,t);function e(n,r,i){var o=t.call(this,3)||this;return o[0]=n,o[1]=r,o[2]=i,o.x=n,o.y=r,o.z=i,Object.setPrototypeOf(o,e.prototype),o}return e.prototype.add=function(n){if(f6(this,n))return new jo(this.x+n.x,this.y+n.y);var r=this.z+n.z;return new FP((this.x+n.x)/r,(this.y+n.y)/r)},e.prototype.subtract=function(n){if(f6(this,n))return new jo(this.x-n.x,this.y-n.y);var r=this.z-n.z;return r===0?new jo(this.x-n.x,this.y-n.y):new FP((this.x-n.x)/r,(this.y-n.y)/r)},e}(Array),jo=function(t){WN(e,t);function e(n,r,i){var o=t.call(this,n,r,i!=null?i:0)||this;return Object.setPrototypeOf(o,e.prototype),o}return e.prototype.toString=function(){return"Vector"},e.prototype.dot=function(n){var r=this;return n.reduce(function(i,o,a){return i+o*r[a]})},e.prototype.cross=function(n){return new e(this.y*n.z-this.z*n.y,this.z*n.x-this.x*n.z,this.x*n.y-this.y*n.x)},e.prototype.getLength=function(){return Math.hypot(this.x,this.y)},e.prototype.normalize=function(){var n=this.getLength();return new e(this.x/n,this.y/n)},e.prototype.crossZ=function(n){return this.x*n.y-this.y*n.x},e.prototype.angle=function(n){var r=this.crossZ(n),i=Math.acos(this.normalize().dot(n.normalize()));return r>=0?i:-i},e}(tq),FP=function(t){WN(e,t);function e(n,r){var i=t.call(this,n,r,1)||this;return Object.setPrototypeOf(i,e.prototype),i}return e.prototype.toString=function(){return"Point"},e}(tq),bC=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gp=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},GT=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},_C=function(t){bC(e,t);function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.call(this,n.length)||this;return i.fill(new Array(3)),n.forEach(function(o,a){i[a]=o}),i.columns=n[0].length,i.rows=n.length,Object.setPrototypeOf(i,e.prototype),i}return e.prototype.getRow=function(n){return this[n]},e.prototype.getColumn=function(n){return GT([],Gp(this.map(function(r){return r[n]})),!1)},e.prototype.transpose=function(){for(var n=[],r=0;r<this.columns;r++)n.push(this.getColumn(r));return new(e.bind.apply(e,GT([void 0],Gp(n),!1)))},e.prototype.cross=function(n){var r=new Array(this.rows).fill("").map(function(){return[]});if(this.columns===n.rows)for(var i=0;i<this.rows;i++)for(var o=this.getRow(i),a=function(l){var u=n.getColumn(l);r[i][l]=o.reduce(function(c,d,f){return c+d*u[f]},0)},s=0;s<n.columns;s++)a(s);return new(e.bind.apply(e,GT([void 0],Gp(r),!1)))},e.prototype.to2D=function(){return this.map(function(n){return[n[0],n[1]]})},e.prototype.toPoints=function(){return this.map(function(n){return new FP(n[0],n[1])})},e.prototype.toString=function(){var n=Gp(this[0],2),r=n[0],i=n[1],o=Gp(this[1],2),a=o[0],s=o[1],l=Gp(this[2],2),u=l[0],c=l[1];return"matrix(".concat(r," ").concat(i," ").concat(a," ").concat(s," ").concat(u," ").concat(c,")")},e.prototype.translate=function(n,r){return this.cross(new OC(n,r))},e.prototype.rotate=function(n){return this.cross(new W9e(n))},e.prototype.scale=function(n,r){return this.cross(new H9e(n,r))},e}(Array),W9e=function(t){bC(e,t);function e(n){var r=t.call(this,new jo(+Math.cos(n).toFixed(2),+Math.sin(n).toFixed(2),0),new jo(-Math.sin(n).toFixed(2),+Math.cos(n).toFixed(2),0),new jo(0,0,1))||this;return Object.setPrototypeOf(r,e.prototype),r}return e.prototype.inverse=function(){return this.transpose()},e}(_C),H9e=function(t){bC(e,t);function e(n,r){var i=t.call(this,new jo(n,0,0),new jo(0,r,0),new jo(0,0,1))||this;return i.sx=n,i.sy=r,Object.setPrototypeOf(i,e.prototype),i}return e.prototype.inverse=function(){return new e(1/this.sx,1/this.sy)},e}(_C),OC=function(t){bC(e,t);function e(n,r){var i=t.call(this,new jo(1,0,0),new jo(0,1,0),new jo(n,r,1))||this;return i.tx=n,i.ty=r,Object.setPrototypeOf(i,e.prototype),i}return e.prototype.inverse=function(){return new e(-this.tx,-this.ty)},e}(_C);O7e({isolateGlobalState:!0});var Yw=globalThis&&globalThis.__assign||function(){return Yw=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Yw.apply(this,arguments)},VP=function(t){var e=t.anchors;return e},Gw=function(t,e){for(var n=e.nodes,r,i=n.length-1;i>=0;i--){var o=n[i],a=Z9e(t,o);if(a){var s=o.getTargetAnchor(t);if(s){var l={node:o,anchorIndex:s.index,anchor:s.anchor};(!r||U9e(o,r.node,e))&&(r=l)}}}return r},U9e=function(t,e,n){return t.zIndex>e.zIndex?!0:n.nodesMap[t.id].index>n.nodesMap[e.id].index},X9e=function(t,e){for(var n=VP(e),r,i=Number.MAX_SAFE_INTEGER,o=0;o<n.length;o++){var a=Jl(t.x,t.y,n[o].x,n[o].y);a<i&&(i=a,r={index:o,anchor:Yw(Yw({},n[o]),{x:n[o].x,y:n[o].y,id:n[o].id})})}return r},Jl=function(t,e,n,r){return Math.hypot(t-n,e-r)},qd=function(t,e){var n=!1,r=0,i=ja(e);return t.x>=i.minX-r&&t.x<=i.maxX+r&&t.y>=i.minY-r&&t.y<=i.maxY+r&&(n=!0),n},Z9e=function(t,e){var n=!1,r=5,i=ja(e);return t.x>=i.minX-r&&t.x<=i.maxX+r&&t.y>=i.minY-r&&t.y<=i.maxY+r&&(n=!0),n},ja=function(t){var e=t.x,n=t.y,r=t.width,i=t.height;return{minX:e-r/2,minY:n-i/2,maxX:e+r/2,maxY:n+i/2,x:e,y:n,width:r,height:i,centerX:e,centerY:n}},q9e=function(t){var e=t,n=e.x,r=e.y,i=e.width,o=e.height,a=e.radius;return[{x:n-i/2+a,y:r-o/2+a,r:a},{x:n+i/2-a,y:r-o/2+a,r:a},{x:n-i/2+a,y:r+o/2-a,r:a},{x:n+i/2-a,y:r+o/2-a,r:a}]},h6=function(t,e,n){var r=q9e(n),i,o=Number.MAX_SAFE_INTEGER;return r.forEach(function(a){var s=Jl(t.x,t.y,a.x,a.y);s<o&&(o=s,i=a)}),jP(t,e,i)},jP=function(t,e,n){var r,i=n.x,o=n.y,a=n.r;if(e===di.HORIZONTAL){var s=i-Math.sqrt(a*a-(t.y-o)*(t.y-o)),l=i+Math.sqrt(a*a-(t.y-o)*(t.y-o)),u=Math.abs(s-t.x)<Math.abs(l-t.x)?s:l;r={x:u,y:t.y}}else if(e===di.VERTICAL){var c=o-Math.sqrt(a*a-(t.x-i)*(t.x-i)),d=o+Math.sqrt(a*a-(t.x-i)*(t.x-i)),f=Math.abs(c-t.y)<Math.abs(d-t.y)?c:d;r={x:t.x,y:f}}return r},p6=function(t,e){var n=e,r=!1,i=n.x,o=n.y,a=n.width,s=n.height,l=n.radius,u={minX:i-a/2+l,maxX:i+a/2-l,minY:o-s/2+l,maxY:o+s/2-l};return t.y===o+s/2||t.y===o-s/2?r=t.x>u.minX&&t.x<u.maxX:(t.x===i+a/2||t.x===i-a/2)&&(r=t.y>u.minY&&t.y<u.maxY),r},g6=function(t,e,n){var r,i=n,o=i.x,a=i.y,s=i.rx,l=i.ry;if(e===di.HORIZONTAL){var u=o-Math.sqrt(s*s-(t.y-a)*(t.y-a)*s*s/(l*l)),c=o+Math.sqrt(s*s-(t.y-a)*(t.y-a)*s*s/(l*l)),d=Math.abs(u-t.x)<Math.abs(c-t.x)?u:c;r={x:d,y:t.y}}else if(e===di.VERTICAL){var f=a-Math.sqrt(l*l-(t.x-o)*(t.x-o)*l*l/(s*s)),h=a+Math.sqrt(l*l-(t.x-o)*(t.x-o)*l*l/(s*s)),g=Math.abs(f-t.y)<Math.abs(h-t.y)?f:h;r={x:t.x,y:g}}return r},kO=function(t,e,n){for(var r=n.pointsPosition,i=Number.MAX_SAFE_INTEGER,o,a=[],s=0;s<r.length;s++)a.push({start:r[s],end:r[(s+1)%r.length]});return a.forEach(function(l){var u=l.start,c=l.end,d=u,f=c;u.x>c.x&&(d=c,f=u);var h={x:t.x,y:t.y};if(d.x===f.x&&e===di.HORIZONTAL&&(h={x:d.x,y:t.y}),d.y===f.y&&e===di.VERTICAL&&(h={x:t.x,y:d.y}),d.x!==f.x&&d.y!==f.y){var g=(f.y-d.y)/(f.x-d.x),m=(d.x*f.y-f.x*d.y)/(d.x-f.x);e===di.HORIZONTAL?h={x:(t.y-m)/g,y:t.y}:e===di.VERTICAL&&(h={x:t.x,y:g*t.x+m})}var y=D0(h,u,c);if(y){var b=Jl(h.x,h.y,t.x,t.y);b<i&&(i=b,o=h)}}),o},Y9e=function(t){var e=vo(t,["id","type","x","y","text","label","properties","virtual","rotate","resizable","rotatable"]);return e},m6=function(t,e,n,r){var i=t.x,o=t.y;return e.x>t.x?i=t.x+n/2:e.x<t.x&&(i=t.x-n/2),e.y>t.y?o=t.y+r/2:e.y<t.y&&(o=t.y-r/2),{x:i,y:o}},nq=function(t){var e=t.rows,n=t.style,r=t.rowsLength,i=t.className,o=document.createElement("div");o.className=i,o.style.fontSize="".concat(n.fontSize),o.style.width="".concat(n.width),o.style.lineHeight="".concat(n.lineHeight),o.style.padding="".concat(n.padding),n.fontFamily&&(o.style.fontFamily="".concat(n.fontFamily)),r>1?e.forEach(function(s){var l=document.createElement("div");l.textContent=s,o.appendChild(l)}):o.textContent=e[0],document.body.appendChild(o);var a=o.clientHeight;return document.body.removeChild(o),a},v6=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,i=0;return e&&e.forEach(function(o){var a=KZ(o);i=a>i?a:i}),{width:Math.ceil(i/2)*r+r/4,height:n*(r+2)+r/4}},Kw=function(t){return typeof t!="object"?{isAllPass:!!t,msg:t?"":"\u4E0D\u5141\u8BB8\u8FDE\u63A5"}:t};let PO;const G9e=new Uint8Array(16);function K9e(){if(!PO&&(PO=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!PO))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return PO(G9e)}const Ao=[];for(let t=0;t<256;++t)Ao.push((t+256).toString(16).slice(1));function J9e(t,e=0){return Ao[t[e+0]]+Ao[t[e+1]]+Ao[t[e+2]]+Ao[t[e+3]]+"-"+Ao[t[e+4]]+Ao[t[e+5]]+"-"+Ao[t[e+6]]+Ao[t[e+7]]+"-"+Ao[t[e+8]]+Ao[t[e+9]]+"-"+Ao[t[e+10]]+Ao[t[e+11]]+Ao[t[e+12]]+Ao[t[e+13]]+Ao[t[e+14]]+Ao[t[e+15]]}const eze=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var y6={randomUUID:eze};function QP(t,e,n){if(y6.randomUUID&&!e&&!t)return y6.randomUUID();t=t||{};const r=t.random||(t.rng||K9e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return J9e(r)}var sf=function(){return QP()},My=new Map,rq=function(t){var e=sf();function n(){t();var i=My.get(e);if(i){var o=window.requestAnimationFrame(n);My.set(e,o)}}var r=window.requestAnimationFrame(n);return My.set(e,r),e},Jw=function(t){var e=My.get(t);e&&(window.cancelAnimationFrame(e),My.delete(t))},B0=globalThis&&globalThis.__assign||function(){return B0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},B0.apply(this,arguments)},tze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function iq(t){var e=t.x,n=e===void 0?0:e,r=t.y,i=r===void 0?0:r,o=t.value,a=t.fontSize,s=a===void 0?12:a,l=t.fill,u=l===void 0?"currentColor":l,c=t.overflowMode,d=c===void 0?"default":c,f=t.textWidth,h=f===void 0?void 0:f,g=t.model,m={x:n,y:i,fill:u,fontSize:s,textAnchor:"middle",dominantBaseline:"central"};if(In(Ku(t),function(S){var C=tze(S,2),E=C[0],T=C[1];typeof T!="object"&&(m[E]=T)}),o){var y=String(o).split(/[\r\n]/g),b=y.length;if(d!=="default"){var w=g.BaseType,O=g.modelType;if(w===xi.NODE&&O!==qn.TEXT_NODE||w===xi.EDGE&&h)return nze(t)}if(b>1){var x=y.map(function(S,C){var E=s+2,T=(C-(b-1)/2)*E;return rt("tspan",{className:"lf-text-tspan",x:n,y:i+T,children:S})});return rt("text",B0({},m,{children:x}))}return rt("text",B0({},m,{children:o}))}return null}function nze(t){var e=t.x,n=t.y,r=t.value,i=t.model,o=t.textWidth,a=t.fontSize,s=a===void 0?12:a,l=t.lineHeight,u=t.fontFamily,c=u===void 0?"":u,d=t.wrapPadding,f=d===void 0?"0, 0":d,h=t.overflowMode,g=i.width,m=i.height,y=i.textHeight,b=o||g,w=String(r).split(/[\r\n]/g),O=w.length,x=nq({rows:w,style:{fontSize:"".concat(s,"px"),width:"".concat(b,"px"),fontFamily:c,lineHeight:l,padding:f},rowsLength:O,className:"lf-get-text-height"}),S=m>x?m:x;y&&(S=y);var C=h==="ellipsis";return C&&(S=s+2),rt("g",{children:rt("foreignObject",{width:b,height:S,x:e-b/2,y:n-S/2,style:{overflow:"visible",textAlign:"left"},children:rt("div",{className:"lf-node-text-auto-wrap",style:{minHeight:S,width:b,padding:f},children:rt("div",{className:C?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:C?w.join(""):"",style:B0({},t),children:w.map(function(E){return rt("div",{className:"lf-node-text--auto-wrap-inner",children:E})})})})})})}var zP=globalThis&&globalThis.__assign||function(){return zP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zP.apply(this,arguments)},rze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function bm(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return In(Ku(t),function(n){var r=rze(n,2),i=r[0],o=r[1];(i==="style"||typeof o!="object")&&(e[i]=o)}),rt("line",zP({},e))}var WP=globalThis&&globalThis.__assign||function(){return WP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},WP.apply(this,arguments)},ize=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function sl(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.className,a=t.strokeWidth,s=t.radius,l=s===void 0?0:s,u=e-r/2,c=n-i/2,d={};return d["stroke-width"]=a,In(Ku(t),function(f){var h=ize(f,2),g=h[0],m=h[1];typeof m!="object"&&(d[g]=m)}),o?d.className="lf-basic-shape ".concat(o):d.className="lf-basic-shape",l&&(d.rx=l,d.ry=l),d.x=u,d.y=c,rt("rect",WP({},d))}var HP=globalThis&&globalThis.__assign||function(){return HP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},HP.apply(this,arguments)},oze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function F0(t){var e={d:""};return In(Ku(t),function(n){var r=oze(n,2),i=r[0],o=r[1];(i==="style"||typeof o!="object")&&(e[i]=o)}),rt("path",HP({},e))}var UP=globalThis&&globalThis.__assign||function(){return UP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},UP.apply(this,arguments)},aze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function _m(t){var e=t.x,n=e===void 0?0:e,r=t.y,i=r===void 0?0:r,o=t.r,a=o===void 0?4:o,s=t.className,l={cx:n,cy:i,r:a,fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1};return In(Ku(t),function(u){var c=aze(u,2),d=c[0],f=c[1];typeof f!="object"&&(l[d]=f)}),s?l.className="lf-basic-shape ".concat(s):l.className="lf-basic-shape",rt("circle",UP({},l))}var XP=globalThis&&globalThis.__assign||function(){return XP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},XP.apply(this,arguments)},sze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function lze(t){var e=t.x,n=e===void 0?0:e,r=t.y,i=r===void 0?0:r,o=t.rx,a=o===void 0?4:o,s=t.ry,l=s===void 0?4:s,u=t.className,c={cx:n,cy:i,rx:a,ry:l,fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1};return In(Ku(t),function(d){var f=sze(d,2),h=f[0],g=f[1];typeof g!="object"&&(c[h]=g)}),u?c.className="lf-basic-shape ".concat(u):c.className="lf-basic-shape",rt("ellipse",XP({},c))}var ZP=globalThis&&globalThis.__assign||function(){return ZP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ZP.apply(this,arguments)},uze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function HN(t){var e=t.points,n=e===void 0?[]:e,r=t.className,i={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return In(Ku(t),function(o){var a=uze(o,2),s=a[0],l=a[1];typeof l!="object"&&(i[s]=l)}),r?i.classNmae="lf-basic-shape ".concat(r):i.className="lf-basic-shape",i.points=n.map(function(o){return o.join(",")}).join(" "),rt("polygon",ZP({},i))}var qP=globalThis&&globalThis.__assign||function(){return qP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},qP.apply(this,arguments)},cze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function dze(t){var e=t.className,n={points:"",fill:"none"};return In(Ku(t),function(r){var i=cze(r,2),o=i[0],a=i[1];(o==="style"||typeof a!="object")&&(n[o]=a)}),e&&(n.className="".concat(e)),rt("polyline",qP({},n))}var oq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),V0=globalThis&&globalThis.__assign||function(){return V0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},V0.apply(this,arguments)},fze=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},hze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Wr;(function(t){t[t.LEFT_TOP=0]="LEFT_TOP",t[t.RIGHT_TOP=1]="RIGHT_TOP",t[t.RIGHT_BOTTOM=2]="RIGHT_BOTTOM",t[t.LEFT_BOTTOM=3]="LEFT_BOTTOM"})(Wr||(Wr={}));var pze=function(t){oq(e,t);function e(n){var r=t.call(this)||this;r.updateEdgePointByAnchors=function(){var s=r.nodeModel,l=s.id,u=s.anchors,c=r.graphModel.getNodeEdges(l);In(c,function(d){if(d.sourceNodeId===l){var f=gf(u,function(h){return h.id===d.sourceAnchorId});f&&d.updateStartPoint({x:f.x,y:f.y})}else if(d.targetNodeId===l){var f=gf(u,function(g){return g.id===d.targetAnchorId});f&&d.updateEndPoint({x:f.x,y:f.y})}})},r.triggerResizeEvent=function(s,l,u,c,d,f){r.graphModel.eventCenter.emit(cn.NODE_RESIZE,{preData:s,data:l,deltaX:u,deltaY:c,index:d,model:f})},r.recalcResizeInfo=function(s,l,u,c,d){u===void 0&&(u=1),c===void 0&&(c=!1),d===void 0&&(d=!1);var f=Nn(l),h=f.deltaX,g=f.deltaY,m=f.width,y=f.height,b=f.PCTResizeInfo;if(b){var w=4,O=0,x=0;switch(s){case Wr.LEFT_TOP:x=(h*-1-g)/w;break;case Wr.RIGHT_TOP:x=(h-g)/w;break;case Wr.RIGHT_BOTTOM:x=(h+g)/w;break;case Wr.LEFT_BOTTOM:x=(h*-1+g)/w;break}x!==0&&(O=Math.round(x/b.ResizeBasis.basisHeight*1e5)/1e3),b.ResizePCT.widthPCT=Math.max(Math.min(b.ResizePCT.widthPCT+O,b.ScaleLimit.maxScaleLimit),b.ScaleLimit.minScaleLimit),b.ResizePCT.heightPCT=Math.max(Math.min(b.ResizePCT.heightPCT+O,b.ScaleLimit.maxScaleLimit),b.ScaleLimit.minScaleLimit);var S=Math.round(b.ResizePCT.widthPCT*b.ResizeBasis.basisWidth/100),C=Math.round(b.ResizePCT.heightPCT*b.ResizeBasis.basisHeight/100);switch(s){case Wr.LEFT_TOP:h=m-S,g=y-C;break;case Wr.RIGHT_TOP:h=S-m,g=y-C;break;case Wr.RIGHT_BOTTOM:h=S-m,g=C-y;break;case Wr.LEFT_BOTTOM:h=m-S,g=C-y;break}return f}switch(s){case Wr.LEFT_TOP:f.width=c?m:m-h*u,f.height=d?y:y-g*u;break;case Wr.RIGHT_TOP:f.width=c?m:m+h*u,f.height=d?y:y-g*u;break;case Wr.RIGHT_BOTTOM:f.width=c?m:m+h*u,f.height=d?y:y+g*u;break;case Wr.LEFT_BOTTOM:f.width=c?m:m-h*u,f.height=d?y:y+g*u;break}return f},r.resizeNode=function(s){var l=s.deltaX,u=s.deltaY,c=r.index,d=r.props,f=d.model,h=d.graphModel,g=d.x,m=d.y;aq({x:g,y:m,deltaX:l,deltaY:u,index:c,nodeModel:f,graphModel:h,cancelCallback:function(){r.dragHandler.cancelDrag()}})},r.onDragging=function(s){var l=s.deltaX,u=s.deltaY,c=r.graphModel.transformModel,d=hze(c.fixDeltaXY(l,u),2),f=d[0],h=d[1];r.resizeNode({deltaX:f,deltaY:h})},r.onDragEnd=function(){var s=r.nodeModel.x,l=r.nodeModel.y;r.nodeModel.moveTo(s,l),r.updateEdgePointByAnchors()};var i=n.index,o=n.model,a=n.graphModel;return r.index=i,r.nodeModel=o,r.graphModel=a,r.dragHandler=new Al({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:a.gridSize}),r}return e.prototype.componentWillUnmount=function(){this.dragHandler.destroy()},e.prototype.render=function(){var n=this.props,r=n.x,i=n.y,o=n.direction,a=n.model,s=a.getResizeControlStyle(),l=s.width,u=s.height,c=fze(s,["width","height"]);return rt("g",{className:"lf-resize-control lf-resize-control-".concat(o),children:[rt(sl,V0({className:"lf-resize-control-content",x:r,y:i,width:l!=null?l:7,height:u!=null?u:7},c)),rt(sl,{className:"lf-resize-control-content",x:r,y:i,width:25,height:25,fill:"transparent",stroke:"transparent",onMouseDown:this.dragHandler.handleMouseDown})]})},e}(ur),gze=function(t){oq(e,t);function e(){return t.call(this)||this}return e.prototype.getResizeControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=ja(r),a=o.minX,s=o.minY,l=o.maxX,u=o.maxY,c=[{index:Wr.LEFT_TOP,direction:"nw",x:a,y:s},{index:Wr.RIGHT_TOP,direction:"ne",x:l,y:s},{index:Wr.RIGHT_BOTTOM,direction:"se",x:l,y:u},{index:Wr.LEFT_BOTTOM,direction:"sw",x:a,y:u}];return Ca(c,function(d){return rt(pze,V0({},d,{model:r,graphModel:i}))})},e.prototype.getResizeOutline=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.getResizeOutlineStyle();return rt(sl,V0({},s,{x:r,y:i,width:o,height:a}))},e.prototype.render=function(){return rt("g",{className:"lf-resize-control-group",children:[this.getResizeOutline(),this.getResizeControl()]})},e}(ur);function mze(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a={x:n+(i-n)/2,y:r+(o-r)/2};return a}function ly(t,e,n){var r=vze(n),i=t.x-e.x,o=t.y-e.y,a=i*Math.cos(r)-o*Math.sin(r)+e.x,s=i*Math.sin(r)+o*Math.cos(r)+e.y;return{x:a,y:s}}function vze(t){return t*Math.PI/180}function yze(t){return t/Math.PI*180}function bze(t,e,n,r,i,o,a,s,l){s===void 0&&(s=!1),l===void 0&&(l=!1);var u=e.deltaX,c=e.deltaY,d=e.width,f=e.height,h=yze(n),g={x:r,y:i},m={x:o,y:a},y=ly(g,m,h),b={x:y.x+u,y:y.y+c},w=xze(y,b,m,h,s,l,d,f),O=w.width,x=w.height,S=w.center;return e.width=O*t,e.height=x*t,e.deltaX=(S.x-m.x)*2,e.deltaY=(S.y-m.y)*2,e}var _ze=function(t,e,n,r,i,o,a,s,l,u){n===void 0&&(n=1),r===void 0&&(r=!1),i===void 0&&(i=!1),o===void 0&&(o=0);var c=Nn(e),d=c.deltaX,f=c.deltaY,h=c.width,g=c.height,m=c.PCTResizeInfo;if(m){var y=4,b=0,w=0;switch(t){case Wr.LEFT_TOP:w=(d*-1-f)/y;break;case Wr.RIGHT_TOP:w=(d-f)/y;break;case Wr.RIGHT_BOTTOM:w=(d+f)/y;break;case Wr.LEFT_BOTTOM:w=(d*-1+f)/y;break}w!==0&&(b=Math.round(w/m.ResizeBasis.basisHeight*1e5)/1e3),m.ResizePCT.widthPCT=Math.max(Math.min(m.ResizePCT.widthPCT+b,m.ScaleLimit.maxScaleLimit),m.ScaleLimit.minScaleLimit),m.ResizePCT.heightPCT=Math.max(Math.min(m.ResizePCT.heightPCT+b,m.ScaleLimit.maxScaleLimit),m.ScaleLimit.minScaleLimit);var O=Math.round(m.ResizePCT.widthPCT*m.ResizeBasis.basisWidth/100),x=Math.round(m.ResizePCT.heightPCT*m.ResizeBasis.basisHeight/100);switch(t){case Wr.LEFT_TOP:d=h-O,f=g-x;break;case Wr.RIGHT_TOP:d=O-h,f=g-x;break;case Wr.RIGHT_BOTTOM:d=O-h,f=x-g;break;case Wr.LEFT_BOTTOM:d=h-O,f=x-g;break}return c}if(o%(2*Math.PI)!==0&&a!==void 0&&s!==void 0)return bze(n,c,o,a,s,l,u,r,i);switch(t){case Wr.LEFT_TOP:c.width=r?h:h-d*n,c.height=i?g:g-f*n;break;case Wr.RIGHT_TOP:c.width=r?h:h+d*n,c.height=i?g:g-f*n;break;case Wr.RIGHT_BOTTOM:c.width=r?h:h+d*n,c.height=i?g:g+f*n;break;case Wr.LEFT_BOTTOM:c.width=r?h:h-d*n,c.height=i?g:g+f*n;break}return c},Oze=function(t,e){var n=t.id,r=t.anchors,i=e.getNodeEdges(n);In(i,function(o){if(o.sourceNodeId===n){var a=gf(r,function(s){return s.id===o.sourceAnchorId});a&&o.updateStartPoint({x:a.x,y:a.y})}else if(o.targetNodeId===n){var a=gf(r,function(l){return l.id===o.targetAnchorId});a&&o.updateEndPoint({x:a.x,y:a.y})}})},wze=function(t,e,n,r,i,o,a){a.eventCenter.emit(cn.NODE_RESIZE,{preData:t,data:e,deltaX:n,deltaY:r,index:i,model:o})},aq=function(t){var e=t.x,n=t.y,r=t.deltaX,i=t.deltaY,o=t.index,a=t.nodeModel,s=t.graphModel,l=t.cancelCallback,u=a.r,c=a.rx,d=a.ry,f=a.width,h=a.height,g=a.PCTResizeInfo,m=a.minWidth,y=a.minHeight,b=a.maxWidth,w=a.maxHeight,O=a.rotate,x=a.x,S=a.y,C=m===b,E=y===w,T={width:u||c||f,height:u||d||h,deltaX:r,deltaY:i,PCTResizeInfo:g},P=u||c&&d?1/2:1,A=e,D=n,$=_ze(o,T,P,C,E,O,A,D,x,S);if($.width<m||$.width>b||$.height<y||$.height>w){l==null||l();return}(O%(2*Math.PI)==0||g||A===void 0||D===void 0)&&($.deltaX=C?0:$.deltaX,$.deltaY=E?0:$.deltaY);var N=a.getData(),z=a.resize($);N.x===z.x&&N.y===z.y||(Oze(a,s),wze(N,z,r,i,o,a,s))};function xze(t,e,n,r,i,o,a,s){i===void 0&&(i=!1),o===void 0&&(o=!1);var l={x:n.x-(t.x-n.x),y:n.y-(t.y-n.y)},u=mze(l,e),c=ly(e,u,-r),d=ly(l,u,-r);if(i){var f=Math.abs(c.x-d.x),h=f-a;u.x>c.x?u.x=u.x+h/2:u.x=u.x-h/2}if(o){var g=Math.abs(c.y-d.y),m=g-s;u.y>c.y?u.y=u.y+m/2:u.y=u.y-m/2}if(i||o){var y=ly(d,u,r),b=y.x-l.x,w=y.y-l.y;u.x=u.x-b,u.y=u.y-w,d=ly(l,u,-r),c={x:u.x-(d.x-u.x),y:u.y-(d.y-u.y)}}var O=Math.abs(c.x-d.x),x=Math.abs(c.y-d.y);return i&&(O=a),o&&(x=s),{width:O,height:x,center:u}}var Sze=100,Cze={x:1,y:0,z:0};function Eze(t,e,n,r,i){for(var o=function(h){if(h<0||h>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:t.x*Math.pow(1-h,3)+3*e.x*h*Math.pow(1-h,2)+3*n.x*Math.pow(h,2)*(1-h)+r.x*Math.pow(h,3),y:t.y*Math.pow(1-h,3)+3*e.y*h*Math.pow(1-h,2)+3*n.y*Math.pow(h,2)*(1-h)+r.y*Math.pow(h,3)}},a=0,s=2,l=r.x,u=r.y,c=r;a<i&&s<50;){c=o(1-s/Sze);var d=c.x,f=c.y;a=Jl(l,u,d,f),s++}return c}function Tze(t,e){return t.x*e.y-t.y*e.x}function kze(t,e){var n=[t.x,t.y,t.z],r=[e.x,e.y,e.z];return r.reduce(function(i,o,a){return i+o*n[a]})}function Pze(t,e){var n=Tze(t,e),r=Math.acos(kze(b6(t),b6(e)));return n>=0?r:-r}function b6(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function Aze(t){return Pze(Cze,t)}function Mze(t){return t*(180/Math.PI)}var Rze={baseNode:{fill:"#fff",stroke:"#000",strokeWidth:2},baseEdge:{stroke:"#000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000",fill:"#fff",r:4,hover:{r:10,fill:"#949494",fillOpacity:.5,stroke:"#949494"}},anchorLine:{stroke:"#000",strokeWidth:2,strokeDasharray:"3,2"},nodeText:{color:"#000",overflowMode:"default",fontSize:12,lineHeight:1.2},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#fff"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",fillOpacity:1,stroke:"#949494"}},arrow:{offset:10,verticalLength:5},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#fff",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10,10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5},resizeControl:{width:7,height:7,fill:"#fff",stroke:"#000"},resizeOutline:{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},sq=function(t){var e=Nn(Rze);return t&&(e=mf(e,t)),e},$ze=sq,Nze=1e3,Dze=999,UN=function(){return++Nze},Lze=function(){return--Dze},Bi=globalThis&&globalThis.__assign||function(){return Bi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Bi.apply(this,arguments)},mn=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},wC=function(){function t(e,n){var r;this.BaseType=xi.EDGE,this.id="",this.type="",this.sourceNodeId="",this.targetNodeId="",this.textMode=gl.TEXT,this.text={value:"",x:0,y:0,draggable:!1,editable:!0},this.points="",this.pointsList=[],this.virtual=!1,this.isSelected=!1,this.isHovered=!1,this.isHitable=!0,this.isHittable=!0,this.draggable=!0,this.visible=!0,this.isAnimation=!1,this.isShowAdjustPoint=!1,this.zIndex=0,this.state=Er.DEFAULT,this.modelType=qn.EDGE,this.customTextPosition=!1,this.style={},this.arrowConfig={markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")},this.graphModel=n,this.properties=(r=e.properties)!==null&&r!==void 0?r:{},this.initEdgeData(e),this.setAttributes()}return t.prototype.initEdgeData=function(e){if(e.properties||(e.properties={}),!e.id){var n=this.graphModel.idGenerator,r=n&&n(e.type),i=this.createId();e.id=i||r||sf()}this.arrowConfig.markerEnd="url(#marker-end-".concat(e.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(e.id,")");var o=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=o,Nr(this,V9e(e));var a=this.graphModel.overlapMode;a===ql.INCREASE&&(this.zIndex=e.zIndex||UN()),this.setAnchors(),this.initPoints(),this.formatText(e)},t.prototype.setAttributes=function(){},t.prototype.createId=function(){return null},t.prototype.getEdgeStyle=function(){return Bi(Bi({},this.graphModel.theme.baseEdge),this.style)},t.prototype.getAdjustPointStyle=function(){return Bi({},this.graphModel.theme.edgeAdjust)},t.prototype.getTextStyle=function(){var e=this.graphModel.theme.edgeText;return Nn(e)},t.prototype.getEdgeAnimationStyle=function(){var e=this.graphModel.theme.edgeAnimation;return Nn(e)},t.prototype.getArrowStyle=function(){var e=this.getEdgeStyle(),n=this.getEdgeAnimationStyle(),r=this.graphModel.theme.arrow,i=this.isAnimation?n.stroke:e.stroke;return Bi(Bi(Bi({},e),{fill:i,stroke:i}),r)},t.prototype.getOutlineStyle=function(){var e=this.graphModel,n=e.theme.outline;return Nn(n)},t.prototype.getTextPosition=function(){return{x:0,y:0}},Object.defineProperty(t.prototype,"sourceNode",{get:function(){var e,n;return(n=(e=this.graphModel)===null||e===void 0?void 0:e.nodesMap[this.sourceNodeId])===null||n===void 0?void 0:n.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetNode",{get:function(){var e,n;return(n=(e=this.graphModel)===null||e===void 0?void 0:e.nodesMap[this.targetNodeId])===null||n===void 0?void 0:n.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textPosition",{get:function(){return this.getTextPosition()},enumerable:!1,configurable:!0}),t.prototype.getBeginAnchor=function(e,n,r){var i,o,a=VP(e);if(r){if(i=gf(a,function(s){return s.id===r}),i)return i;console.warn("\u672A\u5728\u8282\u70B9\u4E0A\u627E\u5230\u6307\u5B9A\u7684\u8D77\u70B9\u951A\u70B9".concat(r,"\uFF0C\u5DF2\u4F7F\u7528\u9ED8\u8BA4\u951A\u70B9\u4F5C\u4E3A\u8D77\u70B9"))}return a.forEach(function(s){var l=d6(s,n);(o===void 0||l<o)&&(o=l,i=s)}),i},t.prototype.getEndAnchor=function(e,n){var r=this,i,o,a=VP(e);if(n){if(i=gf(a,function(s){return s.id===n}),i)return i;console.warn("\u672A\u5728\u8282\u70B9\u4E0A\u627E\u5230\u6307\u5B9A\u7684\u7EC8\u70B9\u951A\u70B9".concat(n,"\uFF0C\u5DF2\u4F7F\u7528\u9ED8\u8BA4\u951A\u70B9\u4F5C\u4E3A\u7EC8\u70B9"))}return a.forEach(function(s){if(!!r.startPoint){var l=d6(s,r.startPoint);(o===void 0||l<o)&&(o=l,i=s)}}),i},t.prototype.getProperties=function(){return Hl(this.properties)},t.prototype.getData=function(){var e=this.properties;mm(e)&&(e=Hl(e));var n={id:this.id,type:this.type,properties:e,sourceNodeId:this.sourceNodeId,targetNodeId:this.targetNodeId,sourceAnchorId:this.sourceAnchorId,targetAnchorId:this.targetAnchorId,startPoint:Nr({},this.startPoint),endPoint:Nr({},this.endPoint)};this.graphModel.overlapMode===ql.INCREASE&&(n.zIndex=this.zIndex);var r=this.text,i=r.x,o=r.y,a=r.value;return a&&(n.text={x:i,y:o,value:a}),n},t.prototype.getHistoryData=function(){return this.getData()},t.prototype.setProperty=function(e,n){BN(this.properties,e,ra(n)),this.setAttributes()},t.prototype.deleteProperty=function(e){delete this.properties[e],this.setAttributes()},t.prototype.setProperties=function(e){this.properties=Bi(Bi({},Hl(this.properties)),ra(e)),this.setAttributes()},t.prototype.changeEdgeId=function(e){var n=this.arrowConfig,r=n.markerEnd,i=n.markerStart;i&&i==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(e,")")),r&&r==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(e,")")),this.id=e},t.prototype.setStyle=function(e,n){var r;this.style=Bi(Bi({},this.style),(r={},r[e]=ra(n),r))},t.prototype.setStyles=function(e){this.style=Bi(Bi({},this.style),ra(e))},t.prototype.updateStyles=function(e){this.style=Bi({},ra(e))},t.prototype.setTextMode=function(e){this.textMode=e},t.prototype.formatText=function(e){var n,r,i,o=this.graphModel.editConfigModel,a=o.edgeTextDraggable,s=o.edgeTextEdit,l=this.textPosition,u=l.x,c=l.y,d=e.text,f={value:"",x:u,y:c,draggable:a,editable:s};d&&(typeof d=="string"?f=Bi(Bi({},f),{value:d}):(f=Bi(Bi({},f),{x:(n=d.x)!==null&&n!==void 0?n:u,y:(r=d.y)!==null&&r!==void 0?r:c,value:(i=d.value)!==null&&i!==void 0?i:""}),qc(d.draggable)||(f.draggable=d.draggable),qc(d.editable)||(f.editable=d.editable))),this.text=f},t.prototype.resetTextPosition=function(){var e=this.textPosition,n=e.x,r=e.y;this.text.x=n,this.text.y=r},t.prototype.moveText=function(e,n){var r=this.text,i=r.x,o=r.y,a=r.value,s=r.draggable,l=r.editable;this.text={value:a,editable:l,draggable:s,x:i+e,y:o+n}},t.prototype.setText=function(e){e&&Nr(this.text,e)},t.prototype.updateText=function(e){this.text=Bi(Bi({},Hl(this.text)),{value:e})},t.prototype.setAnchors=function(){if(!this.sourceAnchorId||!this.startPoint){var e=this.getBeginAnchor(this.sourceNode,this.targetNode,this.sourceAnchorId);if(!e)throw new Error("\u65E0\u6CD5\u83B7\u53D6beginAnchor\uFF0C\u8BF7\u68C0\u67E5anchors\u76F8\u5173\u903B\u8F91\uFF0Canchors\u4E0D\u80FD\u4E3A\u7A7A");this.startPoint||(this.startPoint={x:e.x,y:e.y}),this.sourceAnchorId||(this.sourceAnchorId=e.id)}if(!this.targetAnchorId||!this.endPoint){var e=this.getEndAnchor(this.targetNode,this.targetAnchorId);if(!e)throw new Error("\u65E0\u6CD5\u83B7\u53D6endAnchor\uFF0C\u8BF7\u68C0\u67E5anchors\u76F8\u5173\u903B\u8F91\uFF0Canchors\u4E0D\u80FD\u4E3A\u7A7A");this.endPoint||(this.endPoint={x:e.x,y:e.y}),this.targetAnchorId||(this.targetAnchorId=e.id)}},t.prototype.setSelected=function(e){e===void 0&&(e=!0),this.isSelected=e},t.prototype.setHovered=function(e){e===void 0&&(e=!0),this.isHovered=e},t.prototype.setHitable=function(e){e===void 0&&(e=!0),this.isHitable=e},t.prototype.setHittable=function(e){e===void 0&&(e=!0),this.isHittable=e},t.prototype.openEdgeAnimation=function(){this.isAnimation=!0},t.prototype.closeEdgeAnimation=function(){this.isAnimation=!1},t.prototype.setElementState=function(e,n){this.state=e,this.additionStateData=n},t.prototype.updateStartPoint=function(e){this.startPoint=e},t.prototype.moveStartPoint=function(e,n){this.startPoint&&(this.startPoint.x+=e,this.startPoint.y+=n)},t.prototype.updateEndPoint=function(e){this.endPoint=e},t.prototype.moveEndPoint=function(e,n){this.endPoint&&(this.endPoint.x+=e,this.endPoint.y+=n)},t.prototype.setZIndex=function(e){e===void 0&&(e=0),this.zIndex=e},t.prototype.initPoints=function(){},t.prototype.updateAttributes=function(e){Nr(this,e)},t.prototype.getAdjustStart=function(){return this.startPoint},t.prototype.getAdjustEnd=function(){return this.endPoint},t.prototype.updateAfterAdjustStartAndEnd=function(e){var n=e.startPoint,r=e.endPoint;this.updateStartPoint({x:n.x,y:n.y}),this.updateEndPoint({x:r.x,y:r.y})},t.BaseType=xi.EDGE,mn([st],t.prototype,"type",void 0),mn([st],t.prototype,"sourceNodeId",void 0),mn([st],t.prototype,"targetNodeId",void 0),mn([st],t.prototype,"startPoint",void 0),mn([st],t.prototype,"endPoint",void 0),mn([st],t.prototype,"textMode",void 0),mn([st],t.prototype,"text",void 0),mn([st],t.prototype,"properties",void 0),mn([st],t.prototype,"points",void 0),mn([st],t.prototype,"pointsList",void 0),mn([st],t.prototype,"isSelected",void 0),mn([st],t.prototype,"isHovered",void 0),mn([st],t.prototype,"isHitable",void 0),mn([st],t.prototype,"isHittable",void 0),mn([st],t.prototype,"draggable",void 0),mn([st],t.prototype,"visible",void 0),mn([st],t.prototype,"isAnimation",void 0),mn([st],t.prototype,"isShowAdjustPoint",void 0),mn([st],t.prototype,"zIndex",void 0),mn([st],t.prototype,"state",void 0),mn([st],t.prototype,"style",void 0),mn([st],t.prototype,"arrowConfig",void 0),mn([Gr],t.prototype,"sourceNode",null),mn([Gr],t.prototype,"targetNode",null),mn([Gr],t.prototype,"textPosition",null),mn([it],t.prototype,"setProperty",null),mn([it],t.prototype,"deleteProperty",null),mn([it],t.prototype,"setProperties",null),mn([it],t.prototype,"changeEdgeId",null),mn([it],t.prototype,"setStyle",null),mn([it],t.prototype,"setStyles",null),mn([it],t.prototype,"updateStyles",null),mn([it],t.prototype,"setTextMode",null),mn([it],t.prototype,"formatText",null),mn([it],t.prototype,"resetTextPosition",null),mn([it],t.prototype,"moveText",null),mn([it],t.prototype,"setText",null),mn([it],t.prototype,"updateText",null),mn([it],t.prototype,"setAnchors",null),mn([it],t.prototype,"setSelected",null),mn([it],t.prototype,"setHovered",null),mn([it],t.prototype,"setHitable",null),mn([it],t.prototype,"setHittable",null),mn([it],t.prototype,"openEdgeAnimation",null),mn([it],t.prototype,"closeEdgeAnimation",null),mn([it],t.prototype,"setElementState",null),mn([it],t.prototype,"updateStartPoint",null),mn([it],t.prototype,"moveStartPoint",null),mn([it],t.prototype,"updateEndPoint",null),mn([it],t.prototype,"moveEndPoint",null),mn([it],t.prototype,"setZIndex",null),mn([it],t.prototype,"initPoints",null),mn([it],t.prototype,"updateAttributes",null),mn([it],t.prototype,"getAdjustStart",null),mn([it],t.prototype,"getAdjustEnd",null),mn([it],t.prototype,"updateAfterAdjustStartAndEnd",null),t}(),Ize=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sh=globalThis&&globalThis.__assign||function(){return Sh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Sh.apply(this,arguments)},Fl=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},KT=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},YP=function(t){Ize(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=qn.BEZIER_EDGE,i.path="",i.initEdgeData(n),i.setAttributes(),i}return e.prototype.initEdgeData=function(n){this.offset=100,t.prototype.initEdgeData.call(this,n)},e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.bezier,r=t.prototype.getEdgeStyle.call(this),i=this.properties.style,o=i===void 0?{}:i;return Sh(Sh(Sh({},r),Nn(n)),Nn(o))},e.prototype.getTextPosition=function(){if(this.pointsList&&this.pointsList.length>0){var n=0,r=0;return this.pointsList.forEach(function(i){var o=i.x,a=i.y;n+=o,r+=a}),{x:n/this.pointsList.length,y:r/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}},e.prototype.getData=function(){var n=t.prototype.getData.call(this),r=this.pointsList.map(function(i){var o=i.x,a=i.y;return{x:o,y:a}});return Sh(Sh({},n),{pointsList:r})},e.prototype.getControls=function(){var n=this.startPoint,r=this.endPoint,i=u6({start:n,end:r,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset});return i},e.prototype.getPath=function(n){var r=KT(n,4),i=r[0],o=r[1],a=r[2],s=r[3];return"M ".concat(i.x," ").concat(i.y,`
- C `).concat(o.x," ").concat(o.y,`,
- `).concat(a.x," ").concat(a.y,`,
- `).concat(s.x," ").concat(s.y)},e.prototype.initPoints=function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=this.getControls(),r=n.sNext,i=n.ePre;this.updatePath(r,i)},e.prototype.updatePath=function(n,r){n=Nn(n),r=Nn(r);var i={x:this.startPoint.x,y:this.startPoint.y},o={x:this.endPoint.x,y:this.endPoint.y};if(!n||!r){var a=this.getControls();n=a.sNext,r=a.ePre}this.pointsList=[i,n,r,o],this.path=this.getPath(this.pointsList)},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,r){this.startPoint.x+=n,this.startPoint.y+=r;var i=KT(this.pointsList,3),o=i[1],a=i[2];o.x+=n,o.y+=r,this.updatePath(o,a)},e.prototype.moveEndPoint=function(n,r){this.endPoint.x+=n,this.endPoint.y+=r;var i=KT(this.pointsList,3),o=i[1],a=i[2];a.x+=n,a.y+=r,this.updatePath(o,a)},e.prototype.updateAdjustAnchor=function(n,r){var i;r==="sNext"?this.pointsList[1]=n:r==="ePre"&&(this.pointsList[2]=n),this.path=this.getPath(this.pointsList),!((i=this.text)===null||i===void 0)&&i.value&&this.setText(Nr({},this.text,this.textPosition))},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var r=n.startPoint,i=n.endPoint,o=n.sourceNode,a=n.targetNode,s=u6({start:r,end:i,sourceNode:o,targetNode:a,offset:this.offset}),l=s.sNext,u=s.ePre;this.pointsList=[r,l,u,i],this.initPoints()},Fl([st],e.prototype,"path",void 0),Fl([it],e.prototype,"initPoints",null),Fl([it],e.prototype,"updatePoints",null),Fl([it],e.prototype,"updateStartPoint",null),Fl([it],e.prototype,"updateEndPoint",null),Fl([it],e.prototype,"moveStartPoint",null),Fl([it],e.prototype,"moveEndPoint",null),Fl([it],e.prototype,"updateAdjustAnchor",null),Fl([it],e.prototype,"getAdjustStart",null),Fl([it],e.prototype,"getAdjustEnd",null),Fl([it],e.prototype,"updateAfterAdjustStartAndEnd",null),e}(wC),Bze=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ry=globalThis&&globalThis.__assign||function(){return Ry=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ry.apply(this,arguments)},_6=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Fze=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},O6=function(t){Bze(e,t);function e(){var n=t.apply(this,Fze([],_6(arguments),!1))||this;return n.modelType=qn.LINE_EDGE,n}return e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.line,r=t.prototype.getEdgeStyle.call(this),i=this.properties.style,o=i===void 0?{}:i;return Ry(Ry(Ry({},r),Nn(n)),Nn(o))},e.prototype.initEdgeData=function(n){t.prototype.initEdgeData.call(this,n),this.points=this.getPath([this.startPoint,this.endPoint])},e.prototype.getPath=function(n){var r=_6(n,2),i=r[0],o=r[1];return"".concat(i.x,",").concat(i.y," ").concat(o.x,",").concat(o.y)},e.prototype.getTextPosition=function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}},e}(wC),Vze=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$y=globalThis&&globalThis.__assign||function(){return $y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},$y.apply(this,arguments)},Go=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},w6=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},jze=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},j0=function(t){Vze(e,t);function e(){var n=t.apply(this,jze([],w6(arguments),!1))||this;return n.modelType=qn.POLYLINE_EDGE,n.draggingPointList=[],n}return e.prototype.initEdgeData=function(n){this.offset=30,n.pointsList&&(this.pointsList=n.pointsList),t.prototype.initEdgeData.call(this,n)},e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.polyline,r=t.prototype.getEdgeStyle.call(this),i=this.properties.style,o=i===void 0?{}:i;return $y($y($y({},r),Nn(n)),Nn(o))},e.prototype.getTextPosition=function(){var n,r=(n=this.text)===null||n===void 0?void 0:n.value;if(this.dbClickPosition&&!r){var i=this.dbClickPosition,o=i.x,a=i.y;return{x:o,y:a}}var s=up(this.points),l=w6(I9e(s),2),u=l[0],c=l[1];return{x:(u.x+c.x)/2,y:(u.y+c.y)/2}},e.prototype.getAfterAnchor=function(n,r,i){var o,a;return i.forEach(function(s){var l;n===di.HORIZONTAL?l=Math.abs(r.y-s.y):n===di.VERTICAL&&(l=Math.abs(r.x-s.x)),(!a||a>l)&&(a=l,o=s)}),o},e.prototype.getCrossPoint=function(n,r,i){var o;return n===di.HORIZONTAL?o={x:i.x,y:r.y}:n===di.VERTICAL&&(o={x:r.x,y:i.y}),o},e.prototype.removeCrossPoints=function(n,r,i){var o=i.map(function(b){return b});if(n===1){var a=o[n],s=o[r],l=o[n-1],u=o6(l,a,this.sourceNode);if(u){var c=a6(a,s,this.sourceNode);if(c){var d=s6(a,s,this.sourceNode);d&&(o[n]=d,o.splice(n-1,1),n--,r--)}}else{var f=this.sourceNode.anchors;f.forEach(function(b){if(b.x===l.x&&b.x===a.x||b.y===l.y&&b.y===a.y){var w=Jl(b.x,b.y,a.x,a.y),O=Jl(l.x,l.y,a.x,a.y);w<O&&(o[n-1]=b)}})}}if(r===i.length-2){var h=o[n],g=o[r],m=o[r+1],y=o6(g,m,this.targetNode);if(y){var c=a6(h,g,this.targetNode);if(c){var d=s6(h,g,this.targetNode);d&&(o[r]=d,o.splice(r+1,1))}}else{var f=this.targetNode.anchors;f.forEach(function(w){if(w.x===m.x&&w.x===g.x||w.y===m.y&&w.y===g.y){var O=Jl(w.x,w.y,g.x,g.y),x=Jl(m.x,m.y,g.x,g.y);O<x&&(o[r+1]=w)}})}}return o},e.prototype.getDraggingPoints=function(n,r,i,o,a){var s=a.map(function(c){return c}),l=this.getAfterAnchor(n,i,o),u=this.getCrossPoint(n,i,l);return r==="start"?(s.unshift(u),s.unshift(l)):(s.push(u),s.push(l)),s},e.prototype.updateCrossPoints=function(n){var r=n.map(function(w){return w}),i=n[0],o=n[1],a=n[r.length-2],s=n[r.length-1],l=this,u=l.sourceNode,c=l.targetNode,d=u.modelType,f=c.modelType,h=qw(i,o),g=r[0];switch(d){case qn.RECT_NODE:if(u.radius!==0){var m=p6(i,u);m||(g=h6(i,h,u))}break;case qn.CIRCLE_NODE:g=jP(i,h,u);break;case qn.ELLIPSE_NODE:g=g6(i,h,u);break;case qn.DIAMOND_NODE:g=kO(i,h,u);break;case qn.POLYGON_NODE:g=kO(i,h,u);break}g&&(r[0]=g);var y=qw(a,s),b=r[r.length-1];switch(f){case qn.RECT_NODE:if(c.radius!==0){var m=p6(s,c);m||(b=h6(s,y,c))}break;case qn.CIRCLE_NODE:b=jP(s,y,c);break;case qn.ELLIPSE_NODE:b=g6(s,y,c);break;case qn.DIAMOND_NODE:b=kO(s,y,c);break;case qn.POLYGON_NODE:b=kO(s,y,c);break}return b&&(r[r.length-1]=b),r},e.prototype.updatePath=function(n){this.pointsList=n,this.points=this.getPath(this.pointsList)},e.prototype.getData=function(){var n=t.prototype.getData.call(this),r=this.pointsList.map(function(i){var o=i.x,a=i.y;return{x:o,y:a}});return Object.assign({},n,{pointsList:r})},e.prototype.getPath=function(n){return n.map(function(r){return"".concat(r.x,",").concat(r.y)}).join(" ")},e.prototype.initPoints=function(){this.pointsList.length>0?this.points=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=i6({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=n,this.points=n.map(function(r){return"".concat(r.x,",").concat(r.y)}).join(" ")},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,r){this.startPoint.x+=n,this.startPoint.y+=r,this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveEndPoint=function(n,r){this.endPoint.x+=n,this.endPoint.y+=r,this.updatePoints()},e.prototype.updatePointsList=function(n,r){this.pointsList.forEach(function(a){a.x+=n,a.y+=r});var i=this.pointsList[0];this.startPoint=Object.assign({},i);var o=this.pointsList[this.pointsList.length-1];this.endPoint=Object.assign({},o),this.initPoints()},e.prototype.dragAppendStart=function(){this.draggingPointList=this.pointsList.map(function(n){return n})},e.prototype.dragAppendSimple=function(n,r){var i;this.isDragging=!0;var o=n.start,a=n.end,s=n.startIndex,l=n.endIndex,u=n.direction,c=this.pointsList,d=c;return u===di.HORIZONTAL?(c[s]={x:o.x,y:o.y+r.y},c[l]={x:a.x,y:a.y+r.y},d=this.pointsList.map(function(f){return f})):u===di.VERTICAL&&(c[s]={x:o.x+r.x,y:o.y},c[l]={x:a.x+r.x,y:a.y},d=this.pointsList.map(function(f){return f})),this.updatePointsAfterDrag(d),this.draggingPointList=d,!((i=this.text)===null||i===void 0)&&i.value&&this.setText(Nr({},this.text,this.textPosition)),{start:Nr({},c[s]),end:Nr({},c[l]),startIndex:s,endIndex:l,direction:u}},e.prototype.dragAppend=function(n,r){var i;this.isDragging=!0;var o=n.start,a=n.end,s=n.startIndex,l=n.endIndex,u=n.direction,c=this.pointsList;if(u===di.HORIZONTAL){c[s]={x:o.x,y:o.y+r.y},c[l]={x:a.x,y:a.y+r.y};var d=this.pointsList.map(function(y){return y});if(s!==0&&l!==this.pointsList.length-1&&(d=this.removeCrossPoints(s,l,d)),s===0){var f={x:o.x,y:o.y+r.y},h=qd(f,this.sourceNode);if(!h){var g=this.sourceNode.anchors;d=this.getDraggingPoints(u,"start",f,g,d)}}if(l===this.pointsList.length-1){var m={x:a.x,y:a.y+r.y},h=qd(m,this.targetNode);if(!h){var g=this.targetNode.anchors;d=this.getDraggingPoints(u,"end",m,g,d)}}this.updatePointsAfterDrag(d),this.draggingPointList=d}else if(u===di.VERTICAL){c[s]={x:o.x+r.x,y:o.y},c[l]={x:a.x+r.x,y:a.y};var d=this.pointsList.map(function(b){return b});if(s!==0&&l!==this.pointsList.length-1&&(d=this.removeCrossPoints(s,l,d)),s===0){var f={x:o.x+r.x,y:o.y},h=qd(f,this.sourceNode);if(!h){var g=this.sourceNode.anchors;d=this.getDraggingPoints(u,"start",f,g,d)}}if(l===this.pointsList.length-1){var m={x:a.x+r.x,y:a.y},h=qd(m,this.targetNode);if(!h){var g=this.targetNode.anchors;d=this.getDraggingPoints(u,"end",m,g,d)}}this.updatePointsAfterDrag(d),this.draggingPointList=d}return!((i=this.text)===null||i===void 0)&&i.value&&this.setText(Nr({},this.text,this.textPosition)),{start:Nr({},c[s]),end:Nr({},c[l]),startIndex:s,endIndex:l,direction:u}},e.prototype.dragAppendEnd=function(){if(this.draggingPointList){var n=GZ(up(this.points));this.pointsList=n.map(function(o){return o}),this.draggingPointList=[];var r=n[0];this.startPoint=Nr({},r);var i=n[n.length-1];this.endPoint=Nr({},i)}this.isDragging=!1},e.prototype.updatePointsAfterDrag=function(n){var r=this.updateCrossPoints(n);this.points=r.map(function(i){return"".concat(i.x,",").concat(i.y)}).join(" ")},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var r=n.startPoint,i=n.endPoint,o=n.sourceNode,a=n.targetNode;this.pointsList=i6({x:r.x,y:r.y},{x:i.x,y:i.y},o,a,this.offset||0),this.initPoints()},Go([st],e.prototype,"dbClickPosition",void 0),Go([it],e.prototype,"initPoints",null),Go([it],e.prototype,"updatePoints",null),Go([it],e.prototype,"updateStartPoint",null),Go([it],e.prototype,"moveStartPoint",null),Go([it],e.prototype,"updateEndPoint",null),Go([it],e.prototype,"moveEndPoint",null),Go([it],e.prototype,"updatePointsList",null),Go([it],e.prototype,"dragAppendStart",null),Go([it],e.prototype,"dragAppendSimple",null),Go([it],e.prototype,"dragAppend",null),Go([it],e.prototype,"dragAppendEnd",null),Go([it],e.prototype,"updatePointsAfterDrag",null),Go([it],e.prototype,"getAdjustStart",null),Go([it],e.prototype,"getAdjustEnd",null),Go([it],e.prototype,"updateAfterAdjustStartAndEnd",null),e}(wC),ro=globalThis&&globalThis.__assign||function(){return ro=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ro.apply(this,arguments)},En=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},x6=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Qze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Wf=function(){function t(e,n){var r;this.BaseType=xi.NODE,this.id="",this.type="",this.x=0,this.y=0,this.textMode=gl.TEXT,this.text={value:"",x:0,y:0,draggable:!1,editable:!0},this._width=100,this._height=80,this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.anchorsOffset=[],this.virtual=!1,this.isSelected=!1,this.isHovered=!1,this.isShowAnchor=!1,this.isDragging=!1,this.isHitable=!0,this.isHittable=!0,this.draggable=!0,this.visible=!0,this.rotatable=!0,this.resizable=!0,this.zIndex=1,this.state=Er.DEFAULT,this.autoToFront=!0,this.style={},this._rotate=0,this.modelType=qn.NODE,this.additionStateData={},this.targetRules=[],this.sourceRules=[],this.moveRules=[],this.resizeRules=[],this.hasSetTargetRules=!1,this.hasSetSourceRules=!1,this.graphModel=n,this.properties=(r=e.properties)!==null&&r!==void 0?r:{},this.initNodeData(e),this.setAttributes()}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e;var n=this,r=n.x,i=r===void 0?0:r,o=n.y,a=o===void 0?0:o;this.transform=new OC(-i,-a).rotate(e).translate(i,a).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"incoming",{get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"outgoing",{get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}},enumerable:!1,configurable:!0}),t.prototype.initNodeData=function(e){if(e.properties||(e.properties={}),!e.id){var n=this.graphModel.idGenerator,r=n&&n(e.type),i=this.createId();e.id=i||r||sf()}this.formatText(e),Nr(this,Y9e(e));var o=this.graphModel.overlapMode;o===ql.INCREASE&&(this.zIndex=e.zIndex||UN())},t.prototype.setAttributes=function(){},t.prototype.createId=function(){return null},t.prototype.setTextMode=function(e){this.textMode=e},t.prototype.formatText=function(e){var n,r,i,o=this.graphModel.editConfigModel,a=o.nodeTextDraggable,s=o.nodeTextEdit,l=e.x,u=e.y,c=e.text,d={value:"",x:l,y:u,draggable:a,editable:s};c&&(typeof c=="string"?d.value=c:(d=ro(ro({},d),{x:(n=c.x)!==null&&n!==void 0?n:l,y:(r=c.y)!==null&&r!==void 0?r:u,value:(i=c.value)!==null&&i!==void 0?i:""}),qc(c.draggable)||(d.draggable=c.draggable),qc(c.editable)||(d.editable=c.editable))),e.text=d},t.prototype.resize=function(e){var n=e.width,r=e.height,i=e.deltaX,o=e.deltaY,a=this.isAllowResizeNode(i,o,n,r);return a?(this.move(i/2,o/2),this.width=n,this.height=r,this.setProperties({width:n,height:r}),this.getData()):this.getData()},t.prototype.proportionalResize=function(){},t.prototype.getData=function(){var e=this.text,n=e.x,r=e.y,i=e.value,o=this.properties;mm(o)&&(o=Hl(o)),Lr(o.width)&&(o.width=this.width),Lr(o.height)&&(o.height=this.height);var a={id:this.id,type:this.type,x:this.x,y:this.y,properties:o};return this.rotate&&(a.rotate=this.rotate),this.graphModel.overlapMode===ql.INCREASE&&(a.zIndex=this.zIndex),i&&(a.text={x:n,y:r,value:i}),a},t.prototype.getHistoryData=function(){return this.getData()},t.prototype.getProperties=function(){return Hl(this.properties)},t.prototype.getOuterGAttributes=function(){return{className:""}},t.prototype.getNodeStyle=function(){return ro(ro({},this.graphModel.theme.baseNode),this.style)},t.prototype.getTextStyle=function(){var e=this.graphModel.theme.nodeText,n=this.properties.textStyle,r=n===void 0?{}:n;return ro(ro({},Nn(e)),Nn(r))},t.prototype.getRotateControlStyle=function(){var e=this.graphModel.theme.rotateControl;return Nn(e)},t.prototype.getResizeControlStyle=function(){var e=this.graphModel.theme.resizeControl;return Nn(e)},t.prototype.getResizeOutlineStyle=function(){var e=this.graphModel.theme.resizeOutline;return Nn(e)},t.prototype.getAnchorStyle=function(e){var n=this.graphModel.theme.anchor;return Nn(n)},t.prototype.getAnchorLineStyle=function(e){var n=this.graphModel.theme.anchorLine;return Nn(n)},t.prototype.getOutlineStyle=function(){var e=this.graphModel.theme.outline;return Nn(e)},t.prototype.isAllowConnectedAsSource=function(e,n,r,i){var o=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var a=!0,s="",l=0;l<o.length;l++){var u=o[l];if(!u.validate.call(this,this,e,n,r,i)){a=!1,s=u.message;break}}return{isAllPass:a,msg:s}},t.prototype.getConnectedSourceRules=function(){return this.sourceRules},t.prototype.isAllowConnectedAsTarget=function(e,n,r,i){var o=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var a=!0,s="",l=0;l<o.length;l++){var u=o[l];if(!u.validate.call(this,e,this,n,r,i)){a=!1,s=u.message;break}}return{isAllPass:a,msg:s}},t.prototype.isAllowMoveNode=function(e,n){var r,i,o=!0,a=!0,s=this.moveRules.concat(this.graphModel.nodeMoveRules);try{for(var l=x6(s),u=l.next();!u.done;u=l.next()){var c=u.value,d=c(this,e,n);if(!d)return!1;if(typeof d=="object"){var f=d;if(!f.x&&!f.y)return!1;o=o&&f.x,a=a&&f.y}}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return{x:o,y:a}},t.prototype.getConnectedTargetRules=function(){return this.targetRules},t.prototype.getAnchorsByOffset=function(){var e=this,n=e.anchorsOffset,r=e.id,i=e.x,o=e.y;return n&&n.length>0?n.map(function(a,s){return a.length?(a=a,{id:"".concat(r,"_").concat(s),x:i+a[0],y:o+a[1]}):(a=a,ro(ro({},a),{x:i+a.x,y:o+a.y,id:a.id||"".concat(r,"_").concat(s)}))}):this.getDefaultAnchor()},t.prototype.getDefaultAnchor=function(){return[]},t.prototype.getTargetAnchor=function(e){return X9e(e,this)},t.prototype.getBounds=function(){return{minX:this.x-this.width/2,minY:this.y-this.height/2,maxX:this.x+this.width/2,maxY:this.y+this.height/2}},Object.defineProperty(t.prototype,"anchors",{get:function(){var e=this.getAnchorsByOffset(),n=this,r=n.x,i=n.y,o=n.rotate;return e.forEach(function(a){var s=a.x,l=a.y,u=Qze(new _C([s,l,1]).translate(-r,-i).rotate(o).translate(r,i)[0],2),c=u[0],d=u[1];a.x=c,a.y=d}),e},enumerable:!1,configurable:!0}),t.prototype.getAnchorInfo=function(e){if(!Lr(e))for(var n=0;n<this.anchors.length;n++){var r=this.anchors[n];if(r.id===e)return r}},t.prototype.addNodeMoveRules=function(e){this.moveRules.includes(e)||this.moveRules.push(e)},t.prototype.isAllowMoveByXORY=function(e,n,r){var i,o;if(r)i=!0,o=!0;else{var a=this.isAllowMoveNode(e,n);typeof a=="boolean"?(i=a,o=a):(i=a.x,o=a.y)}return{isAllowMoveX:i,isAllowMoveY:o}},t.prototype.move=function(e,n,r){r===void 0&&(r=!1);var i=this.isAllowMoveByXORY(e,n,r),o=i.isAllowMoveX,a=i.isAllowMoveY;return o&&(this.x=this.x+e,this.text&&this.moveText(e,0)),a&&(this.y=this.y+n,this.text&&this.moveText(0,n)),(o||a)&&(this.rotate=this._rotate),o||a},t.prototype.getMoveDistance=function(e,n,r){r===void 0&&(r=!1);var i=this.isAllowMoveByXORY(e,n,r),o=i.isAllowMoveX,a=i.isAllowMoveY,s=0,l=0;return o&&e&&(this.x=this.x+e,this.text&&this.moveText(e,0),s=e),a&&n&&(this.y=this.y+n,this.text&&this.moveText(0,n),l=n),[s,l]},t.prototype.moveTo=function(e,n,r){r===void 0&&(r=!1);var i=e-this.x,o=n-this.y;return!r&&!this.isAllowMoveNode(i,o)?!1:(this.text&&this.moveText(i,o),this.x=e,this.y=n,!0)},t.prototype.moveText=function(e,n){var r=this.text,i=r.x,o=r.y,a=r.value,s=r.draggable,l=r.editable;this.text={value:a,editable:l,draggable:s,x:i+e,y:o+n}},t.prototype.updateText=function(e){this.text=ro(ro({},Hl(this.text)),{value:e})},t.prototype.addNodeResizeRules=function(e){this.resizeRules.includes(e)||this.resizeRules.push(e)},t.prototype.isAllowResizeNode=function(e,n,r,i){var o,a,s=this.resizeRules.concat(this.graphModel.nodeResizeRules);try{for(var l=x6(s),u=l.next();!u.done;u=l.next()){var c=u.value,d=c(this,e,n,r,i);if(!d)return!1}}catch(f){o={error:f}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}return!0},t.prototype.setSelected=function(e){e===void 0&&(e=!0),this.isSelected=e},t.prototype.setHovered=function(e){e===void 0&&(e=!0),this.isHovered=e,this.setIsShowAnchor(e)},t.prototype.setIsShowAnchor=function(e){e===void 0&&(e=!0),this.isShowAnchor=e},t.prototype.setRotatable=function(e){e===void 0&&(e=!0),this.rotatable=e},t.prototype.setResizable=function(e){e===void 0&&(e=!0),this.resizable=e},t.prototype.setHitable=function(e){e===void 0&&(e=!0),this.isHitable=e},t.prototype.setHittable=function(e){e===void 0&&(e=!0),this.isHittable=e},t.prototype.setElementState=function(e,n){this.state=e,this.additionStateData=n},t.prototype.updateProperties=function(e,n){var r=Hl(this.properties);this.properties=e,this.setAttributes(),this.graphModel.eventCenter.emit(cn.NODE_PROPERTIES_CHANGE,{id:this.id,keys:n,preProperties:r,properties:e})},t.prototype.setProperty=function(e,n){var r=Hl(this.properties),i=Nn(r);qR(i,e,ra(n)),this.updateProperties(i,[e])},t.prototype.setProperties=function(e){var n=Hl(this.properties),r=ro(ro({},n),ra(e)),i=[];ez(e,function(o,a){(Xg(n,a)&&n[a]!==o||!Xg(n,a))&&i.push(a)}),this.updateProperties(r,i)},t.prototype.deleteProperty=function(e){delete this.properties[e],this.setAttributes()},t.prototype.setStyle=function(e,n){var r;this.style=ro(ro({},this.style),(r={},r[e]=ra(n),r))},t.prototype.setStyles=function(e){this.style=ro(ro({},this.style),ra(e))},t.prototype.updateStyles=function(e){this.style=ro({},ra(e))},t.prototype.setZIndex=function(e){e===void 0&&(e=1),this.zIndex=e},t.prototype.updateAttributes=function(e){Nr(this,e)},t.BaseType=xi.NODE,En([st],t.prototype,"type",void 0),En([st],t.prototype,"x",void 0),En([st],t.prototype,"y",void 0),En([st],t.prototype,"textMode",void 0),En([st],t.prototype,"text",void 0),En([st],t.prototype,"properties",void 0),En([st],t.prototype,"_width",void 0),En([st],t.prototype,"_height",void 0),En([st],t.prototype,"anchorsOffset",void 0),En([st],t.prototype,"isSelected",void 0),En([st],t.prototype,"isHovered",void 0),En([st],t.prototype,"isShowAnchor",void 0),En([st],t.prototype,"isDragging",void 0),En([st],t.prototype,"isHitable",void 0),En([st],t.prototype,"isHittable",void 0),En([st],t.prototype,"draggable",void 0),En([st],t.prototype,"visible",void 0),En([st],t.prototype,"rotatable",void 0),En([st],t.prototype,"resizable",void 0),En([st],t.prototype,"zIndex",void 0),En([st],t.prototype,"state",void 0),En([st],t.prototype,"autoToFront",void 0),En([st],t.prototype,"style",void 0),En([st],t.prototype,"transform",void 0),En([st],t.prototype,"_rotate",void 0),En([Gr],t.prototype,"incoming",null),En([Gr],t.prototype,"outgoing",null),En([it],t.prototype,"setTextMode",null),En([it],t.prototype,"addNodeMoveRules",null),En([it],t.prototype,"move",null),En([it],t.prototype,"getMoveDistance",null),En([it],t.prototype,"moveTo",null),En([it],t.prototype,"moveText",null),En([it],t.prototype,"updateText",null),En([it],t.prototype,"addNodeResizeRules",null),En([it],t.prototype,"setSelected",null),En([it],t.prototype,"setHovered",null),En([it],t.prototype,"setIsShowAnchor",null),En([it],t.prototype,"setRotatable",null),En([it],t.prototype,"setResizable",null),En([it],t.prototype,"setHitable",null),En([it],t.prototype,"setHittable",null),En([it],t.prototype,"setElementState",null),En([it],t.prototype,"setProperty",null),En([it],t.prototype,"setProperties",null),En([it],t.prototype,"deleteProperty",null),En([it],t.prototype,"setStyle",null),En([it],t.prototype,"setStyles",null),En([it],t.prototype,"updateStyles",null),En([it],t.prototype,"setZIndex",null),En([it],t.prototype,"updateAttributes",null),t}(),zze=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ny=globalThis&&globalThis.__assign||function(){return Ny=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ny.apply(this,arguments)},JT=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},ex=function(t){zze(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=qn.CIRCLE_NODE,i.r=50,i.initNodeData(n),i.setAttributes(),i}return Object.defineProperty(e.prototype,"width",{get:function(){return this.r*2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.r*2},enumerable:!1,configurable:!0}),e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties.r;n&&(this.r=n)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.circle,i=this.properties.style,o=i===void 0?{}:i;return Ny(Ny(Ny({},n),Nn(r)),Nn(o))},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.r;return[{x:r,y:i-o,id:"".concat(this.id,"_0")},{x:r+o,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+o,id:"".concat(this.id,"_2")},{x:r-o,y:i,id:"".concat(this.id,"_3")}]},e.prototype.resize=function(n){var r=n.width,i=n.deltaX,o=n.deltaY;return this.move(i/2,o/2),this.r=r,this.setProperties({r}),this.getData()},JT([st],e.prototype,"r",void 0),JT([Gr],e.prototype,"width",null),JT([Gr],e.prototype,"height",null),e}(Wf),Wze=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dy=globalThis&&globalThis.__assign||function(){return Dy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Dy.apply(this,arguments)},Kp=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},AO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},GP=function(t){Wze(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=qn.DIAMOND_NODE,i.rx=30,i.ry=50,i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.rx,i=n.ry;r&&(this.rx=r),i&&(this.ry=i)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.diamond,i=this.properties.style,o=i===void 0?{}:i;return Dy(Dy(Dy({},n),Nn(r)),Nn(o))},Object.defineProperty(e.prototype,"points",{get:function(){var n=this,r=n.x,i=n.y,o=n.rx,a=n.ry;return[[r,i-a],[r+o,i],[r,i+a],[r-o,i]]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pointsPosition",{get:function(){return Ca(this.points,function(n){var r=AO(n,2),i=r[0],o=r[1];return{x:i,y:o}})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return In(this.points,function(i){var o=AO(i,1),a=o[0];a<n&&(n=a),a>r&&(r=a)}),r-n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return In(this.points,function(i){var o=AO(i,2),a=o[1];a<n&&(n=a),a>r&&(r=a)}),r-n},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this;return Ca(this.points,function(r,i){var o=AO(r,2),a=o[0],s=o[1];return{x:a,y:s,id:"".concat(n.id,"_").concat(i)}})},e.prototype.resize=function(n){var r=n.width,i=n.height,o=n.deltaX,a=n.deltaY;return this.move(o/2,a/2),this.rx=r,this.ry=i,this.setProperties({rx:r,ry:i}),this.getData()},Kp([st],e.prototype,"rx",void 0),Kp([st],e.prototype,"ry",void 0),Kp([Gr],e.prototype,"points",null),Kp([Gr],e.prototype,"pointsPosition",null),Kp([Gr],e.prototype,"width",null),Kp([Gr],e.prototype,"height",null),e}(Wf),Hze=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ly=globalThis&&globalThis.__assign||function(){return Ly=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ly.apply(this,arguments)},MO=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},KP=function(t){Hze(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=qn.ELLIPSE_NODE,i.rx=30,i.ry=45,i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.rx,i=n.ry;r&&(this.rx=r),i&&(this.ry=i)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.ellipse,i=this.properties.style,o=i===void 0?{}:i;return Ly(Ly(Ly({},n),Nn(r)),Nn(o))},Object.defineProperty(e.prototype,"width",{get:function(){return this.rx*2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.ry*2},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.rx,a=n.ry;return[{x:r,y:i-a,id:"".concat(this.id,"_0")},{x:r+o,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+a,id:"".concat(this.id,"_2")},{x:r-o,y:i,id:"".concat(this.id,"_3")}]},e.prototype.resize=function(n){var r=n.width,i=n.height,o=n.deltaX,a=n.deltaY;return this.move(o/2,a/2),this.rx=r,this.ry=i,this.setProperties({rx:r,ry:i}),this.getData()},MO([st],e.prototype,"rx",void 0),MO([st],e.prototype,"ry",void 0),MO([Gr],e.prototype,"width",null),MO([Gr],e.prototype,"height",null),e}(Wf),Uze=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Iy=globalThis&&globalThis.__assign||function(){return Iy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Iy.apply(this,arguments)},RO=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},$O=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},tx=function(t){Uze(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=qn.POLYGON_NODE,i.points=[[50,0],[100,50],[50,100],[0,50]],i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.points,i=n.width,o=n.height,a=r||this.points;this.points=z9e(a,i,o)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.polygon,i=this.properties.style,o=i===void 0?{}:i;return Iy(Iy(Iy({},n),Nn(r)),Nn(o))},Object.defineProperty(e.prototype,"pointsPosition",{get:function(){var n=this,r=n.x,i=n.y,o=n.width,a=n.height;return this.points.map(function(s){return{x:s[0]+r-o/2,y:s[1]+i-a/2}})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(i){var o=$O(i,1),a=o[0];a<n&&(n=a),a>r&&(r=a)}),r-n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(i){var o=$O(i,2),a=o[1];a<n&&(n=a),a>r&&(r=a)}),r-n},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this,r=this,i=r.x,o=r.y,a=r.width,s=r.height,l=r.points;return l.map(function(u,c){var d=$O(u,2),f=d[0],h=d[1];return{x:i+f-a/2,y:o+h-s/2,id:"".concat(n.id,"_").concat(c)}})},e.prototype.resize=function(n){var r=this,i=n.width,o=n.height,a=n.deltaX,s=n.deltaY;this.move(a/2,s/2);var l=Ca(this.points,function(u){var c=$O(u,2),d=c[0],f=c[1];return[d*i/r.width,f*o/r.height]});return this.points=l,this.properties.points=l,this.getData()},RO([st],e.prototype,"points",void 0),RO([Gr],e.prototype,"pointsPosition",null),RO([Gr],e.prototype,"width",null),RO([Gr],e.prototype,"height",null),e}(Wf),Xze=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),By=globalThis&&globalThis.__assign||function(){return By=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},By.apply(this,arguments)},Zze=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},cp=function(t){Xze(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=qn.RECT_NODE,i.radius=0,i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.width,i=n.height,o=n.radius;Lr(r)||(this.width=r),Lr(i)||(this.height=i),Lr(o)||(this.radius=o)},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.width,a=n.height;return[{x:r,y:i-a/2,id:"".concat(this.id,"_0")},{x:r+o/2,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+a/2,id:"".concat(this.id,"_2")},{x:r-o/2,y:i,id:"".concat(this.id,"_3")}]},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.rect,i=this.properties.style,o=i===void 0?{}:i;return By(By(By({},n),Nn(r)),Nn(o))},Zze([st],e.prototype,"radius",void 0),e}(Wf),qze=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fy=globalThis&&globalThis.__assign||function(){return Fy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Fy.apply(this,arguments)},S6=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Yze=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Gze=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},C6=function(t){qze(e,t);function e(){var n=t.apply(this,Gze([],Yze(arguments),!1))||this;return n.modelType=qn.TEXT_NODE,n}return e.prototype.getTextStyle=function(){var n=t.prototype.getTextStyle.call(this),r=this.graphModel.theme.text,i=this.properties.textStyle;return Fy(Fy(Fy({},n),Nn(r)),Nn(i))},Object.defineProperty(e.prototype,"width",{get:function(){var n=String(this.text.value).split(/[\r\n]/g),r=this.getTextStyle().fontSize,i=v6({rows:n,fontSize:r,rowsLength:n.length}).width;return i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=String(this.text.value).split(/[\r\n]/g),r=this.getTextStyle().fontSize,i=v6({rows:n,fontSize:r,rowsLength:n.length}).height;return i},enumerable:!1,configurable:!0}),S6([Gr],e.prototype,"width",null),S6([Gr],e.prototype,"height",null),e}(Wf),Kze=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),JP=function(t){Kze(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=qn.HTML_NODE,i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.width,i=n.height;r&&(this.width=r),i&&(this.height=i)},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.width,a=n.height;return[{x:r,y:i-a/2,id:"".concat(this.id,"_0")},{x:r+o/2,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+a/2,id:"".concat(this.id,"_2")},{x:r-o/2,y:i,id:"".concat(this.id,"_3")}]},e}(Wf),Ar=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Jze={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,allowRotate:!1,allowResize:!1,nodeSelectedOutline:!0,textEdit:!1,nodeTextEdit:!1,edgeTextEdit:!1,textDraggable:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},NO=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","snapGrid","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustEdgeStart","adjustEdgeEnd","adjustNodePosition","hideAnchors","allowRotate","allowResize","autoExpand","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","textEdit","nodeTextEdit","edgeTextEdit","textDraggable","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","textMode","nodeTextMode","edgeTextMode","nodeTextMultiple","edgeTextMultiple","nodeTextVertical","edgeTextVertical"],eWe=function(){function t(e){this.isSilentMode=!1,this.stopZoomGraph=!1,this.stopMoveGraph=!1,this.stopScrollGraph=!1,this.snapGrid=!1,this.textMode=gl.TEXT,this.textEdit=!0,this.textDraggable=!1,this.nodeTextEdit=!0,this.nodeTextDraggable=!1,this.nodeTextMultiple=!1,this.nodeTextVertical=!1,this.nodeTextMode=gl.TEXT,this.edgeTextMode=gl.TEXT,this.edgeTextEdit=!0,this.edgeTextDraggable=!1,this.edgeTextMultiple=!1,this.edgeTextVertical=!1,this.hideAnchors=!1,this.allowRotate=!1,this.allowResize=!1,this.hoverOutline=!0,this.nodeSelectedOutline=!0,this.adjustNodePosition=!0,this.autoExpand=!1,this.adjustEdge=!0,this.adjustEdgeMiddle=!1,this.adjustEdgeStartAndEnd=!1,this.adjustEdgeStart=!1,this.adjustEdgeEnd=!1,this.edgeSelectedOutline=!0,this.multipleSelectKey="",Nr(this,this.computeConfig(e))}return t.prototype.updateEditConfig=function(e){var n=this.computeConfig(e);Nr(this,n)},t.prototype.computeConfig=function(e){var n=e.isSilentMode,r=e.textDraggable,i=e.textMode,o=e.textEdit,a=e.adjustEdgeStartAndEnd,s={};if(n===!1&&Nr(s,this.stagedConfig),n===!0&&n!==this.isSilentMode){var l=vo(Jze,NO);this.stagedConfig=vo(this,NO),Nr(s,l)}qc(o)||Nr(s,{nodeTextEdit:o,edgeTextEdit:o}),qc(r)||Nr(s,{nodeTextDraggable:r,edgeTextDraggable:r}),i&&Nr(s,{nodeTextMode:i,edgeTextMode:i}),gw(a)&&Nr(s,{adjustEdgeStart:a,adjustEdgeEnd:a});var u=vo(e,NO);return Nr(s,u)},t.prototype.updateTextMode=function(e){this.textMode=e,this.edgeTextMode=e,this.nodeTextMode=e},t.prototype.getConfig=function(){return vo(this,NO)},Ar([st],t.prototype,"isSilentMode",void 0),Ar([st],t.prototype,"stopZoomGraph",void 0),Ar([st],t.prototype,"stopMoveGraph",void 0),Ar([st],t.prototype,"stopScrollGraph",void 0),Ar([st],t.prototype,"snapGrid",void 0),Ar([st],t.prototype,"textMode",void 0),Ar([st],t.prototype,"textEdit",void 0),Ar([st],t.prototype,"textDraggable",void 0),Ar([st],t.prototype,"nodeTextEdit",void 0),Ar([st],t.prototype,"nodeTextDraggable",void 0),Ar([st],t.prototype,"nodeTextMultiple",void 0),Ar([st],t.prototype,"nodeTextVertical",void 0),Ar([st],t.prototype,"nodeTextMode",void 0),Ar([st],t.prototype,"edgeTextMode",void 0),Ar([st],t.prototype,"edgeTextEdit",void 0),Ar([st],t.prototype,"edgeTextDraggable",void 0),Ar([st],t.prototype,"edgeTextMultiple",void 0),Ar([st],t.prototype,"edgeTextVertical",void 0),Ar([st],t.prototype,"hideAnchors",void 0),Ar([st],t.prototype,"allowRotate",void 0),Ar([st],t.prototype,"allowResize",void 0),Ar([st],t.prototype,"hoverOutline",void 0),Ar([st],t.prototype,"nodeSelectedOutline",void 0),Ar([st],t.prototype,"adjustNodePosition",void 0),Ar([st],t.prototype,"autoExpand",void 0),Ar([st],t.prototype,"adjustEdge",void 0),Ar([st],t.prototype,"adjustEdgeMiddle",void 0),Ar([st],t.prototype,"adjustEdgeStartAndEnd",void 0),Ar([st],t.prototype,"adjustEdgeStart",void 0),Ar([st],t.prototype,"adjustEdgeEnd",void 0),Ar([st],t.prototype,"edgeSelectedOutline",void 0),Ar([it],t.prototype,"updateEditConfig",null),Ar([it],t.prototype,"updateTextMode",null),t}(),tWe="*",nWe=function(){function t(){this._events={}}return t.prototype.on=function(e,n,r){var i=this;e==null||e.split(",").forEach(function(o){o=o.trim(),i._events[o]||(i._events[o]=[]),i._events[o].push({callback:n,once:!!r})})},t.prototype.once=function(e,n){var r=this;e==null||e.split(",").forEach(function(i){i=i.trim(),r.on(i,n,!0)})},t.prototype.emit=function(e,n){var r=this;e==null||e.split(",").forEach(function(i){var o=r._events[i]||[],a=r._events[tWe]||[],s=function(l){for(var u=l.length,c=0;c<u;c++)if(!!l[c]){var d=l[c],f=d.callback,h=d.once;h&&(l.splice(c,1),l.length===0&&delete r._events[i],u--,c--),f.apply(r,[n])}};s(o),s(a)})},t.prototype.off=function(e,n){var r=this;e||(this._events={}),e.split(",").forEach(function(i){if(!n)delete r._events[i];else{for(var o=r._events[i]||[],a=o.length,s=0;s<a;s++)o[s].callback===n&&(o.splice(s,1),a--,s--);o.length===0&&delete r._events[i]}})},t.prototype.getEvents=function(){return this._events},t.prototype.destroy=function(){this._events={}},t}(),rWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eA=globalThis&&globalThis.__assign||function(){return eA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},eA.apply(this,arguments)},iWe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},oWe=function(t){rWe(e,t);function e(n){var r=t.call(this)||this;r.stepScrollX=0,r.stepScrollY=0,r.onDragging=function(s){var l=s.deltaX,u=s.deltaY;r.setState({isDragging:!0});var c=r.props.graphModel,d=c.transformModel,f=c.editConfigModel;f.stopMoveGraph!==!0&&d.translate(l,u)},r.onDragEnd=function(){r.setState({isDragging:!1})},r.zoomHandler=function(s){var l=r.props,u=l.graphModel,c=u.editConfigModel,d=u.transformModel,f=u.gridSize,h=l.graphModel,g=s.deltaX,m=s.deltaY,y=c.stopScrollGraph,b=c.stopZoomGraph;if(!y&&!s.ctrlKey&&!s.metaKey){if(s.preventDefault(),r.stepScrollX+=g,r.stepScrollY+=m,Math.abs(r.stepScrollX)>=f){var w=r.stepScrollX%f,O=r.stepScrollX-w;d.translate(-O*d.SCALE_X,0),r.stepScrollX=w}if(Math.abs(r.stepScrollY)>=f){var x=r.stepScrollY%f,S=r.stepScrollY-x;d.translate(0,-S*d.SCALE_Y),r.stepScrollY=x}return}if(!b){s.preventDefault();var C=h.getPointByClient({x:s.clientX,y:s.clientY}),E=C.canvasOverlayPosition,T=E.x,P=E.y;d.zoom(s.deltaY<0,[T,P])}},r.clickHandler=function(s){var l=s.target;if(l.getAttribute("name")==="canvas-overlay"){var u=r.props.graphModel,c=u.selectElements;c.size>0&&u.clearSelectElements(),u.eventCenter.emit(cn.BLANK_CLICK,{e:s})}},r.handleContextMenu=function(s){var l=s.target;if(l.getAttribute("name")==="canvas-overlay"){s.preventDefault();var u=r.props.graphModel,c=u.getPointByClient({x:s.clientX,y:s.clientY});u.eventCenter.emit(cn.BLANK_CONTEXTMENU,{e:s,position:c})}},r.mouseDownHandler=function(s){var l=r.props.graphModel,u=l.eventCenter,c=l.editConfigModel,d=l.transformModel.SCALE_X,f=l.gridSize,h=c.adjustEdge,g=c.adjustNodePosition,m=c.stopMoveGraph,y=s.target,b=!h&&!g;(y.getAttribute("name")==="canvas-overlay"||b)&&(m!==!0?(r.stepDrag.setStep(f*d),r.stepDrag.handleMouseDown(s)):u.emit(cn.BLANK_MOUSEDOWN,{e:s}),r.clickHandler(s))};var i=n.graphModel,o=i.gridSize,a=i.eventCenter;return r.stepDrag=new Al({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:o,eventType:"BLANK",isStopPropagation:!1,eventCenter:a,model:void 0}),r.state={isDragging:!1},r}return e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=n.getTransformStyle().transform,i=this.props,o=i.children,a=i.dnd,s=this.state.isDragging;return rt("svg",eA({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:s?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},a.eventMap(),{children:rt("g",{transform:r,children:o})}))},e=iWe([Ea],e),e}(ur),lq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q0=globalThis&&globalThis.__assign||function(){return Q0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Q0.apply(this,arguments)},aWe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},sWe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},E6=function(t){lq(e,t);function e(){var n=t.call(this)||this;return n.onDragging=function(r){var i=r.event,o=n.props,a=o.graphModel,s=o.bezierModel,l=o.type,u=a.getPointByClient({x:i.clientX,y:i.clientY}).canvasOverlayPosition,c=u.x,d=u.y;s.updateAdjustAnchor({x:c,y:d},l),a.eventCenter.emit(cn.EDGE_ADJUST,{data:s.getData()})},n.onDragEnd=function(){var r=n.props.bezierModel;r.isDragging=!1},n.dragHandler=new Al({onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return e.prototype.render=function(){var n=this,r=this.props.position,i=r.x,o=r.y,a=this.props.bezierModel,s=a.getEdgeStyle().adjustAnchor;return rt(_m,Q0({className:"lf-bezier-adjust-anchor",x:i,y:o},s,{onMouseDown:function(l){n.dragHandler.handleMouseDown(l)}}))},e}(ur),lWe=function(t){lq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getBezierAdjust=function(n,r){var i=n.path,o=n.id,a=zN(i),s=sWe(a,4),l=s[0],u=s[1],c=s[2],d=s[3],f=n.getEdgeStyle().adjustLine,h=[];return h.push(rt(bm,Q0({x1:l.x,y1:l.y,x2:u.x,y2:u.y},f))),h.push(rt(E6,{position:u,bezierModel:n,graphModel:r,type:"sNext"},"".concat(o,"_ePre"))),h.push(rt(bm,Q0({x1:d.x,y1:d.y,x2:c.x,y2:c.y},f))),h.push(rt(E6,{position:c,bezierModel:n,graphModel:r,type:"ePre"},"".concat(o,"_sNext"))),h},e.prototype.selectedBezierEdge=function(){for(var n=this.props.graphModel,r=n.edges,i=[],o=0;o<r.length;o++){var a=r[o];a.isSelected&&a.modelType===qn.BEZIER_EDGE&&a.draggable&&i.push(this.getBezierAdjust(a,n))}return i},e.prototype.render=function(){return rt("g",{className:"lf-bezier-adjust",children:this.selectedBezierEdge()})},e=aWe([Ea],e),e}(ur),uWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cWe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},dWe=function(t){uWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.background;return rt("div",{className:"lf-background",children:rt("div",{style:Oi(n)?n:{},className:"lf-background-area"})})},e=cWe([Ea],e),e}(ur),fWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hWe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},nx=function(t){fWe(e,t);function e(n){var r=t.call(this,n)||this;return r.id=sf(),r.gridOptions=r.props.graphModel.grid,r}return e.prototype.renderDot=function(){var n=this.gridOptions,r=n.config,i=n.size,o=i===void 0?1:i,a=n.visible,s=r!=null?r:{},l=s.color,u=s.thickness,c=u===void 0?2:u,d=Math.min(Math.max(2,c),o/4),f=a?1:0;return rt("g",{fill:l,opacity:f,children:[rt("circle",{cx:0,cy:0,r:d/2}),rt("circle",{cx:0,cy:o,r:d/2}),rt("circle",{cx:o,cy:0,r:d/2}),rt("circle",{cx:o,cy:o,r:d/2})]})},e.prototype.renderMesh=function(){var n=this.gridOptions,r=n.config,i=n.size,o=i===void 0?1:i,a=n.visible,s=r!=null?r:{},l=s.color,u=s.thickness,c=u===void 0?1:u,d=Math.min(Math.max(1,c),o/2),f="M 0 0 H ".concat(o," V ").concat(o," H 0 Z"),h=a?1:0;return rt("path",{d:f,stroke:l,strokeWidth:d/2,opacity:h,fill:"transparent"})},e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=this.gridOptions,i=r.type,o=r.size,a=o===void 0?1:o,s=n.SCALE_X,l=n.SKEW_Y,u=n.SKEW_X,c=n.SCALE_Y,d=n.TRANSLATE_X,f=n.TRANSLATE_Y,h=[s,l,u,c,d,f].join(","),g="matrix(".concat(h,")");return rt("div",{className:"lf-grid",children:rt("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",children:[rt("defs",{children:rt("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:g,x:"0",y:"0",width:a,height:a,children:[i==="dot"&&this.renderDot(),i==="mesh"&&this.renderMesh()]})}),rt("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})]})})},e=hWe([Ea],e),e}(ur);(function(t){t.defaultProps={size:_9e,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};function e(n){var r=Nn(t.defaultProps);return typeof n=="number"?Nr(r,{size:n}):typeof n=="boolean"?Nr(r,{visible:n}):Nr(r,n)}t.getGridOptions=e})(nx||(nx={}));var pWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gWe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},mWe=function(t){pWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=n.getTransformStyle().transform,i=this.props.children;return rt("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay",children:rt("g",{transform:r,children:i})})},e=gWe([Ea],e),e}(ur),vWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ld=globalThis&&globalThis.__assign||function(){return Ld=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ld.apply(this,arguments)},yWe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},bWe=function(t){vWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getNodesOutline=function(){var n=this.props.graphModel,r=n.nodes,i=n.editConfigModel,o=i.hoverOutline,a=i.nodeSelectedOutline,s=[];return r.forEach(function(l){if(l.isHovered||l.isSelected){var u=l.isHovered,c=l.isSelected,d=l.x,f=l.y,h=l.width,g=l.height;if(a&&c||o&&u){var m=l.getOutlineStyle(),y={};if(Object.keys(m).forEach(function(w){w!=="hover"&&(y[w]=m[w])}),u){var b=m.hover;y=Ld(Ld({},y),b)}s.push(rt(sl,Ld({transform:l.transform,className:"lf-outline-node",x:d,y:f,width:h+10,height:g+10},y)))}}}),s},e.prototype.getEdgeOutline=function(){for(var n=this.props.graphModel,r=n.edges,i=n.editConfigModel,o=i.edgeSelectedOutline,a=i.hoverOutline,s=[],l=0;l<r.length;l++){var u=r[l];(o&&u.isSelected||a&&u.isHovered)&&(u.modelType===qn.LINE_EDGE?s.push(this.getLineOutline(u)):u.modelType===qn.POLYLINE_EDGE?s.push(this.getPolylineOutline(u)):u.modelType===qn.BEZIER_EDGE&&s.push(this.getBezierOutline(u)))}return s},e.prototype.getLineOutline=function(n){var r=n.startPoint,i=n.endPoint,o=(r.x+i.x)/2,a=(r.y+i.y)/2,s=Math.abs(r.x-i.x)+10,l=Math.abs(r.y-i.y)+10,u=n.getOutlineStyle();return rt(sl,Ld({className:"lf-outline-edge",x:o,y:a,width:s,height:l},u))},e.prototype.getPolylineOutline=function(n){var r=n.points,i=up(r),o=I0(i,8),a=o.x,s=o.y,l=o.width,u=o.height,c=n.getOutlineStyle();return rt(sl,Ld({className:"lf-outline",x:a,y:s,width:l,height:u},c))},e.prototype.getBezierOutline=function(n){var r=n.path,i=zN(r),o=I0(i,8),a=o.x,s=o.y,l=o.width,u=o.height,c=n.getOutlineStyle();return rt(sl,Ld({className:"lf-outline",x:a,y:s,width:l,height:u},c))},e.prototype.render=function(){return rt("g",{className:"lf-outline",children:[this.getNodesOutline(),this.getEdgeOutline()]})},e=yWe([Ea],e),e}(ur),_We=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Id=globalThis&&globalThis.__assign||function(){return Id=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Id.apply(this,arguments)},OWe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},wWe=function(t){_We(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.snaplineModel,r=n!=null?n:{},i=r.position,o=r.isShowHorizontal,a=r.isShowVertical,s=n==null?void 0:n.getStyle(),l=i!=null?i:{},u=l.x,c=u===void 0?0:u,d=l.y,f=d===void 0?0:d,h=Id(Id({x1:-1e5,y1:f,x2:1e5,y2:f},s),{stroke:o?s==null?void 0:s.stroke:"none"}),g=Id(Id({x1:c,y1:-1e5,x2:c,y2:1e5},s),{stroke:a?s==null?void 0:s.stroke:"none"});return rt("g",{className:"lf-snapline",children:[rt(bm,Id({},h)),rt(bm,Id({},g))]})},e=OWe([Ea],e),e}(ur),xWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),SWe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},CWe=function(t){xWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){this.triggerToolRender()},e.prototype.componentDidUpdate=function(){this.triggerToolRender()},e.prototype.getTools=function(){var n=this.props,r=n.tool,i=n.graphModel,o=i.textEditElement,a=r.getTools(),s=a.map(function(l){return Kt(l,{textEditElement:o,graphModel:i,lf:r.instance})});return r.components=s,s},e.prototype.triggerToolRender=function(){var n=this.props,r=n.tool,i=n.graphModel,o=document.querySelector("#ToolOverlay_".concat(i.flowId)),a=r.getInstance();a.components.forEach(function(s){return s(a,o)}),a.components=[]},e.prototype.render=function(){var n=this.props.graphModel;return rt("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(n.flowId),children:this.getTools()})},e=SWe([Ea],e),e}(ur),Bd=globalThis&&globalThis.__assign||function(){return Bd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Bd.apply(this,arguments)},un=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},EWe=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},go=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ys=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},TWe=function(){function t(e){var n=this,r,i;this.modelMap=new Map,this.nodeModelMap=new Map,this.edgeModelMap=new Map,this.elementsModelMap=new Map,this.nodeMoveRules=[],this.nodeResizeRules=[],this.nodes=[],this.edges=[],this.overlapMode=ql.DEFAULT,this.gridSize=1,this.partial=!1,this.waitCleanEffects=[];var o=e.container,a=e.partial,s=e.background,l=s===void 0?{}:s,u=e.grid,c=e.idGenerator,d=e.edgeGenerator,f=e.animation,h=e.customTrajectory;this.rootEl=o,this.partial=!!a,this.background=l,typeof u=="object"&&e.snapGrid&&(this.gridSize=u.size||1),this.theme=sq(e.style),this.grid=nx.getGridOptions(u!=null?u:!1),this.edgeType=e.edgeType||"polyline",this.animation=v9e(f),this.overlapMode=e.overlapMode||ql.DEFAULT,this.width=(r=e.width)!==null&&r!==void 0?r:this.rootEl.getBoundingClientRect().width,this.isContainerWidth=Lr(e.width),this.height=(i=e.height)!==null&&i!==void 0?i:this.rootEl.getBoundingClientRect().height,this.isContainerHeight=Lr(e.height);var g=new ResizeObserver(Qo(function(m){var y,b;try{for(var w=EWe(m),O=w.next();!O.done;O=w.next()){var x=O.value;x.target===n.rootEl&&(n.resize(),n.eventCenter.emit("graph:resize",{target:n.rootEl,contentRect:x.contentRect}))}}catch(S){y={error:S}}finally{try{O&&!O.done&&(b=w.return)&&b.call(w)}finally{if(y)throw y.error}}},16));g.observe(this.rootEl),this.waitCleanEffects.push(function(){g.disconnect()}),this.eventCenter=new nWe,this.editConfigModel=new eWe(e),this.transformModel=new AWe(this.eventCenter,e),this.flowId=sf(),this.idGenerator=c,this.edgeGenerator=j9e(this,d),this.customTrajectory=h}return Object.defineProperty(t.prototype,"nodesMap",{get:function(){return this.nodes.reduce(function(e,n,r){return e[n.id]={index:r,model:n},e},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"edgesMap",{get:function(){return this.edges.reduce(function(e,n,r){return e[n.id]={index:r,model:n},e},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"modelsMap",{get:function(){return Ys(Ys([],go(this.nodes),!1),go(this.edges),!1).reduce(function(e,n){return e[n.id]=n,e},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sortElements",{get:function(){for(var e=Ys(Ys([],go(this.nodes),!1),go(this.edges),!1).sort(function(s,l){return s.zIndex-l.zIndex}),n=[],r=[-SO,-SO],i=[this.width+SO,this.height+SO],o=0;o<e.length;o++){var a=e[o];a.visible&&(!this.partial||a.isSelected||this.isElementInArea(a,r,i,!1,!1))&&n.push(a)}return n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textEditElement",{get:function(){var e=this.nodes.find(function(r){return r.state===Er.TEXT_EDIT}),n=this.edges.find(function(r){return r.state===Er.TEXT_EDIT});return e||n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectElements",{get:function(){var e=new Map;return this.nodes.forEach(function(n){n.isSelected&&e.set(n.id,n)}),this.edges.forEach(function(n){n.isSelected&&e.set(n.id,n)}),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectNodes",{get:function(){var e=[];return this.nodes.forEach(function(n){n.isSelected&&e.push(n)}),e},enumerable:!1,configurable:!0}),t.prototype.getAreaElement=function(e,n,r,i,o){var a=this;r===void 0&&(r=!0),i===void 0&&(i=!0),o===void 0&&(o=!1);var s=[];return In(Ys(Ys([],go(this.nodes),!1),go(this.edges),!1),function(l){var u=a.isElementInArea(l,e,n,r,i);(!o||l.visible)&&u&&s.push(l)}),s},t.prototype.getModel=function(e){return this.modelMap.get(e)},t.prototype.getNodeModelById=function(e){var n;return this.fakeNode&&e===this.fakeNode.id?this.fakeNode:(n=this.nodesMap[e])===null||n===void 0?void 0:n.model},t.prototype.getPointByClient=function(e){var n=e.x,r=e.y,i=this.rootEl.getBoundingClientRect(),o={x:n-i.left,y:r-i.top},a=go(this.transformModel.HtmlPointToCanvasPoint([o.x,o.y]),2),s=a[0],l=a[1],u={x:s,y:l};return{domOverlayPosition:o,canvasOverlayPosition:u}},t.prototype.isElementInArea=function(e,n,r,i,o){var a;if(i===void 0&&(i=!0),o===void 0&&(o=!0),e.BaseType===xi.NODE){e=e;for(var s=ja(e),l=s.minX,u=s.minY,c=s.maxX,d=s.maxY,f=[{x:l,y:u},{x:c,y:u},{x:c,y:d},{x:l,y:d}],h=o,g=0;g<f.length;g++){var m=f[g],y=m.x,b=m.y;if(a=go(this.transformModel.CanvasPointToHtmlPoint([y,b]),2),y=a[0],b=a[1],YT([y,b],n,r)!==o){h=!o;break}}return h}if(e.BaseType===xi.EDGE){e=e;var w=e.startPoint,O=e.endPoint,x=this.transformModel.CanvasPointToHtmlPoint([w.x,w.y]),S=this.transformModel.CanvasPointToHtmlPoint([O.x,O.y]),C=YT(x,n,r),E=YT(S,n,r);return i?C&&E:C||E}return!1},t.prototype.graphDataToModel=function(e){var n=this;if(!e){this.clearData();return}if(this.elementsModelMap.clear(),this.nodeModelMap.clear(),this.edgeModelMap.clear(),e.nodes?this.nodes=Ca(e.nodes,function(i){var o=n.getModelAfterSnapToGrid(i);return n.elementsModelMap.set(o.id,o),n.nodeModelMap.set(o.id,o),o}):this.nodes=[],e.edges){var r=this.edgeType;this.edges=Ca(e.edges,function(i){var o,a=n.getModel((o=i.type)!==null&&o!==void 0?o:r);if(!a)throw new Error("\u627E\u4E0D\u5230".concat(i.type,"\u5BF9\u5E94\u7684\u8FB9\u3002"));var s=new a(i,n);return n.edgeModelMap.set(s.id,s),n.elementsModelMap.set(s.id,s),s})}else this.edges=[]},t.prototype.modelToGraphData=function(){var e=[];this.edges.forEach(function(r){var i=r.getData();i&&!r.virtual&&e.push(i)});var n=[];return this.nodes.forEach(function(r){var i=r.getData();i&&!r.virtual&&n.push(i)}),{nodes:n,edges:e}},t.prototype.modelToHistoryData=function(){for(var e=!1,n=[],r=0;r<this.nodes.length;r++){var i=this.nodes[r];if(i.isDragging){e=!0;break}else n.push(i.getHistoryData())}if(e)return!1;for(var o=!1,a=[],s=0;s<this.edges.length;s++){var l=this.edges[s];if(l.isDragging){o=!0;break}else a.push(l.getHistoryData())}return o?!1:{nodes:n,edges:a}},t.prototype.getEdgeModelById=function(e){var n;return(n=this.edgesMap[e])===null||n===void 0?void 0:n.model},t.prototype.getElement=function(e){return this.modelsMap[e]},t.prototype.getNodeEdges=function(e){for(var n=[],r=0;r<this.edges.length;r++){var i=this.edges[r],o=i.sourceNodeId===e,a=i.targetNodeId===e;(o||a)&&n.push(i)}return n},t.prototype.getSelectElements=function(e){e===void 0&&(e=!0);var n=this.selectElements,r={nodes:[],edges:[]};return n.forEach(function(i){if(i.BaseType===xi.NODE&&r.nodes.push(i.getData()),i.BaseType===xi.EDGE){var o=i.getData(),a=n.get(o.sourceNodeId)&&n.get(o.targetNodeId);(e||a)&&r.edges.push(o)}}),r},t.prototype.updateAttributes=function(e,n){var r=this.getElement(e);r==null||r.updateAttributes(n)},t.prototype.changeNodeId=function(e,n){return n||(n=sf()),this.nodesMap[n]?(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u5DF2\u5B58\u5728\u8282\u70B9".concat(n,", \u4FEE\u6539\u5931\u8D25")),""):this.nodesMap[e]?(this.edges.forEach(function(r){r.sourceNodeId===e&&(r.sourceNodeId=n),r.targetNodeId===e&&(r.targetNodeId=n)}),this.nodesMap[e].model.id=n,this.nodesMap[n]=this.nodesMap[e],n):(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u627E\u4E0D\u5230\u8282\u70B9".concat(e,", \u4FEE\u6539\u5931\u8D25")),"")},t.prototype.changeEdgeId=function(e,n){return n||(n=sf()),this.edgesMap[n]?(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u5DF2\u5B58\u5728\u8FB9: ".concat(n,", \u4FEE\u6539\u5931\u8D25")),""):this.edgesMap[e]?(this.edges.forEach(function(r){r.id===e&&r.changeEdgeId(n)}),n):(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u627E\u4E0D\u5230\u8FB9: ".concat(n,", \u4FEE\u6539\u5931\u8D25")),"")},t.prototype.getTextModel=function(e){var n=this.editConfigModel,r=n.textMode,i=n.nodeTextMode,o=n.edgeTextMode;if(e.BaseType===xi.NODE)return e.textMode||i||r||gl.TEXT;if(e.BaseType===xi.EDGE)return e.textMode||o||r||gl.TEXT},t.prototype.setTextMode=function(e,n){this.editConfigModel.updateEditConfig({textMode:e})},t.prototype.setFakeNode=function(e){this.fakeNode=e},t.prototype.removeFakeNode=function(){this.fakeNode=null},t.prototype.setModel=function(e,n){return this.modelMap.set(e,n)},t.prototype.toFront=function(e){var n,r,i,o=((n=this.nodesMap[e])===null||n===void 0?void 0:n.model)||((r=this.edgesMap[e])===null||r===void 0?void 0:r.model);o&&(this.overlapMode===ql.DEFAULT&&((i=this.topElement)===null||i===void 0||i.setZIndex(),o.setZIndex(b9e),this.topElement=o),this.overlapMode===ql.INCREASE&&this.setElementZIndex(e,"top"))},t.prototype.setElementZIndex=function(e,n){var r,i,o=((r=this.nodesMap[e])===null||r===void 0?void 0:r.model)||((i=this.edgesMap[e])===null||i===void 0?void 0:i.model);if(o){var a=void 0;typeof n=="number"?a=n:(n==="top"&&(a=UN()),n==="bottom"&&(a=Lze())),o.setZIndex(a)}},t.prototype.deleteNode=function(e){var n=this.nodesMap[e].model,r=n.getData();this.deleteEdgeBySource(e),this.deleteEdgeByTarget(e),this.nodes.splice(this.nodesMap[e].index,1),this.eventCenter.emit(cn.NODE_DELETE,{data:r,model:n})},t.prototype.addNode=function(e,n,r){n===void 0&&(n=cn.NODE_ADD);var i=ra(e),o=i.id;o&&this.nodesMap[o]&&delete i.id;var a=this.getModelAfterSnapToGrid(i);this.nodes.push(a);var s=a.getData(),l={data:s};return r&&(l.e=r),this.eventCenter.emit(n,l),a},t.prototype.getModelAfterSnapToGrid=function(e){var n=this.getModel(e.type),r=this.editConfigModel.snapGrid;if(!n)throw new Error("\u627E\u4E0D\u5230".concat(e.type,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var i=e.x,o=e.y;i&&o&&(e.x=ym(i,this.gridSize,r),e.y=ym(o,this.gridSize,r),typeof e.text=="object"&&e.text!==null&&(e.text.x+=e.x-i,e.text.y+=e.y-o));var a=new n(e,this);return this.nodeModelMap.set(a.id,a),this.elementsModelMap.set(a.id,a),a},t.prototype.cloneNode=function(e){var n=this.getNodeModelById(e),r=n==null?void 0:n.getData();if(r){r.x+=30,r.y+=30,r.id="",typeof r.text=="object"&&r.text!==null&&(r.text.x+=30,r.text.y+=30);var i=this.addNode(r);return i.setSelected(!0),n==null||n.setSelected(!1),i.getData()}},t.prototype.moveNode=function(e,n,r,i){var o;i===void 0&&(i=!1);var a=this.nodesMap[e];if(!a){console.warn("\u4E0D\u5B58\u5728id\u4E3A".concat(e,"\u7684\u8282\u70B9"));return}var s=a.model;o=go(s.getMoveDistance(n,r,i),2),n=o[0],r=o[1],this.moveEdge(e,n,r)},t.prototype.moveNode2Coordinate=function(e,n,r,i){i===void 0&&(i=!1);var o=this.nodesMap[e];if(!o){console.warn("\u4E0D\u5B58\u5728id\u4E3A".concat(e,"\u7684\u8282\u70B9"));return}var a=o.model,s=a.x,l=a.y,u=n-s,c=r-l;this.moveNode(e,u,c,i)},t.prototype.editText=function(e){this.setElementStateById(e,Er.TEXT_EDIT)},t.prototype.addEdge=function(e){var n=ra(e),r=n.type;r||(r=this.edgeType),n.id&&this.edgesMap[n.id]&&delete n.id;var i=this.getModel(r);if(!i)throw new Error("\u627E\u4E0D\u5230".concat(r,"\u5BF9\u5E94\u7684\u8FB9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8FB9\u3002"));var o=new i(Bd(Bd({},n),{type:r}),this);this.edgeModelMap.set(o.id,o),this.elementsModelMap.set(o.id,o);var a=o.getData();return this.edges.push(o),this.eventCenter.emit(cn.EDGE_ADD,{data:a}),o},t.prototype.moveEdge=function(e,n,r){for(var i=0;i<this.edges.length;i++){var o=this.edges[i],a=o.textPosition,s=a.x,l=a.y,u=this.edges[i].sourceNodeId===e,c=this.edges[i].targetNodeId===e;u&&o.moveStartPoint(n,r),c&&o.moveEndPoint(n,r),(u||c)&&this.handleEdgeTextMove(o,s,l)}},t.prototype.handleEdgeTextMove=function(e,n,r){var i;if(e.customTextPosition){e.resetTextPosition();return}if(e.modelType===qn.POLYLINE_EDGE&&((i=e.text)===null||i===void 0?void 0:i.value)){var o=e.text,a=JZ(o,e.points);e.moveText(a.x-o.x,a.y-o.y)}var s=e.textPosition,l=s.x,u=s.y;e.moveText(l-n,u-r)},t.prototype.deleteEdgeBySourceAndTarget=function(e,n){for(var r=0;r<this.edges.length;r++)if(this.edges[r].sourceNodeId===e&&this.edges[r].targetNodeId===n){var i=this.edges[r].getData();this.edges.splice(r,1),r--,this.eventCenter.emit(cn.EDGE_DELETE,{data:i})}},t.prototype.deleteEdgeById=function(e){var n=this.edgesMap[e];if(!!n){var r=this.edgesMap[e].index,i=this.edgesMap[e].model.getData();this.edges.splice(r,1),this.eventCenter.emit(cn.EDGE_DELETE,{data:i})}},t.prototype.deleteEdgeBySource=function(e){for(var n=0;n<this.edges.length;n++)if(this.edges[n].sourceNodeId===e){var r=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(cn.EDGE_DELETE,{data:r})}},t.prototype.deleteEdgeByTarget=function(e){for(var n=0;n<this.edges.length;n++)if(this.edges[n].targetNodeId===e){var r=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(cn.EDGE_DELETE,{data:r})}},t.prototype.setElementStateById=function(e,n,r){this.nodes.forEach(function(i){i.id===e?i.setElementState(n,r):i.setElementState(Er.DEFAULT)}),this.edges.forEach(function(i){i.id===e?i.setElementState(n,r):i.setElementState(Er.DEFAULT)})},t.prototype.updateText=function(e,n){var r=gf(Ys(Ys([],go(this.nodes),!1),go(this.edges),!1),function(i){return i.id===e});r==null||r.updateText(n)},t.prototype.selectNodeById=function(e,n){var r;n===void 0&&(n=!1),n||this.clearSelectElements();var i=(r=this.nodesMap[e])===null||r===void 0?void 0:r.model;i==null||i.setSelected(!0)},t.prototype.selectEdgeById=function(e,n){var r;n===void 0&&(n=!1),n||this.clearSelectElements();var i=(r=this.edgesMap[e])===null||r===void 0?void 0:r.model;i==null||i.setSelected(!0)},t.prototype.selectElementById=function(e,n){n===void 0&&(n=!1),n||this.clearSelectElements();var r=this.getElement(e);r==null||r.setSelected(!0)},t.prototype.clearSelectElements=function(){var e;this.selectElements.forEach(function(n){n==null||n.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===ql.DEFAULT&&((e=this.topElement)===null||e===void 0||e.setZIndex())},t.prototype.moveNodes=function(e,n,r,i){var o,a,s,l=this;i===void 0&&(i=!1);for(var u=e.reduce(function(O,x){var S,C=(S=l.nodesMap[x])===null||S===void 0?void 0:S.model;return C&&(O[x]=C.getMoveDistance(n,r,i)),O},{}),c=0;c<this.edges.length;c++){var d=this.edges[c],f=d.textPosition,h=f.x,g=f.y,m=u[d.sourceNodeId],y=u[d.targetNodeId],b=void 0,w=void 0;m&&y&&d.modelType===qn.POLYLINE_EDGE?(o=go(m,2),b=o[0],w=o[1],d.updatePointsList(b,w)):(m&&(a=go(m,2),b=a[0],w=a[1],d.moveStartPoint(b,w)),y&&(s=go(y,2),b=s[0],w=s[1],d.moveEndPoint(b,w))),(m||y)&&this.handleEdgeTextMove(d,h,g)}},t.prototype.addNodeMoveRules=function(e){this.nodeMoveRules.includes(e)||this.nodeMoveRules.push(e)},t.prototype.addNodeResizeRules=function(e){this.nodeResizeRules.includes(e)||this.nodeResizeRules.push(e)},t.prototype.setDefaultEdgeType=function(e){this.edgeType=e},t.prototype.changeNodeType=function(e,n){var r=this.getNodeModelById(e);if(!r){console.warn("\u627E\u4E0D\u5230id\u4E3A".concat(e,"\u7684\u8282\u70B9"));return}var i=r.getData();i.type=n;var o=this.getModel(n);if(!o)throw new Error("\u627E\u4E0D\u5230".concat(n,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var a=new o(i,this);this.nodes.splice(this.nodesMap[e].index,1,a);var s=this.getNodeEdges(e);s.forEach(function(l){if(l.sourceNodeId===e){var u=m6(a,l.startPoint,a.width,a.height);l.updateStartPoint(u)}if(l.targetNodeId===e){var u=m6(a,l.endPoint,a.width,a.height);l.updateEndPoint(u)}})},t.prototype.changeEdgeType=function(e,n){var r=this.getEdgeModelById(e);if(!r){console.warn("\u627E\u4E0D\u5230id\u4E3A".concat(e,"\u7684\u8FB9"));return}if(r.type!==n){var i=r.getData();i.type=n;var o=this.getModel(n);if(!o)throw new Error("\u627E\u4E0D\u5230".concat(n,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));delete i.pointsList;var a=new o(i,this);this.edges.splice(this.edgesMap[e].index,1,a)}},t.prototype.getNodeIncomingEdge=function(e){var n=[];return this.edges.forEach(function(r){r.targetNodeId===e&&n.push(r)}),n},t.prototype.getNodeOutgoingEdge=function(e){var n=[];return this.edges.forEach(function(r){r.sourceNodeId===e&&n.push(r)}),n},t.prototype.getAnchorIncomingEdge=function(e){var n=[];return this.edges.forEach(function(r){r.targetAnchorId===e&&n.push(r)}),n},t.prototype.getAnchorOutgoingEdge=function(e){var n=[];return this.edges.forEach(function(r){r.sourceAnchorId===e&&n.push(r)}),n},t.prototype.getNodeIncomingNode=function(e){var n=this,r=[];return this.edges.forEach(function(i){var o;i.targetNodeId===e&&r.push((o=n.nodesMap[i.sourceNodeId])===null||o===void 0?void 0:o.model)}),r},t.prototype.getNodeOutgoingNode=function(e){var n=this,r=[];return this.edges.forEach(function(i){i.sourceNodeId===e&&r.push(n.nodesMap[i.targetNodeId].model)}),r},t.prototype.setTheme=function(e){this.theme=$ze(Bd(Bd({},this.theme),e))},t.prototype.updateGridOptions=function(e){mf(this.grid,e)},t.prototype.updateGridSize=function(e){this.gridSize=e},t.prototype.updateBackgroundOptions=function(e){gw(e)||gw(this.background)?this.background=e:this.background=Bd(Bd({},this.background),e)},t.prototype.resize=function(e,n){this.width=e!=null?e:this.rootEl.getBoundingClientRect().width,this.isContainerWidth=Lr(e),this.height=n!=null?n:this.rootEl.getBoundingClientRect().height,this.isContainerHeight=Lr(n),(!this.width||!this.height)&&console.warn("\u6E32\u67D3\u753B\u5E03\u7684\u65F6\u5019\u65E0\u6CD5\u83B7\u53D6\u753B\u5E03\u5BBD\u9AD8\uFF0C\u8BF7\u786E\u8BA4\u5728container\u5DF2\u6302\u8F7D\u5230DOM\u3002@see https://github.com/didi/LogicFlow/issues/675")},t.prototype.clearData=function(){this.nodes=[],this.edges=[],this.edgeModelMap.clear(),this.nodeModelMap.clear(),this.elementsModelMap.clear()},t.prototype.getVirtualRectSize=function(){var e=this.nodes,n=[],r=[];e.forEach(function(f){var h=f.x,g=f.y,m=f.width,y=f.height,b=f.getNodeStyle().strokeWidth,w=b===void 0?0:b,O=h+m/2+w,x=h-m/2-w,S=g+y/2+w,C=g-y/2-w;n=n.concat([O,x].filter(function(E){return!Number.isNaN(E)})),r=r.concat([S,C].filter(function(E){return!Number.isNaN(E)}))});var i=Math.min.apply(Math,Ys([],go(n),!1)),o=Math.max.apply(Math,Ys([],go(n),!1)),a=Math.min.apply(Math,Ys([],go(r),!1)),s=Math.max.apply(Math,Ys([],go(r),!1)),l=o-i||0,u=s-a||0,c=i+l/2,d=a+u/2;return{width:l,height:u,x:c,y:d}},t.prototype.translateCenter=function(){var e=this,n=e.nodes,r=e.width,i=e.height,o=e.rootEl,a=e.transformModel;if(!!n.length){var s=r||o.clientWidth,l=i||o.clientHeight,u=this.getVirtualRectSize(),c=u.x,d=u.y;a.focusOn(c,d,s,l)}},t.prototype.fitView=function(e,n){e===void 0&&(e=20),n===void 0&&(n=20);var r=this,i=r.nodes,o=r.width,a=r.height,s=r.rootEl,l=r.transformModel;if(!!i.length){var u=o||s.clientWidth,c=a||s.clientHeight,d=this.getVirtualRectSize(),f=d.width,h=d.height,g=d.x,m=d.y,y=(f+n)/u,b=(h+e)/c,w=1/Math.max(y,b),O=[u/2,c/2];l.zoom(w,O),l.focusOn(g,m,u,c)}},t.prototype.openEdgeAnimation=function(e){var n=this.getEdgeModelById(e);n==null||n.openEdgeAnimation()},t.prototype.closeEdgeAnimation=function(e){var n=this.getEdgeModelById(e);n==null||n.closeEdgeAnimation()},t.prototype.getPartial=function(){return this.partial},t.prototype.setPartial=function(e){this.partial=e},t.prototype.destroy=function(){try{this.waitCleanEffects.forEach(function(e){e()})}catch(e){console.warn("error on destroy GraphModel",e)}this.waitCleanEffects.length=0,this.eventCenter.destroy()},un([st],t.prototype,"width",void 0),un([st],t.prototype,"height",void 0),un([st],t.prototype,"grid",void 0),un([st],t.prototype,"edgeType",void 0),un([st],t.prototype,"nodes",void 0),un([st],t.prototype,"edges",void 0),un([st],t.prototype,"fakeNode",void 0),un([st],t.prototype,"overlapMode",void 0),un([st],t.prototype,"background",void 0),un([st],t.prototype,"gridSize",void 0),un([st],t.prototype,"transformModel",void 0),un([st],t.prototype,"editConfigModel",void 0),un([st],t.prototype,"partial",void 0),un([Gr],t.prototype,"nodesMap",null),un([Gr],t.prototype,"edgesMap",null),un([Gr],t.prototype,"modelsMap",null),un([Gr],t.prototype,"sortElements",null),un([Gr],t.prototype,"textEditElement",null),un([Gr],t.prototype,"selectElements",null),un([Gr],t.prototype,"selectNodes",null),un([it],t.prototype,"setTextMode",null),un([it],t.prototype,"setFakeNode",null),un([it],t.prototype,"removeFakeNode",null),un([it],t.prototype,"setModel",null),un([it],t.prototype,"toFront",null),un([it],t.prototype,"setElementZIndex",null),un([it],t.prototype,"deleteNode",null),un([it],t.prototype,"addNode",null),un([it],t.prototype,"cloneNode",null),un([it],t.prototype,"moveNode",null),un([it],t.prototype,"moveNode2Coordinate",null),un([it],t.prototype,"editText",null),un([it],t.prototype,"addEdge",null),un([it],t.prototype,"moveEdge",null),un([it],t.prototype,"deleteEdgeBySourceAndTarget",null),un([it],t.prototype,"deleteEdgeById",null),un([it],t.prototype,"deleteEdgeBySource",null),un([it],t.prototype,"deleteEdgeByTarget",null),un([it],t.prototype,"setElementStateById",null),un([it],t.prototype,"updateText",null),un([it],t.prototype,"selectNodeById",null),un([it],t.prototype,"selectEdgeById",null),un([it],t.prototype,"selectElementById",null),un([it],t.prototype,"clearSelectElements",null),un([it],t.prototype,"moveNodes",null),un([it],t.prototype,"setDefaultEdgeType",null),un([it],t.prototype,"changeNodeType",null),un([it],t.prototype,"changeEdgeType",null),un([it],t.prototype,"getNodeIncomingEdge",null),un([it],t.prototype,"getNodeOutgoingEdge",null),un([it],t.prototype,"getAnchorIncomingEdge",null),un([it],t.prototype,"getAnchorOutgoingEdge",null),un([it],t.prototype,"getNodeIncomingNode",null),un([it],t.prototype,"getNodeOutgoingNode",null),un([it],t.prototype,"setTheme",null),un([it],t.prototype,"resize",null),un([it],t.prototype,"clearData",null),un([it],t.prototype,"translateCenter",null),un([it],t.prototype,"fitView",null),un([it],t.prototype,"openEdgeAnimation",null),un([it],t.prototype,"closeEdgeAnimation",null),un([it],t.prototype,"setPartial",null),t}(),Ch=globalThis&&globalThis.__assign||function(){return Ch=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ch.apply(this,arguments)},jv=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},kWe=function(){function t(e){this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}return t.prototype.getStyle=function(){return Ch({},this.graphModel.theme.snapline)},t.prototype.getCenterSnapLine=function(e,n){for(var r=e.x,i=e.y,o=!1,a=!1,s=0;s<n.length;s++){var l=n[s];if(l.id!==e.id&&(r===l.x&&(o=!0),i===l.y&&(a=!0),o&&a))break}return{isShowVertical:o,isShowHorizontal:a,position:{x:r,y:i}}},t.prototype.getHorizontalSnapline=function(e,n){var r=!1,i=0,o=e.id,a;if(o){var s=this.graphModel.fakeNode;if(s&&s.id===o)a=ja(s);else{var l=this.graphModel.getNodeModelById(o);l&&(a=ja(l))}}for(var u=0;u<n.length;u++){var c=n[u];if(c.id!==e.id){var d=ja(c);if(d.minY===(a==null?void 0:a.minY)||d.maxY===(a==null?void 0:a.minY)){r=!0,i=a.minY;break}if(d.minY===(a==null?void 0:a.maxY)||d.maxY===(a==null?void 0:a.maxY)){r=!0,i=a.maxY;break}}}return{isShowHorizontal:r,isShowVertical:this.isShowVertical,position:Ch(Ch({},this.position),{y:i})}},t.prototype.getVerticalSnapline=function(e,n){var r=!1,i=0,o=e.id,a;if(o){var s=this.graphModel.fakeNode;if(s&&s.id===o)a=ja(s);else{var l=this.graphModel.getNodeModelById(o);l&&(a=ja(l))}}for(var u=0;u<n.length;u++){var c=n[u];if(c.id!==e.id){var d=ja(c);if(d.minX===(a==null?void 0:a.minX)||d.maxX===(a==null?void 0:a.minX)){r=!0,i=a.minX;break}if(d.minX===(a==null?void 0:a.maxX)||d.maxX===(a==null?void 0:a.maxX)){r=!0,i=a.maxX;break}}}return{isShowHorizontal:this.isShowHorizontal,isShowVertical:r,position:Ch(Ch({},this.position),{x:i})}},t.prototype.getSnapLinePosition=function(e,n){var r=this.getCenterSnapLine(e,n),i=r.isShowHorizontal,o=r.isShowVertical;if(!i){var a=this.getHorizontalSnapline(e,n);a.isShowHorizontal&&(r.isShowHorizontal=a.isShowHorizontal,r.position.y=a.position.y)}if(!o){var s=this.getVerticalSnapline(e,n);s.isShowVertical&&(r.isShowVertical=s.isShowVertical,r.position.x=s.position.x)}return r},t.prototype.setSnaplineInfo=function(e){var n=e.isShowHorizontal,r=e.isShowVertical,i=e.position;this.position=i,this.isShowHorizontal=n,this.isShowVertical=r},t.prototype.clearSnapline=function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1},t.prototype.setNodeSnapLine=function(e){var n=this.graphModel.nodes,r=this.getSnapLinePosition(e,n);this.setSnaplineInfo(r)},jv([st],t.prototype,"isShowHorizontal",void 0),jv([st],t.prototype,"isShowVertical",void 0),jv([st],t.prototype,"position",void 0),jv([it],t.prototype,"clearSnapline",null),jv([it],t.prototype,"setNodeSnapLine",null),t}(),Vl=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Jp=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},PWe={false:[-1/0,-1/0,1/0,1/0],true:[-1/0,-1/0,1/0,1/0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},AWe=function(){function t(e,n){this.MINI_SCALE_SIZE=.2,this.MAX_SCALE_SIZE=16,this.SCALE_X=1,this.SKEW_Y=0,this.SKEW_X=0,this.SCALE_Y=1,this.TRANSLATE_X=0,this.TRANSLATE_Y=0,this.ZOOM_SIZE=.04,this.translateLimitMinX=-1/0,this.translateLimitMinY=-1/0,this.translateLimitMaxX=1/0,this.translateLimitMaxY=1/0,this.eventCenter=e;var r=n.stopMoveGraph,i=r===void 0?!1:r;this.updateTranslateLimits(i)}return t.prototype.setZoomMiniSize=function(e){this.MINI_SCALE_SIZE=e},t.prototype.setZoomMaxSize=function(e){this.MAX_SCALE_SIZE=e},t.prototype.HtmlPointToCanvasPoint=function(e){var n=Jp(e,2),r=n[0],i=n[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(i-this.TRANSLATE_Y)/this.SCALE_Y]},t.prototype.CanvasPointToHtmlPoint=function(e){var n=Jp(e,2),r=n[0],i=n[1];return[r*this.SCALE_X+this.TRANSLATE_X,i*this.SCALE_Y+this.TRANSLATE_Y]},t.prototype.moveCanvasPointByHtml=function(e,n,r){var i=Jp(e,2),o=i[0],a=i[1];return[o+n/this.SCALE_X,a+r/this.SCALE_Y]},t.prototype.fixDeltaXY=function(e,n){return[e/this.SCALE_X,n/this.SCALE_Y]},t.prototype.getTransformStyle=function(){var e=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(e,")")}},t.prototype.zoom=function(e,n){e===void 0&&(e=!1);var r=this.SCALE_X,i=this.SCALE_Y;return typeof e=="number"?(r=e,i=e):e?(r+=this.ZOOM_SIZE,i+=this.ZOOM_SIZE):(r-=this.ZOOM_SIZE,i-=this.ZOOM_SIZE),r<this.MINI_SCALE_SIZE||r>this.MAX_SCALE_SIZE?"".concat(this.SCALE_X*100,"%"):(n&&(this.TRANSLATE_X-=(r-this.SCALE_X)*n[0],this.TRANSLATE_Y-=(i-this.SCALE_Y)*n[1]),this.SCALE_X=r,this.SCALE_Y=i,this.emitGraphTransform("zoom"),"".concat(this.SCALE_X*100,"%"))},t.prototype.emitGraphTransform=function(e){this.eventCenter.emit(cn.GRAPH_TRANSFORM,{type:e,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})},t.prototype.resetZoom=function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")},t.prototype.translate=function(e,n){this.TRANSLATE_X+e<=this.translateLimitMaxX&&this.TRANSLATE_X+e>=this.translateLimitMinX&&(this.TRANSLATE_X+=e),this.TRANSLATE_Y+n<=this.translateLimitMaxY&&this.TRANSLATE_Y+n>=this.translateLimitMinY&&(this.TRANSLATE_Y+=n),this.emitGraphTransform("translate")},t.prototype.focusOn=function(e,n,r,i){var o=Jp(this.CanvasPointToHtmlPoint([e,n]),2),a=o[0],s=o[1],l=Jp([r/2-a,i/2-s],2),u=l[0],c=l[1];this.TRANSLATE_X+=u,this.TRANSLATE_Y+=c,this.emitGraphTransform("focusOn")},t.prototype.updateTranslateLimits=function(e){var n;n=Jp(Array.isArray(e)&&e.length===4?e:PWe[e.toString()],4),this.translateLimitMinX=n[0],this.translateLimitMinY=n[1],this.translateLimitMaxX=n[2],this.translateLimitMaxY=n[3]},Vl([st],t.prototype,"SCALE_X",void 0),Vl([st],t.prototype,"SKEW_Y",void 0),Vl([st],t.prototype,"SKEW_X",void 0),Vl([st],t.prototype,"SCALE_Y",void 0),Vl([st],t.prototype,"TRANSLATE_X",void 0),Vl([st],t.prototype,"TRANSLATE_Y",void 0),Vl([st],t.prototype,"ZOOM_SIZE",void 0),Vl([it],t.prototype,"zoom",null),Vl([it],t.prototype,"resetZoom",null),Vl([it],t.prototype,"translate",null),Vl([it],t.prototype,"focusOn",null),t}(),MWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),RWe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},$We=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},NWe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},DWe=function(t){MWe(e,t);function e(){var n=t.apply(this,NWe([],$We(arguments),!1))||this;return n.handleResize=function(){var r=n.props,i=r.graphModel,o=r.options,a=i.width,s=i.height,l=i.isContainerWidth,u=i.isContainerHeight,c=a,d=s,f=!1;l&&(c=void 0,f=!0),u&&(d=void 0,f=!0),f&&i.resize(c,d),o.width=a,o.height=s},n.throttleResize=Wc(n.handleResize,200),n}return e.prototype.componentDidMount=function(){window.addEventListener("resize",this.throttleResize)},e.prototype.componentDidUpdate=function(){var n=this.props.graphModel.modelToGraphData();this.props.graphModel.eventCenter.emit(cn.GRAPH_UPDATED,{data:n})},e.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.throttleResize)},e.prototype.getComponent=function(n,r,i){i===void 0&&(i="canvas-overlay");var o=this.props.getView,a=o(n.type);return a?rt(a,{model:n,graphModel:r,overlay:i},n.id):null},e.prototype.render=function(){var n=this,r=this.props,i=r.graphModel,o=r.tool,a=r.options,s=r.dnd,l=r.snaplineModel,u={};a.width&&(u.width="".concat(i.width,"px")),a.height&&(u.height="".concat(i.height,"px"));var c=i.fakeNode,d=i.editConfigModel,f=i.background,h=d.adjustEdge;return rt("div",{className:"lf-graph","flow-id":i.flowId,style:u,children:[rt(oWe,{graphModel:i,dnd:s,children:[rt("g",{className:"lf-base",children:Ca(i.sortElements,function(g){return n.getComponent(g,i)})}),c?this.getComponent(c,i):""]}),rt(mWe,{graphModel:i,children:[rt(bWe,{graphModel:i}),h?rt(lWe,{graphModel:i}):"",a.snapline!==!1?rt(wWe,{snaplineModel:l}):""]}),rt(CWe,{graphModel:i,tool:o}),f&&rt(dWe,{background:f}),rt(nx,{graphModel:i})]})},e=RWe([Ea],e),e}(ur),LWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Au=globalThis&&globalThis.__assign||function(){return Au=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Au.apply(this,arguments)},IWe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},BWe=function(t){LWe(e,t);function e(){var n=t.call(this)||this;return n.onDragStart=function(r){var i=r.event,o=n.props,a=o.anchorData,s=o.nodeModel,l=o.graphModel;l.selectNodeById(s.id),s.autoToFront&&l.toFront(s.id),l.eventCenter.emit(cn.ANCHOR_DRAGSTART,{data:a,e:i,nodeModel:s}),n.setState({startX:a.x,startY:a.y,endX:a.x,endY:a.y})},n.onDragging=function(r){var i=r.event,o=n.props,a=o.graphModel,s=o.nodeModel,l=o.anchorData,u=a.transformModel,c=a.eventCenter,d=a.width,f=a.height,h=a.editConfigModel,g=h.autoExpand,m=h.stopMoveGraph;if(!!i){var y=i.clientX,b=i.clientY,w=a.getPointByClient({x:y,y:b}),O=w.domOverlayPosition,x=O.x,S=O.y,C=w.canvasOverlayPosition,E=C.x,T=C.y;n.t&&Jw(n.t);var P=[],A=10;x<10?P=[A,0]:x+10>d?P=[-A,0]:S<10?P=[0,A]:S+10>f&&(P=[0,-A]),n.setState({endX:E,endY:T,dragging:!0}),n.moveAnchorEnd(E,T),P.length>0&&!m&&g&&(n.t=rq(function(){var D=IWe(P,2),$=D[0],N=D[1];u.translate($,N);var z=n.state,I=z.endX,L=z.endY;n.setState({endX:I-$,endY:L-N}),n.moveAnchorEnd(I-$,L-N)})),c.emit(cn.ANCHOR_DRAG,{data:l,e:i,nodeModel:s})}},n.onDragEnd=function(r){var i=r.event;n.t&&Jw(n.t);var o=n.checkEnd(i);n.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),n.sourceRuleResults.clear(),n.targetRuleResults.clear();var a=n.props,s=a.graphModel,l=a.nodeModel,u=a.anchorData;s.eventCenter.emit(cn.ANCHOR_DRAGEND,{data:u,e:i,nodeModel:l,edgeModel:o!=null?o:void 0})},n.checkEnd=function(r){var i,o=n.props,a=o.graphModel,s=o.nodeModel,l=o.anchorData,u=l.x,c=l.y,d=l.id,f=n.state,h=f.endX,g=f.endY,m=f.dragging,y=Gw({x:h,y:g},a);if(n.preTargetNode&&n.preTargetNode.state!==Er.DEFAULT&&n.preTargetNode.setElementState(Er.DEFAULT),!!m&&y&&y.node){var b=y.node,w=y.anchor.id,O="".concat(s.id,"_").concat(b.id,"_").concat(w,"_").concat(d),x=n.sourceRuleResults.get(O)||{},S=x.isAllPass,C=x.msg,E=n.targetRuleResults.get(O)||{},T=E.isAllPass,P=E.msg;if(S&&T){b.setElementState(Er.DEFAULT);var A=a.getNodeModelById(y.node.id),D=(i=a.edgeGenerator)===null||i===void 0?void 0:i.call(a,s.getData(),A==null?void 0:A.getData()),$=a.addEdge(Au(Au({},D),{sourceNodeId:s.id,sourceAnchorId:d,startPoint:{x:u,y:c},targetNodeId:y.node.id,targetAnchorId:y.anchor.id,endPoint:{x:y.anchor.x,y:y.anchor.y}})),N=n.props.anchorData;return a.eventCenter.emit(cn.ANCHOR_DROP,{data:N,e:r,nodeModel:s,edgeModel:$}),$}var z=b.getData();return a.eventCenter.emit(cn.CONNECTION_NOT_ALLOWED,{data:z,msg:P||C||"\u4E0D\u5141\u8BB8\u6DFB\u52A0\u8FDE\u7EBF"}),null}},n.sourceRuleResults=new Map,n.targetRuleResults=new Map,n.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},n.dragHandler=new Al({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return e.prototype.getAnchorShape=function(){var n=this.props,r=n.anchorData,i=n.style,o=n.node,a=o.getAnchorShape(r);if(a)return a;var s=r.x,l=r.y,u=Au(Au({},i),i==null?void 0:i.hover);return rt("g",{children:[rt(_m,Au({className:"lf-node-anchor-hover"},u,{x:s,y:l})),rt(_m,Au({className:"lf-node-anchor"},i,{x:s,y:l}))]})},Object.defineProperty(e.prototype,"customTrajectory",{get:function(){var n=this.props.graphModel.customTrajectory;return n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"relateEdges",{get:function(){var n=this.props,r=n.graphModel,i=r.getAnchorIncomingEdge,o=r.getAnchorOutgoingEdge,a=n.anchorData.id;return{incomingEdgeList:i(a),outgoingEdgeList:o(a)}},enumerable:!1,configurable:!0}),e.prototype.moveAnchorEnd=function(n,r){var i,o,a=this.props,s=a.graphModel,l=a.nodeModel,u=a.anchorData,c=Gw({x:n,y:r},s);if(c){var d=c.node,f=c.anchor.id;if(this.preTargetNode&&this.preTargetNode!==c.node&&this.preTargetNode.setElementState(Er.DEFAULT),u.id===f)return;this.preTargetNode=d;var h="".concat(l.id,"_").concat(d.id,"_").concat(f,"_").concat(u.id);if(!this.targetRuleResults.has(h)){var g=c.anchor,m=l.isAllowConnectedAsSource(d,u,g),y=d.isAllowConnectedAsTarget(l,u,g);this.sourceRuleResults.set(h,Kw(m)),this.targetRuleResults.set(h,Kw(y))}var b=((i=this.sourceRuleResults.get(h))!==null&&i!==void 0?i:{}).isAllPass,w=((o=this.targetRuleResults.get(h))!==null&&o!==void 0?o:{}).isAllPass;b&&w?d.setElementState(Er.ALLOW_CONNECT):d.setElementState(Er.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Er.DEFAULT&&this.preTargetNode.setElementState(Er.DEFAULT)},e.prototype.isShowLine=function(){var n=this.state,r=n.startX,i=n.startY,o=n.endX,a=n.endY,s=Jl(r,i,o,a);return s>10},e.prototype.render=function(){var n=this,r=this.state,i=r.startX,o=r.startY,a=r.endX,s=r.endY,l=this.props,u=l.anchorData.edgeAddable,c=l.edgeStyle;return rt("g",{className:"lf-anchor",children:[rt("g",{onMouseDown:function(d){u!==!1&&n.dragHandler.handleMouseDown(d)},children:this.getAnchorShape()}),this.isShowLine()&&(this.customTrajectory?this.customTrajectory(Au({sourcePoint:{x:i,y:o},targetPoint:{x:a,y:s}},c)):rt(bm,Au({x1:i,y1:o,x2:a,y2:s},c,{"pointer-events":"none"})))]})},e}(ur),FWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),tA=globalThis&&globalThis.__assign||function(){return tA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},tA.apply(this,arguments)},VWe=function(t){FWe(e,t);function e(n){var r=t.call(this,n)||this;return r.style={},r.onDragging=function(i){var o,a=i.event,s=r.props,l=s.graphModel,u=s.nodeModel,c=s.eventCenter,d=l.selectNodes,f=u.x,h=u.y,g=a.clientX,m=a.clientY,y=l.getPointByClient({x:g,y:m}).canvasOverlayPosition,b=y.x,w=y.y,O=new jo(b-f,w-h),x=((o=r.normal)===null||o===void 0?void 0:o.angle(O))-r.defaultAngle,S=new OC(-f,-h).rotate(x).translate(f,h).toString();u.transform=S,u.rotate=x;var C=Ca(d,function(T){return T.id});C.indexOf(u.id)===-1&&(C=[u.id]);var E=Oz(C,function(T,P){var A=l.getNodeModelById(P);return T[P]=A==null?void 0:A.getMoveDistance(0,0,!1),T},{});C.forEach(function(T){var P=l.getNodeEdges(T);P.forEach(function(A){if(E[A.sourceNodeId]){var D=l.getNodeModelById(A.sourceNodeId),$=D.anchors.find(function(N){return N.id===A.sourceAnchorId});A.updateStartPoint($)}if(E[A.targetNodeId]){var D=l.getNodeModelById(A.targetNodeId),$=D.anchors.find(function(I){return I.id===A.targetAnchorId});A.updateEndPoint($)}})}),c.emit(cn.NODE_ROTATE,{e:a,model:u,data:u.getData()})},r.style=n.style,r.stepperDrag=new Al({onDragging:r.onDragging}),r}return e.prototype.render=function(){var n=this,r=this.props.nodeModel,i=r.x,o=r.y,a=r.width,s=r.height,l=i+a/2+20,u=o-s/2-20;return this.normal=new jo(1,0),this.defaultAngle=this.normal.angle(new jo(l-i,u-o)),r.defaultAngle=this.defaultAngle,rt("g",{className:"lf-rotate-control",children:rt("g",{onMouseDown:function(c){n.stepperDrag.handleMouseDown(c)},children:rt(_m,tA({},this.style,{cx:l,cy:u}))})})},e}(ur),uq={exports:{}};/*!
- Copyright (c) 2018 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
- */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,r(s)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)e.call(o,s)&&o[s]&&(a=i(a,s));return a}function i(o,a){return a?o?o+" "+a:o+a:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(uq);var nA=uq.exports,jWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),rA=globalThis&&globalThis.__assign||function(){return rA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},rA.apply(this,arguments)},QWe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},cq=function(t){jWe(e,t);function e(n){var r=t.call(this)||this;r.mouseDownHandler=function(o){var a=r.props,s=a.draggable,l=a.model,u=a.graphModel,c=u.editConfigModel.nodeTextDraggable;(s!=null?s:c)&&(o.stopPropagation(),r.stepperDrag.model=l,r.stepperDrag.handleMouseDown(o))},r.onDragging=function(o){var a=o.deltaX,s=o.deltaY,l=r.props,u=l.model,c=l.graphModel.transformModel;if(a||s){var d=QWe(c.fixDeltaXY(a,s),2),f=d[0],h=d[1];u.moveText(f,h)}},r.dbClickHandler=function(){var o=r.props,a=o.editable,s=o.graphModel.eventCenter,l=o.model;a&&l.setElementState(Er.TEXT_EDIT),s.emit(cn.TEXT_DBCLICK,{data:l.text,model:l})};var i=n.draggable;return r.stepperDrag=new Al({onDragging:r.onDragging,step:1,eventType:"TEXT",isStopPropagation:i}),r}return e.prototype.getShape=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=r.text,s=a.value,l=a.x,u=a.y,c=a.editable,d=a.draggable,f={x:l,y:u,className:"",value:s},h=r.getTextStyle(),g=o.nodeTextDraggable||d;return rt(iq,rA({},f,h,{className:nA({"lf-element-text":c,"lf-text-draggable":!c&&g,"lf-text-disabled":!c&&!g}),model:r}))},e.prototype.render=function(){var n=this.props.model.text;if(n)return rt("g",{onMouseDown:this.mouseDownHandler,onDblClick:this.dbClickHandler,children:this.getShape()})},e}(ur),zWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ql=globalThis&&globalThis.__assign||function(){return Ql=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ql.apply(this,arguments)},DO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},WWe=function(t){zWe(e,t);function e(n){var r=t.call(this,n)||this;return r.setHoverOn=function(){r.setState({isHovered:!0})},r.setHoverOff=function(){r.setState({isHovered:!1})},r.state={isHovered:!1},r}return e.prototype.getBackground=function(){var n=this.state.isHovered,r=this.props.model,i=r.text,o=r.getTextStyle(),a=o.background||{};if(n&&o.hover&&o.hover.background&&(a=Ql(Ql({},a),o.hover.background)),(i==null?void 0:i.value)&&(a==null?void 0:a.fill)!=="transparent"){var s=o.fontSize,l=o.textWidth,u=o.lineHeight,c=o.overflowMode,d=a.wrapPadding,f=i==null?void 0:i.value.split(/[\r\n]/g),h=f.length,g=i.x,m=i.y,y={};if(c==="autoWrap"&&l){var b=nq({rows:f,style:{fontSize:"".concat(s,"px"),width:"".concat(l,"px"),lineHeight:u,padding:d},rowsLength:h,className:"lf-get-text-height"});y=Ql(Ql({},a),{x:g,y:m,width:l,height:b})}else{var w=Q9e({rows:f,rowsLength:h,fontSize:s}),O=w.width,x=w.height;if(c==="ellipsis"&&(O=l,x=s+2),typeof a.wrapPadding=="string"){var S=a.wrapPadding.split(",").filter(function(W){return W.trim()}).map(function(W){return parseFloat(W.trim())});if(S.length>0&&S.length<=4){if(S.length===1){var C=DO(S,1),E=C[0];S=[E,E,E,E]}else if(S.length===2){var T=DO(S,2),P=T[0],A=T[1];S=[P,A,P,A]}else if(S.length===3){var D=DO(S,3),$=D[0],A=D[1],N=D[2];S=[$,A,N,A]}var z=DO(S,4),I=z[0],L=z[1],X=z[2],Q=z[3];O+=L+Q,x+=I+X,g=g+(L-Q)/2,m=m+(X-I)/2}}y=Ql(Ql({},a),{x:g-1,y:m-1,width:O,height:x})}return rt(sl,Ql({},y))}return null},e.prototype.getShape=function(){var n=this.props.model,r=n.text,i=r.x,o=r.y,a=r.value;if(!a)return null;var s=n.getTextStyle(),l=Ql({x:i,y:o,value:a,model:n,className:"lf-element-text"},s);return rt("g",{className:"lf-line-text",onMouseEnter:this.setHoverOn,onMouseLeave:this.setHoverOff,children:[this.getBackground(),rt(iq,Ql({},l))]})},e}(cq),HWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),rx=globalThis&&globalThis.__assign||function(){return rx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},rx.apply(this,arguments)},UWe=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},LO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Hf=function(t){HWe(e,t);function e(n){var r=t.call(this)||this;r.onDragStart=function(l){var u=l.event,c=r.props,d=c.model,f=c.graphModel;if(u){var h=f.getPointByClient({x:u.clientX,y:u.clientY}).canvasOverlayPosition,g=h.x,m=h.y;r.moveOffset={dx:d.x-g,dy:d.y-m}}},r.onDragging=function(l){var u,c,d,f,h=l.event,g=r.props,m=g.model,y=g.graphModel,b=y.editConfigModel,w=b.stopMoveGraph,O=b.autoExpand,x=b.snapGrid,S=y.transformModel,C=y.selectNodes,E=y.width,T=y.height,P=y.gridSize;m.isDragging=!0;var A=h,D=A.clientX,$=A.clientY,N=y.getPointByClient({x:D,y:$}).canvasOverlayPosition,z=N.x,I=N.y,L=LO(S.CanvasPointToHtmlPoint([z,I]),2),X=L[0],Q=L[1];if(z=z+((c=(u=r.moveOffset)===null||u===void 0?void 0:u.dx)!==null&&c!==void 0?c:0),I=I+((f=(d=r.moveOffset)===null||d===void 0?void 0:d.dy)!==null&&f!==void 0?f:0),z=ym(z,P,x),I=ym(I,P,x),!E||!T){y.moveNode2Coordinate(m.id,z,I);return}var W=X<0||Q<0||X>E||Q>T;if(!(O&&!w&&W)){var G=LO(S.CanvasPointToHtmlPoint([z-m.width/2,I-m.height/2]),2),K=G[0],oe=G[1],ne=LO(S.CanvasPointToHtmlPoint([z+m.width/2,I+m.height/2]),2),_e=ne[0],Ce=ne[1],U=Math.max(P,20),ie=[];K<0?ie=[U,0]:_e>y.width?ie=[-U,0]:oe<0?ie=[0,U]:Ce>y.height&&(ie=[0,-U]),r.t&&Jw(r.t),m.transform=new OC(-z,-I).rotate(m.rotate).translate(z,I).toString();var ee=C.map(function(he){return he.id});ee.indexOf(m.id)===-1&&(ee=[m.id]),ie.length>0&&!w&&O?r.t=rq(function(){var he=LO(ie,2),$e=he[0],Me=he[1];S.translate($e!=null?$e:0,Me!=null?Me:0);var q=-($e!=null?$e:0)/S.SCALE_X,de=-(Me!=null?Me:0)/S.SCALE_X;y.moveNodes(ee,q,de)}):y.moveNodes(ee,z-m.x,I-m.y)}},r.onDragEnd=function(){r.t&&Jw(r.t);var l=r.props.model;l.isDragging=!1},r.onMouseOut=function(l){y9e()&&r.setHoverOff(l)},r.handleMouseUp=function(){var l=r.props.model;r.mouseUpDrag=l.isDragging},r.handleClick=function(l){var u=r.mouseUpDrag===!1;if(!!r.startTime){var c=r.props,d=c.model,f=c.graphModel;if(!!u){var h=d.getData(),g=f.getPointByClient({x:l.clientX,y:l.clientY}),m={data:h,e:l,position:g,isSelected:!1,isMultiple:!1},y=l.button===2,b=l.detail===2;if(!y){var w=f.editConfigModel,O=eq(l,w);m.isMultiple=O,d.isSelected&&!b&&O?(m.isSelected=!1,d.setSelected(!1)):(f.selectNodeById(d.id,O),m.isSelected=!0,w.isSilentMode||r.toFront()),b?(w.nodeTextEdit&&d.text.editable&&w.textMode===gl.TEXT&&(d.setSelected(!1),f.setElementStateById(d.id,Er.TEXT_EDIT)),f.eventCenter.emit(cn.NODE_DBCLICK,m)):(f.eventCenter.emit(cn.ELEMENT_CLICK,m),f.eventCenter.emit(cn.NODE_CLICK,m))}}}},r.handleContextMenu=function(l){l.preventDefault();var u=r.props,c=u.model,d=u.graphModel,f=d.editConfigModel,h=c.getData(),g=d.getPointByClient({x:l.clientX,y:l.clientY});d.setElementStateById(c.id,Er.SHOW_MENU,g.domOverlayPosition),c.isSelected||d.selectNodeById(c.id),d.eventCenter.emit(cn.NODE_CONTEXTMENU,{data:h,e:l,position:g}),f.isSilentMode||r.toFront()},r.handleMouseDown=function(l){var u=r.props,c=u.model,d=u.graphModel;r.startTime=new Date().getTime();var f=d.editConfigModel;f.adjustNodePosition&&c.draggable&&r.stepDrag&&r.stepDrag.handleMouseDown(l)},r.handleFocus=function(){var l=r.props,u=l.model,c=l.graphModel;c.eventCenter.emit(cn.NODE_FOCUS,{data:u.getData()})},r.handleBlur=function(){var l=r.props,u=l.model,c=l.graphModel;c.eventCenter.emit(cn.NODE_BLUR,{data:u.getData()})},r.setHoverOn=function(l){var u=r.props,c=u.model,d=u.graphModel;if(!c.isHovered){var f=c.getData();c.setHovered(!0),d.eventCenter.emit(cn.NODE_MOUSEENTER,{data:f,e:l})}},r.setHoverOff=function(l){var u=r.props,c=u.model,d=u.graphModel,f=c.getData();!c.isHovered||(c.setHovered(!1),d.eventCenter.emit(cn.NODE_MOUSELEAVE,{data:f,e:l}))};var i=n.graphModel,o=i.gridSize,a=i.eventCenter,s=n.model;return r.stepDrag=new Al({onDragStart:r.onDragStart,onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:o,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:s}),r.modelDisposer=PZ(function(){return r.props},function(l){l&&l.model&&r.stepDrag.setModel(l.model)}),r}return e.prototype.componentWillUnmount=function(){this.modelDisposer&&this.modelDisposer(),this.render.$mobx&&this.render.$mobx.dispose()},e.prototype.componentDidMount=function(){},e.prototype.componentDidUpdate=function(){},e.prototype.getAnchorShape=function(n){return null},e.prototype.getAnchors=function(){var n=this,r=this.props,i=r.model,o=r.graphModel,a=i.isSelected,s=i.isHitable,l=i.isDragging,u=i.isShowAnchor;return s&&(a||u)&&!l?Ca(i.anchors,function(c,d){var f=i.getAnchorLineStyle(c),h=i.getAnchorStyle(c);return rt(BWe,{anchorData:c,node:n,style:h,edgeStyle:f,anchorIndex:d,nodeModel:i,graphModel:o,setHoverOff:n.setHoverOff})}):[]},e.prototype.getRotateControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.isSilentMode,s=o.allowRotate,l=r.isSelected,u=r.isHitable,c=r.rotatable,d=r.isHovered,f=s&&c,h=r.getRotateControlStyle();if(!a&&u&&(l||d)&&f)return rt(VWe,{graphModel:i,nodeModel:r,eventCenter:i.eventCenter,style:h})},e.prototype.getResizeControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.isSilentMode,s=o.allowResize,l=r.isSelected,u=r.isHitable,c=r.resizable,d=r.isHovered,f=s&&c,h=r.getResizeControlStyle();return!a&&u&&(l||d)&&f?rt(gze,{style:h,model:r,graphModel:i}):null},e.prototype.getText=function(){var n,r=this.props,i=r.model,o=r.graphModel,a=o.editConfigModel;if(a.nodeTextMode!==gl.TEXT||i.state===Er.TEXT_EDIT)return null;if(i.text){var s=!1;return a.nodeTextDraggable&&i.text.draggable&&(s=!0),rt(cq,{editable:a.nodeTextEdit&&((n=i.text.editable)!==null&&n!==void 0?n:!0),model:i,graphModel:o,draggable:s})}return null},e.prototype.getStateClassName=function(){var n=this.props.model,r=n.state,i=n.isDragging,o=n.isSelected,a="lf-node";switch(r){case Er.ALLOW_CONNECT:a+=" lf-node-allow";break;case Er.NOT_ALLOW_CONNECT:a+=" lf-node-not-allow";break;default:a+=" lf-node-default";break}return i&&(a+=" lf-dragging"),o&&(a+=" lf-node-selected"),a},e.prototype.toFront=function(){var n=this.props,r=n.model,i=n.graphModel;r.autoToFront&&i.toFront(r.id)},e.prototype.render=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.hideAnchors,s=o.adjustNodePosition,l=o.allowRotate,u=o.allowResize,c=i.gridSize,d=i.transformModel.SCALE_X,f=r.isHitable,h=r.draggable,g=r.transform,m=r.getOuterGAttributes(),y=m.className,b=y===void 0?"":y,w=UWe(m,["className"]),O=rt("g",{className:"lf-node-content",children:[rt("g",{transform:g,children:[this.getShape(),this.getText(),l&&this.getRotateControl(),u&&this.getResizeControl()]}),!a&&this.getAnchors()]}),x;return f?(s&&h&&this.stepDrag.setStep(c*d),x=rt("g",rx({className:"".concat(this.getStateClassName()," ").concat(b),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onMouseEnter:this.setHoverOn,onMouseOver:this.setHoverOn,onMouseLeave:this.setHoverOff,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu,onFocus:this.handleFocus,onBlur:this.handleBlur},w,{children:O}))):x=rt("g",rx({className:"".concat(this.getStateClassName()," ").concat(b)},w,{children:O})),x},e.isObserved=!1,e}(ur),XWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),iA=globalThis&&globalThis.__assign||function(){return iA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},iA.apply(this,arguments)},Cf=function(t){XWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n.getNodeStyle();return rt(sl,iA({},r,{x:n.x,y:n.y,width:n.width,height:n.height,radius:n.radius}))},e}(Hf),ZWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),oA=globalThis&&globalThis.__assign||function(){return oA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},oA.apply(this,arguments)},ix=function(t){ZWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.r,a=n.getNodeStyle();return rt(_m,oA({},a,{x:r,y:i,r:o}))},e}(Hf),qWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ox=globalThis&&globalThis.__assign||function(){return ox=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ox.apply(this,arguments)},ax=function(t){qWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n,i=r.x,o=r.y,a=r.width,s=r.height,l=r.points,u=n.getNodeStyle(),c={transform:"matrix(1 0 0 1 ".concat(i-a/2," ").concat(o-s/2,")")};return rt("g",ox({},c,{children:rt(HN,ox({},u,{points:l,x:i,y:o}))}))},e}(Hf),YWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),aA=globalThis&&globalThis.__assign||function(){return aA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},aA.apply(this,arguments)},sA=function(t){YWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n.getNodeStyle();return rt("g",{children:rt(HN,aA({},r,{points:n.points,x:n.x,y:n.y}))})},e}(Hf),GWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lA=globalThis&&globalThis.__assign||function(){return lA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},lA.apply(this,arguments)},uA=function(t){GWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n.getNodeStyle();return rt(lze,lA({},r,{x:n.x,y:n.y,rx:n.rx,ry:n.ry}))},e}(Hf),KWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vy=globalThis&&globalThis.__assign||function(){return Vy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Vy.apply(this,arguments)},T6=function(t){KWe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getBackground=function(){var n=this.props.model,r=n.getTextStyle(),i=n.width,o=n.height,a=n.x,s=n.y,l=Vy(Vy({},r.background),{x:a,y:s,width:i,height:o});return rt(sl,Vy({},l))},e.prototype.getResizeControl=function(){return null},e.prototype.getShape=function(){return rt("g",{children:this.getBackground()})},e}(Hf),JWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cA=globalThis&&globalThis.__assign||function(){return cA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},cA.apply(this,arguments)},eHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},tHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dA=function(t){JWe(e,t);function e(){var n=t.apply(this,tHe([],eHe(arguments),!1))||this;return n.ref=pC(),n}return Object.defineProperty(e.prototype,"rootEl",{get:function(){return this.ref.current},enumerable:!1,configurable:!0}),e.prototype.setHtml=function(n){n.appendChild(document.createElement("div"))},e.prototype.confirmUpdate=function(n){this.setHtml(n)},e.prototype.shouldUpdate=function(){return this.preProperties&&this.preProperties===this.currentProperties?!1:(this.preProperties=this.currentProperties,!0)},e.prototype.componentDidMount=function(){this.shouldUpdate()&&this.rootEl&&this.setHtml(this.rootEl)},e.prototype.componentDidUpdate=function(){this.shouldUpdate()&&this.rootEl&&this.confirmUpdate(this.rootEl)},e.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.rootEl.innerHTML=""},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.height,a=n.width,s=n.getNodeStyle();return this.currentProperties=JSON.stringify(n.properties),rt("foreignObject",cA({},s,{x:r-a/2,y:i-o/2,width:a,height:o,ref:this.ref}))},e}(Hf),nHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zl=globalThis&&globalThis.__assign||function(){return zl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zl.apply(this,arguments)},rHe=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},iHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},$u;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})($u||($u={}));var k6=function(t){nHe(e,t);function e(n){var r=t.call(this)||this;r.handleMouseDown=function(l){r.stepDrag&&r.stepDrag.handleMouseDown(l)},r.onDragStart=function(){var l=r.props,u=l.x,c=l.y,d=l.edgeModel,f=d.startPoint,h=d.endPoint,g=d.pointsList;r.oldEdge={startPoint:f,endPoint:h,pointsList:g},r.setState({endX:u,endY:c,dragging:!0})},r.onDragging=function(l){var u=l.deltaX,c=l.deltaY,d=r.state,f=d.endX,h=d.endY,g=r.props,m=g.graphModel,y=g.type,b=m.transformModel,w=m.editConfigModel,O=iHe(b.moveCanvasPointByHtml([f,h],u,c),2),x=O[0],S=O[1];r.setState({endX:x,endY:S,dragging:!0});var C=r.props.edgeModel,E=Gw({x:f,y:h},m);if(E&&E.node&&r.isAllowAdjust(E).pass){var T=C.startPoint,P=C.endPoint,A=C.sourceNode,D=C.targetNode,$=y===$u.SOURCE?{startPoint:{x:E.anchor.x,y:E.anchor.y},endPoint:{x:P.x,y:P.y},sourceNode:E.node,targetNode:D}:{startPoint:{x:T.x,y:T.y},endPoint:{x:E.anchor.x,y:E.anchor.y},sourceNode:A,targetNode:E.node};C.updateAfterAdjustStartAndEnd($)}else y===$u.SOURCE?C.updateStartPoint({x,y:S}):C.updateEndPoint({x,y:S});C.text.value&&w.adjustEdge&&C.setText(Object.assign({},C.text,C.textPosition))},r.onDragEnd=function(l){var u,c,d,f=l.event;try{r.setState({dragging:!1});var h=r.props,g=h.graphModel,m=h.edgeModel,y=h.type,b=r.state,w=b.endX,O=b.endY,x=b.dragging,S=Gw({x:w,y:O},g);if(!x)return;var C=!1,E=void 0;if(S&&S.node){var T=r.isAllowAdjust(S),P=T.pass,A=T.msg,D=T.newTargetNode;if(P){var $=m.getData(),N=$.text,z=$.sourceAnchorId,I=z===void 0?"":z,L=$.targetAnchorId,X=L===void 0?"":L,Q=rHe($,["text","sourceAnchorId","targetAnchorId"]);if(E=zl(zl({sourceAnchorId:I,targetAnchorId:X},Q),{text:(N==null?void 0:N.value)||""}),y===$u.SOURCE){var W=g.getNodeModelById(S.node.id),G=g.getNodeModelById(m.targetNodeId),K=(u=g.edgeGenerator)===null||u===void 0?void 0:u.call(g,W==null?void 0:W.getData(),G==null?void 0:G.getData(),E);E=zl(zl({},K),{sourceNodeId:S.node.id,sourceAnchorId:S.anchor.id,startPoint:{x:S.anchor.x,y:S.anchor.y},targetNodeId:m.targetNodeId,endPoint:zl({},m.endPoint)}),m.sourceNodeId===S.node.id&&m.sourceAnchorId===S.anchor.id&&(C=!0)}else if(y===$u.TARGET){var W=g.getNodeModelById(m.sourceNodeId),G=g.getNodeModelById(S.node.id),K=(c=g.edgeGenerator)===null||c===void 0?void 0:c.call(g,W==null?void 0:W.getData(),G==null?void 0:G.getData(),E);E=zl(zl({},K),{sourceNodeId:m.sourceNodeId,startPoint:zl({},m.startPoint),targetNodeId:S.node.id,targetAnchorId:S.anchor.id,endPoint:{x:S.anchor.x,y:S.anchor.y}}),m.targetNodeId===S.node.id&&m.targetAnchorId===S.anchor.id&&(C=!0)}}else{C=!0;var oe=D.getData();g.eventCenter.emit(cn.CONNECTION_NOT_ALLOWED,{data:oe,msg:A})}}else C=!0;if(C)r.recoveryEdge();else{var ne=m.getData();g.deleteEdgeById(m.id);var _e=g.addEdge(zl({},E));g.eventCenter.emit(cn.EDGE_EXCHANGE_NODE,{data:{newEdge:_e.getData(),oldEdge:ne}})}(d=r.preTargetNode)===null||d===void 0||d.setElementState(Er.DEFAULT)}finally{var g=r.props.graphModel;g.eventCenter.emit(cn.ADJUST_POINT_DRAGEND,{e:f,data:r.stepDragData})}},r.recoveryEdge=function(){var l=r.props.edgeModel,u=r.oldEdge,c=u.startPoint,d=u.endPoint,f=u.pointsList;l.updateStartPoint(c),l.updateEndPoint(d),l.modelType!==qn.LINE_EDGE&&(l.pointsList=f!=null?f:[],l.initPoints())},r.getAdjustPointStyle=function(){var l=r.props.graphModel.theme,u=l.edgeAdjust;return u},r.state={dragging:!1,endX:0,endY:0},r.targetRuleResults=new Map,r.sourceRuleResults=new Map;var i=n.type,o=n.edgeModel,a=n.graphModel,s=a.eventCenter;return r.stepDragData={type:i,edgeData:o.getData()},r.stepDrag=new Al({onDragStart:r.onDragStart,onDragging:r.onDragging,onDragEnd:r.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:s,data:r.stepDragData}),r}return e.prototype.isAllowAdjust=function(n){var r=this.props,i=r.edgeModel,o=i.id,a=i.sourceNode,s=i.targetNode,l=i.sourceAnchorId,u=i.targetAnchorId,c=r.type,d,f,h,g;if(c===$u.SOURCE?(d=n.node,f=s,h=n.anchor,g=s.getAnchorInfo(u)):(d=a,f=n.node,g=n.anchor,h=a.getAnchorInfo(l)),this.preTargetNode&&this.preTargetNode!==n.node&&this.preTargetNode.setElementState(Er.DEFAULT),this.preTargetNode=n.node,g.id===h.id)return{pass:!1,msg:"",newTargetNode:f};var m="".concat(d.id,"_").concat(f.id,"_").concat(h.id,"_").concat(g.id);if(!this.targetRuleResults.has(m)){var y=d.isAllowConnectedAsSource(f,h,g,o),b=f.isAllowConnectedAsTarget(d,h,g,o);this.sourceRuleResults.set(m,Kw(y)),this.targetRuleResults.set(m,Kw(b))}var w=this.sourceRuleResults.get(m),O=w.isAllPass,x=w.msg,S=this.targetRuleResults.get(m),C=S.isAllPass,E=S.msg,T=O&&C?Er.ALLOW_CONNECT:Er.NOT_ALLOW_CONNECT;return c===$u.SOURCE?d.setElementState(T):f.setElementState(T),{pass:O&&C,msg:E||x,newTargetNode:f}},e.prototype.render=function(){var n=this.props,r=n.x,i=n.y,o=n.getAdjustPointShape,a=n.edgeModel,s=this.state.dragging;return rt("g",{pointerEvents:s?"none":"",onMouseDown:this.handleMouseDown,children:s?"":o(r,i,a)})},e}(ur),oHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fA=globalThis&&globalThis.__assign||function(){return fA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},fA.apply(this,arguments)};(function(t){oHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getArrowAttributes=function(){var n=this.props,r=n.arrowInfo,i=n.style,o=r.start,a=r.end,s={start:o,end:a,offset:i.offset,verticalLength:i.verticalLength,type:"end"},l=L0(s),u=l.leftX,c=l.leftY,d=l.rightX,f=l.rightY;return fA({d:"M".concat(u," ").concat(c," L").concat(a.x," ").concat(a.y," L").concat(d," ").concat(f," z")},i)},e.prototype.getShape=function(){var n=this.getArrowAttributes(),r=n.d,i=n.strokeWidth,o=n.stroke,a=n.fill;return rt(F0,{d:r,fill:a,strokeWidth:i,stroke:o})},e.prototype.render=function(){return rt("g",{className:"lf-arrow",children:this.getShape()})},e})(ur);var aHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jy=globalThis&&globalThis.__assign||function(){return jy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},jy.apply(this,arguments)},sHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},xC=function(t){aHe(e,t);function e(){var n=t.call(this)||this;return n.textRef=pC(),n.handleHover=function(r,i){var o=n.props,a=o.model,s=o.graphModel.eventCenter;a.setHovered(r);var l=r?cn.EDGE_MOUSEENTER:cn.EDGE_MOUSELEAVE,u=a.getData();s.emit(l,{data:u,e:i})},n.setHoverOn=function(r){var i=n.props.model.isHovered;i||(n.textRef&&n.textRef.current&&n.textRef.current.setHoverOn(),n.handleHover(!0,r))},n.setHoverOff=function(r){var i=n.props.model.isHovered;!i||(n.textRef&&n.textRef.current&&n.textRef.current.setHoverOff(),n.handleHover(!1,r))},n.handleContextMenu=function(r){r.preventDefault(),n.contextMenuTime=new Date().getTime(),n.clickTimer&&clearTimeout(n.clickTimer);var i=n.props,o=i.model,a=i.graphModel,s=a.editConfigModel,l=a.getPointByClient({x:r.clientX,y:r.clientY});a.setElementStateById(o.id,Er.SHOW_MENU,l.domOverlayPosition),s.isSilentMode||n.toFront(),o.isSelected||a.selectEdgeById(o.id);var u=o==null?void 0:o.getData();a.eventCenter.emit(cn.EDGE_CONTEXTMENU,{data:u,e:r,position:l})},n.handleMouseDown=function(r){r.stopPropagation(),n.startTime=new Date().getTime()},n.handleMouseUp=function(){var r=n.props.model;n.mouseUpDrag=r.isDragging},n.handleClick=function(r){if(!!n.startTime&&!n.mouseUpDrag){var i=r.button===2;if(!i){var o=r.detail===2,a=n.props,s=a.model,l=a.graphModel,u=s==null?void 0:s.getData(),c=l.getPointByClient({x:r.clientX,y:r.clientY});if(o){var d=l.editConfigModel,f=l.textEditElement,h=s.id,g=s.text,m=s.modelType;if(f&&f.id===h&&l.setElementStateById(h,Er.DEFAULT),d.edgeTextEdit&&g.editable&&(s.setSelected(!1),l.setElementStateById(h,Er.TEXT_EDIT)),m===qn.POLYLINE_EDGE){var y=s,b=l.getPointByClient({x:r.x,y:r.y}).canvasOverlayPosition,w=b.x,O=b.y;y.dbClickPosition=JZ({x:w,y:O},y.points)}l.eventCenter.emit(cn.EDGE_DBCLICK,{data:u,e:r,position:c})}else l.eventCenter.emit(cn.ELEMENT_CLICK,{data:u,e:r,position:c}),l.eventCenter.emit(cn.EDGE_CLICK,{data:u,e:r,position:c});var x=l.editConfigModel;l.selectEdgeById(s.id,eq(r,x)),x.isSilentMode||n.toFront()}}},n.handleFocus=function(){var r=n.props,i=r.model,o=r.graphModel;o.eventCenter.emit(cn.EDGE_FOCUS,{data:i.getData()})},n.handleBlur=function(){var r=n.props,i=r.model,o=r.graphModel;o.eventCenter.emit(cn.EDGE_BLUR,{data:i.getData()})},n}return e.prototype.getShape=function(){return rt("g",{children:this.getEdge()})},e.prototype.getTextStyle=function(){},e.prototype.getText=function(){var n,r=this.props,i=r.model,o=r.graphModel,a=o.editConfigModel;if(a.edgeTextMode!==gl.TEXT||i.state===Er.TEXT_EDIT)return null;if(i.text){var s=!1;return a.edgeTextDraggable&&i.text.draggable&&(s=!0),rt(WWe,{ref:this.textRef,editable:a.edgeTextEdit&&((n=i.text.editable)!==null&&n!==void 0?n:!0),model:i,graphModel:o,draggable:s})}return null},e.prototype.getArrowInfo=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint,o=n.isSelected,a=this.state.hover;return{start:r,end:i,hover:a,isSelected:o}},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint;return[r,i]},e.prototype.getArrowStyle=function(){return console.error("getArrowStyle is deprecated in 1.2.0, please use model.getArrowStyle"),null},e.prototype.getArrow=function(){var n=this.props.model,r=n.id,i=n.getArrowStyle(),o=i.refY,a=o===void 0?0:o,s=i.refX,l=s===void 0?2:s,u=sHe(this.getLastTwoPoints(),2),c=u[0],d=u[1],f="auto";return c!==null&&d!==null&&(f=Mze(Aze({x:d.x-c.x,y:d.y-c.y,z:0}))),rt("g",{children:rt("defs",{children:[rt("marker",{id:"marker-start-".concat(r),refX:-l,refY:a,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse",children:this.getStartArrow()}),rt("marker",{id:"marker-end-".concat(r),refX:l,refY:a,overflow:"visible",orient:f,markerUnits:"userSpaceOnUse",children:this.getEndArrow()})]})})},e.prototype.getStartArrow=function(){return rt("path",{})},e.prototype.getEndArrow=function(){var n=this.props.model,r=n.getArrowStyle(),i=r.stroke,o=r.strokeWidth,a=r.offset,s=r.verticalLength;return rt("path",{stroke:i,fill:i,strokeWidth:o,transform:"rotate(180)",d:"M 0 0 L ".concat(a," -").concat(s," L ").concat(a," ").concat(s," Z")})},e.prototype.getAdjustPointShape=function(n,r,i){var o=i.getAdjustPointStyle();return rt(_m,jy({className:"lf-edge-adjust-point"},o,{x:n,y:r}))},e.prototype.getAdjustPoints=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.adjustEdgeStartAndEnd,s=o.adjustEdgeStart,l=o.adjustEdgeEnd,u=r.getAdjustStart(),c=r.getAdjustEnd();return rt("g",{children:[a&&s&&rt(k6,jy({type:$u.SOURCE},u,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:r,graphModel:i})),a&&l&&rt(k6,jy({type:$u.TARGET},c,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:r,graphModel:i}))]})},e.prototype.getAnimation=function(){console.error("getAnimation is deprecated in 1.2.0, please use model.getEdgeAnimationStyle")},e.prototype.getAppendWidth=function(){return rt("g",{})},e.prototype.getAppend=function(){return rt("g",{className:"lf-edge-append",children:this.getAppendWidth()})},e.prototype.getEdge=function(){return null},e.prototype.toFront=function(){var n=this.props,r=n.graphModel,i=n.model;r.toFront(i.id)},e.prototype.render=function(){var n=this.props.model,r=n.isSelected,i=n.isHitable,o=n.isShowAdjustPoint;return rt("g",{children:[rt("g",{className:["lf-edge",!i&&"pointer-none",r&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverOn,onMouseEnter:this.setHoverOn,onMouseLeave:this.setHoverOff,onFocus:this.handleFocus,onBlur:this.handleBlur,children:[this.getShape(),this.getAppend(),this.getText(),this.getArrow()]}),o&&r?this.getAdjustPoints():""]})},e.isObserved=!1,e}(ur),lHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hA=globalThis&&globalThis.__assign||function(){return hA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},hA.apply(this,arguments)},uHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},pA=function(t){lHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.getEdgeStyle(),i=n,o=i.path,a=i.isAnimation,s=i.arrowConfig,l=n.getEdgeAnimationStyle(),u=l.strokeDasharray,c=l.stroke,d=l.strokeDashoffset,f=l.animationName,h=l.animationDuration,g=l.animationIterationCount,m=l.animationTimingFunction,y=l.animationDirection;return rt(F0,hA({d:o},r,s,a?{strokeDasharray:u,stroke:c,style:{strokeDashoffset:d,animationName:f,animationDuration:h,animationIterationCount:g,animationTimingFunction:m,animationDirection:y}}:{}))},e.prototype.getAppendWidth=function(){var n=this.props.model.path;return rt(F0,{d:n,strokeWidth:10,stroke:"transparent",fill:"none"})},e.prototype.getArrowInfo=function(){var n=this.props.model,r=this.state.hover,i=n.isSelected,o=n.getArrowStyle().offset,a=n.pointsList.map(function(d){return{x:d.x,y:d.y}}),s=uHe(c6(a,o),2),l=s[0],u=s[1],c={start:l,end:u,hover:r,isSelected:i};return c},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.getArrowStyle().offset,i=n.pointsList.map(function(o){return{x:o.x,y:o.y}});return c6(i,r)},e}(xC),cHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gA=globalThis&&globalThis.__assign||function(){return gA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},gA.apply(this,arguments)},P6=function(t){cHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint,o=n.isAnimation,a=n.arrowConfig,s=n.getEdgeStyle(),l=n.getEdgeAnimationStyle(),u=l.strokeDasharray,c=l.stroke,d=l.strokeDashoffset,f=l.animationName,h=l.animationDuration,g=l.animationIterationCount,m=l.animationTimingFunction,y=l.animationDirection;return rt(bm,gA({},s,{x1:r.x,y1:r.y,x2:i.x,y2:i.y},a,o?{strokeDasharray:u,stroke:c,style:{strokeDashoffset:d,animationName:f,animationDuration:h,animationIterationCount:g,animationTimingFunction:m,animationDirection:y}}:{}))},e.prototype.getAppendWidth=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint,o={start:r,end:i},a=F9e(o),s=a.d,l=a.strokeWidth,u=a.fill,c=a.strokeDasharray,d=a.stroke;return rt(F0,{d:s,fill:u,strokeWidth:l,stroke:d,strokeDasharray:c})},e}(xC),dHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Eh=globalThis&&globalThis.__assign||function(){return Eh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Eh.apply(this,arguments)},fHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},z0=function(t){dHe(e,t);function e(){var n=t.call(this)||this;return n.onDragStart=function(){var r=n.props.model;r.dragAppendStart(),n.isShowAdjustPointTemp=r.isShowAdjustPoint,r.isShowAdjustPoint=!1},n.onDragging=function(r){var i=r.deltaX,o=r.deltaY,a=n.props,s=a.model,l=a.graphModel;n.isDragging=!0;var u=l.transformModel,c=l.editConfigModel,d=fHe(u.fixDeltaXY(i,o),2),f=d[0],h=d[1],g=s,m=c.adjustEdgeMiddle;m?n.appendInfo=g.dragAppendSimple(n.appendInfo,{x:f,y:h}):n.appendInfo=g.dragAppend(n.appendInfo,{x:f,y:h})},n.onDragEnd=function(){var r,i=n.props,o=i.model,a=i.graphModel.eventCenter,s=o;s.dragAppendEnd(),n.isDragging=!1,s.isShowAdjustPoint=(r=n.isShowAdjustPointTemp)!==null&&r!==void 0?r:!1,n.appendInfo=void 0,a.emit(cn.EDGE_ADJUST,{data:s.getData()})},n.beforeDragStart=function(r,i){i.draggable&&n.drag.handleMouseDown(r),n.appendInfo=i},n.drag=new Al({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd,isStopPropagation:!1}),n}return e.prototype.getEdge=function(){var n=this.props.model,r=n.points,i=n.isAnimation,o=n.arrowConfig,a=n.getEdgeStyle(),s=n.getEdgeAnimationStyle(),l=s.strokeDasharray,u=s.stroke,c=s.strokeDashoffset,d=s.animationName,f=s.animationDuration,h=s.animationIterationCount,g=s.animationTimingFunction,m=s.animationDirection;return rt(dze,Eh({points:r},a,o,i?{strokeDasharray:l,stroke:u,style:{strokeDashoffset:c,animationName:d,animationDuration:f,animationIterationCount:h,animationTimingFunction:g,animationDirection:m}}:{}))},e.prototype.getArrowInfo=function(){var n=this.props.model,r=n.points,i=n.isSelected,o=this.state.hover,a=up(r),s=a[0],l=a[0];return a.length>=2&&(s=a[a.length-2],l=a[a.length-1]),{start:s,end:l,hover:o,isSelected:i}},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.points,i=up(r),o=i[0],a=i[0];return i.length>=2&&(o=i[i.length-2],a=i[i.length-1]),[o,a]},e.prototype.getAppendAttributes=function(n){var r=n.start,i=n.end,o;if(r.x===i.x&&r.y===i.y)o="";else{var a={start:r,end:i,offset:10,verticalLength:5},s=L0(Eh(Eh({},a),{type:"start"})),l=L0(Eh(Eh({},a),{type:"end"}));o="M".concat(s.leftX," ").concat(s.leftY,`
- L`).concat(s.rightX," ").concat(s.rightY,`
- L`).concat(l.rightX," ").concat(l.rightY,`
- L`).concat(l.leftX," ").concat(l.leftY," z")}return{d:o,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},e.prototype.getAppendShape=function(n){var r=this.getAppendAttributes(n),i=r.d,o=r.strokeWidth,a=r.fill,s=r.strokeDasharray,l=r.stroke;return rt(F0,{d:i,fill:a,strokeWidth:o,stroke:l,strokeDasharray:s})},e.prototype.getAppendWidth=function(){for(var n=this,r=this.props,i=r.model,o=r.graphModel,a=i.pointsList,s=i.draggable,l=[],u=a.length,c=function(h){var g="lf-polyline-append",m={start:{x:a[h].x,y:a[h].y},end:{x:a[h+1].x,y:a[h+1].y},startIndex:h,endIndex:h+1,direction:di.HORIZONTAL,draggable:!0},y=rt("g",{className:g,children:d.getAppendShape(m)}),b=o.editConfigModel,w=b.adjustEdge,O=b.adjustEdgeMiddle;if(w&&s){var x=m.startIndex,S=m.endIndex,C=O&&(x===0||S===u-1);m.draggable=!C,m.start.x===m.end.x?(m.draggable&&(g+="-ew-resize"),m.direction=di.VERTICAL):m.start.y===m.end.y&&(m.draggable&&(g+="-ns-resize"),m.direction=di.HORIZONTAL),y=rt("g",{className:d.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(E){return n.beforeDragStart(E,m)},children:rt("g",{className:g,children:d.getAppendShape(m)})})}l.push(y)},d=this,f=0;f<u-1;f++)c(f);return rt("g",{children:l})},e}(xC),bg=globalThis&&globalThis.__assign||function(){return bg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},bg.apply(this,arguments)},hHe=function(){function t(e){var n=this;this.nodeConfig=null,this.fakeNode=null,this.stopDrag=function(){n.nodeConfig=null,window.document.removeEventListener("mouseup",n.stopDrag)},this.dragEnter=function(i){!n.nodeConfig||n.fakeNode||(n.fakeNode=n.lf.createFakeNode(bg(bg({},n.nodeConfig),n.clientToLocalPoint({x:i.clientX,y:i.clientY}))))},this.onDragOver=function(i){if(i.preventDefault(),n.fakeNode){var o=n.clientToLocalPoint({x:i.clientX,y:i.clientY}),a=o.x,s=o.y;n.fakeNode.moveTo(a,s);var l=n.fakeNode.getData();n.lf.setNodeSnapLine(l),n.lf.graphModel.eventCenter.emit(cn.NODE_DND_DRAG,{data:l,e:i})}return!1},this.onDragLeave=function(){n.fakeNode&&(n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakeNode(),n.fakeNode=null)},this.onDrop=function(i){!n.lf.graphModel||!i||!n.nodeConfig||(n.lf.addNode(bg(bg({},n.nodeConfig),n.clientToLocalPoint({x:i.clientX,y:i.clientY})),cn.NODE_DND_ADD,i),i.preventDefault(),i.stopPropagation(),n.nodeConfig=null,n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakeNode(),n.fakeNode=null)};var r=e.lf;this.lf=r}return t.prototype.clientToLocalPoint=function(e){var n=e.x,r=e.y,i=Kr(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:n,y:r}),a=o.canvasOverlayPosition,s=a.x,l=a.y,u=this.lf.graphModel.editConfigModel.snapGrid;return{x:ym(s,i,u),y:ym(l,i,u)}},t.prototype.startDrag=function(e){var n=this.lf.graphModel.editConfigModel;n!=null&&n.isSilentMode||(this.nodeConfig=e,window.document.addEventListener("mouseup",this.stopDrag))},t.prototype.eventMap=function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}},t}();function pHe(t,e){t.on("node:mousemove",function(n){var r=n.data;e.setNodeSnapLine(r)}),t.on("node:mouseup",function(){e.clearSnapline()})}var gHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dc=globalThis&&globalThis.__assign||function(){return Dc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Dc.apply(this,arguments)},mHe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},vHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},yHe=function(t){gHe(e,t);function e(n){var r=t.call(this,n)||this;return r.ref=pC(),r.__prevText={type:"",text:"",id:""},r.keyupHandler=function(i){var o=r.props.graphModel.textEditElement;i.key==="Enter"&&i.altKey&&(o==null||o.setElementState(Er.DEFAULT))},r.inputHandler=function(i){var o=i.target.innerText,a=r.props.graphModel.textEditElement;a&&(r.__prevText={type:a.type,text:o.replace(/(\r\n)+$|(\n)+$/,""),id:a.id})},r.keydownHandler=function(i){i.stopPropagation()},r.state={style:{left:0,top:0}},r}return e.getDerivedStateFromProps=function(n){var r,i=n.textEditElement,o=n.graphModel,a=o.transformModel,s=o.theme,l=s.inputText,u;if(i){if(!(!((r=i.text)===null||r===void 0)&&r.value)&&i.BaseType===xi.EDGE){var c=i.text,d=i.textPosition,f=d.x,h=d.y;c.x=f,c.y=h,i.setText(c)}var g={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(i.BaseType===xi.EDGE){var m=s.edgeText,y=m.overflowMode,b=m.lineHeight,w=m.wrapPadding,O=m.textWidth;O&&y==="autoWrap"&&(u=Dc(Dc({},g),{width:O,minWidth:O,lineHeight:b,padding:w}))}else if(i.BaseType===xi.NODE){var x=s.nodeText,y=x.overflowMode,b=x.lineHeight,w=x.wrapPadding,O=x.textWidth,S=i.width,C=i.modelType,E=i.textWidth,T=E||O||S;(C!==qn.TEXT_NODE&&y==="autoWrap"||C===qn.TEXT_NODE&&O)&&(u=Dc(Dc({},g),{width:T,minWidth:T,lineHeight:b,padding:w}))}var P=i.text,A=P.x,D=P.y,$=vHe(a.CanvasPointToHtmlPoint([A,D]),2),N=$[0],z=$[1];return{style:Dc(Dc({left:N,top:z},u),l)}}return null},e.prototype.componentDidUpdate=function(){var n=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var r=this.__prevText,i=r.text,o=r.id;n.updateText(o,i),n.eventCenter.emit(cn.TEXT_UPDATE,{data:Dc({},this.__prevText)}),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}},e.prototype.placeCaretAtEnd=function(n){if(window.getSelection!==void 0&&document.createRange!==void 0){var r=document.createRange();r.selectNodeContents(n),r.collapse(!1);var i=window.getSelection();i==null||i.removeAllRanges(),i==null||i.addRange(r)}},e.prototype.render=function(){var n,r=this.props.graphModel.textEditElement,i=this.state.style;return r?rt("div",{contentEditable:!0,className:"lf-text-input",style:i,ref:this.ref,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler,children:(n=r.text)===null||n===void 0?void 0:n.value},r.id):null},e.toolName="text-edit-tool",e=mHe([Ea],e),e}(ur),bHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_He=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},e2=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},OHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},wHe=function(t){bHe(e,t);function e(n){var r=t.call(this,n)||this;r.handleMouseDown=function(s){r.stepDrag.handleMouseDown(s)},r.handleWheelEvent=function(s){var l,u;s.preventDefault();var c=s.deltaX,d=s.deltaY,f=s.clientX,h=s.clientY,g=s.ctrlKey,m=new WheelEvent("wheel",{deltaX:c,deltaY:d,clientX:f,clientY:h,ctrlKey:g});(u=(l=r.props.lf.container)===null||l===void 0?void 0:l.querySelector('.lf-canvas-overlay[name="canvas-overlay"]'))===null||u===void 0||u.dispatchEvent(m)},r.onDragging=function(s){var l=s.deltaX,u=s.deltaY,c=r.props,d=c.graphModel,f=c.lf,h=f.getTransform(),g=h.SCALE_X,m=h.SCALE_Y,y=d.getSelectElements(!0);d.moveNodes(y.nodes.map(function(b){return b.id}),l/g,u/m)},r.handleContextMenu=function(s){s.preventDefault();var l=r.props,u=l.graphModel,c=l.graphModel,d=c.eventCenter,f=c.selectElements,h=u.getPointByClient({x:s.clientX,y:s.clientY}),g={nodes:[],edges:[]},m=OHe([],e2(f.values()),!1);m.forEach(function(y){y.BaseType===xi.NODE&&g.nodes.push(y.getData()),y.BaseType===xi.EDGE&&g.edges.push(y.getData())}),d.emit(cn.SELECTION_CONTEXTMENU,{data:g,e:s,position:h})};var i=n.graphModel,o=i.gridSize,a=i.eventCenter;return r.stepDrag=new Al({onDragging:r.onDragging,step:o,eventType:"SELECTION",eventCenter:a}),r}return e.prototype.render=function(){var n,r,i=this.props.graphModel,o=i.selectElements,a=i.transformModel,s=this.props.lf.getTransform(),l=s.SCALE_X,u=s.SCALE_Y;if(!(o.size<=1)){var c=Number.MAX_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER;o.forEach(function(m){var y;m.BaseType===xi.NODE&&(y=w9e(m)),m.BaseType===xi.EDGE&&(y=E9e(m)),y!==void 0&&(c=Math.min(c,y.x),d=Math.min(d,y.y),f=Math.max(f,y.x1),h=Math.max(h,y.y1))}),n=e2(a.CanvasPointToHtmlPoint([c,d]),2),c=n[0],d=n[1],r=e2(a.CanvasPointToHtmlPoint([f,h]),2),f=r[0],h=r[1];var g={left:"".concat(c-20*l/2,"px"),top:"".concat(d-20*u/2,"px"),width:"".concat(f-c+20*l,"px"),height:"".concat(h-d+20*u,"px"),"border-width":"".concat(2*l,"px")};return rt("div",{className:"lf-multiple-select",style:g,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu,onWheel:this.handleWheelEvent})}},e.toolName="multiple-select-tool",e=_He([Ea],e),e}(ur),t2=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},xHe=[yHe,wHe],SHe=function(){function t(e){var n=this;this.toolMap=new Map,this.disabledToolMap=new Map,this.instance=e,In(xHe,function(o){n.isDisabled(o.toolName)||n.registerTool(o.toolName,o)});var r=e.graphModel,i=r.eventCenter;i.on("".concat(cn.GRAPH_TRANSFORM,",").concat(cn.NODE_CLICK,",").concat(cn.BLANK_CLICK," "),function(){var o,a=r.textEditElement,s=r.editConfigModel,l=s.edgeTextEdit,u=s.nodeTextEdit;(l||u)&&a&&((o=r.textEditElement)===null||o===void 0||o.setElementState(Er.DEFAULT))})}return t.prototype.isDisabled=function(e){var n;return((n=this.instance.options.disabledTools)===null||n===void 0?void 0:n.indexOf(e))!==-1},t.prototype.registerTool=function(e,n){this.toolMap.set(e,n)},t.prototype.disableTool=function(e){var n=this.toolMap.get(e);if(n)return this.disabledToolMap.set(e,n),this.toolMap.delete(e),!0;throw new Error("\u7981\u7528\u5931\u8D25\uFF0C\u4E0D\u5B58\u5728\u540D\u4E3A ${tool} \u7684\u5DE5\u5177")},t.prototype.enableTool=function(e){var n=this.disabledToolMap.get(e);if(n)return this.toolMap.set(e,n),this.disabledToolMap.delete(e),!0;throw new Error("\u4E0D\u5B58\u5728\u540D\u4E3A ${tool} \u7684\u5DE5\u5177")},t.prototype.getTools=function(){return Array.from(this.toolMap.values())},t.prototype.getInstance=function(){return this.instance},t.prototype.destroy=function(){this.toolMap.clear(),this.disabledToolMap.clear()},t2([st],t.prototype,"toolMap",void 0),t2([it],t.prototype,"disableTool",null),t2([it],t.prototype,"enableTool",null),t}();function CHe(t){throw new Error("[mobx-utils] "+t)}function sx(t,e){e===void 0&&(e="Illegal state"),t||CHe(e)}var dq=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(dq(Object.getPrototypeOf(t))||[])},EHe=function(t){var e=dq(t),n=e.filter(function(r,i){return e.indexOf(r)===i});return n},THe=function(t){return EHe(t).filter(function(e){return e!=="constructor"&&!~e.indexOf("__")})},fq="pending",lx="fulfilled",XN="rejected";function kHe(t){switch(this.state){case fq:return t.pending&&t.pending(this.value);case XN:return t.rejected&&t.rejected(this.value);case lx:return t.fulfilled?t.fulfilled(this.value):this.value}}function A6(t,e){if(sx(arguments.length<=2,"fromPromise expects up to two arguments"),sx(typeof t=="function"||typeof t=="object"&&t&&typeof t.then=="function","Please pass a promise or function to fromPromise"),t.isPromiseBasedObservable===!0)return t;typeof t=="function"&&(t=new Promise(t));var n=t;t.then(it("observableFromPromise-resolve",function(i){n.value=i,n.state=lx}),it("observableFromPromise-reject",function(i){n.value=i,n.state=XN})),n.isPromiseBasedObservable=!0,n.case=kHe;var r=e&&e.state===lx?e.value:void 0;return NP(n,{value:r,state:fq},{},{deep:!1}),n}(function(t){t.reject=it("fromPromise.reject",function(n){var r=t(Promise.reject(n));return r.state=XN,r.value=n,r});function e(n){n===void 0&&(n=void 0);var r=t(Promise.resolve(n));return r.state=lx,r.value=n,r}t.resolve=it("fromPromise.resolve",e)})(A6||(A6={}));var IO=function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o};(function(){function t(e,n){var r=this;m7e(function(){r.current=n,r.subscription=e.subscribe(r)})}return t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(e){this.current=e},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(e){this.current=e,this.dispose()},IO([st.ref],t.prototype,"current",void 0),IO([it.bound],t.prototype,"next",null),IO([it.bound],t.prototype,"complete",null),IO([it.bound],t.prototype,"error",null),t})();var ux=function(){return ux=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ux.apply(this,arguments)},Qv=function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},PHe=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function t(e){var n=this;this.model=e,this.localValues=st.map({}),this.localComputedValues=st.map({}),this.isPropertyDirty=function(r){return n.localValues.has(r)},sx(Sl(e),"createViewModel expects an observable object"),THe(e).forEach(function(r){if(!(r===Rn||r==="__mobxDidRunLazyInitializers")){if(sx(PHe.indexOf(r)===-1,"The propertyname "+r+" is reserved and cannot be used with viewModels"),O8(e,r)){var i=zb(e,r).derivation;n.localComputedValues.set(r,Gr(i.bind(n)))}var o=Object.getOwnPropertyDescriptor(e,r),a=o?{enumerable:o.enumerable}:{};Object.defineProperty(n,r,ux(ux({},a),{configurable:!0,get:function(){return O8(e,r)?n.localComputedValues.get(r).get():n.isPropertyDirty(r)?n.localValues.get(r):n.model[r]},set:it(function(s){s!==n.model[r]?n.localValues.set(r,s):n.localValues.delete(r)})}))}})}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var e=this;vm(this.localValues).forEach(function(n){var r=e.localValues.get(n),i=e.model[n];gc(i)?i.replace(r):ls(i)?(i.clear(),i.merge(r)):x7e(r)||(e.model[n]=r)}),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(e){this.localValues.delete(e)},Qv([Gr],t.prototype,"isDirty",null),Qv([Gr],t.prototype,"changedValues",null),Qv([it.bound],t.prototype,"submit",null),Qv([it.bound],t.prototype,"reset",null),Qv([it.bound],t.prototype,"resetProperty",null),t})();function n2(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function r2(t){return Sl(t)||gc(t)||ls(t)}function AHe(t,e){var n=new WeakMap;function r(s){var l=n.get(s.object);i(s,l),e(s,n2(l),t)}function i(s,l){switch(s.type){case"add":o(s.newValue,l,s.name);break;case"update":a(s.oldValue),o(s.newValue,l,s.name||""+s.index);break;case"remove":case"delete":a(s.oldValue);break;case"splice":s.removed.map(a),s.added.forEach(function(d,f){return o(d,l,""+(s.index+f))});for(var u=s.index+s.addedCount;u<s.object.length;u++)if(r2(s.object[u])){var c=n.get(s.object[u]);c&&(c.path=""+u)}break}}function o(s,l,u){if(r2(s)){var c=n.get(s);if(c){if(c.parent!==l||c.path!==u)throw new Error("The same observable object cannot appear twice in the same tree,"+(" trying to assign it to '"+n2(l)+"/"+u+"',")+(" but it already exists at '"+n2(c.parent)+"/"+c.path+"'"))}else{var d={parent:l,path:u,dispose:LZ(s,r)};n.set(s,d),E7e(s).forEach(function(f){var h=f[0],g=f[1];return o(g,d,h)})}}}function a(s){if(r2(s)){var l=n.get(s);if(!l)return;n.delete(s),l.dispose(),C7e(s).forEach(a)}}return o(t,void 0,""),function(){a(t)}}var MHe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){MHe(e,t);function e(n,r,i){var o=i===void 0?{}:i,a=o.name,s=a===void 0?"ogm"+(Math.random()*1e3|0):a,l=o.keyToName,u=l===void 0?function(f){return""+f}:l,c=t.call(this)||this;c._keyToName=u,c._groupBy=r,c._ogmInfoKey=Symbol("ogmInfo"+s),c._base=n;for(var d=0;d<n.length;d++)c._addItem(n[d]);return c._disposeBaseObserver=LZ(c._base,function(f){if(f.type==="splice")Zl(function(){for(var h=0,g=f.removed;h<g.length;h++){var m=g[h];c._removeItem(m)}for(var y=0,b=f.added;y<b.length;y++){var w=b[y];c._addItem(w)}});else if(f.type==="update")Zl(function(){c._removeItem(f.oldValue),c._addItem(f.newValue)});else throw new Error("illegal state")}),c}return e.prototype.clear=function(){throw new Error("not supported")},e.prototype.delete=function(n){throw new Error("not supported")},e.prototype.set=function(n,r){throw new Error("not supported")},e.prototype.dispose=function(){this._disposeBaseObserver();for(var n=0;n<this._base.length;n++){var r=this._base[n],i=r[this._ogmInfoKey];i.reaction(),delete r[this._ogmInfoKey]}},e.prototype._getGroupArr=function(n){var r=t.prototype.get.call(this,n);return r===void 0&&(r=st([],{name:"GroupArray["+this._keyToName(n)+"]",deep:!1}),t.prototype.set.call(this,n,r)),r},e.prototype._removeFromGroupArr=function(n,r){var i=t.prototype.get.call(this,n);i.length===1?t.prototype.delete.call(this,n):(r===i.length-1||(i[r]=i[i.length-1],i[r][this._ogmInfoKey].groupArrIndex=r),i.length--)},e.prototype._addItem=function(n){var r=this,i=this._groupBy(n),o=this._getGroupArr(i),a={groupByValue:i,groupArrIndex:o.length,reaction:PZ(function(){return r._groupBy(n)},function(s,l){var u=n[r._ogmInfoKey];r._removeFromGroupArr(u.groupByValue,u.groupArrIndex);var c=r._getGroupArr(s),d=c.length;c.push(n),u.groupByValue=s,u.groupArrIndex=d})};Object.defineProperty(n,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:a}),o.push(n)},e.prototype._removeItem=function(n){var r=n[this._ogmInfoKey];this._removeFromGroupArr(r.groupByValue,r.groupArrIndex),r.reaction(),delete n[this._ogmInfoKey]},e})(FN);Promise.resolve(),typeof queueMicrotask!="undefined"||typeof process!="undefined"&&process.nextTick;var mA=globalThis&&globalThis.__assign||function(){return mA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},mA.apply(this,arguments)},RHe=function(){function t(e){this.undos=[],this.redos=[],this.callbacks=[],this.stopWatch=null,this.curData=null,this.maxSize=50,this.waitTime=100,this.eventCenter=e}return t.prototype.add=function(e){Qi(ts(this.undos),e)||(this.undos.push(e),Qi(this.curData,e)||(this.redos=[]),this.eventCenter.emit(cn.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undoAble(),redoAble:this.redoAble()}}),this.undos.length>this.maxSize&&this.undos.shift())},t.prototype.undoAble=function(){return this.undos.length>1},t.prototype.undo=function(){if(!!this.undoAble()){var e=this.undos.pop();this.redos.push(e);var n=this.undos.pop();return this.curData=Nn(n),n}},t.prototype.redoAble=function(){return this.redos.length>0},t.prototype.redo=function(){if(!!this.redoAble()){var e=this.redos.pop();return this.curData=Nn(e),e}},t.prototype.watch=function(e){var n=this;this.stopWatch&&this.stopWatch(),this.undos.push(e.modelToGraphData()),this.stopWatch=AHe(e,Qo(function(){var r=e.modelToHistoryData();r&&n.add(mA({},r))},this.waitTime))},t.prototype.destroy=function(){this.undos=[],this.redos=[],this.curData=null,this.stopWatch&&this.stopWatch()},t}(),hq={exports:{}};(function(t){(function(e,n,r){if(!e)return;for(var i={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},o={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},s={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},l,u=1;u<20;++u)i[111+u]="f"+u;for(u=0;u<=9;++u)i[u+96]=u.toString();function c(E,T,P){if(E.addEventListener){E.addEventListener(T,P,!1);return}E.attachEvent("on"+T,P)}function d(E){if(E.type=="keypress"){var T=String.fromCharCode(E.which);return E.shiftKey||(T=T.toLowerCase()),T}return i[E.which]?i[E.which]:o[E.which]?o[E.which]:String.fromCharCode(E.which).toLowerCase()}function f(E,T){return E.sort().join(",")===T.sort().join(",")}function h(E){var T=[];return E.shiftKey&&T.push("shift"),E.altKey&&T.push("alt"),E.ctrlKey&&T.push("ctrl"),E.metaKey&&T.push("meta"),T}function g(E){if(E.preventDefault){E.preventDefault();return}E.returnValue=!1}function m(E){if(E.stopPropagation){E.stopPropagation();return}E.cancelBubble=!0}function y(E){return E=="shift"||E=="ctrl"||E=="alt"||E=="meta"}function b(){if(!l){l={};for(var E in i)E>95&&E<112||i.hasOwnProperty(E)&&(l[i[E]]=E)}return l}function w(E,T,P){return P||(P=b()[E]?"keydown":"keypress"),P=="keypress"&&T.length&&(P="keydown"),P}function O(E){return E==="+"?["+"]:(E=E.replace(/\+{2}/g,"+plus"),E.split("+"))}function x(E,T){var P,A,D,$=[];for(P=O(E),D=0;D<P.length;++D)A=P[D],s[A]&&(A=s[A]),T&&T!="keypress"&&a[A]&&(A=a[A],$.push("shift")),y(A)&&$.push(A);return T=w(A,$,T),{key:A,modifiers:$,action:T}}function S(E,T){return E===null||E===n?!1:E===T?!0:S(E.parentNode,T)}function C(E){var T=this;if(E=E||n,!(T instanceof C))return new C(E);T.target=E,T._callbacks={},T._directMap={};var P={},A,D=!1,$=!1,N=!1;function z(K){K=K||{};var oe=!1,ne;for(ne in P){if(K[ne]){oe=!0;continue}P[ne]=0}oe||(N=!1)}function I(K,oe,ne,_e,Ce,U){var ie,ee,he=[],$e=ne.type;if(!T._callbacks[K])return[];for($e=="keyup"&&y(K)&&(oe=[K]),ie=0;ie<T._callbacks[K].length;++ie)if(ee=T._callbacks[K][ie],!(!_e&&ee.seq&&P[ee.seq]!=ee.level)&&$e==ee.action&&($e=="keypress"&&!ne.metaKey&&!ne.ctrlKey||f(oe,ee.modifiers))){var Me=!_e&&ee.combo==Ce,q=_e&&ee.seq==_e&&ee.level==U;(Me||q)&&T._callbacks[K].splice(ie,1),he.push(ee)}return he}function L(K,oe,ne,_e){T.stopCallback(oe,oe.target||oe.srcElement,ne,_e)||K(oe,ne)===!1&&(g(oe),m(oe))}T._handleKey=function(K,oe,ne){var _e=I(K,oe,ne),Ce,U={},ie=0,ee=!1;for(Ce=0;Ce<_e.length;++Ce)_e[Ce].seq&&(ie=Math.max(ie,_e[Ce].level));for(Ce=0;Ce<_e.length;++Ce){if(_e[Ce].seq){if(_e[Ce].level!=ie)continue;ee=!0,U[_e[Ce].seq]=1,L(_e[Ce].callback,ne,_e[Ce].combo,_e[Ce].seq);continue}ee||L(_e[Ce].callback,ne,_e[Ce].combo)}var he=ne.type=="keypress"&&$;ne.type==N&&!y(K)&&!he&&z(U),$=ee&&ne.type=="keydown"};function X(K){typeof K.which!="number"&&(K.which=K.keyCode);var oe=d(K);if(!!oe){if(K.type=="keyup"&&D===oe){D=!1;return}T.handleKey(oe,h(K),K)}}function Q(){clearTimeout(A),A=setTimeout(z,1e3)}function W(K,oe,ne,_e){P[K]=0;function Ce($e){return function(){N=$e,++P[K],Q()}}function U($e){L(ne,$e,K),_e!=="keyup"&&(D=d($e)),setTimeout(z,10)}for(var ie=0;ie<oe.length;++ie){var ee=ie+1===oe.length,he=ee?U:Ce(_e||x(oe[ie+1]).action);G(oe[ie],he,_e,K,ie)}}function G(K,oe,ne,_e,Ce){T._directMap[K+":"+ne]=oe,K=K.replace(/\s+/g," ");var U=K.split(" "),ie;if(U.length>1){W(K,U,oe,ne);return}ie=x(K,ne),T._callbacks[ie.key]=T._callbacks[ie.key]||[],I(ie.key,ie.modifiers,{type:ie.action},_e,K,Ce),T._callbacks[ie.key][_e?"unshift":"push"]({callback:oe,modifiers:ie.modifiers,action:ie.action,seq:_e,level:Ce,combo:K})}T._bindMultiple=function(K,oe,ne){for(var _e=0;_e<K.length;++_e)G(K[_e],oe,ne)},c(E,"keypress",X),c(E,"keydown",X),c(E,"keyup",X)}C.prototype.bind=function(E,T,P){var A=this;return E=E instanceof Array?E:[E],A._bindMultiple.call(A,E,T,P),A},C.prototype.unbind=function(E,T){var P=this;return P.bind.call(P,E,function(){},T)},C.prototype.trigger=function(E,T){var P=this;return P._directMap[E+":"+T]&&P._directMap[E+":"+T]({},E),P},C.prototype.reset=function(){var E=this;return E._callbacks={},E._directMap={},E},C.prototype.stopCallback=function(E,T){var P=this;if((" "+T.className+" ").indexOf(" mousetrap ")>-1||S(T,P.target))return!1;if("composedPath"in E&&typeof E.composedPath=="function"){var A=E.composedPath()[0];A!==E.target&&(T=A)}return T.tagName=="INPUT"||T.tagName=="SELECT"||T.tagName=="TEXTAREA"||T.isContentEditable},C.prototype.handleKey=function(){var E=this;return E._handleKey.apply(E,arguments)},C.addKeycodes=function(E){for(var T in E)E.hasOwnProperty(T)&&(i[T]=E[T]);l=null},C.init=function(){var E=C(n);for(var T in E)T.charAt(0)!=="_"&&(C[T]=function(P){return function(){return E[P].apply(E,arguments)}}(T))},C.init(),e.Mousetrap=C,t.exports&&(t.exports=C),typeof r=="function"&&r.amd&&r(function(){return C})})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)})(hq);var $He=hq.exports,Yd=globalThis&&globalThis.__assign||function(){return Yd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Yd.apply(this,arguments)},NHe=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},xu=null;function M6(t,e){return t.x+=e,t.y+=e,FR(t.text)||(t.text.x+=e,t.text.y+=e),t}function R6(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach(function(n){n.x+=e,n.y+=e}),FR(t.text)||(t.text.x+=e,t.text.y+=e),t}function DHe(t,e){var n=t.x,r=t.y,i=t.text,o=i?{x:i.x+e,y:i.y+e,value:i.value}:void 0;return Yd(Yd({},t),{id:"",x:n+e,y:r+e,text:o})}function LHe(t,e){var n=t.startPoint,r=t.endPoint,i=t.pointsList,o=t.text,a=NHe(t,["startPoint","endPoint","pointsList","text"]);a.id="";var s={x:n.x+e,y:n.y+e},l={x:r.x+e,y:r.y+e},u=Ca(i,function(d){return{x:d.x+e,y:d.y+e}}),c=o?Yd(Yd({},o),{x:o.x+e,y:o.y+e}):void 0;return Yd(Yd({},a),{startPoint:s,endPoint:l,pointsList:u,text:c})}var eg=40,BO=40;function IHe(t,e){var n=t.keyboard,r=n.options.keyboard;n.on(["cmd + c","ctrl + c"],function(){if(BO=eg,!(r!=null&&r.enabled)||e.textEditElement)return!0;var i=t.options.guards,o=e.getSelectElements(!1),a=i&&i.beforeClone?i.beforeClone(o):!0;return!a||o.nodes.length===0&&o.edges.length===0?(xu=null,!0):(xu=o,xu.nodes.forEach(function(s){return M6(s,eg)}),xu.edges.forEach(function(s){return R6(s,eg)}),!1)}),n.on(["cmd + v","ctrl + v"],function(){if(!(r!=null&&r.enabled)||e.textEditElement)return!0;if(xu&&(xu.nodes||xu.edges)){t.clearSelectElements();var i=t.addElements(xu,BO);if(!i)return!0;i.nodes.forEach(function(o){return t.selectElementById(o.id,!0)}),i.edges.forEach(function(o){return t.selectElementById(o.id,!0)}),xu.nodes.forEach(function(o){return M6(o,eg)}),xu.edges.forEach(function(o){return R6(o,eg)}),BO=BO+eg}return!1}),n.on(["cmd + z","ctrl + z"],function(){return!(r!=null&&r.enabled)||e.textEditElement?!0:(t.undo(),!1)}),n.on(["cmd + y","ctrl + y"],function(){return!(r!=null&&r.enabled)||e.textEditElement?!0:(t.redo(),!1)}),n.on(["backspace"],function(){if(!(r!=null&&r.enabled)||e.textEditElement)return!0;var i=e.getSelectElements(!0);return t.clearSelectElements(),i.edges.forEach(function(o){return o.id&&t.deleteEdge(o.id)}),i.nodes.forEach(function(o){return o.id&&t.deleteNode(o.id)}),!1})}var BHe=function(){function t(e){e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var n=e.lf;this.target=n.container,this.mousetrap=new $He(this.target),e.keyboard.enabled&&!n.options.isSilentMode&&this.enable(!0)}return t.prototype.initShortcuts=function(){var e=this,n,r=((n=this.options.keyboard)!==null&&n!==void 0?n:{}).shortcuts;if(r)if(Fn(r))r.forEach(function(s){var l=s.keys,u=s.callback,c=s.action;return e.on(l,u,c)});else{var i=r.keys,o=r.callback,a=r.action;this.on(i,o,a)}},t.prototype.on=function(e,n,r){this.mousetrap.bind(this.getKeys(e),n,r)},Object.defineProperty(t.prototype,"disabled",{get:function(){var e,n;return((n=(e=this.options)===null||e===void 0?void 0:e.keyboard)===null||n===void 0?void 0:n.enabled)!==!0},enumerable:!1,configurable:!0}),t.prototype.off=function(e,n){this.mousetrap.unbind(this.getKeys(e),n)},t.prototype.enable=function(e){(this.disabled||e)&&(this.options.keyboard&&(this.options.keyboard.enabled=!0),this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))},t.prototype.disable=function(){this.disabled||(this.options.keyboard&&(this.options.keyboard.enabled=!1),this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))},t.prototype.destroy=function(){this.mousetrap.reset()},t.prototype.getKeys=function(e){var n=this;return(Array.isArray(e)?e:[e]).map(function(r){return n.formatKey(r)})},t.prototype.formatKey=function(e){return e.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")},t}(),Fd=globalThis&&globalThis.__assign||function(){return Fd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Fd.apply(this,arguments)},FO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},i2=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},o2=Symbol("plugin registered by Logicflow.use"),vA=function(){function t(e){var n=this,r;this.viewMap=new Map,this.components=[],this.extension={},this.setView=function(u,c){return n.viewMap.set(u,c)},this.getView=function(u){return n.viewMap.get(u)};var i=N0.get(e),o=i.container,a=i.width,s=i.height;this.options=i,this.container=this.initContainer(o,a,s),this.graphModel=new TWe(Fd(Fd({},i),{container:this.container})),this.plugins=(r=i.plugins)!==null&&r!==void 0?r:[];var l=this.graphModel.eventCenter;this.tool=new SHe(this),this.dnd=new hHe({lf:this}),this.history=new RHe(l),this.keyboard=new BHe({lf:this,keyboard:i.keyboard}),i.snapline!==!1&&(this.snaplineModel=new kWe(this.graphModel),pHe(l,this.snaplineModel)),i.isSilentMode||(IHe(this,this.graphModel),this.keyboard.initShortcuts()),this.defaultRegister(),this.installPlugins(i.disabledPlugins)}return t.prototype.initContainer=function(e,n,r){var i=document.createElement("div");return i.style.position="relative",i.style.width=n?"".concat(n,"px"):"100%",i.style.height=r?"".concat(r,"px"):"100%",e.innerHTML="",e.appendChild(i),i},Object.defineProperty(t.prototype,Symbol.toStringTag,{get:function(){return t.toStringTag},enumerable:!1,configurable:!0}),t.prototype.register=function(e,n,r){if(r===void 0&&(r=!0),typeof e!="string"){this.registerElement(e);return}var i={BaseEdge:xC,BaseEdgeModel:wC,BaseNode:Hf,BaseNodeModel:Wf,RectNode:Cf,RectNodeModel:cp,CircleNode:ix,CircleNodeModel:ex,PolygonNode:ax,PolygonNodeModel:tx,TextNode:T6,TextNodeModel:C6,LineEdge:P6,LineEdgeModel:O6,DiamondNode:sA,DiamondNodeModel:GP,PolylineEdge:z0,PolylineEdgeModel:j0,BezierEdge:pA,BezierEdgeModel:YP,EllipseNode:uA,EllipseNodeModel:KP,HtmlNode:dA,HtmlNodeModel:JP,h:Kt,type:e};if(this.viewMap.forEach(function(u){var c=u.extendKey;c&&(i[c]=u)}),this.graphModel.modelMap.forEach(function(u){var c=u.extendKey;c&&(i[c]=u)}),n){var o=n(i),a=o.view,s=o.model,l=a;r&&!l.isObserved&&(l.isObserved=!0,l=Ea(l)),this.setView(e,l),this.graphModel.setModel(e,s)}},t.prototype.registerElement=function(e){var n=e.view;e.isObserverView!==!1&&!n.isObserved&&(n.isObserved=!0,n=Ea(n)),this.setView(e.type,n),this.graphModel.setModel(e.type,e.model)},t.prototype.batchRegister=function(e){var n=this;e===void 0&&(e=[]),In(e,function(r){n.registerElement(r)})},t.prototype.defaultRegister=function(){var e=[{type:"rect",view:Cf,model:cp},{type:"circle",view:ix,model:ex},{type:"polygon",view:ax,model:tx},{type:"text",view:T6,model:C6},{type:"ellipse",view:uA,model:KP},{type:"diamond",view:sA,model:GP},{type:"html",view:dA,model:JP},{type:"line",view:P6,model:O6},{type:"polyline",view:z0,model:j0},{type:"bezier",view:pA,model:YP}];this.batchRegister(e)},t.prototype.addNode=function(e,n,r){return n===void 0&&(n=cn.NODE_ADD),this.graphModel.addNode(e,n,r)},t.prototype.deleteNode=function(e){var n=this.graphModel.getNodeModelById(e);if(!n)return!1;var r=n.getData(),i=this.options.guards,o=i!=null&&i.beforeDelete?i.beforeDelete(r):!0;return o&&this.graphModel.deleteNode(e),o},t.prototype.cloneNode=function(e){var n=this.graphModel.getNodeModelById(e),r=n==null?void 0:n.getData();if(r){var i=this.options.guards,o=i!=null&&i.beforeClone?i.beforeClone(r):!0;if(o)return this.graphModel.cloneNode(e)}},t.prototype.changeNodeId=function(e,n){return this.graphModel.changeNodeId(e,n)},t.prototype.changeNodeType=function(e,n){this.graphModel.changeNodeType(e,n)},t.prototype.getNodeModelById=function(e){return this.graphModel.getNodeModelById(e)},t.prototype.getNodeDataById=function(e){var n=this.getNodeModelById(e);return n==null?void 0:n.getData()},t.prototype.getNodeIncomingEdge=function(e){return this.graphModel.getNodeIncomingEdge(e)},t.prototype.getNodeOutgoingEdge=function(e){return this.graphModel.getNodeOutgoingEdge(e)},t.prototype.getNodeIncomingNode=function(e){return this.graphModel.getNodeIncomingNode(e)},t.prototype.getNodeOutgoingNode=function(e){return this.graphModel.getNodeOutgoingNode(e)},t.prototype.createFakeNode=function(e){var n=this.graphModel.modelMap.get(e.type);if(!n)return console.warn("\u4E0D\u5B58\u5728\u4E3A".concat(e.type,"\u7C7B\u578B\u7684\u8282\u70B9")),null;var r=new n(Fd(Fd({},e),{virtual:!0}),this.graphModel);return this.graphModel.setFakeNode(r),r},t.prototype.removeFakeNode=function(){this.graphModel.removeFakeNode()},t.prototype.setNodeSnapLine=function(e){var n;(n=this.snaplineModel)===null||n===void 0||n.setNodeSnapLine(e)},t.prototype.removeNodeSnapLine=function(){var e;(e=this.snaplineModel)===null||e===void 0||e.clearSnapline()},t.prototype.setDefaultEdgeType=function(e){this.graphModel.setDefaultEdgeType(e)},t.prototype.addEdge=function(e){return this.graphModel.addEdge(e)},t.prototype.getEdgeDataById=function(e){var n=this.getEdgeModelById(e);return n==null?void 0:n.getData()},t.prototype.getEdgeModelById=function(e){return this.graphModel.getEdgeModelById(e)},t.prototype.getEdgeModels=function(e){var n=e.sourceNodeId,r=e.targetNodeId,i=[],o=this.graphModel.edges;return n&&r?In(o,function(a){a.sourceNodeId===n&&a.targetNodeId===r&&i.push(a)}):n?In(o,function(a){a.sourceNodeId===n&&i.push(a)}):r&&In(o,function(a){a.targetNodeId===r&&i.push(a)}),i},t.prototype.changeEdgeId=function(e,n){return this.graphModel.changeEdgeId(e,n)},t.prototype.changeEdgeType=function(e,n){this.graphModel.changeEdgeType(e,n)},t.prototype.deleteEdge=function(e){var n=this.graphModel.getEdgeModelById(e);if(!n)return!1;var r=n.getData(),i=this.options.guards,o=i!=null&&i.beforeDelete?i.beforeDelete(r):!0;return o&&this.graphModel.deleteEdgeById(e),o},t.prototype.deleteEdgeByNodeId=function(e){var n=e.sourceNodeId,r=e.targetNodeId;n&&r?this.graphModel.deleteEdgeBySourceAndTarget(n,r):n?this.graphModel.deleteEdgeBySource(n):r&&this.graphModel.deleteEdgeByTarget(r)},t.prototype.getNodeEdges=function(e){return this.graphModel.getNodeEdges(e)},t.prototype.addElements=function(e,n){var r=this,i=e.nodes,o=e.edges;n===void 0&&(n=40),console.log("distance",n);var a={},s={nodes:[],edges:[]};return In(i,function(l){var u=l.id,c=r.addNode(l);u&&(a[u]=c.id),s.nodes.push(c)}),In(o,function(l){var u=l.sourceNodeId,c=l.targetNodeId;a[u]&&(u=a[u]),a[c]&&(c=a[c]);var d=r.graphModel.addEdge(Fd(Fd({},l),{sourceNodeId:u,targetNodeId:c}));s.edges.push(d)}),s},t.prototype.selectElementById=function(e,n,r){n===void 0&&(n=!1),r===void 0&&(r=!0),this.graphModel.selectElementById(e,n),!n&&r&&this.graphModel.toFront(e)},t.prototype.getSelectElements=function(e){return e===void 0&&(e=!0),this.graphModel.getSelectElements(e)},t.prototype.clearSelectElements=function(){this.graphModel.clearSelectElements()},t.prototype.getModelById=function(e){return this.graphModel.getElement(e)},t.prototype.getDataById=function(e){var n;return(n=this.graphModel.getElement(e))===null||n===void 0?void 0:n.getData()},t.prototype.deleteElement=function(e){var n,r,i,o=this.getModelById(e);if(!o)return!1;var a=(n={},n[xi.NODE]=this.deleteNode,n[xi.EDGE]=this.deleteEdge,n);return(i=(r=a[o.BaseType])===null||r===void 0?void 0:r.call(this,e))!==null&&i!==void 0?i:!1},t.prototype.setElementZIndex=function(e,n){return this.graphModel.setElementZIndex(e,n)},t.prototype.getAreaElement=function(e,n,r,i,o){return r===void 0&&(r=!0),i===void 0&&(i=!0),o===void 0&&(o=!1),this.graphModel.getAreaElement(e,n,r,i,o).map(function(a){return a.getData()})},t.prototype.setProperties=function(e,n){var r;(r=this.graphModel.getElement(e))===null||r===void 0||r.setProperties(ra(n))},t.prototype.getProperties=function(e){var n;return(n=this.graphModel.getElement(e))===null||n===void 0?void 0:n.getProperties()},t.prototype.deleteProperty=function(e,n){var r;(r=this.graphModel.getElement(e))===null||r===void 0||r.deleteProperty(n)},t.prototype.updateAttributes=function(e,n){this.graphModel.updateAttributes(e,n)},t.prototype.editText=function(e){this.graphModel.editText(e)},t.prototype.updateText=function(e,n){this.graphModel.updateText(e,n)},t.prototype.updateEditConfig=function(e){var n=this.graphModel,r=n.editConfigModel,i=n.transformModel,o=r.snapGrid;if(r.updateEditConfig(e),(e==null?void 0:e.stopMoveGraph)!==void 0&&i.updateTranslateLimits(e.stopMoveGraph),e!=null&&e.isSilentMode?this.keyboard.disable():this.keyboard.enable(!0),!Lr(e==null?void 0:e.snapGrid)&&e.snapGrid!==o){var a=this.graphModel.grid.size,s=a===void 0?1:a;this.graphModel.updateGridSize(e.snapGrid?s:1)}},t.prototype.getEditConfig=function(){return this.graphModel.editConfigModel.getConfig()},t.prototype.setTheme=function(e){this.graphModel.setTheme(e)},t.prototype.focusByElement=function(e){var n=void 0,r=this.getNodeModelById(e);if(r){var i=r.getData(),o=i.x,a=i.y;n={x:o,y:a}}var s=this.getEdgeModelById(e);if(s){var l=s.textPosition,o=l.x,a=l.y;n={x:o,y:a}}n&&this.focusByCoordinate(n)},t.prototype.focusByCoordinate=function(e){var n=this.graphModel,r=n.transformModel,i=n.width,o=n.height,a=e.x,s=e.y;r.focusOn(a,s,i,o)},t.prototype.focusOn=function(e){if(typeof e=="string")this.focusByElement(e);else if("x"in e&&"y"in e)this.focusByCoordinate(e);else{var n=e.id,r=e.coordinate;n&&this.focusByElement(n),r&&this.focusByCoordinate(r)}},t.prototype.resize=function(e,n){this.graphModel.resize(e,n),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height},t.prototype.toFront=function(e){this.graphModel.toFront(e)},t.prototype.getPointByClient=function(e,n){if(typeof e=="object")return this.graphModel.getPointByClient(e);if(typeof n=="number")return this.graphModel.getPointByClient({x:e,y:n})},t.prototype.getGraphData=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.getGraphRawData();return this.adapterOut?this.adapterOut.apply(this,i2([r],FO(e),!1)):r},t.prototype.getGraphRawData=function(){return this.graphModel.modelToGraphData()},t.prototype.clearData=function(){this.graphModel.clearData(),this.render({})},t.prototype.renderRawData=function(e){this.graphModel.graphDataToModel(ra(e)),this.options.history!==!1&&this.history.watch(this.graphModel),Z8(rt(DWe,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(cn.GRAPH_RENDERED,{data:this.graphModel.modelToGraphData(),graphModel:this.graphModel})},t.prototype.render=function(e){var n=Nn(e);this.adapterIn&&(n=this.adapterIn(n)),this.renderRawData(n)},t.prototype.undo=function(){if(!!this.history.undoAble()){var e=ra(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(e)}},t.prototype.redo=function(){if(!!this.history.redoAble()){var e=ra(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(e)}},t.prototype.zoom=function(e,n){var r=this.graphModel.transformModel;return r.zoom(e,n)},t.prototype.resetZoom=function(){var e=this.graphModel.transformModel;e.resetZoom()},t.prototype.setZoomMiniSize=function(e){var n=this.graphModel.transformModel;n.setZoomMiniSize(e)},t.prototype.setZoomMaxSize=function(e){var n=this.graphModel.transformModel;n.setZoomMaxSize(e)},t.prototype.getTransform=function(){var e=this.graphModel.transformModel,n=e.SCALE_X,r=e.SCALE_Y,i=e.TRANSLATE_X,o=e.TRANSLATE_Y;return{SCALE_X:n,SCALE_Y:r,TRANSLATE_X:i,TRANSLATE_Y:o}},t.prototype.translate=function(e,n){var r=this.graphModel.transformModel;r.translate(e,n)},t.prototype.resetTranslate=function(){var e=this.graphModel.transformModel,n=e.TRANSLATE_X,r=e.TRANSLATE_Y;this.translate(-n,-r)},t.prototype.translateCenter=function(){this.graphModel.translateCenter()},t.prototype.fitView=function(e,n){n===void 0&&(n=e),this.graphModel.fitView(e,n)},t.prototype.openEdgeAnimation=function(e){this.graphModel.openEdgeAnimation(e)},t.prototype.closeEdgeAnimation=function(e){this.graphModel.closeEdgeAnimation(e)},t.prototype.on=function(e,n){this.graphModel.eventCenter.on(e,n)},t.prototype.off=function(e,n){this.graphModel.eventCenter.off(e,n)},t.prototype.once=function(e,n){this.graphModel.eventCenter.once(e,n)},t.prototype.emit=function(e,n){this.graphModel.eventCenter.emit(e,n)},t.use=function(e,n){var r,i=e.pluginName;if(!i)throw new Error("\u8BF7\u7ED9\u63D2\u4EF6\u6307\u5B9A pluginName!");this.extensions.set(i,(r={},r[o2]=o2,r.extension=e,r.props=n,r))},t.prototype.installPlugins=function(e){var n=this;e===void 0&&(e=[]);var r=Array.from(t.extensions,function(o){var a=FO(o,2),s=a[1];return s}),i=i2(i2([],FO(this.plugins),!1),FO(r),!1);In(i,function(o){var a,s;o2 in o?(a=o.extension,s=o.props):a=o;var l=a==null?void 0:a.pluginName;Z9(e,l)===-1&&n.installPlugin(a,s)})},t.prototype.installPlugin=function(e,n){var r,i;if("pluginName"in e&&"install"in e){var o=e.pluginName,a=e.install,s=e.render;o&&(a&&a.call(e,this,t),s&&this.components.push(s.bind(e)),this.extension[o]=e);return}var l=e,u=l.pluginName,c=new l({lf:this,LogicFlow:t,props:n,options:(i=(r=this.options.pluginsOptions)===null||r===void 0?void 0:r[u])!==null&&i!==void 0?i:{}});c.render&&this.components.push(c.render.bind(c)),this.extension[u]=c},t.prototype.destroy=function(){this.clearData(),Z8(null,this.container),this.keyboard.destroy(),this.graphModel.destroy(),this.tool.destroy(),this.history.destroy()},t.extensions=new Map,t}();(function(t){t.toStringTag="LF.".concat(t.name)})(vA||(vA={}));var pq=vA;function Ea(t){return QN(t)}var $6={width:40,height:40},N6={width:40,height:40},D6={width:40,height:40},L6={width:100,height:80},I6={width:100,height:80},FHe=function(){function t(){globalThis._ids=this,this._ids=new Set}return t.prototype.generateId=function(){return"xxxxxxx".replace(/[x]/g,function(e){var n=Math.random()*16|0,r=e==="x"?n:n&3|8;return r.toString(16)})},t.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},t}(),VHe=(globalThis==null?void 0:globalThis._ids)||new FHe;function iv(){return VHe.next()}var gq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){gq(e,t);function e(n,r){return n.id||(n.id="Event_".concat(iv())),n.text||(n.text=""),n.text&&typeof n.text=="string"&&(n.text={value:n.text,x:n.x,y:n.y+40}),t.call(this,n,r)||this}return e.prototype.setAttributes=function(){this.r=18},e.prototype.getConnectedTargetRules=function(){var n=t.prototype.getConnectedTargetRules.call(this),r={message:"\u8D77\u59CB\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u7EC8\u70B9",validate:function(){return!1}};return n.push(r),n},e.extendKey="StartEventModel",e})(ex);(function(t){gq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.extendKey="StartEventNode",e})(ix);var mq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cx=globalThis&&globalThis.__assign||function(){return cx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},cx.apply(this,arguments)};(function(t){mq(e,t);function e(n,r){return n.id||(n.id="Event_".concat(iv())),n.text||(n.text=""),n.text&&typeof n.text=="string"&&(n.text={value:n.text,x:n.x,y:n.y+40}),t.call(this,n,r)||this}return e.prototype.setAttributes=function(){this.r=18},e.prototype.getConnectedSourceRules=function(){var n=t.prototype.getConnectedSourceRules.call(this),r={message:"\u7ED3\u675F\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u8D77\u70B9",validate:function(){return!1}};return n.push(r),n},e.extendKey="EndEventModel",e})(ex);(function(t){mq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},e.prototype.getShape=function(){var n=this.props.model,r=n.getNodeStyle(),i=n,o=i.x,a=i.y,s=i.r,l=t.prototype.getShape.call(this);return Kt("g",{},l,Kt("circle",cx(cx({},r),{cx:o,cy:a,r:s-5})))},e.extendKey="EndEventView",e})(ix);var vq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){vq(e,t);function e(n,r){return n.id||(n.id="Flow_".concat(iv())),t.call(this,n,r)||this}return e.extendKey="SequenceFlowModel",e})(j0);(function(t){vq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.extendKey="SequenceFlowEdge",e})(z0);var yq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qy=globalThis&&globalThis.__assign||function(){return Qy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Qy.apply(this,arguments)};(function(t){yq(e,t);function e(n,r){var i=this;return n.id||(n.id="Gateway_".concat(iv())),n.text||(n.text=""),n.text&&typeof n.text=="string"&&(n.text={value:n.text,x:n.x,y:n.y+40}),i=t.call(this,n,r)||this,i.points=[[25,0],[50,25],[25,50],[0,25]],i}return e.extendKey="ExclusiveGatewayModel",e})(tx);(function(t){yq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n,i=r.x,o=r.y,a=r.width,s=r.height,l=r.points,u=n.getNodeStyle();return Kt("g",{transform:"matrix(1 0 0 1 ".concat(i-a/2," ").concat(o-s/2,")")},Kt("polygon",Qy(Qy({},u),{x:i,y:o,points:l})),Kt("path",Qy({d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z"},u)))},e.extendKey="ExclusiveGatewayNode",e})(ax);var bq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yA=globalThis&&globalThis.__assign||function(){return yA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},yA.apply(this,arguments)};(function(t){bq(e,t);function e(n,r){return n.id||(n.id="Activity_".concat(iv())),t.call(this,n,r)||this}return e.extendKey="ServiceTaskModel",e})(cp);(function(t){bq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.getNodeStyle();return Kt("svg",{x:r-o/2+5,y:i-a/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Kt("path",{fill:s.stroke,d:"M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z"}))},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.radius,l=n.getNodeStyle();return Kt("g",{},[Kt("rect",yA({x:r-o/2,y:i-a/2,rx:s,ry:s,width:o,height:a},l)),this.getLabelShape()])},e.extendKey="ServiceTaskNode",e})(Cf);var _q=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),dx=globalThis&&globalThis.__assign||function(){return dx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},dx.apply(this,arguments)};(function(t){_q(e,t);function e(n,r){return n.id||(n.id="Activity_".concat(iv())),t.call(this,n,r)||this}return e.extendKey="UserTaskModel",e})(cp);(function(t){_q(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.getNodeStyle();return Kt("svg",{x:r-o/2+5,y:i-a/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Kt("path",{fill:s.stroke,d:"M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z"}))},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.radius,l=n.getNodeStyle();return Kt("g",{},[Kt("rect",dx(dx({},l),{x:r-o/2,y:i-a/2,rx:s,ry:s,width:o,height:a})),this.getLabelShape()])},e.extendKey="UserTaskNode",e})(Cf);var jHe=function(){function t(){globalThis._ids=this,this._ids=new Set}return t.prototype.generateId=function(){return"xxxxxxx".replace(/[x]/g,function(e){var n=Math.random()*16|0,r=e==="x"?n:n&3|8;return r.toString(16)})},t.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},t}(),QHe=(globalThis==null?void 0:globalThis._ids)||new jHe;function B6(){return QHe.next()}function Oq(t){return Object.prototype.toString.call(t)}function zHe(t){return" ".repeat(t)}function fx(t){var e=t;return Oq(t)==="[object Object]"?(e={},Object.keys(t).forEach(function(n){var r=n;n.charAt(0)==="-"&&(r=n.substring(1)),e[r]=fx(t[n])})):Array.isArray(t)&&(e=[],t.forEach(function(n,r){e[r]=fx(n)})),e}function WHe(t){var e=t;try{typeof e!="string"&&(e=JSON.parse(t))}catch{e=JSON.stringify(fx(t)).replace(/"/g,"'")}return e}var fh=`
- `;function V1(t,e,n){var r=zHe(n);if(t!==0&&t!==!1&&!t)return fh+r+"<".concat(e," />");var i="";if(e==="#text")return fh+r+t;if(e==="#cdata-section")return fh+r+"<![CDATA["+t+"]]>";if(e==="#comment")return fh+r+"<!--"+t+"-->";if("".concat(e).charAt(0)==="-")return" "+e.substring(1)+'="'+WHe(t)+'"';if(Array.isArray(t))t.forEach(function(l){i+=V1(l,e,n+1)});else if(Oq(t)==="[object Object]"){var o=Object.keys(t),a="",s="";i+=(n===0?"":fh+r)+"<"+e,o.forEach(function(l){l.charAt(0)==="-"?a+=V1(t[l],l,n+1):s+=V1(t[l],l,n+1)}),i+=a+(s!==""?">".concat(s).concat(fh+r,"</").concat(e,">"):" />")}else i+=fh+r+"<".concat(e,">").concat(t.toString(),"</").concat(e,">");return i}function HHe(t){var e="";for(var n in t)e+=V1(t[n],n,0);return e}var Ra=function(){};Ra.ObjTree=function(){return this};Ra.ObjTree.VERSION="0.23";Ra.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
- `;Ra.ObjTree.prototype.attr_prefix="-";Ra.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,r=n.parseFromString(t,"application/xml");if(!r)return;e=r.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(!!e)return this.parseDOM(e)};Ra.ObjTree.prototype.parseHTTP=function(t,e,n){var r={};for(var i in e)r[i]=e[i];if(r.method||(typeof r.postBody=="undefined"&&typeof r.postbody=="undefined"&&typeof r.parameters=="undefined"?r.method="get":r.method="post"),n){r.asynchronous=!0;var o=this,a=n,s=r.onComplete;r.onComplete=function(c){var d;c&&c.responseXML&&c.responseXML.documentElement&&(d=o.parseDOM(c.responseXML.documentElement)),a(d,c),s&&s(c)}}else r.asynchronous=!1;var l;if(typeof HTTP!="undefined"&&HTTP.Request){r.uri=t;var u=new HTTP.Request(r);u&&(l=u.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var u=new Ajax.Request(t,r);u&&(l=u.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};Ra.ObjTree.prototype.parseDOM=function(t){if(!!t){if(this.__force_array={},this.force_array)for(var e=0;e<this.force_array.length;e++)this.__force_array[this.force_array[e]]=1;var n=this.parseElement(t);if(this.__force_array[t.nodeName]&&(n=[n]),t.nodeType!=11){var r={};r[t.nodeName]=n,n=r}return n}};Ra.ObjTree.prototype.parseElement=function(t){if(t.nodeType!=7){if(t.nodeType==3||t.nodeType==4||t.nodeType==8){var e=t.nodeValue.match(/[^\x00-\x20]/);return e==null?void 0:t.nodeValue}var n=null,r={};if(t.attributes&&t.attributes.length){n={};for(var i=0;i<t.attributes.length;i++){var o=t.attributes[i].nodeName;if(typeof o=="string"){var a=t.attributes[i].nodeValue;try{a=JSON.parse(t.attributes[i].nodeValue.replace(/'/g,'"'))}catch{a=t.attributes[i].nodeValue}!a||(o=this.attr_prefix+o,typeof r[o]=="undefined"&&(r[o]=0),r[o]++,this.addNode(n,o,r[o],a))}}}if(t.childNodes&&t.childNodes.length){var s=!0;n&&(s=!1);for(var i=0;i<t.childNodes.length&&s;i++){var l=t.childNodes[i].nodeType;l==3||l==4||l==8||(s=!1)}if(s){n||(n="");for(var i=0;i<t.childNodes.length;i++)n+=t.childNodes[i].nodeValue}else{n||(n={});for(var i=0;i<t.childNodes.length;i++){var o=t.childNodes[i].nodeName;if(typeof o=="string"){var a=this.parseElement(t.childNodes[i]);!a||(typeof r[o]=="undefined"&&(r[o]=0),r[o]++,this.addNode(n,o,r[o],a))}}}}else n===null&&(n={});return n}};Ra.ObjTree.prototype.addNode=function(t,e,n,r){this.__force_array[e]?(n==1&&(t[e]=[]),t[e][t[e].length]=r):n==1?t[e]=r:n==2?t[e]=[t[e],r]:t[e][t[e].length]=r};Ra.ObjTree.prototype.writeXML=function(t){var e=this.hash_to_xml(null,t);return this.xmlDecl+e};Ra.ObjTree.prototype.hash_to_xml=function(t,e){var n=[],r=[];for(var i in e)if(!!e.hasOwnProperty(i)){var o=e[i];i.charAt(0)!=this.attr_prefix?typeof o=="undefined"||o==null?n[n.length]="<"+i+" />":typeof o=="object"&&o.constructor==Array?n[n.length]=this.array_to_xml(i,o):typeof o=="object"?n[n.length]=this.hash_to_xml(i,o):n[n.length]=this.scalar_to_xml(i,o):r[r.length]=" "+i.substring(1)+'="'+this.xml_escape(o)+'"'}var a=r.join(""),s=n.join("");return typeof t=="undefined"||t==null||(n.length>0?s.match(/\n/)?s="<"+t+a+`>
- `+s+"</"+t+`>
- `:s="<"+t+a+">"+s+"</"+t+`>
- `:s="<"+t+a+` />
- `),s};Ra.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],r=0;r<e.length;r++){var i=e[r];typeof i=="undefined"||i==null?n[n.length]="<"+t+" />":typeof i=="object"&&i.constructor==Array?n[n.length]=this.array_to_xml(t,i):typeof i=="object"?n[n.length]=this.hash_to_xml(t,i):n[n.length]=this.scalar_to_xml(t,i)}return n.join("")};Ra.ObjTree.prototype.scalar_to_xml=function(t,e){return t=="#text"?this.xml_escape(e):"<"+t+">"+this.xml_escape(e)+"</"+t+`>
- `};Ra.ObjTree.prototype.xml_escape=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var UHe=function(t){return new Ra.ObjTree().parseXML(t)},XHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),bA=globalThis&&globalThis.__assign||function(){return bA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},bA.apply(this,arguments)},SC=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},rc;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow"})(rc||(rc={}));var wq=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],F6=["properties","startPoint","endPoint","pointsList"];function V6(t){var e=t?F6.concat(t):F6;return function(n){function r(i){var o={};return typeof i=="string"?i:Array.isArray(i)?i.map(function(a){return r(a)}):(Object.entries(i).forEach(function(a){var s=SC(a,2),l=s[0],u=s[1];typeof u!="object"?l.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(l)?o[l]=u:o["-".concat(l)]=u:e.includes(l)?o["-".concat(l)]=r(u):o[l]=r(u)}),o)}return r(n)}}function hx(t){var e={};return Object.entries(t).forEach(function(n){var r=SC(n,2),i=r[0],o=r[1];i.indexOf("-")===0?e[i.substring(1)]=fx(o):typeof o=="string"?e[i]=o:Object.prototype.toString.call(o)==="[object Object]"?e[i]=hx(o):Array.isArray(o)?e[i]=o.map(function(a){return hx(a)}):e[i]=o}),e}function ZHe(t,e,n){var r=new Map;e.nodes.forEach(function(o){var a,s={"-id":o.id};if(!((a=o.text)===null||a===void 0)&&a.value&&(s["-name"]=o.text.value),o.properties){var l=V6(n)(o.properties);Object.assign(s,l)}r.set(o.id,s),t[o.type]?Array.isArray(t[o.type])?t[o.type].push(s):t[o.type]=[t[o.type],s]:t[o.type]=s});var i=e.edges.map(function(o){var a,s,l=r.get(o.targetNodeId);l["bpmn:incoming"]?Array.isArray(l["bpmn:incoming"])?l["bpmn:incoming"].push(o.id):l["bpmn:incoming"]=[l["bpmn:incoming"],o.id]:l["bpmn:incoming"]=o.id;var u={"-id":o.id,"-sourceRef":o.sourceNodeId,"-targetRef":o.targetNodeId};if(!((a=o.text)===null||a===void 0)&&a.value&&(u["-name"]=(s=o.text)===null||s===void 0?void 0:s.value),o.properties){var c=V6(n)(o.properties);Object.assign(u,c)}return u});e.edges.forEach(function(o){var a=r.get(o.sourceNodeId);a["bpmn:outgoing"]?Array.isArray(a["bpmn:outgoing"])?a["bpmn:outgoing"].push(o.id):a["bpmn:outgoing"]=[a["bpmn:outgoing"],o.id]:a["bpmn:outgoing"]=o.id}),t[rc.FLOW]=i}function qHe(t,e){t["bpmndi:BPMNEdge"]=e.edges.map(function(n){var r,i=n.id,o=n.pointsList.map(function(s){var l=s.x,u=s.y;return{"-x":l,"-y":u}}),a={"-id":"".concat(i,"_di"),"-bpmnElement":i,"di:waypoint":o};return!((r=n.text)===null||r===void 0)&&r.value&&(a["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),a}),t["bpmndi:BPMNShape"]=e.nodes.map(function(n){var r,i=n.id,o=100,a=80,s=n.x,l=n.y,u=Uf.shapeConfigMap.get(n.type);u&&(o=u.width,a=u.height),s-=o/2,l-=a/2;var c={"-id":"".concat(i,"_di"),"-bpmnElement":i,"dc:Bounds":{"-x":s,"-y":l,"-width":o,"-height":a}};return!((r=n.text)===null||r===void 0)&&r.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),c})}function YHe(t){var e=[],n=[],r=t["bpmn:definitions"];if(r){var i=r["bpmn:process"];Object.keys(i).forEach(function(o){if(o.indexOf("bpmn:")===0){var a=i[o];if(o===rc.FLOW){var s=r["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];n=KHe(a,s)}else{var l=r["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];e=e.concat(GHe(a,l,o))}}})}return{nodes:e,edges:n}}function GHe(t,e,n){var r=[];if(Array.isArray(t))t.forEach(function(a){var s;Array.isArray(e)?s=e.find(function(u){return u["-bpmnElement"]===a["-id"]}):s=e;var l=j6(s,n,a);r.push(l)});else{var i=void 0;Array.isArray(e)?i=e.find(function(a){return a["-bpmnElement"]===t["-id"]}):i=e;var o=j6(i,n,t);r.push(o)}return r}function j6(t,e,n){var r=Number(t["dc:Bounds"]["-x"]),i=Number(t["dc:Bounds"]["-y"]),o=n["-name"],a=Uf.shapeConfigMap.get(e);a&&(r+=a.width/2,i+=a.height/2);var s;Object.entries(n).forEach(function(d){var f=SC(d,2),h=f[0],g=f[1];wq.indexOf(h)===-1&&(s||(s={}),s[h]=g)}),s&&(s=hx(s));var l;if(o&&(l={x:r,y:i,value:o},t["bpmndi:BPMNLabel"]&&t["bpmndi:BPMNLabel"]["dc:Bounds"])){var u=t["bpmndi:BPMNLabel"]["dc:Bounds"];l.x=Number(u["-x"])+Number(u["-width"])/2,l.y=Number(u["-y"])+Number(u["-height"])/2}var c={id:t["-bpmnElement"],type:e,x:r,y:i,properties:s};return l&&(c.text=l),c}function KHe(t,e){var n=[];if(Array.isArray(t))t.forEach(function(i){var o;Array.isArray(e)?o=e.find(function(a){return a["-bpmnElement"]===i["-id"]}):o=e,n.push(Q6(o,i))});else{var r=void 0;Array.isArray(e)?r=e.find(function(i){return i["-bpmnElement"]===t["-id"]}):r=e,n.push(Q6(r,t))}return n}function Q6(t,e){var n,r=e["-name"]?"".concat(e["-name"]):"";if(r){var i=t["bpmndi:BPMNLabel"]["dc:Bounds"],o=0;r.split(`
- `).forEach(function(l){o<l.length&&(o=l.length)}),n={value:r,x:Number(i["-x"])+o*10/2,y:Number(i["-y"])+7}}var a;Object.entries(e).forEach(function(l){var u=SC(l,2),c=u[0],d=u[1];wq.indexOf(c)===-1&&(a||(a={}),a[c]=d)}),a&&(a=hx(a));var s={id:e["-id"],type:rc.FLOW,pointsList:t["di:waypoint"].map(function(l){return{x:Number(l["-x"]),y:Number(l["-y"])}}),sourceNodeId:e["-sourceRef"],targetNodeId:e["-targetRef"],properties:a};return n&&(s.text=n),s}var Uf=function(){function t(e){var n=e.lf,r=this;this.adapterOut=function(i,o){var a=bA({},r.processAttributes);ZHe(a,i,o);var s={"-id":"BPMNPlane_1","-bpmnElement":a["-id"]};qHe(s,i);var l=r.definitionAttributes;l["bpmn:process"]=a,l["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":s};var u={"bpmn:definitions":l};return u},this.adapterIn=function(i){if(i)return YHe(i)},n.adapterIn=function(i){return r.adapterIn(i)},n.adapterOut=function(i,o){return r.adapterOut(i,o)},this.processAttributes={"-isExecutable":"true","-id":"Process_".concat(B6())},this.definitionAttributes={"-id":"Definitions_".concat(B6()),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.0"}}return t.prototype.setCustomShape=function(e,n){t.shapeConfigMap.set(e,n)},t.pluginName="bpmn-adapter",t.shapeConfigMap=new Map,t}();Uf.shapeConfigMap.set(rc.START,{width:$6.width,height:$6.height});Uf.shapeConfigMap.set(rc.END,{width:N6.width,height:N6.height});Uf.shapeConfigMap.set(rc.GATEWAY,{width:D6.width,height:D6.height});Uf.shapeConfigMap.set(rc.SYSTEM,{width:L6.width,height:L6.height});Uf.shapeConfigMap.set(rc.USER,{width:I6.width,height:I6.height});(function(t){XHe(e,t);function e(n){var r=t.call(this,n)||this;r.adapterXmlIn=function(o){var a=UHe(o);return r.adapterIn(a)},r.adapterXmlOut=function(o,a){var s=r.adapterOut(o,a);return HHe(s)};var i=n.lf;return i.adapterIn=r.adapterXmlIn,i.adapterOut=r.adapterXmlOut,r}return e.pluginName="bpmnXmlAdapter",e})(Uf);var JHe=function(){function t(){globalThis._ids=this,this._ids=new Set}return t.prototype.generateId=function(){var e="xxxxxxx".replace(/[x]/g,function(n){var r=Math.random()*16|0,i=n==="x"?r:r&3|8;return i.toString(16)});return e},t.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},t}(),eUe=(globalThis==null?void 0:globalThis._ids)||new JHe;function tUe(){return eUe.next()}globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var z6=globalThis&&globalThis.__assign||function(){return z6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},z6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var W6=globalThis&&globalThis.__assign||function(){return W6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},W6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var H6=globalThis&&globalThis.__assign||function(){return H6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},H6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var U6=globalThis&&globalThis.__assign||function(){return U6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},U6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var X6=globalThis&&globalThis.__assign||function(){return X6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},X6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;Kt("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),Kt("path",{d:"M 18,18 l 2.25,-7.5 m -2.25,7.5 l 5.25,1.5",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(0,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(30,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(60,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(90,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(120,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(150,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(180,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(210,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(240,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(270,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(300,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Kt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(330,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"});Kt("circle",{cx:18,cy:18,r:10,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 4px; fill: rgb(34, 36, 42);"});Kt("circle",{cx:25,cy:25,r:13,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2.5px; fill: white;"});globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Z6=globalThis&&globalThis.__assign||function(){return Z6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Z6.apply(this,arguments)};globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var q6=globalThis&&globalThis.__assign||function(){return q6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},q6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var nUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Th=globalThis&&globalThis.__assign||function(){return Th=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Th.apply(this,arguments)},rUe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},iUe=Al,oUe=function(t){nUe(e,t);function e(n){var r=t.call(this)||this;return r.updatePosition=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.x,u=s.y;r.nodeModel.x=l+o/2,r.nodeModel.y=u+a/2,r.nodeModel.moveText(o/2,a/2)},r.getResize=function(i){var o=i.index,a=i.deltaX,s=i.deltaY,l=i.width,u=i.height,c=i.PCTResizeInfo,d=i.pct,f=d===void 0?1:d,h=i.freezeWidth,g=h===void 0?!1:h,m=i.freezeHeight,y=m===void 0?!1:m,b={width:l,height:u,deltaX:a,deltaY:s};if(c){var w=4,O=0,x=0;switch(o){case 0:x=(a*-1-s)/w;break;case 1:x=(a-s)/w;break;case 2:x=(a+s)/w;break;case 3:x=(a*-1+s)/w;break}x!==0&&(O=Math.round(x/c.ResizeBasis.basisHeight*1e5)/1e3),c.ResizePCT.widthPCT=Math.max(Math.min(c.ResizePCT.widthPCT+O,c.ScaleLimit.maxScaleLimit),c.ScaleLimit.minScaleLimit),c.ResizePCT.heightPCT=Math.max(Math.min(c.ResizePCT.heightPCT+O,c.ScaleLimit.maxScaleLimit),c.ScaleLimit.minScaleLimit);var S=Math.round(c.ResizePCT.widthPCT*c.ResizeBasis.basisWidth/100),C=Math.round(c.ResizePCT.heightPCT*c.ResizeBasis.basisHeight/100);switch(o){case 0:a=l-S,s=u-C;break;case 1:a=S-l,s=u-C;break;case 2:a=S-l,s=C-u;break;case 3:a=l-S,s=C-u;break}return b.width=S,b.height=C,b.deltaX=a/f,b.deltaY=s/f,b}switch(o){case 0:b.width=g?l:l-a*f,b.height=y?u:u-s*f;break;case 1:b.width=g?l:l+a*f,b.height=y?u:u-s*f;break;case 2:b.width=g?l:l+a*f,b.height=y?u:u+s*f;break;case 3:b.width=g?l:l-a*f,b.height=y?u:u+s*f;break}return b},r.updateEdgePointByAnchors=function(){var i=r.nodeModel,o=i.id,a=i.anchors,s=r.getNodeEdges(o);s.sourceEdges.forEach(function(l){var u=a.find(function(c){return c.id===l.sourceAnchorId});u&&l.updateStartPoint({x:u.x,y:u.y})}),s.targetEdges.forEach(function(l){var u=a.find(function(c){return c.id===l.targetAnchorId});u&&l.updateEndPoint({x:u.x,y:u.y})})},r.updateRect=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.x,u=s.y,c=s.width,d=s.height,f=s.radius,h=s.PCTResizeInfo,g=r.nodeModel,m=g.minWidth,y=g.minHeight,b=g.maxWidth,w=g.maxHeight,O=r.index,x=m===b,S=y===w,C=r.getResize({index:O,deltaX:o,deltaY:a,width:c,height:d,PCTResizeInfo:h,pct:1,freezeWidth:x,freezeHeight:S});if(C.width<m||C.width>b||C.height<y||C.height>w){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:x?0:C.deltaX,deltaY:S?0:C.deltaY}),r.nodeModel.width=C.width,r.nodeModel.height=C.height,r.nodeModel.setProperties({nodeSize:{width:C.width,height:C.height}});var E={x:l,y:u,width:c,height:d,radius:f},T={x:r.nodeModel.x,y:r.nodeModel.y,width:r.nodeModel.width,height:r.nodeModel.height,radius:f};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:o,deltaY:a,beforeNode:E,afterNode:T})},r.updateEllipse=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.rx,u=s.ry,c=s.x,d=s.y,f=s.PCTResizeInfo,h=r.index,g=r.nodeModel,m=g.minWidth,y=g.minHeight,b=g.maxWidth,w=g.maxHeight,O=m===b,x=y===w,S=l,C=u,E=r.getResize({index:h,deltaX:o,deltaY:a,width:S,height:C,PCTResizeInfo:f,pct:1/2,freezeWidth:O,freezeHeight:x});if(E.width<m/2||E.width>b/2||E.height<y/2||E.height>w/2){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:O?0:E.deltaX,deltaY:x?0:E.deltaY}),r.nodeModel.rx=E.width,r.nodeModel.ry=E.height,r.nodeModel.setProperties({nodeSize:{rx:E.width,ry:E.height}});var T={x:c,y:d},P={rx:E.width,ry:E.height,x:r.nodeModel.x,y:r.nodeModel.y};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:o,deltaY:a,beforeNode:Th(Th({},T),{rx:l,ry:u}),afterNode:P})},r.updateDiamond=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.rx,u=s.ry,c=s.x,d=s.y,f=s.PCTResizeInfo,h=r.index,g=r.nodeModel,m=g.minWidth,y=g.minHeight,b=g.maxWidth,w=g.maxHeight,O=m===b,x=y===w,S=l,C=u,E=r.getResize({index:h,deltaX:o,deltaY:a,width:S,height:C,PCTResizeInfo:f,pct:1/2,freezeWidth:O,freezeHeight:x});if(E.width<m/2||E.width>b/2||E.height<y/2||E.height>w/2){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:O?0:E.deltaX,deltaY:x?0:E.deltaY}),r.nodeModel.rx=E.width,r.nodeModel.ry=E.height,r.nodeModel.setProperties({nodeSize:{rx:E.width,ry:E.height}});var T={x:c,y:d,rx:l,ry:u},P={rx:E.width,ry:E.height,x:r.nodeModel.x,y:r.nodeModel.y};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:o,deltaY:a,beforeNode:T,afterNode:P})},r.eventEmit=function(i){var o=i.deltaX,a=i.deltaY,s=i.beforeNode,l=i.afterNode,u=r.nodeModel,c=u.id,d=u.modelType,f=u.type,h=Th({id:c,modelType:d,type:f},s),g=Th({id:c,modelType:d,type:f},l);r.graphModel.eventCenter.emit("node:resize",{preData:h,data:g,deltaX:o,deltaY:a,index:r.index,model:r.nodeModel})},r.onDragging=function(i){var o,a=i.deltaX,s=i.deltaY,l=r.graphModel.transformModel,u=r.nodeModel.modelType;o=rUe(l.fixDeltaXY(a,s),2),a=o[0],s=o[1],u===qn.RECT_NODE||u===qn.HTML_NODE?r.updateRect({deltaX:a,deltaY:s}):u===qn.ELLIPSE_NODE?r.updateEllipse({deltaX:a,deltaY:s}):u===qn.DIAMOND_NODE&&r.updateDiamond({deltaX:a,deltaY:s})},r.onDragEnd=function(){var i=r.graphModel.gridSize,o=i===void 0?1:i,a=o*Math.round(r.nodeModel.x/o),s=o*Math.round(r.nodeModel.y/o);r.nodeModel.moveTo(a,s),r.updateEdgePointByAnchors()},r.index=n.index,r.nodeModel=n.model,r.graphModel=n.graphModel,r.dragHandler=new iUe({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:1}),r}return e.prototype.getNodeEdges=function(n){for(var r=this.graphModel,i=r.edges,o=[],a=[],s=0;s<i.length;s++){var l=i[s];l.sourceNodeId===n?o.push(l):i[s].targetNodeId===n&&a.push(l)}return{sourceEdges:o,targetEdges:a}},e.prototype.render=function(){var n=this.props,r=n.x,i=n.y,o=n.index,a=n.model,s=a.getControlPointStyle();return rt("g",{className:"lf-resize-control-".concat(o),children:rt(sl,Th({className:"lf-node-control",x:r,y:i},s,{onMouseDown:this.dragHandler.handleMouseDown}))})},e}(ur),aUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),px=globalThis&&globalThis.__assign||function(){return px=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},px.apply(this,arguments)},CC=function(t){aUe(e,t);function e(){var n=t.call(this)||this;return n.state={},n}return e.prototype.getResizeControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=r.x,a=r.y,s=r.width,l=r.height,u={minX:o-s/2,minY:a-l/2,maxX:o+s/2,maxY:a+l/2},c=u.minX,d=u.minY,f=u.maxX,h=u.maxY,g=[{x:c,y:d},{x:f,y:d},{x:f,y:h},{x:c,y:h}];return g.map(function(m,y){return rt(oUe,px({index:y},m,{model:r,graphModel:i}))})},e.prototype.getGroupSolid=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.getResizeOutlineStyle();return rt(sl,px({},s,{x:r,y:i,width:o,height:a}))},e.prototype.render=function(){return rt("g",{className:"lf-resize-control",children:[this.getGroupSolid(),this.getResizeControl()]})},e}(ur),xq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){xq(e,t);function e(n,r){var i=t.call(this,n,r)||this,o=n.properties.nodeSize;return o&&(i.rx=o.rx,i.ry=o.ry),i}return e.prototype.initNodeData=function(n){t.prototype.initNodeData.call(this,n),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},e.prototype.getOutlineStyle=function(){var n=t.prototype.getOutlineStyle.call(this),r=this.graphModel.editConfigModel.isSilentMode;return r||(n.stroke="none",n.hover&&(n.hover.stroke="none")),n},e.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},e.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},e.prototype.enableProportionResize=function(n){if(n===void 0&&(n=!0),n){var r={widthPCT:100,heightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},o={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:r,ResizeBasis:i,ScaleLimit:o}}else delete this.PCTResizeInfo},e})(KP);(function(t){xq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props,r=n.model,i=n.graphModel;return rt(CC,{model:r,graphModel:i})},e.prototype.getResizeShape=function(){return t.prototype.getShape.call(this)},e.prototype.getShape=function(){var n=this.props,r=n.model,i=n.graphModel.editConfigModel.isSilentMode;return rt("g",{children:[this.getResizeShape(),r.isSelected&&!i?this.getControlGroup():""]})},e})(uA);var Sq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_A=globalThis&&globalThis.__assign||function(){return _A=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_A.apply(this,arguments)};(function(t){Sq(e,t);function e(n,r){var i=t.call(this,n,r)||this,o=n.properties.nodeSize;return o&&(i.rx=o.rx,i.ry=o.ry),i}return e.prototype.initNodeData=function(n){t.prototype.initNodeData.call(this,n),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},e.prototype.getOutlineStyle=function(){var n=t.prototype.getOutlineStyle.call(this),r=this.graphModel.editConfigModel.isSilentMode;return r||(n.stroke="none",n.hover&&(n.hover.stroke="none")),n},e.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},e.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},e.prototype.enableProportionResize=function(n){if(n===void 0&&(n=!0),n){var r={widthPCT:100,heightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},o={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:r,ResizeBasis:i,ScaleLimit:o}}else delete this.PCTResizeInfo},e})(GP);(function(t){Sq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props,r=n.model,i=n.graphModel;return rt(CC,{model:r,graphModel:i})},e.prototype.getResizeShape=function(){var n=this.props.model,r=n.points,i=n.getNodeStyle();return rt("g",{children:rt(HN,_A({},i,{points:r}))})},e.prototype.getShape=function(){var n=this.props,r=n.model.isSelected,i=n.graphModel.editConfigModel.isSilentMode;return rt("g",{children:[this.getResizeShape(),r&&!i?this.getControlGroup():""]})},e})(sA);var Cq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){Cq(e,t);function e(n,r){var i=t.call(this,n,r)||this,o=n.properties.nodeSize;return o&&(i.width=o.width,i.height=o.height),i}return e.prototype.initNodeData=function(n){t.prototype.initNodeData.call(this,n),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},e.prototype.getOutlineStyle=function(){var n=t.prototype.getOutlineStyle.call(this),r=this.graphModel.editConfigModel.isSilentMode;return r||(n.stroke="none",n.hover&&(n.hover.stroke="none")),n},e.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},e.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},e.prototype.enableProportionResize=function(n){if(n===void 0&&(n=!0),n){var r={widthPCT:100,heightPCT:100},i={basisWidth:this.width,basisHeight:this.height},o={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:r,ResizeBasis:i,ScaleLimit:o}}else delete this.PCTResizeInfo},e})(JP);(function(t){Cq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props,r=n.model,i=n.graphModel;return rt(CC,{model:r,graphModel:i})},e.prototype.getResizeShape=function(){return t.prototype.getShape.call(this)},e.prototype.getShape=function(){var n=this.props,r=n.model.isSelected,i=n.graphModel.editConfigModel.isSilentMode;return rt("g",{children:[this.getResizeShape(),r&&!i?this.getControlGroup():""]})},e})(dA);var Eq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sUe=function(t){Eq(e,t);function e(n,r){var i=t.call(this,n,r)||this,o=n.properties.nodeSize;return o&&(i.width=o.width,i.height=o.height),i}return e.prototype.initNodeData=function(n){t.prototype.initNodeData.call(this,n),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},e.prototype.getOutlineStyle=function(){var n=t.prototype.getOutlineStyle.call(this),r=this.graphModel.editConfigModel.isSilentMode;return r||(n.stroke="none",n.hover&&(n.hover.stroke="none")),n},e.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},e.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},e.prototype.enableProportionResize=function(n){if(n===void 0&&(n=!0),n){var r={widthPCT:100,heightPCT:100},i={basisWidth:this.width,basisHeight:this.height},o={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:r,ResizeBasis:i,ScaleLimit:o}}else delete this.PCTResizeInfo},e}(cp),lUe=function(t){Eq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props,r=n.model,i=n.graphModel;return rt(CC,{model:r,graphModel:i})},e.prototype.getResizeShape=function(){return t.prototype.getShape.call(this)},e.prototype.getShape=function(){var n=this.props,r=n.model.isSelected,i=n.graphModel.editConfigModel.isSilentMode;return rt("g",{children:[this.getResizeShape(),r&&!i?this.getControlGroup():""]})},e}(Cf),Tq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gx=globalThis&&globalThis.__assign||function(){return gx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},gx.apply(this,arguments)},hh=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ph=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Y6=500,G6=300,uUe=-1e4;(function(t){Tq(e,t);function e(){var n=t.apply(this,ph([],hh(arguments),!1))||this;return n.isGroup=!0,n.isFolded=!1,n.unfoldedWidth=Y6,n.unfoldedHeight=G6,n.childrenLastFoldStatus={},n}return e.prototype.initNodeData=function(n){var r=this;t.prototype.initNodeData.call(this,n);var i=[];Fn(n.children)&&(i=n.children),this.children=new Set(i),this.width=Y6,this.height=G6,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=uUe,this.radius=0,this.text.editable=!1,this.text.draggable=!1,this.isRestrict=!1,this.resizable=!1,this.autoToFront=!1,this.foldable=!1,this.properties.isFolded===void 0&&(this.properties.isFolded=!1),this.isFolded=!!this.properties.isFolded,setTimeout(function(){r.isFolded&&r.foldGroup(r.isFolded)})},e.prototype.getResizeOutlineStyle=function(){var n=t.prototype.getResizeOutlineStyle.call(this);return n.stroke="none",n},e.prototype.foldGroup=function(n){var r=this;if(n!==this.isFolded){this.setProperty("isFolded",n),this.isFolded=n,n?(this.x=this.x-this.width/2+this.foldedWidth/2,this.y=this.y-this.height/2+this.foldedHeight/2,this.unfoldedWidth=this.width,this.unfoldedHeight=this.height,this.width=this.foldedWidth,this.height=this.foldedHeight):(this.width=this.unfoldedWidth,this.height=this.unfoldedHeight,this.x=this.x+this.width/2-this.foldedWidth/2,this.y=this.y+this.height/2-this.foldedHeight/2);var i=ph(ph([],hh(this.incoming.edges),!1),hh(this.outgoing.edges),!1);this.children.forEach(function(o){var a=r.graphModel.getElement(o);if(a){var s=a.isFolded;if(a.isGroup&&!a.isFolded&&a.foldGroup(n),a.isGroup&&!n){var l=r.childrenLastFoldStatus[o];l!==void 0&&l!==a.isFolded&&a.foldGroup(l)}r.childrenLastFoldStatus[o]=!!s,a.visible=!n;var u=a.incoming.edges,c=a.outgoing.edges;i=ph(ph(ph([],hh(i),!1),hh(u),!1),hh(c),!1)}}),this.foldEdge(n,i)}},e.prototype.getAnchorStyle=function(n){var r=t.prototype.getAnchorStyle.call(this,n);return r.stroke="transparent",r.fill="transparent",r.hover.fill="transparent",r.hover.stroke="transparent",r},e.prototype.foldEdge=function(n,r){var i=this;r.forEach(function(o,a){var s=o.id,l=o.sourceNodeId,u=o.targetNodeId,c=o.startPoint,d=o.endPoint,f=o.type,h=o.text,g=o.getProperties(),m={id:"".concat(s,"__").concat(a),sourceNodeId:l,targetNodeId:u,startPoint:c,endPoint:d,type:f,properties:g,text:h==null?void 0:h.value};o.virtual&&i.graphModel.deleteEdgeById(o.id);var y=i.graphModel.group.getNodeGroup(u);y||(y=i.graphModel.getNodeModelById(u));var b=i.graphModel.group.getNodeGroup(l);b||(b=i.graphModel.getNodeModelById(l)),n&&o.visible!==!1&&(i.children.has(l)||i.id===l?(m.startPoint=void 0,m.sourceNodeId=i.id):(m.endPoint=void 0,m.targetNodeId=i.id),(y.id!==i.id||b.id!==i.id)&&i.createVirtualEdge(m),o.visible=!1),!n&&o.visible===!1&&(y&&y.isGroup&&y.isFolded?(m.targetNodeId=y.id,m.endPoint=void 0,i.createVirtualEdge(m)):b&&b.isGroup&&b.isFolded?(m.sourceNodeId=b.id,m.startPoint=void 0,i.createVirtualEdge(m)):o.visible=!0)})},e.prototype.createVirtualEdge=function(n){n.pointsList=void 0;var r=this.graphModel.addEdge(n);r.virtual=!0,r.text.editable=!1,r.isFoldedEdge=!0},e.prototype.isInRange=function(n){var r=n.minX,i=n.minY,o=n.maxX,a=n.maxY;return r>=this.x-this.width/2&&o<=this.x+this.width/2&&i>=this.y-this.height/2&&a<=this.y+this.height/2},e.prototype.isAllowMoveTo=function(n){var r=n.minX,i=n.minY,o=n.maxX,a=n.maxY;return{x:r>=this.x-this.width/2&&o<=this.x+this.width/2,y:i>=this.y-this.height/2&&a<=this.y+this.height/2}},e.prototype.setAllowAppendChild=function(n){this.setProperty("groupAddable",n)},e.prototype.addChild=function(n){this.children.add(n),this.graphModel.eventCenter.emit("group:add-node",{data:this.getData()})},e.prototype.removeChild=function(n){this.children.delete(n),this.graphModel.eventCenter.emit("group:remove-node",{data:this.getData()})},e.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},e.prototype.getData=function(){var n=this,r=t.prototype.getData.call(this);r.children=[],console.log("this.children",this.children),this.children.forEach(function(o){var a=n.graphModel.getNodeModelById(o);a&&!a.virtual&&r.children.push(o)});var i=r.properties;return i==null||delete i.groupAddable,i==null||delete i.isFolded,r},e.prototype.getHistoryData=function(){var n=t.prototype.getData.call(this);n.children=ph([],hh(this.children),!1),n.isGroup=!0;var r=n.properties;return r==null||delete r.groupAddable,r!=null&&r.isFolded&&(n.x=n.x+this.unfoldedWidth/2-this.foldedWidth/2,n.y=n.y+this.unfoldedHeight/2-this.foldedHeight/2),n},e.prototype.isAllowAppendIn=function(n){return console.info("_nodeData",n),!0},e.prototype.toBack=function(){this.zIndex--},e})(sUe);(function(t){Tq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props.model,r=n.resizable,i=n.properties;return r&&!i.isFolded?t.prototype.getControlGroup.call(this):null},e.prototype.getAddableShape=function(){var n=this.props.model,r=n.width,i=n.height,o=n.x,a=n.y,s=n.radius,l=n.properties,u=n.getAddableOutlineStyle;if(!l.groupAddable)return null;var c=this.props.model.getNodeStyle().strokeWidth,d=c===void 0?0:c,f=u(),h=r+d+8,g=i+d+8;return Kt("rect",gx(gx({},f),{width:h,height:g,x:o-h/2,y:a-g/2,rx:s,ry:s}))},e.prototype.getFoldIcon=function(){var n=this.props.model,r=n.x-n.width/2+5,i=n.y-n.height/2+5;if(!n.foldable)return null;var o=Kt("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:n.properties.isFolded?"M ".concat(r+3,",").concat(i+6," ").concat(r+11,",").concat(i+6," M").concat(r+7,",").concat(i+2," ").concat(r+7,",").concat(i+10):"M ".concat(r+3,",").concat(i+6," ").concat(r+11,",").concat(i+6," ")});return Kt("g",{},[Kt("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:n.x-n.width/2+5,y:n.y-n.height/2+5,onClick:function(){n.foldGroup(!n.properties.isFolded)}}),o])},e.prototype.getResizeShape=function(){return Kt("g",{},[this.getAddableShape(),t.prototype.getResizeShape.call(this),this.getFoldIcon()])},e})(lUe);var K6=globalThis&&globalThis.__assign||function(){return K6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},K6.apply(this,arguments)};globalThis&&globalThis.__rest;globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var J6=globalThis&&globalThis.__assign||function(){return J6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},J6.apply(this,arguments)};globalThis&&globalThis.__values;var eF=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zy=globalThis&&globalThis.__assign||function(){return zy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zy.apply(this,arguments)};function cUe(t){var e=function(r){eF(i,r);function i(o,a){o.id||(o.id="Flow_".concat(tUe()));var s=zy(zy(zy({},t||{}),o.properties),{isDefaultFlow:!1});return o.properties=s,r.call(this,o,a)||this}return i.extendKey="SequenceFlowModel",i}(j0),n=function(r){eF(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i.prototype.getStartArrow=function(){var o=this.props.model,a=o.properties.isDefaultFlow;return a?Kt("path",{refX:15,stroke:"#000000",strokeWidth:2,d:"M 20 5 10 -5 z"}):Kt("path",{d:""})},i.extendKey="SequenceFlowEdge",i}(z0);return{type:"bpmn:sequenceFlow",view:n,model:e}}cUe();globalThis&&globalThis.__read;var tF={width:40,height:40},nF={width:40,height:40},rF={width:100,height:80},mx={width:100,height:80},iF={width:100,height:80},oF={width:100,height:80},aF={width:100,height:80},sF={width:100,height:80},lF={width:100,height:80},uF={width:100,height:80},$a=function(){};$a.ObjTree=function(){return this};$a.ObjTree.VERSION="0.23";$a.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
- `;$a.ObjTree.prototype.attr_prefix="-";$a.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,r=n.parseFromString(t,"application/xml");if(!r)return;e=r.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(!!e){var i=this.parseDOM(e);return i}};$a.ObjTree.prototype.parseHTTP=function(t,e,n){var r={};for(var i in e)r[i]=e[i];if(r.method||(typeof r.postBody=="undefined"&&typeof r.postbody=="undefined"&&typeof r.parameters=="undefined"?r.method="get":r.method="post"),n){r.asynchronous=!0;var o=this,a=n,s=r.onComplete;r.onComplete=function(c){var d;c&&c.responseXML&&c.responseXML.documentElement&&(d=o.parseDOM(c.responseXML.documentElement)),a(d,c),s&&s(c)}}else r.asynchronous=!1;var l;if(typeof HTTP!="undefined"&&HTTP.Request){r.uri=t;var u=new HTTP.Request(r);u&&(l=u.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var u=new Ajax.Request(t,r);u&&(l=u.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};$a.ObjTree.prototype.parseDOM=function(t){if(!!t){if(this.__force_array={},this.force_array)for(var e=0;e<this.force_array.length;e++)this.__force_array[this.force_array[e]]=1;var n=this.parseElement(t);if(this.__force_array[t.nodeName]&&(n=[n]),t.nodeType!==11){var r={};r[t.nodeName]=n,n=r}return n}};$a.ObjTree.prototype.parseElement=function(t){if(t.nodeType!==7){if(t.nodeType===3||t.nodeType===4||t.nodeType===8){var e=t.nodeValue.match(/[^\x00-\x20]/);return e==null?void 0:t.nodeValue}var n=null,r={};if(t.attributes&&t.attributes.length){n={};for(var i=0;i<t.attributes.length;i++){var o=t.attributes[i].nodeName;if(typeof o=="string"){var a=t.attributes[i].nodeValue;try{a=JSON.parse(t.attributes[i].nodeValue.replace(/'/g,'"'))}catch{a=t.attributes[i].nodeValue}a!=null&&(o=this.attr_prefix+o,typeof r[o]=="undefined"&&(r[o]=0),r[o]++,this.addNode(n,o,r[o],a))}}}if(t.childNodes&&t.childNodes.length){var s=!0;n&&(s=!1);for(var i=0;i<t.childNodes.length&&s;i++){var l=t.childNodes[i].nodeType;l===3||l===4||l===8||(s=!1)}if(s){n||(n="");for(var i=0;i<t.childNodes.length;i++)n+=t.childNodes[i].nodeValue}else{n||(n={});for(var i=0;i<t.childNodes.length;i++){var o=t.childNodes[i].nodeName;if(typeof o=="string"){var a=this.parseElement(t.childNodes[i]);!a||(typeof r[o]=="undefined"&&(r[o]=0),r[o]++,this.addNode(n,o,r[o],a))}}}}else n===null&&(n={});return n}};$a.ObjTree.prototype.addNode=function(t,e,n,r){this.__force_array[e]?(n===1&&(t[e]=[]),t[e][t[e].length]=r):n===1?t[e]=r:n===2?t[e]=[t[e],r]:t[e][t[e].length]=r};$a.ObjTree.prototype.writeXML=function(t){var e=this.hash_to_xml(null,t);return this.xmlDecl+e};$a.ObjTree.prototype.hash_to_xml=function(t,e){var n=[],r=[];for(var i in e)if(!!Xg(e,i)){var o=e[i];i.charAt(0)!==this.attr_prefix?typeof o=="undefined"||o==null?n[n.length]="<".concat(i," />"):typeof o=="object"&&o.constructor===Array?n[n.length]=this.array_to_xml(i,o):typeof o=="object"?n[n.length]=this.hash_to_xml(i,o):n[n.length]=this.scalar_to_xml(i,o):r[r.length]=" ".concat(i.substring(1),'="').concat(this.xml_escape(o),'"')}var a=r.join(""),s=n.join("");return typeof t=="undefined"||t==null||(n.length>0?s.match(/\n/)?s="<".concat(t).concat(a,`>
- `).concat(s,"</").concat(t,`>
- `):s="<".concat(t).concat(a,">").concat(s,"</").concat(t,`>
- `):s="<".concat(t).concat(a,` />
- `)),s};$a.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],r=0;r<e.length;r++){var i=e[r];typeof i=="undefined"||i==null?n[n.length]="<".concat(t," />"):typeof i=="object"&&i.constructor===Array?n[n.length]=this.array_to_xml(t,i):typeof i=="object"?n[n.length]=this.hash_to_xml(t,i):n[n.length]=this.scalar_to_xml(t,i)}return n.join("")};$a.ObjTree.prototype.scalar_to_xml=function(t,e){return t==="#text"?this.xml_escape(e):"<".concat(t,">").concat(this.xml_escape(e),"</").concat(t,`>
- `)};$a.ObjTree.prototype.xml_escape=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var dUe=function(t){return new $a.ObjTree().parseXML(t)};function kq(t){return Object.prototype.toString.call(t)}function cF(t){return" ".repeat(t)}function vx(t){return kq(t)==="[object Object]"?Object.keys(t).reduce(function(e,n){var r=n;return n.charAt(0)==="-"&&(r=n.substring(1)),e[r]=vx(t[n]),e},{}):Array.isArray(t)?t.map(function(e){return vx(e)}):t}function fUe(t){var e=t;try{typeof e!="string"&&(e=JSON.parse(t))}catch{e=JSON.stringify(vx(t)).replace(/"/g,"'")}return e}var dF=`
- `;function j1(t,e,n){var r=cF(n),i="",o=dF+r;if(e==="-json")return"";if(e==="#text")return o+t;if(e==="#cdata-section")return"".concat(o,"<![CDATA[").concat(t,"]]>");if(e==="#comment")return"".concat(o,"<!--").concat(t,"-->");if("".concat(e).charAt(0)==="-")return" ".concat(e.substring(1),'="').concat(fUe(t),'"');if(Array.isArray(t))i+=t.map(function(u){return j1(u,e,n+1)}).join("");else if(kq(t)==="[object Object]"){var a=Object.keys(t),s="",l=t["-json"]?dF+cF(n+1)+t["-json"]:"";i+="".concat(n===0?"":o,"<").concat(e),a.forEach(function(u){u.charAt(0)==="-"?s+=j1(t[u],u,n+1):l+=j1(t[u],u,n+1)}),i+=s+(l!==""?">".concat(l).concat(o,"</").concat(e,">"):" />")}else i+="".concat(o,"<").concat(e,">").concat(t.toString(),"</").concat(e,">");return i}function hUe(t){var e="";for(var n in t)e+=j1(t[n],n,0);return e}var pUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),OA=globalThis&&globalThis.__assign||function(){return OA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},OA.apply(this,arguments)},fF=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},ZN=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jo=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ul=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Ta;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.INTERMEDIATE_CATCH="bpmn:intermediateCatchEvent",t.INTERMEDIATE_THROW="bpmn:intermediateThrowEvent",t.BOUNDARY="bpmn:boundaryEvent",t.PARALLEL_GATEWAY="bpmn:parallelGateway",t.INCLUSIVE_GATEWAY="bpmn:inclusiveGateway",t.EXCLUSIVE_GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow",t.SUBPROCESS="bpmn:subProcess"})(Ta||(Ta={}));var Pq=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef","-children"],gUe=["properties","startPoint","endPoint","pointsList"],yx={in:[],out:["properties.panels","properties.nodeSize","properties.definitionId","properties.timerValue","properties.timerType","properties.definitionType","properties.parent","properties.isBoundaryEventTouchingTask"]},Aq=function(t,e){var n=Object.keys(e||{});return n.forEach(function(r){if(t[r]){var i=e[r],o=i.in,a=i.out;o&&(t[r].in=o),a&&(t[r].out=a)}else t[r]=e[r]}),t},rl={"bpmn:startEvent":{out:function(t){var e,n,r=t.properties;return((n=(e=rl[r.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:intermediateCatchEvent":{out:function(t){var e,n,r=t.properties;return((n=(e=rl[r.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:intermediateThrowEvent":{out:function(t){var e,n,r=t.properties;return((n=(e=rl[r.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:boundaryEvent":{out:function(t){var e,n,r=t.properties;return((n=(e=rl[r.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:sequenceFlow":{out:function(t){var e=t.properties,n=e.expressionType,r=e.condition;return r?n==="cdata"?{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${'.concat(r,"}]]></bpmn:conditionExpression>")}:{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression">'.concat(r,"</bpmn:conditionExpression>")}:{json:""}}},"bpmn:timerEventDefinition":{out:function(t){var e=t.properties,n=e.timerType,r=e.timerValue,i=e.definitionId,o=function(){return"<bpmn:".concat(n,' xsi:type="bpmn:tFormalExpression">').concat(r,"</bpmn:").concat(n,">")};return{json:'<bpmn:timerEventDefinition id="'.concat(i,'"').concat(n&&r?">".concat(o(),"</bpmn:timerEventDefinition>"):"/>")}},in:function(t,e){var n,r,i,o,a=t,s=e["-id"],l="",u="";try{for(var c=ZN(Object.keys(e)),d=c.next();!d.done;d=c.next()){var f=d.value;f.includes("bpmn:")&&(i=Jo(f.split(":"),2),l=i[1],u=(o=e[f])===null||o===void 0?void 0:o["#text"])}}catch(h){n={error:h}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return{"-definitionId":s,"-definitionType":a,"-timerType":l,"-timerValue":u}}},"bpmn:conditionExpression":{in:function(t,e){var n,r="",i="";return e["#cdata-section"]?(i="cdata",r=((n=/^\$\{(.*)\}$/g.exec(e["#cdata-section"]))===null||n===void 0?void 0:n[1])||""):e["#text"]&&(i="normal",r=e["#text"]),{"-condition":r,"-expressionType":i}}}};function mUe(t){var e=t!=null?t:{},n=e.retainedAttrsFields,r=e.excludeFields,i=e.transformer,o=new Set(Ul(Ul([],Jo(gUe),!1),Jo(n||[]),!1)),a={in:new Set(Ul(Ul([],Jo(yx.in),!1),Jo((r==null?void 0:r.in)||[]),!1)),out:new Set(Ul(Ul([],Jo(yx.out),!1),Jo((r==null?void 0:r.out)||[]),!1))};return rl=Aq(rl,i),function(s){var l=s.nodes,u=s.edges;function c(d,f){var h,g;if((d==null?void 0:d.flag)!==1){var m;if((m=rl[d.type])&&m.out){var y=m.out(d),b=Object.keys(y);b.length>0&&b.forEach(function(P){d[P]=y[P]})}d!=null&&d.children&&(d.children=d.children.map(function(P){var A=l.find(function(D){return D.id===P})||u.find(function(D){return D.id===P});return A||{}}));var w={};if(typeof d=="string")return d;if(Array.isArray(d))return d.map(function(P){return c(P,"")}).filter(function(P){return P!=null});try{for(var O=ZN(Object.entries(d)),x=O.next();!x.done;x=O.next()){var S=Jo(x.value,2),C=S[0],E=S[1];if((E==null?void 0:E.flag)===1)return;var T=[f,C].filter(function(P){return P}).join(".");a.out.has(T)||(typeof E!="object"?C.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(C)?w[C]=E:w["-".concat(C)]=E:o.has(T)?w["-".concat(C)]=c(E,T):w[C]=c(E,T))}}catch(P){h={error:P}}finally{try{x&&!x.done&&(g=O.return)&&g.call(O)}finally{if(h)throw h.error}}return w}}return c(s,"")}}function bx(t){var e,n,r={};try{for(var i=ZN(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=Jo(o.value,2),s=a[0],l=a[1];s.indexOf("-")===0?r[s.substring(1)]=vx(l):typeof l=="string"?r[s]=l:Object.prototype.toString.call(l)==="[object Object]"?r[s]=bx(l):Array.isArray(l)?r[s]=l.map(function(u){return bx(u)}):r[s]=l}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function vUe(t,e,n){var r,i=new Map,o=mUe(n)(e);o.nodes.forEach(function(s){var l=s["-id"],u=s["-type"],c=s.text,d=s.children,f=fF(s,["-id","-type","text","children"]),h={"-id":l};c!=null&&c["-value"]&&(h["-name"]=c["-value"]),f["-json"]&&(h["-json"]=f["-json"]),f["-properties"]&&Object.assign(h,f["-properties"]),d&&(h.children=d),t[u]||(t[u]=[]),t[u].push(h),i.set(l,h)});var a=o.edges.map(function(s){var l=s["-id"],u=s["-sourceNodeId"],c=s["-targetNodeId"],d=s.text,f=fF(s,["-id","-sourceNodeId","-targetNodeId","text"]),h=i.get(c);h["bpmn:incoming"]||(h["bpmn:incoming"]=[]),h["bpmn:incoming"].push(l);var g={"-id":l,"-sourceRef":u,"-targetRef":c};return d!=null&&d["-value"]&&(g["-name"]=d["-value"]),f["-json"]&&(g["-json"]=f["-json"]),f["-properties"]&&Object.assign(g,f["-properties"]),g});return e.edges.forEach(function(s){var l=s.sourceNodeId,u=s.id,c=i.get(l);c["bpmn:outgoing"]||(c["bpmn:outgoing"]=[]),c["bpmn:outgoing"].push(u)}),(r=t["bpmn:subProcess"])===null||r===void 0||r.forEach(function(s){var l={"bpmn:incoming":new Set,"bpmn:outgoing":new Set},u=[];s.children.forEach(function(m){var y,b=i.get(m["-id"]);["bpmn:incoming","bpmn:outgoing"].forEach(function(O){b[O]&&b[O].forEach(function(x){l[O].add(x)})});var w=(y=t[m["-type"]])===null||y===void 0?void 0:y.findIndex(function(O){return O["-id"]===m["-id"]});w>=0&&t[m["-type"]].splice(w,1),i.delete(m["-id"]),s[m["-type"]]||(s[m["-type"]]=[]),s[m["-type"]].push(b)});var c=l["bpmn:incoming"],d=l["bpmn:outgoing"];d.forEach(function(m){c.has(m)&&u.push(m)});for(var f=function(m){var y=a.findIndex(function(b){return b["-id"]===u[m]});y>=0?(s["bpmn:sequenceFlow"]||(s["bpmn:sequenceFlow"]=[]),s["bpmn:sequenceFlow"].push(a[y]),a.splice(y,1)):m++,h=m},h,g=0;g<u.length;)f(g),g=h;delete s.children}),t[Ta.FLOW]=a,t}function yUe(t,e){t["bpmndi:BPMNEdge"]=e.edges.map(function(n){var r,i=n.id,o=n.pointsList.map(function(s){var l=s.x,u=s.y;return{"-x":l,"-y":u}}),a={"-id":"".concat(i,"_di"),"-bpmnElement":i,"di:waypoint":o};return!((r=n.text)===null||r===void 0)&&r.value&&(a["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),a}),t["bpmndi:BPMNShape"]=e.nodes.map(function(n){var r,i=n.id,o=100,a=80,s=n.x,l=n.y,u=us.shapeConfigMap.get(n.type);u&&(o=u.width,a=u.height),s-=o/2,l-=a/2;var c={"-id":"".concat(i,"_di"),"-bpmnElement":i,"dc:Bounds":{"-x":s,"-y":l,"-width":o,"-height":a}};return!((r=n.text)===null||r===void 0)&&r.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),c})}var bUe=["bpmn:incoming","bpmn:outgoing"];function _Ue(t,e){var n=[],r=[],i=new Map,o=e!=null?e:{},a=o.transformer,s=o.excludeFields,l={in:new Set(Ul(Ul([],Jo(yx.in),!1),Jo((s==null?void 0:s.in)||[]),!1)),out:new Set(Ul(Ul([],Jo(yx.out),!1),Jo((s==null?void 0:s.out)||[]),!1))};rl=Aq(rl,a);var u=t["bpmn:definitions"];if(u){var c=u["bpmn:process"];(function(f,h){h.forEach(function(g){try{Object.keys(f).forEach(function(m){try{g(m)}catch(y){console.error(y)}})}catch(m){console.error(m)}})})(c,[function(f){function h(m){m["-children"]||(m["-children"]=[]),Object.keys(m).forEach(function(y){var b;y.indexOf("bpmn:")===0&&!bUe.includes(y)&&(c[y]||(c[y]=[]),!Array.isArray(c[y])&&(c[y]=[c[y]]),Array.isArray(m[y])?(b=c[y]).push.apply(b,Ul([],Jo(m[y]),!1)):c[y].push(m[y]),Array.isArray(m[y])?m[y].forEach(function(w){!y.includes("Flow")&&m["-children"].push(w["-id"])}):!y.includes("Flow")&&m["-children"].push(m[y]["-id"]),delete m[y])})}if(f==="bpmn:subProcess"){var g=c[f];Array.isArray(g)?g.forEach(function(m){f==="bpmn:subProcess"&&h(m)}):h(g)}},function(f){var h=function(m){Object.keys(m).forEach(function(y){var b,w;if(y.includes("bpmn:")){var O={};rl[y]&&rl[y].in?(O=(w=(b=rl[y]).in)===null||w===void 0?void 0:w.call(b,y,me.cloneDeep(m[y])),delete m[y]):g(m[y]);var x=void 0;(x=Reflect.ownKeys(O)).length>0&&x.forEach(function(S){Reflect.set(m,S,O[S])})}})};function g(m){i.set(m["-id"],m),Array.isArray(m)?m.forEach(function(y){g(y)}):typeof m=="object"&&h(m)}g(c[f])},function(f){if(f.indexOf("bpmn:")===0){var h=c[f];if(f==="bpmn:sequenceFlow"){var g=u["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];r=wUe(h,g)}else{var m=u["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];if(f==="bpmn:boundaryEvent"){var y=c[f],b=function(w){var O=w["-attachedToRef"],x=i.get(O);x["-boundaryEvents"]||(x["-boundaryEvents"]=[]),x["-boundaryEvents"].push(w["-id"])};Array.isArray(y)?y.forEach(function(w){b(w)}):b(y)}n=n.concat(OUe(h,m,f))}}}])}var d=function(f,h,g){Object.keys(f).forEach(function(m){var y=g?"".concat(g,".").concat(m):m;h.has(y)?delete f[m]:typeof f[m]=="object"&&d(f[m],h,y)})};return n.forEach(function(f){var h,g;if(!((h=e==null?void 0:e.mapping)===null||h===void 0)&&h.in){var m=(g=e==null?void 0:e.mapping)===null||g===void 0?void 0:g.in,y=f.type;m[y]&&(f.type=m[y])}d(f,l.in,"")}),r.forEach(function(f){var h,g;if(!((h=e==null?void 0:e.mapping)===null||h===void 0)&&h.in){var m=(g=e==null?void 0:e.mapping)===null||g===void 0?void 0:g.in,y=f.type;m[y]&&(f.type=m[y])}d(f,l.in,"")}),{nodes:n,edges:r}}function OUe(t,e,n){var r=[];if(Array.isArray(t))t.forEach(function(a){var s;Array.isArray(e)?s=e.find(function(u){return u["-bpmnElement"]===a["-id"]}):s=e;var l=hF(s,n,a);r.push(l)});else{var i=void 0;Array.isArray(e)?i=e.find(function(a){return a["-bpmnElement"]===t["-id"]}):i=e;var o=hF(i,n,t);r.push(o)}return r}function hF(t,e,n){var r=Number(t["dc:Bounds"]["-x"]),i=Number(t["dc:Bounds"]["-y"]),o=n["-children"],a=n["-name"],s=us.shapeConfigMap.get(e);s&&(r+=s.width/2,i+=s.height/2);var l={};Object.entries(n).forEach(function(f){var h=Jo(f,2),g=h[0],m=h[1];Pq.includes(g)||(l[g]=m)}),l=bx(l);var u;if(a&&(u={x:r,y:i,value:a},t["bpmndi:BPMNLabel"]&&t["bpmndi:BPMNLabel"]["dc:Bounds"])){var c=t["bpmndi:BPMNLabel"]["dc:Bounds"];u.x=Number(c["-x"])+Number(c["-width"])/2,u.y=Number(c["-y"])+Number(c["-height"])/2}var d={id:t["-bpmnElement"],type:e,x:r,y:i,properties:l};return o&&(d.children=o),u&&(d.text=u),d}function wUe(t,e){var n=[];if(Array.isArray(t))t.forEach(function(i){var o;Array.isArray(e)?o=e.find(function(a){return a["-bpmnElement"]===i["-id"]}):o=e,n.push(pF(o,i))});else{var r=void 0;Array.isArray(e)?r=e.find(function(i){return i["-bpmnElement"]===t["-id"]}):r=e,n.push(pF(r,t))}return n}function pF(t,e){var n,r=e["-name"]?"".concat(e["-name"]):"";if(r){var i=t["bpmndi:BPMNLabel"]["dc:Bounds"],o=0;r.split(`
- `).forEach(function(u){o<u.length&&(o=u.length)}),n={value:r,x:Number(i["-x"])+o*10/2,y:Number(i["-y"])+7}}var a={};Object.entries(e).forEach(function(u){var c=Jo(u,2),d=c[0],f=c[1];Pq.includes(d)||(a[d]=f)}),a=bx(a);var s=t["di:waypoint"].map(function(u){return{x:Number(u["-x"]),y:Number(u["-y"])}}),l={id:e["-id"],type:Ta.FLOW,pointsList:s,sourceNodeId:e["-sourceRef"],targetNodeId:e["-targetRef"],properties:a};return n&&(l.text=n),l}var us=function(){function t(e){var n=e.lf,r=this;this.adapterOut=function(i,o){var a,s,l=OA({},r.processAttributes);vUe(l,i,o);var u={"-id":"BPMNPlane_1","-bpmnElement":l["-id"]};yUe(u,i);var c=r.definitionAttributes;c["bpmn:process"]=l,c["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":u};var d={"bpmn:definitions":c};if(!((a=o==null?void 0:o.mapping)===null||a===void 0)&&a.out){var f=(s=o==null?void 0:o.mapping)===null||s===void 0?void 0:s.out,h=function(g){Array.isArray(g)&&g.forEach(function(m){return h(m)}),typeof g=="object"&&Object.keys(g).forEach(function(m){var y;(y=f[m])?(g[y]=me.cloneDeep(g[m]),delete g[m],h(g[y])):h(g[m])})};h(d)}return d},this.adapterIn=function(i,o){if(i)return _Ue(i,o)},n.adapterIn=this.adapterIn,n.adapterOut=this.adapterOut,this.processAttributes={"-isExecutable":"true","-id":"Process"},this.definitionAttributes={"-id":"Definitions","-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.10"}}return t.prototype.setCustomShape=function(e,n){t.shapeConfigMap.set(e,n)},t.pluginName="bpmn-adapter",t.shapeConfigMap=new Map,t}();us.shapeConfigMap.set(Ta.START,{width:tF.width,height:tF.height});us.shapeConfigMap.set(Ta.END,{width:nF.width,height:nF.height});us.shapeConfigMap.set(Ta.INTERMEDIATE_CATCH,{width:mx.width,height:mx.height});us.shapeConfigMap.set(Ta.INTERMEDIATE_THROW,{width:mx.width,height:mx.height});us.shapeConfigMap.set(Ta.BOUNDARY,{width:rF.width,height:rF.height});us.shapeConfigMap.set(Ta.PARALLEL_GATEWAY,{width:iF.width,height:iF.height});us.shapeConfigMap.set(Ta.INCLUSIVE_GATEWAY,{width:oF.width,height:oF.height});us.shapeConfigMap.set(Ta.EXCLUSIVE_GATEWAY,{width:aF.width,height:aF.height});us.shapeConfigMap.set(Ta.SYSTEM,{width:sF.width,height:sF.height});us.shapeConfigMap.set(Ta.USER,{width:lF.width,height:lF.height});us.shapeConfigMap.set(Ta.SUBPROCESS,{width:uF.width,height:uF.height});(function(t){pUe(e,t);function e(n){var r=t.call(this,n)||this;r.adapterXmlIn=function(a){var s=dUe(a);return r.adapterIn(s,r.props)},r.adapterXmlOut=function(a){var s=r.adapterOut(a,r.props);return hUe(s)};var i=n.lf,o=n.props;return i.adapterIn=r.adapterXmlIn,i.adapterOut=r.adapterXmlOut,r.props=o,r}return e.pluginName="BPMNAdapter",e})(us);var gF=globalThis&&globalThis.__assign||function(){return gF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},gF.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__read;function xUe(t,e,n){var r=e.x,i=e.y,o=t.x,a=t.y,s=o-r,l=a-i,u=s*Math.cos(n)-l*Math.sin(n),c=s*Math.sin(n)+l*Math.cos(n),d=u+r,f=c+i;return{x:d,y:f}}var SUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_x=globalThis&&globalThis.__assign||function(){return _x=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_x.apply(this,arguments)},CUe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},EUe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},TUe=function(t){SUe(e,t);function e(){var n=t.apply(this,EUe([],CUe(arguments),!1))||this;return n.childrenPositionMap=new Map,n.onNodeRotate=function(r){var i=r.model,o=n.props,a=o.model,s=o.graphModel,l=a.transformWithContainer,u=a.isRestrict,c=n.childrenPositionMap;if(!(!l||u)&&i.id===a.id){var d={x:a.x,y:a.y};In(Array.from(a.children),function(f){var h=s.getNodeModelById(f);if(h){var g={x:h.x,y:h.y};c.has(h.id)?g=c.get(h.id):c.set(h.id,g);var m=i.rotate*(180/Math.PI);m<0&&(m+=360);var y=m*(Math.PI/180),b=xUe(g,d,y);h.moveTo(b.x,b.y),h.rotate=i.rotate}})}},n.onNodeResize=function(r){var i=r.deltaX,o=r.deltaY,a=r.index,s=r.model,l=r.preData,u=n.props,c=u.model,d=u.graphModel,f=c.transformWithContainer,h=c.isRestrict;if(!(!f||h)&&s.id===c.id){var g=l.properties,m=g||{},y=m.width,b=m.height;In(Array.from(c.children),function(w){var O=d.getNodeModelById(w);if(O){var x=O.width/y*i,S=O.height/b*o;aq({deltaX:x,deltaY:S,index:a,nodeModel:O,graphModel:d,cancelCallback:function(){}})}})}},n.onNodeMouseMove=function(){},n.graphRendered=function(){var r=n.props.model;r.isCollapsed&&r.toggleCollapse(!0)},n}return e.prototype.componentDidMount=function(){t.prototype.componentDidMount.call(this);var n=this.props.graphModel.eventCenter;n.on("node:rotate",this.onNodeRotate),n.on("node:resize",this.onNodeResize),n.on("node:mousemove",this.onNodeMouseMove),n.on("graph:rendered",this.graphRendered)},e.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this);var n=this.props.graphModel.eventCenter;n.off("node:rotate",this.onNodeRotate),n.off("node:resize",this.onNodeResize),n.off("node:mousemove",this.onNodeMouseMove),n.off("graph:rendered",this.graphRendered)},e.prototype.getNodesInGroup=function(n,r){var i=this,o=[];return n.isGroup&&In(Array.from(n.children),function(a){o.push(a);var s=r.getNodeModelById(a);s!=null&&s.isGroup&&(o=o.concat(i.getNodesInGroup(s,r)))}),o},e.prototype.getResizeControl=function(){var n=this.props.model,r=n.resizable,i=n.isCollapsed,o=r&&!i;return o?t.prototype.getResizeControl.call(this):null},e.prototype.getAppendAreaShape=function(){var n=this.props.model,r=n.width,i=n.height,o=n.x,a=n.y,s=n.radius,l=n.groupAddable;if(!l)return null;var u=n.getNodeStyle().strokeWidth,c=u===void 0?0:u,d=n.getAddableOutlineStyle(),f=r+c+8,h=i+c+8;return Kt("rect",_x(_x({},d),{width:f,height:h,x:o-f/2,y:a-h/2,rx:s,ry:s}))},e.prototype.getCollapseIcon=function(n,r){return"M ".concat(n+3,",").concat(r+6," ").concat(n+11,",").concat(r+6," M").concat(n+7,",").concat(r+2," ").concat(n+7,",").concat(r+10)},e.prototype.getExpandIcon=function(n,r){return"M ".concat(n+3,",").concat(r+6," ").concat(n+11,",").concat(r+6," ")},e.prototype.getOperateIcon=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=r-o/2+10,l=i-a/2+10;if(!n.collapsible)return null;var u=n!=null&&n.isCollapsed?this.getCollapseIcon(s,l):this.getExpandIcon(s,l),c=Kt("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:u});return Kt("g",{},[Kt("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#f4f5f6",stroke:"#cecece",cursor:"pointer",x:s,y:l,onClick:function(){n.toggleCollapse(!n.isCollapsed)}}),c])},e.prototype.getShape=function(){return Kt("g",{},[this.getAppendAreaShape(),t.prototype.getShape.call(this),this.getOperateIcon()])},e}(Cf),kUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ox=globalThis&&globalThis.__assign||function(){return Ox=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ox.apply(this,arguments)},a2=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},tg=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},zv=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},PUe=400,AUe=230,MUe=80,RUe=60,$Ue=-1e4,NUe=function(t){kUe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.isGroup=!0,i.isRestrict=!1,i.autoResize=!1,i.collapsible=!0,i.isCollapsed=!1,i.groupAddable=!1,i.transformWithContainer=!1,i.childrenLastCollapseStateDict=new Map,i.childrenLastCollapseStateDict=new Map,i.initNodeData(n),i.setAttributes(),i}return e.prototype.initNodeData=function(n){var r;t.prototype.initNodeData.call(this,n);var i=(r=n.properties)!==null&&r!==void 0?r:{},o=i.children,a=i.width,s=i.height,l=i.collapsedWidth,u=i.collapsedHeight,c=i.collapsible,d=i.isCollapsed,f=i.zIndex,h=i.isRestrict,g=i.autoResize,m=i.autoToFront,y=i.transformWithContainer;this.children=o?new Set(o):new Set,this.zIndex=f!=null?f:$Ue,this.isCollapsed=d!=null?d:!1;var b=a!=null?a:PUe,w=s!=null?s:AUe;this.width=b,this.height=w,this.expandWidth=b,this.expandHeight=w,this.collapsedWidth=l!=null?l:MUe,this.collapsedHeight=u!=null?u:RUe,this.isRestrict=h!=null?h:!1,this.transformWithContainer=y!=null?y:!1,this.autoResize=g!=null?g:!1,this.collapsible=c!=null?c:!0,this.autoToFront=m!=null?m:!1,this.text.editable=!1,this.text.draggable=!1},e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this)},e.prototype.getData=function(){var n=this,r=t.prototype.getData.call(this),i=[];return In(Array.from(this.children),function(o){var a=n.graphModel.getNodeModelById(o);a&&!a.virtual&&i.push(o)}),r.children=i,r.properties&&(r.properties.children=i,r.properties.isCollapsed=this.isCollapsed),r},e.prototype.getNodesInGroup=function(n){var r=[];return n.isGroup&&In(Array.from(n.children),function(i){r.push(i)}),r},e.prototype.getMoveDistance=function(n,r,i){i===void 0&&(i=!1);var o=tg(t.prototype.getMoveDistance.call(this,n,r,i),2),a=o[0],s=o[1],l=this.getNodesInGroup(this);return this.graphModel.moveNodes(l,n,r,i),[a,s]},e.prototype.getHistoryData=function(){var n=t.prototype.getHistoryData.call(this);n.children=Array.from(this.children),n.isGroup=!0;var r=this,i=r.x,o=r.y,a=r.collapsedWidth,s=r.collapsedHeight,l=r.expandWidth,u=r.expandHeight,c=r.isCollapsed;return c&&(n.x=i+l/2-a/2,n.y=o+u/2-s/2,n.text&&(n.text.x=n.text.x+l/2-a/2,n.text.y=n.text.y+u/2-s/2)),n},e.prototype.toggleCollapse=function(n){var r=this,i=!!n;this.isCollapsed=i,i?this.collapse():this.expand();var o=zv(zv([],tg(this.incoming.edges),!1),tg(this.outgoing.edges),!1),a=Array.from(this.children);In(a,function(s){var l,u,c=r.graphModel.elementsModelMap.get(s);if(c){var d=c.isCollapsed;if(c.isGroup){var f=c;if(f.isCollapsed||f.toggleCollapse(n),!n){var h=(l=r.childrenLastCollapseStateDict)===null||l===void 0?void 0:l.get(s);h!==void 0&&h!==c.isCollapsed&&f.toggleCollapse(h)}}if((u=r.childrenLastCollapseStateDict)===null||u===void 0||u.set(s,!!d),c.visible=!n,c.BaseType===xi.NODE){var g=c.incoming.edges,m=c.outgoing.edges;o=zv(zv(zv([],tg(o),!1),tg(g),!1),tg(m),!1)}}}),this.collapseEdge(i,o)},e.prototype.collapse=function(){var n=this,r=n.x,i=n.y,o=n.text,a=n.width,s=n.height,l=n.collapsedWidth,u=n.collapsedHeight;this.x=r-a/2+l/2,this.y=i-s/2+u/2,this.text.x=o.x-a/2+l/2,this.text.y=o.y-s/2+u/2,this.expandWidth=a,this.expandHeight=s,this.width=l,this.height=u},e.prototype.expand=function(){var n=this,r=n.x,i=n.y,o=n.text,a=n.expandWidth,s=n.expandHeight,l=n.collapsedWidth,u=n.collapsedHeight;this.width=a,this.height=s,this.x=r+this.width/2-l/2,this.y=i+this.height/2-u/2,this.text.x=o.x+this.width/2-l/2,this.text.y=o.y+this.height/2-u/2},e.prototype.createVirtualEdge=function(n){n.pointsList=void 0;var r=this.graphModel.addEdge(n);r.virtual=!0,r.text.editable=!1,r.isCollapsedEdge=!0},e.prototype.collapseEdge=function(n,r){var i=this,o=this.graphModel;In(r,function(a,s){var l,u=a.getData(),c=u.targetNodeId,d=u.sourceNodeId,f=Ox(Ox({},u),{id:"".concat(u.id,"__").concat(s),text:(l=u.text)===null||l===void 0?void 0:l.value});a.virtual&&o.deleteEdgeById(a.id);var h=o.dynamicGroup.getGroupByNodeId(c);h||(h=o.getNodeModelById(c));var g=o.dynamicGroup.getGroupByNodeId(d);g||(g=o.getNodeModelById(d)),n&&a.visible&&(i.children.has(d)||i.id===d?(f.startPoint=void 0,f.sourceNodeId=i.id):(f.endPoint=void 0,f.targetNodeId=i.id),(h.id!==i.id||g.id!==i.id)&&i.createVirtualEdge(f),a.visible=!1),!n&&!a.visible&&(h&&h.isGroup&&h.isCollapsed?(f.targetNodeId=h.id,f.endPoint=void 0,i.createVirtualEdge(f)):g&&g.isGroup&&g.isCollapsed?(f.sourceNodeId=g.id,f.startPoint=void 0,i.createVirtualEdge(f)):a.visible=!0)})},e.prototype.isAllowAppendIn=function(n){return!0},e.prototype.setAllowAppendChild=function(n){this.groupAddable=n},e.prototype.addChild=function(n){this.children.add(n);var r=this.getData();this.graphModel.eventCenter.emit("group:add-node",{data:r})},e.prototype.removeChild=function(n){this.children.delete(n);var r=this.getData();this.graphModel.eventCenter.emit("group:remove-node",{data:r})},e.prototype.toBack=function(){this.zIndex--},e.prototype.getResizeOutlineStyle=function(){var n=t.prototype.getResizeOutlineStyle.call(this);return n.stroke="none",n},e.prototype.getAnchorStyle=function(){var n=t.prototype.getAnchorStyle.call(this);return n.stroke="transparent",n.fill="transparent",n.hover&&(n.hover.fill="transparent",n.hover.stroke="transparent"),n},e.prototype.getAddableOutlineStyle=function(){return{stroke:"#feb663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},a2([st],e.prototype,"isCollapsed",void 0),a2([st],e.prototype,"groupAddable",void 0),a2([st],e.prototype,"transformWithContainer",void 0),e}(cp);function DUe(t,e){var n=t.minX,r=t.minY,i=t.maxX,o=t.maxY,a=e.x,s=e.y,l=e.width,u=e.height;return n>=a-l/2&&i<=a+l/2&&r>=s-u/2&&o<=s+u/2}function LUe(t,e,n,r){var i=t.minX,o=t.minY,a=t.maxX,s=t.maxY,l=e.x,u=e.y,c=e.width,d=e.height,f=i+c/2,h=o+d/2,g=a-c/2,m=s-d/2;return{x:l+n>=f&&l+n<=g,y:u+r>=h&&u+r<=m}}var wx=globalThis&&globalThis.__assign||function(){return wx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},wx.apply(this,arguments)},ng=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},rg=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},qN={type:"dynamic-group",view:TUe,model:NUe},IUe=-1e3,VO=-1e4,BUe=function(){function t(e){var n=e.lf,r=e.options,i=this;this.topGroupZIndex=VO,this.nodeGroupMap=new Map,this.addNodeToGroup=function(o){var a=o.data,s=i.nodeGroupMap.get(a.id);if(s){var l=i.lf.getNodeModelById(s);l.removeChild(a.id),i.nodeGroupMap.delete(a.id),l.setAllowAppendChild(!1)}var u=i.lf.getNodeModelById(a.id),c=u==null?void 0:u.getBounds();if(u&&c){if(u.isGroup){var d=u;In(Array.from(d.children),function(g){i.nodeGroupMap.set(g,a.id)}),i.calibrateTopGroupZIndex([a]),i.onNodeSelect({data:a,isSelected:!1,isMultiple:!1})}var l=i.getGroupByBounds(c,a);if(l){var f=l.isAllowAppendIn(a);console.log("isAllowAppendIn",f),f?(l.addChild(a.id),i.nodeGroupMap.set(a.id,l.id),l.setAllowAppendChild(!0)):i.lf.emit("group:not-allowed",{group:l.getData(),node:a})}}},this.removeNodeFromGroup=function(o){var a=o.data,s=o.model;s.isGroup&&a.children&&In(Array.from(a.children),function(c){i.nodeGroupMap.delete(c),i.lf.deleteNode(c)});var l=i.nodeGroupMap.get(a.id);if(l){var u=i.lf.getNodeModelById(l);u&&u.removeChild(a.id),i.nodeGroupMap.delete(a.id)}},this.setActiveGroup=function(o){var a=o.data,s=i.lf.getNodeModelById(a.id),l=s==null?void 0:s.getBounds();if(s&&l){var u=i.getGroupByBounds(l,a);if(i.activeGroup&&i.activeGroup.setAllowAppendChild(!1),!u||s.isGroup&&u.id===a.id)return;var c=u.isAllowAppendIn(a);if(!c)return;i.activeGroup=u,console.log("this.activeGroup",i.activeGroup),i.activeGroup.setAllowAppendChild(!0)}},this.onNodeSelect=function(o){var a=o.data,s=o.isMultiple,l=o.isSelected,u=i.lf.getNodeModelById(a.id);if(i.sendNodeToFront(u),i.topGroupZIndex>IUe){var c=i.lf.graphModel.nodes;i.topGroupZIndex=VO;var d=xz(ty(c,function(y){return!!y.isGroup}),"zIndex"),f=0;In(d,function(y){y.zIndex!==f&&(i.topGroupZIndex++,f=y.zIndex),y.setZIndex(i.topGroupZIndex)})}if(s&&l)if(u!=null&&u.isGroup){var h=u.children;In(Array.from(h),function(y){var b=i.lf.getNodeModelById(y);b==null||b.setSelected(!1)})}else{var g=i.nodeGroupMap.get(a.id);if(g){var m=i.lf.getNodeModelById(g);m!=null&&m.isSelected&&(u==null||u.setSelected(!1))}}},this.onNodeMove=function(o){var a=o.deltaX,s=o.deltaY,l=o.data,u=l.id,c=l.x,d=l.y,f=l.properties;if(!!f){var h=f.width,g=f.height,m=i.nodeGroupMap.get(u);if(!!m){var y=i.lf.getNodeModelById(m);if(!(!y||!y.isRestrict||!y.autoResize)){var b=c+a/2,w=d+s/2,O=b-h/2,x=w-g/2,S=b+h/2,C=w+g/2,E=!1,T=y.getBounds(),P=Object.assign({},T);if(O<P.minX&&(P.minX=O,E=!0),x<P.minY&&(P.minY=x,E=!0),S>P.maxX&&(P.maxX=S,E=!0),C>P.maxY&&(P.maxY=C,E=!0),!!E){var A=P.minX+(P.maxX-P.minX)/2,D=P.minY+(P.maxY-P.minY)/2,$=P.maxX-P.minX,N=P.maxY-P.minY;y.moveTo(A,D),y.width=$,y.height=N}}}}},this.onGraphRendered=function(o){var a=o.data;console.log("data",a),In(a.nodes,function(s){s.children&&In(s.children,function(l){i.nodeGroupMap.set(l,s.id)})}),i.calibrateTopGroupZIndex(a.nodes)},n.register(qN),this.lf=n,Nr(this,r),this.init()}return t.prototype.getGroupByNodeId=function(e){var n=this.nodeGroupMap.get(e);if(n)return this.lf.getNodeModelById(n)},t.prototype.getGroupByBounds=function(e,n){var r=this.lf.graphModel.nodes,i=ty(r,function(l){return!!l.isGroup&&DUe(e,l)&&l.id!==n.id}),o=i.length;if(o<=1)return i[0];for(var a=i[o-1],s=o-2;s>=0;s--)i[s].zIndex>a.zIndex&&(a=i[s]);return a},t.prototype.sendNodeToFront=function(e){var n=this;if(!(!e||!e.isGroup)&&(this.topGroupZIndex++,e.setZIndex(this.topGroupZIndex),e.children)){var r=e.children;In(Array.from(r),function(i){var o=n.lf.getNodeModelById(i);n.sendNodeToFront(o)})}},t.prototype.getMaxZIndex=function(e){var n=this,r=VO;if(e.isGroup&&(r=Math.max(r,e.zIndex)),e.children){var i=e.children;In(Array.from(i),function(o){var a=n.lf.getNodeModelById(o);if(a!=null&&a.isGroup){var s=n.getMaxZIndex(a);r=Math.max(r,s)}})}return r},t.prototype.calibrateTopGroupZIndex=function(e){var n=this,r=VO;if(In(e,function(s){var l=n.lf.getNodeModelById(s.id);if(l){var u=n.getMaxZIndex(l);u>r&&(r=u)}}),!(this.topGroupZIndex>=r)){var i=this.lf.graphModel.nodes,o=ty(i,function(s){return!!s.isGroup}),a=this.topGroupZIndex;In(o,function(s){s.zIndex>a&&(a=s.zIndex)}),this.topGroupZIndex=a}},t.prototype.removeChildrenInGroupNodeData=function(e){var n,r=Nn(e);return delete r.children,!((n=r.properties)===null||n===void 0)&&n.children&&delete r.properties.children,r},t.prototype.initGroupChildNodes=function(e,n,r,i){var o=this,a=[],s=[],l=[];In(Array.from(n),function(d){var f=o.lf.getNodeModelById(d);if(f){var h=f.children,g=f.getData(),m=cn.NODE_GROUP_COPY||"node:group-copy-add",y=DHe(o.removeChildrenInGroupNodeData(g),i),b=o.lf.addNode(y,m);if(r.addChild(b.id),e[d]=b.id,a.push(b),l.push.apply(l,rg([],ng(rg(rg([],ng(b.incoming.edges),!1),ng(b.outgoing.edges),!1)),!1)),h instanceof Set){var w=o.initGroupChildNodes(e,h,b,i),O=w.childNodes,x=w.edgesData;a.push.apply(a,rg([],ng(O),!1)),s.push.apply(s,rg([],ng(x),!1))}}}),console.log("allRelatedEdges -->>",l);var u=ty(l,function(d){return Xg(e,d.sourceNodeId)&&Xg(e,d.targetNodeId)}),c=Ca(u,function(d){return d.getData()});return{childNodes:a,edgesData:s.concat(c)}},t.prototype.createEdge=function(e,n,r){var i,o,a=e.sourceNodeId,s=e.targetNodeId,l=(i=n[a])!==null&&i!==void 0?i:a,u=(o=n[s])!==null&&o!==void 0?o:s,c=Nn(e);return e.id&&typeof e.text=="object"&&e.text!==null&&(c=LHe(e,r)),this.lf.graphModel.addEdge(wx(wx({},c),{sourceNodeId:l,targetNodeId:u}))},t.prototype.checkGroupBoundsWithChildren=function(e,n,r,i,o){if(e.children)for(var a=e.children,s=e.x,l=e.y,u=s+n/2,c=l+r/2,d=u-i/2,f=c-o/2,h=u+i/2,g=c+o/2,m=Array.from(a),y=0;y<m.length;y++){var b=m[y],w=this.lf.getNodeModelById(b);if(!!w){var O=w.getBounds(),x=O.minX,S=O.minY,C=O.maxX,E=O.maxY,T=d<=x&&f<=S&&h>=C&&g>=E;if(!T)return!1}}return!0},t.prototype.init=function(){var e=this,n=this.lf,r=n.graphModel;r.addNodeMoveRules(function(i,o,a){if(i.isGroup)return!0;var s=e.nodeGroupMap.get(i.id),l=e.lf.getNodeModelById(s);if(l&&l.isRestrict){if(l.autoResize)return!0;var u=l.getBounds();return LUe(u,i,o,a)}return!0}),r.addNodeResizeRules(function(i,o,a,s,l){return i.isGroup&&i.isRestrict?e.checkGroupBoundsWithChildren(i,o,a,s,l):!0}),r.dynamicGroup=this,n.on("node:add,node:drop,node:dnd-add",this.addNodeToGroup),n.on("node:delete",this.removeNodeFromGroup),n.on("node:drag,node:dnd-drag",this.setActiveGroup),n.on("node:click",this.onNodeSelect),n.on("node:mousemove",this.onNodeMove),n.on("graph:rendered",this.onGraphRendered),n.on("graph:updated",function(i){var o=i.data;return console.log("data",o)}),n.on("group:add-node",function(i){var o=i.data;return console.log("group:add-node",o)}),n.addElements=function(i,o){var a=i.nodes,s=i.edges;o===void 0&&(o=40);var l={},u={nodes:[],edges:[]},c=[];return In(a,function(d){var f,h,g=d.id,m=(h=(f=d.properties)===null||f===void 0?void 0:f.children)!==null&&h!==void 0?h:d.children,y=n.addNode(e.removeChildrenInGroupNodeData(d));if(g&&(l[g]=y.id),u.nodes.push(y),y.isGroup){var b=e.initGroupChildNodes(l,m,y,o).edgesData;c.push.apply(c,rg([],ng(b),!1))}}),In(c,function(d){e.createEdge(d,l,o)}),console.log("selectedEdges --->>>",s),In(s,function(d){u.edges.push(e.createEdge(d,l,o))}),u},this.render()},t.prototype.render=function(){},t.prototype.destroy=function(){this.lf.off("node:add,node:drop,node:dnd-add",this.addNodeToGroup),this.lf.off("node:delete",this.removeNodeFromGroup),this.lf.off("node:drag,node:dnd-drag",this.setActiveGroup),this.lf.off("node:click",this.onNodeSelect),this.lf.off("node:mousemove",this.onNodeMove),this.lf.off("graph:rendered",this.onGraphRendered)},t.pluginName="dynamicGroup",t}(),mF;(function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"})(mF||(mF={}));globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var FUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wy=globalThis&&globalThis.__assign||function(){return Wy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Wy.apply(this,arguments)},VUe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},jUe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},QUe=function(t){FUe(e,t);function e(n){var r=t.call(this,n)||this;r.textRef=pC(),r.setHoverOn=function(){var l=r.props.element;l.isDragging||r.state.isHovered||(r.setState({isHovered:!0}),l.setHovered(!0))},r.setHoverOff=function(){var l=r.props.element;!r.state.isHovered||(r.setState({isHovered:!1}),l.setHovered(!1))},r.handleMouseDown=function(l){var u,c=r.props,d=c.label,f=c.graphModel,h=f.editConfigModel.nodeTextDraggable;((u=d.draggable)!==null&&u!==void 0?u:h)&&!r.state.isDragging&&!r.state.isEditing&&r.stepDrag.handleMouseDown(l)},r.handleMouseUp=function(l){r.state.isDragging&&r.stepDrag.handleMouseUp(l)},r.handleDragging=function(l){var u=l.deltaX,c=l.deltaY;r.state.isDragging||r.setState({isDragging:!0});var d=r.props,f=d.label,h=d.graphModel,g=h.transformModel,m=jUe(g.fixDeltaXY(u,c),2),y=m[0],b=m[1];r.setElementModelLabelInfo({x:f.x+y,y:f.y+b}),h.eventCenter.emit("label:drag",{data:f.getData(),model:f})},r.handleDragEnd=function(){r.setState({isDragging:!1})},r.handleClick=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel;d.setSelected(!r.state.isSelected),r.setState({isSelected:!r.state.isSelected}),r.setElementModelLabelInfo({isSelected:!0}),f.eventCenter.emit("label:click",{data:c.getData(),e:l,model:d})},r.handleDbClick=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel;if(f.eventCenter.emit("label:dblclick",{data:c.getData(),e:l,model:d}),!c.editable){d.setSelected(!0);return}if(d.setSelected(),d.setElementState(Er.TEXT_EDIT),r.setState({isEditing:!0}),r.textRef.current){r.textRef.current.contentEditable="true",r.textRef.current.focus();var h=document.createRange(),g=window.getSelection();h.selectNodeContents(r.textRef.current),h.collapse(!1),g==null||g.removeAllRanges(),g==null||g.addRange(h)}},r.handleBlur=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel.eventCenter;f.emit("label:blur",{e:l,model:d,data:c.getData(),element:r.textRef.current}),r.setState({isDragging:!1,isHovered:!1,isSelected:!1})},r.handleInput=function(l){var u=r.props,c=u.label,d=u.graphModel;d.eventCenter.emit("label:input",{e:l,data:c.getData()})},r.reCalcLabelSize=function(){};var i=n.label,o=n.graphModel,a=o.gridSize,s=o.eventCenter;return r.stepDrag=new Al({onDragging:r.handleDragging,onDragEnd:r.handleDragEnd,step:a,eventType:"LABEL",model:i,eventCenter:s}),r.state={isEditing:!1,isHovered:!1,isDragging:!1,isSelected:!1},r}return e.prototype.setElementModelLabelInfo=function(n){var r=this.props,i=r.label,o=r.element,a=r.graphModel,s=o.properties._label,l=s,u=NR(l,function(f){return f.id===i.id}),c=l[u];l[u]=Wy(Wy({},c),n);var d=a.getElement(o.id);d==null||d.setProperty("_label",l)},e.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.label,o=r.element,a=r.graphModel;a.eventCenter.on("blank:click,node:click,edge:click,label:click",function(s){var l,u,c,d,f=s.data;if(((f==null?void 0:f.type)!=="label"||f.type==="label"&&f.id!==i.id||n.state.isSelected)&&n.setState({isSelected:!1}),((f==null?void 0:f.type)!=="label"||f.type=="label"&&f.id!==i.id)&&n.state.isEditing){n.setState({isEditing:!1});var h=(u=(l=n.textRef.current)===null||l===void 0?void 0:l.innerText)!==null&&u!==void 0?u:"",g=(d=(c=n.textRef.current)===null||c===void 0?void 0:c.innerHTML)!==null&&d!==void 0?d:"";n.setElementModelLabelInfo({value:h,content:g,isSelected:!1}),o.setElementState(Er.DEFAULT)}((f==null?void 0:f.type)!=="label"||f.type=="label"&&f.id!==i.id)&&n.textRef.current&&(n.textRef.current.contentEditable="false")})},e.prototype.componentDidUpdate=function(){},e.prototype.componentWillUnmount=function(){var n=this.props.graphModel;n.eventCenter.off("blank:click,node:click,edge:click")},e.prototype.render=function(){var n,r=this.props,i=r.label,o=r.element,a=r.graphModel,s=this.state,l=s.isDragging,u=s.isHovered,c=s.isSelected,d=s.isEditing,f=a.transformModel,h=f.getTransformStyle().transform,g=i.id,m=i.x,y=i.y,b=i.zIndex,w=i.vertical,O=i.style,x=i.rotate,S=i.content,C=i.labelWidth,E=i.textOverflowMode,T=C!=null?C:o.BaseType==="node"?o.width-20:80,P={left:"".concat(m-T/2,"px"),top:"".concat(y-10,"px"),width:"".concat(T,"px"),height:"20px",zIndex:b!=null?b:1,transform:x?"".concat(h," rotate(").concat(x,"deg)"):"".concat(h," rotate(").concat(w?-.25:0,"turn)")};return rt("div",{id:"element-container-".concat(g),className:nA("lf-label-editor-container"),style:P,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onDblClick:this.handleDbClick,onBlur:this.handleBlur,onMouseEnter:this.setHoverOn,onMouseOver:this.setHoverOn,onMouseLeave:this.setHoverOff,children:rt("div",{ref:this.textRef,id:"editor-container-".concat(g),className:nA("lf-label-editor",(n={"lf-label-editor-dragging":l,"lf-label-editor-editing":d,"lf-label-editor-hover":!d&&(u||c)},n["lf-label-editor-".concat(E)]=!d,n)),onInput:this.handleInput,style:Wy({maxWidth:"".concat(T,"px"),boxSizing:"border-box",display:"inline-block",background:d||o.BaseType==="edge"?"#fff":"transparent"},O),dangerouslySetInnerHTML:{__html:S}})})},e=VUe([Ea],e),e}(ur),Gs=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},zUe=sf,WUe=function(){function t(e,n,r){var i;this.type="label",this.content="",this.value="",this.style={},this.vertical=!1,this.editable=!0,this.draggable=!0,this.textOverflowMode="default",this.element=n,this.graphModel=r,this.id=(i=e.id)!==null&&i!==void 0?i:zUe(),this.initLabelData(e)}return t.prototype.initLabelData=function(e){Nr(this,e)},t.prototype.getData=function(){return{id:this.id,x:this.x,y:this.y,type:"label",content:this.content,value:this.value,rotate:this.rotate,style:Hl(this.style),draggable:this.draggable,editable:this.editable,labelWidth:this.labelWidth,textOverflowMode:this.textOverflowMode,vertical:this.vertical}},Gs([st],t.prototype,"x",void 0),Gs([st],t.prototype,"y",void 0),Gs([st],t.prototype,"content",void 0),Gs([st],t.prototype,"value",void 0),Gs([st],t.prototype,"rotate",void 0),Gs([st],t.prototype,"style",void 0),Gs([st],t.prototype,"zIndex",void 0),Gs([st],t.prototype,"vertical",void 0),Gs([st],t.prototype,"editable",void 0),Gs([st],t.prototype,"draggable",void 0),Gs([st],t.prototype,"labelWidth",void 0),Gs([st],t.prototype,"textOverflowMode",void 0),t}(),Mq={exports:{}};(function(t){/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */"classList"in document.createElement("_")||function(e){if("Element"in e){var n="classList",r="prototype",i=e.Element[r],o=Object,a=String[r].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[r].indexOf||function(g){for(var m=0,y=this.length;m<y;m++)if(m in this&&this[m]===g)return m;return-1},l=function(g,m){this.name=g,this.code=DOMException[g],this.message=m},u=function(g,m){if(m==="")throw new l("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(m))throw new l("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(g,m)},c=function(g){for(var m=a.call(g.getAttribute("class")||""),y=m?m.split(/\s+/):[],b=0,w=y.length;b<w;b++)this.push(y[b]);this._updateClassName=function(){g.setAttribute("class",this.toString())}},d=c[r]=[],f=function(){return new c(this)};if(l[r]=Error[r],d.item=function(g){return this[g]||null},d.contains=function(g){return g+="",u(this,g)!==-1},d.add=function(){var g=arguments,m=0,y=g.length,b,w=!1;do b=g[m]+"",u(this,b)===-1&&(this.push(b),w=!0);while(++m<y);w&&this._updateClassName()},d.remove=function(){var g=arguments,m=0,y=g.length,b,w=!1,O;do for(b=g[m]+"",O=u(this,b);O!==-1;)this.splice(O,1),w=!0,O=u(this,b);while(++m<y);w&&this._updateClassName()},d.toggle=function(g,m){g+="";var y=this.contains(g),b=y?m!==!0&&"remove":m!==!1&&"add";return b&&this[b](g),m===!0||m===!1?m:!y},d.toString=function(){return this.join(" ")},o.defineProperty){var h={get:f,enumerable:!0,configurable:!0};try{o.defineProperty(i,n,h)}catch(g){g.number===-2146823252&&(h.enumerable=!1,o.defineProperty(i,n,h))}}else o[r].__defineGetter__&&i.__defineGetter__(n,f)}}(self);/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */(function(e){if(e.URL=e.URL||e.webkitURL,e.Blob&&e.URL)try{new Blob;return}catch{}var n=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||function(i){var o=function(E){return Object.prototype.toString.call(E).match(/^\[object\s(.*)\]$/)[1]},a=function(){this.data=[]},s=function(T,P,A){this.data=T,this.size=T.length,this.type=P,this.encoding=A},l=a.prototype,u=s.prototype,c=i.FileReaderSync,d=function(E){this.code=this[this.name=E]},f="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),h=f.length,g=i.URL||i.webkitURL||i,m=g.createObjectURL,y=g.revokeObjectURL,b=g,w=i.btoa,O=i.atob,x=i.ArrayBuffer,S=i.Uint8Array,C=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(s.fake=u.fake=!0;h--;)d.prototype[f[h]]=h+1;return g.createObjectURL||(b=i.URL=function(E){var T=document.createElementNS("http://www.w3.org/1999/xhtml","a"),P;return T.href=E,"origin"in T||(T.protocol.toLowerCase()==="data:"?T.origin=null:(P=E.match(C),T.origin=P&&P[1])),T}),b.createObjectURL=function(E){var T=E.type,P;if(T===null&&(T="application/octet-stream"),E instanceof s)return P="data:"+T,E.encoding==="base64"?P+";base64,"+E.data:E.encoding==="URI"?P+","+decodeURIComponent(E.data):w?P+";base64,"+w(E.data):P+","+encodeURIComponent(E.data);if(m)return m.call(g,E)},b.revokeObjectURL=function(E){E.substring(0,5)!=="data:"&&y&&y.call(g,E)},l.append=function(E){var T=this.data;if(S&&(E instanceof x||E instanceof S)){for(var P="",A=new S(E),D=0,$=A.length;D<$;D++)P+=String.fromCharCode(A[D]);T.push(P)}else if(o(E)==="Blob"||o(E)==="File")if(c){var N=new c;T.push(N.readAsBinaryString(E))}else throw new d("NOT_READABLE_ERR");else E instanceof s?E.encoding==="base64"&&O?T.push(O(E.data)):E.encoding==="URI"?T.push(decodeURIComponent(E.data)):E.encoding==="raw"&&T.push(E.data):(typeof E!="string"&&(E+=""),T.push(unescape(encodeURIComponent(E))))},l.getBlob=function(E){return arguments.length||(E=null),new s(this.data.join(""),E,"raw")},l.toString=function(){return"[object BlobBuilder]"},u.slice=function(E,T,P){var A=arguments.length;return A<3&&(P=null),new s(this.data.slice(E,A>1?T:this.data.length),P,this.encoding)},u.toString=function(){return"[object Blob]"},u.close=function(){this.size=0,delete this.data},a}(e);e.Blob=function(i,o){var a=o&&o.type||"",s=new n;if(i)for(var l=0,u=i.length;l<u;l++)Uint8Array&&i[l]instanceof Uint8Array?s.append(i[l].buffer):s.append(i[l]);var c=s.getBlob(a);return!c.slice&&c.webkitSlice&&(c.slice=c.webkitSlice),c};var r=Object.getPrototypeOf||function(i){return i.__proto__};e.Blob.prototype=r(new e.Blob)})(typeof self!="undefined"&&self||typeof window!="undefined"&&window||Ai.content||Ai),function(e,n){var r=typeof process!="undefined"&&process&&process.versions&&process.versions.electron;r?e.MediumEditor=n:t.exports=n}(Ai,function(){function e(n,r){return this.init(n,r)}return e.extensions={},function(n){function r(l,u){var c,d=Array.prototype.slice.call(arguments,2);u=u||{};for(var f=0;f<d.length;f++){var h=d[f];if(h)for(c in h)h.hasOwnProperty(c)&&typeof h[c]!="undefined"&&(l||u.hasOwnProperty(c)===!1)&&(u[c]=h[c])}return u}var i=!1;try{var o=document.createElement("div"),a=document.createTextNode(" ");o.appendChild(a),i=o.contains(a)}catch{}var s={isIE:navigator.appName==="Microsoft Internet Explorer"||navigator.appName==="Netscape"&&new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent)!==null,isEdge:/Edge\/\d+/.exec(navigator.userAgent)!==null,isFF:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isMac:n.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(l){return!!(s.isMac&&l.metaKey||!s.isMac&&l.ctrlKey)},isKey:function(l,u){var c=s.getKeyCode(l);return Array.isArray(u)===!1?c===u:u.indexOf(c)!==-1},getKeyCode:function(l){var u=l.which;return u===null&&(u=l.charCode!==null?l.charCode:l.keyCode),u},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var u=[!0].concat(Array.prototype.slice.call(arguments));return r.apply(this,u)},defaults:function(){var u=[!1].concat(Array.prototype.slice.call(arguments));return r.apply(this,u)},createLink:function(l,u,c,d){var f=l.createElement("a");return s.moveTextRangeIntoElement(u[0],u[u.length-1],f),f.setAttribute("href",c),d&&(d==="_blank"&&f.setAttribute("rel","noopener noreferrer"),f.setAttribute("target",d)),f},findOrCreateMatchingTextNodes:function(l,u,c){for(var d=l.createTreeWalker(u,NodeFilter.SHOW_ALL,null,!1),f=[],h=0,g=!1,m=null,y=null;(m=d.nextNode())!==null;)if(!(m.nodeType>3))if(m.nodeType===3){if(!g&&c.start<h+m.nodeValue.length&&(g=!0,y=s.splitStartNodeIfNeeded(m,c.start,h)),g&&s.splitEndNodeIfNeeded(m,y,c.end,h),g&&h===c.end)break;if(g&&h>c.end+1)throw new Error("PerformLinking overshot the target!");g&&f.push(y||m),h+=m.nodeValue.length,y!==null&&(h+=y.nodeValue.length,d.nextNode()),y=null}else m.tagName.toLowerCase()==="img"&&(!g&&c.start<=h&&(g=!0),g&&f.push(m));return f},splitStartNodeIfNeeded:function(l,u,c){return u!==c?l.splitText(u-c):null},splitEndNodeIfNeeded:function(l,u,c,d){var f,h;f=d+l.nodeValue.length+(u?u.nodeValue.length:0)-1,h=c-d-(u?l.nodeValue.length:0),f>=c&&d!==f&&h!==0&&(u||l).splitText(h)},splitByBlockElements:function(l){if(l.nodeType!==3&&l.nodeType!==1)return[];var u=[],c=e.util.blockContainerElementNames.join(",");if(l.nodeType===3||l.querySelectorAll(c).length===0)return[l];for(var d=0;d<l.childNodes.length;d++){var f=l.childNodes[d];if(f.nodeType===3)u.push(f);else if(f.nodeType===1){var h=f.querySelectorAll(c);h.length===0?u.push(f):u=u.concat(e.util.splitByBlockElements(f))}}return u},findAdjacentTextNodeWithContent:function(u,c,d){var f=!1,h,g=d.createNodeIterator(u,NodeFilter.SHOW_TEXT,null,!1);for(h=g.nextNode();h;){if(h===c)f=!0;else if(f&&h.nodeType===3&&h.nodeValue&&h.nodeValue.trim().length>0)break;h=g.nextNode()}return h},findPreviousSibling:function(l){if(!l||s.isMediumEditorElement(l))return!1;for(var u=l.previousSibling;!u&&!s.isMediumEditorElement(l.parentNode);)l=l.parentNode,u=l.previousSibling;return u},isDescendant:function(u,c,d){if(!u||!c)return!1;if(u===c)return!!d;if(u.nodeType!==1)return!1;if(i||c.nodeType!==3)return u.contains(c);for(var f=c.parentNode;f!==null;){if(f===u)return!0;f=f.parentNode}return!1},isElement:function(u){return!!(u&&u.nodeType===1)},throttle:function(l,u){var c=50,d,f,h,g=null,m=0,y=function(){m=Date.now(),g=null,h=l.apply(d,f),g||(d=f=null)};return!u&&u!==0&&(u=c),function(){var b=Date.now(),w=u-(b-m);return d=this,f=arguments,w<=0||w>u?(g&&(clearTimeout(g),g=null),m=b,h=l.apply(d,f),g||(d=f=null)):g||(g=setTimeout(y,w)),h}},traverseUp:function(l,u){if(!l)return!1;do{if(l.nodeType===1){if(u(l))return l;if(s.isMediumEditorElement(l))return!1}l=l.parentNode}while(l);return!1},htmlEntities:function(l){return String(l).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},insertHTMLCommand:function(l,u){var c,d,f,h,g,m,y,b=!1,w=["insertHTML",!1,u];if(!e.util.isEdge&&l.queryCommandSupported("insertHTML"))try{return l.execCommand.apply(l,w)}catch{}if(c=l.getSelection(),c.rangeCount){if(d=c.getRangeAt(0),y=d.commonAncestorContainer,s.isMediumEditorElement(y)&&!y.firstChild)d.selectNode(y.appendChild(l.createTextNode("")));else if(y.nodeType===3&&d.startOffset===0&&d.endOffset===y.nodeValue.length||y.nodeType!==3&&y.innerHTML===d.toString()){for(;!s.isMediumEditorElement(y)&&y.parentNode&&y.parentNode.childNodes.length===1&&!s.isMediumEditorElement(y.parentNode);)y=y.parentNode;d.selectNode(y)}for(d.deleteContents(),f=l.createElement("div"),f.innerHTML=u,h=l.createDocumentFragment();f.firstChild;)g=f.firstChild,m=h.appendChild(g);d.insertNode(h),m&&(d=d.cloneRange(),d.setStartAfter(m),d.collapse(!0),e.selection.selectRange(l,d)),b=!0}return l.execCommand.callListeners&&l.execCommand.callListeners(w,b),b},execFormatBlock:function(l,u){var c=s.getTopBlockContainer(e.selection.getSelectionStart(l)),d;if(u==="blockquote"){if(c&&(d=Array.prototype.slice.call(c.childNodes),d.some(function(f){return s.isBlockContainer(f)})))return l.execCommand("outdent",!1,null);if(s.isIE)return l.execCommand("indent",!1,u)}if(c&&u===c.nodeName.toLowerCase()&&(u="p"),s.isIE&&(u="<"+u+">"),c&&c.nodeName.toLowerCase()==="blockquote"){if(s.isIE&&u==="<p>")return l.execCommand("outdent",!1,u);if((s.isFF||s.isEdge)&&u==="p")return d=Array.prototype.slice.call(c.childNodes),d.some(function(f){return!s.isBlockContainer(f)})&&l.execCommand("formatBlock",!1,u),l.execCommand("outdent",!1,u)}return l.execCommand("formatBlock",!1,u)},setTargetBlank:function(l,u){var c,d=u||!1;if(l.nodeName.toLowerCase()==="a")l.target="_blank",l.rel="noopener noreferrer";else for(l=l.getElementsByTagName("a"),c=0;c<l.length;c+=1)(d===!1||d===l[c].attributes.href.value)&&(l[c].target="_blank",l[c].rel="noopener noreferrer")},removeTargetBlank:function(l,u){var c;if(l.nodeName.toLowerCase()==="a")l.removeAttribute("target"),l.removeAttribute("rel");else for(l=l.getElementsByTagName("a"),c=0;c<l.length;c+=1)u===l[c].attributes.href.value&&(l[c].removeAttribute("target"),l[c].removeAttribute("rel"))},addClassToAnchors:function(l,u){var c=u.split(" "),d,f;if(l.nodeName.toLowerCase()==="a")for(f=0;f<c.length;f+=1)l.classList.add(c[f]);else{var h=l.getElementsByTagName("a");if(h.length===0){var g=s.getClosestTag(l,"a");l=g?[g]:[]}else l=h;for(d=0;d<l.length;d+=1)for(f=0;f<c.length;f+=1)l[d].classList.add(c[f])}},isListItem:function(l){if(!l)return!1;if(l.nodeName.toLowerCase()==="li")return!0;for(var u=l.parentNode,c=u.nodeName.toLowerCase();c==="li"||!s.isBlockContainer(u)&&c!=="div";){if(c==="li")return!0;if(u=u.parentNode,u)c=u.nodeName.toLowerCase();else return!1}return!1},cleanListDOM:function(l,u){if(u.nodeName.toLowerCase()==="li"){var c=u.parentElement;c.parentElement.nodeName.toLowerCase()==="p"&&(s.unwrap(c.parentElement,l),e.selection.moveCursor(l,u.firstChild,u.firstChild.textContent.length))}},splitOffDOMTree:function(l,u,c){for(var d=u,f=null,h=!c;d!==l;){var g=d.parentNode,m=g.cloneNode(!1),y=h?d:g.firstChild,b;for(f&&(h?m.appendChild(f):b=f),f=m;y;){var w=y.nextSibling;y===d?(y.hasChildNodes()?y=y.cloneNode(!1):y.parentNode.removeChild(y),y.textContent&&f.appendChild(y),y=h?w:null):(y.parentNode.removeChild(y),(y.hasChildNodes()||y.textContent)&&f.appendChild(y),y=w)}b&&f.appendChild(b),d=g}return f},moveTextRangeIntoElement:function(l,u,c){if(!l||!u)return!1;var d=s.findCommonRoot(l,u);if(!d)return!1;if(u===l){var f=l.parentNode,h=l.nextSibling;return f.removeChild(l),c.appendChild(l),h?f.insertBefore(c,h):f.appendChild(c),c.hasChildNodes()}for(var g=[],m,y,b,w=0;w<d.childNodes.length;w++)if(b=d.childNodes[w],!m)s.isDescendant(b,l,!0)&&(m=b);else if(s.isDescendant(b,u,!0)){y=b;break}else g.push(b);var O=y.nextSibling,x=d.ownerDocument.createDocumentFragment();return m===l?(m.parentNode.removeChild(m),x.appendChild(m)):x.appendChild(s.splitOffDOMTree(m,l)),g.forEach(function(S){S.parentNode.removeChild(S),x.appendChild(S)}),y===u?(y.parentNode.removeChild(y),x.appendChild(y)):x.appendChild(s.splitOffDOMTree(y,u,!0)),c.appendChild(x),y.parentNode===d?d.insertBefore(c,y):O?d.insertBefore(c,O):d.appendChild(c),c.hasChildNodes()},depthOfNode:function(l){for(var u=0,c=l;c.parentNode!==null;)c=c.parentNode,u++;return u},findCommonRoot:function(l,u){for(var c=s.depthOfNode(l),d=s.depthOfNode(u),f=l,h=u;c!==d;)c>d?(f=f.parentNode,c-=1):(h=h.parentNode,d-=1);for(;f!==h;)f=f.parentNode,h=h.parentNode;return f},isElementAtBeginningOfBlock:function(l){for(var u,c;!s.isBlockContainer(l)&&!s.isMediumEditorElement(l);){for(c=l;c=c.previousSibling;)if(u=c.nodeType===3?c.nodeValue:c.textContent,u.length>0)return!1;l=l.parentNode}return!0},isMediumEditorElement:function(l){return l&&l.getAttribute&&!!l.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(l){return s.traverseUp(l,function(u){return s.isMediumEditorElement(u)})},isBlockContainer:function(l){return l&&l.nodeType!==3&&s.blockContainerElementNames.indexOf(l.nodeName.toLowerCase())!==-1},getClosestBlockContainer:function(l){return s.traverseUp(l,function(u){return s.isBlockContainer(u)||s.isMediumEditorElement(u)})},getTopBlockContainer:function(l){var u=s.isBlockContainer(l)?l:!1;return s.traverseUp(l,function(c){return s.isBlockContainer(c)&&(u=c),!u&&s.isMediumEditorElement(c)?(u=c,!0):!1}),u},getFirstSelectableLeafNode:function(l){for(;l&&l.firstChild;)l=l.firstChild;if(l=s.traverseUp(l,function(c){return s.emptyElementNames.indexOf(c.nodeName.toLowerCase())===-1}),l.nodeName.toLowerCase()==="table"){var u=l.querySelector("th, td");u&&(l=u)}return l},getFirstTextNode:function(l){return s.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),s._getFirstTextNode(l)},_getFirstTextNode:function(l){if(l.nodeType===3)return l;for(var u=0;u<l.childNodes.length;u++){var c=s._getFirstTextNode(l.childNodes[u]);if(c!==null)return c}return null},ensureUrlHasProtocol:function(l){return l.indexOf("://")===-1?"http://"+l:l},warn:function(){n.console!==void 0&&typeof n.console.warn=="function"&&n.console.warn.apply(n.console,arguments)},deprecated:function(l,u,c){var d=l+" is deprecated, please use "+u+" instead.";c&&(d+=" Will be removed in "+c),s.warn(d)},deprecatedMethod:function(l,u,c,d){s.deprecated(l,u,d),typeof this[u]=="function"&&this[u].apply(this,c)},cleanupAttrs:function(l,u){u.forEach(function(c){l.removeAttribute(c)})},cleanupTags:function(l,u){u.indexOf(l.nodeName.toLowerCase())!==-1&&l.parentNode.removeChild(l)},unwrapTags:function(l,u){u.indexOf(l.nodeName.toLowerCase())!==-1&&e.util.unwrap(l,document)},getClosestTag:function(l,u){return s.traverseUp(l,function(c){return c.nodeName.toLowerCase()===u.toLowerCase()})},unwrap:function(l,u){for(var c=u.createDocumentFragment(),d=Array.prototype.slice.call(l.childNodes),f=0;f<d.length;f++)c.appendChild(d[f]);c.childNodes.length?l.parentNode.replaceChild(c,l):l.parentNode.removeChild(l)},guid:function(){function l(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return l()+l()+"-"+l()+"-"+l()+"-"+l()+"-"+l()+l()+l()}};e.util=s}(window),function(){var n=function(r){e.util.extend(this,r)};n.extend=function(r){var i=this,o;r&&r.hasOwnProperty("constructor")?o=r.constructor:o=function(){return i.apply(this,arguments)},e.util.extend(o,i);var a=function(){this.constructor=o};return a.prototype=i.prototype,o.prototype=new a,r&&e.util.extend(o.prototype,r),o},n.prototype={init:function(){},base:void 0,name:void 0,checkState:void 0,destroy:void 0,queryCommandState:void 0,isActive:void 0,isAlreadyApplied:void 0,setActive:void 0,setInactive:void 0,getInteractionElements:void 0,window:void 0,document:void 0,getEditorElements:function(){return this.base.elements},getEditorId:function(){return this.base.id},getEditorOption:function(r){return this.base.options[r]}},["execAction","on","off","subscribe","trigger"].forEach(function(r){n.prototype[r]=function(){return this.base[r].apply(this.base,arguments)}}),e.Extension=n}(),function(){function n(i){return e.util.isBlockContainer(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}var r={findMatchingSelectionParent:function(i,o){var a=o.getSelection(),s,l;return a.rangeCount===0?!1:(s=a.getRangeAt(0),l=s.commonAncestorContainer,e.util.traverseUp(l,i))},getSelectionElement:function(i){return this.findMatchingSelectionParent(function(o){return e.util.isMediumEditorElement(o)},i)},exportSelection:function(i,o){if(!i)return null;var a=null,s=o.getSelection();if(s.rangeCount>0){var l=s.getRangeAt(0),u=l.cloneRange(),c;u.selectNodeContents(i),u.setEnd(l.startContainer,l.startOffset),c=u.toString().length,a={start:c,end:c+l.toString().length},this.doesRangeStartWithImages(l,o)&&(a.startsWithImage=!0);var d=this.getTrailingImageCount(i,a,l.endContainer,l.endOffset);if(d&&(a.trailingImageCount=d),c!==0){var f=this.getIndexRelativeToAdjacentEmptyBlocks(o,i,l.startContainer,l.startOffset);f!==-1&&(a.emptyBlocksIndex=f)}}return a},importSelection:function(i,o,a,s){if(!(!i||!o)){var l=a.createRange();l.setStart(o,0),l.collapse(!0);var u=o,c=[],d=0,f=!1,h=!1,g=0,m=!1,y,b=!1,w=null;for((s||i.startsWithImage||typeof i.emptyBlocksIndex!="undefined")&&(b=!0);!m&&u;){if(u.nodeType>3){u=c.pop();continue}if(u.nodeType===3&&!h)y=d+u.length,!f&&i.start>=d&&i.start<=y&&(b||i.start<y?(l.setStart(u,i.start-d),f=!0):w=u),f&&i.end>=d&&i.end<=y&&(i.trailingImageCount?h=!0:(l.setEnd(u,i.end-d),m=!0)),d=y;else{if(i.trailingImageCount&&h&&(u.nodeName.toLowerCase()==="img"&&g++,g===i.trailingImageCount)){for(var O=0;u.parentNode.childNodes[O]!==u;)O++;l.setEnd(u.parentNode,O+1),m=!0}if(!m&&u.nodeType===1)for(var x=u.childNodes.length-1;x>=0;)c.push(u.childNodes[x]),x-=1}m||(u=c.pop())}!f&&w&&(l.setStart(w,w.length),l.setEnd(w,w.length)),typeof i.emptyBlocksIndex!="undefined"&&(l=this.importSelectionMoveCursorPastBlocks(a,o,i.emptyBlocksIndex,l)),s&&(l=this.importSelectionMoveCursorPastAnchor(i,l)),this.selectRange(a,l)}},importSelectionMoveCursorPastAnchor:function(i,o){var a=function(d){return d.nodeName.toLowerCase()==="a"};if(i.start===i.end&&o.startContainer.nodeType===3&&o.startOffset===o.startContainer.nodeValue.length&&e.util.traverseUp(o.startContainer,a)){for(var s=o.startContainer,l=o.startContainer.parentNode;l!==null&&l.nodeName.toLowerCase()!=="a";)l.childNodes[l.childNodes.length-1]!==s?l=null:(s=l,l=l.parentNode);if(l!==null&&l.nodeName.toLowerCase()==="a"){for(var u=null,c=0;u===null&&c<l.parentNode.childNodes.length;c++)l.parentNode.childNodes[c]===l&&(u=c);o.setStart(l.parentNode,u+1),o.collapse(!0)}}return o},importSelectionMoveCursorPastBlocks:function(i,o,a,s){var l=i.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,n,!1),u=s.startContainer,c,d,f=0;for(a=a||1,u.nodeType===3&&e.util.isBlockContainer(u.previousSibling)?c=u.previousSibling:c=e.util.getClosestBlockContainer(u);l.nextNode();)if(!d)c===l.currentNode&&(d=l.currentNode);else if(d=l.currentNode,f++,f===a||d.textContent.length>0)break;return d||(d=c),s.setStart(e.util.getFirstSelectableLeafNode(d),0),s},getIndexRelativeToAdjacentEmptyBlocks:function(i,o,a,s){if(a.textContent.length>0&&s>0)return-1;var l=a;if(l.nodeType!==3&&(l=a.childNodes[s]),l){if(!e.util.isElementAtBeginningOfBlock(l))return-1;var u=e.util.findPreviousSibling(l);if(u){if(u.nodeValue)return-1}else return-1}for(var c=e.util.getClosestBlockContainer(a),d=i.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,n,!1),f=0;d.nextNode();){var h=d.currentNode.textContent==="";if((h||f>0)&&(f+=1),d.currentNode===c)return f;h||(f=0)}return f},doesRangeStartWithImages:function(i,o){if(i.startOffset!==0||i.startContainer.nodeType!==1)return!1;if(i.startContainer.nodeName.toLowerCase()==="img")return!0;var a=i.startContainer.querySelector("img");if(!a)return!1;for(var s=o.createTreeWalker(i.startContainer,NodeFilter.SHOW_ALL,null,!1);s.nextNode();){var l=s.currentNode;if(l===a)break;if(l.nodeValue)return!1}return!0},getTrailingImageCount:function(i,o,a,s){if(s===0||a.nodeType!==1||a.nodeName.toLowerCase()!=="img"&&!a.querySelector("img"))return 0;for(var l=a.childNodes[s-1];l.hasChildNodes();)l=l.lastChild;for(var u=i,c=[],d=0,f=!1,h=!1,g=!1,m,y=0;!g&&u;){if(u.nodeType>3){u=c.pop();continue}if(u.nodeType===3&&!h)y=0,m=d+u.length,!f&&o.start>=d&&o.start<=m&&(f=!0),f&&o.end>=d&&o.end<=m&&(h=!0),d=m;else if(u.nodeName.toLowerCase()==="img"&&y++,u===l)g=!0;else if(u.nodeType===1)for(var b=u.childNodes.length-1;b>=0;)c.push(u.childNodes[b]),b-=1;g||(u=c.pop())}return y},selectionContainsContent:function(i){var o=i.getSelection();if(!o||o.isCollapsed||!o.rangeCount)return!1;if(o.toString().trim()!=="")return!0;var a=this.getSelectedParentElement(o.getRangeAt(0));return!!(a&&(a.nodeName.toLowerCase()==="img"||a.nodeType===1&&a.querySelector("img")))},selectionInContentEditableFalse:function(i){var o,a=this.findMatchingSelectionParent(function(s){var l=s&&s.getAttribute("contenteditable");return l==="true"&&(o=!0),s.nodeName!=="#text"&&l==="false"},i);return!o&&a},getSelectionHtml:function(o){var a,s="",l=o.getSelection(),u,c;if(l.rangeCount){for(c=o.createElement("div"),a=0,u=l.rangeCount;a<u;a+=1)c.appendChild(l.getRangeAt(a).cloneContents());s=c.innerHTML}return s},getCaretOffsets:function(o,a){var s,l;return a||(a=window.getSelection().getRangeAt(0)),s=a.cloneRange(),l=a.cloneRange(),s.selectNodeContents(o),s.setEnd(a.endContainer,a.endOffset),l.selectNodeContents(o),l.setStart(a.endContainer,a.endOffset),{left:s.toString().length,right:l.toString().length}},rangeSelectsSingleNode:function(i){var o=i.startContainer;return o===i.endContainer&&o.hasChildNodes()&&i.endOffset===i.startOffset+1},getSelectedParentElement:function(i){return i?this.rangeSelectsSingleNode(i)&&i.startContainer.childNodes[i.startOffset].nodeType!==3?i.startContainer.childNodes[i.startOffset]:i.startContainer.nodeType===3?i.startContainer.parentNode:i.startContainer:null},getSelectedElements:function(i){var o=i.getSelection(),a,s,l;if(!o.rangeCount||o.isCollapsed||!o.getRangeAt(0).commonAncestorContainer)return[];if(a=o.getRangeAt(0),a.commonAncestorContainer.nodeType===3){for(s=[],l=a.commonAncestorContainer;l.parentNode&&l.parentNode.childNodes.length===1;)s.push(l.parentNode),l=l.parentNode;return s}return[].filter.call(a.commonAncestorContainer.getElementsByTagName("*"),function(u){return typeof o.containsNode=="function"?o.containsNode(u,!0):!0})},selectNode:function(i,o){var a=o.createRange();a.selectNodeContents(i),this.selectRange(o,a)},select:function(i,o,a,s,l){var u=i.createRange();return u.setStart(o,a),s?u.setEnd(s,l):u.collapse(!0),this.selectRange(i,u),u},clearSelection:function(i,o){o?i.getSelection().collapseToStart():i.getSelection().collapseToEnd()},moveCursor:function(i,o,a){this.select(i,o,a)},getSelectionRange:function(i){var o=i.getSelection();return o.rangeCount===0?null:o.getRangeAt(0)},selectRange:function(i,o){var a=i.getSelection();a.removeAllRanges(),a.addRange(o)},getSelectionStart:function(i){var o=i.getSelection().anchorNode,a=o&&o.nodeType===3?o.parentNode:o;return a}};e.selection=r}(),function(){function n(i,o){return i?i.some(function(a){if(typeof a.getInteractionElements!="function")return!1;var s=a.getInteractionElements();return s?(Array.isArray(s)||(s=[s]),s.some(function(l){return e.util.isDescendant(l,o,!0)})):!1}):!1}var r=function(i){this.base=i,this.options=this.base.options,this.events=[],this.disabledEvents={},this.customEvents={},this.listeners={}};r.prototype={InputEventOnContenteditableSupported:!e.util.isIE&&!e.util.isEdge,attachDOMEvent:function(i,o,a,s){var l=this.base.options.contentWindow,u=this.base.options.ownerDocument;i=e.util.isElement(i)||[l,u].indexOf(i)>-1?[i]:i,Array.prototype.forEach.call(i,function(c){c.addEventListener(o,a,s),this.events.push([c,o,a,s])}.bind(this))},detachDOMEvent:function(i,o,a,s){var l,u,c=this.base.options.contentWindow,d=this.base.options.ownerDocument;i&&(i=e.util.isElement(i)||[c,d].indexOf(i)>-1?[i]:i,Array.prototype.forEach.call(i,function(f){l=this.indexOfListener(f,o,a,s),l!==-1&&(u=this.events.splice(l,1)[0],u[0].removeEventListener(u[1],u[2],u[3]))}.bind(this)))},indexOfListener:function(i,o,a,s){var l,u,c;for(l=0,u=this.events.length;l<u;l=l+1)if(c=this.events[l],c[0]===i&&c[1]===o&&c[2]===a&&c[3]===s)return l;return-1},detachAllDOMEvents:function(){for(var i=this.events.pop();i;)i[0].removeEventListener(i[1],i[2],i[3]),i=this.events.pop()},detachAllEventsFromElement:function(i){for(var o=this.events.filter(function(u){return u&&u[0].getAttribute&&u[0].getAttribute("medium-editor-index")===i.getAttribute("medium-editor-index")}),a=0,s=o.length;a<s;a++){var l=o[a];this.detachDOMEvent(l[0],l[1],l[2],l[3])}},attachAllEventsToElement:function(i){this.listeners.editableInput&&(this.contentCache[i.getAttribute("medium-editor-index")]=i.innerHTML),this.eventsCache&&this.eventsCache.forEach(function(o){this.attachDOMEvent(i,o.name,o.handler.bind(this))},this)},enableCustomEvent:function(i){this.disabledEvents[i]!==void 0&&delete this.disabledEvents[i]},disableCustomEvent:function(i){this.disabledEvents[i]=!0},attachCustomEvent:function(i,o){this.setupListener(i),this.customEvents[i]||(this.customEvents[i]=[]),this.customEvents[i].push(o)},detachCustomEvent:function(i,o){var a=this.indexOfCustomListener(i,o);a!==-1&&this.customEvents[i].splice(a,1)},indexOfCustomListener:function(i,o){return!this.customEvents[i]||!this.customEvents[i].length?-1:this.customEvents[i].indexOf(o)},detachAllCustomEvents:function(){this.customEvents={}},triggerCustomEvent:function(i,o,a){this.customEvents[i]&&!this.disabledEvents[i]&&this.customEvents[i].forEach(function(s){s(o,a)})},destroy:function(){this.detachAllDOMEvents(),this.detachAllCustomEvents(),this.detachExecCommand(),this.base.elements&&this.base.elements.forEach(function(i){i.removeAttribute("data-medium-focused")})},attachToExecCommand:function(){this.execCommandListener||(this.execCommandListener=function(i){this.handleDocumentExecCommand(i)}.bind(this),this.wrapExecCommand(),this.options.ownerDocument.execCommand.listeners.push(this.execCommandListener))},detachExecCommand:function(){var i=this.options.ownerDocument;if(!(!this.execCommandListener||!i.execCommand.listeners)){var o=i.execCommand.listeners.indexOf(this.execCommandListener);o!==-1&&i.execCommand.listeners.splice(o,1),i.execCommand.listeners.length||this.unwrapExecCommand()}},wrapExecCommand:function(){var i=this.options.ownerDocument;if(!i.execCommand.listeners){var o=function(s,l){i.execCommand.listeners&&i.execCommand.listeners.forEach(function(u){u({command:s[0],value:s[2],args:s,result:l})})},a=function(){var s=i.execCommand.orig.apply(this,arguments);if(!i.execCommand.listeners)return s;var l=Array.prototype.slice.call(arguments);return o(l,s),s};a.orig=i.execCommand,a.listeners=[],a.callListeners=o,i.execCommand=a}},unwrapExecCommand:function(){var i=this.options.ownerDocument;!i.execCommand.orig||(i.execCommand=i.execCommand.orig)},setupListener:function(i){if(!this.listeners[i]){switch(i){case"externalInteraction":this.attachDOMEvent(this.options.ownerDocument.body,"mousedown",this.handleBodyMousedown.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"click",this.handleBodyClick.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"focus",this.handleBodyFocus.bind(this),!0);break;case"blur":this.setupListener("externalInteraction");break;case"focus":this.setupListener("externalInteraction");break;case"editableInput":this.contentCache={},this.base.elements.forEach(function(o){this.contentCache[o.getAttribute("medium-editor-index")]=o.innerHTML},this),this.InputEventOnContenteditableSupported&&this.attachToEachElement("input",this.handleInput),this.InputEventOnContenteditableSupported||(this.setupListener("editableKeypress"),this.keypressUpdateInput=!0,this.attachDOMEvent(document,"selectionchange",this.handleDocumentSelectionChange.bind(this)),this.attachToExecCommand());break;case"editableClick":this.attachToEachElement("click",this.handleClick);break;case"editableBlur":this.attachToEachElement("blur",this.handleBlur);break;case"editableKeypress":this.attachToEachElement("keypress",this.handleKeypress);break;case"editableKeyup":this.attachToEachElement("keyup",this.handleKeyup);break;case"editableKeydown":this.attachToEachElement("keydown",this.handleKeydown);break;case"editableKeydownSpace":this.setupListener("editableKeydown");break;case"editableKeydownEnter":this.setupListener("editableKeydown");break;case"editableKeydownTab":this.setupListener("editableKeydown");break;case"editableKeydownDelete":this.setupListener("editableKeydown");break;case"editableMouseover":this.attachToEachElement("mouseover",this.handleMouseover);break;case"editableDrag":this.attachToEachElement("dragover",this.handleDragging),this.attachToEachElement("dragleave",this.handleDragging);break;case"editableDrop":this.attachToEachElement("drop",this.handleDrop);break;case"editablePaste":this.attachToEachElement("paste",this.handlePaste);break}this.listeners[i]=!0}},attachToEachElement:function(i,o){this.eventsCache||(this.eventsCache=[]),this.base.elements.forEach(function(a){this.attachDOMEvent(a,i,o.bind(this))},this),this.eventsCache.push({name:i,handler:o})},cleanupElement:function(i){var o=i.getAttribute("medium-editor-index");o&&(this.detachAllEventsFromElement(i),this.contentCache&&delete this.contentCache[o])},focusElement:function(i){i.focus(),this.updateFocus(i,{target:i,type:"focus"})},updateFocus:function(i,o){var a=this.base.getFocusedElement(),s;a&&o.type==="click"&&this.lastMousedownTarget&&(e.util.isDescendant(a,this.lastMousedownTarget,!0)||n(this.base.extensions,this.lastMousedownTarget))&&(s=a),s||this.base.elements.some(function(u){return!s&&e.util.isDescendant(u,i,!0)&&(s=u),!!s},this);var l=!e.util.isDescendant(a,i,!0)&&!n(this.base.extensions,i);s!==a&&(a&&l&&(a.removeAttribute("data-medium-focused"),this.triggerCustomEvent("blur",o,a)),s&&(s.setAttribute("data-medium-focused",!0),this.triggerCustomEvent("focus",o,s))),l&&this.triggerCustomEvent("externalInteraction",o)},updateInput:function(i,o){if(!!this.contentCache){var a=i.getAttribute("medium-editor-index"),s=i.innerHTML;s!==this.contentCache[a]&&this.triggerCustomEvent("editableInput",o,i),this.contentCache[a]=s}},handleDocumentSelectionChange:function(i){if(i.currentTarget&&i.currentTarget.activeElement){var o=i.currentTarget.activeElement,a;this.base.elements.some(function(s){return e.util.isDescendant(s,o,!0)?(a=s,!0):!1},this),a&&this.updateInput(a,{target:o,currentTarget:a})}},handleDocumentExecCommand:function(){var i=this.base.getFocusedElement();i&&this.updateInput(i,{target:i,currentTarget:i})},handleBodyClick:function(i){this.updateFocus(i.target,i)},handleBodyFocus:function(i){this.updateFocus(i.target,i)},handleBodyMousedown:function(i){this.lastMousedownTarget=i.target},handleInput:function(i){this.updateInput(i.currentTarget,i)},handleClick:function(i){this.triggerCustomEvent("editableClick",i,i.currentTarget)},handleBlur:function(i){this.triggerCustomEvent("editableBlur",i,i.currentTarget)},handleKeypress:function(i){if(this.triggerCustomEvent("editableKeypress",i,i.currentTarget),this.keypressUpdateInput){var o={target:i.target,currentTarget:i.currentTarget};setTimeout(function(){this.updateInput(o.currentTarget,o)}.bind(this),0)}},handleKeyup:function(i){this.triggerCustomEvent("editableKeyup",i,i.currentTarget)},handleMouseover:function(i){this.triggerCustomEvent("editableMouseover",i,i.currentTarget)},handleDragging:function(i){this.triggerCustomEvent("editableDrag",i,i.currentTarget)},handleDrop:function(i){this.triggerCustomEvent("editableDrop",i,i.currentTarget)},handlePaste:function(i){this.triggerCustomEvent("editablePaste",i,i.currentTarget)},handleKeydown:function(i){if(this.triggerCustomEvent("editableKeydown",i,i.currentTarget),e.util.isKey(i,e.util.keyCode.SPACE))return this.triggerCustomEvent("editableKeydownSpace",i,i.currentTarget);if(e.util.isKey(i,e.util.keyCode.ENTER)||i.ctrlKey&&e.util.isKey(i,e.util.keyCode.M))return this.triggerCustomEvent("editableKeydownEnter",i,i.currentTarget);if(e.util.isKey(i,e.util.keyCode.TAB))return this.triggerCustomEvent("editableKeydownTab",i,i.currentTarget);if(e.util.isKey(i,[e.util.keyCode.DELETE,e.util.keyCode.BACKSPACE]))return this.triggerCustomEvent("editableKeydownDelete",i,i.currentTarget)}},e.Events=r}(),function(){var n=e.Extension.extend({action:void 0,aria:void 0,tagNames:void 0,style:void 0,useQueryState:void 0,contentDefault:void 0,contentFA:void 0,classList:void 0,attrs:void 0,constructor:function(r){n.isBuiltInButton(r)?e.Extension.call(this,this.defaults[r]):e.Extension.call(this,r)},init:function(){e.Extension.prototype.init.apply(this,arguments),this.button=this.createButton(),this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},getAction:function(){return typeof this.action=="function"?this.action(this.base.options):this.action},getAria:function(){return typeof this.aria=="function"?this.aria(this.base.options):this.aria},getTagNames:function(){return typeof this.tagNames=="function"?this.tagNames(this.base.options):this.tagNames},createButton:function(){var r=this.document.createElement("button"),i=this.contentDefault,o=this.getAria(),a=this.getEditorOption("buttonLabels");return r.classList.add("medium-editor-action"),r.classList.add("medium-editor-action-"+this.name),this.classList&&this.classList.forEach(function(s){r.classList.add(s)}),r.setAttribute("data-action",this.getAction()),o&&(r.setAttribute("title",o),r.setAttribute("aria-label",o)),this.attrs&&Object.keys(this.attrs).forEach(function(s){r.setAttribute(s,this.attrs[s])},this),a==="fontawesome"&&this.contentFA&&(i=this.contentFA),r.innerHTML=i,r},handleClick:function(r){r.preventDefault(),r.stopPropagation();var i=this.getAction();i&&this.execAction(i)},isActive:function(){return this.button.classList.contains(this.getEditorOption("activeButtonClass"))},setInactive:function(){this.button.classList.remove(this.getEditorOption("activeButtonClass")),delete this.knownState},setActive:function(){this.button.classList.add(this.getEditorOption("activeButtonClass")),delete this.knownState},queryCommandState:function(){var r=null;return this.useQueryState&&(r=this.base.queryCommandState(this.getAction())),r},isAlreadyApplied:function(r){var i=!1,o=this.getTagNames(),a,s;return this.knownState===!1||this.knownState===!0?this.knownState:(o&&o.length>0&&(i=o.indexOf(r.nodeName.toLowerCase())!==-1),!i&&this.style&&(a=this.style.value.split("|"),s=this.window.getComputedStyle(r,null).getPropertyValue(this.style.prop),a.forEach(function(l){this.knownState||(i=s.indexOf(l)!==-1,(i||this.style.prop!=="text-decoration")&&(this.knownState=i))},this)),i)}});n.isBuiltInButton=function(r){return typeof r=="string"&&e.extensions.button.prototype.defaults.hasOwnProperty(r)},e.extensions.button=n}(),function(){e.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"<b>B</b>",contentFA:'<i class="fa fa-bold"></i>'},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"<b><i>I</i></b>",contentFA:'<i class="fa fa-italic"></i>'},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"<b><u>U</u></b>",contentFA:'<i class="fa fa-underline"></i>'},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"<s>A</s>",contentFA:'<i class="fa fa-strikethrough"></i>'},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"<b>x<sup>1</sup></b>",contentFA:'<i class="fa fa-superscript"></i>'},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"<b>x<sub>1</sub></b>",contentFA:'<i class="fa fa-subscript"></i>'},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"<b>image</b>",contentFA:'<i class="fa fa-picture-o"></i>'},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"<b>html</b>",contentFA:'<i class="fa fa-code"></i>'},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"<b>1.</b>",contentFA:'<i class="fa fa-list-ol"></i>'},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"<b>•</b>",contentFA:'<i class="fa fa-list-ul"></i>'},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"<b>→</b>",contentFA:'<i class="fa fa-indent"></i>'},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"<b>←</b>",contentFA:'<i class="fa fa-outdent"></i>'},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"<b>C</b>",contentFA:'<i class="fa fa-align-center"></i>'},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"<b>J</b>",contentFA:'<i class="fa fa-align-justify"></i>'},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"<b>L</b>",contentFA:'<i class="fa fa-align-left"></i>'},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"<b>R</b>",contentFA:'<i class="fa fa-align-right"></i>'},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"<b>X</b>",contentFA:'<i class="fa fa-eraser"></i>'},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"<b>“</b>",contentFA:'<i class="fa fa-quote-right"></i>'},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"<b>0101</b>",contentFA:'<i class="fa fa-code fa-lg"></i>'},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"<b>H1</b>",contentFA:'<i class="fa fa-header"><sup>1</sup>'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"<b>H2</b>",contentFA:'<i class="fa fa-header"><sup>2</sup>'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"<b>H3</b>",contentFA:'<i class="fa fa-header"><sup>3</sup>'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"<b>H4</b>",contentFA:'<i class="fa fa-header"><sup>4</sup>'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"<b>H5</b>",contentFA:'<i class="fa fa-header"><sup>5</sup>'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"<b>H6</b>",contentFA:'<i class="fa fa-header"><sup>6</sup>'}}}(),function(){var n=e.extensions.button.extend({init:function(){e.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return this.hasForm?this.getForm().classList.contains(this.activeClass):!1},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var r=this.base.getExtensionByName("toolbar");r&&r.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var r=this.base.getExtensionByName("toolbar");r&&r.hideToolbarDefaultActions()},setToolbarPosition:function(){var r=this.base.getExtensionByName("toolbar");r&&r.setToolbarPosition()}});e.extensions.form=n}(),function(){var n=e.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"<b>#</b>",contentFA:'<i class="fa fa-link"></i>',init:function(){e.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(r){r.preventDefault(),r.stopPropagation();var i=e.selection.getSelectionRange(this.document);return i.startContainer.nodeName.toLowerCase()==="a"||i.endContainer.nodeName.toLowerCase()==="a"||e.util.getClosestTag(e.selection.getSelectedParentElement(i),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(r){e.util.isKey(r,e.util.keyCode.K)&&e.util.isMetaCtrlKey(r)&&!r.shiftKey&&this.handleClick(r)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var r=['<input type="text" class="medium-editor-toolbar-input" placeholder="',this.placeholderText,'">'];return r.push('<a href="#" class="medium-editor-toolbar-save">',this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-check"></i>':this.formSaveLabel,"</a>"),r.push('<a href="#" class="medium-editor-toolbar-close">',this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-times"></i>':this.formCloseLabel,"</a>"),this.targetCheckbox&&r.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-target" id="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">','<label for="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">',this.targetCheckboxText,"</label>","</div>"),this.customClassOption&&r.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-button">',"<label>",this.customClassOptionText,"</label>","</div>"),r.join("")},isDisplayed:function(){return e.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){e.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(r){var i=this.getInput(),o=this.getAnchorTargetCheckbox(),a=this.getAnchorButtonCheckbox();if(r=r||{value:""},typeof r=="string"&&(r={value:r}),this.base.saveSelection(),this.hideToolbarDefaultActions(),e.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),i.value=r.value,i.focus(),o&&(o.checked=r.target==="_blank"),a){var s=r.buttonClass?r.buttonClass.split(" "):[];a.checked=s.indexOf(this.customClassOption)!==-1}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var r=this.getAnchorTargetCheckbox(),i=this.getAnchorButtonCheckbox(),o={value:this.getInput().value.trim()};return this.linkValidation&&(o.value=this.checkLinkFormat(o.value)),o.target="_self",r&&r.checked&&(o.target="_blank"),i&&i.checked&&(o.buttonClass=this.customClassOption),o},doFormSave:function(){var r=this.getFormOpts();this.completeFormSave(r)},completeFormSave:function(r){this.base.restoreSelection(),this.execAction(this.action,r),this.base.checkSelection()},ensureEncodedUri:function(r){return r===decodeURI(r)?encodeURI(r):r},ensureEncodedUriComponent:function(r){return r===decodeURIComponent(r)?encodeURIComponent(r):r},ensureEncodedParam:function(r){var i=r.split("="),o=i[0],a=i[1];return o+(a===void 0?"":"="+this.ensureEncodedUriComponent(a))},ensureEncodedQuery:function(r){return r.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(r){var i=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,o=i.test(r),a="",s=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,l=r.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),u=l[1],c=l[2],d=l[3];if(s.test(r))return"tel:"+r;if(!o){var f=u.split("/")[0];(f.match(/.+(\.|:).+/)||f==="localhost")&&(a="http://")}return a+this.ensureEncodedUri(u)+(c===void 0?"":"?"+this.ensureEncodedQuery(c))+(d===void 0?"":"#"+d)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(r){var i=r.querySelector(".medium-editor-toolbar-close"),o=r.querySelector(".medium-editor-toolbar-save"),a=r.querySelector(".medium-editor-toolbar-input");this.on(r,"click",this.handleFormClick.bind(this)),this.on(a,"keyup",this.handleTextboxKeyup.bind(this)),this.on(i,"click",this.handleCloseClick.bind(this)),this.on(o,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var r=this.document,i=r.createElement("div");return i.className="medium-editor-toolbar-form",i.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),i.innerHTML=this.getTemplate(),this.attachFormEvents(i),i},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(r){if(r.keyCode===e.util.keyCode.ENTER){r.preventDefault(),this.doFormSave();return}r.keyCode===e.util.keyCode.ESCAPE&&(r.preventDefault(),this.doFormCancel())},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.anchor=n}(),function(){var n=e.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var r=this.document.createElement("div");return r.id="medium-editor-anchor-preview-"+this.getEditorId(),r.className="medium-editor-anchor-preview",r.innerHTML=this.getTemplate(),this.on(r,"click",this.handleClick.bind(this)),r},getTemplate:function(){return'<div class="medium-editor-toolbar-anchor-preview" id="medium-editor-toolbar-anchor-preview"> <a class="medium-editor-toolbar-anchor-preview-inner"></a></div>'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(r){return this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||r.getAttribute("data-disable-preview")?!0:(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=r.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=r.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=r,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(r){r=r||this.activeAnchor;var i=this.window.innerWidth,o=this.anchorPreview.offsetHeight,a=r.getBoundingClientRect(),s=this.diffLeft,l=this.diffTop,u=this.getEditorOption("elementsContainer"),c=["absolute","fixed"].indexOf(window.getComputedStyle(u).getPropertyValue("position"))>-1,d={},f,h,g,m,y;f=this.anchorPreview.offsetWidth/2;var b=this.base.getExtensionByName("toolbar");b&&(s=b.diffLeft,l=b.diffTop),h=s-f,c?(m=u.getBoundingClientRect(),["top","left"].forEach(function(w){d[w]=a[w]-m[w]}),d.width=a.width,d.height=a.height,a=d,i=m.width,y=u.scrollTop):y=this.window.pageYOffset,g=a.left+a.width/2,y+=o+a.top+a.height-l-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(y)+"px",this.anchorPreview.style.right="initial",g<f?(this.anchorPreview.style.left=h+f+"px",this.anchorPreview.style.right="initial"):i-g<f?(this.anchorPreview.style.left="auto",this.anchorPreview.style.right=0):(this.anchorPreview.style.left=h+g+"px",this.anchorPreview.style.right="initial")},attachToEditables:function(){this.subscribe("editableMouseover",this.handleEditableMouseover.bind(this)),this.subscribe("positionedToolbar",this.handlePositionedToolbar.bind(this))},handlePositionedToolbar:function(){this.showWhenToolbarIsVisible||this.hidePreview()},handleClick:function(r){var i=this.base.getExtensionByName("anchor"),o=this.activeAnchor;i&&o&&(r.preventDefault(),this.base.selectElement(this.activeAnchor),this.base.delay(function(){if(o){var a={value:o.attributes.href.value,target:o.getAttribute("target"),buttonClass:o.getAttribute("class")};i.showForm(a),o=null}}.bind(this))),this.hidePreview()},handleAnchorMouseout:function(){this.anchorToPreview=null,this.off(this.activeAnchor,"mouseout",this.instanceHandleAnchorMouseout),this.instanceHandleAnchorMouseout=null},handleEditableMouseover:function(r){var i=e.util.getClosestTag(r.target,"a");if(i!==!1){if(!this.showOnEmptyLinks&&(!/href=["']\S+["']/.test(i.outerHTML)||/href=["']#\S+["']/.test(i.outerHTML)))return!0;var o=this.base.getExtensionByName("toolbar");if(!this.showWhenToolbarIsVisible&&o&&o.isDisplayed&&o.isDisplayed())return!0;this.activeAnchor&&this.activeAnchor!==i&&this.detachPreviewHandlers(),this.anchorToPreview=i,this.instanceHandleAnchorMouseout=this.handleAnchorMouseout.bind(this),this.on(this.anchorToPreview,"mouseout",this.instanceHandleAnchorMouseout),this.base.delay(function(){this.anchorToPreview&&this.showPreview(this.anchorToPreview)}.bind(this))}},handlePreviewMouseover:function(){this.lastOver=new Date().getTime(),this.hovering=!0},handlePreviewMouseout:function(r){(!r.relatedTarget||!/anchor-preview/.test(r.relatedTarget.className))&&(this.hovering=!1)},updatePreview:function(){if(this.hovering)return!0;var r=new Date().getTime()-this.lastOver;r>this.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=new Date().getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});e.extensions.anchorPreview=n}(),function(){var n,r,i,o,a;n=[" "," ",`
- `,"\r","\xA0","\u2000","\u2001","\u2002","\u2003","\u2028","\u2029"],r="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",i="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+r+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?\xAB\xBB\u201C\u201D\u2018\u2019])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+r+"))",o=new RegExp("^("+r+")$","i"),a=new RegExp(i,"gi");function s(u){return!e.util.getClosestTag(u,"a")}var l=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var u=0,c=0;c<this.window._mediumEditors.length;c++){var d=this.window._mediumEditors[c];d!==null&&d.getExtensionByName("autoLink")!==void 0&&u++}return u===1},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.isLastInstance()&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(u,c){this.performLinking(c)},onKeypress:function(u){this.disableEventHandling||e.util.isKey(u,[e.util.keyCode.SPACE,e.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout(function(){try{var c=this.base.exportSelection();this.performLinking(u.target)&&this.base.importSelection(c,!0)}catch(d){window.console&&window.console.error("Failed to perform linking",d),this.disableEventHandling=!0}}.bind(this),0))},performLinking:function(u){var c=e.util.splitByBlockElements(u),d=!1;c.length===0&&(c=[u]);for(var f=0;f<c.length;f++)d=this.removeObsoleteAutoLinkSpans(c[f])||d,d=this.performLinkingWithinElement(c[f])||d;return this.base.events.updateInput(u,{target:u,currentTarget:u}),d},removeObsoleteAutoLinkSpans:function(u){if(!u||u.nodeType===3)return!1;for(var c=u.querySelectorAll('span[data-auto-link="true"]'),d=!1,f=0;f<c.length;f++){var h=c[f].textContent;if(h.indexOf("://")===-1&&(h=e.util.ensureUrlHasProtocol(h)),c[f].getAttribute("data-href")!==h&&s(c[f])){d=!0;var g=h.replace(/\s+$/,"");if(c[f].getAttribute("data-href")===g){var m=h.length-g.length,y=e.util.splitOffDOMTree(c[f],this.splitTextBeforeEnd(c[f],m));c[f].parentNode.insertBefore(y,c[f].nextSibling)}else e.util.unwrap(c[f],this.document)}}return d},splitTextBeforeEnd:function(u,c){for(var d=this.document.createTreeWalker(u,NodeFilter.SHOW_TEXT,null,!1),f=!0;f;)f=d.lastChild()!==null;for(var h,g,m;c>0&&m!==null;)h=d.currentNode,g=h.nodeValue,g.length>c?(m=h.splitText(g.length-c),c=0):(m=d.previousNode(),c-=g.length);return m},performLinkingWithinElement:function(u){for(var c=this.findLinkableText(u),d=!1,f=0;f<c.length;f++){var h=e.util.findOrCreateMatchingTextNodes(this.document,u,c[f]);this.shouldNotLink(h)||this.createAutoLink(h,c[f].href)}return d},shouldNotLink:function(u){for(var c=!1,d=0;d<u.length&&c===!1;d++)c=!!e.util.traverseUp(u[d],function(f){return f.nodeName.toLowerCase()==="a"||f.getAttribute&&f.getAttribute("data-auto-link")==="true"});return c},findLinkableText:function(u){for(var c=u.textContent,d=null,f=[];(d=a.exec(c))!==null;){var h=!0,g=d.index+d[0].length;h=(d.index===0||n.indexOf(c[d.index-1])!==-1)&&(g===c.length||n.indexOf(c[g])!==-1),h=h&&(d[0].indexOf("/")!==-1||o.test(d[0].split(".").pop().split("?").shift())),h&&f.push({href:d[0],start:d.index,end:g})}return f},createAutoLink:function(u,c){c=e.util.ensureUrlHasProtocol(c);var d=e.util.createLink(this.document,u,c,this.getEditorOption("targetBlank")?"_blank":null),f=this.document.createElement("span");for(f.setAttribute("data-auto-link","true"),f.setAttribute("data-href",c),d.insertBefore(f,d.firstChild);d.childNodes.length>1;)f.appendChild(d.childNodes[1])}});e.extensions.autoLink=l}(),function(){var n="medium-editor-dragover";function r(o){var a=e.util.getContainerEditorElement(o),s=Array.prototype.slice.call(a.parentElement.querySelectorAll("."+n));s.forEach(function(l){l.classList.remove(n)})}var i=e.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(o){o.preventDefault(),o.dataTransfer.dropEffect="copy";var a=o.target.classList?o.target:o.target.parentElement;r(a),o.type==="dragover"&&a.classList.add(n)},handleDrop:function(o){o.preventDefault(),o.stopPropagation(),this.base.selectElement(o.target);var a=this.base.exportSelection();a.start=a.end,this.base.importSelection(a),o.dataTransfer.files&&Array.prototype.slice.call(o.dataTransfer.files).forEach(function(s){this.isAllowedFile(s)&&s.type.match("image")&&this.insertImageFile(s)},this),r(o.target)},isAllowedFile:function(o){return this.allowedTypes.some(function(a){return!!o.type.match(a)})},insertImageFile:function(o){if(typeof FileReader=="function"){var a=new FileReader;a.readAsDataURL(o),a.addEventListener("load",function(s){var l=this.document.createElement("img");l.src=s.target.result,e.util.insertHTMLCommand(this.document,l.outerHTML)}.bind(this))}}});e.extensions.fileDragging=i}(),function(){var n=e.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(r){var i=r.key.charCodeAt(0);this.keys[i]||(this.keys[i]=[]),this.keys[i].push(r)},this)},handleKeydown:function(r){var i=e.util.getKeyCode(r);if(!!this.keys[i]){var o=e.util.isMetaCtrlKey(r),a=!!r.shiftKey,s=!!r.altKey;this.keys[i].forEach(function(l){l.meta===o&&l.shift===a&&(l.alt===s||l.alt===void 0)&&(r.preventDefault(),r.stopPropagation(),typeof l.command=="function"?l.command.apply(this):l.command!==!1&&this.execAction(l.command))},this)}}});e.extensions.keyboardCommands=n}(),function(){var n=e.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'<i class="fa fa-font"></i>',fonts:["","Arial","Verdana","Times New Roman"],init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(r){if(r.preventDefault(),r.stopPropagation(),!this.isDisplayed()){var i=this.document.queryCommandValue("fontName")+"";this.showForm(i)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return this.getForm().style.display==="block"},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(r){var i=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),i.value=r||"",i.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var r=this.document,i=r.createElement("div"),o=r.createElement("select"),a=r.createElement("a"),s=r.createElement("a"),l;i.className="medium-editor-toolbar-form",i.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(i,"click",this.handleFormClick.bind(this));for(var u=0;u<this.fonts.length;u++)l=r.createElement("option"),l.innerHTML=this.fonts[u],l.value=this.fonts[u],o.appendChild(l);return o.className="medium-editor-toolbar-select",i.appendChild(o),this.on(o,"change",this.handleFontChange.bind(this)),s.setAttribute("href","#"),s.className="medium-editor-toobar-save",s.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-check"></i>':"✓",i.appendChild(s),this.on(s,"click",this.handleSaveClick.bind(this),!0),a.setAttribute("href","#"),a.className="medium-editor-toobar-close",a.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-times"></i>':"×",i.appendChild(a),this.on(a,"click",this.handleCloseClick.bind(this)),i},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){e.selection.getSelectedElements(this.document).forEach(function(r){r.nodeName.toLowerCase()==="font"&&r.hasAttribute("face")&&r.removeAttribute("face")})},handleFontChange:function(){var r=this.getSelect().value;r===""?this.clearFontName():this.execAction("fontName",{value:r})},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.fontName=n}(),function(){var n=e.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'<i class="fa fa-text-height"></i>',init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(r){if(r.preventDefault(),r.stopPropagation(),!this.isDisplayed()){var i=this.document.queryCommandValue("fontSize")+"";this.showForm(i)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return this.getForm().style.display==="block"},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(r){var i=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),i.value=r||"",i.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var r=this.document,i=r.createElement("div"),o=r.createElement("input"),a=r.createElement("a"),s=r.createElement("a");return i.className="medium-editor-toolbar-form",i.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(i,"click",this.handleFormClick.bind(this)),o.setAttribute("type","range"),o.setAttribute("min","1"),o.setAttribute("max","7"),o.className="medium-editor-toolbar-input",i.appendChild(o),this.on(o,"change",this.handleSliderChange.bind(this)),s.setAttribute("href","#"),s.className="medium-editor-toobar-save",s.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-check"></i>':"✓",i.appendChild(s),this.on(s,"click",this.handleSaveClick.bind(this),!0),a.setAttribute("href","#"),a.className="medium-editor-toobar-close",a.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-times"></i>':"×",i.appendChild(a),this.on(a,"click",this.handleCloseClick.bind(this)),i},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){e.selection.getSelectedElements(this.document).forEach(function(r){r.nodeName.toLowerCase()==="font"&&r.hasAttribute("size")&&r.removeAttribute("size")})},handleSliderChange:function(){var r=this.getInput().value;r==="4"?this.clearFontSize():this.execAction("fontSize",{value:r})},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.fontSize=n}(),function(){var n="%ME_PASTEBIN%",r=null,i=null,o=function(u){u.stopPropagation()};function a(){return[[new RegExp(/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/<!--StartFragment-->|<!--EndFragment-->/g),""],[new RegExp(/<br>$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(<br[^>]*>)?$/gi),""],[new RegExp(/<span class="Apple-converted-space">\s+<\/span>/g)," "],[new RegExp(/<br class="Apple-interchange-newline">/g),"<br>"],[new RegExp(/<span[^>]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),'<span class="replace-with italic bold">'],[new RegExp(/<span[^>]*font-style:italic[^>]*>/gi),'<span class="replace-with italic">'],[new RegExp(/<span[^>]*font-weight:(bold|700)[^>]*>/gi),'<span class="replace-with bold">'],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),'<a href="$1">'],[new RegExp(/<\/p>\n+/gi),"</p>"],[new RegExp(/\n+<p/gi),"<p"],[new RegExp(/<\/?o:[a-z]*>/gi),""],[new RegExp(/<!\[if !supportLists\]>(((?!<!).)*)<!\[endif]\>/gi),"$1"]]}function s(u,c,d){var f=u.clipboardData||c.clipboardData||d.dataTransfer,h={};if(!f)return h;if(f.getData){var g=f.getData("Text");g&&g.length>0&&(h["text/plain"]=g)}if(f.types)for(var m=0;m<f.types.length;m++){var y=f.types[m];h[y]=f.getData(y)}return h}var l=e.Extension.extend({forcePlainText:!0,cleanPastedHTML:!1,preCleanReplacements:[],cleanReplacements:[],cleanAttrs:["class","style","dir"],cleanTags:["meta"],unwrapTags:[],init:function(){e.Extension.prototype.init.apply(this,arguments),(this.forcePlainText||this.cleanPastedHTML)&&(this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.getEditorElements().forEach(function(u){this.on(u,"paste",this.handlePaste.bind(this))},this),this.subscribe("addElement",this.handleAddElement.bind(this)))},handleAddElement:function(u,c){this.on(c,"paste",this.handlePaste.bind(this))},destroy:function(){(this.forcePlainText||this.cleanPastedHTML)&&this.removePasteBin()},handlePaste:function(u,c){if(!u.defaultPrevented){var d=s(u,this.window,this.document),f=d["text/html"],h=d["text/plain"];this.window.clipboardData&&u.clipboardData===void 0&&!f&&(f=h),(f||h)&&(u.preventDefault(),this.doPaste(f,h,c))}},doPaste:function(u,c,d){var f,h="",g;if(this.cleanPastedHTML&&u)return this.cleanPaste(u);if(!!c){if(this.getEditorOption("disableReturn")||d&&d.getAttribute("data-disable-return"))h=e.util.htmlEntities(c);else if(f=c.split(/[\r\n]+/g),f.length>1)for(g=0;g<f.length;g+=1)f[g]!==""&&(h+="<p>"+e.util.htmlEntities(f[g])+"</p>");else h=e.util.htmlEntities(f[0]);e.util.insertHTMLCommand(this.document,h)}},handlePasteBinPaste:function(u){if(u.defaultPrevented){this.removePasteBin();return}var c=s(u,this.window,this.document),d=c["text/html"],f=c["text/plain"],h=i;if(!this.cleanPastedHTML||d){u.preventDefault(),this.removePasteBin(),this.doPaste(d,f,h),this.trigger("editablePaste",{currentTarget:h,target:h},h);return}setTimeout(function(){this.cleanPastedHTML&&(d=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(d,f,h),this.trigger("editablePaste",{currentTarget:h,target:h},h)}.bind(this),0)},handleKeydown:function(u,c){!(e.util.isKey(u,e.util.keyCode.V)&&e.util.isMetaCtrlKey(u))||(u.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(c))},createPasteBin:function(u){var c,d=e.selection.getSelectionRange(this.document),f=this.window.pageYOffset;i=u,d&&(c=d.getClientRects(),c.length?f+=c[0].top:d.startContainer.getBoundingClientRect!==void 0?f+=d.startContainer.getBoundingClientRect().top:f+=d.getBoundingClientRect().top),r=d;var h=this.document.createElement("div");h.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),h.setAttribute("style","border: 1px red solid; position: absolute; top: "+f+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),h.setAttribute("contentEditable",!0),h.innerHTML=n,this.document.body.appendChild(h),this.on(h,"focus",o),this.on(h,"focusin",o),this.on(h,"focusout",o),h.focus(),e.selection.selectNode(h,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(h,"paste",this.boundHandlePaste)},removePasteBin:function(){r!==null&&(e.selection.selectRange(this.document,r),r=null),i!==null&&(i=null);var u=this.getPasteBin();!u||u&&(this.off(u,"focus",o),this.off(u,"focusin",o),this.off(u,"focusout",o),this.off(u,"paste",this.boundHandlePaste),u.parentElement.removeChild(u))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var u=this.getPasteBin();if(!u||u.firstChild&&u.firstChild.id==="mcepastebin")return!1;var c=u.innerHTML;return!c||c===n?!1:c},cleanPaste:function(u){var c,d,f,h,g=/<p|<br|<div/.test(u),m=[].concat(this.preCleanReplacements||[],a(),this.cleanReplacements||[]);for(c=0;c<m.length;c+=1)u=u.replace(m[c][0],m[c][1]);if(!g)return this.pasteHTML(u);for(f=this.document.createElement("div"),f.innerHTML="<p>"+u.split("<br><br>").join("</p><p>")+"</p>",d=f.querySelectorAll("a,p,div,br"),c=0;c<d.length;c+=1)switch(h=d[c],h.innerHTML=h.innerHTML.replace(/\n/gi," "),h.nodeName.toLowerCase()){case"p":case"div":this.filterCommonBlocks(h);break;case"br":this.filterLineBreak(h);break}this.pasteHTML(f.innerHTML)},pasteHTML:function(u,c){c=e.util.defaults({},c,{cleanAttrs:this.cleanAttrs,cleanTags:this.cleanTags,unwrapTags:this.unwrapTags});var d,f,h,g,m=this.document.createDocumentFragment();for(m.appendChild(this.document.createElement("body")),g=m.querySelector("body"),g.innerHTML=u,this.cleanupSpans(g),d=g.querySelectorAll("*"),h=0;h<d.length;h+=1)f=d[h],f.nodeName.toLowerCase()==="a"&&this.getEditorOption("targetBlank")&&e.util.setTargetBlank(f),e.util.cleanupAttrs(f,c.cleanAttrs),e.util.cleanupTags(f,c.cleanTags),e.util.unwrapTags(f,c.unwrapTags);e.util.insertHTMLCommand(this.document,g.innerHTML.replace(/ /g," "))},isCommonBlock:function(u){return u&&(u.nodeName.toLowerCase()==="p"||u.nodeName.toLowerCase()==="div")},filterCommonBlocks:function(u){/^\s*$/.test(u.textContent)&&u.parentNode&&u.parentNode.removeChild(u)},filterLineBreak:function(u){this.isCommonBlock(u.previousElementSibling)?this.removeWithParent(u):this.isCommonBlock(u.parentNode)&&(u.parentNode.firstChild===u||u.parentNode.lastChild===u)?this.removeWithParent(u):u.parentNode&&u.parentNode.childElementCount===1&&u.parentNode.textContent===""&&this.removeWithParent(u)},removeWithParent:function(u){u&&u.parentNode&&(u.parentNode.parentNode&&u.parentNode.childElementCount===1?u.parentNode.parentNode.removeChild(u.parentNode):u.parentNode.removeChild(u))},cleanupSpans:function(u){var c,d,f,h=u.querySelectorAll(".replace-with"),g=function(m){return m&&m.nodeName!=="#text"&&m.getAttribute("contenteditable")==="false"};for(c=0;c<h.length;c+=1)d=h[c],f=this.document.createElement(d.classList.contains("bold")?"b":"i"),d.classList.contains("bold")&&d.classList.contains("italic")?f.innerHTML="<i>"+d.innerHTML+"</i>":f.innerHTML=d.innerHTML,d.parentNode.replaceChild(f,d);for(h=u.querySelectorAll("span"),c=0;c<h.length;c+=1){if(d=h[c],e.util.traverseUp(d,g))return!1;e.util.unwrap(d,this.document)}}});e.extensions.paste=l}(),function(){var n=e.Extension.extend({name:"placeholder",text:"Type your text",hideOnClick:!0,init:function(){e.Extension.prototype.init.apply(this,arguments),this.initPlaceholders(),this.attachEventHandlers()},initPlaceholders:function(){this.getEditorElements().forEach(this.initElement,this)},handleAddElement:function(r,i){this.initElement(i)},initElement:function(r){r.getAttribute("data-placeholder")||r.setAttribute("data-placeholder",this.text),this.updatePlaceholder(r)},destroy:function(){this.getEditorElements().forEach(this.cleanupElement,this)},handleRemoveElement:function(r,i){this.cleanupElement(i)},cleanupElement:function(r){r.getAttribute("data-placeholder")===this.text&&r.removeAttribute("data-placeholder")},showPlaceholder:function(r){r&&(e.util.isFF&&r.childNodes.length===0?(r.classList.add("medium-editor-placeholder-relative"),r.classList.remove("medium-editor-placeholder")):(r.classList.add("medium-editor-placeholder"),r.classList.remove("medium-editor-placeholder-relative")))},hidePlaceholder:function(r){r&&(r.classList.remove("medium-editor-placeholder"),r.classList.remove("medium-editor-placeholder-relative"))},updatePlaceholder:function(r,i){if(r.querySelector("img, blockquote, ul, ol, table")||r.textContent.replace(/^\s+|\s+$/g,"")!=="")return this.hidePlaceholder(r);i||this.showPlaceholder(r)},attachEventHandlers:function(){this.hideOnClick&&this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableInput",this.handleInput.bind(this)),this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("addElement",this.handleAddElement.bind(this)),this.subscribe("removeElement",this.handleRemoveElement.bind(this))},handleInput:function(r,i){var o=this.hideOnClick&&i===this.base.getFocusedElement();this.updatePlaceholder(i,o)},handleFocus:function(r,i){this.hidePlaceholder(i)},handleBlur:function(r,i){this.updatePlaceholder(i)}});e.extensions.placeholder=n}(),function(){var n=e.Extension.extend({name:"toolbar",align:"center",allowMultiParagraphSelection:!0,buttons:["bold","italic","underline","anchor","h2","h3","quote"],diffLeft:0,diffTop:-10,firstButtonClass:"medium-editor-button-first",lastButtonClass:"medium-editor-button-last",standardizeSelectionStart:!1,static:!1,sticky:!1,stickyTopOffset:0,updateOnEmptySelection:!1,relativeContainer:null,init:function(){e.Extension.prototype.init.apply(this,arguments),this.initThrottledMethods(),this.relativeContainer?this.relativeContainer.appendChild(this.getToolbarElement()):this.getEditorOption("elementsContainer").appendChild(this.getToolbarElement())},forEachExtension:function(r,i){return this.base.extensions.forEach(function(o){if(o!==this)return r.apply(i||this,arguments)},this)},createToolbar:function(){var r=this.document.createElement("div");return r.id="medium-editor-toolbar-"+this.getEditorId(),r.className="medium-editor-toolbar",this.static?r.className+=" static-toolbar":this.relativeContainer?r.className+=" medium-editor-relative-toolbar":r.className+=" medium-editor-stalker-toolbar",r.appendChild(this.createToolbarButtons()),this.forEachExtension(function(i){i.hasForm&&r.appendChild(i.getForm())}),this.attachEventHandlers(),r},createToolbarButtons:function(){var r=this.document.createElement("ul"),i,o,a,s,l,u;return r.id="medium-editor-toolbar-actions"+this.getEditorId(),r.className="medium-editor-toolbar-actions",r.style.display="block",this.buttons.forEach(function(c){typeof c=="string"?(l=c,u=null):(l=c.name,u=c),s=this.base.addBuiltInExtension(l,u),s&&typeof s.getButton=="function"&&(o=s.getButton(this.base),i=this.document.createElement("li"),e.util.isElement(o)?i.appendChild(o):i.innerHTML=o,r.appendChild(i))},this),a=r.querySelectorAll("button"),a.length>0&&(a[0].classList.add(this.firstButtonClass),a[a.length-1].classList.add(this.lastButtonClass)),r},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=e.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(r){if(r&&r.target&&e.util.isDescendant(this.getToolbarElement(),r.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return this.getToolbarActionsElement().style.display==="block"},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(r){r.hasForm&&r.isDisplayed()&&r.hideForm()})},multipleBlockElementsSelected:function(){var r=/<[^\/>][^>]*><\/[^>]+>/gim,i=new RegExp("<("+e.util.blockContainerElementNames.join("|")+")[^>]*>","g"),o=e.selection.getSelectionHtml(this.document).replace(r,""),a=o.match(i);return!!a&&a.length>1},modifySelection:function(){var r=this.window.getSelection(),i=r.getRangeAt(0);if(this.standardizeSelectionStart&&i.startContainer.nodeValue&&i.startOffset===i.startContainer.nodeValue.length){var o=e.util.findAdjacentTextNodeWithContent(e.selection.getSelectionElement(this.window),i.startContainer,this.document);if(o){for(var a=0;o.nodeValue.substr(a,1).trim().length===0;)a=a+1;i=e.selection.select(this.document,o,a,i.endContainer,i.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||e.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var r=e.selection.getSelectionElement(this.window);if(!r||this.getEditorElements().indexOf(r)===-1||r.getAttribute("data-disable-toolbar"))return this.hideToolbar();if(this.updateOnEmptySelection&&this.static)return this.showAndUpdateToolbar();if(!e.selection.selectionContainsContent(this.document)||this.allowMultiParagraphSelection===!1&&this.multipleBlockElementsSelected())return this.hideToolbar();this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(r){typeof r.isActive=="function"&&typeof r.setInactive=="function"&&r.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var r=[],i=null,o=e.selection.getSelectionRange(this.document),a,s=function(l){typeof l.checkState=="function"?l.checkState(a):typeof l.isActive=="function"&&typeof l.isAlreadyApplied=="function"&&typeof l.setActive=="function"&&!l.isActive()&&l.isAlreadyApplied(a)&&l.setActive()};if(!!o&&(this.forEachExtension(function(l){if(typeof l.queryCommandState=="function"&&(i=l.queryCommandState(),i!==null)){i&&typeof l.setActive=="function"&&l.setActive();return}r.push(l)}),a=e.selection.getSelectedParentElement(o),!!this.getEditorElements().some(function(l){return e.util.isDescendant(l,a,!0)})))for(;a&&(r.forEach(s),!e.util.isMediumEditorElement(a));)a=a.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var r=this.base.getFocusedElement(),i=this.window.getSelection();if(!r)return this;(this.static||!i.isCollapsed)&&(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(r):this.positionToolbar(i)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(r){this.getToolbarElement().style.left="0";var i=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,o=this.window.innerWidth,a=this.getToolbarElement(),s=r.getBoundingClientRect(),l=s.top+i,u=s.left+s.width/2,c=a.offsetHeight,d=a.offsetWidth,f=d/2,h;switch(this.sticky?i>l+r.offsetHeight-c-this.stickyTopOffset?(a.style.top=l+r.offsetHeight-c+"px",a.classList.remove("medium-editor-sticky-toolbar")):i>l-c-this.stickyTopOffset?(a.classList.add("medium-editor-sticky-toolbar"),a.style.top=this.stickyTopOffset+"px"):(a.classList.remove("medium-editor-sticky-toolbar"),a.style.top=l-c+"px"):a.style.top=l-c+"px",this.align){case"left":h=s.left;break;case"right":h=s.right-d;break;case"center":h=u-f;break}h<0?h=0:h+d>o&&(h=o-Math.ceil(d)-1),a.style.left=h+"px"},positionToolbar:function(r){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var i=r.getRangeAt(0),o=i.getBoundingClientRect();(!o||o.height===0&&o.width===0&&i.startContainer===i.endContainer)&&(i.startContainer.nodeType===1&&i.startContainer.querySelector("img")?o=i.startContainer.querySelector("img").getBoundingClientRect():o=i.startContainer.getBoundingClientRect());var a=this.window.innerWidth,s=this.getToolbarElement(),l=s.offsetHeight,u=s.offsetWidth,c=u/2,d=50,f=this.diffLeft-c,h=this.getEditorOption("elementsContainer"),g=["absolute","fixed"].indexOf(window.getComputedStyle(h).getPropertyValue("position"))>-1,m={},y={},b,w;g?(w=h.getBoundingClientRect(),["top","left"].forEach(function(O){y[O]=o[O]-w[O]}),y.width=o.width,y.height=o.height,o=y,a=w.width,m.top=h.scrollTop):m.top=this.window.pageYOffset,b=o.left+o.width/2,m.top+=o.top-l,o.top<d?(s.classList.add("medium-toolbar-arrow-over"),s.classList.remove("medium-toolbar-arrow-under"),m.top+=d+o.height-this.diffTop):(s.classList.add("medium-toolbar-arrow-under"),s.classList.remove("medium-toolbar-arrow-over"),m.top+=this.diffTop),b<c?(m.left=f+c,m.right="initial"):a-b<c?(m.left="auto",m.right=0):(m.left=f+b,m.right="initial"),["top","left","right"].forEach(function(O){s.style[O]=m[O]+(isNaN(m[O])?"":"px")})}});e.extensions.toolbar=n}(),function(){var n=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(r){var i="medium-editor-dragover";r.preventDefault(),r.dataTransfer.dropEffect="copy",r.type==="dragover"?r.target.classList.add(i):r.type==="dragleave"&&r.target.classList.remove(i)},handleDrop:function(r){var i="medium-editor-dragover",o;r.preventDefault(),r.stopPropagation(),r.dataTransfer.files&&(o=Array.prototype.slice.call(r.dataTransfer.files,0),o.some(function(a){if(a.type.match("image")){var s,l;s=new FileReader,s.readAsDataURL(a),l="medium-img-"+ +new Date,e.util.insertHTMLCommand(this.document,'<img class="medium-editor-image-loading" id="'+l+'" />'),s.onload=function(){var u=this.document.getElementById(l);u&&(u.removeAttribute("id"),u.removeAttribute("class"),u.src=s.result)}.bind(this)}}.bind(this))),r.target.classList.remove(i)}});e.extensions.imageDragging=n}(),function(){function n(N){var z=e.selection.getSelectionStart(this.options.ownerDocument),I=z.textContent,L=e.selection.getCaretOffsets(z);(I[L.left-1]===void 0||I[L.left-1].trim()===""||I[L.left]!==void 0&&I[L.left].trim()==="")&&N.preventDefault()}function r(N,z){if(this.options.disableReturn||z.getAttribute("data-disable-return"))N.preventDefault();else if(this.options.disableDoubleReturn||z.getAttribute("data-disable-double-return")){var I=e.selection.getSelectionStart(this.options.ownerDocument);(I&&I.textContent.trim()===""&&I.nodeName.toLowerCase()!=="li"||I.previousElementSibling&&I.previousElementSibling.nodeName.toLowerCase()!=="br"&&I.previousElementSibling.textContent.trim()==="")&&N.preventDefault()}}function i(N){var z=e.selection.getSelectionStart(this.options.ownerDocument),I=z&&z.nodeName.toLowerCase();I==="pre"&&(N.preventDefault(),e.util.insertHTMLCommand(this.options.ownerDocument," ")),e.util.isListItem(z)&&(N.preventDefault(),N.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function o(N){var z,I=e.selection.getSelectionStart(this.options.ownerDocument),L=I.nodeName.toLowerCase(),X=/^(\s+|<br\/?>)?$/i,Q=/h\d/i;e.util.isKey(N,[e.util.keyCode.BACKSPACE,e.util.keyCode.ENTER])&&I.previousElementSibling&&Q.test(L)&&e.selection.getCaretOffsets(I).left===0?e.util.isKey(N,e.util.keyCode.BACKSPACE)&&X.test(I.previousElementSibling.innerHTML)?(I.previousElementSibling.parentNode.removeChild(I.previousElementSibling),N.preventDefault()):!this.options.disableDoubleReturn&&e.util.isKey(N,e.util.keyCode.ENTER)&&(z=this.options.ownerDocument.createElement("p"),z.innerHTML="<br>",I.previousElementSibling.parentNode.insertBefore(z,I),N.preventDefault()):e.util.isKey(N,e.util.keyCode.DELETE)&&I.nextElementSibling&&I.previousElementSibling&&!Q.test(L)&&X.test(I.innerHTML)&&Q.test(I.nextElementSibling.nodeName.toLowerCase())?(e.selection.moveCursor(this.options.ownerDocument,I.nextElementSibling),I.previousElementSibling.parentNode.removeChild(I),N.preventDefault()):e.util.isKey(N,e.util.keyCode.BACKSPACE)&&L==="li"&&X.test(I.innerHTML)&&!I.previousElementSibling&&!I.parentElement.previousElementSibling&&I.nextElementSibling&&I.nextElementSibling.nodeName.toLowerCase()==="li"?(z=this.options.ownerDocument.createElement("p"),z.innerHTML="<br>",I.parentElement.parentElement.insertBefore(z,I.parentElement),e.selection.moveCursor(this.options.ownerDocument,z),I.parentElement.removeChild(I),N.preventDefault()):e.util.isKey(N,e.util.keyCode.BACKSPACE)&&e.util.getClosestTag(I,"blockquote")!==!1&&e.selection.getCaretOffsets(I).left===0?(N.preventDefault(),e.util.execFormatBlock(this.options.ownerDocument,"p")):e.util.isKey(N,e.util.keyCode.ENTER)&&e.util.getClosestTag(I,"blockquote")!==!1&&e.selection.getCaretOffsets(I).right===0?(z=this.options.ownerDocument.createElement("p"),z.innerHTML="<br>",I.parentElement.insertBefore(z,I.nextSibling),e.selection.moveCursor(this.options.ownerDocument,z),N.preventDefault()):e.util.isKey(N,e.util.keyCode.BACKSPACE)&&e.util.isMediumEditorElement(I.parentElement)&&!I.previousElementSibling&&I.nextElementSibling&&X.test(I.innerHTML)&&(N.preventDefault(),e.selection.moveCursor(this.options.ownerDocument,I.nextSibling),I.parentElement.removeChild(I))}function a(N){var z=e.selection.getSelectionStart(this.options.ownerDocument),I;!z||(e.util.isMediumEditorElement(z)&&z.children.length===0&&!e.util.isBlockContainer(z)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),e.util.isKey(N,e.util.keyCode.ENTER)&&!e.util.isListItem(z)&&!e.util.isBlockContainer(z)&&(I=z.nodeName.toLowerCase(),I==="a"?this.options.ownerDocument.execCommand("unlink",!1,null):!N.shiftKey&&!N.ctrlKey&&this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function s(N,z){var I=z.parentNode.querySelector('textarea[medium-editor-textarea-id="'+z.getAttribute("medium-editor-textarea-id")+'"]');I&&(I.value=z.innerHTML.trim())}function l(N){N._mediumEditors||(N._mediumEditors=[null]),this.id||(this.id=N._mediumEditors.length),N._mediumEditors[this.id]=this}function u(N){!N._mediumEditors||!N._mediumEditors[this.id]||(N._mediumEditors[this.id]=null)}function c(N,z,I){var L=[];if(N||(N=[]),typeof N=="string"&&(N=z.querySelectorAll(N)),e.util.isElement(N)&&(N=[N]),I)for(var X=0;X<N.length;X++){var Q=N[X];e.util.isElement(Q)&&!Q.getAttribute("data-medium-editor-element")&&!Q.getAttribute("medium-editor-textarea-id")&&L.push(Q)}else L=Array.prototype.slice.apply(N);return L}function d(N){var z=N.parentNode.querySelector('textarea[medium-editor-textarea-id="'+N.getAttribute("medium-editor-textarea-id")+'"]');z&&(z.classList.remove("medium-editor-hidden"),z.removeAttribute("medium-editor-textarea-id")),N.parentNode&&N.parentNode.removeChild(N)}function f(N,z){return Object.keys(z).forEach(function(I){N[I]===void 0&&(N[I]=z[I])}),N}function h(N,z,I){var L={window:I.options.contentWindow,document:I.options.ownerDocument,base:I};return N=f(N,L),typeof N.init=="function"&&N.init(),N.name||(N.name=z),N}function g(){return this.elements.every(function(N){return!!N.getAttribute("data-disable-toolbar")})?!1:this.options.toolbar!==!1}function m(){return g.call(this)?this.options.anchorPreview!==!1:!1}function y(){return this.options.placeholder!==!1}function b(){return this.options.autoLink!==!1}function w(){return this.options.imageDragging!==!1}function O(){return this.options.keyboardCommands!==!1}function x(){return!this.options.extensions.imageDragging}function S(N){for(var z=this.options.ownerDocument.createElement("div"),I=Date.now(),L="medium-editor-"+I,X=N.attributes;this.options.ownerDocument.getElementById(L);)I++,L="medium-editor-"+I;z.className=N.className,z.id=L,z.innerHTML=N.value,N.setAttribute("medium-editor-textarea-id",L);for(var Q=0,W=X.length;Q<W;Q++)z.hasAttribute(X[Q].nodeName)||z.setAttribute(X[Q].nodeName,X[Q].value);return N.form&&this.on(N.form,"reset",function(G){G.defaultPrevented||this.resetContent(this.options.ownerDocument.getElementById(L))}.bind(this)),N.classList.add("medium-editor-hidden"),N.parentNode.insertBefore(z,N),z}function C(N,z){if(!N.getAttribute("data-medium-editor-element")){N.nodeName.toLowerCase()==="textarea"&&(N=S.call(this,N),this.instanceHandleEditableInput||(this.instanceHandleEditableInput=s.bind(this),this.subscribe("editableInput",this.instanceHandleEditableInput))),!this.options.disableEditing&&!N.getAttribute("data-disable-editing")&&(N.setAttribute("contentEditable",!0),N.setAttribute("spellcheck",this.options.spellcheck)),this.instanceHandleEditableKeydownEnter||(N.getAttribute("data-disable-return")||N.getAttribute("data-disable-double-return"))&&(this.instanceHandleEditableKeydownEnter=r.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter)),!this.options.disableReturn&&!N.getAttribute("data-disable-return")&&this.on(N,"keyup",a.bind(this));var I=e.util.guid();N.setAttribute("data-medium-editor-element",!0),N.classList.add("medium-editor-element"),N.setAttribute("role","textbox"),N.setAttribute("aria-multiline",!0),N.setAttribute("data-medium-editor-editor-index",z),N.setAttribute("medium-editor-index",I),$[I]=N.innerHTML,this.events.attachAllEventsToElement(N)}return N}function E(){this.subscribe("editableKeydownTab",i.bind(this)),this.subscribe("editableKeydownDelete",o.bind(this)),this.subscribe("editableKeydownEnter",o.bind(this)),this.options.disableExtraSpaces&&this.subscribe("editableKeydownSpace",n.bind(this)),this.instanceHandleEditableKeydownEnter||(this.options.disableReturn||this.options.disableDoubleReturn)&&(this.instanceHandleEditableKeydownEnter=r.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter))}function T(){if(this.extensions=[],Object.keys(this.options.extensions).forEach(function(X){X!=="toolbar"&&this.options.extensions[X]&&this.extensions.push(h(this.options.extensions[X],X,this))},this),x.call(this)){var N=this.options.fileDragging;N||(N={},w.call(this)||(N.allowedTypes=[])),this.addBuiltInExtension("fileDragging",N)}var z={paste:!0,"anchor-preview":m.call(this),autoLink:b.call(this),keyboardCommands:O.call(this),placeholder:y.call(this)};Object.keys(z).forEach(function(X){z[X]&&this.addBuiltInExtension(X)},this);var I=this.options.extensions.toolbar;if(!I&&g.call(this)){var L=e.util.extend({},this.options.toolbar,{allowMultiParagraphSelection:this.options.allowMultiParagraphSelection});I=new e.extensions.toolbar(L)}I&&this.extensions.push(h(I,"toolbar",this))}function P(N,z){var I=[["allowMultiParagraphSelection","toolbar.allowMultiParagraphSelection"]];return z&&I.forEach(function(L){z.hasOwnProperty(L[0])&&z[L[0]]!==void 0&&e.util.deprecated(L[0],L[1],"v6.0.0")}),e.util.defaults({},z,N)}function A(N,z){var I=/^append-(.+)$/gi,L=/justify([A-Za-z]*)$/g,X,Q;if(X=I.exec(N),X)return e.util.execFormatBlock(this.options.ownerDocument,X[1]);if(N==="fontSize")return z.size&&e.util.deprecated(".size option for fontSize command",".value","6.0.0"),Q=z.value||z.size,this.options.ownerDocument.execCommand("fontSize",!1,Q);if(N==="fontName")return z.name&&e.util.deprecated(".name option for fontName command",".value","6.0.0"),Q=z.value||z.name,this.options.ownerDocument.execCommand("fontName",!1,Q);if(N==="createLink")return this.createLink(z);if(N==="image"){var W=this.options.contentWindow.getSelection().toString().trim();return this.options.ownerDocument.execCommand("insertImage",!1,W)}if(N==="html"){var G=this.options.contentWindow.getSelection().toString().trim();return e.util.insertHTMLCommand(this.options.ownerDocument,G)}if(L.exec(N)){var K=this.options.ownerDocument.execCommand(N,!1,null),oe=e.selection.getSelectedParentElement(e.selection.getSelectionRange(this.options.ownerDocument));return oe&&D.call(this,e.util.getTopBlockContainer(oe)),K}return Q=z&&z.value,this.options.ownerDocument.execCommand(N,!1,Q)}function D(N){if(!!N){var z,I=Array.prototype.slice.call(N.childNodes).filter(function(L){var X=L.nodeName.toLowerCase()==="div";return X&&!z&&(z=L.style.textAlign),X});I.length&&(this.saveSelection(),I.forEach(function(L){if(L.style.textAlign===z){var X=L.lastChild;if(X){e.util.unwrap(L,this.options.ownerDocument);var Q=this.options.ownerDocument.createElement("BR");X.parentNode.insertBefore(Q,X.nextSibling)}}},this),N.style.textAlign=z,this.restoreSelection())}}var $={};e.prototype={init:function(N,z){return this.options=P.call(this,this.defaults,z),this.origElements=N,this.options.elementsContainer||(this.options.elementsContainer=this.options.ownerDocument.body),this.setup()},setup:function(){this.isActive||(l.call(this,this.options.contentWindow),this.events=new e.Events(this),this.elements=[],this.addElements(this.origElements),this.elements.length!==0&&(this.isActive=!0,T.call(this),E.call(this)))},destroy:function(){!this.isActive||(this.isActive=!1,this.extensions.forEach(function(N){typeof N.destroy=="function"&&N.destroy()},this),this.events.destroy(),this.elements.forEach(function(N){this.options.spellcheck&&(N.innerHTML=N.innerHTML),N.removeAttribute("contentEditable"),N.removeAttribute("spellcheck"),N.removeAttribute("data-medium-editor-element"),N.classList.remove("medium-editor-element"),N.removeAttribute("role"),N.removeAttribute("aria-multiline"),N.removeAttribute("medium-editor-index"),N.removeAttribute("data-medium-editor-editor-index"),N.getAttribute("medium-editor-textarea-id")&&d(N)},this),this.elements=[],this.instanceHandleEditableKeydownEnter=null,this.instanceHandleEditableInput=null,u.call(this,this.options.contentWindow))},on:function(N,z,I,L){return this.events.attachDOMEvent(N,z,I,L),this},off:function(N,z,I,L){return this.events.detachDOMEvent(N,z,I,L),this},subscribe:function(N,z){return this.events.attachCustomEvent(N,z),this},unsubscribe:function(N,z){return this.events.detachCustomEvent(N,z),this},trigger:function(N,z,I){return this.events.triggerCustomEvent(N,z,I),this},delay:function(N){var z=this;return setTimeout(function(){z.isActive&&N()},this.options.delay)},serialize:function(){var N,z,I={},L=this.elements.length;for(N=0;N<L;N+=1)z=this.elements[N].id!==""?this.elements[N].id:"element-"+N,I[z]={value:this.elements[N].innerHTML.trim()};return I},getExtensionByName:function(N){var z;return this.extensions&&this.extensions.length&&this.extensions.some(function(I){return I.name===N?(z=I,!0):!1}),z},addBuiltInExtension:function(N,z){var I=this.getExtensionByName(N),L;if(I)return I;switch(N){case"anchor":L=e.util.extend({},this.options.anchor,z),I=new e.extensions.anchor(L);break;case"anchor-preview":I=new e.extensions.anchorPreview(this.options.anchorPreview);break;case"autoLink":I=new e.extensions.autoLink;break;case"fileDragging":I=new e.extensions.fileDragging(z);break;case"fontname":I=new e.extensions.fontName(this.options.fontName);break;case"fontsize":I=new e.extensions.fontSize(z);break;case"keyboardCommands":I=new e.extensions.keyboardCommands(this.options.keyboardCommands);break;case"paste":I=new e.extensions.paste(this.options.paste);break;case"placeholder":I=new e.extensions.placeholder(this.options.placeholder);break;default:e.extensions.button.isBuiltInButton(N)&&(z?(L=e.util.defaults({},z,e.extensions.button.prototype.defaults[N]),I=new e.extensions.button(L)):I=new e.extensions.button(N))}return I&&this.extensions.push(h(I,N,this)),I},stopSelectionUpdates:function(){this.preventSelectionUpdates=!0},startSelectionUpdates:function(){this.preventSelectionUpdates=!1},checkSelection:function(){var N=this.getExtensionByName("toolbar");return N&&N.checkState(),this},queryCommandState:function(N){var z=/^full-(.+)$/gi,I,L=null;I=z.exec(N),I&&(N=I[1]);try{L=this.options.ownerDocument.queryCommandState(N)}catch{L=null}return L},execAction:function(N,z){var I=/^full-(.+)$/gi,L,X;return L=I.exec(N),L?(this.saveSelection(),this.selectAllContents(),X=A.call(this,L[1],z),this.restoreSelection()):X=A.call(this,N,z),(N==="insertunorderedlist"||N==="insertorderedlist")&&e.util.cleanListDOM(this.options.ownerDocument,this.getSelectedParentElement()),this.checkSelection(),X},getSelectedParentElement:function(N){return N===void 0&&(N=this.options.contentWindow.getSelection().getRangeAt(0)),e.selection.getSelectedParentElement(N)},selectAllContents:function(){var N=e.selection.getSelectionElement(this.options.contentWindow);if(N){for(;N.children.length===1;)N=N.children[0];this.selectElement(N)}},selectElement:function(N){e.selection.selectNode(N,this.options.ownerDocument);var z=e.selection.getSelectionElement(this.options.contentWindow);z&&this.events.focusElement(z)},getFocusedElement:function(){var N;return this.elements.some(function(z){return!N&&z.getAttribute("data-medium-focused")&&(N=z),!!N},this),N},exportSelection:function(){var N=e.selection.getSelectionElement(this.options.contentWindow),z=this.elements.indexOf(N),I=null;return z>=0&&(I=e.selection.exportSelection(N,this.options.ownerDocument)),I!==null&&z!==0&&(I.editableElementIndex=z),I},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(N,z){if(!!N){var I=this.elements[N.editableElementIndex||0];e.selection.importSelection(N,I,this.options.ownerDocument,z)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(N){var z=e.selection.getSelectionElement(this.options.contentWindow),I={},L;if(this.elements.indexOf(z)!==-1){try{if(this.events.disableCustomEvent("editableInput"),N.url&&e.util.deprecated(".url option for createLink",".value","6.0.0"),L=N.url||N.value,L&&L.trim().length>0){var X=this.options.contentWindow.getSelection();if(X){var Q=X.getRangeAt(0),W=Q.commonAncestorContainer,G,K,oe,ne;if(Q.endContainer.nodeType===3&&Q.startContainer.nodeType!==3&&Q.startOffset===0&&Q.startContainer.firstChild===Q.endContainer&&(W=Q.endContainer),K=e.util.getClosestBlockContainer(Q.startContainer),oe=e.util.getClosestBlockContainer(Q.endContainer),W.nodeType!==3&&W.textContent.length!==0&&K===oe){var _e=K||z,Ce=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),G=this.exportSelection(),Ce.appendChild(_e.cloneNode(!0)),z===_e?e.selection.select(this.options.ownerDocument,_e.firstChild,0,_e.lastChild,_e.lastChild.nodeType===3?_e.lastChild.nodeValue.length:_e.lastChild.childNodes.length):e.selection.select(this.options.ownerDocument,_e,0,_e,_e.childNodes.length);var U=this.exportSelection();ne=e.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,Ce,{start:G.start-U.start,end:G.end-U.start,editableElementIndex:G.editableElementIndex}),ne.length===0&&(Ce=this.options.ownerDocument.createDocumentFragment(),Ce.appendChild(W.cloneNode(!0)),ne=[Ce.firstChild.firstChild,Ce.firstChild.lastChild]),e.util.createLink(this.options.ownerDocument,ne,L.trim());var ie=(Ce.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;e.util.insertHTMLCommand(this.options.ownerDocument,Ce.firstChild.innerHTML.replace(/^\s+/,"")),G.start-=ie,G.end-=ie,this.importSelection(G)}else this.options.ownerDocument.execCommand("createLink",!1,L);this.options.targetBlank||N.target==="_blank"?e.util.setTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),L):e.util.removeTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),L),N.buttonClass&&e.util.addClassToAnchors(e.selection.getSelectionStart(this.options.ownerDocument),N.buttonClass)}}if(this.options.targetBlank||N.target==="_blank"||N.buttonClass){I=this.options.ownerDocument.createEvent("HTMLEvents"),I.initEvent("input",!0,!0,this.options.contentWindow);for(var ee=0,he=this.elements.length;ee<he;ee+=1)this.elements[ee].dispatchEvent(I)}}finally{this.events.enableCustomEvent("editableInput")}this.events.triggerCustomEvent("editableInput",I,z)}},cleanPaste:function(N){this.getExtensionByName("paste").cleanPaste(N)},pasteHTML:function(N,z){this.getExtensionByName("paste").pasteHTML(N,z)},setContent:function(N,z){if(z=z||0,this.elements[z]){var I=this.elements[z];I.innerHTML=N,this.checkContentChanged(I)}},getContent:function(N){return N=N||0,this.elements[N]?this.elements[N].innerHTML.trim():null},checkContentChanged:function(N){N=N||e.selection.getSelectionElement(this.options.contentWindow),this.events.updateInput(N,{target:N,currentTarget:N})},resetContent:function(N){if(N){var z=this.elements.indexOf(N);z!==-1&&this.setContent($[N.getAttribute("medium-editor-index")],z);return}this.elements.forEach(function(I,L){this.setContent($[I.getAttribute("medium-editor-index")],L)},this)},addElements:function(N){var z=c(N,this.options.ownerDocument,!0);if(z.length===0)return!1;z.forEach(function(I){I=C.call(this,I,this.id),this.elements.push(I),this.trigger("addElement",{target:I,currentTarget:I},I)},this)},removeElements:function(N){var z=c(N,this.options.ownerDocument),I=z.map(function(L){return L.getAttribute("medium-editor-textarea-id")&&L.parentNode?L.parentNode.querySelector('div[medium-editor-textarea-id="'+L.getAttribute("medium-editor-textarea-id")+'"]'):L});this.elements=this.elements.filter(function(L){return I.indexOf(L)!==-1?(this.events.cleanupElement(L),L.getAttribute("medium-editor-textarea-id")&&d(L),this.trigger("removeElement",{target:L,currentTarget:L},L),!1):!0},this)}},e.getEditorFromElement=function(N){var z=N.getAttribute("data-medium-editor-editor-index"),I=N&&N.ownerDocument&&(N.ownerDocument.defaultView||N.ownerDocument.parentWindow);return I&&I._mediumEditors&&I._mediumEditors[z]?I._mediumEditors[z]:null}}(),function(){e.prototype.defaults={activeButtonClass:"medium-editor-button-active",buttonLabels:!1,delay:0,disableReturn:!1,disableDoubleReturn:!1,disableExtraSpaces:!1,disableEditing:!1,autoLink:!1,elementsContainer:!1,contentWindow:window,ownerDocument:document,targetBlank:!1,extensions:{},spellcheck:!0}}(),e.parseVersionString=function(n){var r=n.split("-"),i=r[0].split("."),o=r.length>1?r[1]:"";return{major:parseInt(i[0],10),minor:parseInt(i[1],10),revision:parseInt(i[2],10),preRelease:o,toString:function(){return[i[0],i[1],i[2]].join(".")+(o?"-"+o:"")}}},e.version=e.parseVersionString.call(this,"5.23.3"),e}())})(Mq);var xx=Mq.exports;/*!
- * vanilla-picker v2.12.3
- * https://vanilla-picker.js.org
- *
- * Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
- * Released under the ISC license.
- */var YN=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},GN=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),jO=function(){function t(e,n){var r=[],i=!0,o=!1,a=void 0;try{for(var s=e[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(r.push(l.value),!(n&&r.length===n));i=!0);}catch(u){o=!0,a=u}finally{try{!i&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();String.prototype.startsWith=String.prototype.startsWith||function(t){return this.indexOf(t)===0};String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var HUe={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function vF(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var UUe=function(){function t(e,n,r,i){YN(this,t);var o=this;function a(l){if(l.startsWith("hsl")){var u=l.match(/([\-\d\.e]+)/g).map(Number),c=jO(u,4),d=c[0],f=c[1],h=c[2],g=c[3];g===void 0&&(g=1),d/=360,f/=100,h/=100,o.hsla=[d,f,h,g]}else if(l.startsWith("rgb")){var m=l.match(/([\-\d\.e]+)/g).map(Number),y=jO(m,4),b=y[0],w=y[1],O=y[2],x=y[3];x===void 0&&(x=1),o.rgba=[b,w,O,x]}else l.startsWith("#")?o.rgba=t.hexToRgb(l):o.rgba=t.nameToRgb(l)||t.hexToRgb(l)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(r===void 0){var s=e&&""+e;s&&a(s.toLowerCase())}else this.rgba=[e,n,r,i===void 0?1:i]}return GN(t,[{key:"printRGB",value:function(n){var r=n?this.rgba:this.rgba.slice(0,3),i=r.map(function(o,a){return vF(o,a===3?3:0)});return n?"rgba("+i+")":"rgb("+i+")"}},{key:"printHSL",value:function(n){var r=[360,100,100,1],i=["","%","%",""],o=n?this.hsla:this.hsla.slice(0,3),a=o.map(function(s,l){return vF(s*r[l],l===3?3:1)+i[l]});return n?"hsla("+a+")":"hsl("+a+")"}},{key:"printHex",value:function(n){var r=this.hex;return n?r:r.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){n.length===3&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(n){n.length===3&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba,r=n.map(function(i,o){return o<3?i.toString(16):Math.round(i*255).toString(16)});return"#"+r.map(function(i){return i.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var r=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!r.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=r.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(o){return parseInt(o,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var r=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=HUe[r];return i===void 0?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var r=jO(n,4),i=r[0],o=r[1],a=r[2],s=r[3];i/=255,o/=255,a/=255;var l=Math.max(i,o,a),u=Math.min(i,o,a),c=void 0,d=void 0,f=(l+u)/2;if(l===u)c=d=0;else{var h=l-u;switch(d=f>.5?h/(2-l-u):h/(l+u),l){case i:c=(o-a)/h+(o<a?6:0);break;case o:c=(a-i)/h+2;break;case a:c=(i-o)/h+4;break}c/=6}return[c,d,f,s]}},{key:"hslToRgb",value:function(n){var r=jO(n,4),i=r[0],o=r[1],a=r[2],s=r[3],l=void 0,u=void 0,c=void 0;if(o===0)l=u=c=a;else{var d=function(y,b,w){return w<0&&(w+=1),w>1&&(w-=1),w<.16666666666666666?y+(b-y)*6*w:w<.5?b:w<.6666666666666666?y+(b-y)*(.6666666666666666-w)*6:y},f=a<.5?a*(1+o):a+o-a*o,h=2*a-f;l=d(h,f,i+1/3),u=d(h,f,i),c=d(h,f,i-1/3)}var g=[l*255,u*255,c*255].map(Math.round);return g[3]=s,g}}]),t}(),XUe=function(){function t(){YN(this,t),this._events=[]}return GN(t,[{key:"add",value:function(n,r,i){n.addEventListener(r,i,!1),this._events.push({target:n,type:r,handler:i})}},{key:"remove",value:function(n,r,i){this._events=this._events.filter(function(o){var a=!0;return n&&n!==o.target&&(a=!1),r&&r!==o.type&&(a=!1),i&&i!==o.handler&&(a=!1),a&&t._doRemove(o.target,o.type,o.handler),!a})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,r,i){n.removeEventListener(r,i,!1)}}]),t}();function ZUe(t){var e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}function s2(t,e,n){var r=!1;function i(l,u,c){return Math.max(u,Math.min(l,c))}function o(l,u,c){if(c&&(r=!0),!!r){l.preventDefault();var d=e.getBoundingClientRect(),f=d.width,h=d.height,g=u.clientX,m=u.clientY,y=i(g-d.left,0,f),b=i(m-d.top,0,h);n(y/f,b/h)}}function a(l,u){var c=l.buttons===void 0?l.which:l.buttons;c===1?o(l,l,u):r=!1}function s(l,u){l.touches.length===1?o(l,l.touches[0],u):r=!1}t.add(e,"mousedown",function(l){a(l,!0)}),t.add(e,"touchstart",function(l){s(l,!0)}),t.add(window,"mousemove",a),t.add(e,"touchmove",s),t.add(window,"mouseup",function(l){r=!1}),t.add(e,"touchend",function(l){r=!1}),t.add(e,"touchcancel",function(l){r=!1})}var qUe=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,
- linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,YUe=360,Rq="keydown",QO="mousedown",l2="focusin";function Su(t,e){return(e||document).querySelector(t)}function $q(t){t.preventDefault(),t.stopPropagation()}function u2(t,e,n,r,i){t.add(e,Rq,function(o){n.indexOf(o.key)>=0&&(i&&$q(o),r(o))})}var Nq=function(){function t(e){YN(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new XUe,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return GN(t,[{key:"setOptions",value:function(n){var r=this;if(!n)return;var i=this.settings;function o(u,c,d){for(var f in u)d&&d.indexOf(f)>=0||(c[f]=u[f])}if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),o(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var a=n.color||n.colour;a&&this._setColor(a)}var s=i.parent;if(s&&i.popup&&!this._popupInited){var l=function(c){return r.openHandler(c)};this._events.add(s,"click",l),u2(this._events,s,[" ","Spacebar","Enter"],l),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var r=n&&n.type===Rq?this._domEdit:this.domElement;setTimeout(function(){return r.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var r=n&&n.type,i=!1;if(!n)i=!0;else if(r===QO||r===l2){var o=(this.__containedEvent||0)+100;n.timeStamp>o&&(i=!0)}else $q(n),i=!0;i&&this.hide()&&(this.settings.parent.style.pointerEvents="",r!==QO&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,r){this.closeHandler(),this.setOptions(n),r&&this.openHandler()}},{key:"setColor",value:function(n,r){this._setColor(n,{silent:r})}},{key:"_setColor",value:function(n,r){if(typeof n=="string"&&(n=n.trim()),!!n){r=r||{};var i=void 0;try{i=new UUe(n)}catch(a){if(r.failSilently)return;throw a}if(!this.settings.alpha){var o=i.hsla;o[3]=1,i.hsla=o}this.colour=this.color=i,this._setHSLA(null,null,null,null,r)}}},{key:"setColour",value:function(n,r){this.setColor(n,r)}},{key:"show",value:function(){var n=this.settings.parent;if(!n)return!1;if(this.domElement){var r=this._toggleDOM(!0);return this._setPosition(),r}var i=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=ZUe(i);return this.domElement=o,this._domH=Su(".picker_hue",o),this._domSL=Su(".picker_sl",o),this._domA=Su(".picker_alpha",o),this._domEdit=Su(".picker_editor input",o),this._domSample=Su(".picker_sample",o),this._domOkay=Su(".picker_done button",o),this._domCancel=Su(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,r=this,i=this.domElement,o=this._events;function a(u,c,d){o.add(u,c,d)}a(i,"click",function(u){return u.preventDefault()}),s2(o,this._domH,function(u,c){return r._setHSLA(u)}),s2(o,this._domSL,function(u,c){return r._setHSLA(null,u,1-c)}),this.settings.alpha&&s2(o,this._domA,function(u,c){return r._setHSLA(null,null,null,1-c)});var s=this._domEdit;a(s,"input",function(u){r._setColor(this.value,{fromEditor:!0,failSilently:!0})}),a(s,"focus",function(u){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var u=function(f){return n.closeHandler(f)};a(window,QO,u),a(window,l2,u),u2(o,i,["Esc","Escape"],u);var c=function(f){n.__containedEvent=f.timeStamp};a(i,QO,c),a(i,l2,c),a(n._domCancel,"click",u)});var l=function(c){n._ifPopup(function(){return n.closeHandler(c)}),n.onDone&&n.onDone(n.colour)};a(this._domOkay,"click",l),u2(o,i,["Enter"],l)}},{key:"_setPosition",value:function(){var n=this.settings.parent,r=this.domElement;n!==r.parentNode&&n.appendChild(r),this._ifPopup(function(i){getComputedStyle(n).position==="static"&&(n.style.position="relative");var o=i===!0?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(a){a===o?r.classList.add(a):r.classList.remove(a)}),r.classList.add(o)})}},{key:"_setHSLA",value:function(n,r,i,o,a){a=a||{};var s=this.colour,l=s.hsla;[n,r,i,o].forEach(function(u,c){(u||u===0)&&(l[c]=u)}),s.hsla=l,this._updateUI(a),this.onChange&&!a.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(!this.domElement)return;n=n||{};var r=this.colour,i=r.hsla,o="hsl("+i[0]*YUe+", 100%, 50%)",a=r.hslString,s=r.hslaString,l=this._domH,u=this._domSL,c=this._domA,d=Su(".picker_selector",l),f=Su(".picker_selector",u),h=Su(".picker_selector",c);function g(C,E,T){E.style.left=T*100+"%"}function m(C,E,T){E.style.top=T*100+"%"}g(l,d,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=o,g(u,f,i[1]),m(u,f,1-i[2]),u.style.color=a,m(c,h,1-i[3]);var y=a,b=y.replace("hsl","hsla").replace(")",", 0)"),w="linear-gradient("+[y,b]+")";if(this._domA.style.background=w+", "+qUe,!n.fromEditor){var O=this.settings.editorFormat,x=this.settings.alpha,S=void 0;switch(O){case"rgb":S=r.printRGB(x);break;case"hsl":S=r.printHSL(x);break;default:S=r.printHex(x)}this._domEdit.value=S}this._domSample.style.color=s}},{key:"_ifPopup",value:function(n,r){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):r&&r()}},{key:"_toggleDOM",value:function(n){var r=this.domElement;if(!r)return!1;var i=n?"":"none",o=r.style.display!==i;return o&&(r.style.display=i),o}}]),t}();{var c2=document.createElement("style");c2.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(c2),Nq.StyleElement=c2}var KN={exports:{}};(function(t,e){(function(n,r){t.exports=n()})(function(){var n="object",r="function",i="undefined",o=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],a=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],s=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],l=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"];function u(U,ie){var ee=typeof U[ie];return ee==r||!!(ee==n&&U[ie])||ee=="unknown"}function c(U,ie){return!!(typeof U[ie]==n&&U[ie])}function d(U,ie){return typeof U[ie]!=i}function f(U){return function(ie,ee){for(var he=ee.length;he--;)if(!U(ie,ee[he]))return!1;return!0}}var h=f(u),g=f(c),m=f(d);function y(U){return U&&h(U,l)&&m(U,s)}function b(U){return c(U,"body")?U.body:U.getElementsByTagName("body")[0]}var w=[].forEach?function(U,ie){U.forEach(ie)}:function(U,ie){for(var ee=0,he=U.length;ee<he;++ee)ie(U[ee],ee)},O={},x=typeof window!=i&&typeof document!=i,S={isHostMethod:u,isHostObject:c,isHostProperty:d,areHostMethods:h,areHostObjects:g,areHostProperties:m,isTextRange:y,getBody:b,forEach:w},C={version:"1.3.2",initialized:!1,isBrowser:x,supported:!0,util:S,features:{},modules:O,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==i?!0:rangyAutoInitialize}};function E(U){typeof console!=i&&u(console,"log")&&console.log(U)}function T(U,ie){x&&ie?alert(U):E(U)}function P(U){C.initialized=!0,C.supported=!1,T("Rangy is not supported in this environment. Reason: "+U,C.config.alertOnFail)}C.fail=P;function A(U){T("Rangy warning: "+U,C.config.alertOnWarn)}C.warn=A;var D;({}).hasOwnProperty?(S.extend=D=function(U,ie,ee){var he,$e;for(var Me in ie)Me==="__proto__"||Me==="constructor"||Me==="prototype"||ie.hasOwnProperty(Me)&&(he=U[Me],$e=ie[Me],ee&&he!==null&&typeof he=="object"&&$e!==null&&typeof $e=="object"&&D(he,$e,!0),U[Me]=$e);return ie.hasOwnProperty("toString")&&(U.toString=ie.toString),U},S.createOptions=function(U,ie){var ee={};return D(ee,ie),U&&D(ee,U),ee}):P("hasOwnProperty not supported"),x||P("Rangy can only run in a browser"),function(){var U;if(x){var ie=document.createElement("div");ie.appendChild(document.createElement("span"));var ee=[].slice;try{ee.call(ie.childNodes,0)[0].nodeType==1&&(U=function(he){return ee.call(he,0)})}catch{}}U||(U=function(he){for(var $e=[],Me=0,q=he.length;Me<q;++Me)$e[Me]=he[Me];return $e}),S.toArray=U}();var $;x&&(u(document,"addEventListener")?$=function(U,ie,ee){U.addEventListener(ie,ee,!1)}:u(document,"attachEvent")?$=function(U,ie,ee){U.attachEvent("on"+ie,ee)}:P("Document does not have required addEventListener or attachEvent method"),S.addListener=$);var N=[];function z(U){return U.message||U.description||String(U)}function I(){if(!(!x||C.initialized)){var U,ie=!1,ee=!1;u(document,"createRange")&&(U=document.createRange(),h(U,a)&&m(U,o)&&(ie=!0));var he=b(document);if(!he||he.nodeName.toLowerCase()!="body"){P("No body element found");return}if(he&&u(he,"createTextRange")&&(U=he.createTextRange(),y(U)&&(ee=!0)),!ie&&!ee){P("Neither Range nor TextRange are available");return}C.initialized=!0,C.features={implementsDomRange:ie,implementsTextRange:ee};var $e,Me;for(var q in O)($e=O[q])instanceof G&&$e.init($e,C);for(var de=0,ke=N.length;de<ke;++de)try{N[de](C)}catch(Ie){Me="Rangy init listener threw an exception. Continuing. Detail: "+z(Ie),E(Me)}}}function L(U,ie,ee){ee&&(U+=" in module "+ee.name),C.warn("DEPRECATED: "+U+" is deprecated. Please use "+ie+" instead.")}function X(U,ie,ee,he){U[ie]=function(){return L(ie,ee,he),U[ee].apply(U,S.toArray(arguments))}}S.deprecationNotice=L,S.createAliasForDeprecatedMethod=X,C.init=I,C.addInitListener=function(U){C.initialized?U(C):N.push(U)};var Q=[];C.addShimListener=function(U){Q.push(U)};function W(U){U=U||window,I();for(var ie=0,ee=Q.length;ie<ee;++ie)Q[ie](U)}x&&(C.shim=C.createMissingNativeApi=W,X(C,"createMissingNativeApi","shim"));function G(U,ie,ee){this.name=U,this.dependencies=ie,this.initialized=!1,this.supported=!1,this.initializer=ee}G.prototype={init:function(){for(var U=this.dependencies||[],ie=0,ee=U.length,he,$e;ie<ee;++ie){if($e=U[ie],he=O[$e],!he||!(he instanceof G))throw new Error("required module '"+$e+"' not found");if(he.init(),!he.supported)throw new Error("required module '"+$e+"' not supported")}this.initializer(this)},fail:function(U){throw this.initialized=!0,this.supported=!1,new Error(U)},warn:function(U){C.warn("Module "+this.name+": "+U)},deprecationNotice:function(U,ie){C.warn("DEPRECATED: "+U+" in module "+this.name+" is deprecated. Please use "+ie+" instead")},createError:function(U){return new Error("Error in Rangy "+this.name+" module: "+U)}};function K(U,ie,ee){var he=new G(U,ie,function($e){if(!$e.initialized){$e.initialized=!0;try{ee(C,$e),$e.supported=!0}catch(q){var Me="Module '"+U+"' failed to load: "+z(q);E(Me),q.stack&&E(q.stack)}}});return O[U]=he,he}C.createModule=function(U){var ie,ee;arguments.length==2?(ie=arguments[1],ee=[]):(ie=arguments[2],ee=arguments[1]);var he=K(U,ee,ie);C.initialized&&C.supported&&he.init()},C.createCoreModule=function(U,ie,ee){K(U,ie,ee)};function oe(){}C.RangePrototype=oe,C.rangePrototype=new oe;function ne(){}C.selectionPrototype=new ne,C.createCoreModule("DomUtil",[],function(U,ie){var ee="undefined",he=U.util,$e=he.getBody;he.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||ie.fail("document missing a Node creation method"),he.isHostMethod(document,"getElementsByTagName")||ie.fail("document missing getElementsByTagName method");var Me=document.createElement("div");he.areHostMethods(Me,["insertBefore","appendChild","cloneNode"])||ie.fail("Incomplete Element implementation"),he.isHostProperty(Me,"innerHTML")||ie.fail("Element is missing innerHTML property");var q=document.createTextNode("test");he.areHostMethods(q,["splitText","deleteData","insertData","appendData","cloneNode"])||ie.fail("Incomplete Text Node implementation");var de=function(Ge,$t){for(var bn=Ge.length;bn--;)if(Ge[bn]===$t)return!0;return!1};function ke(Ge){var $t;return typeof Ge.namespaceURI==ee||($t=Ge.namespaceURI)===null||$t=="http://www.w3.org/1999/xhtml"}function Ie(Ge){var $t=Ge.parentNode;return $t.nodeType==1?$t:null}function se(Ge){for(var $t=0;Ge=Ge.previousSibling;)++$t;return $t}function ye(Ge){switch(Ge.nodeType){case 7:case 10:return 0;case 3:case 8:return Ge.length;default:return Ge.childNodes.length}}function Ae(Ge,$t){var bn=[],dn;for(dn=Ge;dn;dn=dn.parentNode)bn.push(dn);for(dn=$t;dn;dn=dn.parentNode)if(de(bn,dn))return dn;return null}function Z(Ge,$t,bn){for(var dn=bn?$t:$t.parentNode;dn;){if(dn===Ge)return!0;dn=dn.parentNode}return!1}function te(Ge,$t){return Z(Ge,$t,!0)}function le(Ge,$t,bn){for(var dn,Pr=bn?Ge:Ge.parentNode;Pr;){if(dn=Pr.parentNode,dn===$t)return Pr;Pr=dn}return null}function Te(Ge){var $t=Ge.nodeType;return $t==3||$t==4||$t==8}function pe(Ge){if(!Ge)return!1;var $t=Ge.nodeType;return $t==3||$t==8}function Oe(Ge,$t){var bn=$t.nextSibling,dn=$t.parentNode;return bn?dn.insertBefore(Ge,bn):dn.appendChild(Ge),Ge}function Re(Ge,$t,bn){var dn=Ge.cloneNode(!1);if(dn.deleteData(0,$t),Ge.deleteData($t,Ge.length-$t),Oe(dn,Ge),bn)for(var Pr=0,Jn;Jn=bn[Pr++];)Jn.node==Ge&&Jn.offset>$t?(Jn.node=dn,Jn.offset-=$t):Jn.node==Ge.parentNode&&Jn.offset>se(Ge)&&++Jn.offset;return dn}function je(Ge){if(Ge.nodeType==9)return Ge;if(typeof Ge.ownerDocument!=ee)return Ge.ownerDocument;if(typeof Ge.document!=ee)return Ge.document;if(Ge.parentNode)return je(Ge.parentNode);throw ie.createError("getDocument: no document found for node")}function Ke(Ge){var $t=je(Ge);if(typeof $t.defaultView!=ee)return $t.defaultView;if(typeof $t.parentWindow!=ee)return $t.parentWindow;throw ie.createError("Cannot get a window object for node")}function Je(Ge){if(typeof Ge.contentDocument!=ee)return Ge.contentDocument;if(typeof Ge.contentWindow!=ee)return Ge.contentWindow.document;throw ie.createError("getIframeDocument: No Document object found for iframe element")}function at(Ge){if(typeof Ge.contentWindow!=ee)return Ge.contentWindow;if(typeof Ge.contentDocument!=ee)return Ge.contentDocument.defaultView;throw ie.createError("getIframeWindow: No Window object found for iframe element")}function kt(Ge){return Ge&&he.isHostMethod(Ge,"setTimeout")&&he.isHostObject(Ge,"document")}function jt(Ge,$t,bn){var dn;if(Ge?he.isHostProperty(Ge,"nodeType")?dn=Ge.nodeType==1&&Ge.tagName.toLowerCase()=="iframe"?Je(Ge):je(Ge):kt(Ge)&&(dn=Ge.document):dn=document,!dn)throw $t.createError(bn+"(): Parameter must be a Window object or DOM node");return dn}function Pe(Ge){for(var $t;$t=Ge.parentNode;)Ge=$t;return Ge}function nt(Ge,$t,bn,dn){var Pr,Jn,Xi,Ji,si;if(Ge==bn)return $t===dn?0:$t<dn?-1:1;if(Pr=le(bn,Ge,!0))return $t<=se(Pr)?-1:1;if(Pr=le(Ge,bn,!0))return se(Pr)<dn?-1:1;if(Jn=Ae(Ge,bn),!Jn)throw new Error("comparePoints error: nodes have no common ancestor");if(Xi=Ge===Jn?Jn:le(Ge,Jn,!0),Ji=bn===Jn?Jn:le(bn,Jn,!0),Xi===Ji)throw ie.createError("comparePoints got to case 4 and childA and childB are the same!");for(si=Jn.firstChild;si;){if(si===Xi)return-1;if(si===Ji)return 1;si=si.nextSibling}}var fe=!1;function De(Ge){var $t;try{return $t=Ge.parentNode,!1}catch{return!0}}(function(){var Ge=document.createElement("b");Ge.innerHTML="1";var $t=Ge.firstChild;Ge.innerHTML="<br />",fe=De($t),U.features.crashyTextNodes=fe})();function ce(Ge){if(!Ge)return"[No node]";if(fe&&De(Ge))return"[Broken node]";if(Te(Ge))return'"'+Ge.data+'"';if(Ge.nodeType==1){var $t=Ge.id?' id="'+Ge.id+'"':"";return"<"+Ge.nodeName+$t+">[index:"+se(Ge)+",length:"+Ge.childNodes.length+"]["+(Ge.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return Ge.nodeName}function qe(Ge){for(var $t=je(Ge).createDocumentFragment(),bn;bn=Ge.firstChild;)$t.appendChild(bn);return $t}var Mt;typeof window.getComputedStyle!=ee?Mt=function(Ge,$t){return Ke(Ge).getComputedStyle(Ge,null)[$t]}:typeof document.documentElement.currentStyle!=ee?Mt=function(Ge,$t){return Ge.currentStyle?Ge.currentStyle[$t]:""}:ie.fail("No means of obtaining computed style properties found");function Zt(Ge,$t,bn){var dn=$e(Ge),Pr=Ge.createElement("div");Pr.contentEditable=""+!!bn,$t&&(Pr.innerHTML=$t);var Jn=dn.firstChild;return Jn?dn.insertBefore(Pr,Jn):dn.appendChild(Pr),Pr}function Sn(Ge){return Ge.parentNode.removeChild(Ge)}function kr(Ge){this.root=Ge,this._next=Ge}kr.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var Ge=this._current=this._next,$t,bn;if(this._current)if($t=Ge.firstChild,$t)this._next=$t;else{for(bn=null;Ge!==this.root&&!(bn=Ge.nextSibling);)Ge=Ge.parentNode;this._next=bn}return this._current},detach:function(){this._current=this._next=this.root=null}};function zn(Ge){return new kr(Ge)}function Ln(Ge,$t){this.node=Ge,this.offset=$t}Ln.prototype={equals:function(Ge){return!!Ge&&this.node===Ge.node&&this.offset==Ge.offset},inspect:function(){return"[DomPosition("+ce(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}};function Yt(Ge){this.code=this[Ge],this.codeName=Ge,this.message="DOMException: "+this.codeName}Yt.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},Yt.prototype.toString=function(){return this.message},U.dom={arrayContains:de,isHtmlNamespace:ke,parentElement:Ie,getNodeIndex:se,getNodeLength:ye,getCommonAncestor:Ae,isAncestorOf:Z,isOrIsAncestorOf:te,getClosestAncestorIn:le,isCharacterDataNode:Te,isTextOrCommentNode:pe,insertAfter:Oe,splitDataNode:Re,getDocument:je,getWindow:Ke,getIframeWindow:at,getIframeDocument:Je,getBody:$e,isWindow:kt,getContentDocument:jt,getRootContainer:Pe,comparePoints:nt,isBrokenNode:De,inspectNode:ce,getComputedStyleProperty:Mt,createTestElement:Zt,removeNode:Sn,fragmentFromNodeChildren:qe,createIterator:zn,DomPosition:Ln},U.DOMException=Yt}),C.createCoreModule("DomRange",["DomUtil"],function(U,ie){var ee=U.dom,he=U.util,$e=ee.DomPosition,Me=U.DOMException,q=ee.isCharacterDataNode,de=ee.getNodeIndex,ke=ee.isOrIsAncestorOf,Ie=ee.getDocument,se=ee.comparePoints,ye=ee.splitDataNode,Ae=ee.getClosestAncestorIn,Z=ee.getNodeLength,te=ee.arrayContains,le=ee.getRootContainer,Te=U.features.crashyTextNodes,pe=ee.removeNode;function Oe(ve,We){return ve.nodeType!=3&&(ke(ve,We.startContainer)||ke(ve,We.endContainer))}function Re(ve){return ve.document||Ie(ve.startContainer)}function je(ve){return le(ve.startContainer)}function Ke(ve){return new $e(ve.parentNode,de(ve))}function Je(ve){return new $e(ve.parentNode,de(ve)+1)}function at(ve,We,wt){var Lt=ve.nodeType==11?ve.firstChild:ve;return q(We)?wt==We.length?ee.insertAfter(ve,We):We.parentNode.insertBefore(ve,wt==0?We:ye(We,wt)):wt>=We.childNodes.length?We.appendChild(ve):We.insertBefore(ve,We.childNodes[wt]),Lt}function kt(ve,We,wt){if(_r(ve),_r(We),Re(We)!=Re(ve))throw new Me("WRONG_DOCUMENT_ERR");var Lt=se(ve.startContainer,ve.startOffset,We.endContainer,We.endOffset),fn=se(ve.endContainer,ve.endOffset,We.startContainer,We.startOffset);return wt?Lt<=0&&fn>=0:Lt<0&&fn>0}function jt(ve){for(var We,wt,Lt=Re(ve.range).createDocumentFragment(),fn;wt=ve.next();){if(We=ve.isPartiallySelectedSubtree(),wt=wt.cloneNode(!We),We&&(fn=ve.getSubtreeIterator(),wt.appendChild(jt(fn)),fn.detach()),wt.nodeType==10)throw new Me("HIERARCHY_REQUEST_ERR");Lt.appendChild(wt)}return Lt}function Pe(ve,We,wt){var Lt,fn;wt=wt||{stop:!1};for(var nr,Pt;nr=ve.next();)if(ve.isPartiallySelectedSubtree()){if(We(nr)===!1){wt.stop=!0;return}else if(Pt=ve.getSubtreeIterator(),Pe(Pt,We,wt),Pt.detach(),wt.stop)return}else for(Lt=ee.createIterator(nr);fn=Lt.next();)if(We(fn)===!1){wt.stop=!0;return}}function nt(ve){for(var We;ve.next();)ve.isPartiallySelectedSubtree()?(We=ve.getSubtreeIterator(),nt(We),We.detach()):ve.remove()}function fe(ve){for(var We,wt=Re(ve.range).createDocumentFragment(),Lt;We=ve.next();){if(ve.isPartiallySelectedSubtree()?(We=We.cloneNode(!1),Lt=ve.getSubtreeIterator(),We.appendChild(fe(Lt)),Lt.detach()):ve.remove(),We.nodeType==10)throw new Me("HIERARCHY_REQUEST_ERR");wt.appendChild(We)}return wt}function De(ve,We,wt){var Lt=!!(We&&We.length),fn,nr=!!wt;Lt&&(fn=new RegExp("^("+We.join("|")+")$"));var Pt=[];return Pe(new qe(ve,!1),function(nn){if(!(Lt&&!fn.test(nn.nodeType))&&!(nr&&!wt(nn))){var yn=ve.startContainer;if(!(nn==yn&&q(yn)&&ve.startOffset==yn.length)){var Xn=ve.endContainer;nn==Xn&&q(Xn)&&ve.endOffset==0||Pt.push(nn)}}}),Pt}function ce(ve){var We=typeof ve.getName=="undefined"?"Range":ve.getName();return"["+We+"("+ee.inspectNode(ve.startContainer)+":"+ve.startOffset+", "+ee.inspectNode(ve.endContainer)+":"+ve.endOffset+")]"}function qe(ve,We){if(this.range=ve,this.clonePartiallySelectedTextNodes=We,!ve.collapsed){this.sc=ve.startContainer,this.so=ve.startOffset,this.ec=ve.endContainer,this.eo=ve.endOffset;var wt=ve.commonAncestorContainer;this.sc===this.ec&&q(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc===wt&&!q(this.sc)?this.sc.childNodes[this.so]:Ae(this.sc,wt,!0),this._last=this.ec===wt&&!q(this.ec)?this.ec.childNodes[this.eo-1]:Ae(this.ec,wt,!0))}}qe.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var ve=this._current=this._next;return ve&&(this._next=ve!==this._last?ve.nextSibling:null,q(ve)&&this.clonePartiallySelectedTextNodes&&(ve===this.ec&&(ve=ve.cloneNode(!0)).deleteData(this.eo,ve.length-this.eo),this._current===this.sc&&(ve=ve.cloneNode(!0)).deleteData(0,this.so))),ve},remove:function(){var ve=this._current,We,wt;q(ve)&&(ve===this.sc||ve===this.ec)?(We=ve===this.sc?this.so:0,wt=ve===this.ec?this.eo:ve.length,We!=wt&&ve.deleteData(We,wt-We)):ve.parentNode&&pe(ve)},isPartiallySelectedSubtree:function(){var ve=this._current;return Oe(ve,this.range)},getSubtreeIterator:function(){var ve;if(this.isSingleCharacterDataNode)ve=this.range.cloneRange(),ve.collapse(!1);else{ve=new Ei(Re(this.range));var We=this._current,wt=We,Lt=0,fn=We,nr=Z(We);ke(We,this.sc)&&(wt=this.sc,Lt=this.so),ke(We,this.ec)&&(fn=this.ec,nr=this.eo),gr(ve,wt,Lt,fn,nr)}return new qe(ve,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var Mt=[1,3,4,5,7,8,10],Zt=[2,9,11],Sn=[5,6,10,12],kr=[1,3,4,5,7,8,10,11],zn=[1,3,4,5,7,8];function Ln(ve){return function(We,wt){for(var Lt,fn=wt?We:We.parentNode;fn;){if(Lt=fn.nodeType,te(ve,Lt))return fn;fn=fn.parentNode}return null}}var Yt=Ln([9,11]),Ge=Ln(Sn),$t=Ln([6,10,12]),bn=Ln([1]);function dn(ve,We){if($t(ve,We))throw new Me("INVALID_NODE_TYPE_ERR")}function Pr(ve,We){if(!te(We,ve.nodeType))throw new Me("INVALID_NODE_TYPE_ERR")}function Jn(ve,We){if(We<0||We>(q(ve)?ve.length:ve.childNodes.length))throw new Me("INDEX_SIZE_ERR")}function Xi(ve,We){if(Yt(ve,!0)!==Yt(We,!0))throw new Me("WRONG_DOCUMENT_ERR")}function Ji(ve){if(Ge(ve,!0))throw new Me("NO_MODIFICATION_ALLOWED_ERR")}function si(ve,We){if(!ve)throw new Me(We)}function Vs(ve,We){return We<=(q(ve)?ve.length:ve.childNodes.length)}function cs(ve){return!!ve.startContainer&&!!ve.endContainer&&!(Te&&(ee.isBrokenNode(ve.startContainer)||ee.isBrokenNode(ve.endContainer)))&&le(ve.startContainer)==le(ve.endContainer)&&Vs(ve.startContainer,ve.startOffset)&&Vs(ve.endContainer,ve.endOffset)}function _r(ve){if(!cs(ve))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+ve.inspect()+")")}var $l=document.createElement("style"),ca=!1;try{$l.innerHTML="<b>x</b>",ca=$l.firstChild.nodeType==3}catch{}U.features.htmlParsingConforms=ca;var ot=ca?function(ve){var We=this.startContainer,wt=Ie(We);if(!We)throw new Me("INVALID_STATE_ERR");var Lt=null;return We.nodeType==1?Lt=We:q(We)&&(Lt=ee.parentElement(We)),Lt===null||Lt.nodeName=="HTML"&&ee.isHtmlNamespace(Ie(Lt).documentElement)&&ee.isHtmlNamespace(Lt)?Lt=wt.createElement("body"):Lt=Lt.cloneNode(!1),Lt.innerHTML=ve,ee.fragmentFromNodeChildren(Lt)}:function(ve){var We=Re(this),wt=We.createElement("body");return wt.innerHTML=ve,ee.fragmentFromNodeChildren(wt)};function Rt(ve,We){_r(ve);var wt=ve.startContainer,Lt=ve.startOffset,fn=ve.endContainer,nr=ve.endOffset,Pt=wt===fn;q(fn)&&nr>0&&nr<fn.length&&ye(fn,nr,We),q(wt)&&Lt>0&&Lt<wt.length&&(wt=ye(wt,Lt,We),Pt?(nr-=Lt,fn=wt):fn==wt.parentNode&&nr>=de(wt)&&nr++,Lt=0),ve.setStartAndEnd(wt,Lt,fn,nr)}function Nt(ve){_r(ve);var We=ve.commonAncestorContainer.parentNode.cloneNode(!1);return We.appendChild(ve.cloneContents()),We.innerHTML}var Br=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],gi=0,ho=1,Eo=2,eo=3,To=0,ds=1,tt=2,Dt=3;he.extend(U.rangePrototype,{compareBoundaryPoints:function(ve,We){_r(this),Xi(this.startContainer,We.startContainer);var wt,Lt,fn,nr,Pt=ve==eo||ve==gi?"start":"end",nn=ve==ho||ve==gi?"start":"end";return wt=this[Pt+"Container"],Lt=this[Pt+"Offset"],fn=We[nn+"Container"],nr=We[nn+"Offset"],se(wt,Lt,fn,nr)},insertNode:function(ve){if(_r(this),Pr(ve,kr),Ji(this.startContainer),ke(ve,this.startContainer))throw new Me("HIERARCHY_REQUEST_ERR");var We=at(ve,this.startContainer,this.startOffset);this.setStartBefore(We)},cloneContents:function(){_r(this);var ve,We;if(this.collapsed)return Re(this).createDocumentFragment();if(this.startContainer===this.endContainer&&q(this.startContainer))return ve=this.startContainer.cloneNode(!0),ve.data=ve.data.slice(this.startOffset,this.endOffset),We=Re(this).createDocumentFragment(),We.appendChild(ve),We;var wt=new qe(this,!0);return ve=jt(wt),wt.detach(),ve},canSurroundContents:function(){_r(this),Ji(this.startContainer),Ji(this.endContainer);var ve=new qe(this,!0),We=ve._first&&Oe(ve._first,this)||ve._last&&Oe(ve._last,this);return ve.detach(),!We},surroundContents:function(ve){if(Pr(ve,zn),!this.canSurroundContents())throw new Me("INVALID_STATE_ERR");var We=this.extractContents();if(ve.hasChildNodes())for(;ve.lastChild;)ve.removeChild(ve.lastChild);at(ve,this.startContainer,this.startOffset),ve.appendChild(We),this.selectNode(ve)},cloneRange:function(){_r(this);for(var ve=new Ei(Re(this)),We=Br.length,wt;We--;)wt=Br[We],ve[wt]=this[wt];return ve},toString:function(){_r(this);var ve=this.startContainer;if(ve===this.endContainer&&q(ve))return ve.nodeType==3||ve.nodeType==4?ve.data.slice(this.startOffset,this.endOffset):"";var We=[],wt=new qe(this,!0);return Pe(wt,function(Lt){(Lt.nodeType==3||Lt.nodeType==4)&&We.push(Lt.data)}),wt.detach(),We.join("")},compareNode:function(ve){_r(this);var We=ve.parentNode,wt=de(ve);if(!We)throw new Me("NOT_FOUND_ERR");var Lt=this.comparePoint(We,wt),fn=this.comparePoint(We,wt+1);return Lt<0?fn>0?tt:To:fn>0?ds:Dt},comparePoint:function(ve,We){return _r(this),si(ve,"HIERARCHY_REQUEST_ERR"),Xi(ve,this.startContainer),se(ve,We,this.startContainer,this.startOffset)<0?-1:se(ve,We,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ot,toHtml:function(){return Nt(this)},intersectsNode:function(ve,We){if(_r(this),le(ve)!=je(this))return!1;var wt=ve.parentNode,Lt=de(ve);if(!wt)return!0;var fn=se(wt,Lt,this.endContainer,this.endOffset),nr=se(wt,Lt+1,this.startContainer,this.startOffset);return We?fn<=0&&nr>=0:fn<0&&nr>0},isPointInRange:function(ve,We){return _r(this),si(ve,"HIERARCHY_REQUEST_ERR"),Xi(ve,this.startContainer),se(ve,We,this.startContainer,this.startOffset)>=0&&se(ve,We,this.endContainer,this.endOffset)<=0},intersectsRange:function(ve){return kt(this,ve,!1)},intersectsOrTouchesRange:function(ve){return kt(this,ve,!0)},intersection:function(ve){if(this.intersectsRange(ve)){var We=se(this.startContainer,this.startOffset,ve.startContainer,ve.startOffset),wt=se(this.endContainer,this.endOffset,ve.endContainer,ve.endOffset),Lt=this.cloneRange();return We==-1&&Lt.setStart(ve.startContainer,ve.startOffset),wt==1&&Lt.setEnd(ve.endContainer,ve.endOffset),Lt}return null},union:function(ve){if(this.intersectsOrTouchesRange(ve)){var We=this.cloneRange();return se(ve.startContainer,ve.startOffset,this.startContainer,this.startOffset)==-1&&We.setStart(ve.startContainer,ve.startOffset),se(ve.endContainer,ve.endOffset,this.endContainer,this.endOffset)==1&&We.setEnd(ve.endContainer,ve.endOffset),We}else throw new Me("Ranges do not intersect")},containsNode:function(ve,We){return We?this.intersectsNode(ve,!1):this.compareNode(ve)==Dt},containsNodeContents:function(ve){return this.comparePoint(ve,0)>=0&&this.comparePoint(ve,Z(ve))<=0},containsRange:function(ve){var We=this.intersection(ve);return We!==null&&ve.equals(We)},containsNodeText:function(ve){var We=this.cloneRange();We.selectNode(ve);var wt=We.getNodes([3]);if(wt.length>0){We.setStart(wt[0],0);var Lt=wt.pop();return We.setEnd(Lt,Lt.length),this.containsRange(We)}else return this.containsNodeContents(ve)},getNodes:function(ve,We){return _r(this),De(this,ve,We)},getDocument:function(){return Re(this)},collapseBefore:function(ve){this.setEndBefore(ve),this.collapse(!1)},collapseAfter:function(ve){this.setStartAfter(ve),this.collapse(!0)},getBookmark:function(ve){var We=Re(this),wt=U.createRange(We);ve=ve||ee.getBody(We),wt.selectNodeContents(ve);var Lt=this.intersection(wt),fn=0,nr=0;return Lt&&(wt.setEnd(Lt.startContainer,Lt.startOffset),fn=wt.toString().length,nr=fn+Lt.toString().length),{start:fn,end:nr,containerNode:ve}},moveToBookmark:function(ve){var We=ve.containerNode,wt=0;this.setStart(We,0),this.collapse(!0);for(var Lt=[We],fn,nr=!1,Pt=!1,nn,yn,Xn;!Pt&&(fn=Lt.pop());)if(fn.nodeType==3)nn=wt+fn.length,!nr&&ve.start>=wt&&ve.start<=nn&&(this.setStart(fn,ve.start-wt),nr=!0),nr&&ve.end>=wt&&ve.end<=nn&&(this.setEnd(fn,ve.end-wt),Pt=!0),wt=nn;else for(Xn=fn.childNodes,yn=Xn.length;yn--;)Lt.push(Xn[yn])},getName:function(){return"DomRange"},equals:function(ve){return Ei.rangesEqual(this,ve)},isValid:function(){return cs(this)},inspect:function(){return ce(this)},detach:function(){}});function ae(ve){ve.START_TO_START=gi,ve.START_TO_END=ho,ve.END_TO_END=Eo,ve.END_TO_START=eo,ve.NODE_BEFORE=To,ve.NODE_AFTER=ds,ve.NODE_BEFORE_AND_AFTER=tt,ve.NODE_INSIDE=Dt}function Le(ve){ae(ve),ae(ve.prototype)}function gt(ve,We){return function(){_r(this);var wt=this.startContainer,Lt=this.startOffset,fn=this.commonAncestorContainer,nr=new qe(this,!0),Pt,nn;wt!==fn&&(Pt=Ae(wt,fn,!0),nn=Je(Pt),wt=nn.node,Lt=nn.offset),Pe(nr,Ji),nr.reset();var yn=ve(nr);return nr.detach(),We(this,wt,Lt,wt,Lt),yn}}function Bt(ve,We){function wt(Pt,nn){return function(yn){Pr(yn,Mt),Pr(le(yn),Zt);var Xn=(Pt?Ke:Je)(yn);(nn?Lt:fn)(this,Xn.node,Xn.offset)}}function Lt(Pt,nn,yn){var Xn=Pt.endContainer,Zi=Pt.endOffset;(nn!==Pt.startContainer||yn!==Pt.startOffset)&&((le(nn)!=le(Xn)||se(nn,yn,Xn,Zi)==1)&&(Xn=nn,Zi=yn),We(Pt,nn,yn,Xn,Zi))}function fn(Pt,nn,yn){var Xn=Pt.startContainer,Zi=Pt.startOffset;(nn!==Pt.endContainer||yn!==Pt.endOffset)&&((le(nn)!=le(Xn)||se(nn,yn,Xn,Zi)==-1)&&(Xn=nn,Zi=yn),We(Pt,Xn,Zi,nn,yn))}var nr=function(){};nr.prototype=U.rangePrototype,ve.prototype=new nr,he.extend(ve.prototype,{setStart:function(Pt,nn){dn(Pt,!0),Jn(Pt,nn),Lt(this,Pt,nn)},setEnd:function(Pt,nn){dn(Pt,!0),Jn(Pt,nn),fn(this,Pt,nn)},setStartAndEnd:function(){var Pt=arguments,nn=Pt[0],yn=Pt[1],Xn=nn,Zi=yn;switch(Pt.length){case 3:Zi=Pt[2];break;case 4:Xn=Pt[2],Zi=Pt[3];break}dn(nn,!0),Jn(nn,yn),dn(Xn,!0),Jn(Xn,Zi),We(this,nn,yn,Xn,Zi)},setBoundary:function(Pt,nn,yn){this["set"+(yn?"Start":"End")](Pt,nn)},setStartBefore:wt(!0,!0),setStartAfter:wt(!1,!0),setEndBefore:wt(!0,!1),setEndAfter:wt(!1,!1),collapse:function(Pt){_r(this),Pt?We(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):We(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(Pt){dn(Pt,!0),We(this,Pt,0,Pt,Z(Pt))},selectNode:function(Pt){dn(Pt,!1),Pr(Pt,Mt);var nn=Ke(Pt),yn=Je(Pt);We(this,nn.node,nn.offset,yn.node,yn.offset)},extractContents:gt(fe,We),deleteContents:gt(nt,We),canSurroundContents:function(){_r(this),Ji(this.startContainer),Ji(this.endContainer);var Pt=new qe(this,!0),nn=Pt._first&&Oe(Pt._first,this)||Pt._last&&Oe(Pt._last,this);return Pt.detach(),!nn},splitBoundaries:function(){Rt(this)},splitBoundariesPreservingPositions:function(Pt){Rt(this,Pt)},normalizeBoundaries:function(){_r(this);var Pt=this.startContainer,nn=this.startOffset,yn=this.endContainer,Xn=this.endOffset,Zi=function(Zo){var fs=Zo.nextSibling;fs&&fs.nodeType==Zo.nodeType&&(yn=Zo,Xn=Zo.length,Zo.appendData(fs.data),pe(fs))},pv=function(Zo){var fs=Zo.previousSibling;if(fs&&fs.nodeType==Zo.nodeType){Pt=Zo;var mv=Zo.length;if(nn=fs.length,Zo.insertData(0,fs.data),pe(fs),Pt==yn)Xn+=nn,yn=Pt;else if(yn==Zo.parentNode){var kp=de(Zo);Xn==kp?(yn=Zo,Xn=mv):Xn>kp&&Xn--}}},gv=!0,da;if(q(yn))Xn==yn.length?Zi(yn):Xn==0&&(da=yn.previousSibling,da&&da.nodeType==yn.nodeType&&(Xn=da.length,Pt==yn&&(gv=!1),da.appendData(yn.data),pe(yn),yn=da));else{if(Xn>0){var Tp=yn.childNodes[Xn-1];Tp&&q(Tp)&&Zi(Tp)}gv=!this.collapsed}if(gv){if(q(Pt))nn==0?pv(Pt):nn==Pt.length&&(da=Pt.nextSibling,da&&da.nodeType==Pt.nodeType&&(yn==da&&(yn=Pt,Xn+=Pt.length),Pt.appendData(da.data),pe(da)));else if(nn<Pt.childNodes.length){var Gf=Pt.childNodes[nn];Gf&&q(Gf)&&pv(Gf)}}else Pt=yn,nn=Xn;We(this,Pt,nn,yn,Xn)},collapseToPoint:function(Pt,nn){dn(Pt,!0),Jn(Pt,nn),this.setStartAndEnd(Pt,nn)},parentElement:function(){_r(this);var Pt=this.commonAncestorContainer;return Pt?bn(this.commonAncestorContainer,!0):null}}),Le(ve)}function kn(ve){ve.collapsed=ve.startContainer===ve.endContainer&&ve.startOffset===ve.endOffset,ve.commonAncestorContainer=ve.collapsed?ve.startContainer:ee.getCommonAncestor(ve.startContainer,ve.endContainer)}function gr(ve,We,wt,Lt,fn){ve.startContainer=We,ve.startOffset=wt,ve.endContainer=Lt,ve.endOffset=fn,ve.document=ee.getDocument(We),kn(ve)}function Ei(ve){gr(this,ve,0,ve,0)}Bt(Ei,gr),he.extend(Ei,{rangeProperties:Br,RangeIterator:qe,copyComparisonConstants:Le,createPrototypeRange:Bt,inspect:ce,toHtml:Nt,getRangeDocument:Re,rangesEqual:function(ve,We){return ve.startContainer===We.startContainer&&ve.startOffset===We.startOffset&&ve.endContainer===We.endContainer&&ve.endOffset===We.endOffset}}),U.DomRange=Ei}),C.createCoreModule("WrappedRange",["DomRange"],function(U,ie){var ee,he,$e=U.dom,Me=U.util,q=$e.DomPosition,de=U.DomRange,ke=$e.getBody,Ie=$e.getContentDocument,se=$e.isCharacterDataNode;if(U.features.implementsDomRange&&function(){var pe,Oe=de.rangeProperties;function Re(fe){for(var De=Oe.length,ce;De--;)ce=Oe[De],fe[ce]=fe.nativeRange[ce];fe.collapsed=fe.startContainer===fe.endContainer&&fe.startOffset===fe.endOffset}function je(fe,De,ce,qe,Mt){var Zt=fe.startContainer!==De||fe.startOffset!=ce,Sn=fe.endContainer!==qe||fe.endOffset!=Mt,kr=!fe.equals(fe.nativeRange);(Zt||Sn||kr)&&(fe.setEnd(qe,Mt),fe.setStart(De,ce))}var Ke;ee=function(fe){if(!fe)throw ie.createError("WrappedRange: Range must be specified");this.nativeRange=fe,Re(this)},de.createPrototypeRange(ee,je),pe=ee.prototype,pe.selectNode=function(fe){this.nativeRange.selectNode(fe),Re(this)},pe.cloneContents=function(){return this.nativeRange.cloneContents()},pe.surroundContents=function(fe){this.nativeRange.surroundContents(fe),Re(this)},pe.collapse=function(fe){this.nativeRange.collapse(fe),Re(this)},pe.cloneRange=function(){return new ee(this.nativeRange.cloneRange())},pe.refresh=function(){Re(this)},pe.toString=function(){return this.nativeRange.toString()};var Je=document.createTextNode("test");ke(document).appendChild(Je);var at=document.createRange();at.setStart(Je,0),at.setEnd(Je,0);try{at.setStart(Je,1),pe.setStart=function(fe,De){this.nativeRange.setStart(fe,De),Re(this)},pe.setEnd=function(fe,De){this.nativeRange.setEnd(fe,De),Re(this)},Ke=function(fe){return function(De){this.nativeRange[fe](De),Re(this)}}}catch{pe.setStart=function(De,ce){try{this.nativeRange.setStart(De,ce)}catch{this.nativeRange.setEnd(De,ce),this.nativeRange.setStart(De,ce)}Re(this)},pe.setEnd=function(De,ce){try{this.nativeRange.setEnd(De,ce)}catch{this.nativeRange.setStart(De,ce),this.nativeRange.setEnd(De,ce)}Re(this)},Ke=function(De,ce){return function(qe){try{this.nativeRange[De](qe)}catch{this.nativeRange[ce](qe),this.nativeRange[De](qe)}Re(this)}}}pe.setStartBefore=Ke("setStartBefore","setEndBefore"),pe.setStartAfter=Ke("setStartAfter","setEndAfter"),pe.setEndBefore=Ke("setEndBefore","setStartBefore"),pe.setEndAfter=Ke("setEndAfter","setStartAfter"),pe.selectNodeContents=function(fe){this.setStartAndEnd(fe,0,$e.getNodeLength(fe))},at.selectNodeContents(Je),at.setEnd(Je,3);var kt=document.createRange();kt.selectNodeContents(Je),kt.setEnd(Je,4),kt.setStart(Je,2),at.compareBoundaryPoints(at.START_TO_END,kt)==-1&&at.compareBoundaryPoints(at.END_TO_START,kt)==1?pe.compareBoundaryPoints=function(fe,De){return De=De.nativeRange||De,fe==De.START_TO_END?fe=De.END_TO_START:fe==De.END_TO_START&&(fe=De.START_TO_END),this.nativeRange.compareBoundaryPoints(fe,De)}:pe.compareBoundaryPoints=function(fe,De){return this.nativeRange.compareBoundaryPoints(fe,De.nativeRange||De)};var jt=document.createElement("div");jt.innerHTML="123";var Pe=jt.firstChild,nt=ke(document);nt.appendChild(jt),at.setStart(Pe,1),at.setEnd(Pe,2),at.deleteContents(),Pe.data=="13"&&(pe.deleteContents=function(){this.nativeRange.deleteContents(),Re(this)},pe.extractContents=function(){var fe=this.nativeRange.extractContents();return Re(this),fe}),nt.removeChild(jt),nt=null,Me.isHostMethod(at,"createContextualFragment")&&(pe.createContextualFragment=function(fe){return this.nativeRange.createContextualFragment(fe)}),ke(document).removeChild(Je),pe.getName=function(){return"WrappedRange"},U.WrappedRange=ee,U.createNativeRange=function(fe){return fe=Ie(fe,ie,"createNativeRange"),fe.createRange()}}(),U.features.implementsTextRange){var ye=function(pe){var Oe=pe.parentElement(),Re=pe.duplicate();Re.collapse(!0);var je=Re.parentElement();Re=pe.duplicate(),Re.collapse(!1);var Ke=Re.parentElement(),Je=je==Ke?je:$e.getCommonAncestor(je,Ke);return Je==Oe?Je:$e.getCommonAncestor(Oe,Je)},Ae=function(pe){return pe.compareEndPoints("StartToEnd",pe)==0},Z=function(pe,Oe,Re,je,Ke){var Je=pe.duplicate();Je.collapse(Re);var at=Je.parentElement();if($e.isOrIsAncestorOf(Oe,at)||(at=Oe),!at.canHaveHTML){var kt=new q(at.parentNode,$e.getNodeIndex(at));return{boundaryPosition:kt,nodeInfo:{nodeIndex:kt.offset,containerElement:kt.node}}}var jt=$e.getDocument(at).createElement("span");jt.parentNode&&$e.removeNode(jt);for(var Pe,nt=Re?"StartToStart":"StartToEnd",fe,De,ce,qe,Mt=Ke&&Ke.containerElement==at?Ke.nodeIndex:0,Zt=at.childNodes.length,Sn=Zt,kr=Sn;kr==Zt?at.appendChild(jt):at.insertBefore(jt,at.childNodes[kr]),Je.moveToElementText(jt),Pe=Je.compareEndPoints(nt,pe),!(Pe==0||Mt==Sn);){if(Pe==-1){if(Sn==Mt+1)break;Mt=kr}else Sn=Sn==Mt+1?Mt:kr;kr=Math.floor((Mt+Sn)/2),at.removeChild(jt)}if(qe=jt.nextSibling,Pe==-1&&qe&&se(qe)){Je.setEndPoint(Re?"EndToStart":"EndToEnd",pe);var zn;if(/[\r\n]/.test(qe.data)){var Ln=Je.duplicate(),Yt=Ln.text.replace(/\r\n/g,"\r").length;for(zn=Ln.moveStart("character",Yt);(Pe=Ln.compareEndPoints("StartToEnd",Ln))==-1;)zn++,Ln.moveStart("character",1)}else zn=Je.text.length;ce=new q(qe,zn)}else fe=(je||!Re)&&jt.previousSibling,De=(je||Re)&&jt.nextSibling,De&&se(De)?ce=new q(De,0):fe&&se(fe)?ce=new q(fe,fe.data.length):ce=new q(at,$e.getNodeIndex(jt));return $e.removeNode(jt),{boundaryPosition:ce,nodeInfo:{nodeIndex:kr,containerElement:at}}},te=function(pe,Oe){var Re,je,Ke=pe.offset,Je=$e.getDocument(pe.node),at,kt,jt=ke(Je).createTextRange(),Pe=se(pe.node);return Pe?(Re=pe.node,je=Re.parentNode):(kt=pe.node.childNodes,Re=Ke<kt.length?kt[Ke]:null,je=pe.node),at=Je.createElement("span"),at.innerHTML="&#feff;",Re?je.insertBefore(at,Re):je.appendChild(at),jt.moveToElementText(at),jt.collapse(!Oe),je.removeChild(at),Pe&&jt[Oe?"moveStart":"moveEnd"]("character",Ke),jt};he=function(pe){this.textRange=pe,this.refresh()},he.prototype=new de(document),he.prototype.refresh=function(){var pe,Oe,Re,je=ye(this.textRange);Ae(this.textRange)?Oe=pe=Z(this.textRange,je,!0,!0).boundaryPosition:(Re=Z(this.textRange,je,!0,!1),pe=Re.boundaryPosition,Oe=Z(this.textRange,je,!1,!1,Re.nodeInfo).boundaryPosition),this.setStart(pe.node,pe.offset),this.setEnd(Oe.node,Oe.offset)},he.prototype.getName=function(){return"WrappedTextRange"},de.copyComparisonConstants(he);var le=function(pe){if(pe.collapsed)return te(new q(pe.startContainer,pe.startOffset),!0);var Oe=te(new q(pe.startContainer,pe.startOffset),!0),Re=te(new q(pe.endContainer,pe.endOffset),!1),je=ke(de.getRangeDocument(pe)).createTextRange();return je.setEndPoint("StartToStart",Oe),je.setEndPoint("EndToEnd",Re),je};if(he.rangeToTextRange=le,he.prototype.toTextRange=function(){return le(this)},U.WrappedTextRange=he,!U.features.implementsDomRange||U.config.preferTextRange){var Te=function(pe){return pe("return this;")()}(Function);typeof Te.Range=="undefined"&&(Te.Range=he),U.createNativeRange=function(pe){return pe=Ie(pe,ie,"createNativeRange"),ke(pe).createTextRange()},U.WrappedRange=he}}U.createRange=function(pe){return pe=Ie(pe,ie,"createRange"),new U.WrappedRange(U.createNativeRange(pe))},U.createRangyRange=function(pe){return pe=Ie(pe,ie,"createRangyRange"),new de(pe)},Me.createAliasForDeprecatedMethod(U,"createIframeRange","createRange"),Me.createAliasForDeprecatedMethod(U,"createIframeRangyRange","createRangyRange"),U.addShimListener(function(pe){var Oe=pe.document;typeof Oe.createRange=="undefined"&&(Oe.createRange=function(){return U.createRange(Oe)}),Oe=pe=null})}),C.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function(U,ie){U.config.checkSelectionRanges=!0;var ee="boolean",he="number",$e=U.dom,Me=U.util,q=Me.isHostMethod,de=U.DomRange,ke=U.WrappedRange,Ie=U.DOMException,se=$e.DomPosition,ye,Ae,Z=U.features,te="Control",le=$e.getDocument,Te=$e.getBody,pe=de.rangesEqual;function Oe(ae){return typeof ae=="string"?/^backward(s)?$/i.test(ae):!!ae}function Re(ae,Le){if(ae){if($e.isWindow(ae))return ae;if(ae instanceof _r)return ae.win;var gt=$e.getContentDocument(ae,ie,Le);return $e.getWindow(gt)}else return window}function je(ae){return Re(ae,"getWinSelection").getSelection()}function Ke(ae){return Re(ae,"getDocSelection").document.selection}function Je(ae){var Le=!1;return ae.anchorNode&&(Le=$e.comparePoints(ae.anchorNode,ae.anchorOffset,ae.focusNode,ae.focusOffset)==1),Le}var at=q(window,"getSelection"),kt=Me.isHostObject(document,"selection");Z.implementsWinGetSelection=at,Z.implementsDocSelection=kt;var jt=kt&&(!at||U.config.preferTextRange);if(jt)ye=Ke,U.isSelectionValid=function(ae){var Le=Re(ae,"isSelectionValid").document,gt=Le.selection;return gt.type!="None"||le(gt.createRange().parentElement())==Le};else if(at)ye=je,U.isSelectionValid=function(){return!0};else return ie.fail("Neither document.selection or window.getSelection() detected."),!1;U.getNativeSelection=ye;var Pe=ye();if(!Pe)return ie.fail("Native selection was null (possibly issue 138?)"),!1;var nt=U.createNativeRange(document),fe=Te(document),De=Me.areHostProperties(Pe,["anchorNode","focusNode","anchorOffset","focusOffset"]);Z.selectionHasAnchorAndFocus=De;var ce=q(Pe,"extend");Z.selectionHasExtend=ce;var qe=q(Pe,"setBaseAndExtent");Z.selectionHasSetBaseAndExtent=qe;var Mt=typeof Pe.rangeCount==he;Z.selectionHasRangeCount=Mt;var Zt=!1,Sn=!0,kr=ce?function(ae,Le){var gt=de.getRangeDocument(Le),Bt=U.createRange(gt);Bt.collapseToPoint(Le.endContainer,Le.endOffset),ae.addRange(dn(Bt)),ae.extend(Le.startContainer,Le.startOffset)}:null;Me.areHostMethods(Pe,["addRange","getRangeAt","removeAllRanges"])&&typeof Pe.rangeCount==he&&Z.implementsDomRange&&function(){var ae=window.getSelection();if(ae){for(var Le=ae.rangeCount,gt=Le>1,Bt=[],kn=Je(ae),gr=0;gr<Le;++gr)Bt[gr]=ae.getRangeAt(gr);var Ei=$e.createTestElement(document,"",!1),ve=Ei.appendChild(document.createTextNode("\xA0\xA0\xA0")),We=document.createRange();if(We.setStart(ve,1),We.collapse(!0),ae.removeAllRanges(),ae.addRange(We),Sn=ae.rangeCount==1,ae.removeAllRanges(),!gt){var wt=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(wt&&parseInt(wt[1])>=36)Zt=!1;else{var Lt=We.cloneRange();We.setStart(ve,0),Lt.setEnd(ve,3),Lt.setStart(ve,2),ae.addRange(We),ae.addRange(Lt),Zt=ae.rangeCount==2}}for($e.removeNode(Ei),ae.removeAllRanges(),gr=0;gr<Le;++gr)gr==0&&kn?kr?kr(ae,Bt[gr]):(U.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),ae.addRange(Bt[gr])):ae.addRange(Bt[gr])}}(),Z.selectionSupportsMultipleRanges=Zt,Z.collapsedNonEditableSelectionsSupported=Sn;var zn=!1,Ln;fe&&q(fe,"createControlRange")&&(Ln=fe.createControlRange(),Me.areHostProperties(Ln,["item","add"])&&(zn=!0)),Z.implementsControlRange=zn,De?Ae=function(ae){return ae.anchorNode===ae.focusNode&&ae.anchorOffset===ae.focusOffset}:Ae=function(ae){return ae.rangeCount?ae.getRangeAt(ae.rangeCount-1).collapsed:!1};function Yt(ae,Le,gt){var Bt=gt?"end":"start",kn=gt?"start":"end";ae.anchorNode=Le[Bt+"Container"],ae.anchorOffset=Le[Bt+"Offset"],ae.focusNode=Le[kn+"Container"],ae.focusOffset=Le[kn+"Offset"]}function Ge(ae){var Le=ae.nativeSelection;ae.anchorNode=Le.anchorNode,ae.anchorOffset=Le.anchorOffset,ae.focusNode=Le.focusNode,ae.focusOffset=Le.focusOffset}function $t(ae){ae.anchorNode=ae.focusNode=null,ae.anchorOffset=ae.focusOffset=0,ae.rangeCount=0,ae.isCollapsed=!0,ae._ranges.length=0,bn(ae)}function bn(ae){ae.type=ae.rangeCount==0?"None":Ae(ae)?"Caret":"Range"}function dn(ae){var Le;return ae instanceof de?(Le=U.createNativeRange(ae.getDocument()),Le.setEnd(ae.endContainer,ae.endOffset),Le.setStart(ae.startContainer,ae.startOffset)):ae instanceof ke?Le=ae.nativeRange:Z.implementsDomRange&&ae instanceof $e.getWindow(ae.startContainer).Range&&(Le=ae),Le}function Pr(ae){if(!ae.length||ae[0].nodeType!=1)return!1;for(var Le=1,gt=ae.length;Le<gt;++Le)if(!$e.isAncestorOf(ae[0],ae[Le]))return!1;return!0}function Jn(ae){var Le=ae.getNodes();if(!Pr(Le))throw ie.createError("getSingleElementFromRange: range "+ae.inspect()+" did not consist of a single element");return Le[0]}function Xi(ae){return!!ae&&typeof ae.text!="undefined"}function Ji(ae,Le){var gt=new ke(Le);ae._ranges=[gt],Yt(ae,gt,!1),ae.rangeCount=1,ae.isCollapsed=gt.collapsed,bn(ae)}function si(ae){if(ae._ranges.length=0,ae.docSelection.type=="None")$t(ae);else{var Le=ae.docSelection.createRange();if(Xi(Le))Ji(ae,Le);else{ae.rangeCount=Le.length;for(var gt,Bt=le(Le.item(0)),kn=0;kn<ae.rangeCount;++kn)gt=U.createRange(Bt),gt.selectNode(Le.item(kn)),ae._ranges.push(gt);ae.isCollapsed=ae.rangeCount==1&&ae._ranges[0].collapsed,Yt(ae,ae._ranges[ae.rangeCount-1],!1),bn(ae)}}}function Vs(ae,Le){for(var gt=ae.docSelection.createRange(),Bt=Jn(Le),kn=le(gt.item(0)),gr=Te(kn).createControlRange(),Ei=0,ve=gt.length;Ei<ve;++Ei)gr.add(gt.item(Ei));try{gr.add(Bt)}catch{throw ie.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}gr.select(),si(ae)}var cs;q(Pe,"getRangeAt")?cs=function(ae,Le){try{return ae.getRangeAt(Le)}catch{return null}}:De&&(cs=function(ae){var Le=le(ae.anchorNode),gt=U.createRange(Le);return gt.setStartAndEnd(ae.anchorNode,ae.anchorOffset,ae.focusNode,ae.focusOffset),gt.collapsed!==this.isCollapsed&>.setStartAndEnd(ae.focusNode,ae.focusOffset,ae.anchorNode,ae.anchorOffset),gt});function _r(ae,Le,gt){this.nativeSelection=ae,this.docSelection=Le,this._ranges=[],this.win=gt,this.refresh()}_r.prototype=U.selectionPrototype;function $l(ae){ae.win=ae.anchorNode=ae.focusNode=ae._ranges=null,ae.rangeCount=ae.anchorOffset=ae.focusOffset=0,ae.detached=!0,bn(ae)}var ca=[];function ot(ae,Le){for(var gt=ca.length,Bt,kn;gt--;)if(Bt=ca[gt],kn=Bt.selection,Le=="deleteAll")$l(kn);else if(Bt.win==ae)return Le=="delete"?(ca.splice(gt,1),!0):kn;return Le=="deleteAll"&&(ca.length=0),null}var Rt=function(ae){if(ae&&ae instanceof _r)return ae.refresh(),ae;ae=Re(ae,"getNativeSelection");var Le=ot(ae),gt=ye(ae),Bt=kt?Ke(ae):null;return Le?(Le.nativeSelection=gt,Le.docSelection=Bt,Le.refresh()):(Le=new _r(gt,Bt,ae),ca.push({win:ae,selection:Le})),Le};U.getSelection=Rt,Me.createAliasForDeprecatedMethod(U,"getIframeSelection","getSelection");var Nt=_r.prototype;function Br(ae,Le){for(var gt=le(Le[0].startContainer),Bt=Te(gt).createControlRange(),kn=0,gr,Ei=Le.length;kn<Ei;++kn){gr=Jn(Le[kn]);try{Bt.add(gr)}catch{throw ie.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}Bt.select(),si(ae)}if(!jt&&De&&Me.areHostMethods(Pe,["removeAllRanges","addRange"])){Nt.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),$t(this)};var gi=function(ae,Le){kr(ae.nativeSelection,Le),ae.refresh()};Mt?Nt.addRange=function(ae,Le){if(zn&&kt&&this.docSelection.type==te)Vs(this,ae);else if(Oe(Le)&&ce)gi(this,ae);else{var gt;Zt?gt=this.rangeCount:(this.removeAllRanges(),gt=0);var Bt=dn(ae).cloneRange();try{this.nativeSelection.addRange(Bt)}catch{}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==gt+1){if(U.config.checkSelectionRanges){var kn=cs(this.nativeSelection,this.rangeCount-1);kn&&!pe(kn,ae)&&(ae=new ke(kn))}this._ranges[this.rangeCount-1]=ae,Yt(this,ae,eo(this.nativeSelection)),this.isCollapsed=Ae(this),bn(this)}else this.refresh()}}:Nt.addRange=function(ae,Le){Oe(Le)&&ce?gi(this,ae):(this.nativeSelection.addRange(dn(ae)),this.refresh())},Nt.setRanges=function(ae){if(zn&&kt&&ae.length>1)Br(this,ae);else{this.removeAllRanges();for(var Le=0,gt=ae.length;Le<gt;++Le)this.addRange(ae[Le])}}}else if(q(Pe,"empty")&&q(nt,"select")&&zn&&jt)Nt.removeAllRanges=function(){try{if(this.docSelection.empty(),this.docSelection.type!="None"){var ae;if(this.anchorNode)ae=le(this.anchorNode);else if(this.docSelection.type==te){var Le=this.docSelection.createRange();Le.length&&(ae=le(Le.item(0)))}if(ae){var gt=Te(ae).createTextRange();gt.select(),this.docSelection.empty()}}}catch{}$t(this)},Nt.addRange=function(ae){this.docSelection.type==te?Vs(this,ae):(U.WrappedTextRange.rangeToTextRange(ae).select(),this._ranges[0]=ae,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,Yt(this,ae,!1),bn(this))},Nt.setRanges=function(ae){this.removeAllRanges();var Le=ae.length;Le>1?Br(this,ae):Le&&this.addRange(ae[0])};else return ie.fail("No means of selecting a Range or TextRange was found"),!1;Nt.getRangeAt=function(ae){if(ae<0||ae>=this.rangeCount)throw new Ie("INDEX_SIZE_ERR");return this._ranges[ae].cloneRange()};var ho;if(jt)ho=function(ae){var Le;U.isSelectionValid(ae.win)?Le=ae.docSelection.createRange():(Le=Te(ae.win.document).createTextRange(),Le.collapse(!0)),ae.docSelection.type==te?si(ae):Xi(Le)?Ji(ae,Le):$t(ae)};else if(q(Pe,"getRangeAt")&&typeof Pe.rangeCount==he)ho=function(ae){if(zn&&kt&&ae.docSelection.type==te)si(ae);else if(ae._ranges.length=ae.rangeCount=ae.nativeSelection.rangeCount,ae.rangeCount){for(var Le=0,gt=ae.rangeCount;Le<gt;++Le)ae._ranges[Le]=new U.WrappedRange(ae.nativeSelection.getRangeAt(Le));Yt(ae,ae._ranges[ae.rangeCount-1],eo(ae.nativeSelection)),ae.isCollapsed=Ae(ae),bn(ae)}else $t(ae)};else if(De&&typeof Pe.isCollapsed==ee&&typeof nt.collapsed==ee&&Z.implementsDomRange)ho=function(ae){var Le,gt=ae.nativeSelection;gt.anchorNode?(Le=cs(gt,0),ae._ranges=[Le],ae.rangeCount=1,Ge(ae),ae.isCollapsed=Ae(ae),bn(ae)):$t(ae)};else return ie.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;Nt.refresh=function(ae){var Le=ae?this._ranges.slice(0):null,gt=this.anchorNode,Bt=this.anchorOffset;if(ho(this),ae){var kn=Le.length;if(kn!=this._ranges.length||this.anchorNode!=gt||this.anchorOffset!=Bt)return!0;for(;kn--;)if(!pe(Le[kn],this._ranges[kn]))return!0;return!1}};var Eo=function(ae,Le){var gt=ae.getAllRanges();ae.removeAllRanges();for(var Bt=0,kn=gt.length;Bt<kn;++Bt)pe(Le,gt[Bt])||ae.addRange(gt[Bt]);ae.rangeCount||$t(ae)};zn&&kt?Nt.removeRange=function(ae){if(this.docSelection.type==te){for(var Le=this.docSelection.createRange(),gt=Jn(ae),Bt=le(Le.item(0)),kn=Te(Bt).createControlRange(),gr,Ei=!1,ve=0,We=Le.length;ve<We;++ve)gr=Le.item(ve),gr!==gt||Ei?kn.add(Le.item(ve)):Ei=!0;kn.select(),si(this)}else Eo(this,ae)}:Nt.removeRange=function(ae){Eo(this,ae)};var eo;!jt&&De&&Z.implementsDomRange?(eo=Je,Nt.isBackward=function(){return eo(this)}):eo=Nt.isBackward=function(){return!1},Nt.isBackwards=Nt.isBackward,Nt.toString=function(){for(var ae=[],Le=0,gt=this.rangeCount;Le<gt;++Le)ae[Le]=""+this._ranges[Le];return ae.join("")};function To(ae,Le){if(ae.win.document!=le(Le))throw new Ie("WRONG_DOCUMENT_ERR")}function ds(ae,Le){if(Le<0||Le>($e.isCharacterDataNode(ae)?ae.length:ae.childNodes.length))throw new Ie("INDEX_SIZE_ERR")}Nt.collapse=function(ae,Le){To(this,ae);var gt=U.createRange(ae);gt.collapseToPoint(ae,Le),this.setSingleRange(gt),this.isCollapsed=!0},Nt.collapseToStart=function(){if(this.rangeCount){var ae=this._ranges[0];this.collapse(ae.startContainer,ae.startOffset)}else throw new Ie("INVALID_STATE_ERR")},Nt.collapseToEnd=function(){if(this.rangeCount){var ae=this._ranges[this.rangeCount-1];this.collapse(ae.endContainer,ae.endOffset)}else throw new Ie("INVALID_STATE_ERR")},Nt.selectAllChildren=function(ae){To(this,ae);var Le=U.createRange(ae);Le.selectNodeContents(ae),this.setSingleRange(Le)},qe?Nt.setBaseAndExtent=function(ae,Le,gt,Bt){this.nativeSelection.setBaseAndExtent(ae,Le,gt,Bt),this.refresh()}:ce&&(Nt.setBaseAndExtent=function(ae,Le,gt,Bt){ds(ae,Le),ds(gt,Bt),To(this,ae),To(this,gt);var kn=U.createRange(node),gr=$e.comparePoints(ae,Le,gt,Bt)==-1;gr?kn.setStartAndEnd(gt,Bt,ae,Le):kn.setStartAndEnd(ae,Le,gt,Bt),this.setSingleRange(kn,gr)}),Nt.deleteFromDocument=function(){if(zn&&kt&&this.docSelection.type==te){for(var ae=this.docSelection.createRange(),Le;ae.length;)Le=ae.item(0),ae.remove(Le),$e.removeNode(Le);this.refresh()}else if(this.rangeCount){var gt=this.getAllRanges();if(gt.length){this.removeAllRanges();for(var Bt=0,kn=gt.length;Bt<kn;++Bt)gt[Bt].deleteContents();this.addRange(gt[kn-1])}}},Nt.eachRange=function(ae,Le){for(var gt=0,Bt=this._ranges.length;gt<Bt;++gt)if(ae(this.getRangeAt(gt)))return Le},Nt.getAllRanges=function(){var ae=[];return this.eachRange(function(Le){ae.push(Le)}),ae},Nt.setSingleRange=function(ae,Le){this.removeAllRanges(),this.addRange(ae,Le)},Nt.callMethodOnEachRange=function(ae,Le){var gt=[];return this.eachRange(function(Bt){gt.push(Bt[ae].apply(Bt,Le||[]))}),gt};function tt(ae){return function(Le,gt){var Bt;this.rangeCount?(Bt=this.getRangeAt(0),Bt["set"+(ae?"Start":"End")](Le,gt)):(Bt=U.createRange(this.win.document),Bt.setStartAndEnd(Le,gt)),this.setSingleRange(Bt,this.isBackward())}}Nt.setStart=tt(!0),Nt.setEnd=tt(!1),U.rangePrototype.select=function(ae){Rt(this.getDocument()).setSingleRange(this,ae)},Nt.changeEachRange=function(ae){var Le=[],gt=this.isBackward();this.eachRange(function(Bt){ae(Bt),Le.push(Bt)}),this.removeAllRanges(),gt&&Le.length==1?this.addRange(Le[0],"backward"):this.setRanges(Le)},Nt.containsNode=function(ae,Le){return this.eachRange(function(gt){return gt.containsNode(ae,Le)},!0)||!1},Nt.getBookmark=function(ae){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[ae])}},Nt.moveToBookmark=function(ae){for(var Le=[],gt=0,Bt,kn;Bt=ae.rangeBookmarks[gt++];)kn=U.createRange(this.win),kn.moveToBookmark(Bt),Le.push(kn);ae.backward?this.setSingleRange(Le[0],"backward"):this.setRanges(Le)},Nt.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},Nt.restoreRanges=function(ae){this.removeAllRanges();for(var Le=0,gt;gt=ae.ranges[Le];++Le)this.addRange(gt,ae.backward&&Le==0)},Nt.toHtml=function(){var ae=[];return this.eachRange(function(Le){ae.push(de.toHtml(Le))}),ae.join("")},Z.implementsTextRange&&(Nt.getNativeTextRange=function(){var ae;if(ae=this.docSelection){var Le=ae.createRange();if(Xi(Le))return Le;throw ie.createError("getNativeTextRange: selection is a control selection")}else{if(this.rangeCount>0)return U.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw ie.createError("getNativeTextRange: selection contains no range")}});function Dt(ae){var Le=[],gt=new se(ae.anchorNode,ae.anchorOffset),Bt=new se(ae.focusNode,ae.focusOffset),kn=typeof ae.getName=="function"?ae.getName():"Selection";if(typeof ae.rangeCount!="undefined")for(var gr=0,Ei=ae.rangeCount;gr<Ei;++gr)Le[gr]=de.inspect(ae.getRangeAt(gr));return"["+kn+"(Ranges: "+Le.join(", ")+")(anchor: "+gt.inspect()+", focus: "+Bt.inspect()+"]"}Nt.getName=function(){return"WrappedSelection"},Nt.inspect=function(){return Dt(this)},Nt.detach=function(){ot(this.win,"delete"),$l(this)},_r.detachAll=function(){ot(null,"deleteAll")},_r.inspect=Dt,_r.isDirectionBackward=Oe,U.Selection=_r,U.selectionPrototype=Nt,U.addShimListener(function(ae){typeof ae.getSelection=="undefined"&&(ae.getSelection=function(){return Rt(ae)}),ae=null})});var _e=!1,Ce=function(U){_e||(_e=!0,!C.initialized&&C.config.autoInitialize&&I())};return x&&(document.readyState=="complete"?Ce():(u(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",Ce,!1),$(window,"load",Ce))),C})})(KN);var yF=KN.exports,GUe={exports:{}};(function(t,e){(function(n,r){t.exports=n(KN.exports)})(function(n){return n.createModule("ClassApplier",["WrappedSelection"],function(r,i){var o=r.dom,a=o.DomPosition,s=o.arrayContains,l=r.util,u=l.forEach,c="span",d=l.isHostMethod(document,"createElementNS");function f(Z,te){for(var le in Z)if(Z.hasOwnProperty(le)&&te(le,Z[le])===!1)return!1;return!0}function h(Z){return Z.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function g(Z,te){return!!Z&&new RegExp("(?:^|\\s)"+te+"(?:\\s|$)").test(Z)}function m(Z,te){if(typeof Z.classList=="object")return Z.classList.contains(te);var le=typeof Z.className=="string",Te=le?Z.className:Z.getAttribute("class");return g(Te,te)}function y(Z,te){if(typeof Z.classList=="object")Z.classList.add(te);else{var le=typeof Z.className=="string",Te=le?Z.className:Z.getAttribute("class");Te?g(Te,te)||(Te+=" "+te):Te=te,le?Z.className=Te:Z.setAttribute("class",Te)}}var b=function(){function Z(te,le,Te){return le&&Te?" ":""}return function(te,le){if(typeof te.classList=="object")te.classList.remove(le);else{var Te=typeof te.className=="string",pe=Te?te.className:te.getAttribute("class");pe=pe.replace(new RegExp("(^|\\s)"+le+"(\\s|$)"),Z),Te?te.className=pe:te.setAttribute("class",pe)}}}();function w(Z){var te=typeof Z.className=="string";return te?Z.className:Z.getAttribute("class")}function O(Z){return Z&&Z.split(/\s+/).sort().join(" ")}function x(Z){return O(w(Z))}function S(Z,te){return x(Z)==x(te)}function C(Z,te){for(var le=te.split(/\s+/),Te=0,pe=le.length;Te<pe;++Te)if(!m(Z,h(le[Te])))return!1;return!0}function E(Z){var te=Z.parentNode;return te&&te.nodeType==1&&!/^(textarea|style|script|select|iframe)$/i.test(te.nodeName)}function T(Z,te,le,Te,pe){var Oe=Z.node,Re=Z.offset,je=Oe,Ke=Re;Oe==Te&&Re>pe&&++Ke,Oe==te&&(Re==le||Re==le+1)&&(je=Te,Ke+=pe-le),Oe==te&&Re>le+1&&--Ke,Z.node=je,Z.offset=Ke}function P(Z,te,le){Z.node==te&&Z.offset>le&&--Z.offset}function A(Z,te,le,Te){le==-1&&(le=te.childNodes.length);var pe=Z.parentNode,Oe=o.getNodeIndex(Z);u(Te,function(Re){T(Re,pe,Oe,te,le)}),te.childNodes.length==le?te.appendChild(Z):te.insertBefore(Z,te.childNodes[le])}function D(Z,te){var le=Z.parentNode,Te=o.getNodeIndex(Z);u(te,function(pe){P(pe,le,Te)}),o.removeNode(Z)}function $(Z,te,le,Te,pe){for(var Oe,Re=[];Oe=Z.firstChild;)A(Oe,te,le++,pe),Re.push(Oe);return Te&&D(Z,pe),Re}function N(Z,te){return $(Z,Z.parentNode,o.getNodeIndex(Z),!0,te)}function z(Z,te){var le=Z.cloneRange();le.selectNodeContents(te);var Te=le.intersection(Z),pe=Te?Te.toString():"";return pe!=""}function I(Z){for(var te=Z.getNodes([3]),le=0,Te;(Te=te[le])&&!z(Z,Te);)++le;for(var pe=te.length-1;(Te=te[pe])&&!z(Z,Te);)--pe;return te.slice(le,pe+1)}function L(Z,te){if(Z.attributes.length!=te.attributes.length)return!1;for(var le=0,Te=Z.attributes.length,pe,Oe,Re;le<Te;++le)if(pe=Z.attributes[le],Re=pe.name,Re!="class"&&(Oe=te.attributes.getNamedItem(Re),pe===null!=(Oe===null)||pe.specified!=Oe.specified||pe.specified&&pe.nodeValue!==Oe.nodeValue))return!1;return!0}function X(Z,te){for(var le=0,Te=Z.attributes.length,pe;le<Te;++le)if(pe=Z.attributes[le].name,!(te&&s(te,pe))&&Z.attributes[le].specified&&pe!="class")return!0;return!1}var Q=o.getComputedStyleProperty,W=function(){var Z=document.createElement("div");return typeof Z.isContentEditable=="boolean"?function(te){return te&&te.nodeType==1&&te.isContentEditable}:function(te){return!te||te.nodeType!=1||te.contentEditable=="false"?!1:te.contentEditable=="true"||W(te.parentNode)}}();function G(Z){var te;return Z&&Z.nodeType==1&&((te=Z.parentNode)&&te.nodeType==9&&te.designMode=="on"||W(Z)&&!W(Z.parentNode))}function K(Z){return(W(Z)||Z.nodeType!=1&&W(Z.parentNode))&&!G(Z)}var oe=/^inline(-block|-table)?$/i;function ne(Z){return Z&&Z.nodeType==1&&!oe.test(Q(Z,"display"))}var _e=/[^\r\n\t\f \u200B]/;function Ce(Z){if(Z.data.length==0)return!0;if(_e.test(Z.data))return!1;var te=Q(Z.parentNode,"whiteSpace");switch(te){case"pre":case"pre-wrap":case"-moz-pre-wrap":return!1;case"pre-line":if(/[\r\n]/.test(Z.data))return!1}return ne(Z.previousSibling)||ne(Z.nextSibling)}function U(Z){var te=[],le,Te;for(le=0;Te=Z[le++];)te.push(new a(Te.startContainer,Te.startOffset),new a(Te.endContainer,Te.endOffset));return te}function ie(Z,te){for(var le=0,Te,pe,Oe,Re=Z.length;le<Re;++le)Te=Z[le],pe=te[le*2],Oe=te[le*2+1],Te.setStartAndEnd(pe.node,pe.offset,Oe.node,Oe.offset)}function ee(Z,te){return o.isCharacterDataNode(Z)?te==0?!!Z.previousSibling:te==Z.length?!!Z.nextSibling:!0:te>0&&te<Z.childNodes.length}function he(Z,te,le,Te){var pe,Oe,Re=le==0;if(o.isAncestorOf(te,Z))return Z;if(o.isCharacterDataNode(te)){var je=o.getNodeIndex(te);if(le==0)le=je;else if(le==te.length)le=je+1;else throw i.createError("splitNodeAt() should not be called with offset in the middle of a data node ("+le+" in "+te.data);te=te.parentNode}if(ee(te,le)){pe=te.cloneNode(!1),Oe=te.parentNode,pe.id&&pe.removeAttribute("id");for(var Ke,Je=0;Ke=te.childNodes[le];)A(Ke,pe,Je++,Te);return A(pe,Oe,o.getNodeIndex(te)+1,Te),te==Z?pe:he(Z,Oe,o.getNodeIndex(pe),Te)}else if(Z!=te){pe=te.parentNode;var at=o.getNodeIndex(te);return Re||at++,he(Z,pe,at,Te)}return Z}function $e(Z,te){return Z.namespaceURI==te.namespaceURI&&Z.tagName.toLowerCase()==te.tagName.toLowerCase()&&S(Z,te)&&L(Z,te)&&Q(Z,"display")=="inline"&&Q(te,"display")=="inline"}function Me(Z){var te=Z?"nextSibling":"previousSibling";return function(le,Te){var pe=le.parentNode,Oe=le[te];if(Oe){if(Oe&&Oe.nodeType==3)return Oe}else if(Te&&(Oe=pe[te],Oe&&Oe.nodeType==1&&$e(pe,Oe))){var Re=Oe[Z?"firstChild":"lastChild"];if(Re&&Re.nodeType==3)return Re}return null}}var q=Me(!1),de=Me(!0);function ke(Z){this.isElementMerge=Z.nodeType==1,this.textNodes=[];var te=this.isElementMerge?Z.lastChild:Z;te&&(this.textNodes[0]=te)}ke.prototype={doMerge:function(Z){var te=this.textNodes,le=te[0];if(te.length>1){var Te=o.getNodeIndex(le),pe=[],Oe=0,Re;u(te,function(je,Ke){Re=je.parentNode,Ke>0&&(Re.removeChild(je),Re.hasChildNodes()||o.removeNode(Re),Z&&u(Z,function(Je){Je.node==je&&(Je.node=le,Je.offset+=Oe),Je.node==Re&&Je.offset>Te&&(--Je.offset,Je.offset==Te+1&&Ke<te.length-1&&(Je.node=le,Je.offset=Oe))})),pe[Ke]=je.data,Oe+=je.data.length}),le.data=pe.join("")}return le.data},getLength:function(){for(var Z=this.textNodes.length,te=0;Z--;)te+=this.textNodes[Z].length;return te},toString:function(){var Z=[];return u(this.textNodes,function(te,le){Z[le]="'"+te.data+"'"}),"[Merge("+Z.join(",")+")]"}};var Ie=["elementTagName","ignoreWhiteSpace","applyToEditableOnly","useExistingElements","removeEmptyElements","onElementCreate"],se={};function ye(Z,te,le){var Te,pe,Oe,Re,je=this;je.cssClass=je.className=Z;var Ke=null,Je={};if(typeof te=="object"&&te!==null){for(typeof te.elementTagName!="undefined"&&(te.elementTagName=te.elementTagName.toLowerCase()),le=te.tagNames,Ke=te.elementProperties,Je=te.elementAttributes,pe=0;Re=Ie[pe++];)te.hasOwnProperty(Re)&&(je[Re]=te[Re]);Te=te.normalize}else Te=te;je.normalize=typeof Te=="undefined"?!0:Te,je.attrExceptions=[];var at=document.createElement(je.elementTagName);je.elementProperties=je.copyPropertiesToElement(Ke,at,!0),f(Je,function(jt,Pe){je.attrExceptions.push(jt),Je[jt]=""+Pe}),je.elementAttributes=Je,je.elementSortedClassName=je.elementProperties.hasOwnProperty("className")?O(je.elementProperties.className+" "+Z):Z,je.applyToAnyTagName=!1;var kt=typeof le;if(kt=="string")le=="*"?je.applyToAnyTagName=!0:je.tagNames=h(le.toLowerCase()).split(/\s*,\s*/);else if(kt=="object"&&typeof le.length=="number")for(je.tagNames=[],pe=0,Oe=le.length;pe<Oe;++pe)le[pe]=="*"?je.applyToAnyTagName=!0:je.tagNames.push(le[pe].toLowerCase());else je.tagNames=[je.elementTagName]}ye.prototype={elementTagName:c,elementProperties:{},elementAttributes:{},ignoreWhiteSpace:!0,applyToEditableOnly:!1,useExistingElements:!0,removeEmptyElements:!0,onElementCreate:null,copyPropertiesToElement:function(Z,te,le){var Te,pe,Oe={},Re,je,Ke,Je;for(var at in Z)if(Z.hasOwnProperty(at))if(je=Z[at],Ke=te[at],at=="className")y(te,je),y(te,this.className),te[at]=O(te[at]),le&&(Oe[at]=je);else if(at=="style"){pe=Ke,le&&(Oe[at]=Re={});for(Te in Z[at])Z[at].hasOwnProperty(Te)&&(pe[Te]=je[Te],le&&(Re[Te]=pe[Te]));this.attrExceptions.push(at)}else te[at]=je,le&&(Oe[at]=te[at],Je=se.hasOwnProperty(at)?se[at]:at,this.attrExceptions.push(Je));return le?Oe:""},copyAttributesToElement:function(Z,te){for(var le in Z)Z.hasOwnProperty(le)&&!/^class(?:Name)?$/i.test(le)&&te.setAttribute(le,Z[le])},appliesToElement:function(Z){return s(this.tagNames,Z.tagName.toLowerCase())},getEmptyElements:function(Z){var te=this;return Z.getNodes([1],function(le){return te.appliesToElement(le)&&!le.hasChildNodes()})},hasClass:function(Z){return Z.nodeType==1&&(this.applyToAnyTagName||this.appliesToElement(Z))&&m(Z,this.className)},getSelfOrAncestorWithClass:function(Z){for(;Z;){if(this.hasClass(Z))return Z;Z=Z.parentNode}return null},isModifiable:function(Z){return!this.applyToEditableOnly||K(Z)},isIgnorableWhiteSpaceNode:function(Z){return this.ignoreWhiteSpace&&Z&&Z.nodeType==3&&Ce(Z)},postApply:function(Z,te,le,Te){var pe=Z[0],Oe=Z[Z.length-1],Re=[],je,Ke=pe,Je=Oe,at=0,kt=Oe.length,jt;u(Z,function(De){jt=q(De,!Te),jt?(je||(je=new ke(jt),Re.push(je)),je.textNodes.push(De),De===pe&&(Ke=je.textNodes[0],at=Ke.length),De===Oe&&(Je=je.textNodes[0],kt=je.getLength())):je=null});var Pe=de(Oe,!Te);if(Pe&&(je||(je=new ke(Oe),Re.push(je)),je.textNodes.push(Pe)),Re.length){for(var nt=0,fe=Re.length;nt<fe;++nt)Re[nt].doMerge(le);te.setStartAndEnd(Ke,at,Je,kt)}},createContainer:function(Z){var te=o.getDocument(Z),le=d&&!o.isHtmlNamespace(Z)&&Z.namespaceURI?te.createElementNS(Z.namespaceURI,this.elementTagName):te.createElement(this.elementTagName);return this.copyPropertiesToElement(this.elementProperties,le,!1),this.copyAttributesToElement(this.elementAttributes,le),y(le,this.className),this.onElementCreate&&this.onElementCreate(le,this),le},elementHasProperties:function(Z,te){var le=this;return f(te,function(Te,pe){if(Te=="className")return C(Z,pe);if(typeof pe=="object"){if(!le.elementHasProperties(Z[Te],pe))return!1}else if(Z[Te]!==pe)return!1})},elementHasAttributes:function(Z,te){return f(te,function(le,Te){if(Z.getAttribute(le)!==Te)return!1})},applyToTextNode:function(Z,te){if(E(Z)){var le=Z.parentNode;if(le.childNodes.length==1&&this.useExistingElements&&this.appliesToElement(le)&&this.elementHasProperties(le,this.elementProperties)&&this.elementHasAttributes(le,this.elementAttributes))y(le,this.className);else{var Te=Z.parentNode,pe=this.createContainer(Te);Te.insertBefore(pe,Z),pe.appendChild(Z)}}},isRemovable:function(Z){return Z.tagName.toLowerCase()==this.elementTagName&&x(Z)==this.elementSortedClassName&&this.elementHasProperties(Z,this.elementProperties)&&!X(Z,this.attrExceptions)&&this.elementHasAttributes(Z,this.elementAttributes)&&this.isModifiable(Z)},isEmptyContainer:function(Z){var te=Z.childNodes.length;return Z.nodeType==1&&this.isRemovable(Z)&&(te==0||te==1&&this.isEmptyContainer(Z.firstChild))},removeEmptyContainers:function(Z){var te=this,le=Z.getNodes([1],function(Oe){return te.isEmptyContainer(Oe)}),Te=[Z],pe=U(Te);u(le,function(Oe){D(Oe,pe)}),ie(Te,pe)},undoToTextNode:function(Z,te,le,Te){if(!te.containsNode(le)){var pe=te.cloneRange();pe.selectNode(le),pe.isPointInRange(te.endContainer,te.endOffset)&&(he(le,te.endContainer,te.endOffset,Te),te.setEndAfter(le)),pe.isPointInRange(te.startContainer,te.startOffset)&&(le=he(le,te.startContainer,te.startOffset,Te))}this.isRemovable(le)?N(le,Te):b(le,this.className)},splitAncestorWithClass:function(Z,te,le){var Te=this.getSelfOrAncestorWithClass(Z);Te&&he(Te,Z,te,le)},undoToAncestor:function(Z,te){this.isRemovable(Z)?N(Z,te):b(Z,this.className)},applyToRange:function(Z,te){var le=this;te=te||[];var Te=U(te||[]);Z.splitBoundariesPreservingPositions(Te),le.removeEmptyElements&&le.removeEmptyContainers(Z);var pe=I(Z);if(pe.length){u(pe,function(je){!le.isIgnorableWhiteSpaceNode(je)&&!le.getSelfOrAncestorWithClass(je)&&le.isModifiable(je)&&le.applyToTextNode(je,Te)});var Oe=pe[pe.length-1];Z.setStartAndEnd(pe[0],0,Oe,Oe.length),le.normalize&&le.postApply(pe,Z,Te,!1),ie(te,Te)}var Re=le.getEmptyElements(Z);u(Re,function(je){y(je,le.className)})},applyToRanges:function(Z){for(var te=Z.length;te--;)this.applyToRange(Z[te],Z);return Z},applyToSelection:function(Z){var te=r.getSelection(Z);te.setRanges(this.applyToRanges(te.getAllRanges()))},undoToRange:function(Z,te){var le=this;te=te||[];var Te=U(te);Z.splitBoundariesPreservingPositions(Te),le.removeEmptyElements&&le.removeEmptyContainers(Z,Te);var pe=I(Z),Oe,Re,je=pe[pe.length-1];if(pe.length){le.splitAncestorWithClass(Z.endContainer,Z.endOffset,Te),le.splitAncestorWithClass(Z.startContainer,Z.startOffset,Te);for(var Ke=0,Je=pe.length;Ke<Je;++Ke)Oe=pe[Ke],Re=le.getSelfOrAncestorWithClass(Oe),Re&&le.isModifiable(Oe)&&le.undoToAncestor(Re,Te);Z.setStartAndEnd(pe[0],0,je,je.length),le.normalize&&le.postApply(pe,Z,Te,!0),ie(te,Te)}var at=le.getEmptyElements(Z);u(at,function(kt){b(kt,le.className)})},undoToRanges:function(Z){for(var te=Z.length;te--;)this.undoToRange(Z[te],Z);return Z},undoToSelection:function(Z){var te=r.getSelection(Z),le=r.getSelection(Z).getAllRanges();this.undoToRanges(le),te.setRanges(le)},isAppliedToRange:function(Z){if(Z.collapsed||Z.toString()=="")return!!this.getSelfOrAncestorWithClass(Z.commonAncestorContainer);var te=Z.getNodes([3]);if(te.length){for(var le=0,Te;Te=te[le++];)if(!this.isIgnorableWhiteSpaceNode(Te)&&z(Z,Te)&&this.isModifiable(Te)&&!this.getSelfOrAncestorWithClass(Te))return!1}return!0},isAppliedToRanges:function(Z){var te=Z.length;if(te==0)return!1;for(;te--;)if(!this.isAppliedToRange(Z[te]))return!1;return!0},isAppliedToSelection:function(Z){var te=r.getSelection(Z);return this.isAppliedToRanges(te.getAllRanges())},toggleRange:function(Z){this.isAppliedToRange(Z)?this.undoToRange(Z):this.applyToRange(Z)},toggleSelection:function(Z){this.isAppliedToSelection(Z)?this.undoToSelection(Z):this.applyToSelection(Z)},getElementsWithClassIntersectingRange:function(Z){var te=[],le=this;return Z.getNodes([3],function(Te){var pe=le.getSelfOrAncestorWithClass(Te);pe&&!s(te,pe)&&te.push(pe)}),te},detach:function(){}};function Ae(Z,te,le){return new ye(Z,te,le)}ye.util={hasClass:m,addClass:y,removeClass:b,getClass:w,hasSameClasses:S,hasAllClasses:C,replaceWithOwnChildren:N,elementsHaveSameNonClassAttributes:L,elementHasNonClassAttributes:X,splitNodeAt:he,isEditableElement:W,isEditingHost:G,isEditable:K},r.CssClassApplier=r.ClassApplier=ye,r.createClassApplier=Ae,l.createAliasForDeprecatedMethod(r,"createCssClassApplier","createClassApplier",i)}),n})})(GUe);var bF={toolbar:{allowMultiParagraphSelection:!0,buttons:["bold","colorpicker","italic","underline","strikethrough","quote","justifyLeft","justifyCenter","justifyRight","justifyFull","superscript","subscript","orderedlist","unorderedlist","pre","removeFormat","outdent","indent","h2","h3"],standardizeSelectionStart:!1,updateOnEmptySelection:!1},placeholder:{text:"\u8BF7\u8F93\u5165\u5185\u5BB9",hideOnClick:!0},disableEditing:!0},_F=xx.extensions.button.extend({name:"colorpicker",tagNames:["mark"],contentDefault:"<b>Color</b>",aria:"Color Picker",action:"colorPicker",init:function(){var t=this;yF.init(),xx.extensions.button.prototype.init.call(this),this.colorPicker=new Nq({parent:this.button,color:"#000",onDone:function(e){t.coloredText&&t.coloredText.isAppliedToSelection()&&t.coloredText.undoToSelection(),t.coloredText=yF.createClassApplier("colored",{elementTagName:"span",elementProperties:{style:{color:e.hex}},normalize:!0}),t.coloredText.toggleSelection(),t.base.checkContentChanged(),t.setInactive()}})},getButton:function(){return this.button},handleClick:function(){this.setActive(),this.colorPicker.show()},isAlreadyApplied:function(t){return t.nodeName.toLowerCase()==="mark"},isActive:function(){return this.button.classList.contains("medium-editor-button-active")},setInactive:function(){this.button.classList.remove("medium-editor-button-active")},setActive:function(){this.button.classList.add("medium-editor-button-active")}}),KUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),JUe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},OF=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},wF=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};(function(t){KUe(e,t);function e(n){var r=t.call(this,n)||this;r.labelMap=new Map;var i=n.lf,o=n.graphModel;return r.lf=i,r.graphModel=o,r.state={tick:0},r}return e.prototype.componentDidMount=function(){var n=this,r=this.props.graphModel;this.editor=new xx(".lf-label-editor",mf(bF,{autoLink:!0,extensions:{colorPicker:new _F}})),r.eventCenter.on("text:update,node:mousemove,node:resize,node:rotate,node:drag,label:drop,node:drop",function(){}),r.eventCenter.on("node:properties-change,node:properties-delete",function(){n.setState({tick:n.state.tick+1})})},e.prototype.componentDidUpdate=function(){var n;this.editor&&this.editor.elements.length>0?this.editor.addElements(".lf-label-editor"):((n=this.editor)===null||n===void 0||n.destroy(),this.editor=new xx(".lf-label-editor",mf(bF,{autoLink:!0,extensions:{colorPicker:new _F}})))},e.prototype.componentWillUnmount=function(){var n;(n=this.editor)===null||n===void 0||n.destroy()},e.prototype.getLabels=function(){var n=this,r=this.props,i=r.lf.extension,o=r.graphModel,a=wF(wF([],OF(o.nodes),!1),OF(o.edges),!1),s=i.label;if(s){var l=[];return In(a,function(u){var c,d,f=u.getData(),h=(d=(c=f.properties)===null||c===void 0?void 0:c._label)!==null&&d!==void 0?d:[];In(h,function(g){var m=n.labelMap,y=new WUe(g,u,o);m.set(y.id,y),l.push(rt(QUe,{label:y,element:u,graphModel:o},y.id))})}),l}return null},e.prototype.render=function(){return rt("foreignObject",{id:"lf-label-overlay",class:"lf-label-overlay",children:this.getLabels()})},e.toolName="label-edit-tool",e=JUe([Ea],e),e})(ur);var xF=globalThis&&globalThis.__assign||function(){return xF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xF.apply(this,arguments)},EC=globalThis&&globalThis.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})},TC=globalThis&&globalThis.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},eXe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},tXe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Wv={};function Dq(t){return t.startsWith("data:text/plain")}function Lq(t){return EC(this,void 0,void 0,function(){return TC(this,function(e){return Wv[t]?[2,Wv[t]]:[2,new Promise(function(n,r){try{fetch(t).then(function(i){return i.blob()}).then(function(i){var o=new FileReader;o.onloadend=function(){n(Wv[t]=o.result)},o.onerror=r,o.readAsDataURL(i)}).catch(function(){n(Wv[t]=t)})}catch{return Wv[t]=t}})]})})}function SF(t,e){return EC(this,void 0,void 0,function(){var n,r,i;return TC(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n=t.getAttribute(e)||"",n.startsWith("data:")?[2]:[4,Lq(n)];case 1:return r=o.sent(),Dq(r)?[2]:(t.setAttribute(e,r),[3,3]);case 2:return i=o.sent(),console.error(i),[3,3];case 3:return[2]}})})}function CF(t,e){return EC(this,void 0,void 0,function(){var n,r;return TC(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e.startsWith("data:")?[2]:[4,Lq(e)];case 1:return n=i.sent(),Dq(n)?[2]:(t.style.backgroundImage="url(".concat(n,")"),[3,3]);case 2:return r=i.sent(),console.error(r),[3,3];case 3:return[2]}})})}function d2(t){return EC(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,l,u;return TC(this,function(c){switch(c.label){case 0:for(e=[t],r=[];e.length;)n=e.shift(),n.children.length&&e.push.apply(e,tXe([],eXe(n.children),!1)),n instanceof HTMLElement&&(i=n.style,o=i.background,a=i.backgroundImage,s=o.match(/url\(["']?(.*?)["']?\)/),s&&s[1]&&(u=s[1],r.push(CF(n,u))),l=a.match(/url\(["']?(.*?)["']?\)/),l&&l[1]&&(u=l[1],r.push(CF(n,u)))),n instanceof HTMLImageElement?r.push(SF(n,"src")):n instanceof SVGImageElement&&r.push(SF(n,"href"));return[4,Promise.all(r)];case 1:return c.sent(),[2]}})})}function Hv(t,e,n){var r=document.createElement("canvas");r.width=e,r.height=n;var i=r.getContext("2d");return i&&i.drawImage(t,0,0,t.width,t.height,0,0,e,n),r}var Mc=globalThis&&globalThis.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})},Rc=globalThis&&globalThis.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},nXe=function(){function t(e){var n=e.lf,r=this;this.lf=n,this.customCssRules="",this.useGlobalRules=!0,n.getSnapshot=function(i,o){return Mc(r,void 0,void 0,function(){return Rc(this,function(a){switch(a.label){case 0:return[4,this.getSnapshot(i,o)];case 1:return[2,a.sent()]}})})},n.getSnapshotBlob=function(i,o){return Mc(r,void 0,void 0,function(){return Rc(this,function(a){switch(a.label){case 0:return[4,this.getSnapshotBlob(i,o)];case 1:return[2,a.sent()]}})})},n.getSnapshotBase64=function(i,o){return Mc(r,void 0,void 0,function(){return Rc(this,function(a){switch(a.label){case 0:return[4,this.getSnapshotBase64(i,o)];case 1:return[2,a.sent()]}})})}}return t.prototype.getSvgRootElement=function(e){var n=e.container.querySelector(".lf-canvas-overlay");return n},t.prototype.triggerDownload=function(e){var n=new MouseEvent("click",{view:document.defaultView,bubbles:!1,cancelable:!0}),r=document.createElement("a");r.setAttribute("download",this.fileName),r.setAttribute("href",e),r.setAttribute("target","_blank"),r.dispatchEvent(n)},t.prototype.removeAnchor=function(e){for(var n=e.childNodes,r=e.childNodes&&e.childNodes.length,i=0;i<r;i++){var o=n[i],a=o.classList&&Array.from(o.classList)||[];a.indexOf("lf-anchor")>-1&&(e.removeChild(e.childNodes[i]),r--,i--)}},t.prototype.removeRotateControl=function(e){for(var n=e.childNodes,r=e.childNodes&&e.childNodes.length,i=0;i<r;i++){var o=n[i],a=o.classList&&Array.from(o.classList)||[];a.indexOf("lf-rotate-control")>-1&&(e.removeChild(e.childNodes[i]),r--,i--)}},t.prototype.getSnapshot=function(e,n){return Mc(this,void 0,void 0,function(){var r,i,o,a,s=this;return Rc(this,function(l){switch(l.label){case 0:return r=this.lf.graphModel.getPartial(),i=(n!=null?n:{}).partial,o=i===void 0?r:i,a=this.lf.getEditConfig(),this.lf.updateEditConfig({isSilentMode:!0,stopScrollGraph:!0,stopMoveGraph:!0}),r===o?[3,1]:(this.lf.graphModel.setPartial(o),this.lf.graphModel.eventCenter.once("graph:updated",function(){return Mc(s,void 0,void 0,function(){return Rc(this,function(u){switch(u.label){case 0:return[4,this.snapshot(e,n)];case 1:return u.sent(),this.lf.graphModel.setPartial(r),[2]}})})}),[3,3]);case 1:return[4,this.snapshot(e,n)];case 2:l.sent(),l.label=3;case 3:return this.lf.updateEditConfig(a),[2]}})})},t.prototype.snapshot=function(e,n){return Mc(this,void 0,void 0,function(){var r,i,o,a,s,l,u,c,d,f=this;return Rc(this,function(h){switch(h.label){case 0:return r=n!=null?n:{},i=r.fileType,o=i===void 0?"png":i,a=r.quality,this.fileName="".concat(e!=null?e:"logic-flow.".concat(Date.now()),".").concat(o),s=this.getSvgRootElement(this.lf),[4,d2(s)];case 1:return h.sent(),o==="svg"?(l=this.cloneSvg(s),u=new XMLSerializer().serializeToString(l),c=new Blob([u],{type:"image/svg+xml;charset=utf-8"}),d=URL.createObjectURL(c),this.triggerDownload(d)):this.getCanvasData(s,n!=null?n:{}).then(function(g){var m=g.toDataURL("image/".concat(o),a).replace("image/".concat(o),"image/octet-stream");f.triggerDownload(m)}),[2]}})})},t.prototype.getSnapshotBase64=function(e,n){return Mc(this,void 0,void 0,function(){var r,i=this;return Rc(this,function(o){switch(o.label){case 0:return r=this.getSvgRootElement(this.lf),[4,d2(r)];case 1:return o.sent(),[2,new Promise(function(a){i.getCanvasData(r,{backgroundColor:e}).then(function(s){var l=s.toDataURL("image/".concat(n!=null?n:"png"));a({data:l,width:s.width,height:s.height})})})]}})})},t.prototype.getSnapshotBlob=function(e,n){return Mc(this,void 0,void 0,function(){var r,i=this;return Rc(this,function(o){switch(o.label){case 0:return r=this.getSvgRootElement(this.lf),[4,d2(r)];case 1:return o.sent(),[2,new Promise(function(a){i.getCanvasData(r,{backgroundColor:e}).then(function(s){s.toBlob(function(l){a({data:l,width:s.width,height:s.height})},"image/".concat(n!=null?n:"png"))})})]}})})},t.prototype.getClassRules=function(){var e="";if(this.useGlobalRules)for(var n=document.styleSheets,r=0;r<n.length;r++){var i=n[r];try{for(var o=0;o<i.cssRules.length;o++)e+=i.cssRules[o].cssText}catch{console.log("CSS scripts from different sources have been filtered out")}}return this.customCssRules&&(e+=this.customCssRules),e},t.prototype.getCanvasData=function(e,n){return Mc(this,void 0,void 0,function(){var r,i,o,a,s,l,u,c,d,f,h,g,m,y,b,w,O,x,S,C,E,T,P,A,D,$;return Rc(this,function(N){return r=n.width,i=n.height,o=n.backgroundColor,a=n.padding,s=a===void 0?40:a,l=this.cloneSvg(e,!1),u=window.devicePixelRatio||1,u<1&&(u=1),c=this.lf.graphModel.rootEl.querySelector(".lf-base"),d=c.getBoundingClientRect(),f=this.lf.container.querySelector(".lf-canvas-overlay"),h=f.getBoundingClientRect(),g=d.x-h.x,m=d.y-h.y,y=this.lf.graphModel,b=y.transformModel,w=b.SCALE_X,O=b.SCALE_Y,x=b.TRANSLATE_X,S=b.TRANSLATE_Y,l.lastChild.style.transform="matrix(1, 0, 0, 1, ".concat((-g+x)*(1/w),", ").concat((-m+S)*(1/O),")"),C=Math.ceil(d.width/w),E=Math.ceil(d.height/O),T=document.createElement("canvas"),T.style.width="".concat(C,"px"),T.style.height="".concat(E,"px"),T.width=C*u+s*2,T.height=E*u+s*2,P=T.getContext("2d"),P&&(P.clearRect(0,0,T.width,T.height),P.scale(u,u),o?(P.fillStyle=o,P.fillRect(0,0,T.width,T.height)):P.clearRect(0,0,T.width,T.height)),A=new Image,D=document.createElement("style"),D.innerHTML=this.getClassRules(),$=document.createElement("foreignObject"),$.appendChild(D),l.appendChild($),[2,new Promise(function(z){A.onload=function(){var X=navigator.userAgent.indexOf("Firefox")>-1;try{X?createImageBitmap(A,{resizeWidth:r&&i?Hv(T,r,i).width:T.width,resizeHeight:r&&i?Hv(T,r,i).height:T.height}).then(function(Q){P==null||P.drawImage(Q,s/u,s/u),z(r&&i?Hv(T,r,i):T)}):(P==null||P.drawImage(A,s/u,s/u),z(r&&i?Hv(T,r,i):T))}catch{P==null||P.drawImage(A,s/u,s/u),z(r&&i?Hv(T,r,i):T)}};var I="data:image/svg+xml;charset=utf-8,".concat(new XMLSerializer().serializeToString(l)),L=I.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");A.src=L})]})})},t.prototype.cloneSvg=function(e,n){var r=this,i;n===void 0&&(n=!0);var o=e.cloneNode(!0),a=o.lastChild,s=(i=a==null?void 0:a.childNodes)===null||i===void 0?void 0:i.length;if(s)for(var l=0;l<s;l++){var u=a==null?void 0:a.childNodes[l],c=u.classList&&Array.from(u.classList);if(c&&c.indexOf("lf-base")<0)a==null||a.removeChild(a.childNodes[l]),s--,l--;else{var d=a==null?void 0:a.childNodes[l];d&&d.childNodes.forEach(function(g){var m=g;r.removeAnchor(m.firstChild),r.removeRotateControl(m.firstChild)})}}if(n){var f=document.createElement("style");f.innerHTML=this.getClassRules();var h=document.createElement("foreignObject");h.appendChild(f),o.appendChild(h)}return o},t.pluginName="snapshot",t}();globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var EF=globalThis&&globalThis.__assign||function(){return EF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},EF.apply(this,arguments)},TF=globalThis&&globalThis.__assign||function(){return TF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},TF.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var rXe=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},iXe=function(){function t(e){var n=e.lf,r=e.LogicFlow,i=e.options,o=this;this.width=200,this.height=150,this.scale=1,this.translateX=0,this.translateY=0,this.showEdge=!1,this.viewPortTop=0,this.viewPortLeft=0,this.viewPortWidth=150,this.viewPortHeight=75,this.isShow=!1,this.isShowHeader=!1,this.isShowCloseIcon=!1,this.headerTitle="\u5BFC\u822A",this.disabledPlugins=["miniMap","control","selectionSelect"],this.onGraphResize=function(){o.updateViewPortBounds(),o.isShow&&o.updateViewPort()},this.render=function(s,l){o.container=l,o.lf.on("history:change",function(){o.isShow&&o.setView()}),o.lf.on("graph:transform",function(){o.isShow&&o.setView(!1)})},this.show=function(s,l){o.isShow||(o.createMiniMap(s,l),o.setView()),o.isShow=!0},this.hide=function(){o.isShow&&(o.removeMiniMap(),o.lf.emit("miniMap:close",{})),o.isShow=!1},this.updatePosition=function(s){if(typeof s=="object")(s.left!==void 0||s.right!==void 0)&&(o.leftPosition=s.left,o.rightPosition=s.right),(s.top!==void 0||s.bottom!==void 0)&&(o.topPosition=s.top,o.bottomPosition=s.bottom);else switch(s){case"left-top":o.leftPosition=0,o.rightPosition=void 0,o.topPosition=0,o.bottomPosition=void 0;break;case"right-top":o.leftPosition=void 0,o.rightPosition=0,o.topPosition=0,o.bottomPosition=void 0;break;case"left-bottom":o.leftPosition=0,o.rightPosition=void 0,o.topPosition=void 0,o.bottomPosition=0;break;case"right-bottom":o.leftPosition=void 0,o.rightPosition=0,o.topPosition=void 0,o.bottomPosition=0;break}o.updateMiniMapPosition()},this.reset=function(){o.lf.resetTranslate(),o.lf.resetZoom()},this.setShowEdge=function(s){o.showEdge!==s&&(o.showEdge=s,o.setView())},this.startDrag=function(s){document.addEventListener("mousemove",o.drag),document.addEventListener("mouseup",o.drop);var l=s.x,u=s.y;o.startPosition={x:l,y:u}},this.drag=function(s){var l=s.x,u=s.y,c=(l-o.startPosition.x)/o.scale,d=(u-o.startPosition.y)/o.scale,f=o.viewPortLeft+c+o.viewPortWidth/o.scale/2,h=o.viewPortTop+d+o.viewPortHeight/o.scale/2;o.startPosition={x:l,y:u},o.lf.focusOn({coordinate:{x:f,y:h}})},this.drop=function(){document.removeEventListener("mousemove",o.drag),document.removeEventListener("mouseup",o.drop)},this.mapClick=function(s){var l=s.offsetX,u=s.offsetY,c=o.translateX+l/o.scale,d=o.translateY+u/o.scale;o.lf.focusOn({coordinate:{x:c,y:d}})},this.lf=n,this.LFCtor=r,i&&this.setOption(i),this.viewPortWidth=n.graphModel.width,this.viewPortHeight=n.graphModel.height;var a={left:0,right:this.viewPortWidth,top:0,bottom:this.viewPortHeight};this.bounds=a,this.elementAreaBounds=a,this.viewPortBounds=a,this.initMiniMap(),n.on("graph:resize",this.onGraphResize)}return t.prototype.setOption=function(e){var n=e.width,r=n===void 0?150:n,i=e.height,o=i===void 0?220:i,a=e.showEdge,s=a===void 0?!1:a,l=e.isShowHeader,u=l===void 0?!1:l,c=e.isShowCloseIcon,d=c===void 0?!1:c,f=e.leftPosition,h=e.topPosition,g=e.rightPosition,m=g===void 0?0:g,y=e.bottomPosition,b=y===void 0?0:y,w=e.headerTitle,O=w===void 0?"\u5BFC\u822A":w;this.width=r,this.height=o,this.showEdge=s,this.isShowHeader=u,this.isShowCloseIcon=d,this.leftPosition=f,this.rightPosition=f!==void 0?void 0:m,this.topPosition=h,this.bottomPosition=h!==void 0?void 0:b,this.headerTitle=O},t.prototype.initMiniMap=function(){var e=document.createElement("div");e.className="lf-mini-map-graph",e.style.width="".concat(this.width,"px"),e.style.height="".concat(this.height,"px"),this.lfMap=new this.LFCtor({container:e,grid:!1,isSilentMode:!0,stopZoomGraph:!0,stopScrollGraph:!0,stopMoveGraph:!1,history:!1,snapline:!1,disabledPlugins:this.disabledPlugins}),this.miniMapWrap=e,this.createViewPort(),e.addEventListener("click",this.mapClick)},t.prototype.createMiniMap=function(e,n){var r,i=document.createElement("div");this.miniMapContainer=i,i.appendChild(this.miniMapWrap),i.style.position="absolute",(e!==void 0||n!==void 0)&&(this.leftPosition=e||0,this.topPosition=n||0,this.rightPosition=void 0,this.bottomPosition=void 0),this.updateMiniMapPosition(),i.className="lf-mini-map",this.isShowCloseIcon||i.classList.add("lf-mini-map-no-close-icon"),this.isShowHeader||i.classList.add("lf-mini-map-no-header"),(r=this.container)===null||r===void 0||r.appendChild(i),this.miniMapWrap.appendChild(this.viewport);var o=document.createElement("div");o.className="lf-mini-map-header",o.innerText=this.headerTitle,i.appendChild(o);var a=document.createElement("span");a.className="lf-mini-map-close",a.addEventListener("click",this.hide),i.appendChild(a)},t.prototype.updateMiniMapPosition=function(){if(this.miniMapContainer){var e=this.miniMapContainer.style;this.rightPosition!==void 0?(e.right="".concat(this.rightPosition,"px"),e.left=""):(e.left="".concat(this.leftPosition,"px"),e.right=""),this.bottomPosition!==void 0?(e.bottom="".concat(this.bottomPosition,"px"),e.top=""):(e.top="".concat(this.topPosition,"px"),e.bottom="")}},t.prototype.removeMiniMap=function(){var e;this.miniMapContainer&&((e=this.container)===null||e===void 0||e.removeChild(this.miniMapContainer))},t.prototype.updateBounds=function(e){e&&this.updateElementAreaBounds(e),this.updateViewPortBounds(),this.bounds={left:Math.min(this.elementAreaBounds.left,this.viewPortBounds.left),right:Math.max(this.elementAreaBounds.right,this.viewPortBounds.right),top:Math.min(this.elementAreaBounds.top,this.viewPortBounds.top),bottom:Math.max(this.elementAreaBounds.bottom,this.viewPortBounds.bottom)}},t.prototype.updateElementAreaBounds=function(e){var n={left:0,right:0,top:0,bottom:0},r=e.nodes;r&&r.length>0&&r.forEach(function(i){var o,a,s=i.x,l=i.y,u=(o=i.width)!==null&&o!==void 0?o:200,c=(a=i.height)!==null&&a!==void 0?a:200,d=s-u/2,f=s+u/2,h=l-c/2,g=l+c/2;n.left=Math.min(d,n.left),n.right=Math.max(f,n.right),n.top=Math.min(h,n.top),n.bottom=Math.max(g,n.bottom)}),this.elementAreaBounds=n},t.prototype.updateViewPortBounds=function(){var e=this.lf.getTransform(),n=e.TRANSLATE_X,r=e.TRANSLATE_Y,i=e.SCALE_X,o=e.SCALE_Y,a=this.lf.graphModel,s=a.width,l=a.height;this.viewPortBounds={left:-n/i,right:(-n+s)/i,top:-r/o,bottom:(-r+l)/o}},t.prototype.resetData=function(e){var n=e.nodes,r=e.edges;return n.forEach(function(i){i.text=void 0}),this.showEdge&&r.forEach(function(i){i.text=void 0}),{nodes:n,edges:this.showEdge?r:[]}},t.prototype.setView=function(e){var n,r;if(e===void 0&&(e=!0),e){var i=this.lf.getGraphRawData(),o=this.resetData(i),a=this.lf.viewMap,s=this.lf.graphModel.modelMap,l=this.lfMap.viewMap;try{for(var u=rXe(a.keys()),c=u.next();!c.done;c=u.next()){var d=c.value;l.has(d)||this.lfMap.register({type:d,view:a.get(d),model:s.get(d)})}}catch(P){n={error:P}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.lfMap.render(o),this.updateBounds(o)}else this.updateBounds();var f=this.bounds,h=f.left,g=f.top,m=f.right,y=f.bottom,b=m-h,w=y-g,O=this.width/b,x=this.height/w,S=Math.min(O,x);this.scale=S;var C=h-(this.width/S-b)/2,E=g-(this.height/S-w)/2;if(this.lfMap.graphModel.transformModel.translate(-C+this.translateX,-E+this.translateY),this.translateX=C,this.translateY=E,this.miniMapWrap.firstChild){var T=this.miniMapWrap.firstChild.style;T.pointerEvents="none",T.transform="matrix(".concat(S,", 0, 0, ").concat(S,", 0, 0)"),T.transformOrigin="left top",T.height="".concat(this.height/S,"px"),T.width="".concat(this.width/S,"px"),this.updateViewPort()}},t.prototype.updateViewPort=function(){var e=this.viewport.style,n=this.lf.getTransform(),r=n.TRANSLATE_X,i=n.TRANSLATE_Y,o=n.SCALE_X,a=n.SCALE_Y,s=this.lf.graphModel,l=s.width,u=s.height;this.viewPortLeft=-r/o,this.viewPortTop=-i/a,this.viewPortWidth=l/o*this.scale,this.viewPortHeight=u/a*this.scale,e.width="".concat(this.viewPortWidth,"px"),e.height="".concat(this.viewPortHeight,"px"),e.left="".concat((this.viewPortLeft-this.translateX)*this.scale,"px"),e.top="".concat((this.viewPortTop-this.translateY)*this.scale,"px")},t.prototype.createViewPort=function(){var e=document.createElement("div");e.className="lf-minimap-viewport",e.addEventListener("mousedown",this.startDrag),e.addEventListener("click",function(n){n.stopPropagation()}),this.viewport=e},t.prototype.destroy=function(){this.lf.off("graph:resize",this.onGraphResize)},t.pluginName="miniMap",t}(),oXe=function(){function t(e){var n=e.lf,r=this;this.disabled=!0,this.isDefaultStopMoveGraph=!1,this.isWholeNode=!0,this.isWholeEdge=!0,this.draw=function(o){var a=r.lf.getPointByClient(o.clientX,o.clientY).domOverlayPosition,s=a.x,l=a.y;if(r.endPoint={x:s,y:l},r.startPoint){var u=r.startPoint,c=u.x,d=u.y,f=c,h=d,g=s-c,m=l-d;s<c&&(f=s,g=c-s),l<d&&(h=l,m=d-l),r.wrapper&&(r.wrapper.style.left="".concat(f,"px"),r.wrapper.style.top="".concat(h,"px"),r.wrapper.style.width="".concat(g,"px"),r.wrapper.style.height="".concat(m,"px"))}},this.drawOff=function(){var o;if(document.removeEventListener("mousemove",r.draw),document.removeEventListener("mouseup",r.drawOff),r.wrapper&&(r.wrapper.oncontextmenu=null,(o=r.container)===null||o===void 0||o.removeChild(r.wrapper)),r.startPoint&&r.endPoint){var a=r.startPoint,s=a.x,l=a.y,u=r.endPoint,c=u.x,d=u.y,f=[Math.min(s,c),Math.min(l,d)],h=[Math.max(s,c),Math.max(l,d)];if(r.lf.emit("selection:selected-area",{topLeft:f,bottomRight:h}),Math.abs(c-s)<10&&Math.abs(d-l)<10)return;var g=r.lf.graphModel.getAreaElement(f,h,r.isWholeEdge,r.isWholeNode,!0),m=r.lf.graphModel,y=m.dynamicGroup,b=m.group,w=[];g.forEach(function(O){b&&b.getNodeGroup(O.id)||y&&y.getGroupByNodeId(O.id)||(r.lf.selectElementById(O.id,!0),w.push(O))}),r.lf.emit("selection:selected",{elements:w,leftTopPoint:f,rightBottomPoint:h})}},this.lf=n;var i=n.getEditConfig().stopMoveGraph;this.isDefaultStopMoveGraph=i,n.openSelectionSelect=function(){r.openSelectionSelect()},n.closeSelectionSelect=function(){r.closeSelectionSelect()}}return t.prototype.render=function(e,n){var r=this;this.container=n,e.on("blank:mousedown",function(i){var o=i.e,a=e.getEditConfig();if(!(!a.stopMoveGraph||r.disabled)){var s=o.button===2;if(!s){var l=e.getPointByClient(o.clientX,o.clientY).domOverlayPosition,u=l.x,c=l.y;r.startPoint={x:u,y:c},r.endPoint={x:u,y:c};var d=document.createElement("div");d.className="lf-selection-select",d.oncontextmenu=function(h){h.preventDefault()},d.style.top="".concat(r.startPoint.y,"px"),d.style.left="".concat(r.startPoint.x,"px"),n.appendChild(d),r.wrapper=d,document.addEventListener("mousemove",r.draw),document.addEventListener("mouseup",r.drawOff)}}})},t.prototype.setSelectionSense=function(e,n){e===void 0&&(e=!0),n===void 0&&(n=!0),this.isWholeEdge=e,this.isWholeNode=n},t.prototype.openSelectionSelect=function(){var e=this.lf.getEditConfig().stopMoveGraph;e||(this.isDefaultStopMoveGraph=!1,this.lf.updateEditConfig({stopMoveGraph:!0})),this.open()},t.prototype.closeSelectionSelect=function(){this.isDefaultStopMoveGraph||this.lf.updateEditConfig({stopMoveGraph:!1}),this.close()},t.prototype.open=function(){this.disabled=!1},t.prototype.close=function(){this.disabled=!0},t.pluginName="selectionSelect",t}(),kF=globalThis&&globalThis.__assign||function(){return kF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},kF.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var Iq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_g=globalThis&&globalThis.__assign||function(){return _g=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_g.apply(this,arguments)},Hy=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},aXe={tr:"tl",lb:"tl",tl:"tr",rb:"tr",br:"bl",lt:"bl",bl:"br",rt:"br"};function sXe(t){for(var e=t,n=1;n<e.length-1;){var r=Hy(e[n-1],2),i=r[0],o=r[1],a=Hy(e[n],2),s=a[0],l=a[1],u=Hy(e[n+1],2),c=u[0],d=u[1];i===s&&s===c||o===l&&l===d?e.splice(n,1):n++}return e}function lXe(t,e,n,r){var i=[t[0],t[1]],o=[t[0],t[1]];switch(n){case"tl":return e==="tr"?(i[1]+=r,o[0]+=r):e==="lb"&&(i[0]+=r,o[1]+=r),[i,o];case"tr":return e==="tl"?(i[1]+=r,o[0]-=r):e==="rb"&&(i[0]-=r,o[1]+=r),[i,o];case"bl":return e==="br"?(i[1]-=r,o[0]+=r):e==="lt"&&(i[0]+=r,o[1]-=r),[i,o];case"br":return e==="bl"?(i[1]-=r,o[0]-=r):e==="rt"&&(i[0]-=r,o[1]-=r),[i,o];default:return[]}}function uXe(t,e,n,r){var i,o="",a="";t[0]===e[0]?o=t[1]>e[1]?"t":"b":t[1]===e[1]&&(o=t[0]>e[0]?"l":"r"),e[0]===n[0]?a=e[1]>n[1]?"t":"b":e[1]===n[1]&&(a=e[0]>n[0]?"l":"r");var s=Math.min(Math.hypot(e[0]-t[0],e[1]-t[1])/2,Math.hypot(n[0]-e[0],n[1]-e[1])/2,r)||1/5*r,l="".concat(o).concat(a),u=aXe[l]||"-",c="L ".concat(t[0]," ").concat(t[1]);if(u==="-")c+="L ".concat(e[0]," ").concat(e[1]," L ").concat(n[0]," ").concat(n[1]);else{var d=Hy(lXe(e,l,u,s),2),f=d[0],h=d[1];f&&h&&(c+="L ".concat(f[0]," ").concat(f[1]," Q ").concat(e[0]," ").concat(e[1]," ").concat(h[0]," ").concat(h[1]),i=Hy(h,2),e[0]=i[0],e[1]=i[1])}return c}function cXe(t,e){var n=0,r="";if(t.length===2)r+="M".concat(t[n][0]," ").concat(t[n++][1]," L ").concat(t[n][0]," ").concat(t[n][1]);else{for(r+="M".concat(t[n][0]," ").concat(t[n++][1]);n+1<t.length;){var i=t[n-1],o=t[n],a=t[n+++1];r+=uXe(i,o,a,e)}r+="L ".concat(t[n][0]," ").concat(t[n][1])}return r}(function(t){Iq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.points,i=n.isAnimation,o=n.arrowConfig,a=n.radius,s=a===void 0?5:a,l=n.getEdgeStyle(),u=n.getEdgeAnimationStyle(),c=sXe(r.split(" ").map(function(h){return h.split(",").map(function(g){return+g})})),d=cXe(c,s),f=_g(_g(_g({style:i?u:{}},l),o),{fill:"none"});return Kt("path",_g({d},f))},e})(z0);(function(t){Iq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(j0);var Bq=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sx=globalThis&&globalThis.__assign||function(){return Sx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Sx.apply(this,arguments)},PF=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},AF=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dXe=function(t){Bq(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.id,i=n.x,o=n.y,a=n.width,s=n.height,l=n.properties,u=this.props.model.getNodeStyle();return Kt("svg",{x:i-a/2,y:o-s/2,width:50,height:24,style:"z-index: 0; background: none; overflow: auto;"},[l.labelText?Kt("text",{x:0,y:-5,fontSize:"16px",fill:u.stroke},l.labelText):"",l.disabledDelete?"":Kt("text",{x:l.labelText?50:0,y:-5,fontSize:"24px",cursor:"pointer",fill:u.stroke,onclick:this.handleCustomDeleteIconClick.bind(this,r)},"x")])},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.id,l=this.props.model.getNodeStyle();return Kt("g",{},[Kt("rect",Sx(Sx({},l),{x:r-o/2,y:i-a/2,width:o,height:a,id:s})),this.getLabelShape()])},e.prototype.toFront=function(){},e.prototype.handleCustomDeleteIconClick=function(n){var r=this.props.graphModel;r.deleteNode(n)},e}(ax),fXe=function(t){Bq(e,t);function e(){var n=t.apply(this,AF([],PF(arguments),!1))||this;return n.d=10,n.isResize=!1,n}return e.prototype.initNodeData=function(n){n.text={value:"",x:n.x,y:n.y,draggable:!1,editable:!1},t.prototype.initNodeData.call(this,n),this.zIndex=0,this.draggable=!0},e.prototype.setAttributes=function(){var n=this,r;this.points=[],((r=this.properties)===null||r===void 0?void 0:r.node_selection_ids).length>1&&setTimeout(function(){var i;n.updatePointsByNodes(((i=n.properties)===null||i===void 0?void 0:i.node_selection_ids)||[])})},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this);return n.stroke=this.properties.strokeColor||"#008000",n.strokeDasharray="10 5",n},e.prototype.getDefaultAnchor=function(){return[]},e.prototype.updatePoints=function(n){this.points=n},e.prototype.updateCoordinate=function(n){var r=n.x,i=n.y;this.x=r,this.y=i},e.prototype.updatePointsByNodes=function(n){var r=this,i=[],o=1/0,a=1/0,s=-1/0,l=-1/0;n.forEach(function(u){var c=r.graphModel.getNodeModelById(u);if(!!c){var d=c.width,f=c.height,h=c.x,g=c.y;o=Math.min(o,h-d/2-r.d),a=Math.min(a,g-f/2-r.d),s=Math.max(s,h+d/2+r.d),l=Math.max(l,g+f/2+r.d)}}),i.push([o,a],[s,a],[s,l],[o,l]),![o,a,s,l].some(function(u){return Math.abs(u)===1/0})&&(this.updatePoints(i),this.updateCoordinate({x:(s+o)/2,y:(l+a)/2}))},e.prototype.resize=function(n){var r;this.isResize=!0;for(var i=n.width,o=n.height,a={x:i/this.width,y:o/this.height},s=(this.properties.node_selection_ids||[]).slice(),l=[],u=new Set;s.length;){var c=s.shift(),d=(r=this.graphModel.nodesMap[c])===null||r===void 0?void 0:r.model;if(!!d){if(!Q1(d)){l.push(d);continue}u.has(d.id)||(u.add(d.id),s.push.apply(s,AF([],PF(d.properties.node_selection_ids||[]),!1)))}}var f={x:this.x-this.width/2,y:this.y-this.height/2},h=t.prototype.resize.call(this,n),g={x:this.x-this.width/2,y:this.y-this.height/2};return l.forEach(function(m){m.width=m.width*a.x,m.height=m.height*a.y;var y=(m.x-f.x)*a.x+g.x-m.x,b=(m.y-f.y)*a.y+g.y-m.y;m.move(y,b,!0)}),this.isResize=!1,h},e}(tx),wA="node-selection";(function(){function t(e){var n=e.lf;this.selectNodes=[],this.d=10,this.lf=n,n.register({type:wA,view:dXe,model:fXe})}return Object.defineProperty(t.prototype,"selectNodesIds",{get:function(){return this.selectNodes.map(function(e){return e.id})},enumerable:!1,configurable:!0}),t.prototype.addNodeSelection=function(){var e=this.lf.addNode({type:"node-selection",text:"",properties:{node_selection_ids:this.selectNodesIds},x:0,y:0});e.updatePointsByNodes(this.selectNodesIds)},t.prototype.updateNodeSelection=function(){var e,n=this.getNodeSelection();!n||(this.lf.setProperties(n.id,{node_selection_ids:this.selectNodesIds}),(e=this.lf.getNodeModelById(n.id))===null||e===void 0||e.updatePointsByNodes(this.selectNodesIds))},t.prototype.getNodeSelection=function(){var e=this,n=this.selectNodesIds,r=this.lf.getGraphRawData(),i=n.filter(function(o){return o!==e.currentClickNode.id});return r.nodes.find(function(o){if(o.type==="node-selection"){var a=Kr(o,"properties.node_selection_ids",[]);return i.every(function(s){return a.includes(s)})}return!1})},t.prototype.onNodeChange=function(e,n){var r=e.graphModel.nodes.filter(function(i){if(!Q1(i))return!1;var o=i.properties.node_selection_ids||[];return o.includes(n.id)});Promise.resolve().then(function(){r.forEach(function(i){i.updatePointsByNodes(i.properties.node_selection_ids||[])})})},t.prototype.render=function(e){var n=this;this.lf=e,e.on("node:click",function(r){var i;if(!(!r.e.shiftKey||r.data.type===wA)){n.currentClickNode=r.data;var o=!1;n.selectNodesIds.includes(r.data.id)&&((i=n.lf.getNodeModelById(r.data.id))===null||i===void 0||i.setSelected(!1),o=!0);var a=e.getSelectElements(!0).nodes;n.selectNodes=a,n.selectNodes.length===1?o?n.updateNodeSelection():n.addNodeSelection():n.selectNodes.length>1&&n.updateNodeSelection()}}),e.graphModel.addNodeMoveRules(function(r,i,o){if(n.onNodeChange(e,r),Q1(r)&&!r.isResize){var a=r.properties.node_selection_ids||[];return e.graphModel.moveNodes(a,i,o,!0),!0}return!0}),e.graphModel.addNodeResizeRules(function(r){return Q1(r)||n.onNodeChange(e,r),!0})},t.pluginName="node-selection",t})();var Q1=function(t){return!!(t&&t.type===wA)},hXe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cx=globalThis&&globalThis.__assign||function(){return Cx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Cx.apply(this,arguments)};(function(t){hXe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.properties;return Kt("text",{x:r-o/2+5,y:i-a/2+16,fontSize:12,fill:"blue"},s.moreText)},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=this.props.model.getNodeStyle();return Kt("g",{},[Kt("rect",Cx(Cx({},s),{fill:"#FFFFFF",x:r-o/2,y:i-a/2})),this.getLabelShape()])},e})(Cf);const Tn="/plugin/rule";function zO(t,e,n,r){var o;let i=[];try{let a=t.getGraphData();(o=a==null?void 0:a.metadata)==null||o.nodes.forEach(s=>{s.id&&s.id!==e.id&&i.push({value:s.id,label:s.name})})}catch{}finally{n.component.options=i}return i}const Om={category:{endpoints:{label:"\u8F93\u5165\u7AEF",background:"#A6BBCFFF",nodeType:"endpoint-node"},filter:{label:"\u8FC7\u6EE4\u5668",background:"#f1e861",nodeType:"simple-node"},transform:{label:"\u8F6C\u6362\u5668",background:"#79cef1",nodeType:"simple-node"},action:{label:"\u52A8\u4F5C",background:"#f1928f",nodeType:"simple-node"},external:{label:"\u5916\u90E8\u7684",background:"#fbc766",nodeType:"simple-node"},ai:{label:"AI",background:"#7cbaf8",nodeType:"simple-node"},ci:{label:"CI/CD",background:"#9ec9c9",nodeType:"simple-node"},iot:{label:"IoT",background:"#FFA500",nodeType:"simple-node"},flow:{label:"\u5B50\u89C4\u5219\u94FE",background:"#E6E0F8FF",nodeType:"simple-node"}},component:{endpoints:{"endpoint/mqtt":{notInput:!0,label:"MQTT",icon:Tn+"/images/endpoint/mqtt.svg",desc:"<ul><li>MQTT\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5MQTT Server\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"MQTT Server\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},maxReconnectInterval:{label:"\u91CD\u8FDE\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:""},qOS:{label:"QOS",desc:""},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/net":{notInput:!0,label:"TCP/UDP",icon:Tn+"/images/endpoint/net.svg",desc:"<ul><li>TCP/UDP\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002</li><li>\u542F\u52A8TCP/UPD\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u6B63\u5219\u8868\u8FBE\u5F0F\u8DEF\u7531\u6570\u636E\u89E6\u53D1\u89C4\u5219\u94FE\u3002</li></ul>",protocol:{label:"\u534F\u8BAE",desc:"tcp/udp",rules:[{required:!0,message:"\u534F\u8BAE\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}]}},server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335"},readTimeout:{label:"\u8BFB\u8D85\u65F6(\u5355\u4F4D\u79D2)",desc:""},encode:{label:"\u7F16\u7801",desc:"\u628A\u5B57\u8282\u6D41\u8F6C\u6362\u6210hex/base64\uFF0C\u9ED8\u8BA4\u4E0D\u8F6C\u6362",rules:[],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,clearable:!0,options:[{label:"\u65E0",value:"none"},{label:"hex",value:"hex"},{label:"base64",value:"base64"}]}},router:{from:{path:{label:"\u8DEF\u7531\u6B63\u5219\u8868\u8FBE\u5F0F",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u901A\u8FC7\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\u6EE1\u8DB3\u6761\u4EF6\u7684\u6570\u636E\u89E6\u53D1\uFF0C*\u8868\u793A\u5339\u914D\u6240\u6709"}}}},"endpoint/http":{notInput:!0,label:"HTTP",icon:Tn+"/images/endpoint/http.svg",desc:"<ul><li>HTTP\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002</li><li>\u542F\u52A8HTTP\u670D\u52A1\u5668\uFF0C\u5904\u7406\u8DEF\u7531\u7ED9\u5B9AURL\u8BF7\u6C42\uFF0C\u628A\u8BF7\u6C42\u6570\u636E\u8DEF\u8DEF\u7531\u5230\u89C4\u5219\u94FE\u3002</li></ul>",server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},allowCors:{label:"\u662F\u5426\u5141\u8BB8\u8DE8\u57DF"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},router:{from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5BA2\u6237\u7AEF\u8BF7\u6C42\u8BE5URL\u89E6\u53D1\uFF0C\u5982:/api/v1/msg"}}}},"endpoint/ws":{notInput:!0,label:"Websocket",icon:Tn+"/images/endpoint/websocket.svg",desc:"<ul><li>Websocket\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002</li><li>\u542F\u52A8Websocket\u670D\u52A1\u5668\uFF0C\u5904\u7406\u8DEF\u7531\u7ED9\u5B9AURL\u8BF7\u6C42\uFF0C\u628A\u8BF7\u6C42\u6570\u636E\u8DEF\u8DEF\u7531\u5230\u89C4\u5219\u94FE\u3002</li></ul>",server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},allowCors:{label:"\u662F\u5426\u5141\u8BB8\u8DE8\u57DF"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},router:{from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5BA2\u6237\u7AEF\u8BF7\u6C42\u8BE5URL\u89E6\u53D1\uFF0C\u5982:/api/ms/ws "}}}},"endpoint/schedule":{notInput:!0,label:"\u5B9A\u65F6\u8C03\u5EA6",icon:Tn+"/images/endpoint/schedule.svg",desc:"<ul><li>\u5B9A\u65F6\u8C03\u5EA6\u63A5\u5165\u7AEF</li><li>\u901A\u8FC7\u8DEF\u7531\u7ED9\u5B9ACron\u8868\u8FBE\u5F0F\u5468\u671F\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",router:{from:{path:{label:"cron\u8868\u8FBE\u5F0F",rules:[{required:!0,message:"\u8BF7\u8F93\u5165cron\u8868\u8FBE\u5F0F\u5982: */10 * * * * *"}],desc:"\u901A\u8FC7cron\u8868\u8FBE\u5F0F\u5468\u671F\u89E6\u53D1\uFF0C\u5982: */10 * * * * *"},processors:{hide:!0}},to:{processors:{hide:!0}}}},"endpoint/kafka":{notInput:!0,label:"Kafka",icon:"/images/endpoint/kafka.svg",desc:"<ul><li>Kafka\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5Kafka\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"kafka\u670D\u52A1\u5668\u5730\u5740",desc:"\u591A\u4E2A\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00\uFF0C\u5982: 127.0.0.1:9092,127.0.0.2:9092",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]},groupId:{label:"\u6D88\u8D39\u8005\u7EC4ID",desc:"\u9ED8\u8BA4sagoo"},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/nats":{notInput:!0,label:"Nats",icon:Tn+"/images/endpoint/nats.svg",desc:"<ul><li>Nats\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5Nats\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"NATS\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: nats://127.0.0.1:4222",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/redis":{notInput:!0,label:"Redis",icon:Tn+"/images/endpoint/redis.svg",desc:"<ul><li>Redis\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5Redis\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u8BA2\u9605\u901A\u9053\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"Redis\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:6379",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},router:{from:{path:{label:"\u8BA2\u9605Redis\u901A\u9053",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u591A\u4E2A\u901A\u9053\u4E0E\u9017\u53F7\u5206\u5272\uFF0C\u4F8B\u5982: devices/msg,devices/msg2"}}}},"endpoint/redis/stream":{notInput:!0,label:"Redis\u6D41",icon:Tn+"/images/endpoint/redis_stream.svg",desc:"<ul><li>Redis Steam\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5Redis\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u6D41\u540D\u79F0\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"Redis\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:6379",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},groupId:{label:"\u6D88\u8D39\u8005\u7EC4ID",desc:"\u9ED8\u8BA4rulego"},router:{from:{path:{label:"\u8BA2\u9605\u6D41\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u591A\u4E2A\u6D41\u4E0E\u9017\u53F7\u5206\u5272\uFF0C\u4F8B\u5982: devices/msg,devices/msg2"}}}},"endpoint/rabbitmq":{notInput:!0,label:"RabbitMQ",icon:Tn+"/images/endpoint/rabbitmq.svg",desc:"<ul><li>rabbitmq\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u652F\u6301AMQP\u534F\u8BAE</li><li>\u8FDE\u63A5rabbitmq\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u8DEF\u7531\u952E\u89E6\u53D1\u89C4\u5219\u94FE</li><li>\u5982\u679C\u4EA4\u6362\u673A\u4E0D\u5B58\u5728\u5219\u81EA\u52A8\u58F0\u660E</li></ul>",server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u683C\u5F0F:amqp://[\u7528\u6237\u540D:\u5BC6\u7801]@host/[\u865A\u62DF\u673A\u540D\u79F0]",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},exchange:{label:"\u4EA4\u6362\u673A\u540D\u79F0",desc:""},exchangeType:{label:"\u4EA4\u6362\u673A\u7C7B\u578B",desc:"direct/fanout/headers/topic"},durable:{label:"\u662F\u5426\u6301\u4E45\u5316",desc:""},autoDelete:{label:"\u662F\u5426\u81EA\u52A8\u5220\u9664",desc:""},router:{from:{path:{label:"\u8DEF\u7531\u952E",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""}}}},"endpoint/mysql_cdc":{notInput:!0,label:"MYSQL CDC",icon:Tn+"/images/endpoint/mysql_cdc.svg",desc:"<ul><li>\u76D1\u542Cmysql\u8868\u6570\u636E\u53D8\u5316\u89E6\u53D1\u3002</li></li>",server:{label:"MYSQL\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:3306"},user:{label:"\u7528\u6237\u540D"},password:{label:"\u5BC6\u7801",desc:""},fromOldest:{label:"\u662F\u5426\u5168\u91CF\u540C\u6B65",desc:"\u5F00\u542F\u540E\uFF0C\u6BCF\u6B21\u91CD\u542F\u670D\u52A1\u90FD\u4F1A\u4ECE\u7B2C\u4E00\u884C\u5F00\u59CB\u540C\u6B65\u6570\u636E\uFF0C\u5426\u5219\u53EA\u540C\u6B65\u589E\u91CF\u6570\u636E"},dbs:{label:"\u76D1\u542C\u6570\u636E\u5E93\uFF0C\u5982\u679C\u7A7A\u5219\u5305\u542B\u6240\u6709\u8868",desc:"\u5982\uFF1Atest"},includeTables:{label:"\u5305\u542B\u8868\u540D\uFF0C\u5982\u679C\u7A7A\u5219\u5305\u542B\u6240\u6709\u8868",desc:"\u5982\uFF1Atest.users\uFF0C\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\uFF0C\u5982\uFF1A.*\\.canal\u6216test.*"},excludeTables:{label:"\u6392\u9664\u8868\u540D",desc:"\u5982\uFF1Amysql.component\uFF0C\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\uFF0C\u5982\uFF1Amysql\\..*"},executionPath:{label:"mysqldump\u6267\u884C\u8DEF\u5F84",desc:"\u5982\uFF1Amysqldump\u6216\u8005/usr/bin/mysqldump"},charset:{label:"\u5B57\u7B26\u96C6",desc:"\u5982\uFF1Autf8"},flavor:{label:"\u6570\u636E\u5E93\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"mysql",value:"mysql"},{label:"mariadb",value:"mariadb"}]}},heartbeat:{label:"\u5FC3\u8DF3\u65F6\u95F4\uFF0C\u5355\u4F4D\u79D2"},readTimeout:{label:"\u8BFB\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2"},router:{from:{path:{label:"\u8DEF\u7531\u8868\u540D",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u6839\u636E\u8868\u540D\u8DEF\u7531\uFF0C\u8868\u540D\u683C\u5F0F\uFF1AdbName.tableName\uFF0C\u5982:test.users\u3002*\u8868\u793A\u6240\u6709\u8868"},processors:{hide:!0}},to:{processors:{hide:!0}}}},"endpoint/sagoo/devicein":{notInput:!0,label:"\u8BBE\u5907\u6570\u636E",icon:Tn+"/images/devicein.svg",desc:"\u7528\u4E8E\u83B7\u53D6\u8BBE\u5907\u6570\u636E\u3002",productKey:{label:"\u9009\u62E9\u4EA7\u54C1",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",optionApi:"/product/list",autoGetData:!0,resDataKey:"product",resDataLabelKey:"name",resDataValueKey:"key",onChangeGetDataKey:"deviceKey",filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1",multiple:!1,options:[]}},deviceKey:{label:"\u9009\u62E9\u8BBE\u5907",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",autoGetData:!1,optionApi:"/product/device/list",resDataKey:"device",getDataByKey:"productKey",resDataLabelKey:"name",resDataValueKey:"key",apiParams:{productKey:""},filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",multiple:!1,options:[],defineOptions:[{label:"\u5168\u90E8",value:"all"}]}},antiShake:{label:"\u542F\u7528\u9632\u6296",desc:""},antiShakeMs:{label:"\u9632\u6296\u65F6\u95F4",desc:"\u5355\u4F4D\uFF1A\u79D2"},antiShakeNum:{label:"\u9632\u6296\u6B21\u6570",desc:""},processFirstItem:{label:"\u9996\u6761\u6570\u636E\u7ACB\u5373\u5904\u7406",desc:""},router:{from:{path:{label:"\u89E6\u53D1\u7C7B\u578B",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",options:[{label:"\u5C5E\u6027\u4E0A\u62A5",value:"reportAttribute"},{label:"\u4E8B\u4EF6\u4E0A\u62A5",value:"reportEvent"}]}}}},"endpoint/opcua":{notInput:!0,label:"OPC_UA\u8BA2\u9605",icon:"/images/endpoint/opcua.svg",desc:"<ul><li>\u5B9A\u65F6\u4ECEOPCUA\u670D\u52A1\u5668\u8BFB\u53D6\u6570\u636E\u3002</li></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},interval:{label:"\u8BFB\u4EFB\u52A1\u65F6\u95F4\u914D\u7F6E",desc:"\u793A\u4F8B: @every 1m (\u6BCF\u96941\u5206\u949F) 0 0 0 * * * (\u51CC\u666812\u70B9\u89E6\u53D1)",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},nodeIds:{label:"\u8282\u70B9ID\u5217\u8868",desc:"\u793A\u4F8B:ns=3;i=1003",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}},router:{hide:!0}},"endpoint/grpc/stream":{label:"gRPC\u6D41",icon:"/images/grpc.svg",desc:'<ul><li>\u63A5\u6536gRPC\u670D\u52A1\u5668\u63A8\u9001\u6570\u636E\uFF0C\u5E76\u8F6C\u53D1\u5230\u89C4\u5219\u94FE\u5904\u7406</li></ul><a href="https://rulego.cc/pages/endpoint-grpc-stream/" target="_blank">\u5E2E\u52A9\u6587\u6863</a>',server:{label:"gRPC\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},service:{label:"\u670D\u52A1\u540D\u79F0",desc:"\u793A\u4F8B\uFF1Ahelloworld.Greeter",rules:[{required:!0,message:"\u670D\u52A1\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},method:{label:"\u65B9\u6CD5\u540D\u79F0",desc:"\u793A\u4F8B\uFF1ASayHello",rules:[{required:!0,message:"\u65B9\u6CD5\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},request:{label:"\u8BF7\u6C42\u53C2\u6570\u5185\u5BB9(\u5141\u8BB8\u7A7A)",desc:'\u793A\u4F8B\uFF1A{"name":"lala"}',component:{type:"textarea"}},headers:{label:"\u8BF7\u6C42\u5934",desc:""},checkInterval:{label:"\u670D\u52A1\u68C0\u67E5\u95F4\u9694,\u5355\u4F4D:\u6BEB\u79D2",desc:""},router:{hide:!0}}},nodes:{comment:{notInput:!0,notOutput:!0,label:"\u6CE8\u91CA",icon:Tn+"/images/comment.svg",desc:"\u628A\u8282\u70B9\u540D\u79F0\u4F5C\u4E3A\u6CE8\u91CA\u5185\u5BB9\u663E\u793A\u5728\u753B\u5E03\u4E0A",nodeType:"comment-node"},delay:{label:"\u5EF6\u8FDF",icon:Tn+"/images/delay.svg",desc:"",periodInSeconds:{label:"\u5EF6\u8FDF\u65F6\u95F4(\u79D2)",desc:""},maxPendingMsgs:{label:"\u6700\u5927\u5141\u8BB8\u6302\u8D77\u6D88\u606F\u7684\u6570\u91CF",desc:"\u5982\u679C\u542F\u7528\u8986\u76D6\u6A21\u5F0F\uFF0C\u8BE5\u53C2\u6570\u5931\u6548"},periodInSecondsPattern:{label:"\u5EF6\u8FDF\u65F6\u95F4\u8868\u8FBE\u5F0F(\u79D2)",desc:"\u901A\u8FC7 ${metadata.key} \u4ECE\u5143\u6570\u636E\u53D8\u91CF\u4E2D\u83B7\u53D6\u6216\u8005\u901A\u8FC7 ${msg.key} \u4ECE\u6D88\u606F\u8D1F\u8377\u4E2D\u83B7\u53D6\uFF0C\u5EF6\u8FDF\u65F6\u95F4\uFF0C\u5982\u679C\u8BE5\u503C\u6709\u503C\uFF0C\u4F18\u5148\u53D6\u8BE5\u503C\u3002"},overwrite:{label:"\u8986\u76D6\u6A21\u5F0F",desc:"\u5982\u679C\u542F\u7528\uFF0C\u5468\u671F\u5185\u53EA\u5141\u8BB8\u6302\u8D77\u4E00\u6761\u6D88\u606F\uFF0C\u65B0\u6D88\u606F\u4F1A\u8986\u76D6\u4E0A\u4E00\u6761\u6D88\u606F"}},log:{label:"\u65E5\u5FD7",icon:Tn+"/images/log.svg",desc:"<ul><li>\u8BB0\u5F55\u65E5\u5FD7</li><li>\u4F7F\u7528JavaScript\u811A\u672C\u5BF9\u6D88\u606F\u8FDB\u884C\u683C\u5F0F\u5316\u540E\u8BB0\u5F55\u5230\u65E5\u5FD7\u6587\u4EF6\u4E2D</li></ul>",jsScript:{label:"function String(msg, metadata, msgType) {",desc:"}"}},for:{label:"for",icon:Tn+"/images/for.svg",desc:"<ul><li>\u904D\u5386\u7EC4\u4EF6</li><li>\u7528\u4E8E\u904D\u5386\u6570\u7EC4\uFF0C\u5207\u7247\u548C\u7ED3\u6784\u4F53\uFF0C\u4E5F\u7528\u4E8E\u91CD\u590D\u6267\u884C\u4ECE\u6307\u5B9A\u8282\u70B9\u5F00\u59CB\u7684\u94FE\u6216\u5B50\u89C4\u5219\u94FE</li></ul>",range:{label:"\u8FED\u4EE3\u503C\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.items;1..3;\u5982\u679C\u7A7A\u5219\u904D\u5386\u6574\u4E2Amsg"},do:{label:"\u5904\u7406\u8282\u70B9ID",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5904\u7406\u94FE\u7684\u8D77\u59CB\u8282\u70B9ID",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,loadData:zO}},mode:{label:"\u6267\u884C\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u540C\u6B65\u4E0D\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:0},{label:"\u540C\u6B65\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:1},{label:"\u540C\u6B65\u8986\u76D6\u6267\u884C\u7ED3\u679C",value:2},{label:"\u5F02\u6B65\u4E0D\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:3}]}}},functions:{label:"\u51FD\u6570",desc:"<ul><li>\u6267\u884C\u81EA\u5B9A\u4E49\u5904\u7406\u51FD\u6570</li><li>\u7528\u4E8E\u8F7B\u91CF\u7EA7\u81EA\u5B9A\u4E49\u8282\u70B9\u5B9E\u73B0\uFF0C\u8BA9\u4F60\u7684Golang\u81EA\u5B9A\u4E49\u51FD\u6570\u79D2\u53D8\u7EC4\u4EF6</li></ul>",functionName:{label:"\u51FD\u6570\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",component:{type:"select",filterable:!0,allowCreate:!0,placeholder:"\u8BF7\u9009\u62E9\u6216\u8005\u8F93\u5165\u51FD\u6570\u540D"}}},dbClient:{label:"\u6570\u636E\u5E93",icon:Tn+"/images/db.svg",desc:"<ul><li>\u6570\u636E\u5E93\u5BA2\u6237\u7AEF</li><li>\u901A\u8FC7\u6807\u51C6sql\u63A5\u53E3\u5BF9\u6570\u636E\u5E93\u8FDB\u884C\u589E\u5220\u4FEE\u6539\u67E5\u64CD\u4F5C</li></ul>",sql:{label:"SQL\u8BED\u53E5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u6216\u8005 ${msg.key}\u53D8\u91CF\uFF0CSQL\u53C2\u6570\u5141\u8BB8\u4F7F\u7528 ? \u5360\u4F4D\u7B26"},params:{label:"\u5360\u4F4D\u7B26\u53C2\u6570\u5217\u8868",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},getOne:{label:"\u8FD4\u56DE\u4E00\u6761\u8BB0\u5F55",desc:""},poolSize:{label:"\u8FDE\u63A5\u6C60\u5927\u5C0F",desc:""},driverName:{label:"\u6570\u636E\u5E93\u9A71\u52A8\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"mysql\u6216postgres\uFF0C\u5982\u9700\u5176\u4ED6\u6570\u636E\u5E93\u7C7B\u578B\u9700\u5F15\u5165\u5BF9\u5E94\u6570\u636E\u5E93\u9A71\u52A8",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"mysql",value:"mysql"},{label:"postgres",value:"postgres"}]}},dsn:{label:"\u6570\u636E\u5E93\u8FDE\u63A5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"Mysql\u914D\u7F6E\u793A\u4F8B: username:password@tcp(127.0.0.1:3306)/db Postgres\u914D\u7F6E\u793A\u4F8B\uFF1Apostgres://username:password@127.0.0.1:5432/db?sslmode=disable",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}}},mqttClient:{label:"MQTT",icon:Tn+"/images/mqtt.svg",desc:"<ul><li>mqtt\u5BA2\u6237\u7AEF</li><li>\u5F80mqtt broker \u6307\u5B9A\u4E3B\u9898\u53D1\u5E03\u5F53\u524D\u6D88\u606F\u6570\u636E</li></ul>",topic:{label:"\u53D1\u5E03\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},server:{label:"MQTT \u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:1883 \u3002\u5141\u8BB8\u9009\u62E9\u8FDE\u63A5\u6C60\u8FDB\u884C\u8FDE\u63A5",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},maxReconnectInterval:{label:"\u91CD\u8FDE\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:""},qOS:{label:"QoS",desc:""},clientID:{label:"\u5BA2\u6237\u7AEFID",desc:""},cleanSession:{label:"\u6E05\u9664\u4F1A\u8BDD",desc:""},cAFile:{label:"\u8BC1\u4E66\u9881\u53D1\u673A\u6784(CA)\u6587\u4EF6",desc:""},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6",desc:""},certKeyFile:{label:"\u8BC1\u4E66\u5BC6\u94A5\u6587\u4EF6",desc:""}},restApiCall:{label:"REST",icon:Tn+"/images/rest.svg",desc:"<ul><li>\u8C03\u7528rest api\u5BA2\u6237\u7AEF</li><li>\u8C03\u7528\u5916\u90E8REST\u670D\u52A1</li></ul>",restEndpointUrlPattern:{label:"HTTP URL\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},requestMethod:{label:"\u8BF7\u6C42\u65B9\u6CD5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"},{label:"HEAD",value:"HEAD"}]},desc:"POST/GET/DELETE/PUT/PATCH/HEAD"},withoutRequestBody:{label:"\u4E0D\u4F20\u8F93request body",desc:"\u4E0D\u628A\u6D88\u606F\u8D1F\u8377\u4F20\u8F93\u7ED9\u914D\u7F6E\u7684\u670D\u52A1\u5730\u5740"},headers:{label:"\u8BF7\u6C42\u5934",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},readTimeoutMs:{label:"\u8D85\u65F6\uFF0C\u5355\u4F4D\u6BEB\u79D2\u3002\u9ED8\u8BA4:0",desc:"0\u4EE3\u8868\u4E0D\u8D85\u65F6"},insecureSkipVerify:{label:"\u7981\u7528\u8BC1\u4E66\u9A8C\u8BC1",desc:"\u81EA\u7B7E\u8BC1\u4E66\u9700\u8981\u6253\u5F00\u7981\u7528\u8BC1\u4E66\u9A8C\u8BC1"},maxParallelRequestsCount:{label:"\u6700\u5927\u5E76\u53D1\u5927\u5C0F",desc:"0\u4EE3\u8868\u4E0D\u9650\u5236"},enableProxy:{label:"\u5F00\u542F\u4EE3\u7406",desc:""},useSystemProxyProperties:{label:"\u4F7F\u7528\u7CFB\u7EDF\u4EE3\u7406\u914D\u7F6E",desc:""},proxyScheme:{label:"\u4EE3\u7406\u534F\u8BAE",desc:""},proxyHost:{label:"\u4EE3\u7406\u4E3B\u673A",desc:""},proxyPort:{label:"\u4EE3\u7406\u7AEF\u53E3",desc:""},proxyUser:{label:"\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u5BC6\u7801",desc:""}},sendEmail:{label:"\u53D1\u90AE\u4EF6",icon:Tn+"/images/email.svg",desc:"<ul><li>\u53D1\u9001\u90AE\u4EF6</li></ul>",smtpHost:{label:"SMTP \u4E3B\u673A\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},smtpPort:{label:"SMTP \u4E3B\u673A\u7AEF\u53E3",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},username:{label:"\u7528\u6237\u540D",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},password:{label:"\u6388\u6743\u7801",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},enableTls:{label:"\u662F\u5426\u5F00\u542FTLS",desc:""},email:{label:"\u90AE\u4EF6\u5185\u5BB9",desc:"",from:{label:"\u53D1\u4EF6\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},to:{label:"\u6536\u4EF6\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},cc:{label:"\u6284\u9001\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},bcc:{label:"\u5BC6\u9001\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},subject:{label:"\u90AE\u4EF6\u4E3B\u9898",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},body:{label:"\u90AE\u4EF6\u5185\u5BB9",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6,\u5355\u4F4D\u79D2\u3002\u9ED8\u8BA4:10",desc:""}},ssh:{label:"SSH",icon:Tn+"/images/ssh.svg",desc:"<ul><li>\u901A\u8FC7ssh\u8FDC\u7A0B\u767B\u5F55</li><li>\u6267\u884CShell\u811A\u672C</li></ul>",host:{label:"ssh\u4E3B\u673A\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},port:{label:"ssh\u4E3B\u673A\u7AEF\u53E3",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},username:{label:"ssh\u767B\u5F55\u7528\u6237\u540D",desc:""},password:{label:"ssh\u767B\u5F55\u5BC6\u7801",desc:""},cmd:{label:"shell\u547D\u4EE4",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},fieldFilter:{label:"\u5B57\u6BB5\u8FC7\u6EE4",desc:"<ul><li>\u5B57\u6BB5\u8FC7\u6EE4\u5668</li><li>\u53EF\u4EE5\u5BF9msg\u548Cmetadata\u5B57\u6BB5\u8FDB\u884C\u8FC7\u6EE4</li></ul>",checkAllKeys:{label:"\u662F\u5426\u6EE1\u8DB3\u9700\u8981\u6240\u6709\u5B57\u6BB5key\u5B58\u5728",desc:""},dataNames:{label:"msg data\u5B57\u6BB5key",desc:"\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00"},metadataNames:{label:"metadata\u5B57\u6BB5key",desc:"\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00"}},jsFilter:{label:"js\u8FC7\u6EE4",icon:Tn+"/images/jsFilter.svg",desc:"<ul><li>\u811A\u672C\u8FC7\u6EE4\u5668</li><li>\u53EF\u4EE5\u4F7F\u7528JavaScript\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8FC7\u6EE4</li></ul>",jsScript:{label:"function Filter(msg, metadata, msgType) {",desc:"}"}},jsSwitch:{label:"js\u8DEF\u7531",desc:"<ul><li>\u811A\u672C\u8DEF\u7531</li><li>\u6267\u884C\u5DF2\u914D\u7F6E\u7684JS\u811A\u672C</li></ul>",jsScript:{label:"function Switch(msg, metadata, msgType) {",desc:"}"}},msgTypeSwitch:{label:"\u6D88\u606F\u8DEF\u7531",icon:Tn+"/images/msgTypeSwitch.svg",desc:"<ul><li>\u6D88\u606F\u8DEF\u7531</li><li>\u6839\u636E\u4F20\u5165\u7684\u6D88\u606F\u7C7B\u578B\uFF08msgType\uFF09\u8DEF\u7531\u5230\u4E00\u4E2A\u6216\u591A\u4E2A\u8F93\u51FA\u94FE</li></ul>",cases:{label:"\u6761\u4EF6\u5217\u8868",desc:"\u4F9D\u6B21\u5339\u914D\u6761\u4EF6\u5217\u8868\uFF0C\u5982\u679C\u5339\u914D\u5230\u6839\u636E\u8DEF\u7531\u6267\u884C\u540E\u7EED\u8282\u70B9\uFF0C\u5982\u679C\u6CA1\u6709\u5339\u914D\u5230\u5219\u6267\u884CDefault\u94FE",component:{type:"switchNode"}},relationTypeDynamics:!0},exprFilter:{label:"\u8868\u8FBE\u5F0F\u8FC7\u6EE4",icon:Tn+"/images/exp.svg",desc:"<ul><li>\u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u6D88\u606F</li><li>\u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`</li><li>\u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`</li><li>\u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B</li><li>\u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B</li></ul>",expr:{label:"\u8FC7\u6EE4\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.temperature>50\uFF0C\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5E03\u5C14\u7C7B\u578B",rules:[{required:!0,message:"\u8FC7\u6EE4\u8868\u8FBE\u5F0F\u662F\u5FC5\u987B\u7684"}]}},switch:{label:"\u6761\u4EF6\u5206\u652F",icon:Tn+"/images/msgTypeSwitch.svg",desc:"<ul><li>\u6761\u4EF6\u5206\u652F\u8282\u70B9</li><li>\u4F9D\u6B21\u5339\u914Dcase\u8868\u8FBE\u5F0F</li></ul>",cases:{label:"\u6761\u4EF6\u5217\u8868",desc:"\u4F9D\u6B21\u5339\u914D\u6761\u4EF6\u5217\u8868\uFF0C\u5982\u679C\u5339\u914D\u5230\u6839\u636E\u8DEF\u7531\u6267\u884C\u540E\u7EED\u8282\u70B9\uFF0C\u5982\u679C\u6CA1\u6709\u5339\u914D\u5230\u5219\u6267\u884CDefault\u94FE",component:{type:"switchNode"}},relationTypeDynamics:!0},exprTransform:{label:"\u8868\u8FBE\u5F0F\u8F6C\u6362",icon:Tn+"/images/exp.svg",desc:"<ul><li>\u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8F6C\u6362\u6216\u8005\u521B\u5EFA\u65B0\u7684msg</li><li>\u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`</li><li>\u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`</li><li>\u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B</li><li>\u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B</li></ul>",expr:{label:"\u8F6C\u6362\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.name\u3002\u5982\u679C\u8BE5\u5B57\u6BB5\u6709\u503C\u5219\u4F18\u5148\u4F7F\u7528\u8BE5\u5B57\u6BB5\u3002"},mapping:{label:"\u5B57\u6BB5-\u8868\u8FBE\u5F0F\u6620\u5C04\u5217\u8868\uFF08\u521B\u5EFA\u65B0\u7684Msg\uFF09",desc:"Key:\u5B57\u6BB5\u540D,Value:\u8868\u8FBE\u5F0F\u3002\u5982\u679C\u8BE5\u5B57\u6BB5\u6709\u503C\uFF0C\u6839\u636E\u6307\u5B9A\u7684\u5B57\u6BB5\u548C\u8F6C\u6362\u8868\u8FBE\u5F0F\u521B\u5EFA\u65B0\u7684Msg"}},metadataTransform:{label:"\u5143\u6570\u636E\u8F6C\u6362",icon:Tn+"/images/metadata.svg",desc:"<ul><li>\u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8F6C\u6362\u6216\u8005\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E</li><li>\u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`</li><li>\u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`</li><li>\u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B</li><li>\u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B</li></ul>",mapping:{label:"\u5B57\u6BB5-\u8868\u8FBE\u5F0F\u6620\u5C04\u5217\u8868",desc:"Key:\u5B57\u6BB5\u540D,Value:\u8F6C\u6362\u8868\u8FBE\u5F0F\u3002\u5982\u679C\u4E0D\u662F\u8868\u8FBE\u5F0F\uFF0C\u4F7F\u7528\u5355\u5F15\u53F7\uFF0C\u5982\uFF1A'xx'"},isNew:{label:"\u662F\u5426\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E\u5217\u8868",desc:"true:\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E\u5217\u8868,false:\u66F4\u65B0\u5BF9\u5E94\u7684\u5143\u6570\u636Ekey"}},jsTransform:{label:"js\u8F6C\u6362",desc:"<ul><li>\u811A\u672C\u8F6C\u6362\u5668</li><li>\u53EF\u4EE5\u4F7F\u7528JavaScript\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8F6C\u6362\u6216\u589E\u5F3A</li></ul>",jsScript:{label:"function Transform(msg, metadata, msgType) {",desc:"}"}},net:{label:"TCP/UDP",icon:Tn+"/images/net.svg",desc:"<ul><li>TCP/UDP\u5BA2\u6237\u7AEF</li><li>\u628Amsg\u53D1\u9001\u5230\u6307\u5B9A\u534F\u8BAE\u7F51\u7EDC\u670D\u52A1\u5668</li><li>\u652F\u6301\u534F\u8BAE\uFF1Atcp\u3001udp\u3001ip4:1\u3001ip6:ipv6-icmp\u3001ip6:58\u3001unix\u3001unixgram\uFF0C\u4EE5\u53CAnet\u5305\u652F\u6301\u7684\u534F\u8BAE\u7C7B\u578B</li></ul>",protocol:{label:"\u534F\u8BAE",desc:"tcp/udp",rules:[{required:!0,message:"\u534F\u8BAE\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}]}},server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B:127.0.0.1:6335"},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA460"},heartbeatInterval:{label:"\u5FC3\u8DF3\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2\uFF0C0\u4E0D\u53D1\u9001\u5FC3\u8DF3"}},flow:{label:"\u5B50\u89C4\u5219\u94FE",desc:"",targetId:{label:"\u5B50\u89C4\u5219\u94FEID",desc:"",rules:[{required:!0,message:"\u5B50\u89C4\u5219\u94FEID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,loadData:async function(t,e,n,r){var i;if(!r){let o=[];try{let a=await fetch(((i=t.getEditorSetting())==null?void 0:i.url)+"/api/v1/rules?root=false").then(s=>s.json());a==null||a.items.forEach(s=>{o.push({value:s.ruleChain.id,label:s.ruleChain.name})})}catch{}finally{n.component.options=o}}}}},extend:{label:"\u7EE7\u627F\u6A21\u5F0F",desc:"\u5982\u679C\u5F00\u542F\uFF0C\u4E0D\u5408\u5E76\u5B50\u89C4\u5219\u94FE\u8F93\u51FA\u5173\u7CFB\u548C\u6D88\u606F",rules:[{required:!0,message:"\u5B50\u89C4\u5219\u94FEID\u662F\u5FC5\u987B\u7684"}]}},ref:{label:"\u8282\u70B9\u5F15\u7528",icon:Tn+"/images/ref.svg",relationTypeAllowCreate:!0,relationTypes:[{label:"\u6210\u529F",value:"Success"},{label:"\u5931\u8D25",value:"Failure"},{label:"\u771F",value:"True"},{label:"\u5047",value:"False"}],desc:"<ul><li>\u8282\u70B9\u5F15\u7528</li><li>\u5F15\u7528\u6307\u5B9A\u89C4\u5219\u94FE\u6216\u8005\u5F53\u524D\u89C4\u5219\u94FE\u8282\u70B9\uFF0C\u7528\u4E8E\u8282\u70B9\u590D\u7528</li></ul>",targetId:{label:"\u8282\u70B9ID",desc:"\u5F15\u7528\u672C\u89C4\u5219\u94FE\u4E2D\u7684\u5176\u4ED6\u8282\u70B9",rules:[{required:!0,message:"\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,loadData:zO}}},groupFilter:{label:"\u8FC7\u6EE4\u5668\u7EC4",icon:Tn+"/images/groupFilter.svg",desc:"<ul><li>\u8FC7\u6EE4\u5668\u8282\u70B9\u7EC4</li><li>\u628A\u591A\u4E2AFilter\u8282\u70B9\u7EC4\u6210\u4E00\u4E2A\u5206\u7EC4</li></ul>",allMatches:{label:"\u662F\u5426\u9700\u8981\u5168\u5339\u914D",desc:""},nodeIds:{label:"\u7EC4\u5185\u8282\u70B9ID\u5217\u8868",desc:"",rules:[{required:!0,message:"\u7EC4\u5185\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!0,loadData:zO}},timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},groupAction:{label:"\u8282\u70B9\u7EC4",desc:"<ul><li>\u5F02\u6B65\u6267\u884C\u591A\u4E2A\u8282\u70B9\uFF0C\u628A\u6240\u6709\u8282\u70B9\u7ED3\u679C\u5408\u5E76\uFF0C\u53D1\u9001\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9</li><li>\u5982\u679C\u5339\u914D\u5230\u6307\u5B9A\u6570\u91CF\u8282\u70B9\u90FD\u662F\u6307\u5B9A\u5173\u7CFB\u7C7B\u578B\uFF0C\u5219\u628A\u6570\u636E\u5230`Success`\u94FE, \u5426\u5219\u53D1\u5230`Failure`\u94FE</li></ul>",icon:Tn+"/images/groupAction.svg",matchRelationType:{label:"\u5339\u914D\u5173\u7CFB\uFF0C\u9ED8\u8BA4Success",desc:""},matchNum:{label:"\u5339\u914D\u6EE1\u8DB3\u8282\u70B9\u6570\u91CF\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u8868\u793A\u6240\u6709\u8282\u70B9\u90FD\u6EE1\u8DB3\u6307\u5B9A\u5173\u7CFB"},nodeIds:{label:"\u7EC4\u5185\u8282\u70B9ID\u5217\u8868",desc:"",rules:[{required:!0,message:"\u7EC4\u5185\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!0,loadData:zO}},timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},iterator:{label:"\u8FED\u4EE3\u5668",desc:"<ul><li>\u5F03\u7528\uFF0C\u4F7F\u7528for\u7EC4\u4EF6\u4EE3\u66FF</li><li>\u904D\u5386msg\u6216\u8005msg\u4E2D\u6307\u5B9A\u5B57\u6BB5item\u503C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u904D\u5386\u5B57\u6BB5\u503C\u5FC5\u987B\u662F`\u6570\u7EC4`\u6216\u8005`{key:value}`\u7C7B\u578B</li><li>\u5982\u679Citem\u6EE1\u8DB3jsScript\uFF0C\u5219\u4F1A\u628Aitem\u6570\u636E\u901A\u8FC7`True`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u5426\u5219\u901A\u8FC7`False`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9</li><li>\u5982\u679C\u627E\u4E0D\u5230\u6307\u5B9A\u5B57\u6BB5\u3001js\u811A\u672C\u6267\u884C\u5931\u8D25\u6216\u8005\u904D\u5386\u7684\u5BF9\u8C61\u4E0D\u662F `\u6570\u7EC4`\u6216\u8005`{key:value}`\uFF0C\u5219\u4F1A\u628A\u9519\u8BEF\u4FE1\u606F\u901A\u8FC7`Failure`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9</li><li>\u904D\u5386\u7ED3\u675F\u540E\uFF0C\u901A\u8FC7`Success`\u94FE\u628A\u539F\u59CBmsg\u53D1\u9001\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9</li></ul>",icon:Tn+"/images/iterator.svg",fieldName:{label:"\u904D\u5386\u5B57\u6BB5",desc:"\u5982\u679C\u7A7A\uFF0C\u904D\u5386\u6574\u4E2Amsg\uFF0C\u652F\u6301\u5D4C\u5957\u65B9\u5F0F\u83B7\u53D6msg\u5B57\u6BB5\u503C\uFF0C\u4F8B\u5982items.value\u3001items"},jsScript:{label:"function Filter(item,index,metadata) {",desc:"} \u5339\u914Ditem\u7684js\u811A\u672C\uFF0C\u53EF\u9009\uFF0C\u5982\u679C\u7A7A\u5219\u904D\u5386\u6240\u6709item"}},join:{label:"\u5408\u5E76",desc:"<ul><li>\u5408\u5E76\u591A\u4E2A\u5F02\u6B65\u8282\u70B9\u6267\u884C\u7ED3\u679C</li></ul>",icon:Tn+"/images/join.svg",timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},fork:{label:"\u5E76\u884C\u7F51\u5173",desc:"<ul><li>\u628A\u6D41\u5206\u6210\u591A\u4E2A\u5E76\u884C\u6267\u884C\u7684\u8DEF\u5F84</li></ul>",icon:Tn+"/images/fork.svg"},"text/template":{label:"\u6A21\u677F\u8F6C\u6362",icon:Tn+"/images/template.svg",desc:"",template:{label:"\u6A21\u677F\u5185\u5BB9\u6216\u8005\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u662F\u6A21\u677F\u6587\u4EF6\u8DEF\u5F84\u4F7F\u7528file:\u5F00\u5934",component:{type:"codeEditor"}}},exec:{label:"\u547D\u4EE4\u884C",icon:Tn+"/images/ssh.svg",desc:"<ul><li>\u53EA\u6267\u884C\u7CFB\u7EDF\u767D\u540D\u5355\u7684\u547D\u4EE4</li></ul>",cmd:{label:"\u6267\u884C\u547D\u4EE4",desc:"",rules:[{required:!0,message:"\u6267\u884C\u547D\u4EE4\u662F\u5FC5\u987B\u7684"}]},args:{label:"\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},log:{label:"\u6253\u5370\u6807\u51C6\u8F93\u51FA",desc:""},replaceData:{label:"\u66FF\u6362Data",desc:"\u628AData\u66FF\u6362\u4E3A\u6807\u51C6\u8F93\u51FA\uFF0C\u9ED8\u8BA4\u4E3Afalse"}},"x/redisClient":{label:"Redis",icon:Tn+"/images/redis.svg",desc:"<ul><li>redis\u5BA2\u6237\u7AEF</li><li>\u53EF\u4EE5\u6267\u884Credis\u547D\u4EE4</li></ul>",server:{label:"redis\u670D\u52A1\u5668\u5730\u5740",desc:"",rules:[{required:!0,message:"redis\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},poolSize:{label:"\u8FDE\u63A5\u6C60\u5927\u5C0F",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},cmd:{label:"\u6267\u884C\u547D\u4EE4\uFF0C\u4F8B\u5982SET/GET/DEL/HMSET/HMGET",desc:"\u652F\u6301${metadata.key}\u5360\u4F4D\u7B26\u8BFB\u53D6metadata\u5143\u6570\u636E\uFF0C\u652F\u6301${msg.key}\u5360\u4F4D\u7B26\u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9Akey\u6570\u636E\uFF0C\u652F\u6301${data}\u83B7\u53D6\u6D88\u606F\u539F\u59CB\u8D1F\u8377",rules:[{required:!0,message:"\u6267\u884C\u547D\u4EE4\u662F\u5FC5\u987B\u7684"}]},paramsExpr:{label:"\u547D\u4EE4\u52A8\u6001\u53C2\u6570",desc:'\u652F\u6301Expr\u8868\u8FBE\u5F0F\u3002\u5982:["myhash2", "field1", "value1"]\uFF0C\u6216\u8005\u901A\u8FC7\u53D8\u91CF\u53D6\u503C\u5982:msg\u8868\u793A\u53D6\u6D88\u606F\u8D1F\u8377\u3002\u547D\u4EE4\u52A8\u6001\u53C2\u6570\u548C\u547D\u4EE4\u9759\u6001\u53C2\u6570\uFF0C\u4F18\u5148\u53D6\u547D\u4EE4\u52A8\u6001\u53C2\u6570\u503C\u3002'},params:{label:"\u547D\u4EE4\u9759\u6001\u53C2\u6570",desc:"\u652F\u6301${metadata.key}\u5360\u4F4D\u7B26\u8BFB\u53D6metadata\u5143\u6570\u636E\uFF0C\u652F\u6301${msg.key}\u5360\u4F4D\u7B26\u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9Akey\u6570\u636E\uFF0C\u652F\u6301${data}\u83B7\u53D6\u6D88\u606F\u539F\u59CB\u8D1F\u8377"}},"x/luaFilter":{label:"Lua\u811A\u672C\u8FC7\u6EE4",icon:Tn+"/images/lua.svg",desc:"<ul><li>\u4F7F\u7528Lua\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8FC7\u6EE4\u3002\u6839\u636E\u811A\u672C\u8FD4\u56DE\u503C\u8DEF\u7531\u5230True\u6216\u8005False\u94FE\u3002</li><li>\u4E5F\u53EF\u4EE5\u4F7F\u7528lua\u811A\u672C\uFF0C\u8FDB\u884C\u4F8B\u5982\uFF1A\u52A0\u89E3\u5BC6\u3001I/O\u3001\u7F51\u7EDC\u3001\u6587\u4EF6\u7B49\u9AD8\u7EA7\u64CD\u4F5C</li></ul>",script:{label:"\u811A\u672C\u51FD\u6570\u4F53\u6216\u8005\u662F\u811A\u672C\u6587\u4EF6\u8DEF\u5F84",desc:"\u53EA\u9700\u8981\u63D0\u4F9B\u51FD\u6570\u4F53\u5185\u5BB9\uFF0C\u5982\u679C\u662F\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5219\u9700\u8981\u63D0\u4F9B\u5B8C\u6574\u7684\u811A\u672C\u51FD\u6570"}},"x/luaTransform":{label:"Lua\u811A\u672C\u8F6C\u6362",icon:Tn+"/images/lua.svg",desc:"<ul><li>lua\u811A\u672C\u8F6C\u6362\u5668\u3002\u53EF\u4EE5\u4F7F\u7528Lua\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8F6C\u6362\u6216\u589E\u5F3A\u3002</li><li>\u4E5F\u53EF\u4EE5\u4F7F\u7528lua\u811A\u672C\uFF0C\u8FDB\u884C\u4F8B\u5982\uFF1A\u52A0\u89E3\u5BC6\u3001I/O\u3001\u7F51\u7EDC\u3001\u6587\u4EF6\u7B49\u9AD8\u7EA7\u64CD\u4F5C</li></ul>",script:{label:"\u811A\u672C\u51FD\u6570\u4F53\u6216\u8005\u662F\u811A\u672C\u6587\u4EF6\u8DEF\u5F84",desc:"\u53EA\u9700\u8981\u63D0\u4F9B\u51FD\u6570\u4F53\u5185\u5BB9\uFF0C\u5982\u679C\u662F\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5219\u9700\u8981\u63D0\u4F9B\u5B8C\u6574\u7684\u811A\u672C\u51FD\u6570"}},"x/natsClient":{label:"NATS",icon:Tn+"/images/nats.svg",desc:"<ul><li>nats\u5BA2\u6237\u7AEF</li><li>\u5F80nats server \u6307\u5B9A\u4E3B\u9898\u53D1\u5E03\u5F53\u524D\u6D88\u606F\u6570\u636E</li></ul>",topic:{label:"\u53D1\u5E03\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},server:{label:"NATS\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: nats://127.0.0.1:4222",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""}},"x/rabbitmqClient":{label:"RabbitMQ",icon:Tn+"/images/rabbitmq.svg",desc:'<ul><li>\u53D1\u6D88\u606F\u8D1F\u8377\u53D1\u9001\u5230rabbitmq\u961F\u5217</li><li>\u652F\u6301AMQP\u534F\u8BAE</li><li><a href="https://rulego.cc/pages/rabbitmq-client/" target="_blank">\u5E2E\u52A9\u6587\u6863</li></ul></a>',server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u683C\u5F0F:amqp://[\u7528\u6237\u540D:\u5BC6\u7801]@host/[\u865A\u62DF\u673A\u540D\u79F0]",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},key:{label:"\u8DEF\u7531\u952E",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},exchange:{label:"\u4EA4\u6362\u673A\u540D\u79F0",desc:""},exchangeType:{label:"\u4EA4\u6362\u673A\u7C7B\u578B",desc:"\u53EF\u9009\u7C7B\u578B\uFF1Adirect/fanout/headers/topic"},durable:{label:"\u662F\u5426\u6301\u4E45\u5316",desc:""},autoDelete:{label:"\u662F\u5426\u81EA\u52A8\u5220\u9664",desc:""}},"x/opengeminiWrite":{label:"opengemini\u5199",icon:Tn+"/images/opengemini-write.svg",desc:"<ul><li>opengemini\u5199\u5BA2\u6237\u7AEF</li><li>\u628A\u5F53\u524D\u6D88\u606F\u8D1F\u8377\u5199\u5165 OpenGemini \u670D\u52A1\u5668</li></ul>",server:{label:"opengemini\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3\uFF0C\u591A\u4E2A\u670D\u52A1\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u6570\u636E\u5E93\u662F\u5FC5\u987B\u7684"}]},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},token:{label:"Token",desc:"\u5982\u679CToken\u4E0D\u4E3A\u7A7A\uFF0C\u4F7F\u7528Token\u8BA4\u8BC1"}},"x/opengeminiQuery":{label:"opengemini\u8BFB",icon:Tn+"/images/opengemini.svg",desc:"<ul><li>opengemini\u8BFB\u5BA2\u6237\u7AEF</li><li>\u4ECEOpenGemini\u670D\u52A1\u5668\u8BFB\u53D6\u6570\u636E</li></ul>",server:{label:"opengemini\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3\uFF0C\u591A\u4E2A\u670D\u52A1\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u6570\u636E\u5E93\u662F\u5FC5\u987B\u7684"}]},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},token:{label:"Token",desc:"\u5982\u679CToken\u4E0D\u4E3A\u7A7A\uFF0C\u4F7F\u7528Token\u8BA4\u8BC1"},command:{label:"\u67E5\u8BE2\u8BED\u53E5",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]}},"x/grpcClient":{label:"gRPC \u5BA2\u6237\u7AEF",icon:Tn+"/images/grpc.svg",desc:"<ul><li>\u52A8\u6001\u8C03\u7528gRPC\u670D\u52A1</li><</ul>",server:{label:"gRPC\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},service:{label:"\u670D\u52A1\u540D\u79F0",desc:"\u793A\u4F8B\uFF1Ahelloworld.Greeter\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u670D\u52A1\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},method:{label:"\u65B9\u6CD5\u540D\u79F0",desc:"\u793A\u4F8B\uFF1ASayHello\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u65B9\u6CD5\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},request:{label:"\u8BF7\u6C42\u53C2\u6570\u5185\u5BB9",desc:'\u793A\u4F8B\uFF1A{"name":"lala"}\u3002\u5982\u679C\u7A7A\uFF0C\u5219\u4F7F\u7528\u5F53\u524D\u6D88\u606F\u8D1F\u8377\u3002\u53C2\u6570\u4F7F\u7528JSON\u7F16\u7801\uFF0C\u5FC5\u987B\u548Cservice/method\u8981\u6C42\u4E00\u81F4\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF'},headers:{label:"\u8BF7\u6C42\u5934",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF"}},"x/mongodbClient":{label:"MongoDB",icon:Tn+"/images/mongodb.svg",desc:"<ul><li>MongoDB \u5BA2\u6237\u7AEF</li><li>\u53EF\u4EE5\u5BF9MongoDB\u8FDB\u884C\u589E\u5220\u4FEE\u6539\u67E5\u64CD\u4F5C</li></li></ul>",server:{label:"MongoDB\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5141\u8BB8\u9009\u62E9\u8FDE\u63A5\u6C60\u8FDB\u884C\u8FDE\u63A5",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},collection:{label:"\u96C6\u5408",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},opType:{label:"\u64CD\u4F5C\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u63D2\u5165",value:"INSERT"},{label:"\u67E5\u8BE2",value:"QUERY"},{label:"\u66F4\u65B0",value:"UPDATE"},{label:"\u5220\u9664",value:"DELETE"}]},rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},filter:{label:"\u8FC7\u6EE4\u6761\u4EF6",desc:'\u67E5\u8BE2\u662F\u53EF\u4E3A\u7A7A\u3002\u5141\u8BB8Expr\u8868\u8FBE\u5F0F\uFF0C\u793A\u4F8B\uFF1A{"age"": {"$gte": 18 }\u3002'},doc:{label:"\u66F4\u65B0/\u63D2\u5165\u6587\u6863",desc:'\u67E5\u8BE2\u6216\u8005\u5220\u9664\u53EF\u4E3A\u7A7A\u3002\u5141\u8BB8Expr\u8868\u8FBE\u5F0F\uFF0C\u793A\u4F8B\uFF1A{"name":"test","age":18}\u3002'},one:{label:"\u662F\u5426\u64CD\u4F5C1\u6761\u8BB0\u5F55",desc:""}},"x/kafkaProducer":{label:"Kafka",icon:"/images/kafka.svg",desc:"<ul><li>Kafka\u751F\u4EA7\u8005\u7EC4\u4EF6\u3002\u7528\u4E8E\u5C06\u6D88\u606F\u53D1\u5E03\u5230Kafka\u6307\u5B9A\u4E3B\u9898\u3002</li></ul>",server:{label:"kafka\u670D\u52A1\u5668\u5730\u5740",desc:"\u591A\u4E2A\u670D\u52A1\u5668\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00\uFF0C\u5982: 127.0.0.1:9092,127.0.0.2:9092",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]},topic:{label:"\u53D1\u5E03\u4E3B\u9898",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362",rules:[{required:!0,message:"\u4E3B\u9898\u662F\u5FC5\u987B\u7684"}]},key:{label:"\u5206\u533A\u952E",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},partition:{label:"\u5206\u533A\u7F16\u53F7",desc:""}},"ai/createImage":{label:"AI\u56FE\u50CF\u751F\u6210",icon:"/images/generate-image.svg",desc:'<ul><li>\u901A\u8FC7\u63D0\u793A\u8BCD\u751F\u6210\u56FE\u7247</li><a href="https://rulego.cc/pages/b0e537/" target="_blank">\u5E2E\u52A9\u6587\u6863</a></ul>',url:{label:"API\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},key:{label:"\u6388\u6743\u79D8\u94A5",desc:""},model:{label:"\u6A21\u578B",desc:"\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u6A21\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"dall-e-3",value:"dall-e-3"},{label:"dall-e-2",value:"dall-e-2"}]}},prompt:{label:"\u56FE\u50CF\u751F\u6210\u7684\u63D0\u793A",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"textarea"}},n:{label:"\u751F\u6210\u56FE\u50CF\u7684\u6570\u91CF",desc:"",component:{type:"slider",showInput:!0,showTooltip:!0,min:1,max:10,step:1}},responseFormat:{label:"\u54CD\u5E94\u683C\u5F0F",desc:"\u9ED8\u8BA4:url",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"url",value:"url"},{label:"b64_json",value:"b64_json"}]}},quality:{label:"\u56FE\u50CF\u8D28\u91CF",desc:"\u9ED8\u8BA4:standard",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"standard",value:"standard"},{label:"hd",value:"hd"}]}},size:{label:"\u56FE\u50CF\u5C3A\u5BF8",desc:"\u9ED8\u8BA4:1024x1024",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"256x256",value:"256x256"},{label:"512x512",value:"512x512"},{label:"1024x1024",value:"1024x1024"},{label:"1792x1024",value:"1792x1024"},{label:"1024x1792",value:"1024x1792"}]}},style:{label:"\u56FE\u50CF\u98CE\u683C",desc:"\u9ED8\u8BA4:vivid",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"vivid",value:"vivid"},{label:"natural",value:"natural"}]}}},"ai/llm":{label:"AI\u6587\u672C\u751F\u6210",icon:"/images/generate-text.svg",desc:'<ul><li>\u901A\u8FC7\u63D0\u793A\u8BCD\u751F\u6210\u6587\u672C</li><a href="https://rulego.cc/pages/a43229/" target="_blank">\u5E2E\u52A9\u6587\u6863</a></ul>',url:{label:"API\u5730\u5740",desc:""},key:{label:"\u6388\u6743\u79D8\u94A5",desc:""},model:{label:"\u6A21\u578B",desc:"\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u6A21\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"DeepSeek-R1-Distill-Qwen-32B",value:"DeepSeek-R1-Distill-Qwen-32B"},{label:"DeepSeek-R1",value:"DeepSeek-R1"},{label:"Qwen2-7B-Instruct",value:"Qwen2-7B-Instruct"},{label:"Qwen2-VL-72B",value:"Qwen2-VL-72B"},{label:"o1-mini",value:"o1-mini"},{label:"gpt-4o",value:"gpt-4o"},{label:"gpt-4o-mini",value:"gpt-4o-mini"}]}},systemPrompt:{label:"\u7CFB\u7EDF\u63D0\u793A",desc:"\u7528\u4E8E\u9884\u5148\u5B9A\u4E49\u6A21\u578B\u7684\u57FA\u7840\u884C\u4E3A\u6846\u67B6\u548C\u54CD\u5E94\u98CE\u683C\u3002\u53EF\u4EE5\u4F7F\u7528${} \u5360\u4F4D\u7B26\u53D8\u91CF",component:{type:"textarea"}},messages:{label:"\u4E0A\u4E0B\u6587/\u7528\u6237\u6D88\u606F\u5217\u8868",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"table",options:[{name:"role",label:"\u89D2\u8272",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",multiple:!1,options:[{label:"USER",value:"user"},{label:"ASSISTANT",value:"assistant"}]}},{name:"content",label:"\u6D88\u606F\u5185\u5BB9",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"USER\u89D2\u8272\uFF1A\u5411\u6A21\u578B\u63D0\u4F9B\u6307\u4EE4\u3001\u67E5\u8BE2\u6216\u4EFB\u4F55\u57FA\u4E8E\u6587\u672C\u7684\u8F93\u5165\u3002 ASSISTANT\u89D2\u8272\uFF1A\u57FA\u4E8E\u7528\u6237\u6D88\u606F\u7684\u6A21\u578B\u56DE\u590D",component:{type:"textarea"}}]}},images:{label:"\u89C6\u89C9",desc:"\u56FE\u50CFURL\u5217\u8868\uFF0C\u5927\u6A21\u578B\u5C06\u6839\u636E\u56FE\u50CF\u5185\u5BB9\u7684\u7406\u89E3\u56DE\u7B54\u7528\u6237\u95EE\u9898\u3002\u8BE5\u529F\u80FD\u9700\u8981\u5927\u6A21\u578Bapi\u652F\u6301(Qwen2-VL-72B\u652F\u6301\u89C6\u89C9)\u3002\u53EF\u4EE5\u4F7F\u7528${} \u5360\u4F4D\u7B26\u53D8\u91CF"},params:{label:"\u5927\u6A21\u578B\u53C2\u6570",desc:"",temperature:{label:"\u6E29\u5EA6",desc:"\u91C7\u6837\u6E29\u5EA6\u63A7\u5236\u8F93\u51FA\u7684\u968F\u673A\u6027\u3002\u6E29\u5EA6\u503C\u5728 [0.0, 2.0] \u8303\u56F4\u5185\uFF0C\u503C\u8D8A\u9AD8\uFF0C\u8F93\u51FA\u8D8A\u968F\u673A\u548C\u521B\u9020\u6027\uFF1B\u503C\u8D8A\u4F4E\uFF0C\u8F93\u51FA\u8D8A\u7A33\u5B9A\u3002",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:2,step:.1}},topP:{label:"Top P",desc:"\u901A\u8FC7\u6838\u5FC3\u91C7\u6837\u63A7\u5236\u591A\u6837\u6027\uFF1A0.5\u8868\u793A\u8003\u8651\u4E86\u4E00\u534A\u7684\u6240\u6709\u53EF\u80FD\u6027\u52A0\u6743\u9009\u9879\u3002\u53D6\u503C\u8303\u56F4\uFF1A[0.0, 1.0]",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},presencePenalty:{label:"\u5B58\u5728\u60E9\u7F5A",desc:"\u5BF9\u6587\u672C\u4E2D\u5DF2\u6709\u7684\u6807\u8BB0\u7684\u5BF9\u6570\u6982\u7387\u65BD\u52A0\u60E9\u7F5A",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},frequencyPenalty:{label:"\u9891\u7387\u60E9\u7F5A",desc:"\u5BF9\u6587\u672C\u4E2D\u51FA\u73B0\u7684\u6807\u8BB0\u7684\u5BF9\u6570\u6982\u7387\u65BD\u52A0\u60E9\u7F5A\u3002\u53D6\u503C\u8303\u56F4[0.0,1.0]",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},maxTokens:{label:"\u6700\u5927\u8F93\u51FA\u957F\u5EA6",desc:"",component:{type:"input-number",min:0,max:1e6,step:10}},stop:{label:"\u6A21\u578B\u505C\u6B62\u8F93\u51FA\u7684\u6807\u8BB0",desc:""},responseFormat:{label:"\u8F93\u51FA\u7ED3\u679C\u7684\u683C\u5F0F",desc:"\u53D6\u503C\uFF1Atext\u3001json_object\u3001json_schema\u3002\u9ED8\u8BA4\u4E3A text\u3002",component:{type:"select",multiple:!1,options:[{label:"text",value:"text"},{label:"json_object",value:"json_object"},{label:"json_schema",value:"json_schema"}]}},jsonSchema:{label:"JSON Schema",desc:"",component:{type:"codeEditor"}},keepThink:{label:"\u662F\u5426\u4FDD\u7559\u8F93\u51FA\u601D\u8003\u8FC7\u7A0B",desc:"\u53EA\u5BF9text\u54CD\u5E94\u683C\u5F0F\u751F\u6548"}}},"ci/exec":{label:"\u547D\u4EE4\u884C",icon:Tn+"/images/ssh.svg",desc:"<ul><li>\u53EA\u6267\u884C\u7CFB\u7EDF\u767D\u540D\u5355\u7684\u547D\u4EE4</li></ul>",command:{label:"\u6267\u884C\u547D\u4EE4",desc:""},args:{label:"\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},log:{label:"\u6253\u5370\u6807\u51C6\u8F93\u51FA",desc:""},replaceData:{label:"\u66FF\u6362Data",desc:"\u628AData\u66FF\u6362\u4E3A\u6807\u51C6\u8F93\u51FA\uFF0C\u9ED8\u8BA4\u4E3Afalse"}},"ci/gitClone":{label:"Git\u62C9\u53D6",icon:Tn+"/images/git.svg",desc:"<ul><li>git\u514B\u9686\u6216\u8005\u62C9\u53D6\u4ED3\u5E93\u4EE3\u7801</li></ul>",repository:{label:"\u4ED3\u5E93\u5730\u5740",desc:"\u793A\u4F8B:https://github.com/sagoo-cloud/sagooiot.git"},directory:{label:"\u514B\u9686\u5230\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},reference:{label:"\u5F15\u7528\u540D\u79F0",desc:"\u53EF\u4EE5\u662F\u5206\u652F\u540D\u3001\u6807\u7B7E\u540D\u5B8C\u6574\u5F15\u7528\u540D\u3002\u4F8B\u5982\uFF1Arefs/heads/main\u3002\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2Dref\u503C"},authType:{label:"\u8BA4\u8BC1\u7C7B\u578B",desc:"\u53EF\u4EE5\u662F:ssh/password/token"},authUser:{label:"\u7528\u6237\u540D",desc:""},authPassword:{label:"\u5BC6\u7801\u6216 token",desc:"\u5BC6\u7801\u6216 token"},authPemFile:{label:"\u79D8\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:""},proxyUrl:{label:"\u4EE3\u7406URL",desc:""},proxyUsername:{label:"\u4EE3\u7406\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u4EE3\u7406\u5BC6\u7801",desc:""}},"ci/gitPush":{label:"Git\u63A8\u9001",icon:Tn+"/images/git-push.svg",desc:"<ul><li>git\u63A8\u9001</li></ul>",repository:{label:"\u4ED3\u5E93\u5730\u5740",desc:"\u793A\u4F8B:https://github.com/sagoo-cloud/sagooiot.git"},directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},refSpecs:{label:"\u672C\u5730\u5206\u652F\u4E0E\u8FDC\u7A0B\u5206\u652F\u6620\u5C04\u5173\u7CFB",desc:"\u4F8B\u5982\uFF1Arefs/heads/your-branch:refs/heads/your-branch\uFF0C\u591A\u4E2A\u6620\u5C04\u5173\u7CFB\u4E0E\u9017\u53F7\u9694\u5F00"},authType:{label:"\u8BA4\u8BC1\u7C7B\u578B",desc:"\u53EF\u4EE5\u662F:ssh/password/token"},authUser:{label:"\u7528\u6237\u540D",desc:""},authPassword:{label:"\u5BC6\u7801\u6216 token",desc:"\u5BC6\u7801\u6216 token"},authPemFile:{label:"\u79D8\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:""},proxyUrl:{label:"\u4EE3\u7406\u5730\u5740",desc:""},proxyUsername:{label:"\u4EE3\u7406\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u4EE3\u7406\u5BC6\u7801",desc:""}},"ci/gitCommit":{label:"Git\u63D0\u4EA4",icon:Tn+"/images/git-commit.svg",desc:'<ul><li>git\u63D0\u4EA4\uFF0C\u5982\u679C\u6587\u4EF6\u6CA1\u53D8\u66F4\u5219\u8F6C\u53D1\u5230\u5931\u8D25\u94FE</li><a href="https://rulego.cc/pages/ci-git-commit/" target="_blank">\u5E2E\u52A9\u6587\u6863</a></ul>',directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},pattern:{label:"\u6DFB\u52A0\u7684\u6587\u4EF6\u5339\u914D\u6A21\u5F0F",desc:"\u5FC5\u987B\u5F53\u524D\u5DE5\u4F5C\u533A\u76F8\u5BF9\u76EE\u5F55\u3002\u4F8B\u5982\uFF1A/example/*.go",rules:[{required:!0,message:"\u6DFB\u52A0\u7684\u6587\u4EF6\u5339\u914D\u6A21\u5F0F\u662F\u5FC5\u987B\u7684"}]},message:{label:"Git\u63D0\u4EA4",desc:"",rules:[{required:!0,message:"\u63D0\u4EA4\u6D88\u606F\u662F\u5FC5\u987B\u7684"}]},signature:{label:"\u4F5C\u8005\u4FE1\u606F",desc:"",authorName:{label:"\u4F5C\u8005\u540D\u79F0",desc:""},authorEmail:{label:"\u4F5C\u8005\u90AE\u7BB1",desc:""}}},"ci/gitCreateTag":{label:"Git\u521B\u5EFA\u6807\u7B7E",icon:Tn+"/images/git-tag.svg",desc:'<ul><li>git\u63D0\u4EA4\uFF0C\u5982\u679C\u6587\u4EF6\u6CA1\u53D8\u66F4\u5219\u8F6C\u53D1\u5230\u5931\u8D25\u94FE</li><a href="https://rulego.cc/pages/ci-git-create-tag/" target="_blank">\u5E2E\u52A9\u6587\u6863</a></ul>',directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},tag:{label:"\u6807\u7B7E\u540D\u79F0",desc:"",rules:[{required:!0,message:"\u6807\u7B7E\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},message:{label:"\u6807\u7B7E\u6D88\u606F",desc:"",rules:[{required:!0,message:"\u6807\u7B7E\u6D88\u606F\u662F\u5FC5\u987B\u7684"}]},signature:{label:"\u4F5C\u8005\u4FE1\u606F",desc:"",authorName:{label:"\u4F5C\u8005\u540D\u79F0",desc:""},authorEmail:{label:"\u4F5C\u8005\u90AE\u7BB1",desc:""}}},"ci/ps":{label:"\u670D\u52A1\u5668\u6307\u6807",icon:Tn+"/images/ps.svg",desc:'\u7528\u4E8E\u76D1\u63A7\u670D\u52A1\u5668CPU\u3001\u5185\u5B58\u3001\u78C1\u76D8\u7B49\u6307\u6807\u3002<a href="https://rulego.cc/pages/ci-ps/" target="_blank">\u5E2E\u52A9\u6587\u6863</a>',options:{label:"\u6307\u6807\u5217\u8868",desc:"\u5982\u679C\u4E3A\u7A7A\uFF0C\u5219\u67E5\u8BE2\u6240\u6709\u6307\u6807",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!0,options:[{label:"\u4E3B\u673A\u4FE1\u606F",value:"host/info"},{label:"CPU\u4FE1\u606F",value:"cpu/info"},{label:"\u865A\u62DF\u5185\u5B58\u4FE1\u606F",value:"mem/virtualMemory"},{label:"\u4EA4\u6362\u5185\u5B58\u4FE1\u606F",value:"mem/swapMemory"},{label:"\u78C1\u76D8\u4F7F\u7528\u60C5\u51B5",value:"disk/usage"},{label:"\u78C1\u76D8IO\u8BA1\u6570\u5668\u4FE1\u606F",value:"disk/ioCounters"},{label:"\u7F51\u7EDCIO\u8BA1\u6570\u5668\u4FE1\u606F",value:"net/ioCounters"},{label:"\u7F51\u7EDC\u63A5\u53E3\u4FE1\u606F",value:"net/interfaces"}],placeholder:"\u8BF7\u9009\u62E9\u67E5\u8BE2\u6307\u6807"}}},"action/sagoo/deviceaction":{label:"\u8BBE\u5907\u52A8\u4F5C",icon:Tn+"/images/deviceaction.svg",desc:"\u7528\u4E8E\u6267\u884C\u8BBE\u5907\u7684\u64CD\u4F5C",productKey:{label:"\u9009\u62E9\u4EA7\u54C1",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",optionApi:"/product/list",autoGetData:!0,resDataKey:"product",resDataLabelKey:"name",resDataValueKey:"key",onChangeGetDataKey:"deviceKey",filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1",multiple:!1,options:[]}},deviceKey:{label:"\u9009\u62E9\u8BBE\u5907",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",autoGetData:!1,optionApi:"/product/device/list",resDataKey:"device",getDataByKey:"productKey",resDataLabelKey:"name",resDataValueKey:"key",apiParams:{productKey:""},filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",multiple:!1,options:[],defineOptions:[{label:"\u5168\u90E8",value:"all"}]}},triggerType:{label:"\u64CD\u4F5C\u7C7B\u578B",desc:"",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u8BBE\u5907\u529F\u80FD\u8C03\u7528",value:"functionCall"},{label:"\u83B7\u53D6\u8BBE\u5907\u5C5E\u6027",value:"getProperties"},{label:"\u8BBE\u7F6E\u8BBE\u5907\u5C5E\u6027",value:"setProperties"}],placeholder:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u7C7B\u578B"}},funcKey:{label:"\u529F\u80FD\u6807\u8BC6",desc:"\u5E73\u53F0\u8BBE\u7F6E\u7684\u529F\u80FD\u7684Key"},parameter:{label:"\u8BF7\u6C42\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},"x/opcuaRead":{label:"OPC_UA\u8BFB",icon:"/images/opcua_read.svg",category:"external",desc:"<ul><li>\u83B7\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9A\u8282\u70B9\u5217\u8868\u70B9\u4F4D\u6570\u636E\uFF0C\u5E76\u901A\u8FC7Success\u94FE\u8F6C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002</li></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}}},"x/opcuaWrite":{label:"OPC_UA\u5199",icon:"/images/opcua_write.svg",category:"external",desc:"<ul><li>\u628A\u6D88\u606F\u8D1F\u8377\u70B9\u4F4D\u6570\u636E\u5217\u8868\uFF0C\u5199\u5165OPCUA\u670D\u52A1\u5668\u3002</li></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}}},"x/opcua":{label:"OPC_UA\u8BA2\u9605",icon:"/images/endpoint/opcua.svg",category:"external",notInput:!0,nodeType:"endpoint-node",desc:"<ul><li>\u5B9A\u65F6\u4ECEOPCUA\u670D\u52A1\u5668\u8BFB\u53D6\u6570\u636E\u3002</li></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},interval:{label:"\u8BFB\u4EFB\u52A1\u65F6\u95F4\u914D\u7F6E",desc:"\u793A\u4F8B: @every 1m (\u6BCF\u96941\u5206\u949F) 0 0 0 * * * (\u51CC\u666812\u70B9\u89E6\u53D1)",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},nodeIds:{label:"\u8282\u70B9ID\u5217\u8868",desc:"\u793A\u4F8B:ns=3;i=1003",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}},router:{hide:!0}},"x/modbus":{label:"Modbus\u8BFB\u5199",icon:"/images/modbus.svg",category:"external",desc:"<ul><li>\u83B7\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9A\u8282\u70B9\u5217\u8868\u70B9\u4F4D\u6570\u636E\uFF0C\u5E76\u901A\u8FC7Success\u94FE\u8F6C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002</li><a href='https://rulego.cc/pages/x-modbus/' target='_blank'>\u5E2E\u52A9\u6587\u6863</a></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u670D\u52A1\u5668\u5730\u5740\uFF0C\u683C\u5F0F\u4E3A\uFF1A<mode>://<serial device or host:port> \u793A\u4F8B: tcp://hostname-or-ip-address:502; rtu:///dev/ttyUSB0",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},cmd:{label:"Modbus\u65B9\u6CD5\u540D\u79F0",desc:"Modbus\u547D\u4EE4\u540D\u79F0",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u8BFB\u53D6\u7EBF\u5708\u72B6\u6001",value:"ReadCoils"},{label:"\u8BFB\u53D6\u5355\u4E2A\u7EBF\u5708\u72B6\u6001",value:"ReadCoil"},{label:"\u8BFB\u53D6\u79BB\u6563\u8F93\u5165\u72B6\u6001",value:"ReadDiscreteInputs"},{label:"\u8BFB\u53D6\u5355\u4E2A\u79BB\u6563\u8F93\u5165\u72B6\u6001",value:"ReadDiscreteInput"},{label:"\u8BFB\u53D6\u5BC4\u5B58\u5668",value:"ReadRegisters"},{label:"\u8BFB\u53D6\u5355\u4E2A\u5BC4\u5B58\u5668",value:"ReadRegister"},{label:"\u8BFB\u53D6\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"ReadUint32s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"ReadUint32"},{label:"\u8BFB\u53D6\u6D6E\u70B9\u657032\u4F4D",value:"ReadFloat32s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u6D6E\u70B9\u657032\u4F4D",value:"ReadFloat32"},{label:"\u8BFB\u53D6\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"ReadUint64s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"ReadUint64"},{label:"\u8BFB\u53D6\u6D6E\u70B9\u657064\u4F4D",value:"ReadFloat64s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u6D6E\u70B9\u657064\u4F4D",value:"ReadFloat64"},{label:"\u8BFB\u53D6\u5B57\u8282\u6570\u636E",value:"ReadBytes"},{label:"\u8BFB\u53D6\u539F\u59CB\u5B57\u8282\u6570\u636E",value:"ReadRawBytes"},{label:"\u5199\u5165\u7EBF\u5708\u72B6\u6001",value:"WriteCoil"},{label:"\u5199\u5165\u591A\u4E2A\u7EBF\u5708\u72B6\u6001",value:"WriteCoils"},{label:"\u5199\u5165\u5BC4\u5B58\u5668",value:"WriteRegister"},{label:"\u5199\u5165\u591A\u4E2A\u5BC4\u5B58\u5668",value:"WriteRegisters"},{label:"\u5199\u5165\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"WriteUint32"},{label:"\u5199\u5165\u591A\u4E2A\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"WriteUint32s"},{label:"\u5199\u5165\u6D6E\u70B9\u657032\u4F4D",value:"WriteFloat32"},{label:"\u5199\u5165\u591A\u4E2A\u6D6E\u70B9\u657032\u4F4D",value:"WriteFloat32s"},{label:"\u5199\u5165\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"WriteUint64"},{label:"\u5199\u5165\u591A\u4E2A\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"WriteUint64s"},{label:"\u5199\u5165\u6D6E\u70B9\u657064\u4F4D",value:"WriteFloat64"},{label:"\u5199\u5165\u591A\u4E2A\u6D6E\u70B9\u657064\u4F4D",value:"WriteFloat64s"},{label:"\u5199\u5165\u5B57\u8282\u6570\u636E",value:"WriteBytes"},{label:"\u5199\u5165\u539F\u59CB\u5B57\u8282\u6570\u636E",value:"WriteRawBytes"}]}},unitId:{label:"\u4ECE\u673A\u7F16\u53F7",desc:"\u4F7F\u7528\u7684\u5355\u5143\u7F16\u53F7\uFF08\u4ECE\u673A\u7F16\u53F7\uFF09\uFF0C\u683C\u5F0F\uFF1Auint8\uFF0C\u793A\u4F8B\uFF1A1",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},address:{label:"\u5BC4\u5B58\u5668\u5730\u5740",desc:"\u5BC4\u5B58\u5668\u5730\u5740\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u683C\u5F0F\uFF1Auint16\uFF0C\u793A\u4F8B\uFF1A50\u6216\u80050x32"},quantity:{label:"\u5BC4\u5B58\u5668\u6570\u91CF",desc:"\u5BC4\u5B58\u5668\u6570\u91CF\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u793A\u4F8B\uFF1A1"},value:{label:"\u5BC4\u5B58\u5668\u503C",desc:"\u5BC4\u5B58\u5668\u503C\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\u3002\u8BFB\u5219\u4E0D\u9700\u8981\u63D0\u4F9B\uFF0C\u5982\u679C\u5199\u5165\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00\uFF0C\u4F8B\u5982\uFF1A0x01,0x01 true 51,52"},regType:{label:"\u5BC4\u5B58\u5668\u7C7B\u578B",desc:"\u5BC4\u5B58\u5668\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u4FDD\u6301\u5BC4\u5B58\u56680x3",value:"0"},{label:"\u8F93\u5165\u5BC4\u5B58\u56680x4",value:"1"}]}},encodingConfig:{label:"\u7F16\u7801\u914D\u7F6E",desc:"",endianness:{label:"\u5B57\u8282\u5E8F",desc:"\u5BC4\u5B58\u5668\u7684\u5B57\u8282\u5E8F",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u5927\u7AEF\u5E8F",value:1},{label:"\u5C0F\u7AEF\u5E8F",value:2}]}},wordOrder:{label:"\u5B57\u5E8F",desc:"32\u4F4D\u5BC4\u5B58\u5668\u7684\u5B57\u5E8F",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u9AD8\u5B57\u5728\u524D",value:1},{label:"\u4F4E\u5B57\u5728\u524D",value:2}]}}},rtuConfig:{label:"RTU\u914D\u7F6E",desc:"",parity:{label:"\u6821\u9A8C\u4F4D",desc:"\u4E32\u884C\u94FE\u8DEF\u7684\u6821\u9A8C\u6A21\u5F0F\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u65E0\u6821\u9A8C",value:0},{label:"\u5076\u6821\u9A8C",value:1},{label:"\u5947\u6821\u9A8C",value:2}]}},speed:{label:"\u4E32\u884C\u6CE2\u7279\u7387",desc:"\u8BBE\u7F6E\u4E32\u884C\u94FE\u8DEF\u6CE2\u7279\u7387\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"38400",value:38400},{label:"19200",value:19200},{label:"9600",value:9600},{label:"4800",value:4800}]}},dataBits:{label:"\u6570\u636E\u4F4D",desc:"\u8BBE\u7F6E\u4E32\u884C\u5B57\u7B26\u7684\u6570\u636E\u4F4D\u6570\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09"},stopBits:{label:"\u505C\u6B62\u4F4D",desc:"\u8BBE\u7F6E\u4E32\u884C\u505C\u6B62\u4F4D\u6570\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09"}},tcpConfig:{label:"TCP\u914D\u7F6E",desc:"",timeout:{label:"\u8D85\u65F6\u65F6\u95F4",desc:"\u8BBE\u7F6E\u8BF7\u6C42\u8D85\u65F6\u503C\uFF0C\u5355\u4F4D\u4E3A\u79D2"},certPath:{label:"\u8BC1\u4E66\u8DEF\u5F84",desc:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84"},keyPath:{label:"\u5BC6\u94A5\u8DEF\u5F84",desc:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84"},caPath:{label:"CA\u8BC1\u4E66\u8DEF\u5F84",desc:"CA\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84"}}}}}},pXe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Ex=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=pXe[n[t]&63];return e};const Dg=(t,e)=>{if(t&&e){let n=Om[e];if(n)return n[t]||t}else if(t)return Om[t]||t;return t},Fq=t=>{if(!t)return 0;let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);t.match(/[A-Z]/)?e+=1.5:r>=1&&r<=126||r>=65376&&r<=65439?e+=1:e+=1.8}return e},gXe=(t,e)=>{JN(Om,e);let n=JSON.parse(JSON.stringify(Om.category));t.endpoints&&t.endpoints.forEach(r=>{MF(t.builtins,n,r,!0)}),t.nodes||(t.nodes=t),t.nodes.forEach(r=>{MF(t.builtins,n,r,!1)});for(let r in n){let i=n[r];(!i.components||Array.isArray(i.components)&&i.components.length===0)&&delete n[r]}return n},MF=(t,e,n,r)=>{mXe(n,r);let i="";if(r&&!e[n.category])i="endpoints";else{i=n.category.split("/")[0];let a=n.type.split("/")[0];e[a]&&(i=a)}let o=e[i];o?(n.background=n.background||o.background,o.components?o.components.push(n):o.components=[n]):e[i]={label:i,background:"#86B4E5FF",components:[n]},n.category=i,TXe(t,n,i),vXe(n),n.nodeType=n.nodeType||o&&o.nodeType||"simple-node"},mXe=(t,e)=>{let n={};e?n=Om.component.endpoints[t.type]:n=Om.component.nodes[t.type],n?(Object.assign(t,n),t.relationTypes=n.relationTypes||RF(t.relationTypes),"disabled"in n&&(t.disabled=n.disabled),Vq(t,n),e&&(t.router=n.router||t.router)):t.relationTypes=RF(t.relationTypes),e&&(t.router=t.router||{},t.hasOwnProperty("notInput")||(t.notInput=!0))},RF=t=>{if(t){let e=[];return t.forEach(n=>{let r=n.value!==void 0&&n.value!==null?n.value:n,i=n.label!==void 0&&n.label!==null?n.label:n;e.push({value:r,label:Dg(i,"relationTypes")})}),e}return t},Vq=(t,e)=>{t.fields&&t.fields.forEach(n=>{let r=e[n.name];r&&JN(n,r),n.fields&&r&&Vq(n,r)})},vXe=t=>{t.fields&&t.fields.forEach(e=>{e.type.indexOf("int")>-1&&!e.rules?e.rules=[{type:"number",message:"\u5FC5\u987B\u662F\u6570\u503C\u7C7B\u578B"}]:e.type.indexOf("float")>-1&&!e.rules&&(e.rules=[{pattern:/^-?\d+(\.\d+)?$/,message:"\u5FC5\u987B\u662F\u6D6E\u70B9\u7C7B\u578B"}])})},xA=(t,e)=>{let n={};return t&&t.forEach(r=>{r.id===e&&(n=r)}),n},yXe=(t,e,n)=>{let r=null;return t&&t.forEach(i=>{i.sourceNodeId===e&&i.targetNodeId===n&&(r=i)}),r},bXe=(t,e,n)=>{let r={id:"edge_"+t.edgeCount,type:"flow-link",sourceNodeId:n.fromId,targetNodeId:n.toId,startPoint:{},endPoint:{},text:Dg(n.type,"relationTypes")||"",properties:{model:{...n}}},i=xA(e,r.sourceNodeId),o=xA(e,r.targetNodeId);return i&&(r.startPoint.x=i.x+t.nodeWidth/2,r.startPoint.y=i.y),o&&(r.endPoint.x=o.x-t.nodeWidth/2-10,r.endPoint.y=o.y),r},_Xe=t=>{let e=t.split("_");if(e.length>0){let n=parseInt(e[e.length-1]);return isNaN(n)?0:n}},OXe=(t,e,n)=>{let r={};t.forEach(o=>{let a=o.properties.model||{};a.routerId&&(r[a.routerId]=o.id)});let i=[];return e.routers&&e.routers.forEach(o=>{if(!r[o.id]||r[o.id]===n){let a=Wb(o);i.push({label:a,value:o.id||a})}}),i},wXe=(t,e)=>{let n=[];return t.type==="switch"&&(e.configuration&&e.configuration.cases&&e.configuration.cases.forEach(r=>{n.push({label:r.then,value:r.then})}),n.push({label:"Default",value:"Default"}),n.push({label:"\u5931\u8D25",value:"Failure"})),n},xXe=(t,e)=>{let n=[];return t.routers&&t.routers.forEach(r=>{if(r.id===e){let i=Wb(r);n.push({label:i,value:e})}}),n},SXe=(t,e,n)=>{let r=[];return n?(e.routers&&e.routers.length>0&&e.routers.forEach(i=>{if(i.to&&i.to.path){let o=i.to.path.split(":"),a=Wb(i);if(o.length<=1)r.push({fromId:t,toId:n.id,routerId:i.id,nodeType:"endpoint-node",type:a});else for(let s=1;s<o.length;s++)r.push({fromId:t,toId:o[s],nodeType:"endpoint-node",routerId:i.id,type:a})}}),r):[]},CXe=(t,e,n)=>{t.routers=t.routers||[],t.routers.forEach(r=>{r.to||(r.to={}),r.to.path=e}),n.forEach(r=>{r.fromId===t.id&&t.routers&&t.routers.forEach(i=>{let o=Wb(i);(i.id===r.type||o===r.type)&&(i.to.path=i.to.path+":"+r.toId)})})},Wb=t=>t.from?(t.params?t.params.join(" "):"")+" "+(t.from&&t.from.path):"",EXe=t=>Ex(t||12),TXe=(t,e,n)=>{if(n==="endpoints"){let i=t.endpoints;i&&e.router&&(e.router.options={},Object.keys(i).forEach(o=>{e.router.options[o]=i[o]}))}let r=t.nodePool&&t.nodePool[e.type];if(r&&e.fields){let i=kXe(r);e.fields.forEach(o=>{o.component&&!o.component.options&&(o.component.options=i)})}Object.keys(t).forEach(i=>{e.type===i&&e.fields&&e.fields.forEach(o=>{t[i][o.name]&&(o.component=o.component||{},o.component.options=t[i][o.name])})})};function kXe(t){let e=[];return t&&t.forEach(n=>{e.push({label:n.name,value:`ref://${n.id}`})}),e}function JN(t,...e){if(t==null)throw new TypeError("Cannot convert undefined or null to object");const n=r=>r&&typeof r=="object"&&!Array.isArray(r);for(const r of e)if(n(r))for(const i in r)n(r[i])&&n(t[i])?JN(t[i],r[i]):t[i]=r[i];return t}const PXe=(t,e,n)=>e.map(r=>{const i=t.find(o=>o.value!==void 0&&o.value!==null?o.value===r:o===r);return i&&i.label?i.label:Dg(r,n)}).filter(r=>r!==void 0),AXe=t=>new Promise((e,n)=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t).then(()=>e(!0)).catch(r=>n(r));else{const r=document.createElement("textarea");r.value=t,document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?e(!0):n("execCommand copy failed")}catch(i){n(i)}finally{document.body.removeChild(r)}}}),MXe=()=>new Promise((t,e)=>{navigator.clipboard&&window.isSecureContext?navigator.clipboard.readText().then(n=>t(n)).catch(n=>{$F().then(t,e)}):$F().then(t,e)});function $F(){return new Promise((t,e)=>{let n="";const r=document.createElement("textarea");r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("paste")?(n=r.value,t(n)):e("execCommand paste failed")}catch(i){e(i)}finally{document.body.removeChild(r)}})}const Un={};Un.getNodeSeq=_Xe;Un.adapterComponents=gXe;Un.getNodeByID=xA;Un.getEdgeBySourceNodeIdAndTargetNodeId=yXe;Un.createEdge=bXe;Un.getRelationTypeOptionsFromRouters=OXe;Un.getEndpointConnections=SXe;Un.updateEndpointRouterToPath=CXe;Un.toFromPath=Wb;Un.getRouterRelationTypeLabel=xXe;Un.genId=EXe;Un.getSelectedLabels=PXe;Un.copyToClipboard=AXe;Un.readFromClipboard=MXe;Un.getRelationTypeOptionsFromNode=wXe;class RXe extends cp{initNodeData(e){super.initNodeData(e),this.width=120,this.height=30,this.resizable=!1,this.radius=5,this.text.x=this.x+10,this.iconPosition="",this.defaultFill="#a6bbcf";const n={message:"\u53EA\u5141\u8BB8\u4ECE\u53F3\u8FB9\u7684\u951A\u70B9\u8FDE\u51FA",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return c&&c.length>0&&c.filter(f=>f.sourceNode.id===a.id&&f.targetNode.id===s.id).length>0?!1:l.type==="right"}},r={message:"Input\u8282\u70B9\u53EA\u80FD\u5141\u8BB8\u5F15\u51FA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>1&&a.type==="start-node"||s.type==="start-node"||s.type==="endpoint-node")}},i={message:"\u76F8\u540C\u7684\u8F93\u5165\u548C\u8F93\u51FA\u8282\u70B9\uFF0C\u53EA\u80FD\u5141\u8BB8\u521B\u5EFA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>0&&c.filter(f=>f.sourceNode.id==a.id&&f.targetNode.id==s.id).length>0)}};this.sourceRules.push(n),this.sourceRules.push(r),this.sourceRules.push(i);const o={message:"\u53EA\u5141\u8BB8\u4ECE\u5DE6\u8FB9\u951A\u70B9\u8FDE\u5165",validate:(a,s,l,u)=>u.type==="left"};this.targetRules.push(o)}getData(){const e=super.getData();return e.properties.ui="node-red",e}setAttributes(){if(this.text.value){let e=30+Fq(this.text.value)*9;e=Math.ceil(e/20)*20;let n=Math.ceil((e-this.width)/20);if(n>0){let r=this.text.value.length-n;r>0&&(this.text.value=this.text.value.substring(0,r)+"...")}}}updateText(e){super.updateText(e),this.setAttributes()}getNodeStyle(){const e=super.getNodeStyle(),n=this.properties.view||{};return this.isSelected?(e.strokeWidth=Number(n.borderWidth)||2,e.stroke=n.borderColor||"#ff7f0e"):(e.strokeWidth=Number(n.borderWidth)||1,e.stroke=n.borderColor||"#999"),e.fill=n.background||this.defaultFill||"rgb(230, 224, 248)",this.icon=n.icon||"/plugin/rule/images/"+n.category+".svg"||"images/fetch.svg",e}getDefaultAnchor(){const{x:e,y:n,id:r,width:i,height:o}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"},{x:e-i/2,y:n,id:`${r}_left`,type:"left"}]}getOutlineStyle(){const e=super.getOutlineStyle();return e.stroke="transparent",e.hover.stroke="transparent",e}}class $Xe extends Cf{getAnchorShape(e){const{x:n,y:r,type:i}=e;return Kt("rect",{x:n-5,y:r-5,width:10,height:10,className:"custom-anchor"})}getIcon(){return null}getShape(){const{text:e,x:n,y:r,width:i,height:o,radius:a}=this.props.model,s=this.props.model.getNodeStyle();return Kt("g",{className:"lf-red-node"},[Kt("rect",{...s,x:n-i/2,y:r-o/2,width:i,height:o,rx:a,ry:a}),Kt("g",{style:"pointer-events: none;",transform:`translate(${n}, ${r})`},[Kt("rect",{x:-i/2,y:-o/2,width:30,height:30,fill:"#000",fillOpacity:.05,stroke:"none"}),this.getIcon(),Kt("path",{d:`M ${30-i/2} ${1-o/2} l 0 28`,stroke:"#000",strokeOpacity:.1,strokeWidth:1})])])}}var mc={type:"red-node",model:RXe,view:$Xe};class NXe extends mc.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let i=r||"/images/comment.svg";return Kt("image",{width:30,height:30,x:-e/2,y:-n/2,href:i})}}class DXe extends mc.model{getDefaultAnchor(){return[]}initNodeData(e){super.initNodeData(e)}getTextStyle(){const e=super.getTextStyle();return e.fontStyle="italic",e}setAttributes(){this.width=15+Fq(this.text.value)*8,this.width<120&&(this.width=120)}updateText(e){super.updateText(e),this.setAttributes()}}var LXe={type:"comment-node",model:DXe,view:NXe};class IXe extends mc.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let i=r||"/plugin/rule/images/start.svg";return Kt("image",{width:30,height:30,x:-e/2,y:-n/2,href:i})}}class BXe extends mc.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:i}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"}]}initNodeData(e){super.initNodeData(e)}}var FXe={type:"endpoint-node",model:BXe,view:IXe};class VXe extends mc.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let i=r||"/plugin/rule/images/fetch.svg";return Kt("image",{width:30,height:30,x:-e/2,y:-n/2,href:i})}}class jXe extends mc.model{initNodeData(e){super.initNodeData(e)}}var QXe={type:"simple-node",model:jXe,view:VXe};class zXe extends mc.view{getIcon(){const{model:e,graphModel:n}=this.props,{width:r,height:i,icon:o}=e;let a=o||"/plugin/rule/images/fetch.svg";return Kt("image",{width:30,height:30,x:-r/2,y:-i/2,href:a})}}class WXe extends mc.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:i}=this;return[{x:e-i/2,y:n,id:`${r}_left`,type:"left"}]}initNodeData(e){super.initNodeData(e)}}var HXe={type:"chain-node",model:WXe,view:zXe};class UXe extends mc.view{getIcon(){const{model:e,graphModel:n}=this.props,{width:r,height:i}=e;return Kt("image",{width:30,height:30,x:-r/2,y:-i/2,className:"node-red-start",href:"/plugin/rule/images/start.svg",onClick:()=>{n.eventCenter.emit("node-red:start")}})}}class XXe extends mc.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:i}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"}]}initNodeData(e){super.initNodeData(e),this.defaultFill="rgb(166, 187, 207)",e.moveRules&&(this.moveRules=e.moveRules)}}var ZXe={type:"start-node",model:XXe,view:UXe};class qXe extends qN.view{getAnchorShape(e){const{x:n,y:r,type:i}=e;return Kt("rect",{x:n-5,y:r-5,width:10,height:10,className:"custom-anchor"})}}class YXe extends qN.model{initNodeData(e){this.width=300,this.height=200,super.initNodeData(e),this.resizable=!0,this.collapsible=!0,this.isRestrict=!1,this.autoResize=!0,this.nodeTextDraggable=!1;const n={message:"\u53EA\u5141\u8BB8\u4ECE\u53F3\u8FB9\u7684\u951A\u70B9\u8FDE\u51FA",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return c&&c.length>0&&c.filter(f=>f.sourceNode.id===a.id&&f.targetNode.id===s.id).length>0?!1:l.type==="right"}},r={message:"Input\u8282\u70B9\u53EA\u80FD\u5141\u8BB8\u5F15\u51FA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>1&&a.type==="start-node"||s.type==="start-node"||s.type==="endpoint-node")}},i={message:"\u76F8\u540C\u7684\u8F93\u5165\u548C\u8F93\u51FA\u8282\u70B9\uFF0C\u53EA\u80FD\u5141\u8BB8\u521B\u5EFA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>0&&c.filter(f=>f.sourceNode.id==a.id&&f.targetNode.id==s.id).length>0)}};this.sourceRules.push(n),this.sourceRules.push(r),this.sourceRules.push(i);const o={message:"\u53EA\u5141\u8BB8\u4ECE\u5DE6\u8FB9\u951A\u70B9\u8FDE\u5165",validate:(a,s,l,u)=>u.type==="left"};this.targetRules.push(o)}getNodeStyle(){const e=super.getNodeStyle();return this.isSelected?(e.strokeWidth=2,e.stroke="#ff7f0e"):(e.stroke="#AEAFAE",e.strokeDasharray="3 3",e.strokeWidth=1),e}getAddableOutlineStyle(){const e=super.getAddableOutlineStyle();return e.stroke="#AEAFAE",e.strokeDasharray="3 3",e}getDefaultAnchor(){const{x:e,y:n,id:r,width:i,height:o}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"},{x:e-i/2,y:n,id:`${r}_left`,type:"left"}]}}var GXe={type:"group-node",model:YXe,view:qXe};class KXe extends YP{getEdgeStyle(){const e=super.getEdgeStyle();return e.strokeWidth=this.isHovered?4:3,e.stroke=this.isSelected||this.isHovered?"#ff7f0e":"#999",e}getTextStyle(){const e=super.getTextStyle();e.color="#003a79",e.textWidth=200,e.overflowMode="autoWrap",e.fontSize=16;let n="0px,0px";return this.text.value&&(e.textWidth=Math.ceil(this.text.value.length/2)*e.fontSize+e.fontSize/4+30,e.textWidth>200&&(e.textWidth=200)),e.background={wrapPadding:n,fill:"#FFF",strokeWidth:2,stroke:"#003a79",x:0,y:0,rx:10,ry:10},e}setAttributes(e){super.setAttributes(e),this.offset=20}}class JXe extends pA{}var eZe={type:"flow-link",view:JXe,model:KXe},Ml=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const tZe={class:"demo-collapse"},nZe={class:"classify-title"},rZe=["onMousedown"],iZe={class:"red-ui-palette-label"},oZe={class:"red-ui-palette-icon-container"},aZe={key:0,class:"red-ui-palette-port red-ui-palette-port-input"},sZe={key:1,class:"red-ui-palette-port red-ui-palette-port-output"},lZe=ue({__name:"Sidebar",props:{lf:{type:pq,required:!0}},setup(t){const e=t,n="/plugin/rule",r=F(""),i=F(["endpoints","action","filter","transform","external","flow","ai","ci","iot"]),o=c=>{const{lf:d}=e;d.dnd.startDrag({type:c.nodeType,text:c.label||c.type,properties:{model:{type:c.type,debugMode:!1},view:c}})},a=F(null),s=F(null),{lf:l}=e;l.on("rulego-editor:componentOk",c=>{s.value=c,a.value=c}),Ft(()=>{const{lf:c}=e;c.graphModel.eventCenter.emit("rulego-editor:sidebarOk")});const u=()=>{let c=r.value.toLowerCase(),d={};if(c=="")d=s.value;else for(let f in s.value)d[f]||(d[f]=[]),d[f]=JSON.parse(JSON.stringify(s.value[f])),d[f].components&&(d[f].components=d[f].components.filter(h=>h.label.toLowerCase().indexOf(c)>-1||h.type.toLowerCase().indexOf(c)>-1));a.value=d};return(c,d)=>{const f=hi,h=co,g=fo,m=Hi,y=KS,b=GS,w=gu;return R(),Y("div",tZe,[B(f,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=O=>r.value=O),"prefix-icon":p(d$),onInput:u,placeholder:"\u641C\u7D22\u7EC4\u4EF6"},null,8,["modelValue","prefix-icon"]),B(w,{height:"calc(100vh - 82px)"},{default:j(()=>[(R(!0),Y(dt,null,Ht(a.value,(O,x,S)=>(R(),xe(b,{modelValue:i.value,"onUpdate:modelValue":d[1]||(d[1]=C=>i.value=C)},{default:j(()=>[B(y,{name:x},{title:j(()=>[B(g,null,{default:j(()=>[B(h,{span:3},{default:j(()=>[J("span",{class:"red-ui-palette-icon",style:vt({backgroundImage:`url(${p(n)+"/images/"+x+"-dark.svg"})`})},null,4)]),_:2},1024),B(h,{span:18,offset:2},{default:j(()=>[J("span",nZe,Ve(O.label),1)]),_:2},1024)]),_:2},1024)]),default:j(()=>[(R(!0),Y(dt,null,Ht(O.components,(C,E)=>(R(),Y("div",{class:"red-ui-palette-node ui-draggable ui-draggable-handle",onMousedown:T=>o(C),key:E,style:vt({backgroundColor:C.background||"#a6bbcf"})},[B(m,{class:"box-item","popper-class":"help-box",effect:"light","show-after":1e3,content:C.desc,placement:"right-start","raw-content":""},{default:j(()=>[J("div",iZe,Ve(C.label||C.type),1)]),_:2},1032,["content"]),J("div",oZe,[C.icon?(R(),Y("div",{key:0,class:"red-ui-palette-icon",style:vt({backgroundImage:`url(${C.icon})`})},null,4)):(R(),Y("div",{key:1,class:"red-ui-palette-icon",style:vt({backgroundImage:`url(${p(n)+"/images/"+x+".svg"})`})},null,4))]),C.notInput?Se("",!0):(R(),Y("div",aZe)),C.notOutput?Se("",!0):(R(),Y("div",sZe))],44,rZe))),128))]),_:2},1032,["name"])]),_:2},1032,["modelValue"]))),256))]),_:1})])}}});var uZe=Ml(lZe,[["__scopeId","data-v-3f7105dc"]]);let NF=!1;class jq{constructor({lf:e}){e.register(ZXe),e.register(FXe),e.register(LXe),e.register(QXe),e.register(HXe),e.register(GXe),e.register(eZe),e.setDefaultEdgeType("flow-link")}render(e,n){if(NF){this.app=yS(uZe,{lf:e});const r=document.createElement("div");r.className="node-red-palette",document.body.appendChild(r),this.app.mount(r)}NF=!0}getNodeList(){let e={};for(let n in this.nodeGroups)this.nodeGroups[n].components.forEach(r=>{e[r.type]=r});return e}}iT(jq,"pluginName","NodeRedExtension");var cZe="/plugin/rule/assets/logo.91bc7193.png";const dZe={style:{flex:"auto"}},Qq={__name:"NewFlowDialog",props:["show"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const{show:r}=t,i=F();F(r);const o=vn({id:"default",name:"",root:!0,additionalInfo:{description:""}});F(!1);const a=()=>{n("submit",Dn(o))},s=()=>{n("close")};return e({updateDefault:u=>{var c;o.id=(u==null?void 0:u.id)||Ex(12),o.name=(u==null?void 0:u.name)||"",o.root=(c=u==null?void 0:u.root)!=null?c:!0,u&&"disabled"in u&&(o.disabled=u.disabled),o.additionalInfo=(u==null?void 0:u.additionalInfo)||{description:""},o.configuration=(u==null?void 0:u.configuration)||{}}}),(u,c)=>{const d=co,f=fo,h=hi,g=Pl,m=Ym,y=kl,b=lr,w=Ma;return R(),xe(w,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"50%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:u.handleOpen},{header:j(()=>[B(f,null,{default:j(()=>[B(d,{span:12},{default:j(()=>[Ue("\u521B\u5EFA\u6D41\u7A0B")]),_:1})]),_:1})]),footer:j(()=>[J("div",dZe,[B(b,{type:"primary",onClick:a},{default:j(()=>[Ue("\u786E\u8BA4")]),_:1}),B(b,{onClick:s},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),default:j(()=>[B(y,{model:o,ref_key:"formRef",ref:i,"label-position":"top","label-width":"auto"},{default:j(()=>[B(g,{label:"ID",prop:"id"},{default:j(()=>[B(h,{modelValue:o.id,"onUpdate:modelValue":c[0]||(c[0]=O=>o.id=O),placeholder:"\u5982\u679C\u4E0D\u6307\u5B9A\uFF0C\u81EA\u52A8\u521B\u5EFA"},null,8,["modelValue"])]),_:1}),B(g,{label:"\u540D\u79F0",prop:"name"},{default:j(()=>[B(h,{modelValue:o.name,"onUpdate:modelValue":c[1]||(c[1]=O=>o.name=O),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),B(g,{label:"\u6839\u89C4\u5219\u94FE",prop:"root"},{default:j(()=>[B(m,{class:"ml-2",modelValue:o.root,"onUpdate:modelValue":c[2]||(c[2]=O=>o.root=O),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"])]),_:1}),B(g,{label:"\u63CF\u8FF0",prop:"description"},{default:j(()=>[B(h,{modelValue:o.additionalInfo.description,"onUpdate:modelValue":c[3]||(c[3]=O=>o.additionalInfo.description=O),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","onOpen"])}}};var SA={exports:{}};/**
- * @license
- * Lodash <https://lodash.com/>
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */(function(t,e){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",d=1,f=2,h=4,g=1,m=2,y=1,b=2,w=4,O=8,x=16,S=32,C=64,E=128,T=256,P=512,A=30,D="...",$=800,N=16,z=1,I=2,L=3,X=1/0,Q=9007199254740991,W=17976931348623157e292,G=0/0,K=4294967295,oe=K-1,ne=K>>>1,_e=[["ary",E],["bind",y],["bindKey",b],["curry",O],["curryRight",x],["flip",P],["partial",S],["partialRight",C],["rearg",T]],Ce="[object Arguments]",U="[object Array]",ie="[object AsyncFunction]",ee="[object Boolean]",he="[object Date]",$e="[object DOMException]",Me="[object Error]",q="[object Function]",de="[object GeneratorFunction]",ke="[object Map]",Ie="[object Number]",se="[object Null]",ye="[object Object]",Ae="[object Promise]",Z="[object Proxy]",te="[object RegExp]",le="[object Set]",Te="[object String]",pe="[object Symbol]",Oe="[object Undefined]",Re="[object WeakMap]",je="[object WeakSet]",Ke="[object ArrayBuffer]",Je="[object DataView]",at="[object Float32Array]",kt="[object Float64Array]",jt="[object Int8Array]",Pe="[object Int16Array]",nt="[object Int32Array]",fe="[object Uint8Array]",De="[object Uint8ClampedArray]",ce="[object Uint16Array]",qe="[object Uint32Array]",Mt=/\b__p \+= '';/g,Zt=/\b(__p \+=) '' \+/g,Sn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,kr=/&(?:amp|lt|gt|quot|#39);/g,zn=/[&<>"']/g,Ln=RegExp(kr.source),Yt=RegExp(zn.source),Ge=/<%-([\s\S]+?)%>/g,$t=/<%([\s\S]+?)%>/g,bn=/<%=([\s\S]+?)%>/g,dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pr=/^\w*$/,Jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xi=/[\\^$.*+?()[\]{}|]/g,Ji=RegExp(Xi.source),si=/^\s+/,Vs=/\s/,cs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_r=/\{\n\/\* \[wrapped with (.+)\] \*/,$l=/,? & /,ca=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ot=/[()=,{}\[\]\/\s]/,Rt=/\\(\\)?/g,Nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Br=/\w*$/,gi=/^[-+]0x[0-9a-f]+$/i,ho=/^0b[01]+$/i,Eo=/^\[object .+?Constructor\]$/,eo=/^0o[0-7]+$/i,To=/^(?:0|[1-9]\d*)$/,ds=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tt=/($^)/,Dt=/['\n\r\u2028\u2029\\]/g,ae="\\ud800-\\udfff",Le="\\u0300-\\u036f",gt="\\ufe20-\\ufe2f",Bt="\\u20d0-\\u20ff",kn=Le+gt+Bt,gr="\\u2700-\\u27bf",Ei="a-z\\xdf-\\xf6\\xf8-\\xff",ve="\\xac\\xb1\\xd7\\xf7",We="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wt="\\u2000-\\u206f",Lt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fn="A-Z\\xc0-\\xd6\\xd8-\\xde",nr="\\ufe0e\\ufe0f",Pt=ve+We+wt+Lt,nn="['\u2019]",yn="["+ae+"]",Xn="["+Pt+"]",Zi="["+kn+"]",pv="\\d+",gv="["+gr+"]",da="["+Ei+"]",Tp="[^"+ae+Pt+pv+gr+Ei+fn+"]",Gf="\\ud83c[\\udffb-\\udfff]",Zo="(?:"+Zi+"|"+Gf+")",fs="[^"+ae+"]",mv="(?:\\ud83c[\\udde6-\\uddff]){2}",kp="[\\ud800-\\udbff][\\udc00-\\udfff]",Pp="["+fn+"]",oL="\\u200d",aL="(?:"+da+"|"+Tp+")",tee="(?:"+Pp+"|"+Tp+")",sL="(?:"+nn+"(?:d|ll|m|re|s|t|ve))?",lL="(?:"+nn+"(?:D|LL|M|RE|S|T|VE))?",uL=Zo+"?",cL="["+nr+"]?",nee="(?:"+oL+"(?:"+[fs,mv,kp].join("|")+")"+cL+uL+")*",ree="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",iee="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",dL=cL+uL+nee,oee="(?:"+[gv,mv,kp].join("|")+")"+dL,aee="(?:"+[fs+Zi+"?",Zi,mv,kp,yn].join("|")+")",see=RegExp(nn,"g"),lee=RegExp(Zi,"g"),KC=RegExp(Gf+"(?="+Gf+")|"+aee+dL,"g"),uee=RegExp([Pp+"?"+da+"+"+sL+"(?="+[Xn,Pp,"$"].join("|")+")",tee+"+"+lL+"(?="+[Xn,Pp+aL,"$"].join("|")+")",Pp+"?"+aL+"+"+sL,Pp+"+"+lL,iee,ree,pv,oee].join("|"),"g"),cee=RegExp("["+oL+ae+kn+nr+"]"),dee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fee=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],hee=-1,mi={};mi[at]=mi[kt]=mi[jt]=mi[Pe]=mi[nt]=mi[fe]=mi[De]=mi[ce]=mi[qe]=!0,mi[Ce]=mi[U]=mi[Ke]=mi[ee]=mi[Je]=mi[he]=mi[Me]=mi[q]=mi[ke]=mi[Ie]=mi[ye]=mi[te]=mi[le]=mi[Te]=mi[Re]=!1;var li={};li[Ce]=li[U]=li[Ke]=li[Je]=li[ee]=li[he]=li[at]=li[kt]=li[jt]=li[Pe]=li[nt]=li[ke]=li[Ie]=li[ye]=li[te]=li[le]=li[Te]=li[pe]=li[fe]=li[De]=li[ce]=li[qe]=!0,li[Me]=li[q]=li[Re]=!1;var pee={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},gee={"&":"&","<":"<",">":">",'"':""","'":"'"},mee={"&":"&","<":"<",">":">",""":'"',"'":"'"},vee={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yee=parseFloat,bee=parseInt,fL=typeof Ai=="object"&&Ai&&Ai.Object===Object&&Ai,_ee=typeof self=="object"&&self&&self.Object===Object&&self,ko=fL||_ee||Function("return this")(),JC=e&&!e.nodeType&&e,Kf=JC&&!0&&t&&!t.nodeType&&t,hL=Kf&&Kf.exports===JC,eE=hL&&fL.process,js=function(){try{var ze=Kf&&Kf.require&&Kf.require("util").types;return ze||eE&&eE.binding&&eE.binding("util")}catch{}}(),pL=js&&js.isArrayBuffer,gL=js&&js.isDate,mL=js&&js.isMap,vL=js&&js.isRegExp,yL=js&&js.isSet,bL=js&&js.isTypedArray;function hs(ze,pt,lt){switch(lt.length){case 0:return ze.call(pt);case 1:return ze.call(pt,lt[0]);case 2:return ze.call(pt,lt[0],lt[1]);case 3:return ze.call(pt,lt[0],lt[1],lt[2])}return ze.apply(pt,lt)}function Oee(ze,pt,lt,en){for(var Wn=-1,Fr=ze==null?0:ze.length;++Wn<Fr;){var to=ze[Wn];pt(en,to,lt(to),ze)}return en}function Qs(ze,pt){for(var lt=-1,en=ze==null?0:ze.length;++lt<en&&pt(ze[lt],lt,ze)!==!1;);return ze}function wee(ze,pt){for(var lt=ze==null?0:ze.length;lt--&&pt(ze[lt],lt,ze)!==!1;);return ze}function _L(ze,pt){for(var lt=-1,en=ze==null?0:ze.length;++lt<en;)if(!pt(ze[lt],lt,ze))return!1;return!0}function yd(ze,pt){for(var lt=-1,en=ze==null?0:ze.length,Wn=0,Fr=[];++lt<en;){var to=ze[lt];pt(to,lt,ze)&&(Fr[Wn++]=to)}return Fr}function a_(ze,pt){var lt=ze==null?0:ze.length;return!!lt&&Ap(ze,pt,0)>-1}function tE(ze,pt,lt){for(var en=-1,Wn=ze==null?0:ze.length;++en<Wn;)if(lt(pt,ze[en]))return!0;return!1}function wi(ze,pt){for(var lt=-1,en=ze==null?0:ze.length,Wn=Array(en);++lt<en;)Wn[lt]=pt(ze[lt],lt,ze);return Wn}function bd(ze,pt){for(var lt=-1,en=pt.length,Wn=ze.length;++lt<en;)ze[Wn+lt]=pt[lt];return ze}function nE(ze,pt,lt,en){var Wn=-1,Fr=ze==null?0:ze.length;for(en&&Fr&&(lt=ze[++Wn]);++Wn<Fr;)lt=pt(lt,ze[Wn],Wn,ze);return lt}function xee(ze,pt,lt,en){var Wn=ze==null?0:ze.length;for(en&&Wn&&(lt=ze[--Wn]);Wn--;)lt=pt(lt,ze[Wn],Wn,ze);return lt}function rE(ze,pt){for(var lt=-1,en=ze==null?0:ze.length;++lt<en;)if(pt(ze[lt],lt,ze))return!0;return!1}var See=iE("length");function Cee(ze){return ze.split("")}function Eee(ze){return ze.match(ca)||[]}function OL(ze,pt,lt){var en;return lt(ze,function(Wn,Fr,to){if(pt(Wn,Fr,to))return en=Fr,!1}),en}function s_(ze,pt,lt,en){for(var Wn=ze.length,Fr=lt+(en?1:-1);en?Fr--:++Fr<Wn;)if(pt(ze[Fr],Fr,ze))return Fr;return-1}function Ap(ze,pt,lt){return pt===pt?Bee(ze,pt,lt):s_(ze,wL,lt)}function Tee(ze,pt,lt,en){for(var Wn=lt-1,Fr=ze.length;++Wn<Fr;)if(en(ze[Wn],pt))return Wn;return-1}function wL(ze){return ze!==ze}function xL(ze,pt){var lt=ze==null?0:ze.length;return lt?aE(ze,pt)/lt:G}function iE(ze){return function(pt){return pt==null?n:pt[ze]}}function oE(ze){return function(pt){return ze==null?n:ze[pt]}}function SL(ze,pt,lt,en,Wn){return Wn(ze,function(Fr,to,ri){lt=en?(en=!1,Fr):pt(lt,Fr,to,ri)}),lt}function kee(ze,pt){var lt=ze.length;for(ze.sort(pt);lt--;)ze[lt]=ze[lt].value;return ze}function aE(ze,pt){for(var lt,en=-1,Wn=ze.length;++en<Wn;){var Fr=pt(ze[en]);Fr!==n&&(lt=lt===n?Fr:lt+Fr)}return lt}function sE(ze,pt){for(var lt=-1,en=Array(ze);++lt<ze;)en[lt]=pt(lt);return en}function Pee(ze,pt){return wi(pt,function(lt){return[lt,ze[lt]]})}function CL(ze){return ze&&ze.slice(0,PL(ze)+1).replace(si,"")}function ps(ze){return function(pt){return ze(pt)}}function lE(ze,pt){return wi(pt,function(lt){return ze[lt]})}function vv(ze,pt){return ze.has(pt)}function EL(ze,pt){for(var lt=-1,en=ze.length;++lt<en&&Ap(pt,ze[lt],0)>-1;);return lt}function TL(ze,pt){for(var lt=ze.length;lt--&&Ap(pt,ze[lt],0)>-1;);return lt}function Aee(ze,pt){for(var lt=ze.length,en=0;lt--;)ze[lt]===pt&&++en;return en}var Mee=oE(pee),Ree=oE(gee);function $ee(ze){return"\\"+vee[ze]}function Nee(ze,pt){return ze==null?n:ze[pt]}function Mp(ze){return cee.test(ze)}function Dee(ze){return dee.test(ze)}function Lee(ze){for(var pt,lt=[];!(pt=ze.next()).done;)lt.push(pt.value);return lt}function uE(ze){var pt=-1,lt=Array(ze.size);return ze.forEach(function(en,Wn){lt[++pt]=[Wn,en]}),lt}function kL(ze,pt){return function(lt){return ze(pt(lt))}}function _d(ze,pt){for(var lt=-1,en=ze.length,Wn=0,Fr=[];++lt<en;){var to=ze[lt];(to===pt||to===c)&&(ze[lt]=c,Fr[Wn++]=lt)}return Fr}function l_(ze){var pt=-1,lt=Array(ze.size);return ze.forEach(function(en){lt[++pt]=en}),lt}function Iee(ze){var pt=-1,lt=Array(ze.size);return ze.forEach(function(en){lt[++pt]=[en,en]}),lt}function Bee(ze,pt,lt){for(var en=lt-1,Wn=ze.length;++en<Wn;)if(ze[en]===pt)return en;return-1}function Fee(ze,pt,lt){for(var en=lt+1;en--;)if(ze[en]===pt)return en;return en}function Rp(ze){return Mp(ze)?jee(ze):See(ze)}function Nl(ze){return Mp(ze)?Qee(ze):Cee(ze)}function PL(ze){for(var pt=ze.length;pt--&&Vs.test(ze.charAt(pt)););return pt}var Vee=oE(mee);function jee(ze){for(var pt=KC.lastIndex=0;KC.test(ze);)++pt;return pt}function Qee(ze){return ze.match(KC)||[]}function zee(ze){return ze.match(uee)||[]}var Wee=function ze(pt){pt=pt==null?ko:$p.defaults(ko.Object(),pt,$p.pick(ko,fee));var lt=pt.Array,en=pt.Date,Wn=pt.Error,Fr=pt.Function,to=pt.Math,ri=pt.Object,cE=pt.RegExp,Hee=pt.String,zs=pt.TypeError,u_=lt.prototype,Uee=Fr.prototype,Np=ri.prototype,c_=pt["__core-js_shared__"],d_=Uee.toString,Yr=Np.hasOwnProperty,Xee=0,AL=function(){var v=/[^.]+$/.exec(c_&&c_.keys&&c_.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""}(),f_=Np.toString,Zee=d_.call(ri),qee=ko._,Yee=cE("^"+d_.call(Yr).replace(Xi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),h_=hL?pt.Buffer:n,Od=pt.Symbol,p_=pt.Uint8Array,ML=h_?h_.allocUnsafe:n,g_=kL(ri.getPrototypeOf,ri),RL=ri.create,$L=Np.propertyIsEnumerable,m_=u_.splice,NL=Od?Od.isConcatSpreadable:n,yv=Od?Od.iterator:n,Jf=Od?Od.toStringTag:n,v_=function(){try{var v=ih(ri,"defineProperty");return v({},"",{}),v}catch{}}(),Gee=pt.clearTimeout!==ko.clearTimeout&&pt.clearTimeout,Kee=en&&en.now!==ko.Date.now&&en.now,Jee=pt.setTimeout!==ko.setTimeout&&pt.setTimeout,y_=to.ceil,b_=to.floor,dE=ri.getOwnPropertySymbols,ete=h_?h_.isBuffer:n,DL=pt.isFinite,tte=u_.join,nte=kL(ri.keys,ri),no=to.max,qo=to.min,rte=en.now,ite=pt.parseInt,LL=to.random,ote=u_.reverse,fE=ih(pt,"DataView"),bv=ih(pt,"Map"),hE=ih(pt,"Promise"),Dp=ih(pt,"Set"),_v=ih(pt,"WeakMap"),Ov=ih(ri,"create"),__=_v&&new _v,Lp={},ate=oh(fE),ste=oh(bv),lte=oh(hE),ute=oh(Dp),cte=oh(_v),O_=Od?Od.prototype:n,wv=O_?O_.valueOf:n,IL=O_?O_.toString:n;function ge(v){if(Pi(v)&&!Hn(v)&&!(v instanceof Or)){if(v instanceof Ws)return v;if(Yr.call(v,"__wrapped__"))return BI(v)}return new Ws(v)}var Ip=function(){function v(){}return function(_){if(!Ti(_))return{};if(RL)return RL(_);v.prototype=_;var k=new v;return v.prototype=n,k}}();function w_(){}function Ws(v,_){this.__wrapped__=v,this.__actions__=[],this.__chain__=!!_,this.__index__=0,this.__values__=n}ge.templateSettings={escape:Ge,evaluate:$t,interpolate:bn,variable:"",imports:{_:ge}},ge.prototype=w_.prototype,ge.prototype.constructor=ge,Ws.prototype=Ip(w_.prototype),Ws.prototype.constructor=Ws;function Or(v){this.__wrapped__=v,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=K,this.__views__=[]}function dte(){var v=new Or(this.__wrapped__);return v.__actions__=Na(this.__actions__),v.__dir__=this.__dir__,v.__filtered__=this.__filtered__,v.__iteratees__=Na(this.__iteratees__),v.__takeCount__=this.__takeCount__,v.__views__=Na(this.__views__),v}function fte(){if(this.__filtered__){var v=new Or(this);v.__dir__=-1,v.__filtered__=!0}else v=this.clone(),v.__dir__*=-1;return v}function hte(){var v=this.__wrapped__.value(),_=this.__dir__,k=Hn(v),H=_<0,re=k?v.length:0,be=Cne(0,re,this.__views__),Ne=be.start,Be=be.end,He=Be-Ne,yt=H?Be:Ne-1,_t=this.__iteratees__,Ct=_t.length,Wt=0,hn=qo(He,this.__takeCount__);if(!k||!H&&re==He&&hn==He)return sI(v,this.__actions__);var Pn=[];e:for(;He--&&Wt<hn;){yt+=_;for(var rr=-1,An=v[yt];++rr<Ct;){var mr=_t[rr],Cr=mr.iteratee,vs=mr.type,pa=Cr(An);if(vs==I)An=pa;else if(!pa){if(vs==z)continue e;break e}}Pn[Wt++]=An}return Pn}Or.prototype=Ip(w_.prototype),Or.prototype.constructor=Or;function eh(v){var _=-1,k=v==null?0:v.length;for(this.clear();++_<k;){var H=v[_];this.set(H[0],H[1])}}function pte(){this.__data__=Ov?Ov(null):{},this.size=0}function gte(v){var _=this.has(v)&&delete this.__data__[v];return this.size-=_?1:0,_}function mte(v){var _=this.__data__;if(Ov){var k=_[v];return k===l?n:k}return Yr.call(_,v)?_[v]:n}function vte(v){var _=this.__data__;return Ov?_[v]!==n:Yr.call(_,v)}function yte(v,_){var k=this.__data__;return this.size+=this.has(v)?0:1,k[v]=Ov&&_===n?l:_,this}eh.prototype.clear=pte,eh.prototype.delete=gte,eh.prototype.get=mte,eh.prototype.has=vte,eh.prototype.set=yte;function Oc(v){var _=-1,k=v==null?0:v.length;for(this.clear();++_<k;){var H=v[_];this.set(H[0],H[1])}}function bte(){this.__data__=[],this.size=0}function _te(v){var _=this.__data__,k=x_(_,v);if(k<0)return!1;var H=_.length-1;return k==H?_.pop():m_.call(_,k,1),--this.size,!0}function Ote(v){var _=this.__data__,k=x_(_,v);return k<0?n:_[k][1]}function wte(v){return x_(this.__data__,v)>-1}function xte(v,_){var k=this.__data__,H=x_(k,v);return H<0?(++this.size,k.push([v,_])):k[H][1]=_,this}Oc.prototype.clear=bte,Oc.prototype.delete=_te,Oc.prototype.get=Ote,Oc.prototype.has=wte,Oc.prototype.set=xte;function wc(v){var _=-1,k=v==null?0:v.length;for(this.clear();++_<k;){var H=v[_];this.set(H[0],H[1])}}function Ste(){this.size=0,this.__data__={hash:new eh,map:new(bv||Oc),string:new eh}}function Cte(v){var _=D_(this,v).delete(v);return this.size-=_?1:0,_}function Ete(v){return D_(this,v).get(v)}function Tte(v){return D_(this,v).has(v)}function kte(v,_){var k=D_(this,v),H=k.size;return k.set(v,_),this.size+=k.size==H?0:1,this}wc.prototype.clear=Ste,wc.prototype.delete=Cte,wc.prototype.get=Ete,wc.prototype.has=Tte,wc.prototype.set=kte;function th(v){var _=-1,k=v==null?0:v.length;for(this.__data__=new wc;++_<k;)this.add(v[_])}function Pte(v){return this.__data__.set(v,l),this}function Ate(v){return this.__data__.has(v)}th.prototype.add=th.prototype.push=Pte,th.prototype.has=Ate;function Dl(v){var _=this.__data__=new Oc(v);this.size=_.size}function Mte(){this.__data__=new Oc,this.size=0}function Rte(v){var _=this.__data__,k=_.delete(v);return this.size=_.size,k}function $te(v){return this.__data__.get(v)}function Nte(v){return this.__data__.has(v)}function Dte(v,_){var k=this.__data__;if(k instanceof Oc){var H=k.__data__;if(!bv||H.length<i-1)return H.push([v,_]),this.size=++k.size,this;k=this.__data__=new wc(H)}return k.set(v,_),this.size=k.size,this}Dl.prototype.clear=Mte,Dl.prototype.delete=Rte,Dl.prototype.get=$te,Dl.prototype.has=Nte,Dl.prototype.set=Dte;function BL(v,_){var k=Hn(v),H=!k&&ah(v),re=!k&&!H&&Ed(v),be=!k&&!H&&!re&&jp(v),Ne=k||H||re||be,Be=Ne?sE(v.length,Hee):[],He=Be.length;for(var yt in v)(_||Yr.call(v,yt))&&!(Ne&&(yt=="length"||re&&(yt=="offset"||yt=="parent")||be&&(yt=="buffer"||yt=="byteLength"||yt=="byteOffset")||Ec(yt,He)))&&Be.push(yt);return Be}function FL(v){var _=v.length;return _?v[SE(0,_-1)]:n}function Lte(v,_){return L_(Na(v),nh(_,0,v.length))}function Ite(v){return L_(Na(v))}function pE(v,_,k){(k!==n&&!Ll(v[_],k)||k===n&&!(_ in v))&&xc(v,_,k)}function xv(v,_,k){var H=v[_];(!(Yr.call(v,_)&&Ll(H,k))||k===n&&!(_ in v))&&xc(v,_,k)}function x_(v,_){for(var k=v.length;k--;)if(Ll(v[k][0],_))return k;return-1}function Bte(v,_,k,H){return wd(v,function(re,be,Ne){_(H,re,k(re),Ne)}),H}function VL(v,_){return v&&_u(_,po(_),v)}function Fte(v,_){return v&&_u(_,La(_),v)}function xc(v,_,k){_=="__proto__"&&v_?v_(v,_,{configurable:!0,enumerable:!0,value:k,writable:!0}):v[_]=k}function gE(v,_){for(var k=-1,H=_.length,re=lt(H),be=v==null;++k<H;)re[k]=be?n:qE(v,_[k]);return re}function nh(v,_,k){return v===v&&(k!==n&&(v=v<=k?v:k),_!==n&&(v=v>=_?v:_)),v}function Hs(v,_,k,H,re,be){var Ne,Be=_&d,He=_&f,yt=_&h;if(k&&(Ne=re?k(v,H,re,be):k(v)),Ne!==n)return Ne;if(!Ti(v))return v;var _t=Hn(v);if(_t){if(Ne=Tne(v),!Be)return Na(v,Ne)}else{var Ct=Yo(v),Wt=Ct==q||Ct==de;if(Ed(v))return cI(v,Be);if(Ct==ye||Ct==Ce||Wt&&!re){if(Ne=He||Wt?{}:PI(v),!Be)return He?mne(v,Fte(Ne,v)):gne(v,VL(Ne,v))}else{if(!li[Ct])return re?v:{};Ne=kne(v,Ct,Be)}}be||(be=new Dl);var hn=be.get(v);if(hn)return hn;be.set(v,Ne),i3(v)?v.forEach(function(An){Ne.add(Hs(An,_,k,An,v,be))}):n3(v)&&v.forEach(function(An,mr){Ne.set(mr,Hs(An,_,k,mr,v,be))});var Pn=yt?He?DE:NE:He?La:po,rr=_t?n:Pn(v);return Qs(rr||v,function(An,mr){rr&&(mr=An,An=v[mr]),xv(Ne,mr,Hs(An,_,k,mr,v,be))}),Ne}function Vte(v){var _=po(v);return function(k){return jL(k,v,_)}}function jL(v,_,k){var H=k.length;if(v==null)return!H;for(v=ri(v);H--;){var re=k[H],be=_[re],Ne=v[re];if(Ne===n&&!(re in v)||!be(Ne))return!1}return!0}function QL(v,_,k){if(typeof v!="function")throw new zs(a);return Av(function(){v.apply(n,k)},_)}function Sv(v,_,k,H){var re=-1,be=a_,Ne=!0,Be=v.length,He=[],yt=_.length;if(!Be)return He;k&&(_=wi(_,ps(k))),H?(be=tE,Ne=!1):_.length>=i&&(be=vv,Ne=!1,_=new th(_));e:for(;++re<Be;){var _t=v[re],Ct=k==null?_t:k(_t);if(_t=H||_t!==0?_t:0,Ne&&Ct===Ct){for(var Wt=yt;Wt--;)if(_[Wt]===Ct)continue e;He.push(_t)}else be(_,Ct,H)||He.push(_t)}return He}var wd=gI(bu),zL=gI(vE,!0);function jte(v,_){var k=!0;return wd(v,function(H,re,be){return k=!!_(H,re,be),k}),k}function S_(v,_,k){for(var H=-1,re=v.length;++H<re;){var be=v[H],Ne=_(be);if(Ne!=null&&(Be===n?Ne===Ne&&!ms(Ne):k(Ne,Be)))var Be=Ne,He=be}return He}function Qte(v,_,k,H){var re=v.length;for(k=er(k),k<0&&(k=-k>re?0:re+k),H=H===n||H>re?re:er(H),H<0&&(H+=re),H=k>H?0:a3(H);k<H;)v[k++]=_;return v}function WL(v,_){var k=[];return wd(v,function(H,re,be){_(H,re,be)&&k.push(H)}),k}function Po(v,_,k,H,re){var be=-1,Ne=v.length;for(k||(k=Ane),re||(re=[]);++be<Ne;){var Be=v[be];_>0&&k(Be)?_>1?Po(Be,_-1,k,H,re):bd(re,Be):H||(re[re.length]=Be)}return re}var mE=mI(),HL=mI(!0);function bu(v,_){return v&&mE(v,_,po)}function vE(v,_){return v&&HL(v,_,po)}function C_(v,_){return yd(_,function(k){return Tc(v[k])})}function rh(v,_){_=Sd(_,v);for(var k=0,H=_.length;v!=null&&k<H;)v=v[Ou(_[k++])];return k&&k==H?v:n}function UL(v,_,k){var H=_(v);return Hn(v)?H:bd(H,k(v))}function fa(v){return v==null?v===n?Oe:se:Jf&&Jf in ri(v)?Sne(v):Ine(v)}function yE(v,_){return v>_}function zte(v,_){return v!=null&&Yr.call(v,_)}function Wte(v,_){return v!=null&&_ in ri(v)}function Hte(v,_,k){return v>=qo(_,k)&&v<no(_,k)}function bE(v,_,k){for(var H=k?tE:a_,re=v[0].length,be=v.length,Ne=be,Be=lt(be),He=1/0,yt=[];Ne--;){var _t=v[Ne];Ne&&_&&(_t=wi(_t,ps(_))),He=qo(_t.length,He),Be[Ne]=!k&&(_||re>=120&&_t.length>=120)?new th(Ne&&_t):n}_t=v[0];var Ct=-1,Wt=Be[0];e:for(;++Ct<re&&yt.length<He;){var hn=_t[Ct],Pn=_?_(hn):hn;if(hn=k||hn!==0?hn:0,!(Wt?vv(Wt,Pn):H(yt,Pn,k))){for(Ne=be;--Ne;){var rr=Be[Ne];if(!(rr?vv(rr,Pn):H(v[Ne],Pn,k)))continue e}Wt&&Wt.push(Pn),yt.push(hn)}}return yt}function Ute(v,_,k,H){return bu(v,function(re,be,Ne){_(H,k(re),be,Ne)}),H}function Cv(v,_,k){_=Sd(_,v),v=$I(v,_);var H=v==null?v:v[Ou(Xs(_))];return H==null?n:hs(H,v,k)}function XL(v){return Pi(v)&&fa(v)==Ce}function Xte(v){return Pi(v)&&fa(v)==Ke}function Zte(v){return Pi(v)&&fa(v)==he}function Ev(v,_,k,H,re){return v===_?!0:v==null||_==null||!Pi(v)&&!Pi(_)?v!==v&&_!==_:qte(v,_,k,H,Ev,re)}function qte(v,_,k,H,re,be){var Ne=Hn(v),Be=Hn(_),He=Ne?U:Yo(v),yt=Be?U:Yo(_);He=He==Ce?ye:He,yt=yt==Ce?ye:yt;var _t=He==ye,Ct=yt==ye,Wt=He==yt;if(Wt&&Ed(v)){if(!Ed(_))return!1;Ne=!0,_t=!1}if(Wt&&!_t)return be||(be=new Dl),Ne||jp(v)?EI(v,_,k,H,re,be):wne(v,_,He,k,H,re,be);if(!(k&g)){var hn=_t&&Yr.call(v,"__wrapped__"),Pn=Ct&&Yr.call(_,"__wrapped__");if(hn||Pn){var rr=hn?v.value():v,An=Pn?_.value():_;return be||(be=new Dl),re(rr,An,k,H,be)}}return Wt?(be||(be=new Dl),xne(v,_,k,H,re,be)):!1}function Yte(v){return Pi(v)&&Yo(v)==ke}function _E(v,_,k,H){var re=k.length,be=re,Ne=!H;if(v==null)return!be;for(v=ri(v);re--;){var Be=k[re];if(Ne&&Be[2]?Be[1]!==v[Be[0]]:!(Be[0]in v))return!1}for(;++re<be;){Be=k[re];var He=Be[0],yt=v[He],_t=Be[1];if(Ne&&Be[2]){if(yt===n&&!(He in v))return!1}else{var Ct=new Dl;if(H)var Wt=H(yt,_t,He,v,_,Ct);if(!(Wt===n?Ev(_t,yt,g|m,H,Ct):Wt))return!1}}return!0}function ZL(v){if(!Ti(v)||Rne(v))return!1;var _=Tc(v)?Yee:Eo;return _.test(oh(v))}function Gte(v){return Pi(v)&&fa(v)==te}function Kte(v){return Pi(v)&&Yo(v)==le}function Jte(v){return Pi(v)&&Q_(v.length)&&!!mi[fa(v)]}function qL(v){return typeof v=="function"?v:v==null?Ia:typeof v=="object"?Hn(v)?KL(v[0],v[1]):GL(v):v3(v)}function OE(v){if(!Pv(v))return nte(v);var _=[];for(var k in ri(v))Yr.call(v,k)&&k!="constructor"&&_.push(k);return _}function ene(v){if(!Ti(v))return Lne(v);var _=Pv(v),k=[];for(var H in v)H=="constructor"&&(_||!Yr.call(v,H))||k.push(H);return k}function wE(v,_){return v<_}function YL(v,_){var k=-1,H=Da(v)?lt(v.length):[];return wd(v,function(re,be,Ne){H[++k]=_(re,be,Ne)}),H}function GL(v){var _=IE(v);return _.length==1&&_[0][2]?MI(_[0][0],_[0][1]):function(k){return k===v||_E(k,v,_)}}function KL(v,_){return FE(v)&&AI(_)?MI(Ou(v),_):function(k){var H=qE(k,v);return H===n&&H===_?YE(k,v):Ev(_,H,g|m)}}function E_(v,_,k,H,re){v!==_&&mE(_,function(be,Ne){if(re||(re=new Dl),Ti(be))tne(v,_,Ne,k,E_,H,re);else{var Be=H?H(jE(v,Ne),be,Ne+"",v,_,re):n;Be===n&&(Be=be),pE(v,Ne,Be)}},La)}function tne(v,_,k,H,re,be,Ne){var Be=jE(v,k),He=jE(_,k),yt=Ne.get(He);if(yt){pE(v,k,yt);return}var _t=be?be(Be,He,k+"",v,_,Ne):n,Ct=_t===n;if(Ct){var Wt=Hn(He),hn=!Wt&&Ed(He),Pn=!Wt&&!hn&&jp(He);_t=He,Wt||hn||Pn?Hn(Be)?_t=Be:Li(Be)?_t=Na(Be):hn?(Ct=!1,_t=cI(He,!0)):Pn?(Ct=!1,_t=dI(He,!0)):_t=[]:Mv(He)||ah(He)?(_t=Be,ah(Be)?_t=s3(Be):(!Ti(Be)||Tc(Be))&&(_t=PI(He))):Ct=!1}Ct&&(Ne.set(He,_t),re(_t,He,H,be,Ne),Ne.delete(He)),pE(v,k,_t)}function JL(v,_){var k=v.length;if(!!k)return _+=_<0?k:0,Ec(_,k)?v[_]:n}function eI(v,_,k){_.length?_=wi(_,function(be){return Hn(be)?function(Ne){return rh(Ne,be.length===1?be[0]:be)}:be}):_=[Ia];var H=-1;_=wi(_,ps(Cn()));var re=YL(v,function(be,Ne,Be){var He=wi(_,function(yt){return yt(be)});return{criteria:He,index:++H,value:be}});return kee(re,function(be,Ne){return pne(be,Ne,k)})}function nne(v,_){return tI(v,_,function(k,H){return YE(v,H)})}function tI(v,_,k){for(var H=-1,re=_.length,be={};++H<re;){var Ne=_[H],Be=rh(v,Ne);k(Be,Ne)&&Tv(be,Sd(Ne,v),Be)}return be}function rne(v){return function(_){return rh(_,v)}}function xE(v,_,k,H){var re=H?Tee:Ap,be=-1,Ne=_.length,Be=v;for(v===_&&(_=Na(_)),k&&(Be=wi(v,ps(k)));++be<Ne;)for(var He=0,yt=_[be],_t=k?k(yt):yt;(He=re(Be,_t,He,H))>-1;)Be!==v&&m_.call(Be,He,1),m_.call(v,He,1);return v}function nI(v,_){for(var k=v?_.length:0,H=k-1;k--;){var re=_[k];if(k==H||re!==be){var be=re;Ec(re)?m_.call(v,re,1):TE(v,re)}}return v}function SE(v,_){return v+b_(LL()*(_-v+1))}function ine(v,_,k,H){for(var re=-1,be=no(y_((_-v)/(k||1)),0),Ne=lt(be);be--;)Ne[H?be:++re]=v,v+=k;return Ne}function CE(v,_){var k="";if(!v||_<1||_>Q)return k;do _%2&&(k+=v),_=b_(_/2),_&&(v+=v);while(_);return k}function or(v,_){return QE(RI(v,_,Ia),v+"")}function one(v){return FL(Qp(v))}function ane(v,_){var k=Qp(v);return L_(k,nh(_,0,k.length))}function Tv(v,_,k,H){if(!Ti(v))return v;_=Sd(_,v);for(var re=-1,be=_.length,Ne=be-1,Be=v;Be!=null&&++re<be;){var He=Ou(_[re]),yt=k;if(He==="__proto__"||He==="constructor"||He==="prototype")return v;if(re!=Ne){var _t=Be[He];yt=H?H(_t,He,Be):n,yt===n&&(yt=Ti(_t)?_t:Ec(_[re+1])?[]:{})}xv(Be,He,yt),Be=Be[He]}return v}var rI=__?function(v,_){return __.set(v,_),v}:Ia,sne=v_?function(v,_){return v_(v,"toString",{configurable:!0,enumerable:!1,value:KE(_),writable:!0})}:Ia;function lne(v){return L_(Qp(v))}function Us(v,_,k){var H=-1,re=v.length;_<0&&(_=-_>re?0:re+_),k=k>re?re:k,k<0&&(k+=re),re=_>k?0:k-_>>>0,_>>>=0;for(var be=lt(re);++H<re;)be[H]=v[H+_];return be}function une(v,_){var k;return wd(v,function(H,re,be){return k=_(H,re,be),!k}),!!k}function T_(v,_,k){var H=0,re=v==null?H:v.length;if(typeof _=="number"&&_===_&&re<=ne){for(;H<re;){var be=H+re>>>1,Ne=v[be];Ne!==null&&!ms(Ne)&&(k?Ne<=_:Ne<_)?H=be+1:re=be}return re}return EE(v,_,Ia,k)}function EE(v,_,k,H){var re=0,be=v==null?0:v.length;if(be===0)return 0;_=k(_);for(var Ne=_!==_,Be=_===null,He=ms(_),yt=_===n;re<be;){var _t=b_((re+be)/2),Ct=k(v[_t]),Wt=Ct!==n,hn=Ct===null,Pn=Ct===Ct,rr=ms(Ct);if(Ne)var An=H||Pn;else yt?An=Pn&&(H||Wt):Be?An=Pn&&Wt&&(H||!hn):He?An=Pn&&Wt&&!hn&&(H||!rr):hn||rr?An=!1:An=H?Ct<=_:Ct<_;An?re=_t+1:be=_t}return qo(be,oe)}function iI(v,_){for(var k=-1,H=v.length,re=0,be=[];++k<H;){var Ne=v[k],Be=_?_(Ne):Ne;if(!k||!Ll(Be,He)){var He=Be;be[re++]=Ne===0?0:Ne}}return be}function oI(v){return typeof v=="number"?v:ms(v)?G:+v}function gs(v){if(typeof v=="string")return v;if(Hn(v))return wi(v,gs)+"";if(ms(v))return IL?IL.call(v):"";var _=v+"";return _=="0"&&1/v==-X?"-0":_}function xd(v,_,k){var H=-1,re=a_,be=v.length,Ne=!0,Be=[],He=Be;if(k)Ne=!1,re=tE;else if(be>=i){var yt=_?null:_ne(v);if(yt)return l_(yt);Ne=!1,re=vv,He=new th}else He=_?[]:Be;e:for(;++H<be;){var _t=v[H],Ct=_?_(_t):_t;if(_t=k||_t!==0?_t:0,Ne&&Ct===Ct){for(var Wt=He.length;Wt--;)if(He[Wt]===Ct)continue e;_&&He.push(Ct),Be.push(_t)}else re(He,Ct,k)||(He!==Be&&He.push(Ct),Be.push(_t))}return Be}function TE(v,_){return _=Sd(_,v),v=$I(v,_),v==null||delete v[Ou(Xs(_))]}function aI(v,_,k,H){return Tv(v,_,k(rh(v,_)),H)}function k_(v,_,k,H){for(var re=v.length,be=H?re:-1;(H?be--:++be<re)&&_(v[be],be,v););return k?Us(v,H?0:be,H?be+1:re):Us(v,H?be+1:0,H?re:be)}function sI(v,_){var k=v;return k instanceof Or&&(k=k.value()),nE(_,function(H,re){return re.func.apply(re.thisArg,bd([H],re.args))},k)}function kE(v,_,k){var H=v.length;if(H<2)return H?xd(v[0]):[];for(var re=-1,be=lt(H);++re<H;)for(var Ne=v[re],Be=-1;++Be<H;)Be!=re&&(be[re]=Sv(be[re]||Ne,v[Be],_,k));return xd(Po(be,1),_,k)}function lI(v,_,k){for(var H=-1,re=v.length,be=_.length,Ne={};++H<re;){var Be=H<be?_[H]:n;k(Ne,v[H],Be)}return Ne}function PE(v){return Li(v)?v:[]}function AE(v){return typeof v=="function"?v:Ia}function Sd(v,_){return Hn(v)?v:FE(v,_)?[v]:II(zr(v))}var cne=or;function Cd(v,_,k){var H=v.length;return k=k===n?H:k,!_&&k>=H?v:Us(v,_,k)}var uI=Gee||function(v){return ko.clearTimeout(v)};function cI(v,_){if(_)return v.slice();var k=v.length,H=ML?ML(k):new v.constructor(k);return v.copy(H),H}function ME(v){var _=new v.constructor(v.byteLength);return new p_(_).set(new p_(v)),_}function dne(v,_){var k=_?ME(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.byteLength)}function fne(v){var _=new v.constructor(v.source,Br.exec(v));return _.lastIndex=v.lastIndex,_}function hne(v){return wv?ri(wv.call(v)):{}}function dI(v,_){var k=_?ME(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.length)}function fI(v,_){if(v!==_){var k=v!==n,H=v===null,re=v===v,be=ms(v),Ne=_!==n,Be=_===null,He=_===_,yt=ms(_);if(!Be&&!yt&&!be&&v>_||be&&Ne&&He&&!Be&&!yt||H&&Ne&&He||!k&&He||!re)return 1;if(!H&&!be&&!yt&&v<_||yt&&k&&re&&!H&&!be||Be&&k&&re||!Ne&&re||!He)return-1}return 0}function pne(v,_,k){for(var H=-1,re=v.criteria,be=_.criteria,Ne=re.length,Be=k.length;++H<Ne;){var He=fI(re[H],be[H]);if(He){if(H>=Be)return He;var yt=k[H];return He*(yt=="desc"?-1:1)}}return v.index-_.index}function hI(v,_,k,H){for(var re=-1,be=v.length,Ne=k.length,Be=-1,He=_.length,yt=no(be-Ne,0),_t=lt(He+yt),Ct=!H;++Be<He;)_t[Be]=_[Be];for(;++re<Ne;)(Ct||re<be)&&(_t[k[re]]=v[re]);for(;yt--;)_t[Be++]=v[re++];return _t}function pI(v,_,k,H){for(var re=-1,be=v.length,Ne=-1,Be=k.length,He=-1,yt=_.length,_t=no(be-Be,0),Ct=lt(_t+yt),Wt=!H;++re<_t;)Ct[re]=v[re];for(var hn=re;++He<yt;)Ct[hn+He]=_[He];for(;++Ne<Be;)(Wt||re<be)&&(Ct[hn+k[Ne]]=v[re++]);return Ct}function Na(v,_){var k=-1,H=v.length;for(_||(_=lt(H));++k<H;)_[k]=v[k];return _}function _u(v,_,k,H){var re=!k;k||(k={});for(var be=-1,Ne=_.length;++be<Ne;){var Be=_[be],He=H?H(k[Be],v[Be],Be,k,v):n;He===n&&(He=v[Be]),re?xc(k,Be,He):xv(k,Be,He)}return k}function gne(v,_){return _u(v,BE(v),_)}function mne(v,_){return _u(v,TI(v),_)}function P_(v,_){return function(k,H){var re=Hn(k)?Oee:Bte,be=_?_():{};return re(k,v,Cn(H,2),be)}}function Bp(v){return or(function(_,k){var H=-1,re=k.length,be=re>1?k[re-1]:n,Ne=re>2?k[2]:n;for(be=v.length>3&&typeof be=="function"?(re--,be):n,Ne&&ha(k[0],k[1],Ne)&&(be=re<3?n:be,re=1),_=ri(_);++H<re;){var Be=k[H];Be&&v(_,Be,H,be)}return _})}function gI(v,_){return function(k,H){if(k==null)return k;if(!Da(k))return v(k,H);for(var re=k.length,be=_?re:-1,Ne=ri(k);(_?be--:++be<re)&&H(Ne[be],be,Ne)!==!1;);return k}}function mI(v){return function(_,k,H){for(var re=-1,be=ri(_),Ne=H(_),Be=Ne.length;Be--;){var He=Ne[v?Be:++re];if(k(be[He],He,be)===!1)break}return _}}function vne(v,_,k){var H=_&y,re=kv(v);function be(){var Ne=this&&this!==ko&&this instanceof be?re:v;return Ne.apply(H?k:this,arguments)}return be}function vI(v){return function(_){_=zr(_);var k=Mp(_)?Nl(_):n,H=k?k[0]:_.charAt(0),re=k?Cd(k,1).join(""):_.slice(1);return H[v]()+re}}function Fp(v){return function(_){return nE(g3(p3(_).replace(see,"")),v,"")}}function kv(v){return function(){var _=arguments;switch(_.length){case 0:return new v;case 1:return new v(_[0]);case 2:return new v(_[0],_[1]);case 3:return new v(_[0],_[1],_[2]);case 4:return new v(_[0],_[1],_[2],_[3]);case 5:return new v(_[0],_[1],_[2],_[3],_[4]);case 6:return new v(_[0],_[1],_[2],_[3],_[4],_[5]);case 7:return new v(_[0],_[1],_[2],_[3],_[4],_[5],_[6])}var k=Ip(v.prototype),H=v.apply(k,_);return Ti(H)?H:k}}function yne(v,_,k){var H=kv(v);function re(){for(var be=arguments.length,Ne=lt(be),Be=be,He=Vp(re);Be--;)Ne[Be]=arguments[Be];var yt=be<3&&Ne[0]!==He&&Ne[be-1]!==He?[]:_d(Ne,He);if(be-=yt.length,be<k)return wI(v,_,A_,re.placeholder,n,Ne,yt,n,n,k-be);var _t=this&&this!==ko&&this instanceof re?H:v;return hs(_t,this,Ne)}return re}function yI(v){return function(_,k,H){var re=ri(_);if(!Da(_)){var be=Cn(k,3);_=po(_),k=function(Be){return be(re[Be],Be,re)}}var Ne=v(_,k,H);return Ne>-1?re[be?_[Ne]:Ne]:n}}function bI(v){return Cc(function(_){var k=_.length,H=k,re=Ws.prototype.thru;for(v&&_.reverse();H--;){var be=_[H];if(typeof be!="function")throw new zs(a);if(re&&!Ne&&N_(be)=="wrapper")var Ne=new Ws([],!0)}for(H=Ne?H:k;++H<k;){be=_[H];var Be=N_(be),He=Be=="wrapper"?LE(be):n;He&&VE(He[0])&&He[1]==(E|O|S|T)&&!He[4].length&&He[9]==1?Ne=Ne[N_(He[0])].apply(Ne,He[3]):Ne=be.length==1&&VE(be)?Ne[Be]():Ne.thru(be)}return function(){var yt=arguments,_t=yt[0];if(Ne&&yt.length==1&&Hn(_t))return Ne.plant(_t).value();for(var Ct=0,Wt=k?_[Ct].apply(this,yt):_t;++Ct<k;)Wt=_[Ct].call(this,Wt);return Wt}})}function A_(v,_,k,H,re,be,Ne,Be,He,yt){var _t=_&E,Ct=_&y,Wt=_&b,hn=_&(O|x),Pn=_&P,rr=Wt?n:kv(v);function An(){for(var mr=arguments.length,Cr=lt(mr),vs=mr;vs--;)Cr[vs]=arguments[vs];if(hn)var pa=Vp(An),ys=Aee(Cr,pa);if(H&&(Cr=hI(Cr,H,re,hn)),be&&(Cr=pI(Cr,be,Ne,hn)),mr-=ys,hn&&mr<yt){var Ii=_d(Cr,pa);return wI(v,_,A_,An.placeholder,k,Cr,Ii,Be,He,yt-mr)}var Il=Ct?k:this,Pc=Wt?Il[v]:v;return mr=Cr.length,Be?Cr=Bne(Cr,Be):Pn&&mr>1&&Cr.reverse(),_t&&He<mr&&(Cr.length=He),this&&this!==ko&&this instanceof An&&(Pc=rr||kv(Pc)),Pc.apply(Il,Cr)}return An}function _I(v,_){return function(k,H){return Ute(k,v,_(H),{})}}function M_(v,_){return function(k,H){var re;if(k===n&&H===n)return _;if(k!==n&&(re=k),H!==n){if(re===n)return H;typeof k=="string"||typeof H=="string"?(k=gs(k),H=gs(H)):(k=oI(k),H=oI(H)),re=v(k,H)}return re}}function RE(v){return Cc(function(_){return _=wi(_,ps(Cn())),or(function(k){var H=this;return v(_,function(re){return hs(re,H,k)})})})}function R_(v,_){_=_===n?" ":gs(_);var k=_.length;if(k<2)return k?CE(_,v):_;var H=CE(_,y_(v/Rp(_)));return Mp(_)?Cd(Nl(H),0,v).join(""):H.slice(0,v)}function bne(v,_,k,H){var re=_&y,be=kv(v);function Ne(){for(var Be=-1,He=arguments.length,yt=-1,_t=H.length,Ct=lt(_t+He),Wt=this&&this!==ko&&this instanceof Ne?be:v;++yt<_t;)Ct[yt]=H[yt];for(;He--;)Ct[yt++]=arguments[++Be];return hs(Wt,re?k:this,Ct)}return Ne}function OI(v){return function(_,k,H){return H&&typeof H!="number"&&ha(_,k,H)&&(k=H=n),_=kc(_),k===n?(k=_,_=0):k=kc(k),H=H===n?_<k?1:-1:kc(H),ine(_,k,H,v)}}function $_(v){return function(_,k){return typeof _=="string"&&typeof k=="string"||(_=Zs(_),k=Zs(k)),v(_,k)}}function wI(v,_,k,H,re,be,Ne,Be,He,yt){var _t=_&O,Ct=_t?Ne:n,Wt=_t?n:Ne,hn=_t?be:n,Pn=_t?n:be;_|=_t?S:C,_&=~(_t?C:S),_&w||(_&=~(y|b));var rr=[v,_,re,hn,Ct,Pn,Wt,Be,He,yt],An=k.apply(n,rr);return VE(v)&&NI(An,rr),An.placeholder=H,DI(An,v,_)}function $E(v){var _=to[v];return function(k,H){if(k=Zs(k),H=H==null?0:qo(er(H),292),H&&DL(k)){var re=(zr(k)+"e").split("e"),be=_(re[0]+"e"+(+re[1]+H));return re=(zr(be)+"e").split("e"),+(re[0]+"e"+(+re[1]-H))}return _(k)}}var _ne=Dp&&1/l_(new Dp([,-0]))[1]==X?function(v){return new Dp(v)}:tT;function xI(v){return function(_){var k=Yo(_);return k==ke?uE(_):k==le?Iee(_):Pee(_,v(_))}}function Sc(v,_,k,H,re,be,Ne,Be){var He=_&b;if(!He&&typeof v!="function")throw new zs(a);var yt=H?H.length:0;if(yt||(_&=~(S|C),H=re=n),Ne=Ne===n?Ne:no(er(Ne),0),Be=Be===n?Be:er(Be),yt-=re?re.length:0,_&C){var _t=H,Ct=re;H=re=n}var Wt=He?n:LE(v),hn=[v,_,k,H,re,_t,Ct,be,Ne,Be];if(Wt&&Dne(hn,Wt),v=hn[0],_=hn[1],k=hn[2],H=hn[3],re=hn[4],Be=hn[9]=hn[9]===n?He?0:v.length:no(hn[9]-yt,0),!Be&&_&(O|x)&&(_&=~(O|x)),!_||_==y)var Pn=vne(v,_,k);else _==O||_==x?Pn=yne(v,_,Be):(_==S||_==(y|S))&&!re.length?Pn=bne(v,_,k,H):Pn=A_.apply(n,hn);var rr=Wt?rI:NI;return DI(rr(Pn,hn),v,_)}function SI(v,_,k,H){return v===n||Ll(v,Np[k])&&!Yr.call(H,k)?_:v}function CI(v,_,k,H,re,be){return Ti(v)&&Ti(_)&&(be.set(_,v),E_(v,_,n,CI,be),be.delete(_)),v}function One(v){return Mv(v)?n:v}function EI(v,_,k,H,re,be){var Ne=k&g,Be=v.length,He=_.length;if(Be!=He&&!(Ne&&He>Be))return!1;var yt=be.get(v),_t=be.get(_);if(yt&&_t)return yt==_&&_t==v;var Ct=-1,Wt=!0,hn=k&m?new th:n;for(be.set(v,_),be.set(_,v);++Ct<Be;){var Pn=v[Ct],rr=_[Ct];if(H)var An=Ne?H(rr,Pn,Ct,_,v,be):H(Pn,rr,Ct,v,_,be);if(An!==n){if(An)continue;Wt=!1;break}if(hn){if(!rE(_,function(mr,Cr){if(!vv(hn,Cr)&&(Pn===mr||re(Pn,mr,k,H,be)))return hn.push(Cr)})){Wt=!1;break}}else if(!(Pn===rr||re(Pn,rr,k,H,be))){Wt=!1;break}}return be.delete(v),be.delete(_),Wt}function wne(v,_,k,H,re,be,Ne){switch(k){case Je:if(v.byteLength!=_.byteLength||v.byteOffset!=_.byteOffset)return!1;v=v.buffer,_=_.buffer;case Ke:return!(v.byteLength!=_.byteLength||!be(new p_(v),new p_(_)));case ee:case he:case Ie:return Ll(+v,+_);case Me:return v.name==_.name&&v.message==_.message;case te:case Te:return v==_+"";case ke:var Be=uE;case le:var He=H&g;if(Be||(Be=l_),v.size!=_.size&&!He)return!1;var yt=Ne.get(v);if(yt)return yt==_;H|=m,Ne.set(v,_);var _t=EI(Be(v),Be(_),H,re,be,Ne);return Ne.delete(v),_t;case pe:if(wv)return wv.call(v)==wv.call(_)}return!1}function xne(v,_,k,H,re,be){var Ne=k&g,Be=NE(v),He=Be.length,yt=NE(_),_t=yt.length;if(He!=_t&&!Ne)return!1;for(var Ct=He;Ct--;){var Wt=Be[Ct];if(!(Ne?Wt in _:Yr.call(_,Wt)))return!1}var hn=be.get(v),Pn=be.get(_);if(hn&&Pn)return hn==_&&Pn==v;var rr=!0;be.set(v,_),be.set(_,v);for(var An=Ne;++Ct<He;){Wt=Be[Ct];var mr=v[Wt],Cr=_[Wt];if(H)var vs=Ne?H(Cr,mr,Wt,_,v,be):H(mr,Cr,Wt,v,_,be);if(!(vs===n?mr===Cr||re(mr,Cr,k,H,be):vs)){rr=!1;break}An||(An=Wt=="constructor")}if(rr&&!An){var pa=v.constructor,ys=_.constructor;pa!=ys&&"constructor"in v&&"constructor"in _&&!(typeof pa=="function"&&pa instanceof pa&&typeof ys=="function"&&ys instanceof ys)&&(rr=!1)}return be.delete(v),be.delete(_),rr}function Cc(v){return QE(RI(v,n,jI),v+"")}function NE(v){return UL(v,po,BE)}function DE(v){return UL(v,La,TI)}var LE=__?function(v){return __.get(v)}:tT;function N_(v){for(var _=v.name+"",k=Lp[_],H=Yr.call(Lp,_)?k.length:0;H--;){var re=k[H],be=re.func;if(be==null||be==v)return re.name}return _}function Vp(v){var _=Yr.call(ge,"placeholder")?ge:v;return _.placeholder}function Cn(){var v=ge.iteratee||JE;return v=v===JE?qL:v,arguments.length?v(arguments[0],arguments[1]):v}function D_(v,_){var k=v.__data__;return Mne(_)?k[typeof _=="string"?"string":"hash"]:k.map}function IE(v){for(var _=po(v),k=_.length;k--;){var H=_[k],re=v[H];_[k]=[H,re,AI(re)]}return _}function ih(v,_){var k=Nee(v,_);return ZL(k)?k:n}function Sne(v){var _=Yr.call(v,Jf),k=v[Jf];try{v[Jf]=n;var H=!0}catch{}var re=f_.call(v);return H&&(_?v[Jf]=k:delete v[Jf]),re}var BE=dE?function(v){return v==null?[]:(v=ri(v),yd(dE(v),function(_){return $L.call(v,_)}))}:nT,TI=dE?function(v){for(var _=[];v;)bd(_,BE(v)),v=g_(v);return _}:nT,Yo=fa;(fE&&Yo(new fE(new ArrayBuffer(1)))!=Je||bv&&Yo(new bv)!=ke||hE&&Yo(hE.resolve())!=Ae||Dp&&Yo(new Dp)!=le||_v&&Yo(new _v)!=Re)&&(Yo=function(v){var _=fa(v),k=_==ye?v.constructor:n,H=k?oh(k):"";if(H)switch(H){case ate:return Je;case ste:return ke;case lte:return Ae;case ute:return le;case cte:return Re}return _});function Cne(v,_,k){for(var H=-1,re=k.length;++H<re;){var be=k[H],Ne=be.size;switch(be.type){case"drop":v+=Ne;break;case"dropRight":_-=Ne;break;case"take":_=qo(_,v+Ne);break;case"takeRight":v=no(v,_-Ne);break}}return{start:v,end:_}}function Ene(v){var _=v.match(_r);return _?_[1].split($l):[]}function kI(v,_,k){_=Sd(_,v);for(var H=-1,re=_.length,be=!1;++H<re;){var Ne=Ou(_[H]);if(!(be=v!=null&&k(v,Ne)))break;v=v[Ne]}return be||++H!=re?be:(re=v==null?0:v.length,!!re&&Q_(re)&&Ec(Ne,re)&&(Hn(v)||ah(v)))}function Tne(v){var _=v.length,k=new v.constructor(_);return _&&typeof v[0]=="string"&&Yr.call(v,"index")&&(k.index=v.index,k.input=v.input),k}function PI(v){return typeof v.constructor=="function"&&!Pv(v)?Ip(g_(v)):{}}function kne(v,_,k){var H=v.constructor;switch(_){case Ke:return ME(v);case ee:case he:return new H(+v);case Je:return dne(v,k);case at:case kt:case jt:case Pe:case nt:case fe:case De:case ce:case qe:return dI(v,k);case ke:return new H;case Ie:case Te:return new H(v);case te:return fne(v);case le:return new H;case pe:return hne(v)}}function Pne(v,_){var k=_.length;if(!k)return v;var H=k-1;return _[H]=(k>1?"& ":"")+_[H],_=_.join(k>2?", ":" "),v.replace(cs,`{
- /* [wrapped with `+_+`] */
- `)}function Ane(v){return Hn(v)||ah(v)||!!(NL&&v&&v[NL])}function Ec(v,_){var k=typeof v;return _=_==null?Q:_,!!_&&(k=="number"||k!="symbol"&&To.test(v))&&v>-1&&v%1==0&&v<_}function ha(v,_,k){if(!Ti(k))return!1;var H=typeof _;return(H=="number"?Da(k)&&Ec(_,k.length):H=="string"&&_ in k)?Ll(k[_],v):!1}function FE(v,_){if(Hn(v))return!1;var k=typeof v;return k=="number"||k=="symbol"||k=="boolean"||v==null||ms(v)?!0:Pr.test(v)||!dn.test(v)||_!=null&&v in ri(_)}function Mne(v){var _=typeof v;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?v!=="__proto__":v===null}function VE(v){var _=N_(v),k=ge[_];if(typeof k!="function"||!(_ in Or.prototype))return!1;if(v===k)return!0;var H=LE(k);return!!H&&v===H[0]}function Rne(v){return!!AL&&AL in v}var $ne=c_?Tc:rT;function Pv(v){var _=v&&v.constructor,k=typeof _=="function"&&_.prototype||Np;return v===k}function AI(v){return v===v&&!Ti(v)}function MI(v,_){return function(k){return k==null?!1:k[v]===_&&(_!==n||v in ri(k))}}function Nne(v){var _=V_(v,function(H){return k.size===u&&k.clear(),H}),k=_.cache;return _}function Dne(v,_){var k=v[1],H=_[1],re=k|H,be=re<(y|b|E),Ne=H==E&&k==O||H==E&&k==T&&v[7].length<=_[8]||H==(E|T)&&_[7].length<=_[8]&&k==O;if(!(be||Ne))return v;H&y&&(v[2]=_[2],re|=k&y?0:w);var Be=_[3];if(Be){var He=v[3];v[3]=He?hI(He,Be,_[4]):Be,v[4]=He?_d(v[3],c):_[4]}return Be=_[5],Be&&(He=v[5],v[5]=He?pI(He,Be,_[6]):Be,v[6]=He?_d(v[5],c):_[6]),Be=_[7],Be&&(v[7]=Be),H&E&&(v[8]=v[8]==null?_[8]:qo(v[8],_[8])),v[9]==null&&(v[9]=_[9]),v[0]=_[0],v[1]=re,v}function Lne(v){var _=[];if(v!=null)for(var k in ri(v))_.push(k);return _}function Ine(v){return f_.call(v)}function RI(v,_,k){return _=no(_===n?v.length-1:_,0),function(){for(var H=arguments,re=-1,be=no(H.length-_,0),Ne=lt(be);++re<be;)Ne[re]=H[_+re];re=-1;for(var Be=lt(_+1);++re<_;)Be[re]=H[re];return Be[_]=k(Ne),hs(v,this,Be)}}function $I(v,_){return _.length<2?v:rh(v,Us(_,0,-1))}function Bne(v,_){for(var k=v.length,H=qo(_.length,k),re=Na(v);H--;){var be=_[H];v[H]=Ec(be,k)?re[be]:n}return v}function jE(v,_){if(!(_==="constructor"&&typeof v[_]=="function")&&_!="__proto__")return v[_]}var NI=LI(rI),Av=Jee||function(v,_){return ko.setTimeout(v,_)},QE=LI(sne);function DI(v,_,k){var H=_+"";return QE(v,Pne(H,Fne(Ene(H),k)))}function LI(v){var _=0,k=0;return function(){var H=rte(),re=N-(H-k);if(k=H,re>0){if(++_>=$)return arguments[0]}else _=0;return v.apply(n,arguments)}}function L_(v,_){var k=-1,H=v.length,re=H-1;for(_=_===n?H:_;++k<_;){var be=SE(k,re),Ne=v[be];v[be]=v[k],v[k]=Ne}return v.length=_,v}var II=Nne(function(v){var _=[];return v.charCodeAt(0)===46&&_.push(""),v.replace(Jn,function(k,H,re,be){_.push(re?be.replace(Rt,"$1"):H||k)}),_});function Ou(v){if(typeof v=="string"||ms(v))return v;var _=v+"";return _=="0"&&1/v==-X?"-0":_}function oh(v){if(v!=null){try{return d_.call(v)}catch{}try{return v+""}catch{}}return""}function Fne(v,_){return Qs(_e,function(k){var H="_."+k[0];_&k[1]&&!a_(v,H)&&v.push(H)}),v.sort()}function BI(v){if(v instanceof Or)return v.clone();var _=new Ws(v.__wrapped__,v.__chain__);return _.__actions__=Na(v.__actions__),_.__index__=v.__index__,_.__values__=v.__values__,_}function Vne(v,_,k){(k?ha(v,_,k):_===n)?_=1:_=no(er(_),0);var H=v==null?0:v.length;if(!H||_<1)return[];for(var re=0,be=0,Ne=lt(y_(H/_));re<H;)Ne[be++]=Us(v,re,re+=_);return Ne}function jne(v){for(var _=-1,k=v==null?0:v.length,H=0,re=[];++_<k;){var be=v[_];be&&(re[H++]=be)}return re}function Qne(){var v=arguments.length;if(!v)return[];for(var _=lt(v-1),k=arguments[0],H=v;H--;)_[H-1]=arguments[H];return bd(Hn(k)?Na(k):[k],Po(_,1))}var zne=or(function(v,_){return Li(v)?Sv(v,Po(_,1,Li,!0)):[]}),Wne=or(function(v,_){var k=Xs(_);return Li(k)&&(k=n),Li(v)?Sv(v,Po(_,1,Li,!0),Cn(k,2)):[]}),Hne=or(function(v,_){var k=Xs(_);return Li(k)&&(k=n),Li(v)?Sv(v,Po(_,1,Li,!0),n,k):[]});function Une(v,_,k){var H=v==null?0:v.length;return H?(_=k||_===n?1:er(_),Us(v,_<0?0:_,H)):[]}function Xne(v,_,k){var H=v==null?0:v.length;return H?(_=k||_===n?1:er(_),_=H-_,Us(v,0,_<0?0:_)):[]}function Zne(v,_){return v&&v.length?k_(v,Cn(_,3),!0,!0):[]}function qne(v,_){return v&&v.length?k_(v,Cn(_,3),!0):[]}function Yne(v,_,k,H){var re=v==null?0:v.length;return re?(k&&typeof k!="number"&&ha(v,_,k)&&(k=0,H=re),Qte(v,_,k,H)):[]}function FI(v,_,k){var H=v==null?0:v.length;if(!H)return-1;var re=k==null?0:er(k);return re<0&&(re=no(H+re,0)),s_(v,Cn(_,3),re)}function VI(v,_,k){var H=v==null?0:v.length;if(!H)return-1;var re=H-1;return k!==n&&(re=er(k),re=k<0?no(H+re,0):qo(re,H-1)),s_(v,Cn(_,3),re,!0)}function jI(v){var _=v==null?0:v.length;return _?Po(v,1):[]}function Gne(v){var _=v==null?0:v.length;return _?Po(v,X):[]}function Kne(v,_){var k=v==null?0:v.length;return k?(_=_===n?1:er(_),Po(v,_)):[]}function Jne(v){for(var _=-1,k=v==null?0:v.length,H={};++_<k;){var re=v[_];H[re[0]]=re[1]}return H}function QI(v){return v&&v.length?v[0]:n}function ere(v,_,k){var H=v==null?0:v.length;if(!H)return-1;var re=k==null?0:er(k);return re<0&&(re=no(H+re,0)),Ap(v,_,re)}function tre(v){var _=v==null?0:v.length;return _?Us(v,0,-1):[]}var nre=or(function(v){var _=wi(v,PE);return _.length&&_[0]===v[0]?bE(_):[]}),rre=or(function(v){var _=Xs(v),k=wi(v,PE);return _===Xs(k)?_=n:k.pop(),k.length&&k[0]===v[0]?bE(k,Cn(_,2)):[]}),ire=or(function(v){var _=Xs(v),k=wi(v,PE);return _=typeof _=="function"?_:n,_&&k.pop(),k.length&&k[0]===v[0]?bE(k,n,_):[]});function ore(v,_){return v==null?"":tte.call(v,_)}function Xs(v){var _=v==null?0:v.length;return _?v[_-1]:n}function are(v,_,k){var H=v==null?0:v.length;if(!H)return-1;var re=H;return k!==n&&(re=er(k),re=re<0?no(H+re,0):qo(re,H-1)),_===_?Fee(v,_,re):s_(v,wL,re,!0)}function sre(v,_){return v&&v.length?JL(v,er(_)):n}var lre=or(zI);function zI(v,_){return v&&v.length&&_&&_.length?xE(v,_):v}function ure(v,_,k){return v&&v.length&&_&&_.length?xE(v,_,Cn(k,2)):v}function cre(v,_,k){return v&&v.length&&_&&_.length?xE(v,_,n,k):v}var dre=Cc(function(v,_){var k=v==null?0:v.length,H=gE(v,_);return nI(v,wi(_,function(re){return Ec(re,k)?+re:re}).sort(fI)),H});function fre(v,_){var k=[];if(!(v&&v.length))return k;var H=-1,re=[],be=v.length;for(_=Cn(_,3);++H<be;){var Ne=v[H];_(Ne,H,v)&&(k.push(Ne),re.push(H))}return nI(v,re),k}function zE(v){return v==null?v:ote.call(v)}function hre(v,_,k){var H=v==null?0:v.length;return H?(k&&typeof k!="number"&&ha(v,_,k)?(_=0,k=H):(_=_==null?0:er(_),k=k===n?H:er(k)),Us(v,_,k)):[]}function pre(v,_){return T_(v,_)}function gre(v,_,k){return EE(v,_,Cn(k,2))}function mre(v,_){var k=v==null?0:v.length;if(k){var H=T_(v,_);if(H<k&&Ll(v[H],_))return H}return-1}function vre(v,_){return T_(v,_,!0)}function yre(v,_,k){return EE(v,_,Cn(k,2),!0)}function bre(v,_){var k=v==null?0:v.length;if(k){var H=T_(v,_,!0)-1;if(Ll(v[H],_))return H}return-1}function _re(v){return v&&v.length?iI(v):[]}function Ore(v,_){return v&&v.length?iI(v,Cn(_,2)):[]}function wre(v){var _=v==null?0:v.length;return _?Us(v,1,_):[]}function xre(v,_,k){return v&&v.length?(_=k||_===n?1:er(_),Us(v,0,_<0?0:_)):[]}function Sre(v,_,k){var H=v==null?0:v.length;return H?(_=k||_===n?1:er(_),_=H-_,Us(v,_<0?0:_,H)):[]}function Cre(v,_){return v&&v.length?k_(v,Cn(_,3),!1,!0):[]}function Ere(v,_){return v&&v.length?k_(v,Cn(_,3)):[]}var Tre=or(function(v){return xd(Po(v,1,Li,!0))}),kre=or(function(v){var _=Xs(v);return Li(_)&&(_=n),xd(Po(v,1,Li,!0),Cn(_,2))}),Pre=or(function(v){var _=Xs(v);return _=typeof _=="function"?_:n,xd(Po(v,1,Li,!0),n,_)});function Are(v){return v&&v.length?xd(v):[]}function Mre(v,_){return v&&v.length?xd(v,Cn(_,2)):[]}function Rre(v,_){return _=typeof _=="function"?_:n,v&&v.length?xd(v,n,_):[]}function WE(v){if(!(v&&v.length))return[];var _=0;return v=yd(v,function(k){if(Li(k))return _=no(k.length,_),!0}),sE(_,function(k){return wi(v,iE(k))})}function WI(v,_){if(!(v&&v.length))return[];var k=WE(v);return _==null?k:wi(k,function(H){return hs(_,n,H)})}var $re=or(function(v,_){return Li(v)?Sv(v,_):[]}),Nre=or(function(v){return kE(yd(v,Li))}),Dre=or(function(v){var _=Xs(v);return Li(_)&&(_=n),kE(yd(v,Li),Cn(_,2))}),Lre=or(function(v){var _=Xs(v);return _=typeof _=="function"?_:n,kE(yd(v,Li),n,_)}),Ire=or(WE);function Bre(v,_){return lI(v||[],_||[],xv)}function Fre(v,_){return lI(v||[],_||[],Tv)}var Vre=or(function(v){var _=v.length,k=_>1?v[_-1]:n;return k=typeof k=="function"?(v.pop(),k):n,WI(v,k)});function HI(v){var _=ge(v);return _.__chain__=!0,_}function jre(v,_){return _(v),v}function I_(v,_){return _(v)}var Qre=Cc(function(v){var _=v.length,k=_?v[0]:0,H=this.__wrapped__,re=function(be){return gE(be,v)};return _>1||this.__actions__.length||!(H instanceof Or)||!Ec(k)?this.thru(re):(H=H.slice(k,+k+(_?1:0)),H.__actions__.push({func:I_,args:[re],thisArg:n}),new Ws(H,this.__chain__).thru(function(be){return _&&!be.length&&be.push(n),be}))});function zre(){return HI(this)}function Wre(){return new Ws(this.value(),this.__chain__)}function Hre(){this.__values__===n&&(this.__values__=o3(this.value()));var v=this.__index__>=this.__values__.length,_=v?n:this.__values__[this.__index__++];return{done:v,value:_}}function Ure(){return this}function Xre(v){for(var _,k=this;k instanceof w_;){var H=BI(k);H.__index__=0,H.__values__=n,_?re.__wrapped__=H:_=H;var re=H;k=k.__wrapped__}return re.__wrapped__=v,_}function Zre(){var v=this.__wrapped__;if(v instanceof Or){var _=v;return this.__actions__.length&&(_=new Or(this)),_=_.reverse(),_.__actions__.push({func:I_,args:[zE],thisArg:n}),new Ws(_,this.__chain__)}return this.thru(zE)}function qre(){return sI(this.__wrapped__,this.__actions__)}var Yre=P_(function(v,_,k){Yr.call(v,k)?++v[k]:xc(v,k,1)});function Gre(v,_,k){var H=Hn(v)?_L:jte;return k&&ha(v,_,k)&&(_=n),H(v,Cn(_,3))}function Kre(v,_){var k=Hn(v)?yd:WL;return k(v,Cn(_,3))}var Jre=yI(FI),eie=yI(VI);function tie(v,_){return Po(B_(v,_),1)}function nie(v,_){return Po(B_(v,_),X)}function rie(v,_,k){return k=k===n?1:er(k),Po(B_(v,_),k)}function UI(v,_){var k=Hn(v)?Qs:wd;return k(v,Cn(_,3))}function XI(v,_){var k=Hn(v)?wee:zL;return k(v,Cn(_,3))}var iie=P_(function(v,_,k){Yr.call(v,k)?v[k].push(_):xc(v,k,[_])});function oie(v,_,k,H){v=Da(v)?v:Qp(v),k=k&&!H?er(k):0;var re=v.length;return k<0&&(k=no(re+k,0)),z_(v)?k<=re&&v.indexOf(_,k)>-1:!!re&&Ap(v,_,k)>-1}var aie=or(function(v,_,k){var H=-1,re=typeof _=="function",be=Da(v)?lt(v.length):[];return wd(v,function(Ne){be[++H]=re?hs(_,Ne,k):Cv(Ne,_,k)}),be}),sie=P_(function(v,_,k){xc(v,k,_)});function B_(v,_){var k=Hn(v)?wi:YL;return k(v,Cn(_,3))}function lie(v,_,k,H){return v==null?[]:(Hn(_)||(_=_==null?[]:[_]),k=H?n:k,Hn(k)||(k=k==null?[]:[k]),eI(v,_,k))}var uie=P_(function(v,_,k){v[k?0:1].push(_)},function(){return[[],[]]});function cie(v,_,k){var H=Hn(v)?nE:SL,re=arguments.length<3;return H(v,Cn(_,4),k,re,wd)}function die(v,_,k){var H=Hn(v)?xee:SL,re=arguments.length<3;return H(v,Cn(_,4),k,re,zL)}function fie(v,_){var k=Hn(v)?yd:WL;return k(v,j_(Cn(_,3)))}function hie(v){var _=Hn(v)?FL:one;return _(v)}function pie(v,_,k){(k?ha(v,_,k):_===n)?_=1:_=er(_);var H=Hn(v)?Lte:ane;return H(v,_)}function gie(v){var _=Hn(v)?Ite:lne;return _(v)}function mie(v){if(v==null)return 0;if(Da(v))return z_(v)?Rp(v):v.length;var _=Yo(v);return _==ke||_==le?v.size:OE(v).length}function vie(v,_,k){var H=Hn(v)?rE:une;return k&&ha(v,_,k)&&(_=n),H(v,Cn(_,3))}var yie=or(function(v,_){if(v==null)return[];var k=_.length;return k>1&&ha(v,_[0],_[1])?_=[]:k>2&&ha(_[0],_[1],_[2])&&(_=[_[0]]),eI(v,Po(_,1),[])}),F_=Kee||function(){return ko.Date.now()};function bie(v,_){if(typeof _!="function")throw new zs(a);return v=er(v),function(){if(--v<1)return _.apply(this,arguments)}}function ZI(v,_,k){return _=k?n:_,_=v&&_==null?v.length:_,Sc(v,E,n,n,n,n,_)}function qI(v,_){var k;if(typeof _!="function")throw new zs(a);return v=er(v),function(){return--v>0&&(k=_.apply(this,arguments)),v<=1&&(_=n),k}}var HE=or(function(v,_,k){var H=y;if(k.length){var re=_d(k,Vp(HE));H|=S}return Sc(v,H,_,k,re)}),YI=or(function(v,_,k){var H=y|b;if(k.length){var re=_d(k,Vp(YI));H|=S}return Sc(_,H,v,k,re)});function GI(v,_,k){_=k?n:_;var H=Sc(v,O,n,n,n,n,n,_);return H.placeholder=GI.placeholder,H}function KI(v,_,k){_=k?n:_;var H=Sc(v,x,n,n,n,n,n,_);return H.placeholder=KI.placeholder,H}function JI(v,_,k){var H,re,be,Ne,Be,He,yt=0,_t=!1,Ct=!1,Wt=!0;if(typeof v!="function")throw new zs(a);_=Zs(_)||0,Ti(k)&&(_t=!!k.leading,Ct="maxWait"in k,be=Ct?no(Zs(k.maxWait)||0,_):be,Wt="trailing"in k?!!k.trailing:Wt);function hn(Ii){var Il=H,Pc=re;return H=re=n,yt=Ii,Ne=v.apply(Pc,Il),Ne}function Pn(Ii){return yt=Ii,Be=Av(mr,_),_t?hn(Ii):Ne}function rr(Ii){var Il=Ii-He,Pc=Ii-yt,y3=_-Il;return Ct?qo(y3,be-Pc):y3}function An(Ii){var Il=Ii-He,Pc=Ii-yt;return He===n||Il>=_||Il<0||Ct&&Pc>=be}function mr(){var Ii=F_();if(An(Ii))return Cr(Ii);Be=Av(mr,rr(Ii))}function Cr(Ii){return Be=n,Wt&&H?hn(Ii):(H=re=n,Ne)}function vs(){Be!==n&&uI(Be),yt=0,H=He=re=Be=n}function pa(){return Be===n?Ne:Cr(F_())}function ys(){var Ii=F_(),Il=An(Ii);if(H=arguments,re=this,He=Ii,Il){if(Be===n)return Pn(He);if(Ct)return uI(Be),Be=Av(mr,_),hn(He)}return Be===n&&(Be=Av(mr,_)),Ne}return ys.cancel=vs,ys.flush=pa,ys}var _ie=or(function(v,_){return QL(v,1,_)}),Oie=or(function(v,_,k){return QL(v,Zs(_)||0,k)});function wie(v){return Sc(v,P)}function V_(v,_){if(typeof v!="function"||_!=null&&typeof _!="function")throw new zs(a);var k=function(){var H=arguments,re=_?_.apply(this,H):H[0],be=k.cache;if(be.has(re))return be.get(re);var Ne=v.apply(this,H);return k.cache=be.set(re,Ne)||be,Ne};return k.cache=new(V_.Cache||wc),k}V_.Cache=wc;function j_(v){if(typeof v!="function")throw new zs(a);return function(){var _=arguments;switch(_.length){case 0:return!v.call(this);case 1:return!v.call(this,_[0]);case 2:return!v.call(this,_[0],_[1]);case 3:return!v.call(this,_[0],_[1],_[2])}return!v.apply(this,_)}}function xie(v){return qI(2,v)}var Sie=cne(function(v,_){_=_.length==1&&Hn(_[0])?wi(_[0],ps(Cn())):wi(Po(_,1),ps(Cn()));var k=_.length;return or(function(H){for(var re=-1,be=qo(H.length,k);++re<be;)H[re]=_[re].call(this,H[re]);return hs(v,this,H)})}),UE=or(function(v,_){var k=_d(_,Vp(UE));return Sc(v,S,n,_,k)}),e3=or(function(v,_){var k=_d(_,Vp(e3));return Sc(v,C,n,_,k)}),Cie=Cc(function(v,_){return Sc(v,T,n,n,n,_)});function Eie(v,_){if(typeof v!="function")throw new zs(a);return _=_===n?_:er(_),or(v,_)}function Tie(v,_){if(typeof v!="function")throw new zs(a);return _=_==null?0:no(er(_),0),or(function(k){var H=k[_],re=Cd(k,0,_);return H&&bd(re,H),hs(v,this,re)})}function kie(v,_,k){var H=!0,re=!0;if(typeof v!="function")throw new zs(a);return Ti(k)&&(H="leading"in k?!!k.leading:H,re="trailing"in k?!!k.trailing:re),JI(v,_,{leading:H,maxWait:_,trailing:re})}function Pie(v){return ZI(v,1)}function Aie(v,_){return UE(AE(_),v)}function Mie(){if(!arguments.length)return[];var v=arguments[0];return Hn(v)?v:[v]}function Rie(v){return Hs(v,h)}function $ie(v,_){return _=typeof _=="function"?_:n,Hs(v,h,_)}function Nie(v){return Hs(v,d|h)}function Die(v,_){return _=typeof _=="function"?_:n,Hs(v,d|h,_)}function Lie(v,_){return _==null||jL(v,_,po(_))}function Ll(v,_){return v===_||v!==v&&_!==_}var Iie=$_(yE),Bie=$_(function(v,_){return v>=_}),ah=XL(function(){return arguments}())?XL:function(v){return Pi(v)&&Yr.call(v,"callee")&&!$L.call(v,"callee")},Hn=lt.isArray,Fie=pL?ps(pL):Xte;function Da(v){return v!=null&&Q_(v.length)&&!Tc(v)}function Li(v){return Pi(v)&&Da(v)}function Vie(v){return v===!0||v===!1||Pi(v)&&fa(v)==ee}var Ed=ete||rT,jie=gL?ps(gL):Zte;function Qie(v){return Pi(v)&&v.nodeType===1&&!Mv(v)}function zie(v){if(v==null)return!0;if(Da(v)&&(Hn(v)||typeof v=="string"||typeof v.splice=="function"||Ed(v)||jp(v)||ah(v)))return!v.length;var _=Yo(v);if(_==ke||_==le)return!v.size;if(Pv(v))return!OE(v).length;for(var k in v)if(Yr.call(v,k))return!1;return!0}function Wie(v,_){return Ev(v,_)}function Hie(v,_,k){k=typeof k=="function"?k:n;var H=k?k(v,_):n;return H===n?Ev(v,_,n,k):!!H}function XE(v){if(!Pi(v))return!1;var _=fa(v);return _==Me||_==$e||typeof v.message=="string"&&typeof v.name=="string"&&!Mv(v)}function Uie(v){return typeof v=="number"&&DL(v)}function Tc(v){if(!Ti(v))return!1;var _=fa(v);return _==q||_==de||_==ie||_==Z}function t3(v){return typeof v=="number"&&v==er(v)}function Q_(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=Q}function Ti(v){var _=typeof v;return v!=null&&(_=="object"||_=="function")}function Pi(v){return v!=null&&typeof v=="object"}var n3=mL?ps(mL):Yte;function Xie(v,_){return v===_||_E(v,_,IE(_))}function Zie(v,_,k){return k=typeof k=="function"?k:n,_E(v,_,IE(_),k)}function qie(v){return r3(v)&&v!=+v}function Yie(v){if($ne(v))throw new Wn(o);return ZL(v)}function Gie(v){return v===null}function Kie(v){return v==null}function r3(v){return typeof v=="number"||Pi(v)&&fa(v)==Ie}function Mv(v){if(!Pi(v)||fa(v)!=ye)return!1;var _=g_(v);if(_===null)return!0;var k=Yr.call(_,"constructor")&&_.constructor;return typeof k=="function"&&k instanceof k&&d_.call(k)==Zee}var ZE=vL?ps(vL):Gte;function Jie(v){return t3(v)&&v>=-Q&&v<=Q}var i3=yL?ps(yL):Kte;function z_(v){return typeof v=="string"||!Hn(v)&&Pi(v)&&fa(v)==Te}function ms(v){return typeof v=="symbol"||Pi(v)&&fa(v)==pe}var jp=bL?ps(bL):Jte;function eoe(v){return v===n}function toe(v){return Pi(v)&&Yo(v)==Re}function noe(v){return Pi(v)&&fa(v)==je}var roe=$_(wE),ioe=$_(function(v,_){return v<=_});function o3(v){if(!v)return[];if(Da(v))return z_(v)?Nl(v):Na(v);if(yv&&v[yv])return Lee(v[yv]());var _=Yo(v),k=_==ke?uE:_==le?l_:Qp;return k(v)}function kc(v){if(!v)return v===0?v:0;if(v=Zs(v),v===X||v===-X){var _=v<0?-1:1;return _*W}return v===v?v:0}function er(v){var _=kc(v),k=_%1;return _===_?k?_-k:_:0}function a3(v){return v?nh(er(v),0,K):0}function Zs(v){if(typeof v=="number")return v;if(ms(v))return G;if(Ti(v)){var _=typeof v.valueOf=="function"?v.valueOf():v;v=Ti(_)?_+"":_}if(typeof v!="string")return v===0?v:+v;v=CL(v);var k=ho.test(v);return k||eo.test(v)?bee(v.slice(2),k?2:8):gi.test(v)?G:+v}function s3(v){return _u(v,La(v))}function ooe(v){return v?nh(er(v),-Q,Q):v===0?v:0}function zr(v){return v==null?"":gs(v)}var aoe=Bp(function(v,_){if(Pv(_)||Da(_)){_u(_,po(_),v);return}for(var k in _)Yr.call(_,k)&&xv(v,k,_[k])}),l3=Bp(function(v,_){_u(_,La(_),v)}),W_=Bp(function(v,_,k,H){_u(_,La(_),v,H)}),soe=Bp(function(v,_,k,H){_u(_,po(_),v,H)}),loe=Cc(gE);function uoe(v,_){var k=Ip(v);return _==null?k:VL(k,_)}var coe=or(function(v,_){v=ri(v);var k=-1,H=_.length,re=H>2?_[2]:n;for(re&&ha(_[0],_[1],re)&&(H=1);++k<H;)for(var be=_[k],Ne=La(be),Be=-1,He=Ne.length;++Be<He;){var yt=Ne[Be],_t=v[yt];(_t===n||Ll(_t,Np[yt])&&!Yr.call(v,yt))&&(v[yt]=be[yt])}return v}),doe=or(function(v){return v.push(n,CI),hs(u3,n,v)});function foe(v,_){return OL(v,Cn(_,3),bu)}function hoe(v,_){return OL(v,Cn(_,3),vE)}function poe(v,_){return v==null?v:mE(v,Cn(_,3),La)}function goe(v,_){return v==null?v:HL(v,Cn(_,3),La)}function moe(v,_){return v&&bu(v,Cn(_,3))}function voe(v,_){return v&&vE(v,Cn(_,3))}function yoe(v){return v==null?[]:C_(v,po(v))}function boe(v){return v==null?[]:C_(v,La(v))}function qE(v,_,k){var H=v==null?n:rh(v,_);return H===n?k:H}function _oe(v,_){return v!=null&&kI(v,_,zte)}function YE(v,_){return v!=null&&kI(v,_,Wte)}var Ooe=_I(function(v,_,k){_!=null&&typeof _.toString!="function"&&(_=f_.call(_)),v[_]=k},KE(Ia)),woe=_I(function(v,_,k){_!=null&&typeof _.toString!="function"&&(_=f_.call(_)),Yr.call(v,_)?v[_].push(k):v[_]=[k]},Cn),xoe=or(Cv);function po(v){return Da(v)?BL(v):OE(v)}function La(v){return Da(v)?BL(v,!0):ene(v)}function Soe(v,_){var k={};return _=Cn(_,3),bu(v,function(H,re,be){xc(k,_(H,re,be),H)}),k}function Coe(v,_){var k={};return _=Cn(_,3),bu(v,function(H,re,be){xc(k,re,_(H,re,be))}),k}var Eoe=Bp(function(v,_,k){E_(v,_,k)}),u3=Bp(function(v,_,k,H){E_(v,_,k,H)}),Toe=Cc(function(v,_){var k={};if(v==null)return k;var H=!1;_=wi(_,function(be){return be=Sd(be,v),H||(H=be.length>1),be}),_u(v,DE(v),k),H&&(k=Hs(k,d|f|h,One));for(var re=_.length;re--;)TE(k,_[re]);return k});function koe(v,_){return c3(v,j_(Cn(_)))}var Poe=Cc(function(v,_){return v==null?{}:nne(v,_)});function c3(v,_){if(v==null)return{};var k=wi(DE(v),function(H){return[H]});return _=Cn(_),tI(v,k,function(H,re){return _(H,re[0])})}function Aoe(v,_,k){_=Sd(_,v);var H=-1,re=_.length;for(re||(re=1,v=n);++H<re;){var be=v==null?n:v[Ou(_[H])];be===n&&(H=re,be=k),v=Tc(be)?be.call(v):be}return v}function Moe(v,_,k){return v==null?v:Tv(v,_,k)}function Roe(v,_,k,H){return H=typeof H=="function"?H:n,v==null?v:Tv(v,_,k,H)}var d3=xI(po),f3=xI(La);function $oe(v,_,k){var H=Hn(v),re=H||Ed(v)||jp(v);if(_=Cn(_,4),k==null){var be=v&&v.constructor;re?k=H?new be:[]:Ti(v)?k=Tc(be)?Ip(g_(v)):{}:k={}}return(re?Qs:bu)(v,function(Ne,Be,He){return _(k,Ne,Be,He)}),k}function Noe(v,_){return v==null?!0:TE(v,_)}function Doe(v,_,k){return v==null?v:aI(v,_,AE(k))}function Loe(v,_,k,H){return H=typeof H=="function"?H:n,v==null?v:aI(v,_,AE(k),H)}function Qp(v){return v==null?[]:lE(v,po(v))}function Ioe(v){return v==null?[]:lE(v,La(v))}function Boe(v,_,k){return k===n&&(k=_,_=n),k!==n&&(k=Zs(k),k=k===k?k:0),_!==n&&(_=Zs(_),_=_===_?_:0),nh(Zs(v),_,k)}function Foe(v,_,k){return _=kc(_),k===n?(k=_,_=0):k=kc(k),v=Zs(v),Hte(v,_,k)}function Voe(v,_,k){if(k&&typeof k!="boolean"&&ha(v,_,k)&&(_=k=n),k===n&&(typeof _=="boolean"?(k=_,_=n):typeof v=="boolean"&&(k=v,v=n)),v===n&&_===n?(v=0,_=1):(v=kc(v),_===n?(_=v,v=0):_=kc(_)),v>_){var H=v;v=_,_=H}if(k||v%1||_%1){var re=LL();return qo(v+re*(_-v+yee("1e-"+((re+"").length-1))),_)}return SE(v,_)}var joe=Fp(function(v,_,k){return _=_.toLowerCase(),v+(k?h3(_):_)});function h3(v){return GE(zr(v).toLowerCase())}function p3(v){return v=zr(v),v&&v.replace(ds,Mee).replace(lee,"")}function Qoe(v,_,k){v=zr(v),_=gs(_);var H=v.length;k=k===n?H:nh(er(k),0,H);var re=k;return k-=_.length,k>=0&&v.slice(k,re)==_}function zoe(v){return v=zr(v),v&&Yt.test(v)?v.replace(zn,Ree):v}function Woe(v){return v=zr(v),v&&Ji.test(v)?v.replace(Xi,"\\$&"):v}var Hoe=Fp(function(v,_,k){return v+(k?"-":"")+_.toLowerCase()}),Uoe=Fp(function(v,_,k){return v+(k?" ":"")+_.toLowerCase()}),Xoe=vI("toLowerCase");function Zoe(v,_,k){v=zr(v),_=er(_);var H=_?Rp(v):0;if(!_||H>=_)return v;var re=(_-H)/2;return R_(b_(re),k)+v+R_(y_(re),k)}function qoe(v,_,k){v=zr(v),_=er(_);var H=_?Rp(v):0;return _&&H<_?v+R_(_-H,k):v}function Yoe(v,_,k){v=zr(v),_=er(_);var H=_?Rp(v):0;return _&&H<_?R_(_-H,k)+v:v}function Goe(v,_,k){return k||_==null?_=0:_&&(_=+_),ite(zr(v).replace(si,""),_||0)}function Koe(v,_,k){return(k?ha(v,_,k):_===n)?_=1:_=er(_),CE(zr(v),_)}function Joe(){var v=arguments,_=zr(v[0]);return v.length<3?_:_.replace(v[1],v[2])}var eae=Fp(function(v,_,k){return v+(k?"_":"")+_.toLowerCase()});function tae(v,_,k){return k&&typeof k!="number"&&ha(v,_,k)&&(_=k=n),k=k===n?K:k>>>0,k?(v=zr(v),v&&(typeof _=="string"||_!=null&&!ZE(_))&&(_=gs(_),!_&&Mp(v))?Cd(Nl(v),0,k):v.split(_,k)):[]}var nae=Fp(function(v,_,k){return v+(k?" ":"")+GE(_)});function rae(v,_,k){return v=zr(v),k=k==null?0:nh(er(k),0,v.length),_=gs(_),v.slice(k,k+_.length)==_}function iae(v,_,k){var H=ge.templateSettings;k&&ha(v,_,k)&&(_=n),v=zr(v),_=W_({},_,H,SI);var re=W_({},_.imports,H.imports,SI),be=po(re),Ne=lE(re,be),Be,He,yt=0,_t=_.interpolate||tt,Ct="__p += '",Wt=cE((_.escape||tt).source+"|"+_t.source+"|"+(_t===bn?Nt:tt).source+"|"+(_.evaluate||tt).source+"|$","g"),hn="//# sourceURL="+(Yr.call(_,"sourceURL")?(_.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++hee+"]")+`
- `;v.replace(Wt,function(An,mr,Cr,vs,pa,ys){return Cr||(Cr=vs),Ct+=v.slice(yt,ys).replace(Dt,$ee),mr&&(Be=!0,Ct+=`' +
- __e(`+mr+`) +
- '`),pa&&(He=!0,Ct+=`';
- `+pa+`;
- __p += '`),Cr&&(Ct+=`' +
- ((__t = (`+Cr+`)) == null ? '' : __t) +
- '`),yt=ys+An.length,An}),Ct+=`';
- `;var Pn=Yr.call(_,"variable")&&_.variable;if(!Pn)Ct=`with (obj) {
- `+Ct+`
- }
- `;else if(ot.test(Pn))throw new Wn(s);Ct=(He?Ct.replace(Mt,""):Ct).replace(Zt,"$1").replace(Sn,"$1;"),Ct="function("+(Pn||"obj")+`) {
- `+(Pn?"":`obj || (obj = {});
- `)+"var __t, __p = ''"+(Be?", __e = _.escape":"")+(He?`, __j = Array.prototype.join;
- function print() { __p += __j.call(arguments, '') }
- `:`;
- `)+Ct+`return __p
- }`;var rr=m3(function(){return Fr(be,hn+"return "+Ct).apply(n,Ne)});if(rr.source=Ct,XE(rr))throw rr;return rr}function oae(v){return zr(v).toLowerCase()}function aae(v){return zr(v).toUpperCase()}function sae(v,_,k){if(v=zr(v),v&&(k||_===n))return CL(v);if(!v||!(_=gs(_)))return v;var H=Nl(v),re=Nl(_),be=EL(H,re),Ne=TL(H,re)+1;return Cd(H,be,Ne).join("")}function lae(v,_,k){if(v=zr(v),v&&(k||_===n))return v.slice(0,PL(v)+1);if(!v||!(_=gs(_)))return v;var H=Nl(v),re=TL(H,Nl(_))+1;return Cd(H,0,re).join("")}function uae(v,_,k){if(v=zr(v),v&&(k||_===n))return v.replace(si,"");if(!v||!(_=gs(_)))return v;var H=Nl(v),re=EL(H,Nl(_));return Cd(H,re).join("")}function cae(v,_){var k=A,H=D;if(Ti(_)){var re="separator"in _?_.separator:re;k="length"in _?er(_.length):k,H="omission"in _?gs(_.omission):H}v=zr(v);var be=v.length;if(Mp(v)){var Ne=Nl(v);be=Ne.length}if(k>=be)return v;var Be=k-Rp(H);if(Be<1)return H;var He=Ne?Cd(Ne,0,Be).join(""):v.slice(0,Be);if(re===n)return He+H;if(Ne&&(Be+=He.length-Be),ZE(re)){if(v.slice(Be).search(re)){var yt,_t=He;for(re.global||(re=cE(re.source,zr(Br.exec(re))+"g")),re.lastIndex=0;yt=re.exec(_t);)var Ct=yt.index;He=He.slice(0,Ct===n?Be:Ct)}}else if(v.indexOf(gs(re),Be)!=Be){var Wt=He.lastIndexOf(re);Wt>-1&&(He=He.slice(0,Wt))}return He+H}function dae(v){return v=zr(v),v&&Ln.test(v)?v.replace(kr,Vee):v}var fae=Fp(function(v,_,k){return v+(k?" ":"")+_.toUpperCase()}),GE=vI("toUpperCase");function g3(v,_,k){return v=zr(v),_=k?n:_,_===n?Dee(v)?zee(v):Eee(v):v.match(_)||[]}var m3=or(function(v,_){try{return hs(v,n,_)}catch(k){return XE(k)?k:new Wn(k)}}),hae=Cc(function(v,_){return Qs(_,function(k){k=Ou(k),xc(v,k,HE(v[k],v))}),v});function pae(v){var _=v==null?0:v.length,k=Cn();return v=_?wi(v,function(H){if(typeof H[1]!="function")throw new zs(a);return[k(H[0]),H[1]]}):[],or(function(H){for(var re=-1;++re<_;){var be=v[re];if(hs(be[0],this,H))return hs(be[1],this,H)}})}function gae(v){return Vte(Hs(v,d))}function KE(v){return function(){return v}}function mae(v,_){return v==null||v!==v?_:v}var vae=bI(),yae=bI(!0);function Ia(v){return v}function JE(v){return qL(typeof v=="function"?v:Hs(v,d))}function bae(v){return GL(Hs(v,d))}function _ae(v,_){return KL(v,Hs(_,d))}var Oae=or(function(v,_){return function(k){return Cv(k,v,_)}}),wae=or(function(v,_){return function(k){return Cv(v,k,_)}});function eT(v,_,k){var H=po(_),re=C_(_,H);k==null&&!(Ti(_)&&(re.length||!H.length))&&(k=_,_=v,v=this,re=C_(_,po(_)));var be=!(Ti(k)&&"chain"in k)||!!k.chain,Ne=Tc(v);return Qs(re,function(Be){var He=_[Be];v[Be]=He,Ne&&(v.prototype[Be]=function(){var yt=this.__chain__;if(be||yt){var _t=v(this.__wrapped__),Ct=_t.__actions__=Na(this.__actions__);return Ct.push({func:He,args:arguments,thisArg:v}),_t.__chain__=yt,_t}return He.apply(v,bd([this.value()],arguments))})}),v}function xae(){return ko._===this&&(ko._=qee),this}function tT(){}function Sae(v){return v=er(v),or(function(_){return JL(_,v)})}var Cae=RE(wi),Eae=RE(_L),Tae=RE(rE);function v3(v){return FE(v)?iE(Ou(v)):rne(v)}function kae(v){return function(_){return v==null?n:rh(v,_)}}var Pae=OI(),Aae=OI(!0);function nT(){return[]}function rT(){return!1}function Mae(){return{}}function Rae(){return""}function $ae(){return!0}function Nae(v,_){if(v=er(v),v<1||v>Q)return[];var k=K,H=qo(v,K);_=Cn(_),v-=K;for(var re=sE(H,_);++k<v;)_(k);return re}function Dae(v){return Hn(v)?wi(v,Ou):ms(v)?[v]:Na(II(zr(v)))}function Lae(v){var _=++Xee;return zr(v)+_}var Iae=M_(function(v,_){return v+_},0),Bae=$E("ceil"),Fae=M_(function(v,_){return v/_},1),Vae=$E("floor");function jae(v){return v&&v.length?S_(v,Ia,yE):n}function Qae(v,_){return v&&v.length?S_(v,Cn(_,2),yE):n}function zae(v){return xL(v,Ia)}function Wae(v,_){return xL(v,Cn(_,2))}function Hae(v){return v&&v.length?S_(v,Ia,wE):n}function Uae(v,_){return v&&v.length?S_(v,Cn(_,2),wE):n}var Xae=M_(function(v,_){return v*_},1),Zae=$E("round"),qae=M_(function(v,_){return v-_},0);function Yae(v){return v&&v.length?aE(v,Ia):0}function Gae(v,_){return v&&v.length?aE(v,Cn(_,2)):0}return ge.after=bie,ge.ary=ZI,ge.assign=aoe,ge.assignIn=l3,ge.assignInWith=W_,ge.assignWith=soe,ge.at=loe,ge.before=qI,ge.bind=HE,ge.bindAll=hae,ge.bindKey=YI,ge.castArray=Mie,ge.chain=HI,ge.chunk=Vne,ge.compact=jne,ge.concat=Qne,ge.cond=pae,ge.conforms=gae,ge.constant=KE,ge.countBy=Yre,ge.create=uoe,ge.curry=GI,ge.curryRight=KI,ge.debounce=JI,ge.defaults=coe,ge.defaultsDeep=doe,ge.defer=_ie,ge.delay=Oie,ge.difference=zne,ge.differenceBy=Wne,ge.differenceWith=Hne,ge.drop=Une,ge.dropRight=Xne,ge.dropRightWhile=Zne,ge.dropWhile=qne,ge.fill=Yne,ge.filter=Kre,ge.flatMap=tie,ge.flatMapDeep=nie,ge.flatMapDepth=rie,ge.flatten=jI,ge.flattenDeep=Gne,ge.flattenDepth=Kne,ge.flip=wie,ge.flow=vae,ge.flowRight=yae,ge.fromPairs=Jne,ge.functions=yoe,ge.functionsIn=boe,ge.groupBy=iie,ge.initial=tre,ge.intersection=nre,ge.intersectionBy=rre,ge.intersectionWith=ire,ge.invert=Ooe,ge.invertBy=woe,ge.invokeMap=aie,ge.iteratee=JE,ge.keyBy=sie,ge.keys=po,ge.keysIn=La,ge.map=B_,ge.mapKeys=Soe,ge.mapValues=Coe,ge.matches=bae,ge.matchesProperty=_ae,ge.memoize=V_,ge.merge=Eoe,ge.mergeWith=u3,ge.method=Oae,ge.methodOf=wae,ge.mixin=eT,ge.negate=j_,ge.nthArg=Sae,ge.omit=Toe,ge.omitBy=koe,ge.once=xie,ge.orderBy=lie,ge.over=Cae,ge.overArgs=Sie,ge.overEvery=Eae,ge.overSome=Tae,ge.partial=UE,ge.partialRight=e3,ge.partition=uie,ge.pick=Poe,ge.pickBy=c3,ge.property=v3,ge.propertyOf=kae,ge.pull=lre,ge.pullAll=zI,ge.pullAllBy=ure,ge.pullAllWith=cre,ge.pullAt=dre,ge.range=Pae,ge.rangeRight=Aae,ge.rearg=Cie,ge.reject=fie,ge.remove=fre,ge.rest=Eie,ge.reverse=zE,ge.sampleSize=pie,ge.set=Moe,ge.setWith=Roe,ge.shuffle=gie,ge.slice=hre,ge.sortBy=yie,ge.sortedUniq=_re,ge.sortedUniqBy=Ore,ge.split=tae,ge.spread=Tie,ge.tail=wre,ge.take=xre,ge.takeRight=Sre,ge.takeRightWhile=Cre,ge.takeWhile=Ere,ge.tap=jre,ge.throttle=kie,ge.thru=I_,ge.toArray=o3,ge.toPairs=d3,ge.toPairsIn=f3,ge.toPath=Dae,ge.toPlainObject=s3,ge.transform=$oe,ge.unary=Pie,ge.union=Tre,ge.unionBy=kre,ge.unionWith=Pre,ge.uniq=Are,ge.uniqBy=Mre,ge.uniqWith=Rre,ge.unset=Noe,ge.unzip=WE,ge.unzipWith=WI,ge.update=Doe,ge.updateWith=Loe,ge.values=Qp,ge.valuesIn=Ioe,ge.without=$re,ge.words=g3,ge.wrap=Aie,ge.xor=Nre,ge.xorBy=Dre,ge.xorWith=Lre,ge.zip=Ire,ge.zipObject=Bre,ge.zipObjectDeep=Fre,ge.zipWith=Vre,ge.entries=d3,ge.entriesIn=f3,ge.extend=l3,ge.extendWith=W_,eT(ge,ge),ge.add=Iae,ge.attempt=m3,ge.camelCase=joe,ge.capitalize=h3,ge.ceil=Bae,ge.clamp=Boe,ge.clone=Rie,ge.cloneDeep=Nie,ge.cloneDeepWith=Die,ge.cloneWith=$ie,ge.conformsTo=Lie,ge.deburr=p3,ge.defaultTo=mae,ge.divide=Fae,ge.endsWith=Qoe,ge.eq=Ll,ge.escape=zoe,ge.escapeRegExp=Woe,ge.every=Gre,ge.find=Jre,ge.findIndex=FI,ge.findKey=foe,ge.findLast=eie,ge.findLastIndex=VI,ge.findLastKey=hoe,ge.floor=Vae,ge.forEach=UI,ge.forEachRight=XI,ge.forIn=poe,ge.forInRight=goe,ge.forOwn=moe,ge.forOwnRight=voe,ge.get=qE,ge.gt=Iie,ge.gte=Bie,ge.has=_oe,ge.hasIn=YE,ge.head=QI,ge.identity=Ia,ge.includes=oie,ge.indexOf=ere,ge.inRange=Foe,ge.invoke=xoe,ge.isArguments=ah,ge.isArray=Hn,ge.isArrayBuffer=Fie,ge.isArrayLike=Da,ge.isArrayLikeObject=Li,ge.isBoolean=Vie,ge.isBuffer=Ed,ge.isDate=jie,ge.isElement=Qie,ge.isEmpty=zie,ge.isEqual=Wie,ge.isEqualWith=Hie,ge.isError=XE,ge.isFinite=Uie,ge.isFunction=Tc,ge.isInteger=t3,ge.isLength=Q_,ge.isMap=n3,ge.isMatch=Xie,ge.isMatchWith=Zie,ge.isNaN=qie,ge.isNative=Yie,ge.isNil=Kie,ge.isNull=Gie,ge.isNumber=r3,ge.isObject=Ti,ge.isObjectLike=Pi,ge.isPlainObject=Mv,ge.isRegExp=ZE,ge.isSafeInteger=Jie,ge.isSet=i3,ge.isString=z_,ge.isSymbol=ms,ge.isTypedArray=jp,ge.isUndefined=eoe,ge.isWeakMap=toe,ge.isWeakSet=noe,ge.join=ore,ge.kebabCase=Hoe,ge.last=Xs,ge.lastIndexOf=are,ge.lowerCase=Uoe,ge.lowerFirst=Xoe,ge.lt=roe,ge.lte=ioe,ge.max=jae,ge.maxBy=Qae,ge.mean=zae,ge.meanBy=Wae,ge.min=Hae,ge.minBy=Uae,ge.stubArray=nT,ge.stubFalse=rT,ge.stubObject=Mae,ge.stubString=Rae,ge.stubTrue=$ae,ge.multiply=Xae,ge.nth=sre,ge.noConflict=xae,ge.noop=tT,ge.now=F_,ge.pad=Zoe,ge.padEnd=qoe,ge.padStart=Yoe,ge.parseInt=Goe,ge.random=Voe,ge.reduce=cie,ge.reduceRight=die,ge.repeat=Koe,ge.replace=Joe,ge.result=Aoe,ge.round=Zae,ge.runInContext=ze,ge.sample=hie,ge.size=mie,ge.snakeCase=eae,ge.some=vie,ge.sortedIndex=pre,ge.sortedIndexBy=gre,ge.sortedIndexOf=mre,ge.sortedLastIndex=vre,ge.sortedLastIndexBy=yre,ge.sortedLastIndexOf=bre,ge.startCase=nae,ge.startsWith=rae,ge.subtract=qae,ge.sum=Yae,ge.sumBy=Gae,ge.template=iae,ge.times=Nae,ge.toFinite=kc,ge.toInteger=er,ge.toLength=a3,ge.toLower=oae,ge.toNumber=Zs,ge.toSafeInteger=ooe,ge.toString=zr,ge.toUpper=aae,ge.trim=sae,ge.trimEnd=lae,ge.trimStart=uae,ge.truncate=cae,ge.unescape=dae,ge.uniqueId=Lae,ge.upperCase=fae,ge.upperFirst=GE,ge.each=UI,ge.eachRight=XI,ge.first=QI,eT(ge,function(){var v={};return bu(ge,function(_,k){Yr.call(ge.prototype,k)||(v[k]=_)}),v}(),{chain:!1}),ge.VERSION=r,Qs(["bind","bindKey","curry","curryRight","partial","partialRight"],function(v){ge[v].placeholder=ge}),Qs(["drop","take"],function(v,_){Or.prototype[v]=function(k){k=k===n?1:no(er(k),0);var H=this.__filtered__&&!_?new Or(this):this.clone();return H.__filtered__?H.__takeCount__=qo(k,H.__takeCount__):H.__views__.push({size:qo(k,K),type:v+(H.__dir__<0?"Right":"")}),H},Or.prototype[v+"Right"]=function(k){return this.reverse()[v](k).reverse()}}),Qs(["filter","map","takeWhile"],function(v,_){var k=_+1,H=k==z||k==L;Or.prototype[v]=function(re){var be=this.clone();return be.__iteratees__.push({iteratee:Cn(re,3),type:k}),be.__filtered__=be.__filtered__||H,be}}),Qs(["head","last"],function(v,_){var k="take"+(_?"Right":"");Or.prototype[v]=function(){return this[k](1).value()[0]}}),Qs(["initial","tail"],function(v,_){var k="drop"+(_?"":"Right");Or.prototype[v]=function(){return this.__filtered__?new Or(this):this[k](1)}}),Or.prototype.compact=function(){return this.filter(Ia)},Or.prototype.find=function(v){return this.filter(v).head()},Or.prototype.findLast=function(v){return this.reverse().find(v)},Or.prototype.invokeMap=or(function(v,_){return typeof v=="function"?new Or(this):this.map(function(k){return Cv(k,v,_)})}),Or.prototype.reject=function(v){return this.filter(j_(Cn(v)))},Or.prototype.slice=function(v,_){v=er(v);var k=this;return k.__filtered__&&(v>0||_<0)?new Or(k):(v<0?k=k.takeRight(-v):v&&(k=k.drop(v)),_!==n&&(_=er(_),k=_<0?k.dropRight(-_):k.take(_-v)),k)},Or.prototype.takeRightWhile=function(v){return this.reverse().takeWhile(v).reverse()},Or.prototype.toArray=function(){return this.take(K)},bu(Or.prototype,function(v,_){var k=/^(?:filter|find|map|reject)|While$/.test(_),H=/^(?:head|last)$/.test(_),re=ge[H?"take"+(_=="last"?"Right":""):_],be=H||/^find/.test(_);!re||(ge.prototype[_]=function(){var Ne=this.__wrapped__,Be=H?[1]:arguments,He=Ne instanceof Or,yt=Be[0],_t=He||Hn(Ne),Ct=function(mr){var Cr=re.apply(ge,bd([mr],Be));return H&&Wt?Cr[0]:Cr};_t&&k&&typeof yt=="function"&&yt.length!=1&&(He=_t=!1);var Wt=this.__chain__,hn=!!this.__actions__.length,Pn=be&&!Wt,rr=He&&!hn;if(!be&&_t){Ne=rr?Ne:new Or(this);var An=v.apply(Ne,Be);return An.__actions__.push({func:I_,args:[Ct],thisArg:n}),new Ws(An,Wt)}return Pn&&rr?v.apply(this,Be):(An=this.thru(Ct),Pn?H?An.value()[0]:An.value():An)})}),Qs(["pop","push","shift","sort","splice","unshift"],function(v){var _=u_[v],k=/^(?:push|sort|unshift)$/.test(v)?"tap":"thru",H=/^(?:pop|shift)$/.test(v);ge.prototype[v]=function(){var re=arguments;if(H&&!this.__chain__){var be=this.value();return _.apply(Hn(be)?be:[],re)}return this[k](function(Ne){return _.apply(Hn(Ne)?Ne:[],re)})}}),bu(Or.prototype,function(v,_){var k=ge[_];if(k){var H=k.name+"";Yr.call(Lp,H)||(Lp[H]=[]),Lp[H].push({name:_,func:k})}}),Lp[A_(n,b).name]=[{name:"wrapper",func:n}],Or.prototype.clone=dte,Or.prototype.reverse=fte,Or.prototype.value=hte,ge.prototype.at=Qre,ge.prototype.chain=zre,ge.prototype.commit=Wre,ge.prototype.next=Hre,ge.prototype.plant=Xre,ge.prototype.reverse=Zre,ge.prototype.toJSON=ge.prototype.valueOf=ge.prototype.value=qre,ge.prototype.first=ge.prototype.head,yv&&(ge.prototype[yv]=Ure),ge},$p=Wee();Kf?((Kf.exports=$p)._=$p,JC._=$p):ko._=$p}).call(Ai)})(SA,SA.exports);var fZe=SA.exports;const hZe={style:{display:"flex","align-items":"center"}},pZe={__name:"FlowTable",props:["lf","root"],emits:["new","close","open","operate"],setup(t,{emit:e}){const{lf:n,root:r}=t,i=F(""),o=F(""),a=F([]),s=F(!1),l=F({}),u=F({page:1,size:20,total:0}),c=T=>{u.value.size=T,u.value.page=1,f()},d=T=>{u.value.page=T,f()},f=()=>{let T=n.getEditorSetting().url+n.getEditorSetting().chainsApi;T=T+`?&root=${r}&keywords=${i.value}&disabled=${o.value}&size=${u.value.size}&page=${u.value.page}`,fetch(T).then(P=>P.json()).then(P=>{a.value=(P==null?void 0:P.items)||[],u.value.total=P.total||20}).catch(P=>{jr.error(P.message)})},h=fZe.debounce(()=>{f()},300),g=()=>{f()};Ft(()=>{f()});const m=(T,P)=>{var A,D;return((D=(A=T.ruleChain)==null?void 0:A.additionalInfo)==null?void 0:D.updateTime)||""},y=T=>{var A,D;let P=(A=T==null?void 0:T.metadata)==null?void 0:A.endpoints;if(P&&P.length>0){let $=P[0].type||"";return((D=n.nodeComponents()[$])==null?void 0:D.icon)||"/images/endpoint/endpoints.svg"}return"/images/endpoint/endpoints.svg"},b=T=>{var A,D;let P=(A=T==null?void 0:T.metadata)==null?void 0:A.endpoints;if(P&&P.length>0){let $=P[0].type||"";return((D=n.nodeComponents()[$])==null?void 0:D.label)||$}return""},w=()=>{let T={id:Ex(12),name:(r?"\u6D41\u7A0B":"\u5B50\u6D41\u7A0B")+u.value.total||1,root:r,additionalInfo:{description:""}};l.value.updateDefault(T),s.value=!0},O=T=>{s.value=!1,e("new",T)},x=()=>{s.value=!1},S=T=>{e("open",T)},C=T=>{Nw.confirm(`\u786E\u5B9A${T.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"} ${T.name} \u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{let P=n.getEditorSetting().url+n.getEditorSetting().chainsApi;fetch(P+`/${T.id}/operate/${T.disabled?"start":"stop"}`,{method:"POST"}).then(A=>A.ok?A.text():A.text().then(D=>{throw new Error(`${D}`)})).then(A=>{jr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("operate",T.id,T.disabled?"start":"stop"),f()}).catch(A=>{jr.error(`${T.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"}\u5931\u8D25: ${A.message}`)})})},E=T=>{Nw.confirm(`\u786E\u5B9A\u5220\u9664 ${T.ruleChain.name} \u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{let P=n.getEditorSetting().url+n.getEditorSetting().chainsApi;fetch(P+"/"+T.ruleChain.id,{method:"DELETE"}).then(A=>{A.ok?(jr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("operate","delete"),f()):jr.error(`\u5220\u9664\u5931\u8D25: ${A.statusText}`)}).catch(A=>{jr.error(`\u5220\u9664\u5931\u8D25: ${A.message}`)})})};return(T,P)=>{const A=lr,D=co,$=Jc,N=wl,z=hi,I=fo,L=$b,X=iU,Q=Hi,W=ns,G=Rb,K=nC;return R(),Y(dt,null,[B(p(pH),{locale:p(tZ)},{default:j(()=>[B(I,null,{default:j(()=>[B(D,{span:4},{default:j(()=>[B(A,{type:"primary",onClick:w},{default:j(()=>[Ue(Ve(t.root?"\u65B0\u5EFA\u6D41\u7A0B":"\u65B0\u5EFA\u5B50\u6D41\u7A0B"),1)]),_:1})]),_:1}),B(D,{span:8,offset:12,style:{display:"flex","justify-content":"space-between"}},{default:j(()=>[B(N,{modelValue:o.value,"onUpdate:modelValue":P[0]||(P[0]=oe=>o.value=oe),clearable:"",placeholder:"\u72B6\u6001",style:{width:"50%"},onChange:g},{default:j(()=>[B($,{label:"\u505C\u7528\u4E2D",value:"true"}),B($,{label:"\u8FD0\u884C\u4E2D",value:"false"})]),_:1},8,["modelValue"]),B(z,{"prefix-icon":p(d$),modelValue:i.value,"onUpdate:modelValue":P[1]||(P[1]=oe=>i.value=oe),placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57",onInput:p(h)},null,8,["prefix-icon","modelValue","onInput"])]),_:1})]),_:1}),B(G,{data:a.value,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"20px"}},{default:j(()=>[B(L,{prop:"ruleChain.id",label:"ID"}),B(L,{prop:"ruleChain.name",label:"\u540D\u79F0"},{default:j(oe=>[J("div",hZe,[Ue(Ve(oe.row.ruleChain.name)+" ",1),t.root&&b(oe.row)?(R(),xe(Q,{key:0,class:"box-item",effect:"dark",content:`\u89E6\u53D1\u5668:${b(oe.row)||"\u624B\u52A8\u89E6\u53D1"}`,placement:"bottom-start"},{default:j(()=>[t.root?(R(),xe(X,{key:0,style:{"margin-left":"8px",width:"20px",height:"20px"},src:y(oe.row),fit:"cover"},null,8,["src"])):Se("",!0)]),_:2},1032,["content"])):Se("",!0)])]),_:1}),B(L,{prop:"ruleChain.disabled",label:"\u72B6\u6001"},{default:j(oe=>{var ne,_e,Ce,U;return[B(W,{type:oe.row.ruleChain.disabled?"info":"success"},{default:j(()=>[Ue(Ve(oe.row.ruleChain.disabled?"\u505C\u7528\u4E2D":"\u8FD0\u884C\u4E2D"),1)]),_:2},1032,["type"]),(_e=(ne=oe.row.ruleChain)==null?void 0:ne.additionalInfo)!=null&&_e.message?(R(),xe(Q,{key:0,class:"box-item",effect:"dark",content:(U=(Ce=oe.row.ruleChain)==null?void 0:Ce.additionalInfo)==null?void 0:U.message,placement:"bottom-start"},{default:j(()=>[B(A,{type:"text",size:"small"},{default:j(()=>[Ue("\u67E5\u770B\u4FE1\u606F")]),_:1})]),_:2},1032,["content"])):Se("",!0)]}),_:1}),B(L,{formatter:m,label:"\u66F4\u65B0\u65F6\u95F4"}),B(L,{fixed:"right",label:"\u64CD\u4F5C","min-width":"120"},{default:j(oe=>[B(A,{link:"",icon:p(nW),type:"primary",size:"small",onClick:ne=>S(oe.row)},{default:j(()=>[Ue(" \u8BBE\u8BA1 ")]),_:2},1032,["icon","onClick"]),B(A,{link:"",icon:oe.row.ruleChain.disabled?p(fEe):p(JCe),type:oe.row.ruleChain.disabled?"success":"danger",size:"small",onClick:ne=>C(oe.row.ruleChain)},{default:j(()=>[Ue(Ve(oe.row.ruleChain.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"),1)]),_:2},1032,["icon","type","onClick"]),B(A,{link:"",icon:p(u$),type:"danger",size:"small",onClick:ne=>E(oe.row)},{default:j(()=>[Ue("\u5220\u9664")]),_:2},1032,["icon","onClick"])]),_:1})]),_:1},8,["data"]),B(K,{currentPage:u.value.page,"onUpdate:currentPage":P[2]||(P[2]=oe=>u.value.page=oe),style:{"margin-top":"10px"},class:"float-right","page-size":u.value.size,total:u.value.total,"page-sizes":[20,50,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:c,onCurrentChange:d},null,8,["currentPage","page-size","total"])]),_:1},8,["locale"]),B(Qq,{ref_key:"newFlowDialogRef",ref:l,lf:t.lf,show:s.value,onSubmit:O,onClose:x},null,8,["lf","show"])],64)}}};var DF=Ml(pZe,[["__scopeId","data-v-1f5efb6c"]]);const gZe={__name:"NewOrOpenFlowDialog",props:["show","lf"],emits:["new","open","close"],setup(t,{emit:e}){const n=F("flows");F(!1);const r=s=>{e("new",s)},i=s=>{e("open",s)},o=(s,l)=>{e("operate",s,l)},a=()=>{e("close")};return(s,l)=>{const u=co,c=fo,d=Sp,f=xp,h=Ma;return R(),xe(h,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px","before-close":a,modelValue:t.show},{header:j(()=>[B(c,null,{default:j(()=>[B(u,{span:12},{default:j(()=>[Ue("\u65B0\u5EFA/\u6253\u5F00\u89C4\u5219\u94FE")]),_:1})]),_:1})]),default:j(()=>[B(f,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=g=>n.value=g)},{default:j(()=>[B(d,{label:"\u6D41\u7A0B\u5217\u8868",name:"flows"},{default:j(()=>[B(DF,{lf:t.lf,root:!0,onNew:r,onOpen:i,onClose:a,onOperate:o},null,8,["lf"])]),_:1}),B(d,{label:"\u5B50\u6D41\u7A0B\u5217\u8868",name:"subFlows"},{default:j(()=>[B(DF,{lf:t.lf,root:!1,onNew:r,onOpen:i,onClose:a,onOperate:o},null,8,["lf"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}};var zq={exports:{}};(function(t,e){(function(n,r){r()})(Ai,function(){function n(u,c){return typeof c=="undefined"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,c,d){var f=new XMLHttpRequest;f.open("GET",u),f.responseType="blob",f.onload=function(){l(f.response,c,d)},f.onerror=function(){console.error("could not download file")},f.send()}function i(u){var c=new XMLHttpRequest;c.open("HEAD",u,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function o(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(c)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ai=="object"&&Ai.global===Ai?Ai:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(u,c,d){var f=a.URL||a.webkitURL,h=document.createElement("a");c=c||u.name||"download",h.download=c,h.rel="noopener",typeof u=="string"?(h.href=u,h.origin===location.origin?o(h):i(h.href)?r(u,c,d):o(h,h.target="_blank")):(h.href=f.createObjectURL(u),setTimeout(function(){f.revokeObjectURL(h.href)},4e4),setTimeout(function(){o(h)},0))}:"msSaveOrOpenBlob"in navigator?function(u,c,d){if(c=c||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,d),c);else if(i(u))r(u,c,d);else{var f=document.createElement("a");f.href=u,f.target="_blank",setTimeout(function(){o(f)})}}:function(u,c,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof u=="string")return r(u,c,d);var h=u.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,m=/CriOS\/[\d]+/.test(navigator.userAgent);if((m||h&&g||s)&&typeof FileReader!="undefined"){var y=new FileReader;y.onloadend=function(){var O=y.result;O=m?O:O.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=O:location=O,f=null},y.readAsDataURL(u)}else{var b=a.URL||a.webkitURL,w=b.createObjectURL(u);f?f.location=w:location.href=w,f=null,setTimeout(function(){b.revokeObjectURL(w)},4e4)}});a.saveAs=l.saveAs=l,t.exports=l})})(zq);let CA=[],Wq=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?Wq:CA).push(n=n+t[e])})();function mZe(t){if(t<768)return!1;for(let e=0,n=CA.length;;){let r=e+n>>1;if(t<CA[r])n=r;else if(t>=Wq[r])e=r+1;else return!0;if(e==n)return!1}}function LF(t){return t>=127462&&t<=127487}const IF=8205;function vZe(t,e,n=!0,r=!0){return(n?Hq:yZe)(t,e,r)}function Hq(t,e,n){if(e==t.length)return e;e&&Uq(t.charCodeAt(e))&&Xq(t.charCodeAt(e-1))&&e--;let r=f2(t,e);for(e+=BF(r);e<t.length;){let i=f2(t,e);if(r==IF||i==IF||n&&mZe(i))e+=BF(i),r=i;else if(LF(i)){let o=0,a=e-2;for(;a>=0&&LF(f2(t,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function yZe(t,e,n){for(;e>0;){let r=Hq(t,e-2,n);if(r<e)return r;e--}return 0}function f2(t,e){let n=t.charCodeAt(e);if(!Xq(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Uq(r)?(n-55296<<10)+(r-56320)+65536:n}function Uq(t){return t>=56320&&t<57344}function Xq(t){return t>=55296&&t<56320}function BF(t){return t<65536?1:2}class Rr{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=wm(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Iu.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=wm(this,e,n);let r=[];return this.decompose(e,n,r,0),Iu.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Uy(this),o=new Uy(e);for(let a=n,s=n;;){if(i.next(a),o.next(a),a=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(s+=i.value.length,i.done||s>=r)return!0}}iter(e=1){return new Uy(this,e)}iterRange(e,n=this.length){return new Zq(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new qq(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Rr.empty:e.length<=32?new Fi(e):Iu.from(Fi.split(e,[]))}}class Fi extends Rr{constructor(e,n=bZe(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.text[o],s=i+a.length;if((n?r:s)>=e)return new _Ze(i,s,r,a);i=s+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Fi(FF(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let a=r.pop(),s=z1(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new Fi(s,a.length+o.length));else{let l=s.length>>1;r.push(new Fi(s.slice(0,l)),new Fi(s.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Fi))return super.replace(e,n,r);[e,n]=wm(this,e,n);let i=z1(this.text,z1(r.text,FF(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Fi(i,o):Iu.from(Fi.split(i,[]),o)}sliceString(e,n=this.length,r=`
- `){[e,n]=wm(this,e,n);let i="";for(let o=0,a=0;o<=n&&a<this.text.length;a++){let s=this.text[a],l=o+s.length;o>e&&a&&(i+=r),e<l&&n>o&&(i+=s.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new Fi(r,i)),r=[],i=-1);return i>-1&&n.push(new Fi(r,i)),n}}class Iu extends Rr{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.children[o],s=i+a.length,l=r+a.lines-1;if((n?l:s)>=e)return a.lineInner(e,n,r,i);i=s+1,r=l+1}}decompose(e,n,r,i){for(let o=0,a=0;a<=n&&o<this.children.length;o++){let s=this.children[o],l=a+s.length;if(e<=l&&n>=a){let u=i&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!u?r.push(s):s.decompose(e-a,n-a,r,u)}a=l+1}}replace(e,n,r){if([e,n]=wm(this,e,n),r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let a=this.children[i],s=o+a.length;if(e>=o&&n<=s){let l=a.replace(e-o,n-o,r),u=this.lines-a.lines+l.lines;if(l.lines<u>>5-1&&l.lines>u>>5+1){let c=this.children.slice();return c[i]=l,new Iu(c,this.length-(n-e)+r.length)}return super.replace(o,s,l)}o=s+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
- `){[e,n]=wm(this,e,n);let i="";for(let o=0,a=0;o<this.children.length&&a<=n;o++){let s=this.children[o],l=a+s.length;a>e&&o&&(i+=r),e<l&&n>a&&(i+=s.sliceString(e-a,n-a,r)),a=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Iu))return 0;let r=0,[i,o,a,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==a||o==s)return r;let l=this.children[i],u=e.children[o];if(l!=u)return r+l.scanIdentical(u,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let g of e)g.flatten(h);return new Fi(h,n)}let i=Math.max(32,r>>5),o=i<<1,a=i>>1,s=[],l=0,u=-1,c=[];function d(h){let g;if(h.lines>o&&h instanceof Iu)for(let m of h.children)d(m);else h.lines>a&&(l>a||!l)?(f(),s.push(h)):h instanceof Fi&&l&&(g=c[c.length-1])instanceof Fi&&h.lines+g.lines<=32?(l+=h.lines,u+=h.length+1,c[c.length-1]=new Fi(g.text.concat(h.text),g.length+1+h.length)):(l+h.lines>i&&f(),l+=h.lines,u+=h.length+1,c.push(h))}function f(){l!=0&&(s.push(c.length==1?c[0]:Iu.from(c,u)),u=-1,l=c.length=0)}for(let h of e)d(h);return f(),s.length==1?s[0]:new Iu(s,n)}}Rr.empty=new Fi([""],0);function bZe(t){let e=-1;for(let n of t)e+=n.length+1;return e}function z1(t,e,n=0,r=1e9){for(let i=0,o=0,a=!0;o<t.length&&i<=r;o++){let s=t[o],l=i+s.length;l>=n&&(l>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),a?(e[e.length-1]+=s,a=!1):e.push(s)),i=l+1}return e}function FF(t,e,n){return z1(t,[""],e,n)}class Uy{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Fi?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],a=o>>1,s=i instanceof Fi?i.text.length:i.children.length;if(a==(n>0?s:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
- `,this;e--}else if(i instanceof Fi){let l=i.text[a+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Fi?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Zq{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Uy(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class qq{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol!="undefined"&&(Rr.prototype[Symbol.iterator]=function(){return this.iter()},Uy.prototype[Symbol.iterator]=Zq.prototype[Symbol.iterator]=qq.prototype[Symbol.iterator]=function(){return this});class _Ze{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function wm(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Io(t,e,n=!0,r=!0){return vZe(t,e,n,r)}function OZe(t){return t>=56320&&t<57344}function wZe(t){return t>=55296&&t<56320}function Qa(t,e){let n=t.charCodeAt(e);if(!wZe(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return OZe(r)?(n-55296<<10)+(r-56320)+65536:n}function eD(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Bu(t){return t<65536?1:2}const EA=/\r\n?|\n/;var Do=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Do||(Do={}));class Yu{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],a=this.sections[n++];a<0?(e(r,i,o),i+=o):i+=a,r+=o}}iterChangedRanges(e,n=!1){TA(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Yu(e)}composeDesc(e){return this.empty?e:e.empty?this:Yq(this,e)}mapDesc(e,n=!1){return e.empty?this:kA(this,e,n)}mapPos(e,n=-1,r=Do.Simple){let i=0,o=0;for(let a=0;a<this.sections.length;){let s=this.sections[a++],l=this.sections[a++],u=i+s;if(l<0){if(u>e)return o+(e-i);o+=s}else{if(r!=Do.Simple&&u>=e&&(r==Do.TrackDel&&i<e&&u>e||r==Do.TrackBefore&&i<e||r==Do.TrackAfter&&u>e))return null;if(u>e||u==e&&n<0&&!s)return e==i||n<0?o:o+l;o+=l}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],a=this.sections[r++],s=i+o;if(a>=0&&i<=n&&s>=e)return i<e&&s>n?"cover":!0;i=s}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Yu(e)}static create(e){return new Yu(e)}}class oo extends Yu{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return TA(this,(n,r,i,o,a)=>e=e.replace(i,i+(r-n),a),!1),e}mapDesc(e,n=!1){return kA(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let a=n[i],s=n[i+1];if(s>=0){n[i]=s,n[i+1]=a;let l=i>>1;for(;r.length<l;)r.push(Rr.empty);r.push(a?e.slice(o,o+a):Rr.empty)}o+=a}return new oo(n,r)}compose(e){return this.empty?e:e.empty?this:Yq(this,e,!0)}map(e,n=!1){return e.empty?this:kA(this,e,n,!0)}iterChanges(e,n=!1){TA(this,e,n)}get desc(){return Yu.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new W0(this);e:for(let a=0,s=0;;){let l=a==e.length?1e9:e[a++];for(;s<l||s==l&&o.len==0;){if(o.done)break e;let c=Math.min(o.len,l-s);ea(i,c,-1);let d=o.ins==-1?-1:o.off==0?o.ins:0;ea(n,c,d),d>0&&Gd(r,n,o.text),o.forward(c),s+=c}let u=e[a++];for(;s<u;){if(o.done)break e;let c=Math.min(o.len,u-s);ea(n,c,-1),ea(i,c,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(c),s+=c}}return{changes:new oo(n,r),filtered:Yu.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],a=0,s=null;function l(c=!1){if(!c&&!i.length)return;a<n&&ea(i,n-a,-1);let d=new oo(i,o);s=s?s.compose(d.map(s)):d,i=[],o=[],a=0}function u(c){if(Array.isArray(c))for(let d of c)u(d);else if(c instanceof oo){if(c.length!=n)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);l(),s=s?s.compose(c.map(s)):c}else{let{from:d,to:f=d,insert:h}=c;if(d>f||d<0||f>n)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${n})`);let g=h?typeof h=="string"?Rr.of(h.split(r||EA)):h:Rr.empty,m=g.length;if(d==f&&m==0)return;d<a&&l(),d>a&&ea(i,d-a,-1),ea(i,f-d,m),Gd(o,i,g),a=f}}return u(e),l(!s),s}static empty(e){return new oo(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((a,s)=>s&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(Rr.empty);r[i]=Rr.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new oo(n,r)}static createSet(e,n){return new oo(e,n)}}function ea(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Gd(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Rr.empty);t.push(n)}}function TA(t,e,n){let r=t.inserted;for(let i=0,o=0,a=0;a<t.sections.length;){let s=t.sections[a++],l=t.sections[a++];if(l<0)i+=s,o+=s;else{let u=i,c=o,d=Rr.empty;for(;u+=s,c+=l,l&&r&&(d=d.append(r[a-2>>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,u,o,c,d),i=u,o=c}}}function kA(t,e,n,r=!1){let i=[],o=r?[]:null,a=new W0(t),s=new W0(e);for(let l=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&s.ins==-1){let u=Math.min(a.len,s.len);ea(i,u,-1),a.forward(u),s.forward(u)}else if(s.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(s.len<a.len||s.len==a.len&&!n))){let u=s.len;for(ea(i,s.ins,-1);u;){let c=Math.min(a.len,u);a.ins>=0&&l<a.i&&a.len<=c&&(ea(i,0,a.ins),o&&Gd(o,i,a.text),l=a.i),a.forward(c),u-=c}s.next()}else if(a.ins>=0){let u=0,c=a.len;for(;c;)if(s.ins==-1){let d=Math.min(c,s.len);u+=d,c-=d,s.forward(d)}else if(s.ins==0&&s.len<c)c-=s.len,s.next();else break;ea(i,u,l<a.i?a.ins:0),o&&l<a.i&&Gd(o,i,a.text),l=a.i,a.forward(a.len-c)}else{if(a.done&&s.done)return o?oo.createSet(i,o):Yu.create(i);throw new Error("Mismatched change set lengths")}}}function Yq(t,e,n=!1){let r=[],i=n?[]:null,o=new W0(t),a=new W0(e);for(let s=!1;;){if(o.done&&a.done)return i?oo.createSet(r,i):Yu.create(r);if(o.ins==0)ea(r,o.len,0,s),o.next();else if(a.len==0&&!a.done)ea(r,0,a.ins,s),i&&Gd(i,r,a.text),a.next();else{if(o.done||a.done)throw new Error("Mismatched change set lengths");{let l=Math.min(o.len2,a.len),u=r.length;if(o.ins==-1){let c=a.ins==-1?-1:a.off?0:a.ins;ea(r,l,c,s),i&&c&&Gd(i,r,a.text)}else a.ins==-1?(ea(r,o.off?0:o.len,l,s),i&&Gd(i,r,o.textBit(l))):(ea(r,o.off?0:o.len,a.off?0:a.ins,s),i&&!a.off&&Gd(i,r,a.text));s=(o.ins>l||a.ins>=0&&a.len>l)&&(s||r.length>u),o.forward2(l),a.forward(l)}}}}class W0{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Rr.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Rr.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Bh{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Bh(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return bt.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return bt.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return bt.range(e.anchor,e.head)}static create(e,n,r){return new Bh(e,n,r)}}class bt{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:bt.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new bt([this.main],0)}addRange(e,n=!0){return bt.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,bt.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new bt(e.ranges.map(n=>Bh.fromJSON(n)),e.main)}static single(e,n=e){return new bt([bt.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return bt.normalized(e.slice(),n);r=o.to}return new bt(e,n)}static cursor(e,n=0,r,i){return Bh.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i!=null?i:16777215)<<6)}static range(e,n,r,i){let o=(r!=null?r:16777215)<<6|(i==null?7:Math.min(6,i));return n<e?Bh.create(n,e,48|o):Bh.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],a=e[i-1];if(o.empty?o.from<=a.to:o.from<a.to){let s=a.from,l=Math.max(o.to,a.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?bt.range(l,s):bt.range(s,l))}}return new bt(e,n)}}function Gq(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let tD=0;class qt{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=tD++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new qt(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:nD),!!e.static,e.enables)}of(e){return new W1([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new W1(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new W1(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function nD(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class W1{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=tD++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,a=e[o]>>1,s=this.type==2,l=!1,u=!1,c=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?u=!0:(((n=e[d.id])!==null&&n!==void 0?n:1)&1)==0&&c.push(e[d.id]);return{create(d){return d.values[a]=r(d),1},update(d,f){if(l&&f.docChanged||u&&(f.docChanged||f.selection)||PA(d,c)){let h=r(d);if(s?!VF(h,d.values[a],i):!i(h,d.values[a]))return d.values[a]=h,1}return 0},reconfigure:(d,f)=>{let h,g=f.config.address[o];if(g!=null){let m=kx(f,g);if(this.dependencies.every(y=>y instanceof qt?f.facet(y)===d.facet(y):y instanceof xo?f.field(y,!1)==d.field(y,!1):!0)||(s?VF(h=r(d),m,i):i(h=r(d),m)))return d.values[a]=m,0}else h=r(d);return d.values[a]=h,1}}}}function VF(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function PA(t,e){let n=!1;for(let r of e)Xy(t,r)&1&&(n=!0);return n}function xZe(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),a=t[e.id]>>1;function s(l){let u=[];for(let c=0;c<r.length;c++){let d=kx(l,r[c]);if(i[c]==2)for(let f of d)u.push(f);else u.push(d)}return e.combine(u)}return{create(l){for(let u of r)Xy(l,u);return l.values[a]=s(l),1},update(l,u){if(!PA(l,o))return 0;let c=s(l);return e.compare(c,l.values[a])?0:(l.values[a]=c,1)},reconfigure(l,u){let c=PA(l,r),d=u.config.facets[e.id],f=u.facet(e);if(d&&!c&&nD(n,d))return l.values[a]=f,0;let h=s(l);return e.compare(h,f)?(l.values[a]=f,0):(l.values[a]=h,1)}}}const jF=qt.define({static:!0});class xo{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new xo(tD++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(jF).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],a=this.updateF(o,i);return this.compareF(o,a)?0:(r.values[n]=a,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,jF.of({field:this,create:e})]}get extension(){return this}}const kh={lowest:4,low:3,default:2,high:1,highest:0};function Uv(t){return e=>new Kq(e,t)}const Xf={highest:Uv(kh.highest),high:Uv(kh.high),default:Uv(kh.default),low:Uv(kh.low),lowest:Uv(kh.lowest)};class Kq{constructor(e,n){this.inner=e,this.prec=n}}class Hb{of(e){return new AA(this,e)}reconfigure(e){return Hb.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class AA{constructor(e,n){this.compartment=e,this.inner=n}}class Tx{constructor(e,n,r,i,o,a){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),a=new Map;for(let f of SZe(e,n,a))f instanceof xo?i.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let s=Object.create(null),l=[],u=[];for(let f of i)s[f.id]=u.length<<1,u.push(h=>f.slot(h));let c=r==null?void 0:r.config.facets;for(let f in o){let h=o[f],g=h[0].facet,m=c&&c[f]||[];if(h.every(y=>y.type==0))if(s[g.id]=l.length<<1|1,nD(m,h))l.push(r.facet(g));else{let y=g.combine(h.map(b=>b.value));l.push(r&&g.compare(y,r.facet(g))?r.facet(g):y)}else{for(let y of h)y.type==0?(s[y.id]=l.length<<1|1,l.push(y.value)):(s[y.id]=u.length<<1,u.push(b=>y.dynamicSlot(b)));s[g.id]=u.length<<1,u.push(y=>xZe(y,g,h))}}let d=u.map(f=>f(s));return new Tx(e,a,d,s,l,o)}}function SZe(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(a,s){let l=i.get(a);if(l!=null){if(l<=s)return;let u=r[l].indexOf(a);u>-1&&r[l].splice(u,1),a instanceof AA&&n.delete(a.compartment)}if(i.set(a,s),Array.isArray(a))for(let u of a)o(u,s);else if(a instanceof AA){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(a.compartment)||a.inner;n.set(a.compartment,u),o(u,s)}else if(a instanceof Kq)o(a.inner,a.prec);else if(a instanceof xo)r[s].push(a),a.provides&&o(a.provides,s);else if(a instanceof W1)r[s].push(a),a.facet.extensions&&o(a.facet.extensions,kh.default);else{let u=a.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(u,s)}}return o(t,kh.default),r.reduce((a,s)=>a.concat(s))}function Xy(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function kx(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const Jq=qt.define(),MA=qt.define({combine:t=>t.some(e=>e),static:!0}),eY=qt.define({combine:t=>t.length?t[0]:void 0,static:!0}),tY=qt.define(),nY=qt.define(),rY=qt.define(),iY=qt.define({combine:t=>t.length?t[0]:!1});class md{constructor(e,n){this.type=e,this.value=n}static define(){return new CZe}}class CZe{of(e){return new md(this,e)}}class EZe{constructor(e){this.map=e}of(e){return new jn(this,e)}}class jn{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new jn(this.type,n)}is(e){return this.type==e}static define(e={}){return new EZe(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}jn.reconfigure=jn.define();jn.appendConfig=jn.define();class Yi{constructor(e,n,r,i,o,a){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&Gq(r,n.newLength),o.some(s=>s.type==Yi.time)||(this.annotations=o.concat(Yi.time.of(Date.now())))}static create(e,n,r,i,o,a){return new Yi(e,n,r,i,o,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Yi.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Yi.time=md.define();Yi.userEvent=md.define();Yi.addToHistory=md.define();Yi.remote=md.define();function TZe(t,e){let n=[];for(let r=0,i=0;;){let o,a;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],a=t[r++];else if(i<e.length)o=e[i++],a=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function oY(t,e,n){var r;let i,o,a;return n?(i=e.changes,o=oo.empty(e.changes.length),a=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(i)),{changes:a,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:jn.mapEffects(t.effects,i).concat(jn.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function RA(t,e,n){let r=e.selection,i=Lg(e.annotations);return e.userEvent&&(i=i.concat(Yi.userEvent.of(e.userEvent))),{changes:e.changes instanceof oo?e.changes:oo.of(e.changes||[],n,t.facet(eY)),selection:r&&(r instanceof bt?r:bt.single(r.anchor,r.head)),effects:Lg(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function aY(t,e,n){let r=RA(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let a=!!e[o].sequential;r=oY(r,RA(t,e[o],a?r.changes.newLength:t.doc.length),a)}let i=Yi.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return PZe(n?kZe(i):i)}function kZe(t){let e=t.startState,n=!0;for(let i of e.facet(tY)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:TZe(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=oo.empty(e.doc.length);else{let a=t.changes.filter(n);i=a.changes,o=a.filtered.mapDesc(a.changes).invertedDesc}t=Yi.create(e,i,t.selection&&t.selection.map(o),jn.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(nY);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof Yi?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Yi?t=o[0]:t=aY(e,Lg(o),!1)}return t}function PZe(t){let e=t.startState,n=e.facet(rY),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=oY(r,RA(e,o,t.changes.newLength),!0))}return r==t?t:Yi.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const AZe=[];function Lg(t){return t==null?AZe:Array.isArray(t)?t:[t]}var Si=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Si||(Si={}));const MZe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let $A;try{$A=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function RZe(t){if($A)return $A.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||MZe.test(n)))return!0}return!1}function $Ze(t){return e=>{if(!/\S/.test(e))return Si.Space;if(RZe(e))return Si.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Si.Word;return Si.Other}}class vr{constructor(e,n,r,i,o,a){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(let s=0;s<this.config.dynamicSlots.length;s++)Xy(this,s<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Xy(this,r),kx(this,r)}update(...e){return aY(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let s of e.effects)s.is(Hb.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,u)=>i.set(u,l)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(jn.reconfigure)?(n=null,r=s.value):s.is(jn.appendConfig)&&(n=null,r=Lg(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=Tx.resolve(r,i,this),o=new vr(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let a=e.startState.facet(MA)?e.newSelection:e.newSelection.asSingle();new vr(n,e.newDoc,a,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:bt.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],a=Lg(r.effects);for(let s=1;s<n.ranges.length;s++){let l=e(n.ranges[s]),u=this.changes(l.changes),c=u.map(i);for(let f=0;f<s;f++)o[f]=o[f].map(c);let d=i.mapDesc(u,!0);o.push(l.range.map(d)),i=i.compose(c),a=jn.mapEffects(a,c).concat(jn.mapEffects(Lg(l.effects),d))}return{changes:i,selection:bt.create(o,n.mainIndex),effects:a}}changes(e=[]){return e instanceof oo?e:oo.of(e,this.doc.length,this.facet(vr.lineSeparator))}toText(e){return Rr.of(e.split(this.facet(vr.lineSeparator)||EA))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Xy(this,n),kx(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof xo&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let a=r[o],s=e[o];i.push(a.init(l=>a.spec.fromJSON(s,l)))}}return vr.create({doc:e.doc,selection:bt.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Tx.resolve(e.extensions||[],new Map),r=e.doc instanceof Rr?e.doc:Rr.of((e.doc||"").split(n.staticFacet(vr.lineSeparator)||EA)),i=e.selection?e.selection instanceof bt?e.selection:bt.single(e.selection.anchor,e.selection.head):bt.single(0);return Gq(i,r.length),n.staticFacet(MA)||(i=i.asSingle()),new vr(n,r,i,n.dynamicSlots.map(()=>null),(o,a)=>a.create(o),null)}get tabSize(){return this.facet(vr.tabSize)}get lineBreak(){return this.facet(vr.lineSeparator)||`
- `}get readOnly(){return this.facet(iY)}phrase(e,...n){for(let r of this.facet(vr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(Jq))for(let a of o(this,n,r))Object.prototype.hasOwnProperty.call(a,e)&&i.push(a[e]);return i}charCategorizer(e){return $Ze(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),a=e-r,s=e-r;for(;a>0;){let l=Io(n,a,!1);if(o(n.slice(l,a))!=Si.Word)break;a=l}for(;s<i;){let l=Io(n,s);if(o(n.slice(s,l))!=Si.Word)break;s=l}return a==s?null:bt.range(a+r,s+r)}}vr.allowMultipleSelections=MA;vr.tabSize=qt.define({combine:t=>t.length?t[0]:4});vr.lineSeparator=eY;vr.readOnly=iY;vr.phrases=qt.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});vr.languageData=Jq;vr.changeFilter=tY;vr.transactionFilter=nY;vr.transactionExtender=rY;Hb.reconfigure=jn.define();function vc(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let a=i[o],s=r[o];if(s===void 0)r[o]=a;else if(!(s===a||a===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](s,a);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class dp{eq(e){return this==e}range(e,n=e){return H0.create(e,n,this)}}dp.prototype.startSide=dp.prototype.endSide=0;dp.prototype.point=!1;dp.prototype.mapMode=Do.TrackDel;class H0{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new H0(e,n,r)}}function NA(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class rD{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let a=i,s=o.length;;){if(a==s)return a;let l=a+s>>1,u=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return u>=0?a:s;u>=0?s=l:a=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),a=this.findIndex(r,1e9,!1,o);o<a;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],a=-1,s=-1;for(let l=0;l<this.value.length;l++){let u=this.value[l],c=this.from[l]+e,d=this.to[l]+e,f,h;if(c==d){let g=n.mapPos(c,u.startSide,u.mapMode);if(g==null||(f=h=g,u.startSide!=u.endSide&&(h=n.mapPos(c,u.endSide),h<f)))continue}else if(f=n.mapPos(c,u.startSide),h=n.mapPos(d,u.endSide),f>h||f==h&&u.startSide>0&&u.endSide<=0)continue;(h-f||u.endSide-u.startSide)<0||(a<0&&(a=f),u.point&&(s=Math.max(s,h-f)),r.push(u),i.push(f-a),o.push(h-a))}return{mapped:r.length?new rD(i,o,r,s):null,pos:a}}}class Mr{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Mr(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(r&&(n=n.slice().sort(NA)),this.isEmpty)return n.length?Mr.of(n):this;let s=new sY(this,null,-1).goto(0),l=0,u=[],c=new td;for(;s.value||l<n.length;)if(l<n.length&&(s.from-n[l].from||s.startSide-n[l].value.startSide)>=0){let d=n[l++];c.addInner(d.from,d.to,d.value)||u.push(d)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(s.chunkIndex)<n[l].from)&&(!a||i>this.chunkEnd(s.chunkIndex)||o<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!a||i>s.to||o<s.from||a(s.from,s.to,s.value))&&(c.addInner(s.from,s.to,s.value)||u.push(H0.create(s.from,s.to,s.value))),s.next());return c.finishInner(this.nextLayer.isEmpty&&!u.length?Mr.empty:this.nextLayer.update({add:u,filter:a,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let a=0;a<this.chunk.length;a++){let s=this.chunkPos[a],l=this.chunk[a],u=e.touchesRange(s,s+l.length);if(u===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(s));else if(u===!0){let{mapped:c,pos:d}=l.map(s,e);c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(d))}}let o=this.nextLayer.map(e);return n.length==0?o:new Mr(r,n,o||Mr.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],a=this.chunk[i];if(n>=o&&e<=o+a.length&&a.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return U0.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return U0.from(e).goto(n)}static compare(e,n,r,i,o=-1){let a=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),s=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),l=QF(a,s,r),u=new Xv(a,l,o),c=new Xv(s,l,o);r.iterGaps((d,f,h)=>zF(u,d,c,f,h,i)),r.empty&&r.length==0&&zF(u,0,c,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=1e9-1);let o=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),a=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=a.length)return!1;if(!o.length)return!0;let s=QF(o,a),l=new Xv(o,s,0).goto(r),u=new Xv(a,s,0).goto(r);for(;;){if(l.to!=u.to||!DA(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>i)return!0;l.next(),u.next()}}static spans(e,n,r,i,o=-1){let a=new Xv(e,null,o).goto(n),s=n,l=a.openStart;for(;;){let u=Math.min(a.to,r);if(a.point){let c=a.activeForPoint(a.to),d=a.pointFrom<n?c.length+1:a.point.startSide<0?c.length:Math.min(c.length,l);i.point(s,u,a.point,c,d,a.pointRank),l=Math.min(a.openEnd(u),c.length)}else u>s&&(i.span(s,u,a.active,l),l=a.openEnd(u));if(a.to>r)return l+(a.point&&a.to>r?1:0);s=a.to,a.next()}}static of(e,n=!1){let r=new td;for(let i of e instanceof H0?[e]:n?NZe(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Mr.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Mr.empty;i=i.nextLayer)n=new Mr(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Mr.empty=new Mr([],[],null,-1);function NZe(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(NA(e,r)>0)return t.slice().sort(NA);e=r}return t}Mr.empty.nextLayer=Mr.empty;class td{finishChunk(e){this.chunks.push(new rD(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new td)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Mr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Mr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function QF(t,e,n){let r=new Map;for(let o of t)for(let a=0;a<o.chunk.length;a++)o.chunk[a].maxPoint<=0&&r.set(o.chunk[a],o.chunkPos[a]);let i=new Set;for(let o of e)for(let a=0;a<o.chunk.length;a++){let s=r.get(o.chunk[a]);s!=null&&(n?n.mapPos(s):s)==o.chunkPos[a]&&!(n!=null&&n.touchesRange(s,s+o.chunk[a].length))&&i.add(o.chunk[a])}return i}class sY{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class U0{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let a=e[o];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new sY(a,n,r,o));return i.length==1?i[0]:new U0(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)h2(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)h2(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),h2(this.heap,0)}}}function h2(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Xv{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=U0.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){WO(this.active,e),WO(this.activeTo,e),WO(this.activeRank,e),this.minActive=WF(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&(o-this.activeRank[n]||i-this.activeTo[n])>0;)n++;HO(this.active,n,r),HO(this.activeTo,n,i),HO(this.activeRank,n,o),e&&HO(e,n,this.cursor.from),this.minActive=WF(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&WO(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function zF(t,e,n,r,i,o){t.goto(e),n.goto(r);let a=r+i,s=r,l=r-e;for(;;){let u=t.to+l-n.to,c=u||t.endSide-n.endSide,d=c<0?t.to+l:n.to,f=Math.min(d,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&DA(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(s,f,t.point,n.point):f>s&&!DA(t.active,n.active)&&o.compareRange(s,f,t.active,n.active),d>a)break;(u||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),s=d,c<=0&&t.next(),c>=0&&n.next()}}function DA(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function WO(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function HO(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function WF(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function ov(t,e,n=t.length){let r=0;for(let i=0;i<n;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Io(t,i));return r}function LA(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Io(t,i)}return r===!0?-1:t.length}const IA="\u037C",HF=typeof Symbol=="undefined"?"__"+IA:Symbol.for(IA),BA=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),UF=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{};class Ef{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,s,l,u){let c=[],d=/^@(\w+)\b/.exec(a[0]),f=d&&d[1]=="keyframes";if(d&&s==null)return l.push(a[0]+";");for(let h in s){let g=s[h];if(/&/.test(h))o(h.split(/,\s*/).map(m=>a.map(y=>m.replace(/&/,y))).reduce((m,y)=>m.concat(y)),g,l);else if(g&&typeof g=="object"){if(!d)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),g,c,f)}else g!=null&&c.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+g+";")}(c.length||f)&&l.push((r&&!d&&!u?a.map(r):a).join(", ")+" {"+c.join(" ")+"}")}for(let a in e)o(i(a),e[a],this.rules)}getRules(){return this.rules.join(`
- `)}static newName(){let e=UF[HF]||1;return UF[HF]=e+1,IA+e.toString(36)}static mount(e,n,r){let i=e[BA],o=r&&r.nonce;i?o&&i.setNonce(o):i=new DZe(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let XF=new Map;class DZe{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=XF.get(r);if(o)return e[BA]=o;this.sheet=new i.CSSStyleSheet,XF.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[BA]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let a=0;a<e.length;a++){let s=e[a],l=this.modules.indexOf(s);if(l<o&&l>-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,s),r)for(let u=0;u<s.rules.length;u++)r.insertRule(s.rules[u],i++)}else{for(;o<l;)i+=this.modules[o++].rules.length;i+=s.rules.length,o++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let a="";for(let l=0;l<this.modules.length;l++)a+=this.modules[l].getRules()+`
- `;this.styleTag.textContent=a;let s=n.head||n;this.styleTag.parentNode!=s&&s.insertBefore(this.styleTag,s.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Tf={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},X0={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},LZe=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),IZe=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var $o=0;$o<10;$o++)Tf[48+$o]=Tf[96+$o]=String($o);for(var $o=1;$o<=24;$o++)Tf[$o+111]="F"+$o;for(var $o=65;$o<=90;$o++)Tf[$o]=String.fromCharCode($o+32),X0[$o]=String.fromCharCode($o);for(var p2 in Tf)X0.hasOwnProperty(p2)||(X0[p2]=Tf[p2]);function BZe(t){var e=LZe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||IZe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?X0:Tf)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Z0(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function FA(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function H1(t,e){if(!e.anchorNode)return!1;try{return FA(t,e.anchorNode)}catch{return!1}}function xm(t){return t.nodeType==3?hp(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Zy(t,e,n,r){return n?ZF(t,e,n,r,-1)||ZF(t,e,n,r,1):!1}function fp(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Px(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function ZF(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:ic(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=fp(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?ic(t):0}else return!1}}function ic(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ub(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function FZe(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function lY(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function VZe(t,e,n,r,i,o,a,s){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,d=!1;c&&!d;)if(c.nodeType==1){let f,h=c==l.body,g=1,m=1;if(h)f=FZe(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let w=c.getBoundingClientRect();({scaleX:g,scaleY:m}=lY(c,w)),f={left:w.left,right:w.left+c.clientWidth*g,top:w.top,bottom:w.top+c.clientHeight*m}}let y=0,b=0;if(i=="nearest")e.top<f.top?(b=-(f.top-e.top+a),n>0&&e.bottom>f.bottom+b&&(b=e.bottom-f.bottom+b+a)):e.bottom>f.bottom&&(b=e.bottom-f.bottom+a,n<0&&e.top-b<f.top&&(b=-(f.top+b-e.top+a)));else{let w=e.bottom-e.top,O=f.bottom-f.top;b=(i=="center"&&w<=O?e.top+w/2-O/2:i=="start"||i=="center"&&n<0?e.top-a:e.bottom-O+a)-f.top}if(r=="nearest"?e.left<f.left?(y=-(f.left-e.left+o),n>0&&e.right>f.right+y&&(y=e.right-f.right+y+o)):e.right>f.right&&(y=e.right-f.right+o,n<0&&e.left<f.left+y&&(y=-(f.left+y-e.left+o))):y=(r=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:r=="start"==s?e.left-o:e.right-(f.right-f.left)+o)-f.left,y||b)if(h)u.scrollBy(y,b);else{let w=0,O=0;if(b){let x=c.scrollTop;c.scrollTop+=b/m,O=(c.scrollTop-x)*m}if(y){let x=c.scrollLeft;c.scrollLeft+=y/g,w=(c.scrollLeft-x)*g}e={left:e.left-w,top:e.top-O,right:e.right-w,bottom:e.bottom-O},w&&Math.abs(w-y)<1&&(r="nearest"),O&&Math.abs(O-b)<1&&(i="nearest")}if(h)break;c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function jZe(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class QZe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?ic(n):0),r,Math.min(e.focusOffset,r?ic(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let ig=null;function uY(t){if(t.setActive)return t.setActive();if(ig)return t.focus(ig);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(ig==null?{get preventScroll(){return ig={preventScroll:!0},!0}}:void 0),!ig){ig=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let qF;function hp(t,e,n=e){let r=qF||(qF=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Ig(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,t.dispatchEvent(o);let a=new KeyboardEvent("keyup",i);return a.synthetic=!0,t.dispatchEvent(a),o.defaultPrevented||a.defaultPrevented}function zZe(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function cY(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function WZe(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,ic(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=ic(n))}else{if(n==t)return!0;r=fp(n),n=n.parentNode}}function dY(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function fY(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=ic(n)}else if(n.parentNode&&!Px(n))r=fp(n),n=n.parentNode;else return null}}function hY(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Px(n))r=fp(n)+1,n=n.parentNode;else return null}}class ia{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new ia(e.parentNode,fp(e),n)}static after(e,n){return new ia(e.parentNode,fp(e)+1,n)}}const iD=[];class ai{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let a of this.children){if(a.flags&7){if(!a.dom&&(o=i?i.nextSibling:r.firstChild)){let s=ai.get(o);(!s||!s.parent&&s.canReuseDOM(a))&&a.reuseDOM(o)}a.sync(e,n),a.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=a.dom&&(n.written=!0),a.dom.parentNode==r)for(;o&&o!=a.dom;)o=YF(o);else r.insertBefore(a.dom,o);i=a.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=YF(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=ic(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!ai.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let a=this.children[i];if(a.dom==r)return o;o+=a.length+a.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,a=-1,s=-1;for(let l=0,u=r,c=r;l<this.children.length;l++){let d=this.children[l],f=u+d.length;if(u<e&&f>n)return d.domBoundsAround(e,n,u);if(f>=e&&i==-1&&(i=l,o=u),u>n&&d.dom.parentNode==this.dom){a=l,s=c;break}c=f,u=f+d.breakAfter}return{from:o,to:s<0?r+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=iD){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&r.indexOf(o)<0&&o.destroy()}r.length<250?this.children.splice(e,n-e,...r):this.children=[].concat(this.children.slice(0,e),r,this.children.slice(n));for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new pY(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,a){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}ai.prototype.breakAfter=0;function YF(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class pY{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function gY(t,e,n,r,i,o,a,s,l){let{children:u}=t,c=u.length?u[e]:null,d=o.length?o[o.length-1]:null,f=d?d.breakAfter:a;if(!(e==r&&c&&!a&&!f&&o.length<2&&c.merge(n,i,o.length?d:null,n==0,s,l))){if(r<u.length){let h=u[r];h&&(i<h.length||h.breakAfter&&(d==null?void 0:d.breakAfter))?(e==r&&(h=h.split(i),i=0),!f&&d&&h.merge(0,i,d,!0,0,l)?o[o.length-1]=h:((i||h.children.length&&!h.children[0].length)&&h.merge(0,i,null,!1,0,l),o.push(h))):h!=null&&h.breakAfter&&(d?d.breakAfter=1:a=1),r++}for(c&&(c.breakAfter=a,n>0&&(!a&&o.length&&c.merge(n,c.length,o[0],!1,s,0)?c.breakAfter=o.shift().breakAfter:(n<c.length||c.children.length&&c.children[c.children.length-1].length==0)&&c.merge(n,c.length,null,!1,s,0),e++));e<r&&o.length;)if(u[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:s;else if(u[e].become(o[0]))e++,o.shift(),s=o.length?0:l;else break;!o.length&&e&&r<u.length&&!u[e-1].breakAfter&&u[r].merge(0,0,u[e-1],!1,s,l)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function mY(t,e,n,r,i,o){let a=t.childCursor(),{i:s,off:l}=a.findPos(n,1),{i:u,off:c}=a.findPos(e,-1),d=e-n;for(let f of r)d+=f.length;t.length+=d,gY(t,u,c,s,l,r,0,i,o)}let za=typeof navigator!="undefined"?navigator:{userAgent:"",vendor:"",platform:""},VA=typeof document!="undefined"?document:{documentElement:{style:{}}};const jA=/Edge\/(\d+)/.exec(za.userAgent),vY=/MSIE \d/.test(za.userAgent),QA=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(za.userAgent),kC=!!(vY||QA||jA),GF=!kC&&/gecko\/(\d+)/i.test(za.userAgent),g2=!kC&&/Chrome\/(\d+)/.exec(za.userAgent),KF="webkitFontSmoothing"in VA.documentElement.style,yY=!kC&&/Apple Computer/.test(za.vendor),JF=yY&&(/Mobile\/\w+/.test(za.userAgent)||za.maxTouchPoints>2);var Gt={mac:JF||/Mac/.test(za.platform),windows:/Win/.test(za.platform),linux:/Linux|X11/.test(za.platform),ie:kC,ie_version:vY?VA.documentMode||6:QA?+QA[1]:jA?+jA[1]:0,gecko:GF,gecko_version:GF?+(/Firefox\/(\d+)/.exec(za.userAgent)||[0,0])[1]:0,chrome:!!g2,chrome_version:g2?+g2[1]:0,ios:JF,android:/Android\b/.test(za.userAgent),webkit:KF,safari:yY,webkit_version:KF?+(/\bAppleWebKit\/(\d+)/.exec(za.userAgent)||[0,0])[1]:0,tabSize:VA.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const HZe=256;class cu extends ai{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof cu)||this.length-(n-e)+r.length>HZe||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new cu(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new ia(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return UZe(this.dom,e,n)}}class nd extends ai{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(cY(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,a){return r&&(!(r instanceof nd&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&a<=0)?!1:(mY(this,e,n,r?r.children.slice():[],o-1,a-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let s of this.children){let l=r+s.length;l>e&&n.push(r<e?s.split(e-r):s),i<0&&r>=e&&(i=o),r=l,o++}let a=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new nd(this.mark,n,a)}domAtPos(e){return bY(this,e)}coordsAt(e,n){return OY(this,e,n)}}function UZe(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,a=0;e==0&&n<0||e==r&&n>=0?Gt.chrome||Gt.gecko||(e?(i--,a=1):o<r&&(o++,a=-1)):n<0?i--:o<r&&o++;let s=hp(t,i,o).getClientRects();if(!s.length)return null;let l=s[(a?a<0:n>=0)?0:s.length-1];return Gt.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(s,u=>u.width)||l),a?Ub(l,a<0):l||null}class Kd extends ai{static create(e,n,r){return new Kd(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Kd.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,a){return r&&(!(r instanceof Kd)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&a<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Kd&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Rr.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):Rr.empty}domAtPos(e){return(this.length?e==0:this.side>0)?ia.before(this.dom):ia.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let a=this.side?this.side<0:e>0;for(let s=a?i.length-1:0;o=i[s],!(e>0?s==0:s==i.length-1||o.top<o.bottom);s+=a?-1:1);return Ub(o,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Sm extends ai{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Sm&&e.side==this.side}split(){return new Sm(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?ia.before(this.dom):ia.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Rr.empty}get isHidden(){return!0}}cu.prototype.children=Kd.prototype.children=Sm.prototype.children=iD;function bY(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let a=r[i],s=o+a.length;if(!(s==o&&a.getSide()<=0)){if(e>o&&e<s&&a.dom.parentNode==n)return a.domAtPos(e-o);if(e<=o)break;o=s}}for(let o=i;o>0;o--){let a=r[o-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let o=i;o<r.length;o++){let a=r[o];if(a.dom.parentNode==n)return a.domAtPos(0)}return new ia(n,0)}function _Y(t,e,n){let r,{children:i}=t;n>0&&e instanceof nd&&i.length&&(r=i[i.length-1])instanceof nd&&r.mark.eq(e.mark)?_Y(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function OY(t,e,n){let r=null,i=-1,o=null,a=-1;function s(u,c){for(let d=0,f=0;d<u.children.length&&f<=c;d++){let h=u.children[d],g=f+h.length;g>=c&&(h.children.length?s(h,c-f):(!o||o.isHidden&&n>0)&&(g>c||f==g&&h.getSide()>0)?(o=h,a=c-f):(f<c||f==g&&h.getSide()<0&&!h.isHidden)&&(r=h,i=c-f)),f=g}}s(t,e);let l=(n<0?r:o)||r||o;return l?l.coordsAt(Math.max(0,l==r?i:a),n):XZe(t)}function XZe(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=xm(e);return n[n.length-1]||null}function zA(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const eV=Object.create(null);function Ax(t,e,n){if(t==e)return!0;t||(t=eV),e||(e=eV);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function WA(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function ZZe(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class yc{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var wa=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(wa||(wa={}));class pn extends dp{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Xb(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new kf(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:a}=wY(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(a?n?2e8:1:-6e8)+1}return new kf(e,r,i,n,e.widget||null,!0)}static line(e){return new Zb(e)}static set(e,n=!1){return Mr.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}pn.none=Mr.empty;class Xb extends pn{constructor(e){let{start:n,end:r}=wY(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Xb&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Ax(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Xb.prototype.point=!1;class Zb extends pn{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Zb&&this.spec.class==e.spec.class&&Ax(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Zb.prototype.mapMode=Do.TrackBefore;Zb.prototype.point=!0;class kf extends pn{constructor(e,n,r,i,o,a){super(n,r,o,e),this.block=i,this.isReplace=a,this.mapMode=i?n<=0?Do.TrackBefore:Do.TrackAfter:Do.TrackDel}get type(){return this.startSide!=this.endSide?wa.WidgetRange:this.startSide<=0?wa.WidgetBefore:wa.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof kf&&qZe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}kf.prototype.point=!0;function wY(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n!=null?n:e,end:r!=null?r:e}}function qZe(t,e){return t==e||!!(t&&e&&t.compare(e))}function U1(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class qi extends ai{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,a){if(r){if(!(r instanceof qi))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),mY(this,e,n,r?r.children.slice():[],o,a),!0}split(e){let n=new qi;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){!this.dom||(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Ax(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){_Y(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=zA(n,this.attrs||{})),r&&(this.attrs=zA({class:r},this.attrs||{}))}domAtPos(e){return bY(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(cY(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(WA(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&ai.get(i)instanceof nd;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=ai.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Gt.ios||!this.children.some(o=>o instanceof cu))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof cu)||/[^ -~]/.test(r.text))return null;let i=xm(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=OY(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let a=(o-i.textHeight)/2;return{top:r.top+a,bottom:r.bottom-a,left:r.left,right:r.left}}}return r}become(e){return e instanceof qi&&this.children.length==0&&e.children.length==0&&Ax(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],a=i+o.length;if(a>=n){if(o instanceof qi)return o;if(a>n)break}i=a+o.breakAfter}return null}}class Hc extends ai{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,a){return r&&(!(r instanceof Hc)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&a<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?ia.before(this.dom):ia.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new Hc(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return iD}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Rr.empty}domBoundsAround(){return null}become(e){return e instanceof Hc&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);return r||(this.widget instanceof HA?null:Ub(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class HA extends yc{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class qy{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Hc&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new qi),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(UO(new Sm(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Hc)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:a,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(UO(new cu(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,a){if(this.disallowBlockEffectsFor[a]&&r instanceof kf){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(r instanceof kf)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Hc(r.widget||Cm.block,s,r));else{let l=Kd.create(r.widget||Cm.inline,s,s?0:r.startSide),u=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e<n||r.startSide>0),c=!l.isEditable&&(e<n||o>i.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(d.append(UO(new Sm(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(UO(l,i),o),this.atCursorPos=c,this.pendingBuffer=c?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let a=new qy(e,n,r,o);return a.openEnd=Mr.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function UO(t,e){for(let n of e)t=new nd(n,[t],t.length);return t}class Cm extends yc{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Cm.inline=new Cm("span");Cm.block=new Cm("div");var _i=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(_i||(_i={}));const pp=_i.LTR,oD=_i.RTL;function xY(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const YZe=xY("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),GZe=xY("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),UA=Object.create(null),Cu=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);UA[e]=n,UA[n]=-e}function SY(t){return t<=247?YZe[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?GZe[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const KZe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Jd{get dir(){return this.level%2?oD:pp}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let o=-1;for(let a=0;a<e.length;a++){let s=e[a];if(s.from<=n&&s.to>=n){if(s.level==r)return a;(o<0||(i!=0?i<0?s.from<n:s.to>n:e[o].level>s.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function CY(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!CY(r.inner,i.inner))return!1}return!0}const oi=[];function JZe(t,e,n,r,i){for(let o=0;o<=r.length;o++){let a=o?r[o-1].to:e,s=o<r.length?r[o].from:n,l=o?256:i;for(let u=a,c=l,d=l;u<s;u++){let f=SY(t.charCodeAt(u));f==512?f=c:f==8&&d==4&&(f=16),oi[u]=f==4?2:f,f&7&&(d=f),c=f}for(let u=a,c=l,d=l;u<s;u++){let f=oi[u];if(f==128)u<s-1&&c==oi[u+1]&&c&24?f=oi[u]=c:oi[u]=256;else if(f==64){let h=u+1;for(;h<s&&oi[h]==64;)h++;let g=u&&c==8||h<n&&oi[h]==8?d==1?1:8:256;for(let m=u;m<h;m++)oi[m]=g;u=h-1}else f==8&&d==1&&(oi[u]=1);c=f,f&7&&(d=f)}}}function eqe(t,e,n,r,i){let o=i==1?2:1;for(let a=0,s=0,l=0;a<=r.length;a++){let u=a?r[a-1].to:e,c=a<r.length?r[a].from:n;for(let d=u,f,h,g;d<c;d++)if(h=UA[f=t.charCodeAt(d)])if(h<0){for(let m=s-3;m>=0;m-=3)if(Cu[m+1]==-h){let y=Cu[m+2],b=y&2?i:y&4?y&1?o:i:0;b&&(oi[d]=oi[Cu[m]]=b),s=m;break}}else{if(Cu.length==189)break;Cu[s++]=d,Cu[s++]=f,Cu[s++]=l}else if((g=oi[d])==2||g==1){let m=g==i;l=m?0:1;for(let y=s-3;y>=0;y-=3){let b=Cu[y+2];if(b&2)break;if(m)Cu[y+2]|=2;else{if(b&4)break;Cu[y+2]|=4}}}}}function tqe(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let a=i?n[i-1].to:t,s=i<n.length?n[i].from:e;for(let l=a;l<s;){let u=oi[l];if(u==256){let c=l+1;for(;;)if(c==s){if(i==n.length)break;c=n[i++].to,s=i<n.length?n[i].from:e}else if(oi[c]==256)c++;else break;let d=o==1,f=(c<e?oi[c]:r)==1,h=d==f?d?1:2:r;for(let g=c,m=i,y=m?n[m-1].to:t;g>l;)g==y&&(g=n[--m].from,y=m?n[m-1].to:t),oi[--g]=h;l=c}else o=u,l++}}}function XA(t,e,n,r,i,o,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,u=0;l<n;){let c=!0,d=!1;if(u==o.length||l<o[u].from){let m=oi[l];m!=s&&(c=!1,d=m==16)}let f=!c&&s==1?[]:null,h=c?r:r+1,g=l;e:for(;;)if(u<o.length&&g==o[u].from){if(d)break e;let m=o[u];if(!c)for(let y=m.to,b=u+1;;){if(y==n)break e;if(b<o.length&&o[b].from==y)y=o[b++].to;else{if(oi[y]==s)break e;break}}if(u++,f)f.push(m);else{m.from>l&&a.push(new Jd(l,m.from,h));let y=m.direction==pp!=!(h%2);ZA(t,y?r+1:r,i,m.inner,m.from,m.to,a),l=m.to}g=m.to}else{if(g==n||(c?oi[g]!=s:oi[g]==s))break;g++}f?XA(t,l,g,r+1,i,f,a):l<g&&a.push(new Jd(l,g,h)),l=g}else for(let l=n,u=o.length;l>e;){let c=!0,d=!1;if(!u||l>o[u-1].to){let m=oi[l-1];m!=s&&(c=!1,d=m==16)}let f=!c&&s==1?[]:null,h=c?r:r+1,g=l;e:for(;;)if(u&&g==o[u-1].to){if(d)break e;let m=o[--u];if(!c)for(let y=m.from,b=u;;){if(y==e)break e;if(b&&o[b-1].to==y)y=o[--b].from;else{if(oi[y-1]==s)break e;break}}if(f)f.push(m);else{m.to<l&&a.push(new Jd(m.to,l,h));let y=m.direction==pp!=!(h%2);ZA(t,y?r+1:r,i,m.inner,m.from,m.to,a),l=m.from}g=m.from}else{if(g==e||(c?oi[g-1]!=s:oi[g-1]==s))break;g--}f?XA(t,g,l,r+1,i,f,a):g<l&&a.push(new Jd(g,l,h)),l=g}}function ZA(t,e,n,r,i,o,a){let s=e%2?2:1;JZe(t,i,o,r,s),eqe(t,i,o,r,s),tqe(i,o,r,s),XA(t,i,o,e,n,r,a)}function nqe(t,e,n){if(!t)return[new Jd(0,0,e==oD?1:0)];if(e==pp&&!n.length&&!KZe.test(t))return EY(t.length);if(n.length)for(;t.length>oi.length;)oi[oi.length]=256;let r=[],i=e==pp?0:1;return ZA(t,i,i,n,0,t.length,r),r}function EY(t){return[new Jd(0,t,0)]}let TY="";function rqe(t,e,n,r,i){var o;let a=r.head-t.from,s=Jd.find(e,a,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[s],u=l.side(i,n);if(a==u){let f=s+=i?1:-1;if(f<0||f>=e.length)return null;l=e[s=f],a=l.side(!i,n),u=l.side(i,n)}let c=Io(t.text,a,l.forward(i,n));(c<l.from||c>l.to)&&(c=u),TY=t.text.slice(Math.min(a,c),Math.max(a,c));let d=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return d&&c==u&&d.level+(i?0:1)<l.level?bt.cursor(d.side(!i,n)+t.from,d.forward(i,n)?1:-1,d.level):bt.cursor(c+t.from,l.forward(i,n)?-1:1,l.level)}function iqe(t,e,n){for(let r=e;r<n;r++){let i=SY(t.charCodeAt(r));if(i==1)return pp;if(i==2||i==4)return oD}return pp}const kY=qt.define(),PY=qt.define(),AY=qt.define(),MY=qt.define(),qA=qt.define(),RY=qt.define(),$Y=qt.define(),aD=qt.define(),sD=qt.define(),NY=qt.define({combine:t=>t.some(e=>e)}),DY=qt.define({combine:t=>t.some(e=>e)}),LY=qt.define();class Bg{constructor(e,n="nearest",r="nearest",i=5,o=5,a=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=a}map(e){return e.empty?this:new Bg(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Bg(bt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const XO=jn.define({map:(t,e)=>t.map(e)}),IY=jn.define();function Ua(t,e,n){let r=t.facet(MY);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const jc=qt.define({combine:t=>t.length?t[0]:!0});let oqe=0;const uy=qt.define();class Ui{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:a}=n||{};return new Ui(oqe++,e,r,i,s=>{let l=[uy.of(s)];return a&&l.push(q0.of(u=>{let c=u.plugin(s);return c?a(c):pn.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return Ui.define(r=>new e(r),n)}}class m2{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Ua(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Ua(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Ua(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const BY=qt.define(),lD=qt.define(),q0=qt.define(),FY=qt.define(),uD=qt.define(),VY=qt.define();function tV(t,e){let n=t.state.facet(VY);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return Mr.spans(r,e.from,e.to,{point(){},span(o,a,s,l){let u=o-e.from,c=a-e.from,d=i;for(let f=s.length-1;f>=0;f--,l--){let h=s[f].spec.bidiIsolate,g;if(h==null&&(h=iqe(e.text,u,c)),l>0&&d.length&&(g=d[d.length-1]).to==u&&g.direction==h)g.to=c,d=g.inner;else{let m={from:u,to:c,direction:h,inner:[]};d.push(m),d=m.inner}}}}),i}const jY=qt.define();function cD(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(jY)){let a=o(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(r=Math.max(r,a.top)),a.bottom!=null&&(i=Math.max(i,a.bottom)))}return{left:e,right:n,top:r,bottom:i}}const cy=qt.define();class ml{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new ml(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,a=0,s=0;;i++){let l=i==e.length?null:e[i],u=a-s,c=l?l.fromB:1e9;for(;o<n.length&&n[o]<c;){let d=n[o],f=n[o+1],h=Math.max(s,d),g=Math.min(c,f);if(h<=g&&new ml(h+u,g+u,h,g).addToSet(r),f>c)break;o+=2}if(!l)return r;new ml(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),a=l.toA,s=l.toB}}}class Mx{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=oo.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,a,s,l)=>i.push(new ml(o,a,s,l))),this.changedRanges=i}static create(e,n,r){return new Mx(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class nV extends ai{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=pn.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new qi],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ml(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:c})=>c<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!fqe(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?sqe(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;r=new ml(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Gt.ie||Gt.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.updateDeco(),l=cqe(a,s,e.changes);return r=ml.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=Gt.chrome||Gt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||i.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let a of this.children)a instanceof Hc&&a.widget instanceof HA&&o.push(a.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let a=i.length-1;;a--){let s=a>=0?i[a]:null;if(!s)break;let{fromA:l,toA:u,fromB:c,toB:d}=s,f,h,g,m;if(r&&r.range.fromB<d&&r.range.toB>c){let x=qy.build(this.view.state.doc,c,r.range.fromB,this.decorations,this.dynamicDecorationMap),S=qy.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);h=x.breakAtStart,g=x.openStart,m=S.openEnd;let C=this.compositionView(r);S.breakAtStart?C.breakAfter=1:S.content.length&&C.merge(C.length,C.length,S.content[0],!1,S.openStart,0)&&(C.breakAfter=S.content[0].breakAfter,S.content.shift()),x.content.length&&C.merge(0,0,x.content[x.content.length-1],!0,0,x.openEnd)&&x.content.pop(),f=x.content.concat(C).concat(S.content)}else({content:f,breakAtStart:h,openStart:g,openEnd:m}=qy.build(this.view.state.doc,c,d,this.decorations,this.dynamicDecorationMap));let{i:y,off:b}=o.findPos(u,1),{i:w,off:O}=o.findPos(l,-1);gY(this,w,O,y,b,f,h,g,m)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(IY)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new cu(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new nd(i,[n],n.length);let r=new qi;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let s=ai.get(o);s&&s!=a&&(s.dom=null),a.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(jc)||this.dom.tabIndex>-1)&&H1(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),u=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Gt.gecko&&s.empty&&!this.hasComposition&&aqe(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=u=new ia(d,0),a=!0}let c=this.view.observer.selectionRange;(a||!c.focusNode||(!Zy(l.node,l.offset,c.anchorNode,c.anchorOffset)||!Zy(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,s))&&(this.view.observer.ignore(()=>{Gt.android&&Gt.chrome&&this.dom.contains(c.focusNode)&&dqe(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=Z0(this.view.root);if(d)if(s.empty){if(Gt.gecko){let f=lqe(l.node,l.offset);if(f&&f!=3){let h=(f==1?fY:hY)(l.node,l.offset);h&&(l=new ia(h.node,h.offset))}}d.collapse(l.node,l.offset),s.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=s.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(u.node,u.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([l,u]=[u,l]),f.setEnd(u.node,u.offset),f.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new ia(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new ia(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Zy(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Z0(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let a=qi.find(this,n.head);if(!a)return;let s=a.posAtStart;if(n.head==s||n.head==s+a.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);r.collapse(c.node,c.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=ai.get(n.childNodes[i]);o instanceof qi&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=ai.get(n.childNodes[i]);o instanceof qi&&(r=o.domAtPos(o.length))}return r?new ia(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=ai.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof qi)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,a=this.children.length-1;a>=0;a--){let s=this.children[a],l=o-s.breakAfter,u=l-s.length;if(l<e)break;if(u<=e&&(u<e||s.covers(-1))&&(l>e||s.covers(1))&&(!r||s instanceof qi&&!(r instanceof qi&&n>=0)))r=s,i=u;else if(r&&u==e&&l==e&&s instanceof Hc&&Math.abs(n)<2){if(s.deco.startSide<0)break;a&&(r=null)}o=u}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof qi))return null;for(;i.children.length;){let{i:s,off:l}=i.childPos(r,1);for(;;s++){if(s==i.children.length)return null;if((i=i.children[s]).length)break}r=l}if(!(i instanceof cu))return null;let o=Io(i.text,r);if(o==r)return null;let a=hp(i.dom,r,o).getClientRects();for(let s=0;s<a.length;s++){let l=a[s];if(s==a.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,a=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==_i.LTR;for(let u=0,c=0;c<this.children.length;c++){let d=this.children[c],f=u+d.length;if(f>i)break;if(u>=r){let h=d.dom.getBoundingClientRect();if(n.push(h.height),a){let g=d.dom.lastChild,m=g?xm(g):[];if(m.length){let y=m[m.length-1],b=l?y.right-h.left:h.right-y.left;b>s&&(s=b,this.minWidth=o,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?_i.RTL:_i.LTR}measureTextSize(){for(let o of this.children)if(o instanceof qi){let a=o.measureTextSize();if(a)return a}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=xm(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new pY(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],a=o?o.from-1:this.length;if(a>r){let s=(n.lineBlockAt(a).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(pn.replace({widget:new HA(s),block:!0,inclusive:!0,isBlockGap:!0}).range(r,a))}if(!o)break;r=o.to+1}return pn.set(e)}updateDeco(){let e=1,n=this.view.state.facet(q0).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(FY).map((o,a)=>{let s=typeof o=="function";return s&&(r=!0),s?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Mr.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let u=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=u.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let u of this.view.state.facet(LY))try{if(u(this.view,e.range,e))return!0}catch(c){Ua(this.view.state,c,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=cD(this.view),a={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;VZe(this.view.scrollDOM,a,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,s),-s),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==_i.LTR)}}function aqe(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function QY(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=fY(n.focusNode,n.focusOffset),i=hY(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let s=ai.get(i.node);if(!s||s instanceof cu&&s.text!=i.node.nodeValue)o=i;else if(t.docView.lastCompositionAfterCursor){let l=ai.get(r.node);!l||l instanceof cu&&l.text!=r.node.nodeValue||(o=i)}}if(t.docView.lastCompositionAfterCursor=o!=r,!o)return null;let a=e-o.offset;return{from:a,to:a+o.node.nodeValue.length,node:o.node}}function sqe(t,e,n){let r=QY(t,n);if(!r)return null;let{node:i,from:o,to:a}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||t.state.doc.sliceString(r.from,r.to)!=s)return null;let l=e.invertedDesc,u=new ml(l.mapPos(o),l.mapPos(a),o,a),c=[];for(let d=i.parentNode;;d=d.parentNode){let f=ai.get(d);if(f instanceof nd)c.push({node:d,deco:f.mark});else{if(f instanceof qi||d.nodeName=="DIV"&&d.parentNode==t.contentDOM)return{range:u,text:i,marks:c,line:d};if(d!=t.contentDOM)c.push({node:d,deco:new Xb({inclusive:!0,attributes:ZZe(d),tagName:d.tagName.toLowerCase()})});else return null}}}function lqe(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let uqe=class{constructor(){this.changes=[]}compareRange(e,n){U1(e,n,this.changes)}comparePoint(e,n){U1(e,n,this.changes)}boundChange(e){U1(e,e,this.changes)}};function cqe(t,e,n){let r=new uqe;return Mr.compare(t,e,n,r),r.changes}function dqe(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function fqe(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function hqe(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return bt.cursor(e);o==0?n=1:o==i.length&&(n=-1);let a=o,s=o;n<0?a=Io(i.text,o,!1):s=Io(i.text,o);let l=r(i.text.slice(a,s));for(;a>0;){let u=Io(i.text,a,!1);if(r(i.text.slice(u,a))!=l)break;a=u}for(;s<i.length;){let u=Io(i.text,s);if(r(i.text.slice(s,u))!=l)break;s=u}return bt.range(a+i.from,s+i.from)}function pqe(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function gqe(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function v2(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function rV(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function iV(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function YA(t,e,n){let r,i,o,a,s=!1,l,u,c,d;for(let g=t.firstChild;g;g=g.nextSibling){let m=xm(g);for(let y=0;y<m.length;y++){let b=m[y];i&&v2(i,b)&&(b=rV(iV(b,i.bottom),i.top));let w=pqe(e,b),O=gqe(n,b);if(w==0&&O==0)return g.nodeType==3?oV(g,e,n):YA(g,e,n);if(!r||a>O||a==O&&o>w){r=g,i=b,o=w,a=O;let x=O?n<b.top?-1:1:w?e<b.left?-1:1:0;s=!x||(x>0?y<m.length-1:y>0)}w==0?n>b.bottom&&(!c||c.bottom<b.bottom)?(l=g,c=b):n<b.top&&(!d||d.top>b.top)&&(u=g,d=b):c&&v2(c,b)?c=iV(c,b.bottom):d&&v2(d,b)&&(d=rV(d,b.top))}}if(c&&c.bottom>=n?(r=l,i=c):d&&d.top<=n&&(r=u,i=d),!r)return{node:t,offset:0};let f=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return oV(r,f,n);if(s&&r.contentEditable!="false")return YA(r,f,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function oV(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,a=0;for(let s=0;s<r;s++){let l=hp(t,s,s+1).getClientRects();for(let u=0;u<l.length;u++){let c=l[u];if(c.top==c.bottom)continue;a||(a=e-c.left);let d=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&d<o){let f=e>=(c.left+c.right)/2,h=f;if((Gt.chrome||Gt.gecko)&&hp(t,s).getBoundingClientRect().left==c.right&&(h=!f),d<=0)return{node:t,offset:s+(h?1:0)};i=s+(h?1:0),o=d}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function zY(t,e,n,r=-1){var i,o;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:d}=e,f=d-s;if(f<0)return 0;if(f>u)return t.state.doc.length;for(let x=t.viewState.heightOracle.textHeight/2,S=!1;l=t.elementAtHeight(f),l.type!=wa.Text;)for(;f=r>0?l.bottom+x:l.top-x,!(f>=0&&f<=u);){if(S)return n?null:0;S=!0,r=-r}d=s+f;let h=l.from;if(h<t.viewport.from)return t.viewport.from==0?0:n?null:aV(t,a,l,c,d);if(h>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:aV(t,a,l,c,d);let g=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:g,y=m.elementFromPoint(c,d);y&&!t.contentDOM.contains(y)&&(y=null),y||(c=Math.max(a.left+1,Math.min(a.right-1,c)),y=m.elementFromPoint(c,d),y&&!t.contentDOM.contains(y)&&(y=null));let b,w=-1;if(y&&((i=t.docView.nearest(y))===null||i===void 0?void 0:i.isEditable)!=!1){if(g.caretPositionFromPoint){let x=g.caretPositionFromPoint(c,d);x&&({offsetNode:b,offset:w}=x)}else if(g.caretRangeFromPoint){let x=g.caretRangeFromPoint(c,d);x&&({startContainer:b,startOffset:w}=x,(!t.contentDOM.contains(b)||Gt.safari&&mqe(b,w,c)||Gt.chrome&&vqe(b,w,c))&&(b=void 0))}b&&(w=Math.min(ic(b),w))}if(!b||!t.docView.dom.contains(b)){let x=qi.find(t.docView,h);if(!x)return f>l.top+l.height/2?l.to:l.from;({node:b,offset:w}=YA(x.dom,c,d))}let O=t.docView.nearest(b);if(!O)return null;if(O.isWidget&&((o=O.dom)===null||o===void 0?void 0:o.nodeType)==1){let x=O.dom.getBoundingClientRect();return e.y<x.top||e.y<=x.bottom&&e.x<=(x.left+x.right)/2?O.posAtStart:O.posAtEnd}else return O.localPosFromDOM(b,w)+O.posAtStart}function aV(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-(t.defaultLineHeight-s)*.5)/s)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+LA(a,o,t.state.tabSize)}function mqe(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return hp(t,r-1,r).getBoundingClientRect().left>n}function vqe(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():hp(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function GA(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==wa.Text))return r}return n}function yqe(t,e,n,r){let i=GA(t,e.head),o=!r||i.type!=wa.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let a=t.dom.getBoundingClientRect(),s=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(s==_i.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(l!=null)return bt.cursor(l,n?-1:1)}return bt.cursor(n?i.to:i.from,n?-1:1)}function sV(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let u=rqe(i,o,a,s,n),c=TY;if(!u){if(i.number==(n?t.state.doc.lines:1))return s;c=`
- `,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),u=t.visualLineSide(i,!n)}if(l){if(!l(c))return s}else{if(!r)return u;l=r(c)}s=u}}function bqe(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let a=r(o);return i==Si.Space&&(i=a),i==a}}function _qe(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return bt.cursor(i,e.assoc);let a=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(u)a==null&&(a=u.left-l.left),s=o<0?u.top:u.bottom;else{let h=t.viewState.lineBlockAt(i);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),s=(o<0?h.top:h.bottom)+c}let d=l.left+a,f=r!=null?r:t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let g=s+(f+h)*o,m=zY(t,{x:d,y:g},!1,o);if(g<l.top||g>l.bottom||(o<0?m<i:m>i)){let y=t.docView.coordsForChar(m),b=!y||g<y.top?-1:1;return bt.cursor(m,b,void 0,a)}}}function X1(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,a,s)=>{if(e>o&&e<a){let l=r||n||(e-o<a-e?-1:1);e=l<0?o:a,r=l}});if(!r)return e}}function y2(t,e,n){let r=X1(t.state.facet(uD).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:bt.cursor(r,r<n.from?1:-1)}const dy="\uFFFF";class Oqe{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(vr.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=dy}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let a=i.nextSibling;if(a==n)break;let s=ai.get(i),l=ai.get(a);(s&&l?s.breakAfter:(s?s.breakAfter:Px(i))||Px(a)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,a=1,s;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(s=i.exec(n))&&(o=s.index,a=s[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);r=o+a}}readNode(e){if(e.cmIgnore)return;let n=ai.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(wqe(e,r.node,r.offset)?n:0))}}function wqe(t,e,n){for(;;){if(!e||n<ic(e))return!1;if(e==t)return!0;n=fp(e)+1,e=e.parentNode}}class lV{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class xqe{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:o,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let s=o||a?[]:Eqe(e),l=new Oqe(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=Tqe(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=o&&o.node==s.focusNode&&o.offset==s.focusOffset||!FA(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),u=a&&a.node==s.anchorNode&&a.offset==s.anchorOffset||!FA(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),c=e.viewport;if((Gt.ios||Gt.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.to<e.state.doc.length)){let d=Math.min(l,u),f=Math.max(l,u),h=c.from-d,g=c.to-f;(h==0||h==1||d==0)&&(g==0||g==-1||f==e.state.doc.length)&&(l=0,u=e.state.doc.length)}this.newSel=bt.single(u,l)}}}function WY(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:s}=e.bounds,l=i.from,u=null;(o===8||Gt.android&&e.text.length<s-a)&&(l=i.to,u="end");let c=Cqe(t.state.doc.sliceString(a,s,dy),e.text,l-a,u);c&&(Gt.chrome&&o==13&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==dy+dy&&c.toB--,n={from:a+c.from,to:a+c.toA,insert:Rr.of(e.text.slice(c.from,c.toB).split(dy))})}else r&&(!t.hasFocus&&t.state.facet(jc)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(Gt.mac||Gt.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=bt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Rr.of([" "])}):Gt.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
- `&&t.lineWrapping&&(r&&(r=bt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Rr.of([" "])}),n)return dD(t,n,r,o);if(r&&!r.main.eq(i)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:a,userEvent:s}),!0}else return!1}function dD(t,e,n,r=-1){if(Gt.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Gt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ig(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Ig(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ig(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,s=()=>a||(a=Sqe(t,e,n));return t.state.facet(RY).some(l=>l(t,e.from,e.to,o,s))||t.dispatch(s()),!0}function Sqe(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let s=o.from<e.from?i.sliceDoc(o.from,e.from):"",l=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(s+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let s=i.changes(e),l=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),c,d=n&&QY(t,n.main.head);if(d){let g=e.insert.length-(e.to-e.from);c={from:d.from,to:d.to-g}}else c=t.state.doc.lineAt(o.head);let f=o.to-e.to,h=o.to-o.from;r=i.changeByRange(g=>{if(g.from==o.from&&g.to==o.to)return{changes:s,range:l||g.map(s)};let m=g.to-f,y=m-u.length;if(g.to-g.from!=h||t.state.sliceDoc(y,m)!=u||g.to>=c.from&&g.from<=c.to)return{range:g};let b=i.changes({from:y,to:m,insert:e.insert}),w=g.to-o.to;return{changes:b,range:l?bt.range(Math.max(0,l.anchor+w),Math.max(0,l.head+w)):g.map(b)}})}else r={changes:s,selection:l&&i.selection.replaceRange(l)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function Cqe(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let a=t.length,s=e.length;for(;a>0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(r=="end"){let l=Math.max(0,o-Math.min(a,s));n-=a+l-o}return a<o&&t.length<e.length?(o-=n<=o&&n>=a?o-n:0,s=o+(s-a),a=o):s<o&&(o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o),{from:o,toA:a,toB:s}}function Eqe(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new lV(n,r)),(i!=n||o!=r)&&e.push(new lV(i,o))),e}function Tqe(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?bt.single(n+e,r+e):null}class kqe{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Gt.safari&&e.contentDOM.addEventListener("input",()=>null),Gt.gecko&&Wqe(e.contentDOM.ownerDocument)}handleEvent(e){!Lqe(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=Pqe(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let a=!n[o].handlers.length,s=r[o];s&&a!=!s.handlers.length&&(i.removeEventListener(o,this.handleEvent),s=null),s||i.addEventListener(o,this.handleEvent,{passive:a})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&UY.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Gt.android&&Gt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Gt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=HY.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||Aqe.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Ig(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Gt.safari&&!Gt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function uV(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Ua(n.state,i)}}}function Pqe(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let a=i.domEventHandlers[o];a&&n(o).handlers.push(uV(r.value,a))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let a=i.domEventObservers[o];a&&n(o).observers.push(uV(r.value,a))}}for(let r in du)n(r).handlers.push(du[r]);for(let r in Cl)n(r).observers.push(Cl[r]);return e}const HY=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Aqe="dthko",UY=[16,17,18,20,91,92,224,225],ZO=6;function qO(t){return Math.max(0,t)*.7+8}function Mqe(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class Rqe{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=jZe(e.contentDOM),this.atoms=e.state.facet(uD).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(vr.allowMultipleSelections)&&$qe(e,n),this.dragging=Dqe(e,n)&&qY(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Mqe(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=cD(this.view);e.clientX-l.left<=i+ZO?n=-qO(i-e.clientX):e.clientX+l.right>=a-ZO&&(n=qO(e.clientX-a)),e.clientY-l.top<=o+ZO?r=-qO(o-e.clientY):e.clientY+l.bottom>=s-ZO&&(r=qO(e.clientY-s)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let a=X1(this.atoms,i.from,0);a!=i.from&&(o=bt.cursor(a,-1))}else{let a=X1(this.atoms,i.from,-1),s=X1(this.atoms,i.to,1);(a!=i.from||s!=i.to)&&(o=bt.range(i.from==i.anchor?a:s,i.from==i.head?a:s))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?bt.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function $qe(t,e){let n=t.state.facet(kY);return n.length?n[0](e):Gt.mac?e.metaKey:e.ctrlKey}function Nqe(t,e){let n=t.state.facet(PY);return n.length?n[0](e):Gt.mac?!e.altKey:!e.ctrlKey}function Dqe(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Z0(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let a=i[o];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function Lqe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=ai.get(n))&&r.ignoreEvent(e))return!1;return!0}const du=Object.create(null),Cl=Object.create(null),XY=Gt.ie&&Gt.ie_version<15||Gt.ios&&Gt.webkit_version<604;function Iqe(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),ZY(t,n.value)},50)}function PC(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function ZY(t,e){e=PC(t.state,aD,e);let{state:n}=t,r,i=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(KA!=null&&n.selection.ranges.every(l=>l.empty)&&KA==o.toString()){let l=-1;r=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let d=n.toText((a?o.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:d},range:bt.cursor(u.from+d.length)}})}else a?r=n.changeByRange(l=>{let u=o.line(i++);return{changes:{from:l.from,to:l.to,insert:u.text},range:bt.cursor(l.from+u.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Cl.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};du.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Cl.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Cl.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};du.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(AY))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=Vqe(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new Rqe(t,e,n,r)),r&&t.observer.ignore(()=>{uY(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function cV(t,e,n,r){if(r==1)return bt.cursor(e,n);if(r==2)return hqe(t.state,e,n);{let i=qi.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return s<t.state.doc.length&&s==o.to&&s++,bt.range(a,s)}}let dV=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function Bqe(t,e,n,r){let i=qi.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let a=i.coordsAt(o,-1);if(a&&dV(n,r,a))return-1;let s=i.coordsAt(o,1);return s&&dV(n,r,s)?1:a&&a.bottom>=r?-1:1}function fV(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:Bqe(t,n,e.clientX,e.clientY)}}const Fqe=Gt.ie&&Gt.ie_version<=11;let hV=null,pV=0,gV=0;function qY(t){if(!Fqe)return t.detail;let e=hV,n=gV;return hV=t,gV=Date.now(),pV=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(pV+1)%3:1}function Vqe(t,e){let n=fV(t,e),r=qY(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,a,s){let l=fV(t,o),u,c=cV(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!a){let d=cV(t,n.pos,n.bias,r),f=Math.min(d.from,c.from),h=Math.max(d.to,c.to);c=f<c.from?bt.range(f,h):bt.range(h,f)}return a?i.replaceRange(i.main.extend(c.from,c.to)):s&&r==1&&i.ranges.length>1&&(u=jqe(i,l.pos))?u:s?i.addRange(c):bt.create([c])}}}function jqe(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return bt.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}du.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,a=o+i.length;(o>=n.to||a<=n.from)&&(n=bt.range(o,a))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",PC(t.state,sD,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};du.dragend=t=>(t.inputState.draggedContent=null,!1);function mV(t,e,n,r){if(n=PC(t.state,aD,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,a=r&&o&&Nqe(t,e)?{from:o.from,to:o.to}:null,s={from:i,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}du.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&mV(t,e,r.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a<n.length;a++){let s=new FileReader;s.onerror=o,s.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(r[a]=s.result),o()},s.readAsText(n[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return mV(t,e,r,!0),!0}return!1};du.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=XY?null:e.clipboardData;return n?(ZY(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(Iqe(t),!1)};function Qqe(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function zqe(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let a=t.doc.lineAt(o);a.number>i&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),i=a.number}r=!0}return{text:PC(t,sD,e.join(t.lineBreak)),ranges:n,linewise:r}}let KA=null;du.copy=du.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=zqe(t.state);if(!n&&!i)return!1;KA=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=XY?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(Qqe(t,n),!1)};const YY=md.define();function GY(t,e){let n=[];for(let r of t.facet($Y)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:YY.of(!0)}):null}function KY(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=GY(t.state,e);n?t.dispatch(n):t.update([])}},10)}Cl.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),KY(t)};Cl.blur=t=>{t.observer.clearSelectionRange(),KY(t)};Cl.compositionstart=Cl.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Cl.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Gt.chrome&&Gt.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Cl.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};du.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(o&&a.length){let s=a[0],l=t.posAtDOM(s.startContainer,s.startOffset),u=t.posAtDOM(s.endContainer,s.endOffset);return dD(t,{from:l,to:u,insert:t.state.toText(o)},null),!0}}let i;if(Gt.chrome&&Gt.android&&(i=HY.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Gt.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Gt.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Cl.compositionend(t,e),20),!1};const vV=new Set;function Wqe(t){vV.has(t)||(vV.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const yV=["pre-wrap","normal","pre-line","break-spaces"];let Em=!1;function bV(){Em=!1}class Hqe{constructor(e){this.lineWrapping=e,this.doc=Rr.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return yV.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,a){let s=yV.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let u=0;u<a.length;u++){let c=a[u];c<0?u++:this.heightSamples[Math.floor(c*10)]=!0}}return l}}class Uqe{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Fu{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?wa.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof kf?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Fu(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var yi=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(yi||(yi={}));const Z1=.001;class xa{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Z1&&(Em=!0),this.height=e)}replace(e,n,r){return xa.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,a=r.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:u,fromB:c,toB:d}=i[s],f=o.lineAt(l,yi.ByPosNoHeight,r.setDoc(n),0,0),h=f.to>=u?f:o.lineAt(u,yi.ByPosNoHeight,r,0,0);for(d+=h.to-u,u=h.to;s>0&&f.from<=i[s-1].toA;)l=i[s-1].fromA,c=i[s-1].fromB,s--,l<f.from&&(f=o.lineAt(l,yi.ByPosNoHeight,r,0,0));c+=f.from-l,l=f.from;let g=fD.build(r.setDoc(a),e,c,d);o=Rx(o,o.replace(l,u,g))}return o.updateHeight(r,0)}static empty(){return new Ss(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),r+=1+s.break,i-=s.size}else if(o>i*2){let s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else break;else if(i<o){let s=e[n++];s&&(i+=s.size)}else{let s=e[--r];s&&(o+=s.size)}let a=0;return e[n-1]==null?(a=1,n--):e[n]==null&&(a=1,r++),new Xqe(xa.of(e.slice(0,n)),a,xa.of(e.slice(r)))}}function Rx(t,e){return t==e?t:(t.constructor!=e.constructor&&(Em=!0),e)}xa.prototype.size=1;class JY extends xa{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new Fu(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,a){e<=o+this.length&&n>=o&&a(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ss extends JY{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new Fu(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Ss||i instanceof Ro&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Ro?i=new Ss(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):xa.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ro extends xa{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);a=l/o,this.length>o+1&&(s=(this.height-l)/(this.length-o-1))}else a=this.height/o;return{firstLine:r,lastLine:i,perLine:a,perChar:s}}blockAt(e,n,r,i){let{firstLine:o,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let u=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),c=n.doc.lineAt(u),d=s+c.length*l,f=Math.max(r,e-d/2);return new Fu(c.from,c.length,f,d,0)}else{let u=Math.max(0,Math.min(a-o,Math.floor((e-r)/s))),{from:c,length:d}=n.doc.line(o+u);return new Fu(c,d,r+s*u,s,0)}}lineAt(e,n,r,i,o){if(n==yi.ByHeight)return this.blockAt(e,r,i,o);if(n==yi.ByPosNoHeight){let{from:h,to:g}=r.doc.lineAt(e);return new Fu(h,g-h,0,0,0)}let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(r,o),u=r.doc.lineAt(e),c=s+u.length*l,d=u.number-a,f=i+s*d+l*(u.from-o-d);return new Fu(u.from,u.length,Math.max(i,Math.min(f,i+this.height-c)),c,0)}forEachLine(e,n,r,i,o,a){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:s,perLine:l,perChar:u}=this.heightMetrics(r,o);for(let c=e,d=i;c<=n;){let f=r.doc.lineAt(c);if(c==e){let g=f.number-s;d+=l*g+u*(e-o-g)}let h=l+u*f.length;a(new Fu(f.from,f.length,d,h,0)),d+=h,c=f.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof Ro?r[r.length-1]=new Ro(o.length+i):r.push(null,new Ro(i-1))}if(e>0){let o=r[0];o instanceof Ro?r[0]=new Ro(e+o.length):r.unshift(new Ro(e-1),null)}return xa.of(r)}decomposeLeft(e,n){n.push(new Ro(e-1),null)}decomposeRight(e,n){n.push(null,new Ro(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let a=[],s=Math.max(n,i.from),l=-1;for(i.from>n&&a.push(new Ro(i.from-n-1).updateHeight(e,n));s<=o&&i.more;){let c=e.doc.lineAt(s).length;a.length&&a.push(null);let d=i.heights[i.index++];l==-1?l=d:Math.abs(d-l)>=Z1&&(l=-2);let f=new Ss(c,d);f.outdated=!1,a.push(f),s+=c+1}s<=o&&a.push(null,new Ro(o-s).updateHeight(e,s));let u=xa.of(a);return(l<0||Math.abs(u.height-this.height)>=Z1||Math.abs(l-this.heightMetrics(e,n).perLine)>=Z1)&&(Em=!0),Rx(this,u)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Xqe extends xa{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let a=i+this.left.height,s=o+this.left.length+this.break,l=n==yi.ByHeight?e<a:e<s,u=l?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,a,s);if(this.break||(l?u.to<s:u.from>s))return u;let c=n==yi.ByPosNoHeight?yi.ByPosNoHeight:yi.ByPos;return l?u.join(this.right.lineAt(s,c,r,a,s)):this.left.lineAt(s,c,r,i,o).join(u)}forEachLine(e,n,r,i,o,a){let s=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,o,a),n>=l&&this.right.forEachLine(e,n,r,s,l,a);else{let u=this.lineAt(l,yi.ByPos,r,i,o);e<u.from&&this.left.forEachLine(e,u.from-1,r,i,o,a),u.to>=e&&u.from<=n&&a(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,s,l,a)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let s of r)o.push(s);if(e>0&&_V(o,a-1),n<this.length){let s=o.length;this.decomposeRight(n,o),_V(o,s)}return xa.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?xa.of(this.break?[e,null,n]:[e,n]):(this.left=Rx(this.left,e),this.right=Rx(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:a}=this,s=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=s+a.length&&i.more?l=a=a.updateHeight(e,s,r,i):a.updateHeight(e,s,r),l?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function _V(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Ro&&(r=t[e+1])instanceof Ro&&t.splice(e-1,3,new Ro(n.length+1+r.length))}const Zqe=5;class fD{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Ss?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Ss(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let a=n-e;r.block?this.addBlock(new JY(a,i,r)):(a||o||i>=Zqe)&&this.addLineDeco(i,o,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Ss(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Ro(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ss)return e;let n=new Ss(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ss)&&!this.isCovered?this.nodes.push(new Ss(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Ss&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new fD(r,e);return Mr.spans(n,r,i,o,0),o.finish(r)}}function qqe(t,e,n){let r=new Yqe;return Mr.compare(t,e,n,r,0),r.changes}class Yqe{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&U1(e,n,this.changes,5)}}function Gqe(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),a=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let u=t.parentNode;u&&u!=r.body;)if(u.nodeType==1){let c=u,d=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&d.overflow!="visible"){let f=c.getBoundingClientRect();o=Math.max(o,f.left),a=Math.min(a,f.right),s=Math.max(s,f.top),l=Math.min(u==t.parentNode?i.innerHeight:l,f.bottom)}u=d.position=="absolute"||d.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function Kqe(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class b2{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return pn.replace({widget:new Jqe(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class Jqe extends yc{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class OV{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=wV,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=_i.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(lD).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new Hqe(n),this.stateDeco=e.facet(q0).filter(r=>typeof r!="function"),this.heightMap=xa.empty().applyChanges(this.stateDeco,Rr.empty,this.heightOracle.setDoc(e.doc),[new ml(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=pn.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:a})=>i>=o&&i<=a)){let{from:o,to:a}=this.lineBlockAt(i);e.push(new YO(o,a))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?wV:new hD(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(fy(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(q0).filter(c=>typeof c!="function");let i=e.changedRanges,o=ml.extendWithRanges(i,qqe(r,this.stateDeco,e?e.changes:oo.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);bV(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=a||Em)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(DY)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?_i.RTL:_i.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let u=0,c=0;if(s.width&&s.height){let{scaleX:x,scaleY:S}=lY(n,s);(x>.005&&Math.abs(this.scaleX-x)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=x,this.scaleY=S,u|=16,a=l=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=f)&&(this.paddingTop=d,this.paddingBottom=f,u|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=dY(e.scrollDOM);let g=(this.printing?Kqe:Gqe)(n,this.paddingTop),m=g.top-this.pixelViewport.top,y=g.bottom-this.pixelViewport.bottom;this.pixelViewport=g;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let w=s.width;if((this.contentDOMWidth!=w||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,u|=16),l){let x=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(x)&&(a=!0),a||i.lineWrapping&&Math.abs(w-this.contentDOMWidth)>i.charWidth){let{lineHeight:S,charWidth:C,textHeight:E}=e.docView.measureTextSize();a=S>0&&i.refresh(o,S,C,E,w/C,x),a&&(e.docView.minWidth=0,u|=16)}m>0&&y>0?c=Math.max(m,y):m<0&&y<0&&(c=Math.min(m,y)),bV();for(let S of this.viewports){let C=S.from==this.viewport.from?x:e.docView.measureVisibleLineHeights(S);this.heightMap=(a?xa.empty().applyChanges(this.stateDeco,Rr.empty,this.heightOracle,[new ml(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new Uqe(S.from,C))}Em&&(u|=2)}let O=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return O&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),u|=this.updateForViewport()),(u&2||O)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new YO(i.lineAt(a-r*1e3,yi.ByHeight,o,0,0).from,i.lineAt(s+(1-r)*1e3,yi.ByHeight,o,0,0).to);if(n){let{head:u}=n.range;if(u<l.from||u>l.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(u,yi.ByPos,o,0,0),f;n.y=="center"?f=(d.top+d.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u<l.from?f=d.top:f=d.bottom-c,l=new YO(i.lineAt(f-1e3/2,yi.ByHeight,o,0,0).from,i.lineAt(f+c+1e3/2,yi.ByHeight,o,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new YO(this.heightMap.lineAt(r,yi.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,yi.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,yi.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,yi.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:s}=this;return(e==0||i<=a-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=s+Math.max(10,Math.min(r,250)))&&i>a-2*1e3&&o<s+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new b2(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,a=i<<1;if(this.defaultTextDirection!=_i.LTR&&!r)return[];let s=[],l=(c,d,f,h)=>{if(d-c<o)return;let g=this.state.selection.main,m=[g.from];g.empty||m.push(g.to);for(let b of m)if(b>c&&b<d){l(c,b-10,f,h),l(b+10,d,f,h);return}let y=tYe(e,b=>b.from>=f.from&&b.to<=f.to&&Math.abs(b.from-c)<o&&Math.abs(b.to-d)<o&&!m.some(w=>b.from<w&&b.to>w));if(!y){if(d<f.to&&n&&r&&n.visibleRanges.some(O=>O.from<=d&&O.to>=d)){let O=n.moveToLineBoundary(bt.cursor(d),!1,!0).head;O>c&&(d=O)}let b=this.gapSize(f,c,d,h),w=r||b<2e6?b:2e6;y=new b2(c,d,b,w)}s.push(y)},u=c=>{if(c.length<a||c.type!=wa.Text)return;let d=eYe(c.from,c.to,this.stateDeco);if(d.total<a)return;let f=this.scrollTarget?this.scrollTarget.range.head:null,h,g;if(r){let m=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,y,b;if(f!=null){let w=KO(d,f),O=((this.visibleBottom-this.visibleTop)/2+m)/c.height;y=w-O,b=w+O}else y=(this.visibleTop-c.top-m)/c.height,b=(this.visibleBottom-c.top+m)/c.height;h=GO(d,y),g=GO(d,b)}else{let m=d.total*this.heightOracle.charWidth,y=i*this.heightOracle.charWidth,b=0;if(m>2e6)for(let C of e)C.from>=c.from&&C.from<c.to&&C.size!=C.displaySize&&C.from*this.heightOracle.charWidth+b<this.pixelViewport.left&&(b=C.size-C.displaySize);let w=this.pixelViewport.left+b,O=this.pixelViewport.right+b,x,S;if(f!=null){let C=KO(d,f),E=((O-w)/2+y)/m;x=C-E,S=C+E}else x=(w-y)/m,S=(O+y)/m;h=GO(d,x),g=GO(d,S)}h>c.from&&l(c.from,h,c,d),g<c.to&&l(g,c.to,c,d)};for(let c of this.viewportLines)Array.isArray(c.type)?c.type.forEach(u):u(c);return s}gapSize(e,n,r,i){let o=KO(i,r)-KO(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){b2.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=pn.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Mr.spans(n,this.viewport.from,this.viewport.to,{span(o,a){r.push({from:o,to:a})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let o=0;o<r.length&&!(i&8);o++){let a=this.visibleRanges[o],s=r[o];(a.from!=s.from||a.to!=s.to)&&(i|=4,e&&e.mapPos(a.from,-1)==s.from&&e.mapPos(a.to,1)==s.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||fy(this.heightMap.lineAt(e,yi.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||fy(this.heightMap.lineAt(this.scaler.fromDOM(e),yi.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return fy(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class YO{constructor(e,n){this.from=e,this.to=n}}function eYe(t,e,n){let r=[],i=t,o=0;return Mr.spans(n,t,e,{span(){},point(a,s){a>i&&(r.push({from:i,to:a}),o+=a-i),i=s}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function GO({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:a}=e[i],s=a-o;if(r<=s)return o+r;r-=s}}function KO(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function tYe(t,e){for(let n of t)if(e(n))return n}const wV={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class hD{constructor(e,n,r){let i=0,o=0,a=0;this.viewports=r.map(({from:s,to:l})=>{let u=n.lineAt(s,yi.ByPos,e,0,0).top,c=n.lineAt(l,yi.ByPos,e,0,0).bottom;return i+=c-u,{from:s,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let s of this.viewports)s.domTop=a+(s.top-o)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}eq(e){return e instanceof hD?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function fy(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Fu(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>fy(i,e)):t._content)}const JO=qt.define({combine:t=>t.join(" ")}),JA=qt.define({combine:t=>t.indexOf(!0)>-1}),eM=Ef.newName(),eG=Ef.newName(),tG=Ef.newName(),nG={"&light":"."+eG,"&dark":"."+tG};function tM(t,e,n){return new Ef(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const nYe=tM("."+eM,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},nG),rYe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},_2=Gt.ie&&Gt.ie_version<=11;class iYe{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new QZe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(Gt.ie&&Gt.ie_version<=11||Gt.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Gt.chrome&&Gt.chrome_version<126)&&(this.editContext=new aYe(e),e.state.facet(jc)&&(e.contentDOM.editContext=this.editContext.editContext)),_2&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(jc)?r.root.activeElement!=this.dom:!H1(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Gt.ie&&Gt.ie_version<=11||Gt.android&&Gt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Zy(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Z0(e.root);if(!n)return!1;let r=Gt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&oYe(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=H1(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&WZe(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,rYe),_2&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){!this.active||(this.active=!1,this.observer.disconnect(),_2&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&Ig(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let a=this.readMutation(o);!a||(a.typeOver&&(i=!0),n==-1?{from:n,to:r}=a:(n=Math.min(a.from,n),r=Math.max(a.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&H1(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new xqe(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=WY(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=xV(n,e.previousSibling||e.target.previousSibling,-1),i=xV(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(jc)!=e.state.facet(jc)&&(e.view.contentDOM.editContext=e.state.facet(jc)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function xV(t,e,n){for(;e;){let r=ai.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function SV(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Zy(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function oYe(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return SV(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?SV(t,n):null}class aYe{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,o=this.toEditorPos(r.updateRangeStart),a=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:o,drifted:!1});let s={from:o,to:a,insert:Rr.of(r.text.split(`
- `))};if(s.from==this.from&&i<this.from?s.from=i:s.to==this.to&&i>this.to&&(s.to=i),!(s.from==s.to&&!s.insert.length)){if(this.pendingContextChange=s,!e.state.readOnly){let l=this.to-this.from+(s.to-s.from+s.insert.length);dD(e,s,bt.single(this.toEditorPos(r.selectionStart,l),this.toEditorPos(r.selectionEnd,l)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))}},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let a=this.toEditorPos(r.rangeStart),s=this.toEditorPos(r.rangeEnd);a<s;a++){let l=e.coordsForChar(a);o=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||o||new DOMRect,i.push(o)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let o of r.getTextFormats()){let a=o.underlineStyle,s=o.underlineThickness;if(a!="None"&&s!="None"){let l=this.toEditorPos(o.rangeStart),u=this.toEditorPos(o.rangeEnd);if(l<u){let c=`text-decoration: underline ${a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${s=="Thin"?1:2}px`;i.push(pn.mark({attributes:{style:c}}).range(l,u))}}}e.dispatch({effects:IY.of(pn.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Z0(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,a,s,l,u)=>{if(r)return;let c=u.length-(a-o);if(i&&a>=i.to)if(i.from==o&&i.to==a&&i.insert.eq(u)){i=this.pendingContextChange=null,n+=c,this.to+=c;return}else i=null,this.revertPending(e.state);if(o+=n,a+=n,a<=this.from)this.from+=c,this.to+=c;else if(o<this.to){if(o<this.from||a>this.to||this.to-this.from+u.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(a),u.toString()),this.to+=c}n+=c}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Xt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||zZe(e.parent)||document,this.viewState=new OV(e.state||vr.create(e)),e.scrollTo&&e.scrollTo.is(XO)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(uy).map(i=>new m2(i));for(let i of this.plugins)i.update(this);this.observer=new iYe(this),this.inputState=new kqe(this),this.inputState.ensureHandlers(this.plugins),this.docView=new nV(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Yi?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,s=0,l=null;e.some(f=>f.annotation(YY))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=GY(o,a),l||(s=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(vr.phrases)!=this.state.facet(vr.phrases))return this.setState(o);i=Mx.create(this,o,e),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(d&&(d=d.map(f.changes)),f.scrollIntoView){let{main:h}=f.state.selection;d=new Bg(h.empty?h:bt.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of f.effects)h.is(XO)&&(d=h.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=$x.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(cy)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(JO)!=i.state.facet(JO)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let f of this.state.facet(qA))try{f(i)}catch(h){Ua(this.state,h,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!WY(this,c)&&u.force&&Ig(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new OV(e),this.plugins=e.facet(uy).map(r=>new m2(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new nV(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(uy),r=e.state.facet(uy);if(n!=r){let i=[];for(let o of r){let a=n.indexOf(o);if(a<0)i.push(new m2(o));else{let s=this.plugins[a];s.mustUpdate=e,i.push(s)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){Ua(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(dY(r))o=-1,a=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);o=h.from,a=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(h=>{try{return h.read(this)}catch(g){return Ua(this.state,g),CV}}),d=Mx.create(this,this.state,[]),f=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),f=this.docView.update(d),f&&this.docViewUpdate());for(let h=0;h<u.length;h++)if(c[h]!=CV)try{let g=u[h];g.write&&g.write(c[h],this)}catch(g){Ua(this.state,g)}if(f&&this.docView.updateSelection(!0),!d.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let g=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-a;if(g>1||g<-1){i=i+g,r.scrollTop=i/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet(qA))s(n)}get themeClasses(){return eM+" "+(this.state.facet(JA)?tG:eG)+" "+this.state.facet(JO)}updateAttrs(){let e=EV(this,BY,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(jc)?"true":"false",class:"cm-content",style:`${Gt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),EV(this,lD,n);let r=this.observer.ignore(()=>{let i=WA(this.contentDOM,this.contentAttrs,n),o=WA(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(Xt.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(cy);let e=this.state.facet(Xt.cspNonce);Ef.mount(this.root,this.styleModules.concat(nYe).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.spec!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return y2(this,e,sV(this,e,n,r))}moveByGroup(e,n){return y2(this,e,sV(this,e,n,r=>bqe(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return bt.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return yqe(this,e,n,r)}moveVertically(e,n,r){return y2(this,e,_qe(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),zY(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),a=o[Jd.find(o,e-i.from,-1,n)];return Ub(r,a.dir==_i.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(NY)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>sYe)return EY(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||CY(o.isolates,r=tV(this,e))))return o.order;r||(r=tV(this,e));let i=nqe(e.text,n,r);return this.bidiCache.push(new $x(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Gt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{uY(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return XO.of(new Bg(typeof e=="number"?bt.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return XO.of(new Bg(bt.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ui.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ui.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Ef.newName(),i=[JO.of(r),cy.of(tM(`.${r}`,e))];return n&&n.dark&&i.push(JA.of(!0)),i}static baseTheme(e){return Xf.lowest(cy.of(tM("."+eM,e,nG)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&ai.get(r)||ai.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}Xt.styleModule=cy;Xt.inputHandler=RY;Xt.clipboardInputFilter=aD;Xt.clipboardOutputFilter=sD;Xt.scrollHandler=LY;Xt.focusChangeEffect=$Y;Xt.perLineTextDirection=NY;Xt.exceptionSink=MY;Xt.updateListener=qA;Xt.editable=jc;Xt.mouseSelectionStyle=AY;Xt.dragMovesSelection=PY;Xt.clickAddsSelectionRange=kY;Xt.decorations=q0;Xt.outerDecorations=FY;Xt.atomicRanges=uD;Xt.bidiIsolatedRanges=VY;Xt.scrollMargins=jY;Xt.darkTheme=JA;Xt.cspNonce=qt.define({combine:t=>t.length?t[0]:""});Xt.contentAttributes=lD;Xt.editorAttributes=BY;Xt.lineWrapping=Xt.contentAttributes.of({class:"cm-lineWrapping"});Xt.announce=jn.define();const sYe=4096,CV={};class $x{constructor(e,n,r,i,o,a){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:_i.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let a=e[o];a.dir==i&&!n.touchesRange(a.from,a.to)&&r.push(new $x(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return r}}function EV(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],a=typeof o=="function"?o(t):o;a&&zA(a,n)}return n}const lYe=Gt.mac?"mac":Gt.windows?"win":Gt.linux?"linux":"key";function uYe(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,a,s;for(let l=0;l<n.length-1;++l){const u=n[l];if(/^(cmd|meta|m)$/i.test(u))s=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))o=!0;else if(/^s(hift)?$/i.test(u))a=!0;else if(/^mod$/i.test(u))e=="mac"?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),s&&(r="Meta-"+r),a&&(r="Shift-"+r),r}function e1(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const cYe=Xf.default(Xt.domEventHandlers({keydown(t,e){return iG(rG(e.state),t,e,"editor")}})),qb=qt.define({enables:cYe}),TV=new WeakMap;function rG(t){let e=t.facet(qb),n=TV.get(e);return n||TV.set(e,n=hYe(e.reduce((r,i)=>r.concat(i),[]))),n}function dYe(t,e,n){return iG(rG(t.state),e,t,n)}let zd=null;const fYe=4e3;function hYe(t,e=lYe){let n=Object.create(null),r=Object.create(null),i=(a,s)=>{let l=r[a];if(l==null)r[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,s,l,u,c)=>{var d,f;let h=n[a]||(n[a]=Object.create(null)),g=s.split(/ (?!$)/).map(b=>uYe(b,e));for(let b=1;b<g.length;b++){let w=g.slice(0,b).join(" ");i(w,!0),h[w]||(h[w]={preventDefault:!0,stopPropagation:!1,run:[O=>{let x=zd={view:O,prefix:w,scope:a};return setTimeout(()=>{zd==x&&(zd=null)},fYe),!0}]})}let m=g.join(" ");i(m,!1);let y=h[m]||(h[m]={preventDefault:!1,stopPropagation:!1,run:((f=(d=h._any)===null||d===void 0?void 0:d.run)===null||f===void 0?void 0:f.slice())||[]});l&&y.run.push(l),u&&(y.preventDefault=!0),c&&(y.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let u of s){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=a;for(let f in c)c[f].run.push(h=>d(h,nM))}let l=a[e]||a.key;if(!!l)for(let u of s)o(u,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(u,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}let nM=null;function iG(t,e,n,r){nM=e;let i=BZe(e),o=Qa(i,0),a=Bu(o)==i.length&&i!=" ",s="",l=!1,u=!1,c=!1;zd&&zd.view==n&&zd.scope==r&&(s=zd.prefix+" ",UY.indexOf(e.keyCode)<0&&(u=!0,zd=null));let d=new Set,f=y=>{if(y){for(let b of y.run)if(!d.has(b)&&(d.add(b),b(n)))return y.stopPropagation&&(c=!0),!0;y.preventDefault&&(y.stopPropagation&&(c=!0),u=!0)}return!1},h=t[r],g,m;return h&&(f(h[s+e1(i,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Gt.windows&&e.ctrlKey&&e.altKey)&&(g=Tf[e.keyCode])&&g!=i?(f(h[s+e1(g,e,!0)])||e.shiftKey&&(m=X0[e.keyCode])!=i&&m!=g&&f(h[s+e1(m,e,!1)]))&&(l=!0):a&&e.shiftKey&&f(h[s+e1(i,e,!0)])&&(l=!0),!l&&f(h._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),nM=null,l}class Yb{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=oG(e);return[new Yb(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return pYe(e,n,r)}}function oG(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==_i.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function kV(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:o.left+1,y:a}),l=t.posAtCoords({x:o.right-1,y:a});return s==null||l==null?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}function pYe(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==_i.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=oG(t),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=s.right-(c?parseInt(c.paddingRight):0),h=GA(t,r),g=GA(t,i),m=h.type==wa.Text?h:null,y=g.type==wa.Text?g:null;if(m&&(t.lineWrapping||h.widgetLineBreaks)&&(m=kV(t,r,1,m)),y&&(t.lineWrapping||g.widgetLineBreaks)&&(y=kV(t,i,-1,y)),m&&y&&m.from==y.from&&m.to==y.to)return w(O(n.from,n.to,m));{let S=m?O(n.from,null,m):x(h,!1),C=y?O(null,n.to,y):x(g,!0),E=[];return(m||h).to<(y||g).from-(m&&y?1:0)||h.widgetLineBreaks>1&&S.bottom+t.defaultLineHeight/2<C.top?E.push(b(d,S.bottom,f,C.top)):S.bottom<C.top&&t.elementAtHeight((S.bottom+C.top)/2).type==wa.Text&&(S.bottom=C.top=(S.bottom+C.top)/2),w(S).concat(E).concat(w(C))}function b(S,C,E,T){return new Yb(e,S-l.left,C-l.top,E-S,T-C)}function w({top:S,bottom:C,horizontal:E}){let T=[];for(let P=0;P<E.length;P+=2)T.push(b(E[P],S,E[P+1],C));return T}function O(S,C,E){let T=1e9,P=-1e9,A=[];function D(z,I,L,X,Q){let W=t.coordsAtPos(z,z==E.to?-2:2),G=t.coordsAtPos(L,L==E.from?2:-2);!W||!G||(T=Math.min(W.top,G.top,T),P=Math.max(W.bottom,G.bottom,P),Q==_i.LTR?A.push(o&&I?d:W.left,o&&X?f:G.right):A.push(!o&&X?d:G.left,!o&&I?f:W.right))}let $=S!=null?S:E.from,N=C!=null?C:E.to;for(let z of t.visibleRanges)if(z.to>$&&z.from<N)for(let I=Math.max(z.from,$),L=Math.min(z.to,N);;){let X=t.state.doc.lineAt(I);for(let Q of t.bidiSpans(X)){let W=Q.from+X.from,G=Q.to+X.from;if(W>=L)break;G>I&&D(Math.max(W,I),S==null&&W<=$,Math.min(G,L),C==null&&G>=N,Q.dir)}if(I=X.to+1,I>=L)break}return A.length==0&&D($,S==null,N,C==null,t.textDirection),{top:T,bottom:P,horizontal:A}}function x(S,C){let E=s.top+(C?S.top:S.bottom);return{top:E,bottom:E,horizontal:[]}}}function gYe(t,e){return t.constructor==e.constructor&&t.eq(e)}class mYe{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(q1)!=e.state.facet(q1)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(q1);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!gYe(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const q1=qt.define();function aG(t){return[Ui.define(e=>new mYe(e,t)),q1.of(t)]}const sG=!(Gt.ios&&Gt.webkit&&Gt.webkit_version<534),Y0=qt.define({combine(t){return vc(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function vYe(t={}){return[Y0.of(t),yYe,bYe,_Ye,DY.of(!0)]}function lG(t){return t.startState.facet(Y0)!=t.state.facet(Y0)}const yYe=aG({above:!0,markers(t){let{state:e}=t,n=e.facet(Y0),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||sG:n.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:bt.cursor(i.head,i.head>i.anchor?-1:1);for(let l of Yb.forRange(t,a,s))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=lG(t);return n&&PV(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){PV(e.state,t)},class:"cm-cursorLayer"});function PV(t,e){e.style.animationDuration=t.facet(Y0).cursorBlinkRate+"ms"}const bYe=aG({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Yb.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||lG(t)},class:"cm-selectionLayer"}),rM={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};sG&&(rM[".cm-line"].caretColor=rM[".cm-content"].caretColor="transparent !important");const _Ye=Xf.highest(Xt.theme(rM)),uG=jn.define({map(t,e){return t==null?null:e.mapPos(t)}}),hy=xo.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(uG)?r.value:n,t)}}),OYe=Ui.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(hy);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(hy)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(hy),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(hy)!=t&&this.view.dispatch({effects:uG.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function wYe(){return[hy,OYe]}function AV(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)i(a+s.index,s)}function xYe(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class SYe{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(s,l,u,c)=>i(c,u,u+s[0].length,s,l);else if(typeof r=="function")this.addMatch=(s,l,u,c)=>{let d=r(s,l,u);d&&c(u,u+s[0].length,d)};else if(r)this.addMatch=(s,l,u,c)=>c(u,u+s[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let n=new td,r=n.add.bind(n);for(let{from:i,to:o}of xYe(e,this.maxLength))AV(e.state.doc,this.regexp,i,o,(a,s)=>this.addMatch(s,e,a,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,a,s,l)=>{l>=e.view.viewport.from&&s<=e.view.viewport.to&&(r=Math.min(s,r),i=Math.max(l,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let a=Math.max(o.from,r),s=Math.min(o.to,i);if(s>a){let l=e.state.doc.lineAt(a),u=l.to<s?e.state.doc.lineAt(s):l,c=Math.max(o.from,l.from),d=Math.min(o.to,u.to);if(this.boundary){for(;a>l.from;a--)if(this.boundary.test(l.text[a-1-l.from])){c=a;break}for(;s<u.to;s++)if(this.boundary.test(u.text[s-u.from])){d=s;break}}let f=[],h,g=(m,y,b)=>f.push(b.range(m,y));if(l==u)for(this.regexp.lastIndex=c-l.from;(h=this.regexp.exec(l.text))&&h.index<d-l.from;)this.addMatch(h,e,h.index+l.from,g);else AV(e.state.doc,this.regexp,c,d,(m,y)=>this.addMatch(y,e,m,g));n=n.update({filterFrom:c,filterTo:d,filter:(m,y)=>m<c||y>d,add:f})}}return n}}const iM=/x/.unicode!=null?"gu":"g",CYe=new RegExp(`[\0-\b
- -\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,iM),EYe={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let O2=null;function TYe(){var t;if(O2==null&&typeof document!="undefined"&&document.body){let e=document.body.style;O2=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return O2||!1}const Y1=qt.define({combine(t){let e=vc(t,{render:null,specialChars:CYe,addSpecialChars:null});return(e.replaceTabs=!TYe())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,iM)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,iM)),e}});function kYe(t={}){return[Y1.of(t),PYe()]}let MV=null;function PYe(){return MV||(MV=Ui.fromClass(class{constructor(t){this.view=t,this.decorations=pn.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Y1)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new SYe({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=Qa(e[0],0);if(o==9){let a=i.lineAt(r),s=n.state.tabSize,l=ov(a.text,s,r-a.from);return pn.replace({widget:new $Ye((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=pn.replace({widget:new RYe(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Y1);t.startState.facet(Y1)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const AYe="\u2022";function MYe(t){return t>=32?AYe:t==10?"\u2424":String.fromCharCode(9216+t)}class RYe extends yc{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=MYe(this.code),r=e.state.phrase("Control character")+" "+(EYe[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class $Ye extends yc{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function NYe(){return LYe}const DYe=pn.line({class:"cm-activeLine"}),LYe=Ui.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(DYe.range(i.from)),e=i.from)}return pn.set(n)}},{decorations:t=>t.decorations});class IYe extends yc{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),typeof this.content=="string"?n.setAttribute("aria-label","placeholder "+this.content):n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?xm(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Ub(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function BYe(t){return Ui.fromClass(class{constructor(e){this.view=e,this.placeholder=t?pn.set([pn.widget({widget:new IYe(t),side:1}).range(0)]):pn.none}get decorations(){return this.view.state.doc.length?pn.none:this.placeholder}},{decorations:e=>e.decorations})}const oM=2e3;function FYe(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>oM||n.off>oM||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let u=t.doc.line(l);u.length<=s&&o.push(bt.range(u.from+a,u.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let u=t.doc.line(l),c=LA(u.text,a,t.tabSize,!0);if(c<0)o.push(bt.cursor(u.to));else{let d=LA(u.text,s,t.tabSize);o.push(bt.range(u.from+c,u.from+d))}}}return o}function VYe(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function RV(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>oM?-1:i==r.length?VYe(t,e.clientX):ov(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function jYe(t,e){let n=RV(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(i.changes)}},get(i,o,a){let s=RV(t,i);if(!s)return r;let l=FYe(t.state,n,s);return l.length?a?bt.create(l.concat(r.ranges)):bt.create(l):r}}:null}function QYe(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return Xt.mouseSelectionStyle.of((n,r)=>e(r)?jYe(n,r):null)}const zYe={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},WYe={style:"cursor: crosshair"};function HYe(t={}){let[e,n]=zYe[t.key||"Alt"],r=Ui.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,Xt.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?WYe:null})]}const Zv="-10000px";class cG{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let o=null;this.tooltipViews=this.tooltips.map(a=>o=r(a,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;l<o.length;l++){let u=o[l],c=-1;if(!!u){for(let d=0;d<this.tooltips.length;d++){let f=this.tooltips[d];f&&f.create==u.create&&(c=d)}if(c<0)a[l]=this.createTooltipView(u,l?a[l-1]:null),s&&(s[l]=!!u.above);else{let d=a[l]=this.tooltipViews[c];s&&(s[l]=n[c]),d.update&&d.update(e)}}}for(let l of this.tooltipViews)a.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(s.forEach((l,u)=>n[u]=l),n.length=s.length),this.input=i,this.tooltips=o,this.tooltipViews=a,!0}}function UYe(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const w2=qt.define({combine:t=>{var e,n,r;return{position:Gt.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||UYe}}}),$V=new WeakMap,pD=Ui.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(w2);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new cG(t,gD,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(w2);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Zv,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(Gt.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==Zv&&o.style.left=="0px"){let a=o.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=cD(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,a)=>{let s=this.manager.tooltipViews[a];return s.getCoords?s.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(w2).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=t,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],u=this.manager.tooltipViews[s],{dom:c}=u,d=t.pos[s],f=t.size[s];if(!d||l.clip!==!1&&(d.bottom<=Math.max(n.top,r.top)||d.top>=Math.min(n.bottom,r.bottom)||d.right<Math.max(n.left,r.left)-.1||d.left>Math.min(n.right,r.right)+.1)){c.style.top=Zv;continue}let h=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,g=h?7:0,m=f.right-f.left,y=(e=$V.get(u))!==null&&e!==void 0?e:f.bottom-f.top,b=u.offset||ZYe,w=this.view.textDirection==_i.LTR,O=f.width>r.right-r.left?w?r.left:r.right-f.width:w?Math.max(r.left,Math.min(d.left-(h?14:0)+b.x,r.right-m)):Math.min(Math.max(r.left,d.left-m+(h?14:0)-b.x),r.right-m),x=this.above[s];!l.strictSide&&(x?d.top-y-g-b.y<r.top:d.bottom+y+g+b.y>r.bottom)&&x==r.bottom-d.bottom>d.top-r.top&&(x=this.above[s]=!x);let S=(x?d.top-r.top:r.bottom-d.bottom)-g;if(S<y&&u.resize!==!1){if(S<this.view.defaultLineHeight){c.style.top=Zv;continue}$V.set(u,y),c.style.height=(y=S)/o+"px"}else c.style.height&&(c.style.height="");let C=x?d.top-y-g-b.y:d.bottom+g+b.y,E=O+m;if(u.overlap!==!0)for(let T of a)T.left<E&&T.right>O&&T.top<C+y&&T.bottom>C&&(C=x?T.top-y-2-g:T.bottom+g+2);if(this.position=="absolute"?(c.style.top=(C-t.parent.top)/o+"px",NV(c,(O-t.parent.left)/i)):(c.style.top=C/o+"px",NV(c,O/i)),h){let T=d.left+(w?b.x:-b.x)-(O+14-7);h.style.left=T/i+"px"}u.overlap!==!0&&a.push({left:O,top:C,right:E,bottom:C+y}),c.classList.toggle("cm-tooltip-above",x),c.classList.toggle("cm-tooltip-below",!x),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Zv}},{eventObservers:{scroll(){this.maybeMeasure()}}});function NV(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const XYe=Xt.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),ZYe={x:0,y:0},gD=qt.define({enables:[pD,XYe]}),Nx=qt.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class AC{static create(e){return new AC(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new cG(e,Nx,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const qYe=gD.compute([Nx],t=>{let e=t.facet(Nx);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:AC.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class YYe{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof Kd)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let s=e.coordsAtPos(i);if(!s||n.y<s.top||n.y>s.bottom||n.x<s.left-e.defaultCharacterWidth||n.x>s.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(c=>c.from<=i&&c.to>=i),u=l&&l.dir==_i.RTL?-1:1;o=n.x<s.left?-u:u}let a=this.source(e,i,o);if(a!=null&&a.then){let s=this.pending={pos:i};a.then(l=>{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Ua(e.state,l,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(pD),n=e?e.manager.tooltips.findIndex(r=>r.create==AC.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!GYe(o.dom,e)||this.pending){let{pos:a}=i[0]||this.pending,s=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:a;(a==s?this.view.posAtCoords(this.lastMove)!=a:!KYe(this.view,a,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const t1=4;function GYe(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let s=a.getBoundingClientRect();i=Math.min(s.top,i),o=Math.max(s.bottom,o)}return e.clientX>=n-t1&&e.clientX<=r+t1&&e.clientY>=i-t1&&e.clientY<=o+t1}function KYe(t,e,n,r,i,o){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>r||a.right<r||a.top>i||Math.min(a.bottom,s)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function JYe(t,e={}){let n=jn.define(),r=xo.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(a=>!e.hideOn(o,a))),o.docChanged)){let a=[];for(let s of i){let l=o.changes.mapPos(s.pos,-1,Do.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),s);u.pos=l,u.end!=null&&(u.end=o.changes.mapPos(u.end)),a.push(u)}}i=a}for(let a of o.effects)a.is(n)&&(i=a.value),a.is(eGe)&&(i=[]);return i},provide:i=>Nx.from(i)});return{active:r,extension:[r,Ui.define(i=>new YYe(i,t,r,n,e.hoverTime||300)),qYe]}}function dG(t,e){let n=t.plugin(pD);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const eGe=jn.define(),DV=qt.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function G0(t,e){let n=t.plugin(fG),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const fG=Ui.fromClass(class{constructor(t){this.input=t.state.facet(K0),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(DV);this.top=new n1(t,!0,e.topContainer),this.bottom=new n1(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(DV);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new n1(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new n1(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(K0);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],a=[],s=[];for(let l of r){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),s.push(c)):(c=this.panels[u],c.update&&c.update(t)),i.push(c),(c.top?o:a).push(c)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Xt.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class n1{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=LV(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=LV(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function LV(t){let e=t.nextSibling;return t.remove(),e}const K0=qt.define({enables:fG});class rd extends dp{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}rd.prototype.elementClass="";rd.prototype.toDOM=void 0;rd.prototype.mapMode=Do.TrackBefore;rd.prototype.startSide=rd.prototype.endSide=-1;rd.prototype.point=!0;const G1=qt.define(),tGe=qt.define(),nGe={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Mr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Yy=qt.define();function rGe(t){return[hG(),Yy.of(Object.assign(Object.assign({},nGe),t))]}const aM=qt.define({combine:t=>t.some(e=>e)});function hG(t){let e=[iGe];return t&&t.fixed===!1&&e.push(aM.of(!0)),e}const iGe=Ui.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Yy).map(e=>new BV(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(aM),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(aM)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Mr.iter(this.view.state.facet(G1),this.view.viewport.from),r=[],i=this.gutters.map(o=>new oGe(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let a=!0;for(let s of o.type)if(s.type==wa.Text&&a){sM(n,r,s.from);for(let l of i)l.line(this.view,s,r);a=!1}else if(s.widget)for(let l of i)l.widget(this.view,s)}else if(o.type==wa.Text){sM(n,r,o.from);for(let a of i)a.line(this.view,o,r)}else if(o.widget)for(let a of i)a.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Yy),n=t.state.facet(Yy),r=t.docChanged||t.heightChanged||t.viewportChanged||!Mr.eq(t.startState.facet(G1),t.state.facet(G1),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let a=e.indexOf(o);a<0?i.push(new BV(this.view,o)):(this.gutters[a].update(t),i.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Xt.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==_i.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function IV(t){return Array.isArray(t)?t:[t]}function sM(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class oGe{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Mr.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==i.elements.length){let s=new pG(e,a,o,r);i.elements.push(s),i.dom.appendChild(s.dom)}else i.elements[this.i].update(e,a,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];sM(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(tGe)){let a=o(e,n.widget,n);a&&(i||(i=[])).push(a)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class BV{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=i.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[r](e,s,i)&&i.preventDefault()});this.markers=IV(n.markers(e)),n.initialSpacer&&(this.spacer=new pG(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=IV(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Mr.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class pG{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),aGe(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,a=0;;){let s=a,l=o<n.length?n[o++]:null,u=!1;if(l){let c=l.elementClass;c&&(r+=" "+c);for(let d=a;d<this.markers.length;d++)if(this.markers[d].compare(l)){s=d,u=!0;break}}else s=this.markers.length;for(;a<s;){let c=this.markers[a++];if(c.toDOM){c.destroy(i);let d=i.nextSibling;i.remove(),i=d}}if(!l)break;l.toDOM&&(u?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),u&&a++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function aGe(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const sGe=qt.define(),lGe=qt.define(),Og=qt.define({combine(t){return vc(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],a=n[i];r[i]=o?(s,l,u)=>o(s,l,u)||a(s,l,u):a}return r}})}});class x2 extends rd{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function S2(t,e){return t.state.facet(Og).formatNumber(e,t.state)}const uGe=Yy.compute([Og],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(sGe)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new x2(S2(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(lGe)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(Og)!=e.state.facet(Og),initialSpacer(e){return new x2(S2(e,FV(e.state.doc.lines)))},updateSpacer(e,n){let r=S2(n.view,FV(n.view.state.doc.lines));return r==e.number?e:new x2(r)},domEventHandlers:t.facet(Og).domEventHandlers}));function cGe(t={}){return[Og.of(t),hG(),uGe]}function FV(t){let e=9;for(;e<t;)e=e*10+9;return e}const dGe=new class extends rd{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},fGe=G1.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(dGe.range(i)))}return Mr.of(e)});function hGe(){return fGe}const gG=1024;let pGe=0;class C2{constructor(e,n){this.from=e,this.to=n}}class hr{constructor(e={}){this.id=pGe++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=is.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}hr.closedBy=new hr({deserialize:t=>t.split(" ")});hr.openedBy=new hr({deserialize:t=>t.split(" ")});hr.group=new hr({deserialize:t=>t.split(" ")});hr.isolate=new hr({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});hr.contextHash=new hr({perNode:!0});hr.lookAhead=new hr({perNode:!0});hr.mounted=new hr({perNode:!0});class Dx{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[hr.mounted.id]}}const gGe=Object.create(null);class is{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):gGe,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new is(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(hr.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(hr.group),o=-1;o<(i?i.length:0);o++){let a=n[o<0?r.name:i[o]];if(a)return a}}}}is.none=new is("",Object.create(null),0,8);class mD{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let a=o(r);a&&(i||(i=Object.assign({},r.props)),i[a[0].id]=a[1])}n.push(i?new is(r.name,i,r.id,r.flags):r)}return new mD(n)}}const r1=new WeakMap,VV=new WeakMap;var ao;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(ao||(ao={}));class Gi{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[a,s]of o)this.props[typeof a=="number"?a:a.id]=s}}toString(){let e=Dx.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new uM(this.topNode,e)}cursorAt(e,n=0,r=0){let i=r1.get(this)||this.topNode,o=new uM(i);return o.moveTo(e,n),r1.set(this,o._tree),o}get topNode(){return new Ka(this,0,0,null)}resolve(e,n=0){let r=J0(r1.get(this)||this.topNode,e,n,!1);return r1.set(this,r),r}resolveInner(e,n=0){let r=J0(VV.get(this)||this.topNode,e,n,!0);return VV.set(this,r),r}resolveStack(e,n=0){return yGe(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,a=e.mode||0,s=(a&ao.IncludeAnonymous)>0;for(let l=this.cursor(a|ao.IncludeAnonymous);;){let u=!1;if(l.from<=o&&l.to>=i&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&r&&(s||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:bD(is.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Gi(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Gi(is.none,n,r,i)))}static build(e){return bGe(e)}}Gi.empty=new Gi(is.none,[],[],0);class vD{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new vD(this.buffer,this.index)}}class Pf{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return is.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let a=[];for(;e<r;)a.push(this.childString(e)),e=this.buffer[e+3];return o+"("+a.join(",")+")"}findChild(e,n,r,i,o){let{buffer:a}=this,s=-1;for(let l=e;l!=n&&!(mG(o,i,a[l+1],a[l+2])&&(s=l,r>0));l=a[l+3]);return s}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),a=0;for(let s=e,l=0;s<n;){o[l++]=i[s++],o[l++]=i[s++]-r;let u=o[l++]=i[s++]-r;o[l++]=i[s++]-e,a=Math.max(a,u)}return new Pf(o,a,this.set)}}function mG(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function J0(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let a=!r&&t instanceof Ka&&t.index<0?null:t.parent;if(!a)return t;t=a}let o=r?0:ao.IgnoreOverlays;if(r)for(let a=t,s=a.parent;s;a=s,s=a.parent)a instanceof Ka&&a.index<0&&((i=s.enter(e,n,o))===null||i===void 0?void 0:i.from)!=a.from&&(t=s);for(;;){let a=t.enter(e,n,o);if(!a)return t;t=a}}class vG{cursor(e=0){return new uM(this,e)}getChild(e,n=null,r=null){let i=jV(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return jV(this,e,n,r)}resolve(e,n=0){return J0(this,e,n,!1)}resolveInner(e,n=0){return J0(this,e,n,!0)}matchContext(e){return lM(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Ka extends vG{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let a=this;;){for(let{children:s,positions:l}=a._tree,u=n>0?s.length:-1;e!=u;e+=n){let c=s[e],d=l[e]+a.from;if(!!mG(i,r,d,d+c.length)){if(c instanceof Pf){if(o&ao.ExcludeBuffers)continue;let f=c.findChild(0,c.buffer.length,n,r-d,i);if(f>-1)return new Qu(new mGe(a,c,e,d),null,f)}else if(o&ao.IncludeAnonymous||!c.type.isAnonymous||yD(c)){let f;if(!(o&ao.IgnoreMounts)&&(f=Dx.get(c))&&!f.overlay)return new Ka(f.tree,d,e,a);let h=new Ka(c,d,e,a);return o&ao.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?c.children.length-1:0,n,r,i)}}}if(o&ao.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&ao.IgnoreOverlays)&&(i=Dx.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:a,to:s}of i.overlay)if((n>0?a<=o:a<o)&&(n<0?s>=o:s>o))return new Ka(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function jV(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let a=!1;!a;)if(a=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function lM(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class mGe{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Qu extends vG{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Qu(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&ao.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Qu(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Qu(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Qu(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let a=r.buffer[this.index+1];e.push(r.slice(i,o,a)),n.push(0)}return new Gi(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function yG(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let a=t[o];(a.from>n.from||a.to<n.to)&&(n=a,e=o)}let r=n instanceof Ka&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new vGe(i,n)}class vGe{constructor(e,n){this.heads=e,this.node=n}get next(){return yG(this.heads)}}function yGe(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Ka?r:r.context.parent;o;o=o.parent)if(o.index<0){let a=o.parent;(i||(i=[r])).push(a.resolve(e,n)),o=a}else{let a=Dx.get(o.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let s=new Ka(a.tree,a.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(J0(s,e,n,!1))}}return i?yG(i):r}class uM{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Ka)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Ka?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&ao.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ao.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ao.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,a=e<0?-1:r._tree.children.length;o!=a;o+=e){let s=r._tree.children[o];if(this.mode&ao.IncludeAnonymous||s instanceof Pf||!s.type.isAnonymous||yD(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer){e:for(let i=this.index,o=this.stack.length;o>=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,r=o+1;break e}i=this.stack[--o]}}for(let i=r;i<this.stack.length;i++)n=new Qu(this.buffer,n,this.stack[i]);return this.bufferNode=new Qu(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return lM(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return lM(this._tree,e,i);let a=r[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function yD(t){return t.children.some(e=>e instanceof Pf||!e.type.isAnonymous||yD(e))}function bGe(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=gG,reused:o=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(n)?new vD(n,n.length):n,l=r.types,u=0,c=0;function d(S,C,E,T,P,A){let{id:D,start:$,end:N,size:z}=s,I=c,L=u;for(;z<0;)if(s.next(),z==-1){let K=o[D];E.push(K),T.push($-S);return}else if(z==-3){u=D;return}else if(z==-4){c=D;return}else throw new RangeError(`Unrecognized record size: ${z}`);let X=l[D],Q,W,G=$-S;if(N-$<=i&&(W=y(s.pos-C,P))){let K=new Uint16Array(W.size-W.skip),oe=s.pos-W.size,ne=K.length;for(;s.pos>oe;)ne=b(W.start,K,ne);Q=new Pf(K,N-W.start,r),G=W.start-S}else{let K=s.pos-z;s.next();let oe=[],ne=[],_e=D>=a?D:-1,Ce=0,U=N;for(;s.pos>K;)_e>=0&&s.id==_e&&s.size>=0?(s.end<=U-i&&(g(oe,ne,$,Ce,s.end,U,_e,I,L),Ce=oe.length,U=s.end),s.next()):A>2500?f($,K,oe,ne):d($,K,oe,ne,_e,A+1);if(_e>=0&&Ce>0&&Ce<oe.length&&g(oe,ne,$,Ce,$,U,_e,I,L),oe.reverse(),ne.reverse(),_e>-1&&Ce>0){let ie=h(X,L);Q=bD(X,oe,ne,0,oe.length,0,N-$,ie,ie)}else Q=m(X,oe,ne,N-$,I-N,L)}E.push(Q),T.push(G)}function f(S,C,E,T){let P=[],A=0,D=-1;for(;s.pos>C;){let{id:$,start:N,end:z,size:I}=s;if(I>4)s.next();else{if(D>-1&&N<D)break;D<0&&(D=z-i),P.push($,N,z),A++,s.next()}}if(A){let $=new Uint16Array(A*4),N=P[P.length-2];for(let z=P.length-3,I=0;z>=0;z-=3)$[I++]=P[z],$[I++]=P[z+1]-N,$[I++]=P[z+2]-N,$[I++]=I;E.push(new Pf($,P[2]-N,r)),T.push(N-S)}}function h(S,C){return(E,T,P)=>{let A=0,D=E.length-1,$,N;if(D>=0&&($=E[D])instanceof Gi){if(!D&&$.type==S&&$.length==P)return $;(N=$.prop(hr.lookAhead))&&(A=T[D]+$.length+N)}return m(S,E,T,P,A,C)}}function g(S,C,E,T,P,A,D,$,N){let z=[],I=[];for(;S.length>T;)z.push(S.pop()),I.push(C.pop()+E-P);S.push(m(r.types[D],z,I,A-P,$-A,N)),C.push(P-E)}function m(S,C,E,T,P,A,D){if(A){let $=[hr.contextHash,A];D=D?[$].concat(D):[$]}if(P>25){let $=[hr.lookAhead,P];D=D?[$].concat(D):[$]}return new Gi(S,C,E,T,D)}function y(S,C){let E=s.fork(),T=0,P=0,A=0,D=E.end-i,$={size:0,start:0,skip:0};e:for(let N=E.pos-S;E.pos>N;){let z=E.size;if(E.id==C&&z>=0){$.size=T,$.start=P,$.skip=A,A+=4,T+=4,E.next();continue}let I=E.pos-z;if(z<0||I<N||E.start<D)break;let L=E.id>=a?4:0,X=E.start;for(E.next();E.pos>I;){if(E.size<0)if(E.size==-3)L+=4;else break e;else E.id>=a&&(L+=4);E.next()}P=X,T+=z,A+=L}return(C<0||T==S)&&($.size=T,$.start=P,$.skip=A),$.size>4?$:void 0}function b(S,C,E){let{id:T,start:P,end:A,size:D}=s;if(s.next(),D>=0&&T<a){let $=E;if(D>4){let N=s.pos-(D-4);for(;s.pos>N;)E=b(S,C,E)}C[--E]=$,C[--E]=A-S,C[--E]=P-S,C[--E]=T}else D==-3?u=T:D==-4&&(c=T);return E}let w=[],O=[];for(;s.pos>0;)d(t.start||0,t.bufferStart||0,w,O,-1,0);let x=(e=t.length)!==null&&e!==void 0?e:w.length?O[0]+w[0].length:0;return new Gi(l[t.topID],w.reverse(),O.reverse(),x)}const QV=new WeakMap;function K1(t,e){if(!t.isAnonymous||e instanceof Pf||e.type!=t)return 1;let n=QV.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Gi)){n=1;break}n+=K1(t,r)}QV.set(e,n)}return n}function bD(t,e,n,r,i,o,a,s,l){let u=0;for(let g=r;g<i;g++)u+=K1(t,e[g]);let c=Math.ceil(u*1.5/8),d=[],f=[];function h(g,m,y,b,w){for(let O=y;O<b;){let x=O,S=m[O],C=K1(t,g[O]);for(O++;O<b;O++){let E=K1(t,g[O]);if(C+E>=c)break;C+=E}if(O==x+1){if(C>c){let E=g[x];h(E.children,E.positions,0,E.children.length,m[x]+w);continue}d.push(g[x])}else{let E=m[O-1]+g[O-1].length-S;d.push(bD(t,g,m,x,O,S,E,null,l))}f.push(S+w-o)}}return h(e,n,r,i,0),(s||l)(d,f,a)}class _Ge{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof Qu?this.setBuffer(e.context.buffer,e.index,n):e instanceof Ka&&this.map.set(e.tree,n)}get(e){return e instanceof Qu?this.getBuffer(e.context.buffer,e.index):e instanceof Ka?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Yh{constructor(e,n,r,i,o=!1,a=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new Yh(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,u=0;;s++){let c=s<n.length?n[s]:null,d=c?c.fromA:1e9;if(d-l>=r)for(;a&&a.from<d;){let f=a;if(l>=f.from||d<=f.to||u){let h=Math.max(f.from,l)-u,g=Math.min(f.to,d)-u;f=h>=g?null:new Yh(h,g,f.tree,f.offset+u,s>0,!!c)}if(f&&i.push(f),a.to>d)break;a=o<e.length?e[o++]:null}if(!c)break;l=c.toA,u=c.toA-c.toB}return i}}class bG{startParse(e,n,r){return typeof e=="string"&&(e=new OGe(e)),r=r?r.length?r.map(i=>new C2(i.from,i.to)):[new C2(0,0)]:[new C2(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class OGe{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new hr({perNode:!0});let wGe=0;class nl{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=wGe++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof nl&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new nl(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new Lx(e);return r=>r.modified.indexOf(n)>-1?r:Lx.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}}let xGe=0;class Lx{constructor(e){this.name=e,this.instances=[],this.id=xGe++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(s=>s.base==e&&SGe(n,s.modified));if(r)return r;let i=[],o=new nl(e.name,i,e,n);for(let s of n)s.instances.push(o);let a=CGe(n);for(let s of e.set)if(!s.modified.length)for(let l of a)i.push(Lx.get(s,l));return o}}function SGe(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function CGe(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function _D(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],a=2,s=i;for(let d=0;;){if(s=="..."&&d>0&&d+3==i.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+i);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),d+=f[0].length,d==i.length)break;let h=i[d++];if(d==i.length&&h=="!"){a=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);s=i.slice(d)}let l=o.length-1,u=o[l];if(!u)throw new RangeError("Invalid path: "+i);let c=new Ix(r,a,l>0?o.slice(0,l):null);e[u]=c.sort(e[u])}}return _G.add(e)}const _G=new hr;class Ix{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Ix.empty=new Ix([],2,null);function OG(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let a of o.tag)n[a.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let a=i;for(let s of o)for(let l of s.set){let u=n[l.id];if(u){a=a?a+" "+u:u;break}}return a},scope:r}}function EGe(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function TGe(t,e,n,r=0,i=t.length){let o=new kGe(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class kGe{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:a,from:s,to:l}=e;if(s>=r||l<=n)return;a.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(a)));let u=i,c=PGe(e)||Ix.empty,d=EGe(o,c.tags);if(d&&(u&&(u+=" "),u+=d,c.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,s),u),c.opaque)return;let f=e.tree&&e.tree.prop(hr.mounted);if(f&&f.overlay){let h=e.node.enter(f.overlay[0].from+s,1),g=this.highlighters.filter(y=>!y.scope||y.scope(f.tree.type)),m=e.firstChild();for(let y=0,b=s;;y++){let w=y<f.overlay.length?f.overlay[y]:null,O=w?w.from+s:l,x=Math.max(n,b),S=Math.min(r,O);if(x<S&&m)for(;e.from<S&&(this.highlightRange(e,x,S,i,o),this.startSpan(Math.min(S,e.to),u),!(e.to>=O||!e.nextSibling())););if(!w||O>r)break;b=w.to+s,b>n&&(this.highlightRange(h.cursor(),Math.max(n,w.from+s),Math.min(r,b),"",g),this.startSpan(Math.min(r,b),u))}m&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function PGe(t){let e=t.type.prop(_G);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Qt=nl.define,i1=Qt(),Vd=Qt(),zV=Qt(Vd),WV=Qt(Vd),jd=Qt(),o1=Qt(jd),E2=Qt(jd),Pu=Qt(),gh=Qt(Pu),Eu=Qt(),Tu=Qt(),cM=Qt(),qv=Qt(cM),a1=Qt(),et={comment:i1,lineComment:Qt(i1),blockComment:Qt(i1),docComment:Qt(i1),name:Vd,variableName:Qt(Vd),typeName:zV,tagName:Qt(zV),propertyName:WV,attributeName:Qt(WV),className:Qt(Vd),labelName:Qt(Vd),namespace:Qt(Vd),macroName:Qt(Vd),literal:jd,string:o1,docString:Qt(o1),character:Qt(o1),attributeValue:Qt(o1),number:E2,integer:Qt(E2),float:Qt(E2),bool:Qt(jd),regexp:Qt(jd),escape:Qt(jd),color:Qt(jd),url:Qt(jd),keyword:Eu,self:Qt(Eu),null:Qt(Eu),atom:Qt(Eu),unit:Qt(Eu),modifier:Qt(Eu),operatorKeyword:Qt(Eu),controlKeyword:Qt(Eu),definitionKeyword:Qt(Eu),moduleKeyword:Qt(Eu),operator:Tu,derefOperator:Qt(Tu),arithmeticOperator:Qt(Tu),logicOperator:Qt(Tu),bitwiseOperator:Qt(Tu),compareOperator:Qt(Tu),updateOperator:Qt(Tu),definitionOperator:Qt(Tu),typeOperator:Qt(Tu),controlOperator:Qt(Tu),punctuation:cM,separator:Qt(cM),bracket:qv,angleBracket:Qt(qv),squareBracket:Qt(qv),paren:Qt(qv),brace:Qt(qv),content:Pu,heading:gh,heading1:Qt(gh),heading2:Qt(gh),heading3:Qt(gh),heading4:Qt(gh),heading5:Qt(gh),heading6:Qt(gh),contentSeparator:Qt(Pu),list:Qt(Pu),quote:Qt(Pu),emphasis:Qt(Pu),strong:Qt(Pu),link:Qt(Pu),monospace:Qt(Pu),strikethrough:Qt(Pu),inserted:Qt(),deleted:Qt(),changed:Qt(),invalid:Qt(),meta:a1,documentMeta:Qt(a1),annotation:Qt(a1),processingInstruction:Qt(a1),definition:nl.defineModifier("definition"),constant:nl.defineModifier("constant"),function:nl.defineModifier("function"),standard:nl.defineModifier("standard"),local:nl.defineModifier("local"),special:nl.defineModifier("special")};for(let t in et){let e=et[t];e instanceof nl&&(e.name=t)}OG([{tag:et.link,class:"tok-link"},{tag:et.heading,class:"tok-heading"},{tag:et.emphasis,class:"tok-emphasis"},{tag:et.strong,class:"tok-strong"},{tag:et.keyword,class:"tok-keyword"},{tag:et.atom,class:"tok-atom"},{tag:et.bool,class:"tok-bool"},{tag:et.url,class:"tok-url"},{tag:et.labelName,class:"tok-labelName"},{tag:et.inserted,class:"tok-inserted"},{tag:et.deleted,class:"tok-deleted"},{tag:et.literal,class:"tok-literal"},{tag:et.string,class:"tok-string"},{tag:et.number,class:"tok-number"},{tag:[et.regexp,et.escape,et.special(et.string)],class:"tok-string2"},{tag:et.variableName,class:"tok-variableName"},{tag:et.local(et.variableName),class:"tok-variableName tok-local"},{tag:et.definition(et.variableName),class:"tok-variableName tok-definition"},{tag:et.special(et.variableName),class:"tok-variableName2"},{tag:et.definition(et.propertyName),class:"tok-propertyName tok-definition"},{tag:et.typeName,class:"tok-typeName"},{tag:et.namespace,class:"tok-namespace"},{tag:et.className,class:"tok-className"},{tag:et.macroName,class:"tok-macroName"},{tag:et.propertyName,class:"tok-propertyName"},{tag:et.operator,class:"tok-operator"},{tag:et.comment,class:"tok-comment"},{tag:et.meta,class:"tok-meta"},{tag:et.invalid,class:"tok-invalid"},{tag:et.punctuation,class:"tok-punctuation"}]);var T2;const wg=new hr;function wG(t){return qt.define({combine:t?e=>e.concat(t):void 0})}const OD=new hr;class eu{constructor(e,n,r=[],i=""){this.data=e,this.name=i,vr.prototype.hasOwnProperty("tree")||Object.defineProperty(vr.prototype,"tree",{get(){return lo(this)}}),this.parser=n,this.extension=[Af.of(this),vr.languageData.of((o,a,s)=>{let l=HV(o,a,s),u=l.type.prop(wg);if(!u)return[];let c=o.facet(u),d=l.type.prop(OD);if(d){let f=l.resolve(a-l.from,s);for(let h of d)if(h.test(f,o)){let g=o.facet(h.facet);return h.type=="replace"?g:g.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return HV(e,n,r).type.prop(wg)==this.data}findRegions(e){let n=e.facet(Af);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,a)=>{if(o.prop(wg)==this.data){r.push({from:a,to:a+o.length});return}let s=o.prop(hr.mounted);if(s){if(s.tree.prop(wg)==this.data){if(s.overlay)for(let l of s.overlay)r.push({from:l.from+a,to:l.to+a});else r.push({from:a,to:a+o.length});return}else if(s.overlay){let l=r.length;if(i(s.tree,s.overlay[0].from+a),r.length>l)return}}for(let l=0;l<o.children.length;l++){let u=o.children[l];u instanceof Gi&&i(u,o.positions[l]+a)}};return i(lo(e),0),r}get allowsNesting(){return!0}}eu.setState=jn.define();function HV(t,e,n){let r=t.facet(Af),i=lo(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,ao.ExcludeBuffers))o.type.isTop&&(i=o);return i}class eb extends eu{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=wG(e.languageData);return new eb(n,e.parser.configure({props:[wg.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new eb(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function lo(t){let e=t.field(eu.state,!1);return e?e.tree:Gi.empty}class AGe{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Yv=null;class Bx{constructor(e,n,r=[],i,o,a,s,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Bx(e,n,[],Gi.empty,0,r,[],null)}startParse(){return this.parser.startParse(new AGe(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Gi.empty&&this.isDone(n!=null?n:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Yh.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n!=null?n:this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Yh.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Yv;Yv=this;try{return e()}finally{Yv=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=UV(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,d,f)=>l.push({fromA:u,toA:c,fromB:d,toB:f})),r=Yh.applyChanges(r,l),i=Gi.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),d=e.mapPos(u.to,-1);c<d&&s.push({from:c,to:d})}}}return new Bx(this.parser,n,r,i,o,a,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=UV(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends bG{createParse(n,r,i){let o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance(){let l=Yv;if(l){for(let u of i)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new Gi(is.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Yv}}function UV(t,e,n){return Yh.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Tm{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Tm(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Bx.create(e.facet(Af).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Tm(r)}}eu.state=xo.define({create:Tm.init,update(t,e){for(let n of e.effects)if(n.is(eu.setState))return n.value;return e.startState.facet(Af)!=e.state.facet(Af)?Tm.init(e.state):t.apply(e)}});let xG=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback!="undefined"&&(xG=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const k2=typeof navigator!="undefined"&&((T2=navigator.scheduling)===null||T2===void 0?void 0:T2.isInputPending)?()=>navigator.scheduling.isInputPending():null,MGe=Ui.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(eu.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(eu.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=xG(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(eu.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!k2?Math.max(25,e.timeRemaining()-5):1e9),s=o.context.treeLen<i&&r.doc.length>i+1e3,l=o.context.work(()=>k2&&k2()||Date.now()>a,i+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:eu.setState.of(new Tm(o.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Ua(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Af=qt.define({combine(t){return t.length?t[0]:null},enables:t=>[eu.state,MGe,Xt.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class SG{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const RGe=qt.define(),Gb=qt.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Fx(t){let e=t.facet(Gb);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function tb(t,e){let n="",r=t.tabSize,i=t.facet(Gb)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function wD(t,e){t instanceof vr&&(t=new MC(t));for(let r of t.state.facet(RGe)){let i=r(t,e);if(i!==void 0)return i}let n=lo(t.state);return n.length>=e?$Ge(t,n,e):null}class MC{constructor(e,n={}){this.state=e,this.options=n,this.unit=Fx(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return ov(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const xD=new hr;function $Ge(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let a=i;a&&!(a.from==r.node.from&&a.type==r.node.type);a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)r={node:o[a],next:r}}return CG(r,t,n)}function CG(t,e,n){for(let r=t;r;r=r.next){let i=DGe(r.node);if(i)return i(SD.create(e,n,r))}return 0}function NGe(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function DGe(t){let e=t.type.prop(xD);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(hr.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return a=>EG(a,!0,1,void 0,o&&!NGe(a)?i.from:void 0)}return t.parent==null?LGe:null}function LGe(){return 0}class SD extends MC{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new SD(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(IGe(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return CG(this.context.next,this.base,this.pos)}}function IGe(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function BGe(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=a)return null;let u=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+u}}s=l.to}}function FGe({closing:t,align:e=!0,units:n=1}){return r=>EG(r,e,n,t)}function EG(t,e,n,r,i){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,l=e?BGe(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const VGe=t=>t.baseIndent;function Gy({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const jGe=200;function QGe(){return vr.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+jGe)return t;let o=n.sliceString(i.from,r);if(!e.some(u=>u.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:u}of a.selection.ranges){let c=a.doc.lineAt(u);if(c.from==s)continue;s=c.from;let d=wD(a,c.from);if(d==null)continue;let f=/^\s*/.exec(c.text)[0],h=tb(a,d);f!=h&&l.push({from:c.from,to:c.from+f.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const zGe=qt.define(),CD=new hr;function TG(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function WGe(t,e,n){let r=lo(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let a=i;a;a=a.next){let s=a.node;if(s.to<=n||s.from>n)continue;if(o&&s.from<e)break;let l=s.type.prop(CD);if(l&&(s.to<r.length-50||r.length==t.doc.length||!HGe(s))){let u=l(s,t);u&&u.from<=n&&u.from>=e&&u.to>n&&(o=u)}}return o}function HGe(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Vx(t,e,n){for(let r of t.facet(zGe)){let i=r(t,e,n);if(i)return i}return WGe(t,e,n)}function kG(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const RC=jn.define({map:kG}),Kb=jn.define({map:kG});function PG(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const gp=xo.define({create(){return pn.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(RC)&&!UGe(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(ED),i=r?pn.replace({widget:new JGe(r(e.state,n.value))}):XV;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(Kb)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>Xt.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(XV.range(r,i))}return pn.set(e,!0)}});function jx(t,e,n){var r;let i=null;return(r=t.field(gp,!1))===null||r===void 0||r.between(e,n,(o,a)=>{(!i||i.from>o)&&(i={from:o,to:a})}),i}function UGe(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function AG(t,e){return t.field(gp,!1)?e:e.concat(jn.appendConfig.of(RG()))}const XGe=t=>{for(let e of PG(t)){let n=Vx(t.state,e.from,e.to);if(n)return t.dispatch({effects:AG(t.state,[RC.of(n),MG(t,n)])}),!0}return!1},ZGe=t=>{if(!t.state.field(gp,!1))return!1;let e=[];for(let n of PG(t)){let r=jx(t.state,n.from,n.to);r&&e.push(Kb.of(r),MG(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function MG(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return Xt.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const qGe=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=Vx(e,i.from,i.to);o&&n.push(RC.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:AG(t.state,n)}),!!n.length},YGe=t=>{let e=t.state.field(gp,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(Kb.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},GGe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:XGe},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:ZGe},{key:"Ctrl-Alt-[",run:qGe},{key:"Ctrl-Alt-]",run:YGe}],KGe={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},ED=qt.define({combine(t){return vc(t,KGe)}});function RG(t){let e=[gp,nKe];return t&&e.push(ED.of(t)),e}function $G(t,e){let{state:n}=t,r=n.facet(ED),i=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=jx(t.state,s.from,s.to);l&&t.dispatch({effects:Kb.of(l)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const XV=pn.replace({widget:new class extends yc{toDOM(t){return $G(t,null)}}});class JGe extends yc{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return $G(e,this.value)}}const eKe={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class P2 extends rd{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function tKe(t={}){let e=Object.assign(Object.assign({},eKe),t),n=new P2(e,!0),r=new P2(e,!1),i=Ui.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Af)!=a.state.facet(Af)||a.startState.field(gp,!1)!=a.state.field(gp,!1)||lo(a.startState)!=lo(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new td;for(let l of a.viewportLineBlocks){let u=jx(a.state,l.from,l.to)?r:Vx(a.state,l.from,l.to)?n:null;u&&s.add(l.from,l.from,u)}return s.finish()}}),{domEventHandlers:o}=e;return[i,rGe({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(i))===null||s===void 0?void 0:s.markers)||Mr.empty},initialSpacer(){return new P2(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(a,s,l)=>{if(o.click&&o.click(a,s,l))return!0;let u=jx(a.state,s.from,s.to);if(u)return a.dispatch({effects:Kb.of(u)}),!0;let c=Vx(a.state,s.from,s.to);return c?(a.dispatch({effects:RC.of(c)}),!0):!1}})}),RG()]}const nKe=Xt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class $C{constructor(e,n){this.specs=e;let r;function i(s){let l=Ef.newName();return(r||(r=Object.create(null)))["."+l]=s,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof eu?s=>s.prop(wg)==a.data:a?s=>s==a:void 0,this.style=OG(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=r?new Ef(r):null,this.themeType=n.themeType}static define(e,n){return new $C(e,n||{})}}const dM=qt.define(),NG=qt.define({combine(t){return t.length?[t[0]]:null}});function A2(t){let e=t.facet(dM);return e.length?e:t.facet(NG)}function rKe(t,e){let n=[oKe],r;return t instanceof $C&&(t.module&&n.push(Xt.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(NG.of(t)):r?n.push(dM.computeN([Xt.darkTheme],i=>i.facet(Xt.darkTheme)==(r=="dark")?[t]:[])):n.push(dM.of(t)),n}class iKe{constructor(e){this.markCache=Object.create(null),this.tree=lo(e.state),this.decorations=this.buildDeco(e,A2(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=lo(e.state),r=A2(e.state),i=r!=A2(e.startState),{viewport:o}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length<o.to&&!i&&n.type==this.tree.type&&a>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return pn.none;let r=new td;for(let{from:i,to:o}of e.visibleRanges)TGe(this.tree,n,(a,s,l)=>{r.add(a,s,this.markCache[l]||(this.markCache[l]=pn.mark({class:l})))},i,o);return r.finish()}}const oKe=Xf.high(Ui.fromClass(iKe,{decorations:t=>t.decorations})),aKe=$C.define([{tag:et.meta,color:"#404740"},{tag:et.link,textDecoration:"underline"},{tag:et.heading,textDecoration:"underline",fontWeight:"bold"},{tag:et.emphasis,fontStyle:"italic"},{tag:et.strong,fontWeight:"bold"},{tag:et.strikethrough,textDecoration:"line-through"},{tag:et.keyword,color:"#708"},{tag:[et.atom,et.bool,et.url,et.contentSeparator,et.labelName],color:"#219"},{tag:[et.literal,et.inserted],color:"#164"},{tag:[et.string,et.deleted],color:"#a11"},{tag:[et.regexp,et.escape,et.special(et.string)],color:"#e40"},{tag:et.definition(et.variableName),color:"#00f"},{tag:et.local(et.variableName),color:"#30a"},{tag:[et.typeName,et.namespace],color:"#085"},{tag:et.className,color:"#167"},{tag:[et.special(et.variableName),et.macroName],color:"#256"},{tag:et.definition(et.propertyName),color:"#00c"},{tag:et.comment,color:"#940"},{tag:et.invalid,color:"#f00"}]),sKe=Xt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),DG=1e4,LG="()[]{}",IG=qt.define({combine(t){return vc(t,{afterCursor:!0,brackets:LG,maxScanDistance:DG,renderMatch:cKe})}}),lKe=pn.mark({class:"cm-matchingBracket"}),uKe=pn.mark({class:"cm-nonmatchingBracket"});function cKe(t){let e=[],n=t.matched?lKe:uKe;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const dKe=xo.define({create(){return pn.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(IG);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=zu(e.state,i.head,-1,r)||i.head>0&&zu(e.state,i.head-1,1,r)||r.afterCursor&&(zu(e.state,i.head,1,r)||i.head<e.state.doc.length&&zu(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return pn.set(n,!0)},provide:t=>Xt.decorations.from(t)}),fKe=[dKe,sKe];function hKe(t={}){return[IG.of(t),fKe]}const pKe=new hr;function fM(t,e,n){let r=t.prop(e<0?hr.openedBy:hr.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function hM(t){let e=t.type.prop(pKe);return e?e(t.node):t}function zu(t,e,n,r={}){let i=r.maxScanDistance||DG,o=r.brackets||LG,a=lo(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let u=fM(l.type,n,o);if(u&&l.from<l.to){let c=hM(l);if(c&&(n>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return gKe(t,e,n,l,c,u,o)}}return mKe(t,e,n,a,s.type,i,o)}function gKe(t,e,n,r,i,o,a){let s=r.parent,l={from:i.from,to:i.to},u=0,c=s==null?void 0:s.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(u==0&&o.indexOf(c.type.name)>-1&&c.from<c.to){let d=hM(c);return{start:l,end:d?{from:d.from,to:d.to}:void 0,matched:!0}}else if(fM(c.type,n,a))u++;else if(fM(c.type,-n,a)){if(u==0){let d=hM(c);return{start:l,end:d&&d.from<d.to?{from:d.from,to:d.to}:void 0,matched:!1}}u--}}while(n<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}function mKe(t,e,n,r,i,o,a){let s=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=a.indexOf(s);if(l<0||l%2==0!=n>0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let f=0;!c.next().done&&f<=o;){let h=c.value;n<0&&(f+=h.length);let g=e+f*n;for(let m=n>0?0:h.length-1,y=n>0?h.length:-1;m!=y;m+=n){let b=a.indexOf(h[m]);if(!(b<0||r.resolveInner(g+m,1).type!=i))if(b%2==0==n>0)d++;else{if(d==1)return{start:u,end:{from:g+m,to:g+m+1},matched:b>>1==l>>1};d--}}n>0&&(f+=h.length)}return c.done?{start:u,matched:!1}:null}const vKe=Object.create(null),ZV=[is.none],qV=[],YV=Object.create(null),yKe=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])yKe[t]=bKe(vKe,e);function M2(t,e){qV.indexOf(t)>-1||(qV.push(t),console.warn(e))}function bKe(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let u of s.split(".")){let c=t[u]||et[u];c?typeof c=="function"?l.length?l=l.map(c):M2(u,`Modifier ${u} used at start of tag`):l.length?M2(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:M2(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(s=>s.id),o=YV[i];if(o)return o.id;let a=YV[i]=is.define({id:ZV.length,name:r,props:[_D({[r]:n})]});return ZV.push(a),a.id}_i.RTL,_i.LTR;const _Ke=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=kD(t.state,n.from);return r.line?OKe(t):r.block?xKe(t):!1};function TD(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const OKe=TD(EKe,0),wKe=TD(BG,0),xKe=TD((t,e)=>BG(t,e,CKe(e)),0);function kD(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Gv=50;function SKe(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-Gv,r),a=t.sliceDoc(i,i+Gv),s=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(a)[0].length,u=o.length-s;if(o.slice(u-e.length,u)==e&&a.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let c,d;i-r<=2*Gv?c=d=t.sliceDoc(r,i):(c=t.sliceDoc(r,r+Gv),d=t.sliceDoc(i-Gv,i));let f=/^\s*/.exec(c)[0].length,h=/\s*$/.exec(d)[0].length,g=d.length-h-n.length;return c.slice(f,f+e.length)==e&&d.slice(g,g+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(c.charAt(f+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(d.charAt(g-1))?1:0}}:null}function CKe(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function BG(t,e,n=e.selection.ranges){let r=n.map(o=>kD(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,a)=>SKe(e,r[a],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,a)=>i[a]?[]:[{from:o.from,insert:r[a].open+" "},{from:o.to,insert:" "+r[a].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let a=0,s;a<i.length;a++)if(s=i[a]){let l=r[a],{open:u,close:c}=s;o.push({from:u.pos-l.open.length,to:u.pos+u.margin},{from:c.pos-c.margin,to:c.pos+l.close.length})}return{changes:o}}return null}function EKe(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:a}of n){let s=r.length,l=1e9,u=kD(e,o).line;if(!!u){for(let c=o;c<=a;){let d=e.doc.lineAt(c);if(d.from>i&&(o==a||a>d.from)){i=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,g=d.text.slice(f,f+u.length)==u?f:-1;f<d.text.length&&f<l&&(l=f),r.push({line:d,comment:g,token:u,indent:f,empty:h,single:!1})}c=d.to+1}if(l<1e9)for(let c=s;c<r.length;c++)r[c].indent<r[c].line.text.length&&(r[c].indent=l);r.length==s+1&&(r[s].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:l,indent:u,empty:c,single:d}of r)(d||!c)&&o.push({from:s.from+u,insert:l+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:s,token:l}of r)if(s>=0){let u=a.from+s,c=u+l.length;a.text[c-a.from]==" "&&c++,o.push({from:u,to:c})}return{changes:o}}return null}const pM=md.define(),TKe=md.define(),kKe=qt.define(),FG=qt.define({combine(t){return vc(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),VG=xo.define({create(){return Wu.empty},update(t,e){let n=e.state.facet(FG),r=e.annotation(pM);if(r){let l=Xa.fromTransaction(e,r.selection),u=r.side,c=u==0?t.undone:t.done;return l?c=Qx(c,c.length,n.minDepth,l):c=zG(c,e.startState.selection),new Wu(u==0?r.rest:c,u==0?c:r.rest)}let i=e.annotation(TKe);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Yi.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Xa.fromTransaction(e),a=e.annotation(Yi.time),s=e.annotation(Yi.userEvent);return o?t=t.addChanges(o,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Wu(t.done.map(Xa.fromJSON),t.undone.map(Xa.fromJSON))}});function PKe(t={}){return[VG,FG.of(t),Xt.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?jG:e.inputType=="historyRedo"?gM:null;return r?(e.preventDefault(),r(n)):!1}})]}function NC(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(VG,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const jG=NC(0,!1),gM=NC(1,!1),AKe=NC(0,!0),MKe=NC(1,!0);class Xa{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new Xa(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Xa(e.changes&&oo.fromJSON(e.changes),[],e.mapped&&Yu.fromJSON(e.mapped),e.startSelection&&bt.fromJSON(e.startSelection),e.selectionsAfter.map(bt.fromJSON))}static fromTransaction(e,n){let r=ll;for(let i of e.startState.facet(kKe)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new Xa(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,ll)}static selection(e){return new Xa(void 0,ll,void 0,void 0,e)}}function Qx(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function RKe(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,a,s)=>{for(let l=0;l<n.length;){let u=n[l++],c=n[l++];s>=u&&a<=c&&(r=!0)}}),r}function $Ke(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function QG(t,e){return t.length?e.length?t.concat(e):t:e}const ll=[],NKe=200;function zG(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-NKe));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Qx(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Xa.selection([e])]}function DKe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function R2(t,e){if(!t.length)return t;let n=t.length,r=ll;for(;n;){let i=LKe(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[Xa.selection(r)]:ll}function LKe(t,e,n){let r=QG(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):ll,n);if(!t.changes)return Xa.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new Xa(i,jn.mapEffects(t.effects,e),a,t.startSelection.map(o),r)}const IKe=/^(input\.type|delete)($|\.)/;class Wu{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Wu(this.done,this.undone):this}addChanges(e,n,r,i,o){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!r||IKe.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,RKe(s.changes,e.changes))||r=="input.type.compose")?a=Qx(a,a.length-1,i.minDepth,new Xa(e.changes.compose(s.changes),QG(jn.mapEffects(e.effects,s.changes),s.effects),s.mapped,s.startSelection,ll)):a=Qx(a,a.length,i.minDepth,e),new Wu(a,ll,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:ll;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&$Ke(o[o.length-1],e)?this:new Wu(zG(this.done,e),this.undone,n,r)}addMapping(e){return new Wu(R2(this.done,e),R2(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],a=o.selectionsAfter[0]||n.selection;if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:pM.of({side:e,rest:DKe(i),selection:a}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let s=i.length==1?ll:i.slice(0,i.length-1);return o.mapped&&(s=R2(s,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:pM.of({side:e,rest:s,selection:a}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Wu.empty=new Wu(ll,ll);const BKe=[{key:"Mod-z",run:jG,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:gM,preventDefault:!0},{linux:"Ctrl-Shift-z",run:gM,preventDefault:!0},{key:"Mod-u",run:AKe,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:MKe,preventDefault:!0}];function av(t,e){return bt.create(t.ranges.map(e),t.mainIndex)}function bc(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function vu({state:t,dispatch:e},n){let r=av(t.selection,n);return r.eq(t.selection,!0)?!1:(e(bc(t,r)),!0)}function DC(t,e){return bt.cursor(e?t.to:t.from)}function WG(t,e){return vu(t,n=>n.empty?t.moveByChar(n,e):DC(n,e))}function ua(t){return t.textDirectionAt(t.state.selection.main.head)==_i.LTR}const HG=t=>WG(t,!ua(t)),UG=t=>WG(t,ua(t));function XG(t,e){return vu(t,n=>n.empty?t.moveByGroup(n,e):DC(n,e))}const FKe=t=>XG(t,!ua(t)),VKe=t=>XG(t,ua(t));function jKe(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function LC(t,e,n){let r=lo(t).resolveInner(e.head),i=n?hr.closedBy:hr.openedBy;for(let l=e.head;;){let u=n?r.childAfter(l):r.childBefore(l);if(!u)break;jKe(t,u,i)?r=u:l=n?u.to:u.from}let o=r.type.prop(i),a,s;return o&&(a=n?zu(t,r.from,1):zu(t,r.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?r.to:r.from,bt.cursor(s,n?-1:1)}const QKe=t=>vu(t,e=>LC(t.state,e,!ua(t))),zKe=t=>vu(t,e=>LC(t.state,e,ua(t)));function ZG(t,e){return vu(t,n=>{if(!n.empty)return DC(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const qG=t=>ZG(t,!1),YG=t=>ZG(t,!0);function GG(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(Xt.scrollMargins)){let a=o(t);a!=null&&a.top&&(n=Math.max(a==null?void 0:a.top,n)),a!=null&&a.bottom&&(r=Math.max(a==null?void 0:a.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function KG(t,e){let n=GG(t),{state:r}=t,i=av(r.selection,a=>a.empty?t.moveVertically(a,e,n.height):DC(a,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let a=t.coordsAtPos(r.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,u=s.bottom-n.marginBottom;a&&a.top>l&&a.bottom<u&&(o=Xt.scrollIntoView(i.main.head,{y:"start",yMargin:a.top-l}))}return t.dispatch(bc(r,i),{effects:o}),!0}const GV=t=>KG(t,!1),mM=t=>KG(t,!0);function Zf(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=bt.cursor(r.from+o))}return i}const WKe=t=>vu(t,e=>Zf(t,e,!0)),HKe=t=>vu(t,e=>Zf(t,e,!1)),UKe=t=>vu(t,e=>Zf(t,e,!ua(t))),XKe=t=>vu(t,e=>Zf(t,e,ua(t))),ZKe=t=>vu(t,e=>bt.cursor(t.lineBlockAt(e.head).from,1)),qKe=t=>vu(t,e=>bt.cursor(t.lineBlockAt(e.head).to,-1));function YKe(t,e,n){let r=!1,i=av(t.selection,o=>{let a=zu(t,o.head,-1)||zu(t,o.head,1)||o.head>0&&zu(t,o.head-1,1)||o.head<t.doc.length&&zu(t,o.head+1,-1);if(!a||!a.end)return o;r=!0;let s=a.start.from==o.head?a.end.to:a.end.from;return n?bt.range(o.anchor,s):bt.cursor(s)});return r?(e(bc(t,i)),!0):!1}const GKe=({state:t,dispatch:e})=>YKe(t,e,!1);function Rl(t,e){let n=av(t.state.selection,r=>{let i=e(r);return bt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(bc(t.state,n)),!0)}function JG(t,e){return Rl(t,n=>t.moveByChar(n,e))}const eK=t=>JG(t,!ua(t)),tK=t=>JG(t,ua(t));function nK(t,e){return Rl(t,n=>t.moveByGroup(n,e))}const KKe=t=>nK(t,!ua(t)),JKe=t=>nK(t,ua(t)),eJe=t=>Rl(t,e=>LC(t.state,e,!ua(t))),tJe=t=>Rl(t,e=>LC(t.state,e,ua(t)));function rK(t,e){return Rl(t,n=>t.moveVertically(n,e))}const iK=t=>rK(t,!1),oK=t=>rK(t,!0);function aK(t,e){return Rl(t,n=>t.moveVertically(n,e,GG(t).height))}const KV=t=>aK(t,!1),JV=t=>aK(t,!0),nJe=t=>Rl(t,e=>Zf(t,e,!0)),rJe=t=>Rl(t,e=>Zf(t,e,!1)),iJe=t=>Rl(t,e=>Zf(t,e,!ua(t))),oJe=t=>Rl(t,e=>Zf(t,e,ua(t))),aJe=t=>Rl(t,e=>bt.cursor(t.lineBlockAt(e.head).from)),sJe=t=>Rl(t,e=>bt.cursor(t.lineBlockAt(e.head).to)),ej=({state:t,dispatch:e})=>(e(bc(t,{anchor:0})),!0),tj=({state:t,dispatch:e})=>(e(bc(t,{anchor:t.doc.length})),!0),nj=({state:t,dispatch:e})=>(e(bc(t,{anchor:t.selection.main.anchor,head:0})),!0),rj=({state:t,dispatch:e})=>(e(bc(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),lJe=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),uJe=({state:t,dispatch:e})=>{let n=IC(t).map(({from:r,to:i})=>bt.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:bt.create(n),userEvent:"select"})),!0},cJe=({state:t,dispatch:e})=>{let n=av(t.selection,r=>{let i=lo(t),o=i.resolveStack(r.from,1);if(r.empty){let a=i.resolveStack(r.from,-1);a.node.from>=o.node.from&&a.node.to<=o.node.to&&(o=a)}for(let a=o;a;a=a.next){let{node:s}=a;if((s.from<r.from&&s.to>=r.to||s.to>r.to&&s.from<=r.from)&&a.next)return bt.range(s.to,s.from)}return r});return n.eq(t.selection)?!1:(e(bc(t,n)),!0)},dJe=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=bt.create([n.main]):n.main.empty||(r=bt.create([bt.cursor(n.main.head)])),r?(e(bc(t,r)),!0):!1};function Jb(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:a,to:s}=o;if(a==s){let l=e(o);l<a?(n="delete.backward",l=s1(t,l,!1)):l>a&&(n="delete.forward",l=s1(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=s1(t,a,!1),s=s1(t,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:bt.cursor(a,a<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?Xt.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function s1(t,e,n){if(t instanceof Xt)for(let r of t.state.facet(Xt.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const sK=(t,e,n)=>Jb(t,r=>{let i=r.from,{state:o}=t,a=o.doc.lineAt(i),s,l;if(n&&!e&&i>a.from&&i<a.from+200&&!/[^ \t]/.test(s=a.text.slice(0,i-a.from))){if(s[s.length-1]==" ")return i-1;let u=ov(s,o.tabSize),c=u%Fx(o)||Fx(o);for(let d=0;d<c&&s[s.length-1-d]==" ";d++)i--;l=i}else l=Io(a.text,i-a.from,e,e)+a.from,l==i&&a.number!=(e?o.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(l-a.from,i-a.from))&&(l=Io(a.text,l-a.from,!1,!1)+a.from);return l}),vM=t=>sK(t,!1,!0),lK=t=>sK(t,!0,!1),uK=(t,e)=>Jb(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let s=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Io(o.text,r-o.from,e)+o.from,u=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),c=a(u);if(s!=null&&c!=s)break;(u!=" "||r!=n.head)&&(s=c),r=l}return r}),cK=t=>uK(t,!1),fJe=t=>uK(t,!0),hJe=t=>Jb(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),pJe=t=>Jb(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),gJe=t=>Jb(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),mJe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Rr.of(["",""])},range:bt.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},vJe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),a=i==o.from?i-1:Io(o.text,i-o.from,!1)+o.from,s=i==o.to?i+1:Io(o.text,i-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:t.doc.slice(i,s).append(t.doc.slice(a,i))},range:bt.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function IC(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function dK(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of IC(t)){if(n?o.to==t.doc.length:o.from==0)continue;let a=t.doc.lineAt(n?o.to+1:o.from-1),s=a.length+1;if(n){r.push({from:o.to,to:a.to},{from:o.from,insert:a.text+t.lineBreak});for(let l of o.ranges)i.push(bt.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{r.push({from:a.from,to:o.from},{from:o.to,insert:t.lineBreak+a.text});for(let l of o.ranges)i.push(bt.range(l.anchor-s,l.head-s))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:bt.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const yJe=({state:t,dispatch:e})=>dK(t,e,!1),bJe=({state:t,dispatch:e})=>dK(t,e,!0);function fK(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of IC(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const _Je=({state:t,dispatch:e})=>fK(t,e,!1),OJe=({state:t,dispatch:e})=>fK(t,e,!0),wJe=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(IC(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=av(e.selection,i=>{let o;if(t.lineWrapping){let a=t.lineBlockAt(i.head),s=t.coordsAtPos(i.head,i.assoc||1);s&&(o=a.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function xJe(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=lo(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(hr.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const ij=hK(!1),SJe=hK(!0);function hK(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:a}=i,s=e.doc.lineAt(o),l=!t&&o==a&&xJe(e,o);t&&(o=a=(a<=s.to?s:e.doc.lineAt(a)).to);let u=new MC(e,{simulateBreak:o,simulateDoubleBreak:!!l}),c=wD(u,o);for(c==null&&(c=ov(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));a<s.to&&/\s/.test(s.text[a-s.from]);)a++;l?{from:o,to:a}=l:o>s.from&&o<s.from+100&&!/\S/.test(s.text.slice(0,o))&&(o=s.from);let d=["",tb(e,c)];return l&&d.push(tb(e,u.lineIndent(s.from,-1))),{changes:{from:o,to:a,insert:Rr.of(d)},range:bt.cursor(o+1+d[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function PD(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let s=t.doc.lineAt(a);s.number>n&&(r.empty||r.to>s.from)&&(e(s,i,r),n=s.number),a=s.to+1}let o=t.changes(i);return{changes:i,range:bt.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const CJe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new MC(t,{overrideIndentation:o=>{let a=n[o];return a==null?-1:a}}),i=PD(t,(o,a,s)=>{let l=wD(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let u=/^\s*/.exec(o.text)[0],c=tb(t,l);(u!=c||s.from<o.from+u.length)&&(n[o.from]=l,a.push({from:o.from,to:o.from+u.length,insert:c}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},pK=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(PD(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Gb)})}),{userEvent:"input.indent"})),!0),gK=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(PD(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=ov(i,t.tabSize),a=0,s=tb(t,Math.max(0,o-Fx(t)));for(;a<i.length&&a<s.length&&i.charCodeAt(a)==s.charCodeAt(a);)a++;r.push({from:n.from+a,to:n.from+i.length,insert:s.slice(a)})}),{userEvent:"delete.dedent"})),!0),EJe=t=>(t.setTabFocusMode(),!0),TJe=[{key:"Ctrl-b",run:HG,shift:eK,preventDefault:!0},{key:"Ctrl-f",run:UG,shift:tK},{key:"Ctrl-p",run:qG,shift:iK},{key:"Ctrl-n",run:YG,shift:oK},{key:"Ctrl-a",run:ZKe,shift:aJe},{key:"Ctrl-e",run:qKe,shift:sJe},{key:"Ctrl-d",run:lK},{key:"Ctrl-h",run:vM},{key:"Ctrl-k",run:hJe},{key:"Ctrl-Alt-h",run:cK},{key:"Ctrl-o",run:mJe},{key:"Ctrl-t",run:vJe},{key:"Ctrl-v",run:mM}],kJe=[{key:"ArrowLeft",run:HG,shift:eK,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:FKe,shift:KKe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:UKe,shift:iJe,preventDefault:!0},{key:"ArrowRight",run:UG,shift:tK,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:VKe,shift:JKe,preventDefault:!0},{mac:"Cmd-ArrowRight",run:XKe,shift:oJe,preventDefault:!0},{key:"ArrowUp",run:qG,shift:iK,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ej,shift:nj},{mac:"Ctrl-ArrowUp",run:GV,shift:KV},{key:"ArrowDown",run:YG,shift:oK,preventDefault:!0},{mac:"Cmd-ArrowDown",run:tj,shift:rj},{mac:"Ctrl-ArrowDown",run:mM,shift:JV},{key:"PageUp",run:GV,shift:KV},{key:"PageDown",run:mM,shift:JV},{key:"Home",run:HKe,shift:rJe,preventDefault:!0},{key:"Mod-Home",run:ej,shift:nj},{key:"End",run:WKe,shift:nJe,preventDefault:!0},{key:"Mod-End",run:tj,shift:rj},{key:"Enter",run:ij,shift:ij},{key:"Mod-a",run:lJe},{key:"Backspace",run:vM,shift:vM},{key:"Delete",run:lK},{key:"Mod-Backspace",mac:"Alt-Backspace",run:cK},{key:"Mod-Delete",mac:"Alt-Delete",run:fJe},{mac:"Mod-Backspace",run:pJe},{mac:"Mod-Delete",run:gJe}].concat(TJe.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),PJe=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:QKe,shift:eJe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:zKe,shift:tJe},{key:"Alt-ArrowUp",run:yJe},{key:"Shift-Alt-ArrowUp",run:_Je},{key:"Alt-ArrowDown",run:bJe},{key:"Shift-Alt-ArrowDown",run:OJe},{key:"Escape",run:dJe},{key:"Mod-Enter",run:SJe},{key:"Alt-l",mac:"Ctrl-l",run:uJe},{key:"Mod-i",run:cJe,preventDefault:!0},{key:"Mod-[",run:gK},{key:"Mod-]",run:pK},{key:"Mod-Alt-\\",run:CJe},{key:"Shift-Mod-k",run:wJe},{key:"Shift-Mod-\\",run:GKe},{key:"Mod-/",run:_Ke},{key:"Alt-A",run:wKe},{key:"Ctrl-m",mac:"Shift-Alt-m",run:EJe}].concat(kJe),AJe={key:"Tab",run:pK,shift:gK};function ci(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)mK(t,arguments[e]);return t}function mK(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)mK(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const oj=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class km{constructor(e,n,r=0,i=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?s=>o(oj(s)):oj,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Qa(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=eD(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Bu(e);let i=this.normalize(n);if(i.length)for(let o=0,a=r;;o++){let s=i.charCodeAt(o),l=this.match(s,a,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}a==r&&o<n.length&&n.charCodeAt(o)==s&&a++}}}match(e,n,r){let i=null;for(let o=0;o<this.matches.length;o+=2){let a=this.matches[o],s=!1;this.query.charCodeAt(a)==e&&(a==this.query.length-1?i={from:this.matches[o+1],to:r}:(this.matches[o]++,s=!0)),s||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol!="undefined"&&(km.prototype[Symbol.iterator]=function(){return this});const vK={from:-1,to:-1,match:/.*/.exec("")},AD="gm"+(/x/.unicode==null?"":"u");class yK{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=vK,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new bK(e,n,r,i,o);this.re=new RegExp(n,AD+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let a=e.lineAt(i);this.curLineStart=a.from,this.matchPos=zx(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=zx(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const $2=new WeakMap;class Fg{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=$2.get(e);if(!i||i.from>=r||i.to<=n){let s=new Fg(n,e.sliceString(n,r));return $2.set(e,s),s}if(i.from==n&&i.to==r)return i;let{text:o,from:a}=i;return a>n&&(o=e.sliceString(n,a)+o,a=n),i.to<r&&(o+=e.sliceString(i.to,r)),$2.set(e,new Fg(a,o)),new Fg(n,o.slice(n-a,r-a))}}class bK{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=vK,this.matchPos=zx(e,i),this.re=new RegExp(n,AD+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=Fg.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=zx(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Fg.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol!="undefined"&&(yK.prototype[Symbol.iterator]=bK.prototype[Symbol.iterator]=function(){return this});function MJe(t){try{return new RegExp(t,AD),!0}catch{return!1}}function zx(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function yM(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=ci("input",{class:"cm-textfield",name:"line",value:e}),r=ci("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Wx.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},ci("label",t.state.phrase("Go to line"),": ",n)," ",ci("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,u,c,d]=o,f=c?+c.slice(1):0,h=u?+u:s.number;if(u&&d){let y=h/100;l&&(y=y*(l=="-"?-1:1)+s.number/a.doc.lines),h=Math.round(a.doc.lines*y)}else u&&l&&(h=h*(l=="-"?-1:1)+s.number);let g=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),m=bt.cursor(g.from+Math.max(0,Math.min(f,g.length)));t.dispatch({effects:[Wx.of(!1),Xt.scrollIntoView(m.from,{y:"center"})],selection:m}),t.focus()}return{dom:r}}const Wx=jn.define(),aj=xo.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Wx)&&(t=n.value);return t},provide:t=>K0.from(t,e=>e?yM:null)}),RJe=t=>{let e=G0(t,yM);if(!e){let n=[Wx.of(!0)];t.state.field(aj,!1)==null&&n.push(jn.appendConfig.of([aj,$Je])),t.dispatch({effects:n}),e=G0(t,yM)}return e&&e.dom.querySelector("input").select(),!0},$Je=Xt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),NJe={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},_K=qt.define({combine(t){return vc(t,NJe,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function DJe(t){let e=[VJe,FJe];return t&&e.push(_K.of(t)),e}const LJe=pn.mark({class:"cm-selectionMatch"}),IJe=pn.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function sj(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Si.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Si.Word)}function BJe(t,e,n,r){return t(e.sliceDoc(n,n+1))==Si.Word&&t(e.sliceDoc(r-1,r))==Si.Word}const FJe=Ui.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(_K),{state:n}=t,r=n.selection;if(r.ranges.length>1)return pn.none;let i=r.main,o,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return pn.none;let l=n.wordAt(i.head);if(!l)return pn.none;a=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return pn.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!(sj(a,n,i.from,i.to)&&BJe(a,n,i.from,i.to)))return pn.none}else if(o=n.sliceDoc(i.from,i.to),!o)return pn.none}let s=[];for(let l of t.visibleRanges){let u=new km(n.doc,o,l.from,l.to);for(;!u.next().done;){let{from:c,to:d}=u.value;if((!a||sj(a,n,c,d))&&(i.empty&&c<=i.from&&d>=i.to?s.push(IJe.range(c,d)):(c>=i.to||d<=i.from)&&s.push(LJe.range(c,d)),s.length>e.maxMatches))return pn.none}}return pn.set(s)}},{decorations:t=>t.decorations}),VJe=Xt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),jJe=({state:t,dispatch:e})=>{let{selection:n}=t,r=bt.create(n.ranges.map(i=>t.wordAt(i.head)||bt.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function QJe(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let a=!1,s=new km(t.doc,e,r[r.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new km(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(l=>l.from==s.value.from))continue;if(o){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const zJe=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return jJe({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=QJe(t,r);return i?(e(t.update({selection:t.selection.addRange(bt.range(i.from,i.to),!1),effects:Xt.scrollIntoView(i.to)})),!0):!1},sv=qt.define({combine(t){return vc(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new tet(e),scrollToMatch:e=>Xt.scrollIntoView(e)})}});class OK{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||MJe(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
- `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new XJe(this):new HJe(this)}getCursor(e,n=0,r){let i=e.doc?e:vr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?fg(this,i,n,r):dg(this,i,n,r)}}class wK{constructor(e){this.spec=e}}function dg(t,e,n,r){return new km(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?WJe(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function WJe(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(Hx(i,n-o))!=Si.Word||e(Ux(i,n-o))!=Si.Word)&&(e(Ux(i,r-o))!=Si.Word||e(Hx(i,r-o))!=Si.Word))}class HJe extends wK{constructor(e){super(e)}nextMatch(e,n,r){let i=dg(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let o=Math.min(e.doc.length,n+this.spec.unquoted.length);i=dg(this.spec,e,0,o).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),a=dg(this.spec,e,o,i),s=null;for(;!a.nextOverlapping().done;)s=a.value;if(s)return s;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=dg(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=dg(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function fg(t,e,n,r){return new yK(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?UJe(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Hx(t,e){return t.slice(Io(t,e,!1),e)}function Ux(t,e){return t.slice(e,Io(t,e))}function UJe(t){return(e,n,r)=>!r[0].length||(t(Hx(r.input,r.index))!=Si.Word||t(Ux(r.input,r.index))!=Si.Word)&&(t(Ux(r.input,r.index+r[0].length))!=Si.Word||t(Hx(r.input,r.index+r[0].length))!=Si.Word)}class XJe extends wK{nextMatch(e,n,r){let i=fg(this.spec,e,r,e.doc.length).next();return i.done&&(i=fg(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),a=fg(this.spec,e,o,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n)}matchAll(e,n){let r=fg(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=fg(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const nb=jn.define(),MD=jn.define(),lf=xo.define({create(t){return new N2(bM(t).create(),null)},update(t,e){for(let n of e.effects)n.is(nb)?t=new N2(n.value.create(),t.panel):n.is(MD)&&(t=new N2(t.query,n.value?RD:null));return t},provide:t=>K0.from(t,e=>e.panel)});class N2{constructor(e,n){this.query=e,this.panel=n}}const ZJe=pn.mark({class:"cm-searchMatch"}),qJe=pn.mark({class:"cm-searchMatch cm-searchMatch-selected"}),YJe=Ui.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(lf))}update(t){let e=t.state.field(lf);(e!=t.startState.field(lf)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return pn.none;let{view:n}=this,r=new td;for(let i=0,o=n.visibleRanges,a=o.length;i<a;i++){let{from:s,to:l}=o[i];for(;i<a-1&&l>o[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,s,l,(u,c)=>{let d=n.state.selection.ranges.some(f=>f.from==u&&f.to==c);r.add(u,c,d?qJe:ZJe)})}return r.finish()}},{decorations:t=>t.decorations});function e_(t){return e=>{let n=e.state.field(lf,!1);return n&&n.query.spec.valid?t(e,n):CK(e)}}const Xx=e_((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=bt.single(r.from,r.to),o=t.state.facet(sv);return t.dispatch({selection:i,effects:[$D(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),SK(t),!0}),Zx=e_((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=bt.single(i.from,i.to),a=t.state.facet(sv);return t.dispatch({selection:o,effects:[$D(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),SK(t),!0}),GJe=e_((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:bt.create(n.map(r=>bt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),KJe=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let s=new km(t.doc,t.sliceDoc(r,i));!s.next().done;){if(o.length>1e3)return!1;s.value.from==r&&(a=o.length),o.push(bt.range(s.value.from,s.value.to))}return e(t.update({selection:bt.create(o,a),userEvent:"select.search.matches"})),!0},lj=e_((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let a=o,s=[],l,u,c=[];if(a.from==r&&a.to==i&&(u=n.toText(e.getReplacement(a)),s.push({from:a.from,to:a.to,insert:u}),a=e.nextMatch(n,a.from,a.to),c.push(Xt.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),a){let d=s.length==0||s[0].from>=o.to?0:o.to-o.from-u.length;l=bt.single(a.from-d,a.to-d),c.push($D(t,a)),c.push(n.facet(sv).scrollToMatch(l.main,t))}return t.dispatch({changes:s,selection:l,effects:c,userEvent:"input.replace"}),!0}),JJe=e_((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:a}=i;return{from:o,to:a,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Xt.announce.of(r),userEvent:"input.replace.all"}),!0});function RD(t){return t.state.facet(sv).createPanel(t)}function bM(t,e){var n,r,i,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let u=t.facet(sv);return new OK({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:u.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:u.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:u.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:u.wholeWord})}function xK(t){let e=G0(t,RD);return e&&e.dom.querySelector("[main-field]")}function SK(t){let e=xK(t);e&&e==t.root.activeElement&&e.select()}const CK=t=>{let e=t.state.field(lf,!1);if(e&&e.panel){let n=xK(t);if(n&&n!=t.root.activeElement){let r=bM(t.state,e.query.spec);r.valid&&t.dispatch({effects:nb.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[MD.of(!0),e?nb.of(bM(t.state,e.query.spec)):jn.appendConfig.of(ret)]});return!0},EK=t=>{let e=t.state.field(lf,!1);if(!e||!e.panel)return!1;let n=G0(t,RD);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:MD.of(!1)}),!0},eet=[{key:"Mod-f",run:CK,scope:"editor search-panel"},{key:"F3",run:Xx,shift:Zx,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Xx,shift:Zx,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:EK,scope:"editor search-panel"},{key:"Mod-Shift-l",run:KJe},{key:"Mod-Alt-g",run:RJe},{key:"Mod-d",run:zJe,preventDefault:!0}];class tet{constructor(e){this.view=e;let n=this.query=e.state.field(lf).query.spec;this.commit=this.commit.bind(this),this.searchField=ci("input",{value:n.search,placeholder:bs(e,"Find"),"aria-label":bs(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ci("input",{value:n.replace,placeholder:bs(e,"Replace"),"aria-label":bs(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ci("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=ci("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=ci("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,a){return ci("button",{class:"cm-button",name:i,onclick:o,type:"button"},a)}this.dom=ci("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Xx(e),[bs(e,"next")]),r("prev",()=>Zx(e),[bs(e,"previous")]),r("select",()=>GJe(e),[bs(e,"all")]),ci("label",null,[this.caseField,bs(e,"match case")]),ci("label",null,[this.reField,bs(e,"regexp")]),ci("label",null,[this.wordField,bs(e,"by word")]),...e.state.readOnly?[]:[ci("br"),this.replaceField,r("replace",()=>lj(e),[bs(e,"replace")]),r("replaceAll",()=>JJe(e),[bs(e,"replace all")])],ci("button",{name:"close",onclick:()=>EK(e),"aria-label":bs(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new OK({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:nb.of(e)}))}keydown(e){dYe(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Zx:Xx)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),lj(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(nb)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(sv).top}}function bs(t,e){return t.state.phrase(e)}const l1=30,u1=/[\s\.,:;?!]/;function $D(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-l1),a=Math.min(i,n+l1),s=t.state.sliceDoc(o,a);if(o!=r.from){for(let l=0;l<l1;l++)if(!u1.test(s[l+1])&&u1.test(s[l])){s=s.slice(l);break}}if(a!=i){for(let l=s.length-1;l>s.length-l1;l--)if(!u1.test(s[l-1])&&u1.test(s[l])){s=s.slice(0,l);break}}return Xt.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const net=Xt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),ret=[lf,Xf.low(YJe),net];class TK{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=lo(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(PK(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function uj(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function iet(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=uj(e)+uj(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function kK(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:iet(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function oet(t,e){return n=>{for(let r=lo(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class cj{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function Gh(t){return t.selection.main.from}function PK(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const ND=md.define();function aet(t,e,n,r){let{main:i}=t.selection,o=n-i.from,a=r-i.from;return Object.assign(Object.assign({},t.changeByRange(s=>{if(s!=i&&n!=r&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:bt.cursor(s.from+o+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const dj=new WeakMap;function set(t){if(!Array.isArray(t))return t;let e=dj.get(t);return e||dj.set(t,e=kK(t)),e}const qx=jn.define(),rb=jn.define();class uet{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=Qa(e,n),i=Bu(r);this.chars.push(r);let o=e.slice(n,n+i),a=o.toUpperCase();this.folded.push(Qa(a==o?o.toLowerCase():a,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:a}=this;if(n.length==1){let w=Qa(e,0),O=Bu(w),x=O==e.length?0:-100;if(w!=n[0])if(w==r[0])x+=-200;else return null;return this.ret(x,[0,O])}let s=e.indexOf(this.pattern);if(s==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,u=0;if(s<0){for(let w=0,O=Math.min(e.length,200);w<O&&u<l;){let x=Qa(e,w);(x==n[u]||x==r[u])&&(i[u++]=w),w+=Bu(x)}if(u<l)return null}let c=0,d=0,f=!1,h=0,g=-1,m=-1,y=/[a-z]/.test(e),b=!0;for(let w=0,O=Math.min(e.length,200),x=0;w<O&&d<l;){let S=Qa(e,w);s<0&&(c<l&&S==n[c]&&(o[c++]=w),h<l&&(S==n[h]||S==r[h]?(h==0&&(g=w),m=w+1,h++):h=0));let C,E=S<255?S>=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(C=eD(S))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!w||E==1&&y||x==0&&E!=0)&&(n[d]==S||r[d]==S&&(f=!0)?a[d++]=w:a.length&&(b=!1)),x=E,w+=Bu(S)}return d==l&&a[0]==0&&b?this.result(-100+(f?-200:0),a,e):h==l&&g==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-200+-700-e.length,[g,m]):d==l?this.result(-100+(f?-200:0)+-700+(b?0:-1100),a,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let a of n){let s=a+(this.astral?Bu(Qa(r,a)):1);o&&i[o-1]==a?i[o-1]=s:(i[o++]=a,i[o++]=s)}return this.ret(e-r.length,i)}}class cet{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const mo=qt.define({combine(t){return vc(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:det,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>fj(e(r),n(r)),optionClass:(e,n)=>r=>fj(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function fj(t,e){return t?e?t+" "+e:t:e}function det(t,e,n,r,i,o){let a=t.textDirection==_i.RTL,s=a,l=!1,u="top",c,d,f=e.left-i.left,h=i.right-e.right,g=r.right-r.left,m=r.bottom-r.top;if(s&&f<Math.min(g,h)?s=!1:!s&&h<Math.min(g,f)&&(s=!0),g<=(s?f:h))c=Math.max(i.top,Math.min(n.top,i.bottom-m))-e.top,d=Math.min(400,s?f:h);else{l=!0,d=Math.min(400,(a?e.right:i.right-e.left)-30);let w=i.bottom-e.bottom;w>=m||w>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let y=(e.bottom-e.top)/o.offsetHeight,b=(e.right-e.left)/o.offsetWidth;return{style:`${u}: ${c/y}px; max-width: ${d/b}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function fet(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let u=0;u<o.length;){let c=o[u++],d=o[u++];c>l&&a.appendChild(document.createTextNode(s.slice(l,c)));let f=a.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(s.slice(c,d))),f.className="cm-completionMatchedText",l=d}return l<s.length&&a.appendChild(document.createTextNode(s.slice(l))),a},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function D2(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class het{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:a}=i.open,s=e.state.facet(mo);this.optionContent=fet(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=D2(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,d;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(d=/-(\d+)$/.exec(c.id))&&+d[1]<u.length){this.applyCompletion(e,u[+d[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(mo).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:rb.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:a,disabled:s}=r.open;(!i.open||i.open.options!=o)&&(this.range=D2(o.length,a,e.state.facet(mo).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),s!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=D2(n.options.length,n.selected,this.view.state.facet(mo).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>Ua(this.view.state,a,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&get(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:a.innerWidth,bottom:a.innerHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(mo).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let a=r.from;a<r.to;a++){let{completion:s,match:l}=e[a],{section:u}=s;if(u){let f=typeof u=="string"?u:u.name;if(f!=o&&(a>r.from||r.from==0))if(o=f,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=f}}const c=i.appendChild(document.createElement("li"));c.id=n+"-"+a,c.setAttribute("role","option");let d=this.optionClass(s);d&&(c.className=d);for(let f of this.optionContent){let h=f(s,this.view.state,this.view,l);h&&c.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function pet(t,e){return n=>new het(n,t,e)}function get(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function hj(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function met(t,e){let n=[],r=null,i=u=>{n.push(u);let{section:c}=u.completion;if(c){r||(r=[]);let d=typeof c=="string"?c:c.name;r.some(f=>f.name==d)||r.push(typeof c=="string"?{name:d}:c)}},o=e.facet(mo);for(let u of t)if(u.hasResult()){let c=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)i(new cj(d,u.source,c?c(d):[],1e9-n.length));else{let d=e.sliceDoc(u.from,u.to),f,h=o.filterStrict?new cet(d):new uet(d);for(let g of u.result.options)if(f=h.match(g.label)){let m=g.displayLabel?c?c(g,f.matched):[]:f.matched;i(new cj(g,u.source,m,f.score+(g.boost||0)))}}}if(r){let u=Object.create(null),c=0,d=(f,h)=>{var g,m;return((g=f.rank)!==null&&g!==void 0?g:1e9)-((m=h.rank)!==null&&m!==void 0?m:1e9)||(f.name<h.name?-1:1)};for(let f of r.sort(d))c-=1e5,u[f.name]=c;for(let f of n){let{section:h}=f.completion;h&&(f.score+=u[typeof h=="string"?h:h.name])}}let a=[],s=null,l=o.compareCompletions;for(let u of n.sort((c,d)=>d.score-c.score||l(c.completion,d.completion))){let c=u.completion;!s||s.label!=c.label||s.detail!=c.detail||s.type!=null&&c.type!=null&&s.type!=c.type||s.apply!=c.apply||s.boost!=c.boost?a.push(u):hj(u.completion)>hj(s)&&(a[a.length-1]=u),s=u.completion}return a}class xg{constructor(e,n,r,i,o,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new xg(this.options,pj(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,a){if(i&&!a&&e.some(u=>u.isPending))return i.setDisabled();let s=met(e,n);if(!s.length)return i&&e.some(u=>u.isPending)?i.setDisabled():null;let l=n.facet(mo).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let u=i.options[i.selected].completion;for(let c=0;c<s.length;c++)if(s[c].completion==u){l=c;break}}return new xg(s,pj(r,l),{pos:e.reduce((u,c)=>c.hasResult()?Math.min(u,c.from):u,1e8),create:wet,above:o.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new xg(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new xg(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Yx{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Yx(_et,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(mo),o=(r.override||n.languageDataAt("autocomplete",Gh(n)).map(set)).map(l=>(this.active.find(c=>c.source==l)||new ul(l,this.active.some(c=>c.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((l,u)=>l==this.active[u])&&(o=this.active);let a=this.open,s=e.effects.some(l=>l.is(DD));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!vet(o,this.active)||s?a=xg.build(o,n,this.id,a,r,s):a&&a.disabled&&!o.some(l=>l.isPending)&&(a=null),!a&&o.every(l=>!l.isPending)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new ul(l.source,0):l));for(let l of e.effects)l.is(MK)&&(a=a&&a.setSelected(l.value,this.id));return o==this.active&&a==this.open?this:new Yx(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?yet:bet}}function vet(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const yet={"aria-autocomplete":"list"},bet={};function pj(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const _et=[];function AK(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(ND);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ul{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=AK(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new ul(i.source,0)),r&4&&i.state==0&&(i=new ul(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(qx))i=new ul(i.source,1,o.value);else if(o.is(rb))i=new ul(i.source,0);else if(o.is(DD))for(let a of o.value)a.source==i.source&&(i=a);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Gh(e.state))}}class Vg extends ul{constructor(e,n,r,i,o,a){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=a}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=Gh(e.state);if(s>a||!i||n&2&&(Gh(e.startState)==this.from||s<this.limit))return new ul(this.source,n&4?1:0);let l=e.changes.mapPos(this.limit);return Oet(i.validFor,e.state,o,a)?new Vg(this.source,this.explicit,l,i,o,a):i.update&&(i=i.update(i,o,a,new TK(e.state,s,!1)))?new Vg(this.source,this.explicit,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:Gh(e.state)):new ul(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Vg(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ul(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function Oet(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):PK(t,!0).test(i)}const DD=jn.define({map(t,e){return t.map(n=>n.map(e))}}),MK=jn.define(),Wa=xo.define({create(){return Yx.start()},update(t,e){return t.update(e)},provide:t=>[gD.from(t,e=>e.tooltip),Xt.contentAttributes.from(t,e=>e.attrs)]});function LD(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Wa).active.find(i=>i.source==e.source);return r instanceof Vg?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},aet(t.state,n,r.from,r.to)),{annotations:ND.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const wet=pet(Wa,LD);function c1(t,e="option"){return n=>{let r=n.state.field(Wa,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(mo).interactionDelay)return!1;let i=1,o;e=="page"&&(o=dG(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:MK.of(s)}),!0}}const xet=t=>{let e=t.state.field(Wa,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(mo).interactionDelay?!1:LD(t,e.open.options[e.open.selected])},gj=t=>t.state.field(Wa,!1)?(t.dispatch({effects:qx.of(!0)}),!0):!1,Cet=t=>{let e=t.state.field(Wa,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:rb.of(null)}),!0)};class Eet{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Tet=50,ket=1e3,Pet=Ui.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Wa).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Wa),n=t.state.facet(mo);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Wa)==e)return;let r=t.transactions.some(o=>{let a=AK(o,n);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;o<this.running.length;o++){let a=this.running[o];if(r||a.context.abortOnDocChange&&t.docChanged||a.updates.length+t.transactions.length>Tet&&Date.now()-a.time>ket){for(let s of a.context.abortListeners)try{s()}catch(l){Ua(this.view.state,l)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(a=>a.is(qx)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Wa);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(mo).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Gh(e),r=new TK(e,n,t.explicit,this.view),i=new Eet(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:rb.of(null)}),Ua(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(mo).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(mo),r=this.view.state.field(Wa);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(o.done===void 0)continue;if(this.running.splice(i--,1),o.done){let s=Gh(o.updates.length?o.updates[0].startState:this.view.state),l=Math.min(s,o.done.from+(o.active.explicit?0:1)),u=new Vg(o.active.source,o.active.explicit,l,o.done,o.done.from,(t=o.done.to)!==null&&t!==void 0?t:s);for(let c of o.updates)u=u.update(c,n);if(u.hasResult()){e.push(u);continue}}let a=r.active.find(s=>s.source==o.active.source);if(a&&a.isPending)if(o.done==null){let s=new ul(o.active.source,0);for(let l of o.updates)s=s.update(l,n);s.isPending||e.push(s)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:DD.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Wa,!1);if(e&&e.tooltip&&this.view.state.facet(mo).closeOnBlur){let n=e.open&&dG(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:rb.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:qx.of(!1)}),20),this.composing=0}}}),Aet=typeof navigator=="object"&&/Win/.test(navigator.platform),Met=Xf.highest(Xt.domEventHandlers({keydown(t,e){let n=e.state.field(Wa,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Aet&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(a=>a.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&LD(e,r),!1}})),RK=Xt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Ret{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class ID{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,Do.TrackDel),r=e.mapPos(this.to,1,Do.TrackDel);return n==null||r==null?null:new ID(this.field,n,r)}}class BD{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let u=a,c=/^\t*/.exec(l)[0].length;for(let d=0;d<c;d++)u+=e.facet(Gb);i.push(n+u.length-c),l=u+l.slice(c)}r.push(l),n+=l.length+1}let s=this.fieldPositions.map(l=>new ID(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],i=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",u=-1,c=l.replace(/\\[{}]/g,d=>d[1]);for(let d=0;d<n.length;d++)(s!=null?n[d].seq==s:c?n[d].name==c:!1)&&(u=d);if(u<0){let d=0;for(;d<n.length&&(s==null||n[d].seq!=null&&n[d].seq<s);)d++;n.splice(d,0,{seq:s,name:c}),u=d;for(let f of i)f.field>=u&&f.field++}i.push(new Ret(u,r.length,o.index,o.index+c.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(s,l,u)=>{for(let c of i)c.line==r.length&&c.from>u&&(c.from--,c.to--);return l}),r.push(a)}return new BD(r,i)}}let $et=pn.widget({widget:new class extends yc{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Net=pn.mark({class:"cm-snippetField"});class lv{constructor(e,n){this.ranges=e,this.active=n,this.deco=pn.set(e.map(r=>(r.from==r.to?$et:Net).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new lv(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const t_=jn.define({map(t,e){return t&&t.map(e)}}),Det=jn.define(),ib=xo.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(t_))return n.value;if(n.is(Det)&&t)return new lv(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Xt.decorations.from(t,e=>e?e.deco:pn.none)});function FD(t,e){return bt.create(t.filter(n=>n.field==e).map(n=>bt.range(n.from,n.to)))}function Let(t){let e=BD.parse(t);return(n,r,i,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,i),{main:l}=n.state.selection,u={changes:{from:i,to:o==l.from?l.to:o,insert:Rr.of(a)},scrollIntoView:!0,annotations:r?[ND.of(r),Yi.userEvent.of("input.complete")]:void 0};if(s.length&&(u.selection=FD(s,0)),s.some(c=>c.field>0)){let c=new lv(s,0),d=u.effects=[t_.of(c)];n.state.field(ib,!1)===void 0&&d.push(jn.appendConfig.of([ib,jet,Qet,RK]))}n.dispatch(n.state.update(u))}}function $K(t){return({state:e,dispatch:n})=>{let r=e.field(ib,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(a=>a.field==i+t);return n(e.update({selection:FD(r.ranges,i),effects:t_.of(o?null:new lv(r.ranges,i)),scrollIntoView:!0})),!0}}const Iet=({state:t,dispatch:e})=>t.field(ib,!1)?(e(t.update({effects:t_.of(null)})),!0):!1,Bet=$K(1),Fet=$K(-1),Vet=[{key:"Tab",run:Bet,shift:Fet},{key:"Escape",run:Iet}],mj=qt.define({combine(t){return t.length?t[0]:Vet}}),jet=Xf.highest(qb.compute([mj],t=>t.facet(mj)));function Va(t,e){return Object.assign(Object.assign({},e),{apply:Let(t)})}const Qet=Xt.domEventHandlers({mousedown(t,e){let n=e.state.field(ib,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:FD(n.ranges,i.field),effects:t_.of(n.ranges.some(o=>o.field>i.field)?new lv(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),ob={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Fh=jn.define({map(t,e){let n=e.mapPos(t,-1,Do.TrackAfter);return n==null?void 0:n}}),VD=new class extends dp{};VD.startSide=1;VD.endSide=-1;const NK=xo.define({create(){return Mr.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(Fh)&&(t=t.update({add:[VD.range(n.value,n.value+1)]}));return t}});function zet(){return[Het,NK]}const L2="()[]{}<>";function DK(t){for(let e=0;e<L2.length;e+=2)if(L2.charCodeAt(e)==t)return L2.charAt(e+1);return eD(t<128?t:t+1)}function LK(t,e){return t.languageDataAt("closeBrackets",e)[0]||ob}const Wet=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Het=Xt.inputHandler.of((t,e,n,r)=>{if((Wet?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Bu(Qa(r,0))==1||e!=i.from||n!=i.to)return!1;let o=Zet(t.state,r);return o?(t.dispatch(o),!0):!1}),Uet=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=LK(t,t.selection.main.head).brackets||ob.brackets,i=null,o=t.changeByRange(a=>{if(a.empty){let s=qet(t.doc,a.head);for(let l of r)if(l==s&&BC(t.doc,a.head)==DK(Qa(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:bt.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},Xet=[{key:"Backspace",run:Uet}];function Zet(t,e){let n=LK(t,t.selection.main.head),r=n.brackets||ob.brackets;for(let i of r){let o=DK(Qa(i,0));if(e==i)return o==i?Ket(t,i,r.indexOf(i+i+i)>-1,n):Yet(t,i,o,n.before||ob.before);if(e==o&&IK(t,t.selection.main.from))return Get(t,i,o)}return null}function IK(t,e){let n=!1;return t.field(NK).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function BC(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Bu(Qa(n,0)))}function qet(t,e){let n=t.sliceString(e-2,e);return Bu(Qa(n,0))==n.length?n:n.slice(1)}function Yet(t,e,n,r){let i=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:Fh.of(a.to+e.length),range:bt.range(a.anchor+e.length,a.head+e.length)};let s=BC(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:Fh.of(a.head+e.length),range:bt.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Get(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&BC(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:bt.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Ket(t,e,n,r){let i=r.stringPrefixes||ob.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Fh.of(s.to+e.length),range:bt.range(s.anchor+e.length,s.head+e.length)};let l=s.head,u=BC(t.doc,l),c;if(u==e){if(vj(t,l))return{changes:{insert:e+e,from:l},effects:Fh.of(l+e.length),range:bt.cursor(l+e.length)};if(IK(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:bt.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=yj(t,l-2*e.length,i))>-1&&vj(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Fh.of(l+e.length),range:bt.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=Si.Word&&yj(t,l,i)>-1&&!Jet(t,l,e,i))return{changes:{insert:e+e,from:l},effects:Fh.of(l+e.length),range:bt.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function vj(t,e){let n=lo(t).resolveInner(e+1);return n.parent&&n.from==e}function Jet(t,e,n,r){let i=lo(t).resolveInner(e,-1),o=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function yj(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Si.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Si.Word)return o}return-1}function ett(t={}){return[Met,Wa,mo.of(t),Pet,ttt,RK]}const BK=[{key:"Ctrl-Space",run:gj},{mac:"Alt-`",run:gj},{key:"Escape",run:Cet},{key:"ArrowDown",run:c1(!0)},{key:"ArrowUp",run:c1(!1)},{key:"PageDown",run:c1(!0,"page")},{key:"PageUp",run:c1(!1,"page")},{key:"Enter",run:xet}],ttt=Xf.highest(qb.computeN([mo],t=>t.facet(mo).defaultKeymap?[BK]:[]));class bj{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Ph{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(ab).markerFilter;o&&(i=o(i,r));let a=e.slice().sort((d,f)=>d.from-f.from||d.to-f.to),s=new td,l=[],u=0;for(let d=0;;){let f=d==a.length?null:a[d];if(!f&&!l.length)break;let h,g;for(l.length?(h=u,g=l.reduce((y,b)=>Math.min(y,b.to),f&&f.from>h?f.from:1e8)):(h=f.from,g=f.to,l.push(f),d++);d<a.length;){let y=a[d];if(y.from==h&&(y.to>y.from||y.to==h))l.push(y),d++,g=Math.min(y.to,g);else{g=Math.min(y.from,g);break}}let m=ptt(l);if(l.some(y=>y.from==y.to||y.from==y.to-1&&r.doc.lineAt(y.from).to==y.from))s.add(h,h,pn.widget({widget:new ctt(m),diagnostics:l.slice()}));else{let y=l.reduce((b,w)=>w.markClass?b+" "+w.markClass:b,"");s.add(h,g,pn.mark({class:"cm-lintRange cm-lintRange-"+m+y,diagnostics:l.slice(),inclusiveEnd:l.some(b=>b.to>g)}))}u=g;for(let y=0;y<l.length;y++)l[y].to<=u&&l.splice(y--,1)}let c=s.finish();return new Ph(c,n,Pm(c))}}function Pm(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:a})=>{if(!(e&&a.diagnostics.indexOf(e)<0))if(!r)r=new bj(i,o,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new bj(r.from,o,r.diagnostic)}}),r}function ntt(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(ab).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(FK))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function rtt(t,e){return t.field(Ts,!1)?e:e.concat(jn.appendConfig.of(gtt))}const FK=jn.define(),jD=jn.define(),VK=jn.define(),Ts=xo.define({create(){return new Ph(pn.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=Pm(n,t.selected.diagnostic,o)||Pm(n,null,o)}!n.size&&i&&e.state.facet(ab).autoPanel&&(i=null),t=new Ph(n,i,r)}for(let n of e.effects)if(n.is(FK)){let r=e.state.facet(ab).autoPanel?n.value.length?sb.open:null:t.panel;t=Ph.init(n.value,r,e.state)}else n.is(jD)?t=new Ph(t.diagnostics,n.value?sb.open:null,t.selected):n.is(VK)&&(t=new Ph(t.diagnostics,t.panel,n.value));return t},provide:t=>[K0.from(t,e=>e.panel),Xt.decorations.from(t,e=>e.diagnostics)]}),itt=pn.mark({class:"cm-lintRange cm-lintRange-active"});function ott(t,e,n){let{diagnostics:r}=t.state.field(Ts),i,o=-1,a=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{if(e>=l&&e<=u&&(l==u||(e>l||n>0)&&(e<u||n<0)))return i=c.diagnostics,o=l,a=u,!1});let s=t.state.facet(ab).tooltipFilter;return i&&s&&(i=s(i,t.state)),i?{pos:o,end:a,above:t.state.doc.lineAt(o).to<a,create(){return{dom:att(t,i)}}}:null}function att(t,e){return ci("ul",{class:"cm-tooltip-lint"},e.map(n=>QK(t,n,!1)))}const stt=t=>{let e=t.state.field(Ts,!1);(!e||!e.panel)&&t.dispatch({effects:rtt(t.state,[jD.of(!0)])});let n=G0(t,sb.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},_j=t=>{let e=t.state.field(Ts,!1);return!e||!e.panel?!1:(t.dispatch({effects:jD.of(!1)}),!0)},ltt=t=>{let e=t.state.field(Ts,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},utt=[{key:"Mod-Shift-m",run:stt,preventDefault:!0},{key:"F8",run:ltt}],ab=qt.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},vc(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function jK(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function QK(t,e,n){var r;let i=n?jK(e.actions):[];return ci("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ci("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,a)=>{let s=!1,l=f=>{if(f.preventDefault(),s)return;s=!0;let h=Pm(t.state.field(Ts).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:u}=o,c=i[a]?u.indexOf(i[a]):-1,d=c<0?u:[u.slice(0,c),ci("u",u.slice(c,c+1)),u.slice(c+1)];return ci("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[a]})"`}.`},d)}),e.source&&ci("div",{class:"cm-diagnosticSource"},e.source))}class ctt extends yc{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return ci("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Oj{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=QK(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class sb{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)_j(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=jK(o.actions);for(let s=0;s<a.length;s++)if(a[s].toUpperCase().charCodeAt(0)==i.keyCode){let l=Pm(this.view.state.field(Ts).diagnostics,o);l&&o.actions[s].apply(e,l.from,l.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=ci("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=ci("div",{class:"cm-panel-lint"},this.list,ci("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>_j(this.view)},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(Ts).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Ts),r=0,i=!1,o=null,a=new Set;for(e.between(0,this.view.state.doc.length,(s,l,{spec:u})=>{for(let c of u.diagnostics){if(a.has(c))continue;a.add(c);let d=-1,f;for(let h=r;h<this.items.length;h++)if(this.items[h].diagnostic==c){d=h;break}d<0?(f=new Oj(this.view,c),this.items.splice(r,0,f),i=!0):(f=this.items[d],d>r&&(this.items.splice(r,d-r),i=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),o=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new Oj(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{let u=l.height/this.list.offsetHeight;s.top<l.top?this.list.scrollTop-=(l.top-s.top)/u:s.bottom>l.bottom&&(this.list.scrollTop+=(s.bottom-l.bottom)/u)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Ts),r=Pm(n.diagnostics,this.items[e].diagnostic);!r||this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:VK.of(r)})}static open(e){return new sb(e)}}function dtt(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function d1(t){return dtt(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const ftt=Xt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:d1("#d11")},".cm-lintRange-warning":{backgroundImage:d1("orange")},".cm-lintRange-info":{backgroundImage:d1("#999")},".cm-lintRange-hint":{backgroundImage:d1("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function htt(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function ptt(t){let e="hint",n=1;for(let r of t){let i=htt(r.severity);i>n&&(n=i,e=r.severity)}return e}const gtt=[Ts,Xt.decorations.compute([Ts],t=>{let{selected:e,panel:n}=t.field(Ts);return!e||!n||e.from==e.to?pn.none:pn.set([itt.range(e.from,e.to)])}),JYe(ott,{hideOn:ntt}),ftt],mtt=(()=>[cGe(),hGe(),kYe(),PKe(),tKe(),vYe(),wYe(),vr.allowMultipleSelections.of(!0),QGe(),rKe(aKe,{fallback:!0}),hKe(),zet(),ett(),QYe(),HYe(),NYe(),DJe(),qb.of([...Xet,...PJe,...eet,...BKe,...GGe,...BK,...utt])])();/*!
- * VueCodemirror v6.1.1
- * Copyright (c) Surmon. All rights reserved.
- * Released under the MIT License.
- * Surmon
- */var vtt=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[mtt]}),ytt=Symbol("vue-codemirror-global-config"),va,btt=function(t){var e=t.onUpdate,n=t.onChange,r=t.onFocus,i=t.onBlur,o=function(a,s){var l={};for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.indexOf(u)<0&&(l[u]=a[u]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function"){var c=0;for(u=Object.getOwnPropertySymbols(a);c<u.length;c++)s.indexOf(u[c])<0&&Object.prototype.propertyIsEnumerable.call(a,u[c])&&(l[u[c]]=a[u[c]])}return l}(t,["onUpdate","onChange","onFocus","onBlur"]);return vr.create({doc:o.doc,selection:o.selection,extensions:(Array.isArray(o.extensions)?o.extensions:[o.extensions]).concat([Xt.updateListener.of(function(a){e(a),a.docChanged&&n(a.state.doc.toString(),a),a.focusChanged&&(a.view.hasFocus?r(a):i(a))})])})},hg=function(t){var e=new Hb;return{compartment:e,run:function(n){e.get(t.state)?t.dispatch({effects:e.reconfigure(n)}):t.dispatch({effects:jn.appendConfig.of(e.of(n))})}}},wj=function(t,e){var n=hg(t),r=n.compartment,i=n.run;return function(o){var a=r.get(t.state);i((o!=null?o:a!==e)?e:[])}},f1={type:Boolean,default:void 0},_tt={autofocus:f1,disabled:f1,indentWithTab:f1,tabSize:Number,placeholder:String,style:Object,autoDestroy:f1,phrases:Object,root:Object,extensions:Array,selection:Object},Ott={modelValue:{type:String,default:""}},wtt=Object.assign(Object.assign({},_tt),Ott);(function(t){t.Change="change",t.Update="update",t.Focus="focus",t.Blur="blur",t.Ready="ready",t.ModelUpdate="update:modelValue"})(va||(va={}));var Ah={};Ah[va.Change]=function(t,e){return!0},Ah[va.Update]=function(t){return!0},Ah[va.Focus]=function(t){return!0},Ah[va.Blur]=function(t){return!0},Ah[va.Ready]=function(t){return!0};var zK={};zK[va.ModelUpdate]=Ah[va.Change];var xtt=Object.assign(Object.assign({},Ah),zK),Stt=ue({name:"VueCodemirror",props:Object.assign({},wtt),emits:Object.assign({},xtt),setup:function(t,e){var n=yr(),r=yr(),i=yr(),o=Object.assign(Object.assign({},vtt),ht(ytt,{})),a=M(function(){var s={};return Object.keys(Dn(t)).forEach(function(l){var u;l!=="modelValue"&&(s[l]=(u=t[l])!==null&&u!==void 0?u:o[l])}),s});return Ft(function(){var s;r.value=btt({doc:t.modelValue,selection:a.value.selection,extensions:(s=o.extensions)!==null&&s!==void 0?s:[],onFocus:function(u){return e.emit(va.Focus,u)},onBlur:function(u){return e.emit(va.Blur,u)},onUpdate:function(u){return e.emit(va.Update,u)},onChange:function(u,c){u!==t.modelValue&&(e.emit(va.Change,u,c),e.emit(va.ModelUpdate,u,c))}}),i.value=function(u){return new Xt(Object.assign({},u))}({state:r.value,parent:n.value,root:a.value.root});var l=function(u){var c=function(){return u.state.doc.toString()},d=hg(u).run,f=wj(u,[Xt.editable.of(!1),vr.readOnly.of(!0)]),h=wj(u,qb.of([AJe])),g=hg(u).run,m=hg(u).run,y=hg(u).run,b=hg(u).run;return{focus:function(){return u.focus()},getDoc:c,setDoc:function(w){w!==c()&&u.dispatch({changes:{from:0,to:u.state.doc.length,insert:w}})},reExtensions:d,toggleDisabled:f,toggleIndentWithTab:h,setTabSize:function(w){g([vr.tabSize.of(w),Gb.of(" ".repeat(w))])},setPhrases:function(w){m([vr.phrases.of(w)])},setPlaceholder:function(w){y(BYe(w))},setStyle:function(w){w===void 0&&(w={}),b(Xt.theme({"&":Object.assign({},w)}))}}}(i.value);Fe(function(){return t.modelValue},function(u){u!==l.getDoc()&&l.setDoc(u)}),Fe(function(){return t.extensions},function(u){return l.reExtensions(u||[])},{immediate:!0}),Fe(function(){return a.value.disabled},function(u){return l.toggleDisabled(u)},{immediate:!0}),Fe(function(){return a.value.indentWithTab},function(u){return l.toggleIndentWithTab(u)},{immediate:!0}),Fe(function(){return a.value.tabSize},function(u){return l.setTabSize(u)},{immediate:!0}),Fe(function(){return a.value.phrases},function(u){return l.setPhrases(u||{})},{immediate:!0}),Fe(function(){return a.value.placeholder},function(u){return l.setPlaceholder(u)},{immediate:!0}),Fe(function(){return a.value.style},function(u){return l.setStyle(u)},{immediate:!0}),a.value.autofocus&&l.focus(),e.emit(va.Ready,{state:r.value,view:i.value,container:n.value})}),pr(function(){a.value.autoDestroy&&i.value&&function(s){s.destroy()}(i.value)}),function(){return Tt("div",{class:"v-codemirror",style:{display:"contents"},ref:n})}}}),Vu=Stt;class Gx{constructor(e,n,r,i,o,a,s,l,u,c=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new Gx(e,[],n,r,r,0,[],0,i?new xj(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let s=o.dynamicPrecedence(i);if(s&&(this.score+=s),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),u=l?this.stack[l-2]:this.p.ranges[0].from,c=this.reducePos-u;c>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=u,this.p.lastBigReductionSize=c));let d=l?this.stack[l-1]:0,f=this.bufferBase+this.buffer.length-d;if(i<o.minRepeatTerm||e&131072){let h=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,u,h,f+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=o.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,u)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,s=this.buffer.length;if(s==0&&a.parent&&(s=a.bufferBase-a.parent.bufferBase,a=a.parent),s>0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let s=!1;for(let l=a;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let o=e,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new Gx(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Ctt(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>4<<1||this.stack.length>=120){let i=[];for(let o=0,a;o<n.length;o+=2)(a=n[o+1])!=this.state&&this.p.parser.hasAction(a,e)&&i.push(n[o],a);if(this.stack.length<120)for(let o=0;i.length<4<<1&&o<n.length;o+=2){let a=n[o+1];i.some((s,l)=>l&1&&s==a)||i.push(n[o],a)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let a=this.split();a.pushState(o,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[i],this.pos),a.reducePos=this.pos,a.score-=200,r.push(a)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,u=this.stack.length-s*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,o+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new xj(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class xj{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Ctt{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Kx{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Kx(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Kx(this.stack,this.pos,this.index)}}function py(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let a=t.charCodeAt(r++),s=!1;if(a==126){o=65535;break}a>=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class J1{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Sj=new J1;class Ett{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Sj,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let a=this.ranges[--i];o-=r.from-a.to,r=a}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];o+=a.from-r.to,r=a}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let a=this.rangeIndex,s=this.range;for(;s.to<=r;)s=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Sj,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class jg{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;WK(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}jg.prototype.contextual=jg.prototype.fallback=jg.prototype.extend=!1;class _M{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?py(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(WK(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}_M.prototype.contextual=jg.prototype.fallback=jg.prototype.extend=!1;class n_{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function WK(t,e,n,r,i,o){let a=0,s=1<<r,{dialect:l}=n.p.parser;e:for(;(s&t[a])!=0;){let u=t[a+1];for(let h=a+3;h<u;h+=2)if((t[h+1]&s)>0){let g=t[h];if(l.allows(g)&&(e.token.value==-1||e.token.value==g||Ttt(g,e.token.value,i,o))){e.acceptToken(g);break}}let c=e.next,d=0,f=t[a+2];if(e.next<0&&f>d&&t[u+f*3-3]==65535){a=t[u+f*3-1];continue e}for(;d<f;){let h=d+f>>1,g=u+h+(h<<1),m=t[g],y=t[g+1]||65536;if(c<m)f=h;else if(c>=y)d=h+1;else{a=t[g+2],e.advance();continue e}}break}}function Cj(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function Ttt(t,e,n,r){let i=Cj(n,r,e);return i<0||Cj(n,r,t)<i}const _s=typeof process!="undefined"&&process.env&&/\bparse\b/.test({}.LOG);let I2=null;function Ej(t,e,n){let r=t.cursor(ao.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class ktt{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ej(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ej(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],a=this.start[n]+r.positions[i];if(a>e)return this.nextStart=a,null;if(o instanceof Gi){if(a==e){if(a<this.safeFrom)return null;let s=a+o.length;if(s<=this.safeTo){let l=o.prop(hr.lookAhead);if(!l||s+l<this.fragment.to)return o}}this.index[n]++,a+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}}class Ptt{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new J1)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,a=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let u=0;u<o.length;u++){if((1<<u&a)==0)continue;let c=o[u],d=this.tokens[u];if(!(r&&!c.fallback)&&((c.contextual||d.start!=e.pos||d.mask!=a||d.context!=s)&&(this.updateCachedToken(d,c,e),d.mask=a,d.context=s),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let f=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(r=d,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new J1,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new J1,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let a=0;a<o.specialized.length;a++)if(o.specialized[a]==e.value){let s=o.specializers[a](this.stream.read(e.start,e.end),r);if(s>=0&&r.p.parser.dialect.allows(s>>1)){(s&1)==0?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:a}=e.p,{data:s}=a;for(let l=0;l<2;l++)for(let u=a.stateSlot(o,l?2:1);;u+=3){if(s[u]==65535)if(s[u+1]==1)u=Bc(s,u+2);else{i==0&&s[u+1]==2&&(i=this.putAction(Bc(s,u+2),n,r,i));break}s[u]==n&&(i=this.putAction(Bc(s,u+1),n,r,i))}return i}}class Att{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Ett(n,i),this.tokens=new Ptt(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[Gx.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new ktt(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let s=e[a];for(;;){if(this.tokens.mainToken=null,s.pos>n)r.push(s);else{if(this.advanceStack(s,r,e))continue;{i||(i=[],o=[]),i.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!r.length){let a=i&&$tt(i);if(a)return _s&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw _s&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(a)return _s&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a<r.length-1;a++){let s=r[a];for(let l=a+1;l<r.length;l++){let u=r[l];if(s.sameState(u)||s.buffer.length>500&&u.buffer.length>500)if((s.score-u.score||s.buffer.length-u.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a<r.length;a++)r[a].pos<this.minStackPos&&(this.minStackPos=r[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,a=_s?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let f=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(f>-1&&d.length&&(!u||(d.prop(hr.contextHash)||0)==c))return e.useNode(d,f),_s&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Gi)||d.children.length==0||d.positions[0]>0)break;let h=d.children[0];if(h instanceof Gi&&d.positions[0]==0)d=h;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),_s&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;u<l.length;){let c=l[u++],d=l[u++],f=l[u++],h=u==l.length||!r,g=h?e:e.split(),m=this.tokens.mainToken;if(g.apply(c,d,m?m.start:g.pos,f),_s&&console.log(a+this.stackID(g)+` (via ${(c&65536)==0?"shift":`reduce of ${o.getName(c&65535)}`} for ${o.getName(d)} @ ${i}${g==e?"":", split"})`),h)return!0;g.pos>i?n.push(g):r.push(g)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Tj(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let a=0;a<e.length;a++){let s=e[a],l=n[a<<1],u=n[(a<<1)+1],c=_s?this.stackID(s)+" -> ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),_s&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let d=s.split(),f=c;for(let h=0;d.forceReduce()&&h<10&&(_s&&console.log(f+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));h++)_s&&(f=this.stackID(d)+" -> ");for(let h of s.recoverByInsert(l))_s&&console.log(c+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(u==s.pos&&(u++,l=0),s.recoverByDelete(l,u),_s&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),Tj(s,r)):(!i||i.score<s.score)&&(i=s)}return i}stackToTree(e){return e.close(),Gi.build({buffer:Kx.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(I2||(I2=new WeakMap)).get(e);return n||I2.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function Tj(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class Mtt{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const B2=t=>t;class Rtt{constructor(e){this.start=e.start,this.shift=e.shift||B2,this.reduce=e.reduce||B2,this.reuse=e.reuse||B2,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class lb extends bG{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (${14})`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;s<e.repeatNodeCount;s++)n.push("");let r=Object.keys(e.topRules).map(s=>e.topRules[s][1]),i=[];for(let s=0;s<n.length;s++)i.push([]);function o(s,l,u){i[s].push([l,l.deserialize(String(u))])}if(e.nodeProps)for(let s of e.nodeProps){let l=s[0];typeof l=="string"&&(l=hr[l]);for(let u=1;u<s.length;){let c=s[u++];if(c>=0)o(c,l,s[u++]);else{let d=s[u+-c];for(let f=-c;f>0;f--)o(s[u++],l,d);u++}}}this.nodeSet=new mD(n.map((s,l)=>is.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=gG;let a=py(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;s<this.specializerSpecs.length;s++)this.specialized[s]=this.specializerSpecs[s].term;this.specializers=this.specializerSpecs.map(kj),this.states=py(e.states,Uint32Array),this.data=py(e.stateData),this.goto=py(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(s=>typeof s=="number"?new jg(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new Att(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let a=i[o++],s=a&1,l=i[o++];if(s&&r)return l;for(let u=o+(a>>1);o<u;o++)if(i[o]==e)return l;if(s)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),a;;o+=3){if((a=r[o])==65535)if(r[o+1]==1)a=r[o=Bc(r,o+2)];else{if(r[o+1]==2)return Bc(r,o+2);break}if(a==n||a==0)return Bc(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Bc(this.data,o+2);else break;i=n(Bc(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Bc(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((o,a)=>a&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(lb.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(s=>s.from==r.external);if(!o)return r;let a=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=kj(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(r[a]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let a=this.dialects[n[o]],s;(s=this.data[a++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[s]=1;return new Mtt(e,r,i)}static deserialize(e){return new lb(e)}}function Bc(t,e){return t[e]|t[e+1]<<16}function $tt(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function kj(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const Ntt=_D({String:et.string,Number:et.number,"True False":et.bool,PropertyName:et.propertyName,Null:et.null,",":et.separator,"[ ]":et.squareBracket,"{ }":et.brace}),Dtt=lb.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[Ntt],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),Ltt=eb.define({name:"json",parser:Dtt.configure({props:[xD.add({Object:Gy({except:/^\s*\}/}),Array:Gy({except:/^\s*\]/})}),CD.add({"Object Array":TG})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function uv(){return new SG(Ltt)}var HK={exports:{}},FC={},QD={exports:{}},UK={},VC={};function _o(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}_o.prototype.clone_empty=function(){var t=new _o(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t};_o.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]};_o.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1};_o.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))};_o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)};_o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};_o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,t.__items[0]===" "&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1};_o.prototype.is_empty=function(){return this.__items.length===0};_o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]};_o.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf(`
- `);e!==-1?this.__character_count=t.length-e:this.__character_count+=t.length};_o.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t};_o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)};_o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)};_o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1};_o.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t};function r_(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}r_.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e,n};r_.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e],n};r_.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()};r_.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)};function So(t,e){this.__indent_cache=new r_(t,e),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new _o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}So.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)};So.prototype.get_line_number=function(){return this.__lines.length};So.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)};So.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)};So.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()};So.prototype.add_new_line=function(t){return this.is_empty()||!t&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)};So.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&(e[e.length-1]===`
- `&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join(`
- `);return t!==`
- `&&(n=n.replace(/[\n]/g,t)),n};So.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()};So.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)};So.prototype.add_raw_token=function(t){for(var e=0;e<t.newlines;e++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1};So.prototype.add_token=function(t){this.__add_space_before_token(),this.current_line.push(t),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()};So.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))};So.prototype.remove_indent=function(t){for(var e=this.__lines.length;t<e;)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()};So.prototype.trim=function(t){for(t=t===void 0?!1:t,this.current_line.trim();t&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null};So.prototype.just_added_newline=function(){return this.current_line.is_empty()};So.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()};So.prototype.ensure_empty_line_above=function(t,e){for(var n=this.__lines.length-2;n>=0;){var r=this.__lines[n];if(r.is_empty())break;if(r.item(0).indexOf(t)!==0&&r.item(-1)!==e){this.__lines.splice(n+1,0,new _o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}};VC.Output=So;var zD={};function Itt(t,e,n,r){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}zD.Token=Itt;var WD={};(function(t){var e="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",a="(?:"+o+"|["+e+r+"])",s="(?:"+o+"|["+n+r+i+"])*";t.identifier=new RegExp(a+s,"g"),t.identifierStart=new RegExp(a),t.identifierMatch=new RegExp("(?:"+o+"|["+n+r+i+"])+"),t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp(`\r
- |`+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g")})(WD);var HD={},cv={};function qf(t,e){this.raw_options=XK(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}qf.prototype._get_array=function(t,e){var n=this.raw_options[t],r=e||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(r=n.concat()):typeof n=="string"&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r};qf.prototype._get_boolean=function(t,e){var n=this.raw_options[t],r=n===void 0?!!e:!!n;return r};qf.prototype._get_characters=function(t,e){var n=this.raw_options[t],r=e||"";return typeof n=="string"&&(r=n.replace(/\\r/,"\r").replace(/\\n/,`
- `).replace(/\\t/," ")),r};qf.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var r=parseInt(n,10);return isNaN(r)&&(r=e),r};qf.prototype._get_selection=function(t,e,n){var r=this._get_selection_list(t,e,n);if(r.length!==1)throw new Error("Invalid Option Value: The option '"+t+`' can only be one of the following values:
- `+e+`
- You passed in: '`+this.raw_options[t]+"'");return r[0]};qf.prototype._get_selection_list=function(t,e,n){if(!e||e.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var r=this._get_array(t,n);if(!this._is_valid_selection(r,e))throw new Error("Invalid Option Value: The option '"+t+`' can contain only the following values:
- `+e+`
- You passed in: '`+this.raw_options[t]+"'");return r};qf.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some(function(n){return e.indexOf(n)===-1})};function XK(t,e){var n={};t=ZK(t);var r;for(r in t)r!==e&&(n[r]=t[r]);if(e&&t[e])for(r in t[e])n[r]=t[e][r];return n}function ZK(t){var e={},n;for(n in t){var r=n.replace(/-/g,"_");e[r]=t[n]}return e}cv.Options=qf;cv.normalizeOpts=ZK;cv.mergeOpts=XK;var qK=cv.Options,Btt=["before-newline","after-newline","preserve-newline"];function YK(t){qK.call(this,t,"js");var e=this.raw_options.brace_style||null;e==="expand-strict"?this.raw_options.brace_style="expand":e==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var r=0;r<n.length;r++)n[r]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=n[r];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",Btt),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}YK.prototype=new qK;HD.Options=YK;var Yf={},jC={},GK=RegExp.prototype.hasOwnProperty("sticky");function Uo(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}Uo.prototype.restart=function(){this.__position=0};Uo.prototype.back=function(){this.__position>0&&(this.__position-=1)};Uo.prototype.hasNext=function(){return this.__position<this.__input_length};Uo.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t};Uo.prototype.peek=function(t){var e=null;return t=t||0,t+=this.__position,t>=0&&t<this.__input_length&&(e=this.__input.charAt(t)),e};Uo.prototype.__match=function(t,e){t.lastIndex=e;var n=t.exec(this.__input);return n&&!(GK&&t.sticky)&&n.index!==e&&(n=null),n};Uo.prototype.test=function(t,e){return e=e||0,e+=this.__position,e>=0&&e<this.__input_length?!!this.__match(t,e):!1};Uo.prototype.testChar=function(t,e){var n=this.peek(e);return t.lastIndex=0,n!==null&&t.test(n)};Uo.prototype.match=function(t){var e=this.__match(t,this.__position);return e?this.__position+=e[0].length:e=null,e};Uo.prototype.read=function(t,e,n){var r="",i;return t&&(i=this.match(t),i&&(r+=i[0])),e&&(i||!t)&&(r+=this.readUntil(e,n)),r};Uo.prototype.readUntil=function(t,e){var n="",r=this.__position;t.lastIndex=this.__position;var i=t.exec(this.__input);return i?(r=i.index,e&&(r+=i[0].length)):r=this.__input_length,n=this.__input.substring(this.__position,r),this.__position=r,n};Uo.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)};Uo.prototype.get_regexp=function(t,e){var n=null,r="g";return e&&GK&&(r="y"),typeof t=="string"&&t!==""?n=new RegExp(t,r):t&&(n=new RegExp(t.source,r)),n};Uo.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))};Uo.prototype.peekUntilAfter=function(t){var e=this.__position,n=this.readUntilAfter(t);return this.__position=e,n};Uo.prototype.lookBack=function(t){var e=this.__position-1;return e>=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t};jC.InputScanner=Uo;var dv={},KK={};function Cp(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}Cp.prototype.restart=function(){this.__position=0};Cp.prototype.isEmpty=function(){return this.__tokens_length===0};Cp.prototype.hasNext=function(){return this.__position<this.__tokens_length};Cp.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t};Cp.prototype.peek=function(t){var e=null;return t=t||0,t+=this.__position,t>=0&&t<this.__tokens_length&&(e=this.__tokens[t]),e};Cp.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1};KK.TokenStream=Cp;var JK={},i_={};function oc(t,e){this._input=t,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,e&&(this._starting_pattern=this._input.get_regexp(e._starting_pattern,!0),this._match_pattern=this._input.get_regexp(e._match_pattern,!0),this._until_pattern=this._input.get_regexp(e._until_pattern),this._until_after=e._until_after)}oc.prototype.read=function(){var t=this._input.read(this._starting_pattern);return(!this._starting_pattern||t)&&(t+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),t};oc.prototype.read_match=function(){return this._input.match(this._match_pattern)};oc.prototype.until_after=function(t){var e=this._create();return e._until_after=!0,e._until_pattern=this._input.get_regexp(t),e._update(),e};oc.prototype.until=function(t){var e=this._create();return e._until_after=!1,e._until_pattern=this._input.get_regexp(t),e._update(),e};oc.prototype.starting_with=function(t){var e=this._create();return e._starting_pattern=this._input.get_regexp(t,!0),e._update(),e};oc.prototype.matching=function(t){var e=this._create();return e._match_pattern=this._input.get_regexp(t,!0),e._update(),e};oc.prototype._create=function(){return new oc(this._input,this)};oc.prototype._update=function(){};i_.Pattern=oc;var eJ=i_.Pattern;function Mf(t,e){eJ.call(this,t,e),e?this._line_regexp=this._input.get_regexp(e._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}Mf.prototype=new eJ;Mf.prototype.__set_whitespace_patterns=function(t,e){t+="\\t ",e+="\\n\\r",this._match_pattern=this._input.get_regexp("["+t+e+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+e+"]")};Mf.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var t=this._input.read(this._match_pattern);if(t===" ")this.whitespace_before_token=" ";else if(t){var e=this.__split(this._newline_regexp,t);this.newline_count=e.length-1,this.whitespace_before_token=e[this.newline_count]}return t};Mf.prototype.matching=function(t,e){var n=this._create();return n.__set_whitespace_patterns(t,e),n._update(),n};Mf.prototype._create=function(){return new Mf(this._input,this)};Mf.prototype.__split=function(t,e){t.lastIndex=0;for(var n=0,r=[],i=t.exec(e);i;)r.push(e.substring(n,i.index)),n=i.index+i[0].length,i=t.exec(e);return n<e.length?r.push(e.substring(n,e.length)):r.push(""),r};JK.WhitespacePattern=Mf;var Ftt=jC.InputScanner,tJ=zD.Token,F2=KK.TokenStream,Vtt=JK.WhitespacePattern,ub={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},_c=function(t,e){this._input=new Ftt(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new Vtt(this._input)};_c.prototype.tokenize=function(){this._input.restart(),this.__tokens=new F2,this._reset();for(var t,e=new tJ(ub.START,""),n=null,r=[],i=new F2;e.type!==ub.EOF;){for(t=this._get_next_token(e,n);this._is_comment(t);)i.add(t),t=this._get_next_token(e,n);i.isEmpty()||(t.comments_before=i,i=new F2),t.parent=n,this._is_opening(t)?(r.push(n),n=t):n&&this._is_closing(t,n)&&(t.opened=n,n.closed=t,n=r.pop(),t.parent=n),t.previous=e,e.next=t,this.__tokens.add(t),e=t}return this.__tokens};_c.prototype._is_first_token=function(){return this.__tokens.isEmpty()};_c.prototype._reset=function(){};_c.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(ub.RAW,n):this._create_token(ub.EOF,"")};_c.prototype._is_comment=function(t){return!1};_c.prototype._is_opening=function(t){return!1};_c.prototype._is_closing=function(t,e){return!1};_c.prototype._create_token=function(t,e){var n=new tJ(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return n};_c.prototype._readWhitespace=function(){return this._patterns.whitespace.read()};dv.Tokenizer=_c;dv.TOKEN=ub;var QC={};function UD(t,e){t=typeof t=="string"?t:t.source,e=typeof e=="string"?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,"g")}UD.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(t);n;)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e};UD.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)};QC.Directives=UD;var XD={},OM=i_.Pattern,wM={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function fu(t,e){OM.call(this,t,e),this.__template_pattern=null,this._disabled=Object.assign({},wM),this._excluded=Object.assign({},wM),e&&(this.__template_pattern=this._input.get_regexp(e.__template_pattern),this._excluded=Object.assign(this._excluded,e._excluded),this._disabled=Object.assign(this._disabled,e._disabled));var n=new OM(t);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}fu.prototype=new OM;fu.prototype._create=function(){return new fu(this._input,this)};fu.prototype._update=function(){this.__set_templated_pattern()};fu.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e};fu.prototype.read_options=function(t){var e=this._create();for(var n in wM)e._disabled[n]=t.templating.indexOf(n)===-1;return e._update(),e};fu.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e};fu.prototype.read=function(){var t="";this._match_pattern?t=this._input.read(this._starting_pattern):t=this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t};fu.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")};fu.prototype._read_template=function(){var t="",e=this._input.peek();if(e==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(t=t||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(t=t||this.__patterns.erb.read())}else e==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(t=t||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=t||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t};XD.TemplatablePattern=fu;var jtt=jC.InputScanner,nJ=dv.Tokenizer,V2=dv.TOKEN,Qtt=QC.Directives,cl=WD,ztt=i_.Pattern,Wtt=XD.TemplatablePattern;function j2(t,e){return e.indexOf(t)!==-1}var On={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:V2.START,RAW:V2.RAW,EOF:V2.EOF},Pj=new Qtt(/\/\*/,/\*\//),Htt=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,Utt=/[0-9]/,Xtt=/[^\d\.]/,Ztt=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),mp=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";mp=mp.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&");mp="\\?\\.(?!\\d) "+mp;mp=mp.replace(/ /g,"|");var qtt=new RegExp(mp),rJ="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Ytt=rJ.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Gtt=new RegExp("^(?:"+Ytt.join("|")+")$"),ew,Co=function(t,e){nJ.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var n=new ztt(this._input),r=new Wtt(this._input).read_options(this._options);this.__patterns={template:r,identifier:r.starting_with(cl.identifier).matching(cl.identifierMatch),number:n.matching(Htt),punct:n.matching(qtt),comment:n.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:n.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:n.matching(/<!--/),html_comment_end:n.matching(/-->/),include:n.starting_with(/#include/).until_after(cl.lineBreak),shebang:n.starting_with(/#!/).until_after(cl.lineBreak),xml:n.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:r.until(/['\\\n\r\u2028\u2029]/),double_quote:r.until(/["\\\n\r\u2028\u2029]/),template_text:r.until(/[`\\$]/),template_expression:r.until(/[`}\\]/)}};Co.prototype=new nJ;Co.prototype._is_comment=function(t){return t.type===On.COMMENT||t.type===On.BLOCK_COMMENT||t.type===On.UNKNOWN};Co.prototype._is_opening=function(t){return t.type===On.START_BLOCK||t.type===On.START_EXPR};Co.prototype._is_closing=function(t,e){return(t.type===On.END_BLOCK||t.type===On.END_EXPR)&&e&&(t.text==="]"&&e.text==="["||t.text===")"&&e.text==="("||t.text==="}"&&e.text==="{")};Co.prototype._reset=function(){ew=!1};Co.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var r=this._input.peek();return r===null?this._create_token(On.EOF,""):(n=n||this._read_non_javascript(r),n=n||this._read_string(r),n=n||this._read_pair(r,this._input.peek(1)),n=n||this._read_word(t),n=n||this._read_singles(r),n=n||this._read_comment(r),n=n||this._read_regexp(r,t),n=n||this._read_xml(r,t),n=n||this._read_punctuation(),n=n||this._create_token(On.UNKNOWN,this._input.next()),n)};Co.prototype._read_word=function(t){var e;if(e=this.__patterns.identifier.read(),e!=="")return e=e.replace(cl.allLineBreaks,`
- `),!(t.type===On.DOT||t.type===On.RESERVED&&(t.text==="set"||t.text==="get"))&&Gtt.test(e)?(e==="in"||e==="of")&&(t.type===On.WORD||t.type===On.STRING)?this._create_token(On.OPERATOR,e):this._create_token(On.RESERVED,e):this._create_token(On.WORD,e);if(e=this.__patterns.number.read(),e!=="")return this._create_token(On.WORD,e)};Co.prototype._read_singles=function(t){var e=null;return t==="("||t==="["?e=this._create_token(On.START_EXPR,t):t===")"||t==="]"?e=this._create_token(On.END_EXPR,t):t==="{"?e=this._create_token(On.START_BLOCK,t):t==="}"?e=this._create_token(On.END_BLOCK,t):t===";"?e=this._create_token(On.SEMICOLON,t):t==="."&&Xtt.test(this._input.peek(1))?e=this._create_token(On.DOT,t):t===","&&(e=this._create_token(On.COMMA,t)),e&&this._input.next(),e};Co.prototype._read_pair=function(t,e){var n=null;return t==="#"&&e==="{"&&(n=this._create_token(On.START_BLOCK,t+e)),n&&(this._input.next(),this._input.next()),n};Co.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(t!=="")return t==="="?this._create_token(On.EQUALS,t):t==="?."?this._create_token(On.DOT,t):this._create_token(On.OPERATOR,t)};Co.prototype._read_non_javascript=function(t){var e="";if(t==="#"){if(this._is_first_token()&&(e=this.__patterns.shebang.read(),e))return this._create_token(On.UNKNOWN,e.trim()+`
- `);if(e=this.__patterns.include.read(),e)return this._create_token(On.UNKNOWN,e.trim()+`
- `);t=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(Utt)){do t=this._input.next(),n+=t;while(this._input.hasNext()&&t!=="#"&&t!=="=");return t==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(n+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(n+="{}",this._input.next(),this._input.next())),this._create_token(On.WORD,n)}this._input.back()}else if(t==="<"&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read(),e){for(;this._input.hasNext()&&!this._input.testChar(cl.newline);)e+=this._input.next();return ew=!0,this._create_token(On.COMMENT,e)}}else if(ew&&t==="-"&&(e=this.__patterns.html_comment_end.read(),e))return ew=!1,this._create_token(On.COMMENT,e);return null};Co.prototype._read_comment=function(t){var e=null;if(t==="/"){var n="";if(this._input.peek(1)==="*"){n=this.__patterns.block_comment.read();var r=Pj.get_directives(n);r&&r.ignore==="start"&&(n+=Pj.readIgnored(this._input)),n=n.replace(cl.allLineBreaks,`
- `),e=this._create_token(On.BLOCK_COMMENT,n),e.directives=r}else this._input.peek(1)==="/"&&(n=this.__patterns.comment.read(),e=this._create_token(On.COMMENT,n))}return e};Co.prototype._read_string=function(t){if(t==="`"||t==="'"||t==='"'){var e=this._input.next();return this.has_char_escapes=!1,t==="`"?e+=this._read_string_recursive("`",!0,"${"):e+=this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=Ktt(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(cl.allLineBreaks,`
- `),this._create_token(On.STRING,e)}return null};Co.prototype._allow_regexp_or_xml=function(t){return t.type===On.RESERVED&&j2(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===On.END_EXPR&&t.text===")"&&t.opened.previous.type===On.RESERVED&&j2(t.opened.previous.text,["if","while","for"])||j2(t.type,[On.COMMENT,On.START_EXPR,On.START_BLOCK,On.START,On.END_BLOCK,On.OPERATOR,On.EQUALS,On.EOF,On.SEMICOLON,On.COMMA])};Co.prototype._read_regexp=function(t,e){if(t==="/"&&this._allow_regexp_or_xml(e)){for(var n=this._input.next(),r=!1,i=!1;this._input.hasNext()&&(r||i||this._input.peek()!==t)&&!this._input.testChar(cl.newline);)n+=this._input.peek(),r?r=!1:(r=this._input.peek()==="\\",this._input.peek()==="["?i=!0:this._input.peek()==="]"&&(i=!1)),this._input.next();return this._input.peek()===t&&(n+=this._input.next(),n+=this._input.read(cl.identifier)),this._create_token(On.STRING,n)}return null};Co.prototype._read_xml=function(t,e){if(this._options.e4x&&t==="<"&&this._allow_regexp_or_xml(e)){var n="",r=this.__patterns.xml.read_match();if(r){for(var i=r[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),o=i.indexOf("{")===0,a=0;r;){var s=!!r[1],l=r[2],u=!!r[r.length-1]||l.slice(0,8)==="![CDATA[";if(!u&&(l===i||o&&l.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(s?--a:++a),n+=r[0],a<=0)break;r=this.__patterns.xml.read_match()}return r||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(cl.allLineBreaks,`
- `),this._create_token(On.STRING,n)}}return null};function Ktt(t){for(var e="",n=0,r=new jtt(t),i=null;r.hasNext();)if(i=r.match(/([\s]|[^\\]|\\\\)+/g),i&&(e+=i[0]),r.peek()==="\\"){if(r.next(),r.peek()==="x")i=r.match(/x([0-9A-Fa-f]{2})/g);else if(r.peek()==="u")i=r.match(/u([0-9A-Fa-f]{4})/g),i||(i=r.match(/u\{([0-9A-Fa-f]+)\}/g));else{e+="\\",r.hasNext()&&(e+=r.next());continue}if(!i||(n=parseInt(i[1],16),n>126&&n<=255&&i[0].indexOf("x")===0))return t;n>=0&&n<32||n>1114111?e+="\\"+i[0]:n===34||n===39||n===92?e+="\\"+String.fromCharCode(n):e+=String.fromCharCode(n)}return e}Co.prototype._read_string_recursive=function(t,e,n){var r,i;t==="'"?i=this.__patterns.single_quote:t==='"'?i=this.__patterns.double_quote:t==="`"?i=this.__patterns.template_text:t==="}"&&(i=this.__patterns.template_expression);for(var o=i.read(),a="";this._input.hasNext();){if(a=this._input.next(),a===t||!e&&cl.newline.test(a)){this._input.back();break}else a==="\\"&&this._input.hasNext()?(r=this._input.peek(),r==="x"||r==="u"?this.has_char_escapes=!0:r==="\r"&&this._input.peek(1)===`
- `&&this._input.next(),a+=this._input.next()):n&&(n==="${"&&a==="$"&&this._input.peek()==="{"&&(a+=this._input.next()),n===a&&(t==="`"?a+=this._read_string_recursive("}",e,"`"):a+=this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(a+=this._input.next())));a+=i.read(),o+=a}return o};Yf.Tokenizer=Co;Yf.TOKEN=On;Yf.positionable_operators=Ztt.slice();Yf.line_starters=rJ.slice();var Jtt=VC.Output,ent=zD.Token,Jx=WD,tnt=HD.Options,nnt=Yf.Tokenizer,cb=Yf.line_starters,gy=Yf.positionable_operators,ft=Yf.TOKEN;function Zn(t,e){return e.indexOf(t)!==-1}function rnt(t){return t.replace(/^\s+/g,"")}function int(t){for(var e={},n=0;n<t.length;n++)e[t[n].replace(/-/g,"_")]=t[n];return e}function tl(t,e){return t&&t.type===ft.RESERVED&&t.text===e}function ii(t,e){return t&&t.type===ft.RESERVED&&Zn(t.text,e)}var zC=["case","return","do","if","throw","else","await","break","continue","async"],ont=["before-newline","after-newline","preserve-newline"],Ky=int(ont),iJ=[Ky.before_newline,Ky.preserve_newline],$n={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function oJ(t,e){e.multiline_frame||e.mode===$n.ForInitializer||e.mode===$n.Conditional||t.remove_indent(e.start_line_index)}function ant(t){t=t.replace(Jx.allLineBreaks,`
- `);for(var e=[],n=t.indexOf(`
- `);n!==-1;)e.push(t.substring(0,n)),t=t.substring(n+1),n=t.indexOf(`
- `);return t.length&&e.push(t),e}function Rf(t){return t===$n.ArrayLiteral}function Jy(t){return Zn(t,[$n.Expression,$n.ForInitializer,$n.Conditional])}function snt(t,e){for(var n=0;n<t.length;n++){var r=t[n].trim();if(r.charAt(0)!==e)return!1}return!0}function lnt(t,e){for(var n=0,r=t.length,i;n<r;n++)if(i=t[n],i&&i.indexOf(e)!==0)return!1;return!0}function Ir(t,e){e=e||{},this._source_text=t||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new tnt(e)}Ir.prototype.create_flags=function(t,e){var n=0;t&&(n=t.indentation_level,!this._output.just_added_newline()&&t.line_indent_level>n&&(n=t.line_indent_level));var r={mode:e,parent:t,last_token:t?t.last_token:new ent(ft.START_BLOCK,""),last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:n,alignment:0,line_indent_level:t?t.line_indent_level:n,start_line_index:this._output.get_line_number(),ternary_depth:0};return r};Ir.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new Jtt(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode($n.BlockStatement);var n=new nnt(t,this._options);return this._tokens=n.tokenize(),t};Ir.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t,e=this._reset(this._source_text),n=this._options.eol;this._options.eol==="auto"&&(n=`
- `,e&&Jx.lineBreak.test(e||"")&&(n=e.match(Jx.lineBreak)[0]));for(var r=this._tokens.next();r;)this.handle_token(r),this._last_last_text=this._flags.last_token.text,this._flags.last_token=r,r=this._tokens.next();return t=this._output.get_code(n),t};Ir.prototype.handle_token=function(t,e){t.type===ft.START_EXPR?this.handle_start_expr(t):t.type===ft.END_EXPR?this.handle_end_expr(t):t.type===ft.START_BLOCK?this.handle_start_block(t):t.type===ft.END_BLOCK?this.handle_end_block(t):t.type===ft.WORD?this.handle_word(t):t.type===ft.RESERVED?this.handle_word(t):t.type===ft.SEMICOLON?this.handle_semicolon(t):t.type===ft.STRING?this.handle_string(t):t.type===ft.EQUALS?this.handle_equals(t):t.type===ft.OPERATOR?this.handle_operator(t):t.type===ft.COMMA?this.handle_comma(t):t.type===ft.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===ft.COMMENT?this.handle_comment(t,e):t.type===ft.DOT?this.handle_dot(t):t.type===ft.EOF?this.handle_eof(t):t.type===ft.UNKNOWN?this.handle_unknown(t,e):this.handle_unknown(t,e)};Ir.prototype.handle_whitespace_and_comments=function(t,e){var n=t.newlines,r=this._options.keep_array_indentation&&Rf(this._flags.mode);if(t.comments_before)for(var i=t.comments_before.next();i;)this.handle_whitespace_and_comments(i,e),this.handle_token(i,e),i=t.comments_before.next();if(r)for(var o=0;o<n;o+=1)this.print_newline(o>0,e);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,e);for(var a=1;a<n;a+=1)this.print_newline(!0,e)}};var ZD=["async","break","continue","return","throw","yield"];Ir.prototype.allow_wrap_or_preserved_newline=function(t,e){if(e=e===void 0?!1:e,!this._output.just_added_newline()){var n=this._options.preserve_newlines&&t.newlines||e,r=Zn(this._flags.last_token.text,gy)||Zn(t.text,gy);if(r){var i=Zn(this._flags.last_token.text,gy)&&Zn(this._options.operator_position,iJ)||Zn(t.text,gy);n=n&&i}if(n)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(ii(this._flags.last_token,ZD))return;this._output.set_wrap_point()}}};Ir.prototype.print_newline=function(t,e){if(!e&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==ft.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var n=this._tokens.peek();this._flags.mode===$n.Statement&&!(this._flags.if_block&&tl(n,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(t)&&(this._flags.multiline_frame=!0)};Ir.prototype.print_token_line_indentation=function(t){this._output.just_added_newline()&&(this._options.keep_array_indentation&&t.newlines&&(t.text==="["||Rf(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(t.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))};Ir.prototype.print_token=function(t){if(this._output.raw){this._output.add_raw_token(t);return}if(this._options.comma_first&&t.previous&&t.previous.type===ft.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var e=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(e),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(t),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(t),this._output.non_breaking_space=!0,this._output.add_token(t.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)};Ir.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};Ir.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};Ir.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};Ir.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===$n.Statement&&oJ(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};Ir.prototype.start_of_object_property=function(){return this._flags.parent.mode===$n.ObjectLiteral&&this._flags.mode===$n.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ii(this._flags.last_token,["get","set"]))};Ir.prototype.start_of_statement=function(t){var e=!1;return e=e||ii(this._flags.last_token,["var","let","const"])&&t.type===ft.WORD,e=e||tl(this._flags.last_token,"do"),e=e||!(this._flags.parent.mode===$n.ObjectLiteral&&this._flags.mode===$n.Statement)&&ii(this._flags.last_token,ZD)&&!t.newlines,e=e||tl(this._flags.last_token,"else")&&!(tl(t,"if")&&!t.comments_before),e=e||this._flags.last_token.type===ft.END_EXPR&&(this._previous_flags.mode===$n.ForInitializer||this._previous_flags.mode===$n.Conditional),e=e||this._flags.last_token.type===ft.WORD&&this._flags.mode===$n.BlockStatement&&!this._flags.in_case&&!(t.text==="--"||t.text==="++")&&this._last_last_text!=="function"&&t.type!==ft.WORD&&t.type!==ft.RESERVED,e=e||this._flags.mode===$n.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ii(this._flags.last_token,["get","set"])),e?(this.set_mode($n.Statement),this.indent(),this.handle_whitespace_and_comments(t,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t,ii(t,["do","for","if","while"])),!0):!1};Ir.prototype.handle_start_expr=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t);var e=$n.Expression;if(t.text==="["){if(this._flags.last_token.type===ft.WORD||this._flags.last_token.text===")"){ii(this._flags.last_token,cb)&&(this._output.space_before_token=!0),this.print_token(t),this.set_mode(e),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}e=$n.ArrayLiteral,Rf(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),Zn(this._flags.last_token.type,[ft.START_EXPR,ft.END_EXPR,ft.WORD,ft.OPERATOR,ft.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===ft.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,e=$n.ForInitializer):Zn(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,e=$n.Conditional):Zn(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&t.whitespace_before===""?this._output.space_before_token=!1:(Zn(this._flags.last_token.text,cb)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===ft.EQUALS||this._flags.last_token.type===ft.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t);else if(this._flags.last_token.type===ft.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var r=this._tokens.peek(-4);ii(n,["async","function"])||n.text==="*"&&ii(r,["async","function"])?this._output.space_before_token=!0:this._flags.mode===$n.ObjectLiteral?(n.text==="{"||n.text===","||n.text==="*"&&(r.text==="{"||r.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(t);(this._flags.last_token.type===ft.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(Zn(this._last_last_text,["function","yield"])||this._flags.mode===$n.ObjectLiteral&&Zn(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===ft.START_BLOCK?this.print_newline():(this._flags.last_token.type===ft.END_EXPR||this._flags.last_token.type===ft.START_EXPR||this._flags.last_token.type===ft.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===ft.COMMA)&&this.allow_wrap_or_preserved_newline(t,t.newlines),this.print_token(t),this.set_mode(e),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()};Ir.prototype.handle_end_expr=function(t){for(;this._flags.mode===$n.Statement;)this.restore_mode();this.handle_whitespace_and_comments(t),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(t,t.text==="]"&&Rf(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===ft.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(t),this.restore_mode(),oJ(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===$n.Conditional&&(this._previous_flags.mode=$n.Expression,this._flags.do_block=!1,this._flags.do_while=!1)};Ir.prototype.handle_start_block=function(t){this.handle_whitespace_and_comments(t);var e=this._tokens.peek(),n=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===ft.END_EXPR?(this.set_mode($n.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode($n.BlockStatement):n&&(Zn(n.text,[":",","])&&Zn(e.type,[ft.STRING,ft.WORD,ft.RESERVED])||Zn(e.text,["get","set","..."])&&Zn(n.type,[ft.WORD,ft.RESERVED]))?Zn(this._last_last_text,["class","interface"])&&!Zn(n.text,[":",","])?this.set_mode($n.BlockStatement):this.set_mode($n.ObjectLiteral):this._flags.last_token.type===ft.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode($n.BlockStatement):Zn(this._flags.last_token.type,[ft.EQUALS,ft.START_EXPR,ft.COMMA,ft.OPERATOR])||ii(this._flags.last_token,["return","throw","import","default"])?this.set_mode($n.ObjectLiteral):this.set_mode($n.BlockStatement),this._flags.last_token&&ii(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var r=!e.comments_before&&e.text==="}",i=r&&this._flags.last_word==="function"&&this._flags.last_token.type===ft.END_EXPR;if(this._options.brace_preserve_inline){var o=0,a=null;this._flags.inline_frame=!0;do if(o+=1,a=this._tokens.peek(o-1),a.newlines){this._flags.inline_frame=!1;break}while(a.type!==ft.EOF&&!(a.type===ft.END_BLOCK&&a.opened===t))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==ft.OPERATOR&&(i||this._flags.last_token.type===ft.EQUALS||ii(this._flags.last_token,zC)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(Rf(this._previous_flags.mode)&&(this._flags.last_token.type===ft.START_EXPR||this._flags.last_token.type===ft.COMMA)&&((this._flags.last_token.type===ft.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===ft.COMMA||this._flags.last_token.type===ft.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==ft.OPERATOR&&this._flags.last_token.type!==ft.START_EXPR&&(Zn(this._flags.last_token.type,[ft.START_BLOCK,ft.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(t),this.indent(),!r&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()};Ir.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);this._flags.mode===$n.Statement;)this.restore_mode();var e=this._flags.last_token.type===ft.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:this._options.brace_style==="expand"?e||this.print_newline():e||(Rf(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)};Ir.prototype.handle_word=function(t){if(t.type===ft.RESERVED){if(Zn(t.text,["set","get"])&&this._flags.mode!==$n.ObjectLiteral)t.type=ft.WORD;else if(t.text==="import"&&Zn(this._tokens.peek().text,["(","."]))t.type=ft.WORD;else if(Zn(t.text,["as","from"])&&!this._flags.import_block)t.type=ft.WORD;else if(this._flags.mode===$n.ObjectLiteral){var e=this._tokens.peek();e.text===":"&&(t.type=ft.WORD)}}if(this.start_of_statement(t)?ii(this._flags.last_token,["var","let","const"])&&t.type===ft.WORD&&(this._flags.declaration_statement=!0):t.newlines&&!Jy(this._flags.mode)&&(this._flags.last_token.type!==ft.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==ft.EQUALS&&(this._options.preserve_newlines||!ii(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(t),this.print_newline()):this.handle_whitespace_and_comments(t),this._flags.do_block&&!this._flags.do_while)if(tl(t,"while")){this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&tl(t,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===$n.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&ii(t,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(t),this._flags.in_case=!0;return}if((this._flags.last_token.type===ft.COMMA||this._flags.last_token.type===ft.START_EXPR||this._flags.last_token.type===ft.EQUALS||this._flags.last_token.type===ft.OPERATOR)&&!this.start_of_object_property()&&!(Zn(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===$n.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(t),tl(t,"function")){(Zn(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(Zn(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===ft.OPERATOR))&&!this._output.just_added_blankline()&&!t.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===ft.RESERVED||this._flags.last_token.type===ft.WORD?ii(this._flags.last_token,["get","set","new","export"])||ii(this._flags.last_token,ZD)?this._output.space_before_token=!0:tl(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===ft.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Jy(this._flags.mode)||Rf(this._flags.mode))||this.print_newline(),this.print_token(t),this._flags.last_word=t.text;return}var n="NONE";if(this._flags.last_token.type===ft.END_BLOCK?this._previous_flags.inline_frame?n="SPACE":ii(t,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&t.newlines?n="NEWLINE":(n="SPACE",this._output.space_before_token=!0):n="NEWLINE":this._flags.last_token.type===ft.SEMICOLON&&this._flags.mode===$n.BlockStatement?n="NEWLINE":this._flags.last_token.type===ft.SEMICOLON&&Jy(this._flags.mode)?n="SPACE":this._flags.last_token.type===ft.STRING?n="NEWLINE":this._flags.last_token.type===ft.RESERVED||this._flags.last_token.type===ft.WORD||this._flags.last_token.text==="*"&&(Zn(this._last_last_text,["function","yield"])||this._flags.mode===$n.ObjectLiteral&&Zn(this._last_last_text,["{",","]))?n="SPACE":this._flags.last_token.type===ft.START_BLOCK?this._flags.inline_frame?n="SPACE":n="NEWLINE":this._flags.last_token.type===ft.END_EXPR&&(this._output.space_before_token=!0,n="NEWLINE"),ii(t,cb)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?n="SPACE":n="NEWLINE"),ii(t,["else","catch","finally"]))if((!(this._flags.last_token.type===ft.END_BLOCK&&this._previous_flags.mode===$n.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&t.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var r=this._output.current_line;r.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else n==="NEWLINE"?ii(this._flags.last_token,zC)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&ii(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==ft.END_EXPR?(this._flags.last_token.type!==ft.START_EXPR||!ii(t,["var","let","const"]))&&this._flags.last_token.text!==":"&&(tl(t,"if")&&tl(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):ii(t,cb)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&Rf(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():n==="SPACE"&&(this._output.space_before_token=!0);t.previous&&(t.previous.type===ft.WORD||t.previous.type===ft.RESERVED)&&(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===ft.RESERVED&&(t.text==="do"?this._flags.do_block=!0:t.text==="if"?this._flags.if_block=!0:t.text==="import"?this._flags.import_block=!0:this._flags.import_block&&tl(t,"from")&&(this._flags.import_block=!1))};Ir.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();this._flags.mode===$n.Statement&&!(this._flags.if_block&&tl(e,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)};Ir.prototype.handle_string=function(t){t.text.startsWith("`")&&t.newlines===0&&t.whitespace_before===""&&(t.previous.text===")"||this._flags.last_token.type===ft.WORD)||(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===ft.RESERVED||this._flags.last_token.type===ft.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===ft.COMMA||this._flags.last_token.type===ft.START_EXPR||this._flags.last_token.type===ft.EQUALS||this._flags.last_token.type===ft.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):t.text.startsWith("`")&&this._flags.last_token.type===ft.END_EXPR&&(t.previous.text==="]"||t.previous.text===")")&&t.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(t)};Ir.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0};Ir.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(Jy(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):this._flags.mode===$n.ObjectLiteral||this._flags.mode===$n.Statement&&this._flags.parent.mode===$n.ObjectLiteral?(this._flags.mode===$n.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)};Ir.prototype.handle_operator=function(t){var e=t.text==="*"&&(ii(this._flags.last_token,["function","yield"])||Zn(this._flags.last_token.type,[ft.START_BLOCK,ft.COMMA,ft.END_BLOCK,ft.SEMICOLON])),n=Zn(t.text,["-","+"])&&(Zn(this._flags.last_token.type,[ft.START_BLOCK,ft.START_EXPR,ft.EQUALS,ft.OPERATOR])||Zn(this._flags.last_token.text,cb)||this._flags.last_token.text===",");if(!this.start_of_statement(t)){var r=!e;this.handle_whitespace_and_comments(t,r)}if(t.text==="*"&&this._flags.last_token.type===ft.DOT){this.print_token(t);return}if(t.text==="::"){this.print_token(t);return}if(Zn(t.text,["-","+"])&&this.start_of_object_property()){this.print_token(t);return}if(this._flags.last_token.type===ft.OPERATOR&&Zn(this._options.operator_position,iJ)&&this.allow_wrap_or_preserved_newline(t),t.text===":"&&this._flags.in_case){this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==ft.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var i=!0,o=!0,a=!1;if(t.text===":"?this._flags.ternary_depth===0?i=!1:(this._flags.ternary_depth-=1,a=!0):t.text==="?"&&(this._flags.ternary_depth+=1),!n&&!e&&this._options.preserve_newlines&&Zn(t.text,gy)){var s=t.text===":",l=s&&a,u=s&&!a;switch(this._options.operator_position){case Ky.before_newline:this._output.space_before_token=!u,this.print_token(t),(!s||l)&&this.allow_wrap_or_preserved_newline(t),this._output.space_before_token=!0;return;case Ky.after_newline:this._output.space_before_token=!0,!s||l?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),this._output.space_before_token=!0;return;case Ky.preserve_newline:u||this.allow_wrap_or_preserved_newline(t),i=!(this._output.just_added_newline()||u),this._output.space_before_token=i,this.print_token(t),this._output.space_before_token=!0;return}}if(e){this.allow_wrap_or_preserved_newline(t),i=!1;var c=this._tokens.peek();o=c&&Zn(c.type,[ft.WORD,ft.RESERVED])}else if(t.text==="...")this.allow_wrap_or_preserved_newline(t),i=this._flags.last_token.type===ft.START_BLOCK,o=!1;else if(Zn(t.text,["--","++","!","~"])||n){if((this._flags.last_token.type===ft.COMMA||this._flags.last_token.type===ft.START_EXPR)&&this.allow_wrap_or_preserved_newline(t),i=!1,o=!1,t.newlines&&(t.text==="--"||t.text==="++"||t.text==="~")){var d=ii(this._flags.last_token,zC)&&t.newlines;d&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(d,!0)}this._flags.last_token.text===";"&&Jy(this._flags.mode)&&(i=!0),this._flags.last_token.type===ft.RESERVED?i=!0:this._flags.last_token.type===ft.END_EXPR?i=!(this._flags.last_token.text==="]"&&(t.text==="--"||t.text==="++")):this._flags.last_token.type===ft.OPERATOR&&(i=Zn(t.text,["--","-","++","+"])&&Zn(this._flags.last_token.text,["--","-","++","+"]),Zn(t.text,["+","-"])&&Zn(this._flags.last_token.text,["--","++"])&&(o=!0)),(this._flags.mode===$n.BlockStatement&&!this._flags.inline_frame||this._flags.mode===$n.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(t),this._output.space_before_token=o};Ir.prototype.handle_block_comment=function(t,e){if(this._output.raw){this._output.add_raw_token(t),t.directives&&t.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(t.directives){this.print_newline(!1,e),this.print_token(t),t.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!Jx.newline.test(t.text)&&!t.newlines){this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0;return}else this.print_block_commment(t,e)};Ir.prototype.print_block_commment=function(t,e){var n=ant(t.text),r,i=!1,o=!1,a=t.whitespace_before,s=a.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(n[0]),this.print_newline(!1,e),n.length>1){for(n=n.slice(1),i=snt(n,"*"),o=lnt(n,a),i&&(this._flags.alignment=1),r=0;r<n.length;r++)i?(this.print_token_line_indentation(t),this._output.add_token(rnt(n[r]))):o&&n[r]?(this.print_token_line_indentation(t),this._output.add_token(n[r].substring(s))):(this._output.current_line.set_indent(-1),this._output.add_token(n[r])),this.print_newline(!1,e);this._flags.alignment=0}};Ir.prototype.handle_comment=function(t,e){t.newlines?this.print_newline(!1,e):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(t),this.print_newline(!1,e)};Ir.prototype.handle_dot=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),ii(this._flags.last_token,zC)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(t,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(t)};Ir.prototype.handle_unknown=function(t,e){this.print_token(t),t.text[t.text.length-1]===`
- `&&this.print_newline(!1,e)};Ir.prototype.handle_eof=function(t){for(;this._flags.mode===$n.Statement;)this.restore_mode();this.handle_whitespace_and_comments(t)};UK.Beautifier=Ir;var unt=UK.Beautifier,cnt=HD.Options;function dnt(t,e){var n=new unt(t,e);return n.beautify()}QD.exports=dnt;QD.exports.defaultOptions=function(){return new cnt};var qD={exports:{}},aJ={},YD={},sJ=cv.Options;function lJ(t){sJ.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var e=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||e;var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<n.length;r++)n[r]!=="expand"?this.brace_style="collapse":this.brace_style=n[r]}lJ.prototype=new sJ;YD.Options=lJ;var fnt=YD.Options,hnt=VC.Output,pnt=jC.InputScanner,gnt=QC.Directives,Aj=new gnt(/\/\*/,/\*\//),Mj=/\r\n|[\r\n]/,mnt=/\r\n|[\r\n]/g,eS=/\s/,vnt=/(?:\s|\n)+/g,ynt=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,bnt=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function vd(t,e){this._source_text=t||"",this._options=new fnt(e),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}vd.prototype.eatString=function(t){var e="";for(this._ch=this._input.next();this._ch;){if(e+=this._ch,this._ch==="\\")e+=this._input.next();else if(t.indexOf(this._ch)!==-1||this._ch===`
- `)break;this._ch=this._input.next()}return e};vd.prototype.eatWhitespace=function(t){for(var e=eS.test(this._input.peek()),n=0;eS.test(this._input.peek());)this._ch=this._input.next(),t&&this._ch===`
- `&&(n===0||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return e};vd.prototype.foundNestedPseudoClass=function(){for(var t=0,e=1,n=this._input.peek(e);n;){if(n==="{")return!0;if(n==="(")t+=1;else if(n===")"){if(t===0)return!1;t-=1}else if(n===";"||n==="}")return!1;e++,n=this._input.peek(e)}return!1};vd.prototype.print_string=function(t){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(t)};vd.prototype.preserveSingleSpace=function(t){t&&(this._output.space_before_token=!0)};vd.prototype.indent=function(){this._indentLevel++};vd.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--};vd.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;e==="auto"&&(e=`
- `,t&&Mj.test(t||"")&&(e=t.match(Mj)[0])),t=t.replace(mnt,`
- `);var n=t.match(/^[\t ]*/)[0];this._output=new hnt(this._options,n),this._input=new pnt(t),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var r=0,i=!1,o=!1,a=!1,s=!1,l=!1,u=this._ch,c=!1,d,f,h;d=this._input.read(vnt),f=d!=="",h=u,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),u=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var g=this._input.read(ynt),m=Aj.get_directives(g);m&&m.ignore==="start"&&(g+=Aj.readIgnored(this._input)),this.print_string(g),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(bnt)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(f),this.print_string(this._ch);var y=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);y.match(/[ :]$/)&&(y=this.eatString(": ").replace(/\s+$/,""),this.print_string(y),this._output.space_before_token=!0),r===0&&y.indexOf(":")!==-1&&(o=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(f),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var b=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);b.match(/[ :]$/)&&(b=this.eatString(": ").replace(/\s+$/,""),this.print_string(b),this._output.space_before_token=!0),r===0&&b.indexOf(":")!==-1?(o=!0,this.indent()):b in this.NESTED_AT_RULE?(this._nestedLevel+=1,b in this.CONDITIONAL_GROUP_RULE&&(a=!0)):r===0&&!o&&(s=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(f),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")o&&(o=!1,this.outdent()),s=!1,a?(a=!1,i=this._indentLevel>=this._nestedLevel):i=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&i&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(h==="("?this._output.space_before_token=!1:h!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),h==="{"&&this._output.trim(!0),o&&(this.outdent(),o=!1),this.print_string(this._ch),i=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var w=0;w<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;w++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[w])){c=!0;break}(i||a)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!s&&r===0?(this.print_string(":"),o||(o=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var O=h==='"'||h==="'";this.preserveSingleSpace(O||f),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")c=!1,r===0?(o&&(this.outdent(),o=!1),s=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),r++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),r&&(r--,this.outdent()));else{var x=!1;this._input.lookBack("with")&&(x=!0),this.preserveSingleSpace(f||x),this.print_string(this._ch),o&&h==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),l=!0):(this.eatWhitespace(),r++,this.indent())}else if(this._ch===")")r&&(r--,this.outdent()),l&&this._input.peek()===";"&&this._options.selector_separator_newline&&(l=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!o||l)&&r===0&&!s?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!o&&r===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&eS.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(f),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),eS.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var S=h==='"'||h==="'";this.preserveSingleSpace(S||f),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
- `&&c&&this._output.add_new_line()}var C=this._output.get_code(e);return C};aJ.Beautifier=vd;var _nt=aJ.Beautifier,Ont=YD.Options;function wnt(t,e){var n=new _nt(t,e);return n.beautify()}qD.exports=wnt;qD.exports.defaultOptions=function(){return new Ont};var GD={exports:{}},uJ={},KD={},cJ=cv.Options;function dJ(t){cJ.call(this,t,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}dJ.prototype=new cJ;KD.Options=dJ;var WC={},fJ=dv.Tokenizer,Q2=dv.TOKEN,xnt=QC.Directives,Snt=XD.TemplatablePattern,Cnt=i_.Pattern,Xr={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:Q2.START,RAW:Q2.RAW,EOF:Q2.EOF},Rj=new xnt(/<\!--/,/-->/),Xo=function(t,e){fJ.call(this,t,e),this._current_tag_name="";var n=new Snt(this._input).read_options(this._options),r=new Cnt(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),word_control_flow_close_excluded:n.until(/[\n\r\t <}]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),angular_control_flow_start:r.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),handlebars_open:r.until(/[\n\r\t }]/),handlebars_raw_close:r.until(/}}/),comment:r.starting_with(/<!--/).until_after(/-->/),cdata:r.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:r.starting_with(/<!\[/).until_after(/]>/),processing:r.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var i=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=r.matching(i).until_after(i)}};Xo.prototype=new fJ;Xo.prototype._is_comment=function(t){return!1};Xo.prototype._is_opening=function(t){return t.type===Xr.TAG_OPEN||t.type===Xr.CONTROL_FLOW_OPEN};Xo.prototype._is_closing=function(t,e){return t.type===Xr.TAG_CLOSE&&e&&((t.text===">"||t.text==="/>")&&e.text[0]==="<"||t.text==="}}"&&e.text[0]==="{"&&e.text[1]==="{")||t.type===Xr.CONTROL_FLOW_CLOSE&&t.text==="}"&&e.text.endsWith("{")};Xo.prototype._reset=function(){this._current_tag_name=""};Xo.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var r=this._input.peek();return r===null?this._create_token(Xr.EOF,""):(n=n||this._read_open_handlebars(r,e),n=n||this._read_attribute(r,t,e),n=n||this._read_close(r,e),n=n||this._read_control_flows(r,e),n=n||this._read_raw_content(r,t,e),n=n||this._read_content_word(r,e),n=n||this._read_comment_or_cdata(r),n=n||this._read_processing(r),n=n||this._read_open(r,e),n=n||this._create_token(Xr.UNKNOWN,this._input.next()),n)};Xo.prototype._read_comment_or_cdata=function(t){var e=null,n=null,r=null;if(t==="<"){var i=this._input.peek(1);i==="!"&&(n=this.__patterns.comment.read(),n?(r=Rj.get_directives(n),r&&r.ignore==="start"&&(n+=Rj.readIgnored(this._input))):n=this.__patterns.cdata.read()),n&&(e=this._create_token(Xr.COMMENT,n),e.directives=r)}return e};Xo.prototype._read_processing=function(t){var e=null,n=null,r=null;if(t==="<"){var i=this._input.peek(1);(i==="!"||i==="?")&&(n=this.__patterns.conditional_comment.read(),n=n||this.__patterns.processing.read()),n&&(e=this._create_token(Xr.COMMENT,n),e.directives=r)}return e};Xo.prototype._read_open=function(t,e){var n=null,r=null;return(!e||e.type===Xr.CONTROL_FLOW_OPEN)&&t==="<"&&(n=this._input.next(),this._input.peek()==="/"&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),r=this._create_token(Xr.TAG_OPEN,n)),r};Xo.prototype._read_open_handlebars=function(t,e){var n=null,r=null;return(!e||e.type===Xr.CONTROL_FLOW_OPEN)&&this._options.indent_handlebars&&t==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(n=this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars.read(),r=this._create_token(Xr.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),r=this._create_token(Xr.TAG_OPEN,n))),r};Xo.prototype._read_control_flows=function(t,e){var n="",r=null;if(!this._options.templating.includes("angular")||!this._options.indent_handlebars)return r;if(t==="@"){if(n=this.__patterns.angular_control_flow_start.read(),n==="")return r;for(var i=n.endsWith("(")?1:0,o=0;!(n.endsWith("{")&&i===o);){var a=this._input.next();if(a===null)break;a==="("?i++:a===")"&&o++,n+=a}r=this._create_token(Xr.CONTROL_FLOW_OPEN,n)}else t==="}"&&e&&e.type===Xr.CONTROL_FLOW_OPEN&&(n=this._input.next(),r=this._create_token(Xr.CONTROL_FLOW_CLOSE,n));return r};Xo.prototype._read_close=function(t,e){var n=null,r=null;return e&&e.type===Xr.TAG_OPEN&&(e.text[0]==="<"&&(t===">"||t==="/"&&this._input.peek(1)===">")?(n=this._input.next(),t==="/"&&(n+=this._input.next()),r=this._create_token(Xr.TAG_CLOSE,n)):e.text[0]==="{"&&t==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),r=this._create_token(Xr.TAG_CLOSE,"}}"))),r};Xo.prototype._read_attribute=function(t,e,n){var r=null,i="";if(n&&n.text[0]==="<")if(t==="=")r=this._create_token(Xr.EQUALS,this._input.next());else if(t==='"'||t==="'"){var o=this._input.next();t==='"'?o+=this.__patterns.double_quote.read():o+=this.__patterns.single_quote.read(),r=this._create_token(Xr.VALUE,o)}else i=this.__patterns.attribute.read(),i&&(e.type===Xr.EQUALS?r=this._create_token(Xr.VALUE,i):r=this._create_token(Xr.ATTRIBUTE,i));return r};Xo.prototype._is_content_unformatted=function(t){return this._options.void_elements.indexOf(t)===-1&&(this._options.content_unformatted.indexOf(t)!==-1||this._options.unformatted.indexOf(t)!==-1)};Xo.prototype._read_raw_content=function(t,e,n){var r="";if(n&&n.text[0]==="{")r=this.__patterns.handlebars_raw_close.read();else if(e.type===Xr.TAG_CLOSE&&e.opened.text[0]==="<"&&e.text[0]!=="/"){var i=e.opened.text.substr(1).toLowerCase();if(i==="script"||i==="style"){var o=this._read_comment_or_cdata(t);if(o)return o.type=Xr.TEXT,o;r=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(i)&&(r=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig")))}return r?this._create_token(Xr.TEXT,r):null};Xo.prototype._read_content_word=function(t,e){var n="";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=e&&e.type===Xr.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n)return this._create_token(Xr.TEXT,n)};WC.Tokenizer=Xo;WC.TOKEN=Xr;var Ent=KD.Options,Tnt=VC.Output,knt=WC.Tokenizer,Vr=WC.TOKEN,$j=/\r\n|[\r\n]/,Pnt=/\r\n|[\r\n]/g,Fs=function(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new Tnt(t,e)};Fs.prototype.current_line_has_match=function(t){return this._output.current_line.has_match(t)};Fs.prototype.set_space_before_token=function(t,e){this._output.space_before_token=t,this._output.non_breaking_space=e};Fs.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()};Fs.prototype.add_raw_token=function(t){this._output.add_raw_token(t)};Fs.prototype.print_preserved_newlines=function(t){var e=0;t.type!==Vr.TEXT&&t.previous.type!==Vr.TEXT&&(e=t.newlines?1:0),this.preserve_newlines&&(e=t.newlines<this.max_preserve_newlines+1?t.newlines:this.max_preserve_newlines+1);for(var n=0;n<e;n++)this.print_newline(n>0);return e!==0};Fs.prototype.traverse_whitespace=function(t){return t.whitespace_before||t.newlines?(this.print_preserved_newlines(t)||(this._output.space_before_token=!0),!0):!1};Fs.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped};Fs.prototype.print_newline=function(t){this._output.add_new_line(t)};Fs.prototype.print_token=function(t){t.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(t.text))};Fs.prototype.indent=function(){this.indent_level++};Fs.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))};Fs.prototype.get_full_indent=function(t){return t=this.indent_level+(t||0),t<1?"":this._output.get_indent_string(t)};var Ant=function(t){for(var e=null,n=t.next;n.type!==Vr.EOF&&t.closed!==n;){if(n.type===Vr.ATTRIBUTE&&n.text==="type"){n.next&&n.next.type===Vr.EQUALS&&n.next.next&&n.next.next.type===Vr.VALUE&&(e=n.next.next.text);break}n=n.next}return e},Mnt=function(t,e){var n=null,r=null;return e.closed?(t==="script"?n="text/javascript":t==="style"&&(n="text/css"),n=Ant(e)||n,n.search("text/css")>-1?r="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?r="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?r="html":n.search(/test\/null/)>-1&&(r="null"),r):null};function my(t,e){return e.indexOf(t)!==-1}function Rnt(t,e,n){this.parent=t||null,this.tag=e?e.tag_name:"",this.indent_level=n||0,this.parser_token=e||null}function Ep(t){this._printer=t,this._current_frame=null}Ep.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null};Ep.prototype.record_tag=function(t){var e=new Rnt(this._current_frame,t,this._printer.indent_level);this._current_frame=e};Ep.prototype._try_pop_frame=function(t){var e=null;return t&&(e=t.parser_token,this._printer.indent_level=t.indent_level,this._current_frame=t.parent),e};Ep.prototype._get_frame=function(t,e){for(var n=this._current_frame;n&&t.indexOf(n.tag)===-1;){if(e&&e.indexOf(n.tag)!==-1){n=null;break}n=n.parent}return n};Ep.prototype.try_pop=function(t,e){var n=this._get_frame([t],e);return this._try_pop_frame(n)};Ep.prototype.indent_to_tag=function(t){var e=this._get_frame(t);e&&(this._printer.indent_level=e.indent_level)};function os(t,e,n,r){this._source_text=t||"",e=e||{},this._js_beautify=n,this._css_beautify=r,this._tag_stack=null;var i=new Ent(e,"html");this._options=i,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}os.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;this._options.eol==="auto"&&(e=`
- `,t&&$j.test(t)&&(e=t.match($j)[0])),t=t.replace(Pnt,`
- `);var n=t.match(/^[\t ]*/)[0],r={text:"",type:""},i=new hJ,o=new Fs(this._options,n),a=new knt(t,this._options).tokenize();this._tag_stack=new Ep(o);for(var s=null,l=a.next();l.type!==Vr.EOF;)l.type===Vr.TAG_OPEN||l.type===Vr.COMMENT?(s=this._handle_tag_open(o,l,i,r,a),i=s):l.type===Vr.ATTRIBUTE||l.type===Vr.EQUALS||l.type===Vr.VALUE||l.type===Vr.TEXT&&!i.tag_complete?s=this._handle_inside_tag(o,l,i,r):l.type===Vr.TAG_CLOSE?s=this._handle_tag_close(o,l,i):l.type===Vr.TEXT?s=this._handle_text(o,l,i):l.type===Vr.CONTROL_FLOW_OPEN?s=this._handle_control_flow_open(o,l):l.type===Vr.CONTROL_FLOW_CLOSE?s=this._handle_control_flow_close(o,l):o.add_raw_token(l),r=s,l=a.next();var u=o._output.get_code(e);return u};os.prototype._handle_control_flow_open=function(t,e){var n={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),t.print_token(e),t.indent(),n};os.prototype._handle_control_flow_close=function(t,e){var n={text:e.text,type:e.type};return t.deindent(),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),t.print_token(e),n};os.prototype._handle_tag_close=function(t,e,n){var r={text:e.text,type:e.type};return t.alignment_size=0,n.tag_complete=!0,t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),n.is_unformatted?t.add_raw_token(e):(n.tag_start_char==="<"&&(t.set_space_before_token(e.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&t.print_newline(!1)),t.print_token(e)),n.indent_content&&!(n.is_unformatted||n.is_content_unformatted)&&(t.indent(),n.indent_content=!1),!n.is_inline_element&&!(n.is_unformatted||n.is_content_unformatted)&&t.set_wrap_point(),r};os.prototype._handle_inside_tag=function(t,e,n,r){var i=n.has_wrapped_attrs,o={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),n.is_unformatted?t.add_raw_token(e):n.tag_start_char==="{"&&e.type===Vr.TEXT?t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e):(e.type===Vr.ATTRIBUTE?t.set_space_before_token(!0):(e.type===Vr.EQUALS||e.type===Vr.VALUE&&e.previous.type===Vr.EQUALS)&&t.set_space_before_token(!1),e.type===Vr.ATTRIBUTE&&n.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(t.traverse_whitespace(e),i=i||e.newlines!==0),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(r.type!==Vr.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(t.print_newline(!1),i=!0)),t.print_token(e),i=i||t.previous_token_wrapped(),n.has_wrapped_attrs=i),o};os.prototype._handle_text=function(t,e,n){var r={text:e.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(t,e,n):n.is_unformatted||n.is_content_unformatted?t.add_raw_token(e):(t.traverse_whitespace(e),t.print_token(e)),r};os.prototype._print_custom_beatifier_text=function(t,e,n){var r=this;if(e.text!==""){var i=e.text,o,a=1,s="",l="";n.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?o=this._js_beautify:n.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?o=this._css_beautify:n.custom_beautifier_name==="html"&&(o=function(g,m){var y=new os(g,m,r._js_beautify,r._css_beautify);return y.beautify()}),this._options.indent_scripts==="keep"?a=0:this._options.indent_scripts==="separate"&&(a=-t.indent_level);var u=t.get_full_indent(a);if(i=i.replace(/\n[ \t]*$/,""),n.custom_beautifier_name!=="html"&&i[0]==="<"&&i.match(/^(<!--|<!\[CDATA\[)/)){var c=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(i);if(!c){t.add_raw_token(e);return}s=u+c[1]+`
- `,i=c[4],c[5]&&(l=u+c[5]),i=i.replace(/\n[ \t]*$/,""),(c[2]||c[3].indexOf(`
- `)!==-1)&&(c=c[3].match(/[ \t]+$/),c&&(e.whitespace_before=c[0]))}if(i)if(o){var d=function(){this.eol=`
- `};d.prototype=this._options.raw_options;var f=new d;i=o(u+i,f)}else{var h=e.whitespace_before;h&&(i=i.replace(new RegExp(`
- (`+h+")?","g"),`
- `)),i=u+i.replace(/\n/g,`
- `+u)}s&&(i?i=s+i+`
- `+l:i=s+l),t.print_newline(!1),i&&(e.text=i,e.whitespace_before="",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}};os.prototype._handle_tag_open=function(t,e,n,r,i){var o=this._get_tag_open_token(e);if((n.is_unformatted||n.is_content_unformatted)&&!n.is_empty_element&&e.type===Vr.TAG_OPEN&&!o.is_start_tag?(t.add_raw_token(e),o.start_tag_token=this._tag_stack.try_pop(o.tag_name)):(t.traverse_whitespace(e),this._set_tag_position(t,e,o,n,r),o.is_inline_element||t.set_wrap_point(),t.print_token(e)),o.is_start_tag&&this._is_wrap_attributes_force){var a=0,s;do s=i.peek(a),s.type===Vr.ATTRIBUTE&&(o.attr_count+=1),a+=1;while(s.type!==Vr.EOF&&s.type!==Vr.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(o.alignment_size=e.text.length+1),!o.tag_complete&&!o.is_unformatted&&(t.alignment_size=o.alignment_size),o};var hJ=function(t,e){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!e)this.tag_complete=!0;else{var n;this.tag_start_char=e.text[0],this.text=e.text,this.tag_start_char==="<"?(n=e.text.match(/^<([^\s>]*)/),this.tag_check=n?n[1]:""):(n=e.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=n?n[1]:"",(e.text.startsWith("{{#>")||e.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&e.next!==null?this.tag_check=e.next.text.split(" ")[0]:this.tag_check=e.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),e.type===Vr.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&e.closed.text==="/>";var r=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(r=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(r)))}};os.prototype._get_tag_open_token=function(t){var e=new hJ(this._tag_stack.get_parser_token(),t);return e.alignment_size=this._options.wrap_attributes_indent_size,e.is_end_tag=e.is_end_tag||my(e.tag_check,this._options.void_elements),e.is_empty_element=e.tag_complete||e.is_start_tag&&e.is_end_tag,e.is_unformatted=!e.tag_complete&&my(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&my(e.tag_check,this._options.content_unformatted),e.is_inline_element=my(e.tag_name,this._options.inline)||this._options.inline_custom_elements&&e.tag_name.includes("-")||e.tag_start_char==="{",e};os.prototype._set_tag_position=function(t,e,n,r,i){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||t.print_newline(!1)),this._tag_stack.record_tag(n),(n.tag_name==="script"||n.tag_name==="style")&&!(n.is_unformatted||n.is_content_unformatted)&&(n.custom_beautifier_name=Mnt(n.tag_check,e)))),my(n.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),n.is_empty_element){if(n.tag_start_char==="{"&&n.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0;var o=t.current_line_has_match(/{{#if/);o||t.print_newline(!1)}n.tag_name==="!--"&&i.type===Vr.TAG_CLOSE&&r.is_end_tag&&n.text.indexOf(`
- `)===-1||(n.is_inline_element||n.is_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n))}else if(n.is_end_tag){var a=!1;a=n.start_tag_token&&n.start_tag_token.multiline_content,a=a||!n.is_inline_element&&!(r.is_inline_element||r.is_unformatted)&&!(i.type===Vr.TAG_CLOSE&&n.start_tag_token===r)&&i.type!=="TK_CONTENT",(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&t.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,n.tag_start_char==="<"&&(n.tag_name==="html"?n.indent_content=this._options.indent_inner_html:n.tag_name==="head"?n.indent_content=this._options.indent_head_inner_html:n.tag_name==="body"&&(n.indent_content=this._options.indent_body_inner_html)),!(n.is_inline_element||n.is_unformatted)&&(i.type!=="TK_CONTENT"||n.is_content_unformatted)&&t.print_newline(!1),this._calcluate_parent_multiline(t,n)};os.prototype._calcluate_parent_multiline=function(t,e){e.parent&&t._output.just_added_newline()&&!((e.is_inline_element||e.is_unformatted)&&e.parent.is_inline_element)&&(e.parent.multiline_content=!0)};var $nt=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],Nnt=["a","audio","del","ins","map","noscript","video"];os.prototype._do_optional_end_element=function(t){var e=null;if(!(t.is_empty_element||!t.is_start_tag||!t.parent)){if(t.tag_name==="body")e=e||this._tag_stack.try_pop("head");else if(t.tag_name==="li")e=e||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(t.tag_name==="dd"||t.tag_name==="dt")e=e||this._tag_stack.try_pop("dt",["dl"]),e=e||this._tag_stack.try_pop("dd",["dl"]);else if(t.parent.tag_name==="p"&&$nt.indexOf(t.tag_name)!==-1){var n=t.parent.parent;(!n||Nnt.indexOf(n.tag_name)===-1)&&(e=e||this._tag_stack.try_pop("p"))}else t.tag_name==="rp"||t.tag_name==="rt"?(e=e||this._tag_stack.try_pop("rt",["ruby","rtc"]),e=e||this._tag_stack.try_pop("rp",["ruby","rtc"])):t.tag_name==="optgroup"?e=e||this._tag_stack.try_pop("optgroup",["select"]):t.tag_name==="option"?e=e||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):t.tag_name==="colgroup"?e=e||this._tag_stack.try_pop("caption",["table"]):t.tag_name==="thead"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"])):t.tag_name==="tbody"||t.tag_name==="tfoot"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("thead",["table"]),e=e||this._tag_stack.try_pop("tbody",["table"])):t.tag_name==="tr"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(t.tag_name==="th"||t.tag_name==="td")&&(e=e||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),e=e||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return t.parent=this._tag_stack.get_parser_token(),e}};uJ.Beautifier=os;var Dnt=uJ.Beautifier,Lnt=KD.Options;function Int(t,e,n,r){var i=new Dnt(t,e,n,r);return i.beautify()}GD.exports=Int;GD.exports.defaultOptions=function(){return new Lnt};var pJ=QD.exports,gJ=qD.exports,mJ=GD.exports;function vJ(t,e,n,r){return n=n||pJ,r=r||gJ,mJ(t,e,n,r)}vJ.defaultOptions=mJ.defaultOptions;FC.js=pJ;FC.css=gJ;FC.html=vJ;(function(t){function e(n,r,i){var o=function(a,s){return n.js_beautify(a,s)};return o.js=n.js_beautify,o.css=r.css_beautify,o.html=i.html_beautify,o.js_beautify=n.js_beautify,o.css_beautify=r.css_beautify,o.html_beautify=i.html_beautify,o}(function(n){var r=FC;r.js_beautify=r.js,r.css_beautify=r.css,r.html_beautify=r.html,n.exports=e(r,r,r)})(t)})(HK);var db=HK.exports;const Nj=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Uc=(()=>{if(typeof document=="undefined")return!1;const t=Nj[0],e={};for(const n of Nj)if((n==null?void 0:n[1])in document){for(const[i,o]of n.entries())e[t[i]]=o;return e}return!1})(),Dj={change:Uc.fullscreenchange,error:Uc.fullscreenerror};let ws={request(t=document.documentElement,e){return new Promise((n,r)=>{const i=()=>{ws.off("change",i),n()};ws.on("change",i);const o=t[Uc.requestFullscreen](e);o instanceof Promise&&o.then(i).catch(r)})},exit(){return new Promise((t,e)=>{if(!ws.isFullscreen){t();return}const n=()=>{ws.off("change",n),t()};ws.on("change",n);const r=document[Uc.exitFullscreen]();r instanceof Promise&&r.then(n).catch(e)})},toggle(t,e){return ws.isFullscreen?ws.exit():ws.request(t,e)},onchange(t){ws.on("change",t)},onerror(t){ws.on("error",t)},on(t,e){const n=Dj[t];n&&document.addEventListener(n,e,!1)},off(t,e){const n=Dj[t];n&&document.removeEventListener(n,e,!1)},raw:Uc};Object.defineProperties(ws,{isFullscreen:{get:()=>Boolean(document[Uc.fullscreenElement])},element:{enumerable:!0,get:()=>{var t;return(t=document[Uc.fullscreenElement])!=null?t:void 0}},isEnabled:{enumerable:!0,get:()=>Boolean(document[Uc.fullscreenEnabled])}});Uc||(ws={isEnabled:!1});var Ur=ws;const Bnt={style:{display:"flex","justify-content":"flex-end","margin-top":"10px"}},Fnt={style:{flex:"auto"}},Vnt={__name:"ExportDialog",props:["show","data","ruleChainId","lf"],emits:["submit","close"],setup(t,{emit:e}){const n=t,r=[uv()],{show:i,data:o,ruleChainId:a}=Mi(n),s=F(!1),l=F(null),u=F("450px"),c=()=>{let g=new Blob([o.value],{type:"text/plain;charset=utf-8"});zq.exports.saveAs(g,a.value+".json")},d=()=>{n.lf.getSnapshot(a.value+".png","#FFF")},f=()=>{e("close")},h=()=>{Ur.isEnabled&&(Ur.isFullscreen?Ur.exit():Ur.request(l.value[0]))};return Ur.on("change",()=>{Ur.isFullscreen?(u.value="100%",s.value=!0):(u.value="450px",s.value=!1)}),(g,m)=>{const y=co,b=fo,w=lr,O=Ma;return R(),xe(O,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":f,modelValue:p(i)},{header:j(()=>[B(b,null,{default:j(()=>[B(y,{span:12},{default:j(()=>[Ue("\u5BFC\u51FA\u6D41\u7A0BDSL")]),_:1})]),_:1})]),footer:j(()=>[J("div",Fnt,[B(w,{type:"primary",onClick:d},{default:j(()=>[Ue("\u4E0B\u8F7D\u56FE\u7247")]),_:1}),B(w,{type:"primary",onClick:c},{default:j(()=>[Ue("\u4E0B\u8F7D\u6570\u636E")]),_:1}),B(w,{onClick:f},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),default:j(()=>[J("div",Bnt,[B(w,{icon:s.value?p(zS):p(Hm),size:"small",onClick:h,circle:""},null,8,["icon"])]),B(p(Vu),{modelValue:p(o),"onUpdate:modelValue":m[0]||(m[0]=x=>Tr(o)?o.value=x:null),placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u5B9A\u4E49JSON\u5185\u5BB9...",ref_key:"codeEditorRef",ref:l,style:vt({height:u.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:r},null,8,["modelValue","style"])]),_:1},8,["modelValue"])}}},jnt=J("label",null,"\u5728\u4E0B\u65B9\u7C98\u8D34\u6D41\u7A0BDSL",-1),Qnt={style:{flex:"auto","text-align":"right"}},znt={__name:"ImportDialog",props:["show","lf"],emits:["submit","close"],setup(t,{emit:e}){const n=[uv()],r=F(),i=F(),o=F(!1),a=F(null),s=F("400px"),l=vn({data:""});function u(m,y){y.value=y;const b=new FileReader;b.onload=w=>{try{l.data=w.target.result}catch(O){jr.error("Invalid JSON format:"+O)}},b.readAsText(m.raw)}function c(m){return!1}const d=()=>{e("submit",l.data)},f=()=>{e("close")},h=function(){l.data=db.js(l.data,{indent_size:2})},g=()=>{Ur.isEnabled&&(Ur.isFullscreen?Ur.exit():Ur.request(a.value[0]))};return Ur.on("change",()=>{Ur.isFullscreen?(s.value=window.innerHeight+"px",o.value=!0):(s.value="400px",o.value=!1)}),(m,y)=>{const b=lr,w=UX,O=Pl,x=co,S=fo,C=kl,E=Ma;return R(),xe(E,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":f,modelValue:t.show},{footer:j(()=>[J("div",Qnt,[B(b,{type:"primary",size:"large",onClick:d},{default:j(()=>[Ue("\u786E\u8BA4")]),_:1}),B(b,{size:"large",onClick:f},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),default:j(()=>[B(C,{model:l,ref_key:"formRef",ref:r,"label-position":"top","label-width":"auto",class:"rulego-editor-property-form"},{default:j(()=>[B(O,null,{default:j(()=>[B(w,{"file-list":i.value,"onUpdate:fileList":y[0]||(y[0]=T=>i.value=T),class:"upload-demo",action:null,"on-change":u,"before-upload":c,limit:1,accept:".json"},{default:j(()=>[B(b,{type:"default"},{default:j(()=>[Ue("\u5BFC\u5165\u6D41\u7A0BDSL\u6587\u4EF6")]),_:1})]),_:1},8,["file-list"])]),_:1}),B(O,{label:"\u5728\u4E0B\u65B9\u7C98\u8D34\u6D41\u7A0BDSL",prop:"data"},{label:j(()=>[B(S,null,{default:j(()=>[B(x,{span:20},{default:j(()=>[jnt]),_:1}),B(x,{span:4,style:{"text-align":"right"}},{default:j(()=>[B(b,{type:"info",size:"small",round:"",onClick:h},{default:j(()=>[Ue("\u6574\u7406")]),_:1}),B(b,{icon:o.value?p(zS):p(Hm),size:"small",onClick:g,circle:""},null,8,["icon"])]),_:1})]),_:1})]),default:j(()=>[J("div",{ref_key:"codeEditorRef",ref:a,style:{width:"100%"}},[B(p(Vu),{modelValue:l.data,"onUpdate:modelValue":y[1]||(y[1]=T=>l.data=T),placeholder:"\u8BF7\u7C98\u8D34\u6D41\u7A0BDSL",style:vt({height:s.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:n},null,8,["modelValue","style"])],512)]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},Wnt={__name:"NodeOperate",props:["currentElementPosition"],emits:["edit","delete"],setup(t,{emit:e}){const n=()=>{e("edit")},r=()=>{e("delete")};return(i,o)=>{const a=lr;return R(),Y("div",{style:vt({position:"absolute",top:t.currentElementPosition.y+"px",left:t.currentElementPosition.x+"px"})},[B(a,{type:"danger",size:"small",icon:p(nW),onClick:n,circle:""},null,8,["icon"]),B(a,{type:"danger",size:"small",icon:p(u$),onClick:r,circle:"",style:{"margin-left":"3px"}},null,8,["icon"])],4)}}},Hnt=(t,e,n,r,i,o,a,s)=>{let l=t.url+t.executeApi,u=t.url+t.notifyApi,c="";n?c=l.replace(":msgType",i).replace(":id",e):c=u.replace(":msgType",i).replace(":id",e),c=c+"?msgId="+r+"&"+o;const d={method:"POST",headers:s.headers,body:a},f={data:null,headers:null};return new Promise((h,g)=>{fetch(c,d).then(m=>{const y={};for(const[b,w]of m.headers.entries())y[b]=w;return f.headers=y,m.text()}).then(m=>{try{f.data=JSON.parse(m)}catch{f.data=m}h(f)}).catch(m=>{h(m)})})},Unt={class:"log-data"},Xnt={__name:"logs",props:["logData","ruleChain","lf"],setup(t){const e=t,n=F([]);Fe(()=>e.logData,()=>{n.value=e.logData.map(i=>i.nodeId)});function r(i){var o,a;return((a=(o=e.lf.getNodeDataById(i))==null?void 0:o.properties)==null?void 0:a.model)||{}}return(i,o)=>{const a=mt,s=ns,l=KS,u=GS;return R(),Y("view",Unt,[B(u,{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=c=>n.value=c)},{default:j(()=>[(R(!0),Y(dt,null,Ht(t.logData,c=>(R(),xe(l,{name:c.nodeId,key:c.nodeId},{title:j(()=>[B(a,{color:"#13ce66",style:{"margin-right":"10px","font-size":"24px"}},{default:j(()=>[B(p(f$))]),_:1}),Ue(Ve(r(c.nodeId).name)+" ",1),B(s,{style:{"margin-left":"20px"}},{default:j(()=>[Ue(Ve(r(c.nodeId).type),1)]),_:2},1024)]),default:j(()=>[B(u,{"model-value":["\u65E5\u5FD7"]},{default:j(()=>[B(l,{title:"\u8F93\u5165"},{title:j(()=>[Ue(" \u8F93\u5165 ")]),default:j(()=>[Ue(" "+Ve(c.inMsg),1)]),_:2},1024),B(l,{title:"\u8F93\u5165"},{title:j(()=>[Ue(" \u8F93\u51FA ")]),default:j(()=>[Ue(" "+Ve(c.outMsg),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["name"]))),128))]),_:1},8,["modelValue"])])}}},Znt={style:{float:"right"}},qnt={__name:"RunPanel",props:["lf","show","data"],emits:["submit","close"],setup(t,{emit:e}){const{lf:n,show:r,data:i}=t,o=[uv()],a=F(!1),s=F("metadata"),l=F("response"),u=n.getRuleChain().id,c=vn({data:"",headers:""}),d=F([]),f=F({}),h=F(""),g=F(),m=new URLSearchParams(window.location.search),y=Object.fromEntries(m.entries()),b=vn({wait:!0,msgType:"testMsgType",headers:`{
- "Content-Type": "application/json"
- }`,metadata:"key1=value1&key2=value2",body:m.size?JSON.stringify(y,null,2):`{
- "temperature":68
- }`}),w=F(null);function O(){w&&w.value&&w.value.close();let T=QP();w.value=new WebSocket(window.allEnv.rule.wsServer+"/api/v1/logs/ws/"+u+"/"+T),w.value.onmessage=P=>{let A=f.value,D=JSON.parse(P.data),$=D.nodeId;if(D.chainId===u){if(D.flowType==="Log"){let z=A[$];z?z.logItems.push(D.msg.data):A[$]={nodeId:$,logItems:[]}}else if(D.flowType==="OUT"){let z=A[$];z?(z.outMsg=D.msg,z.err=D.err,z.relationType=D.relationType,z.endTs=P.ts||new Date().getTime()):A[$]={nodeId:$,outMsg:D.msg,relationType:D.relationType,err:D.err,logItems:[],endTs:P.ts||new Date().getTime()}}else if(D.flowType==="IN"){let z=A[$];z?(z.inMsg=D.msg,z.startTs=P.ts||new Date().getTime()):A[$]={nodeId:$,logItems:[],inMsg:D.msg,startTs:P.ts||new Date().getTime()}}f.value=A,d.value=Object.values(A).sort((z,I)=>z.startTs===I.startTs?z.endTs-I.endTs:z.startTs-I.startTs)}},w.value.onopen=()=>{console.log("WebSocket connected")},w.value.onerror=P=>{console.error("WebSocket error",P)},w.value.onclose=()=>{console.log("WebSocket disconnected")}}Ft(()=>{w.value&&w.value.close(),O()}),od(()=>{w.value&&w.value.close()});const x=async(T,P,A,D,$,N)=>{try{l.value==="response"&&(a.value=!0),c.data="",c.headers="",h.value=QP(),d.value=[],f.value={};const z=n.getEditorSetting(),I=await Hnt(z,P,T,h.value,A,D,$,N);I.data&&(c.data=JSON.stringify(I.data,null," ")),c.headers=JSON.stringify(I.headers,null," ")}catch(z){jr({showClose:!0,message:z.response&&z.response.data||z.code,type:"error"})}finally{a.value=!1}},S=T=>{!T||T.validate(P=>{if(P){let A={headers:JSON.parse(b.headers)};x(b.wait,u,b.msgType,b.metadata,b.body,A)}else return!1})},C=()=>{l.value==="log"&&w&&w.value&&w.value.readyState===WebSocket.CLOSED&&(console.log("\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5..."),O())},E=()=>{e("close")};return(T,P)=>{const A=hi,D=Pl,$=Sp,N=xp,z=Bs,I=lr,L=kl,X=co,Q=fo,W=wP;return zt((R(),Y("div",null,[B(Q,{gutter:20},{default:j(()=>[B(X,{span:10,class:"send-form"},{default:j(()=>[B(L,{model:b,ref_key:"formRef",ref:g,"label-position":"top","label-width":"auto"},{default:j(()=>[B(D,{label:"\u6D88\u606F\u7C7B\u578B",rules:[{required:!0,message:"\u6D88\u606F\u7C7B\u578B\u662F\u5FC5\u987B\u7684"}],prop:"msgType"},{default:j(()=>[B(A,{modelValue:b.msgType,"onUpdate:modelValue":P[0]||(P[0]=G=>b.msgType=G),placeholder:"\u8BF7\u8F93\u5165\u6D88\u606F\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),B(N,{modelValue:s.value,"onUpdate:modelValue":P[3]||(P[3]=G=>s.value=G)},{default:j(()=>[B($,{label:"\u5143\u6570\u636E",name:"metadata"},{default:j(()=>[B(p(Vu),{modelValue:b.metadata,"onUpdate:modelValue":P[1]||(P[1]=G=>b.metadata=G),placeholder:"\u8BF7\u8F93\u5165\u5143\u6570\uFF0C\u636E\u683C\u5F0F\uFF1Akey1=value1&key2=value2",style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1}),B($,{label:"\u8BF7\u6C42\u5934",name:"headers"},{default:j(()=>[B(p(Vu),{modelValue:b.headers,"onUpdate:modelValue":P[2]||(P[2]=G=>b.headers=G),placeholder:"\u8BF7\u8F93\u5165\u8BF7\u6C42\u5934\u6570\u636E",style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1})]),_:1},8,["modelValue"]),B(D,{label:"\u8BF7\u6C42\u4F53",prop:"body"},{default:j(()=>[B(p(Vu),{modelValue:b.body,"onUpdate:modelValue":P[4]||(P[4]=G=>b.body=G),placeholder:"\u8BF7\u8F93\u5165\u8BF7\u6C42\u4F53\u6570\u636E",style:{height:"200px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1}),B(D,null,{default:j(()=>[B(z,{modelValue:b.wait,"onUpdate:modelValue":P[5]||(P[5]=G=>b.wait=G),label:"\u8F93\u51FA\u7ED3\u679C"},null,8,["modelValue"])]),_:1}),J("div",Znt,[B(I,{type:"default",onClick:P[6]||(P[6]=G=>E())},{default:j(()=>[Ue("\u5173\u95ED")]),_:1}),B(I,{type:"primary",loading:a.value,onClick:P[7]||(P[7]=G=>S(g.value))},{default:j(()=>[Ue("\u53D1\u9001")]),_:1},8,["loading"])])]),_:1},8,["model"])]),_:1}),B(X,{span:14},{default:j(()=>[B(N,{type:"card",modelValue:l.value,"onUpdate:modelValue":P[10]||(P[10]=G=>l.value=G),onTabChange:C},{default:j(()=>[B($,{label:"\u8F93\u51FA",name:"response"},{default:j(()=>[B(L,{"label-position":"top","label-width":"auto"},{default:j(()=>[B(D,{label:"\u54CD\u5E94\u5934"},{default:j(()=>[B(p(Vu),{modelValue:c.headers,"onUpdate:modelValue":P[8]||(P[8]=G=>c.headers=G),editable:!1,style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1}),B(D,{label:"\u54CD\u5E94\u4F53"},{default:j(()=>[B(p(Vu),{modelValue:c.data,"onUpdate:modelValue":P[9]||(P[9]=G=>c.data=G),placeholder:"",editable:!1,style:{height:"300px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),B($,{label:"\u65E5\u5FD7",name:"log"},{default:j(()=>{var G;return[(G=d.value)!=null&&G.length?(R(),xe(Xnt,{key:0,lf:t.lf,logData:d.value,ruleChainId:p(u),msgId:h.value},null,8,["lf","logData","ruleChainId","msgId"])):Se("",!0)]}),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})])),[[W,a.value]])}}};var Ynt=Ml(qnt,[["__scopeId","data-v-610931aa"]]);const Gnt={__name:"RunDialog",props:["show","lf"],emits:["submit","close",'"operate"'],setup(t,{emit:e}){const{show:n,lf:r}=t,i=F(""),o=F(""),a=F(""),s=()=>{e("close")},l=(c,d)=>{e("operate",c,d)},u=()=>{i.value=r.getRuleChain().id;let c=r.getEditorSetting();o.value=c.url+c.executeApi,a.value=c.url+c.notifyApi};return(c,d)=>{const f=Ma;return R(),xe(f,{"append-to-body":!0,"destroy-on-close":!1,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:u},{header:j(()=>[Ue(" \u8FD0\u884C\u6D41\u7A0B ")]),default:j(()=>[B(Ynt,{lf:t.lf,onClose:s,onOperate:l},null,8,["lf"])]),_:1},8,["modelValue"])}}},Knt={style:{flex:"auto","text-align":"right"}},Jnt={__name:"FlowForm",props:["show","lf","ruleChain","flowStatus"],emits:["submit","close"],setup(t,{emit:e}){const{show:n,lf:r,ruleChain:i,flowStatus:o}=t,a=F(),s=()=>{if(o===0){e("submit",i);return}let u=r.getEditorSetting().url+r.getEditorSetting().chainsApi;fetch(u+`/${i.id}/base`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Dn(i))}).then(c=>c.ok?c.text():c.text().then(d=>{throw new Error(`${d}`)})).then(c=>{jr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("submit",i)}).catch(c=>{jr.error(`\u4FDD\u5B58\u5931\u8D25: ${c.message}`)})},l=()=>{e("close")};return(u,c)=>{const d=hi,f=Pl,h=Ym,g=lr,m=kl;return R(),xe(m,{model:t.ruleChain,ref_key:"formRef",ref:a,"label-position":"top","label-width":"auto"},{default:j(()=>[B(f,{label:"ID",prop:"id"},{default:j(()=>[B(d,{modelValue:t.ruleChain.id,"onUpdate:modelValue":c[0]||(c[0]=y=>t.ruleChain.id=y),disabled:""},null,8,["modelValue"])]),_:1}),B(f,{label:"\u540D\u79F0",prop:"name"},{default:j(()=>[B(d,{modelValue:t.ruleChain.name,"onUpdate:modelValue":c[1]||(c[1]=y=>t.ruleChain.name=y),placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),B(f,{label:"\u6839\u89C4\u5219\u94FE",prop:"root"},{default:j(()=>[B(h,{class:"ml-2",disabled:"",modelValue:t.ruleChain.root,"onUpdate:modelValue":c[2]||(c[2]=y=>t.ruleChain.root=y),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"])]),_:1}),B(f,{label:"\u63CF\u8FF0",prop:"description"},{default:j(()=>[B(d,{modelValue:t.ruleChain.additionalInfo.description,"onUpdate:modelValue":c[3]||(c[3]=y=>t.ruleChain.additionalInfo.description=y),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u63CF\u8FF0"},null,8,["modelValue"])]),_:1}),J("div",Knt,[B(g,{type:"primary",onClick:s},{default:j(()=>[Ue("\u786E\u8BA4")]),_:1}),B(g,{onClick:l},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),_:1},8,["model"])}}},ert={style:{flex:"auto","text-align":"right"}},trt={__name:"VarsForm",props:{show:Boolean,data:{type:Object,default:()=>F({key:"",value:""})},isNew:{type:Boolean,default:()=>!1}},emits:["submit","close"],setup(t,{emit:e}){const{show:n,data:r,isNew:i}=t,o=F(),a=r,s=u=>{!u||u.validate(c=>{if(c)e("submit",Dn(a));else return!1})},l=()=>{e("close")};return(u,c)=>{const d=hi,f=Pl,h=lr,g=kl,m=Ma;return R(),xe(m,{modelValue:t.show,"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!0,"before-close":l},{default:j(()=>[B(g,{model:p(a),ref_key:"formRef",ref:o,"label-position":"top","label-width":"auto"},{default:j(()=>[B(f,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"key"},{default:j(()=>[B(d,{modelValue:p(a).key,"onUpdate:modelValue":c[0]||(c[0]=y=>p(a).key=y),disabled:!t.isNew,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue","disabled"])]),_:1}),B(f,{label:"\u503C",rules:[{required:!0,message:"\u503C\u662F\u5FC5\u987B\u7684"}],prop:"value"},{default:j(()=>[B(d,{modelValue:p(a).value,"onUpdate:modelValue":c[1]||(c[1]=y=>p(a).value=y),type:"textarea",rows:"4",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue"])]),_:1}),J("div",ert,[B(h,{type:"default",onClick:l},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1}),B(h,{type:"primary",onClick:c[2]||(c[2]=y=>s(o.value))},{default:j(()=>[Ue("\u4FDD\u5B58")]),_:1})])]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},nrt={__name:"VarsTable",props:["ruleChain","varType","lf","flowStatus"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const{ruleChain:r,varType:i,lf:o,flowStatus:a}=t,s=F(!1),l=F({}),u=F(!1),c=F([]),d=()=>{l.value={key:"",value:""},u.value=!0,s.value=!0},f=O=>{l.value=O,u.value=!0,s.value=!1},h=O=>{l.value=O;const x=c.value.findIndex(C=>C.key===O.key);x!==-1&&c.value.splice(x,1);const S=r.id;w(S,i,c.value)},g=()=>{u.value=!1},m=O=>{b(O)},y=O=>{const x=c.value.findIndex(C=>C.key===O.key);x!==-1?c.value[x].value=O.value:c.value.push(O);const S=r.id;w(S,i,c.value)},b=O=>{if(!O||!O.configuration||!O.configuration[i])return c.value=[],[];const x=Object.keys(O.configuration[i]).map(S=>({key:S,value:O.configuration[i][S]}));return c.value=x,x},w=async(O,x,S)=>{const C={};if(S.forEach(T=>{C[T.key]=T.value}),a===0){const T=Dn(r);T.configuration||(T.configuration={}),T.configuration[x]=C,g(),n("submit",T,"config");return}let E=o.getEditorSetting().url+o.getEditorSetting().chainsApi;fetch(E+`/${r.id}/config/${x}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(C)}).then(T=>T.ok?T.text():T.text().then(P=>{throw new Error(`${P}`)})).then(T=>{jr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),g();const P=Dn(r);P.configuration||(P.configuration={}),P.configuration[x]=C,n("submit",P,"config")}).catch(T=>{jr.error(`\u4FDD\u5B58\u5931\u8D25: ${T.message}`)})};return e({updateData:m}),(O,x)=>{const S=lr,C=$b,E=Rb;return R(),Y(dt,null,[B(S,{style:{float:"right"},onClick:d},{default:j(()=>[Ue(Ve(t.varType==="vars"?"\u65B0\u5EFA\u53D8\u91CF":"\u65B0\u5EFA\u79D8\u94A5"),1)]),_:1}),B(E,{data:b(t.ruleChain),stripe:"",style:{width:"100%"}},{default:j(()=>[B(C,{prop:"key",label:"\u540D\u79F0"}),t.varType==="vars"?(R(),xe(C,{key:0,prop:"value",label:"\u503C"})):Se("",!0),B(C,{fixed:"right",label:"\u64CD\u4F5C"},{default:j(({row:T})=>[t.varType==="vars"?(R(),xe(S,{key:0,link:"",type:"primary",size:"small",onClick:P=>f(T)},{default:j(()=>[Ue("\u7F16\u8F91")]),_:2},1032,["onClick"])):Se("",!0),B(S,{link:"",type:"primary",size:"small",onClick:P=>h(T)},{default:j(()=>[Ue("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),u.value?(R(),xe(trt,{key:0,isNew:s.value,data:l.value,show:u.value,varType:t.varType,onSubmit:y,onClose:g},null,8,["isNew","data","show","varType"])):Se("",!0)],64)}}},rrt={__name:"FlowInfoDialog",props:["show","lf","ruleChain","fromActiveName","flowStatus"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const r=t,{show:i,lf:o,ruleChain:a,fromActiveName:s,flowStatus:l}=Mi(r),u=F("info");F();const c=F(),d=async y=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(y),jr({showClose:!0,message:"\u590D\u5236\u6210\u529F",type:"success"});else{const b=document.createElement("textarea");b.value=y,document.body.appendChild(b),b.focus(),b.select();const w=document.execCommand("copy");jr({showClose:!0,message:w?"\u590D\u5236\u6210\u529F":"\u590D\u5236\u5931\u8D25",type:w?"success":"error"}),document.body.removeChild(b)}}catch(b){console.error("Failed to copy: ",b)}},f=(y,b)=>{n("submit",y,b||"base")},h=()=>{n("close")},g=()=>{};return e({changeActiveName:y=>{u.value=y}}),(y,b)=>{const w=co,O=fo,x=Sp,S=ns,C=BH,E=IH,T=xp,P=Ma;return R(),xe(P,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,class:"custom-dialog",width:"60%",draggable:"",top:"10px","before-close":h,modelValue:p(i)},{header:j(()=>[B(O,null,{default:j(()=>[B(w,{span:12},{default:j(()=>[Ue(Ve(p(a).name),1)]),_:1})]),_:1})]),default:j(()=>[B(T,{modelValue:u.value,"onUpdate:modelValue":b[2]||(b[2]=A=>u.value=A),"tab-position":"left",onTabChange:g},{default:j(()=>[B(x,{label:"\u57FA\u7840\u4FE1\u606F",name:"info"},{default:j(()=>[B(Jnt,{lf:p(o),flowStatus:p(l),ruleChain:p(a),onSubmit:f,onClose:h},null,8,["lf","flowStatus","ruleChain"])]),_:1}),B(x,{label:"\u53D8\u91CF",name:"vars"},{default:j(()=>[B(nrt,{lf:p(o),ref_key:"varsRef",ref:c,flowStatus:p(l),ruleChain:p(a),varType:"vars",onSubmit:f,onClose:h},null,8,["lf","flowStatus","ruleChain"])]),_:1}),B(x,{label:"\u5E94\u7528\u96C6\u6210",name:"app"},{default:j(()=>[B(S,{style:{"margin-bottom":"20px"},size:"small",type:"info"},{default:j(()=>[Ue("\u5E94\u7528\u901A\u8FC7\u8C03\u7528\u4EE5\u4E0B\u63A5\u53E3\u6267\u884C\u89C4\u5219\u94FE")]),_:1}),B(E,{column:"1",border:"",title:""},{default:j(()=>[B(C,{label:"\u540C\u6B65\u63A5\u53E3"},{default:j(()=>[J("span",{onClick:b[0]||(b[0]=A=>d("/api/v1/rules/"+p(a).id+"/execute/{msgType}"))}," POST /api/v1/rules/"+Ve(p(a).id)+"/execute/{msgType}",1),B(S,{size:"small",type:"info"},{default:j(()=>[Ue("\u5173\u6CE8\u89C4\u5219\u94FE\u5904\u7406\u7ED3\u679C")]),_:1})]),_:1}),B(C,{label:"\u5F02\u6B65\u63A5\u53E3"},{default:j(()=>[J("span",{onClick:b[1]||(b[1]=A=>d("/api/v1/rules/"+p(a).id+"/notify/{msgType}"))}," POST /api/v1/rules/"+Ve(p(a).id)+"/notify/{msgType}",1),B(S,{size:"small",type:"info"},{default:j(()=>[Ue("\u4E0D\u5173\u6CE8\u89C4\u5219\u94FE\u5904\u7406\u7ED3\u679C")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},irt={__name:"NodeMgtNodeTree",props:["show","lf"],emits:["updateNodeState"],setup(t,{expose:e,emit:n}){const{show:r,lf:i}=t;uv(),F("locals");const o=F([{id:1,label:"Level one 1",children:[{id:4,label:"Level two 1-1",children:[{id:9,label:"Level three 1-1-1"},{id:10,label:"Level three 1-1-2"}]}]}]);Ft(()=>{let c=i.getOptions();o.value=l(c.components)});const a=c=>{let d=o.value,f=[];d.forEach(h=>{h.type===c.type?(h.disabled=!h.disabled,f.push({type:h.type,disabled:h.disabled,category:h.category}),h.children&&h.children.length>0&&h.children.forEach(g=>{g.disabled=h.disabled,f.push({type:g.type,disabled:g.disabled,category:g.category})})):h.children&&h.children.length>0&&h.children.forEach(g=>{g.type===c.type&&(g.disabled=!g.disabled,f.push({type:g.type,disabled:g.disabled,category:g.category}))})}),n("updateNodeState",f),o.value=d},s=c=>c.map(d=>{var f;return{type:d.type,label:d.label,category:d.type,isTop:!0,background:d.background,disabled:(f=d.disabled)!=null?f:!1,children:d.components.map(h=>{var g;return{type:h.type,label:h.label,category:d.type,disabled:(g=h.disabled)!=null?g:!1,children:[]}})}}),l=c=>{let d=[];return Object.keys(c).forEach(f=>{let h=c[f];d.push({label:h.label,components:h.components,type:f})}),s(d)};return e({renderData:c=>{o.value=l(c)}}),(c,d)=>{const f=mt,h=lr,g=A0;return R(),xe(g,{style:{"max-width":"600px"},data:o.value,"node-key":"type","default-expand-all":"","expand-on-click-node":!0},{default:j(({node:m,data:y})=>[J("span",{class:V({"item-is-disabled":y.disabled,"custom-tree-node":!0})},[J("span",null,[Ue(Ve(y.label)+" ",1),B(f,null,{default:j(()=>[y.isTop?(R(),Y("span",{key:0,class:"tree-node-icon",style:vt({backgroundImage:`url(${y.icon?y.icon:"/images/"+y.category+"-dark.svg"})`})},null,4)):Se("",!0)]),_:2},1024)]),J("span",null,[B(h,{size:"small",onClick:b=>a(y)},{default:j(()=>[Ue(Ve(y.disabled?"\u542F\u7528":"\u7981\u7528"),1)]),_:2},1032,["onClick"])])],2)]),_:1},8,["data"])}}};var ort=Ml(irt,[["__scopeId","data-v-6d2066a0"]]);const art={style:{display:"flex","justify-content":"flex-end","margin-top":"10px"}},srt={__name:"NodeMgtDialog",props:["show","lf"],emits:["updateLocales","close"],setup(t,{emit:e}){const{show:n,lf:r}=t,i=[uv()],o=F("installed"),a=F(),s=F("{}"),l=F(!1),u=F(null),c=F("450px"),d=()=>{if(o.value==="installed"){let S=r.getOptions();a.value.renderData(S.components)}},f=()=>{b()},h=()=>{y()},g=()=>{e("close")},m=S=>{let C=JSON.parse(s.value);C.component||(C.component={}),C.component.endpoints||(C.component.endpoints={}),C.component.nodes||(C.component.nodes={}),S&&S.forEach(E=>{E.category==="endpoints"?C.component.endpoints[E.type]?C.component.endpoints[E.type].disabled=E.disabled:C.component.endpoints[E.type]={type:E.type,disabled:E.disabled}:C.component.nodes[E.type]?C.component.nodes[E.type].disabled=E.disabled:C.component.nodes[E.type]={type:E.type,disabled:E.disabled}}),s.value=JSON.stringify(C,null,2),b()},y=async()=>{let S=r.getEditorSetting().url+"/api/v1/locales";fetch(S+"?&lang=zh_cn",{method:"GET",headers:{"Content-Type":"application/json"}}).then(C=>C.text()).then(C=>{s.value=C}).catch(C=>{s.value=C.message})},b=()=>{if(!w(s.value)){jr.error("\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E");return}let C=r.getEditorSetting().url+"/api/v1/locales";fetch(C+"?&lang=zh_cn",{method:"POST",headers:{"Content-Type":"application/json"},body:s.value}).then(E=>{if(E.ok){jr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"});let T=JSON.parse(s.value);r.setLocales(T),e("updateLocales")}else jr.error("\u4FDD\u5B58\u5931\u8D25");return E}).catch(E=>{jr.error(E.message)})},w=S=>{try{const C=JSON.parse(S);return!(typeof C!="object"||C===null)}catch{return!1}},O=function(){s.value=db.js(s.value,{indent_size:2})},x=()=>{Ur.isEnabled&&(Ur.isFullscreen?(Ur.exit(),l.value=!1):(c.value="100%",Ur.request(u.value[0]),l.value=!0))};return Ur.on("change",()=>{Ur.isFullscreen?c.value="100%":c.value="450px"}),(S,C)=>{const E=co,T=fo,P=Sp,A=ns,D=lr,$=xp,N=Ma;return R(),xe(N,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px",width:"80%",class:"custom-dialog","before-close":g,modelValue:t.show,onOpen:h},{header:j(()=>[B(T,null,{default:j(()=>[B(E,{span:12},{default:j(()=>[Ue("\u7EC4\u4EF6\u7BA1\u7406")]),_:1})]),_:1})]),default:j(()=>[B($,{modelValue:o.value,"onUpdate:modelValue":C[2]||(C[2]=z=>o.value=z),"tab-position":"left",onClick:d},{default:j(()=>[B(P,{label:"\u5DF2\u5B89\u88C5",name:"installed"},{default:j(()=>[B(ort,{ref_key:"nodeTreeRef",ref:a,lf:t.lf,onUpdateNodeState:m},null,8,["lf"])]),_:1}),B(P,{label:"\u56FD\u9645\u5316\u914D\u7F6E",name:"locals"},{default:j(()=>[B(T,{style:{"margin-bottom":"10px"}},{default:j(()=>[B(E,{span:20},{default:j(()=>[B(A,{type:"info"},{default:j(()=>[Ue("\u652F\u6301\u589E\u91CF\u914D\u7F6E\u7EC4\u4EF6\u8868\u5355\u914D\u7F6E")]),_:1})]),_:1}),B(E,{span:4,style:{float:"right","text-align":"right"}},{default:j(()=>[B(D,{type:"info",size:"small",round:"",onClick:C[0]||(C[0]=z=>O())},{default:j(()=>[Ue("\u6574\u7406")]),_:1}),B(D,{icon:l.value?p(zS):p(Hm),size:"small",onClick:x,circle:""},null,8,["icon"])]),_:1})]),_:1}),B(p(Vu),{modelValue:s.value,"onUpdate:modelValue":C[1]||(C[1]=z=>s.value=z),placeholder:"\u8BF7\u8F93\u5165\u8BED\u8A00\u5305\u914D\u7F6E",ref_key:"codeEditorRef",ref:u,style:vt({height:c.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:i},null,8,["modelValue","style"]),J("div",art,[B(D,{type:"primary",onClick:f},{default:j(()=>[Ue("\u4FDD\u5B58")]),_:1}),B(D,{onClick:g},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},yJ="rulego-editor-config",lrt=function(){try{const t=localStorage.getItem(yJ);t&&(window.rulegoEditorConfig=JSON.parse(t))}catch(t){console.error("\u4FDD\u5B58\u6570\u636E\u51FA\u9519:",t)}return window.rulegoEditorConfig},urt=t=>{try{localStorage.setItem(yJ,JSON.stringify(t)),window.rulegoEditorConfig=t}catch(e){console.error("\u66F4\u65B0\u6570\u636E\u51FA\u9519:",e)}},crt=J("a",{href:"https://github.com/rulego/rulego/tree/main/examples/server",target:"_blank"},"examples/server",-1),drt=J("br",null,null,-1),frt=J("br",null,null,-1),hrt={style:{flex:"auto"}},prt={__name:"SettingDialog",props:["show","lf"],emits:["submit","close"],setup(t,{emit:e}){const{show:n,lf:r}=t,i=F(),o=vn({baseUrl:r.getEditorSetting().url,toolbar:r.getEditorSetting().toolbar}),a=()=>{let u=Dn(o);e("submit",u),urt(u)},s=()=>{e("close")},l=()=>{o.baseUrl=r.getEditorSetting().url,o.toolbar=r.getEditorSetting().toolbar};return(u,c)=>{const d=co,f=fo,h=oW,g=hi,m=Pl,y=kl,b=lr,w=Ma;return R(),xe(w,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"50%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:l},{header:j(()=>[B(f,null,{default:j(()=>[B(d,{span:12},{default:j(()=>[Ue("RuleGo-Editor\u8BBE\u7F6E")]),_:1})]),_:1})]),footer:j(()=>[J("div",hrt,[B(b,{type:"primary",onClick:a},{default:j(()=>[Ue("\u786E\u8BA4")]),_:1}),B(b,{onClick:s},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),default:j(()=>[B(h,{title:"",type:"info",style:{"margin-bottom":"10px","margin-top":"-10px"},center:""},{default:j(()=>[Ue(" \u652F\u6301\u79BB\u7EBF\u8FD0\u884C\uFF0C\u5E76\u751F\u6210\u89C4\u5219\u94FE\u6570\u636E\u3002\u5982\u679C\u9700\u8981\u5BF9\u63A5\u540E\u53F0API\u3002\u8BF7\u5148\u8FD0\u884C\uFF1A"),crt,Ue("\u3002 ")]),_:1}),drt,frt,B(y,{model:o,ref_key:"formRef",ref:i,"label-position":"top","label-width":"auto"},{default:j(()=>[B(m,{label:"RuleGo\u540E\u53F0URL",prop:"url"},{default:j(()=>[B(g,{modelValue:o.baseUrl,"onUpdate:modelValue":c[0]||(c[0]=O=>o.baseUrl=O),placeholder:"\u793A\u4F8B:http://127.0.0.1:9090"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},grt=J("p",{class:"text item"},"RuleGo-Editor \u4EC5\u4F9B\u5B66\u4E60\u4EA4\u6D41\u4F7F\u7528\uFF0C\u8BF7\u52FF\u7528\u4E8E\u5546\u4E1A\u7528\u9014\u3002",-1),mrt=J("p",{class:"text item"},[Ue("\u5546\u7528\u6388\u6743\u8BF7\u8054\u7CFB\u4F5C\u8005\u83B7\u53D6\u6388\u6743\uFF0C\u8BE6\u60C5\uFF1A"),J("a",{href:"https://app.rulego.cc",target:"_blank"},"https://app.rulego.cco")],-1),vrt=J("p",{class:"text item"},"Email:rulego@outlook.com",-1),yrt=J("p",{class:"text item"},"\u5FAE\u4FE1:rulegoteam",-1),brt={__name:"AboutDialog",props:["show","lf","ruleChain","fromActiveName"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const r=t,{show:i,lf:o,ruleChain:a,fromActiveName:s}=Mi(r),l=F("info");F(),Fe(s,d=>{});const u=()=>{n("close")};return e({changeActiveName:d=>{l.value=d}}),(d,f)=>{const h=Ma;return R(),xe(h,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,class:"custom-dialog",width:"50%",draggable:"",top:"10px","before-close":u,modelValue:p(i)},{header:j(()=>[Ue(" RuleGo-Editor v0.27.0 ")]),default:j(()=>[grt,mrt,vrt,yrt]),_:1},8,["modelValue"])}}},_rt={},Ort={t:"1733454332806",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1484",width:"200",height:"200"},wrt=J("path",{d:"M385.47911111 902.59911111h83.74044444v41.41511111h-83.74044444zM217.99822222 902.59911111h83.74044445v41.41511111h-83.74044445zM113.55022222 881.89155555h-41.41511111v62.12266667H134.25777778v-41.41511111h-20.70755556zM72.13511111 546.816h41.41511111v83.74044445h-41.41511111zM72.13511111 211.85422222h41.41511111v83.74044445h-41.41511111zM72.13511111 714.41066667h41.41511111v83.74044444h-41.41511111zM72.13511111 379.33511111h41.41511111V463.07555555h-41.41511111zM72.13511111 128.11377778h41.41511111v-20.70755556H134.25777778V65.99111111h-62.12266667zM553.07377778 65.99111111h83.74044444v41.41511111h-83.74044444zM720.55466667 65.99111111h83.74044444v41.41511111h-83.74044444zM385.47911111 65.99111111h83.74044444v41.41511111h-83.74044444zM217.99822222 65.99111111h83.74044445v41.41511111h-83.74044445zM888.03555555 65.99111111v41.41511111h20.70755556v20.70755556h41.41511111V65.99111111zM908.74311111 379.33511111h41.41511111V463.07555555h-41.41511111zM908.74311111 211.85422222h41.41511111v83.74044445h-41.41511111zM738.75911111 637.26933333l70.08711111-54.272c5.23377778-4.096 8.07822222-10.46755555 7.50933333-17.06666666-0.56888889-6.59911111-4.43733333-12.51555555-10.24-15.58755556L451.47022222 359.424c-6.82666667-3.64088889-15.13244445-2.95822222-21.27644444 1.70666667-6.144 4.77866667-8.87466667 12.62933333-7.05422223 20.13866666l95.91466667 391.168c1.59288889 6.48533333 6.25777778 11.60533333 12.51555556 13.76711112 6.25777778 2.16177778 13.19822222 1.024 18.432-2.95822223l70.08711111-54.272 151.552 195.69777778c3.86844445 5.00622222 9.67111111 7.62311111 15.47377778 7.62311111 4.20977778 0 8.41955555-1.36533333 11.94666666-4.096l87.60888889-67.81155556c4.096-3.18577778 6.82666667-7.85066667 7.39555556-12.97066666 0.68266667-5.12-0.79644445-10.35377778-3.98222223-14.44977778l-151.32444444-195.69777778z","p-id":"1485",fill:"#2c2c2c"},null,-1),xrt=[wrt];function Srt(t,e){return R(),Y("svg",Ort,xrt)}var Crt=Ml(_rt,[["render",Srt]]);const Ert={},Trt={t:"1733456794249",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3806",width:"200",height:"200"},krt=J("path",{d:"M946.8 420L651.9 125.1c-19.5-19.5-52.7-5.7-52.7 21.8v174c-79.3-1.8-501.8 14.9-532.3 569.6-0.9 17.2 22.1 24.3 30.6 9.3C255 621 396.6 553.3 599.1 561.5v175.2c0 27.5 33.3 41.3 52.8 21.9l294.8-294.9c12.1-12.1 12.1-31.6 0.1-43.7z",fill:"#555555","p-id":"3807"},null,-1),Prt=[krt];function Art(t,e){return R(),Y("svg",Trt,Prt)}var Mrt=Ml(Ert,[["render",Art]]);const Rrt={name:"Undo"},$rt={t:"1733456780307",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2833",width:"200",height:"200"},Nrt=J("path",{d:"M426.053024 331.626933l0-169.619142-331.490833 300.725132 331.490833 300.789601L426.053024 581.63394c92.097558 0 376.594077 0 499.373425 281.257755l0-31.251771C925.426449 706.636932 802.629705 305.014832 426.053024 331.626933z",fill:"#3D3B4F","p-id":"2834"},null,-1),Drt=[Nrt];function Lrt(t,e,n,r,i,o){return R(),Y("svg",$rt,Drt)}var Irt=Ml(Rrt,[["render",Lrt]]);const Brt=t=>(ale("data-v-309ebd4f"),t=t(),sle(),t),Frt={class:"up-toolbar"},Vrt=Brt(()=>J("div",{class:"logo"},[J("img",{class:"logoimg",src:cZe,alt:"logo"}),Ue("Sagoo Rule Editor")],-1)),jrt={class:"title"},Qrt={class:"over-toolbar"},zrt={__name:"Toolbar",props:["lf"],setup(t){const{lf:e}=t,n=()=>{const he=e.getGraphData().ruleChain;if(!he.id)return jr.info("\u8BF7\u5148\u4ECE sagoo-iot \u4E2D\u9009\u62E9\u4E00\u4E2A\u89C4\u5219\u94FE\u518D\u8FDB\u884C\u5BFC\u5165\u64CD\u4F5C");const $e=document.createElement("input");$e.type="file",$e.accept=".json",$e.onchange=()=>{const Me=$e.files[0],q=new FileReader;q.readAsText(Me),q.onload=()=>{var ke;const de=JSON.parse(q.result);de.ruleChain.id=he.id,de.ruleChain.name=he.name,de.ruleChain.additionalInfo.description=(ke=he.additionalInfo)==null?void 0:ke.description,e.graphModel.eventCenter.emit("rulego-editor:open",JSON.stringify(de)),l.value=!0}},$e.click()},r=()=>{const ee=e.getGraphData(),he=ee.ruleChain.id,$e=new Blob([JSON.stringify(ee,null,2)],{type:"text/plain;charset=utf-8"});saveAs($e,he+".json")},i=F(null),o=F(null),a=F(!1),s=F(!1),l=F(!1),u=F(null),c=F(),d=F(),f=F(""),h=F(0),g=F(!1);let m=!0,y=F(!1);const b=F(!1),w=F(!1),O=F({}),x=F(""),S=F("info"),C=F({});let E=F({x:0,y:0}),T=F({x:0,y:0,targetNodeId:""});const P=F(!0),A=F(!1),D=F({toolbar:e.getEditorSetting().toolbar});e.on("history:change",ee=>{l.value=!0,w.value=ee.data.undoAble,b.value=ee.data.redoAble}),e.on("rulego-editor:saveOk",()=>{l.value=!1,h.value===0&&(h.value=1)}),e.on("selection:selected,node:click,edge:click,blank:click",()=>{const{nodes:ee,edges:he}=e.getSelectElements();let $e=ee.filter(Me=>Me.type!=="start-node");s.value=$e.length>0||he.length>0}),e.on("node:drag",({data:ee,e:he})=>{if(ee.type!=="start-node"&&i.value&&ee.id===i.value.id){let $e=e.getPointByClient(he.clientX,he.clientY);E.value.x=$e.domOverlayPosition.x+40,E.value.y=$e.domOverlayPosition.y-45}else if(o.value){let $e=e.getEdgeDataById(o.value.id);if(ee.id!==$e.sourceNodeId&&ee.id!==$e.targetNodeId)return;let Me=e.getPointByClient(he.clientX,he.clientY);T.value.x!==0&&T.value.y!==0&&T.value.targetNodeId===ee.id&&(E.value.x=E.value.x-(T.value.x-Me.domOverlayPosition.x),E.value.y=E.value.y-(T.value.y-Me.domOverlayPosition.y)),T.value.x=Me.domOverlayPosition.x,T.value.y=Me.domOverlayPosition.y,T.value.targetNodeId=ee.id}}),e.on("node:click",({data:ee,position:he})=>{ee.type!=="start-node"?(i.value=ee,o.value=null,E.value.x=he.domOverlayPosition.x+40,E.value.y=he.domOverlayPosition.y-45,T.value.x=0,T.value.y=0,T.value.targetNodeId=ee.id,a.value=!0):a.value=!1}),e.on("edge:click",({data:ee,position:he})=>{i.value=null,o.value=ee,E.value.x=he.domOverlayPosition.x+10,E.value.y=he.domOverlayPosition.y,T.value.x=0,T.value.y=0,T.value.targetNodeId="",a.value=!0}),e.on("blank:click",({})=>{i.value=null,o.value=null,a.value=!1}),e.on("graph:updated,graph:rendered",({})=>{L()}),e.on("rulego-editor:deleted",ee=>{i.value=null,o.value=null,a.value=!1,s.value=!1}),e.on("rulego-editor:setting",ee=>{D.value=ee,P.value=ee.showTest});const $=()=>{x.value="test"},N=()=>{x.value="",g.value=!1},z=()=>{Ur.isEnabled&&(Ur.isFullscreen?Ur.exit():Ur.request(document.documentElement),e.graphModel.eventCenter.emit("rulego-editor:fullScreen",A.value))};Ur.on("change",()=>{Ur.isFullscreen?A.value=!0:A.value=!1});const I=ee=>{W({onConfirm:()=>{e.graphModel.eventCenter.emit("rulego-editor:new",ee),N(),L(!0)}})},L=(ee=!1)=>{let he=e.getRuleChain();he&&(f.value=he.name||he.id,"disabled"in he?h.value=he.disabled?2:1:h.value=0,he.id&&ee&&(window.location.hash=he.id))},X=()=>{y.value=!y.value,y.value?e.openSelectionSelect():e.closeSelectionSelect()},Q=()=>{m=!m,m?e.extension.miniMap.show():e.extension.miniMap.hide()},W=({message:ee="\u5F53\u524D\u753B\u5E03\u5B58\u5728\u672A\u4FDD\u5B58\u6570\u636E\u3002\u786E\u5B9A\u653E\u5F03\u4FDD\u5B58\u5417\uFF1F",title:he="\u786E\u8BA4",confirmButtonText:$e="\u786E\u5B9A",cancelButtonText:Me="\u53D6\u6D88",type:q="warning",onConfirm:de,onCancel:ke})=>{l.value?Nw.confirm(ee,he,{confirmButtonText:$e,cancelButtonText:Me,type:q}).then(()=>{typeof de=="function"&&de()}).catch(()=>{typeof ke=="function"&&ke()}):typeof de=="function"&&de()},G=(ee,he)=>{W({onConfirm:()=>{e.graphModel.eventCenter.emit("rulego-editor:open",ee),N(),L(!0)}})},K=(ee,he)=>{let $e=e.getRuleChain();$e.id===ee&&(he==="start"?($e.disabled=!1,h.value=1,e.graphModel.eventCenter.emit("rulego-editor:update",$e)):he==="stop"?($e.disabled=!0,h.value=2,e.graphModel.eventCenter.emit("rulego-editor:update",$e)):he==="delete"&&(h.value=0,e.graphModel.eventCenter.emit("rulego-editor:new",{}))),l.value=!1},oe=(ee,he)=>{e.graphModel.eventCenter.emit("rulego-editor:update",ee),l.value=!0,he==="base"&&(N(),L())},ne=ee=>{e.graphModel.eventCenter.emit("rulego-editor:setting",ee),N()},_e=()=>{e.graphModel.eventCenter.emit("rulego-editor:save")},Ce=()=>{e.graphModel.eventCenter.emit("rulego-editor:deleteSelects"),a.value=!1},U=()=>{e.graphModel.eventCenter.emit("rulego-editor:showEditPanel")},ie=()=>{};return(ee,he)=>{const $e=ns,Me=lr,q=co,de=fo,ke=Hi;return R(),Y(dt,null,[J("div",Frt,[Vrt,J("div",jrt,[Ue(Ve(f.value)+" ",1),B($e,{size:"small",type:h.value===0?"info":h.value===1?"success":"danger"},{default:j(()=>[Ue(Ve(h.value===0?"\u7F16\u8F91\u4E2D":h.value===1?"\u8FD0\u884C\u4E2D":"\u505C\u7528\u4E2D"),1)]),_:1},8,["type"])]),B(de,null,{default:j(()=>[B(q,{span:24},{default:j(()=>[B(Me,{onClick:_e,type:"primary",icon:ee.Check,size:"small",disabled:!l.value},{default:j(()=>[Ue("\u4FDD\u5B58")]),_:1},8,["icon","disabled"]),B(Me,{onClick:$,type:"success",icon:ee.CaretRight,size:"small"},{default:j(()=>[Ue("\u8C03\u8BD5")]),_:1},8,["icon"]),B(Me,{onClick:n,type:"info",plain:"",icon:ee.Download,size:"small"},{default:j(()=>[Ue("\u5BFC\u5165")]),_:1},8,["icon"]),B(Me,{onClick:r,type:"info",icon:ee.Upload,size:"small"},{default:j(()=>[Ue("\u5BFC\u51FA")]),_:1},8,["icon"]),B(Me,{onClick:ee.closePage,type:"warning",icon:p(Oa),size:"small"},{default:j(()=>[Ue("\u5173\u95ED")]),_:1},8,["onClick","icon"])]),_:1})]),_:1})]),Se("",!0),a.value?(R(),xe(Wnt,{key:1,onDelete:Ce,onEdit:U,currentElementPosition:p(E)},null,8,["currentElementPosition"])):Se("",!0),B(Qq,{ref_key:"newFlowDialogRef",ref:O,lf:t.lf,show:g.value,onSubmit:I,onClose:N},null,8,["lf","show"]),B(gZe,{lf:t.lf,show:x.value==="open",onNew:I,onOpen:G,onOperate:K,onClose:N},null,8,["lf","show"]),B(znt,{lf:t.lf,show:x.value==="import",onSubmit:G,onClose:N},null,8,["lf","show"]),B(Vnt,{lf:t.lf,show:x.value==="export",data:c.value,ruleChainId:d.value,onClose:N},null,8,["lf","show","data","ruleChainId"]),B(prt,{lf:t.lf,show:x.value==="setting",onSubmit:ne,onClose:N},null,8,["lf","show"]),B(Gnt,{lf:t.lf,show:x.value==="test",onOperate:K,onClose:N},null,8,["lf","show"]),B(rrt,{ref_key:"flowInfoDialogRef",ref:u,lf:t.lf,flowStatus:h.value,show:x.value==="edit",fromActiveName:S.value,ruleChain:C.value,onSubmit:oe,onClose:N},null,8,["lf","flowStatus","show","fromActiveName","ruleChain"]),B(srt,{lf:t.lf,show:x.value==="nodeMgt",onUpdateLocales:ie,onClose:N},null,8,["lf","show"]),B(brt,{lf:t.lf,show:x.value==="showAbout",onClose:N},null,8,["lf","show"]),J("div",Qrt,[B(ke,{class:"box-item",effect:"dark",content:p(y)?"\u5173\u95ED\u6846\u9009":"\u6253\u5F00\u6846\u9009",placement:"bottom-start"},{default:j(()=>[B(Me,{type:p(y)?"success":"",icon:Crt,onClick:X,circle:""},null,8,["type"])]),_:1},8,["content"]),B(ke,{class:"box-item",effect:"dark",content:"\u64A4\u9500",placement:"bottom-start"},{default:j(()=>[B(Me,{icon:Irt,onClick:he[0]||(he[0]=Ie=>t.lf.undo()),disabled:!w.value,circle:""},null,8,["disabled"])]),_:1}),B(ke,{class:"box-item",effect:"dark",content:"\u91CD\u505A",placement:"bottom-start"},{default:j(()=>[B(Me,{icon:Mrt,onClick:he[1]||(he[1]=Ie=>t.lf.redo()),disabled:!b.value,circle:""},null,8,["disabled"])]),_:1}),B(ke,{class:"box-item",effect:"dark",content:"\u5C0F\u5730\u56FE",placement:"bottom-start"},{default:j(()=>[B(Me,{icon:p(BCe),onClick:Q,circle:""},null,8,["icon"])]),_:1}),B(ke,{effect:"dark",content:A.value?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F",placement:"bottom-start"},{default:j(()=>[B(Me,{icon:A.value?p(zS):p(Hm),onClick:z,circle:""},null,8,["icon"])]),_:1},8,["content"])])],64)}}};var Wrt=Ml(zrt,[["__scopeId","data-v-309ebd4f"]]);class bJ{constructor({lf:e}){this.app=yS(Wrt,{lf:e})}render(e,n){const r=document.createElement("div");n.appendChild(r),this.app.mount(r)}}iT(bJ,"pluginName","ControlExtension");const Hrt={style:{flex:"auto","text-align":"left"}},Urt={__name:"EdgePropertyDrawer",props:["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentEdgeModel:r,sourceNodeView:i,relationTypeSplit:o,sourceNodeRelationTypeOptions:a}=t,s=F(),l=vn({relationTypeOptions:[],relationTypeValues:[]});let u=r;l.relationTypeOptions=a||i&&i.relationTypes,l.relationTypeValues=r.routerId||r.relationTypes,l.relationTypeAllowCreate=i&&i.relationTypeAllowCreate;const c=h=>{!h||h.validate(g=>{if(g)i.nodeType==="endpoint-node"?u.relationTypes=[l.relationTypeValues]:u.relationTypes=l.relationTypeValues,u.relationTypesLabel=Un.getSelectedLabels(l.relationTypeOptions,u.relationTypes,"relationTypes"),e("submit",Dn(u));else return!1})},d=()=>{e("cancel")},f=()=>{d()};return(h,g)=>{const m=co,y=fo,b=Jc,w=wl,O=Pl,x=kl,S=lr,C=H$;return R(),xe(C,{modal:!1,"close-on-click-modal":!1,"close-on-press-escape":!1,"destroy-on-close":!0,direction:"rtl",size:"580px","modal-class":"right-drawer-modal","before-close":f,modelValue:t.show},{header:j(()=>[B(y,{class:"setter-title"},{default:j(()=>[B(m,{span:12},{default:j(()=>[Ue("\u89C4\u5219\u8282\u70B9\u94FE\u63A5\u8BE6\u60C5")]),_:1})]),_:1})]),footer:j(()=>[J("div",Hrt,[B(S,{type:"primary",size:"large",onClick:g[1]||(g[1]=E=>c(s.value))},{default:j(()=>[Ue("\u786E\u8BA4")]),_:1}),B(S,{size:"large",onClick:d},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),default:j(()=>[B(x,{model:l,ref_key:"formRef",ref:s,"label-position":"right","label-width":"auto"},{default:j(()=>[B(O,{label:"\u94FE\u63A5\u6807\u7B7E",rules:[{required:!0,message:"\u94FE\u63A5\u6807\u7B7E\u662F\u5FC5\u987B\u7684"}],prop:"relationTypeValues"},{default:j(()=>[B(w,{modelValue:l.relationTypeValues,"onUpdate:modelValue":g[0]||(g[0]=E=>l.relationTypeValues=E),multiple:t.sourceNodeView.nodeType!=="endpoint-node",filterable:"","allow-create":l.relationTypeAllowCreate||!l.relationTypeOptions||l.relationTypeOptions.length===0,placeholder:"\u94FE\u63A5\u6807\u7B7E",style:{width:"100%"}},{default:j(()=>[(R(!0),Y(dt,null,Ht(l.relationTypeOptions,E=>(R(),xe(b,{key:E.value!==void 0&&E.value!==null?E.value:E,label:E.label||E,value:E.value!==void 0&&E.value!==null?E.value:E},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple","allow-create"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},Xrt={style:{flex:"auto"}},Zrt={__name:"EdgePropertyDialog",props:["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentEdgeModel:r,sourceNodeView:i,relationTypeSplit:o,sourceNodeRelationTypeOptions:a}=t,s=F(),l=vn({relationTypeAllowCreate:!1,relationTypeOptions:[],relationTypeValues:[]});let u=r;if(l.relationTypeOptions=a||i&&i.relationTypes,l.relationTypeValues=r.routerId||r.relationTypes,l.relationTypeAllowCreate=i&&i.relationTypeAllowCreate,!l.relationTypeValues){let h=l.relationTypeOptions&&l.relationTypeOptions.length>0?l.relationTypeOptions[0]:null;h?i.nodeType==="endpoint-node"?l.relationTypeValues=h.value!==void 0&&h.value!==null?h.value:h:l.relationTypeValues=[h.value!==void 0&&h.value!==null?h.value:h]:l.relationTypeValues=[]}const c=h=>{!h||h.validate(g=>{if(g)i.nodeType==="endpoint-node"?u.relationTypes=[l.relationTypeValues]:u.relationTypes=l.relationTypeValues,u.relationTypesLabel=Un.getSelectedLabels(l.relationTypeOptions,u.relationTypes,"relationTypes"),e("submit",Dn(u));else return!1})},d=()=>{e("cancel")},f=()=>{d()};return(h,g)=>{const m=Jc,y=wl,b=Pl,w=kl,O=lr,x=Ma;return R(),xe(x,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"50%",draggable:"",top:"10px","before-close":f,modelValue:t.show},{header:j(()=>[Ue(" \u6DFB\u52A0\u94FE\u63A5 ")]),footer:j(()=>[J("div",Xrt,[B(O,{type:"primary",size:"large",onClick:g[1]||(g[1]=S=>c(s.value))},{default:j(()=>[Ue("\u786E\u8BA4")]),_:1}),B(O,{size:"large",onClick:d},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),default:j(()=>[B(w,{model:l,ref_key:"formRef",ref:s,"label-position":"right","label-width":"auto"},{default:j(()=>[B(b,{label:"\u94FE\u63A5\u6807\u7B7E",rules:[{required:!0,message:"\u94FE\u63A5\u6807\u7B7E\u662F\u5FC5\u987B\u7684"}],prop:"relationTypeValues"},{default:j(()=>[B(y,{modelValue:l.relationTypeValues,"onUpdate:modelValue":g[0]||(g[0]=S=>l.relationTypeValues=S),multiple:t.sourceNodeView.nodeType!=="endpoint-node",filterable:"","allow-create":l.relationTypeAllowCreate||!l.relationTypeOptions||l.relationTypeOptions.length===0,placeholder:"\u94FE\u63A5\u6807\u7B7E",style:{width:"100%"}},{default:j(()=>[(R(!0),Y(dt,null,Ht(l.relationTypeOptions,S=>(R(),xe(m,{key:S.value!==void 0&&S.value!==null?S.value:S,label:S.label||S,value:S.value!==void 0&&S.value!==null?S.value:S},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple","allow-create"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},qrt=314,Yrt=315,Lj=1,Grt=2,Krt=3,Jrt=4,eit=316,tit=318,nit=319,rit=5,iit=6,oit=0,xM=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],_J=125,ait=59,SM=47,sit=42,lit=43,uit=45,cit=60,dit=44,fit=63,hit=46,pit=91,git=new Rtt({start:!1,shift(t,e){return e==rit||e==iit||e==tit?t:e==nit},strict:!1}),mit=new n_((t,e)=>{let{next:n}=t;(n==_J||n==-1||e.context)&&t.acceptToken(eit)},{contextual:!0,fallback:!0}),vit=new n_((t,e)=>{let{next:n}=t,r;xM.indexOf(n)>-1||n==SM&&((r=t.peek(1))==SM||r==sit)||n!=_J&&n!=ait&&n!=-1&&!e.context&&t.acceptToken(qrt)},{contextual:!0}),yit=new n_((t,e)=>{t.next==pit&&!e.context&&t.acceptToken(Yrt)},{contextual:!0}),bit=new n_((t,e)=>{let{next:n}=t;if(n==lit||n==uit){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(Lj);t.acceptToken(r?Lj:Grt)}}else n==fit&&t.peek(1)==hit&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(Krt))},{contextual:!0});function z2(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const _it=new n_((t,e)=>{if(t.next!=cit||!e.dialectEnabled(oit)||(t.advance(),t.next==SM))return;let n=0;for(;xM.indexOf(t.next)>-1;)t.advance(),n++;if(z2(t.next,!0)){for(t.advance(),n++;z2(t.next,!1);)t.advance(),n++;for(;xM.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==dit)return;for(let r=0;;r++){if(r==7){if(!z2(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(Jrt,-n)}),Oit=_D({"get set async static":et.modifier,"for while do if else switch try catch finally return throw break continue default case":et.controlKeyword,"in of await yield void typeof delete instanceof":et.operatorKeyword,"let var const using function class extends":et.definitionKeyword,"import export from":et.moduleKeyword,"with debugger as new":et.keyword,TemplateString:et.special(et.string),super:et.atom,BooleanLiteral:et.bool,this:et.self,null:et.null,Star:et.modifier,VariableName:et.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":et.function(et.variableName),VariableDefinition:et.definition(et.variableName),Label:et.labelName,PropertyName:et.propertyName,PrivatePropertyName:et.special(et.propertyName),"CallExpression/MemberExpression/PropertyName":et.function(et.propertyName),"FunctionDeclaration/VariableDefinition":et.function(et.definition(et.variableName)),"ClassDeclaration/VariableDefinition":et.definition(et.className),"NewExpression/VariableName":et.className,PropertyDefinition:et.definition(et.propertyName),PrivatePropertyDefinition:et.definition(et.special(et.propertyName)),UpdateOp:et.updateOperator,"LineComment Hashbang":et.lineComment,BlockComment:et.blockComment,Number:et.number,String:et.string,Escape:et.escape,ArithOp:et.arithmeticOperator,LogicOp:et.logicOperator,BitOp:et.bitwiseOperator,CompareOp:et.compareOperator,RegExp:et.regexp,Equals:et.definitionOperator,Arrow:et.function(et.punctuation),": Spread":et.punctuation,"( )":et.paren,"[ ]":et.squareBracket,"{ }":et.brace,"InterpolationStart InterpolationEnd":et.special(et.brace),".":et.derefOperator,", ;":et.separator,"@":et.meta,TypeName:et.typeName,TypeDefinition:et.definition(et.typeName),"type enum interface implements namespace module declare":et.definitionKeyword,"abstract global Privacy readonly override":et.modifier,"is keyof unique infer asserts":et.operatorKeyword,JSXAttributeValue:et.attributeValue,JSXText:et.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":et.angleBracket,"JSXIdentifier JSXNameSpacedName":et.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":et.attributeName,"JSXBuiltin/JSXIdentifier":et.standard(et.tagName)}),wit={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,const:52,extends:56,this:60,true:68,false:68,null:80,void:84,typeof:88,super:104,new:138,delete:150,yield:159,await:163,class:168,public:231,private:231,protected:231,readonly:233,instanceof:252,satisfies:255,in:256,import:290,keyof:347,unique:351,infer:357,asserts:393,is:395,abstract:415,implements:417,type:419,let:422,var:424,using:427,interface:433,enum:437,namespace:443,module:445,declare:449,global:453,for:472,of:481,while:484,with:488,do:492,if:496,else:498,switch:502,case:508,try:514,catch:518,finally:522,return:526,throw:530,break:534,continue:538,debugger:542},xit={__proto__:null,async:125,get:127,set:129,declare:191,public:193,private:193,protected:193,static:195,abstract:197,override:199,readonly:205,accessor:207,new:399},Sit={__proto__:null,"<":189},Cit=lb.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D_O.QQlO'#DeO.bQlO'#DpO%[QlO'#DxO0fQlO'#EQOOQ!0Lf'#EY'#EYO1PQ`O'#EVOOQO'#En'#EnOOQO'#Ij'#IjO1XQ`O'#GrO1dQ`O'#EmO1iQ`O'#EmO3hQ!0MxO'#JpO6[Q!0MxO'#JqO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#F{O9UQ`O'#FzOOQ!0Lf'#Jq'#JqOOQ!0Lb'#Jp'#JpO9ZQ`O'#GvOOQ['#K]'#K]O9fQ`O'#IWO9kQ!0LrO'#IXOOQ['#J^'#J^OOQ['#I]'#I]Q`QlOOQ`QlOOO9sQ!L^O'#DtO9zQlO'#D|O:RQlO'#EOO9aQ`O'#GrO:YQMhO'#CoO:hQ`O'#ElO:sQ`O'#EwO:xQMhO'#FdO;gQ`O'#GrOOQO'#K^'#K^O;lQ`O'#K^O;zQ`O'#GzO;zQ`O'#G{O;zQ`O'#G}O9aQ`O'#HQO<qQ`O'#HTO>YQ`O'#CeO>jQ`O'#HaO>rQ`O'#HgO>rQ`O'#HiO`QlO'#HkO>rQ`O'#HmO>rQ`O'#HpO>wQ`O'#HvO>|Q!0LsO'#H|O%[QlO'#IOO?XQ!0LsO'#IQO?dQ!0LsO'#ISO9kQ!0LrO'#IUO?oQ!0MxO'#CiO@qQpO'#DjQOQ`OOO%[QlO'#EOOAXQ`O'#ERO:YQMhO'#ElOAdQ`O'#ElOAoQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Do'#DoOOQ!0Lb'#Jt'#JtO%[QlO'#JtOOQO'#Jw'#JwOOQO'#If'#IfOBoQpO'#EeOOQ!0Lb'#Ed'#EdOOQ!0Lb'#J{'#J{OCkQ!0MSO'#EeOCuQpO'#EUOOQO'#Jv'#JvODZQpO'#JwOEhQpO'#EUOCuQpO'#EePEuO&2DjO'#CbPOOO)CD{)CD{OOOO'#I^'#I^OFQO#tO,59UOOQ!0Lh,59U,59UOOOO'#I_'#I_OF`O&jO,59UOFnQ!L^O'#DaOOOO'#Ia'#IaOFuO#@ItO,59yOOQ!0Lf,59y,59yOGTQlO'#IbOGhQ`O'#JrOIgQ!fO'#JrO+}QlO'#JrOInQ`O,5:POJUQ`O'#EnOJcQ`O'#KROJnQ`O'#KQOJnQ`O'#KQOJvQ`O,5;[OJ{Q`O'#KPOOQ!0Ln,5:[,5:[OKSQlO,5:[OMQQ!0MxO,5:dOMqQ`O,5:lON[Q!0LrO'#KOONcQ`O'#J}O9ZQ`O'#J}ONwQ`O'#J}O! PQ`O,5;ZO! UQ`O'#J}O!#ZQ!fO'#JqOOQ!0Lh'#Ci'#CiO%[QlO'#EQO!#yQ!fO,5:qOOQS'#Jx'#JxOOQO-E<h-E<hO9aQ`O,5=^O!$aQ`O,5=^O!$fQlO,5;XO!&iQMhO'#EiO!(SQ`O,5;XO!(XQlO'#DwO!(cQpO,5;bO!(kQpO,5;bO%[QlO,5;bOOQ['#FS'#FSOOQ['#FU'#FUO%[QlO,5;cO%[QlO,5;cO%[QlO,5;cO%[QlO,5;cO%[QlO,5;cO%[QlO,5;cO%[QlO,5;cO%[QlO,5;cO%[QlO,5;cO%[QlO,5;cOOQ['#FY'#FYO!(yQlO,5;sOOQ!0Lf,5;x,5;xOOQ!0Lf,5;y,5;yOOQ!0Lf,5;{,5;{O%[QlO'#InO!*|Q!0LrO,5<hO%[QlO,5;cO!&iQMhO,5;cO!+kQMhO,5;cO!-]QMhO'#E[O%[QlO,5;vOOQ!0Lf,5;z,5;zO!-dQ,UO'#FiO!.aQ,UO'#KVO!-{Q,UO'#KVO!.hQ,UO'#KVOOQO'#KV'#KVO!.|Q,UO,5<ROOOW,5<_,5<_O!/_QlO'#FuOOOW'#Im'#ImO7VO7dO,5<PO!/fQ,UO'#FwOOQ!0Lf,5<P,5<PO!0VQ$IUO'#CwOOQ!0Lh'#C{'#C{O!0jO#@ItO'#DPO!1WQMjO,5<dO!1_Q`O,5<gO!2zQ(CWO'#GWO!3XQ`O'#GXO!3^Q`O'#GXO!4|Q(CWO'#G]O!6RQpO'#GaOOQO'#Gm'#GmO!+rQMhO'#GlOOQO'#Go'#GoO!+rQMhO'#GnO!6tQ$IUO'#JjOOQ!0Lh'#Jj'#JjO!7OQ`O'#JiO!7^Q`O'#JhO!7fQ`O'#CuOOQ!0Lh'#Cy'#CyO!7qQ`O'#C{OOQ!0Lh'#DT'#DTOOQ!0Lh'#DV'#DVO1SQ`O'#DXO!+rQMhO'#GOO!+rQMhO'#GQO!7vQ`O'#GSO!7{Q`O'#GTO!3^Q`O'#GZO!+rQMhO'#G`O;zQ`O'#JiO!8QQ`O'#EoO!8oQ`O,5<fOOQ!0Lb'#Cr'#CrO!8wQ`O'#EpO!9qQpO'#EqOOQ!0Lb'#KP'#KPO!9xQ!0LrO'#K_O9kQ!0LrO,5=bO`QlO,5>rOOQ['#Jf'#JfOOQ[,5>s,5>sOOQ[-E<Z-E<ZO!;wQ!0MxO,5:`O!9lQpO,5:^O!>bQ!0MxO,5:hO%[QlO,5:hO!@xQ!0MxO,5:jOOQO,5@x,5@xO!AiQMhO,5=^O!AwQ!0LrO'#JgO9UQ`O'#JgO!BYQ!0LrO,59ZO!BeQpO,59ZO!BmQMhO,59ZO:YQMhO,59ZO!BxQ`O,5;XO!CQQ`O'#H`O!CfQ`O'#KbO%[QlO,5;|O!9lQpO,5<OO!CnQ`O,5=yO!CsQ`O,5=yO!CxQ`O,5=yO9kQ!0LrO,5=yO;zQ`O,5=iOOQO'#Cw'#CwO!DWQpO,5=fO!D`QMhO,5=gO!DkQ`O,5=iO!DpQ!bO,5=lO!DxQ`O'#K^O>wQ`O'#HVO9aQ`O'#HXO!D}Q`O'#HXO:YQMhO'#HZO!ESQ`O'#HZOOQ[,5=o,5=oO!EXQ`O'#H[O!EjQ`O'#CoO!EoQ`O,59PO!EyQ`O,59PO!HOQlO,59POOQ[,59P,59PO!H`Q!0LrO,59PO%[QlO,59PO!JkQlO'#HcOOQ['#Hd'#HdOOQ['#He'#HeO`QlO,5={O!KRQ`O,5={O`QlO,5>RO`QlO,5>TO!KWQ`O,5>VO`QlO,5>XO!K]Q`O,5>[O!KbQlO,5>bOOQ[,5>h,5>hO%[QlO,5>hO9kQ!0LrO,5>jOOQ[,5>l,5>lO# lQ`O,5>lOOQ[,5>n,5>nO# lQ`O,5>nOOQ[,5>p,5>pO#!YQpO'#D]O%[QlO'#JtO#!{QpO'#JtO##VQpO'#DkO##hQpO'#DkO#%yQlO'#DkO#&QQ`O'#JsO#&YQ`O,5:UO#&_Q`O'#ErO#&mQ`O'#KSO#&uQ`O,5;]O#&zQpO'#DkO#'XQpO'#ETOOQ!0Lf,5:m,5:mO%[QlO,5:mO#'`Q`O,5:mO>wQ`O,5;WO!BeQpO,5;WO!BmQMhO,5;WO:YQMhO,5;WO#'hQ`O,5@`O#'mQ07dO,5:qOOQO-E<d-E<dO#(sQ!0MSO,5;POCuQpO,5:pO#(}QpO,5:pOCuQpO,5;PO!BYQ!0LrO,5:pOOQ!0Lb'#Eh'#EhOOQO,5;P,5;PO%[QlO,5;PO#)[Q!0LrO,5;PO#)gQ!0LrO,5;PO!BeQpO,5:pOOQO,5;V,5;VO#)uQ!0LrO,5;PPOOO'#I['#I[P#*ZO&2DjO,58|POOO,58|,58|OOOO-E<[-E<[OOQ!0Lh1G.p1G.pOOOO-E<]-E<]OOOO,59{,59{O#*fQ!bO,59{OOOO-E<_-E<_OOQ!0Lf1G/e1G/eO#*kQ!fO,5>|O+}QlO,5>|OOQO,5?S,5?SO#*uQlO'#IbOOQO-E<`-E<`O#+SQ`O,5@^O#+[Q!fO,5@^O#+cQ`O,5@lOOQ!0Lf1G/k1G/kO%[QlO,5@mO#+kQ`O'#IhOOQO-E<f-E<fO#+cQ`O,5@lOOQ!0Lb1G0v1G0vOOQ!0Ln1G/v1G/vOOQ!0Ln1G0W1G0WO%[QlO,5@jO#,PQ!0LrO,5@jO#,bQ!0LrO,5@jO#,iQ`O,5@iO9ZQ`O,5@iO#,qQ`O,5@iO#-PQ`O'#IkO#,iQ`O,5@iOOQ!0Lb1G0u1G0uO!(cQpO,5:sO!(nQpO,5:sOOQS,5:u,5:uO#-qQdO,5:uO#-yQMhO1G2xO9aQ`O1G2xOOQ!0Lf1G0s1G0sO#.XQ!0MxO1G0sO#/^Q!0MvO,5;TOOQ!0Lh'#GV'#GVO#/zQ!0MzO'#JjO!$fQlO1G0sO#2VQ!fO'#JuO%[QlO'#JuO#2aQ`O,5:cOOQ!0Lh'#D]'#D]OOQ!0Lf1G0|1G0|O%[QlO1G0|OOQ!0Lf1G1e1G1eO#2fQ`O1G0|O#4zQ!0MxO1G0}O#5RQ!0MxO1G0}O#7iQ!0MxO1G0}O#7pQ!0MxO1G0}O#:WQ!0MxO1G0}O#<nQ!0MxO1G0}O#<uQ!0MxO1G0}O#<|Q!0MxO1G0}O#?dQ!0MxO1G0}O#?kQ!0MxO1G0}O#AxQ?MtO'#CiO#CsQ?MtO1G1_O#CzQ?MtO'#JqO#D_Q!0MxO,5?YOOQ!0Lb-E<l-E<lO#FlQ!0MxO1G0}O#GiQ!0MzO1G0}OOQ!0Lf1G0}1G0}O#HlQMjO'#JzO#HvQ`O,5:vO#H{Q!0MxO1G1bO#IoQ,UO,5<VO#IwQ,UO,5<WO#JPQ,UO'#FnO#JhQ`O'#FmOOQO'#KW'#KWOOQO'#Il'#IlO#JmQ,UO1G1mOOQ!0Lf1G1m1G1mOOOW1G1x1G1xO#KOQ?MtO'#JpO#KYQ`O,5<aO!(yQlO,5<aOOOW-E<k-E<kOOQ!0Lf1G1k1G1kO#K_QpO'#KVOOQ!0Lf,5<c,5<cO#KgQpO,5<cO#KlQMhO'#DROOOO'#I`'#I`O#KsO#@ItO,59kOOQ!0Lh,59k,59kO%[QlO1G2OO!7{Q`O'#IpO#LOQ`O,5<yOOQ!0Lh,5<v,5<vO!+rQMhO'#IsO#LlQMjO,5=WO!+rQMhO'#IuO#M_QMjO,5=YO!&iQMhO,5=[OOQO1G2R1G2RO#MiQ!dO'#CrO#M|Q(CWO'#EpO$ RQpO'#GaO$ iQ!dO,5<rO$ pQ`O'#KYO9ZQ`O'#KYO$!OQ`O,5<tO!+rQMhO,5<sO$!TQ`O'#GYO$!fQ`O,5<sO$!kQ!dO'#GVO$!xQ!dO'#KZO$#SQ`O'#KZO!&iQMhO'#KZO$#XQ`O,5<wO$#^QlO'#JtO$#hQpO'#GbO##hQpO'#GbO$#yQ`O'#GfO!3^Q`O'#GjO$$OQ!0LrO'#IrO$$ZQpO,5<{OOQ!0Lp,5<{,5<{O$$bQpO'#GbO$$oQpO'#GcO$%QQpO'#GcO$%VQMjO,5=WO$%gQMjO,5=YOOQ!0Lh,5=],5=]O!+rQMhO,5@TO!+rQMhO,5@TO$%wQ`O'#IwO$&VQ`O,5@SO$&_Q`O,59aOOQ!0Lh,59g,59gO$'UQ$IYO,59sOOQ!0Lh'#Jn'#JnO$'wQMjO,5<jO$(jQMjO,5<lO@iQ`O,5<nOOQ!0Lh,5<o,5<oO$(tQ`O,5<uO$(yQMjO,5<zO$)ZQ`O,5@TO$)iQ`O'#J}O!$fQlO1G2QO$)nQ`O1G2QO9ZQ`O'#KQO9ZQ`O'#ErO%[QlO'#ErO9ZQ`O'#IyO$)sQ!0LrO,5@yOOQ[1G2|1G2|OOQ[1G4^1G4^OOQ!0Lf1G/z1G/zOOQ!0Lf1G/x1G/xO$+uQ!0MxO1G0SOOQ[1G2x1G2xO!&iQMhO1G2xO%[QlO1G2xO#-|Q`O1G2xO$-yQMhO'#EiOOQ!0Lb,5@R,5@RO$.WQ!0LrO,5@ROOQ[1G.u1G.uO!BYQ!0LrO1G.uO!BeQpO1G.uO!BmQMhO1G.uO$.iQ`O1G0sO$.nQ`O'#CiO$.yQ`O'#KcO$/RQ`O,5=zO$/WQ`O'#KcO$/]Q`O'#KcO$/kQ`O'#JPO$/yQ`O,5@|O$0RQ!fO1G1hOOQ!0Lf1G1j1G1jO9aQ`O1G3eO@iQ`O1G3eO$0YQ`O1G3eO$0_Q`O1G3eOOQ[1G3e1G3eO!DkQ`O1G3TO!&iQMhO1G3QO$0dQ`O1G3QOOQ[1G3R1G3RO!&iQMhO1G3RO$0iQ`O1G3RO$0qQpO'#HPOOQ[1G3T1G3TO!5|QpO'#I{O!DpQ!bO1G3WOOQ[1G3W1G3WOOQ[,5=q,5=qO$0yQMhO,5=sO9aQ`O,5=sO$#yQ`O,5=uO9UQ`O,5=uO!BeQpO,5=uO!BmQMhO,5=uO:YQMhO,5=uO$1XQ`O'#KaO$1dQ`O,5=vOOQ[1G.k1G.kO$1iQ!0LrO1G.kO@iQ`O1G.kO$1tQ`O1G.kO9kQ!0LrO1G.kO$3|Q!fO,5AOO$4ZQ`O,5AOO9ZQ`O,5AOO$4fQlO,5=}O$4mQ`O,5=}OOQ[1G3g1G3gO`QlO1G3gOOQ[1G3m1G3mOOQ[1G3o1G3oO>rQ`O1G3qO$4rQlO1G3sO$8vQlO'#HrOOQ[1G3v1G3vO$9TQ`O'#HxO>wQ`O'#HzOOQ[1G3|1G3|O$9]QlO1G3|O9kQ!0LrO1G4SOOQ[1G4U1G4UOOQ!0Lb'#G^'#G^O9kQ!0LrO1G4WO9kQ!0LrO1G4YO$=dQ`O,5@`O!(yQlO,5;^O9ZQ`O,5;^O>wQ`O,5:VO!(yQlO,5:VO!BeQpO,5:VO$=iQ?MtO,5:VOOQO,5;^,5;^O$=sQpO'#IcO$>ZQ`O,5@_OOQ!0Lf1G/p1G/pO$>cQpO'#IiO$>mQ`O,5@nOOQ!0Lb1G0w1G0wO##hQpO,5:VOOQO'#Ie'#IeO$>uQpO,5:oOOQ!0Ln,5:o,5:oO#'cQ`O1G0XOOQ!0Lf1G0X1G0XO%[QlO1G0XOOQ!0Lf1G0r1G0rO>wQ`O1G0rO!BeQpO1G0rO!BmQMhO1G0rOOQ!0Lb1G5z1G5zO!BYQ!0LrO1G0[OOQO1G0k1G0kO%[QlO1G0kO$>|Q!0LrO1G0kO$?XQ!0LrO1G0kO!BeQpO1G0[OCuQpO1G0[O$?gQ!0LrO1G0kOOQO1G0[1G0[O$?{Q!0MxO1G0kPOOO-E<Y-E<YPOOO1G.h1G.hOOOO1G/g1G/gO$@VQ!bO,5<hO$@_Q!fO1G4hOOQO1G4n1G4nO%[QlO,5>|O$@iQ`O1G5xO$@qQ`O1G6WO$@yQ!fO1G6XO9ZQ`O,5?SO$ATQ!0MxO1G6UO%[QlO1G6UO$AeQ!0LrO1G6UO$AvQ`O1G6TO$AvQ`O1G6TO9ZQ`O1G6TO$BOQ`O,5?VO9ZQ`O,5?VOOQO,5?V,5?VO$BdQ`O,5?VO$)iQ`O,5?VOOQO-E<i-E<iOOQS1G0_1G0_OOQS1G0a1G0aO#-tQ`O1G0aOOQ[7+(d7+(dO!&iQMhO7+(dO%[QlO7+(dO$BrQ`O7+(dO$B}QMhO7+(dO$C]Q!0MzO,5=WO$EhQ!0MzO,5=YO$GsQ!0MzO,5=WO$JUQ!0MzO,5=YO$LgQ!0MzO,59sO$NlQ!0MzO,5<jO%!wQ!0MzO,5<lO%%SQ!0MzO,5<zOOQ!0Lf7+&_7+&_O%'eQ!0MxO7+&_O%(XQlO'#IdO%(fQ`O,5@aO%(nQ!fO,5@aOOQ!0Lf1G/}1G/}O%(xQ`O7+&hOOQ!0Lf7+&h7+&hO%(}Q?MtO,5:dO%[QlO7+&yO%)XQ?MtO,5:`O%)fQ?MtO,5:hO%)pQ?MtO,5:jO%)zQMhO'#IgO%*UQ`O,5@fOOQ!0Lh1G0b1G0bOOQO1G1q1G1qOOQO1G1r1G1rO%*^Q!jO,5<YO!(yQlO,5<XOOQO-E<j-E<jOOQ!0Lf7+'X7+'XOOOW7+'d7+'dOOOW1G1{1G1{O%*iQ`O1G1{OOQ!0Lf1G1}1G1}OOOO,59m,59mO%*nQ!dO,59mOOOO-E<^-E<^OOQ!0Lh1G/V1G/VO%*uQ!0MxO7+'jOOQ!0Lh,5?[,5?[O%+iQMhO1G2eP%+pQ`O'#IpPOQ!0Lh-E<n-E<nO%,^QMjO,5?_OOQ!0Lh-E<q-E<qO%-PQMjO,5?aOOQ!0Lh-E<s-E<sO%-ZQ!dO1G2vO%-bQ!dO'#CrO%-xQMhO'#KQO$#^QlO'#JtOOQ!0Lh1G2^1G2^O%.PQ`O'#IoO%.eQ`O,5@tO%.eQ`O,5@tO%.mQ`O,5@tO%.xQ`O,5@tOOQO1G2`1G2`O%/WQMjO1G2_O!+rQMhO1G2_O%/hQ(CWO'#IqO%/uQ`O,5@uO!&iQMhO,5@uO%/}Q!dO,5@uOOQ!0Lh1G2c1G2cO%2_Q!fO'#CiO%2iQ`O,5=OOOQ!0Lb,5<|,5<|O%2qQpO,5<|OOQ!0Lb,5<},5<}OCfQ`O,5<|O%2|QpO,5<|OOQ!0Lb,5=Q,5=QO$)iQ`O,5=UOOQO,5?^,5?^OOQO-E<p-E<pOOQ!0Lp1G2g1G2gO##hQpO,5<|O$#^QlO,5=OO%3[Q`O,5<}O%3gQpO,5<}O!+rQMhO'#IsO%4aQMjO1G2rO!+rQMhO'#IuO%5SQMjO1G2tO%5^QMjO1G5oO%5hQMjO1G5oOOQO,5?c,5?cOOQO-E<u-E<uOOQO1G.{1G.{O!9lQpO,59uO%[QlO,59uOOQ!0Lh,5<i,5<iO%5uQ`O1G2YO!+rQMhO1G2aO!+rQMhO1G5oO!+rQMhO1G5oO%5zQ!0MxO7+'lOOQ!0Lf7+'l7+'lO!$fQlO7+'lO%6nQ`O,5;^OOQ!0Lb,5?e,5?eOOQ!0Lb-E<w-E<wO%6sQ!dO'#K[O#'cQ`O7+(dO4UQ!fO7+(dO$BuQ`O7+(dO%6}Q!0MvO'#CiO%7nQ!0LrO,5=RO%8PQ!0MvO,5=RO%8dQ`O,5=ROOQ!0Lb1G5m1G5mOOQ[7+$a7+$aO!BYQ!0LrO7+$aO!BeQpO7+$aO!$fQlO7+&_O%8lQ`O'#JOO%9TQ`O,5@}OOQO1G3f1G3fO9aQ`O,5@}O%9TQ`O,5@}O%9]Q`O,5@}OOQO,5?k,5?kOOQO-E<}-E<}OOQ!0Lf7+'S7+'SO%9bQ`O7+)PO9kQ!0LrO7+)PO9aQ`O7+)PO@iQ`O7+)POOQ[7+(o7+(oO%9gQ!0MvO7+(lO!&iQMhO7+(lO!DfQ`O7+(mOOQ[7+(m7+(mO!&iQMhO7+(mO%9qQ`O'#K`O%9|Q`O,5=kOOQO,5?g,5?gOOQO-E<y-E<yOOQ[7+(r7+(rO%;`QpO'#HYOOQ[1G3_1G3_O!&iQMhO1G3_O%[QlO1G3_O%;gQ`O1G3_O%;rQMhO1G3_O9kQ!0LrO1G3aO$#yQ`O1G3aO9UQ`O1G3aO!BeQpO1G3aO!BmQMhO1G3aO%<QQ`O'#I}O%<fQ`O,5@{O%<nQpO,5@{OOQ!0Lb1G3b1G3bOOQ[7+$V7+$VO@iQ`O7+$VO9kQ!0LrO7+$VO%<yQ`O7+$VO%[QlO1G6jO%[QlO1G6kO%=OQ!0LrO1G6jO%=YQlO1G3iO%=aQ`O1G3iO%=fQlO1G3iOOQ[7+)R7+)RO9kQ!0LrO7+)]O`QlO7+)_OOQ['#Kf'#KfOOQ['#JQ'#JQO%=mQlO,5>^OOQ[,5>^,5>^O%[QlO'#HsO%=zQ`O'#HuOOQ[,5>d,5>dO9ZQ`O,5>dOOQ[,5>f,5>fOOQ[7+)h7+)hOOQ[7+)n7+)nOOQ[7+)r7+)rOOQ[7+)t7+)tO%>PQpO1G5zO%>kQ?MtO1G0xO%>uQ`O1G0xOOQO1G/q1G/qO%?QQ?MtO1G/qO>wQ`O1G/qO!(yQlO'#DkOOQO,5>},5>}OOQO-E<a-E<aOOQO,5?T,5?TOOQO-E<g-E<gO!BeQpO1G/qOOQO-E<c-E<cOOQ!0Ln1G0Z1G0ZOOQ!0Lf7+%s7+%sO#'cQ`O7+%sOOQ!0Lf7+&^7+&^O>wQ`O7+&^O!BeQpO7+&^OOQO7+%v7+%vO$?{Q!0MxO7+&VOOQO7+&V7+&VO%[QlO7+&VO%?[Q!0LrO7+&VO!BYQ!0LrO7+%vO!BeQpO7+%vO%?gQ!0LrO7+&VO%?uQ!0MxO7++pO%[QlO7++pO%@VQ`O7++oO%@VQ`O7++oOOQO1G4q1G4qO9ZQ`O1G4qO%@_Q`O1G4qOOQS7+%{7+%{O#'cQ`O<<LOO4UQ!fO<<LOO%@mQ`O<<LOOOQ[<<LO<<LOO!&iQMhO<<LOO%[QlO<<LOO%@uQ`O<<LOO%AQQ!0MzO,5?_O%C]Q!0MzO,5?aO%EhQ!0MzO1G2_O%GyQ!0MzO1G2rO%JUQ!0MzO1G2tO%LaQ!fO,5?OO%[QlO,5?OOOQO-E<b-E<bO%LkQ`O1G5{OOQ!0Lf<<JS<<JSO%LsQ?MtO1G0sO%NzQ?MtO1G0}O& RQ?MtO1G0}O&#SQ?MtO1G0}O&#ZQ?MtO1G0}O&%[Q?MtO1G0}O&']Q?MtO1G0}O&'dQ?MtO1G0}O&'kQ?MtO1G0}O&)lQ?MtO1G0}O&)sQ?MtO1G0}O&)zQ!0MxO<<JeO&+rQ?MtO1G0}O&,oQ?MvO1G0}O&-rQ?MvO'#JjO&/xQ?MtO1G1bO&0VQ?MtO1G0SO&0aQMjO,5?ROOQO-E<e-E<eO!(yQlO'#FpOOQO'#KX'#KXOOQO1G1t1G1tO&0kQ`O1G1sO&0pQ?MtO,5?YOOOW7+'g7+'gOOOO1G/X1G/XO&0zQ!dO1G4vOOQ!0Lh7+(P7+(PP!&iQMhO,5?[O!+rQMhO7+(bO&1RQ`O,5?ZO9ZQ`O,5?ZOOQO-E<m-E<mO&1aQ`O1G6`O&1aQ`O1G6`O&1iQ`O1G6`O&1tQMjO7+'yO&2UQ!dO,5?]O&2`Q`O,5?]O!&iQMhO,5?]OOQO-E<o-E<oO&2eQ!dO1G6aO&2oQ`O1G6aO&2wQ`O1G2jO!&iQMhO1G2jOOQ!0Lb1G2h1G2hOOQ!0Lb1G2i1G2iO%2qQpO1G2hO!BeQpO1G2hOCfQ`O1G2hOOQ!0Lb1G2p1G2pO&2|QpO1G2hO&3[Q`O1G2jO$)iQ`O1G2iOCfQ`O1G2iO$#^QlO1G2jO&3dQ`O1G2iO&4WQMjO,5?_OOQ!0Lh-E<r-E<rO&4yQMjO,5?aOOQ!0Lh-E<t-E<tO!+rQMhO7++ZOOQ!0Lh1G/a1G/aO&5TQ`O1G/aOOQ!0Lh7+'t7+'tO&5YQMjO7+'{O&5jQMjO7++ZO&5tQMjO7++ZO&6RQ!0MxO<<KWOOQ!0Lf<<KW<<KWO&6uQ`O1G0xO!&iQMhO'#IxO&6zQ`O,5@vO&8|Q!fO<<LOO!&iQMhO1G2mO&9TQ!0LrO1G2mOOQ[<<G{<<G{O!BYQ!0LrO<<G{O&9fQ!0MxO<<IyOOQ!0Lf<<Iy<<IyOOQO,5?j,5?jO&:YQ`O,5?jO&:_Q`O,5?jOOQO-E<|-E<|O&:mQ`O1G6iO&:mQ`O1G6iO9aQ`O1G6iO@iQ`O<<LkOOQ[<<Lk<<LkO&:uQ`O<<LkO9kQ!0LrO<<LkOOQ[<<LW<<LWO%9gQ!0MvO<<LWOOQ[<<LX<<LXO!DfQ`O<<LXO&:zQpO'#IzO&;VQ`O,5@zO!(yQlO,5@zOOQ[1G3V1G3VOOQO'#I|'#I|O9kQ!0LrO'#I|O&;_QpO,5=tOOQ[,5=t,5=tO&;fQpO'#EeO&;mQpO'#GdO&;rQ`O7+(yO&;wQ`O7+(yOOQ[7+(y7+(yO!&iQMhO7+(yO%[QlO7+(yO&<PQ`O7+(yOOQ[7+({7+({O9kQ!0LrO7+({O$#yQ`O7+({O9UQ`O7+({O!BeQpO7+({O&<[Q`O,5?iOOQO-E<{-E<{OOQO'#H]'#H]O&<gQ`O1G6gO9kQ!0LrO<<GqOOQ[<<Gq<<GqO@iQ`O<<GqO&<oQ`O7+,UO&<tQ`O7+,VO%[QlO7+,UO%[QlO7+,VOOQ[7+)T7+)TO&<yQ`O7+)TO&=OQlO7+)TO&=VQ`O7+)TOOQ[<<Lw<<LwOOQ[<<Ly<<LyOOQ[-E=O-E=OOOQ[1G3x1G3xO&=[Q`O,5>_OOQ[,5>a,5>aO&=aQ`O1G4OO9ZQ`O7+&dO!(yQlO7+&dOOQO7+%]7+%]O&=fQ?MtO1G6XO>wQ`O7+%]OOQ!0Lf<<I_<<I_OOQ!0Lf<<Ix<<IxO>wQ`O<<IxOOQO<<Iq<<IqO$?{Q!0MxO<<IqO%[QlO<<IqOOQO<<Ib<<IbO!BYQ!0LrO<<IbO&=pQ!0LrO<<IqO&={Q!0MxO<= [O&>]Q`O<= ZOOQO7+*]7+*]O9ZQ`O7+*]OOQ[ANAjANAjO&>eQ!fOANAjO!&iQMhOANAjO#'cQ`OANAjO4UQ!fOANAjO&>lQ`OANAjO%[QlOANAjO&>tQ!0MzO7+'yO&AVQ!0MzO,5?_O&CbQ!0MzO,5?aO&EmQ!0MzO7+'{O&HOQ!fO1G4jO&HYQ?MtO7+&_O&J^Q?MvO,5=WO&LeQ?MvO,5=YO&LuQ?MvO,5=WO&MVQ?MvO,5=YO&MgQ?MvO,59sO' mQ?MvO,5<jO'#pQ?MvO,5<lO'&UQ?MvO,5<zO''zQ?MtO7+'jO'(XQ?MtO7+'lO'(fQ`O,5<[OOQO7+'_7+'_OOQ!0Lh7+*b7+*bO'(kQMjO<<K|OOQO1G4u1G4uO'(rQ`O1G4uO'(}Q`O1G4uO')]Q`O7++zO')]Q`O7++zO!&iQMhO1G4wO')eQ!dO1G4wO')oQ`O7++{O')wQ`O7+(UO'*SQ!dO7+(UOOQ!0Lb7+(S7+(SOOQ!0Lb7+(T7+(TO!BeQpO7+(SOCfQ`O7+(SO'*^Q`O7+(UO!&iQMhO7+(UO$)iQ`O7+(TO'*cQ`O7+(UOCfQ`O7+(TO'*kQMjO<<NuOOQ!0Lh7+${7+${O!+rQMhO<<NuO'*uQ!dO,5?dOOQO-E<v-E<vO'+PQ!0MvO7+(XO!&iQMhO7+(XOOQ[AN=gAN=gO9aQ`O1G5UOOQO1G5U1G5UO'+aQ`O1G5UO'+fQ`O7+,TO'+fQ`O7+,TO9kQ!0LrOANBVO@iQ`OANBVOOQ[ANBVANBVOOQ[ANArANArOOQ[ANAsANAsO'+nQ`O,5?fOOQO-E<x-E<xO'+yQ?MtO1G6fOOQO,5?h,5?hOOQO-E<z-E<zOOQ[1G3`1G3`O',TQ`O,5=OOOQ[<<Le<<LeO!&iQMhO<<LeO&;rQ`O<<LeO',YQ`O<<LeO%[QlO<<LeOOQ[<<Lg<<LgO9kQ!0LrO<<LgO$#yQ`O<<LgO9UQ`O<<LgO',bQpO1G5TO',mQ`O7+,ROOQ[AN=]AN=]O9kQ!0LrOAN=]OOQ[<= p<= pOOQ[<= q<= qO',uQ`O<= pO',zQ`O<= qOOQ[<<Lo<<LoO'-PQ`O<<LoO'-UQlO<<LoOOQ[1G3y1G3yO>wQ`O7+)jO'-]Q`O<<JOO'-hQ?MtO<<JOOOQO<<Hw<<HwOOQ!0LfAN?dAN?dOOQOAN?]AN?]O$?{Q!0MxOAN?]OOQOAN>|AN>|O%[QlOAN?]OOQO<<Mw<<MwOOQ[G27UG27UO!&iQMhOG27UO#'cQ`OG27UO'-rQ!fOG27UO4UQ!fOG27UO'-yQ`OG27UO'.RQ?MtO<<JeO'.`Q?MvO1G2_O'0UQ?MvO,5?_O'2XQ?MvO,5?aO'4[Q?MvO1G2rO'6_Q?MvO1G2tO'8bQ?MtO<<KWO'8oQ?MtO<<IyOOQO1G1v1G1vO!+rQMhOANAhOOQO7+*a7+*aO'8|Q`O7+*aO'9XQ`O<= fO'9aQ!dO7+*cOOQ!0Lb<<Kp<<KpO$)iQ`O<<KpOCfQ`O<<KpO'9kQ`O<<KpO!&iQMhO<<KpOOQ!0Lb<<Kn<<KnO!BeQpO<<KnO'9vQ!dO<<KpOOQ!0Lb<<Ko<<KoO':QQ`O<<KpO!&iQMhO<<KpO$)iQ`O<<KoO':VQMjOANDaO':aQ!0MvO<<KsOOQO7+*p7+*pO9aQ`O7+*pO':qQ`O<= oOOQ[G27qG27qO9kQ!0LrOG27qO!(yQlO1G5QO':yQ`O7+,QO';RQ`O1G2jO&;rQ`OANBPOOQ[ANBPANBPO!&iQMhOANBPO';WQ`OANBPOOQ[ANBRANBRO9kQ!0LrOANBRO$#yQ`OANBROOQO'#H^'#H^OOQO7+*o7+*oOOQ[G22wG22wOOQ[ANE[ANE[OOQ[ANE]ANE]OOQ[ANBZANBZO';`Q`OANBZOOQ[<<MU<<MUO!(yQlOAN?jOOQOG24wG24wO$?{Q!0MxOG24wO#'cQ`OLD,pOOQ[LD,pLD,pO!&iQMhOLD,pO';eQ!fOLD,pO';lQ?MvO7+'yO'=bQ?MvO,5?_O'?eQ?MvO,5?aO'AhQ?MvO7+'{O'C^QMjOG27SOOQO<<M{<<M{OOQ!0LbANA[ANA[O$)iQ`OANA[OCfQ`OANA[O'CnQ!dOANA[OOQ!0LbANAYANAYO'CuQ`OANA[O!&iQMhOANA[O'DQQ!dOANA[OOQ!0LbANAZANAZOOQO<<N[<<N[OOQ[LD-]LD-]O'D[Q?MtO7+*lOOQO'#Ge'#GeOOQ[G27kG27kO&;rQ`OG27kO!&iQMhOG27kOOQ[G27mG27mO9kQ!0LrOG27mOOQ[G27uG27uO'DfQ?MtOG25UOOQOLD*cLD*cOOQ[!$(![!$(![O#'cQ`O!$(![O!&iQMhO!$(![O'DpQ!0MzOG27SOOQ!0LbG26vG26vO$)iQ`OG26vO'GRQ`OG26vOCfQ`OG26vO'G^Q!dOG26vO!&iQMhOG26vOOQ[LD-VLD-VO&;rQ`OLD-VOOQ[LD-XLD-XOOQ[!)9Ev!)9EvO#'cQ`O!)9EvOOQ!0LbLD,bLD,bO$)iQ`OLD,bOCfQ`OLD,bO'GeQ`OLD,bO'GpQ!dOLD,bOOQ[!$(!q!$(!qOOQ[!.K;b!.K;bO'GwQ?MvOG27SOOQ!0Lb!$( |!$( |O$)iQ`O!$( |OCfQ`O!$( |O'ImQ`O!$( |OOQ!0Lb!)9Eh!)9EhO$)iQ`O!)9EhOCfQ`O!)9EhOOQ!0Lb!.K;S!.K;SO$)iQ`O!.K;SOOQ!0Lb!4/0n!4/0nO!(yQlO'#DxO1PQ`O'#EVO'IxQ!fO'#JpO'JPQ!L^O'#DtO'JWQlO'#D|O'J_Q!fO'#CiO'LuQ!fO'#CiO!(yQlO'#EOO'MVQlO,5;XO!(yQlO,5;cO!(yQlO,5;cO!(yQlO,5;cO!(yQlO,5;cO!(yQlO,5;cO!(yQlO,5;cO!(yQlO,5;cO!(yQlO,5;cO!(yQlO,5;cO!(yQlO,5;cO!(yQlO'#InO( YQ`O,5<hO!(yQlO,5;cO( bQMhO,5;cO(!{QMhO,5;cO!(yQlO,5;vO!&iQMhO'#GlO( bQMhO'#GlO!&iQMhO'#GnO( bQMhO'#GnO1SQ`O'#DXO1SQ`O'#DXO!&iQMhO'#GOO( bQMhO'#GOO!&iQMhO'#GQO( bQMhO'#GQO!&iQMhO'#G`O( bQMhO'#G`O!(yQlO,5:hO(#SQpO'#D]O(#^QpO'#JtO!(yQlO,5@mO'MVQlO1G0sO(#hQ?MtO'#CiO!(yQlO1G2OO!&iQMhO'#IsO( bQMhO'#IsO!&iQMhO'#IuO( bQMhO'#IuO(#rQ!dO'#CrO!&iQMhO,5<sO( bQMhO,5<sO'MVQlO1G2QO!(yQlO7+&yO!&iQMhO1G2_O( bQMhO1G2_O!&iQMhO'#IsO( bQMhO'#IsO!&iQMhO'#IuO( bQMhO'#IuO!&iQMhO1G2aO( bQMhO1G2aO'MVQlO7+'lO'MVQlO7+&_O!&iQMhOANAhO( bQMhOANAhO($VQ`O'#EmO($[Q`O'#EmO($dQ`O'#F[O($iQ`O'#EwO($nQ`O'#KRO($yQ`O'#KPO(%UQ`O,5;XO(%ZQMjO,5<dO(%bQ`O'#GXO(%gQ`O'#GXO(%lQ`O,5<fO(%tQ`O,5;XO(%|Q?MtO1G1_O(&TQ`O,5<sO(&YQ`O,5<sO(&_Q`O,5<uO(&dQ`O,5<uO(&iQ`O1G2QO(&nQ`O1G0sO(&sQMjO<<K|O(&zQMjO<<K|O7eQMhO'#F{O9UQ`O'#FzOAdQ`O'#ElO!(yQlO,5;sO!3^Q`O'#GXO!3^Q`O'#GXO!3^Q`O'#GZO!3^Q`O'#GZO!+rQMhO7+(bO!+rQMhO7+(bO%-ZQ!dO1G2vO%-ZQ!dO1G2vO!&iQMhO,5=[O!&iQMhO,5=[",stateData:"((P~O'zOS'{OSTOS'|RQ~OPYOQYOSfOY!VOaqOdzOeyOj!POnkOpYOqkOrkOxkOzYO|YO!QWO!UkO!VkO!]XO!guO!jZO!mYO!nYO!oYO!qvO!swO!vxO!z]O$V|O$miO%g}O%i!QO%k!OO%l!OO%m!OO%p!RO%r!SO%u!TO%v!TO%x!UO&U!WO&[!XO&^!YO&`!ZO&b![O&e!]O&k!^O&q!_O&s!`O&u!aO&w!bO&y!cO(RSO(TTO(WUO(_VO(m[O~OWtO~P`OPYOQYOSfOd!jOe!iOnkOpYOqkOrkOxkOzYO|YO!QWO!UkO!VkO!]!eO!guO!jZO!mYO!nYO!oYO!qvO!s!gO!v!hO$V!kO$miO(R!dO(TTO(WUO(_VO(m[O~Oa!wOq!nO!Q!oO!`!yO!a!vO!b!vO!z;wO#R!pO#S!pO#T!xO#U!pO#V!pO#Y!zO#Z!zO(S!lO(TTO(WUO(c!mO(m!sO~O'|!{O~OP]XR]X[]Xa]Xp]X!O]X!Q]X!Z]X!j]X!n]X#P]X#Q]X#^]X#ifX#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#w]X#y]X#z]X$P]X'x]X(_]X(p]X(w]X(x]X~O!e%QX~P(qO_!}O(T#PO(U!}O(V#PO~O_#QO(V#PO(W#PO(X#QO~Ov#SO!S#TO(`#TO(a#VO~OPYOQYOSfOd!jOe!iOnkOpYOqkOrkOxkOzYO|YO!QWO!UkO!VkO!]!eO!guO!jZO!mYO!nYO!oYO!qvO!s!gO!v!hO$V!kO$miO(R;{O(TTO(WUO(_VO(m[O~O!Y#ZO!Z#WO!W(fP!W(tP~P+}O![#cO~P`OPYOQYOSfOd!jOe!iOpYOqkOrkOxkOzYO|YO!QWO!UkO!VkO!]!eO!guO!jZO!mYO!nYO!oYO!qvO!s!gO!v!hO$V!kO$miO(TTO(WUO(_VO(m[O~On#mO!Y#iO!z]O#g#lO#h#iO(R;|O!i(qP~P.iO!j#oO(R#nO~O!v#sO!z]O%g#tO~O#i#uO~O!e#vO#i#uO~OP$[OR#zO[$cOp$aO!O#yO!Q#{O!Z$_O!j#xO!n$[O#P$RO#l$OO#m$PO#n$PO#o$PO#p$QO#q$RO#r$RO#s$bO#t$RO#u$SO#w$UO#y$WO#z$XO(_VO(p$YO(w#|O(x#}O~Oa(dX'x(dX'u(dX!i(dX!W(dX!](dX%h(dX!e(dX~P1qO#Q$dO#^$eO$P$eOP(eXR(eX[(eXp(eX!O(eX!Q(eX!Z(eX!j(eX!n(eX#P(eX#l(eX#m(eX#n(eX#o(eX#p(eX#q(eX#r(eX#s(eX#t(eX#u(eX#w(eX#y(eX#z(eX(_(eX(p(eX(w(eX(x(eX!](eX%h(eX~Oa(eX'x(eX'u(eX!W(eX!i(eXt(eX!e(eX~P4UO#^$eO~O$[$hO$^$gO$e$mO~OSfO!]$nO$h$oO$j$qO~Oh%VOj%cOn%WOp%XOq$tOr$tOx%YOz%ZO|%[O!Q${O!]$|O!g%aO!j$xO#h%bO$V%_O$s%]O$u%^O$x%`O(R$sO(TTO(WUO(_$uO(w$}O(x%POg([P~O!j%dO~O!Q%gO!]%hO(R%fO~O!e%lO~Oa%mO'x%mO~O!O%qO~P%[O(S!lO~P%[O%m%uO~P%[Oh%VO!j%dO(R%fO(S!lO~Oe%|O!j%dO(R%fO~O#t$RO~O!O&RO!]&OO!j&QO%i&UO(R%fO(S!lO(TTO(WUO`)UP~O!v#sO~O%r&WO!Q)QX!])QX(R)QX~O(R&XO~Oj!PO!s&^O%i!QO%k!OO%l!OO%m!OO%p!RO%r!SO%u!TO%v!TO~Od&cOe&bO!v&`O%g&aO%z&_O~P<POd&fOeyOj!PO!]&eO!s&^O!vxO!z]O%g}O%k!OO%l!OO%m!OO%p!RO%r!SO%u!TO%v!TO%x!UO~Ob&iO#^&lO%i&gO(S!lO~P=UO!j&mO!s&qO~O!j#oO~O!]XO~Oa%mO'v&yO'x%mO~Oa%mO'v&|O'x%mO~Oa%mO'v'OO'x%mO~O'u]X!W]Xt]X!i]X&Y]X!]]X%h]X!e]X~P(qO!`']O!a'UO!b'UO(S!lO(TTO(WUO~Oq'SO!Q'RO!Y'VO(c'QO![(gP![(vP~P@]Ol'`O!]'^O(R%fO~Oe'eO!j%dO(R%fO~O!O&RO!j&QO~Oq!nO!Q!oO!z;wO#R!pO#S!pO#U!pO#V!pO(S!lO(TTO(WUO(c!mO(m!sO~O!`'kO!a'jO!b'jO#T!pO#Y'lO#Z'lO~PAwOa%mOh%VO!e#vO!j%dO'x%mO(p'nO~O!n'rO#^'pO~PCVOq!nO!Q!oO(TTO(WUO(c!mO(m!sO~O!]XOq(kX!Q(kX!`(kX!a(kX!b(kX!z(kX#R(kX#S(kX#T(kX#U(kX#V(kX#Y(kX#Z(kX(S(kX(T(kX(W(kX(c(kX(m(kX~O!a'jO!b'jO(S!lO~PCuO'}'vO(O'vO(P'xO~O_!}O(T'zO(U!}O(V'zO~O_#QO(V'zO(W'zO(X#QO~Ot'|O~P%[Ov#SO!S#TO(`#TO(a(PO~O!Y(RO!W'UX!W'[X!Z'UX!Z'[X~P+}O!Z(TO!W(fX~OP$[OR#zO[$cOp$aO!O#yO!Q#{O!Z(TO!j#xO!n$[O#P$RO#l$OO#m$PO#n$PO#o$PO#p$QO#q$RO#r$RO#s$bO#t$RO#u$SO#w$UO#y$WO#z$XO(_VO(p$YO(w#|O(x#}O~O!W(fX~PGpO!W(YO~O!W(sX!Z(sX!e(sX!i(sX(p(sX~O#^(sX#i#bX![(sX~PIsO#^(ZO!W(uX!Z(uX~O!Z([O!W(tX~O!W(_O~O#^$eO~PIsO![(`O~P`OR#zO!O#yO!Q#{O!j#xO(_VOP!la[!lap!la!Z!la!n!la#P!la#l!la#m!la#n!la#o!la#p!la#q!la#r!la#s!la#t!la#u!la#w!la#y!la#z!la(p!la(w!la(x!la~Oa!la'x!la'u!la!W!la!i!lat!la!]!la%h!la!e!la~PKZO!i(aO~O!e#vO#^(bO(p'nO!Z(rXa(rX'x(rX~O!i(rX~PMvO!Q%gO!]%hO!z]O#g(gO#h(fO(R%fO~O!Z(hO!i(qX~O!i(jO~O!Q%gO!]%hO#h(fO(R%fO~OP(eXR(eX[(eXp(eX!O(eX!Q(eX!Z(eX!j(eX!n(eX#P(eX#l(eX#m(eX#n(eX#o(eX#p(eX#q(eX#r(eX#s(eX#t(eX#u(eX#w(eX#y(eX#z(eX(_(eX(p(eX(w(eX(x(eX~O!e#vO!i(eX~P! dOR(lO!O(kO!j#xO#Q$dO!z!ya!Q!ya~O!v!ya%g!ya!]!ya#g!ya#h!ya(R!ya~P!#eO!v(pO~OPYOQYOSfOd!jOe!iOnkOpYOqkOrkOxkOzYO|YO!QWO!UkO!VkO!]XO!guO!jZO!mYO!nYO!oYO!qvO!s!gO!v!hO$V!kO$miO(R!dO(TTO(WUO(_VO(m[O~Oh%VOn%WOp%XOq$tOr$tOx%YOz%ZO|<eO!Q${O!]$|O!g=vO!j$xO#h<kO$V%_O$s<gO$u<iO$x%`O(R(tO(TTO(WUO(_$uO(w$}O(x%PO~O#i(vO~O!Y(xO!i(iP~P%[O(c(zO(m[O~O!Q(|O!j#xO(c(zO(m[O~OP;vOQ;vOSfOd=rOe!iOnkOp;vOqkOrkOxkOz;vO|;vO!QWO!UkO!VkO!]!eO!g;yO!jZO!m;vO!n;vO!o;vO!q;zO!s;}O!v!hO$V!kO$m=pO(R)ZO(TTO(WUO(_VO(m[O~O!Z$_Oa$pa'x$pa'u$pa!i$pa!W$pa!]$pa%h$pa!e$pa~Oj)bO~P!&iOh%VOn%WOp%XOq$tOr$tOx%YOz%ZO|%[O!Q${O!]$|O!g%aO!j$xO#h%bO$V%_O$s%]O$u%^O$x%`O(R(tO(TTO(WUO(_$uO(w$}O(x%PO~Og(nP~P!+rO!O)gO!e)fO!]$]X$Y$]X$[$]X$^$]X$e$]X~O!e)fO!](yX$Y(yX$[(yX$^(yX$e(yX~O!O)gO~P!-{O!O)gO!](yX$Y(yX$[(yX$^(yX$e(yX~O!])iO$Y)mO$[)hO$^)hO$e)nO~O!Y)qO~P!(yO$[$hO$^$gO$e)uO~Ol$yX!O$yX#Q$yX'w$yX(w$yX(x$yX~OgkXg$yXlkX!ZkX#^kX~P!/qOv)wO(`)xO(a)zO~Ol*TO!O)|O'w)}O(w$}O(x%PO~Og){O~P!0uOg*UO~Oh%VOn%WOp%XOq$tOr$tOx%YOz%ZO|<eO!Q*WO!]*XO!g=vO!j$xO#h<kO$V%_O$s<gO$u<iO$x%`O(TTO(WUO(_$uO(w$}O(x%PO~O!Y*[O(R*VO!i(|P~P!1dO#i*^O~O!j*_O~Oh%VOn%WOp%XOq$tOr$tOx%YOz%ZO|<eO!Q${O!]$|O!g=vO!j$xO#h<kO$V%_O$s<gO$u<iO$x%`O(R*aO(TTO(WUO(_$uO(w$}O(x%PO~O!Y*dO!W(}P~P!3cOp*pOq!nO!Q*fO!`*nO!a*hO!b*hO!j*_O#Y*oO%_*jO(S!lO(TTO(WUO(c!mO~O![*mO~P!5WO#Q$dOl(^X!O(^X'w(^X(w(^X(x(^X!Z(^X#^(^X~Og(^X#}(^X~P!6YOl*uO#^*tOg(]X!Z(]X~O!Z*vOg([X~Oj%cO(R&XOg([P~Oq*yO~O!j+OO~O(R(tO~On+TO!Q%gO!Y#iO!]%hO!z]O#g#lO#h#iO(R%fO!i(qP~O!e#vO#i+UO~O!Q%gO!Y+WO!Z([O!]%hO(R%fO!W(tP~Oq'YO!Q+YO!Y+XO(TTO(WUO(c(zO~O![(vP~P!9]O!Z+ZOa)RX'x)RX~OP$[OR#zO[$cOp$aO!O#yO!Q#{O!j#xO!n$[O#P$RO#l$OO#m$PO#n$PO#o$PO#p$QO#q$RO#r$RO#s$bO#t$RO#u$SO#w$UO#y$WO#z$XO(_VO(p$YO(w#|O(x#}O~Oa!ha!Z!ha'x!ha'u!ha!W!ha!i!hat!ha!]!ha%h!ha!e!ha~P!:TOR#zO!O#yO!Q#{O!j#xO(_VOP!pa[!pap!pa!Z!pa!n!pa#P!pa#l!pa#m!pa#n!pa#o!pa#p!pa#q!pa#r!pa#s!pa#t!pa#u!pa#w!pa#y!pa#z!pa(p!pa(w!pa(x!pa~Oa!pa'x!pa'u!pa!W!pa!i!pat!pa!]!pa%h!pa!e!pa~P!<kOR#zO!O#yO!Q#{O!j#xO(_VOP!ra[!rap!ra!Z!ra!n!ra#P!ra#l!ra#m!ra#n!ra#o!ra#p!ra#q!ra#r!ra#s!ra#t!ra#u!ra#w!ra#y!ra#z!ra(p!ra(w!ra(x!ra~Oa!ra'x!ra'u!ra!W!ra!i!rat!ra!]!ra%h!ra!e!ra~P!?ROh%VOl+dO!]'^O%h+cO~O!e+fOa(ZX!](ZX'x(ZX!Z(ZX~Oa%mO!]XO'x%mO~Oh%VO!j%dO~Oh%VO!j%dO(R%fO~O!e#vO#i(vO~Ob+qO%i+rO(R+nO(TTO(WUO![)VP~O!Z+sO`)UX~O[+wO~O`+xO~O!]&OO(R%fO(S!lO`)UP~Oh%VO#^+}O~Oh%VOl,QO!]$|O~O!],SO~O!O,UO!]XO~O%m%uO~O!v,ZO~Oe,`O~Ob,aO(R#nO(TTO(WUO![)TP~Oe%|O~O%i!QO(R&XO~P=UO[,fO`,eO~OPYOQYOSfOdzOeyOnkOpYOqkOrkOxkOzYO|YO!QWO!UkO!VkO!guO!jZO!mYO!nYO!oYO!qvO!vxO!z]O$miO%g}O(TTO(WUO(_VO(m[O~O!]!eO!s!gO$V!kO(R!dO~P!FRO`,eOa%mO'x%mO~OPYOQYOSfOd!jOe!iOnkOpYOqkOrkOxkOzYO|YO!QWO!UkO!VkO!]!eO!guO!jZO!mYO!nYO!oYO!qvO!v!hO$V!kO$miO(R!dO(TTO(WUO(_VO(m[O~Oa,kOj!OO!swO%k!OO%l!OO%m!OO~P!HkO!j&mO~O&[,qO~O!],sO~O&m,uO&o,vOP&jaQ&jaS&jaY&jaa&jad&jae&jaj&jan&jap&jaq&jar&jax&jaz&ja|&ja!Q&ja!U&ja!V&ja!]&ja!g&ja!j&ja!m&ja!n&ja!o&ja!q&ja!s&ja!v&ja!z&ja$V&ja$m&ja%g&ja%i&ja%k&ja%l&ja%m&ja%p&ja%r&ja%u&ja%v&ja%x&ja&U&ja&[&ja&^&ja&`&ja&b&ja&e&ja&k&ja&q&ja&s&ja&u&ja&w&ja&y&ja'u&ja(R&ja(T&ja(W&ja(_&ja(m&ja![&ja&c&jab&ja&h&ja~O(R,{O~Oh!cX!Z!PX![!PX!e!PX!e!cX!j!cX#^!PX~O!Z!cX![!cX~P# qO!e-QO#^-POh(hX!Z#fX![#fX!e(hX!j(hX~O!Z(hX![(hX~P#!dOh%VO!e-SO!j%dO!Z!_X![!_X~Oq!nO!Q!oO(TTO(WUO(c!mO~OP;vOQ;vOSfOd=rOe!iOnkOp;vOqkOrkOxkOz;vO|;vO!QWO!UkO!VkO!]!eO!g;yO!jZO!m;vO!n;vO!o;vO!q;zO!s;}O!v!hO$V!kO$m=pO(TTO(WUO(_VO(m[O~O(R<rO~P##yO!Z-WO![(gX~O![-YO~O!e-QO#^-PO!Z#fX![#fX~O!Z-ZO![(vX~O![-]O~O!a-^O!b-^O(S!lO~P##hO![-aO~P'_Ol-dO!]'^O~O!W-iO~Oq!ya!`!ya!a!ya!b!ya#R!ya#S!ya#T!ya#U!ya#V!ya#Y!ya#Z!ya(S!ya(T!ya(W!ya(c!ya(m!ya~P!#eO!n-nO#^-lO~PCVO!a-pO!b-pO(S!lO~PCuOa%mO#^-lO'x%mO~Oa%mO!e#vO#^-lO'x%mO~Oa%mO!e#vO!n-nO#^-lO'x%mO(p'nO~O'}'vO(O'vO(P-uO~Ot-vO~O!W'Ua!Z'Ua~P!:TO!Y-zO!W'UX!Z'UX~P%[O!Z(TO!W(fa~O!W(fa~PGpO!Z([O!W(ta~O!Q%gO!Y.OO!]%hO(R%fO!W'[X!Z'[X~O#^.QO!Z(ra!i(raa(ra'x(ra~O!e#vO~P#,PO!Z(hO!i(qa~O!Q%gO!]%hO#h.UO(R%fO~On.ZO!Q%gO!Y.WO!]%hO!z]O#g.YO#h.WO(R%fO!Z'_X!i'_X~OR._O!j#xO~Oh%VOl.bO!]'^O%h.aO~Oa#ai!Z#ai'x#ai'u#ai!W#ai!i#ait#ai!]#ai%h#ai!e#ai~P!:TOl=|O!O)|O'w)}O(w$}O(x%PO~O#i#]aa#]a#^#]a'x#]a!Z#]a!i#]a!]#]a!W#]a~P#.{O#i(^XP(^XR(^X[(^Xa(^Xp(^X!Q(^X!j(^X!n(^X#P(^X#l(^X#m(^X#n(^X#o(^X#p(^X#q(^X#r(^X#s(^X#t(^X#u(^X#w(^X#y(^X#z(^X'x(^X(_(^X(p(^X!i(^X!W(^X'u(^Xt(^X!](^X%h(^X!e(^X~P!6YO!Z.oO!i(iX~P!:TO!i.rO~O!W.tO~OP$[OR#zO!O#yO!Q#{O!j#xO!n$[O(_VO[#kia#kip#ki!Z#ki#P#ki#m#ki#n#ki#o#ki#p#ki#q#ki#r#ki#s#ki#t#ki#u#ki#w#ki#y#ki#z#ki'x#ki(p#ki(w#ki(x#ki'u#ki!W#ki!i#kit#ki!]#ki%h#ki!e#ki~O#l#ki~P#2kO#l$OO~P#2kOP$[OR#zOp$aO!O#yO!Q#{O!j#xO!n$[O#l$OO#m$PO#n$PO#o$PO(_VO[#kia#ki!Z#ki#P#ki#q#ki#r#ki#s#ki#t#ki#u#ki#w#ki#y#ki#z#ki'x#ki(p#ki(w#ki(x#ki'u#ki!W#ki!i#kit#ki!]#ki%h#ki!e#ki~O#p#ki~P#5YO#p$QO~P#5YOP$[OR#zO[$cOp$aO!O#yO!Q#{O!j#xO!n$[O#P$RO#l$OO#m$PO#n$PO#o$PO#p$QO#q$RO#r$RO#s$bO#t$RO(_VOa#ki!Z#ki#w#ki#y#ki#z#ki'x#ki(p#ki(w#ki(x#ki'u#ki!W#ki!i#kit#ki!]#ki%h#ki!e#ki~O#u#ki~P#7wOP$[OR#zO[$cOp$aO!O#yO!Q#{O!j#xO!n$[O#P$RO#l$OO#m$PO#n$PO#o$PO#p$QO#q$RO#r$RO#s$bO#t$RO#u$SO(_VO(x#}Oa#ki!Z#ki#y#ki#z#ki'x#ki(p#ki(w#ki'u#ki!W#ki!i#kit#ki!]#ki%h#ki!e#ki~O#w$UO~P#:_O#w#ki~P#:_O#u$SO~P#7wOP$[OR#zO[$cOp$aO!O#yO!Q#{O!j#xO!n$[O#P$RO#l$OO#m$PO#n$PO#o$PO#p$QO#q$RO#r$RO#s$bO#t$RO#u$SO#w$UO(_VO(w#|O(x#}Oa#ki!Z#ki#z#ki'x#ki(p#ki'u#ki!W#ki!i#kit#ki!]#ki%h#ki!e#ki~O#y#ki~P#=TO#y$WO~P#=TOP]XR]X[]Xp]X!O]X!Q]X!j]X!n]X#P]X#Q]X#^]X#ifX#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#w]X#y]X#z]X$P]X(_]X(p]X(w]X(x]X!Z]X![]X~O#}]X~P#?rOP$[OR#zO[<_Op<]O!O#yO!Q#{O!j#xO!n$[O#P<SO#l<PO#m<QO#n<QO#o<QO#p<RO#q<SO#r<SO#s<^O#t<SO#u<TO#w<VO#y<XO#z<YO(_VO(p$YO(w#|O(x#}O~O#}.vO~P#BPO#Q$dO#^<`O$P<`O#}(eX![(eX~P! dOa'ba!Z'ba'x'ba'u'ba!i'ba!W'bat'ba!]'ba%h'ba!e'ba~P!:TO[#kia#kip#ki!Z#ki#P#ki#p#ki#q#ki#r#ki#s#ki#t#ki#u#ki#w#ki#y#ki#z#ki'x#ki(p#ki'u#ki!W#ki!i#kit#ki!]#ki%h#ki!e#ki~OP$[OR#zO!O#yO!Q#{O!j#xO!n$[O#l$OO#m$PO#n$PO#o$PO(_VO(w#ki(x#ki~P#EROl=|O!O)|O'w)}O(w$}O(x%POP#kiR#ki!Q#ki!j#ki!n#ki#l#ki#m#ki#n#ki#o#ki(_#ki~P#ERO!Z.zOg(nX~P!0uOg.|O~Oa$Oi!Z$Oi'x$Oi'u$Oi!W$Oi!i$Oit$Oi!]$Oi%h$Oi!e$Oi~P!:TO$[.}O$^.}O~O$[/OO$^/OO~O!e)fO#^/PO!]$bX$Y$bX$[$bX$^$bX$e$bX~O!Y/QO~O!])iO$Y/SO$[)hO$^)hO$e/TO~O!Z<ZO![(dX~P#BPO![/UO~O!e)fO$e(yX~O$e/WO~Ot/XO~P!&iOv)wO(`)xO(a/[O~O!Q/_O~O(w$}Ol%`a!O%`a'w%`a(x%`a!Z%`a#^%`a~Og%`a#}%`a~P#LTO(x%POl%ba!O%ba'w%ba(w%ba!Z%ba#^%ba~Og%ba#}%ba~P#LvO!ZfX!efX!ifX!i$yX(pfX~P!/qO!Y/hO!Z([O(R/gO!W(tP!W(}P~P!1dOp*pO!`*nO!a*hO!b*hO!j*_O#Y*oO%_*jO(S!lO(TTO(WUO~Oq<oO!Q/iO!Y+XO![*mO(c<nO![(vP~P#NaO!i/jO~P#.{O!Z/kO!e#vO(p'nO!i(|X~O!i/pO~O!Q%gO!Y*[O!]%hO(R%fO!i(|P~O#i/rO~O!W$yX!Z$yX!e%QX~P!/qO!Z/sO!W(}X~P#.{O!e/uO~O!W/wO~OnkO(R/xO~P.iOh%VOp/}O!e#vO!j%dO(p'nO~O!e+fO~Oa%mO!Z0RO'x%mO~O![0TO~P!5WO!a0UO!b0UO(S!lO~P##hOq!nO!Q0VO(TTO(WUO(c!mO~O#Y0XO~Og%`a!Z%`a#^%`a#}%`a~P!0uOg%ba!Z%ba#^%ba#}%ba~P!0uOj%cO(R&XOg'kX!Z'kX~O!Z*vOg([a~Og0bO~OR0cO!O0cO!Q0dO#Q$dOl{a'w{a(w{a(x{a!Z{a#^{a~Og{a#}{a~P$&dO!O)|O'w)}Ol$ra(w$ra(x$ra!Z$ra#^$ra~Og$ra#}$ra~P$'`O!O)|O'w)}Ol$ta(w$ta(x$ta!Z$ta#^$ta~Og$ta#}$ta~P$(RO#i0gO~Og%Sa!Z%Sa#^%Sa#}%Sa~P!0uOl0iO#^0hOg(]a!Z(]a~O!e#vO~O#i0lO~O!Z+ZOa)Ra'x)Ra~OR#zO!O#yO!Q#{O!j#xO(_VOP!pi[!pip!pi!Z!pi!n!pi#P!pi#l!pi#m!pi#n!pi#o!pi#p!pi#q!pi#r!pi#s!pi#t!pi#u!pi#w!pi#y!pi#z!pi(p!pi(w!pi(x!pi~Oa!pi'x!pi'u!pi!W!pi!i!pit!pi!]!pi%h!pi!e!pi~P$*OOh%VOp%XOq$tOr$tOx%YOz%ZO|<eO!Q${O!]$|O!g=vO!j$xO#h<kO$V%_O$s<gO$u<iO$x%`O(TTO(WUO(_$uO(w$}O(x%PO~On0vO%[0wO(R0tO~P$,fO!e+fOa(Za!](Za'x(Za!Z(Za~O#i0|O~O[]X!ZfX![fX~O!Z0}O![)VX~O![1PO~O[1QO~Ob1SO(R+nO(TTO(WUO~O!]&OO(R%fO`'sX!Z'sX~O!Z+sO`)Ua~O!i1VO~P!:TO[1YO~O`1ZO~O#^1^O~Ol1aO!]$|O~O(c(zO![)SP~Oh%VOl1jO!]1gO%h1iO~O[1tO!Z1rO![)TX~O![1uO~O`1wOa%mO'x%mO~O(R#nO(TTO(WUO~O#Q$dO#^$eO$P$eOP(eXR(eX[(eXp(eX!O(eX!Q(eX!Z(eX!j(eX!n(eX#P(eX#l(eX#m(eX#n(eX#o(eX#p(eX#q(eX#r(eX#s(eX#u(eX#w(eX#y(eX#z(eX(_(eX(p(eX(w(eX(x(eX~O#t1zO&Y1{Oa(eX~P$2PO#^$eO#t1zO&Y1{O~Oa1}O~P%[Oa2PO~O&c2SOP&aiQ&aiS&aiY&aia&aid&aie&aij&ain&aip&aiq&air&aix&aiz&ai|&ai!Q&ai!U&ai!V&ai!]&ai!g&ai!j&ai!m&ai!n&ai!o&ai!q&ai!s&ai!v&ai!z&ai$V&ai$m&ai%g&ai%i&ai%k&ai%l&ai%m&ai%p&ai%r&ai%u&ai%v&ai%x&ai&U&ai&[&ai&^&ai&`&ai&b&ai&e&ai&k&ai&q&ai&s&ai&u&ai&w&ai&y&ai'u&ai(R&ai(T&ai(W&ai(_&ai(m&ai![&aib&ai&h&ai~Ob2YO![2WO&h2XO~P`O!]XO!j2[O~O&o,vOP&jiQ&jiS&jiY&jia&jid&jie&jij&jin&jip&jiq&jir&jix&jiz&ji|&ji!Q&ji!U&ji!V&ji!]&ji!g&ji!j&ji!m&ji!n&ji!o&ji!q&ji!s&ji!v&ji!z&ji$V&ji$m&ji%g&ji%i&ji%k&ji%l&ji%m&ji%p&ji%r&ji%u&ji%v&ji%x&ji&U&ji&[&ji&^&ji&`&ji&b&ji&e&ji&k&ji&q&ji&s&ji&u&ji&w&ji&y&ji'u&ji(R&ji(T&ji(W&ji(_&ji(m&ji![&ji&c&jib&ji&h&ji~O!W2bO~O!Z!_a![!_a~P#BPOq!nO!Q!oO!Y2hO(c!mO!Z'VX!['VX~P@]O!Z-WO![(ga~O!Z']X![']X~P!9]O!Z-ZO![(va~O![2oO~P'_Oa%mO#^2xO'x%mO~Oa%mO!e#vO#^2xO'x%mO~Oa%mO!e#vO!n2|O#^2xO'x%mO(p'nO~Oa%mO'x%mO~P!:TO!Z$_Ot$pa~O!W'Ui!Z'Ui~P!:TO!Z(TO!W(fi~O!Z([O!W(ti~O!W(ui!Z(ui~P!:TO!Z(ri!i(ria(ri'x(ri~P!:TO#^3OO!Z(ri!i(ria(ri'x(ri~O!Z(hO!i(qi~O!Q%gO!]%hO!z]O#g3TO#h3SO(R%fO~O!Q%gO!]%hO#h3SO(R%fO~Ol3[O!]'^O%h3ZO~Oh%VOl3[O!]'^O%h3ZO~O#i%`aP%`aR%`a[%`aa%`ap%`a!Q%`a!j%`a!n%`a#P%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#t%`a#u%`a#w%`a#y%`a#z%`a'x%`a(_%`a(p%`a!i%`a!W%`a'u%`at%`a!]%`a%h%`a!e%`a~P#LTO#i%baP%baR%ba[%baa%bap%ba!Q%ba!j%ba!n%ba#P%ba#l%ba#m%ba#n%ba#o%ba#p%ba#q%ba#r%ba#s%ba#t%ba#u%ba#w%ba#y%ba#z%ba'x%ba(_%ba(p%ba!i%ba!W%ba'u%bat%ba!]%ba%h%ba!e%ba~P#LvO#i%`aP%`aR%`a[%`aa%`ap%`a!Q%`a!Z%`a!j%`a!n%`a#P%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#t%`a#u%`a#w%`a#y%`a#z%`a'x%`a(_%`a(p%`a!i%`a!W%`a'u%`a#^%`at%`a!]%`a%h%`a!e%`a~P#.{O#i%baP%baR%ba[%baa%bap%ba!Q%ba!Z%ba!j%ba!n%ba#P%ba#l%ba#m%ba#n%ba#o%ba#p%ba#q%ba#r%ba#s%ba#t%ba#u%ba#w%ba#y%ba#z%ba'x%ba(_%ba(p%ba!i%ba!W%ba'u%ba#^%bat%ba!]%ba%h%ba!e%ba~P#.{O#i{aP{a[{aa{ap{a!j{a!n{a#P{a#l{a#m{a#n{a#o{a#p{a#q{a#r{a#s{a#t{a#u{a#w{a#y{a#z{a'x{a(_{a(p{a!i{a!W{a'u{at{a!]{a%h{a!e{a~P$&dO#i$raP$raR$ra[$raa$rap$ra!Q$ra!j$ra!n$ra#P$ra#l$ra#m$ra#n$ra#o$ra#p$ra#q$ra#r$ra#s$ra#t$ra#u$ra#w$ra#y$ra#z$ra'x$ra(_$ra(p$ra!i$ra!W$ra'u$rat$ra!]$ra%h$ra!e$ra~P$'`O#i$taP$taR$ta[$taa$tap$ta!Q$ta!j$ta!n$ta#P$ta#l$ta#m$ta#n$ta#o$ta#p$ta#q$ta#r$ta#s$ta#t$ta#u$ta#w$ta#y$ta#z$ta'x$ta(_$ta(p$ta!i$ta!W$ta'u$tat$ta!]$ta%h$ta!e$ta~P$(RO#i%SaP%SaR%Sa[%Saa%Sap%Sa!Q%Sa!Z%Sa!j%Sa!n%Sa#P%Sa#l%Sa#m%Sa#n%Sa#o%Sa#p%Sa#q%Sa#r%Sa#s%Sa#t%Sa#u%Sa#w%Sa#y%Sa#z%Sa'x%Sa(_%Sa(p%Sa!i%Sa!W%Sa'u%Sa#^%Sat%Sa!]%Sa%h%Sa!e%Sa~P#.{Oa#aq!Z#aq'x#aq'u#aq!W#aq!i#aqt#aq!]#aq%h#aq!e#aq~P!:TO!Y3dO!Z'WX!i'WX~P%[O!Z.oO!i(ia~O!Z.oO!i(ia~P!:TO!W3gO~O#}!la![!la~PKZO#}!ha!Z!ha![!ha~P#BPO#}!pa![!pa~P!<kO#}!ra![!ra~P!?ROg'ZX!Z'ZX~P!+rO!Z.zOg(na~OSfO!]3{O$c3|O~O![4QO~Ot4RO~P#.{Oa$lq!Z$lq'x$lq'u$lq!W$lq!i$lqt$lq!]$lq%h$lq!e$lq~P!:TO!W4TO~P!&iO!Q4UO~O!O)|O'w)}O(x%POl'ga(w'ga!Z'ga#^'ga~Og'ga#}'ga~P%+uO!O)|O'w)}Ol'ia(w'ia(x'ia!Z'ia#^'ia~Og'ia#}'ia~P%,hO(p$YO~P#.{O!WfX!W$yX!ZfX!Z$yX!e%QX#^fX~P!/qO(R<xO~P!1dO!Q%gO!Y4XO!]%hO(R%fO!Z'cX!i'cX~O!Z/kO!i(|a~O!Z/kO!e#vO!i(|a~O!Z/kO!e#vO(p'nO!i(|a~Og${i!Z${i#^${i#}${i~P!0uO!Y4aO!W'eX!Z'eX~P!3cO!Z/sO!W(}a~O!Z/sO!W(}a~P#.{OP]XR]X[]Xp]X!O]X!Q]X!W]X!Z]X!j]X!n]X#P]X#Q]X#^]X#ifX#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#w]X#y]X#z]X$P]X(_]X(p]X(w]X(x]X~O!e%XX#t%XX~P%0XO!e#vO#t4fO~Oh%VO!e#vO!j%dO~Oh%VOp4kO!j%dO(p'nO~Op4pO!e#vO(p'nO~Oq!nO!Q4qO(TTO(WUO(c!mO~O(w$}Ol%`i!O%`i'w%`i(x%`i!Z%`i#^%`i~Og%`i#}%`i~P%3xO(x%POl%bi!O%bi'w%bi(w%bi!Z%bi#^%bi~Og%bi#}%bi~P%4kOg(]i!Z(]i~P!0uO#^4wOg(]i!Z(]i~P!0uO!i4zO~Oa$nq!Z$nq'x$nq'u$nq!W$nq!i$nqt$nq!]$nq%h$nq!e$nq~P!:TO!W5QO~O!Z5RO!])OX~P#.{Oa]Xa$yX!]]X!]$yX%]]X'x]X'x$yX!Z]X!Z$yX~P!/qO%]5UOa%Za!]%Za'x%Za!Z%Za~OlmX!OmX'wmX(wmX(xmX~P%7nOn5VO(R#nO~Ob5]O%i5^O(R+nO(TTO(WUO!Z'rX!['rX~O!Z0}O![)Va~O[5bO~O`5cO~Oa%mO'x%mO~P#.{O!Z5kO#^5mO![)SX~O![5nO~Op5tOq!nO!Q*fO!`!yO!a!vO!b!vO!z;wO#R!pO#S!pO#T!pO#U!pO#V!pO#Y5sO#Z!zO(S!lO(TTO(WUO(c!mO(m!sO~O![5rO~P%:ROl5yO!]1gO%h5xO~Oh%VOl5yO!]1gO%h5xO~Ob6QO(R#nO(TTO(WUO!Z'qX!['qX~O!Z1rO![)Ta~O(TTO(WUO(c6SO~O`6WO~O#t6ZO&Y6[O~PMvO!i6]O~P%[Oa6_O~Oa6_O~P%[Ob2YO![6dO&h2XO~P`O!e6fO~O!e6hOh(hi!Z(hi![(hi!e(hi!j(hip(hi(p(hi~O!Z#fi![#fi~P#BPO#^6iO!Z#fi![#fi~O!Z!_i![!_i~P#BPOa%mO#^6rO'x%mO~Oa%mO!e#vO#^6rO'x%mO~O!Z(rq!i(rqa(rq'x(rq~P!:TO!Z(hO!i(qq~O!Q%gO!]%hO#h6yO(R%fO~O!]'^O%h6|O~Ol7QO!]'^O%h6|O~O#i'gaP'gaR'ga['gaa'gap'ga!Q'ga!j'ga!n'ga#P'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#t'ga#u'ga#w'ga#y'ga#z'ga'x'ga(_'ga(p'ga!i'ga!W'ga'u'gat'ga!]'ga%h'ga!e'ga~P%+uO#i'iaP'iaR'ia['iaa'iap'ia!Q'ia!j'ia!n'ia#P'ia#l'ia#m'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#w'ia#y'ia#z'ia'x'ia(_'ia(p'ia!i'ia!W'ia'u'iat'ia!]'ia%h'ia!e'ia~P%,hO#i${iP${iR${i[${ia${ip${i!Q${i!Z${i!j${i!n${i#P${i#l${i#m${i#n${i#o${i#p${i#q${i#r${i#s${i#t${i#u${i#w${i#y${i#z${i'x${i(_${i(p${i!i${i!W${i'u${i#^${it${i!]${i%h${i!e${i~P#.{O#i%`iP%`iR%`i[%`ia%`ip%`i!Q%`i!j%`i!n%`i#P%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#t%`i#u%`i#w%`i#y%`i#z%`i'x%`i(_%`i(p%`i!i%`i!W%`i'u%`it%`i!]%`i%h%`i!e%`i~P%3xO#i%biP%biR%bi[%bia%bip%bi!Q%bi!j%bi!n%bi#P%bi#l%bi#m%bi#n%bi#o%bi#p%bi#q%bi#r%bi#s%bi#t%bi#u%bi#w%bi#y%bi#z%bi'x%bi(_%bi(p%bi!i%bi!W%bi'u%bit%bi!]%bi%h%bi!e%bi~P%4kO!Z'Wa!i'Wa~P!:TO!Z.oO!i(ii~O#}#ai!Z#ai![#ai~P#BPOP$[OR#zO!O#yO!Q#{O!j#xO!n$[O(_VO[#kip#ki#P#ki#m#ki#n#ki#o#ki#p#ki#q#ki#r#ki#s#ki#t#ki#u#ki#w#ki#y#ki#z#ki#}#ki(p#ki(w#ki(x#ki!Z#ki![#ki~O#l#ki~P%MQO#l<PO~P%MQOP$[OR#zOp<]O!O#yO!Q#{O!j#xO!n$[O#l<PO#m<QO#n<QO#o<QO(_VO[#ki#P#ki#q#ki#r#ki#s#ki#t#ki#u#ki#w#ki#y#ki#z#ki#}#ki(p#ki(w#ki(x#ki!Z#ki![#ki~O#p#ki~P& YO#p<RO~P& YOP$[OR#zO[<_Op<]O!O#yO!Q#{O!j#xO!n$[O#P<SO#l<PO#m<QO#n<QO#o<QO#p<RO#q<SO#r<SO#s<^O#t<SO(_VO#w#ki#y#ki#z#ki#}#ki(p#ki(w#ki(x#ki!Z#ki![#ki~O#u#ki~P&#bOP$[OR#zO[<_Op<]O!O#yO!Q#{O!j#xO!n$[O#P<SO#l<PO#m<QO#n<QO#o<QO#p<RO#q<SO#r<SO#s<^O#t<SO#u<TO(_VO(x#}O#y#ki#z#ki#}#ki(p#ki(w#ki!Z#ki![#ki~O#w<VO~P&%cO#w#ki~P&%cO#u<TO~P&#bOP$[OR#zO[<_Op<]O!O#yO!Q#{O!j#xO!n$[O#P<SO#l<PO#m<QO#n<QO#o<QO#p<RO#q<SO#r<SO#s<^O#t<SO#u<TO#w<VO(_VO(w#|O(x#}O#z#ki#}#ki(p#ki!Z#ki![#ki~O#y#ki~P&'rO#y<XO~P&'rOa#{y!Z#{y'x#{y'u#{y!W#{y!i#{yt#{y!]#{y%h#{y!e#{y~P!:TO[#kip#ki#P#ki#p#ki#q#ki#r#ki#s#ki#t#ki#u#ki#w#ki#y#ki#z#ki#}#ki(p#ki!Z#ki![#ki~OP$[OR#zO!O#yO!Q#{O!j#xO!n$[O#l<PO#m<QO#n<QO#o<QO(_VO(w#ki(x#ki~P&*nOl=}O!O)|O'w)}O(w$}O(x%POP#kiR#ki!Q#ki!j#ki!n#ki#l#ki#m#ki#n#ki#o#ki(_#ki~P&*nO#Q$dOP(^XR(^X[(^Xl(^Xp(^X!O(^X!Q(^X!j(^X!n(^X#P(^X#l(^X#m(^X#n(^X#o(^X#p(^X#q(^X#r(^X#s(^X#t(^X#u(^X#w(^X#y(^X#z(^X#}(^X'w(^X(_(^X(p(^X(w(^X(x(^X!Z(^X![(^X~O#}$Oi!Z$Oi![$Oi~P#BPO#}!pi![!pi~P$*OOg'Za!Z'Za~P!0uO![7dO~O!Z'ba!['ba~P#BPO!W7eO~P#.{O!e#vO(p'nO!Z'ca!i'ca~O!Z/kO!i(|i~O!Z/kO!e#vO!i(|i~Og${q!Z${q#^${q#}${q~P!0uO!W'ea!Z'ea~P#.{O!e7lO~O!Z/sO!W(}i~P#.{O!Z/sO!W(}i~O!W7oO~Oh%VOp7tO!j%dO(p'nO~O!e#vO#t7vO~Op7yO!e#vO(p'nO~O!O)|O'w)}O(x%POl'ha(w'ha!Z'ha#^'ha~Og'ha#}'ha~P&3oO!O)|O'w)}Ol'ja(w'ja(x'ja!Z'ja#^'ja~Og'ja#}'ja~P&4bO!W7{O~Og$}q!Z$}q#^$}q#}$}q~P!0uOg(]q!Z(]q~P!0uO#^7|Og(]q!Z(]q~P!0uOa$ny!Z$ny'x$ny'u$ny!W$ny!i$nyt$ny!]$ny%h$ny!e$ny~P!:TO!e6hO~O!Z5RO!])Oa~O!]'^OP$SaR$Sa[$Sap$Sa!O$Sa!Q$Sa!Z$Sa!j$Sa!n$Sa#P$Sa#l$Sa#m$Sa#n$Sa#o$Sa#p$Sa#q$Sa#r$Sa#s$Sa#t$Sa#u$Sa#w$Sa#y$Sa#z$Sa(_$Sa(p$Sa(w$Sa(x$Sa~O%h6|O~P&7SO%]8QOa%Zi!]%Zi'x%Zi!Z%Zi~Oa#ay!Z#ay'x#ay'u#ay!W#ay!i#ayt#ay!]#ay%h#ay!e#ay~P!:TO[8SO~Ob8UO(R+nO(TTO(WUO~O!Z0}O![)Vi~O`8YO~O(c(zO!Z'nX!['nX~O!Z5kO![)Sa~O![8cO~P%:RO(m!sO~P$$oO#Y8dO~O!]1gO~O!]1gO%h8fO~Ol8iO!]1gO%h8fO~O[8nO!Z'qa!['qa~O!Z1rO![)Ti~O!i8rO~O!i8sO~O!i8vO~O!i8vO~P%[Oa8xO~O!e8yO~O!i8zO~O!Z(ui![(ui~P#BPOa%mO#^9SO'x%mO~O!Z(ry!i(rya(ry'x(ry~P!:TO!Z(hO!i(qy~O%h9VO~P&7SO!]'^O%h9VO~O#i${qP${qR${q[${qa${qp${q!Q${q!Z${q!j${q!n${q#P${q#l${q#m${q#n${q#o${q#p${q#q${q#r${q#s${q#t${q#u${q#w${q#y${q#z${q'x${q(_${q(p${q!i${q!W${q'u${q#^${qt${q!]${q%h${q!e${q~P#.{O#i'haP'haR'ha['haa'hap'ha!Q'ha!j'ha!n'ha#P'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#t'ha#u'ha#w'ha#y'ha#z'ha'x'ha(_'ha(p'ha!i'ha!W'ha'u'hat'ha!]'ha%h'ha!e'ha~P&3oO#i'jaP'jaR'ja['jaa'jap'ja!Q'ja!j'ja!n'ja#P'ja#l'ja#m'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#w'ja#y'ja#z'ja'x'ja(_'ja(p'ja!i'ja!W'ja'u'jat'ja!]'ja%h'ja!e'ja~P&4bO#i$}qP$}qR$}q[$}qa$}qp$}q!Q$}q!Z$}q!j$}q!n$}q#P$}q#l$}q#m$}q#n$}q#o$}q#p$}q#q$}q#r$}q#s$}q#t$}q#u$}q#w$}q#y$}q#z$}q'x$}q(_$}q(p$}q!i$}q!W$}q'u$}q#^$}qt$}q!]$}q%h$}q!e$}q~P#.{O!Z'Wi!i'Wi~P!:TO#}#aq!Z#aq![#aq~P#BPO(w$}OP%`aR%`a[%`ap%`a!Q%`a!j%`a!n%`a#P%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#t%`a#u%`a#w%`a#y%`a#z%`a#}%`a(_%`a(p%`a!Z%`a![%`a~Ol%`a!O%`a'w%`a(x%`a~P&HgO(x%POP%baR%ba[%bap%ba!Q%ba!j%ba!n%ba#P%ba#l%ba#m%ba#n%ba#o%ba#p%ba#q%ba#r%ba#s%ba#t%ba#u%ba#w%ba#y%ba#z%ba#}%ba(_%ba(p%ba!Z%ba![%ba~Ol%ba!O%ba'w%ba(w%ba~P&JnOl=}O!O)|O'w)}O(x%PO~P&HgOl=}O!O)|O'w)}O(w$}O~P&JnOR0cO!O0cO!Q0dO#Q$dOP{a[{al{ap{a!j{a!n{a#P{a#l{a#m{a#n{a#o{a#p{a#q{a#r{a#s{a#t{a#u{a#w{a#y{a#z{a#}{a'w{a(_{a(p{a(w{a(x{a!Z{a![{a~O!O)|O'w)}OP$raR$ra[$ral$rap$ra!Q$ra!j$ra!n$ra#P$ra#l$ra#m$ra#n$ra#o$ra#p$ra#q$ra#r$ra#s$ra#t$ra#u$ra#w$ra#y$ra#z$ra#}$ra(_$ra(p$ra(w$ra(x$ra!Z$ra![$ra~O!O)|O'w)}OP$taR$ta[$tal$tap$ta!Q$ta!j$ta!n$ta#P$ta#l$ta#m$ta#n$ta#o$ta#p$ta#q$ta#r$ta#s$ta#t$ta#u$ta#w$ta#y$ta#z$ta#}$ta(_$ta(p$ta(w$ta(x$ta!Z$ta![$ta~Ol=}O!O)|O'w)}O(w$}O(x%PO~OP%SaR%Sa[%Sap%Sa!Q%Sa!j%Sa!n%Sa#P%Sa#l%Sa#m%Sa#n%Sa#o%Sa#p%Sa#q%Sa#r%Sa#s%Sa#t%Sa#u%Sa#w%Sa#y%Sa#z%Sa#}%Sa(_%Sa(p%Sa!Z%Sa![%Sa~P'%sO#}$lq!Z$lq![$lq~P#BPO#}$nq!Z$nq![$nq~P#BPO![9dO~O#}9eO~P!0uO!e#vO!Z'ci!i'ci~O!e#vO(p'nO!Z'ci!i'ci~O!Z/kO!i(|q~O!W'ei!Z'ei~P#.{O!Z/sO!W(}q~Op9lO!e#vO(p'nO~O[9nO!W9mO~P#.{O!W9mO~O!e#vO#t9tO~Og(]y!Z(]y~P!0uO!Z'la!]'la~P#.{Oa%Zq!]%Zq'x%Zq!Z%Zq~P#.{O[9yO~O!Z0}O![)Vq~O#^9}O!Z'na!['na~O!Z5kO![)Si~P#BPO!Q:PO~O!]1gO%h:SO~O(TTO(WUO(c:XO~O!Z1rO![)Tq~O!i:[O~O!i:]O~O!i:^O~O!i:^O~P%[O#^:aO!Z#fy![#fy~O!Z#fy![#fy~P#BPO%h:fO~P&7SO!]'^O%h:fO~O#}#{y!Z#{y![#{y~P#BPOP${iR${i[${ip${i!Q${i!j${i!n${i#P${i#l${i#m${i#n${i#o${i#p${i#q${i#r${i#s${i#t${i#u${i#w${i#y${i#z${i#}${i(_${i(p${i!Z${i![${i~P'%sO!O)|O'w)}O(x%POP'gaR'ga['gal'gap'ga!Q'ga!j'ga!n'ga#P'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#t'ga#u'ga#w'ga#y'ga#z'ga#}'ga(_'ga(p'ga(w'ga!Z'ga!['ga~O!O)|O'w)}OP'iaR'ia['ial'iap'ia!Q'ia!j'ia!n'ia#P'ia#l'ia#m'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#w'ia#y'ia#z'ia#}'ia(_'ia(p'ia(w'ia(x'ia!Z'ia!['ia~O(w$}OP%`iR%`i[%`il%`ip%`i!O%`i!Q%`i!j%`i!n%`i#P%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#t%`i#u%`i#w%`i#y%`i#z%`i#}%`i'w%`i(_%`i(p%`i(x%`i!Z%`i![%`i~O(x%POP%biR%bi[%bil%bip%bi!O%bi!Q%bi!j%bi!n%bi#P%bi#l%bi#m%bi#n%bi#o%bi#p%bi#q%bi#r%bi#s%bi#t%bi#u%bi#w%bi#y%bi#z%bi#}%bi'w%bi(_%bi(p%bi(w%bi!Z%bi![%bi~O#}$ny!Z$ny![$ny~P#BPO#}#ay!Z#ay![#ay~P#BPO!e#vO!Z'cq!i'cq~O!Z/kO!i(|y~O!W'eq!Z'eq~P#.{Op:pO!e#vO(p'nO~O[:tO!W:sO~P#.{O!W:sO~Og(]!R!Z(]!R~P!0uOa%Zy!]%Zy'x%Zy!Z%Zy~P#.{O!Z0}O![)Vy~O!Z5kO![)Sq~O(R:zO~O!]1gO%h:}O~O!i;QO~O%h;VO~P&7SOP${qR${q[${qp${q!Q${q!j${q!n${q#P${q#l${q#m${q#n${q#o${q#p${q#q${q#r${q#s${q#t${q#u${q#w${q#y${q#z${q#}${q(_${q(p${q!Z${q![${q~P'%sO!O)|O'w)}O(x%POP'haR'ha['hal'hap'ha!Q'ha!j'ha!n'ha#P'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#t'ha#u'ha#w'ha#y'ha#z'ha#}'ha(_'ha(p'ha(w'ha!Z'ha!['ha~O!O)|O'w)}OP'jaR'ja['jal'jap'ja!Q'ja!j'ja!n'ja#P'ja#l'ja#m'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#w'ja#y'ja#z'ja#}'ja(_'ja(p'ja(w'ja(x'ja!Z'ja!['ja~OP$}qR$}q[$}qp$}q!Q$}q!j$}q!n$}q#P$}q#l$}q#m$}q#n$}q#o$}q#p$}q#q$}q#r$}q#s$}q#t$}q#u$}q#w$}q#y$}q#z$}q#}$}q(_$}q(p$}q!Z$}q![$}q~P'%sOg%d!Z!Z%d!Z#^%d!Z#}%d!Z~P!0uO!W;ZO~P#.{Op;[O!e#vO(p'nO~O[;^O!W;ZO~P#.{O!Z'nq!['nq~P#BPO!Z#f!Z![#f!Z~P#BPO#i%d!ZP%d!ZR%d!Z[%d!Za%d!Zp%d!Z!Q%d!Z!Z%d!Z!j%d!Z!n%d!Z#P%d!Z#l%d!Z#m%d!Z#n%d!Z#o%d!Z#p%d!Z#q%d!Z#r%d!Z#s%d!Z#t%d!Z#u%d!Z#w%d!Z#y%d!Z#z%d!Z'x%d!Z(_%d!Z(p%d!Z!i%d!Z!W%d!Z'u%d!Z#^%d!Zt%d!Z!]%d!Z%h%d!Z!e%d!Z~P#.{Op;fO!e#vO(p'nO~O!W;gO~P#.{Op;nO!e#vO(p'nO~O!W;oO~P#.{OP%d!ZR%d!Z[%d!Zp%d!Z!Q%d!Z!j%d!Z!n%d!Z#P%d!Z#l%d!Z#m%d!Z#n%d!Z#o%d!Z#p%d!Z#q%d!Z#r%d!Z#s%d!Z#t%d!Z#u%d!Z#w%d!Z#y%d!Z#z%d!Z#}%d!Z(_%d!Z(p%d!Z!Z%d!Z![%d!Z~P'%sOp;rO!e#vO(p'nO~Ot(dX~P1qO!O%qO~P!(yO(S!lO~P!(yO!WfX!ZfX#^fX~P%0XOP]XR]X[]Xp]X!O]X!Q]X!Z]X!ZfX!j]X!n]X#P]X#Q]X#^]X#^fX#ifX#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#w]X#y]X#z]X$P]X(_]X(p]X(w]X(x]X~O!efX!i]X!ifX(pfX~P'JlOP;vOQ;vOSfOd=rOe!iOnkOp;vOqkOrkOxkOz;vO|;vO!QWO!UkO!VkO!]XO!g;yO!jZO!m;vO!n;vO!o;vO!q;zO!s;}O!v!hO$V!kO$m=pO(R)ZO(TTO(WUO(_VO(m[O~O!Z<ZO![$pa~Oh%VOn%WOp%XOq$tOr$tOx%YOz%ZO|<fO!Q${O!]$|O!g=wO!j$xO#h<lO$V%_O$s<hO$u<jO$x%`O(R(tO(TTO(WUO(_$uO(w$}O(x%PO~Oj)bO~P( bOp!cX(p!cX~P# qOp(hX(p(hX~P#!dO![]X![fX~P'JlO!WfX!W$yX!ZfX!Z$yX#^fX~P!/qO#i<OO~O!e#vO#i<OO~O#^<`O~O#t<SO~O#^<pO!Z(uX![(uX~O#^<`O!Z(sX![(sX~O#i<qO~Og<sO~P!0uO#i<yO~O#i<zO~O!e#vO#i<{O~O!e#vO#i<qO~O#}<|O~P#BPO#i<}O~O#i=OO~O#i=TO~O#i=UO~O#i=VO~O#i=WO~O#}=XO~P!0uO#}=YO~P!0uO#Q#R#S#U#V#Y#g#h#s$m$s$u$x%[%]%g%h%i%p%r%u%v%x%z~'|T#m!V'z(S#nq#l#op!O'{$['{(R$^(c~",goto:"$8f)ZPPPPPP)[PP)_P)pP+Q/VPPPP6aPP6wPP<oP@cP@yP@yPPP@yPCRP@yP@yP@yPCVPC[PCyPHsPPPHwPPPPHwKzPPPLQLrPHwPHwPP! QHwPPPHwPHwP!#XHwP!&o!'t!'}P!(q!(u!(q!,SPPPPPPP!,s!'tPP!-T!.uP!2RHwHw!2W!5d!:Q!:Q!>PPPP!>XHwPPPPPPPPPP!AhP!BuPPHw!DWPHwPHwHwHwHwHwPHw!EjP!HtP!KzP!LO!LY!L^!L^P!HqP!Lb!LbP# hP# lHwPHw# r#$wCV@yP@yP@y@yP#&U@y@y#(h@y#+`@y#-l@y@y#.[#0p#0p#0u#1O#0p#1ZPP#0pP@y#1s@y#5r@y@y6aPPP#9wPPP#:b#:bP#:bP#:x#:bPP#;OP#:uP#:u#;c#:u#;}#<T#<W)_#<Z)_P#<b#<b#<bP)_P)_P)_P)_PP)_P#<h#<kP#<k)_P#<oP#<rP)_P)_P)_P)_P)_P)_)_PP#<x#=O#=Z#=a#=g#=m#=s#>R#>X#>c#>i#>s#>y#?Z#?a#@R#@e#@k#@q#AP#Af#CZ#Ci#Cp#E[#Ej#G[#Gj#Gp#Gv#G|#HW#H^#Hd#Hn#IQ#IWPPPPPPPPPPP#I^PPPPPPP#JR#MY#Nr#Ny$ RPPP$&mP$&v$)o$0Y$0]$0`$1_$1b$1i$1qP$1w$1zP$2h$2l$3d$4r$4w$5_PP$5d$5j$5n$5q$5u$5y$6u$7^$7u$7y$7|$8P$8V$8Y$8^$8bR!|RoqOXst!Z#d%l&p&r&s&u,n,s2S2VY!vQ'^-`1g5qQ%svQ%{yQ&S|Q&h!VS'U!e-WQ'd!iS'j!r!yU*h$|*X*lQ+l%|Q+y&UQ,_&bQ-^']Q-h'eQ-p'kQ0U*nQ1q,`R<m;z%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y,k,n,s-d-l-z.Q.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3d4q5y6Z6[6_6r8i8x9SS#q];w!r)]$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sU*{%[<e<fQ+q&OQ,a&eQ,h&mQ0r+dQ0u+fQ1S+rQ1y,fQ3W.bQ5V0wQ5]0}Q6Q1rQ7O3[Q8U5^R9Y7Q'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=s!S!nQ!r!v!y!z$|'U']'^'j'k'l*h*l*n*o-W-^-`-p0U0X1g5q5s%[$ti#v$b$c$d$x${%O%Q%]%^%b)w*P*R*T*W*^*d*t*u+c+f+},Q.a.z/_/h/r/s/u0Y0[0g0h0i1^1a1i3Z4U4V4a4f4w5R5U5x6|7l7v7|8Q8f9V9e9n9t:S:f:t:};V;^<^<_<a<b<c<d<g<h<i<j<k<l<t<u<v<w<y<z<}=O=P=Q=R=S=T=U=X=Y=p=x=y=|=}Q&V|Q'S!eS'Y%h-ZQ+q&OQ,a&eQ0f+OQ1S+rQ1X+xQ1x,eQ1y,fQ5]0}Q5f1ZQ6Q1rQ6T1tQ6U1wQ8U5^Q8X5cQ8q6WQ9|8YQ:Y8nR<o*XrnOXst!V!Z#d%l&g&p&r&s&u,n,s2S2VR,c&i&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=r=s[#]WZ#W#Z'V(R!b%im#h#i#l$x%d%g([(f(g(h*W*[*_+W+X+Z,j-Q.O.U.V.W.Y/h/k2[3S3T4X6h6yQ%vxQ%zyS&P|&UQ&]!TQ'a!hQ'c!iQ(o#sS+k%{%|Q+o&OQ,Y&`Q,^&bS-g'd'eQ.d(pQ0{+lQ1R+rQ1T+sQ1W+wQ1l,ZS1p,_,`Q2t-hQ5[0}Q5`1QQ5e1YQ6P1qQ8T5^Q8W5bQ9x8SR:w9y!U$zi$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=y!^%xy!i!u%z%{%|'T'c'd'e'i's*g+k+l-T-g-h-o/{0O0{2m2t2{4i4j4m7s9pQ+e%vQ,O&YQ,R&ZQ,]&bQ.c(oQ1k,YU1o,^,_,`Q3].dQ5z1lS6O1p1qQ8m6P#f=t#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}o=u<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=YW%Ti%V*v=pS&Y!Q&gQ&Z!RQ&[!SQ+S%cR+|&W%]%Si#v$b$c$d$x${%O%Q%]%^%b)w*P*R*T*W*^*d*t*u+c+f+},Q.a.z/_/h/r/s/u0Y0[0g0h0i1^1a1i3Z4U4V4a4f4w5R5U5x6|7l7v7|8Q8f9V9e9n9t:S:f:t:};V;^<^<_<a<b<c<d<g<h<i<j<k<l<t<u<v<w<y<z<}=O=P=Q=R=S=T=U=X=Y=p=x=y=|=}T)x$u)yV*{%[<e<fW'Y!e%h*X-ZS({#y#zQ+`%qQ+v&RS.](k(lQ1b,SQ4x0cR8^5k'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=s$i$^c#Y#e%p%r%t(Q(W(r(w)P)Q)R)S)T)U)V)W)X)Y)[)^)`)e)o+a+u-U-s-x-}.P.n.q.u.w.x.y/]0j2c2f2v2}3c3h3i3j3k3l3m3n3o3p3q3r3s3t3w3x4P5O5Y6k6q6v7V7W7a7b8`8|9Q9[9b9c:c:y;R;x=gT#TV#U'RkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sQ'W!eR2i-W!W!nQ!e!r!v!y!z$|'U']'^'j'k'l*X*h*l*n*o-W-^-`-p0U0X1g5q5sR1d,UnqOXst!Z#d%l&p&r&s&u,n,s2S2VQ&w!^Q't!xS(q#u<OQ+i%yQ,W&]Q,X&_Q-e'bQ-r'mS.m(v<qS0k+U<{Q0y+jQ1f,VQ2Z,uQ2],vQ2e-RQ2r-fQ2u-jS5P0l=VQ5W0zS5Z0|=WQ6j2gQ6n2sQ6s2zQ8R5XQ8}6lQ9O6oQ9R6tR:`8z$d$]c#Y#e%r%t(Q(W(r(w)P)Q)R)S)T)U)V)W)X)Y)[)^)`)e)o+a+u-U-s-x-}.P.n.q.u.x.y/]0j2c2f2v2}3c3h3i3j3k3l3m3n3o3p3q3r3s3t3w3x4P5O5Y6k6q6v7V7W7a7b8`8|9Q9[9b9c:c:y;R;x=gS(m#p'gQ(}#zS+_%p.wS.^(l(nR3U._'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sS#q];wQ&r!XQ&s!YQ&u![Q&v!]R2R,qQ'_!hQ+b%vQ-c'aS.`(o+eQ2p-bW3Y.c.d0q0sQ6m2qW6z3V3X3]5TU9U6{6}7PU:e9W9X9ZS;T:d:gQ;b;UR;j;cU!wQ'^-`T5o1g5q!Q_OXZ`st!V!Z#d#h%d%l&g&i&p&r&s&u(h,n,s.V2S2V]!pQ!r'^-`1g5qT#q];w%^{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9SS({#y#zS.](k(l!s=^$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sU$fd)],hS(n#p'gU*s%R(u3vU0e*z.i7]Q5T0rQ6{3WQ9X7OR:g9Ym!tQ!r!v!y!z'^'j'k'l-`-p1g5q5sQ'r!uS(d#g1|S-n'i'uQ/n*ZQ/{*gQ2|-qQ4]/oQ4i/}Q4j0OQ4o0WQ7h4WS7s4k4mS7w4p4rQ9g7iQ9k7oQ9p7tQ9u7yS:o9l9mS;Y:p:sS;e;Z;[S;m;f;gS;q;n;oR;t;rQ#wbQ'q!uS(c#g1|S(e#m+TQ+V%eQ+g%wQ+m%}U-m'i'r'uQ.R(dQ/m*ZQ/|*gQ0P*iQ0x+hQ1m,[S2y-n-qQ3R.ZS4[/n/oQ4e/yS4h/{0WQ4l0QQ5|1nQ6u2|Q7g4WQ7k4]U7r4i4o4rQ7u4nQ8k5}S9f7h7iQ9j7oQ9r7wQ9s7xQ:V8lQ:m9gS:n9k9mQ:v9uQ;P:WS;X:o:sS;d;Y;ZS;l;e;gS;p;m;oQ;s;qQ;u;tQ=a=[Q=l=eR=m=fV!wQ'^-`%^aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9SS#wz!j!r=Z$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sR=a=r%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9SQ%ej!^%wy!i!u%z%{%|'T'c'd'e'i's*g+k+l-T-g-h-o/{0O0{2m2t2{4i4j4m7s9pS%}z!jQ+h%xQ,[&bW1n,],^,_,`U5}1o1p1qS8l6O6PQ:W8m!r=[$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sQ=e=qR=f=r%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&p&r&s&u&y'R'`'p(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9SY#bWZ#W#Z(R!b%im#h#i#l$x%d%g([(f(g(h*W*[*_+W+X+Z,j-Q.O.U.V.W.Y/h/k2[3S3T4X6h6yQ,i&m!p=]$Z$n)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sR=`'VU'Z!e%h*XR2k-Z%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y,k,n,s-d-l-z.Q.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3d4q5y6Z6[6_6r8i8x9S!r)]$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sQ,h&mQ0r+dQ3W.bQ7O3[R9Y7Q!b$Tc#Y%p(Q(W(r(w)X)Y)^)e+u-s-x-}.P.n.q/]0j2v2}3c3s5O5Y6q6v7V9Q:c;x!P<U)[)o-U.w2c2f3h3q3r3w4P6k7W7a7b8`8|9[9b9c:y;R=g!f$Vc#Y%p(Q(W(r(w)U)V)X)Y)^)e+u-s-x-}.P.n.q/]0j2v2}3c3s5O5Y6q6v7V9Q:c;x!T<W)[)o-U.w2c2f3h3n3o3q3r3w4P6k7W7a7b8`8|9[9b9c:y;R=g!^$Zc#Y%p(Q(W(r(w)^)e+u-s-x-}.P.n.q/]0j2v2}3c3s5O5Y6q6v7V9Q:c;xQ4V/fz=s)[)o-U.w2c2f3h3w4P6k7W7a7b8`8|9[9b9c:y;R=gQ=x=zR=y={'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sS$oh$pR3|/P'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/P/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sT$kf$qQ$ifS)h$l)lR)t$qT$jf$qT)j$l)l'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%l%s&Q&i&l&m&p&r&s&u&y'R'V'`'p(R(T(Z(b(v(x(|)q){*f+U+Y+d,k,n,s-P-S-d-l-z.Q.b.o.v/P/Q/i0V0d0l0|1j1z1{1}2P2S2V2X2h2x3O3[3d3{4q5m5y6Z6[6_6i6r7Q8i8x9S9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=sT$oh$pQ$rhR)s$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%l%s&Q&i&l&m&p&r&s&u&y'R'`'p(R(T(Z(b(v(x(|){*f+U+Y+d,k,n,s-d-l-z.Q.b.o.v/i0V0d0l0|1j1z1{1}2P2S2V2X2x3O3[3d4q5y6Z6[6_6r7Q8i8x9S!s=q$Z$n'V)q-P-S/Q2h3{5m6i9}:a;v;y;z;}<O<P<Q<R<S<T<U<V<W<X<Y<Z<]<`<m<p<q<s<{<|=V=W=s#glOPXZst!Z!`!o#S#d#o#{$n%l&i&l&m&p&r&s&u&y'R'`(|)q*f+Y+d,k,n,s-d.b/Q/i0V0d1j1z1{1}2P2S2V2X3[3{4q5y6Z6[6_7Q8i8x!U%Ri$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=y#f(u#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}Q+P%`Q/^)|o3v<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=Y!U$yi$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=yQ*`$zU*i$|*X*lQ+Q%aQ0Q*j#f=c#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}n=d<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=YQ=h=tQ=i=uQ=j=vR=k=w!U%Ri$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=y#f(u#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}o3v<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=YnoOXst!Z#d%l&p&r&s&u,n,s2S2VS*c${*WQ,|&|Q,}'OR4`/s%[%Si#v$b$c$d$x${%O%Q%]%^%b)w*P*R*T*W*^*d*t*u+c+f+},Q.a.z/_/h/r/s/u0Y0[0g0h0i1^1a1i3Z4U4V4a4f4w5R5U5x6|7l7v7|8Q8f9V9e9n9t:S:f:t:};V;^<^<_<a<b<c<d<g<h<i<j<k<l<t<u<v<w<y<z<}=O=P=Q=R=S=T=U=X=Y=p=x=y=|=}Q,P&ZQ1`,RQ5i1_R8]5jV*k$|*X*lU*k$|*X*lT5p1g5qS/y*f/iQ4n0VT7x4q:PQ+g%wQ0P*iQ0x+hQ1m,[Q5|1nQ8k5}Q:V8lR;P:W!U%Oi$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=yx*P$v)c*Q*r+R/q0^0_3y4^4{4|4}7f7z9v:l=b=n=oS0Y*q0Z#f<a#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}n<b<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=Y!d<t(s)a*Y*b.e.h.l/Y/f/v0p1]3`4S4_4c5h7R7U7m7p7}8P9i9q9w:q:u;W;];h=z={`<u3u7X7[7`9]:h:k;kS=P.g3aT=Q7Z9`!U%Qi$d%O%Q%]%^%b*P*R*^*t*u.z/r0Y0[0g0h0i4V4w7|9e=p=x=y|*R$v)c*S*q+R/b/q0^0_3y4^4s4{4|4}7f7z9v:l=b=n=oS0[*r0]#f<c#v$b$c$x${)w*T*W*d+c+f+},Q.a/_/h/s/u1^1a1i3Z4U4a4f5R5U5x6|7l7v8Q8f9V9n9t:S:f:t:};V;^<a<c<g<i<k<t<v<y<}=P=R=T=X=|=}n<d<^<_<b<d<h<j<l<u<w<z=O=Q=S=U=Y!h<v(s)a*Y*b.f.g.l/Y/f/v0p1]3^3`4S4_4c5h7R7S7U7m7p7}8P9i9q9w:q:u;W;];h=z={d<w3u7Y7Z7`9]9^:h:i:k;kS=R.h3bT=S7[9arnOXst!V!Z#d%l&g&p&r&s&u,n,s2S2VQ&d!UR,k&mrnOXst!V!Z#d%l&g&p&r&s&u,n,s2S2VR&d!UQ,T&[R1[+|snOXst!V!Z#d%l&g&p&r&s&u,n,s2S2VQ1h,YS5w1k1lU8e5u5v5zS:R8g8hS:{:Q:TQ;_:|R;i;`Q&k!VR,d&gR6T1tR:Y8nS&P|&UR1T+sQ&p!WR,n&qR,t&vT2T,s2VR,x&wQ,w&wR2^,xQ'w!{R-t'wSsOtQ#dXT%os#dQ#OTR'y#OQ#RUR'{#RQ)y$uR/Z)yQ#UVR(O#UQ#XWU(U#X(V-{Q(V#YR-{(WQ-X'WR2j-XQ.p(wS3e.p3fR3f.qQ-`'^R2n-`Y!rQ'^-`1g5qR'h!rQ.{)cR3z.{U#_W%g*WU(]#_(^-|Q(^#`R-|(XQ-['ZR2l-[t`OXst!V!Z#d%l&g&i&p&r&s&u,n,s2S2VS#hZ%dU#r`#h.VR.V(hQ(i#jQ.S(eW.[(i.S3P6wQ3P.TR6w3QQ)l$lR/R)lQ$phR)r$pQ$`cU)_$`-w<[Q-w;xR<[)oQ/l*ZW4Y/l4Z7j9hU4Z/m/n/oS7j4[4]R9h7k$e*O$v(s)a)c*Y*b*q*r*|*}+R.g.h.j.k.l/Y/b/d/f/q/v0^0_0p1]3^3_3`3u3y4S4^4_4c4s4u4{4|4}5h7R7S7T7U7Z7[7^7_7`7f7m7p7z7}8P9]9^9_9i9q9v9w:h:i:j:k:l:q:u;W;];h;k=b=n=o=z={Q/t*bU4b/t4d7nQ4d/vR7n4cS*l$|*XR0S*lx*Q$v)c*q*r+R/q0^0_3y4^4{4|4}7f7z9v:l=b=n=o!d.e(s)a*Y*b.g.h.l/Y/f/v0p1]3`4S4_4c5h7R7U7m7p7}8P9i9q9w:q:u;W;];h=z={U/c*Q.e7Xa7X3u7Z7[7`9]:h:k;kQ0Z*qQ3a.gU4t0Z3a9`R9`7Z|*S$v)c*q*r+R/b/q0^0_3y4^4s4{4|4}7f7z9v:l=b=n=o!h.f(s)a*Y*b.g.h.l/Y/f/v0p1]3^3`4S4_4c5h7R7S7U7m7p7}8P9i9q9w:q:u;W;];h=z={U/e*S.f7Ye7Y3u7Z7[7`9]9^:h:i:k;kQ0]*rQ3b.hU4v0]3b9aR9a7[Q*w%UR0a*wQ5S0pR8O5SQ+[%jR0o+[Q5l1bS8_5l:OR:O8`Q,V&]R1e,VQ5q1gR8b5qQ1s,aS6R1s8oR8o6TQ1O+oW5_1O5a8V9zQ5a1RQ8V5`R9z8WQ+t&PR1U+tQ2V,sR6c2VYrOXst#dQ&t!ZQ+^%lQ,m&pQ,o&rQ,p&sQ,r&uQ2Q,nS2T,s2VR6b2SQ%npQ&x!_Q&{!aQ&}!bQ'P!cQ'o!uQ+]%kQ+i%yQ+{&VQ,c&kQ,z&zW-k'i'q'r'uQ-r'mQ0R*kQ0y+jS1v,d,gQ2_,yQ2`,|Q2a,}Q2u-jW2w-m-n-q-sQ5W0zQ5d1XQ5g1]Q5{1mQ6V1xQ6a2RU6p2v2y2|Q6s2zQ8R5XQ8Z5fQ8[5hQ8a5pQ8j5|Q8p6US9P6q6uQ9R6tQ9{8XQ:U8kQ:Z8qQ:b9QQ:x9|Q;O:VQ;S:cR;a;PQ%yyQ'b!iQ'm!uU+j%z%{%|Q-R'TU-f'c'd'eS-j'i'sQ/z*gS0z+k+lQ2g-TS2s-g-hQ2z-oS4g/{0OQ5X0{Q6l2mQ6o2tQ6t2{U7q4i4j4mQ9o7sR:r9pS$wi=pR*x%VU%Ui%V=pR0`*vQ$viS(s#v+fS)a$b$cQ)c$dQ*Y$xS*b${*WQ*q%OQ*r%QQ*|%]Q*}%^Q+R%bQ.g<aQ.h<cQ.j<gQ.k<iQ.l<kQ/Y)wQ/b*PQ/d*RQ/f*TQ/q*^S/v*d/hQ0^*tQ0_*ul0p+c,Q.a1a1i3Z5x6|8f9V:S:f:};VQ1]+}Q3^<tQ3_<vQ3`<yS3u<^<_Q3y.zS4S/_4UQ4^/rQ4_/sQ4c/uQ4s0YQ4u0[Q4{0gQ4|0hQ4}0iQ5h1^Q7R<}Q7S=PQ7T=RQ7U=TQ7Z<bQ7[<dQ7^<hQ7_<jQ7`<lQ7f4VQ7m4aQ7p4fQ7z4wQ7}5RQ8P5UQ9]<zQ9^<uQ9_<wQ9i7lQ9q7vQ9v7|Q9w8QQ:h=OQ:i=QQ:j=SQ:k=UQ:l9eQ:q9nQ:u9tQ;W=XQ;]:tQ;h;^Q;k=YQ=b=pQ=n=xQ=o=yQ=z=|R={=}Q*z%[Q.i<eR7]<fnpOXst!Z#d%l&p&r&s&u,n,s2S2VQ!fPS#fZ#oQ&z!`W'f!o*f0V4qQ'}#SQ)O#{Q)p$nS,g&i&lQ,l&mQ,y&yS-O'R/iQ-b'`Q.s(|Q/V)qQ0m+YQ0s+dQ2O,kQ2q-dQ3X.bQ4O/QQ4y0dQ5v1jQ6X1zQ6Y1{Q6^1}Q6`2PQ6e2XQ7P3[Q7c3{Q8h5yQ8t6ZQ8u6[Q8w6_Q9Z7QQ:T8iR:_8x#[cOPXZst!Z!`!o#d#o#{%l&i&l&m&p&r&s&u&y'R'`(|*f+Y+d,k,n,s-d.b/i0V0d1j1z1{1}2P2S2V2X3[4q5y6Z6[6_7Q8i8xQ#YWQ#eYQ%puQ%rvS%tw!gS(Q#W(TQ(W#ZQ(r#uQ(w#xQ)P$OQ)Q$PQ)R$QQ)S$RQ)T$SQ)U$TQ)V$UQ)W$VQ)X$WQ)Y$XQ)[$ZQ)^$_Q)`$aQ)e$eW)o$n)q/Q3{Q+a%sQ+u&QS-U'V2hQ-s'pS-x(R-zQ-}(ZQ.P(bQ.n(vQ.q(xQ.u;vQ.w;yQ.x;zQ.y;}Q/]){Q0j+UQ2c-PQ2f-SQ2v-lQ2}.QQ3c.oQ3h<OQ3i<PQ3j<QQ3k<RQ3l<SQ3m<TQ3n<UQ3o<VQ3p<WQ3q<XQ3r<YQ3s.vQ3t<]Q3w<`Q3x<mQ4P<ZQ5O0lQ5Y0|Q6k<pQ6q2xQ6v3OQ7V3dQ7W<qQ7a<sQ7b<{Q8`5mQ8|6iQ9Q6rQ9[<|Q9b=VQ9c=WQ:c9SQ:y9}Q;R:aQ;x#SR=g=sR#[WR'X!el!tQ!r!v!y!z'^'j'k'l-`-p1g5q5sS'T!e-WU*g$|*X*lS-T'U']S0O*h*nQ0W*oQ2m-^Q4m0UR4r0XR(y#xQ!fQT-_'^-`]!qQ!r'^-`1g5qQ#p]R'g;wR)d$dY!uQ'^-`1g5qQ'i!rS's!v!yS'u!z5sS-o'j'kQ-q'lR2{-pT#kZ%dS#jZ%dS%jm,jU(e#h#i#lS.T(f(gQ.X(hQ0n+ZQ3Q.UU3R.V.W.YS6x3S3TR9T6yd#^W#W#Z%g(R([*W+W.O/hr#gZm#h#i#l%d(f(g(h+Z.U.V.W.Y3S3T6yS*Z$x*_Q/o*[Q1|,jQ2d-QQ4W/kQ6g2[Q7i4XQ8{6hT=_'V+XV#aW%g*WU#`W%g*WS(S#W([U(X#Z+W/hS-V'V+XT-y(R.OV'[!e%h*XQ$lfR)v$qT)k$l)lR3}/PT*]$x*_T*e${*WQ0q+cQ1_,QQ3V.aQ5j1aQ5u1iQ6}3ZQ8g5xQ9W6|Q:Q8fQ:d9VQ:|:SQ;U:fQ;`:}R;c;VnqOXst!Z#d%l&p&r&s&u,n,s2S2VQ&j!VR,c>mOXst!U!V!Z#d%l&g&p&r&s&u,n,s2S2VR,j&mT%km,jR1c,SR,b&eQ&T|R+z&UR+p&OT&n!W&qT&o!W&qT2U,s2V",nodeNames:"\u26A0 ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:378,context:git,nodeProps:[["isolate",-8,5,6,14,35,37,49,51,53,""],["group",-26,9,17,19,66,206,210,214,215,217,220,223,233,235,241,243,245,247,250,256,262,264,266,268,270,272,273,"Statement",-34,13,14,30,33,34,40,49,52,53,55,60,68,70,74,78,80,82,83,108,109,118,119,135,138,140,141,142,143,144,146,147,166,168,170,"Expression",-23,29,31,35,39,41,43,172,174,176,177,179,180,181,183,184,185,187,188,189,200,202,204,205,"Type",-3,86,101,107,"ClassItem"],["openedBy",23,"<",36,"InterpolationStart",54,"[",58,"{",71,"(",159,"JSXStartCloseTag"],["closedBy",-2,24,167,">",38,"InterpolationEnd",48,"]",59,"}",72,")",164,"JSXEndTag"]],propSources:[Oit],skippedNodes:[0,5,6,276],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(X!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(X!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(UpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(UpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Up(X!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Up(X!b'z0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(V#S$h&j'{0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Up(X!b'{0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!n),Q(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(T':f$h&j(X!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(X!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(X!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(X!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(X!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Up(X!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$h&j(Up(X!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$h&j(X!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(X!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(UpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(UpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Up(X!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$h&j(m%1l(Up(X!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$h&j(Up(X!b$[#t(R,2j(c$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$h&j(Up(X!b$[#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$h&j(Up(X!b#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$h&j$P(Ch(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(x+JY$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$h&j#y(Ch(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(W';W$h&j(UpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$h&j(UpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$h&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$c`$h&j(UpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(UpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$c`(UpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!j/.^$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!i!Lf$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$h&j(Up(X!b(S%&f#o(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$h&j(Up(X!b#l(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$h&j(Up(X!bp+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!Z+Jf$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$h&j(Up(X!b!O.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_!Y!L^$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$h&j(Up(X!b#m(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$h&j(Up(X!b!V7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$h&j(X!b!V7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$h&j!V7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$h&j!V7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!V7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!V7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$h&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$h&j(X!b!V7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(X!b!V7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(X!b!V7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(X!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(X!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$h&j(Up!V7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$h&j(Up!V7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Up!V7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Up!V7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(UpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$h&j(UpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$h&j(Up(X!b!V7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Up(X!b!V7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Up(X!b!V7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Up(X!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$h&j(Up(X!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$h&j(Up(X!b'|0/l!V7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$h&j(Up(X!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$h&j(X!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$h&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(X!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$h&j(UpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(UpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Up(X!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$h&j$P(Ch(Up(X!b!V7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Y#t$h&j(Up(X!b!V7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!e$b$h&j#})Lv(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#P-<U(Up(X!b$m7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$j&j(Up(X!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#p(Ch(Up(X!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$P(Ch(Up(X!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#q(Ch(Up(X!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#^*!Y$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#i(Cl$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#q(Ch$e#|$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#q(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#p(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#p(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(p(Ct$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$h&j#z(Ch(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!z$Ip$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!Q0,v$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$h&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$h&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$h&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$h&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$h&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!W#)l$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#w(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$h&j(Up(X!b(_+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$h&j(Up(X!b(R,2j$^#t(c$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$h&j(Up(X!b$^#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X!]#Hb(Up(X!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(w+JY$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z)>v$?V_![(CdtBr$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!o7`$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Up(X!b'z0/l$[#t(R,2j(c$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Up(X!b'{0/l$[#t(R,2j(c$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[vit,yit,bit,_it,2,3,4,5,6,7,8,9,10,11,12,13,14,mit,new _M("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOv~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!S~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(a~~",141,338),new _M("j~RQYZXz{^~^O(O~~aP!P!Qd~iO(P~~",25,321)],topRules:{Script:[0,7],SingleExpression:[1,274],SingleClassItem:[2,275]},dialects:{jsx:0,ts:15091},dynamicPrecedences:{78:1,80:1,92:1,168:1,198:1},specialized:[{term:325,get:t=>wit[t]||-1},{term:341,get:t=>xit[t]||-1},{term:93,get:t=>Sit[t]||-1}],tokenPrec:15116}),OJ=[Va("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Va("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Va("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Va("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Va("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Va(`try {
- \${}
- } catch (\${error}) {
- \${}
- }`,{label:"try",detail:"/ catch block",type:"keyword"}),Va("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Va(`if (\${}) {
- \${}
- } else {
- \${}
- }`,{label:"if",detail:"/ else block",type:"keyword"}),Va(`class \${name} {
- constructor(\${params}) {
- \${}
- }
- }`,{label:"class",detail:"definition",type:"keyword"}),Va('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Va('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Eit=OJ.concat([Va("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Va("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Va("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Ij=new _Ge,wJ=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Kv(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const Tit=["FunctionDeclaration"],kit={FunctionDeclaration:Kv("function"),ClassDeclaration:Kv("class"),ClassExpression:()=>!0,EnumDeclaration:Kv("constant"),TypeAliasDeclaration:Kv("type"),NamespaceDeclaration:Kv("namespace"),VariableDefinition(t,e){t.matchContext(Tit)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function xJ(t,e){let n=Ij.get(e);if(n)return n;let r=[],i=!0;function o(a,s){let l=t.sliceString(a.from,a.to);r.push({label:l,type:s})}return e.cursor(ao.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let s=kit[a.name];if(s&&s(a,o)||wJ.has(a.name))return!1}else if(a.to-a.from>8192){for(let s of xJ(t,a.node))r.push(s);return!1}}),Ij.set(e,r),r}const Bj=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,SJ=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Pit(t){let e=lo(t.state).resolveInner(t.pos,-1);if(SJ.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Bj.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)wJ.has(i.name)&&(r=r.concat(xJ(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:Bj}}const Kh=eb.define({name:"javascript",parser:Cit.configure({props:[xD.add({IfStatement:Gy({except:/^\s*({|else\b)/}),TryStatement:Gy({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:VGe,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:FGe({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Gy({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),CD.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":TG,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),CJ={test:t=>/^JSX/.test(t.name),facet:wG({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Ait=Kh.configure({dialect:"ts"},"typescript"),Mit=Kh.configure({dialect:"jsx",props:[OD.add(t=>t.isTop?[CJ]:void 0)]}),Rit=Kh.configure({dialect:"jsx ts",props:[OD.add(t=>t.isTop?[CJ]:void 0)]},"typescript");let EJ=t=>({label:t,type:"keyword"});const TJ="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(EJ),$it=TJ.concat(["declare","implements","private","protected","public"].map(EJ));function kJ(t={}){let e=t.jsx?t.typescript?Rit:Mit:t.typescript?Ait:Kh,n=t.typescript?Eit.concat($it):OJ.concat(TJ);return new SG(e,[Kh.data.of({autocomplete:oet(SJ,kK(n))}),Kh.data.of({autocomplete:Pit}),t.jsx?Lit:[]])}function Nit(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Fj(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const Dit=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Lit=Xt.inputHandler.of((t,e,n,r,i)=>{if((Dit?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!Kh.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:a}=o,s=a.changeByRange(l=>{var u;let{head:c}=l,d=lo(a).resolveInner(c-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(a.doc.sliceString(c-1,c)!=r||d.name=="JSXAttributeValue"&&d.to>c)){if(r==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:"</>"}};if(r=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,g=h.parent;if(g&&h.from==c-2&&((f=Fj(a.doc,g.firstChild,c))||((u=g.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let m=`${f}>`;return{range:bt.cursor(c+m.length,-1),changes:{from:c,insert:m}}}}else if(r==">"){let h=Nit(d);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(c,c+2))&&(f=Fj(a.doc,h,c)))return{range:l,changes:{from:c,insert:`</${f}>`}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function PJ(t,e){return function(){return t.apply(e,arguments)}}const{toString:Iit}=Object.prototype,{getPrototypeOf:JD}=Object,HC=(t=>e=>{const n=Iit.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),yu=t=>(t=t.toLowerCase(),e=>HC(e)===t),UC=t=>e=>typeof e===t,{isArray:fv}=Array,fb=UC("undefined");function Bit(t){return t!==null&&!fb(t)&&t.constructor!==null&&!fb(t.constructor)&&Rs(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const AJ=yu("ArrayBuffer");function Fit(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&AJ(t.buffer),e}const Vit=UC("string"),Rs=UC("function"),MJ=UC("number"),XC=t=>t!==null&&typeof t=="object",jit=t=>t===!0||t===!1,tw=t=>{if(HC(t)!=="object")return!1;const e=JD(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Qit=yu("Date"),zit=yu("File"),Wit=yu("Blob"),Hit=yu("FileList"),Uit=t=>XC(t)&&Rs(t.pipe),Xit=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Rs(t.append)&&((e=HC(t))==="formdata"||e==="object"&&Rs(t.toString)&&t.toString()==="[object FormData]"))},Zit=yu("URLSearchParams"),[qit,Yit,Git,Kit]=["ReadableStream","Request","Response","Headers"].map(yu),Jit=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function o_(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let r,i;if(typeof t!="object"&&(t=[t]),fv(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),a=o.length;let s;for(r=0;r<a;r++)s=o[r],e.call(null,t[s],s,t)}}function RJ(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Vh=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global)(),$J=t=>!fb(t)&&t!==Vh;function CM(){const{caseless:t}=$J(this)&&this||{},e={},n=(r,i)=>{const o=t&&RJ(e,i)||i;tw(e[o])&&tw(r)?e[o]=CM(e[o],r):tw(r)?e[o]=CM({},r):fv(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&o_(arguments[r],n);return e}const eot=(t,e,n,{allOwnKeys:r}={})=>(o_(e,(i,o)=>{n&&Rs(i)?t[o]=PJ(i,n):t[o]=i},{allOwnKeys:r}),t),tot=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),not=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},rot=(t,e,n,r)=>{let i,o,a;const s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],(!r||r(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=n!==!1&&JD(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},iot=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},oot=t=>{if(!t)return null;if(fv(t))return t;let e=t.length;if(!MJ(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},aot=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&JD(Uint8Array)),sot=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},lot=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},uot=yu("HTMLFormElement"),cot=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Vj=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),dot=yu("RegExp"),NJ=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};o_(n,(i,o)=>{let a;(a=e(i,o,t))!==!1&&(r[o]=a||i)}),Object.defineProperties(t,r)},fot=t=>{NJ(t,(e,n)=>{if(Rs(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(!!Rs(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},hot=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return fv(t)?r(t):r(String(t).split(e)),n},pot=()=>{},got=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function mot(t){return!!(t&&Rs(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const vot=t=>{const e=new Array(10),n=(r,i)=>{if(XC(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=fv(r)?[]:{};return o_(r,(a,s)=>{const l=n(a,i+1);!fb(l)&&(o[s]=l)}),e[i]=void 0,o}}return r};return n(t,0)},yot=yu("AsyncFunction"),bot=t=>t&&(XC(t)||Rs(t))&&Rs(t.then)&&Rs(t.catch),DJ=((t,e)=>t?setImmediate:e?((n,r)=>(Vh.addEventListener("message",({source:i,data:o})=>{i===Vh&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Vh.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Rs(Vh.postMessage)),_ot=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Vh):typeof process!="undefined"&&process.nextTick||DJ;var ct={isArray:fv,isArrayBuffer:AJ,isBuffer:Bit,isFormData:Xit,isArrayBufferView:Fit,isString:Vit,isNumber:MJ,isBoolean:jit,isObject:XC,isPlainObject:tw,isReadableStream:qit,isRequest:Yit,isResponse:Git,isHeaders:Kit,isUndefined:fb,isDate:Qit,isFile:zit,isBlob:Wit,isRegExp:dot,isFunction:Rs,isStream:Uit,isURLSearchParams:Zit,isTypedArray:aot,isFileList:Hit,forEach:o_,merge:CM,extend:eot,trim:Jit,stripBOM:tot,inherits:not,toFlatObject:rot,kindOf:HC,kindOfTest:yu,endsWith:iot,toArray:oot,forEachEntry:sot,matchAll:lot,isHTMLForm:uot,hasOwnProperty:Vj,hasOwnProp:Vj,reduceDescriptors:NJ,freezeMethods:fot,toObjectSet:hot,toCamelCase:cot,noop:pot,toFiniteNumber:got,findKey:RJ,global:Vh,isContextDefined:$J,isSpecCompliantForm:mot,toJSONObject:vot,isAsyncFn:yot,isThenable:bot,setImmediate:DJ,asap:_ot};function Yn(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}ct.inherits(Yn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ct.toJSONObject(this.config),code:this.code,status:this.status}}});const LJ=Yn.prototype,IJ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{IJ[t]={value:t}});Object.defineProperties(Yn,IJ);Object.defineProperty(LJ,"isAxiosError",{value:!0});Yn.from=(t,e,n,r,i,o)=>{const a=Object.create(LJ);return ct.toFlatObject(t,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Yn.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};var Oot=null;function EM(t){return ct.isPlainObject(t)||ct.isArray(t)}function BJ(t){return ct.endsWith(t,"[]")?t.slice(0,-2):t}function jj(t,e,n){return t?t.concat(e).map(function(i,o){return i=BJ(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function wot(t){return ct.isArray(t)&&!t.some(EM)}const xot=ct.toFlatObject(ct,{},null,function(e){return/^is[A-Z]/.test(e)});function ZC(t,e,n){if(!ct.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=ct.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!ct.isUndefined(y[m])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&ct.isSpecCompliantForm(e);if(!ct.isFunction(i))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(ct.isDate(g))return g.toISOString();if(!l&&ct.isBlob(g))throw new Yn("Blob is not supported. Use a Buffer instead.");return ct.isArrayBuffer(g)||ct.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,y){let b=g;if(g&&!y&&typeof g=="object"){if(ct.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(ct.isArray(g)&&wot(g)||(ct.isFileList(g)||ct.endsWith(m,"[]"))&&(b=ct.toArray(g)))return m=BJ(m),b.forEach(function(O,x){!(ct.isUndefined(O)||O===null)&&e.append(a===!0?jj([m],x,o):a===null?m:m+"[]",u(O))}),!1}return EM(g)?!0:(e.append(jj(y,m,o),u(g)),!1)}const d=[],f=Object.assign(xot,{defaultVisitor:c,convertValue:u,isVisitable:EM});function h(g,m){if(!ct.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),ct.forEach(g,function(b,w){(!(ct.isUndefined(b)||b===null)&&i.call(e,b,ct.isString(w)?w.trim():w,m,f))===!0&&h(b,m?m.concat(w):[w])}),d.pop()}}if(!ct.isObject(t))throw new TypeError("data must be an object");return h(t),e}function Qj(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function eL(t,e){this._pairs=[],t&&ZC(t,this,e)}const FJ=eL.prototype;FJ.append=function(e,n){this._pairs.push([e,n])};FJ.toString=function(e){const n=e?function(r){return e.call(this,r,Qj)}:Qj;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Sot(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function VJ(t,e,n){if(!e)return t;const r=n&&n.encode||Sot;ct.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(e,n):o=ct.isURLSearchParams(e)?e.toString():new eL(e,n).toString(r),o){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Cot{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ct.forEach(this.handlers,function(r){r!==null&&e(r)})}}var zj=Cot,jJ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Eot=typeof URLSearchParams!="undefined"?URLSearchParams:eL,Tot=typeof FormData!="undefined"?FormData:null,kot=typeof Blob!="undefined"?Blob:null,Pot={isBrowser:!0,classes:{URLSearchParams:Eot,FormData:Tot,Blob:kot},protocols:["http","https","file","blob","url","data"]};const tL=typeof window!="undefined"&&typeof document!="undefined",TM=typeof navigator=="object"&&navigator||void 0,Aot=tL&&(!TM||["ReactNative","NativeScript","NS"].indexOf(TM.product)<0),Mot=(()=>typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Rot=tL&&window.location.href||"http://localhost";var $ot=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:tL,hasStandardBrowserWebWorkerEnv:Mot,hasStandardBrowserEnv:Aot,navigator:TM,origin:Rot},Symbol.toStringTag,{value:"Module"})),oa={...$ot,...Pot};function Not(t,e){return ZC(t,new oa.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return oa.isNode&&ct.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Dot(t){return ct.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Lot(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function QJ(t){function e(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&ct.isArray(i)?i.length:a,l?(ct.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!ct.isObject(i[a]))&&(i[a]=[]),e(n,r,i[a],o)&&ct.isArray(i[a])&&(i[a]=Lot(i[a])),!s)}if(ct.isFormData(t)&&ct.isFunction(t.entries)){const n={};return ct.forEachEntry(t,(r,i)=>{e(Dot(r),i,n,0)}),n}return null}function Iot(t,e,n){if(ct.isString(t))try{return(e||JSON.parse)(t),ct.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const nL={transitional:jJ,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=ct.isObject(e);if(o&&ct.isHTMLForm(e)&&(e=new FormData(e)),ct.isFormData(e))return i?JSON.stringify(QJ(e)):e;if(ct.isArrayBuffer(e)||ct.isBuffer(e)||ct.isStream(e)||ct.isFile(e)||ct.isBlob(e)||ct.isReadableStream(e))return e;if(ct.isArrayBufferView(e))return e.buffer;if(ct.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Not(e,this.formSerializer).toString();if((s=ct.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ZC(s?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Iot(e)):e}],transformResponse:[function(e){const n=this.transitional||nL.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ct.isResponse(e)||ct.isReadableStream(e))return e;if(e&&ct.isString(e)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(s){if(a)throw s.name==="SyntaxError"?Yn.from(s,Yn.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:oa.classes.FormData,Blob:oa.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ct.forEach(["delete","get","head","post","put","patch"],t=>{nL.headers[t]={}});var rL=nL;const Bot=ct.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Fot=t=>{const e={};let n,r,i;return t&&t.split(`
- `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||e[n]&&Bot[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};const Wj=Symbol("internals");function Jv(t){return t&&String(t).trim().toLowerCase()}function nw(t){return t===!1||t==null?t:ct.isArray(t)?t.map(nw):String(t)}function Vot(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const jot=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function W2(t,e,n,r,i){if(ct.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!ct.isString(e)){if(ct.isString(r))return e.indexOf(r)!==-1;if(ct.isRegExp(r))return r.test(e)}}function Qot(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function zot(t,e){const n=ct.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,a){return this[r].call(this,e,i,o,a)},configurable:!0})})}class qC{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(s,l,u){const c=Jv(l);if(!c)throw new Error("header name must be a non-empty string");const d=ct.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=nw(s))}const a=(s,l)=>ct.forEach(s,(u,c)=>o(u,c,l));if(ct.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(ct.isString(e)&&(e=e.trim())&&!jot(e))a(Fot(e),n);else if(ct.isHeaders(e))for(const[s,l]of e.entries())o(l,s,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=Jv(e),e){const r=ct.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return Vot(i);if(ct.isFunction(n))return n.call(this,i,r);if(ct.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Jv(e),e){const r=ct.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||W2(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(a){if(a=Jv(a),a){const s=ct.findKey(r,a);s&&(!n||W2(r,r[s],s,n))&&(delete r[s],i=!0)}}return ct.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||W2(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return ct.forEach(this,(i,o)=>{const a=ct.findKey(r,o);if(a){n[a]=nw(i),delete n[o];return}const s=e?Qot(o):String(o).trim();s!==o&&delete n[o],n[s]=nw(i),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ct.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&ct.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Wj]=this[Wj]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Jv(a);r[s]||(zot(i,a),r[s]=!0)}return ct.isArray(e)?e.forEach(o):o(e),this}}qC.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ct.reduceDescriptors(qC.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});ct.freezeMethods(qC);var au=qC;function H2(t,e){const n=this||rL,r=e||n,i=au.from(r.headers);let o=r.data;return ct.forEach(t,function(s){o=s.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function zJ(t){return!!(t&&t.__CANCEL__)}function hv(t,e,n){Yn.call(this,t==null?"canceled":t,Yn.ERR_CANCELED,e,n),this.name="CanceledError"}ct.inherits(hv,Yn,{__CANCEL__:!0});function WJ(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Yn("Request failed with status code "+n.status,[Yn.ERR_BAD_REQUEST,Yn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Wot(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Hot(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=r[o];a||(a=u),n[i]=l,r[i]=u;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-a<e)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function Uot(t,e){let n=0,r=1e3/e,i,o;const a=(u,c=Date.now())=>{n=c,i=null,o&&(clearTimeout(o),o=null),t.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?a(u,c):(i=u,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const tS=(t,e,n=3)=>{let r=0;const i=Hot(50,250);return Uot(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,l=a-r,u=i(l),c=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-a)/u:void 0,event:o,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(d)},n)},Hj=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Uj=t=>(...e)=>ct.asap(()=>t(...e));var Xot=oa.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,oa.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(oa.origin),oa.navigator&&/(msie|trident)/i.test(oa.navigator.userAgent)):()=>!0,Zot=oa.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const a=[t+"="+encodeURIComponent(e)];ct.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),ct.isString(r)&&a.push("path="+r),ct.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qot(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Yot(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function HJ(t,e,n){let r=!qot(e);return t&&(r||n==!1)?Yot(t,e):e}const Xj=t=>t instanceof au?{...t}:t;function vp(t,e){e=e||{};const n={};function r(u,c,d,f){return ct.isPlainObject(u)&&ct.isPlainObject(c)?ct.merge.call({caseless:f},u,c):ct.isPlainObject(c)?ct.merge({},c):ct.isArray(c)?c.slice():c}function i(u,c,d,f){if(ct.isUndefined(c)){if(!ct.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function o(u,c){if(!ct.isUndefined(c))return r(void 0,c)}function a(u,c){if(ct.isUndefined(c)){if(!ct.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,d){if(d in e)return r(u,c);if(d in t)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(u,c,d)=>i(Xj(u),Xj(c),d,!0)};return ct.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||i,f=d(t[c],e[c],c);ct.isUndefined(f)&&d!==s||(n[c]=f)}),n}var UJ=t=>{const e=vp({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=e;e.headers=a=au.from(a),e.url=VJ(HJ(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(ct.isFormData(n)){if(oa.hasStandardBrowserEnv||oa.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...c].join("; "))}}if(oa.hasStandardBrowserEnv&&(r&&ct.isFunction(r)&&(r=r(e)),r||r!==!1&&Xot(e.url))){const u=i&&o&&Zot.read(o);u&&a.set(i,u)}return e};const Got=typeof XMLHttpRequest!="undefined";var Kot=Got&&function(t){return new Promise(function(n,r){const i=UJ(t);let o=i.data;const a=au.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,d,f,h,g;function m(){h&&h(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function b(){if(!y)return;const O=au.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:O,config:t,request:y};WJ(function(E){n(E),m()},function(E){r(E),m()},S),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){!y||(r(new Yn("Request aborted",Yn.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new Yn("Network Error",Yn.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||jJ;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new Yn(x,S.clarifyTimeoutError?Yn.ETIMEDOUT:Yn.ECONNABORTED,t,y)),y=null},o===void 0&&a.setContentType(null),"setRequestHeader"in y&&ct.forEach(a.toJSON(),function(x,S){y.setRequestHeader(S,x)}),ct.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),s&&s!=="json"&&(y.responseType=i.responseType),u&&([f,g]=tS(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,h]=tS(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=O=>{!y||(r(!O||O.type?new hv(null,t,y):O),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const w=Wot(i.url);if(w&&oa.protocols.indexOf(w)===-1){r(new Yn("Unsupported protocol "+w+":",Yn.ERR_BAD_REQUEST,t));return}y.send(o||null)})};const Jot=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Yn?c:new hv(c instanceof Error?c.message:c))}};let a=e&&setTimeout(()=>{a=null,o(new Yn(`timeout ${e} of ms exceeded`,Yn.ETIMEDOUT))},e);const s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>ct.asap(s),l}};var eat=Jot;const tat=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},nat=async function*(t,e){for await(const n of rat(t))yield*tat(n,e)},rat=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Zj=(t,e,n,r)=>{const i=nat(t,e);let o=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let d=c.byteLength;if(n){let f=o+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},YC=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",XJ=YC&&typeof ReadableStream=="function",iat=YC&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ZJ=(t,...e)=>{try{return!!t(...e)}catch{return!1}},oat=XJ&&ZJ(()=>{let t=!1;const e=new Request(oa.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),qj=64*1024,kM=XJ&&ZJ(()=>ct.isReadableStream(new Response("").body)),nS={stream:kM&&(t=>t.body)};YC&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!nS[e]&&(nS[e]=ct.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Yn(`Response type '${e}' is not supported`,Yn.ERR_NOT_SUPPORT,r)})})})(new Response);const aat=async t=>{if(t==null)return 0;if(ct.isBlob(t))return t.size;if(ct.isSpecCompliantForm(t))return(await new Request(oa.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(ct.isArrayBufferView(t)||ct.isArrayBuffer(t))return t.byteLength;if(ct.isURLSearchParams(t)&&(t=t+""),ct.isString(t))return(await iat(t)).byteLength},sat=async(t,e)=>{const n=ct.toFiniteNumber(t.getContentLength());return n==null?aat(e):n};var lat=YC&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=UJ(t);u=u?(u+"").toLowerCase():"text";let h=eat([i,o&&o.toAbortSignal()],a),g;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(l&&oat&&n!=="get"&&n!=="head"&&(y=await sat(c,r))!==0){let S=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(ct.isFormData(r)&&(C=S.headers.get("content-type"))&&c.setContentType(C),S.body){const[E,T]=Hj(y,tS(Uj(l)));r=Zj(S.body,qj,E,T)}}ct.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;g=new Request(e,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let w=await fetch(g);const O=kM&&(u==="stream"||u==="response");if(kM&&(s||O&&m)){const S={};["status","statusText","headers"].forEach(P=>{S[P]=w[P]});const C=ct.toFiniteNumber(w.headers.get("content-length")),[E,T]=s&&Hj(C,tS(Uj(s),!0))||[];w=new Response(Zj(w.body,qj,E,()=>{T&&T(),m&&m()}),S)}u=u||"text";let x=await nS[ct.findKey(nS,u)||"text"](w,t);return!O&&m&&m(),await new Promise((S,C)=>{WJ(S,C,{data:x,headers:au.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:g})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Yn("Network Error",Yn.ERR_NETWORK,t,g),{cause:b.cause||b}):Yn.from(b,b&&b.code,t,g)}});const PM={http:Oot,xhr:Kot,fetch:lat};ct.forEach(PM,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Yj=t=>`- ${t}`,uat=t=>ct.isFunction(t)||t===null||t===!1;var qJ={getAdapter:t=>{t=ct.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){n=t[o];let a;if(r=n,!uat(n)&&(r=PM[(a=String(n)).toLowerCase()],r===void 0))throw new Yn(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+o]=r}if(!r){const o=Object.entries(i).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?o.length>1?`since :
- `+o.map(Yj).join(`
- `):" "+Yj(o[0]):"as no adapter specified";throw new Yn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:PM};function U2(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new hv(null,t)}function Gj(t){return U2(t),t.headers=au.from(t.headers),t.data=H2.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),qJ.getAdapter(t.adapter||rL.adapter)(t).then(function(r){return U2(t),r.data=H2.call(t,t.transformResponse,r),r.headers=au.from(r.headers),r},function(r){return zJ(r)||(U2(t),r&&r.response&&(r.response.data=H2.call(t,t.transformResponse,r.response),r.response.headers=au.from(r.response.headers))),Promise.reject(r)})}const YJ="1.8.4",GC={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{GC[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Kj={};GC.transitional=function(e,n,r){function i(o,a){return"[Axios v"+YJ+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(e===!1)throw new Yn(i(a," has been removed"+(n?" in "+n:"")),Yn.ERR_DEPRECATED);return n&&!Kj[a]&&(Kj[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,a,s):!0}};GC.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function cat(t,e,n){if(typeof t!="object")throw new Yn("options must be an object",Yn.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],a=e[o];if(a){const s=t[o],l=s===void 0||a(s,o,t);if(l!==!0)throw new Yn("option "+o+" must be "+l,Yn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Yn("Unknown option "+o,Yn.ERR_BAD_OPTION)}}var rw={assertOptions:cat,validators:GC};const ku=rw.validators;class rS{constructor(e){this.defaults=e,this.interceptors={request:new zj,response:new zj}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
- `+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=vp(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&rw.assertOptions(r,{silentJSONParsing:ku.transitional(ku.boolean),forcedJSONParsing:ku.transitional(ku.boolean),clarifyTimeoutError:ku.transitional(ku.boolean)},!1),i!=null&&(ct.isFunction(i)?n.paramsSerializer={serialize:i}:rw.assertOptions(i,{encode:ku.function,serialize:ku.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),rw.assertOptions(n,{baseUrl:ku.spelling("baseURL"),withXsrfToken:ku.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&ct.merge(o.common,o[n.method]);o&&ct.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=au.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const g=[Gj.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);d<f;)c=c.then(g[d++],g[d++]);return c}f=s.length;let h=n;for(d=0;d<f;){const g=s[d++],m=s[d++];try{h=g(h)}catch(y){m.call(this,y);break}}try{c=Gj.call(this,h)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=vp(this.defaults,e);const n=HJ(e.baseURL,e.url,e.allowAbsoluteUrls);return VJ(n,e.params,e.paramsSerializer)}}ct.forEach(["delete","get","head","options"],function(e){rS.prototype[e]=function(n,r){return this.request(vp(r||{},{method:e,url:n,data:(r||{}).data}))}});ct.forEach(["post","put","patch"],function(e){function n(r){return function(o,a,s){return this.request(vp(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}rS.prototype[e]=n(),rS.prototype[e+"Form"]=n(!0)});var iw=rS;class iL{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},e(function(o,a,s){r.reason||(r.reason=new hv(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new iL(function(i){e=i}),cancel:e}}}var dat=iL;function fat(t){return function(n){return t.apply(null,n)}}function hat(t){return ct.isObject(t)&&t.isAxiosError===!0}const AM={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(AM).forEach(([t,e])=>{AM[e]=t});var pat=AM;function GJ(t){const e=new iw(t),n=PJ(iw.prototype.request,e);return ct.extend(n,iw.prototype,e,{allOwnKeys:!0}),ct.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return GJ(vp(t,i))},n}const Ki=GJ(rL);Ki.Axios=iw;Ki.CanceledError=hv;Ki.CancelToken=dat;Ki.isCancel=zJ;Ki.VERSION=YJ;Ki.toFormData=ZC;Ki.AxiosError=Yn;Ki.Cancel=Ki.CanceledError;Ki.all=function(e){return Promise.all(e)};Ki.spread=fat;Ki.isAxiosError=hat;Ki.mergeConfig=vp;Ki.AxiosHeaders=au;Ki.formToJSON=t=>QJ(ct.isHTMLForm(t)?new FormData(t):t);Ki.getAdapter=qJ.getAdapter;Ki.HttpStatusCode=pat;Ki.default=Ki;var gat=Ki;const mat=localStorage.getItem("token"),vat=gat.create({baseURL:window.allEnv.rule.iotServer,timeout:6e4,headers:{"Content-Type":"application/json",Authorization:`Bearer ${mat}`}});function Jj(t,e){return vat.get(t,{params:e})}const yat={class:"node-property-item"},bat={key:0},_at={key:1},Oat={class:"pair-content"},wat={key:2},xat={key:3},Sat={key:4},Cat={class:"pair-content"},Eat={key:5},Tat={class:"pair-content"},kat={key:6},Pat={class:"node-property-sub-item"},Aat={key:7},Mat={key:8},Rat={key:9},$at={key:10},Nat={__name:"NodePropertyItem",props:["nodePropertyForm","configuration","fields","parentField","currentNodeModel","lf"],setup(t,{expose:e}){const{nodePropertyForm:n,configuration:r,fields:i,parentField:o,currentNodeModel:a,lf:s}=t;F("");const l=[kJ()],u=F(),c=F(),d=F([]);F({}),F({});const f=F(null),h=F("300px");(i||[]).forEach($=>{if($.component&&$.component.type==="select"&&$.component.defineOptions&&($.component.options=$.component.defineOptions||[]),$.component&&$.component.type==="select"&&$.component.optionApi&&$.component.autoGetData){$.component.loading=!0,Jj($.component.optionApi,$.component.apiParams).then(I=>{$.component.options=($.component.defineOptions||[]).concat(I.data.data[$.component.resDataKey]||[])}).finally(()=>$.component.loading=!1);const N=r[$.name],z=$.component.onChangeGetDataKey;z&&m(N,z,!0)}});function m($,N,z=!1){if(!$)return;const I=i.find(L=>L.name===N);!I||(z||(r[N]=I.component.defineOptions?I.component.defineOptions[0].value:null),I.component.options=I.component.defineOptions||[],I.component.loading=!0,Jj(I.component.optionApi,{[I.component.getDataByKey]:$}).then(L=>{I.component.options=(I.component.defineOptions||[]).concat(L.data.data[I.component.resDataKey]||[])}).finally(()=>I.component.loading=!1))}const y=function($){r[$]=db.js(r[$],{indent_size:2})},b=()=>{Ur.isEnabled&&(Ur.isFullscreen?Ur.exit():(h.value="100%",Ur.request(f.value[0])))};Ur.on("change",()=>{Ur.isFullscreen?h.value="100%":h.value="300px"}),function(){let $={};if(i&&i.forEach(N=>{$[N.name]=N}),r){let N={},z={};for(let I in r){let L=Dn(r[I]),X=$[I];if(!(!X||X.component)){if(L&&L instanceof Array)N[I]=[],L.forEach(Q=>{N[I].push({key:Q})});else if(L&&typeof L=="object"&&X.type!=="struct"){z[I]=[];for(let Q in L)z[I].push({key:Q,value:L[Q]})}}}r.arrayItemValues=N,r.mapItemValues=z}}();const O=$=>{r.mapItemValues[$]?r.mapItemValues[$].push({key:"",value:""}):r.mapItemValues[$]=[{key:"",value:""}]},x=($,N)=>{r.mapItemValues[$]&&r.mapItemValues[$].splice(N,1)},S=$=>{r.arrayItemValues[$]?r.arrayItemValues[$].push({key:"",value:""}):r.arrayItemValues[$]=[{key:"",value:""}]},C=($,N)=>{r.arrayItemValues[$]&&r.arrayItemValues[$].splice(N,1)},E=$=>{r[$]||(r[$]=[]),r[$].push({case:"",then:""})},T=($,N)=>{r[$]&&r[$].length>N&&r[$].splice(N,1)},P=$=>$.indexOf("int")>-1,A=$=>$.indexOf("float")>-1;return e({submit:$=>{if(!u.value){$&&$(!1);return}return u.value.validate(N=>($&&$(N),N))}}),($,N)=>{const z=Ym,I=aC,L=Pl,X=co,Q=fo,W=hi,G=lr,K=Jc,oe=wl,ne=KS,_e=GS,Ce=kl;return R(),xe(Ce,{model:t.configuration,ref_key:"propertyItemFormRef",ref:u,"label-position":"top","label-width":"auto",class:"rulego-editor-property-form"},{default:j(()=>[(R(!0),Y(dt,null,Ht(t.fields,(U,ie)=>(R(),Y("div",yat,[U.type==="Boolean"||U.type==="bool"?(R(),Y("div",bat,[B(L,{label:U.label||U.name,prop:U.name},{default:j(()=>[B(z,{modelValue:t.configuration[U.name],"onUpdate:modelValue":ee=>t.configuration[U.name]=ee,class:"ml-2",style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},{default:j(()=>[Ue(Ve(U.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]),B(I,{class:"mx-1"},{default:j(()=>[Ue(Ve(U.label),1)]),_:2},1024),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)]),_:2},1032,["label","prop"])])):U.component&&U.component.type==="switchNode"?(R(),Y("div",_at,[B(L,{label:U.label||U.name,rules:U.rules,prop:U.name},{default:j(()=>[J("div",Oat,[B(Q,{class:"pair-item-header"},{default:j(()=>[B(X,{span:12},{default:j(()=>[Ue(" \u6761\u4EF6 ")]),_:1}),B(X,{span:6,offset:1},{default:j(()=>[Ue(" \u8DEF\u7531 ")]),_:1})]),_:1}),(R(!0),Y(dt,null,Ht(t.configuration[U.name],(ee,he)=>(R(),xe(Q,{key:he,class:"pair-item"},{default:j(()=>[B(X,{span:12},{default:j(()=>[B(W,{modelValue:ee.case,"onUpdate:modelValue":$e=>ee.case=$e,rules:[{required:!0,message:"\u6761\u4EF6\u662F\u5FC5\u987B\u7684"}],prop:U.name+"["+he+"].case",placeholder:"\u8F93\u5165\u5224\u65AD\u6761\u4EF6\uFF0C\u5982\uFF1Amsg.temperature > 50"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(X,{span:6,offset:1},{default:j(()=>[B(W,{modelValue:ee.then,"onUpdate:modelValue":$e=>ee.then=$e,rules:[{required:!0,message:"\u8DEF\u7531\u662F\u5FC5\u987B\u7684"}],prop:U.name+"["+he+"].then",placeholder:"\u8F93\u5165\u8DEF\u7531\uFF1A\u5982\uFF1ACase1"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(X,{span:2,offset:1},{default:j(()=>[B(G,{icon:p(Oa),onClick:$e=>T(U.name,he),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(Q,null,{default:j(()=>[B(X,{span:24},{default:j(()=>[B(G,{type:"primary",onClick:ee=>E(U.name),icon:"el-icon-plus"},{default:j(()=>[Ue("\u6DFB\u52A0\u5206\u652F")]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):U.component&&U.component.type==="select"?(R(),Y("div",wat,[!U.component.getDataByKey||t.configuration[U.component.getDataByKey]?(R(),xe(L,{key:0,label:U.label||U.name,rules:U.rules,prop:U.name},{default:j(()=>[B(oe,{modelValue:t.configuration[U.name],"onUpdate:modelValue":ee=>t.configuration[U.name]=ee,multiple:U.component&&U.component.multiple,filterable:U.component&&U.component.filterable,"allow-create":U.component&&U.component.allowCreate,placeholder:U.component&&U.component.placeholder,onChange:ee=>m(ee,U.component.onChangeGetDataKey)},{default:j(()=>[(R(!0),Y(dt,null,Ht(U.component.options,ee=>(R(),xe(K,{key:ee.value!==void 0&&ee.value!==null?ee.value:ee,label:ee[U.component.resDataLabelKey]||ee.label||ee,value:ee[U.component.resDataValueKey]||(ee.value!==void 0&&ee.value!==null?ee.value:ee)},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","filterable","allow-create","placeholder","onChange"]),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])):Se("",!0)])):U.component&&U.component.type==="textarea"?(R(),Y("div",xat,[B(L,{label:U.label||U.name,rules:U.rules,prop:U.name},{default:j(()=>{var ee;return[B(W,{type:"textarea",rows:((ee=U==null?void 0:U.component)==null?void 0:ee.rows)||2,modelValue:t.configuration[U.name],"onUpdate:modelValue":he=>t.configuration[U.name]=he},null,8,["rows","modelValue","onUpdate:modelValue"]),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)]}),_:2},1032,["label","rules","prop"])])):U.type==="map"?(R(),Y("div",Sat,[B(L,{label:U.label||U.name,rules:U.rules,prop:"mapItemValues["+U.name+"]"},{default:j(()=>[J("div",Cat,[B(Q,{class:"pair-item-header"},{default:j(()=>[B(X,{span:8},{default:j(()=>[Ue(" \u952E ")]),_:1}),B(X,{span:8,offset:2},{default:j(()=>[Ue(" \u503C ")]),_:1})]),_:1}),(R(!0),Y(dt,null,Ht(t.configuration.mapItemValues[U.name],(ee,he)=>(R(),xe(Q,{key:he,class:"pair-item"},{default:j(()=>[B(X,{span:8},{default:j(()=>[B(W,{modelValue:ee.key,"onUpdate:modelValue":$e=>ee.key=$e,rules:[{required:!0,message:"key\u662F\u5FC5\u987B\u7684"}],prop:"mapItemValues["+U.name+"]["+ee.key+"]",placeholder:"\u8BF7\u8F93\u5165\u952E"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(X,{span:8,offset:2},{default:j(()=>[B(W,{modelValue:ee.value,"onUpdate:modelValue":$e=>ee.value=$e,rules:[{required:!0,message:"value\u662F\u5FC5\u987B\u7684"}],prop:"configuration[item.name][pair.key]",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),B(X,{span:4,offset:2},{default:j(()=>[B(G,{icon:p(Oa),onClick:$e=>x(U.name,he),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(Q,null,{default:j(()=>[B(G,{type:"primary",icon:p(yw),onClick:ee=>O(U.name)},{default:j(()=>[Ue("\u6DFB\u52A0")]),_:2},1032,["icon","onClick"])]),_:2},1024),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)])]),_:2},1032,["label","rules","prop"])])):U.type==="array"?(R(),Y("div",Eat,[B(L,{label:U.label||U.name,rules:U.rules,prop:"arrayItemValues["+U.name+"].0.key"},{default:j(()=>[J("div",Tat,[(R(!0),Y(dt,null,Ht(t.configuration.arrayItemValues[U.name],(ee,he)=>(R(),xe(Q,{key:he,class:"pair-item"},{default:j(()=>[B(X,{span:12},{default:j(()=>[B(W,{modelValue:ee.key,"onUpdate:modelValue":$e=>ee.key=$e,placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),B(X,{span:4,offset:2},{default:j(()=>[B(G,{icon:p(Oa),onClick:$e=>C(U.name,he),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(Q,null,{default:j(()=>[B(G,{type:"primary",icon:p(yw),onClick:ee=>S(U.name)},{default:j(()=>[Ue("\u6DFB\u52A0")]),_:2},1032,["icon","onClick"])]),_:2},1024)]),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):U.type==="struct"?(R(),Y("div",kat,[B(_e,{modelValue:d.value,"onUpdate:modelValue":N[0]||(N[0]=ee=>d.value=ee)},{default:j(()=>[B(ne,{name:U.name},{title:j(()=>[Ue(Ve(U.label||U.name),1)]),default:j(()=>[J("div",Pat,[B(KJ,{ref_for:!0,ref_key:"subPropertyItemFormRef",ref:c,configuration:t.configuration[U.name],fields:U.fields},null,8,["configuration","fields"])])]),_:2},1032,["name"])]),_:2},1032,["modelValue"])])):U.name==="jsScript"||U.name==="JsScript"||U.name==="script"||U.component&&U.component.type==="codeEditor"?(R(),Y("div",Aat,[B(L,{rules:U.rules,prop:"item.name"},{label:j(()=>[B(Q,null,{default:j(()=>[B(X,{span:20},{default:j(()=>[J("label",null,Ve(U.label||U.name),1)]),_:2},1024),B(X,{span:4,style:{"text-align":"right"}},{default:j(()=>[B(G,{type:"info",size:"small",round:"",onClick:ee=>y(U.name)},{default:j(()=>[Ue("\u6574\u7406")]),_:2},1032,["onClick"]),B(G,{icon:p(Hm),size:"small",onClick:b,circle:""},null,8,["icon"])]),_:2},1024)]),_:2},1024)]),default:j(()=>[B(Q,{style:{height:"300px",width:"100%"}},{default:j(()=>[B(X,{span:24},{default:j(()=>[J("div",{ref_for:!0,ref_key:"codeEditorRef",ref:f},[B(p(Vu),{modelValue:t.configuration[U.name],"onUpdate:modelValue":ee=>t.configuration[U.name]=ee,placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9...",style:vt({height:h.value,width:"100%",background:"#ffff"}),autofocus:!0,tabSize:2,extensions:l},null,8,["modelValue","onUpdate:modelValue","style"])],512)]),_:2},1024)]),_:2},1024),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)]),_:2},1032,["rules"])])):P(U.type)?(R(),Y("div",Mat,[B(L,{label:U.label||U.name,rules:U.rules,prop:U.name},{default:j(()=>[B(W,{modelValue:t.configuration[U.name],"onUpdate:modelValue":ee=>t.configuration[U.name]=ee,modelModifiers:{number:!0}},null,8,["modelValue","onUpdate:modelValue"]),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):A(U.type)?(R(),Y("div",Rat,[B(L,{label:U.label||U.name,rules:U.rules,prop:U.name},{default:j(()=>[B(W,{modelValue:t.configuration[U.name],"onUpdate:modelValue":ee=>t.configuration[U.name]=ee},null,8,["modelValue","onUpdate:modelValue"]),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):(R(),Y("div",$at,[B(L,{label:U.label||U.name,rules:U.rules,prop:U.name},{default:j(()=>[U.component&&U.component.type==="select"?(R(),xe(oe,{key:0,modelValue:t.configuration[U.name],"onUpdate:modelValue":ee=>t.configuration[U.name]=ee,multiple:U.component&&U.component.multiple,filterable:U.component&&U.component.filterable,"allow-create":U.component&&U.component.allowCreate,placeholder:U.component&&U.component.placeholder},{default:j(()=>[(R(!0),Y(dt,null,Ht(U.component.options,ee=>(R(),xe(K,{key:ee.value!==void 0&&ee.value!==null?ee.value:ee,label:ee.label||ee,value:ee.value!==void 0&&ee.value!==null?ee.value:ee},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","filterable","allow-create","placeholder"])):(R(),xe(W,{key:1,modelValue:t.configuration[U.name],"onUpdate:modelValue":ee=>t.configuration[U.name]=ee},null,8,["modelValue","onUpdate:modelValue"])),B(I,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(U.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])]))]))),256))]),_:1},8,["model"])}}};var KJ=Ml(Nat,[["__scopeId","data-v-40d221cb"]]);const Dat={class:""},Lat={__name:"NodePropertyForm",props:["showDrawer","currentNodeModel","currentNodeView","lf"],setup(t,{expose:e}){const{showDrawer:n,currentNodeModel:r,currentNodeView:i,lf:o}=t;F(""),kJ();const a=F(),s=F();F({}),F({});const l=vn({nodeId:r.nodeId,id:r.id,type:r.type,name:r.name,configuration:r.configuration||{},debugMode:r.debugMode,additionalInfo:r.additionalInfo||{}});(function(){r.configuration||(r.configuration={}),i.fields&&(i.fields.forEach(h=>{!r.configuration.hasOwnProperty(h.name)&&(h.defaultValue||h.defaultValue===0)&&(r.configuration[h.name]=h.defaultValue)}),l.configuration=r.configuration)})();const c=()=>(d(l.configuration),l),d=h=>{for(let g in h.mapItemValues){let m=h.mapItemValues[g];m&&(h[g]={},m.forEach(y=>{y.key!==""&&(h[g][y.key]=y.value)}))}for(let g in h.arrayItemValues){let m=h.arrayItemValues[g];m&&(h[g]=[],m.forEach(y=>{y.key!==""&&h[g].push(y.key)}))}delete h.mapItemValues,delete h.arrayItemValues;for(let g in h)typeof h[g]=="object"&&d(h[g]);return h};return e({getFormModel:c,submit:h=>(a.value||h&&h(!1),a.value.validate(g=>g?s.value.submit(h):(h&&h(g),g)))}),(h,g)=>{const m=hi,y=co,b=Ym,w=aC,O=fo,x=Pl,S=kl;return R(),Y("div",Dat,[B(S,{model:l,ref_key:"nodePropertyFormRef",ref:a,"label-position":"top","label-width":"auto"},{default:j(()=>[B(x,{label:"\u8282\u70B9ID",rules:[{required:!0,message:"ID\u662F\u5FC5\u987B\u7684"}],prop:"id"},{default:j(()=>[B(O,{style:{width:"100%"}},{default:j(()=>[B(y,{span:16},{default:j(()=>[B(m,{modelValue:l.id,"onUpdate:modelValue":g[0]||(g[0]=C=>l.id=C),placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9ID"},null,8,["modelValue"])]),_:1}),B(y,{span:7,offset:1},{default:j(()=>[B(b,{class:"ml-2",modelValue:l.debugMode,"onUpdate:modelValue":g[1]||(g[1]=C=>l.debugMode=C),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(w,{class:"mx-1",prop:"debugMode",onClick:g[2]||(g[2]=C=>l.debugMode=!l.debugMode)},{default:j(()=>[Ue(" \u8C03\u8BD5\u6A21\u5F0F ")]),_:1})]),_:1})]),_:1})]),_:1}),B(x,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"name"},{default:j(()=>[B(O,{style:{width:"100%"}},{default:j(()=>[B(y,{span:24},{default:j(()=>[B(m,{modelValue:l.name,"onUpdate:modelValue":g[3]||(g[3]=C=>l.name=C),placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),B(KJ,{ref_key:"nodePropertyItemFormRef",ref:s,lf:t.lf,currentNodeModel:t.currentNodeModel,configuration:vn(l.configuration),fields:t.currentNodeView.fields},null,8,["lf","currentNodeModel","configuration","fields"]),B(x,{label:"\u63CF\u8FF0",prop:"desc"},{default:j(()=>[B(m,{modelValue:l.additionalInfo.description,"onUpdate:modelValue":g[4]||(g[4]=C=>l.additionalInfo.description=C),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])}}};var MM=Ml(Lat,[["__scopeId","data-v-647b04d4"]]);const Iat={style:{flex:"auto"}},Bat={__name:"DebugDataPanel",props:["url","chainId","nodeId"],setup(t){const{url:e,chainId:n,nodeId:r}=t,i=[uv(),vr.readOnly.of(!0)],o=F([]),a=F(!1),s=F(""),l=F(""),u=F({page:1,size:20,total:0}),c=w=>{u.value.size=w,u.value.page=1,f()},d=w=>{u.value.page=w,f()},f=()=>{fetch(e+"?chainId="+n+"&nodeId="+r+"&size="+u.value.size+"&page="+u.value.page).then(w=>w.json()).then(w=>{o.value=w.items||[],u.value={size:w.size||20,page:w.page,total:w.total}}).catch(w=>{jr.error(w.message)})};Ft(()=>{f()});const h=(w,O)=>It(w.ts).format("YYYY-MM-DD HH:mm:ss"),g=w=>{s.value="\u6570\u636E",l.value=db.js(w.data,{indent_size:2}),a.value=!0},m=w=>{s.value="\u5143\u6570\u636E",l.value=db.js(JSON.stringify(w.metadata),{indent_size:2}),a.value=!0},y=w=>{s.value="\u9519\u8BEF",l.value=w||"",a.value=!0},b=()=>{a.value=!1};return(w,O)=>{const x=lr,S=Hi,C=co,E=fo,T=$b,P=Rb,A=nC,D=Ma;return R(),Y(dt,null,[B(E,null,{default:j(()=>[B(C,{span:4,offset:20},{default:j(()=>[B(S,{class:"box-item",effect:"dark",content:"\u5237\u65B0",placement:"top-start"},{default:j(()=>[B(x,{icon:p(rW),onClick:f,circle:""},null,8,["icon"])]),_:1})]),_:1})]),_:1}),B(P,{data:o.value,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"20px"}},{default:j(()=>[B(T,{prop:"ts",label:"\u4E8B\u4EF6\u65F6\u95F4",width:"90",formatter:h}),B(T,{prop:"flowType",label:"\u7C7B\u578B",width:"60"}),B(T,{prop:"msg.id",label:"\u6D88\u606FID",width:"130"},{default:j($=>[B(S,{class:"box-item",effect:"dark",content:$.row.msg.id,placement:"top-start"},{default:j(()=>[Ue(Ve($.row.msg.id.length>14?$.row.msg.id.substring(0,14)+"...":$.row.msg.id),1)]),_:2},1032,["content"])]),_:1}),B(T,{prop:"msg.type",label:"\u6D88\u606F\u7C7B\u578B",width:"130"},{default:j($=>[B(S,{class:"box-item",effect:"dark",content:$.row.msg.type,placement:"top-start"},{default:j(()=>[Ue(Ve($.row.msg.type.length>10?$.row.msg.type.substring(0,10)+"...":$.row.msg.type),1)]),_:2},1032,["content"])]),_:1}),B(T,{prop:"relationType",label:"\u5173\u7CFB\u7C7B\u578B",width:"90"}),B(T,{prop:"msg.data",label:"\u6570\u636E",width:"60"},{default:j($=>[B(S,{class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:j(()=>[B(x,{icon:p(Sy),onClick:N=>g($.row.msg),link:""},null,8,["icon","onClick"])]),_:2},1024)]),_:1}),B(T,{prop:"msg.metadata",label:"\u5143\u6570\u636E",width:"80"},{default:j($=>[B(S,{class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:j(()=>[B(x,{icon:p(Sy),onClick:N=>m($.row.msg),link:""},null,8,["icon","onClick"])]),_:2},1024)]),_:1}),B(T,{prop:"err",label:"\u9519\u8BEF",width:"80"},{default:j($=>[$.row.err?(R(),xe(S,{key:0,class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:j(()=>[$.row.err?(R(),xe(x,{key:0,icon:p(Sy),onClick:N=>y($.row.err),link:""},null,8,["icon","onClick"])):Se("",!0)]),_:2},1024)):Se("",!0)]),_:1})]),_:1},8,["data"]),B(A,{currentPage:u.value.page,"onUpdate:currentPage":O[0]||(O[0]=$=>u.value.page=$),style:{"margin-top":"10px"},class:"float-right","page-size":u.value.size,total:u.value.total,"page-sizes":[20,50,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:c,onCurrentChange:d},null,8,["currentPage","page-size","total"]),B(D,{"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px","before-close":b,modelValue:a.value},{header:j(()=>[B(E,null,{default:j(()=>[B(C,{span:12},{default:j(()=>[Ue(Ve(s.value),1)]),_:1})]),_:1})]),footer:j(()=>[J("div",Iat,[B(x,{onClick:b},{default:j(()=>[Ue("\u5173\u95ED")]),_:1})])]),default:j(()=>[B(p(Vu),{modelValue:l.value,"onUpdate:modelValue":O[1]||(O[1]=$=>l.value=$),placeholder:"\u65E0\u6570\u636E",style:{height:"400px",width:"100%"},autofocus:!0,tabSize:2,extensions:i},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},Fat={class:""},Vat={__name:"RouterItemForm",props:["showDrawer","currentRouter","currentNodeView","currentNodeModel"],emits:["submit","cancel"],setup(t,{expose:e,emit:n}){const{showDrawer:r,currentRouter:i,currentNodeView:o,currentNodeModel:a}=t;F(["headersToMetadata"]),F(["responseToBody"]);const s=F(["POST","GET","DELETE","PUT","PATCH"]),l={from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8DEF\u7531Path\uFF1A\u5982:/api/ms/ws "},processors:{label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u524D\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}},to:{processors:{label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u540E\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}}},u=vn(i),c=F(l);if(o.router){let g={...l};g=Object.assign(g,o.router),g.from.processors||(g.from.processors=l.from.processors),g.to.processors||(g.to.processors=l.to.processors),c.value=g,o.type==="endpoint/http"&&(!u.params||u.params.length===0)&&(u.params=["POST"])}const d=F();return vn({showPopover:!1,cronValue:""}),e({submit:()=>d.value.validate(g=>(g&&a.routers&&a.routers.forEach(m=>{if(Un.toFromPath(m)===Un.toFromPath(u)&&m.id!==u.id)return jr.error(Un.toFromPath(u)+" \u5DF2\u7ECF\u5B58\u5728"),g=!1,!1}),g&&n("submit",Dn(u)),g)),getRouterView:()=>c}),(g,m)=>{const y=Jc,b=wl,w=hi,O=aC,x=co,S=fo,C=Pl,E=Ym,T=kl;return R(),Y("div",Fat,[B(T,{model:u,ref_key:"formRef",ref:d,"label-position":"top","label-width":"auto"},{default:j(()=>{var P,A,D,$,N,z;return[B(C,{label:c.value.from.path.label,rules:c.value.from.path.rules,prop:"from.path"},{default:j(()=>[B(S,{style:{width:"100%"}},{default:j(()=>[B(x,{span:24},{default:j(()=>[t.currentNodeView.type==="endpoint/sagoo/devicein"?(R(),xe(b,{key:0,modelValue:u.from.path,"onUpdate:modelValue":m[0]||(m[0]=I=>u.from.path=I),filterable:""},{default:j(()=>[(R(!0),Y(dt,null,Ht(c.value.from.path.options,I=>(R(),xe(y,{key:I,label:I.label,value:I.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):(R(),Y(dt,{key:1},[B(w,{modelValue:u.from.path,"onUpdate:modelValue":m[2]||(m[2]=I=>u.from.path=I),placeholder:"\u8BF7\u8F93\u5165"+c.value.from.path.label},es({_:2},[t.currentNodeView.type==="endpoint/http"?{name:"prepend",fn:j(()=>[B(b,{modelValue:u.params[0],"onUpdate:modelValue":m[1]||(m[1]=I=>u.params[0]=I),filterable:"",style:{width:"150px"}},{default:j(()=>[(R(!0),Y(dt,null,Ht(s.value,I=>(R(),xe(y,{key:I,label:I,value:I},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1032,["modelValue","placeholder"]),B(O,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(c.value.from.path.desc),1)]),_:1})],64))]),_:1})]),_:1})]),_:1},8,["label","rules"]),c.value.from.processors.hide?Se("",!0):(R(),xe(C,{key:0,label:c.value.from.processors.label,prop:"from.processors"},{default:j(()=>[B(b,{modelValue:u.from.processors,"onUpdate:modelValue":m[3]||(m[3]=I=>u.from.processors=I),multiple:"",filterable:"","allow-create":!0,placeholder:"\u8BF7\u8F93\u5165"+c.value.from.processors.label},{default:j(()=>[(R(!0),Y(dt,null,Ht(c.value.options.inProcessors,I=>(R(),xe(y,{key:I,label:I,value:I},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),B(O,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(c.value.from.processors.desc),1)]),_:1})]),_:1},8,["label"])),(D=(A=(P=c.value)==null?void 0:P.to)==null?void 0:A.processors)!=null&&D.hide?Se("",!0):(R(),xe(C,{key:1,label:(z=(N=($=c.value)==null?void 0:$.to)==null?void 0:N.processors)==null?void 0:z.label,prop:"to.processors"},{default:j(()=>[B(b,{modelValue:u.to.processors,"onUpdate:modelValue":m[4]||(m[4]=I=>u.to.processors=I),multiple:"",filterable:"","allow-create":!0,placeholder:"\u8BF7\u8F93\u5165"+c.value.to.processors.label},{default:j(()=>[(R(!0),Y(dt,null,Ht(c.value.options.outProcessors,I=>(R(),xe(y,{key:I,label:I,value:I},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),B(O,{size:"small",type:"info"},{default:j(()=>[Ue(Ve(c.value.to.processors.desc),1)]),_:1})]),_:1},8,["label"])),t.currentNodeView.type==="endpoint/http"?(R(),xe(C,{key:2,label:"\u7B49\u5F85\u6267\u884C\u7ED3\u679C",prop:"to.wait"},{default:j(()=>[B(E,{modelValue:u.to.wait,"onUpdate:modelValue":m[5]||(m[5]=I=>u.to.wait=I),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(O,{size:"small",type:"info"},{default:j(()=>[Ue("\u5982\u679C\u5F00\u542F\u5219\u4F1A\u628A\u89C4\u5219\u94FE\u6267\u884C\u7ED3\u679C\u54CD\u5E94\u5230\u5BA2\u6237\u7AEF")]),_:1})]),_:1})):Se("",!0)]}),_:1},8,["model"])])}}},JJ={__name:"RouterPropertyTable",props:["showDrawer","currentNodeModel","currentNodeView"],emits:["submit","cancel"],setup(t,{expose:e,emit:n}){const{showDrawer:r,currentNodeModel:i,currentNodeView:o}=t,a=F({}),s=F(!1),l=F(!1),u=F(),c={from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8DEF\u7531Path\uFF1A\u5982:/api/ms/ws "},processors:{label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u524D\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}},to:{processors:{label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u540E\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}}},d=F(c);if(o.router){let T={...c};T=Object.assign(T,o.router),d.value=T}const f=F({current:1,pageSize:12,total:i.routers&&i.routers.length}),h=T=>{f.value.pageSize=T,f.value.current=1},g=T=>{f.value.current=T},m=T=>{if(l.value){const P=i.routers.findIndex(A=>A.id===T.id||Un.toFromPath(A)===Un.toFromPath(T));P!==-1&&i.routers.splice(P,1,T)}else i.routers||(i.routers=[]),i.routers.push(T);s.value=!1},y=()=>i,b=()=>{n("cancel")},w=(T,P)=>Un.toFromPath(T,P),O=(T,P)=>T.to&&T.to.wait?"\u662F":"\u5426",x=()=>{a.value={id:Un.genId(),params:[],from:{path:"",processors:[]},to:{path:"",processors:[],wait:!1}},l.value=!1,s.value=!0},S=T=>{a.value={...T},l.value=!0,s.value=!0},C=T=>{i.routers&&(i.routers=i.routers.filter(P=>P.id!==T.id&&Un.toFromPath(P)!==Un.toFromPath(T)))},E=()=>{u.value.submit()};return e({getFormModel:y}),(T,P)=>{const A=lr,D=$b,$=ns,N=Rb,z=nC,I=Ma;return R(),Y(dt,null,[B(A,{type:"primary",onClick:x},{default:j(()=>[Ue("\u65B0\u589E")]),_:1}),B(N,{data:t.currentNodeModel.routers,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"50px"}},{default:j(()=>{var L,X,Q,W;return[B(D,{prop:"from.path",label:d.value.from.path.label,formatter:function(G){return w(G,t.currentNodeModel.type)}},null,8,["label","formatter"]),(X=(L=d.value.from)==null?void 0:L.processors)!=null&&X.hide?Se("",!0):(R(),xe(D,{key:0,prop:"from.processors",label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668"},{default:j(G=>[(R(!0),Y(dt,null,Ht(G.row.from.processors,K=>(R(),xe($,{key:K,style:{"margin-right":"5px"}},{default:j(()=>[Ue(Ve(K),1)]),_:2},1024))),128))]),_:1})),(W=(Q=d.value.to)==null?void 0:Q.processors)!=null&&W.hide?Se("",!0):(R(),xe(D,{key:1,prop:"to.processors",label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668"},{default:j(G=>[(R(!0),Y(dt,null,Ht(G.row.to.processors,K=>(R(),xe($,{key:K,style:{"margin-right":"5px"}},{default:j(()=>[Ue(Ve(K),1)]),_:2},1024))),128))]),_:1})),t.currentNodeView.type==="endpoint/http"?(R(),xe(D,{key:2,prop:"to.wait",label:"\u7B49\u5F85\u6267\u884C\u7ED3\u679C",formatter:O})):Se("",!0),B(D,{label:"\u64CD\u4F5C"},{default:j(({row:G})=>[B(A,{type:"primary",size:"small",onClick:K=>S(G)},{default:j(()=>[Ue("\u7F16\u8F91")]),_:2},1032,["onClick"]),B(A,{type:"danger",size:"small",onClick:K=>C(G)},{default:j(()=>[Ue("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]}),_:1},8,["data"]),B(z,{currentPage:f.value.current,"onUpdate:currentPage":P[0]||(P[0]=L=>f.value.current=L),style:{"margin-top":"10px"},class:"float-right","page-size":f.value.pageSize,total:f.value.total,"page-sizes":[12,24,36],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:h,onCurrentChange:g},null,8,["currentPage","page-size","total"]),B(I,{modelValue:s.value,"onUpdate:modelValue":P[2]||(P[2]=L=>s.value=L),"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,title:l.value.value?"\u7F16\u8F91\u7F16\u8F91":"\u65B0\u589E\u8DEF\u7531"},{footer:j(()=>[B(A,{onClick:P[1]||(P[1]=L=>s.value=!1)},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1}),B(A,{type:"primary",onClick:E},{default:j(()=>[Ue("\u4FDD\u5B58")]),_:1})]),default:j(()=>[B(Vat,{ref_key:"routerItemFormRef",ref:u,currentRouter:a.value,currentNodeView:t.currentNodeView,currentNodeModel:t.currentNodeModel,onSubmit:m,onCancel:b},null,8,["currentRouter","currentNodeView","currentNodeModel"])]),_:1},8,["modelValue","title"])],64)}}},jat=["innerHTML"],Qat={style:{"text-align":"left"}},zat={__name:"NodePropertyDrawer",props:["show","currentNodeModel","currentNodeView","chainId","debugDataUrl","lf"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentNodeModel:r,currentNodeView:i,chainId:o,debugDataUrl:a,lf:s}=t,l=F(),u=F(),c=F("detail"),d=async()=>{let m;if(u.value&&!i.router.hide){if(m=u.value.getFormModel().routers,!m||m.length===0){c.value="router",jr.error("\u8BF7\u8BBE\u7F6E\u8DEF\u7531");return}}else m=[{from:{path:"*"},to:{}}];l.value.submit(y=>{if(!y)c.value="detail";else{const b=l.value.getFormModel();m&&(b.routers=m),e("submit",b)}})},f=()=>{e("cancel")},h=()=>{f()},g=()=>{};return(m,y)=>{const b=ns,w=co,O=fo,x=Sp,S=xp,C=lr,E=H$;return R(),xe(E,{modal:!1,"close-on-click-modal":!1,"close-on-press-escape":!1,direction:"rtl",size:"580px","modal-class":"right-drawer-modal","before-close":h,modelValue:t.show},es({header:j(()=>[B(O,{class:"setter-title"},{default:j(()=>[B(w,{span:12},{default:j(()=>[Ue("\u8282\u70B9\u8BE6\u60C5 "),B(b,{class:"ml-2",type:"info"},{default:j(()=>[Ue(Ve(t.currentNodeView.label||t.currentNodeView.type),1)]),_:1})]),_:1})]),_:1})]),default:j(()=>[B(S,{modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=T=>c.value=T),onTabClick:g},{default:j(()=>[B(x,{label:"\u8BE6\u60C5",name:"detail"},{default:j(()=>[B(MM,{ref_key:"nodePropertyFormRef",ref:l,lf:t.lf,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:d,onCancel:f},null,8,["lf","currentNodeModel","currentNodeView"])]),_:1}),t.currentNodeView.nodeType==="endpoint-node"&&!t.currentNodeView.router.hide?(R(),xe(x,{key:0,label:"\u8DEF\u7531\u8BBE\u7F6E",name:"router"},{default:j(()=>[B(JJ,{ref_key:"routerPropertyFormRef",ref:u,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:d,onCancel:f},null,8,["currentNodeModel","currentNodeView"])]),_:1})):Se("",!0),t.currentNodeView.nodeType!=="endpoint-node"?(R(),xe(x,{key:1,label:"\u8C03\u8BD5\u65E5\u5FD7",name:"debug"},{default:j(()=>[c.value==="debug"?(R(),xe(Bat,{key:0,url:t.debugDataUrl,chainId:t.chainId,nodeId:t.currentNodeModel.id},null,8,["url","chainId","nodeId"])):Se("",!0)]),_:1})):Se("",!0),B(x,{label:"\u5E2E\u52A9",name:"help"},{default:j(()=>[J("div",{innerHTML:t.currentNodeView.desc},null,8,jat)]),_:1})]),_:1},8,["modelValue"])]),_:2},[c.value==="detail"||c.value==="router"?{name:"footer",fn:j(()=>[J("div",Qat,[B(C,{type:"primary",size:"large",onClick:d},{default:j(()=>[Ue("\u786E\u8BA4")]),_:1}),B(C,{size:"large",onClick:f},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),key:"0"}:void 0]),1032,["modelValue"])}}};var Wat=Ml(zat,[["__scopeId","data-v-f76fd896"]]);const Hat={style:{flex:"auto"}},Uat={__name:"NodePropertyDialog",props:["show","currentNodeModel","currentNodeView","lf"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentNodeModel:r,currentNodeView:i,lf:o}=t,a=F(),s=F(),l=F("detail"),u=async()=>{let f;if(s.value&&!i.router.hide){if(f=s.value.getFormModel().routers,!f||f.length===0){l.value="router",jr.error("\u8BF7\u8BBE\u7F6E\u8DEF\u7531");return}}else f=[{from:{path:"*"},to:{}}];a.value.submit(h=>{if(!h)l.value="detail";else{const g=a.value.getFormModel();f&&(g.routers=f),e("submit",g)}})},c=()=>{e("cancel")},d=()=>{c()};return(f,h)=>{const g=ns,m=co,y=fo,b=Sp,w=xp,O=lr,x=Ma;return R(),xe(x,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!1,"close-on-press-escape":!0,width:"55%",draggable:"",top:"10px","before-close":d,modelValue:t.show},{header:j(()=>[B(y,{class:"setter-title"},{default:j(()=>[B(m,{span:12},{default:j(()=>[Ue("\u8282\u70B9\u8BE6\u60C5\u914D\u7F6E "),B(g,{class:"ml-2",type:"info"},{default:j(()=>[Ue(Ve(t.currentNodeView.label||t.currentNodeView.type),1)]),_:1})]),_:1})]),_:1})]),footer:j(()=>[J("div",Hat,[B(O,{type:"primary",size:"large",onClick:u},{default:j(()=>[Ue("\u786E\u8BA4")]),_:1}),B(O,{size:"large",onClick:c},{default:j(()=>[Ue("\u53D6\u6D88")]),_:1})])]),default:j(()=>[t.currentNodeView.nodeType!=="endpoint-node"?(R(),xe(MM,{key:0,ref_key:"nodePropertyFormRef",ref:a,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,editorOptions:f.editorOptions,lf:t.lf,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView","editorOptions","lf"])):Se("",!0),t.currentNodeView.nodeType==="endpoint-node"?(R(),xe(w,{key:1,modelValue:l.value,"onUpdate:modelValue":h[0]||(h[0]=S=>l.value=S)},{default:j(()=>[B(b,{label:"\u8BE6\u60C5",name:"detail"},{default:j(()=>[B(MM,{ref_key:"nodePropertyFormRef",ref:a,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView"])]),_:1}),t.currentNodeView.router.hide?Se("",!0):(R(),xe(b,{key:0,label:"\u8DEF\u7531\u8BBE\u7F6E",name:"router"},{default:j(()=>[B(JJ,{ref_key:"routerPropertyFormRef",ref:s,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView"])]),_:1}))]),_:1},8,["modelValue"])):Se("",!0)]),_:1},8,["modelValue"])}}},Xat={builtins:{endpoints:{inProcessors:["toHex","headersToMetadata","setJsonDataType"],outProcessors:["responseToBody","metadataToHeaders"]},functions:{functionName:[]},nodePool:{}},endpoints:[{type:"endpoint/kafka",category:"endpoint/kafka",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:9092",label:"",desc:"",validate:"",fields:null},{name:"groupId",type:"string",defaultValue:"sagoo",label:"",desc:"",validate:"",fields:null}],label:"Kafka",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/nats",category:"endpoint/nats",fields:[{name:"server",type:"string",defaultValue:"nats://127.0.0.1:4222",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Nats",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/rabbitmq",category:"endpoint/rabbitmq",fields:[{name:"server",type:"string",defaultValue:"amqp://guest:guest@127.0.0.1:5672/",label:"",desc:"",validate:"",fields:null},{name:"exchange",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null},{name:"exchangeType",type:"string",defaultValue:"topic",label:"",desc:"",validate:"",fields:null},{name:"durable",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null},{name:"autoDelete",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null}],label:"RabbitMQ",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/redis",category:"endpoint/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"Redis",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/redis/stream",category:"endpoint/redis_stream",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"groupId",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null}],label:"Redis",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/mqtt",category:"github.com/rulego/rulego/endpoint/mqtt",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:1883",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"maxReconnectInterval",type:"Duration",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"qOS",type:"uint8",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cleanSession",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"clientID",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cAFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Mqtt",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/net",category:"github.com/rulego/rulego/endpoint/net",fields:[{name:"protocol",type:"string",defaultValue:"tcp",label:"",desc:"",validate:"",fields:null},{name:"server",type:"string",defaultValue:":6335",label:"",desc:"",validate:"",fields:null},{name:"readTimeout",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"encode",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Net",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/http",category:"github.com/rulego/rulego/endpoint/rest",fields:[{name:"server",type:"string",defaultValue:":6333",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"allowCors",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"Rest",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/schedule",category:"github.com/rulego/rulego/endpoint/schedule",fields:null,label:"Schedule",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/ws",category:"github.com/rulego/rulego/endpoint/websocket",fields:[{name:"server",type:"string",defaultValue:":6334",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"allowCors",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"Websocket",desc:"",icon:"",relationTypes:["Success","Failure"]}],nodes:[{type:"comment",category:"action",fields:null,label:"CommentNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"delay",category:"action",fields:[{name:"maxPendingMsgs",type:"int",defaultValue:1e3,label:"",desc:"",validate:"",fields:null},{name:"periodInSeconds",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"periodInSecondsPattern",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"overwrite",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"DelayNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exec",category:"action",fields:[{name:"cmd",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"args",type:"array",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"log",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"replaceData",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ExecCommandNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"for",category:"action",fields:[{name:"range",type:"string",defaultValue:"1..3",label:"",desc:"",validate:"",fields:null},{name:"do",type:"string",defaultValue:"s3",label:"",desc:"",validate:"",fields:null},{name:"mode",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"ForNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"functions",category:"action",fields:[{name:"functionName",type:"string",defaultValue:"test",label:"",desc:"",validate:"",fields:null}],label:"FunctionsNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"groupAction",category:"action",fields:[{name:"matchRelationType",type:"string",defaultValue:"Success",label:"",desc:"",validate:"",fields:null},{name:"matchNum",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"nodeIds",type:"",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"GroupActionNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"iterator",category:"action",fields:[{name:"fieldName",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"jsScript",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"IteratorNode",desc:"",icon:"",relationTypes:["True","False","Success","Failure"]},{type:"join",category:"action",fields:[{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"JoinNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"log",category:"action",fields:[{name:"jsScript",type:"string",defaultValue:"return 'Incoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);",label:"",desc:"",validate:"",fields:null}],label:"LogNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"dbClient",category:"external",fields:[{name:"driverName",type:"string",defaultValue:"mysql",label:"",desc:"",validate:"",fields:null},{name:"dsn",type:"string",defaultValue:"root:root@tcp(127.0.0.1:3306)/test",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"sql",type:"string",defaultValue:"select * from test",label:"",desc:"",validate:"",fields:null},{name:"params",type:"array",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"getOne",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"DbClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"mqttClient",category:"external",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:1883",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"/device/msg",label:"",desc:"",validate:"",fields:null},{name:"maxReconnectInterval",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"qOS",type:"uint8",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cleanSession",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"clientID",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cAFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"MqttClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"net",category:"external",fields:[{name:"protocol",type:"string",defaultValue:"tcp",label:"",desc:"",validate:"",fields:null},{name:"server",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"connectTimeout",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"heartbeatInterval",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null}],label:"NetNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"restApiCall",category:"external",fields:[{name:"restEndpointUrlPattern",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"requestMethod",type:"string",defaultValue:"POST",label:"",desc:"",validate:"",fields:null},{name:"withoutRequestBody",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"headers",type:"map",defaultValue:{"Content-Type":"application/json"},label:"",desc:"",validate:"",fields:null},{name:"readTimeoutMs",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"insecureSkipVerify",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"maxParallelRequestsCount",type:"int",defaultValue:200,label:"",desc:"",validate:"",fields:null},{name:"enableProxy",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"useSystemProxyProperties",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"proxyScheme",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyHost",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyPort",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"proxyUser",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyPassword",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"RestApiCallNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"sendEmail",category:"external",fields:[{name:"smtpHost",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"smtpPort",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"enableTls",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"email",type:"struct",defaultValue:{from:"",to:"",cc:"",bcc:"",subject:"",body:""},label:"",desc:"",validate:"",fields:[{name:"from",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"to",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"bcc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"subject",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"body",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}]},{name:"connectTimeout",type:"int",defaultValue:10,label:"",desc:"",validate:"",fields:null}],label:"SendEmailNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"ssh",category:"external",fields:[{name:"host",type:"string",defaultValue:"127.0.0.1",label:"",desc:"",validate:"",fields:null},{name:"port",type:"int",defaultValue:22,label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"root",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"password",label:"",desc:"",validate:"",fields:null},{name:"cmd",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"SshNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/grpcClient",category:"external/grpc",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:50051",label:"",desc:"",validate:"",fields:null},{name:"service",type:"string",defaultValue:"helloworld.Greeter",label:"",desc:"",validate:"",fields:null},{name:"method",type:"string",defaultValue:"SayHello",label:"",desc:"",validate:"",fields:null},{name:"request",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"headers",type:"map",defaultValue:null,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/kafkaProducer",category:"external/kafka",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:9092",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"key",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"partition",type:"int32",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"ProducerNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/mongodbClient",category:"external/mongodb",fields:[{name:"server",type:"string",defaultValue:"mongodb://localhost:27017",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"test",label:"",desc:"",validate:"",fields:null},{name:"collection",type:"string",defaultValue:"user",label:"",desc:"",validate:"",fields:null},{name:"opType",type:"string",defaultValue:"QUERY",label:"",desc:"",validate:"",fields:null},{name:"filter",type:"string",defaultValue:'{"age": {"$gte": 18}}',label:"",desc:"",validate:"",fields:null},{name:"doc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"one",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/natsClient",category:"external/nats",fields:[{name:"server",type:"string",defaultValue:"nats://127.0.0.1:4222",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"/device/msg",label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/opengeminiQuery",category:"external/opengemini",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:8086",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"db0",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"token",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"command",type:"string",defaultValue:"select * from cpu_load",label:"",desc:"",validate:"",fields:null}],label:"QueryNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/opengeminiWrite",category:"external/opengemini",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:8086",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"db0",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"token",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"WriteNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/rabbitmqClient",category:"external/rabbitmq",fields:[{name:"server",type:"string",defaultValue:"amqp://guest:guest@127.0.0.1:5672/",label:"",desc:"",validate:"",fields:null},{name:"key",type:"string",defaultValue:"device.msg.request",label:"",desc:"",validate:"",fields:null},{name:"exchange",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null},{name:"exchangeType",type:"string",defaultValue:"topic",label:"",desc:"",validate:"",fields:null},{name:"durable",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null},{name:"autoDelete",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/redisClient",category:"external/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cmd",type:"string",defaultValue:"GET",label:"",desc:"",validate:"",fields:null},{name:"paramsExpr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"params",type:"array",defaultValue:["${metadata.key}"],label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/redisPub",category:"external/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"channel",type:"string",defaultValue:"default",label:"",desc:"",validate:"",fields:null}],label:"PublisherNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exprFilter",category:"filter",fields:[{name:"expr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"ExprFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"fieldFilter",category:"filter",fields:[{name:"checkAllKeys",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"dataNames",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"metadataNames",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"FieldFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"fork",category:"filter",fields:null,label:"ForkNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"groupFilter",category:"filter",fields:[{name:"allMatches",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"nodeIds",type:"",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"GroupFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"jsFilter",category:"filter",fields:[{name:"jsScript",type:"string",defaultValue:"return msg.temperature > 50;",label:"",desc:"",validate:"",fields:null}],label:"JsFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"jsSwitch",category:"filter",fields:[{name:"jsScript",type:"string",defaultValue:"return ['msgType1','msgType2'];",label:"",desc:"",validate:"",fields:null}],label:"JsSwitchNode",desc:"",icon:"",relationTypes:[]},{type:"msgTypeSwitch",category:"filter",fields:null,label:"MsgTypeSwitchNode",desc:"",icon:"",relationTypes:[]},{type:"switch",category:"filter",fields:[{name:"cases",type:"array",defaultValue:[{case:"msg.temperature>=20 && msg.temperature<=50",then:"Case1"},{case:"msg.temperature>50",then:"Case2"}],label:"",desc:"",validate:"",fields:null}],label:"SwitchNode",desc:"",icon:"",relationTypes:[]},{type:"x/luaFilter",category:"filter",fields:[{name:"script",type:"string",defaultValue:"return msg.temperature > 50",label:"",desc:"",validate:"",fields:null}],label:"LuaFilter",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"flow",category:"flow",fields:[{name:"targetId",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"extend",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ChainNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"ref",category:"flow",fields:[{name:"targetId",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"RefNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exprTransform",category:"transform",fields:[{name:"expr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"mapping",type:"map",defaultValue:null,label:"",desc:"",validate:"",fields:null}],label:"ExprTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"jsTransform",category:"transform",fields:[{name:"jsScript",type:"string",defaultValue:"return {'msg':msg,'metadata':metadata,'msgType':msgType};",label:"",desc:"",validate:"",fields:null}],label:"JsTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"metadataTransform",category:"transform",fields:[{name:"mapping",type:"map",defaultValue:{temperature:"msg.temperature"},label:"",desc:"",validate:"",fields:null},{name:"isNew",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"MetadataTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"text/template",category:"transform",fields:[{name:"template",type:"string",defaultValue:`"id": "{{ .id}}"
- "ts": "{{ .ts}}"
- "type": "{{ .type}}"
- "msgType": "{{ .msgType}}"
- "data": "{{ .data | escape}}"
- "dataType": "{{ .dataType}}"
- `,label:"",desc:"",validate:"",fields:null}],label:"TemplateNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/luaTransform",category:"transform",fields:[{name:"script",type:"string",defaultValue:"return msg, metadata, msgType",label:"",desc:"",validate:"",fields:null}],label:"LuaTransform",desc:"",icon:"",relationTypes:["Success","Failure"]}]},Zat={class:"flow-chart"},qat={__name:"RuleGoEditor",props:["options","data"],emits:["saveOk","saveError","reset","updateLocales"],setup(t,{expose:e,emit:n}){const r=t,i=F(),o=F(null),a=F(null),s=F({}),l=F({}),u=F({}),c=F(null),d=F(!1),f=F(!1),h=F(!1),g=F(!1),m=F(!1),y=F({url:window.allEnv.rule.server,toolbar:{}});let b={},w=F({}),O={},x={},S={},C=[],E=[];const T=F(r.data),P=r.options;let A={setting:{},relationTypeSplit:"/",endpointRelationTypeSplit:`
- `,url:window.allEnv.rule.server,componentsApi:"/api/v1/components",debugDataApi:"/api/v1/logs/debug",executeApi:"/api/v1/rules/:id/execute/:msgType",notifyApi:"/api/v1/rules/:id/notify/msgType",chainsApi:"/api/v1/rules",startX:280,startY:280,loadComponentsFromApi:!0,loadEndpointComponents:!0,locales:{},builtinComponents:{builtins:{},endpoints:[],nodes:[]},components:{endpoints:[],nodes:[]},adapterComponents:function(se){return A.loadEndpointComponents||(se.endpoints=[]),A.builtinComponents=se,Un.adapterComponents(se,A.locales)},toolbar:{showTile:!0,showSelection:!0,showUndo:!0,showRedo:!0,showMinMap:!0,showTest:!0,showSetting:!0,showFullScreen:!0,showNew:!0,showOpen:!0,showEdit:!0,showIntegration:!0,showExport:!0,showImport:!0,showNodeMgt:!0,showUserSetting:!0,showAbout:!0,showDoc:!0,showSave:!0,showReset:!0,showDelete:!0},container:i.value,grid:{visible:!0,type:"mesh",size:10,config:{color:"#eeeeee"}},adjustEdge:!0,adjustEdgeStartAndEnd:!0,textEdit:!1,stopMoveGraph:!1,hoverOutline:!1,edgeSelectedOutline:!1,allowResize:!0,keyboard:{enabled:!0,shortcuts:[{keys:["delete","backspace"],callback:se=>{!se.target||se.target.tagName!=="DIV"&&se.target.tagName!=="div"||_e()}},{keys:["cmd + c","ctrl + c"],callback:se=>{if(!se.target||se.target.tagName!=="DIV"&&se.target.tagName!=="div")return;if(!o.value){Un.copyToClipboard("");return}O.currentCloneNodeId=o.value.id;let ye=o.value.properties&&o.value.properties.model||{};Un.copyToClipboard(JSON.stringify(ye))}},{keys:["cmd + v","ctrl + v"],callback:se=>{!se.target||se.target.tagName!=="DIV"&&se.target.tagName!=="div"||K()}}]},idGenerator:function(se){return se==="flow-link"?(O.edgeCount++,"edge_"+O.edgeCount):(O.nodeCount++,"node_"+O.nodeCount)},plugins:[oXe,nXe,jq,bJ,iXe,BUe]},D=null;Ft(()=>{$()});const $=()=>{A.components&&A.components.nodes&&A.components.nodes.length>0?(A.components=A.adapterComponents(A.components),b=q(A.components),N()):(A.components=A.adapterComponents(Xat),b=q(A.components),N()),A.loadComponentsFromApi&&Me().then(se=>{A.components=se,b=q(A.components),N()})},N=()=>{ee(),Object.assign(A,P),y.value={url:A.url,componentsApi:A.componentsApi,debugDataApi:A.debugDataApi,executeApi:A.executeApi,notifyApi:A.notifyApi,chainsApi:A.chainsApi,toolbar:A.toolbar},A.ruleChain&&(w.value=w),A.container=i.value,D=new pq(A),D.getRuleChain=function(){return w.value},D.getEditorSetting=function(){return y.value},D.getOptions=function(){return A},D.nodeComponents=function(){return b},D.setLocales=function(se){Ie(se)},D.extension.selectionSelect.setSelectionSense(!0,!1),D.adapterIn=function(se){Tr(se)&&(se=se.value),se||(se={});let ye={};se.ruleChain&&(w.value=se.ruleChain,ye=se.ruleChain.additionalInfo||{});let Ae=[],Z=[],te=parseInt(ye.layoutX||A.startX)||A.startX,le=parseInt(ye.layoutY||A.startY)||A.startY;Ae.push({id:O.startNodeId,type:"start-node",x:te,y:le,text:Dg("Input")});let Te=null,pe=0,Oe=se.metadata&&se.metadata.firstNodeIndex||0;se&&se.metadata&&se.metadata.nodes&&se.metadata.nodes.forEach((Ke,Je)=>{let at=Un.getNodeSeq(Ke.id);at>pe&&(pe=at),O.nodeCount++;let kt=b[Ke.type],jt="simple-node";kt&&kt.nodeType&&(jt=kt.nodeType),Oe===Je&&(Te=Ke),te=te+150;let Pe=Ke.additionalInfo||{},nt=Pe.layoutX||te,fe=Pe.layoutY||le;Ae.push({id:Ke.id,type:jt,x:nt,y:fe,text:Ke.name,properties:{view:b[Ke.type],model:Ke}})}),se&&se.metadata&&se.metadata.endpoints&&se.metadata.endpoints.forEach((Ke,Je)=>{let at=Un.getNodeSeq(Ke.id);at>pe&&(pe=at),O.nodeCount++,te=te+150;let kt=Ke.additionalInfo||{},jt=kt.layoutX||te,Pe=kt.layoutY||le;Ae.push({id:Ke.id,type:"endpoint-node",x:jt,y:Pe,text:Ke.name,properties:{view:b[Ke.type],model:Ke}})}),O.nodeCount+=pe;let Re=[];Te&&(Re=[{fromId:O.startNodeId,toId:Te.id}]),se.metadata&&se.metadata.endpoints&&se.metadata.endpoints.forEach((Ke,Je)=>{Re=Re.concat(Un.getEndpointConnections(Ke.id,Ke,Te))});let je=Re;return se&&se.metadata&&se.metadata.connections&&(je=je.concat(se.metadata.connections)),je.forEach(Ke=>{O.edgeCount++;let Je=Un.getEdgeBySourceNodeIdAndTargetNodeId(Z,Ke.fromId,Ke.toId);Je?(Ke.nodeType==="endpoint-node"?Je.text=Je.text+A.endpointRelationTypeSplit+Dg(Ke.type,"relationTypes"):Je.text=Je.text+A.relationTypeSplit+Dg(Ke.type,"relationTypes"),Je.properties.model.relationTypes||(Je.properties.model.relationTypes=[]),Je.properties.model.relationTypes.push(Ke.type),Ke.routerId&&(Je.properties.model.routerId=Ke.routerId)):(Ke.relationTypes=[Ke.type],Je=Un.createEdge(O,Ae,Ke),Z.push(Je))}),{edges:Z,nodes:Ae}},D.adapterOut=function(se){w.value&&!w.value.id&&(w.value.id=Un.genId());let ye=[],Ae=[],Z=[],te=null,le=[];se&&se.edges&&se.edges.forEach(pe=>{if(pe.sourceNodeId!==O.startNodeId){let Oe=de(pe.sourceNodeId),Re=de(pe.targetNodeId);Oe===""&&jr.error("\u627E\u4E0D\u5230\u8282\u70B9Id="+Oe),Re===""&&jr.error("\u627E\u4E0D\u5230\u8282\u70B9Id="+Re);let je=D.getNodeDataById(pe.sourceNodeId),Ke=pe.properties.model||{fromId:Oe,toId:Re,type:""};Ke.fromId=Oe,Ke.toId=Re,Ke.relationTypes.forEach(Je=>{let at={};Object.assign(at,Ke),at.type=Je,delete at.id,delete at.relationTypes,delete at.relationTypesLabel,je.type==="endpoint-node"?le.push(at):Z.push(at)})}else te=pe.targetNodeId}),se&&se.nodes&&se.nodes.forEach(pe=>{if(pe.id===O.startNodeId)w.value.additionalInfo?(w.value.additionalInfo.layoutX=String(pe.x),w.value.additionalInfo.layoutY=String(pe.y)):w.value.additionalInfo={layoutX:String(pe.x),layoutY:String(pe.y)};else{let Oe=pe.properties.model;if(Oe){let Re=Oe.additionalInfo;Re?(Re.layoutX=pe.x,Re.layoutY=pe.y):Oe.additionalInfo={layoutX:pe.x,layoutY:pe.y},delete Oe.nodeId,pe.type==="endpoint-node"?(Un.updateEndpointRouterToPath(Oe,w.value.id,le),ye.push(Oe)):!te&&pe.type==="simple-node"||pe.id===te?Ae.unshift(Oe):Ae.push(Oe)}}});let Te={endpoints:ye,nodes:Ae,connections:Z};return{ruleChain:w.value,metadata:Te}},T?D.render(T):(w.value.id=Un.genId(),D.render({})),D.graphModel.eventCenter.emit("rulego-editor:componentOk",A.components),D.on("blank:mousemove",({e:se})=>{O.mouseX=se.offsetX,O.mouseY=se.offsetY}),D.on("blank:mousedown",({e:se})=>{O.mouseX=se.offsetX,O.mouseY=se.offsetY}),D.on("node:click",({data:se})=>{U(),xt(()=>{se.type!=="start-node"?(o.value=se,a.value=null,Ce(),f.value=!0):(o.value=null,a.value=null)})}),D.on("node:dbclick",({data:se})=>{U(),xt(()=>{se.type!=="start-node"&&(o.value=se,a.value=null,Ce(),f.value=!0)})}),D.on("edge:click",({data:se})=>{U(),xt(()=>{o.value=null,a.value=se,f.value=!1,h.value=!1})}),D.on("edge:dbclick",({data:se})=>{U(),xt(()=>{a.value=se,o.value=null,Ce()})}),D.on("node:dnd-add",({data:se})=>{U(),xt(()=>{if(x=se,o.value=se,a.value=null,Ce(!0),se.type==="group-node"){const ye=D.addNode({type:"start-node",moveRules:[function(Ae,Z,te){return!1}],x:se.x-100,y:se.y,text:"\u5F00\u59CB"});se.addChild(ye.id)}})}),D.on("node:add",({data:se})=>{let ye=se.properties.model;const Ae=D.getNodeModelById(se.id);ye&&Ae&&(ye.id=se.id,Ae.setProperty("model",ye))}),D.on("edge:add",({data:se})=>{let ye=D.getNodeEdges(se.sourceNodeId);ye&&ye.length>1&&D.getNodeDataById(se.sourceNodeId).type==="start-node"&&D.deleteEdge(se.id)}),D.on("edge:add",({data:se})=>{S=se,a.value=se,o.value=null,se.sourceNodeId!==O.startNodeId&&Ce(!0)}),D.on("node:drop",({data:se})=>{let ye=se.properties.model;ye&&(ye.additionalInfo?(ye.layoutX=se.x,ye.layoutY=se.y):ye.additionalInfo={layoutX:se.x,layoutY:se.y})}),D.on("rulego-editor:new",se=>{$e();let ye=typeof se=="string"?JSON.parse(se):se;ye.id||(ye.id=Un.genId()),w.value=ye}),D.on("rulego-editor:open",se=>{let ye=typeof se=="string"?JSON.parse(se):se;he(ye)}),D.on("rulego-editor:update",se=>{let ye=typeof se=="string"?JSON.parse(se):se;w.name=ye.name,w.root=ye.root||!0,w.disabled=ye.disabled,w.additionalInfo=ye.additionalInfo}),D.on("rulego-editor:setting",se=>{se.baseUrl&&se.baseUrl!==y.value.url?(y.value.url=se.baseUrl,y.value.toolbar=se.toolbar,Me().then(ye=>{A.components=ye,b=q(A.components),N()})):(y.value.url=se.baseUrl,y.value.toolbar=se.toolbar)}),D.on("rulego-editor:fullScreen",()=>{console.info("rulego-editor:fullScreen")}),D.on("rulego-editor:save",()=>{ne()}),D.on("rulego-editor:reset",()=>{console.info("rulego-editor:deleteSelects")}),D.on("rulego-editor:deleteSelects",()=>{_e()}),D.on("rulego-editor:showEditPanel",()=>{Ce(!1)}),D.on("history:change",se=>{C=se.data.undos,E=se.data.redos}),D.on("rulego-editor:loadComponents",se=>{A.components=A.adapterComponents(se),D.graphModel.eventCenter.emit("rulego-editor:componentOk",A.components)})},z=se=>{o.value=se;let ye=se.properties.model;!ye.type&&se.properties.view&&(ye.type=se.properties.view.type),l.value=b[ye.type]||se.properties.view,ye.id=ye.id||se.id,ye.nodeId=se.id,ye.additionalInfo?(ye.layoutX=se.x,ye.layoutY=se.y):ye.additionalInfo={layoutX:se.x,layoutY:se.y},s.value=ye||{}},I=se=>{const ye=D.getNodeModelById(se.nodeId);ye&&(o.value=ye,ye.setProperty("model",se),ye.updateText(se.name));let Ae=ye.getData();if(Ae.type==="endpoint-node")W(se.nodeId,se);else{let Z=Ae.properties||{};G(se.nodeId,Z.view||{},se)}x=null,d.value=!1,f.value=!1},L=()=>{x&&(D.deleteNode(x.id),x=null),ie()},X=se=>{const ye=D.getEdgeModelById(se.id);ye&&(a.value=ye,D.getNodeDataById(ye.sourceNodeId).type==="endpoint-node"?(se.routerId=se.relationTypes[0],ye.updateText(se.relationTypesLabel.join(A.endpointRelationTypeSplit))):ye.updateText(se.relationTypesLabel.join(A.relationTypeSplit)),ye.setProperty("model",se)),S=null,m.value=!1,h.value=!1},Q=()=>{S&&(D.deleteEdge(S.id),S=null),ie()},W=(se,ye)=>{D.getEdgeModels({sourceNodeId:se}).forEach(Z=>{let te=Z.properties.model||{},le=Un.getRouterRelationTypeLabel(ye,te.routerId||te.relationTypes);if(le.length===0)D.deleteEdge(Z.id);else{let Te=le.map(pe=>pe.label);Z.updateText(Te.join(A.endpointRelationTypeSplit))}})},G=(se,ye,Ae)=>{if(!ye.relationTypeDynamics)return;let Z=D.getEdgeModels({sourceNodeId:se}),te=Un.getRelationTypeOptionsFromNode(ye,Ae);Z.forEach(le=>{(le.properties.model||{}).relationTypes.every(Oe=>te.find(Re=>Re.value===Oe))||D.deleteEdge(le.id)})},K=()=>{Un.readFromClipboard().then(se=>{!oe(se)&&O.currentCloneNodeId&&D.cloneNode(O.currentCloneNodeId)}).catch(se=>{O.currentCloneNodeId&&D.cloneNode(O.currentCloneNodeId)})},oe=se=>{if(!se)return!1;try{let ye=JSON.parse(se);if(!ye.type)return!1;O.nodeCount++,ye.id="node_"+O.nodeCount;let Ae=O.mouseX,Z=O.mouseY,te=b[ye.type];return te?(D.addNode({id:ye.id,type:te.nodeType||"simple-node",x:Ae,y:Z,text:ye.name,properties:{view:te,model:ye}}),!0):!1}catch{return!1}},ne=()=>{let se=D.getGraphData(),ye=y.value.url+A.chainsApi+"/"+w.value.id;fetch(ye,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(se)}).then(Ae=>Ae.ok?Ae:Ae.text().then(Z=>{throw new Error("\u4FDD\u5B58\u5931\u8D25: "+Z)})).then(Ae=>{jr({showClose:!0,message:"\u4FDD\u5B58\u6210\u529F",type:"success"}),n("saveOk",Ae),D.graphModel.eventCenter.emit("rulego-editor:saveOk",Ae)}).catch(Ae=>{jr.error(Ae.message),n("saveError",se,Ae)})},_e=()=>{const{nodes:se,edges:ye}=D.getSelectElements();ye&&ye.forEach(Ae=>{D.deleteEdge(Ae.id)}),se&&se.forEach(Ae=>{Ae.type!=="start-node"&&D.deleteNode(Ae.id)}),D.graphModel.eventCenter.emit("rulego-editor:deleted"),U()},Ce=se=>{if(o.value){let ye=o.value;ye.type!=="start-node"&&(z(ye),se?d.value=!0:f.value=!0,h.value=!1)}else{let ye=a.value,Ae=D.getNodeDataById(ye.sourceNodeId);if(Ae.type==="start-node")return;let Z=Ae.properties.model||{},te=Z.type;l.value=b[te];let le=D.getEdgeModels({sourceNodeId:Ae.id}),Te=[];if(Ae.type==="endpoint-node"){if(Te=Un.getRelationTypeOptionsFromRouters(le,Z,ye.id),Ae.type==="endpoint-node"&&Te.length===0){jr.error("\u8F93\u5165\u7AEF\u6BCF\u4E2A\u8DEF\u7531\u53EA\u5141\u8BB8\u4E00\u6761\u8FB9"),D.deleteEdge(ye.id);return}}else Te=Un.getRelationTypeOptionsFromNode(Ae.properties.view||{},Z);c.value=Te.length>0?Te:null,u.value=ye.properties.model||{id:ye.id,fromId:ye.sourceNodeId,toId:ye.targetNodeId,type:""},u.value.id=ye.id,d.value=!1,f.value=!1,se?m.value=!0:h.value=!0}},U=()=>{o.value=null,a.value=null,x=null,S=null,ie()},ie=()=>{d.value=!1,f.value=!1,m.value=!1,h.value=!1},ee=()=>{O={nodeCount:0,edgeCount:0,startNodeId:"$node_start_input",nodeWidth:100,currentCloneNodeId:""},o.value=null,a.value=null,d.value=!1,f.value=!1,h.value=!1,g.value=!1,w.value={}},he=se=>{T.value=se,ee(),D||$(),D.render(se),C.length=0,E.length=0,D.extension.miniMap.show()},$e=()=>{D.clearData(),he({})},Me=async()=>{let se=y.value.url+A.componentsApi;const Ae=await(await fetch(se)).json();return A.adapterComponents(Ae)},q=se=>{let ye={};for(let Ae in se)se[Ae].components&&se[Ae].components.forEach(Z=>{ye[Z.type]=Z});return ye},de=se=>{let ye=D.getNodeModelById(se);return ye&&ye.properties&&ye.properties.model?ye.properties.model.id:""},ke=()=>D.getGraphData(),Ie=se=>{A.locales=se,A.components=A.adapterComponents(A.builtinComponents),b=q(A.components),D.graphModel.eventCenter.emit("rulego-editor:componentOk",A.components)};return e({render:he,save:ne,lf:D,getData:ke,setLocales:Ie}),(se,ye)=>(R(),Y("div",Zat,[J("div",{ref_key:"container",ref:i,class:"container"},null,512),f.value?(R(),xe(Wat,{key:0,show:f.value,currentNodeModel:s.value,currentNodeView:l.value,debugDataUrl:y.value.url+p(A).debugDataApi,chainId:p(w).id,lf:p(D),onSubmit:I,onCancel:L},null,8,["show","currentNodeModel","currentNodeView","debugDataUrl","chainId","lf"])):Se("",!0),d.value?(R(),xe(Uat,{key:1,show:d.value,currentNodeModel:s.value,currentNodeView:l.value,lf:p(D),onSubmit:I,onCancel:L},null,8,["show","currentNodeModel","currentNodeView","lf"])):Se("",!0),h.value?(R(),xe(Urt,{key:2,show:h.value,currentEdgeModel:u.value,sourceNodeView:l.value,relationTypeSplit:p(A).relationTypeSplit,sourceNodeRelationTypeOptions:c.value,onSubmit:X,onCancel:Q},null,8,["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"])):Se("",!0),m.value?(R(),xe(Zrt,{key:3,show:m.value,currentEdgeModel:u.value,sourceNodeView:l.value,relationTypeSplit:p(A).relationTypeSplit,sourceNodeRelationTypeOptions:c.value,lf:p(D),onSubmit:X,onCancel:Q},null,8,["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions","lf"])):Se("",!0)]))}};var Yat=Ml(qat,[["__scopeId","data-v-4b2a8223"]]);const Gat={__name:"App",setup(t){const e=F(),n=F(!1),r=F({url:window.allEnv.rule.server,toolbar:{showTile:!0,showSelection:!0,showUndo:!0,showRedo:!0,showMinMap:!0,showTest:!0,showSetting:!0,showFullScreen:!0,showNew:!0,showOpen:!0,showEdit:!0,showIntegration:!0,showExport:!0,showImport:!0,showNodeMgt:!0,showUserSetting:!0,showAbout:!0,showDoc:!0,showSave:!0,showReset:!0,showDelete:!0}});F({});let i=window.location.hash.slice(1);Ft(()=>{try{const l=lrt();l&&(r.value.url=l.baseUrl||r.value.url)}catch(l){console.error("\u8BFB\u53D6\u6570\u636E\u51FA\u9519:",l)}finally{n.value=!0}let a=r.value.url+"/api/v1/rules/"+i,s=r.value.url+"/api/v1/locales";if(i!==""&&i!=="#undefined")o(a,s);else{let l=r.value.url+"/api/v1/rules/get/latest";o(l,s)}});const o=async(a,s)=>{var c;let l,u;try{l=await fetch(s).then(d=>d.json()),e.value.setLocales(l),u=await fetch(a).then(d=>d.json()),window.location.hash=(c=u==null?void 0:u.ruleChain)==null?void 0:c.id,e.value.render(u,l)}catch(d){jr.closeAll(),jr.error("\u89C4\u5219\u94FE\u83B7\u53D6\u5931\u8D25\uFF0C\u8BF7\u66F4\u6362 ID \u518D\u6B21\u5C1D\u8BD5"),console.error("Error fetching data:",d)}};return(a,s)=>n.value?(R(),xe(Yat,{key:0,ref_key:"ruleGoEditorRef",ref:e,data:null,options:r.value},null,8,["options"])):Se("",!0)}},eee=yS(Gat);eee.use(CQe,{locale:tZ});eee.mount("#app")});export default Kat();
|