vue-wiring-diagram 1.0.12 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ G.version="2.30.1",Zb(Pt),G.fn=$,G.min=$w,G.max=zw,G.now=Fw,G.utc=fn,G.unix=m1,G
13
13
  * @license MIT
14
14
  **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const ss=()=>{},mv=Object.prototype.hasOwnProperty,zo=(n,t)=>mv.call(n,t),yv=Array.isArray,Re=n=>typeof n=="function",Xe=n=>typeof n=="string",hr=n=>n!==null&&typeof n=="object",bv=n=>{const t=Object.create(null);return e=>t[e]||(t[e]=n(e))},wv=/-(\w)/g,xv=bv(n=>n.replace(wv,(t,e)=>e?e.toUpperCase():""));var xd=typeof global=="object"&&global&&global.Object===Object&&global,vv=typeof self=="object"&&self&&self.Object===Object&&self,Ke=xd||vv||Function("return this")(),Ie=Ke.Symbol,vd=Object.prototype,Cv=vd.hasOwnProperty,Sv=vd.toString,Ci=Ie?Ie.toStringTag:void 0;function Ev(n){var t=Cv.call(n,Ci),e=n[Ci];try{n[Ci]=void 0;var s=!0}catch{}var r=Sv.call(n);return s&&(t?n[Ci]=e:delete n[Ci]),r}var Ov=Object.prototype,Mv=Ov.toString;function Pv(n){return Mv.call(n)}var Av="[object Null]",Tv="[object Undefined]",Cd=Ie?Ie.toStringTag:void 0;function rs(n){return n==null?n===void 0?Tv:Av:Cd&&Cd in Object(n)?Ev(n):Pv(n)}function Ze(n){return n!=null&&typeof n=="object"}var Nv="[object Symbol]";function yn(n){return typeof n=="symbol"||Ze(n)&&rs(n)==Nv}function Fo(n,t){for(var e=-1,s=n==null?0:n.length,r=Array(s);++e<s;)r[e]=t(n[e],e,n);return r}var ue=Array.isArray,_v=1/0,Sd=Ie?Ie.prototype:void 0,Ed=Sd?Sd.toString:void 0;function Od(n){if(typeof n=="string")return n;if(ue(n))return Fo(n,Od)+"";if(yn(n))return Ed?Ed.call(n):"";var t=n+"";return t=="0"&&1/n==-_v?"-0":t}var kv=/\s/;function Dv(n){for(var t=n.length;t--&&kv.test(n.charAt(t)););return t}var Rv=/^\s+/;function Iv(n){return n&&n.slice(0,Dv(n)+1).replace(Rv,"")}function Lt(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}var Md=NaN,Lv=/^[-+]0x[0-9a-f]+$/i,Bv=/^0b[01]+$/i,Vv=/^0o[0-7]+$/i,jv=parseInt;function Si(n){if(typeof n=="number")return n;if(yn(n))return Md;if(Lt(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Lt(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=Iv(n);var e=Bv.test(n);return e||Vv.test(n)?jv(n.slice(2),e?2:8):Lv.test(n)?Md:+n}function dr(n){return n}var $v="[object AsyncFunction]",zv="[object Function]",Fv="[object GeneratorFunction]",Hv="[object Proxy]";function tc(n){if(!Lt(n))return!1;var t=rs(n);return t==zv||t==Fv||t==$v||t==Hv}var ec=Ke["__core-js_shared__"],Pd=function(){var n=/[^.]+$/.exec(ec&&ec.keys&&ec.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function Uv(n){return!!Pd&&Pd in n}var Gv=Function.prototype,Yv=Gv.toString;function Is(n){if(n!=null){try{return Yv.call(n)}catch{}try{return n+""}catch{}}return""}var Wv=/[\\^$.*+?()[\]{}|]/g,qv=/^\[object .+?Constructor\]$/,Jv=Function.prototype,Xv=Object.prototype,Kv=Jv.toString,Zv=Xv.hasOwnProperty,Qv=RegExp("^"+Kv.call(Zv).replace(Wv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function tC(n){if(!Lt(n)||Uv(n))return!1;var t=tc(n)?Qv:qv;return t.test(Is(n))}function eC(n,t){return n==null?void 0:n[t]}function Ls(n,t){var e=eC(n,t);return tC(e)?e:void 0}var nc=Ls(Ke,"WeakMap"),Ad=Object.create,nC=function(){function n(){}return function(t){if(!Lt(t))return{};if(Ad)return Ad(t);n.prototype=t;var e=new n;return n.prototype=void 0,e}}();function Td(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function sC(){}function Nd(n,t){var e=-1,s=n.length;for(t||(t=Array(s));++e<s;)t[e]=n[e];return t}var rC=800,iC=16,oC=Date.now;function aC(n){var t=0,e=0;return function(){var s=oC(),r=iC-(s-e);if(e=s,r>0){if(++t>=rC)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function lC(n){return function(){return n}}var Ho=function(){try{var n=Ls(Object,"defineProperty");return n({},"",{}),n}catch{}}(),cC=Ho?function(n,t){return Ho(n,"toString",{configurable:!0,enumerable:!1,value:lC(t),writable:!0})}:dr,_d=aC(cC);function uC(n,t){for(var e=-1,s=n==null?0:n.length;++e<s&&t(n[e],e,n)!==!1;);return n}function hC(n,t,e,s){for(var r=n.length,i=e+-1;++i<r;)if(t(n[i],i,n))return i;return-1}function dC(n){return n!==n}function fC(n,t,e){for(var s=e-1,r=n.length;++s<r;)if(n[s]===t)return s;return-1}function gC(n,t,e){return t===t?fC(n,t,e):hC(n,dC,e)}function kd(n,t){var e=n==null?0:n.length;return!!e&&gC(n,t,0)>-1}var pC=9007199254740991,mC=/^(?:0|[1-9]\d*)$/;function Uo(n,t){var e=typeof n;return t=t??pC,!!t&&(e=="number"||e!="symbol"&&mC.test(n))&&n>-1&&n%1==0&&n<t}function Go(n,t,e){t=="__proto__"&&Ho?Ho(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e}function fr(n,t){return n===t||n!==n&&t!==t}var yC=Object.prototype,bC=yC.hasOwnProperty;function sc(n,t,e){var s=n[t];(!(bC.call(n,t)&&fr(s,e))||e===void 0&&!(t in n))&&Go(n,t,e)}function Ei(n,t,e,s){var r=!e;e||(e={});for(var i=-1,o=t.length;++i<o;){var a=t[i],l=void 0;l===void 0&&(l=n[a]),r?Go(e,a,l):sc(e,a,l)}return e}var Dd=Math.max;function Rd(n,t,e){return t=Dd(t===void 0?n.length-1:t,0),function(){for(var s=arguments,r=-1,i=Dd(s.length-t,0),o=Array(i);++r<i;)o[r]=s[t+r];r=-1;for(var a=Array(t+1);++r<t;)a[r]=s[r];return a[t]=e(o),Td(n,this,a)}}function gr(n,t){return _d(Rd(n,t,dr),n+"")}var wC=9007199254740991;function rc(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=wC}function Bs(n){return n!=null&&rc(n.length)&&!tc(n)}function Yo(n,t,e){if(!Lt(e))return!1;var s=typeof t;return(s=="number"?Bs(e)&&Uo(t,e.length):s=="string"&&t in e)?fr(e[t],n):!1}function Id(n){return gr(function(t,e){var s=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=n.length>3&&typeof i=="function"?(r--,i):void 0,o&&Yo(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++s<r;){var a=e[s];a&&n(t,a,s,i)}return t})}var xC=Object.prototype;function Wo(n){var t=n&&n.constructor,e=typeof t=="function"&&t.prototype||xC;return n===e}function vC(n,t){for(var e=-1,s=Array(n);++e<n;)s[e]=t(e);return s}var CC="[object Arguments]";function Ld(n){return Ze(n)&&rs(n)==CC}var Bd=Object.prototype,SC=Bd.hasOwnProperty,EC=Bd.propertyIsEnumerable,pr=Ld(function(){return arguments}())?Ld:function(n){return Ze(n)&&SC.call(n,"callee")&&!EC.call(n,"callee")};function OC(){return!1}var Vd=typeof Rt=="object"&&Rt&&!Rt.nodeType&&Rt,jd=Vd&&typeof module=="object"&&module&&!module.nodeType&&module,MC=jd&&jd.exports===Vd,$d=MC?Ke.Buffer:void 0,PC=$d?$d.isBuffer:void 0,mr=PC||OC,AC="[object Arguments]",TC="[object Array]",NC="[object Boolean]",_C="[object Date]",kC="[object Error]",DC="[object Function]",RC="[object Map]",IC="[object Number]",LC="[object Object]",BC="[object RegExp]",VC="[object Set]",jC="[object String]",$C="[object WeakMap]",zC="[object ArrayBuffer]",FC="[object DataView]",HC="[object Float32Array]",UC="[object Float64Array]",GC="[object Int8Array]",YC="[object Int16Array]",WC="[object Int32Array]",qC="[object Uint8Array]",JC="[object Uint8ClampedArray]",XC="[object Uint16Array]",KC="[object Uint32Array]",At={};At[HC]=At[UC]=At[GC]=At[YC]=At[WC]=At[qC]=At[JC]=At[XC]=At[KC]=!0,At[AC]=At[TC]=At[zC]=At[NC]=At[FC]=At[_C]=At[kC]=At[DC]=At[RC]=At[IC]=At[LC]=At[BC]=At[VC]=At[jC]=At[$C]=!1;function ZC(n){return Ze(n)&&rc(n.length)&&!!At[rs(n)]}function qo(n){return function(t){return n(t)}}var zd=typeof Rt=="object"&&Rt&&!Rt.nodeType&&Rt,Oi=zd&&typeof module=="object"&&module&&!module.nodeType&&module,QC=Oi&&Oi.exports===zd,ic=QC&&xd.process,yr=function(){try{var n=Oi&&Oi.require&&Oi.require("util").types;return n||ic&&ic.binding&&ic.binding("util")}catch{}}(),Fd=yr&&yr.isTypedArray,Jo=Fd?qo(Fd):ZC,tS=Object.prototype,eS=tS.hasOwnProperty;function Hd(n,t){var e=ue(n),s=!e&&pr(n),r=!e&&!s&&mr(n),i=!e&&!s&&!r&&Jo(n),o=e||s||r||i,a=o?vC(n.length,String):[],l=a.length;for(var u in n)(t||eS.call(n,u))&&!(o&&(u=="length"||r&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Uo(u,l)))&&a.push(u);return a}function Ud(n,t){return function(e){return n(t(e))}}var nS=Ud(Object.keys,Object),sS=Object.prototype,rS=sS.hasOwnProperty;function Gd(n){if(!Wo(n))return nS(n);var t=[];for(var e in Object(n))rS.call(n,e)&&e!="constructor"&&t.push(e);return t}function Mi(n){return Bs(n)?Hd(n):Gd(n)}function iS(n){var t=[];if(n!=null)for(var e in Object(n))t.push(e);return t}var oS=Object.prototype,aS=oS.hasOwnProperty;function lS(n){if(!Lt(n))return iS(n);var t=Wo(n),e=[];for(var s in n)s=="constructor"&&(t||!aS.call(n,s))||e.push(s);return e}function br(n){return Bs(n)?Hd(n,!0):lS(n)}var cS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uS=/^\w*$/;function oc(n,t){if(ue(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||yn(n)?!0:uS.test(n)||!cS.test(n)||t!=null&&n in Object(t)}var Pi=Ls(Object,"create");function hS(){this.__data__=Pi?Pi(null):{},this.size=0}function dS(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}var fS="__lodash_hash_undefined__",gS=Object.prototype,pS=gS.hasOwnProperty;function mS(n){var t=this.__data__;if(Pi){var e=t[n];return e===fS?void 0:e}return pS.call(t,n)?t[n]:void 0}var yS=Object.prototype,bS=yS.hasOwnProperty;function wS(n){var t=this.__data__;return Pi?t[n]!==void 0:bS.call(t,n)}var xS="__lodash_hash_undefined__";function vS(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=Pi&&t===void 0?xS:t,this}function Vs(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var s=n[t];this.set(s[0],s[1])}}Vs.prototype.clear=hS,Vs.prototype.delete=dS,Vs.prototype.get=mS,Vs.prototype.has=wS,Vs.prototype.set=vS;function CS(){this.__data__=[],this.size=0}function Xo(n,t){for(var e=n.length;e--;)if(fr(n[e][0],t))return e;return-1}var SS=Array.prototype,ES=SS.splice;function OS(n){var t=this.__data__,e=Xo(t,n);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():ES.call(t,e,1),--this.size,!0}function MS(n){var t=this.__data__,e=Xo(t,n);return e<0?void 0:t[e][1]}function PS(n){return Xo(this.__data__,n)>-1}function AS(n,t){var e=this.__data__,s=Xo(e,n);return s<0?(++this.size,e.push([n,t])):e[s][1]=t,this}function $n(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var s=n[t];this.set(s[0],s[1])}}$n.prototype.clear=CS,$n.prototype.delete=OS,$n.prototype.get=MS,$n.prototype.has=PS,$n.prototype.set=AS;var Ai=Ls(Ke,"Map");function TS(){this.size=0,this.__data__={hash:new Vs,map:new(Ai||$n),string:new Vs}}function NS(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function Ko(n,t){var e=n.__data__;return NS(t)?e[typeof t=="string"?"string":"hash"]:e.map}function _S(n){var t=Ko(this,n).delete(n);return this.size-=t?1:0,t}function kS(n){return Ko(this,n).get(n)}function DS(n){return Ko(this,n).has(n)}function RS(n,t){var e=Ko(this,n),s=e.size;return e.set(n,t),this.size+=e.size==s?0:1,this}function zn(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var s=n[t];this.set(s[0],s[1])}}zn.prototype.clear=TS,zn.prototype.delete=_S,zn.prototype.get=kS,zn.prototype.has=DS,zn.prototype.set=RS;var IS="Expected a function";function ac(n,t){if(typeof n!="function"||t!=null&&typeof t!="function")throw new TypeError(IS);var e=function(){var s=arguments,r=t?t.apply(this,s):s[0],i=e.cache;if(i.has(r))return i.get(r);var o=n.apply(this,s);return e.cache=i.set(r,o)||i,o};return e.cache=new(ac.Cache||zn),e}ac.Cache=zn;var LS=500;function BS(n){var t=ac(n,function(s){return e.size===LS&&e.clear(),s}),e=t.cache;return t}var VS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jS=/\\(\\)?/g,$S=BS(function(n){var t=[];return n.charCodeAt(0)===46&&t.push(""),n.replace(VS,function(e,s,r,i){t.push(r?i.replace(jS,"$1"):s||e)}),t});function Ti(n){return n==null?"":Od(n)}function Zo(n,t){return ue(n)?n:oc(n,t)?[n]:$S(Ti(n))}var zS=1/0;function Ni(n){if(typeof n=="string"||yn(n))return n;var t=n+"";return t=="0"&&1/n==-zS?"-0":t}function Qo(n,t){t=Zo(t,n);for(var e=0,s=t.length;n!=null&&e<s;)n=n[Ni(t[e++])];return e&&e==s?n:void 0}function Yd(n,t,e){var s=n==null?void 0:Qo(n,t);return s===void 0?e:s}function lc(n,t){for(var e=-1,s=t.length,r=n.length;++e<s;)n[r+e]=t[e];return n}var Wd=Ie?Ie.isConcatSpreadable:void 0;function FS(n){return ue(n)||pr(n)||!!(Wd&&n&&n[Wd])}function ta(n,t,e,s,r){var i=-1,o=n.length;for(e||(e=FS),r||(r=[]);++i<o;){var a=n[i];e(a)?lc(r,a):s||(r[r.length]=a)}return r}function HS(n){var t=n==null?0:n.length;return t?ta(n):[]}function US(n){return _d(Rd(n,void 0,HS),n+"")}var cc=Ud(Object.getPrototypeOf,Object),GS="[object Object]",YS=Function.prototype,WS=Object.prototype,qd=YS.toString,qS=WS.hasOwnProperty,JS=qd.call(Object);function bn(n){if(!Ze(n)||rs(n)!=GS)return!1;var t=cc(n);if(t===null)return!0;var e=qS.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&qd.call(e)==JS}function XS(n,t,e){var s=-1,r=n.length;t<0&&(t=-t>r?0:r+t),e=e>r?r:e,e<0&&(e+=r),r=t>e?0:e-t>>>0,t>>>=0;for(var i=Array(r);++s<r;)i[s]=n[s+t];return i}function KS(n,t,e){var s=n.length;return e=e===void 0?s:e,!t&&e>=s?n:XS(n,t,e)}var ZS="\\ud800-\\udfff",QS="\\u0300-\\u036f",tE="\\ufe20-\\ufe2f",eE="\\u20d0-\\u20ff",nE=QS+tE+eE,sE="\\ufe0e\\ufe0f",rE="\\u200d",iE=RegExp("["+rE+ZS+nE+sE+"]");function Jd(n){return iE.test(n)}function oE(n){return n.split("")}var Xd="\\ud800-\\udfff",aE="\\u0300-\\u036f",lE="\\ufe20-\\ufe2f",cE="\\u20d0-\\u20ff",uE=aE+lE+cE,hE="\\ufe0e\\ufe0f",dE="["+Xd+"]",uc="["+uE+"]",hc="\\ud83c[\\udffb-\\udfff]",fE="(?:"+uc+"|"+hc+")",Kd="[^"+Xd+"]",Zd="(?:\\ud83c[\\udde6-\\uddff]){2}",Qd="[\\ud800-\\udbff][\\udc00-\\udfff]",gE="\\u200d",tf=fE+"?",ef="["+hE+"]?",pE="(?:"+gE+"(?:"+[Kd,Zd,Qd].join("|")+")"+ef+tf+")*",mE=ef+tf+pE,yE="(?:"+[Kd+uc+"?",uc,Zd,Qd,dE].join("|")+")",bE=RegExp(hc+"(?="+hc+")|"+yE+mE,"g");function wE(n){return n.match(bE)||[]}function xE(n){return Jd(n)?wE(n):oE(n)}function nf(n){return function(t){t=Ti(t);var e=Jd(t)?xE(t):void 0,s=e?e[0]:t.charAt(0),r=e?KS(e,1).join(""):t.slice(1);return s[n]()+r}}var ea=nf("toUpperCase");function vE(n){return ea(Ti(n).toLowerCase())}function CE(n,t,e,s){for(var r=-1,i=n==null?0:n.length;++r<i;)e=t(e,n[r],r,n);return e}function SE(n){return function(t){return n==null?void 0:n[t]}}var EE={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},OE=SE(EE),ME=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,PE="\\u0300-\\u036f",AE="\\ufe20-\\ufe2f",TE="\\u20d0-\\u20ff",NE=PE+AE+TE,_E="["+NE+"]",kE=RegExp(_E,"g");function DE(n){return n=Ti(n),n&&n.replace(ME,OE).replace(kE,"")}var RE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function IE(n){return n.match(RE)||[]}var LE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function BE(n){return LE.test(n)}var sf="\\ud800-\\udfff",VE="\\u0300-\\u036f",jE="\\ufe20-\\ufe2f",$E="\\u20d0-\\u20ff",zE=VE+jE+$E,rf="\\u2700-\\u27bf",of="a-z\\xdf-\\xf6\\xf8-\\xff",FE="\\xac\\xb1\\xd7\\xf7",HE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",UE="\\u2000-\\u206f",GE=" \\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",af="A-Z\\xc0-\\xd6\\xd8-\\xde",YE="\\ufe0e\\ufe0f",lf=FE+HE+UE+GE,cf="['’]",uf="["+lf+"]",WE="["+zE+"]",hf="\\d+",qE="["+rf+"]",df="["+of+"]",ff="[^"+sf+lf+hf+rf+of+af+"]",JE="\\ud83c[\\udffb-\\udfff]",XE="(?:"+WE+"|"+JE+")",KE="[^"+sf+"]",gf="(?:\\ud83c[\\udde6-\\uddff]){2}",pf="[\\ud800-\\udbff][\\udc00-\\udfff]",wr="["+af+"]",ZE="\\u200d",mf="(?:"+df+"|"+ff+")",QE="(?:"+wr+"|"+ff+")",yf="(?:"+cf+"(?:d|ll|m|re|s|t|ve))?",bf="(?:"+cf+"(?:D|LL|M|RE|S|T|VE))?",wf=XE+"?",xf="["+YE+"]?",tO="(?:"+ZE+"(?:"+[KE,gf,pf].join("|")+")"+xf+wf+")*",eO="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",nO="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",sO=xf+wf+tO,rO="(?:"+[qE,gf,pf].join("|")+")"+sO,iO=RegExp([wr+"?"+df+"+"+yf+"(?="+[uf,wr,"$"].join("|")+")",QE+"+"+bf+"(?="+[uf,wr+mf,"$"].join("|")+")",wr+"?"+mf+"+"+yf,wr+"+"+bf,nO,eO,hf,rO].join("|"),"g");function oO(n){return n.match(iO)||[]}function aO(n,t,e){return n=Ti(n),t=t,t===void 0?BE(n)?oO(n):IE(n):n.match(t)||[]}var lO="['’]",cO=RegExp(lO,"g");function vf(n){return function(t){return CE(aO(DE(t).replace(cO,"")),n,"")}}var na=vf(function(n,t,e){return t=t.toLowerCase(),n+(e?vE(t):t)});function uO(n,t,e){return n===n&&(e!==void 0&&(n=n<=e?n:e),t!==void 0&&(n=n>=t?n:t)),n}function we(n,t,e){return e===void 0&&(e=t,t=void 0),e!==void 0&&(e=Si(e),e=e===e?e:0),t!==void 0&&(t=Si(t),t=t===t?t:0),uO(Si(n),t,e)}function hO(){this.__data__=new $n,this.size=0}function dO(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e}function fO(n){return this.__data__.get(n)}function gO(n){return this.__data__.has(n)}var pO=200;function mO(n,t){var e=this.__data__;if(e instanceof $n){var s=e.__data__;if(!Ai||s.length<pO-1)return s.push([n,t]),this.size=++e.size,this;e=this.__data__=new zn(s)}return e.set(n,t),this.size=e.size,this}function Qe(n){var t=this.__data__=new $n(n);this.size=t.size}Qe.prototype.clear=hO,Qe.prototype.delete=dO,Qe.prototype.get=fO,Qe.prototype.has=gO,Qe.prototype.set=mO;function yO(n,t){return n&&Ei(t,Mi(t),n)}function bO(n,t){return n&&Ei(t,br(t),n)}var Cf=typeof Rt=="object"&&Rt&&!Rt.nodeType&&Rt,Sf=Cf&&typeof module=="object"&&module&&!module.nodeType&&module,wO=Sf&&Sf.exports===Cf,Ef=wO?Ke.Buffer:void 0,Of=Ef?Ef.allocUnsafe:void 0;function Mf(n,t){if(t)return n.slice();var e=n.length,s=Of?Of(e):new n.constructor(e);return n.copy(s),s}function xO(n,t){for(var e=-1,s=n==null?0:n.length,r=0,i=[];++e<s;){var o=n[e];t(o,e,n)&&(i[r++]=o)}return i}function Pf(){return[]}var vO=Object.prototype,CO=vO.propertyIsEnumerable,Af=Object.getOwnPropertySymbols,dc=Af?function(n){return n==null?[]:(n=Object(n),xO(Af(n),function(t){return CO.call(n,t)}))}:Pf;function SO(n,t){return Ei(n,dc(n),t)}var EO=Object.getOwnPropertySymbols,Tf=EO?function(n){for(var t=[];n;)lc(t,dc(n)),n=cc(n);return t}:Pf;function OO(n,t){return Ei(n,Tf(n),t)}function Nf(n,t,e){var s=t(n);return ue(n)?s:lc(s,e(n))}function fc(n){return Nf(n,Mi,dc)}function MO(n){return Nf(n,br,Tf)}var gc=Ls(Ke,"DataView"),pc=Ls(Ke,"Promise"),xr=Ls(Ke,"Set"),_f="[object Map]",PO="[object Object]",kf="[object Promise]",Df="[object Set]",Rf="[object WeakMap]",If="[object DataView]",AO=Is(gc),TO=Is(Ai),NO=Is(pc),_O=Is(xr),kO=Is(nc),Le=rs;(gc&&Le(new gc(new ArrayBuffer(1)))!=If||Ai&&Le(new Ai)!=_f||pc&&Le(pc.resolve())!=kf||xr&&Le(new xr)!=Df||nc&&Le(new nc)!=Rf)&&(Le=function(n){var t=rs(n),e=t==PO?n.constructor:void 0,s=e?Is(e):"";if(s)switch(s){case AO:return If;case TO:return _f;case NO:return kf;case _O:return Df;case kO:return Rf}return t});var DO=Object.prototype,RO=DO.hasOwnProperty;function IO(n){var t=n.length,e=new n.constructor(t);return t&&typeof n[0]=="string"&&RO.call(n,"index")&&(e.index=n.index,e.input=n.input),e}var sa=Ke.Uint8Array;function mc(n){var t=new n.constructor(n.byteLength);return new sa(t).set(new sa(n)),t}function LO(n,t){var e=t?mc(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}var BO=/\w*$/;function VO(n){var t=new n.constructor(n.source,BO.exec(n));return t.lastIndex=n.lastIndex,t}var Lf=Ie?Ie.prototype:void 0,Bf=Lf?Lf.valueOf:void 0;function jO(n){return Bf?Object(Bf.call(n)):{}}function Vf(n,t){var e=t?mc(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}var $O="[object Boolean]",zO="[object Date]",FO="[object Map]",HO="[object Number]",UO="[object RegExp]",GO="[object Set]",YO="[object String]",WO="[object Symbol]",qO="[object ArrayBuffer]",JO="[object DataView]",XO="[object Float32Array]",KO="[object Float64Array]",ZO="[object Int8Array]",QO="[object Int16Array]",tM="[object Int32Array]",eM="[object Uint8Array]",nM="[object Uint8ClampedArray]",sM="[object Uint16Array]",rM="[object Uint32Array]";function iM(n,t,e){var s=n.constructor;switch(t){case qO:return mc(n);case $O:case zO:return new s(+n);case JO:return LO(n,e);case XO:case KO:case ZO:case QO:case tM:case eM:case nM:case sM:case rM:return Vf(n,e);case FO:return new s;case HO:case YO:return new s(n);case UO:return VO(n);case GO:return new s;case WO:return jO(n)}}function jf(n){return typeof n.constructor=="function"&&!Wo(n)?nC(cc(n)):{}}var oM="[object Map]";function aM(n){return Ze(n)&&Le(n)==oM}var $f=yr&&yr.isMap,lM=$f?qo($f):aM,cM="[object Set]";function uM(n){return Ze(n)&&Le(n)==cM}var zf=yr&&yr.isSet,hM=zf?qo(zf):uM,dM=1,fM=2,gM=4,Ff="[object Arguments]",pM="[object Array]",mM="[object Boolean]",yM="[object Date]",bM="[object Error]",Hf="[object Function]",wM="[object GeneratorFunction]",xM="[object Map]",vM="[object Number]",Uf="[object Object]",CM="[object RegExp]",SM="[object Set]",EM="[object String]",OM="[object Symbol]",MM="[object WeakMap]",PM="[object ArrayBuffer]",AM="[object DataView]",TM="[object Float32Array]",NM="[object Float64Array]",_M="[object Int8Array]",kM="[object Int16Array]",DM="[object Int32Array]",RM="[object Uint8Array]",IM="[object Uint8ClampedArray]",LM="[object Uint16Array]",BM="[object Uint32Array]",Ot={};Ot[Ff]=Ot[pM]=Ot[PM]=Ot[AM]=Ot[mM]=Ot[yM]=Ot[TM]=Ot[NM]=Ot[_M]=Ot[kM]=Ot[DM]=Ot[xM]=Ot[vM]=Ot[Uf]=Ot[CM]=Ot[SM]=Ot[EM]=Ot[OM]=Ot[RM]=Ot[IM]=Ot[LM]=Ot[BM]=!0,Ot[bM]=Ot[Hf]=Ot[MM]=!1;function _i(n,t,e,s,r,i){var o,a=t&dM,l=t&fM,u=t&gM;if(o!==void 0)return o;if(!Lt(n))return n;var h=ue(n);if(h){if(o=IO(n),!a)return Nd(n,o)}else{var f=Le(n),d=f==Hf||f==wM;if(mr(n))return Mf(n,a);if(f==Uf||f==Ff||d&&!r){if(o=l||d?{}:jf(n),!a)return l?OO(n,bO(o,n)):SO(n,yO(o,n))}else{if(!Ot[f])return r?n:{};o=iM(n,f,a)}}i||(i=new Qe);var g=i.get(n);if(g)return g;i.set(n,o),hM(n)?n.forEach(function(y){o.add(_i(y,t,e,y,n,i))}):lM(n)&&n.forEach(function(y,b){o.set(b,_i(y,t,e,b,n,i))});var p=u?l?MO:fc:l?br:Mi,m=h?void 0:p(n);return uC(m||n,function(y,b){m&&(b=y,y=n[b]),sc(o,b,_i(y,t,e,b,n,i))}),o}var VM=4;function yc(n){return _i(n,VM)}var jM=1,$M=4;function Tt(n){return _i(n,jM|$M)}var zM="__lodash_hash_undefined__";function FM(n){return this.__data__.set(n,zM),this}function HM(n){return this.__data__.has(n)}function vr(n){var t=-1,e=n==null?0:n.length;for(this.__data__=new zn;++t<e;)this.add(n[t])}vr.prototype.add=vr.prototype.push=FM,vr.prototype.has=HM;function UM(n,t){for(var e=-1,s=n==null?0:n.length;++e<s;)if(t(n[e],e,n))return!0;return!1}function bc(n,t){return n.has(t)}var GM=1,YM=2;function Gf(n,t,e,s,r,i){var o=e&GM,a=n.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var u=i.get(n),h=i.get(t);if(u&&h)return u==t&&h==n;var f=-1,d=!0,g=e&YM?new vr:void 0;for(i.set(n,t),i.set(t,n);++f<a;){var p=n[f],m=t[f];if(s)var y=o?s(m,p,f,t,n,i):s(p,m,f,n,t,i);if(y!==void 0){if(y)continue;d=!1;break}if(g){if(!UM(t,function(b,w){if(!bc(g,w)&&(p===b||r(p,b,e,s,i)))return g.push(w)})){d=!1;break}}else if(!(p===m||r(p,m,e,s,i))){d=!1;break}}return i.delete(n),i.delete(t),d}function WM(n){var t=-1,e=Array(n.size);return n.forEach(function(s,r){e[++t]=[r,s]}),e}function wc(n){var t=-1,e=Array(n.size);return n.forEach(function(s){e[++t]=s}),e}var qM=1,JM=2,XM="[object Boolean]",KM="[object Date]",ZM="[object Error]",QM="[object Map]",tP="[object Number]",eP="[object RegExp]",nP="[object Set]",sP="[object String]",rP="[object Symbol]",iP="[object ArrayBuffer]",oP="[object DataView]",Yf=Ie?Ie.prototype:void 0,xc=Yf?Yf.valueOf:void 0;function aP(n,t,e,s,r,i,o){switch(e){case oP:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case iP:return!(n.byteLength!=t.byteLength||!i(new sa(n),new sa(t)));case XM:case KM:case tP:return fr(+n,+t);case ZM:return n.name==t.name&&n.message==t.message;case eP:case sP:return n==t+"";case QM:var a=WM;case nP:var l=s&qM;if(a||(a=wc),n.size!=t.size&&!l)return!1;var u=o.get(n);if(u)return u==t;s|=JM,o.set(n,t);var h=Gf(a(n),a(t),s,r,i,o);return o.delete(n),h;case rP:if(xc)return xc.call(n)==xc.call(t)}return!1}var lP=1,cP=Object.prototype,uP=cP.hasOwnProperty;function hP(n,t,e,s,r,i){var o=e&lP,a=fc(n),l=a.length,u=fc(t),h=u.length;if(l!=h&&!o)return!1;for(var f=l;f--;){var d=a[f];if(!(o?d in t:uP.call(t,d)))return!1}var g=i.get(n),p=i.get(t);if(g&&p)return g==t&&p==n;var m=!0;i.set(n,t),i.set(t,n);for(var y=o;++f<l;){d=a[f];var b=n[d],w=t[d];if(s)var x=o?s(w,b,d,t,n,i):s(b,w,d,n,t,i);if(!(x===void 0?b===w||r(b,w,e,s,i):x)){m=!1;break}y||(y=d=="constructor")}if(m&&!y){var v=n.constructor,S=t.constructor;v!=S&&"constructor"in n&&"constructor"in t&&!(typeof v=="function"&&v instanceof v&&typeof S=="function"&&S instanceof S)&&(m=!1)}return i.delete(n),i.delete(t),m}var dP=1,Wf="[object Arguments]",qf="[object Array]",ra="[object Object]",fP=Object.prototype,Jf=fP.hasOwnProperty;function gP(n,t,e,s,r,i){var o=ue(n),a=ue(t),l=o?qf:Le(n),u=a?qf:Le(t);l=l==Wf?ra:l,u=u==Wf?ra:u;var h=l==ra,f=u==ra,d=l==u;if(d&&mr(n)){if(!mr(t))return!1;o=!0,h=!1}if(d&&!h)return i||(i=new Qe),o||Jo(n)?Gf(n,t,e,s,r,i):aP(n,t,l,e,s,r,i);if(!(e&dP)){var g=h&&Jf.call(n,"__wrapped__"),p=f&&Jf.call(t,"__wrapped__");if(g||p){var m=g?n.value():n,y=p?t.value():t;return i||(i=new Qe),r(m,y,e,s,i)}}return d?(i||(i=new Qe),hP(n,t,e,s,r,i)):!1}function ia(n,t,e,s,r){return n===t?!0:n==null||t==null||!Ze(n)&&!Ze(t)?n!==n&&t!==t:gP(n,t,e,s,ia,r)}var pP=1,mP=2;function yP(n,t,e,s){var r=e.length,i=r;if(n==null)return!i;for(n=Object(n);r--;){var o=e[r];if(o[2]?o[1]!==n[o[0]]:!(o[0]in n))return!1}for(;++r<i;){o=e[r];var a=o[0],l=n[a],u=o[1];if(o[2]){if(l===void 0&&!(a in n))return!1}else{var h=new Qe,f;if(!(f===void 0?ia(u,l,pP|mP,s,h):f))return!1}}return!0}function Xf(n){return n===n&&!Lt(n)}function bP(n){for(var t=Mi(n),e=t.length;e--;){var s=t[e],r=n[s];t[e]=[s,r,Xf(r)]}return t}function Kf(n,t){return function(e){return e==null?!1:e[n]===t&&(t!==void 0||n in Object(e))}}function wP(n){var t=bP(n);return t.length==1&&t[0][2]?Kf(t[0][0],t[0][1]):function(e){return e===n||yP(e,n,t)}}function xP(n,t){return n!=null&&t in Object(n)}function Zf(n,t,e){t=Zo(t,n);for(var s=-1,r=t.length,i=!1;++s<r;){var o=Ni(t[s]);if(!(i=n!=null&&e(n,o)))break;n=n[o]}return i||++s!=r?i:(r=n==null?0:n.length,!!r&&rc(r)&&Uo(o,r)&&(ue(n)||pr(n)))}function Qf(n,t){return n!=null&&Zf(n,t,xP)}var vP=1,CP=2;function SP(n,t){return oc(n)&&Xf(t)?Kf(Ni(n),t):function(e){var s=Yd(e,n);return s===void 0&&s===t?Qf(e,n):ia(t,s,vP|CP)}}function EP(n){return function(t){return t==null?void 0:t[n]}}function OP(n){return function(t){return Qo(t,n)}}function MP(n){return oc(n)?EP(Ni(n)):OP(n)}function vc(n){return typeof n=="function"?n:n==null?dr:typeof n=="object"?ue(n)?SP(n[0],n[1]):wP(n):MP(n)}function PP(n,t,e,s){for(var r=-1,i=n==null?0:n.length;++r<i;){var o=n[r];t(s,o,e(o),n)}return s}function AP(n){return function(t,e,s){for(var r=-1,i=Object(t),o=s(t),a=o.length;a--;){var l=o[++r];if(e(i[l],l,i)===!1)break}return t}}var tg=AP();function TP(n,t){return n&&tg(n,t,Mi)}function NP(n,t){return function(e,s){if(e==null)return e;if(!Bs(e))return n(e,s);for(var r=e.length,i=-1,o=Object(e);++i<r&&s(o[i],i,o)!==!1;);return e}}var eg=NP(TP);function _P(n,t,e,s){return eg(n,function(r,i,o){t(s,r,e(r),o)}),s}function kP(n,t){return function(e,s){var r=ue(e)?PP:_P,i=t?t():{};return r(e,n,vc(s),i)}}var Cc=function(){return Ke.Date.now()},DP="Expected a function",RP=Math.max,IP=Math.min;function ng(n,t,e){var s,r,i,o,a,l,u=0,h=!1,f=!1,d=!0;if(typeof n!="function")throw new TypeError(DP);t=Si(t)||0,Lt(e)&&(h=!!e.leading,f="maxWait"in e,i=f?RP(Si(e.maxWait)||0,t):i,d="trailing"in e?!!e.trailing:d);function g(E){var C=s,M=r;return s=r=void 0,u=E,o=n.apply(M,C),o}function p(E){return u=E,a=setTimeout(b,t),h?g(E):o}function m(E){var C=E-l,M=E-u,T=t-C;return f?IP(T,i-M):T}function y(E){var C=E-l,M=E-u;return l===void 0||C>=t||C<0||f&&M>=i}function b(){var E=Cc();if(y(E))return w(E);a=setTimeout(b,m(E))}function w(E){return a=void 0,d&&s?g(E):(s=r=void 0,o)}function x(){a!==void 0&&clearTimeout(a),u=0,s=l=r=a=void 0}function v(){return a===void 0?o:w(Cc())}function S(){var E=Cc(),C=y(E);if(s=arguments,r=this,l=E,C){if(a===void 0)return p(l);if(f)return clearTimeout(a),a=setTimeout(b,t),g(l)}return a===void 0&&(a=setTimeout(b,t)),o}return S.cancel=x,S.flush=v,S}var sg=Object.prototype,LP=sg.hasOwnProperty,BP=gr(function(n,t){n=Object(n);var e=-1,s=t.length,r=s>2?t[2]:void 0;for(r&&Yo(t[0],t[1],r)&&(s=1);++e<s;)for(var i=t[e],o=br(i),a=-1,l=o.length;++a<l;){var u=o[a],h=n[u];(h===void 0||fr(h,sg[u])&&!LP.call(n,u))&&(n[u]=i[u])}return n});function Sc(n,t,e){(e!==void 0&&!fr(n[t],e)||e===void 0&&!(t in n))&&Go(n,t,e)}function oa(n){return Ze(n)&&Bs(n)}function Ec(n,t){if(!(t==="constructor"&&typeof n[t]=="function")&&t!="__proto__")return n[t]}function VP(n){return Ei(n,br(n))}function jP(n,t,e,s,r,i,o){var a=Ec(n,e),l=Ec(t,e),u=o.get(l);if(u){Sc(n,e,u);return}var h=i?i(a,l,e+"",n,t,o):void 0,f=h===void 0;if(f){var d=ue(l),g=!d&&mr(l),p=!d&&!g&&Jo(l);h=l,d||g||p?ue(a)?h=a:oa(a)?h=Nd(a):g?(f=!1,h=Mf(l,!0)):p?(f=!1,h=Vf(l,!0)):h=[]:bn(l)||pr(l)?(h=a,pr(a)?h=VP(a):(!Lt(a)||tc(a))&&(h=jf(l))):f=!1}f&&(o.set(l,h),r(h,l,s,i,o),o.delete(l)),Sc(n,e,h)}function aa(n,t,e,s,r){n!==t&&tg(t,function(i,o){if(r||(r=new Qe),Lt(i))jP(n,t,o,e,aa,s,r);else{var a=s?s(Ec(n,o),i,o+"",n,t,r):void 0;a===void 0&&(a=i),Sc(n,o,a)}},br)}function rg(n,t,e,s,r,i){return Lt(n)&&Lt(t)&&(i.set(t,n),aa(n,t,void 0,rg,i),i.delete(t)),n}var $P=Id(function(n,t,e,s){aa(n,t,e,s)}),ig=gr(function(n){return n.push(void 0,rg),Td($P,void 0,n)}),zP=200;function FP(n,t,e,s){var r=-1,i=kd,o=!0,a=n.length,l=[],u=t.length;if(!a)return l;t.length>=zP&&(i=bc,o=!1,t=new vr(t));t:for(;++r<a;){var h=n[r],f=h;if(h=h!==0?h:0,o&&f===f){for(var d=u;d--;)if(t[d]===f)continue t;l.push(h)}else i(t,f,s)||l.push(h)}return l}var HP=gr(function(n,t){return oa(n)?FP(n,ta(t,1,oa,!0)):[]});function UP(n,t){var e=-1,s=Bs(n)?Array(n.length):[];return eg(n,function(r,i,o){s[++e]=t(r,i,o)}),s}function la(n){for(var t=-1,e=n==null?0:n.length,s={};++t<e;){var r=n[t];s[r[0]]=r[1]}return s}var GP=Object.prototype,YP=GP.hasOwnProperty,og=kP(function(n,t,e){YP.call(n,e)?n[e].push(t):Go(n,e,[t])});function WP(n,t){return n>t}var qP=Object.prototype,JP=qP.hasOwnProperty;function XP(n,t){return n!=null&&JP.call(n,t)}function ca(n,t){return n!=null&&Zf(n,t,XP)}var KP="[object Map]",ZP="[object Set]",QP=Object.prototype,t2=QP.hasOwnProperty;function ag(n){if(n==null)return!0;if(Bs(n)&&(ue(n)||typeof n=="string"||typeof n.splice=="function"||mr(n)||Jo(n)||pr(n)))return!n.length;var t=Le(n);if(t==KP||t==ZP)return!n.size;if(Wo(n))return!Gd(n).length;for(var e in n)if(t2.call(n,e))return!1;return!0}function wn(n,t){return ia(n,t)}var e2="[object Number]";function Oc(n){return typeof n=="number"||Ze(n)&&rs(n)==e2}function ua(n){return n==null}function n2(n){return n===void 0}var s2=nf("toLowerCase");function r2(n,t,e){for(var s=-1,r=n.length;++s<r;){var i=n[s],o=t(i);if(o!=null&&(a===void 0?o===o&&!yn(o):e(o,a)))var a=o,l=i}return l}function i2(n){return n&&n.length?r2(n,dr,WP):void 0}var Yt=Id(function(n,t,e){aa(n,t,e)});function o2(n,t,e,s){if(!Lt(n))return n;t=Zo(t,n);for(var r=-1,i=t.length,o=i-1,a=n;a!=null&&++r<i;){var l=Ni(t[r]),u=e;if(l==="__proto__"||l==="constructor"||l==="prototype")return n;if(r!=o){var h=a[l];u=void 0,u===void 0&&(u=Lt(h)?h:Uo(t[r+1])?[]:{})}sc(a,l,u),a=a[l]}return n}function a2(n,t,e){for(var s=-1,r=t.length,i={};++s<r;){var o=t[s],a=Qo(n,o);e(a,o)&&o2(i,Zo(o,n),a)}return i}function l2(n,t){var e=n.length;for(n.sort(t);e--;)n[e]=n[e].value;return n}function c2(n,t){if(n!==t){var e=n!==void 0,s=n===null,r=n===n,i=yn(n),o=t!==void 0,a=t===null,l=t===t,u=yn(t);if(!a&&!u&&!i&&n>t||i&&o&&l&&!a&&!u||s&&o&&l||!e&&l||!r)return 1;if(!s&&!i&&!u&&n<t||u&&e&&r&&!s&&!i||a&&e&&r||!o&&r||!l)return-1}return 0}function u2(n,t,e){for(var s=-1,r=n.criteria,i=t.criteria,o=r.length,a=e.length;++s<o;){var l=c2(r[s],i[s]);if(l){if(s>=a)return l;var u=e[s];return l*(u=="desc"?-1:1)}}return n.index-t.index}function h2(n,t,e){t.length?t=Fo(t,function(i){return ue(i)?function(o){return Qo(o,i.length===1?i[0]:i)}:i}):t=[dr];var s=-1;t=Fo(t,qo(vc));var r=UP(n,function(i,o,a){var l=Fo(t,function(u){return u(i)});return{criteria:l,index:++s,value:i}});return l2(r,function(i,o){return u2(i,o,e)})}function d2(n,t){return a2(n,t,function(e,s){return Qf(n,s)})}var Mc=US(function(n,t){return n==null?{}:d2(n,t)}),Pc=gr(function(n,t){if(n==null)return[];var e=t.length;return e>1&&Yo(n,t[0],t[1])?t=[]:e>2&&Yo(t[0],t[1],t[2])&&(t=[t[0]]),h2(n,ta(t),[])}),f2=4294967295,g2=f2-1,p2=Math.floor,m2=Math.min;function lg(n,t,e,s){var r=0,i=n==null?0:n.length;if(i===0)return 0;t=e(t);for(var o=t!==t,a=t===null,l=yn(t),u=t===void 0;r<i;){var h=p2((r+i)/2),f=e(n[h]),d=f!==void 0,g=f===null,p=f===f,m=yn(f);if(o)var y=p;else u?y=p&&d:a?y=p&&d&&!g:l?y=p&&d&&!g&&!m:g||m?y=!1:y=f<t;y?r=h+1:i=h}return m2(i,g2)}var y2=4294967295,b2=y2>>>1;function w2(n,t,e){var s=0,r=n==null?s:n.length;if(typeof t=="number"&&t===t&&r<=b2){for(;s<r;){var i=s+r>>>1,o=n[i];o!==null&&!yn(o)&&o<t?s=i+1:r=i}return r}return lg(n,t,dr)}function x2(n,t){return w2(n,t)}function v2(n,t,e){return lg(n,t,vc(e))}var C2=vf(function(n,t,e){return n+(e?" ":"")+ea(t)}),S2="Expected a function";function E2(n,t,e){var s=!0,r=!0;if(typeof n!="function")throw new TypeError(S2);return Lt(e)&&(s="leading"in e?!!e.leading:s,r="trailing"in e?!!e.trailing:r),ng(n,t,{leading:s,maxWait:t,trailing:r})}var O2=1/0,M2=xr&&1/wc(new xr([,-0]))[1]==O2?function(n){return new xr(n)}:sC,P2=200;function cg(n,t,e){var s=-1,r=kd,i=n.length,o=!0,a=[],l=a;if(i>=P2){var u=M2(n);if(u)return wc(u);o=!1,r=bc,l=new vr}else l=a;t:for(;++s<i;){var h=n[s],f=h;if(h=h!==0?h:0,o&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue t;a.push(h)}else r(l,f,e)||(l!==a&&l.push(f),a.push(h))}return a}var ug=gr(function(n){return cg(ta(n,1,oa,!0))});function hg(n){return n&&n.length?cg(n):[]}const dg=n=>n===void 0,ha=n=>typeof n=="boolean",Be=n=>typeof n=="number",Fn=n=>typeof Element>"u"?!1:n instanceof Element,A2=n=>Xe(n)?!Number.isNaN(Number(n)):!1,fg=n=>Object.keys(n);class gg extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function T2(n,t){throw new gg(`[${n}] ${t}`)}function Pe(n,t){if(process.env.NODE_ENV!=="production"){const e=Xe(n)?new gg(`[${n}] ${t}`):n;console.warn(e)}}const N2="utils/dom/style",pg=(n="")=>n.split(" ").filter(t=>!!t.trim()),mg=(n,t)=>{if(!n||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return n.classList.contains(t)},_2=(n,t)=>{!n||!t.trim()||n.classList.add(...pg(t))},k2=(n,t)=>{!n||!t.trim()||n.classList.remove(...pg(t))},D2=(n,t)=>{var e;if(!Gt||!n||!t)return"";let s=xv(t);s==="float"&&(s="cssFloat");try{const r=n.style[s];if(r)return r;const i=(e=document.defaultView)==null?void 0:e.getComputedStyle(n,"");return i?i[s]:""}catch{return n.style[s]}};function ki(n,t="px"){if(!n)return"";if(Be(n)||A2(n))return`${n}${t}`;if(Xe(n))return n;Pe(N2,"binding value must be a string or number")}let da;const R2=n=>{var t;if(!Gt)return 0;if(da!==void 0)return da;const e=document.createElement("div");e.className=`${n}-scrollbar__wrap`,e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);const s=e.offsetWidth;e.style.overflow="scroll";const r=document.createElement("div");r.style.width="100%",e.appendChild(r);const i=r.offsetWidth;return(t=e.parentNode)==null||t.removeChild(e),da=s-i,da};/*! Element Plus Icons Vue v2.3.1 */var I2=c.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),L2=I2,B2=c.defineComponent({name:"CircleCheck",__name:"circle-check",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"}),c.createElementVNode("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"})]))}}),V2=B2,j2=c.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),yg=j2,$2=c.defineComponent({name:"CircleClose",__name:"circle-close",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"}),c.createElementVNode("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"})]))}}),bg=$2,z2=c.defineComponent({name:"Close",__name:"close",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),F2=z2,H2=c.defineComponent({name:"DeleteFilled",__name:"delete-filled",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),wg=H2,U2=c.defineComponent({name:"Document",__name:"document",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),G2=U2,Y2=c.defineComponent({name:"Hide",__name:"hide",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"}),c.createElementVNode("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"})]))}}),W2=Y2,q2=c.defineComponent({name:"InfoFilled",__name:"info-filled",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),xg=q2,J2=c.defineComponent({name:"Loading",__name:"loading",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),fa=J2,X2=c.defineComponent({name:"Plus",__name:"plus",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),K2=X2,Z2=c.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),vg=Z2,Q2=c.defineComponent({name:"View",__name:"view",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),Cg=Q2,tA=c.defineComponent({name:"WarningFilled",__name:"warning-filled",setup(n){return(t,e)=>(c.openBlock(),c.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[c.createElementVNode("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"})]))}}),Sg=tA;const Eg="__epPropKey",ct=n=>n,eA=n=>hr(n)&&!!n[Eg],ga=(n,t)=>{if(!hr(n)||eA(n))return n;const{values:e,required:s,default:r,type:i,validator:o}=n,l={type:i,required:!!s,validator:e||o?u=>{let h=!1,f=[];if(e&&(f=Array.from(e),zo(n,"default")&&f.push(r),h||(h=f.includes(u))),o&&(h||(h=o(u))),!h&&f.length>0){const d=[...new Set(f)].map(g=>JSON.stringify(g)).join(", ");c.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`)}return h}:void 0,[Eg]:!0};return zo(n,"default")&&(l.default=r),l},Kt=n=>la(Object.entries(n).map(([t,e])=>[t,ga(e,t)])),Di=ct([String,Object,Function]),Og={Close:F2,SuccessFilled:vg,InfoFilled:xg,WarningFilled:Sg,CircleCloseFilled:yg},pa={success:vg,warning:Sg,error:yg,info:xg},nA={validating:fa,success:V2,error:bg},js=(n,t)=>{if(n.install=e=>{for(const s of[n,...Object.values(t??{})])e.component(s.name,s)},t)for(const[e,s]of Object.entries(t))n[e]=s;return n},sA=(n,t)=>(n.install=e=>{n._context=e._context,e.config.globalProperties[t]=n},n),rA=n=>(n.install=ss,n),Cr={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"},Ac="update:modelValue",Mg=["","default","small","large"],iA=n=>["",...Mg].includes(n);var ma=(n=>(n[n.TEXT=1]="TEXT",n[n.CLASS=2]="CLASS",n[n.STYLE=4]="STYLE",n[n.PROPS=8]="PROPS",n[n.FULL_PROPS=16]="FULL_PROPS",n[n.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",n[n.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",n[n.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",n[n.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",n[n.NEED_PATCH=512]="NEED_PATCH",n[n.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",n[n.HOISTED=-1]="HOISTED",n[n.BAIL=-2]="BAIL",n))(ma||{});const oA=n=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(n),Pg=n=>n,aA=["class","style"],lA=/^on[A-Z]/,cA=(n={})=>{const{excludeListeners:t=!1,excludeKeys:e}=n,s=c.computed(()=>((e==null?void 0:e.value)||[]).concat(aA)),r=c.getCurrentInstance();return r?c.computed(()=>{var i;return la(Object.entries((i=r.proxy)==null?void 0:i.$attrs).filter(([o])=>!s.value.includes(o)&&!(t&&lA.test(o))))}):(Pe("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),c.computed(()=>({})))},uA=({from:n,replacement:t,scope:e,version:s,ref:r,type:i="API"},o)=>{c.watch(()=>c.unref(o),a=>{a&&Pe(e,`[${i}] ${n} is about to be deprecated in version ${s}, please use ${t} instead.
15
15
  For more detail, please visit: ${r}
16
- `)},{immediate:!0})},hA=(n,t,e,s)=>{let r={offsetX:0,offsetY:0};const i=u=>{const h=u.clientX,f=u.clientY,{offsetX:d,offsetY:g}=r,p=n.value.getBoundingClientRect(),m=p.left,y=p.top,b=p.width,w=p.height,x=document.documentElement.clientWidth,v=document.documentElement.clientHeight,S=-m+d,E=-y+g,C=x-m-b+d,M=v-y-w+g,T=_=>{let D=d+_.clientX-h,N=g+_.clientY-f;s!=null&&s.value||(D=Math.min(Math.max(D,S),C),N=Math.min(Math.max(N,E),M)),r={offsetX:D,offsetY:N},n.value&&(n.value.style.transform=`translate(${ki(D)}, ${ki(N)})`)},k=()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",k)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",k)},o=()=>{t.value&&n.value&&t.value.addEventListener("mousedown",i)},a=()=>{t.value&&n.value&&t.value.removeEventListener("mousedown",i)},l=()=>{r={offsetX:0,offsetY:0},n.value&&(n.value.style.transform="none")};return c.onMounted(()=>{c.watchEffect(()=>{e.value?o():a()})}),c.onBeforeUnmount(()=>{a()}),{resetPosition:l}};var dA={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 fA=n=>(t,e)=>gA(t,e,c.unref(n)),gA=(n,t,e)=>Yd(e,n,n).replace(/\{(\w+)\}/g,(s,r)=>{var i;return`${(i=t==null?void 0:t[r])!=null?i:`{${r}}`}`}),pA=n=>{const t=c.computed(()=>c.unref(n).name),e=c.isRef(n)?n:c.ref(n);return{lang:t,locale:e,t:fA(n)}},Ag=Symbol("localeContextKey"),mA=n=>{const t=n||c.inject(Ag,c.ref());return pA(c.computed(()=>t.value||dA))},ya="el",yA="is-",$s=(n,t,e,s,r)=>{let i=`${n}-${t}`;return e&&(i+=`-${e}`),s&&(i+=`__${s}`),r&&(i+=`--${r}`),i},Tg=Symbol("namespaceContextKey"),Tc=n=>{const t=n||(c.getCurrentInstance()?c.inject(Tg,c.ref(ya)):c.ref(ya));return c.computed(()=>c.unref(t)||ya)},me=(n,t)=>{const e=Tc(t);return{namespace:e,b:(m="")=>$s(e.value,n,m,"",""),e:m=>m?$s(e.value,n,"",m,""):"",m:m=>m?$s(e.value,n,"","",m):"",be:(m,y)=>m&&y?$s(e.value,n,m,y,""):"",em:(m,y)=>m&&y?$s(e.value,n,"",m,y):"",bm:(m,y)=>m&&y?$s(e.value,n,m,"",y):"",bem:(m,y,b)=>m&&y&&b?$s(e.value,n,m,y,b):"",is:(m,...y)=>{const b=y.length>=1?y[0]:!0;return m&&b?`${yA}${m}`:""},cssVar:m=>{const y={};for(const b in m)m[b]&&(y[`--${e.value}-${b}`]=m[b]);return y},cssVarName:m=>`--${e.value}-${m}`,cssVarBlock:m=>{const y={};for(const b in m)m[b]&&(y[`--${e.value}-${n}-${b}`]=m[b]);return y},cssVarBlockName:m=>`--${e.value}-${n}-${m}`}},bA=(n,t={})=>{c.isRef(n)||T2("[useLockscreen]","You need to pass a ref param to this function");const e=t.ns||me("popup"),s=c.computed(()=>e.bm("parent","hidden"));if(!Gt||mg(document.body,s.value))return;let r=0,i=!1,o="0";const a=()=>{setTimeout(()=>{typeof document>"u"||(k2(document==null?void 0:document.body,s.value),i&&document&&(document.body.style.width=o))},200)};c.watch(n,l=>{if(!l){a();return}i=!mg(document.body,s.value),i&&(o=document.body.style.width),r=R2(e.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,h=D2(document.body,"overflowY");r>0&&(u||h==="scroll")&&i&&(document.body.style.width=`calc(100% - ${r}px)`),_2(document.body,s.value)}),c.onScopeDispose(()=>a())},wA=ga({type:ct(Boolean),default:null}),xA=ga({type:ct(Function)}),vA=n=>{const t=`update:${n}`,e=`onUpdate:${n}`,s=[t],r={[n]:wA,[e]:xA};return{useModelToggle:({indicator:o,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:h,onHide:f})=>{const d=c.getCurrentInstance(),{emit:g}=d,p=d.props,m=c.computed(()=>Re(p[e])),y=c.computed(()=>p[n]===null),b=C=>{o.value!==!0&&(o.value=!0,a&&(a.value=C),Re(h)&&h(C))},w=C=>{o.value!==!1&&(o.value=!1,a&&(a.value=C),Re(f)&&f(C))},x=C=>{if(p.disabled===!0||Re(u)&&!u())return;const M=m.value&&Gt;M&&g(t,!0),(y.value||!M)&&b(C)},v=C=>{if(p.disabled===!0||!Gt)return;const M=m.value&&Gt;M&&g(t,!1),(y.value||!M)&&w(C)},S=C=>{ha(C)&&(p.disabled&&C?m.value&&g(t,!1):o.value!==C&&(C?b():w()))},E=()=>{o.value?v():x()};return c.watch(()=>p[n],S),l&&d.appContext.config.globalProperties.$route!==void 0&&c.watch(()=>({...d.proxy.$route}),()=>{l.value&&o.value&&v()}),c.onMounted(()=>{S(p[n])}),{hide:v,show:x,toggle:E,hasUpdateHandler:m}},useModelToggleProps:r,useModelToggleEmits:s}},Ng=n=>{const t=c.getCurrentInstance();return c.computed(()=>{var e,s;return(s=(e=t==null?void 0:t.proxy)==null?void 0:e.$props)==null?void 0:s[n]})};var xe="top",Ve="bottom",je="right",ve="left",Nc="auto",Ri=[xe,Ve,je,ve],Sr="start",Ii="end",CA="clippingParents",_g="viewport",Li="popper",SA="reference",kg=Ri.reduce(function(n,t){return n.concat([t+"-"+Sr,t+"-"+Ii])},[]),_c=[].concat(Ri,[Nc]).reduce(function(n,t){return n.concat([t,t+"-"+Sr,t+"-"+Ii])},[]),EA="beforeRead",OA="read",MA="afterRead",PA="beforeMain",AA="main",TA="afterMain",NA="beforeWrite",_A="write",kA="afterWrite",DA=[EA,OA,MA,PA,AA,TA,NA,_A,kA];function xn(n){return n?(n.nodeName||"").toLowerCase():null}function tn(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function Er(n){var t=tn(n).Element;return n instanceof t||n instanceof Element}function $e(n){var t=tn(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function kc(n){if(typeof ShadowRoot>"u")return!1;var t=tn(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function RA(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var s=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!$e(i)||!xn(i)||(Object.assign(i.style,s),Object.keys(r).forEach(function(o){var a=r[o];a===!1?i.removeAttribute(o):i.setAttribute(o,a===!0?"":a)}))})}function IA(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(s){var r=t.elements[s],i=t.attributes[s]||{},o=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:e[s]),a=o.reduce(function(l,u){return l[u]="",l},{});!$e(r)||!xn(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}var Dg={name:"applyStyles",enabled:!0,phase:"write",fn:RA,effect:IA,requires:["computeStyles"]};function vn(n){return n.split("-")[0]}var zs=Math.max,ba=Math.min,Or=Math.round;function Mr(n,t){t===void 0&&(t=!1);var e=n.getBoundingClientRect(),s=1,r=1;if($e(n)&&t){var i=n.offsetHeight,o=n.offsetWidth;o>0&&(s=Or(e.width)/o||1),i>0&&(r=Or(e.height)/i||1)}return{width:e.width/s,height:e.height/r,top:e.top/r,right:e.right/s,bottom:e.bottom/r,left:e.left/s,x:e.left/s,y:e.top/r}}function Dc(n){var t=Mr(n),e=n.offsetWidth,s=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:s}}function Rg(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&kc(e)){var s=t;do{if(s&&n.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Hn(n){return tn(n).getComputedStyle(n)}function LA(n){return["table","td","th"].indexOf(xn(n))>=0}function is(n){return((Er(n)?n.ownerDocument:n.document)||window.document).documentElement}function wa(n){return xn(n)==="html"?n:n.assignedSlot||n.parentNode||(kc(n)?n.host:null)||is(n)}function Ig(n){return!$e(n)||Hn(n).position==="fixed"?null:n.offsetParent}function BA(n){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,e=navigator.userAgent.indexOf("Trident")!==-1;if(e&&$e(n)){var s=Hn(n);if(s.position==="fixed")return null}var r=wa(n);for(kc(r)&&(r=r.host);$e(r)&&["html","body"].indexOf(xn(r))<0;){var i=Hn(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Bi(n){for(var t=tn(n),e=Ig(n);e&&LA(e)&&Hn(e).position==="static";)e=Ig(e);return e&&(xn(e)==="html"||xn(e)==="body"&&Hn(e).position==="static")?t:e||BA(n)||t}function Rc(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Vi(n,t,e){return zs(n,ba(t,e))}function VA(n,t,e){var s=Vi(n,t,e);return s>e?e:s}function Lg(){return{top:0,right:0,bottom:0,left:0}}function Bg(n){return Object.assign({},Lg(),n)}function Vg(n,t){return t.reduce(function(e,s){return e[s]=n,e},{})}var jA=function(n,t){return n=typeof n=="function"?n(Object.assign({},t.rects,{placement:t.placement})):n,Bg(typeof n!="number"?n:Vg(n,Ri))};function $A(n){var t,e=n.state,s=n.name,r=n.options,i=e.elements.arrow,o=e.modifiersData.popperOffsets,a=vn(e.placement),l=Rc(a),u=[ve,je].indexOf(a)>=0,h=u?"height":"width";if(!(!i||!o)){var f=jA(r.padding,e),d=Dc(i),g=l==="y"?xe:ve,p=l==="y"?Ve:je,m=e.rects.reference[h]+e.rects.reference[l]-o[l]-e.rects.popper[h],y=o[l]-e.rects.reference[l],b=Bi(i),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,x=m/2-y/2,v=f[g],S=w-d[h]-f[p],E=w/2-d[h]/2+x,C=Vi(v,E,S),M=l;e.modifiersData[s]=(t={},t[M]=C,t.centerOffset=C-E,t)}}function zA(n){var t=n.state,e=n.options,s=e.element,r=s===void 0?"[data-popper-arrow]":s;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||!Rg(t.elements.popper,r)||(t.elements.arrow=r))}var FA={name:"arrow",enabled:!0,phase:"main",fn:$A,effect:zA,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pr(n){return n.split("-")[1]}var HA={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UA(n){var t=n.x,e=n.y,s=window,r=s.devicePixelRatio||1;return{x:Or(t*r)/r||0,y:Or(e*r)/r||0}}function jg(n){var t,e=n.popper,s=n.popperRect,r=n.placement,i=n.variation,o=n.offsets,a=n.position,l=n.gpuAcceleration,u=n.adaptive,h=n.roundOffsets,f=n.isFixed,d=o.x,g=d===void 0?0:d,p=o.y,m=p===void 0?0:p,y=typeof h=="function"?h({x:g,y:m}):{x:g,y:m};g=y.x,m=y.y;var b=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),x=ve,v=xe,S=window;if(u){var E=Bi(e),C="clientHeight",M="clientWidth";if(E===tn(e)&&(E=is(e),Hn(E).position!=="static"&&a==="absolute"&&(C="scrollHeight",M="scrollWidth")),E=E,r===xe||(r===ve||r===je)&&i===Ii){v=Ve;var T=f&&E===S&&S.visualViewport?S.visualViewport.height:E[C];m-=T-s.height,m*=l?1:-1}if(r===ve||(r===xe||r===Ve)&&i===Ii){x=je;var k=f&&E===S&&S.visualViewport?S.visualViewport.width:E[M];g-=k-s.width,g*=l?1:-1}}var _=Object.assign({position:a},u&&HA),D=h===!0?UA({x:g,y:m}):{x:g,y:m};if(g=D.x,m=D.y,l){var N;return Object.assign({},_,(N={},N[v]=w?"0":"",N[x]=b?"0":"",N.transform=(S.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",N))}return Object.assign({},_,(t={},t[v]=w?m+"px":"",t[x]=b?g+"px":"",t.transform="",t))}function GA(n){var t=n.state,e=n.options,s=e.gpuAcceleration,r=s===void 0?!0:s,i=e.adaptive,o=i===void 0?!0:i,a=e.roundOffsets,l=a===void 0?!0:a,u={placement:vn(t.placement),variation:Pr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,jg(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,jg(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var $g={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:GA,data:{}},xa={passive:!0};function YA(n){var t=n.state,e=n.instance,s=n.options,r=s.scroll,i=r===void 0?!0:r,o=s.resize,a=o===void 0?!0:o,l=tn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(h){h.addEventListener("scroll",e.update,xa)}),a&&l.addEventListener("resize",e.update,xa),function(){i&&u.forEach(function(h){h.removeEventListener("scroll",e.update,xa)}),a&&l.removeEventListener("resize",e.update,xa)}}var zg={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:YA,data:{}},WA={left:"right",right:"left",bottom:"top",top:"bottom"};function va(n){return n.replace(/left|right|bottom|top/g,function(t){return WA[t]})}var qA={start:"end",end:"start"};function Fg(n){return n.replace(/start|end/g,function(t){return qA[t]})}function Ic(n){var t=tn(n),e=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:e,scrollTop:s}}function Lc(n){return Mr(is(n)).left+Ic(n).scrollLeft}function JA(n){var t=tn(n),e=is(n),s=t.visualViewport,r=e.clientWidth,i=e.clientHeight,o=0,a=0;return s&&(r=s.width,i=s.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=s.offsetLeft,a=s.offsetTop)),{width:r,height:i,x:o+Lc(n),y:a}}function XA(n){var t,e=is(n),s=Ic(n),r=(t=n.ownerDocument)==null?void 0:t.body,i=zs(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=zs(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-s.scrollLeft+Lc(n),l=-s.scrollTop;return Hn(r||e).direction==="rtl"&&(a+=zs(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:o,x:a,y:l}}function Bc(n){var t=Hn(n),e=t.overflow,s=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+s)}function Hg(n){return["html","body","#document"].indexOf(xn(n))>=0?n.ownerDocument.body:$e(n)&&Bc(n)?n:Hg(wa(n))}function ji(n,t){var e;t===void 0&&(t=[]);var s=Hg(n),r=s===((e=n.ownerDocument)==null?void 0:e.body),i=tn(s),o=r?[i].concat(i.visualViewport||[],Bc(s)?s:[]):s,a=t.concat(o);return r?a:a.concat(ji(wa(o)))}function Vc(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function KA(n){var t=Mr(n);return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function Ug(n,t){return t===_g?Vc(JA(n)):Er(t)?KA(t):Vc(XA(is(n)))}function ZA(n){var t=ji(wa(n)),e=["absolute","fixed"].indexOf(Hn(n).position)>=0,s=e&&$e(n)?Bi(n):n;return Er(s)?t.filter(function(r){return Er(r)&&Rg(r,s)&&xn(r)!=="body"}):[]}function QA(n,t,e){var s=t==="clippingParents"?ZA(n):[].concat(t),r=[].concat(s,[e]),i=r[0],o=r.reduce(function(a,l){var u=Ug(n,l);return a.top=zs(u.top,a.top),a.right=ba(u.right,a.right),a.bottom=ba(u.bottom,a.bottom),a.left=zs(u.left,a.left),a},Ug(n,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Gg(n){var t=n.reference,e=n.element,s=n.placement,r=s?vn(s):null,i=s?Pr(s):null,o=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2,l;switch(r){case xe:l={x:o,y:t.y-e.height};break;case Ve:l={x:o,y:t.y+t.height};break;case je:l={x:t.x+t.width,y:a};break;case ve:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var u=r?Rc(r):null;if(u!=null){var h=u==="y"?"height":"width";switch(i){case Sr:l[u]=l[u]-(t[h]/2-e[h]/2);break;case Ii:l[u]=l[u]+(t[h]/2-e[h]/2);break}}return l}function $i(n,t){t===void 0&&(t={});var e=t,s=e.placement,r=s===void 0?n.placement:s,i=e.boundary,o=i===void 0?CA:i,a=e.rootBoundary,l=a===void 0?_g:a,u=e.elementContext,h=u===void 0?Li:u,f=e.altBoundary,d=f===void 0?!1:f,g=e.padding,p=g===void 0?0:g,m=Bg(typeof p!="number"?p:Vg(p,Ri)),y=h===Li?SA:Li,b=n.rects.popper,w=n.elements[d?y:h],x=QA(Er(w)?w:w.contextElement||is(n.elements.popper),o,l),v=Mr(n.elements.reference),S=Gg({reference:v,element:b,strategy:"absolute",placement:r}),E=Vc(Object.assign({},b,S)),C=h===Li?E:v,M={top:x.top-C.top+m.top,bottom:C.bottom-x.bottom+m.bottom,left:x.left-C.left+m.left,right:C.right-x.right+m.right},T=n.modifiersData.offset;if(h===Li&&T){var k=T[r];Object.keys(M).forEach(function(_){var D=[je,Ve].indexOf(_)>=0?1:-1,N=[xe,Ve].indexOf(_)>=0?"y":"x";M[_]+=k[N]*D})}return M}function tT(n,t){t===void 0&&(t={});var e=t,s=e.placement,r=e.boundary,i=e.rootBoundary,o=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,u=l===void 0?_c:l,h=Pr(s),f=h?a?kg:kg.filter(function(p){return Pr(p)===h}):Ri,d=f.filter(function(p){return u.indexOf(p)>=0});d.length===0&&(d=f);var g=d.reduce(function(p,m){return p[m]=$i(n,{placement:m,boundary:r,rootBoundary:i,padding:o})[vn(m)],p},{});return Object.keys(g).sort(function(p,m){return g[p]-g[m]})}function eT(n){if(vn(n)===Nc)return[];var t=va(n);return[Fg(n),t,Fg(t)]}function nT(n){var t=n.state,e=n.options,s=n.name;if(!t.modifiersData[s]._skip){for(var r=e.mainAxis,i=r===void 0?!0:r,o=e.altAxis,a=o===void 0?!0:o,l=e.fallbackPlacements,u=e.padding,h=e.boundary,f=e.rootBoundary,d=e.altBoundary,g=e.flipVariations,p=g===void 0?!0:g,m=e.allowedAutoPlacements,y=t.options.placement,b=vn(y),w=b===y,x=l||(w||!p?[va(y)]:eT(y)),v=[y].concat(x).reduce(function(K,nt){return K.concat(vn(nt)===Nc?tT(t,{placement:nt,boundary:h,rootBoundary:f,padding:u,flipVariations:p,allowedAutoPlacements:m}):nt)},[]),S=t.rects.reference,E=t.rects.popper,C=new Map,M=!0,T=v[0],k=0;k<v.length;k++){var _=v[k],D=vn(_),N=Pr(_)===Sr,V=[xe,Ve].indexOf(D)>=0,A=V?"width":"height",P=$i(t,{placement:_,boundary:h,rootBoundary:f,altBoundary:d,padding:u}),L=V?N?je:ve:N?Ve:xe;S[A]>E[A]&&(L=va(L));var j=va(L),Y=[];if(i&&Y.push(P[D]<=0),a&&Y.push(P[L]<=0,P[j]<=0),Y.every(function(K){return K})){T=_,M=!1;break}C.set(_,Y)}if(M)for(var ot=p?3:1,F=function(K){var nt=v.find(function(rt){var et=C.get(rt);if(et)return et.slice(0,K).every(function(ft){return ft})});if(nt)return T=nt,"break"},H=ot;H>0;H--){var B=F(H);if(B==="break")break}t.placement!==T&&(t.modifiersData[s]._skip=!0,t.placement=T,t.reset=!0)}}var sT={name:"flip",enabled:!0,phase:"main",fn:nT,requiresIfExists:["offset"],data:{_skip:!1}};function Yg(n,t,e){return e===void 0&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function Wg(n){return[xe,je,Ve,ve].some(function(t){return n[t]>=0})}function rT(n){var t=n.state,e=n.name,s=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=$i(t,{elementContext:"reference"}),a=$i(t,{altBoundary:!0}),l=Yg(o,s),u=Yg(a,r,i),h=Wg(l),f=Wg(u);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":f})}var iT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rT};function oT(n,t,e){var s=vn(n),r=[ve,xe].indexOf(s)>=0?-1:1,i=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,o=i[0],a=i[1];return o=o||0,a=(a||0)*r,[ve,je].indexOf(s)>=0?{x:a,y:o}:{x:o,y:a}}function aT(n){var t=n.state,e=n.options,s=n.name,r=e.offset,i=r===void 0?[0,0]:r,o=_c.reduce(function(h,f){return h[f]=oT(f,t.rects,i),h},{}),a=o[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[s]=o}var lT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:aT};function cT(n){var t=n.state,e=n.name;t.modifiersData[e]=Gg({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var qg={name:"popperOffsets",enabled:!0,phase:"read",fn:cT,data:{}};function uT(n){return n==="x"?"y":"x"}function hT(n){var t=n.state,e=n.options,s=n.name,r=e.mainAxis,i=r===void 0?!0:r,o=e.altAxis,a=o===void 0?!1:o,l=e.boundary,u=e.rootBoundary,h=e.altBoundary,f=e.padding,d=e.tether,g=d===void 0?!0:d,p=e.tetherOffset,m=p===void 0?0:p,y=$i(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:h}),b=vn(t.placement),w=Pr(t.placement),x=!w,v=Rc(b),S=uT(v),E=t.modifiersData.popperOffsets,C=t.rects.reference,M=t.rects.popper,T=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,k=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(E){if(i){var N,V=v==="y"?xe:ve,A=v==="y"?Ve:je,P=v==="y"?"height":"width",L=E[v],j=L+y[V],Y=L-y[A],ot=g?-M[P]/2:0,F=w===Sr?C[P]:M[P],H=w===Sr?-M[P]:-C[P],B=t.elements.arrow,K=g&&B?Dc(B):{width:0,height:0},nt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Lg(),rt=nt[V],et=nt[A],ft=Vi(0,C[P],K[P]),ge=x?C[P]/2-ot-ft-rt-k.mainAxis:F-ft-rt-k.mainAxis,St=x?-C[P]/2+ot+ft+et+k.mainAxis:H+ft+et+k.mainAxis,xt=t.elements.arrow&&Bi(t.elements.arrow),An=xt?v==="y"?xt.clientTop||0:xt.clientLeft||0:0,pe=(N=_==null?void 0:_[v])!=null?N:0,dn=L+ge-pe-An,Ts=L+St-pe,Ns=Vi(g?ba(j,dn):j,L,g?zs(Y,Ts):Y);E[v]=Ns,D[v]=Ns-L}if(a){var ai,li=v==="x"?xe:ve,st=v==="x"?Ve:je,ie=E[S],ci=S==="y"?"height":"width",yo=ie+y[li],bl=ie-y[st],ui=[xe,ve].indexOf(b)!==-1,U=(ai=_==null?void 0:_[S])!=null?ai:0,Et=ui?yo:ie-C[ci]-M[ci]-U+k.altAxis,Zn=ui?ie+C[ci]+M[ci]-U-k.altAxis:bl,bo=g&&ui?VA(Et,ie,Zn):Vi(g?Et:yo,ie,g?Zn:bl);E[S]=bo,D[S]=bo-ie}t.modifiersData[s]=D}}var dT={name:"preventOverflow",enabled:!0,phase:"main",fn:hT,requiresIfExists:["offset"]};function fT(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function gT(n){return n===tn(n)||!$e(n)?Ic(n):fT(n)}function pT(n){var t=n.getBoundingClientRect(),e=Or(t.width)/n.offsetWidth||1,s=Or(t.height)/n.offsetHeight||1;return e!==1||s!==1}function mT(n,t,e){e===void 0&&(e=!1);var s=$e(t),r=$e(t)&&pT(t),i=is(t),o=Mr(n,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!e)&&((xn(t)!=="body"||Bc(i))&&(a=gT(t)),$e(t)?(l=Mr(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Lc(i))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function yT(n){var t=new Map,e=new Set,s=[];n.forEach(function(i){t.set(i.name,i)});function r(i){e.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&r(l)}}),s.push(i)}return n.forEach(function(i){e.has(i.name)||r(i)}),s}function bT(n){var t=yT(n);return DA.reduce(function(e,s){return e.concat(t.filter(function(r){return r.phase===s}))},[])}function wT(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function xT(n){var t=n.reduce(function(e,s){var r=e[s.name];return e[s.name]=r?Object.assign({},r,s,{options:Object.assign({},r.options,s.options),data:Object.assign({},r.data,s.data)}):s,e},{});return Object.keys(t).map(function(e){return t[e]})}var Jg={placement:"bottom",modifiers:[],strategy:"absolute"};function Xg(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return!t.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function jc(n){n===void 0&&(n={});var t=n,e=t.defaultModifiers,s=e===void 0?[]:e,r=t.defaultOptions,i=r===void 0?Jg:r;return function(o,a,l){l===void 0&&(l=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Jg,i),modifiersData:{},elements:{reference:o,popper:a},attributes:{},styles:{}},h=[],f=!1,d={state:u,setOptions:function(m){var y=typeof m=="function"?m(u.options):m;p(),u.options=Object.assign({},i,u.options,y),u.scrollParents={reference:Er(o)?ji(o):o.contextElement?ji(o.contextElement):[],popper:ji(a)};var b=bT(xT([].concat(s,u.options.modifiers)));return u.orderedModifiers=b.filter(function(w){return w.enabled}),g(),d.update()},forceUpdate:function(){if(!f){var m=u.elements,y=m.reference,b=m.popper;if(Xg(y,b)){u.rects={reference:mT(y,Bi(b),u.options.strategy==="fixed"),popper:Dc(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(M){return u.modifiersData[M.name]=Object.assign({},M.data)});for(var w=0;w<u.orderedModifiers.length;w++){if(u.reset===!0){u.reset=!1,w=-1;continue}var x=u.orderedModifiers[w],v=x.fn,S=x.options,E=S===void 0?{}:S,C=x.name;typeof v=="function"&&(u=v({state:u,options:E,name:C,instance:d})||u)}}}},update:wT(function(){return new Promise(function(m){d.forceUpdate(),m(u)})}),destroy:function(){p(),f=!0}};if(!Xg(o,a))return d;d.setOptions(l).then(function(m){!f&&l.onFirstUpdate&&l.onFirstUpdate(m)});function g(){u.orderedModifiers.forEach(function(m){var y=m.name,b=m.options,w=b===void 0?{}:b,x=m.effect;if(typeof x=="function"){var v=x({state:u,name:y,instance:d,options:w}),S=function(){};h.push(v||S)}})}function p(){h.forEach(function(m){return m()}),h=[]}return d}}jc();var vT=[zg,qg,$g,Dg];jc({defaultModifiers:vT});var CT=[zg,qg,$g,Dg,lT,sT,dT,FA,iT],ST=jc({defaultModifiers:CT});const ET=(n,t,e={})=>{const s={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=OT(l);Object.assign(o.value,u)},requires:["computeStyles"]},r=c.computed(()=>{const{onFirstUpdate:l,placement:u,strategy:h,modifiers:f}=c.unref(e);return{onFirstUpdate:l,placement:u||"bottom",strategy:h||"absolute",modifiers:[...f||[],s,{name:"applyStyles",enabled:!1}]}}),i=c.shallowRef(),o=c.ref({styles:{popper:{position:c.unref(r).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{i.value&&(i.value.destroy(),i.value=void 0)};return c.watch(r,l=>{const u=c.unref(i);u&&u.setOptions(l)},{deep:!0}),c.watch([n,t],([l,u])=>{a(),!(!l||!u)&&(i.value=ST(l,u,c.unref(r)))}),c.onBeforeUnmount(()=>{a()}),{state:c.computed(()=>{var l;return{...((l=c.unref(i))==null?void 0:l.state)||{}}}),styles:c.computed(()=>c.unref(o).styles),attributes:c.computed(()=>c.unref(o).attributes),update:()=>{var l;return(l=c.unref(i))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=c.unref(i))==null?void 0:l.forceUpdate()},instanceRef:c.computed(()=>c.unref(i))}};function OT(n){const t=Object.keys(n.elements),e=la(t.map(r=>[r,n.styles[r]||{}])),s=la(t.map(r=>[r,n.attributes[r]]));return{styles:e,attributes:s}}const Kg=n=>{if(!n)return{onClick:ss,onMousedown:ss,onMouseup:ss};let t=!1,e=!1;return{onClick:o=>{t&&e&&n(o),t=e=!1},onMousedown:o=>{t=o.target===o.currentTarget},onMouseup:o=>{e=o.target===o.currentTarget}}};function Zg(){let n;const t=(s,r)=>{e(),n=window.setTimeout(s,r)},e=()=>window.clearTimeout(n);return $o(()=>e()),{registerTimeout:t,cancelTimeout:e}}const $c={prefix:Math.floor(Math.random()*1e4),current:0},MT=Symbol("elIdInjection"),Qg=()=>c.getCurrentInstance()?c.inject(MT,$c):$c,Ca=n=>{const t=Qg();!Gt&&t===$c&&Pe("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
16
+ `)},{immediate:!0})},hA=(n,t,e,s)=>{let r={offsetX:0,offsetY:0};const i=u=>{const h=u.clientX,f=u.clientY,{offsetX:d,offsetY:g}=r,p=n.value.getBoundingClientRect(),m=p.left,y=p.top,b=p.width,w=p.height,x=document.documentElement.clientWidth,v=document.documentElement.clientHeight,S=-m+d,E=-y+g,C=x-m-b+d,M=v-y-w+g,T=_=>{let D=d+_.clientX-h,N=g+_.clientY-f;s!=null&&s.value||(D=Math.min(Math.max(D,S),C),N=Math.min(Math.max(N,E),M)),r={offsetX:D,offsetY:N},n.value&&(n.value.style.transform=`translate(${ki(D)}, ${ki(N)})`)},k=()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",k)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",k)},o=()=>{t.value&&n.value&&t.value.addEventListener("mousedown",i)},a=()=>{t.value&&n.value&&t.value.removeEventListener("mousedown",i)},l=()=>{r={offsetX:0,offsetY:0},n.value&&(n.value.style.transform="none")};return c.onMounted(()=>{c.watchEffect(()=>{e.value?o():a()})}),c.onBeforeUnmount(()=>{a()}),{resetPosition:l}};var dA={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 fA=n=>(t,e)=>gA(t,e,c.unref(n)),gA=(n,t,e)=>Yd(e,n,n).replace(/\{(\w+)\}/g,(s,r)=>{var i;return`${(i=t==null?void 0:t[r])!=null?i:`{${r}}`}`}),pA=n=>{const t=c.computed(()=>c.unref(n).name),e=c.isRef(n)?n:c.ref(n);return{lang:t,locale:e,t:fA(n)}},Ag=Symbol("localeContextKey"),mA=n=>{const t=n||c.inject(Ag,c.ref());return pA(c.computed(()=>t.value||dA))},ya="el",yA="is-",$s=(n,t,e,s,r)=>{let i=`${n}-${t}`;return e&&(i+=`-${e}`),s&&(i+=`__${s}`),r&&(i+=`--${r}`),i},Tg=Symbol("namespaceContextKey"),Tc=n=>{const t=n||(c.getCurrentInstance()?c.inject(Tg,c.ref(ya)):c.ref(ya));return c.computed(()=>c.unref(t)||ya)},me=(n,t)=>{const e=Tc(t);return{namespace:e,b:(m="")=>$s(e.value,n,m,"",""),e:m=>m?$s(e.value,n,"",m,""):"",m:m=>m?$s(e.value,n,"","",m):"",be:(m,y)=>m&&y?$s(e.value,n,m,y,""):"",em:(m,y)=>m&&y?$s(e.value,n,"",m,y):"",bm:(m,y)=>m&&y?$s(e.value,n,m,"",y):"",bem:(m,y,b)=>m&&y&&b?$s(e.value,n,m,y,b):"",is:(m,...y)=>{const b=y.length>=1?y[0]:!0;return m&&b?`${yA}${m}`:""},cssVar:m=>{const y={};for(const b in m)m[b]&&(y[`--${e.value}-${b}`]=m[b]);return y},cssVarName:m=>`--${e.value}-${m}`,cssVarBlock:m=>{const y={};for(const b in m)m[b]&&(y[`--${e.value}-${n}-${b}`]=m[b]);return y},cssVarBlockName:m=>`--${e.value}-${n}-${m}`}},bA=(n,t={})=>{c.isRef(n)||T2("[useLockscreen]","You need to pass a ref param to this function");const e=t.ns||me("popup"),s=c.computed(()=>e.bm("parent","hidden"));if(!Gt||mg(document.body,s.value))return;let r=0,i=!1,o="0";const a=()=>{setTimeout(()=>{typeof document>"u"||(k2(document==null?void 0:document.body,s.value),i&&document&&(document.body.style.width=o))},200)};c.watch(n,l=>{if(!l){a();return}i=!mg(document.body,s.value),i&&(o=document.body.style.width),r=R2(e.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,h=D2(document.body,"overflowY");r>0&&(u||h==="scroll")&&i&&(document.body.style.width=`calc(100% - ${r}px)`),_2(document.body,s.value)}),c.onScopeDispose(()=>a())},wA=ga({type:ct(Boolean),default:null}),xA=ga({type:ct(Function)}),vA=n=>{const t=`update:${n}`,e=`onUpdate:${n}`,s=[t],r={[n]:wA,[e]:xA};return{useModelToggle:({indicator:o,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:h,onHide:f})=>{const d=c.getCurrentInstance(),{emit:g}=d,p=d.props,m=c.computed(()=>Re(p[e])),y=c.computed(()=>p[n]===null),b=C=>{o.value!==!0&&(o.value=!0,a&&(a.value=C),Re(h)&&h(C))},w=C=>{o.value!==!1&&(o.value=!1,a&&(a.value=C),Re(f)&&f(C))},x=C=>{if(p.disabled===!0||Re(u)&&!u())return;const M=m.value&&Gt;M&&g(t,!0),(y.value||!M)&&b(C)},v=C=>{if(p.disabled===!0||!Gt)return;const M=m.value&&Gt;M&&g(t,!1),(y.value||!M)&&w(C)},S=C=>{ha(C)&&(p.disabled&&C?m.value&&g(t,!1):o.value!==C&&(C?b():w()))},E=()=>{o.value?v():x()};return c.watch(()=>p[n],S),l&&d.appContext.config.globalProperties.$route!==void 0&&c.watch(()=>({...d.proxy.$route}),()=>{l.value&&o.value&&v()}),c.onMounted(()=>{S(p[n])}),{hide:v,show:x,toggle:E,hasUpdateHandler:m}},useModelToggleProps:r,useModelToggleEmits:s}},Ng=n=>{const t=c.getCurrentInstance();return c.computed(()=>{var e,s;return(s=(e=t==null?void 0:t.proxy)==null?void 0:e.$props)==null?void 0:s[n]})};var xe="top",Ve="bottom",je="right",ve="left",Nc="auto",Ri=[xe,Ve,je,ve],Sr="start",Ii="end",CA="clippingParents",_g="viewport",Li="popper",SA="reference",kg=Ri.reduce(function(n,t){return n.concat([t+"-"+Sr,t+"-"+Ii])},[]),_c=[].concat(Ri,[Nc]).reduce(function(n,t){return n.concat([t,t+"-"+Sr,t+"-"+Ii])},[]),EA="beforeRead",OA="read",MA="afterRead",PA="beforeMain",AA="main",TA="afterMain",NA="beforeWrite",_A="write",kA="afterWrite",DA=[EA,OA,MA,PA,AA,TA,NA,_A,kA];function xn(n){return n?(n.nodeName||"").toLowerCase():null}function tn(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function Er(n){var t=tn(n).Element;return n instanceof t||n instanceof Element}function $e(n){var t=tn(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function kc(n){if(typeof ShadowRoot>"u")return!1;var t=tn(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function RA(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var s=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!$e(i)||!xn(i)||(Object.assign(i.style,s),Object.keys(r).forEach(function(o){var a=r[o];a===!1?i.removeAttribute(o):i.setAttribute(o,a===!0?"":a)}))})}function IA(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(s){var r=t.elements[s],i=t.attributes[s]||{},o=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:e[s]),a=o.reduce(function(l,u){return l[u]="",l},{});!$e(r)||!xn(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}var Dg={name:"applyStyles",enabled:!0,phase:"write",fn:RA,effect:IA,requires:["computeStyles"]};function vn(n){return n.split("-")[0]}var zs=Math.max,ba=Math.min,Or=Math.round;function Mr(n,t){t===void 0&&(t=!1);var e=n.getBoundingClientRect(),s=1,r=1;if($e(n)&&t){var i=n.offsetHeight,o=n.offsetWidth;o>0&&(s=Or(e.width)/o||1),i>0&&(r=Or(e.height)/i||1)}return{width:e.width/s,height:e.height/r,top:e.top/r,right:e.right/s,bottom:e.bottom/r,left:e.left/s,x:e.left/s,y:e.top/r}}function Dc(n){var t=Mr(n),e=n.offsetWidth,s=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:s}}function Rg(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&kc(e)){var s=t;do{if(s&&n.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Hn(n){return tn(n).getComputedStyle(n)}function LA(n){return["table","td","th"].indexOf(xn(n))>=0}function is(n){return((Er(n)?n.ownerDocument:n.document)||window.document).documentElement}function wa(n){return xn(n)==="html"?n:n.assignedSlot||n.parentNode||(kc(n)?n.host:null)||is(n)}function Ig(n){return!$e(n)||Hn(n).position==="fixed"?null:n.offsetParent}function BA(n){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,e=navigator.userAgent.indexOf("Trident")!==-1;if(e&&$e(n)){var s=Hn(n);if(s.position==="fixed")return null}var r=wa(n);for(kc(r)&&(r=r.host);$e(r)&&["html","body"].indexOf(xn(r))<0;){var i=Hn(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Bi(n){for(var t=tn(n),e=Ig(n);e&&LA(e)&&Hn(e).position==="static";)e=Ig(e);return e&&(xn(e)==="html"||xn(e)==="body"&&Hn(e).position==="static")?t:e||BA(n)||t}function Rc(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Vi(n,t,e){return zs(n,ba(t,e))}function VA(n,t,e){var s=Vi(n,t,e);return s>e?e:s}function Lg(){return{top:0,right:0,bottom:0,left:0}}function Bg(n){return Object.assign({},Lg(),n)}function Vg(n,t){return t.reduce(function(e,s){return e[s]=n,e},{})}var jA=function(n,t){return n=typeof n=="function"?n(Object.assign({},t.rects,{placement:t.placement})):n,Bg(typeof n!="number"?n:Vg(n,Ri))};function $A(n){var t,e=n.state,s=n.name,r=n.options,i=e.elements.arrow,o=e.modifiersData.popperOffsets,a=vn(e.placement),l=Rc(a),u=[ve,je].indexOf(a)>=0,h=u?"height":"width";if(!(!i||!o)){var f=jA(r.padding,e),d=Dc(i),g=l==="y"?xe:ve,p=l==="y"?Ve:je,m=e.rects.reference[h]+e.rects.reference[l]-o[l]-e.rects.popper[h],y=o[l]-e.rects.reference[l],b=Bi(i),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,x=m/2-y/2,v=f[g],S=w-d[h]-f[p],E=w/2-d[h]/2+x,C=Vi(v,E,S),M=l;e.modifiersData[s]=(t={},t[M]=C,t.centerOffset=C-E,t)}}function zA(n){var t=n.state,e=n.options,s=e.element,r=s===void 0?"[data-popper-arrow]":s;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||!Rg(t.elements.popper,r)||(t.elements.arrow=r))}var FA={name:"arrow",enabled:!0,phase:"main",fn:$A,effect:zA,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pr(n){return n.split("-")[1]}var HA={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UA(n){var t=n.x,e=n.y,s=window,r=s.devicePixelRatio||1;return{x:Or(t*r)/r||0,y:Or(e*r)/r||0}}function jg(n){var t,e=n.popper,s=n.popperRect,r=n.placement,i=n.variation,o=n.offsets,a=n.position,l=n.gpuAcceleration,u=n.adaptive,h=n.roundOffsets,f=n.isFixed,d=o.x,g=d===void 0?0:d,p=o.y,m=p===void 0?0:p,y=typeof h=="function"?h({x:g,y:m}):{x:g,y:m};g=y.x,m=y.y;var b=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),x=ve,v=xe,S=window;if(u){var E=Bi(e),C="clientHeight",M="clientWidth";if(E===tn(e)&&(E=is(e),Hn(E).position!=="static"&&a==="absolute"&&(C="scrollHeight",M="scrollWidth")),E=E,r===xe||(r===ve||r===je)&&i===Ii){v=Ve;var T=f&&E===S&&S.visualViewport?S.visualViewport.height:E[C];m-=T-s.height,m*=l?1:-1}if(r===ve||(r===xe||r===Ve)&&i===Ii){x=je;var k=f&&E===S&&S.visualViewport?S.visualViewport.width:E[M];g-=k-s.width,g*=l?1:-1}}var _=Object.assign({position:a},u&&HA),D=h===!0?UA({x:g,y:m}):{x:g,y:m};if(g=D.x,m=D.y,l){var N;return Object.assign({},_,(N={},N[v]=w?"0":"",N[x]=b?"0":"",N.transform=(S.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",N))}return Object.assign({},_,(t={},t[v]=w?m+"px":"",t[x]=b?g+"px":"",t.transform="",t))}function GA(n){var t=n.state,e=n.options,s=e.gpuAcceleration,r=s===void 0?!0:s,i=e.adaptive,o=i===void 0?!0:i,a=e.roundOffsets,l=a===void 0?!0:a,u={placement:vn(t.placement),variation:Pr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,jg(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,jg(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var $g={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:GA,data:{}},xa={passive:!0};function YA(n){var t=n.state,e=n.instance,s=n.options,r=s.scroll,i=r===void 0?!0:r,o=s.resize,a=o===void 0?!0:o,l=tn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(h){h.addEventListener("scroll",e.update,xa)}),a&&l.addEventListener("resize",e.update,xa),function(){i&&u.forEach(function(h){h.removeEventListener("scroll",e.update,xa)}),a&&l.removeEventListener("resize",e.update,xa)}}var zg={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:YA,data:{}},WA={left:"right",right:"left",bottom:"top",top:"bottom"};function va(n){return n.replace(/left|right|bottom|top/g,function(t){return WA[t]})}var qA={start:"end",end:"start"};function Fg(n){return n.replace(/start|end/g,function(t){return qA[t]})}function Ic(n){var t=tn(n),e=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:e,scrollTop:s}}function Lc(n){return Mr(is(n)).left+Ic(n).scrollLeft}function JA(n){var t=tn(n),e=is(n),s=t.visualViewport,r=e.clientWidth,i=e.clientHeight,o=0,a=0;return s&&(r=s.width,i=s.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=s.offsetLeft,a=s.offsetTop)),{width:r,height:i,x:o+Lc(n),y:a}}function XA(n){var t,e=is(n),s=Ic(n),r=(t=n.ownerDocument)==null?void 0:t.body,i=zs(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=zs(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-s.scrollLeft+Lc(n),l=-s.scrollTop;return Hn(r||e).direction==="rtl"&&(a+=zs(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:o,x:a,y:l}}function Bc(n){var t=Hn(n),e=t.overflow,s=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+s)}function Hg(n){return["html","body","#document"].indexOf(xn(n))>=0?n.ownerDocument.body:$e(n)&&Bc(n)?n:Hg(wa(n))}function ji(n,t){var e;t===void 0&&(t=[]);var s=Hg(n),r=s===((e=n.ownerDocument)==null?void 0:e.body),i=tn(s),o=r?[i].concat(i.visualViewport||[],Bc(s)?s:[]):s,a=t.concat(o);return r?a:a.concat(ji(wa(o)))}function Vc(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function KA(n){var t=Mr(n);return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function Ug(n,t){return t===_g?Vc(JA(n)):Er(t)?KA(t):Vc(XA(is(n)))}function ZA(n){var t=ji(wa(n)),e=["absolute","fixed"].indexOf(Hn(n).position)>=0,s=e&&$e(n)?Bi(n):n;return Er(s)?t.filter(function(r){return Er(r)&&Rg(r,s)&&xn(r)!=="body"}):[]}function QA(n,t,e){var s=t==="clippingParents"?ZA(n):[].concat(t),r=[].concat(s,[e]),i=r[0],o=r.reduce(function(a,l){var u=Ug(n,l);return a.top=zs(u.top,a.top),a.right=ba(u.right,a.right),a.bottom=ba(u.bottom,a.bottom),a.left=zs(u.left,a.left),a},Ug(n,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Gg(n){var t=n.reference,e=n.element,s=n.placement,r=s?vn(s):null,i=s?Pr(s):null,o=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2,l;switch(r){case xe:l={x:o,y:t.y-e.height};break;case Ve:l={x:o,y:t.y+t.height};break;case je:l={x:t.x+t.width,y:a};break;case ve:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var u=r?Rc(r):null;if(u!=null){var h=u==="y"?"height":"width";switch(i){case Sr:l[u]=l[u]-(t[h]/2-e[h]/2);break;case Ii:l[u]=l[u]+(t[h]/2-e[h]/2);break}}return l}function $i(n,t){t===void 0&&(t={});var e=t,s=e.placement,r=s===void 0?n.placement:s,i=e.boundary,o=i===void 0?CA:i,a=e.rootBoundary,l=a===void 0?_g:a,u=e.elementContext,h=u===void 0?Li:u,f=e.altBoundary,d=f===void 0?!1:f,g=e.padding,p=g===void 0?0:g,m=Bg(typeof p!="number"?p:Vg(p,Ri)),y=h===Li?SA:Li,b=n.rects.popper,w=n.elements[d?y:h],x=QA(Er(w)?w:w.contextElement||is(n.elements.popper),o,l),v=Mr(n.elements.reference),S=Gg({reference:v,element:b,strategy:"absolute",placement:r}),E=Vc(Object.assign({},b,S)),C=h===Li?E:v,M={top:x.top-C.top+m.top,bottom:C.bottom-x.bottom+m.bottom,left:x.left-C.left+m.left,right:C.right-x.right+m.right},T=n.modifiersData.offset;if(h===Li&&T){var k=T[r];Object.keys(M).forEach(function(_){var D=[je,Ve].indexOf(_)>=0?1:-1,N=[xe,Ve].indexOf(_)>=0?"y":"x";M[_]+=k[N]*D})}return M}function tT(n,t){t===void 0&&(t={});var e=t,s=e.placement,r=e.boundary,i=e.rootBoundary,o=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,u=l===void 0?_c:l,h=Pr(s),f=h?a?kg:kg.filter(function(p){return Pr(p)===h}):Ri,d=f.filter(function(p){return u.indexOf(p)>=0});d.length===0&&(d=f);var g=d.reduce(function(p,m){return p[m]=$i(n,{placement:m,boundary:r,rootBoundary:i,padding:o})[vn(m)],p},{});return Object.keys(g).sort(function(p,m){return g[p]-g[m]})}function eT(n){if(vn(n)===Nc)return[];var t=va(n);return[Fg(n),t,Fg(t)]}function nT(n){var t=n.state,e=n.options,s=n.name;if(!t.modifiersData[s]._skip){for(var r=e.mainAxis,i=r===void 0?!0:r,o=e.altAxis,a=o===void 0?!0:o,l=e.fallbackPlacements,u=e.padding,h=e.boundary,f=e.rootBoundary,d=e.altBoundary,g=e.flipVariations,p=g===void 0?!0:g,m=e.allowedAutoPlacements,y=t.options.placement,b=vn(y),w=b===y,x=l||(w||!p?[va(y)]:eT(y)),v=[y].concat(x).reduce(function(K,nt){return K.concat(vn(nt)===Nc?tT(t,{placement:nt,boundary:h,rootBoundary:f,padding:u,flipVariations:p,allowedAutoPlacements:m}):nt)},[]),S=t.rects.reference,E=t.rects.popper,C=new Map,M=!0,T=v[0],k=0;k<v.length;k++){var _=v[k],D=vn(_),N=Pr(_)===Sr,j=[xe,Ve].indexOf(D)>=0,A=j?"width":"height",P=$i(t,{placement:_,boundary:h,rootBoundary:f,altBoundary:d,padding:u}),L=j?N?je:ve:N?Ve:xe;S[A]>E[A]&&(L=va(L));var V=va(L),Y=[];if(i&&Y.push(P[D]<=0),a&&Y.push(P[L]<=0,P[V]<=0),Y.every(function(K){return K})){T=_,M=!1;break}C.set(_,Y)}if(M)for(var ot=p?3:1,F=function(K){var nt=v.find(function(rt){var et=C.get(rt);if(et)return et.slice(0,K).every(function(ft){return ft})});if(nt)return T=nt,"break"},H=ot;H>0;H--){var B=F(H);if(B==="break")break}t.placement!==T&&(t.modifiersData[s]._skip=!0,t.placement=T,t.reset=!0)}}var sT={name:"flip",enabled:!0,phase:"main",fn:nT,requiresIfExists:["offset"],data:{_skip:!1}};function Yg(n,t,e){return e===void 0&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function Wg(n){return[xe,je,Ve,ve].some(function(t){return n[t]>=0})}function rT(n){var t=n.state,e=n.name,s=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=$i(t,{elementContext:"reference"}),a=$i(t,{altBoundary:!0}),l=Yg(o,s),u=Yg(a,r,i),h=Wg(l),f=Wg(u);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":f})}var iT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rT};function oT(n,t,e){var s=vn(n),r=[ve,xe].indexOf(s)>=0?-1:1,i=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,o=i[0],a=i[1];return o=o||0,a=(a||0)*r,[ve,je].indexOf(s)>=0?{x:a,y:o}:{x:o,y:a}}function aT(n){var t=n.state,e=n.options,s=n.name,r=e.offset,i=r===void 0?[0,0]:r,o=_c.reduce(function(h,f){return h[f]=oT(f,t.rects,i),h},{}),a=o[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[s]=o}var lT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:aT};function cT(n){var t=n.state,e=n.name;t.modifiersData[e]=Gg({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var qg={name:"popperOffsets",enabled:!0,phase:"read",fn:cT,data:{}};function uT(n){return n==="x"?"y":"x"}function hT(n){var t=n.state,e=n.options,s=n.name,r=e.mainAxis,i=r===void 0?!0:r,o=e.altAxis,a=o===void 0?!1:o,l=e.boundary,u=e.rootBoundary,h=e.altBoundary,f=e.padding,d=e.tether,g=d===void 0?!0:d,p=e.tetherOffset,m=p===void 0?0:p,y=$i(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:h}),b=vn(t.placement),w=Pr(t.placement),x=!w,v=Rc(b),S=uT(v),E=t.modifiersData.popperOffsets,C=t.rects.reference,M=t.rects.popper,T=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,k=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(E){if(i){var N,j=v==="y"?xe:ve,A=v==="y"?Ve:je,P=v==="y"?"height":"width",L=E[v],V=L+y[j],Y=L-y[A],ot=g?-M[P]/2:0,F=w===Sr?C[P]:M[P],H=w===Sr?-M[P]:-C[P],B=t.elements.arrow,K=g&&B?Dc(B):{width:0,height:0},nt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Lg(),rt=nt[j],et=nt[A],ft=Vi(0,C[P],K[P]),ge=x?C[P]/2-ot-ft-rt-k.mainAxis:F-ft-rt-k.mainAxis,St=x?-C[P]/2+ot+ft+et+k.mainAxis:H+ft+et+k.mainAxis,xt=t.elements.arrow&&Bi(t.elements.arrow),An=xt?v==="y"?xt.clientTop||0:xt.clientLeft||0:0,pe=(N=_==null?void 0:_[v])!=null?N:0,dn=L+ge-pe-An,Ts=L+St-pe,Ns=Vi(g?ba(V,dn):V,L,g?zs(Y,Ts):Y);E[v]=Ns,D[v]=Ns-L}if(a){var ai,li=v==="x"?xe:ve,st=v==="x"?Ve:je,ie=E[S],ci=S==="y"?"height":"width",yo=ie+y[li],bl=ie-y[st],ui=[xe,ve].indexOf(b)!==-1,U=(ai=_==null?void 0:_[S])!=null?ai:0,Et=ui?yo:ie-C[ci]-M[ci]-U+k.altAxis,Zn=ui?ie+C[ci]+M[ci]-U-k.altAxis:bl,bo=g&&ui?VA(Et,ie,Zn):Vi(g?Et:yo,ie,g?Zn:bl);E[S]=bo,D[S]=bo-ie}t.modifiersData[s]=D}}var dT={name:"preventOverflow",enabled:!0,phase:"main",fn:hT,requiresIfExists:["offset"]};function fT(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function gT(n){return n===tn(n)||!$e(n)?Ic(n):fT(n)}function pT(n){var t=n.getBoundingClientRect(),e=Or(t.width)/n.offsetWidth||1,s=Or(t.height)/n.offsetHeight||1;return e!==1||s!==1}function mT(n,t,e){e===void 0&&(e=!1);var s=$e(t),r=$e(t)&&pT(t),i=is(t),o=Mr(n,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!e)&&((xn(t)!=="body"||Bc(i))&&(a=gT(t)),$e(t)?(l=Mr(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Lc(i))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function yT(n){var t=new Map,e=new Set,s=[];n.forEach(function(i){t.set(i.name,i)});function r(i){e.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&r(l)}}),s.push(i)}return n.forEach(function(i){e.has(i.name)||r(i)}),s}function bT(n){var t=yT(n);return DA.reduce(function(e,s){return e.concat(t.filter(function(r){return r.phase===s}))},[])}function wT(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function xT(n){var t=n.reduce(function(e,s){var r=e[s.name];return e[s.name]=r?Object.assign({},r,s,{options:Object.assign({},r.options,s.options),data:Object.assign({},r.data,s.data)}):s,e},{});return Object.keys(t).map(function(e){return t[e]})}var Jg={placement:"bottom",modifiers:[],strategy:"absolute"};function Xg(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return!t.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function jc(n){n===void 0&&(n={});var t=n,e=t.defaultModifiers,s=e===void 0?[]:e,r=t.defaultOptions,i=r===void 0?Jg:r;return function(o,a,l){l===void 0&&(l=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Jg,i),modifiersData:{},elements:{reference:o,popper:a},attributes:{},styles:{}},h=[],f=!1,d={state:u,setOptions:function(m){var y=typeof m=="function"?m(u.options):m;p(),u.options=Object.assign({},i,u.options,y),u.scrollParents={reference:Er(o)?ji(o):o.contextElement?ji(o.contextElement):[],popper:ji(a)};var b=bT(xT([].concat(s,u.options.modifiers)));return u.orderedModifiers=b.filter(function(w){return w.enabled}),g(),d.update()},forceUpdate:function(){if(!f){var m=u.elements,y=m.reference,b=m.popper;if(Xg(y,b)){u.rects={reference:mT(y,Bi(b),u.options.strategy==="fixed"),popper:Dc(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(M){return u.modifiersData[M.name]=Object.assign({},M.data)});for(var w=0;w<u.orderedModifiers.length;w++){if(u.reset===!0){u.reset=!1,w=-1;continue}var x=u.orderedModifiers[w],v=x.fn,S=x.options,E=S===void 0?{}:S,C=x.name;typeof v=="function"&&(u=v({state:u,options:E,name:C,instance:d})||u)}}}},update:wT(function(){return new Promise(function(m){d.forceUpdate(),m(u)})}),destroy:function(){p(),f=!0}};if(!Xg(o,a))return d;d.setOptions(l).then(function(m){!f&&l.onFirstUpdate&&l.onFirstUpdate(m)});function g(){u.orderedModifiers.forEach(function(m){var y=m.name,b=m.options,w=b===void 0?{}:b,x=m.effect;if(typeof x=="function"){var v=x({state:u,name:y,instance:d,options:w}),S=function(){};h.push(v||S)}})}function p(){h.forEach(function(m){return m()}),h=[]}return d}}jc();var vT=[zg,qg,$g,Dg];jc({defaultModifiers:vT});var CT=[zg,qg,$g,Dg,lT,sT,dT,FA,iT],ST=jc({defaultModifiers:CT});const ET=(n,t,e={})=>{const s={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=OT(l);Object.assign(o.value,u)},requires:["computeStyles"]},r=c.computed(()=>{const{onFirstUpdate:l,placement:u,strategy:h,modifiers:f}=c.unref(e);return{onFirstUpdate:l,placement:u||"bottom",strategy:h||"absolute",modifiers:[...f||[],s,{name:"applyStyles",enabled:!1}]}}),i=c.shallowRef(),o=c.ref({styles:{popper:{position:c.unref(r).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{i.value&&(i.value.destroy(),i.value=void 0)};return c.watch(r,l=>{const u=c.unref(i);u&&u.setOptions(l)},{deep:!0}),c.watch([n,t],([l,u])=>{a(),!(!l||!u)&&(i.value=ST(l,u,c.unref(r)))}),c.onBeforeUnmount(()=>{a()}),{state:c.computed(()=>{var l;return{...((l=c.unref(i))==null?void 0:l.state)||{}}}),styles:c.computed(()=>c.unref(o).styles),attributes:c.computed(()=>c.unref(o).attributes),update:()=>{var l;return(l=c.unref(i))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=c.unref(i))==null?void 0:l.forceUpdate()},instanceRef:c.computed(()=>c.unref(i))}};function OT(n){const t=Object.keys(n.elements),e=la(t.map(r=>[r,n.styles[r]||{}])),s=la(t.map(r=>[r,n.attributes[r]]));return{styles:e,attributes:s}}const Kg=n=>{if(!n)return{onClick:ss,onMousedown:ss,onMouseup:ss};let t=!1,e=!1;return{onClick:o=>{t&&e&&n(o),t=e=!1},onMousedown:o=>{t=o.target===o.currentTarget},onMouseup:o=>{e=o.target===o.currentTarget}}};function Zg(){let n;const t=(s,r)=>{e(),n=window.setTimeout(s,r)},e=()=>window.clearTimeout(n);return $o(()=>e()),{registerTimeout:t,cancelTimeout:e}}const $c={prefix:Math.floor(Math.random()*1e4),current:0},MT=Symbol("elIdInjection"),Qg=()=>c.getCurrentInstance()?c.inject(MT,$c):$c,Ca=n=>{const t=Qg();!Gt&&t===$c&&Pe("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
17
17
  usage: app.provide(ID_INJECTION_KEY, {
18
18
  prefix: number,
19
19
  current: number,
@@ -26,15 +26,15 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
26
26
  z-index:-1000 !important;
27
27
  top:0 !important;
28
28
  right:0 !important;
29
- `,JT=["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 XT(n){const t=window.getComputedStyle(n),e=t.getPropertyValue("box-sizing"),s=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),r=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:JT.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:s,borderSize:r,boxSizing:e}}function pp(n,t=1,e){var s;nn||(nn=document.createElement("textarea"),document.body.appendChild(nn));const{paddingSize:r,borderSize:i,boxSizing:o,contextStyle:a}=XT(n);nn.setAttribute("style",`${a};${qT}`),nn.value=n.value||n.placeholder||"";let l=nn.scrollHeight;const u={};o==="border-box"?l=l+i:o==="content-box"&&(l=l-r),nn.value="";const h=nn.scrollHeight-r;if(Be(t)){let f=h*t;o==="border-box"&&(f=f+r+i),l=Math.max(f,l),u.minHeight=`${f}px`}if(Be(e)){let f=h*e;o==="border-box"&&(f=f+r+i),l=Math.min(f,l)}return u.height=`${l}px`,(s=nn.parentNode)==null||s.removeChild(nn),nn=void 0,u}const KT=Kt({id:{type:String,default:void 0},size:zc,disabled:Boolean,modelValue:{type:ct([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:ct([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:Di},prefixIcon:{type:Di},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:ct([Object,Array,String]),default:()=>Pg({})},autofocus:Boolean,rows:{type:Number,default:2},...Fc(["ariaLabel"])}),ZT={[Ac]:n=>Xe(n),input:n=>Xe(n),change:n=>Xe(n),focus:n=>n instanceof FocusEvent,blur:n=>n instanceof FocusEvent,clear:()=>!0,mouseleave:n=>n instanceof MouseEvent,mouseenter:n=>n instanceof MouseEvent,keydown:n=>n instanceof Event,compositionstart:n=>n instanceof CompositionEvent,compositionupdate:n=>n instanceof CompositionEvent,compositionend:n=>n instanceof CompositionEvent},QT=c.defineComponent({name:"ElInput",inheritAttrs:!1}),tN=c.defineComponent({...QT,props:KT,emits:ZT,setup(n,{expose:t,emit:e}){const s=n,r=c.useAttrs(),i=c.useSlots(),o=c.computed(()=>{const U={};return s.containerRole==="combobox"&&(U["aria-haspopup"]=r["aria-haspopup"],U["aria-owns"]=r["aria-owns"],U["aria-expanded"]=r["aria-expanded"]),U}),a=c.computed(()=>[s.type==="textarea"?y.b():m.b(),m.m(g.value),m.is("disabled",p.value),m.is("exceed",B.value),{[m.b("group")]:i.prepend||i.append,[m.m("prefix")]:i.prefix||s.prefixIcon,[m.m("suffix")]:i.suffix||s.suffixIcon||s.clearable||s.showPassword,[m.bm("suffix","password-clear")]:Y.value&&ot.value,[m.b("hidden")]:s.type==="hidden"},r.class]),l=c.computed(()=>[m.e("wrapper"),m.is("focus",T.value)]),u=cA({excludeKeys:c.computed(()=>Object.keys(o.value))}),{form:h,formItem:f}=gp(),{inputId:d}=WT(s,{formItemContext:f}),g=fp(),p=Gc(),m=me("input"),y=me("textarea"),b=c.shallowRef(),w=c.shallowRef(),x=c.ref(!1),v=c.ref(!1),S=c.ref(),E=c.shallowRef(s.inputStyle),C=c.computed(()=>b.value||w.value),{wrapperRef:M,isFocused:T,handleFocus:k,handleBlur:_}=LT(C,{beforeFocus(){return p.value},afterBlur(){var U;s.validateEvent&&((U=f==null?void 0:f.validate)==null||U.call(f,"blur").catch(Et=>Pe(Et)))}}),D=c.computed(()=>{var U;return(U=h==null?void 0:h.statusIcon)!=null?U:!1}),N=c.computed(()=>(f==null?void 0:f.validateState)||""),V=c.computed(()=>N.value&&nA[N.value]),A=c.computed(()=>v.value?Cg:W2),P=c.computed(()=>[r.style]),L=c.computed(()=>[s.inputStyle,E.value,{resize:s.resize}]),j=c.computed(()=>ua(s.modelValue)?"":String(s.modelValue)),Y=c.computed(()=>s.clearable&&!p.value&&!s.readonly&&!!j.value&&(T.value||x.value)),ot=c.computed(()=>s.showPassword&&!p.value&&!!j.value&&(!!j.value||T.value)),F=c.computed(()=>s.showWordLimit&&!!s.maxlength&&(s.type==="text"||s.type==="textarea")&&!p.value&&!s.readonly&&!s.showPassword),H=c.computed(()=>j.value.length),B=c.computed(()=>!!F.value&&H.value>Number(s.maxlength)),K=c.computed(()=>!!i.suffix||!!s.suffixIcon||Y.value||s.showPassword||F.value||!!N.value&&D.value),[nt,rt]=RT(b);md(w,U=>{if(ge(),!F.value||s.resize!=="both")return;const Et=U[0],{width:Zn}=Et.contentRect;S.value={right:`calc(100% - ${Zn+15+6}px)`}});const et=()=>{const{type:U,autosize:Et}=s;if(!(!Gt||U!=="textarea"||!w.value))if(Et){const Zn=hr(Et)?Et.minRows:void 0,bo=hr(Et)?Et.maxRows:void 0,Jb=pp(w.value,Zn,bo);E.value={overflowY:"hidden",...Jb},c.nextTick(()=>{w.value.offsetHeight,E.value=Jb})}else E.value={minHeight:pp(w.value).minHeight}},ge=(U=>{let Et=!1;return()=>{var Zn;if(Et||!s.autosize)return;((Zn=w.value)==null?void 0:Zn.offsetParent)===null||(U(),Et=!0)}})(et),St=()=>{const U=C.value,Et=s.formatter?s.formatter(j.value):j.value;!U||U.value===Et||(U.value=Et)},xt=async U=>{nt();let{value:Et}=U.target;if(s.formatter&&(Et=s.parser?s.parser(Et):Et),!pe.value){if(Et===j.value){St();return}e(Ac,Et),e("input",Et),await c.nextTick(),St(),rt()}},An=U=>{e("change",U.target.value)},{isComposing:pe,handleCompositionStart:dn,handleCompositionUpdate:Ts,handleCompositionEnd:Ns}=BT({emit:e,afterComposition:xt}),ai=()=>{v.value=!v.value,li()},li=async()=>{var U;await c.nextTick(),(U=C.value)==null||U.focus()},st=()=>{var U;return(U=C.value)==null?void 0:U.blur()},ie=U=>{x.value=!1,e("mouseleave",U)},ci=U=>{x.value=!0,e("mouseenter",U)},yo=U=>{e("keydown",U)},bl=()=>{var U;(U=C.value)==null||U.select()},ui=()=>{e(Ac,""),e("change",""),e("clear"),e("input","")};return c.watch(()=>s.modelValue,()=>{var U;c.nextTick(()=>et()),s.validateEvent&&((U=f==null?void 0:f.validate)==null||U.call(f,"change").catch(Et=>Pe(Et)))}),c.watch(j,()=>St()),c.watch(()=>s.type,async()=>{await c.nextTick(),St(),et()}),c.onMounted(()=>{!s.formatter&&s.parser&&Pe("ElInput","If you set the parser, you also need to set the formatter."),St(),c.nextTick(et)}),t({input:b,textarea:w,ref:C,textareaStyle:L,autosize:c.toRef(s,"autosize"),isComposing:pe,focus:li,blur:st,select:bl,clear:ui,resizeTextarea:et}),(U,Et)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps(c.unref(o),{class:[c.unref(a),{[c.unref(m).bm("group","append")]:U.$slots.append,[c.unref(m).bm("group","prepend")]:U.$slots.prepend}],style:c.unref(P),role:U.containerRole,onMouseenter:ci,onMouseleave:ie}),[c.createCommentVNode(" input "),U.type!=="textarea"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createCommentVNode(" prepend slot "),U.$slots.prepend?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(c.unref(m).be("group","prepend"))},[c.renderSlot(U.$slots,"prepend")],2)):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{ref_key:"wrapperRef",ref:M,class:c.normalizeClass(c.unref(l))},[c.createCommentVNode(" prefix slot "),U.$slots.prefix||U.prefixIcon?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(c.unref(m).e("prefix"))},[c.createElementVNode("span",{class:c.normalizeClass(c.unref(m).e("prefix-inner"))},[c.renderSlot(U.$slots,"prefix"),U.prefixIcon?(c.openBlock(),c.createBlock(c.unref(Cn),{key:0,class:c.normalizeClass(c.unref(m).e("icon"))},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(U.prefixIcon)))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0),c.createElementVNode("input",c.mergeProps({id:c.unref(d),ref_key:"input",ref:b,class:c.unref(m).e("inner")},c.unref(u),{minlength:U.minlength,maxlength:U.maxlength,type:U.showPassword?v.value?"text":"password":U.type,disabled:c.unref(p),readonly:U.readonly,autocomplete:U.autocomplete,tabindex:U.tabindex,"aria-label":U.ariaLabel,placeholder:U.placeholder,style:U.inputStyle,form:U.form,autofocus:U.autofocus,onCompositionstart:c.unref(dn),onCompositionupdate:c.unref(Ts),onCompositionend:c.unref(Ns),onInput:xt,onChange:An,onKeydown:yo}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","onCompositionstart","onCompositionupdate","onCompositionend"]),c.createCommentVNode(" suffix slot "),c.unref(K)?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(c.unref(m).e("suffix"))},[c.createElementVNode("span",{class:c.normalizeClass(c.unref(m).e("suffix-inner"))},[!c.unref(Y)||!c.unref(ot)||!c.unref(F)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.renderSlot(U.$slots,"suffix"),U.suffixIcon?(c.openBlock(),c.createBlock(c.unref(Cn),{key:0,class:c.normalizeClass(c.unref(m).e("icon"))},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(U.suffixIcon)))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0)],64)):c.createCommentVNode("v-if",!0),c.unref(Y)?(c.openBlock(),c.createBlock(c.unref(Cn),{key:1,class:c.normalizeClass([c.unref(m).e("icon"),c.unref(m).e("clear")]),onMousedown:c.withModifiers(c.unref(ss),["prevent"]),onClick:ui},{default:c.withCtx(()=>[c.createVNode(c.unref(bg))]),_:1},8,["class","onMousedown"])):c.createCommentVNode("v-if",!0),c.unref(ot)?(c.openBlock(),c.createBlock(c.unref(Cn),{key:2,class:c.normalizeClass([c.unref(m).e("icon"),c.unref(m).e("password")]),onClick:ai},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(c.unref(A))))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0),c.unref(F)?(c.openBlock(),c.createElementBlock("span",{key:3,class:c.normalizeClass(c.unref(m).e("count"))},[c.createElementVNode("span",{class:c.normalizeClass(c.unref(m).e("count-inner"))},c.toDisplayString(c.unref(H))+" / "+c.toDisplayString(U.maxlength),3)],2)):c.createCommentVNode("v-if",!0),c.unref(N)&&c.unref(V)&&c.unref(D)?(c.openBlock(),c.createBlock(c.unref(Cn),{key:4,class:c.normalizeClass([c.unref(m).e("icon"),c.unref(m).e("validateIcon"),c.unref(m).is("loading",c.unref(N)==="validating")])},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(c.unref(V))))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0)],2),c.createCommentVNode(" append slot "),U.$slots.append?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(c.unref(m).be("group","append"))},[c.renderSlot(U.$slots,"append")],2)):c.createCommentVNode("v-if",!0)],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createCommentVNode(" textarea "),c.createElementVNode("textarea",c.mergeProps({id:c.unref(d),ref_key:"textarea",ref:w,class:[c.unref(y).e("inner"),c.unref(m).is("focus",c.unref(T))]},c.unref(u),{minlength:U.minlength,maxlength:U.maxlength,tabindex:U.tabindex,disabled:c.unref(p),readonly:U.readonly,autocomplete:U.autocomplete,style:c.unref(L),"aria-label":U.ariaLabel,placeholder:U.placeholder,form:U.form,autofocus:U.autofocus,rows:U.rows,onCompositionstart:c.unref(dn),onCompositionupdate:c.unref(Ts),onCompositionend:c.unref(Ns),onInput:xt,onFocus:c.unref(k),onBlur:c.unref(_),onChange:An,onKeydown:yo}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),c.unref(F)?(c.openBlock(),c.createElementBlock("span",{key:0,style:c.normalizeStyle(S.value),class:c.normalizeClass(c.unref(m).e("count"))},c.toDisplayString(c.unref(H))+" / "+c.toDisplayString(U.maxlength),7)):c.createCommentVNode("v-if",!0)],64))],16,["role"]))}});var eN=he(tN,[["__file","input.vue"]]);const nN=js(eN),Yc=Symbol("popper"),mp=Symbol("popperContent"),yp=Kt({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),sN=c.defineComponent({name:"ElPopper",inheritAttrs:!1}),rN=c.defineComponent({...sN,props:yp,setup(n,{expose:t}){const e=n,s=c.ref(),r=c.ref(),i=c.ref(),o=c.ref(),a=c.computed(()=>e.role),l={triggerRef:s,popperInstanceRef:r,contentRef:i,referenceRef:o,role:a};return t(l),c.provide(Yc,l),(u,h)=>c.renderSlot(u.$slots,"default")}});var iN=he(rN,[["__file","popper.vue"]]);const bp=Kt({arrowOffset:{type:Number,default:5}}),oN=c.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),aN=c.defineComponent({...oN,props:bp,setup(n,{expose:t}){const e=n,s=me("popper"),{arrowOffset:r,arrowRef:i,arrowStyle:o}=c.inject(mp,void 0);return c.watch(()=>e.arrowOffset,a=>{r.value=a}),c.onBeforeUnmount(()=>{i.value=void 0}),t({arrowRef:i}),(a,l)=>(c.openBlock(),c.createElementBlock("span",{ref_key:"arrowRef",ref:i,class:c.normalizeClass(c.unref(s).e("arrow")),style:c.normalizeStyle(c.unref(o)),"data-popper-arrow":""},null,6))}});var lN=he(aN,[["__file","arrow.vue"]]);const Wc="ElOnlyChild",cN=c.defineComponent({name:Wc,setup(n,{slots:t,attrs:e}){var s;const r=c.inject(np),i=DT((s=r==null?void 0:r.setForwardRef)!=null?s:ss);return()=>{var o;const a=(o=t.default)==null?void 0:o.call(t,e);if(!a)return null;if(a.length>1)return Pe(Wc,"requires exact only one valid child."),null;const l=wp(a);return l?c.withDirectives(c.cloneVNode(l,e),[[i]]):(Pe(Wc,"no valid child node found"),null)}}});function wp(n){if(!n)return null;const t=n;for(const e of t){if(hr(e))switch(e.type){case c.Comment:continue;case c.Text:case"svg":return xp(e);case c.Fragment:return wp(e.children);default:return e}return xp(e)}return null}function xp(n){const t=me("only-child");return c.createVNode("span",{class:t.e("content")},[n])}const vp=Kt({virtualRef:{type:ct(Object)},virtualTriggering:Boolean,onMouseenter:{type:ct(Function)},onMouseleave:{type:ct(Function)},onClick:{type:ct(Function)},onKeydown:{type:ct(Function)},onFocus:{type:ct(Function)},onBlur:{type:ct(Function)},onContextmenu:{type:ct(Function)},id:String,open:Boolean}),uN=c.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),hN=c.defineComponent({...uN,props:vp,setup(n,{expose:t}){const e=n,{role:s,triggerRef:r}=c.inject(Yc,void 0);kT(r);const i=c.computed(()=>a.value?e.id:void 0),o=c.computed(()=>{if(s&&s.value==="tooltip")return e.open&&e.id?e.id:void 0}),a=c.computed(()=>{if(s&&s.value!=="tooltip")return s.value}),l=c.computed(()=>a.value?`${e.open}`:void 0);let u;const h=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return c.onMounted(()=>{c.watch(()=>e.virtualRef,f=>{f&&(r.value=ns(f))},{immediate:!0}),c.watch(r,(f,d)=>{u==null||u(),u=void 0,Fn(f)&&(h.forEach(g=>{var p;const m=e[g];m&&(f.addEventListener(g.slice(2).toLowerCase(),m),(p=d==null?void 0:d.removeEventListener)==null||p.call(d,g.slice(2).toLowerCase(),m))}),u=c.watch([i,o,a,l],g=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,m)=>{ua(g[m])?f.removeAttribute(p):f.setAttribute(p,g[m])})},{immediate:!0})),Fn(d)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(g=>d.removeAttribute(g))},{immediate:!0})}),c.onBeforeUnmount(()=>{if(u==null||u(),u=void 0,r.value&&Fn(r.value)){const f=r.value;h.forEach(d=>{const g=e[d];g&&f.removeEventListener(d.slice(2).toLowerCase(),g)}),r.value=void 0}}),t({triggerRef:r}),(f,d)=>f.virtualTriggering?c.createCommentVNode("v-if",!0):(c.openBlock(),c.createBlock(c.unref(cN),c.mergeProps({key:0},f.$attrs,{"aria-controls":c.unref(i),"aria-describedby":c.unref(o),"aria-expanded":c.unref(l),"aria-haspopup":c.unref(a)}),{default:c.withCtx(()=>[c.renderSlot(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var dN=he(hN,[["__file","trigger.vue"]]);const qc="focus-trap.focus-after-trapped",Jc="focus-trap.focus-after-released",fN="focus-trap.focusout-prevented",Cp={cancelable:!0,bubbles:!1},gN={cancelable:!0,bubbles:!1},Sp="focusAfterTrapped",Ep="focusAfterReleased",pN=Symbol("elFocusTrap"),Xc=c.ref(),Oa=c.ref(0),Kc=c.ref(0);let Ma=0;const Op=n=>{const t=[],e=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0||s===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;e.nextNode();)t.push(e.currentNode);return t},Mp=(n,t)=>{for(const e of n)if(!mN(e,t))return e},mN=(n,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(t&&n===t)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1},yN=n=>{const t=Op(n),e=Mp(t,n),s=Mp(t.reverse(),n);return[e,s]},bN=n=>n instanceof HTMLInputElement&&"select"in n,os=(n,t)=>{if(n&&n.focus){const e=document.activeElement;n.focus({preventScroll:!0}),Kc.value=window.performance.now(),n!==e&&bN(n)&&t&&n.select()}};function Pp(n,t){const e=[...n],s=n.indexOf(t);return s!==-1&&e.splice(s,1),e}const wN=()=>{let n=[];return{push:s=>{const r=n[0];r&&s!==r&&r.pause(),n=Pp(n,s),n.unshift(s)},remove:s=>{var r,i;n=Pp(n,s),(i=(r=n[0])==null?void 0:r.resume)==null||i.call(r)}}},xN=(n,t=!1)=>{const e=document.activeElement;for(const s of n)if(os(s,t),document.activeElement!==e)return},Ap=wN(),vN=()=>Oa.value>Kc.value,Pa=()=>{Xc.value="pointer",Oa.value=window.performance.now()},Tp=()=>{Xc.value="keyboard",Oa.value=window.performance.now()},CN=()=>(c.onMounted(()=>{Ma===0&&(document.addEventListener("mousedown",Pa),document.addEventListener("touchstart",Pa),document.addEventListener("keydown",Tp)),Ma++}),c.onBeforeUnmount(()=>{Ma--,Ma<=0&&(document.removeEventListener("mousedown",Pa),document.removeEventListener("touchstart",Pa),document.removeEventListener("keydown",Tp))}),{focusReason:Xc,lastUserFocusTimestamp:Oa,lastAutomatedFocusTimestamp:Kc}),Aa=n=>new CustomEvent(fN,{...gN,detail:n}),SN=c.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Sp,Ep,"focusin","focusout","focusout-prevented","release-requested"],setup(n,{emit:t}){const e=c.ref();let s,r;const{focusReason:i}=CN();PT(p=>{n.trapped&&!o.paused&&t("release-requested",p)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},a=p=>{if(!n.loop&&!n.trapped||o.paused)return;const{key:m,altKey:y,ctrlKey:b,metaKey:w,currentTarget:x,shiftKey:v}=p,{loop:S}=n,E=m===Cr.tab&&!y&&!b&&!w,C=document.activeElement;if(E&&C){const M=x,[T,k]=yN(M);if(T&&k){if(!v&&C===k){const D=Aa({focusReason:i.value});t("focusout-prevented",D),D.defaultPrevented||(p.preventDefault(),S&&os(T,!0))}else if(v&&[T,M].includes(C)){const D=Aa({focusReason:i.value});t("focusout-prevented",D),D.defaultPrevented||(p.preventDefault(),S&&os(k,!0))}}else if(C===M){const D=Aa({focusReason:i.value});t("focusout-prevented",D),D.defaultPrevented||p.preventDefault()}}};c.provide(pN,{focusTrapRef:e,onKeydown:a}),c.watch(()=>n.focusTrapEl,p=>{p&&(e.value=p)},{immediate:!0}),c.watch([e],([p],[m])=>{p&&(p.addEventListener("keydown",a),p.addEventListener("focusin",h),p.addEventListener("focusout",f)),m&&(m.removeEventListener("keydown",a),m.removeEventListener("focusin",h),m.removeEventListener("focusout",f))});const l=p=>{t(Sp,p)},u=p=>t(Ep,p),h=p=>{const m=c.unref(e);if(!m)return;const y=p.target,b=p.relatedTarget,w=y&&m.contains(y);n.trapped||b&&m.contains(b)||(s=b),w&&t("focusin",p),!o.paused&&n.trapped&&(w?r=y:os(r,!0))},f=p=>{const m=c.unref(e);if(!(o.paused||!m))if(n.trapped){const y=p.relatedTarget;!ua(y)&&!m.contains(y)&&setTimeout(()=>{if(!o.paused&&n.trapped){const b=Aa({focusReason:i.value});t("focusout-prevented",b),b.defaultPrevented||os(r,!0)}},0)}else{const y=p.target;y&&m.contains(y)||t("focusout",p)}};async function d(){await c.nextTick();const p=c.unref(e);if(p){Ap.push(o);const m=p.contains(document.activeElement)?s:document.activeElement;if(s=m,!p.contains(m)){const b=new Event(qc,Cp);p.addEventListener(qc,l),p.dispatchEvent(b),b.defaultPrevented||c.nextTick(()=>{let w=n.focusStartEl;Xe(w)||(os(w),document.activeElement!==w&&(w="first")),w==="first"&&xN(Op(p),!0),(document.activeElement===m||w==="container")&&os(p)})}}}function g(){const p=c.unref(e);if(p){p.removeEventListener(qc,l);const m=new CustomEvent(Jc,{...Cp,detail:{focusReason:i.value}});p.addEventListener(Jc,u),p.dispatchEvent(m),!m.defaultPrevented&&(i.value=="keyboard"||!vN()||p.contains(document.activeElement))&&os(s??document.body),p.removeEventListener(Jc,u),Ap.remove(o)}}return c.onMounted(()=>{n.trapped&&d(),c.watch(()=>n.trapped,p=>{p?d():g()})}),c.onBeforeUnmount(()=>{n.trapped&&g(),e.value&&(e.value.removeEventListener("keydown",a),e.value.removeEventListener("focusin",h),e.value.removeEventListener("focusout",f),e.value=void 0)}),{onKeydown:a}}});function EN(n,t,e,s,r,i){return c.renderSlot(n.$slots,"default",{handleKeydown:n.onKeydown})}var Np=he(SN,[["render",EN],["__file","focus-trap.vue"]]);const ON=["fixed","absolute"],MN=Kt({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:ct(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:_c,default:"bottom"},popperOptions:{type:ct(Object),default:()=>({})},strategy:{type:String,values:ON,default:"absolute"}}),_p=Kt({...MN,id:String,style:{type:ct([String,Array,Object])},className:{type:ct([String,Array,Object])},effect:{type:ct(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:ct([String,Array,Object])},popperStyle:{type:ct([String,Array,Object])},referenceEl:{type:ct(Object)},triggerTargetEl:{type:ct(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Fc(["ariaLabel"])}),PN={mouseenter:n=>n instanceof MouseEvent,mouseleave:n=>n instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},AN=(n,t=[])=>{const{placement:e,strategy:s,popperOptions:r}=n,i={placement:e,strategy:s,...r,modifiers:[...NN(n),...t]};return _N(i,r==null?void 0:r.modifiers),i},TN=n=>{if(Gt)return ns(n)};function NN(n){const{offset:t,gpuAcceleration:e,fallbackPlacements:s}=n;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:s}},{name:"computeStyles",options:{gpuAcceleration:e}}]}function _N(n,t){t&&(n.modifiers=[...n.modifiers,...t??[]])}const kN=0,DN=n=>{const{popperInstanceRef:t,contentRef:e,triggerRef:s,role:r}=c.inject(Yc,void 0),i=c.ref(),o=c.ref(),a=c.computed(()=>({name:"eventListeners",enabled:!!n.visible})),l=c.computed(()=>{var b;const w=c.unref(i),x=(b=c.unref(o))!=null?b:kN;return{name:"arrow",enabled:!n2(w),options:{element:w,padding:x}}}),u=c.computed(()=>({onFirstUpdate:()=>{p()},...AN(n,[c.unref(l),c.unref(a)])})),h=c.computed(()=>TN(n.referenceEl)||c.unref(s)),{attributes:f,state:d,styles:g,update:p,forceUpdate:m,instanceRef:y}=ET(h,e,u);return c.watch(y,b=>t.value=b),c.onMounted(()=>{c.watch(()=>{var b;return(b=c.unref(h))==null?void 0:b.getBoundingClientRect()},()=>{p()})}),{attributes:f,arrowRef:i,contentRef:e,instanceRef:y,state:d,styles:g,role:r,forceUpdate:m,update:p}},RN=(n,{attributes:t,styles:e,role:s})=>{const{nextZIndex:r}=lp(),i=me("popper"),o=c.computed(()=>c.unref(t).popper),a=c.ref(Be(n.zIndex)?n.zIndex:r()),l=c.computed(()=>[i.b(),i.is("pure",n.pure),i.is(n.effect),n.popperClass]),u=c.computed(()=>[{zIndex:c.unref(a)},c.unref(e).popper,n.popperStyle||{}]),h=c.computed(()=>s.value==="dialog"?"false":void 0),f=c.computed(()=>c.unref(e).arrow||{});return{ariaModal:h,arrowStyle:f,contentAttrs:o,contentClass:l,contentStyle:u,contentZIndex:a,updateZIndex:()=>{a.value=Be(n.zIndex)?n.zIndex:r()}}},IN=(n,t)=>{const e=c.ref(!1),s=c.ref();return{focusStartRef:s,trapped:e,onFocusAfterReleased:u=>{var h;((h=u.detail)==null?void 0:h.focusReason)!=="pointer"&&(s.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:u=>{n.visible&&!e.value&&(u.target&&(s.value=u.target),e.value=!0)},onFocusoutPrevented:u=>{n.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),e.value=!1)},onReleaseRequested:()=>{e.value=!1,t("close")}}},LN=c.defineComponent({name:"ElPopperContent"}),BN=c.defineComponent({...LN,props:_p,emits:PN,setup(n,{expose:t,emit:e}){const s=n,{focusStartRef:r,trapped:i,onFocusAfterReleased:o,onFocusAfterTrapped:a,onFocusInTrap:l,onFocusoutPrevented:u,onReleaseRequested:h}=IN(s,e),{attributes:f,arrowRef:d,contentRef:g,styles:p,instanceRef:m,role:y,update:b}=DN(s),{ariaModal:w,arrowStyle:x,contentAttrs:v,contentClass:S,contentStyle:E,updateZIndex:C}=RN(s,{styles:p,attributes:f,role:y}),M=c.inject(Ea,void 0),T=c.ref();c.provide(mp,{arrowStyle:x,arrowRef:d,arrowOffset:T}),M&&c.provide(Ea,{...M,addInputId:ss,removeInputId:ss});let k;const _=(N=!0)=>{b(),N&&C()},D=()=>{_(!1),s.visible&&s.focusOnShow?i.value=!0:s.visible===!1&&(i.value=!1)};return c.onMounted(()=>{c.watch(()=>s.triggerTargetEl,(N,V)=>{k==null||k(),k=void 0;const A=c.unref(N||g.value),P=c.unref(V||g.value);Fn(A)&&(k=c.watch([y,()=>s.ariaLabel,w,()=>s.id],L=>{["role","aria-label","aria-modal","id"].forEach((j,Y)=>{ua(L[Y])?A.removeAttribute(j):A.setAttribute(j,L[Y])})},{immediate:!0})),P!==A&&Fn(P)&&["role","aria-label","aria-modal","id"].forEach(L=>{P.removeAttribute(L)})},{immediate:!0}),c.watch(()=>s.visible,D,{immediate:!0})}),c.onBeforeUnmount(()=>{k==null||k(),k=void 0}),t({popperContentRef:g,popperInstanceRef:m,updatePopper:_,contentStyle:E}),(N,V)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps({ref_key:"contentRef",ref:g},c.unref(v),{style:c.unref(E),class:c.unref(S),tabindex:"-1",onMouseenter:A=>N.$emit("mouseenter",A),onMouseleave:A=>N.$emit("mouseleave",A)}),[c.createVNode(c.unref(Np),{trapped:c.unref(i),"trap-on-focus-in":!0,"focus-trap-el":c.unref(g),"focus-start-el":c.unref(r),onFocusAfterTrapped:c.unref(a),onFocusAfterReleased:c.unref(o),onFocusin:c.unref(l),onFocusoutPrevented:c.unref(u),onReleaseRequested:c.unref(h)},{default:c.withCtx(()=>[c.renderSlot(N.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var VN=he(BN,[["__file","content.vue"]]);const jN=js(iN),Zc=Symbol("elTooltip"),kp=Kt({...NT,..._p,appendTo:{type:ct([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:ct(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Fc(["ariaLabel"])}),Dp=Kt({...vp,disabled:Boolean,trigger:{type:ct([String,Array]),default:"hover"},triggerKeys:{type:ct(Array),default:()=>[Cr.enter,Cr.space]}}),{useModelToggleProps:$N,useModelToggleEmits:zN,useModelToggle:FN}=vA("visible"),HN=Kt({...yp,...$N,...kp,...Dp,...bp,showArrow:{type:Boolean,default:!0}}),UN=[...zN,"before-show","before-hide","show","hide","open","close"],GN=(n,t)=>yv(n)?n.includes(t):n===t,Tr=(n,t,e)=>s=>{GN(c.unref(n),t)&&e(s)},YN=c.defineComponent({name:"ElTooltipTrigger"}),WN=c.defineComponent({...YN,props:Dp,setup(n,{expose:t}){const e=n,s=me("tooltip"),{controlled:r,id:i,open:o,onOpen:a,onClose:l,onToggle:u}=c.inject(Zc,void 0),h=c.ref(null),f=()=>{if(c.unref(r)||e.disabled)return!0},d=c.toRef(e,"trigger"),g=Vn(f,Tr(d,"hover",a)),p=Vn(f,Tr(d,"hover",l)),m=Vn(f,Tr(d,"click",v=>{v.button===0&&u(v)})),y=Vn(f,Tr(d,"focus",a)),b=Vn(f,Tr(d,"focus",l)),w=Vn(f,Tr(d,"contextmenu",v=>{v.preventDefault(),u(v)})),x=Vn(f,v=>{const{code:S}=v;e.triggerKeys.includes(S)&&(v.preventDefault(),u(v))});return t({triggerRef:h}),(v,S)=>(c.openBlock(),c.createBlock(c.unref(dN),{id:c.unref(i),"virtual-ref":v.virtualRef,open:c.unref(o),"virtual-triggering":v.virtualTriggering,class:c.normalizeClass(c.unref(s).e("trigger")),onBlur:c.unref(b),onClick:c.unref(m),onContextmenu:c.unref(w),onFocus:c.unref(y),onMouseenter:c.unref(g),onMouseleave:c.unref(p),onKeydown:c.unref(x)},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var qN=he(WN,[["__file","trigger.vue"]]);const JN=Kt({to:{type:ct([String,Object]),required:!0},disabled:Boolean});var XN=he(c.defineComponent({__name:"teleport",props:JN,setup(n){return(t,e)=>t.disabled?c.renderSlot(t.$slots,"default",{key:0}):(c.openBlock(),c.createBlock(c.Teleport,{key:1,to:t.to},[c.renderSlot(t.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const KN=js(XN),ZN=c.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),QN=c.defineComponent({...ZN,props:kp,setup(n,{expose:t}){const e=n,{selector:s}=ep(),r=me("tooltip"),i=c.ref(null);let o;const{controlled:a,id:l,open:u,trigger:h,onClose:f,onOpen:d,onShow:g,onHide:p,onBeforeShow:m,onBeforeHide:y}=c.inject(Zc,void 0),b=c.computed(()=>e.transition||`${r.namespace.value}-fade-in-linear`),w=c.computed(()=>process.env.NODE_ENV==="test"?!0:e.persistent);c.onBeforeUnmount(()=>{o==null||o()});const x=c.computed(()=>c.unref(w)?!0:c.unref(u)),v=c.computed(()=>e.disabled?!1:c.unref(u)),S=c.computed(()=>e.appendTo||s.value),E=c.computed(()=>{var P;return(P=e.style)!=null?P:{}}),C=c.ref(!0),M=()=>{p(),C.value=!0},T=()=>{if(c.unref(a))return!0},k=Vn(T,()=>{e.enterable&&c.unref(h)==="hover"&&d()}),_=Vn(T,()=>{c.unref(h)==="hover"&&f()}),D=()=>{var P,L;(L=(P=i.value)==null?void 0:P.updatePopper)==null||L.call(P),m==null||m()},N=()=>{y==null||y()},V=()=>{g(),o=ov(c.computed(()=>{var P;return(P=i.value)==null?void 0:P.popperContentRef}),()=>{if(c.unref(a))return;c.unref(h)!=="hover"&&f()})},A=()=>{e.virtualTriggering||f()};return c.watch(()=>c.unref(u),P=>{P?C.value=!1:o==null||o()},{flush:"post"}),c.watch(()=>e.content,()=>{var P,L;(L=(P=i.value)==null?void 0:P.updatePopper)==null||L.call(P)}),t({contentRef:i}),(P,L)=>(c.openBlock(),c.createBlock(c.unref(KN),{disabled:!P.teleported,to:c.unref(S)},{default:c.withCtx(()=>[c.createVNode(c.Transition,{name:c.unref(b),onAfterLeave:M,onBeforeEnter:D,onAfterEnter:V,onBeforeLeave:N},{default:c.withCtx(()=>[c.unref(x)?c.withDirectives((c.openBlock(),c.createBlock(c.unref(VN),c.mergeProps({key:0,id:c.unref(l),ref_key:"contentRef",ref:i},P.$attrs,{"aria-label":P.ariaLabel,"aria-hidden":C.value,"boundaries-padding":P.boundariesPadding,"fallback-placements":P.fallbackPlacements,"gpu-acceleration":P.gpuAcceleration,offset:P.offset,placement:P.placement,"popper-options":P.popperOptions,strategy:P.strategy,effect:P.effect,enterable:P.enterable,pure:P.pure,"popper-class":P.popperClass,"popper-style":[P.popperStyle,c.unref(E)],"reference-el":P.referenceEl,"trigger-target-el":P.triggerTargetEl,visible:c.unref(v),"z-index":P.zIndex,onMouseenter:c.unref(k),onMouseleave:c.unref(_),onBlur:A,onClose:c.unref(f)}),{default:c.withCtx(()=>[c.renderSlot(P.$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"])),[[c.vShow,c.unref(v)]]):c.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var t_=he(QN,[["__file","content.vue"]]);const e_=c.defineComponent({name:"ElTooltip"}),n_=c.defineComponent({...e_,props:HN,emits:UN,setup(n,{expose:t,emit:e}){const s=n;TT();const r=Ca(),i=c.ref(),o=c.ref(),a=()=>{var b;const w=c.unref(i);w&&((b=w.popperInstanceRef)==null||b.update())},l=c.ref(!1),u=c.ref(),{show:h,hide:f,hasUpdateHandler:d}=FN({indicator:l,toggleReason:u}),{onOpen:g,onClose:p}=_T({showAfter:c.toRef(s,"showAfter"),hideAfter:c.toRef(s,"hideAfter"),autoClose:c.toRef(s,"autoClose"),open:h,close:f}),m=c.computed(()=>ha(s.visible)&&!d.value);c.provide(Zc,{controlled:m,id:r,open:c.readonly(l),trigger:c.toRef(s,"trigger"),onOpen:b=>{g(b)},onClose:b=>{p(b)},onToggle:b=>{c.unref(l)?p(b):g(b)},onShow:()=>{e("show",u.value)},onHide:()=>{e("hide",u.value)},onBeforeShow:()=>{e("before-show",u.value)},onBeforeHide:()=>{e("before-hide",u.value)},updatePopper:a}),c.watch(()=>s.disabled,b=>{b&&l.value&&(l.value=!1)});const y=b=>{var w,x;const v=(x=(w=o.value)==null?void 0:w.contentRef)==null?void 0:x.popperContentRef,S=(b==null?void 0:b.relatedTarget)||document.activeElement;return v&&v.contains(S)};return c.onDeactivated(()=>l.value&&f()),t({popperRef:i,contentRef:o,isFocusInsideContent:y,updatePopper:a,onOpen:g,onClose:p,hide:f}),(b,w)=>(c.openBlock(),c.createBlock(c.unref(jN),{ref_key:"popperRef",ref:i,role:b.role},{default:c.withCtx(()=>[c.createVNode(qN,{disabled:b.disabled,trigger:b.trigger,"trigger-keys":b.triggerKeys,"virtual-ref":b.virtualRef,"virtual-triggering":b.virtualTriggering},{default:c.withCtx(()=>[b.$slots.default?c.renderSlot(b.$slots,"default",{key:0}):c.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),c.createVNode(t_,{ref_key:"contentRef",ref:o,"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:c.withCtx(()=>[c.renderSlot(b.$slots,"content",{},()=>[b.rawContent?(c.openBlock(),c.createElementBlock("span",{key:0,innerHTML:b.content},null,8,["innerHTML"])):(c.openBlock(),c.createElementBlock("span",{key:1},c.toDisplayString(b.content),1))]),b.showArrow?(c.openBlock(),c.createBlock(c.unref(lN),{key:0,"arrow-offset":b.arrowOffset},null,8,["arrow-offset"])):c.createCommentVNode("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 s_=he(n_,[["__file","tooltip.vue"]]);const Rp=js(s_),r_=Kt({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:ct([String,Object,Array])},offset:{type:ct(Array),default:[0,0]},badgeClass:{type:String}}),i_=c.defineComponent({name:"ElBadge"}),o_=c.defineComponent({...i_,props:r_,setup(n,{expose:t}){const e=n,s=me("badge"),r=c.computed(()=>e.isDot?"":Be(e.value)&&Be(e.max)?e.max<e.value?`${e.max}+`:`${e.value}`:`${e.value}`),i=c.computed(()=>{var o,a,l,u,h;return[{backgroundColor:e.color,marginRight:ki(-((a=(o=e.offset)==null?void 0:o[0])!=null?a:0)),marginTop:ki((u=(l=e.offset)==null?void 0:l[1])!=null?u:0)},(h=e.badgeStyle)!=null?h:{}]});return t({content:r}),(o,a)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref(s).b())},[c.renderSlot(o.$slots,"default"),c.createVNode(c.Transition,{name:`${c.unref(s).namespace.value}-zoom-in-center`,persisted:""},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("sup",{class:c.normalizeClass([c.unref(s).e("content"),c.unref(s).em("content",o.type),c.unref(s).is("fixed",!!o.$slots.default),c.unref(s).is("dot",o.isDot),c.unref(s).is("hide-zero",!o.showZero&&e.value===0),o.badgeClass]),style:c.normalizeStyle(c.unref(i)),textContent:c.toDisplayString(c.unref(r))},null,14,["textContent"]),[[c.vShow,!o.hidden&&(c.unref(r)||o.isDot)]])]),_:1},8,["name"])],2))}});var a_=he(o_,[["__file","badge.vue"]]);const l_=js(a_),Ip=Symbol("buttonGroupContextKey"),c_=(n,t)=>{uA({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},c.computed(()=>n.type==="text"));const e=c.inject(Ip,void 0),s=Hc("button"),{form:r}=gp(),i=fp(c.computed(()=>e==null?void 0:e.size)),o=Gc(),a=c.ref(),l=c.useSlots(),u=c.computed(()=>n.type||(e==null?void 0:e.type)||""),h=c.computed(()=>{var p,m,y;return(y=(m=n.autoInsertSpace)!=null?m:(p=s.value)==null?void 0:p.autoInsertSpace)!=null?y:!1}),f=c.computed(()=>n.tag==="button"?{ariaDisabled:o.value||n.loading,disabled:o.value||n.loading,autofocus:n.autofocus,type:n.nativeType}:{}),d=c.computed(()=>{var p;const m=(p=l.default)==null?void 0:p.call(l);if(h.value&&(m==null?void 0:m.length)===1){const y=m[0];if((y==null?void 0:y.type)===c.Text){const b=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(b.trim())}}return!1});return{_disabled:o,_size:i,_type:u,_ref:a,_props:f,shouldAddSpace:d,handleClick:p=>{if(o.value||n.loading){p.stopPropagation();return}n.nativeType==="reset"&&(r==null||r.resetFields()),t("click",p)}}},Qc=Kt({size:zc,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:Di},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:Di,default:()=>fa},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:ct([String,Object]),default:"button"}}),u_={click:n=>n instanceof MouseEvent};function oe(n,t){h_(n)&&(n="100%");var e=d_(n);return n=t===360?n:Math.min(t,Math.max(0,parseFloat(n))),e&&(n=parseInt(String(n*t),10)/100),Math.abs(n-t)<1e-6?1:(t===360?n=(n<0?n%t+t:n%t)/parseFloat(String(t)):n=n%t/parseFloat(String(t)),n)}function Ta(n){return Math.min(1,Math.max(0,n))}function h_(n){return typeof n=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1}function d_(n){return typeof n=="string"&&n.indexOf("%")!==-1}function Lp(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Na(n){return n<=1?"".concat(Number(n)*100,"%"):n}function Fs(n){return n.length===1?"0"+n:String(n)}function f_(n,t,e){return{r:oe(n,255)*255,g:oe(t,255)*255,b:oe(e,255)*255}}function Bp(n,t,e){n=oe(n,255),t=oe(t,255),e=oe(e,255);var s=Math.max(n,t,e),r=Math.min(n,t,e),i=0,o=0,a=(s+r)/2;if(s===r)o=0,i=0;else{var l=s-r;switch(o=a>.5?l/(2-s-r):l/(s+r),s){case n:i=(t-e)/l+(t<e?6:0);break;case t:i=(e-n)/l+2;break;case e:i=(n-t)/l+4;break}i/=6}return{h:i,s:o,l:a}}function tu(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*(6*e):e<1/2?t:e<2/3?n+(t-n)*(2/3-e)*6:n}function g_(n,t,e){var s,r,i;if(n=oe(n,360),t=oe(t,100),e=oe(e,100),t===0)r=e,i=e,s=e;else{var o=e<.5?e*(1+t):e+t-e*t,a=2*e-o;s=tu(a,o,n+1/3),r=tu(a,o,n),i=tu(a,o,n-1/3)}return{r:s*255,g:r*255,b:i*255}}function Vp(n,t,e){n=oe(n,255),t=oe(t,255),e=oe(e,255);var s=Math.max(n,t,e),r=Math.min(n,t,e),i=0,o=s,a=s-r,l=s===0?0:a/s;if(s===r)i=0;else{switch(s){case n:i=(t-e)/a+(t<e?6:0);break;case t:i=(e-n)/a+2;break;case e:i=(n-t)/a+4;break}i/=6}return{h:i,s:l,v:o}}function p_(n,t,e){n=oe(n,360)*6,t=oe(t,100),e=oe(e,100);var s=Math.floor(n),r=n-s,i=e*(1-t),o=e*(1-r*t),a=e*(1-(1-r)*t),l=s%6,u=[e,o,i,i,a,e][l],h=[a,e,e,o,i,i][l],f=[i,i,a,e,e,o][l];return{r:u*255,g:h*255,b:f*255}}function jp(n,t,e,s){var r=[Fs(Math.round(n).toString(16)),Fs(Math.round(t).toString(16)),Fs(Math.round(e).toString(16))];return s&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function m_(n,t,e,s,r){var i=[Fs(Math.round(n).toString(16)),Fs(Math.round(t).toString(16)),Fs(Math.round(e).toString(16)),Fs(y_(s))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function y_(n){return Math.round(parseFloat(n)*255).toString(16)}function $p(n){return Ae(n)/255}function Ae(n){return parseInt(n,16)}function b_(n){return{r:n>>16,g:(n&65280)>>8,b:n&255}}var eu={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 w_(n){var t={r:0,g:0,b:0},e=1,s=null,r=null,i=null,o=!1,a=!1;return typeof n=="string"&&(n=C_(n)),typeof n=="object"&&(Un(n.r)&&Un(n.g)&&Un(n.b)?(t=f_(n.r,n.g,n.b),o=!0,a=String(n.r).substr(-1)==="%"?"prgb":"rgb"):Un(n.h)&&Un(n.s)&&Un(n.v)?(s=Na(n.s),r=Na(n.v),t=p_(n.h,s,r),o=!0,a="hsv"):Un(n.h)&&Un(n.s)&&Un(n.l)&&(s=Na(n.s),i=Na(n.l),t=g_(n.h,s,i),o=!0,a="hsl"),Object.prototype.hasOwnProperty.call(n,"a")&&(e=n.a)),e=Lp(e),{ok:o,format:n.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:e}}var x_="[-\\+]?\\d+%?",v_="[-\\+]?\\d*\\.\\d+%?",as="(?:".concat(v_,")|(?:").concat(x_,")"),nu="[\\s|\\(]+(".concat(as,")[,|\\s]+(").concat(as,")[,|\\s]+(").concat(as,")\\s*\\)?"),su="[\\s|\\(]+(".concat(as,")[,|\\s]+(").concat(as,")[,|\\s]+(").concat(as,")[,|\\s]+(").concat(as,")\\s*\\)?"),sn={CSS_UNIT:new RegExp(as),rgb:new RegExp("rgb"+nu),rgba:new RegExp("rgba"+su),hsl:new RegExp("hsl"+nu),hsla:new RegExp("hsla"+su),hsv:new RegExp("hsv"+nu),hsva:new RegExp("hsva"+su),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 C_(n){if(n=n.trim().toLowerCase(),n.length===0)return!1;var t=!1;if(eu[n])n=eu[n],t=!0;else if(n==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var e=sn.rgb.exec(n);return e?{r:e[1],g:e[2],b:e[3]}:(e=sn.rgba.exec(n),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=sn.hsl.exec(n),e?{h:e[1],s:e[2],l:e[3]}:(e=sn.hsla.exec(n),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=sn.hsv.exec(n),e?{h:e[1],s:e[2],v:e[3]}:(e=sn.hsva.exec(n),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=sn.hex8.exec(n),e?{r:Ae(e[1]),g:Ae(e[2]),b:Ae(e[3]),a:$p(e[4]),format:t?"name":"hex8"}:(e=sn.hex6.exec(n),e?{r:Ae(e[1]),g:Ae(e[2]),b:Ae(e[3]),format:t?"name":"hex"}:(e=sn.hex4.exec(n),e?{r:Ae(e[1]+e[1]),g:Ae(e[2]+e[2]),b:Ae(e[3]+e[3]),a:$p(e[4]+e[4]),format:t?"name":"hex8"}:(e=sn.hex3.exec(n),e?{r:Ae(e[1]+e[1]),g:Ae(e[2]+e[2]),b:Ae(e[3]+e[3]),format:t?"name":"hex"}:!1)))))))))}function Un(n){return!!sn.CSS_UNIT.exec(String(n))}var S_=function(){function n(t,e){t===void 0&&(t=""),e===void 0&&(e={});var s;if(t instanceof n)return t;typeof t=="number"&&(t=b_(t)),this.originalInput=t;var r=w_(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(s=e.format)!==null&&s!==void 0?s:r.format,this.gradientType=e.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=r.ok}return n.prototype.isDark=function(){return this.getBrightness()<128},n.prototype.isLight=function(){return!this.isDark()},n.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},n.prototype.getLuminance=function(){var t=this.toRgb(),e,s,r,i=t.r/255,o=t.g/255,a=t.b/255;return i<=.03928?e=i/12.92:e=Math.pow((i+.055)/1.055,2.4),o<=.03928?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),.2126*e+.7152*s+.0722*r},n.prototype.getAlpha=function(){return this.a},n.prototype.setAlpha=function(t){return this.a=Lp(t),this.roundA=Math.round(100*this.a)/100,this},n.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},n.prototype.toHsv=function(){var t=Vp(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},n.prototype.toHsvString=function(){var t=Vp(this.r,this.g,this.b),e=Math.round(t.h*360),s=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(e,", ").concat(s,"%, ").concat(r,"%)"):"hsva(".concat(e,", ").concat(s,"%, ").concat(r,"%, ").concat(this.roundA,")")},n.prototype.toHsl=function(){var t=Bp(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},n.prototype.toHslString=function(){var t=Bp(this.r,this.g,this.b),e=Math.round(t.h*360),s=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(e,", ").concat(s,"%, ").concat(r,"%)"):"hsla(".concat(e,", ").concat(s,"%, ").concat(r,"%, ").concat(this.roundA,")")},n.prototype.toHex=function(t){return t===void 0&&(t=!1),jp(this.r,this.g,this.b,t)},n.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},n.prototype.toHex8=function(t){return t===void 0&&(t=!1),m_(this.r,this.g,this.b,this.a,t)},n.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},n.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},n.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},n.prototype.toRgbString=function(){var t=Math.round(this.r),e=Math.round(this.g),s=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(e,", ").concat(s,")"):"rgba(".concat(t,", ").concat(e,", ").concat(s,", ").concat(this.roundA,")")},n.prototype.toPercentageRgb=function(){var t=function(e){return"".concat(Math.round(oe(e,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},n.prototype.toPercentageRgbString=function(){var t=function(e){return Math.round(oe(e,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},n.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jp(this.r,this.g,this.b,!1),e=0,s=Object.entries(eu);e<s.length;e++){var r=s[e],i=r[0],o=r[1];if(t===o)return i}return!1},n.prototype.toString=function(t){var e=!!t;t=t??this.format;var s=!1,r=this.a<1&&this.a>=0,i=!e&&r&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(s=this.toRgbString()),t==="prgb"&&(s=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(s=this.toHexString()),t==="hex3"&&(s=this.toHexString(!0)),t==="hex4"&&(s=this.toHex8String(!0)),t==="hex8"&&(s=this.toHex8String()),t==="name"&&(s=this.toName()),t==="hsl"&&(s=this.toHslString()),t==="hsv"&&(s=this.toHsvString()),s||this.toHexString())},n.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},n.prototype.clone=function(){return new n(this.toString())},n.prototype.lighten=function(t){t===void 0&&(t=10);var e=this.toHsl();return e.l+=t/100,e.l=Ta(e.l),new n(e)},n.prototype.brighten=function(t){t===void 0&&(t=10);var e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(t/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(t/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(t/100)))),new n(e)},n.prototype.darken=function(t){t===void 0&&(t=10);var e=this.toHsl();return e.l-=t/100,e.l=Ta(e.l),new n(e)},n.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},n.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},n.prototype.desaturate=function(t){t===void 0&&(t=10);var e=this.toHsl();return e.s-=t/100,e.s=Ta(e.s),new n(e)},n.prototype.saturate=function(t){t===void 0&&(t=10);var e=this.toHsl();return e.s+=t/100,e.s=Ta(e.s),new n(e)},n.prototype.greyscale=function(){return this.desaturate(100)},n.prototype.spin=function(t){var e=this.toHsl(),s=(e.h+t)%360;return e.h=s<0?360+s:s,new n(e)},n.prototype.mix=function(t,e){e===void 0&&(e=50);var s=this.toRgb(),r=new n(t).toRgb(),i=e/100,o={r:(r.r-s.r)*i+s.r,g:(r.g-s.g)*i+s.g,b:(r.b-s.b)*i+s.b,a:(r.a-s.a)*i+s.a};return new n(o)},n.prototype.analogous=function(t,e){t===void 0&&(t=6),e===void 0&&(e=30);var s=this.toHsl(),r=360/e,i=[this];for(s.h=(s.h-(r*t>>1)+720)%360;--t;)s.h=(s.h+r)%360,i.push(new n(s));return i},n.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new n(t)},n.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var e=this.toHsv(),s=e.h,r=e.s,i=e.v,o=[],a=1/t;t--;)o.push(new n({h:s,s:r,v:i})),i=(i+a)%1;return o},n.prototype.splitcomplement=function(){var t=this.toHsl(),e=t.h;return[this,new n({h:(e+72)%360,s:t.s,l:t.l}),new n({h:(e+216)%360,s:t.s,l:t.l})]},n.prototype.onBackground=function(t){var e=this.toRgb(),s=new n(t).toRgb(),r=e.a+s.a*(1-e.a);return new n({r:(e.r*e.a+s.r*s.a*(1-e.a))/r,g:(e.g*e.a+s.g*s.a*(1-e.a))/r,b:(e.b*e.a+s.b*s.a*(1-e.a))/r,a:r})},n.prototype.triad=function(){return this.polyad(3)},n.prototype.tetrad=function(){return this.polyad(4)},n.prototype.polyad=function(t){for(var e=this.toHsl(),s=e.h,r=[this],i=360/t,o=1;o<t;o++)r.push(new n({h:(s+o*i)%360,s:e.s,l:e.l}));return r},n.prototype.equals=function(t){return this.toRgbString()===new n(t).toRgbString()},n}();function ls(n,t=20){return n.mix("#141414",t).toString()}function E_(n){const t=Gc(),e=me("button");return c.computed(()=>{let s={},r=n.color;if(r){const i=r.match(/var\((.*?)\)/);i&&(r=window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));const o=new S_(r),a=n.dark?o.tint(20).toString():ls(o,20);if(n.plain)s=e.cssVarBlock({"bg-color":n.dark?ls(o,90):o.tint(90).toString(),"text-color":r,"border-color":n.dark?ls(o,50):o.tint(50).toString(),"hover-text-color":`var(${e.cssVarName("color-white")})`,"hover-bg-color":r,"hover-border-color":r,"active-bg-color":a,"active-text-color":`var(${e.cssVarName("color-white")})`,"active-border-color":a}),t.value&&(s[e.cssVarBlockName("disabled-bg-color")]=n.dark?ls(o,90):o.tint(90).toString(),s[e.cssVarBlockName("disabled-text-color")]=n.dark?ls(o,50):o.tint(50).toString(),s[e.cssVarBlockName("disabled-border-color")]=n.dark?ls(o,80):o.tint(80).toString());else{const l=n.dark?ls(o,30):o.tint(30).toString(),u=o.isDark()?`var(${e.cssVarName("color-white")})`:`var(${e.cssVarName("color-black")})`;if(s=e.cssVarBlock({"bg-color":r,"text-color":u,"border-color":r,"hover-bg-color":l,"hover-text-color":u,"hover-border-color":l,"active-bg-color":a,"active-border-color":a}),t.value){const h=n.dark?ls(o,50):o.tint(50).toString();s[e.cssVarBlockName("disabled-bg-color")]=h,s[e.cssVarBlockName("disabled-text-color")]=n.dark?"rgba(255, 255, 255, 0.5)":`var(${e.cssVarName("color-white")})`,s[e.cssVarBlockName("disabled-border-color")]=h}}}return s})}const O_=c.defineComponent({name:"ElButton"}),M_=c.defineComponent({...O_,props:Qc,emits:u_,setup(n,{expose:t,emit:e}){const s=n,r=E_(s),i=me("button"),{_ref:o,_size:a,_type:l,_disabled:u,_props:h,shouldAddSpace:f,handleClick:d}=c_(s,e),g=c.computed(()=>[i.b(),i.m(l.value),i.m(a.value),i.is("disabled",u.value),i.is("loading",s.loading),i.is("plain",s.plain),i.is("round",s.round),i.is("circle",s.circle),i.is("text",s.text),i.is("link",s.link),i.is("has-bg",s.bg)]);return t({ref:o,size:a,type:l,disabled:u,shouldAddSpace:f}),(p,m)=>(c.openBlock(),c.createBlock(c.resolveDynamicComponent(p.tag),c.mergeProps({ref_key:"_ref",ref:o},c.unref(h),{class:c.unref(g),style:c.unref(r),onClick:c.unref(d)}),{default:c.withCtx(()=>[p.loading?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[p.$slots.loading?c.renderSlot(p.$slots,"loading",{key:0}):(c.openBlock(),c.createBlock(c.unref(Cn),{key:1,class:c.normalizeClass(c.unref(i).is("loading"))},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(p.loadingIcon)))]),_:1},8,["class"]))],64)):p.icon||p.$slots.icon?(c.openBlock(),c.createBlock(c.unref(Cn),{key:1},{default:c.withCtx(()=>[p.icon?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(p.icon),{key:0})):c.renderSlot(p.$slots,"icon",{key:1})]),_:3})):c.createCommentVNode("v-if",!0),p.$slots.default?(c.openBlock(),c.createElementBlock("span",{key:2,class:c.normalizeClass({[c.unref(i).em("text","expand")]:c.unref(f)})},[c.renderSlot(p.$slots,"default")],2)):c.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var P_=he(M_,[["__file","button.vue"]]);const A_={size:Qc.size,type:Qc.type},T_=c.defineComponent({name:"ElButtonGroup"}),N_=c.defineComponent({...T_,props:A_,setup(n){const t=n;c.provide(Ip,c.reactive({size:c.toRef(t,"size"),type:c.toRef(t,"type")}));const e=me("button");return(s,r)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref(e).b("group"))},[c.renderSlot(s.$slots,"default")],2))}});var zp=he(N_,[["__file","button-group.vue"]]);const __=js(P_,{ButtonGroup:zp});rA(zp);function k_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}const ru="_trap-focus-children",Hs=[],Fp=n=>{var t;if(Hs.length===0)return;const e=Hs[Hs.length-1][ru];if(e.length>0&&n.code===Cr.tab){if(e.length===1){n.preventDefault(),document.activeElement!==e[0]&&e[0].focus();return}const s=n.shiftKey,r=n.target===e[0],i=n.target===e[e.length-1];if(r&&s&&(n.preventDefault(),e[e.length-1].focus()),i&&!s&&(n.preventDefault(),e[0].focus()),process.env.NODE_ENV==="test"){const o=e.indexOf(n.target);o!==-1&&((t=e[s?o-1:o+1])==null||t.focus())}}},D_={beforeMount(n){n[ru]=cd(n),Hs.push(n),Hs.length<=1&&document.addEventListener("keydown",Fp)},updated(n){c.nextTick(()=>{n[ru]=cd(n)})},unmounted(){Hs.shift(),Hs.length===0&&document.removeEventListener("keydown",Fp)}},R_=Kt({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:ct([String,Array,Object])},zIndex:{type:ct([String,Number])}}),I_={click:n=>n instanceof MouseEvent},L_="overlay";var B_=c.defineComponent({name:"ElOverlay",props:R_,emits:I_,setup(n,{slots:t,emit:e}){const s=me(L_),r=l=>{e("click",l)},{onClick:i,onMousedown:o,onMouseup:a}=Kg(n.customMaskEvent?void 0:r);return()=>n.mask?c.createVNode("div",{class:[s.b(),n.overlayClass],style:{zIndex:n.zIndex},onClick:i,onMousedown:o,onMouseup:a},[c.renderSlot(t,"default")],ma.STYLE|ma.CLASS|ma.PROPS,["onClick","onMouseup","onMousedown"]):c.h("div",{class:n.overlayClass,style:{zIndex:n.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[c.renderSlot(t,"default")])}});const V_=B_,Hp=["success","info","warning","error"],de=Pg({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:Gt?document.body:void 0}),j_=Kt({customClass:{type:String,default:de.customClass},center:{type:Boolean,default:de.center},dangerouslyUseHTMLString:{type:Boolean,default:de.dangerouslyUseHTMLString},duration:{type:Number,default:de.duration},icon:{type:Di,default:de.icon},id:{type:String,default:de.id},message:{type:ct([String,Object,Function]),default:de.message},onClose:{type:ct(Function),default:de.onClose},showClose:{type:Boolean,default:de.showClose},type:{type:String,values:Hp,default:de.type},plain:{type:Boolean,default:de.plain},offset:{type:Number,default:de.offset},zIndex:{type:Number,default:de.zIndex},grouping:{type:Boolean,default:de.grouping},repeatNum:{type:Number,default:de.repeatNum}}),$_={destroy:()=>!0},rn=c.shallowReactive([]),z_=n=>{const t=rn.findIndex(r=>r.id===n),e=rn[t];let s;return t>0&&(s=rn[t-1]),{current:e,prev:s}},F_=n=>{const{prev:t}=z_(n);return t?t.vm.exposed.bottom.value:0},H_=(n,t)=>rn.findIndex(s=>s.id===n)>0?16:t,U_=c.defineComponent({name:"ElMessage"}),G_=c.defineComponent({...U_,props:j_,emits:$_,setup(n,{expose:t}){const e=n,{Close:s}=Og,{ns:r,zIndex:i}=hp("message"),{currentZIndex:o,nextZIndex:a}=i,l=c.ref(),u=c.ref(!1),h=c.ref(0);let f;const d=c.computed(()=>e.type?e.type==="error"?"danger":e.type:"info"),g=c.computed(()=>{const C=e.type;return{[r.bm("icon",C)]:C&&pa[C]}}),p=c.computed(()=>e.icon||pa[e.type]||""),m=c.computed(()=>F_(e.id)),y=c.computed(()=>H_(e.id,e.offset)+m.value),b=c.computed(()=>h.value+y.value),w=c.computed(()=>({top:`${y.value}px`,zIndex:o.value}));function x(){e.duration!==0&&({stop:f}=iv(()=>{S()},e.duration))}function v(){f==null||f()}function S(){u.value=!1}function E({code:C}){C===Cr.esc&&S()}return c.onMounted(()=>{x(),a(),u.value=!0}),c.watch(()=>e.repeatNum,()=>{v(),x()}),jn(document,"keydown",E),md(l,()=>{h.value=l.value.getBoundingClientRect().height}),t({visible:u,bottom:b,close:S}),(C,M)=>(c.openBlock(),c.createBlock(c.Transition,{name:c.unref(r).b("fade"),onBeforeLeave:C.onClose,onAfterLeave:T=>C.$emit("destroy"),persisted:""},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{id:C.id,ref_key:"messageRef",ref:l,class:c.normalizeClass([c.unref(r).b(),{[c.unref(r).m(C.type)]:C.type},c.unref(r).is("center",C.center),c.unref(r).is("closable",C.showClose),c.unref(r).is("plain",C.plain),C.customClass]),style:c.normalizeStyle(c.unref(w)),role:"alert",onMouseenter:v,onMouseleave:x},[C.repeatNum>1?(c.openBlock(),c.createBlock(c.unref(l_),{key:0,value:C.repeatNum,type:c.unref(d),class:c.normalizeClass(c.unref(r).e("badge"))},null,8,["value","type","class"])):c.createCommentVNode("v-if",!0),c.unref(p)?(c.openBlock(),c.createBlock(c.unref(Cn),{key:1,class:c.normalizeClass([c.unref(r).e("icon"),c.unref(g)])},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(c.unref(p))))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0),c.renderSlot(C.$slots,"default",{},()=>[C.dangerouslyUseHTMLString?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),c.createElementVNode("p",{class:c.normalizeClass(c.unref(r).e("content")),innerHTML:C.message},null,10,["innerHTML"])],2112)):(c.openBlock(),c.createElementBlock("p",{key:0,class:c.normalizeClass(c.unref(r).e("content"))},c.toDisplayString(C.message),3))]),C.showClose?(c.openBlock(),c.createBlock(c.unref(Cn),{key:2,class:c.normalizeClass(c.unref(r).e("closeBtn")),onClick:c.withModifiers(S,["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(s))]),_:1},8,["class","onClick"])):c.createCommentVNode("v-if",!0)],46,["id"]),[[c.vShow,u.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var Y_=he(G_,[["__file","message.vue"]]);let W_=1;const Up=n=>{const t=!n||Xe(n)||c.isVNode(n)||Re(n)?{message:n}:n,e={...de,...t};if(!e.appendTo)e.appendTo=document.body;else if(Xe(e.appendTo)){let s=document.querySelector(e.appendTo);Fn(s)||(Pe("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),s=document.body),e.appendTo=s}return ha(en.grouping)&&!e.grouping&&(e.grouping=en.grouping),Be(en.duration)&&e.duration===3e3&&(e.duration=en.duration),Be(en.offset)&&e.offset===16&&(e.offset=en.offset),ha(en.showClose)&&!e.showClose&&(e.showClose=en.showClose),e},q_=n=>{const t=rn.indexOf(n);if(t===-1)return;rn.splice(t,1);const{handler:e}=n;e.close()},J_=({appendTo:n,...t},e)=>{const s=`message_${W_++}`,r=t.onClose,i=document.createElement("div"),o={...t,id:s,onClose:()=>{r==null||r(),q_(h)},onDestroy:()=>{c.render(null,i)}},a=c.createVNode(Y_,o,Re(o.message)||c.isVNode(o.message)?{default:Re(o.message)?o.message:()=>o.message}:null);a.appContext=e||Nr._context,c.render(a,i),n.appendChild(i.firstElementChild);const l=a.component,h={id:s,vnode:a,vm:l,handler:{close:()=>{l.exposed.visible.value=!1}},props:a.component.props};return h},Nr=(n={},t)=>{if(!Gt)return{close:()=>{}};const e=Up(n);if(e.grouping&&rn.length){const r=rn.find(({vnode:i})=>{var o;return((o=i.props)==null?void 0:o.message)===e.message});if(r)return r.props.repeatNum+=1,r.props.type=e.type,r.handler}if(Be(en.max)&&rn.length>=en.max)return{close:()=>{}};const s=J_(e,t);return rn.push(s),s.handler};Hp.forEach(n=>{Nr[n]=(t={},e)=>{const s=Up(t);return Nr({...s,type:n},e)}});function X_(n){for(const t of rn)(!n||n===t.props.type)&&t.handler.close()}Nr.closeAll=X_,Nr._context=null;const Bt=sA(Nr,"$message"),K_=c.defineComponent({name:"ElMessageBox",directives:{TrapFocus:D_},components:{ElButton:__,ElFocusTrap:Np,ElInput:nN,ElOverlay:V_,ElIcon:Cn,...Og},inheritAttrs:!1,props:{buttonSize:{type:String,validator:iA},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(n,{emit:t}){const{locale:e,zIndex:s,ns:r,size:i}=hp("message-box",c.computed(()=>n.buttonSize)),{t:o}=e,{nextZIndex:a}=s,l=c.ref(!1),u=c.reactive({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:c.markRaw(fa),cancelButtonLoadingIcon:c.markRaw(fa),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),h=c.computed(()=>{const P=u.type;return{[r.bm("icon",P)]:P&&pa[P]}}),f=Ca(),d=Ca(),g=c.computed(()=>u.icon||pa[u.type]||""),p=c.computed(()=>!!u.message),m=c.ref(),y=c.ref(),b=c.ref(),w=c.ref(),x=c.ref(),v=c.computed(()=>u.confirmButtonClass);c.watch(()=>u.inputValue,async P=>{await c.nextTick(),n.boxType==="prompt"&&P!==null&&D()},{immediate:!0}),c.watch(()=>l.value,P=>{var L,j;P&&(n.boxType!=="prompt"&&(u.autofocus?b.value=(j=(L=x.value)==null?void 0:L.$el)!=null?j:m.value:b.value=m.value),u.zIndex=a()),n.boxType==="prompt"&&(P?c.nextTick().then(()=>{var Y;w.value&&w.value.$el&&(u.autofocus?b.value=(Y=N())!=null?Y:m.value:b.value=m.value)}):(u.editorErrorMessage="",u.validateError=!1))});const S=c.computed(()=>n.draggable),E=c.computed(()=>n.overflow);hA(m,y,S,E),c.onMounted(async()=>{await c.nextTick(),n.closeOnHashChange&&window.addEventListener("hashchange",C)}),c.onBeforeUnmount(()=>{n.closeOnHashChange&&window.removeEventListener("hashchange",C)});function C(){l.value&&(l.value=!1,c.nextTick(()=>{u.action&&t("action",u.action)}))}const M=()=>{n.closeOnClickModal&&_(u.distinguishCancelAndClose?"close":"cancel")},T=Kg(M),k=P=>{if(u.inputType!=="textarea")return P.preventDefault(),_("confirm")},_=P=>{var L;n.boxType==="prompt"&&P==="confirm"&&!D()||(u.action=P,u.beforeClose?(L=u.beforeClose)==null||L.call(u,P,u,C):C())},D=()=>{if(n.boxType==="prompt"){const P=u.inputPattern;if(P&&!P.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||o("el.messagebox.error"),u.validateError=!0,!1;const L=u.inputValidator;if(typeof L=="function"){const j=L(u.inputValue);if(j===!1)return u.editorErrorMessage=u.inputErrorMessage||o("el.messagebox.error"),u.validateError=!0,!1;if(typeof j=="string")return u.editorErrorMessage=j,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},N=()=>{const P=w.value.$refs;return P.input||P.textarea},V=()=>{_("close")},A=()=>{n.closeOnPressEscape&&V()};return n.lockScroll&&bA(l),{...c.toRefs(u),ns:r,overlayEvent:T,visible:l,hasMessage:p,typeClass:h,contentId:f,inputId:d,btnSize:i,iconComponent:g,confirmButtonClasses:v,rootRef:m,focusStartRef:b,headerRef:y,inputRef:w,confirmRef:x,doClose:C,handleClose:V,onCloseRequested:A,handleWrapperClick:M,handleInputEnter:k,handleAction:_,t:o}}});function Z_(n,t,e,s,r,i){const o=c.resolveComponent("el-icon"),a=c.resolveComponent("close"),l=c.resolveComponent("el-input"),u=c.resolveComponent("el-button"),h=c.resolveComponent("el-focus-trap"),f=c.resolveComponent("el-overlay");return c.openBlock(),c.createBlock(c.Transition,{name:"fade-in-linear",onAfterLeave:d=>n.$emit("vanish"),persisted:""},{default:c.withCtx(()=>[c.withDirectives(c.createVNode(f,{"z-index":n.zIndex,"overlay-class":[n.ns.is("message-box"),n.modalClass],mask:n.modal},{default:c.withCtx(()=>[c.createElementVNode("div",{role:"dialog","aria-label":n.title,"aria-modal":"true","aria-describedby":n.showInput?void 0:n.contentId,class:c.normalizeClass(`${n.ns.namespace.value}-overlay-message-box`),onClick:n.overlayEvent.onClick,onMousedown:n.overlayEvent.onMousedown,onMouseup:n.overlayEvent.onMouseup},[c.createVNode(h,{loop:"",trapped:n.visible,"focus-trap-el":n.rootRef,"focus-start-el":n.focusStartRef,onReleaseRequested:n.onCloseRequested},{default:c.withCtx(()=>[c.createElementVNode("div",{ref:"rootRef",class:c.normalizeClass([n.ns.b(),n.customClass,n.ns.is("draggable",n.draggable),{[n.ns.m("center")]:n.center}]),style:c.normalizeStyle(n.customStyle),tabindex:"-1",onClick:c.withModifiers(()=>{},["stop"])},[n.title!==null&&n.title!==void 0?(c.openBlock(),c.createElementBlock("div",{key:0,ref:"headerRef",class:c.normalizeClass([n.ns.e("header"),{"show-close":n.showClose}])},[c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("title"))},[n.iconComponent&&n.center?(c.openBlock(),c.createBlock(o,{key:0,class:c.normalizeClass([n.ns.e("status"),n.typeClass])},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.iconComponent)))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0),c.createElementVNode("span",null,c.toDisplayString(n.title),1)],2),n.showClose?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(n.ns.e("headerbtn")),"aria-label":n.t("el.messagebox.close"),onClick:d=>n.handleAction(n.distinguishCancelAndClose?"close":"cancel"),onKeydown:c.withKeys(c.withModifiers(d=>n.handleAction(n.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[c.createVNode(o,{class:c.normalizeClass(n.ns.e("close"))},{default:c.withCtx(()=>[c.createVNode(a)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):c.createCommentVNode("v-if",!0)],2)):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{id:n.contentId,class:c.normalizeClass(n.ns.e("content"))},[c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("container"))},[n.iconComponent&&!n.center&&n.hasMessage?(c.openBlock(),c.createBlock(o,{key:0,class:c.normalizeClass([n.ns.e("status"),n.typeClass])},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.iconComponent)))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0),n.hasMessage?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(n.ns.e("message"))},[c.renderSlot(n.$slots,"default",{},()=>[n.dangerouslyUseHTMLString?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.showInput?"label":"p"),{key:1,for:n.showInput?n.inputId:void 0,innerHTML:n.message},null,8,["for","innerHTML"])):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.showInput?"label":"p"),{key:0,for:n.showInput?n.inputId:void 0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.dangerouslyUseHTMLString?"":n.message),1)]),_:1},8,["for"]))])],2)):c.createCommentVNode("v-if",!0)],2),c.withDirectives(c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("input"))},[c.createVNode(l,{id:n.inputId,ref:"inputRef",modelValue:n.inputValue,"onUpdate:modelValue":d=>n.inputValue=d,type:n.inputType,placeholder:n.inputPlaceholder,"aria-invalid":n.validateError,class:c.normalizeClass({invalid:n.validateError}),onKeydown:c.withKeys(n.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("errormsg")),style:c.normalizeStyle({visibility:n.editorErrorMessage?"visible":"hidden"})},c.toDisplayString(n.editorErrorMessage),7)],2),[[c.vShow,n.showInput]])],10,["id"]),c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("btns"))},[n.showCancelButton?(c.openBlock(),c.createBlock(u,{key:0,loading:n.cancelButtonLoading,"loading-icon":n.cancelButtonLoadingIcon,class:c.normalizeClass([n.cancelButtonClass]),round:n.roundButton,size:n.btnSize,onClick:d=>n.handleAction("cancel"),onKeydown:c.withKeys(c.withModifiers(d=>n.handleAction("cancel"),["prevent"]),["enter"])},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.cancelButtonText||n.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):c.createCommentVNode("v-if",!0),c.withDirectives(c.createVNode(u,{ref:"confirmRef",type:"primary",loading:n.confirmButtonLoading,"loading-icon":n.confirmButtonLoadingIcon,class:c.normalizeClass([n.confirmButtonClasses]),round:n.roundButton,disabled:n.confirmButtonDisabled,size:n.btnSize,onClick:d=>n.handleAction("confirm"),onKeydown:c.withKeys(c.withModifiers(d=>n.handleAction("confirm"),["prevent"]),["enter"])},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.confirmButtonText||n.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[c.vShow,n.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"]),[[c.vShow,n.visible]])]),_:3},8,["onAfterLeave"])}var Q_=he(K_,[["render",Z_],["__file","index.vue"]]);const zi=new Map,tk=n=>{let t=document.body;return n.appendTo&&(Xe(n.appendTo)&&(t=document.querySelector(n.appendTo)),Fn(n.appendTo)&&(t=n.appendTo),Fn(t)||(Pe("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body)),t},ek=(n,t,e=null)=>{const s=c.createVNode(Q_,n,Re(n.message)||c.isVNode(n.message)?{default:Re(n.message)?n.message:()=>n.message}:null);return s.appContext=e,c.render(s,t),tk(n).appendChild(t.firstElementChild),s.component},nk=()=>document.createElement("div"),sk=(n,t)=>{const e=nk();n.onVanish=()=>{c.render(null,e),zi.delete(r)},n.onAction=i=>{const o=zi.get(r);let a;n.showInput?a={value:r.inputValue,action:i}:a=i,n.callback?n.callback(a,s.proxy):i==="cancel"||i==="close"?n.distinguishCancelAndClose&&i!=="cancel"?o.reject("close"):o.reject("cancel"):o.resolve(a)};const s=ek(n,e,t),r=s.proxy;for(const i in n)zo(n,i)&&!zo(r.$props,i)&&(r[i]=n[i]);return r.visible=!0,r};function _r(n,t=null){if(!Gt)return Promise.reject();let e;return Xe(n)||c.isVNode(n)?n={message:n}:e=n.callback,new Promise((s,r)=>{const i=sk(n,t??_r._context);zi.set(i,{options:n,callback:e,resolve:s,reject:r})})}const rk=["alert","confirm","prompt"],ik={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};rk.forEach(n=>{_r[n]=ok(n)});function ok(n){return(t,e,s,r)=>{let i="";return hr(e)?(s=e,i=""):dg(e)?i="":i=e,_r(Object.assign({title:i,message:t,type:"",...ik[n]},s,{boxType:n}),r)}}_r.close=()=>{zi.forEach((n,t)=>{t.doClose()}),zi.clear()},_r._context=null;const cs=_r;cs.install=n=>{cs._context=n._context,n.config.globalProperties.$msgbox=cs,n.config.globalProperties.$messageBox=cs,n.config.globalProperties.$alert=cs.alert,n.config.globalProperties.$confirm=cs.confirm,n.config.globalProperties.$prompt=cs.prompt};const ak=cs;function Gp(n,t){return function(){return n.apply(t,arguments)}}const{toString:lk}=Object.prototype,{getPrototypeOf:iu}=Object,_a=(n=>t=>{const e=lk.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),on=n=>(n=n.toLowerCase(),t=>_a(t)===n),ka=n=>t=>typeof t===n,{isArray:kr}=Array,Fi=ka("undefined");function ck(n){return n!==null&&!Fi(n)&&n.constructor!==null&&!Fi(n.constructor)&&Te(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Yp=on("ArrayBuffer");function uk(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Yp(n.buffer),t}const hk=ka("string"),Te=ka("function"),Wp=ka("number"),Da=n=>n!==null&&typeof n=="object",dk=n=>n===!0||n===!1,Ra=n=>{if(_a(n)!=="object")return!1;const t=iu(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},fk=on("Date"),gk=on("File"),pk=on("Blob"),mk=on("FileList"),yk=n=>Da(n)&&Te(n.pipe),bk=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Te(n.append)&&((t=_a(n))==="formdata"||t==="object"&&Te(n.toString)&&n.toString()==="[object FormData]"))},wk=on("URLSearchParams"),[xk,vk,Ck,Sk]=["ReadableStream","Request","Response","Headers"].map(on),Ek=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hi(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let s,r;if(typeof n!="object"&&(n=[n]),kr(n))for(s=0,r=n.length;s<r;s++)t.call(null,n[s],s,n);else{const i=e?Object.getOwnPropertyNames(n):Object.keys(n),o=i.length;let a;for(s=0;s<o;s++)a=i[s],t.call(null,n[a],a,n)}}function qp(n,t){t=t.toLowerCase();const e=Object.keys(n);let s=e.length,r;for(;s-- >0;)if(r=e[s],t===r.toLowerCase())return r;return null}const Us=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jp=n=>!Fi(n)&&n!==Us;function ou(){const{caseless:n}=Jp(this)&&this||{},t={},e=(s,r)=>{const i=n&&qp(t,r)||r;Ra(t[i])&&Ra(s)?t[i]=ou(t[i],s):Ra(s)?t[i]=ou({},s):kr(s)?t[i]=s.slice():t[i]=s};for(let s=0,r=arguments.length;s<r;s++)arguments[s]&&Hi(arguments[s],e);return t}const Ok=(n,t,e,{allOwnKeys:s}={})=>(Hi(t,(r,i)=>{e&&Te(r)?n[i]=Gp(r,e):n[i]=r},{allOwnKeys:s}),n),Mk=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Pk=(n,t,e,s)=>{n.prototype=Object.create(t.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},Ak=(n,t,e,s)=>{let r,i,o;const a={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),i=r.length;i-- >0;)o=r[i],(!s||s(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&iu(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},Tk=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const s=n.indexOf(t,e);return s!==-1&&s===e},Nk=n=>{if(!n)return null;if(kr(n))return n;let t=n.length;if(!Wp(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},_k=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&iu(Uint8Array)),kk=(n,t)=>{const s=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=s.next())&&!r.done;){const i=r.value;t.call(n,i[0],i[1])}},Dk=(n,t)=>{let e;const s=[];for(;(e=n.exec(t))!==null;)s.push(e);return s},Rk=on("HTMLFormElement"),Ik=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,r){return s.toUpperCase()+r}),Xp=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),Lk=on("RegExp"),Kp=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),s={};Hi(e,(r,i)=>{let o;(o=t(r,i,n))!==!1&&(s[i]=o||r)}),Object.defineProperties(n,s)},Bk=n=>{Kp(n,(t,e)=>{if(Te(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const s=n[e];if(Te(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Vk=(n,t)=>{const e={},s=r=>{r.forEach(i=>{e[i]=!0})};return kr(n)?s(n):s(String(n).split(t)),e},jk=()=>{},$k=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t,au="abcdefghijklmnopqrstuvwxyz",Zp="0123456789",Qp={DIGIT:Zp,ALPHA:au,ALPHA_DIGIT:au+au.toUpperCase()+Zp},zk=(n=16,t=Qp.ALPHA_DIGIT)=>{let e="";const{length:s}=t;for(;n--;)e+=t[Math.random()*s|0];return e};function Fk(n){return!!(n&&Te(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const Hk=n=>{const t=new Array(10),e=(s,r)=>{if(Da(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[r]=s;const i=kr(s)?[]:{};return Hi(s,(o,a)=>{const l=e(o,r+1);!Fi(l)&&(i[a]=l)}),t[r]=void 0,i}}return s};return e(n,0)},Uk=on("AsyncFunction"),Gk=n=>n&&(Da(n)||Te(n))&&Te(n.then)&&Te(n.catch),tm=((n,t)=>n?setImmediate:t?((e,s)=>(Us.addEventListener("message",({source:r,data:i})=>{r===Us&&i===e&&s.length&&s.shift()()},!1),r=>{s.push(r),Us.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Te(Us.postMessage)),Yk=typeof queueMicrotask<"u"?queueMicrotask.bind(Us):typeof process<"u"&&process.nextTick||tm,R={isArray:kr,isArrayBuffer:Yp,isBuffer:ck,isFormData:bk,isArrayBufferView:uk,isString:hk,isNumber:Wp,isBoolean:dk,isObject:Da,isPlainObject:Ra,isReadableStream:xk,isRequest:vk,isResponse:Ck,isHeaders:Sk,isUndefined:Fi,isDate:fk,isFile:gk,isBlob:pk,isRegExp:Lk,isFunction:Te,isStream:yk,isURLSearchParams:wk,isTypedArray:_k,isFileList:mk,forEach:Hi,merge:ou,extend:Ok,trim:Ek,stripBOM:Mk,inherits:Pk,toFlatObject:Ak,kindOf:_a,kindOfTest:on,endsWith:Tk,toArray:Nk,forEachEntry:kk,matchAll:Dk,isHTMLForm:Rk,hasOwnProperty:Xp,hasOwnProp:Xp,reduceDescriptors:Kp,freezeMethods:Bk,toObjectSet:Vk,toCamelCase:Ik,noop:jk,toFiniteNumber:$k,findKey:qp,global:Us,isContextDefined:Jp,ALPHABET:Qp,generateString:zk,isSpecCompliantForm:Fk,toJSONObject:Hk,isAsyncFn:Uk,isThenable:Gk,setImmediate:tm,asap:Yk};function at(n,t,e,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),s&&(this.request=s),r&&(this.response=r,this.status=r.status?r.status:null)}R.inherits(at,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:R.toJSONObject(this.config),code:this.code,status:this.status}}});const em=at.prototype,nm={};["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(n=>{nm[n]={value:n}}),Object.defineProperties(at,nm),Object.defineProperty(em,"isAxiosError",{value:!0}),at.from=(n,t,e,s,r,i)=>{const o=Object.create(em);return R.toFlatObject(n,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),at.call(o,n.message,t,e,s,r),o.cause=n,o.name=n.name,i&&Object.assign(o,i),o};const Wk=null;function lu(n){return R.isPlainObject(n)||R.isArray(n)}function sm(n){return R.endsWith(n,"[]")?n.slice(0,-2):n}function rm(n,t,e){return n?n.concat(t).map(function(r,i){return r=sm(r),!e&&i?"["+r+"]":r}).join(e?".":""):t}function qk(n){return R.isArray(n)&&!n.some(lu)}const Jk=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function Ia(n,t,e){if(!R.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=R.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!R.isUndefined(y[m])});const s=e.metaTokens,r=e.visitor||h,i=e.dots,o=e.indexes,l=(e.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(r))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(R.isDate(p))return p.toISOString();if(!l&&R.isBlob(p))throw new at("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(p)||R.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function h(p,m,y){let b=p;if(p&&!y&&typeof p=="object"){if(R.endsWith(m,"{}"))m=s?m:m.slice(0,-2),p=JSON.stringify(p);else if(R.isArray(p)&&qk(p)||(R.isFileList(p)||R.endsWith(m,"[]"))&&(b=R.toArray(p)))return m=sm(m),b.forEach(function(x,v){!(R.isUndefined(x)||x===null)&&t.append(o===!0?rm([m],v,i):o===null?m:m+"[]",u(x))}),!1}return lu(p)?!0:(t.append(rm(y,m,i),u(p)),!1)}const f=[],d=Object.assign(Jk,{defaultVisitor:h,convertValue:u,isVisitable:lu});function g(p,m){if(!R.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(p),R.forEach(p,function(b,w){(!(R.isUndefined(b)||b===null)&&r.call(t,b,R.isString(w)?w.trim():w,m,d))===!0&&g(b,m?m.concat(w):[w])}),f.pop()}}if(!R.isObject(n))throw new TypeError("data must be an object");return g(n),t}function im(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function cu(n,t){this._pairs=[],n&&Ia(n,this,t)}const om=cu.prototype;om.append=function(t,e){this._pairs.push([t,e])},om.toString=function(t){const e=t?function(s){return t.call(this,s,im)}:im;return this._pairs.map(function(r){return e(r[0])+"="+e(r[1])},"").join("&")};function Xk(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function am(n,t,e){if(!t)return n;const s=e&&e.encode||Xk,r=e&&e.serialize;let i;if(r?i=r(t,e):i=R.isURLSearchParams(t)?t.toString():new cu(t,e).toString(s),i){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n}class lm{constructor(){this.handlers=[]}use(t,e,s){return this.handlers.push({fulfilled:t,rejected:e,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(s){s!==null&&t(s)})}}const cm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Kk={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:cu,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},uu=typeof window<"u"&&typeof document<"u",hu=typeof navigator=="object"&&navigator||void 0,Zk=uu&&(!hu||["ReactNative","NativeScript","NS"].indexOf(hu.product)<0),Qk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tD=uu&&window.location.href||"http://localhost",Ce={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uu,hasStandardBrowserEnv:Zk,hasStandardBrowserWebWorkerEnv:Qk,navigator:hu,origin:tD},Symbol.toStringTag,{value:"Module"})),...Kk};function eD(n,t){return Ia(n,new Ce.classes.URLSearchParams,Object.assign({visitor:function(e,s,r,i){return Ce.isNode&&R.isBuffer(e)?(this.append(s,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function nD(n){return R.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function sD(n){const t={},e=Object.keys(n);let s;const r=e.length;let i;for(s=0;s<r;s++)i=e[s],t[i]=n[i];return t}function um(n){function t(e,s,r,i){let o=e[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=e.length;return o=!o&&R.isArray(r)?r.length:o,l?(R.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!a):((!r[o]||!R.isObject(r[o]))&&(r[o]=[]),t(e,s,r[o],i)&&R.isArray(r[o])&&(r[o]=sD(r[o])),!a)}if(R.isFormData(n)&&R.isFunction(n.entries)){const e={};return R.forEachEntry(n,(s,r)=>{t(nD(s),r,e,0)}),e}return null}function rD(n,t,e){if(R.isString(n))try{return(t||JSON.parse)(n),R.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(0,JSON.stringify)(n)}const Ui={transitional:cm,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",r=s.indexOf("application/json")>-1,i=R.isObject(t);if(i&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return r?JSON.stringify(um(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return eD(t,this.formSerializer).toString();if((a=R.isFileList(t))||s.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ia(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),rD(t)):t}],transformResponse:[function(t){const e=this.transitional||Ui.transitional,s=e&&e.forcedJSONParsing,r=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(s&&!this.responseType||r)){const o=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?at.from(a,at.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ce.classes.FormData,Blob:Ce.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],n=>{Ui.headers[n]={}});const iD=R.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"]),oD=n=>{const t={};let e,s,r;return n&&n.split(`
29
+ `,JT=["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 XT(n){const t=window.getComputedStyle(n),e=t.getPropertyValue("box-sizing"),s=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),r=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:JT.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:s,borderSize:r,boxSizing:e}}function pp(n,t=1,e){var s;nn||(nn=document.createElement("textarea"),document.body.appendChild(nn));const{paddingSize:r,borderSize:i,boxSizing:o,contextStyle:a}=XT(n);nn.setAttribute("style",`${a};${qT}`),nn.value=n.value||n.placeholder||"";let l=nn.scrollHeight;const u={};o==="border-box"?l=l+i:o==="content-box"&&(l=l-r),nn.value="";const h=nn.scrollHeight-r;if(Be(t)){let f=h*t;o==="border-box"&&(f=f+r+i),l=Math.max(f,l),u.minHeight=`${f}px`}if(Be(e)){let f=h*e;o==="border-box"&&(f=f+r+i),l=Math.min(f,l)}return u.height=`${l}px`,(s=nn.parentNode)==null||s.removeChild(nn),nn=void 0,u}const KT=Kt({id:{type:String,default:void 0},size:zc,disabled:Boolean,modelValue:{type:ct([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:ct([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:Di},prefixIcon:{type:Di},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:ct([Object,Array,String]),default:()=>Pg({})},autofocus:Boolean,rows:{type:Number,default:2},...Fc(["ariaLabel"])}),ZT={[Ac]:n=>Xe(n),input:n=>Xe(n),change:n=>Xe(n),focus:n=>n instanceof FocusEvent,blur:n=>n instanceof FocusEvent,clear:()=>!0,mouseleave:n=>n instanceof MouseEvent,mouseenter:n=>n instanceof MouseEvent,keydown:n=>n instanceof Event,compositionstart:n=>n instanceof CompositionEvent,compositionupdate:n=>n instanceof CompositionEvent,compositionend:n=>n instanceof CompositionEvent},QT=c.defineComponent({name:"ElInput",inheritAttrs:!1}),tN=c.defineComponent({...QT,props:KT,emits:ZT,setup(n,{expose:t,emit:e}){const s=n,r=c.useAttrs(),i=c.useSlots(),o=c.computed(()=>{const U={};return s.containerRole==="combobox"&&(U["aria-haspopup"]=r["aria-haspopup"],U["aria-owns"]=r["aria-owns"],U["aria-expanded"]=r["aria-expanded"]),U}),a=c.computed(()=>[s.type==="textarea"?y.b():m.b(),m.m(g.value),m.is("disabled",p.value),m.is("exceed",B.value),{[m.b("group")]:i.prepend||i.append,[m.m("prefix")]:i.prefix||s.prefixIcon,[m.m("suffix")]:i.suffix||s.suffixIcon||s.clearable||s.showPassword,[m.bm("suffix","password-clear")]:Y.value&&ot.value,[m.b("hidden")]:s.type==="hidden"},r.class]),l=c.computed(()=>[m.e("wrapper"),m.is("focus",T.value)]),u=cA({excludeKeys:c.computed(()=>Object.keys(o.value))}),{form:h,formItem:f}=gp(),{inputId:d}=WT(s,{formItemContext:f}),g=fp(),p=Gc(),m=me("input"),y=me("textarea"),b=c.shallowRef(),w=c.shallowRef(),x=c.ref(!1),v=c.ref(!1),S=c.ref(),E=c.shallowRef(s.inputStyle),C=c.computed(()=>b.value||w.value),{wrapperRef:M,isFocused:T,handleFocus:k,handleBlur:_}=LT(C,{beforeFocus(){return p.value},afterBlur(){var U;s.validateEvent&&((U=f==null?void 0:f.validate)==null||U.call(f,"blur").catch(Et=>Pe(Et)))}}),D=c.computed(()=>{var U;return(U=h==null?void 0:h.statusIcon)!=null?U:!1}),N=c.computed(()=>(f==null?void 0:f.validateState)||""),j=c.computed(()=>N.value&&nA[N.value]),A=c.computed(()=>v.value?Cg:W2),P=c.computed(()=>[r.style]),L=c.computed(()=>[s.inputStyle,E.value,{resize:s.resize}]),V=c.computed(()=>ua(s.modelValue)?"":String(s.modelValue)),Y=c.computed(()=>s.clearable&&!p.value&&!s.readonly&&!!V.value&&(T.value||x.value)),ot=c.computed(()=>s.showPassword&&!p.value&&!!V.value&&(!!V.value||T.value)),F=c.computed(()=>s.showWordLimit&&!!s.maxlength&&(s.type==="text"||s.type==="textarea")&&!p.value&&!s.readonly&&!s.showPassword),H=c.computed(()=>V.value.length),B=c.computed(()=>!!F.value&&H.value>Number(s.maxlength)),K=c.computed(()=>!!i.suffix||!!s.suffixIcon||Y.value||s.showPassword||F.value||!!N.value&&D.value),[nt,rt]=RT(b);md(w,U=>{if(ge(),!F.value||s.resize!=="both")return;const Et=U[0],{width:Zn}=Et.contentRect;S.value={right:`calc(100% - ${Zn+15+6}px)`}});const et=()=>{const{type:U,autosize:Et}=s;if(!(!Gt||U!=="textarea"||!w.value))if(Et){const Zn=hr(Et)?Et.minRows:void 0,bo=hr(Et)?Et.maxRows:void 0,Jb=pp(w.value,Zn,bo);E.value={overflowY:"hidden",...Jb},c.nextTick(()=>{w.value.offsetHeight,E.value=Jb})}else E.value={minHeight:pp(w.value).minHeight}},ge=(U=>{let Et=!1;return()=>{var Zn;if(Et||!s.autosize)return;((Zn=w.value)==null?void 0:Zn.offsetParent)===null||(U(),Et=!0)}})(et),St=()=>{const U=C.value,Et=s.formatter?s.formatter(V.value):V.value;!U||U.value===Et||(U.value=Et)},xt=async U=>{nt();let{value:Et}=U.target;if(s.formatter&&(Et=s.parser?s.parser(Et):Et),!pe.value){if(Et===V.value){St();return}e(Ac,Et),e("input",Et),await c.nextTick(),St(),rt()}},An=U=>{e("change",U.target.value)},{isComposing:pe,handleCompositionStart:dn,handleCompositionUpdate:Ts,handleCompositionEnd:Ns}=BT({emit:e,afterComposition:xt}),ai=()=>{v.value=!v.value,li()},li=async()=>{var U;await c.nextTick(),(U=C.value)==null||U.focus()},st=()=>{var U;return(U=C.value)==null?void 0:U.blur()},ie=U=>{x.value=!1,e("mouseleave",U)},ci=U=>{x.value=!0,e("mouseenter",U)},yo=U=>{e("keydown",U)},bl=()=>{var U;(U=C.value)==null||U.select()},ui=()=>{e(Ac,""),e("change",""),e("clear"),e("input","")};return c.watch(()=>s.modelValue,()=>{var U;c.nextTick(()=>et()),s.validateEvent&&((U=f==null?void 0:f.validate)==null||U.call(f,"change").catch(Et=>Pe(Et)))}),c.watch(V,()=>St()),c.watch(()=>s.type,async()=>{await c.nextTick(),St(),et()}),c.onMounted(()=>{!s.formatter&&s.parser&&Pe("ElInput","If you set the parser, you also need to set the formatter."),St(),c.nextTick(et)}),t({input:b,textarea:w,ref:C,textareaStyle:L,autosize:c.toRef(s,"autosize"),isComposing:pe,focus:li,blur:st,select:bl,clear:ui,resizeTextarea:et}),(U,Et)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps(c.unref(o),{class:[c.unref(a),{[c.unref(m).bm("group","append")]:U.$slots.append,[c.unref(m).bm("group","prepend")]:U.$slots.prepend}],style:c.unref(P),role:U.containerRole,onMouseenter:ci,onMouseleave:ie}),[c.createCommentVNode(" input "),U.type!=="textarea"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createCommentVNode(" prepend slot "),U.$slots.prepend?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(c.unref(m).be("group","prepend"))},[c.renderSlot(U.$slots,"prepend")],2)):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{ref_key:"wrapperRef",ref:M,class:c.normalizeClass(c.unref(l))},[c.createCommentVNode(" prefix slot "),U.$slots.prefix||U.prefixIcon?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(c.unref(m).e("prefix"))},[c.createElementVNode("span",{class:c.normalizeClass(c.unref(m).e("prefix-inner"))},[c.renderSlot(U.$slots,"prefix"),U.prefixIcon?(c.openBlock(),c.createBlock(c.unref(Cn),{key:0,class:c.normalizeClass(c.unref(m).e("icon"))},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(U.prefixIcon)))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0),c.createElementVNode("input",c.mergeProps({id:c.unref(d),ref_key:"input",ref:b,class:c.unref(m).e("inner")},c.unref(u),{minlength:U.minlength,maxlength:U.maxlength,type:U.showPassword?v.value?"text":"password":U.type,disabled:c.unref(p),readonly:U.readonly,autocomplete:U.autocomplete,tabindex:U.tabindex,"aria-label":U.ariaLabel,placeholder:U.placeholder,style:U.inputStyle,form:U.form,autofocus:U.autofocus,onCompositionstart:c.unref(dn),onCompositionupdate:c.unref(Ts),onCompositionend:c.unref(Ns),onInput:xt,onChange:An,onKeydown:yo}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","onCompositionstart","onCompositionupdate","onCompositionend"]),c.createCommentVNode(" suffix slot "),c.unref(K)?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(c.unref(m).e("suffix"))},[c.createElementVNode("span",{class:c.normalizeClass(c.unref(m).e("suffix-inner"))},[!c.unref(Y)||!c.unref(ot)||!c.unref(F)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.renderSlot(U.$slots,"suffix"),U.suffixIcon?(c.openBlock(),c.createBlock(c.unref(Cn),{key:0,class:c.normalizeClass(c.unref(m).e("icon"))},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(U.suffixIcon)))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0)],64)):c.createCommentVNode("v-if",!0),c.unref(Y)?(c.openBlock(),c.createBlock(c.unref(Cn),{key:1,class:c.normalizeClass([c.unref(m).e("icon"),c.unref(m).e("clear")]),onMousedown:c.withModifiers(c.unref(ss),["prevent"]),onClick:ui},{default:c.withCtx(()=>[c.createVNode(c.unref(bg))]),_:1},8,["class","onMousedown"])):c.createCommentVNode("v-if",!0),c.unref(ot)?(c.openBlock(),c.createBlock(c.unref(Cn),{key:2,class:c.normalizeClass([c.unref(m).e("icon"),c.unref(m).e("password")]),onClick:ai},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(c.unref(A))))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0),c.unref(F)?(c.openBlock(),c.createElementBlock("span",{key:3,class:c.normalizeClass(c.unref(m).e("count"))},[c.createElementVNode("span",{class:c.normalizeClass(c.unref(m).e("count-inner"))},c.toDisplayString(c.unref(H))+" / "+c.toDisplayString(U.maxlength),3)],2)):c.createCommentVNode("v-if",!0),c.unref(N)&&c.unref(j)&&c.unref(D)?(c.openBlock(),c.createBlock(c.unref(Cn),{key:4,class:c.normalizeClass([c.unref(m).e("icon"),c.unref(m).e("validateIcon"),c.unref(m).is("loading",c.unref(N)==="validating")])},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(c.unref(j))))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0)],2),c.createCommentVNode(" append slot "),U.$slots.append?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(c.unref(m).be("group","append"))},[c.renderSlot(U.$slots,"append")],2)):c.createCommentVNode("v-if",!0)],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createCommentVNode(" textarea "),c.createElementVNode("textarea",c.mergeProps({id:c.unref(d),ref_key:"textarea",ref:w,class:[c.unref(y).e("inner"),c.unref(m).is("focus",c.unref(T))]},c.unref(u),{minlength:U.minlength,maxlength:U.maxlength,tabindex:U.tabindex,disabled:c.unref(p),readonly:U.readonly,autocomplete:U.autocomplete,style:c.unref(L),"aria-label":U.ariaLabel,placeholder:U.placeholder,form:U.form,autofocus:U.autofocus,rows:U.rows,onCompositionstart:c.unref(dn),onCompositionupdate:c.unref(Ts),onCompositionend:c.unref(Ns),onInput:xt,onFocus:c.unref(k),onBlur:c.unref(_),onChange:An,onKeydown:yo}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),c.unref(F)?(c.openBlock(),c.createElementBlock("span",{key:0,style:c.normalizeStyle(S.value),class:c.normalizeClass(c.unref(m).e("count"))},c.toDisplayString(c.unref(H))+" / "+c.toDisplayString(U.maxlength),7)):c.createCommentVNode("v-if",!0)],64))],16,["role"]))}});var eN=he(tN,[["__file","input.vue"]]);const nN=js(eN),Yc=Symbol("popper"),mp=Symbol("popperContent"),yp=Kt({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),sN=c.defineComponent({name:"ElPopper",inheritAttrs:!1}),rN=c.defineComponent({...sN,props:yp,setup(n,{expose:t}){const e=n,s=c.ref(),r=c.ref(),i=c.ref(),o=c.ref(),a=c.computed(()=>e.role),l={triggerRef:s,popperInstanceRef:r,contentRef:i,referenceRef:o,role:a};return t(l),c.provide(Yc,l),(u,h)=>c.renderSlot(u.$slots,"default")}});var iN=he(rN,[["__file","popper.vue"]]);const bp=Kt({arrowOffset:{type:Number,default:5}}),oN=c.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),aN=c.defineComponent({...oN,props:bp,setup(n,{expose:t}){const e=n,s=me("popper"),{arrowOffset:r,arrowRef:i,arrowStyle:o}=c.inject(mp,void 0);return c.watch(()=>e.arrowOffset,a=>{r.value=a}),c.onBeforeUnmount(()=>{i.value=void 0}),t({arrowRef:i}),(a,l)=>(c.openBlock(),c.createElementBlock("span",{ref_key:"arrowRef",ref:i,class:c.normalizeClass(c.unref(s).e("arrow")),style:c.normalizeStyle(c.unref(o)),"data-popper-arrow":""},null,6))}});var lN=he(aN,[["__file","arrow.vue"]]);const Wc="ElOnlyChild",cN=c.defineComponent({name:Wc,setup(n,{slots:t,attrs:e}){var s;const r=c.inject(np),i=DT((s=r==null?void 0:r.setForwardRef)!=null?s:ss);return()=>{var o;const a=(o=t.default)==null?void 0:o.call(t,e);if(!a)return null;if(a.length>1)return Pe(Wc,"requires exact only one valid child."),null;const l=wp(a);return l?c.withDirectives(c.cloneVNode(l,e),[[i]]):(Pe(Wc,"no valid child node found"),null)}}});function wp(n){if(!n)return null;const t=n;for(const e of t){if(hr(e))switch(e.type){case c.Comment:continue;case c.Text:case"svg":return xp(e);case c.Fragment:return wp(e.children);default:return e}return xp(e)}return null}function xp(n){const t=me("only-child");return c.createVNode("span",{class:t.e("content")},[n])}const vp=Kt({virtualRef:{type:ct(Object)},virtualTriggering:Boolean,onMouseenter:{type:ct(Function)},onMouseleave:{type:ct(Function)},onClick:{type:ct(Function)},onKeydown:{type:ct(Function)},onFocus:{type:ct(Function)},onBlur:{type:ct(Function)},onContextmenu:{type:ct(Function)},id:String,open:Boolean}),uN=c.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),hN=c.defineComponent({...uN,props:vp,setup(n,{expose:t}){const e=n,{role:s,triggerRef:r}=c.inject(Yc,void 0);kT(r);const i=c.computed(()=>a.value?e.id:void 0),o=c.computed(()=>{if(s&&s.value==="tooltip")return e.open&&e.id?e.id:void 0}),a=c.computed(()=>{if(s&&s.value!=="tooltip")return s.value}),l=c.computed(()=>a.value?`${e.open}`:void 0);let u;const h=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return c.onMounted(()=>{c.watch(()=>e.virtualRef,f=>{f&&(r.value=ns(f))},{immediate:!0}),c.watch(r,(f,d)=>{u==null||u(),u=void 0,Fn(f)&&(h.forEach(g=>{var p;const m=e[g];m&&(f.addEventListener(g.slice(2).toLowerCase(),m),(p=d==null?void 0:d.removeEventListener)==null||p.call(d,g.slice(2).toLowerCase(),m))}),u=c.watch([i,o,a,l],g=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,m)=>{ua(g[m])?f.removeAttribute(p):f.setAttribute(p,g[m])})},{immediate:!0})),Fn(d)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(g=>d.removeAttribute(g))},{immediate:!0})}),c.onBeforeUnmount(()=>{if(u==null||u(),u=void 0,r.value&&Fn(r.value)){const f=r.value;h.forEach(d=>{const g=e[d];g&&f.removeEventListener(d.slice(2).toLowerCase(),g)}),r.value=void 0}}),t({triggerRef:r}),(f,d)=>f.virtualTriggering?c.createCommentVNode("v-if",!0):(c.openBlock(),c.createBlock(c.unref(cN),c.mergeProps({key:0},f.$attrs,{"aria-controls":c.unref(i),"aria-describedby":c.unref(o),"aria-expanded":c.unref(l),"aria-haspopup":c.unref(a)}),{default:c.withCtx(()=>[c.renderSlot(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var dN=he(hN,[["__file","trigger.vue"]]);const qc="focus-trap.focus-after-trapped",Jc="focus-trap.focus-after-released",fN="focus-trap.focusout-prevented",Cp={cancelable:!0,bubbles:!1},gN={cancelable:!0,bubbles:!1},Sp="focusAfterTrapped",Ep="focusAfterReleased",pN=Symbol("elFocusTrap"),Xc=c.ref(),Oa=c.ref(0),Kc=c.ref(0);let Ma=0;const Op=n=>{const t=[],e=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0||s===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;e.nextNode();)t.push(e.currentNode);return t},Mp=(n,t)=>{for(const e of n)if(!mN(e,t))return e},mN=(n,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(t&&n===t)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1},yN=n=>{const t=Op(n),e=Mp(t,n),s=Mp(t.reverse(),n);return[e,s]},bN=n=>n instanceof HTMLInputElement&&"select"in n,os=(n,t)=>{if(n&&n.focus){const e=document.activeElement;n.focus({preventScroll:!0}),Kc.value=window.performance.now(),n!==e&&bN(n)&&t&&n.select()}};function Pp(n,t){const e=[...n],s=n.indexOf(t);return s!==-1&&e.splice(s,1),e}const wN=()=>{let n=[];return{push:s=>{const r=n[0];r&&s!==r&&r.pause(),n=Pp(n,s),n.unshift(s)},remove:s=>{var r,i;n=Pp(n,s),(i=(r=n[0])==null?void 0:r.resume)==null||i.call(r)}}},xN=(n,t=!1)=>{const e=document.activeElement;for(const s of n)if(os(s,t),document.activeElement!==e)return},Ap=wN(),vN=()=>Oa.value>Kc.value,Pa=()=>{Xc.value="pointer",Oa.value=window.performance.now()},Tp=()=>{Xc.value="keyboard",Oa.value=window.performance.now()},CN=()=>(c.onMounted(()=>{Ma===0&&(document.addEventListener("mousedown",Pa),document.addEventListener("touchstart",Pa),document.addEventListener("keydown",Tp)),Ma++}),c.onBeforeUnmount(()=>{Ma--,Ma<=0&&(document.removeEventListener("mousedown",Pa),document.removeEventListener("touchstart",Pa),document.removeEventListener("keydown",Tp))}),{focusReason:Xc,lastUserFocusTimestamp:Oa,lastAutomatedFocusTimestamp:Kc}),Aa=n=>new CustomEvent(fN,{...gN,detail:n}),SN=c.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Sp,Ep,"focusin","focusout","focusout-prevented","release-requested"],setup(n,{emit:t}){const e=c.ref();let s,r;const{focusReason:i}=CN();PT(p=>{n.trapped&&!o.paused&&t("release-requested",p)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},a=p=>{if(!n.loop&&!n.trapped||o.paused)return;const{key:m,altKey:y,ctrlKey:b,metaKey:w,currentTarget:x,shiftKey:v}=p,{loop:S}=n,E=m===Cr.tab&&!y&&!b&&!w,C=document.activeElement;if(E&&C){const M=x,[T,k]=yN(M);if(T&&k){if(!v&&C===k){const D=Aa({focusReason:i.value});t("focusout-prevented",D),D.defaultPrevented||(p.preventDefault(),S&&os(T,!0))}else if(v&&[T,M].includes(C)){const D=Aa({focusReason:i.value});t("focusout-prevented",D),D.defaultPrevented||(p.preventDefault(),S&&os(k,!0))}}else if(C===M){const D=Aa({focusReason:i.value});t("focusout-prevented",D),D.defaultPrevented||p.preventDefault()}}};c.provide(pN,{focusTrapRef:e,onKeydown:a}),c.watch(()=>n.focusTrapEl,p=>{p&&(e.value=p)},{immediate:!0}),c.watch([e],([p],[m])=>{p&&(p.addEventListener("keydown",a),p.addEventListener("focusin",h),p.addEventListener("focusout",f)),m&&(m.removeEventListener("keydown",a),m.removeEventListener("focusin",h),m.removeEventListener("focusout",f))});const l=p=>{t(Sp,p)},u=p=>t(Ep,p),h=p=>{const m=c.unref(e);if(!m)return;const y=p.target,b=p.relatedTarget,w=y&&m.contains(y);n.trapped||b&&m.contains(b)||(s=b),w&&t("focusin",p),!o.paused&&n.trapped&&(w?r=y:os(r,!0))},f=p=>{const m=c.unref(e);if(!(o.paused||!m))if(n.trapped){const y=p.relatedTarget;!ua(y)&&!m.contains(y)&&setTimeout(()=>{if(!o.paused&&n.trapped){const b=Aa({focusReason:i.value});t("focusout-prevented",b),b.defaultPrevented||os(r,!0)}},0)}else{const y=p.target;y&&m.contains(y)||t("focusout",p)}};async function d(){await c.nextTick();const p=c.unref(e);if(p){Ap.push(o);const m=p.contains(document.activeElement)?s:document.activeElement;if(s=m,!p.contains(m)){const b=new Event(qc,Cp);p.addEventListener(qc,l),p.dispatchEvent(b),b.defaultPrevented||c.nextTick(()=>{let w=n.focusStartEl;Xe(w)||(os(w),document.activeElement!==w&&(w="first")),w==="first"&&xN(Op(p),!0),(document.activeElement===m||w==="container")&&os(p)})}}}function g(){const p=c.unref(e);if(p){p.removeEventListener(qc,l);const m=new CustomEvent(Jc,{...Cp,detail:{focusReason:i.value}});p.addEventListener(Jc,u),p.dispatchEvent(m),!m.defaultPrevented&&(i.value=="keyboard"||!vN()||p.contains(document.activeElement))&&os(s??document.body),p.removeEventListener(Jc,u),Ap.remove(o)}}return c.onMounted(()=>{n.trapped&&d(),c.watch(()=>n.trapped,p=>{p?d():g()})}),c.onBeforeUnmount(()=>{n.trapped&&g(),e.value&&(e.value.removeEventListener("keydown",a),e.value.removeEventListener("focusin",h),e.value.removeEventListener("focusout",f),e.value=void 0)}),{onKeydown:a}}});function EN(n,t,e,s,r,i){return c.renderSlot(n.$slots,"default",{handleKeydown:n.onKeydown})}var Np=he(SN,[["render",EN],["__file","focus-trap.vue"]]);const ON=["fixed","absolute"],MN=Kt({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:ct(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:_c,default:"bottom"},popperOptions:{type:ct(Object),default:()=>({})},strategy:{type:String,values:ON,default:"absolute"}}),_p=Kt({...MN,id:String,style:{type:ct([String,Array,Object])},className:{type:ct([String,Array,Object])},effect:{type:ct(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:ct([String,Array,Object])},popperStyle:{type:ct([String,Array,Object])},referenceEl:{type:ct(Object)},triggerTargetEl:{type:ct(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Fc(["ariaLabel"])}),PN={mouseenter:n=>n instanceof MouseEvent,mouseleave:n=>n instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},AN=(n,t=[])=>{const{placement:e,strategy:s,popperOptions:r}=n,i={placement:e,strategy:s,...r,modifiers:[...NN(n),...t]};return _N(i,r==null?void 0:r.modifiers),i},TN=n=>{if(Gt)return ns(n)};function NN(n){const{offset:t,gpuAcceleration:e,fallbackPlacements:s}=n;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:s}},{name:"computeStyles",options:{gpuAcceleration:e}}]}function _N(n,t){t&&(n.modifiers=[...n.modifiers,...t??[]])}const kN=0,DN=n=>{const{popperInstanceRef:t,contentRef:e,triggerRef:s,role:r}=c.inject(Yc,void 0),i=c.ref(),o=c.ref(),a=c.computed(()=>({name:"eventListeners",enabled:!!n.visible})),l=c.computed(()=>{var b;const w=c.unref(i),x=(b=c.unref(o))!=null?b:kN;return{name:"arrow",enabled:!n2(w),options:{element:w,padding:x}}}),u=c.computed(()=>({onFirstUpdate:()=>{p()},...AN(n,[c.unref(l),c.unref(a)])})),h=c.computed(()=>TN(n.referenceEl)||c.unref(s)),{attributes:f,state:d,styles:g,update:p,forceUpdate:m,instanceRef:y}=ET(h,e,u);return c.watch(y,b=>t.value=b),c.onMounted(()=>{c.watch(()=>{var b;return(b=c.unref(h))==null?void 0:b.getBoundingClientRect()},()=>{p()})}),{attributes:f,arrowRef:i,contentRef:e,instanceRef:y,state:d,styles:g,role:r,forceUpdate:m,update:p}},RN=(n,{attributes:t,styles:e,role:s})=>{const{nextZIndex:r}=lp(),i=me("popper"),o=c.computed(()=>c.unref(t).popper),a=c.ref(Be(n.zIndex)?n.zIndex:r()),l=c.computed(()=>[i.b(),i.is("pure",n.pure),i.is(n.effect),n.popperClass]),u=c.computed(()=>[{zIndex:c.unref(a)},c.unref(e).popper,n.popperStyle||{}]),h=c.computed(()=>s.value==="dialog"?"false":void 0),f=c.computed(()=>c.unref(e).arrow||{});return{ariaModal:h,arrowStyle:f,contentAttrs:o,contentClass:l,contentStyle:u,contentZIndex:a,updateZIndex:()=>{a.value=Be(n.zIndex)?n.zIndex:r()}}},IN=(n,t)=>{const e=c.ref(!1),s=c.ref();return{focusStartRef:s,trapped:e,onFocusAfterReleased:u=>{var h;((h=u.detail)==null?void 0:h.focusReason)!=="pointer"&&(s.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:u=>{n.visible&&!e.value&&(u.target&&(s.value=u.target),e.value=!0)},onFocusoutPrevented:u=>{n.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),e.value=!1)},onReleaseRequested:()=>{e.value=!1,t("close")}}},LN=c.defineComponent({name:"ElPopperContent"}),BN=c.defineComponent({...LN,props:_p,emits:PN,setup(n,{expose:t,emit:e}){const s=n,{focusStartRef:r,trapped:i,onFocusAfterReleased:o,onFocusAfterTrapped:a,onFocusInTrap:l,onFocusoutPrevented:u,onReleaseRequested:h}=IN(s,e),{attributes:f,arrowRef:d,contentRef:g,styles:p,instanceRef:m,role:y,update:b}=DN(s),{ariaModal:w,arrowStyle:x,contentAttrs:v,contentClass:S,contentStyle:E,updateZIndex:C}=RN(s,{styles:p,attributes:f,role:y}),M=c.inject(Ea,void 0),T=c.ref();c.provide(mp,{arrowStyle:x,arrowRef:d,arrowOffset:T}),M&&c.provide(Ea,{...M,addInputId:ss,removeInputId:ss});let k;const _=(N=!0)=>{b(),N&&C()},D=()=>{_(!1),s.visible&&s.focusOnShow?i.value=!0:s.visible===!1&&(i.value=!1)};return c.onMounted(()=>{c.watch(()=>s.triggerTargetEl,(N,j)=>{k==null||k(),k=void 0;const A=c.unref(N||g.value),P=c.unref(j||g.value);Fn(A)&&(k=c.watch([y,()=>s.ariaLabel,w,()=>s.id],L=>{["role","aria-label","aria-modal","id"].forEach((V,Y)=>{ua(L[Y])?A.removeAttribute(V):A.setAttribute(V,L[Y])})},{immediate:!0})),P!==A&&Fn(P)&&["role","aria-label","aria-modal","id"].forEach(L=>{P.removeAttribute(L)})},{immediate:!0}),c.watch(()=>s.visible,D,{immediate:!0})}),c.onBeforeUnmount(()=>{k==null||k(),k=void 0}),t({popperContentRef:g,popperInstanceRef:m,updatePopper:_,contentStyle:E}),(N,j)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps({ref_key:"contentRef",ref:g},c.unref(v),{style:c.unref(E),class:c.unref(S),tabindex:"-1",onMouseenter:A=>N.$emit("mouseenter",A),onMouseleave:A=>N.$emit("mouseleave",A)}),[c.createVNode(c.unref(Np),{trapped:c.unref(i),"trap-on-focus-in":!0,"focus-trap-el":c.unref(g),"focus-start-el":c.unref(r),onFocusAfterTrapped:c.unref(a),onFocusAfterReleased:c.unref(o),onFocusin:c.unref(l),onFocusoutPrevented:c.unref(u),onReleaseRequested:c.unref(h)},{default:c.withCtx(()=>[c.renderSlot(N.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var VN=he(BN,[["__file","content.vue"]]);const jN=js(iN),Zc=Symbol("elTooltip"),kp=Kt({...NT,..._p,appendTo:{type:ct([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:ct(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Fc(["ariaLabel"])}),Dp=Kt({...vp,disabled:Boolean,trigger:{type:ct([String,Array]),default:"hover"},triggerKeys:{type:ct(Array),default:()=>[Cr.enter,Cr.space]}}),{useModelToggleProps:$N,useModelToggleEmits:zN,useModelToggle:FN}=vA("visible"),HN=Kt({...yp,...$N,...kp,...Dp,...bp,showArrow:{type:Boolean,default:!0}}),UN=[...zN,"before-show","before-hide","show","hide","open","close"],GN=(n,t)=>yv(n)?n.includes(t):n===t,Tr=(n,t,e)=>s=>{GN(c.unref(n),t)&&e(s)},YN=c.defineComponent({name:"ElTooltipTrigger"}),WN=c.defineComponent({...YN,props:Dp,setup(n,{expose:t}){const e=n,s=me("tooltip"),{controlled:r,id:i,open:o,onOpen:a,onClose:l,onToggle:u}=c.inject(Zc,void 0),h=c.ref(null),f=()=>{if(c.unref(r)||e.disabled)return!0},d=c.toRef(e,"trigger"),g=Vn(f,Tr(d,"hover",a)),p=Vn(f,Tr(d,"hover",l)),m=Vn(f,Tr(d,"click",v=>{v.button===0&&u(v)})),y=Vn(f,Tr(d,"focus",a)),b=Vn(f,Tr(d,"focus",l)),w=Vn(f,Tr(d,"contextmenu",v=>{v.preventDefault(),u(v)})),x=Vn(f,v=>{const{code:S}=v;e.triggerKeys.includes(S)&&(v.preventDefault(),u(v))});return t({triggerRef:h}),(v,S)=>(c.openBlock(),c.createBlock(c.unref(dN),{id:c.unref(i),"virtual-ref":v.virtualRef,open:c.unref(o),"virtual-triggering":v.virtualTriggering,class:c.normalizeClass(c.unref(s).e("trigger")),onBlur:c.unref(b),onClick:c.unref(m),onContextmenu:c.unref(w),onFocus:c.unref(y),onMouseenter:c.unref(g),onMouseleave:c.unref(p),onKeydown:c.unref(x)},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var qN=he(WN,[["__file","trigger.vue"]]);const JN=Kt({to:{type:ct([String,Object]),required:!0},disabled:Boolean});var XN=he(c.defineComponent({__name:"teleport",props:JN,setup(n){return(t,e)=>t.disabled?c.renderSlot(t.$slots,"default",{key:0}):(c.openBlock(),c.createBlock(c.Teleport,{key:1,to:t.to},[c.renderSlot(t.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const KN=js(XN),ZN=c.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),QN=c.defineComponent({...ZN,props:kp,setup(n,{expose:t}){const e=n,{selector:s}=ep(),r=me("tooltip"),i=c.ref(null);let o;const{controlled:a,id:l,open:u,trigger:h,onClose:f,onOpen:d,onShow:g,onHide:p,onBeforeShow:m,onBeforeHide:y}=c.inject(Zc,void 0),b=c.computed(()=>e.transition||`${r.namespace.value}-fade-in-linear`),w=c.computed(()=>process.env.NODE_ENV==="test"?!0:e.persistent);c.onBeforeUnmount(()=>{o==null||o()});const x=c.computed(()=>c.unref(w)?!0:c.unref(u)),v=c.computed(()=>e.disabled?!1:c.unref(u)),S=c.computed(()=>e.appendTo||s.value),E=c.computed(()=>{var P;return(P=e.style)!=null?P:{}}),C=c.ref(!0),M=()=>{p(),C.value=!0},T=()=>{if(c.unref(a))return!0},k=Vn(T,()=>{e.enterable&&c.unref(h)==="hover"&&d()}),_=Vn(T,()=>{c.unref(h)==="hover"&&f()}),D=()=>{var P,L;(L=(P=i.value)==null?void 0:P.updatePopper)==null||L.call(P),m==null||m()},N=()=>{y==null||y()},j=()=>{g(),o=ov(c.computed(()=>{var P;return(P=i.value)==null?void 0:P.popperContentRef}),()=>{if(c.unref(a))return;c.unref(h)!=="hover"&&f()})},A=()=>{e.virtualTriggering||f()};return c.watch(()=>c.unref(u),P=>{P?C.value=!1:o==null||o()},{flush:"post"}),c.watch(()=>e.content,()=>{var P,L;(L=(P=i.value)==null?void 0:P.updatePopper)==null||L.call(P)}),t({contentRef:i}),(P,L)=>(c.openBlock(),c.createBlock(c.unref(KN),{disabled:!P.teleported,to:c.unref(S)},{default:c.withCtx(()=>[c.createVNode(c.Transition,{name:c.unref(b),onAfterLeave:M,onBeforeEnter:D,onAfterEnter:j,onBeforeLeave:N},{default:c.withCtx(()=>[c.unref(x)?c.withDirectives((c.openBlock(),c.createBlock(c.unref(VN),c.mergeProps({key:0,id:c.unref(l),ref_key:"contentRef",ref:i},P.$attrs,{"aria-label":P.ariaLabel,"aria-hidden":C.value,"boundaries-padding":P.boundariesPadding,"fallback-placements":P.fallbackPlacements,"gpu-acceleration":P.gpuAcceleration,offset:P.offset,placement:P.placement,"popper-options":P.popperOptions,strategy:P.strategy,effect:P.effect,enterable:P.enterable,pure:P.pure,"popper-class":P.popperClass,"popper-style":[P.popperStyle,c.unref(E)],"reference-el":P.referenceEl,"trigger-target-el":P.triggerTargetEl,visible:c.unref(v),"z-index":P.zIndex,onMouseenter:c.unref(k),onMouseleave:c.unref(_),onBlur:A,onClose:c.unref(f)}),{default:c.withCtx(()=>[c.renderSlot(P.$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"])),[[c.vShow,c.unref(v)]]):c.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var t_=he(QN,[["__file","content.vue"]]);const e_=c.defineComponent({name:"ElTooltip"}),n_=c.defineComponent({...e_,props:HN,emits:UN,setup(n,{expose:t,emit:e}){const s=n;TT();const r=Ca(),i=c.ref(),o=c.ref(),a=()=>{var b;const w=c.unref(i);w&&((b=w.popperInstanceRef)==null||b.update())},l=c.ref(!1),u=c.ref(),{show:h,hide:f,hasUpdateHandler:d}=FN({indicator:l,toggleReason:u}),{onOpen:g,onClose:p}=_T({showAfter:c.toRef(s,"showAfter"),hideAfter:c.toRef(s,"hideAfter"),autoClose:c.toRef(s,"autoClose"),open:h,close:f}),m=c.computed(()=>ha(s.visible)&&!d.value);c.provide(Zc,{controlled:m,id:r,open:c.readonly(l),trigger:c.toRef(s,"trigger"),onOpen:b=>{g(b)},onClose:b=>{p(b)},onToggle:b=>{c.unref(l)?p(b):g(b)},onShow:()=>{e("show",u.value)},onHide:()=>{e("hide",u.value)},onBeforeShow:()=>{e("before-show",u.value)},onBeforeHide:()=>{e("before-hide",u.value)},updatePopper:a}),c.watch(()=>s.disabled,b=>{b&&l.value&&(l.value=!1)});const y=b=>{var w,x;const v=(x=(w=o.value)==null?void 0:w.contentRef)==null?void 0:x.popperContentRef,S=(b==null?void 0:b.relatedTarget)||document.activeElement;return v&&v.contains(S)};return c.onDeactivated(()=>l.value&&f()),t({popperRef:i,contentRef:o,isFocusInsideContent:y,updatePopper:a,onOpen:g,onClose:p,hide:f}),(b,w)=>(c.openBlock(),c.createBlock(c.unref(jN),{ref_key:"popperRef",ref:i,role:b.role},{default:c.withCtx(()=>[c.createVNode(qN,{disabled:b.disabled,trigger:b.trigger,"trigger-keys":b.triggerKeys,"virtual-ref":b.virtualRef,"virtual-triggering":b.virtualTriggering},{default:c.withCtx(()=>[b.$slots.default?c.renderSlot(b.$slots,"default",{key:0}):c.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),c.createVNode(t_,{ref_key:"contentRef",ref:o,"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:c.withCtx(()=>[c.renderSlot(b.$slots,"content",{},()=>[b.rawContent?(c.openBlock(),c.createElementBlock("span",{key:0,innerHTML:b.content},null,8,["innerHTML"])):(c.openBlock(),c.createElementBlock("span",{key:1},c.toDisplayString(b.content),1))]),b.showArrow?(c.openBlock(),c.createBlock(c.unref(lN),{key:0,"arrow-offset":b.arrowOffset},null,8,["arrow-offset"])):c.createCommentVNode("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 s_=he(n_,[["__file","tooltip.vue"]]);const Rp=js(s_),r_=Kt({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:ct([String,Object,Array])},offset:{type:ct(Array),default:[0,0]},badgeClass:{type:String}}),i_=c.defineComponent({name:"ElBadge"}),o_=c.defineComponent({...i_,props:r_,setup(n,{expose:t}){const e=n,s=me("badge"),r=c.computed(()=>e.isDot?"":Be(e.value)&&Be(e.max)?e.max<e.value?`${e.max}+`:`${e.value}`:`${e.value}`),i=c.computed(()=>{var o,a,l,u,h;return[{backgroundColor:e.color,marginRight:ki(-((a=(o=e.offset)==null?void 0:o[0])!=null?a:0)),marginTop:ki((u=(l=e.offset)==null?void 0:l[1])!=null?u:0)},(h=e.badgeStyle)!=null?h:{}]});return t({content:r}),(o,a)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref(s).b())},[c.renderSlot(o.$slots,"default"),c.createVNode(c.Transition,{name:`${c.unref(s).namespace.value}-zoom-in-center`,persisted:""},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("sup",{class:c.normalizeClass([c.unref(s).e("content"),c.unref(s).em("content",o.type),c.unref(s).is("fixed",!!o.$slots.default),c.unref(s).is("dot",o.isDot),c.unref(s).is("hide-zero",!o.showZero&&e.value===0),o.badgeClass]),style:c.normalizeStyle(c.unref(i)),textContent:c.toDisplayString(c.unref(r))},null,14,["textContent"]),[[c.vShow,!o.hidden&&(c.unref(r)||o.isDot)]])]),_:1},8,["name"])],2))}});var a_=he(o_,[["__file","badge.vue"]]);const l_=js(a_),Ip=Symbol("buttonGroupContextKey"),c_=(n,t)=>{uA({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},c.computed(()=>n.type==="text"));const e=c.inject(Ip,void 0),s=Hc("button"),{form:r}=gp(),i=fp(c.computed(()=>e==null?void 0:e.size)),o=Gc(),a=c.ref(),l=c.useSlots(),u=c.computed(()=>n.type||(e==null?void 0:e.type)||""),h=c.computed(()=>{var p,m,y;return(y=(m=n.autoInsertSpace)!=null?m:(p=s.value)==null?void 0:p.autoInsertSpace)!=null?y:!1}),f=c.computed(()=>n.tag==="button"?{ariaDisabled:o.value||n.loading,disabled:o.value||n.loading,autofocus:n.autofocus,type:n.nativeType}:{}),d=c.computed(()=>{var p;const m=(p=l.default)==null?void 0:p.call(l);if(h.value&&(m==null?void 0:m.length)===1){const y=m[0];if((y==null?void 0:y.type)===c.Text){const b=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(b.trim())}}return!1});return{_disabled:o,_size:i,_type:u,_ref:a,_props:f,shouldAddSpace:d,handleClick:p=>{if(o.value||n.loading){p.stopPropagation();return}n.nativeType==="reset"&&(r==null||r.resetFields()),t("click",p)}}},Qc=Kt({size:zc,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:Di},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:Di,default:()=>fa},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:ct([String,Object]),default:"button"}}),u_={click:n=>n instanceof MouseEvent};function oe(n,t){h_(n)&&(n="100%");var e=d_(n);return n=t===360?n:Math.min(t,Math.max(0,parseFloat(n))),e&&(n=parseInt(String(n*t),10)/100),Math.abs(n-t)<1e-6?1:(t===360?n=(n<0?n%t+t:n%t)/parseFloat(String(t)):n=n%t/parseFloat(String(t)),n)}function Ta(n){return Math.min(1,Math.max(0,n))}function h_(n){return typeof n=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1}function d_(n){return typeof n=="string"&&n.indexOf("%")!==-1}function Lp(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Na(n){return n<=1?"".concat(Number(n)*100,"%"):n}function Fs(n){return n.length===1?"0"+n:String(n)}function f_(n,t,e){return{r:oe(n,255)*255,g:oe(t,255)*255,b:oe(e,255)*255}}function Bp(n,t,e){n=oe(n,255),t=oe(t,255),e=oe(e,255);var s=Math.max(n,t,e),r=Math.min(n,t,e),i=0,o=0,a=(s+r)/2;if(s===r)o=0,i=0;else{var l=s-r;switch(o=a>.5?l/(2-s-r):l/(s+r),s){case n:i=(t-e)/l+(t<e?6:0);break;case t:i=(e-n)/l+2;break;case e:i=(n-t)/l+4;break}i/=6}return{h:i,s:o,l:a}}function tu(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*(6*e):e<1/2?t:e<2/3?n+(t-n)*(2/3-e)*6:n}function g_(n,t,e){var s,r,i;if(n=oe(n,360),t=oe(t,100),e=oe(e,100),t===0)r=e,i=e,s=e;else{var o=e<.5?e*(1+t):e+t-e*t,a=2*e-o;s=tu(a,o,n+1/3),r=tu(a,o,n),i=tu(a,o,n-1/3)}return{r:s*255,g:r*255,b:i*255}}function Vp(n,t,e){n=oe(n,255),t=oe(t,255),e=oe(e,255);var s=Math.max(n,t,e),r=Math.min(n,t,e),i=0,o=s,a=s-r,l=s===0?0:a/s;if(s===r)i=0;else{switch(s){case n:i=(t-e)/a+(t<e?6:0);break;case t:i=(e-n)/a+2;break;case e:i=(n-t)/a+4;break}i/=6}return{h:i,s:l,v:o}}function p_(n,t,e){n=oe(n,360)*6,t=oe(t,100),e=oe(e,100);var s=Math.floor(n),r=n-s,i=e*(1-t),o=e*(1-r*t),a=e*(1-(1-r)*t),l=s%6,u=[e,o,i,i,a,e][l],h=[a,e,e,o,i,i][l],f=[i,i,a,e,e,o][l];return{r:u*255,g:h*255,b:f*255}}function jp(n,t,e,s){var r=[Fs(Math.round(n).toString(16)),Fs(Math.round(t).toString(16)),Fs(Math.round(e).toString(16))];return s&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function m_(n,t,e,s,r){var i=[Fs(Math.round(n).toString(16)),Fs(Math.round(t).toString(16)),Fs(Math.round(e).toString(16)),Fs(y_(s))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function y_(n){return Math.round(parseFloat(n)*255).toString(16)}function $p(n){return Ae(n)/255}function Ae(n){return parseInt(n,16)}function b_(n){return{r:n>>16,g:(n&65280)>>8,b:n&255}}var eu={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 w_(n){var t={r:0,g:0,b:0},e=1,s=null,r=null,i=null,o=!1,a=!1;return typeof n=="string"&&(n=C_(n)),typeof n=="object"&&(Un(n.r)&&Un(n.g)&&Un(n.b)?(t=f_(n.r,n.g,n.b),o=!0,a=String(n.r).substr(-1)==="%"?"prgb":"rgb"):Un(n.h)&&Un(n.s)&&Un(n.v)?(s=Na(n.s),r=Na(n.v),t=p_(n.h,s,r),o=!0,a="hsv"):Un(n.h)&&Un(n.s)&&Un(n.l)&&(s=Na(n.s),i=Na(n.l),t=g_(n.h,s,i),o=!0,a="hsl"),Object.prototype.hasOwnProperty.call(n,"a")&&(e=n.a)),e=Lp(e),{ok:o,format:n.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:e}}var x_="[-\\+]?\\d+%?",v_="[-\\+]?\\d*\\.\\d+%?",as="(?:".concat(v_,")|(?:").concat(x_,")"),nu="[\\s|\\(]+(".concat(as,")[,|\\s]+(").concat(as,")[,|\\s]+(").concat(as,")\\s*\\)?"),su="[\\s|\\(]+(".concat(as,")[,|\\s]+(").concat(as,")[,|\\s]+(").concat(as,")[,|\\s]+(").concat(as,")\\s*\\)?"),sn={CSS_UNIT:new RegExp(as),rgb:new RegExp("rgb"+nu),rgba:new RegExp("rgba"+su),hsl:new RegExp("hsl"+nu),hsla:new RegExp("hsla"+su),hsv:new RegExp("hsv"+nu),hsva:new RegExp("hsva"+su),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 C_(n){if(n=n.trim().toLowerCase(),n.length===0)return!1;var t=!1;if(eu[n])n=eu[n],t=!0;else if(n==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var e=sn.rgb.exec(n);return e?{r:e[1],g:e[2],b:e[3]}:(e=sn.rgba.exec(n),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=sn.hsl.exec(n),e?{h:e[1],s:e[2],l:e[3]}:(e=sn.hsla.exec(n),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=sn.hsv.exec(n),e?{h:e[1],s:e[2],v:e[3]}:(e=sn.hsva.exec(n),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=sn.hex8.exec(n),e?{r:Ae(e[1]),g:Ae(e[2]),b:Ae(e[3]),a:$p(e[4]),format:t?"name":"hex8"}:(e=sn.hex6.exec(n),e?{r:Ae(e[1]),g:Ae(e[2]),b:Ae(e[3]),format:t?"name":"hex"}:(e=sn.hex4.exec(n),e?{r:Ae(e[1]+e[1]),g:Ae(e[2]+e[2]),b:Ae(e[3]+e[3]),a:$p(e[4]+e[4]),format:t?"name":"hex8"}:(e=sn.hex3.exec(n),e?{r:Ae(e[1]+e[1]),g:Ae(e[2]+e[2]),b:Ae(e[3]+e[3]),format:t?"name":"hex"}:!1)))))))))}function Un(n){return!!sn.CSS_UNIT.exec(String(n))}var S_=function(){function n(t,e){t===void 0&&(t=""),e===void 0&&(e={});var s;if(t instanceof n)return t;typeof t=="number"&&(t=b_(t)),this.originalInput=t;var r=w_(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(s=e.format)!==null&&s!==void 0?s:r.format,this.gradientType=e.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=r.ok}return n.prototype.isDark=function(){return this.getBrightness()<128},n.prototype.isLight=function(){return!this.isDark()},n.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},n.prototype.getLuminance=function(){var t=this.toRgb(),e,s,r,i=t.r/255,o=t.g/255,a=t.b/255;return i<=.03928?e=i/12.92:e=Math.pow((i+.055)/1.055,2.4),o<=.03928?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),.2126*e+.7152*s+.0722*r},n.prototype.getAlpha=function(){return this.a},n.prototype.setAlpha=function(t){return this.a=Lp(t),this.roundA=Math.round(100*this.a)/100,this},n.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},n.prototype.toHsv=function(){var t=Vp(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},n.prototype.toHsvString=function(){var t=Vp(this.r,this.g,this.b),e=Math.round(t.h*360),s=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(e,", ").concat(s,"%, ").concat(r,"%)"):"hsva(".concat(e,", ").concat(s,"%, ").concat(r,"%, ").concat(this.roundA,")")},n.prototype.toHsl=function(){var t=Bp(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},n.prototype.toHslString=function(){var t=Bp(this.r,this.g,this.b),e=Math.round(t.h*360),s=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(e,", ").concat(s,"%, ").concat(r,"%)"):"hsla(".concat(e,", ").concat(s,"%, ").concat(r,"%, ").concat(this.roundA,")")},n.prototype.toHex=function(t){return t===void 0&&(t=!1),jp(this.r,this.g,this.b,t)},n.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},n.prototype.toHex8=function(t){return t===void 0&&(t=!1),m_(this.r,this.g,this.b,this.a,t)},n.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},n.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},n.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},n.prototype.toRgbString=function(){var t=Math.round(this.r),e=Math.round(this.g),s=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(e,", ").concat(s,")"):"rgba(".concat(t,", ").concat(e,", ").concat(s,", ").concat(this.roundA,")")},n.prototype.toPercentageRgb=function(){var t=function(e){return"".concat(Math.round(oe(e,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},n.prototype.toPercentageRgbString=function(){var t=function(e){return Math.round(oe(e,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},n.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jp(this.r,this.g,this.b,!1),e=0,s=Object.entries(eu);e<s.length;e++){var r=s[e],i=r[0],o=r[1];if(t===o)return i}return!1},n.prototype.toString=function(t){var e=!!t;t=t??this.format;var s=!1,r=this.a<1&&this.a>=0,i=!e&&r&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(s=this.toRgbString()),t==="prgb"&&(s=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(s=this.toHexString()),t==="hex3"&&(s=this.toHexString(!0)),t==="hex4"&&(s=this.toHex8String(!0)),t==="hex8"&&(s=this.toHex8String()),t==="name"&&(s=this.toName()),t==="hsl"&&(s=this.toHslString()),t==="hsv"&&(s=this.toHsvString()),s||this.toHexString())},n.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},n.prototype.clone=function(){return new n(this.toString())},n.prototype.lighten=function(t){t===void 0&&(t=10);var e=this.toHsl();return e.l+=t/100,e.l=Ta(e.l),new n(e)},n.prototype.brighten=function(t){t===void 0&&(t=10);var e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(t/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(t/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(t/100)))),new n(e)},n.prototype.darken=function(t){t===void 0&&(t=10);var e=this.toHsl();return e.l-=t/100,e.l=Ta(e.l),new n(e)},n.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},n.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},n.prototype.desaturate=function(t){t===void 0&&(t=10);var e=this.toHsl();return e.s-=t/100,e.s=Ta(e.s),new n(e)},n.prototype.saturate=function(t){t===void 0&&(t=10);var e=this.toHsl();return e.s+=t/100,e.s=Ta(e.s),new n(e)},n.prototype.greyscale=function(){return this.desaturate(100)},n.prototype.spin=function(t){var e=this.toHsl(),s=(e.h+t)%360;return e.h=s<0?360+s:s,new n(e)},n.prototype.mix=function(t,e){e===void 0&&(e=50);var s=this.toRgb(),r=new n(t).toRgb(),i=e/100,o={r:(r.r-s.r)*i+s.r,g:(r.g-s.g)*i+s.g,b:(r.b-s.b)*i+s.b,a:(r.a-s.a)*i+s.a};return new n(o)},n.prototype.analogous=function(t,e){t===void 0&&(t=6),e===void 0&&(e=30);var s=this.toHsl(),r=360/e,i=[this];for(s.h=(s.h-(r*t>>1)+720)%360;--t;)s.h=(s.h+r)%360,i.push(new n(s));return i},n.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new n(t)},n.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var e=this.toHsv(),s=e.h,r=e.s,i=e.v,o=[],a=1/t;t--;)o.push(new n({h:s,s:r,v:i})),i=(i+a)%1;return o},n.prototype.splitcomplement=function(){var t=this.toHsl(),e=t.h;return[this,new n({h:(e+72)%360,s:t.s,l:t.l}),new n({h:(e+216)%360,s:t.s,l:t.l})]},n.prototype.onBackground=function(t){var e=this.toRgb(),s=new n(t).toRgb(),r=e.a+s.a*(1-e.a);return new n({r:(e.r*e.a+s.r*s.a*(1-e.a))/r,g:(e.g*e.a+s.g*s.a*(1-e.a))/r,b:(e.b*e.a+s.b*s.a*(1-e.a))/r,a:r})},n.prototype.triad=function(){return this.polyad(3)},n.prototype.tetrad=function(){return this.polyad(4)},n.prototype.polyad=function(t){for(var e=this.toHsl(),s=e.h,r=[this],i=360/t,o=1;o<t;o++)r.push(new n({h:(s+o*i)%360,s:e.s,l:e.l}));return r},n.prototype.equals=function(t){return this.toRgbString()===new n(t).toRgbString()},n}();function ls(n,t=20){return n.mix("#141414",t).toString()}function E_(n){const t=Gc(),e=me("button");return c.computed(()=>{let s={},r=n.color;if(r){const i=r.match(/var\((.*?)\)/);i&&(r=window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));const o=new S_(r),a=n.dark?o.tint(20).toString():ls(o,20);if(n.plain)s=e.cssVarBlock({"bg-color":n.dark?ls(o,90):o.tint(90).toString(),"text-color":r,"border-color":n.dark?ls(o,50):o.tint(50).toString(),"hover-text-color":`var(${e.cssVarName("color-white")})`,"hover-bg-color":r,"hover-border-color":r,"active-bg-color":a,"active-text-color":`var(${e.cssVarName("color-white")})`,"active-border-color":a}),t.value&&(s[e.cssVarBlockName("disabled-bg-color")]=n.dark?ls(o,90):o.tint(90).toString(),s[e.cssVarBlockName("disabled-text-color")]=n.dark?ls(o,50):o.tint(50).toString(),s[e.cssVarBlockName("disabled-border-color")]=n.dark?ls(o,80):o.tint(80).toString());else{const l=n.dark?ls(o,30):o.tint(30).toString(),u=o.isDark()?`var(${e.cssVarName("color-white")})`:`var(${e.cssVarName("color-black")})`;if(s=e.cssVarBlock({"bg-color":r,"text-color":u,"border-color":r,"hover-bg-color":l,"hover-text-color":u,"hover-border-color":l,"active-bg-color":a,"active-border-color":a}),t.value){const h=n.dark?ls(o,50):o.tint(50).toString();s[e.cssVarBlockName("disabled-bg-color")]=h,s[e.cssVarBlockName("disabled-text-color")]=n.dark?"rgba(255, 255, 255, 0.5)":`var(${e.cssVarName("color-white")})`,s[e.cssVarBlockName("disabled-border-color")]=h}}}return s})}const O_=c.defineComponent({name:"ElButton"}),M_=c.defineComponent({...O_,props:Qc,emits:u_,setup(n,{expose:t,emit:e}){const s=n,r=E_(s),i=me("button"),{_ref:o,_size:a,_type:l,_disabled:u,_props:h,shouldAddSpace:f,handleClick:d}=c_(s,e),g=c.computed(()=>[i.b(),i.m(l.value),i.m(a.value),i.is("disabled",u.value),i.is("loading",s.loading),i.is("plain",s.plain),i.is("round",s.round),i.is("circle",s.circle),i.is("text",s.text),i.is("link",s.link),i.is("has-bg",s.bg)]);return t({ref:o,size:a,type:l,disabled:u,shouldAddSpace:f}),(p,m)=>(c.openBlock(),c.createBlock(c.resolveDynamicComponent(p.tag),c.mergeProps({ref_key:"_ref",ref:o},c.unref(h),{class:c.unref(g),style:c.unref(r),onClick:c.unref(d)}),{default:c.withCtx(()=>[p.loading?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[p.$slots.loading?c.renderSlot(p.$slots,"loading",{key:0}):(c.openBlock(),c.createBlock(c.unref(Cn),{key:1,class:c.normalizeClass(c.unref(i).is("loading"))},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(p.loadingIcon)))]),_:1},8,["class"]))],64)):p.icon||p.$slots.icon?(c.openBlock(),c.createBlock(c.unref(Cn),{key:1},{default:c.withCtx(()=>[p.icon?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(p.icon),{key:0})):c.renderSlot(p.$slots,"icon",{key:1})]),_:3})):c.createCommentVNode("v-if",!0),p.$slots.default?(c.openBlock(),c.createElementBlock("span",{key:2,class:c.normalizeClass({[c.unref(i).em("text","expand")]:c.unref(f)})},[c.renderSlot(p.$slots,"default")],2)):c.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var P_=he(M_,[["__file","button.vue"]]);const A_={size:Qc.size,type:Qc.type},T_=c.defineComponent({name:"ElButtonGroup"}),N_=c.defineComponent({...T_,props:A_,setup(n){const t=n;c.provide(Ip,c.reactive({size:c.toRef(t,"size"),type:c.toRef(t,"type")}));const e=me("button");return(s,r)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref(e).b("group"))},[c.renderSlot(s.$slots,"default")],2))}});var zp=he(N_,[["__file","button-group.vue"]]);const __=js(P_,{ButtonGroup:zp});rA(zp);function k_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}const ru="_trap-focus-children",Hs=[],Fp=n=>{var t;if(Hs.length===0)return;const e=Hs[Hs.length-1][ru];if(e.length>0&&n.code===Cr.tab){if(e.length===1){n.preventDefault(),document.activeElement!==e[0]&&e[0].focus();return}const s=n.shiftKey,r=n.target===e[0],i=n.target===e[e.length-1];if(r&&s&&(n.preventDefault(),e[e.length-1].focus()),i&&!s&&(n.preventDefault(),e[0].focus()),process.env.NODE_ENV==="test"){const o=e.indexOf(n.target);o!==-1&&((t=e[s?o-1:o+1])==null||t.focus())}}},D_={beforeMount(n){n[ru]=cd(n),Hs.push(n),Hs.length<=1&&document.addEventListener("keydown",Fp)},updated(n){c.nextTick(()=>{n[ru]=cd(n)})},unmounted(){Hs.shift(),Hs.length===0&&document.removeEventListener("keydown",Fp)}},R_=Kt({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:ct([String,Array,Object])},zIndex:{type:ct([String,Number])}}),I_={click:n=>n instanceof MouseEvent},L_="overlay";var B_=c.defineComponent({name:"ElOverlay",props:R_,emits:I_,setup(n,{slots:t,emit:e}){const s=me(L_),r=l=>{e("click",l)},{onClick:i,onMousedown:o,onMouseup:a}=Kg(n.customMaskEvent?void 0:r);return()=>n.mask?c.createVNode("div",{class:[s.b(),n.overlayClass],style:{zIndex:n.zIndex},onClick:i,onMousedown:o,onMouseup:a},[c.renderSlot(t,"default")],ma.STYLE|ma.CLASS|ma.PROPS,["onClick","onMouseup","onMousedown"]):c.h("div",{class:n.overlayClass,style:{zIndex:n.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[c.renderSlot(t,"default")])}});const V_=B_,Hp=["success","info","warning","error"],de=Pg({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:Gt?document.body:void 0}),j_=Kt({customClass:{type:String,default:de.customClass},center:{type:Boolean,default:de.center},dangerouslyUseHTMLString:{type:Boolean,default:de.dangerouslyUseHTMLString},duration:{type:Number,default:de.duration},icon:{type:Di,default:de.icon},id:{type:String,default:de.id},message:{type:ct([String,Object,Function]),default:de.message},onClose:{type:ct(Function),default:de.onClose},showClose:{type:Boolean,default:de.showClose},type:{type:String,values:Hp,default:de.type},plain:{type:Boolean,default:de.plain},offset:{type:Number,default:de.offset},zIndex:{type:Number,default:de.zIndex},grouping:{type:Boolean,default:de.grouping},repeatNum:{type:Number,default:de.repeatNum}}),$_={destroy:()=>!0},rn=c.shallowReactive([]),z_=n=>{const t=rn.findIndex(r=>r.id===n),e=rn[t];let s;return t>0&&(s=rn[t-1]),{current:e,prev:s}},F_=n=>{const{prev:t}=z_(n);return t?t.vm.exposed.bottom.value:0},H_=(n,t)=>rn.findIndex(s=>s.id===n)>0?16:t,U_=c.defineComponent({name:"ElMessage"}),G_=c.defineComponent({...U_,props:j_,emits:$_,setup(n,{expose:t}){const e=n,{Close:s}=Og,{ns:r,zIndex:i}=hp("message"),{currentZIndex:o,nextZIndex:a}=i,l=c.ref(),u=c.ref(!1),h=c.ref(0);let f;const d=c.computed(()=>e.type?e.type==="error"?"danger":e.type:"info"),g=c.computed(()=>{const C=e.type;return{[r.bm("icon",C)]:C&&pa[C]}}),p=c.computed(()=>e.icon||pa[e.type]||""),m=c.computed(()=>F_(e.id)),y=c.computed(()=>H_(e.id,e.offset)+m.value),b=c.computed(()=>h.value+y.value),w=c.computed(()=>({top:`${y.value}px`,zIndex:o.value}));function x(){e.duration!==0&&({stop:f}=iv(()=>{S()},e.duration))}function v(){f==null||f()}function S(){u.value=!1}function E({code:C}){C===Cr.esc&&S()}return c.onMounted(()=>{x(),a(),u.value=!0}),c.watch(()=>e.repeatNum,()=>{v(),x()}),jn(document,"keydown",E),md(l,()=>{h.value=l.value.getBoundingClientRect().height}),t({visible:u,bottom:b,close:S}),(C,M)=>(c.openBlock(),c.createBlock(c.Transition,{name:c.unref(r).b("fade"),onBeforeLeave:C.onClose,onAfterLeave:T=>C.$emit("destroy"),persisted:""},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{id:C.id,ref_key:"messageRef",ref:l,class:c.normalizeClass([c.unref(r).b(),{[c.unref(r).m(C.type)]:C.type},c.unref(r).is("center",C.center),c.unref(r).is("closable",C.showClose),c.unref(r).is("plain",C.plain),C.customClass]),style:c.normalizeStyle(c.unref(w)),role:"alert",onMouseenter:v,onMouseleave:x},[C.repeatNum>1?(c.openBlock(),c.createBlock(c.unref(l_),{key:0,value:C.repeatNum,type:c.unref(d),class:c.normalizeClass(c.unref(r).e("badge"))},null,8,["value","type","class"])):c.createCommentVNode("v-if",!0),c.unref(p)?(c.openBlock(),c.createBlock(c.unref(Cn),{key:1,class:c.normalizeClass([c.unref(r).e("icon"),c.unref(g)])},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(c.unref(p))))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0),c.renderSlot(C.$slots,"default",{},()=>[C.dangerouslyUseHTMLString?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),c.createElementVNode("p",{class:c.normalizeClass(c.unref(r).e("content")),innerHTML:C.message},null,10,["innerHTML"])],2112)):(c.openBlock(),c.createElementBlock("p",{key:0,class:c.normalizeClass(c.unref(r).e("content"))},c.toDisplayString(C.message),3))]),C.showClose?(c.openBlock(),c.createBlock(c.unref(Cn),{key:2,class:c.normalizeClass(c.unref(r).e("closeBtn")),onClick:c.withModifiers(S,["stop"])},{default:c.withCtx(()=>[c.createVNode(c.unref(s))]),_:1},8,["class","onClick"])):c.createCommentVNode("v-if",!0)],46,["id"]),[[c.vShow,u.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var Y_=he(G_,[["__file","message.vue"]]);let W_=1;const Up=n=>{const t=!n||Xe(n)||c.isVNode(n)||Re(n)?{message:n}:n,e={...de,...t};if(!e.appendTo)e.appendTo=document.body;else if(Xe(e.appendTo)){let s=document.querySelector(e.appendTo);Fn(s)||(Pe("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),s=document.body),e.appendTo=s}return ha(en.grouping)&&!e.grouping&&(e.grouping=en.grouping),Be(en.duration)&&e.duration===3e3&&(e.duration=en.duration),Be(en.offset)&&e.offset===16&&(e.offset=en.offset),ha(en.showClose)&&!e.showClose&&(e.showClose=en.showClose),e},q_=n=>{const t=rn.indexOf(n);if(t===-1)return;rn.splice(t,1);const{handler:e}=n;e.close()},J_=({appendTo:n,...t},e)=>{const s=`message_${W_++}`,r=t.onClose,i=document.createElement("div"),o={...t,id:s,onClose:()=>{r==null||r(),q_(h)},onDestroy:()=>{c.render(null,i)}},a=c.createVNode(Y_,o,Re(o.message)||c.isVNode(o.message)?{default:Re(o.message)?o.message:()=>o.message}:null);a.appContext=e||Nr._context,c.render(a,i),n.appendChild(i.firstElementChild);const l=a.component,h={id:s,vnode:a,vm:l,handler:{close:()=>{l.exposed.visible.value=!1}},props:a.component.props};return h},Nr=(n={},t)=>{if(!Gt)return{close:()=>{}};const e=Up(n);if(e.grouping&&rn.length){const r=rn.find(({vnode:i})=>{var o;return((o=i.props)==null?void 0:o.message)===e.message});if(r)return r.props.repeatNum+=1,r.props.type=e.type,r.handler}if(Be(en.max)&&rn.length>=en.max)return{close:()=>{}};const s=J_(e,t);return rn.push(s),s.handler};Hp.forEach(n=>{Nr[n]=(t={},e)=>{const s=Up(t);return Nr({...s,type:n},e)}});function X_(n){for(const t of rn)(!n||n===t.props.type)&&t.handler.close()}Nr.closeAll=X_,Nr._context=null;const Bt=sA(Nr,"$message"),K_=c.defineComponent({name:"ElMessageBox",directives:{TrapFocus:D_},components:{ElButton:__,ElFocusTrap:Np,ElInput:nN,ElOverlay:V_,ElIcon:Cn,...Og},inheritAttrs:!1,props:{buttonSize:{type:String,validator:iA},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(n,{emit:t}){const{locale:e,zIndex:s,ns:r,size:i}=hp("message-box",c.computed(()=>n.buttonSize)),{t:o}=e,{nextZIndex:a}=s,l=c.ref(!1),u=c.reactive({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:c.markRaw(fa),cancelButtonLoadingIcon:c.markRaw(fa),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),h=c.computed(()=>{const P=u.type;return{[r.bm("icon",P)]:P&&pa[P]}}),f=Ca(),d=Ca(),g=c.computed(()=>u.icon||pa[u.type]||""),p=c.computed(()=>!!u.message),m=c.ref(),y=c.ref(),b=c.ref(),w=c.ref(),x=c.ref(),v=c.computed(()=>u.confirmButtonClass);c.watch(()=>u.inputValue,async P=>{await c.nextTick(),n.boxType==="prompt"&&P!==null&&D()},{immediate:!0}),c.watch(()=>l.value,P=>{var L,V;P&&(n.boxType!=="prompt"&&(u.autofocus?b.value=(V=(L=x.value)==null?void 0:L.$el)!=null?V:m.value:b.value=m.value),u.zIndex=a()),n.boxType==="prompt"&&(P?c.nextTick().then(()=>{var Y;w.value&&w.value.$el&&(u.autofocus?b.value=(Y=N())!=null?Y:m.value:b.value=m.value)}):(u.editorErrorMessage="",u.validateError=!1))});const S=c.computed(()=>n.draggable),E=c.computed(()=>n.overflow);hA(m,y,S,E),c.onMounted(async()=>{await c.nextTick(),n.closeOnHashChange&&window.addEventListener("hashchange",C)}),c.onBeforeUnmount(()=>{n.closeOnHashChange&&window.removeEventListener("hashchange",C)});function C(){l.value&&(l.value=!1,c.nextTick(()=>{u.action&&t("action",u.action)}))}const M=()=>{n.closeOnClickModal&&_(u.distinguishCancelAndClose?"close":"cancel")},T=Kg(M),k=P=>{if(u.inputType!=="textarea")return P.preventDefault(),_("confirm")},_=P=>{var L;n.boxType==="prompt"&&P==="confirm"&&!D()||(u.action=P,u.beforeClose?(L=u.beforeClose)==null||L.call(u,P,u,C):C())},D=()=>{if(n.boxType==="prompt"){const P=u.inputPattern;if(P&&!P.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||o("el.messagebox.error"),u.validateError=!0,!1;const L=u.inputValidator;if(typeof L=="function"){const V=L(u.inputValue);if(V===!1)return u.editorErrorMessage=u.inputErrorMessage||o("el.messagebox.error"),u.validateError=!0,!1;if(typeof V=="string")return u.editorErrorMessage=V,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},N=()=>{const P=w.value.$refs;return P.input||P.textarea},j=()=>{_("close")},A=()=>{n.closeOnPressEscape&&j()};return n.lockScroll&&bA(l),{...c.toRefs(u),ns:r,overlayEvent:T,visible:l,hasMessage:p,typeClass:h,contentId:f,inputId:d,btnSize:i,iconComponent:g,confirmButtonClasses:v,rootRef:m,focusStartRef:b,headerRef:y,inputRef:w,confirmRef:x,doClose:C,handleClose:j,onCloseRequested:A,handleWrapperClick:M,handleInputEnter:k,handleAction:_,t:o}}});function Z_(n,t,e,s,r,i){const o=c.resolveComponent("el-icon"),a=c.resolveComponent("close"),l=c.resolveComponent("el-input"),u=c.resolveComponent("el-button"),h=c.resolveComponent("el-focus-trap"),f=c.resolveComponent("el-overlay");return c.openBlock(),c.createBlock(c.Transition,{name:"fade-in-linear",onAfterLeave:d=>n.$emit("vanish"),persisted:""},{default:c.withCtx(()=>[c.withDirectives(c.createVNode(f,{"z-index":n.zIndex,"overlay-class":[n.ns.is("message-box"),n.modalClass],mask:n.modal},{default:c.withCtx(()=>[c.createElementVNode("div",{role:"dialog","aria-label":n.title,"aria-modal":"true","aria-describedby":n.showInput?void 0:n.contentId,class:c.normalizeClass(`${n.ns.namespace.value}-overlay-message-box`),onClick:n.overlayEvent.onClick,onMousedown:n.overlayEvent.onMousedown,onMouseup:n.overlayEvent.onMouseup},[c.createVNode(h,{loop:"",trapped:n.visible,"focus-trap-el":n.rootRef,"focus-start-el":n.focusStartRef,onReleaseRequested:n.onCloseRequested},{default:c.withCtx(()=>[c.createElementVNode("div",{ref:"rootRef",class:c.normalizeClass([n.ns.b(),n.customClass,n.ns.is("draggable",n.draggable),{[n.ns.m("center")]:n.center}]),style:c.normalizeStyle(n.customStyle),tabindex:"-1",onClick:c.withModifiers(()=>{},["stop"])},[n.title!==null&&n.title!==void 0?(c.openBlock(),c.createElementBlock("div",{key:0,ref:"headerRef",class:c.normalizeClass([n.ns.e("header"),{"show-close":n.showClose}])},[c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("title"))},[n.iconComponent&&n.center?(c.openBlock(),c.createBlock(o,{key:0,class:c.normalizeClass([n.ns.e("status"),n.typeClass])},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.iconComponent)))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0),c.createElementVNode("span",null,c.toDisplayString(n.title),1)],2),n.showClose?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(n.ns.e("headerbtn")),"aria-label":n.t("el.messagebox.close"),onClick:d=>n.handleAction(n.distinguishCancelAndClose?"close":"cancel"),onKeydown:c.withKeys(c.withModifiers(d=>n.handleAction(n.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[c.createVNode(o,{class:c.normalizeClass(n.ns.e("close"))},{default:c.withCtx(()=>[c.createVNode(a)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):c.createCommentVNode("v-if",!0)],2)):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{id:n.contentId,class:c.normalizeClass(n.ns.e("content"))},[c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("container"))},[n.iconComponent&&!n.center&&n.hasMessage?(c.openBlock(),c.createBlock(o,{key:0,class:c.normalizeClass([n.ns.e("status"),n.typeClass])},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.iconComponent)))]),_:1},8,["class"])):c.createCommentVNode("v-if",!0),n.hasMessage?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(n.ns.e("message"))},[c.renderSlot(n.$slots,"default",{},()=>[n.dangerouslyUseHTMLString?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.showInput?"label":"p"),{key:1,for:n.showInput?n.inputId:void 0,innerHTML:n.message},null,8,["for","innerHTML"])):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.showInput?"label":"p"),{key:0,for:n.showInput?n.inputId:void 0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.dangerouslyUseHTMLString?"":n.message),1)]),_:1},8,["for"]))])],2)):c.createCommentVNode("v-if",!0)],2),c.withDirectives(c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("input"))},[c.createVNode(l,{id:n.inputId,ref:"inputRef",modelValue:n.inputValue,"onUpdate:modelValue":d=>n.inputValue=d,type:n.inputType,placeholder:n.inputPlaceholder,"aria-invalid":n.validateError,class:c.normalizeClass({invalid:n.validateError}),onKeydown:c.withKeys(n.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("errormsg")),style:c.normalizeStyle({visibility:n.editorErrorMessage?"visible":"hidden"})},c.toDisplayString(n.editorErrorMessage),7)],2),[[c.vShow,n.showInput]])],10,["id"]),c.createElementVNode("div",{class:c.normalizeClass(n.ns.e("btns"))},[n.showCancelButton?(c.openBlock(),c.createBlock(u,{key:0,loading:n.cancelButtonLoading,"loading-icon":n.cancelButtonLoadingIcon,class:c.normalizeClass([n.cancelButtonClass]),round:n.roundButton,size:n.btnSize,onClick:d=>n.handleAction("cancel"),onKeydown:c.withKeys(c.withModifiers(d=>n.handleAction("cancel"),["prevent"]),["enter"])},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.cancelButtonText||n.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):c.createCommentVNode("v-if",!0),c.withDirectives(c.createVNode(u,{ref:"confirmRef",type:"primary",loading:n.confirmButtonLoading,"loading-icon":n.confirmButtonLoadingIcon,class:c.normalizeClass([n.confirmButtonClasses]),round:n.roundButton,disabled:n.confirmButtonDisabled,size:n.btnSize,onClick:d=>n.handleAction("confirm"),onKeydown:c.withKeys(c.withModifiers(d=>n.handleAction("confirm"),["prevent"]),["enter"])},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.confirmButtonText||n.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[c.vShow,n.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"]),[[c.vShow,n.visible]])]),_:3},8,["onAfterLeave"])}var Q_=he(K_,[["render",Z_],["__file","index.vue"]]);const zi=new Map,tk=n=>{let t=document.body;return n.appendTo&&(Xe(n.appendTo)&&(t=document.querySelector(n.appendTo)),Fn(n.appendTo)&&(t=n.appendTo),Fn(t)||(Pe("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body)),t},ek=(n,t,e=null)=>{const s=c.createVNode(Q_,n,Re(n.message)||c.isVNode(n.message)?{default:Re(n.message)?n.message:()=>n.message}:null);return s.appContext=e,c.render(s,t),tk(n).appendChild(t.firstElementChild),s.component},nk=()=>document.createElement("div"),sk=(n,t)=>{const e=nk();n.onVanish=()=>{c.render(null,e),zi.delete(r)},n.onAction=i=>{const o=zi.get(r);let a;n.showInput?a={value:r.inputValue,action:i}:a=i,n.callback?n.callback(a,s.proxy):i==="cancel"||i==="close"?n.distinguishCancelAndClose&&i!=="cancel"?o.reject("close"):o.reject("cancel"):o.resolve(a)};const s=ek(n,e,t),r=s.proxy;for(const i in n)zo(n,i)&&!zo(r.$props,i)&&(r[i]=n[i]);return r.visible=!0,r};function _r(n,t=null){if(!Gt)return Promise.reject();let e;return Xe(n)||c.isVNode(n)?n={message:n}:e=n.callback,new Promise((s,r)=>{const i=sk(n,t??_r._context);zi.set(i,{options:n,callback:e,resolve:s,reject:r})})}const rk=["alert","confirm","prompt"],ik={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};rk.forEach(n=>{_r[n]=ok(n)});function ok(n){return(t,e,s,r)=>{let i="";return hr(e)?(s=e,i=""):dg(e)?i="":i=e,_r(Object.assign({title:i,message:t,type:"",...ik[n]},s,{boxType:n}),r)}}_r.close=()=>{zi.forEach((n,t)=>{t.doClose()}),zi.clear()},_r._context=null;const cs=_r;cs.install=n=>{cs._context=n._context,n.config.globalProperties.$msgbox=cs,n.config.globalProperties.$messageBox=cs,n.config.globalProperties.$alert=cs.alert,n.config.globalProperties.$confirm=cs.confirm,n.config.globalProperties.$prompt=cs.prompt};const ak=cs;function Gp(n,t){return function(){return n.apply(t,arguments)}}const{toString:lk}=Object.prototype,{getPrototypeOf:iu}=Object,_a=(n=>t=>{const e=lk.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),on=n=>(n=n.toLowerCase(),t=>_a(t)===n),ka=n=>t=>typeof t===n,{isArray:kr}=Array,Fi=ka("undefined");function ck(n){return n!==null&&!Fi(n)&&n.constructor!==null&&!Fi(n.constructor)&&Te(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Yp=on("ArrayBuffer");function uk(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Yp(n.buffer),t}const hk=ka("string"),Te=ka("function"),Wp=ka("number"),Da=n=>n!==null&&typeof n=="object",dk=n=>n===!0||n===!1,Ra=n=>{if(_a(n)!=="object")return!1;const t=iu(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},fk=on("Date"),gk=on("File"),pk=on("Blob"),mk=on("FileList"),yk=n=>Da(n)&&Te(n.pipe),bk=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Te(n.append)&&((t=_a(n))==="formdata"||t==="object"&&Te(n.toString)&&n.toString()==="[object FormData]"))},wk=on("URLSearchParams"),[xk,vk,Ck,Sk]=["ReadableStream","Request","Response","Headers"].map(on),Ek=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hi(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let s,r;if(typeof n!="object"&&(n=[n]),kr(n))for(s=0,r=n.length;s<r;s++)t.call(null,n[s],s,n);else{const i=e?Object.getOwnPropertyNames(n):Object.keys(n),o=i.length;let a;for(s=0;s<o;s++)a=i[s],t.call(null,n[a],a,n)}}function qp(n,t){t=t.toLowerCase();const e=Object.keys(n);let s=e.length,r;for(;s-- >0;)if(r=e[s],t===r.toLowerCase())return r;return null}const Us=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jp=n=>!Fi(n)&&n!==Us;function ou(){const{caseless:n}=Jp(this)&&this||{},t={},e=(s,r)=>{const i=n&&qp(t,r)||r;Ra(t[i])&&Ra(s)?t[i]=ou(t[i],s):Ra(s)?t[i]=ou({},s):kr(s)?t[i]=s.slice():t[i]=s};for(let s=0,r=arguments.length;s<r;s++)arguments[s]&&Hi(arguments[s],e);return t}const Ok=(n,t,e,{allOwnKeys:s}={})=>(Hi(t,(r,i)=>{e&&Te(r)?n[i]=Gp(r,e):n[i]=r},{allOwnKeys:s}),n),Mk=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Pk=(n,t,e,s)=>{n.prototype=Object.create(t.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},Ak=(n,t,e,s)=>{let r,i,o;const a={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),i=r.length;i-- >0;)o=r[i],(!s||s(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&iu(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},Tk=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const s=n.indexOf(t,e);return s!==-1&&s===e},Nk=n=>{if(!n)return null;if(kr(n))return n;let t=n.length;if(!Wp(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},_k=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&iu(Uint8Array)),kk=(n,t)=>{const s=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=s.next())&&!r.done;){const i=r.value;t.call(n,i[0],i[1])}},Dk=(n,t)=>{let e;const s=[];for(;(e=n.exec(t))!==null;)s.push(e);return s},Rk=on("HTMLFormElement"),Ik=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,r){return s.toUpperCase()+r}),Xp=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),Lk=on("RegExp"),Kp=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),s={};Hi(e,(r,i)=>{let o;(o=t(r,i,n))!==!1&&(s[i]=o||r)}),Object.defineProperties(n,s)},Bk=n=>{Kp(n,(t,e)=>{if(Te(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const s=n[e];if(Te(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Vk=(n,t)=>{const e={},s=r=>{r.forEach(i=>{e[i]=!0})};return kr(n)?s(n):s(String(n).split(t)),e},jk=()=>{},$k=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t,au="abcdefghijklmnopqrstuvwxyz",Zp="0123456789",Qp={DIGIT:Zp,ALPHA:au,ALPHA_DIGIT:au+au.toUpperCase()+Zp},zk=(n=16,t=Qp.ALPHA_DIGIT)=>{let e="";const{length:s}=t;for(;n--;)e+=t[Math.random()*s|0];return e};function Fk(n){return!!(n&&Te(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const Hk=n=>{const t=new Array(10),e=(s,r)=>{if(Da(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[r]=s;const i=kr(s)?[]:{};return Hi(s,(o,a)=>{const l=e(o,r+1);!Fi(l)&&(i[a]=l)}),t[r]=void 0,i}}return s};return e(n,0)},Uk=on("AsyncFunction"),Gk=n=>n&&(Da(n)||Te(n))&&Te(n.then)&&Te(n.catch),tm=((n,t)=>n?setImmediate:t?((e,s)=>(Us.addEventListener("message",({source:r,data:i})=>{r===Us&&i===e&&s.length&&s.shift()()},!1),r=>{s.push(r),Us.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Te(Us.postMessage)),Yk=typeof queueMicrotask<"u"?queueMicrotask.bind(Us):typeof process<"u"&&process.nextTick||tm,R={isArray:kr,isArrayBuffer:Yp,isBuffer:ck,isFormData:bk,isArrayBufferView:uk,isString:hk,isNumber:Wp,isBoolean:dk,isObject:Da,isPlainObject:Ra,isReadableStream:xk,isRequest:vk,isResponse:Ck,isHeaders:Sk,isUndefined:Fi,isDate:fk,isFile:gk,isBlob:pk,isRegExp:Lk,isFunction:Te,isStream:yk,isURLSearchParams:wk,isTypedArray:_k,isFileList:mk,forEach:Hi,merge:ou,extend:Ok,trim:Ek,stripBOM:Mk,inherits:Pk,toFlatObject:Ak,kindOf:_a,kindOfTest:on,endsWith:Tk,toArray:Nk,forEachEntry:kk,matchAll:Dk,isHTMLForm:Rk,hasOwnProperty:Xp,hasOwnProp:Xp,reduceDescriptors:Kp,freezeMethods:Bk,toObjectSet:Vk,toCamelCase:Ik,noop:jk,toFiniteNumber:$k,findKey:qp,global:Us,isContextDefined:Jp,ALPHABET:Qp,generateString:zk,isSpecCompliantForm:Fk,toJSONObject:Hk,isAsyncFn:Uk,isThenable:Gk,setImmediate:tm,asap:Yk};function at(n,t,e,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),s&&(this.request=s),r&&(this.response=r,this.status=r.status?r.status:null)}R.inherits(at,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:R.toJSONObject(this.config),code:this.code,status:this.status}}});const em=at.prototype,nm={};["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(n=>{nm[n]={value:n}}),Object.defineProperties(at,nm),Object.defineProperty(em,"isAxiosError",{value:!0}),at.from=(n,t,e,s,r,i)=>{const o=Object.create(em);return R.toFlatObject(n,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),at.call(o,n.message,t,e,s,r),o.cause=n,o.name=n.name,i&&Object.assign(o,i),o};const Wk=null;function lu(n){return R.isPlainObject(n)||R.isArray(n)}function sm(n){return R.endsWith(n,"[]")?n.slice(0,-2):n}function rm(n,t,e){return n?n.concat(t).map(function(r,i){return r=sm(r),!e&&i?"["+r+"]":r}).join(e?".":""):t}function qk(n){return R.isArray(n)&&!n.some(lu)}const Jk=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function Ia(n,t,e){if(!R.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=R.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!R.isUndefined(y[m])});const s=e.metaTokens,r=e.visitor||h,i=e.dots,o=e.indexes,l=(e.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(r))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(R.isDate(p))return p.toISOString();if(!l&&R.isBlob(p))throw new at("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(p)||R.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function h(p,m,y){let b=p;if(p&&!y&&typeof p=="object"){if(R.endsWith(m,"{}"))m=s?m:m.slice(0,-2),p=JSON.stringify(p);else if(R.isArray(p)&&qk(p)||(R.isFileList(p)||R.endsWith(m,"[]"))&&(b=R.toArray(p)))return m=sm(m),b.forEach(function(x,v){!(R.isUndefined(x)||x===null)&&t.append(o===!0?rm([m],v,i):o===null?m:m+"[]",u(x))}),!1}return lu(p)?!0:(t.append(rm(y,m,i),u(p)),!1)}const f=[],d=Object.assign(Jk,{defaultVisitor:h,convertValue:u,isVisitable:lu});function g(p,m){if(!R.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(p),R.forEach(p,function(b,w){(!(R.isUndefined(b)||b===null)&&r.call(t,b,R.isString(w)?w.trim():w,m,d))===!0&&g(b,m?m.concat(w):[w])}),f.pop()}}if(!R.isObject(n))throw new TypeError("data must be an object");return g(n),t}function im(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function cu(n,t){this._pairs=[],n&&Ia(n,this,t)}const om=cu.prototype;om.append=function(t,e){this._pairs.push([t,e])},om.toString=function(t){const e=t?function(s){return t.call(this,s,im)}:im;return this._pairs.map(function(r){return e(r[0])+"="+e(r[1])},"").join("&")};function Xk(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function am(n,t,e){if(!t)return n;const s=e&&e.encode||Xk,r=e&&e.serialize;let i;if(r?i=r(t,e):i=R.isURLSearchParams(t)?t.toString():new cu(t,e).toString(s),i){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n}class lm{constructor(){this.handlers=[]}use(t,e,s){return this.handlers.push({fulfilled:t,rejected:e,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(s){s!==null&&t(s)})}}const cm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Kk={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:cu,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},uu=typeof window<"u"&&typeof document<"u",hu=typeof navigator=="object"&&navigator||void 0,Zk=uu&&(!hu||["ReactNative","NativeScript","NS"].indexOf(hu.product)<0),Qk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tD=uu&&window.location.href||"http://localhost",Ce={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uu,hasStandardBrowserEnv:Zk,hasStandardBrowserWebWorkerEnv:Qk,navigator:hu,origin:tD},Symbol.toStringTag,{value:"Module"})),...Kk};function eD(n,t){return Ia(n,new Ce.classes.URLSearchParams,Object.assign({visitor:function(e,s,r,i){return Ce.isNode&&R.isBuffer(e)?(this.append(s,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function nD(n){return R.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function sD(n){const t={},e=Object.keys(n);let s;const r=e.length;let i;for(s=0;s<r;s++)i=e[s],t[i]=n[i];return t}function um(n){function t(e,s,r,i){let o=e[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=e.length;return o=!o&&R.isArray(r)?r.length:o,l?(R.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!a):((!r[o]||!R.isObject(r[o]))&&(r[o]=[]),t(e,s,r[o],i)&&R.isArray(r[o])&&(r[o]=sD(r[o])),!a)}if(R.isFormData(n)&&R.isFunction(n.entries)){const e={};return R.forEachEntry(n,(s,r)=>{t(nD(s),r,e,0)}),e}return null}function rD(n,t,e){if(R.isString(n))try{return(t||JSON.parse)(n),R.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(0,JSON.stringify)(n)}const Ui={transitional:cm,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",r=s.indexOf("application/json")>-1,i=R.isObject(t);if(i&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return r?JSON.stringify(um(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return eD(t,this.formSerializer).toString();if((a=R.isFileList(t))||s.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ia(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),rD(t)):t}],transformResponse:[function(t){const e=this.transitional||Ui.transitional,s=e&&e.forcedJSONParsing,r=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(s&&!this.responseType||r)){const o=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?at.from(a,at.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ce.classes.FormData,Blob:Ce.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],n=>{Ui.headers[n]={}});const iD=R.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"]),oD=n=>{const t={};let e,s,r;return n&&n.split(`
30
30
  `).forEach(function(o){r=o.indexOf(":"),e=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!e||t[e]&&iD[e])&&(e==="set-cookie"?t[e]?t[e].push(s):t[e]=[s]:t[e]=t[e]?t[e]+", "+s:s)}),t},hm=Symbol("internals");function Gi(n){return n&&String(n).trim().toLowerCase()}function La(n){return n===!1||n==null?n:R.isArray(n)?n.map(La):String(n)}function aD(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=e.exec(n);)t[s[1]]=s[2];return t}const lD=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function du(n,t,e,s,r){if(R.isFunction(s))return s.call(this,t,e);if(r&&(t=e),!!R.isString(t)){if(R.isString(s))return t.indexOf(s)!==-1;if(R.isRegExp(s))return s.test(t)}}function cD(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,s)=>e.toUpperCase()+s)}function uD(n,t){const e=R.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(n,s+e,{value:function(r,i,o){return this[s].call(this,t,r,i,o)},configurable:!0})})}class Se{constructor(t){t&&this.set(t)}set(t,e,s){const r=this;function i(a,l,u){const h=Gi(l);if(!h)throw new Error("header name must be a non-empty string");const f=R.findKey(r,h);(!f||r[f]===void 0||u===!0||u===void 0&&r[f]!==!1)&&(r[f||l]=La(a))}const o=(a,l)=>R.forEach(a,(u,h)=>i(u,h,l));if(R.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(R.isString(t)&&(t=t.trim())&&!lD(t))o(oD(t),e);else if(R.isHeaders(t))for(const[a,l]of t.entries())i(l,a,s);else t!=null&&i(e,t,s);return this}get(t,e){if(t=Gi(t),t){const s=R.findKey(this,t);if(s){const r=this[s];if(!e)return r;if(e===!0)return aD(r);if(R.isFunction(e))return e.call(this,r,s);if(R.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Gi(t),t){const s=R.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||du(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let r=!1;function i(o){if(o=Gi(o),o){const a=R.findKey(s,o);a&&(!e||du(s,s[a],a,e))&&(delete s[a],r=!0)}}return R.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let s=e.length,r=!1;for(;s--;){const i=e[s];(!t||du(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const e=this,s={};return R.forEach(this,(r,i)=>{const o=R.findKey(s,i);if(o){e[o]=La(r),delete e[i];return}const a=t?cD(i):String(i).trim();a!==i&&delete e[i],e[a]=La(r),s[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return R.forEach(this,(s,r)=>{s!=null&&s!==!1&&(e[r]=t&&R.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
31
31
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[hm]=this[hm]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=Gi(o);s[a]||(uD(r,o),s[a]=!0)}return R.isArray(t)?t.forEach(i):i(t),this}}Se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(Se.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(s){this[e]=s}}}),R.freezeMethods(Se);function fu(n,t){const e=this||Ui,s=t||e,r=Se.from(s.headers);let i=s.data;return R.forEach(n,function(a){i=a.call(e,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function dm(n){return!!(n&&n.__CANCEL__)}function Dr(n,t,e){at.call(this,n??"canceled",at.ERR_CANCELED,t,e),this.name="CanceledError"}R.inherits(Dr,at,{__CANCEL__:!0});function fm(n,t,e){const s=e.config.validateStatus;!e.status||!s||s(e.status)?n(e):t(new at("Request failed with status code "+e.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function hD(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function dD(n,t){n=n||10;const e=new Array(n),s=new Array(n);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),h=s[i];o||(o=u),e[r]=l,s[r]=u;let f=i,d=0;for(;f!==r;)d+=e[f++],f=f%n;if(r=(r+1)%n,r===i&&(i=(i+1)%n),u-o<t)return;const g=h&&u-h;return g?Math.round(d*1e3/g):void 0}}function fD(n,t){let e=0,s=1e3/t,r,i;const o=(u,h=Date.now())=>{e=h,r=null,i&&(clearTimeout(i),i=null),n.apply(null,u)};return[(...u)=>{const h=Date.now(),f=h-e;f>=s?o(u,h):(r=u,i||(i=setTimeout(()=>{i=null,o(r)},s-f)))},()=>r&&o(r)]}const Ba=(n,t,e=3)=>{let s=0;const r=dD(50,250);return fD(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-s,u=r(l),h=o<=a;s=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&h?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(f)},e)},gm=(n,t)=>{const e=n!=null;return[s=>t[0]({lengthComputable:e,total:n,loaded:s}),t[1]]},pm=n=>(...t)=>R.asap(()=>n(...t)),gD=Ce.hasStandardBrowserEnv?function(){const t=Ce.navigator&&/(msie|trident)/i.test(Ce.navigator.userAgent),e=document.createElement("a");let s;function r(i){let o=i;return t&&(e.setAttribute("href",o),o=e.href),e.setAttribute("href",o),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return s=r(window.location.href),function(o){const a=R.isString(o)?r(o):o;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}(),pD=Ce.hasStandardBrowserEnv?{write(n,t,e,s,r,i){const o=[n+"="+encodeURIComponent(t)];R.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),R.isString(s)&&o.push("path="+s),R.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function mD(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function yD(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function mm(n,t){return n&&!mD(t)?yD(n,t):t}const ym=n=>n instanceof Se?{...n}:n;function Gs(n,t){t=t||{};const e={};function s(u,h,f){return R.isPlainObject(u)&&R.isPlainObject(h)?R.merge.call({caseless:f},u,h):R.isPlainObject(h)?R.merge({},h):R.isArray(h)?h.slice():h}function r(u,h,f){if(R.isUndefined(h)){if(!R.isUndefined(u))return s(void 0,u,f)}else return s(u,h,f)}function i(u,h){if(!R.isUndefined(h))return s(void 0,h)}function o(u,h){if(R.isUndefined(h)){if(!R.isUndefined(u))return s(void 0,u)}else return s(void 0,h)}function a(u,h,f){if(f in t)return s(u,h);if(f in n)return s(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,h)=>r(ym(u),ym(h),!0)};return R.forEach(Object.keys(Object.assign({},n,t)),function(h){const f=l[h]||r,d=f(n[h],t[h],h);R.isUndefined(d)&&f!==a||(e[h]=d)}),e}const bm=n=>{const t=Gs({},n);let{data:e,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=Se.from(o),t.url=am(mm(t.baseURL,t.url),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(R.isFormData(e)){if(Ce.hasStandardBrowserEnv||Ce.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...h]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...h].join("; "))}}if(Ce.hasStandardBrowserEnv&&(s&&R.isFunction(s)&&(s=s(t)),s||s!==!1&&gD(t.url))){const u=r&&i&&pD.read(i);u&&o.set(r,u)}return t},bD=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(e,s){const r=bm(n);let i=r.data;const o=Se.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,h,f,d,g,p;function m(){g&&g(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let y=new XMLHttpRequest;y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout;function b(){if(!y)return;const x=Se.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:x,config:n,request:y};fm(function(C){e(C),m()},function(C){s(C),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&&(s(new at("Request aborted",at.ECONNABORTED,n,y)),y=null)},y.onerror=function(){s(new at("Network Error",at.ERR_NETWORK,n,y)),y=null},y.ontimeout=function(){let v=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const S=r.transitional||cm;r.timeoutErrorMessage&&(v=r.timeoutErrorMessage),s(new at(v,S.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,n,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&R.forEach(o.toJSON(),function(v,S){y.setRequestHeader(S,v)}),R.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),a&&a!=="json"&&(y.responseType=r.responseType),u&&([d,p]=Ba(u,!0),y.addEventListener("progress",d)),l&&y.upload&&([f,g]=Ba(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(h=x=>{y&&(s(!x||x.type?new Dr(null,n,y):x),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const w=hD(r.url);if(w&&Ce.protocols.indexOf(w)===-1){s(new at("Unsupported protocol "+w+":",at.ERR_BAD_REQUEST,n));return}y.send(i||null)})},wD=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let s=new AbortController,r;const i=function(u){if(!r){r=!0,a();const h=u instanceof Error?u:this.reason;s.abort(h instanceof at?h:new Dr(h instanceof Error?h.message:h))}};let o=t&&setTimeout(()=>{o=null,i(new at(`timeout ${t} of ms exceeded`,at.ETIMEDOUT))},t);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),n=null)};n.forEach(u=>u.addEventListener("abort",i));const{signal:l}=s;return l.unsubscribe=()=>R.asap(a),l}},xD=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let s=0,r;for(;s<e;)r=s+t,yield n.slice(s,r),s=r},vD=async function*(n,t){for await(const e of CD(n))yield*xD(e,t)},CD=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}},wm=(n,t,e,s)=>{const r=vD(n,t);let i=0,o,a=l=>{o||(o=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:u,value:h}=await r.next();if(u){a(),l.close();return}let f=h.byteLength;if(e){let d=i+=f;e(d)}l.enqueue(new Uint8Array(h))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Va=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",xm=Va&&typeof ReadableStream=="function",SD=Va&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),vm=(n,...t)=>{try{return!!n(...t)}catch{return!1}},ED=xm&&vm(()=>{let n=!1;const t=new Request(Ce.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Cm=64*1024,gu=xm&&vm(()=>R.isReadableStream(new Response("").body)),ja={stream:gu&&(n=>n.body)};Va&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ja[t]&&(ja[t]=R.isFunction(n[t])?e=>e[t]():(e,s)=>{throw new at(`Response type '${t}' is not supported`,at.ERR_NOT_SUPPORT,s)})})})(new Response);const OD=async n=>{if(n==null)return 0;if(R.isBlob(n))return n.size;if(R.isSpecCompliantForm(n))return(await new Request(Ce.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(R.isArrayBufferView(n)||R.isArrayBuffer(n))return n.byteLength;if(R.isURLSearchParams(n)&&(n=n+""),R.isString(n))return(await SD(n)).byteLength},MD=async(n,t)=>{const e=R.toFiniteNumber(n.getContentLength());return e??OD(t)},pu={http:Wk,xhr:bD,fetch:Va&&(async n=>{let{url:t,method:e,data:s,signal:r,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:h,withCredentials:f="same-origin",fetchOptions:d}=bm(n);u=u?(u+"").toLowerCase():"text";let g=wD([r,i&&i.toAbortSignal()],o),p;const m=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(l&&ED&&e!=="get"&&e!=="head"&&(y=await MD(h,s))!==0){let S=new Request(t,{method:"POST",body:s,duplex:"half"}),E;if(R.isFormData(s)&&(E=S.headers.get("content-type"))&&h.setContentType(E),S.body){const[C,M]=gm(y,Ba(pm(l)));s=wm(S.body,Cm,C,M)}}R.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;p=new Request(t,{...d,signal:g,method:e.toUpperCase(),headers:h.normalize().toJSON(),body:s,duplex:"half",credentials:b?f:void 0});let w=await fetch(p);const x=gu&&(u==="stream"||u==="response");if(gu&&(a||x&&m)){const S={};["status","statusText","headers"].forEach(T=>{S[T]=w[T]});const E=R.toFiniteNumber(w.headers.get("content-length")),[C,M]=a&&gm(E,Ba(pm(a),!0))||[];w=new Response(wm(w.body,Cm,C,()=>{M&&M(),m&&m()}),S)}u=u||"text";let v=await ja[R.findKey(ja,u)||"text"](w,n);return!x&&m&&m(),await new Promise((S,E)=>{fm(S,E,{data:v,headers:Se.from(w.headers),status:w.status,statusText:w.statusText,config:n,request:p})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new at("Network Error",at.ERR_NETWORK,n,p),{cause:b.cause||b}):at.from(b,b&&b.code,n,p)}})};R.forEach(pu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Sm=n=>`- ${n}`,PD=n=>R.isFunction(n)||n===null||n===!1,Em={getAdapter:n=>{n=R.isArray(n)?n:[n];const{length:t}=n;let e,s;const r={};for(let i=0;i<t;i++){e=n[i];let o;if(s=e,!PD(e)&&(s=pu[(o=String(e)).toLowerCase()],s===void 0))throw new at(`Unknown adapter '${o}'`);if(s)break;r[o||"#"+i]=s}if(!s){const i=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
32
32
  `+i.map(Sm).join(`
33
33
  `):" "+Sm(i[0]):"as no adapter specified";throw new at("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:pu};function mu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Dr(null,n)}function Om(n){return mu(n),n.headers=Se.from(n.headers),n.data=fu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Em.getAdapter(n.adapter||Ui.adapter)(n).then(function(s){return mu(n),s.data=fu.call(n,n.transformResponse,s),s.headers=Se.from(s.headers),s},function(s){return dm(s)||(mu(n),s&&s.response&&(s.response.data=fu.call(n,n.transformResponse,s.response),s.response.headers=Se.from(s.response.headers))),Promise.reject(s)})}const Mm="1.7.7",yu={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{yu[n]=function(s){return typeof s===n||"a"+(t<1?"n ":" ")+n}});const Pm={};yu.transitional=function(t,e,s){function r(i,o){return"[Axios v"+Mm+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(t===!1)throw new at(r(o," has been removed"+(e?" in "+e:"")),at.ERR_DEPRECATED);return e&&!Pm[o]&&(Pm[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(i,o,a):!0}};function AD(n,t,e){if(typeof n!="object")throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);const s=Object.keys(n);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const a=n[i],l=a===void 0||o(a,i,n);if(l!==!0)throw new at("option "+i+" must be "+l,at.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new at("Unknown option "+i,at.ERR_BAD_OPTION)}}const bu={assertOptions:AD,validators:yu},us=bu.validators;class Ys{constructor(t){this.defaults=t,this.interceptors={request:new lm,response:new lm}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
34
- `+i):s.stack=i}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Gs(this.defaults,e);const{transitional:s,paramsSerializer:r,headers:i}=e;s!==void 0&&bu.assertOptions(s,{silentJSONParsing:us.transitional(us.boolean),forcedJSONParsing:us.transitional(us.boolean),clarifyTimeoutError:us.transitional(us.boolean)},!1),r!=null&&(R.isFunction(r)?e.paramsSerializer={serialize:r}:bu.assertOptions(r,{encode:us.function,serialize:us.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&R.merge(i.common,i[e.method]);i&&R.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),e.headers=Se.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let h,f=0,d;if(!l){const p=[Om.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),d=p.length,h=Promise.resolve(e);f<d;)h=h.then(p[f++],p[f++]);return h}d=a.length;let g=e;for(f=0;f<d;){const p=a[f++],m=a[f++];try{g=p(g)}catch(y){m.call(this,y);break}}try{h=Om.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,d=u.length;f<d;)h=h.then(u[f++],u[f++]);return h}getUri(t){t=Gs(this.defaults,t);const e=mm(t.baseURL,t.url);return am(e,t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],function(t){Ys.prototype[t]=function(e,s){return this.request(Gs(s||{},{method:t,url:e,data:(s||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function e(s){return function(i,o,a){return this.request(Gs(a||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Ys.prototype[t]=e(),Ys.prototype[t+"Form"]=e(!0)});class wu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(i){e=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,a){s.reason||(s.reason=new Dr(i,o,a),e(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=s=>{t.abort(s)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new wu(function(r){t=r}),cancel:t}}}function TD(n){return function(e){return n.apply(null,e)}}function ND(n){return R.isObject(n)&&n.isAxiosError===!0}const xu={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(xu).forEach(([n,t])=>{xu[t]=n});function Am(n){const t=new Ys(n),e=Gp(Ys.prototype.request,t);return R.extend(e,Ys.prototype,t,{allOwnKeys:!0}),R.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Am(Gs(n,r))},e}const Wt=Am(Ui);Wt.Axios=Ys,Wt.CanceledError=Dr,Wt.CancelToken=wu,Wt.isCancel=dm,Wt.VERSION=Mm,Wt.toFormData=Ia,Wt.AxiosError=at,Wt.Cancel=Wt.CanceledError,Wt.all=function(t){return Promise.all(t)},Wt.spread=TD,Wt.isAxiosError=ND,Wt.mergeConfig=Gs,Wt.AxiosHeaders=Se,Wt.formToJSON=n=>um(R.isHTMLForm(n)?new FormData(n):n),Wt.getAdapter=Em.getAdapter,Wt.HttpStatusCode=xu,Wt.default=Wt;const hs=Wt.create({baseURL:"http://localhost:8001",timeout:1e4,headers:{"Content-Type":"application/json"}}),_D=n=>{hs.defaults.baseURL=n},kD=n=>{hs.interceptors.request.use(t=>{if(n)return t.headers.token=n,t},t=>Promise.reject(t))};hs.interceptors.response.use(n=>(n.data.isOk=n.data.code===200,n.data),n=>{if(n.response)switch(n.response.status){}return Promise.reject(n)});const Yi=(n,t={})=>hs.get(n,{params:t}),$a=(n,t={})=>hs.post(n,t),Tm=(n,t={})=>hs.delete(n,{params:t}),DD=(n,t={})=>hs.post(n,t,{headers:{"Content-Type":"multipart/form-data"}}),Wi=(n,t)=>{const e=document.querySelector(n),s=e.querySelectorAll(".x6-port-body"),r=e.querySelectorAll(".x6-port-label");for(let i=0,o=s.length;i<o;i+=1)s[i].style.visibility=t?"visible":"hidden";for(let i=0,o=r.length;i<o;i+=1)r[i].style.visibility=t?"visible":"hidden"},Nm=n=>Yi("/cny/template/selectOne",{id:n}).then(t=>{if(t!=null&&t.isOk){const e=JSON.parse(t.data.remark);return{background:e.background,grid:e.grid,data:e.data}}else Bt.error((t==null?void 0:t.msg)||"获取失败")}),RD=n=>$a("/cny/custom/arrRealData",n).then(t=>{if(t!=null&&t.isOk)return t.data;Bt.error((t==null?void 0:t.msg)||"获取失败")}),_m={color:"#000000"},km={size:10,visible:!1,type:"doubleMesh",args:[{color:"#282828",thickness:1},{color:"#363636",thickness:2,factor:4}]},ID={stencilGraphWidth:300,stencilGraphHeight:0,layoutOptions:{columns:3,columnWidth:70,resizeToFit:!0}},za={position:"absolute",args:{x:0,y:0},attrs:{text:{fill:"#5174ff",fontSize:8},circle:{magnet:!0,stroke:"#5174ff",r:4}},label:{position:"top"}},LD={shape:"rect",label:"文本",width:50,height:30,attrs:{body:{fill:"#00000000",stroke:"#00000000",strokeWidth:1,rx:6,ry:6},text:{fill:"#ffffff"},label:{textAnchor:"start",x:-14,y:0}},data:{type:"text",content:"文本",field:[]},ports:{groups:{ports:{portOption:za}}}},vu={line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}},ports:{groups:{ports:{portOption:za}}}},Gn=(n,t)=>{const e=n.__vccOpts||n;for(const[s,r]of t)e[s]=r;return e},BD={class:"control"},VD={class:"row-column"},jD=Gn({__name:"index",props:{payload:Object},setup(n){var d,g,p,m,y,b,w,x,v,S,E,C,M,T,k,_,D,N,V,A,P;const t=n;console.log(t.payload.value.options.grid);const e=c.ref(((d=t.payload.value.options.background)==null?void 0:d.color)||null),s=c.ref(((p=(g=t.payload.value.options)==null?void 0:g.grid)==null?void 0:p.visible)||null),r=c.ref(((y=(m=t.payload.value.options)==null?void 0:m.grid)==null?void 0:y.size)||10),i=c.ref(((v=(x=(w=(b=t.payload.value.options)==null?void 0:b.grid)==null?void 0:w.args)==null?void 0:x[0])==null?void 0:v.color)||null),o=c.ref(((M=(C=(E=(S=t.payload.value.options)==null?void 0:S.grid)==null?void 0:E.args)==null?void 0:C[0])==null?void 0:M.thickness)||1),a=c.ref(((D=(_=(k=(T=t.payload.value.options)==null?void 0:T.grid)==null?void 0:k.args)==null?void 0:_[1])==null?void 0:D.color)||null),l=c.ref(((P=(A=(V=(N=t.payload.value.options)==null?void 0:N.grid)==null?void 0:V.args)==null?void 0:A[1])==null?void 0:P.thickness)||1),u=c.ref("1"),h=L=>{t.payload.value.drawBackground({color:L})},f=()=>{t.payload.value.drawGrid({visible:s.value,size:r.value,type:"doubleMesh",args:[{color:i.value,thickness:o.value},{color:a.value,thickness:l.value}]})};return(L,j)=>{const Y=c.resolveComponent("el-col"),ot=c.resolveComponent("el-color-picker"),F=c.resolveComponent("el-row"),H=c.resolveComponent("el-switch"),B=c.resolveComponent("el-input-number"),K=c.resolveComponent("el-collapse-item"),nt=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",BD,[c.createVNode(nt,{modelValue:u.value,"onUpdate:modelValue":j[7]||(j[7]=rt=>u.value=rt),accordion:""},{default:c.withCtx(()=>[c.createVNode(K,{title:"基础属性",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",VD,[c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[8]||(j[8]=[c.createElementVNode("div",{class:"row-label"},"背景色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:e.value,"onUpdate:modelValue":j[0]||(j[0]=rt=>e.value=rt),size:"small","show-alpha":"",onChange:h},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[9]||(j[9]=[c.createElementVNode("div",{class:"row-label"},"网格",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(H,{modelValue:s.value,"onUpdate:modelValue":j[1]||(j[1]=rt=>s.value=rt),"active-value":!0,"inactive-value":!1,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[10]||(j[10]=[c.createElementVNode("div",{class:"row-label"},"网格大小",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:r.value,"onUpdate:modelValue":j[2]||(j[2]=rt=>r.value=rt),min:1,max:20,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[11]||(j[11]=[c.createElementVNode("div",{class:"row-label"},"主网格颜色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:i.value,"onUpdate:modelValue":j[3]||(j[3]=rt=>i.value=rt),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[12]||(j[12]=[c.createElementVNode("div",{class:"row-label"},"次网格颜色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:a.value,"onUpdate:modelValue":j[4]||(j[4]=rt=>a.value=rt),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[13]||(j[13]=[c.createElementVNode("div",{class:"row-label"},"主网格粗细",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:o.value,"onUpdate:modelValue":j[5]||(j[5]=rt=>o.value=rt),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[14]||(j[14]=[c.createElementVNode("div",{class:"row-label"},"次网格粗细",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:l.value,"onUpdate:modelValue":j[6]||(j[6]=rt=>l.value=rt),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-270b8aa5"]]),$D={class:"control"},zD={class:"row-column"},FD={class:"row-column"},Dm=Gn(Object.assign({name:"text-control"},{__name:"index",props:{payload:Object},setup(n){var j,Y,ot,F;const t=n,e=c.ref((j=t.payload.attrs.label)!=null&&j.textAnchor?"0":"1"),s=c.ref([]),r=c.ref([]),i=()=>{Yi("/cny/custom/deviceList").then(H=>{s.value=H.data})},o=c.ref();let a=c.reactive({});const l=()=>{a=s.value.find(H=>H.deviceCode===o.value),a&&u()},u=()=>{Yi("/cny/custom/monitorInfo",{deviceCode:a.deviceCode,fieldType:1}).then(H=>{r.value=H.data})},h=/\$\{(.*?)\}/g,f=H=>H.replace(h,"--"),d=H=>{ak.confirm(`是否确定要添加${a.deviceName}-${H.name}?
35
- 添加后为:--${H.unit??""}`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const B=H.unit??"",K=t.payload.data.content;t.payload.data.content=g.value=K+"${"+a.deviceName+"."+H.name+"}"+B;const nt=K.match(h),rt=(nt==null?void 0:nt.length)||0;t.payload.data.field.push({index:rt,deviceName:a.deviceName,deviceCode:a.deviceCode,field:H.dataField}),t.payload.label=f(t.payload.data.content),console.log("label:",t.payload.label,"content:",t.payload.data.content,"field:",t.payload.data.field)})},g=c.ref(t.payload.data.content||null),p=c.ref(t.payload.attrs.body.fill||null),m=c.ref(t.payload.attrs.body.stroke||null),y=c.ref(t.payload.attrs.body.strokeWidth||null),b=c.ref(t.payload.attrs.body.rx||null),w=c.ref(t.payload.attrs.body.ry||null),x=c.ref(t.payload.attrs.text.fill||null),v=c.ref(t.payload.attrs.text.fontSize||null),S=c.ref(((Y=t.payload.attrs.label)==null?void 0:Y.textAnchor)||null),E=c.ref(((ot=t.payload.attrs.label)==null?void 0:ot.x)||null),C=c.ref(((F=t.payload.attrs.label)==null?void 0:F.y)||null),M=()=>{t.payload.attr("body/fill",p.value),t.payload.attr("body/stroke",m.value),t.payload.attr("body/strokeWidth",y.value),t.payload.attr("body/rx",b.value),t.payload.attr("body/ry",w.value),t.payload.attr("text/fill",x.value),t.payload.attr("text/fontSize",v.value),t.payload.attr("label/textAnchor",S.value),t.payload.attr("label/x",E.value),t.payload.attr("label/y",C.value)},T=c.ref(null),k=()=>{if(t.payload.data.content.length>g.value.length&&t.payload.data.content.endsWith("}")){const H=t.payload.data.content.match(h);if(H){const B=H.length-1;t.payload.data.field.splice(B,1),g.value=t.payload.data.content.substring(0,t.payload.data.content.lastIndexOf("${"))}}t.payload.data.content=g.value,t.payload.label=f(g.value)},_=()=>{if(T.value){const H=T.value.$refs.textarea;H.focus();const B=g.value.length;H.setSelectionRange(B,B)}},D=c.ref([]),N=()=>{D.value=JSON.parse(JSON.stringify(t.payload.getPorts().map(H=>({id:H.id,attrs:H.attrs,args:{x:Number(H.args.x.replace("%","")),y:Number(H.args.y.replace("%",""))}}))))},V=()=>{const H=za;H.attrs.text.text=`${t.payload.getPorts().length+1}`,H.args.x="50%",H.args.y="50%",t.payload.addPorts([{group:"ports",...H}]),N()},A=()=>{Wi("#drawing-board",!0)},P=(H,B,K)=>{t.payload.portProp(H,"args/"+B,K+"%"),N()},L=H=>{t.payload.removePort(H),N()};return c.onMounted(()=>{N(),i(),document.addEventListener("selectionchange",()=>{document.activeElement.tagName==="TEXTAREA"&&_()})}),(H,B)=>{const K=c.resolveComponent("el-input"),nt=c.resolveComponent("el-alert"),rt=c.resolveComponent("el-option"),et=c.resolveComponent("el-select"),ft=c.resolveComponent("el-table-column"),ge=c.resolveComponent("el-table"),St=c.resolveComponent("el-collapse-item"),xt=c.resolveComponent("el-col"),An=c.resolveComponent("el-color-picker"),pe=c.resolveComponent("el-row"),dn=c.resolveComponent("el-input-number"),Ts=c.resolveComponent("el-button"),Ns=c.resolveComponent("el-slider"),ai=c.resolveComponent("el-icon"),li=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",$D,[c.createVNode(li,{modelValue:e.value,"onUpdate:modelValue":B[12]||(B[12]=st=>e.value=st),accordion:""},{default:c.withCtx(()=>[n.payload.data.type==="text"?(c.openBlock(),c.createBlock(St,{key:0,title:"文本内容",name:"0"},{default:c.withCtx(()=>[c.createVNode(K,{ref_key:"inputRef",ref:T,type:"textarea",modelValue:g.value,"onUpdate:modelValue":B[0]||(B[0]=st=>g.value=st),onInput:k,onFocus:_,rows:10},null,8,["modelValue"]),c.createVNode(nt,{type:"info",title:"提示",description:"请先选择设备,再选择字段,最后点击确定按钮,即可绑定设备数据。绑定完成后会由 $<> 进行包裹!",style:{"margin-top":"20px"}}),c.createVNode(et,{modelValue:o.value,"onUpdate:modelValue":B[1]||(B[1]=st=>o.value=st),placeholder:"请选择设备",onChange:l,filterable:"",clearable:"",style:{"margin-top":"20px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,st=>(c.openBlock(),c.createBlock(rt,{key:st.deviceCode,label:st.deviceName,value:st.deviceCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),c.createVNode(ge,{data:r.value,border:"",style:{"margin-top":"20px"},size:"small",height:"500",onRowClick:d},{default:c.withCtx(()=>[c.createVNode(ft,{type:"index",label:"序号",width:"50",align:"center"}),c.createVNode(ft,{prop:"name",label:"字段名称","show-overflow-tooltip":""}),c.createVNode(ft,{prop:"dataField",label:"字段编码","show-overflow-tooltip":""}),c.createVNode(ft,{prop:"unit",label:"单位",width:"50"})]),_:1},8,["data"])]),_:1})):c.createCommentVNode("",!0),c.createVNode(St,{title:"图形设置",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",zD,[c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[13]||(B[13]=[c.createElementVNode("div",{class:"row-label"},"背景颜色",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(An,{modelValue:p.value,"onUpdate:modelValue":B[2]||(B[2]=st=>p.value=st),"show-alpha":!0,size:"small",onChange:M},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[14]||(B[14]=[c.createElementVNode("div",{class:"row-label"},"边框颜色",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(An,{modelValue:m.value,"onUpdate:modelValue":B[3]||(B[3]=st=>m.value=st),"show-alpha":!0,size:"small",onChange:M},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[15]||(B[15]=[c.createElementVNode("div",{class:"row-label"},"边框宽度",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:y.value,"onUpdate:modelValue":B[4]||(B[4]=st=>y.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[16]||(B[16]=[c.createElementVNode("div",{class:"row-label"},"背景圆角rx",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:b.value,"onUpdate:modelValue":B[5]||(B[5]=st=>b.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[17]||(B[17]=[c.createElementVNode("div",{class:"row-label"},"背景圆角ry",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:w.value,"onUpdate:modelValue":B[6]||(B[6]=st=>w.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),n.payload.data.type==="text"?(c.openBlock(),c.createBlock(St,{key:1,title:"文字设置",name:"2"},{default:c.withCtx(()=>[c.createElementVNode("div",FD,[c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[18]||(B[18]=[c.createElementVNode("div",{class:"row-label"},"字体颜色",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(An,{modelValue:x.value,"onUpdate:modelValue":B[7]||(B[7]=st=>x.value=st),"show-alpha":!0,size:"small",onChange:M},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[19]||(B[19]=[c.createElementVNode("div",{class:"row-label"},"字体大小",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:v.value,"onUpdate:modelValue":B[8]||(B[8]=st=>v.value=st),size:"small","controls-position":"right",onChange:M,min:12,max:48,step:2},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[20]||(B[20]=[c.createElementVNode("div",{class:"row-label"},"对齐方式",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(et,{modelValue:S.value,"onUpdate:modelValue":B[9]||(B[9]=st=>S.value=st),size:"small",onChange:M},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(["start","middle","end"],st=>c.createVNode(rt,{key:st,label:st,value:st},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[21]||(B[21]=[c.createElementVNode("div",{class:"row-label"},"x轴偏移",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:E.value,"onUpdate:modelValue":B[10]||(B[10]=st=>E.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[22]||(B[22]=[c.createElementVNode("div",{class:"row-label"},"y轴偏移",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:C.value,"onUpdate:modelValue":B[11]||(B[11]=st=>C.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})):c.createCommentVNode("",!0),c.createVNode(St,{title:"连接桩设置",name:"3"},{default:c.withCtx(()=>[c.createVNode(Ts,{type:"primary",onClick:V,size:"small"},{default:c.withCtx(()=>B[23]||(B[23]=[c.createTextVNode("添加连接桩")])),_:1}),c.createVNode(Ts,{type:"primary",onClick:A,size:"small"},{default:c.withCtx(()=>B[24]||(B[24]=[c.createTextVNode("显示连接桩")])),_:1}),c.createVNode(ge,{data:D.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:c.withCtx(()=>[c.createVNode(ft,{label:"ID",width:"50",align:"center"},{default:c.withCtx(({row:st})=>[c.createTextVNode(c.toDisplayString(st.attrs.text.text),1)]),_:1}),c.createVNode(ft,{label:"x",width:"100",align:"center"},{default:c.withCtx(({row:st})=>[c.createVNode(Ns,{modelValue:st.args.x,"onUpdate:modelValue":ie=>st.args.x=ie,min:0,max:100,step:1,onInput:ie=>P(st.id,"x",ie)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(ft,{label:"y",width:"100",align:"center"},{default:c.withCtx(({row:st})=>[c.createVNode(Ns,{modelValue:st.args.y,"onUpdate:modelValue":ie=>st.args.y=ie,min:0,max:100,step:1,onInput:ie=>P(st.id,"y",ie)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(ft,{label:"操作",align:"center"},{default:c.withCtx(({row:st})=>[c.createVNode(Ts,{type:"danger",size:"small",onClick:ie=>L(st.id)},{default:c.withCtx(()=>[c.createVNode(ai,null,{default:c.withCtx(()=>[c.createVNode(c.unref(wg))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-764721f9"]]),HD={class:"container"},UD={class:"row-column"},GD={class:"row-column"},YD={class:"row-column"},WD=Gn({__name:"index",props:{payload:Object},setup(n){var l,u,h,f;const t=n,e=c.ref(t.payload.attrs.line.stroke),s=c.reactive({name:((l=t.payload.attrs.line.sourceMarker)==null?void 0:l.name)??null,args:((u=t.payload.attrs.line.sourceMarker)==null?void 0:u.args)??{}}),r=c.reactive({name:((h=t.payload.attrs.line.targetMarker)==null?void 0:h.name)??null,args:((f=t.payload.attrs.line.targetMarker)==null?void 0:f.args)??{}}),i=[{label:"Block",value:"block"},{label:"Classic",value:"classic"},{label:"Diamond",value:"diamond"},{label:"Cross",value:"cross"},{label:"Async",value:"async"},{label:"Circle",value:"circle"},{label:"CirclePlus",value:"circlePlus"},{label:"Ellipse",value:"ellipse"}],o=c.ref("0"),a=()=>{t.payload.attr("line/stroke",e.value),t.payload.attr("line/sourceMarker/name",s.name),t.payload.attr("line/sourceMarker/args",s.args),t.payload.attr("line/targetMarker/name",r.name),t.payload.attr("line/targetMarker/args",r.args),vu.line=t.payload.attrs.line};return(d,g)=>{const p=c.resolveComponent("el-col"),m=c.resolveComponent("el-color-picker"),y=c.resolveComponent("el-row"),b=c.resolveComponent("el-collapse-item"),w=c.resolveComponent("el-option"),x=c.resolveComponent("el-select"),v=c.resolveComponent("el-input-number"),S=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",HD,[c.createVNode(S,{modelValue:o.value,"onUpdate:modelValue":g[9]||(g[9]=E=>o.value=E),accordion:""},{default:c.withCtx(()=>[c.createVNode(b,{title:"线段设置",name:"0"},{default:c.withCtx(()=>[c.createElementVNode("div",UD,[c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[10]||(g[10]=[c.createElementVNode("div",{class:"row-label"},"颜色",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(m,{modelValue:e.value,"onUpdate:modelValue":g[0]||(g[0]=E=>e.value=E),"show-alpha":!0,size:"small",onChange:a},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),c.createVNode(b,{title:"箭头1设置",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",GD,[c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[11]||(g[11]=[c.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(x,{modelValue:s.name,"onUpdate:modelValue":g[1]||(g[1]=E=>s.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(i,E=>c.createVNode(w,{key:E.value,label:E.label,value:E.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[12]||(g[12]=[c.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:s.args.width,"onUpdate:modelValue":g[2]||(g[2]=E=>s.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[13]||(g[13]=[c.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:s.args.height,"onUpdate:modelValue":g[3]||(g[3]=E=>s.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[14]||(g[14]=[c.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:s.args.offset,"onUpdate:modelValue":g[4]||(g[4]=E=>s.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),c.createVNode(b,{title:"箭头2设置",name:"2"},{default:c.withCtx(()=>[c.createElementVNode("div",YD,[c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[15]||(g[15]=[c.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(x,{modelValue:r.name,"onUpdate:modelValue":g[5]||(g[5]=E=>r.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(i,E=>c.createVNode(w,{key:E.value,label:E.label,value:E.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[16]||(g[16]=[c.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:r.args.width,"onUpdate:modelValue":g[6]||(g[6]=E=>r.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[17]||(g[17]=[c.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:r.args.height,"onUpdate:modelValue":g[7]||(g[7]=E=>r.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[18]||(g[18]=[c.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:r.args.offset,"onUpdate:modelValue":g[8]||(g[8]=E=>r.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-19905aaf"]]),qD={class:"form-container"},JD=Gn({__name:"Shortcuts",setup(n){const t=c.ref([{name:"复制",windowsKey:"Ctrl + C",macKey:"Command + C"},{name:"粘贴",windowsKey:"Ctrl + V",macKey:"Command + V"},{name:"撤销",windowsKey:"Ctrl + Z",macKey:"Command + Z"},{name:"重做",windowsKey:"Ctrl + Y",macKey:"Command + Y"},{name:"框选",windowsKey:"Alt + LMB",macKey:"option + LMB"},{name:"多选",windowsKey:"Alt + LMB",macKey:"Command + LMB"}]);return(e,s)=>{const r=c.resolveComponent("el-table-column"),i=c.resolveComponent("el-table");return c.openBlock(),c.createElementBlock("div",qD,[c.createVNode(i,{data:t.value,size:"small",border:""},{default:c.withCtx(()=>[c.createVNode(r,{prop:"name",label:"名称"}),c.createVNode(r,{prop:"windowsKey",label:"windows"}),c.createVNode(r,{prop:"macKey",label:"mac"})]),_:1},8,["data"])])}}},[["__scopeId","data-v-99982d47"]]);typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&function(n){n.forEach(t=>{Object.prototype.hasOwnProperty.call(t,"append")||Object.defineProperty(t,"append",{configurable:!0,enumerable:!0,writable:!0,value(...e){const s=document.createDocumentFragment();e.forEach(r=>{const i=r instanceof Node;s.appendChild(i?r:document.createTextNode(String(r)))}),this.appendChild(s)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class ye{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(n){function t(){return(e,s,r)=>{const i=r.value,o=e.__proto__;r.value=function(...a){this.disposed||(i.call(this,...a),o.dispose.call(this))}}}n.dispose=t})(ye||(ye={}));class Rm{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(t=>{t.dispose()}),this.items.clear())}contains(t){return this.items.has(t)}add(t){this.items.add(t)}remove(t){this.items.delete(t)}clear(){this.items.clear()}}(function(n){function t(e){const s=new n;return e.forEach(r=>{s.add(r)}),s}n.from=t})(Rm||(Rm={}));function Im(n,t,e){if(e)switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2]);case 4:return n.call(t,e[0],e[1],e[2],e[3]);case 5:return n.call(t,e[0],e[1],e[2],e[3],e[4]);case 6:return n.call(t,e[0],e[1],e[2],e[3],e[4],e[5]);default:return n.apply(t,e)}return n.call(t)}function X(n,t,...e){return Im(n,t,e)}function XD(n){return typeof n=="object"&&n.then&&typeof n.then=="function"}function Cu(n){return n!=null&&(n instanceof Promise||XD(n))}function Su(...n){const t=[];if(n.forEach(s=>{Array.isArray(s)?t.push(...s):t.push(s)}),t.some(s=>Cu(s))){const s=t.map(r=>Cu(r)?r:Promise.resolve(r!==!1));return Promise.all(s).then(r=>r.reduce((i,o)=>o!==!1&&i,!0))}return t.every(s=>s!==!1)}function KD(...n){const t=Su(n);return typeof t=="boolean"?Promise.resolve(t):t}function Eu(n,t){const e=[];for(let s=0;s<n.length;s+=2){const r=n[s],i=n[s+1],o=Array.isArray(t)?t:[t],a=Im(r,i,o);e.push(a)}return Su(e)}class ZD{constructor(){this.listeners={}}on(t,e,s){return e==null?this:(this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e,s),this)}once(t,e,s){const r=(...i)=>(this.off(t,r),Eu([e,s],i));return this.on(t,r,this)}off(t,e,s){if(!(t||e||s))return this.listeners={},this;const r=this.listeners;return(t?[t]:Object.keys(r)).forEach(o=>{const a=r[o];if(a){if(!(e||s)){delete r[o];return}for(let l=a.length-2;l>=0;l-=2)e&&a[l]!==e||s&&a[l+1]!==s||a.splice(l,2)}}),this}trigger(t,...e){let s=!0;if(t!=="*"){const i=this.listeners[t];i!=null&&(s=Eu([...i],e))}const r=this.listeners["*"];return r!=null?Su([s,Eu([...r],[t,...e])]):s}emit(t,...e){return this.trigger(t,...e)}}function QD(n,...t){t.forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(n.prototype,s,Object.getOwnPropertyDescriptor(e.prototype,s))})})}const tR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])};function eR(n,t){tR(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}class nR{}const sR=/^\s*class\s+/.test(`${nR}`)||/^\s*class\s*\{/.test(`${class{}}`);function Ou(n,t){let e;return sR?e=class extends t{}:(e=function(){return t.apply(this,arguments)},eR(e,t)),Object.defineProperty(e,"name",{value:n}),e}function Lm(n){return n==="__proto__"}function Mu(n,t,e="/"){let s;const r=Array.isArray(t)?t:t.split(e);if(r.length)for(s=n;r.length;){const i=r.shift();if(Object(s)===s&&i&&i in s)s=s[i];else return}return s}function Rr(n,t,e,s="/"){const r=Array.isArray(t)?t:t.split(s),i=r.pop();if(i&&!Lm(i)){let o=n;r.forEach(a=>{Lm(a)||(o[a]==null&&(o[a]={}),o=o[a])}),o[i]=e}return n}function Bm(n,t,e="/"){const s=Array.isArray(t)?t.slice():t.split(e),r=s.pop();if(r)if(s.length>0){const i=Mu(n,s);i&&delete i[r]}else delete n[r];return n}var rR=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Nt extends ZD{dispose(){this.off()}}rR([ye.dispose()],Nt.prototype,"dispose",null),function(n){n.dispose=ye.dispose}(Nt||(Nt={})),QD(Nt,ye);const Vm=n=>{const t=Object.create(null);return e=>t[e]||(t[e]=n(e))},jm=Vm(n=>n.replace(/\B([A-Z])/g,"-$1").toLowerCase()),Pu=Vm(n=>C2(na(n)).replace(/ /g,""));function Au(n){let t=2166136261,e=!1,s=n;for(let r=0,i=s.length;r<i;r+=1){let o=s.charCodeAt(r);o>127&&!e&&(s=unescape(encodeURIComponent(s)),o=s.charCodeAt(r),e=!0),t^=o,t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24)}return t>>>0}function Fa(){let n="";const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let e=0,s=t.length;e<s;e+=1){const r=t[e],i=Math.random()*16|0,o=r==="x"?i:r==="y"?i&3|8:r;n+=o.toString(16)}return n}function iR(n,t,e){const s=Math.min(2,Math.floor(n.length*.34));let r=Math.floor(n.length*.4)+1,i,o=!1;const a=n.toLowerCase();for(const l of t){const u=e(l);if(u!==void 0&&Math.abs(u.length-a.length)<=s){const h=u.toLowerCase();if(h===a){if(u===n)continue;return l}if(o||u.length<3)continue;const f=oR(a,h,r-1);if(f===void 0)continue;f<3?(o=!0,i=l):(r=f,i=l)}}return i}function oR(n,t,e){let s=new Array(t.length+1),r=new Array(t.length+1);const i=e+1;for(let a=0;a<=t.length;a+=1)s[a]=a;for(let a=1;a<=n.length;a+=1){const l=n.charCodeAt(a-1),u=a>e?a-e:1,h=t.length>e+a?e+a:t.length;r[0]=a;let f=a;for(let g=1;g<u;g+=1)r[g]=i;for(let g=u;g<=h;g+=1){const p=l===t.charCodeAt(g-1)?s[g-1]:Math.min(s[g]+1,r[g-1]+1,s[g-1]+2);r[g]=p,f=Math.min(f,p)}for(let g=h+1;g<=t.length;g+=1)r[g]=i;if(f>e)return;const d=s;s=r,r=d}const o=s[t.length];return o>e?void 0:o}function Yn(n){return typeof n=="string"&&n.slice(-1)==="%"}function an(n,t){if(n==null)return 0;let e;if(typeof n=="string"){if(e=parseFloat(n),Yn(n)&&(e/=100,Number.isFinite(e)))return e*t}else e=n;return Number.isFinite(e)?e>0&&e<1?e*t:e:0}function ds(n){if(typeof n=="object"){let e=0,s=0,r=0,i=0;return n.vertical!=null&&Number.isFinite(n.vertical)&&(s=i=n.vertical),n.horizontal!=null&&Number.isFinite(n.horizontal)&&(r=e=n.horizontal),n.left!=null&&Number.isFinite(n.left)&&(e=n.left),n.top!=null&&Number.isFinite(n.top)&&(s=n.top),n.right!=null&&Number.isFinite(n.right)&&(r=n.right),n.bottom!=null&&Number.isFinite(n.bottom)&&(i=n.bottom),{top:s,right:r,bottom:i,left:e}}let t=0;return n!=null&&Number.isFinite(n)&&(t=n),{top:t,right:t,bottom:t,left:t}}let Tu=!1,$m=!1,zm=!1,Fm=!1,Hm=!1,Um=!1,Gm=!1,Ym=!1,Wm=!1,qm=!1,Jm=!1,Xm=!1,Km=!1,Zm=!1,Qm=!1,ty=!1;if(typeof navigator=="object"){const n=navigator.userAgent;Tu=n.indexOf("Macintosh")>=0,$m=!!n.match(/(iPad|iPhone|iPod)/g),zm=n.indexOf("Windows")>=0,Fm=n.indexOf("MSIE")>=0,Hm=!!n.match(/Trident\/7\./),Um=!!n.match(/Edge\//),Gm=n.indexOf("Mozilla/")>=0&&n.indexOf("MSIE")<0&&n.indexOf("Edge/")<0,Wm=n.indexOf("Chrome/")>=0&&n.indexOf("Edge/")<0,qm=n.indexOf("Opera/")>=0||n.indexOf("OPR/")>=0,Jm=n.indexOf("Firefox/")>=0,Xm=n.indexOf("AppleWebKit/")>=0&&n.indexOf("Chrome/")<0&&n.indexOf("Edge/")<0,typeof document=="object"&&(ty=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||n.indexOf("Opera/")>=0)}if(typeof window=="object"&&(Ym=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,Zm=window.PointerEvent!=null&&!Tu),typeof document=="object"){Km="ontouchstart"in document.documentElement;try{const n=Object.defineProperty({},"passive",{get(){Qm=!0}}),t=document.createElement("div");t.addEventListener&&t.addEventListener("click",()=>{},n)}catch{}}var fs;(function(n){n.IS_MAC=Tu,n.IS_IOS=$m,n.IS_WINDOWS=zm,n.IS_IE=Fm,n.IS_IE11=Hm,n.IS_EDGE=Um,n.IS_NETSCAPE=Gm,n.IS_CHROME_APP=Ym,n.IS_CHROME=Wm,n.IS_OPERA=qm,n.IS_FIREFOX=Jm,n.IS_SAFARI=Xm,n.SUPPORT_TOUCH=Km,n.SUPPORT_POINTER=Zm,n.SUPPORT_PASSIVE=Qm,n.NO_FOREIGNOBJECT=ty,n.SUPPORT_FOREIGNOBJECT=!n.NO_FOREIGNOBJECT})(fs||(fs={})),function(n){function t(){const i=window.module;return i!=null&&i.hot!=null&&i.hot.status!=null?i.hot.status():"unkonwn"}n.getHMRStatus=t;function e(){return t()==="apply"}n.isApplyingHMR=e;const s={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function r(i){const o=document.createElement(s[i]||"div"),a=`on${i}`;let l=a in o;return l||(o.setAttribute(a,"return;"),l=typeof o[a]=="function"),l}n.isEventSupported=r}(fs||(fs={}));const Nu=/[\t\r\n\f]/g,_u=/\S+/g,Ir=n=>` ${n} `;function Lr(n){return n&&n.getAttribute&&n.getAttribute("class")||""}function Sn(n,t){if(n==null||t==null)return!1;const e=Ir(Lr(n)),s=Ir(t);return n.nodeType===1?e.replace(Nu," ").includes(s):!1}function J(n,t){if(!(n==null||t==null)){if(typeof t=="function")return J(n,t(Lr(n)));if(typeof t=="string"&&n.nodeType===1){const e=t.match(_u)||[],s=Ir(Lr(n)).replace(Nu," ");let r=e.reduce((i,o)=>i.indexOf(Ir(o))<0?`${i}${o} `:i,s);r=r.trim(),s!==r&&n.setAttribute("class",r)}}}function Dt(n,t){if(n!=null){if(typeof t=="function")return Dt(n,t(Lr(n)));if((!t||typeof t=="string")&&n.nodeType===1){const e=(t||"").match(_u)||[],s=Ir(Lr(n)).replace(Nu," ");let r=e.reduce((i,o)=>{const a=Ir(o);return i.indexOf(a)>-1?i.replace(a," "):i},s);r=t?r.trim():"",s!==r&&n.setAttribute("class",r)}}}function ln(n,t,e){if(!(n==null||t==null)){if(e!=null&&typeof t=="string"){e?J(n,t):Dt(n,t);return}if(typeof t=="function")return ln(n,t(Lr(n),e),e);typeof t=="string"&&(t.match(_u)||[]).forEach(r=>{Sn(n,r)?Dt(n,r):J(n,r)})}}let ey=0;function aR(){return ey+=1,`v${ey}`}function ku(n){return(n.id==null||n.id==="")&&(n.id=aR()),n.id}function gs(n){return n==null?!1:typeof n.getScreenCTM=="function"&&n instanceof SVGElement}const ee={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},ny="1.1";function sy(n,t=document){return t.createElement(n)}function Du(n,t=ee.xhtml,e=document){return e.createElementNS(t,n)}function cn(n,t=document){return Du(n,ee.svg,t)}function Ha(n){if(n){const e=`<svg xmlns="${ee.svg}" xmlns:xlink="${ee.xlink}" version="${ny}">${n}</svg>`,{documentElement:s}=lR(e,{async:!1});return s}const t=document.createElementNS(ee.svg,"svg");return t.setAttributeNS(ee.xmlns,"xmlns:xlink",ee.xlink),t.setAttribute("version",ny),t}function lR(n,t={}){let e;try{const s=new DOMParser;if(t.async!=null){const r=s;r.async=t.async}e=s.parseFromString(n,t.mimeType||"text/xml")}catch{e=void 0}if(!e||e.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${n}`);return e}function cR(n,t=!0){const e=n.nodeName;return t?e.toLowerCase():e.toUpperCase()}function Ru(n){let t=0,e=n.previousSibling;for(;e;)e.nodeType===1&&(t+=1),e=e.previousSibling;return t}function uR(n,t){return n.querySelectorAll(t)}function hR(n,t){return n.querySelector(t)}function ry(n,t,e){const s=n.ownerSVGElement;let r=n.parentNode;for(;r&&r!==e&&r!==s;){if(Sn(r,t))return r;r=r.parentNode}return null}function Iu(n,t){const e=t&&t.parentNode;return n===e||!!(e&&e.nodeType===1&&n.compareDocumentPosition(e)&16)}function ze(n){n&&(Array.isArray(n)?n:[n]).forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)})}function qi(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Ne(n,t){(Array.isArray(t)?t:[t]).forEach(s=>{s!=null&&n.appendChild(s)})}function iy(n,t){const e=n.firstChild;return e?Lu(e,t):Ne(n,t)}function Lu(n,t){const e=n.parentNode;e&&(Array.isArray(t)?t:[t]).forEach(r=>{r!=null&&e.insertBefore(r,n)})}function ps(n,t){t!=null&&t.appendChild(n)}function oy(n){try{return n instanceof HTMLElement}catch{return typeof n=="object"&&n.nodeType===1&&typeof n.style=="object"&&typeof n.ownerDocument=="object"}}function dR(n,t){const e=[];let s=n.firstChild;for(;s;s=s.nextSibling)s.nodeType===1&&(!t||Sn(s,t))&&e.push(s);return e}const ay=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function fR(n,t){return n.getAttribute(t)}function Bu(n,t){const e=cy(t);e.ns?n.hasAttributeNS(e.ns,e.local)&&n.removeAttributeNS(e.ns,e.local):n.hasAttribute(t)&&n.removeAttribute(t)}function Vu(n,t,e){if(e==null)return Bu(n,t);const s=cy(t);s.ns&&typeof e=="string"?n.setAttributeNS(s.ns,t,e):t==="id"?n.id=`${e}`:n.setAttribute(t,`${e}`)}function ly(n,t){Object.keys(t).forEach(e=>{Vu(n,e,t[e])})}function ut(n,t,e){if(t==null){const s=n.attributes,r={};for(let i=0;i<s.length;i+=1)r[s[i].name]=s[i].value;return r}if(typeof t=="string"&&e===void 0)return n.getAttribute(t);typeof t=="object"?ly(n,t):Vu(n,t,e)}function cy(n){if(n.indexOf(":")!==-1){const t=n.split(":");return{ns:ee[t[0]],local:t[1]}}return{ns:null,local:n}}function Ji(n){const t={};return Object.keys(n).forEach(e=>{const s=ay.includes(e)?e:jm(e);t[s]=n[e]}),t}function Ua(n){const t={};return n.split(";").forEach(s=>{const r=s.trim();if(r){const i=r.split("=");i.length&&(t[i[0].trim()]=i[1]?i[1].trim():"")}}),t}function ju(n,t){return Object.keys(t).forEach(e=>{if(e==="class")n[e]=n[e]?`${n[e]} ${t[e]}`:t[e];else if(e==="style"){const s=typeof n[e]=="object",r=typeof t[e]=="object";let i,o;s&&r?(i=n[e],o=t[e]):s?(i=n[e],o=Ua(t[e])):r?(i=Ua(n[e]),o=t[e]):(i=Ua(n[e]),o=Ua(t[e])),n[e]=ju(i,o)}else n[e]=t[e]}),n}function gR(n,t,e={}){const s=e.offset||0,r=[],i=[];let o,a,l=null;for(let u=0;u<n.length;u+=1){o=i[u]=n[u];for(let h=0,f=t.length;h<f;h+=1){const d=t[h],g=d.start+s,p=d.end+s;u>=g&&u<p&&(typeof o=="string"?o=i[u]={t:n[u],attrs:d.attrs}:o.attrs=ju(ju({},o.attrs),d.attrs),e.includeAnnotationIndices&&(o.annotations==null&&(o.annotations=[]),o.annotations.push(h)))}a=i[u-1],a?Lt(o)&&Lt(a)?(l=l,JSON.stringify(o.attrs)===JSON.stringify(a.attrs)?l.t+=o.t:(r.push(l),l=o)):Lt(o)||Lt(a)?(l=l,r.push(l),l=o):l=(l||"")+o:l=o}return l!=null&&r.push(l),r}function pR(n){return n.replace(/ /g," ")}var Ws;(function(n){function t(u){const h="data:";return u.substr(0,h.length)===h}n.isDataUrl=t;function e(u,h){if(!u||t(u)){setTimeout(()=>h(null,u));return}const f=()=>{h(new Error(`Failed to load image: ${u}`))},d=window.FileReader?p=>{if(p.status===200){const m=new FileReader;m.onload=y=>{const b=y.target.result;h(null,b)},m.onerror=f,m.readAsDataURL(p.response)}else f()}:p=>{const m=y=>{const w=[];for(let x=0;x<y.length;x+=32768)w.push(String.fromCharCode.apply(null,y.subarray(x,x+32768)));return w.join("")};if(p.status===200){let y=u.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const b=`data:image/${y};base64,`,w=new Uint8Array(p.response),x=b+btoa(m(w));h(null,x)}else f()},g=new XMLHttpRequest;g.responseType=window.FileReader?"blob":"arraybuffer",g.open("GET",u,!0),g.addEventListener("error",f),g.addEventListener("load",()=>d(g)),g.send()}n.imageToDataUri=e;function s(u){let h=u.replace(/\s/g,"");h=decodeURIComponent(h);const f=h.indexOf(","),d=h.slice(0,f),g=d.split(":")[1].split(";")[0],p=h.slice(f+1);let m;d.indexOf("base64")>=0?m=atob(p):m=unescape(encodeURIComponent(p));const y=new Uint8Array(m.length);for(let b=0;b<m.length;b+=1)y[b]=m.charCodeAt(b);return new Blob([y],{type:g})}n.dataUriToBlob=s;function r(u,h){const f=window.navigator.msSaveBlob;if(f)f(u,h);else{const d=window.URL.createObjectURL(u),g=document.createElement("a");g.href=d,g.download=h,document.body.appendChild(g),g.click(),document.body.removeChild(g),window.URL.revokeObjectURL(d)}}n.downloadBlob=r;function i(u,h){const f=s(u);r(f,h)}n.downloadDataUri=i;function o(u){const h=u.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return h&&h[2]?h[2].replace(/\s+/," ").split(" "):null}function a(u){const h=parseFloat(u);return Number.isNaN(h)?null:h}function l(u,h={}){let f=null;const d=x=>(f==null&&(f=o(u)),f!=null?a(f[x]):null),g=x=>{const v=u.match(x);return v&&v[2]?a(v[2]):null};let p=h.width;if(p==null&&(p=g(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),p==null&&(p=d(2)),p==null)throw new Error("Can not parse width from svg string");let m=h.height;if(m==null&&(m=g(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),m==null&&(m=d(3)),m==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(u).replace(/'/g,"%27").replace(/"/g,"%22")}`}n.svgToDataUrl=l})(Ws||(Ws={}));let qs;const mR={px(n){return n},mm(n){return qs*n},cm(n){return qs*n*10},in(n){return qs*n*25.4},pt(n){return qs*(25.4*n/72)},pc(n){return qs*(25.4*n/6)}};var uy;(function(n){function t(s,r,i){const o=document.createElement("div"),a=o.style;a.display="inline-block",a.position="absolute",a.left="-15000px",a.top="-15000px",a.width=s+(i||"px"),a.height=r+(i||"px"),document.body.appendChild(o);const l=o.getBoundingClientRect(),u={width:l.width||0,height:l.height||0};return document.body.removeChild(o),u}n.measure=t;function e(s,r){qs==null&&(qs=t("1","1","mm").width);const i=r?mR[r]:null;return i?i(s):s}n.toPx=e})(uy||(uy={}));const yR=/-(.)/g;function bR(n){return n.replace(yR,(t,e)=>e.toUpperCase())}const $u={},hy=["webkit","ms","moz","o"],dy=typeof document<"u"?document.createElement("div").style:{};function wR(n){for(let t=0;t<hy.length;t+=1){const e=hy[t]+n;if(e in dy)return e}return null}function xR(n){const t=bR(n);if($u[t]==null){const e=t.charAt(0).toUpperCase()+t.slice(1);$u[t]=t in dy?t:wR(e)}return $u[t]}function fy(n,t){const e=n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.opener?n.ownerDocument.defaultView.getComputedStyle(n,null):window.getComputedStyle(n,null);return e&&t?e.getPropertyValue(t)||e[t]:e}const vR={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function CR(n){return/^--/.test(n)}function SR(n,t,e){const s=window.getComputedStyle(n,null);return e?s.getPropertyValue(t)||void 0:s[t]||n.style[t]}function ER(n,t){return!vR[n]&&typeof t=="number"?`${t}px`:t}function qt(n,t,e){if(typeof t=="string"){const s=CR(t);if(s||(t=xR(t)),e===void 0)return SR(n,t,s);s||(e=ER(t,e));const r=n.style;s?r.setProperty(t,e):r[t]=e;return}for(const s in t)qt(n,s,t[s])}const Ga=new WeakMap;function gy(n,t){const e=na(t),s=Ga.get(n);if(s)return s[e]}function OR(n,t,e){const s=na(t),r=Ga.get(n);r?r[s]=e:Ga.set(n,{[s]:e})}function Js(n,t,e){if(!t){const s={};return Object.keys(Ga).forEach(r=>{s[r]=gy(n,r)}),s}if(typeof t=="string"){if(e===void 0)return gy(n,t);OR(n,t,e);return}for(const s in t)Js(n,s,t[s])}class tt{get[Symbol.toStringTag](){return tt.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(t){this.node.id=t}constructor(t,e,s){if(!t)throw new TypeError("Invalid element to create vector");let r;if(tt.isVector(t))r=t.node;else if(typeof t=="string")if(t.toLowerCase()==="svg")r=Ha();else if(t[0]==="<"){const i=Ha(t);r=document.importNode(i.firstChild,!0)}else r=document.createElementNS(ee.svg,t);else r=t;this.node=r,e&&this.setAttributes(e),s&&this.append(s)}transform(t,e){return t==null?Vr(this.node):(Vr(this.node,t,e),this)}translate(t,e=0,s={}){return t==null?Sy(this.node):(Sy(this.node,t,e,s),this)}rotate(t,e,s,r={}){return t==null?Hu(this.node):(Hu(this.node,t,e,s,r),this)}scale(t,e){return t==null?Uu(this.node):(Uu(this.node,t,e),this)}getTransformToElement(t){const e=tt.toNode(t);return Qi(this.node,e)}removeAttribute(t){return Bu(this.node,t),this}getAttribute(t){return fR(this.node,t)}setAttribute(t,e){return Vu(this.node,t,e),this}setAttributes(t){return ly(this.node,t),this}attr(t,e){return t==null?ut(this.node):typeof t=="string"&&e===void 0?ut(this.node,t):(typeof t=="object"?ut(this.node,t):ut(this.node,t,e),this)}svg(){return this.node instanceof SVGSVGElement?this:tt.create(this.node.ownerSVGElement)}defs(){const t=this.svg()||this,e=t.node.getElementsByTagName("defs")[0];return e?tt.create(e):tt.create("defs").appendTo(t)}text(t,e={}){return my(this.node,t,e),this}tagName(){return cR(this.node)}clone(){return tt.create(this.node.cloneNode(!0))}remove(){return ze(this.node),this}empty(){return qi(this.node),this}append(t){return Ne(this.node,tt.toNodes(t)),this}appendTo(t){return ps(this.node,tt.isVector(t)?t.node:t),this}prepend(t){return iy(this.node,tt.toNodes(t)),this}before(t){return Lu(this.node,tt.toNodes(t)),this}replace(t){return this.node.parentNode&&this.node.parentNode.replaceChild(tt.toNode(t),this.node),tt.create(t)}first(){return this.node.firstChild?tt.create(this.node.firstChild):null}last(){return this.node.lastChild?tt.create(this.node.lastChild):null}get(t){const e=this.node.childNodes[t];return e?tt.create(e):null}indexOf(t){return Array.prototype.slice.call(this.node.childNodes).indexOf(tt.toNode(t))}find(t){const e=[],s=uR(this.node,t);if(s)for(let r=0,i=s.length;r<i;r+=1)e.push(tt.create(s[r]));return e}findOne(t){const e=hR(this.node,t);return e?tt.create(e):null}findParentByClass(t,e){const s=ry(this.node,t,e);return s?tt.create(s):null}matches(t){const e=this.node;this.node.matches;const s=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return s&&s.call(e,t)}contains(t){return Iu(this.node,tt.isVector(t)?t.node:t)}wrap(t){const e=tt.create(t),s=this.node.parentNode;return s!=null&&s.insertBefore(e.node,this.node),e.append(this)}parent(t){let e=this;if(e.node.parentNode==null)return null;if(e=tt.create(e.node.parentNode),t==null)return e;do if(typeof t=="string"?e.matches(t):e instanceof t)return e;while(e=tt.create(e.node.parentNode));return e}children(){const t=this.node.childNodes,e=[];for(let s=0;s<t.length;s+=1)t[s].nodeType===1&&e.push(tt.create(t[s]));return e}eachChild(t,e){const s=this.children();for(let r=0,i=s.length;r<i;r+=1)t.call(s[r],s[r],r,s),e&&s[r].eachChild(t,e);return this}index(){return Ru(this.node)}hasClass(t){return Sn(this.node,t)}addClass(t){return J(this.node,t),this}removeClass(t){return Dt(this.node,t),this}toggleClass(t,e){return ln(this.node,t,e),this}toLocalPoint(t,e){return GR(this.node,t,e)}sample(t=1){return this.node instanceof SVGPathElement?TR(this.node,t):[]}toPath(){return tt.create(LR(this.node))}toPathData(){return vy(this.node)}}(function(n){n.toStringTag=`X6.${n.name}`;function t(o){if(o==null)return!1;if(o instanceof n)return!0;const a=o[Symbol.toStringTag],l=o;return(a==null||a===n.toStringTag)&&l.node instanceof SVGElement&&typeof l.sample=="function"&&typeof l.toPath=="function"}n.isVector=t;function e(o,a,l){return new n(o,a,l)}n.create=e;function s(o){if(o[0]==="<"){const a=Ha(o),l=[];for(let u=0,h=a.childNodes.length;u<h;u+=1){const f=a.childNodes[u];l.push(e(document.importNode(f,!0)))}return l}return[e(o)]}n.createVectors=s;function r(o){return t(o)?o.node:o}n.toNode=r;function i(o){return Array.isArray(o)?o.map(a=>r(a)):[r(o)]}n.toNodes=i})(tt||(tt={}));function MR(n,t){const e=tt.create(t),s=tt.create("textPath"),r=n.d;if(r&&n["xlink:href"]===void 0){const i=tt.create("path").attr("d",r).appendTo(e.defs());s.attr("xlink:href",`#${i.id}`)}return typeof n=="object"&&s.attr(n),s.node}function PR(n,t,e){const s=e.eol,r=e.baseSize,i=e.lineHeight;let o=0,a;const l={},u=t.length-1;for(let h=0;h<=u;h+=1){let f=t[h],d=null;if(typeof f=="object"){const g=f.attrs,p=tt.create("tspan",g);a=p.node;let m=f.t;s&&h===u&&(m+=s),a.textContent=m;const y=g.class;y&&p.addClass(y),e.includeAnnotationIndices&&p.attr("annotations",f.annotations.join(",")),d=parseFloat(g["font-size"]),d===void 0&&(d=r),d&&d>o&&(o=d)}else s&&h===u&&(f+=s),a=document.createTextNode(f||" "),r&&r>o&&(o=r);n.appendChild(a)}return o&&(l.maxFontSize=o),i?l.lineHeight=i:o&&(l.lineHeight=o*1.2),l}const py=/em$/;function Ya(n,t){const e=parseFloat(n);return py.test(n)?e*t:e}function AR(n,t,e,s){if(!Array.isArray(t))return 0;const r=t.length;if(!r)return 0;let i=t[0];const o=Ya(i.maxFontSize,e)||e;let a=0;const l=Ya(s,e);for(let f=1;f<r;f+=1){i=t[f];const d=Ya(i.lineHeight,e)||l;a+=d}const u=Ya(i.maxFontSize,e)||e;let h;switch(n){case"middle":h=o/2-.15*u-a/2;break;case"bottom":h=-(.25*u)-a;break;case"top":default:h=.8*o;break}return h}function my(n,t,e={}){t=pR(t);const s=e.eol;let r=e.textPath;const i=e.textVerticalAnchor,o=i==="middle"||i==="bottom"||i==="top";let a=e.x;a===void 0&&(a=n.getAttribute("x")||0);const l=e.includeAnnotationIndices;let u=e.annotations;u&&!Array.isArray(u)&&(u=[u]);const h=e.lineHeight,f=h==="auto",d=f?"1.5em":h||"1em";let g=!0;const p=n.childNodes;if(p.length===1){const T=p[0];T&&T.tagName.toUpperCase()==="TITLE"&&(g=!1)}g&&qi(n),ut(n,{"xml:space":"preserve",display:t||e.displayEmpty?null:"none"});const m=ut(n,"font-size");let y=parseFloat(m);y||(y=16,(o||u)&&!m&&ut(n,"font-size",`${y}`));let b;r?(typeof r=="string"&&(r={d:r}),b=MR(r,n)):b=document.createDocumentFragment();let w,x=0,v;const S=t.split(`
36
- `),E=[],C=S.length-1;for(let T=0;T<=C;T+=1){w=d;let k="v-line";const _=cn("tspan");let D,N=S[T];if(N)if(u){const V=gR(N,u,{offset:-x,includeAnnotationIndices:l});D=PR(_,V,{eol:T!==C&&s,baseSize:y,lineHeight:f?null:d,includeAnnotationIndices:l});const A=D.lineHeight;A&&f&&T!==0&&(w=A),T===0&&(v=D.maxFontSize*.8)}else s&&T!==C&&(N+=s),_.textContent=N;else{_.textContent="-",k+=" v-empty-line";const V=_.style;V.fillOpacity=0,V.strokeOpacity=0,u&&(D={})}D&&E.push(D),T>0&&_.setAttribute("dy",w),(T>0||r)&&_.setAttribute("x",a),_.className.baseVal=k,b.appendChild(_),x+=N.length+1}if(o)if(u)w=AR(i,E,y,d);else if(i==="top")w="0.8em";else{let T;switch(C>0?(T=parseFloat(d)||1,T*=C,py.test(d)||(T/=y)):T=0,i){case"middle":w=`${.3-T/2}em`;break;case"bottom":w=`${-T-.3}em`;break}}else i===0?w="0em":i?w=i:(w=0,n.getAttribute("y")==null&&n.setAttribute("y",`${v||"0.8em"}`));b.firstChild.setAttribute("dy",w),n.appendChild(b)}function Xi(n,t={}){const e=document.createElement("canvas").getContext("2d");if(!n)return{width:0};const s=[],r=t["font-size"]?`${parseFloat(t["font-size"])}px`:"14px";return s.push(t["font-style"]||"normal"),s.push(t["font-variant"]||"normal"),s.push(t["font-weight"]||400),s.push(r),s.push(t["font-family"]||"sans-serif"),e.font=s.join(" "),e.measureText(n)}function yy(n,t,e,s={}){if(t>=e)return[n,""];const r=n.length,i={};let o=Math.round(t/e*r-1);for(o<0&&(o=0);o>=0&&o<r;){const a=n.slice(0,o),l=i[a]||Xi(a,s).width,u=n.slice(0,o+1),h=i[u]||Xi(u,s).width;if(i[a]=l,i[u]=h,l>t)o-=1;else if(h<=t)o+=1;else break}return[n.slice(0,o),n.slice(o)]}function by(n,t,e={},s={}){const r=t.width,i=t.height,o=s.eol||`
37
- `,a=e.fontSize||14,l=e.lineHeight?parseFloat(e.lineHeight):Math.ceil(a*1.4),u=Math.floor(i/l);if(n.indexOf(o)>-1){const y=Fa(),b=[];return n.split(o).map(w=>{const x=by(w,Object.assign(Object.assign({},t),{height:Number.MAX_SAFE_INTEGER}),e,Object.assign(Object.assign({},s),{eol:y}));x&&b.push(...x.split(y))}),b.slice(0,u).join(o)}const{width:h}=Xi(n,e);if(h<r)return n;const f=[];let d=n,g=h,p=s.ellipsis,m=0;p&&(typeof p!="string"&&(p="…"),m=Xi(p,e).width);for(let y=0;y<u;y+=1)if(g>r)if(y===u-1){const[w]=yy(d,r-m,g,e);f.push(p?`${w}${p}`:w)}else{const[w,x]=yy(d,r,g,e);f.push(w),d=x,g=Xi(d,e).width}else{f.push(d);break}return f.join(o)}const zu=.551784;function ae(n,t,e=NaN){const s=n.getAttribute(t);if(s==null)return e;const r=parseFloat(s);return Number.isNaN(r)?e:r}function TR(n,t=1){const e=n.getTotalLength(),s=[];let r=0,i;for(;r<e;)i=n.getPointAtLength(r),s.push({distance:r,x:i.x,y:i.y}),r+=t;return s}function NR(n){return["M",ae(n,"x1"),ae(n,"y1"),"L",ae(n,"x2"),ae(n,"y2")].join(" ")}function _R(n){const t=Wa(n);return t.length===0?null:`${wy(t)} Z`}function kR(n){const t=Wa(n);return t.length===0?null:wy(t)}function wy(n){return`M ${n.map(e=>`${e.x} ${e.y}`).join(" L")}`}function Wa(n){const t=[],e=n.points;if(e)for(let s=0,r=e.numberOfItems;s<r;s+=1)t.push(e.getItem(s));return t}function DR(n){const t=ae(n,"cx",0),e=ae(n,"cy",0),s=ae(n,"r"),r=s*zu;return["M",t,e-s,"C",t+r,e-s,t+s,e-r,t+s,e,"C",t+s,e+r,t+r,e+s,t,e+s,"C",t-r,e+s,t-s,e+r,t-s,e,"C",t-s,e-r,t-r,e-s,t,e-s,"Z"].join(" ")}function RR(n){const t=ae(n,"cx",0),e=ae(n,"cy",0),s=ae(n,"rx"),r=ae(n,"ry")||s,i=s*zu,o=r*zu;return["M",t,e-r,"C",t+i,e-r,t+s,e-o,t+s,e,"C",t+s,e+o,t+i,e+r,t,e+r,"C",t-i,e+r,t-s,e+o,t-s,e,"C",t-s,e-o,t-i,e-r,t,e-r,"Z"].join(" ")}function IR(n){return xy({x:ae(n,"x",0),y:ae(n,"y",0),width:ae(n,"width",0),height:ae(n,"height",0),rx:ae(n,"rx",0),ry:ae(n,"ry",0)})}function xy(n){let t;const e=n.x,s=n.y,r=n.width,i=n.height,o=Math.min(n.rx||n["top-rx"]||0,r/2),a=Math.min(n.rx||n["bottom-rx"]||0,r/2),l=Math.min(n.ry||n["top-ry"]||0,i/2),u=Math.min(n.ry||n["bottom-ry"]||0,i/2);return o||a||l||u?t=["M",e,s+l,"v",i-l-u,"a",a,u,0,0,0,a,u,"h",r-2*a,"a",a,u,0,0,0,a,-u,"v",-(i-u-l),"a",o,l,0,0,0,-o,-l,"h",-(r-2*o),"a",o,l,0,0,0,-o,l,"Z"]:t=["M",e,s,"H",e+r,"V",s+i,"H",e,"V",s,"Z"],t.join(" ")}function LR(n){const t=cn("path");ut(t,ut(n));const e=vy(n);return e&&t.setAttribute("d",e),t}function vy(n){const t=n.tagName.toLowerCase();switch(t){case"path":return n.getAttribute("d");case"line":return NR(n);case"polygon":return _R(n);case"polyline":return kR(n);case"ellipse":return RR(n);case"circle":return DR(n);case"rect":return IR(n)}throw new Error(`"${t}" cannot be converted to svg path element.`)}const BR=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,Cy=/[ ,]+/,VR=/^(\w+)\((.*)\)/;function jR(n,t){const s=cn("svg").createSVGPoint();return s.x=n,s.y=t,s}function ne(n){const e=cn("svg").createSVGMatrix();if(n!=null){const s=n,r=e;for(const i in s)r[i]=s[i]}return e}function Ki(n){const t=cn("svg");return n!=null?(n instanceof DOMMatrix||(n=ne(n)),t.createSVGTransformFromMatrix(n)):t.createSVGTransform()}function Zi(n){let t=ne();const e=n!=null&&n.match(BR);if(!e)return t;for(let s=0,r=e.length;s<r;s+=1){const o=e[s].match(VR);if(o){let a,l,u,h,f,d=ne();const g=o[2].split(Cy);switch(o[1].toLowerCase()){case"scale":a=parseFloat(g[0]),l=g[1]===void 0?a:parseFloat(g[1]),d=d.scaleNonUniform(a,l);break;case"translate":u=parseFloat(g[0]),h=parseFloat(g[1]),d=d.translate(u,h);break;case"rotate":f=parseFloat(g[0]),u=parseFloat(g[1])||0,h=parseFloat(g[2])||0,u!==0||h!==0?d=d.translate(u,h).rotate(f).translate(-u,-h):d=d.rotate(f);break;case"skewx":f=parseFloat(g[0]),d=d.skewX(f);break;case"skewy":f=parseFloat(g[0]),d=d.skewY(f);break;case"matrix":d.a=parseFloat(g[0]),d.b=parseFloat(g[1]),d.c=parseFloat(g[2]),d.d=parseFloat(g[3]),d.e=parseFloat(g[4]),d.f=parseFloat(g[5]);break;default:continue}t=t.multiply(d)}}return t}function Br(n){const t=n||{},e=t.a!=null?t.a:1,s=t.b!=null?t.b:0,r=t.c!=null?t.c:0,i=t.d!=null?t.d:1,o=t.e!=null?t.e:0,a=t.f!=null?t.f:0;return`matrix(${e},${s},${r},${i},${o},${a})`}function qa(n){let t,e,s;if(n){const i=Cy;if(n.trim().indexOf("matrix")>=0){const o=Zi(n),a=$R(o);t=[a.translateX,a.translateY],e=[a.rotation],s=[a.scaleX,a.scaleY];const l=[];(t[0]!==0||t[1]!==0)&&l.push(`translate(${t.join(",")})`),(s[0]!==1||s[1]!==1)&&l.push(`scale(${s.join(",")})`),e[0]!==0&&l.push(`rotate(${e[0]})`),n=l.join(" ")}else{const o=n.match(/translate\((.*?)\)/);o&&(t=o[1].split(i));const a=n.match(/rotate\((.*?)\)/);a&&(e=a[1].split(i));const l=n.match(/scale\((.*?)\)/);l&&(s=l[1].split(i))}}const r=s&&s[0]?parseFloat(s[0]):1;return{raw:n||"",translation:{tx:t&&t[0]?parseInt(t[0],10):0,ty:t&&t[1]?parseInt(t[1],10):0},rotation:{angle:e&&e[0]?parseInt(e[0],10):0,cx:e&&e[1]?parseInt(e[1],10):void 0,cy:e&&e[2]?parseInt(e[2],10):void 0},scale:{sx:r,sy:s&&s[1]?parseFloat(s[1]):r}}}function Fu(n,t){const e=t.x*n.a+t.y*n.c+0,s=t.x*n.b+t.y*n.d+0;return{x:e,y:s}}function $R(n){const t=Fu(n,{x:0,y:1}),e=Fu(n,{x:1,y:0}),s=180/Math.PI*Math.atan2(t.y,t.x)-90,r=180/Math.PI*Math.atan2(e.y,e.x);return{skewX:s,skewY:r,translateX:n.e,translateY:n.f,scaleX:Math.sqrt(n.a*n.a+n.b*n.b),scaleY:Math.sqrt(n.c*n.c+n.d*n.d),rotation:s}}function zR(n){let t,e,s,r;return n?(t=n.a==null?1:n.a,r=n.d==null?1:n.d,e=n.b,s=n.c):t=r=1,{sx:e?Math.sqrt(t*t+e*e):t,sy:s?Math.sqrt(s*s+r*r):r}}function FR(n){let t={x:0,y:1};n&&(t=Fu(n,t));const e=180*Math.atan2(t.y,t.x)/Math.PI%360-90;return{angle:e%360+(e<0?360:0)}}function HR(n){return{tx:n&&n.e||0,ty:n&&n.f||0}}function Vr(n,t,e={}){if(t==null)return Zi(ut(n,"transform"));if(e.absolute){n.setAttribute("transform",Br(t));return}const s=n.transform,r=Ki(t);s.baseVal.appendItem(r)}function Sy(n,t,e=0,s={}){let r=ut(n,"transform");const i=qa(r);if(t==null)return i.translation;r=i.raw,r=r.replace(/translate\([^)]*\)/g,"").trim();const o=s.absolute?t:i.translation.tx+t,a=s.absolute?e:i.translation.ty+e,l=`translate(${o},${a})`;n.setAttribute("transform",`${l} ${r}`.trim())}function Hu(n,t,e,s,r={}){let i=ut(n,"transform");const o=qa(i);if(t==null)return o.rotation;i=o.raw,i=i.replace(/rotate\([^)]*\)/g,"").trim(),t%=360;const a=r.absolute?t:o.rotation.angle+t,l=e!=null&&s!=null?`,${e},${s}`:"",u=`rotate(${a}${l})`;n.setAttribute("transform",`${i} ${u}`.trim())}function Uu(n,t,e){let s=ut(n,"transform");const r=qa(s);if(t==null)return r.scale;e=e??t,s=r.raw,s=s.replace(/scale\([^)]*\)/g,"").trim();const i=`scale(${t},${e})`;n.setAttribute("transform",`${s} ${i}`.trim())}function Qi(n,t){if(gs(t)&&gs(n)){const e=t.getScreenCTM(),s=n.getScreenCTM();if(e&&s)return e.inverse().multiply(s)}return ne()}function UR(n,t){let e=ne();if(gs(t)&&gs(n)){let s=n;const r=[];for(;s&&s!==t;){const i=s.getAttribute("transform")||null,o=Zi(i);r.push(o),s=s.parentNode}r.reverse().forEach(i=>{e=e.multiply(i)})}return e}function GR(n,t,e){const s=n instanceof SVGSVGElement?n:n.ownerSVGElement,r=s.createSVGPoint();r.x=t,r.y=e;try{const i=s.getScreenCTM(),o=r.matrixTransform(i.inverse()),a=Qi(n,s).inverse();return o.matrixTransform(a)}catch{return r}}var Fe;(function(n){const t={};function e(i){return t[i]||{}}n.get=e;function s(i,o){t[i]=o}n.register=s;function r(i){delete t[i]}n.unregister=r})(Fe||(Fe={}));var Xs;(function(n){const t=new WeakMap;function e(i){return t.has(i)||t.set(i,{events:Object.create(null)}),t.get(i)}n.ensure=e;function s(i){return t.get(i)}n.get=s;function r(i){return t.delete(i)}n.remove=r})(Xs||(Xs={}));var it;(function(n){n.returnTrue=()=>!0,n.returnFalse=()=>!1;function t(r){r.stopPropagation()}n.stopPropagationCallback=t;function e(r,i,o){r.addEventListener!=null&&r.addEventListener(i,o)}n.addEventListener=e;function s(r,i,o){r.removeEventListener!=null&&r.removeEventListener(i,o)}n.removeEventListener=s})(it||(it={})),function(n){const t=/[^\x20\t\r\n\f]+/g,e=/^([^.]*)(?:\.(.+)|)/;function s(a){return(a||"").match(t)||[""]}n.splitType=s;function r(a){const l=e.exec(a)||[];return{originType:l[1]?l[1].trim():l[1],namespaces:l[2]?l[2].split(".").map(u=>u.trim()).sort():[]}}n.normalizeType=r;function i(a){return a.nodeType===1||a.nodeType===9||!+a.nodeType}n.isValidTarget=i;function o(a,l){if(l){const u=a;return u.querySelector!=null&&u.querySelector(l)!=null}return!0}n.isValidSelector=o}(it||(it={})),function(n){let t=0;const e=new WeakMap;function s(a){return e.has(a)||(e.set(a,t),t+=1),e.get(a)}n.ensureHandlerId=s;function r(a){return e.get(a)}n.getHandlerId=r;function i(a){return e.delete(a)}n.removeHandlerId=i;function o(a,l){return e.set(a,l)}n.setHandlerId=o}(it||(it={})),function(n){function t(e,s){const r=[],i=Xs.get(e),o=i&&i.events&&i.events[s.type],a=o&&o.handlers||[],l=o?o.delegateCount:0;if(l>0&&!(s.type==="click"&&typeof s.button=="number"&&s.button>=1)){for(let u=s.target;u!==e;u=u.parentNode||e)if(u.nodeType===1&&!(s.type==="click"&&u.disabled===!0)){const h=[],f={};for(let d=0;d<l;d+=1){const g=a[d],p=g.selector;if(p!=null&&f[p]==null){const m=e,y=[];m.querySelectorAll(p).forEach(b=>{y.push(b)}),f[p]=y.includes(u)}f[p]&&h.push(g)}h.length&&r.push({elem:u,handlers:h})}}return l<a.length&&r.push({elem:e,handlers:a.slice(l)}),r}n.getHandlerQueue=t}(it||(it={})),function(n){function t(e){return e!=null&&e===e.window}n.isWindow=t}(it||(it={})),function(n){function t(e,s){const r=e.nodeType===9?e.documentElement:e,i=s&&s.parentNode;return e===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):e.compareDocumentPosition&&e.compareDocumentPosition(i)&16))}n.contains=t}(it||(it={}));class En{constructor(t,e){this.isDefaultPrevented=it.returnFalse,this.isPropagationStopped=it.returnFalse,this.isImmediatePropagationStopped=it.returnFalse,this.isSimulated=!1,this.preventDefault=()=>{const s=this.originalEvent;this.isDefaultPrevented=it.returnTrue,s&&!this.isSimulated&&s.preventDefault()},this.stopPropagation=()=>{const s=this.originalEvent;this.isPropagationStopped=it.returnTrue,s&&!this.isSimulated&&s.stopPropagation()},this.stopImmediatePropagation=()=>{const s=this.originalEvent;this.isImmediatePropagationStopped=it.returnTrue,s&&!this.isSimulated&&s.stopImmediatePropagation(),this.stopPropagation()},typeof t=="string"?this.type=t:t.type&&(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?it.returnTrue:it.returnFalse,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.timeStamp=t.timeStamp),e&&Object.assign(this,e),this.timeStamp||(this.timeStamp=Date.now())}}(function(n){function t(e){return e instanceof n?e:new n(e)}n.create=t})(En||(En={})),function(n){function t(e,s){Object.defineProperty(n.prototype,e,{enumerable:!0,configurable:!0,get:typeof s=="function"?function(){if(this.originalEvent)return s(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set(r){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:r})}})}n.addProperty=t}(En||(En={})),function(n){const t={bubbles:!0,cancelable:!0,eventPhase:!0,detail:!0,view:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pageX:!0,pageY:!0,screenX:!0,screenY:!0,toElement:!0,pointerId:!0,pointerType:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,touches:!0,changedTouches:!0,targetTouches:!0,which:!0,altKey:!0,ctrlKey:!0,metaKey:!0,shiftKey:!0};Object.keys(t).forEach(e=>n.addProperty(e,t[e]))}(En||(En={})),function(n){Fe.register("load",{noBubble:!0})}(),function(n){Fe.register("beforeunload",{postDispatch(t,e){e.result!==void 0&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}})}(),function(n){Fe.register("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(t,e){let s;const r=e.relatedTarget,i=e.handleObj;return(!r||r!==t&&!it.contains(t,r))&&(e.type=i.originType,s=i.handler.call(t,e),e.type="mouseover"),s}}),Fe.register("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(t,e){let s;const r=e.relatedTarget,i=e.handleObj;return(!r||r!==t&&!it.contains(t,r))&&(e.type=i.originType,s=i.handler.call(t,e),e.type="mouseout"),s}})}();var YR=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e},to;(function(n){let t;function e(o,a,l,u,h){if(!it.isValidTarget(o))return;let f;if(typeof l!="function"){const{handler:m,selector:y}=l,b=YR(l,["handler","selector"]);l=m,h=y,f=b}const d=Xs.ensure(o);let g=d.handler;g==null&&(g=d.handler=function(m,...y){return t!==m.type?r(o,m,...y):void 0});const p=it.ensureHandlerId(l);it.splitType(a).forEach(m=>{const{originType:y,namespaces:b}=it.normalizeType(m);if(!y)return;let w=y,x=Fe.get(w);w=(h?x.delegateType:x.bindType)||w,x=Fe.get(w);const v=Object.assign({type:w,originType:y,data:u,selector:h,guid:p,handler:l,namespace:b.join(".")},f),S=d.events;let E=S[w];E||(E=S[w]={handlers:[],delegateCount:0},(!x.setup||x.setup(o,u,b,g)===!1)&&it.addEventListener(o,w,g)),x.add&&(it.removeHandlerId(v.handler),x.add(o,v),it.setHandlerId(v.handler,p)),h?(E.handlers.splice(E.delegateCount,0,v),E.delegateCount+=1):E.handlers.push(v)})}n.on=e;function s(o,a,l,u,h){const f=Xs.get(o);if(!f)return;const d=f.events;d&&(it.splitType(a).forEach(g=>{const{originType:p,namespaces:m}=it.normalizeType(g);if(!p){Object.keys(d).forEach(S=>{s(o,S+g,l,u,!0)});return}let y=p;const b=Fe.get(y);y=(u?b.delegateType:b.bindType)||y;const w=d[y];if(!w)return;const x=m.length>0?new RegExp(`(^|\\.)${m.join("\\.(?:.*\\.|)")}(\\.|$)`):null,v=w.handlers.length;for(let S=w.handlers.length-1;S>=0;S-=1){const E=w.handlers[S];(h||p===E.originType)&&(!l||it.getHandlerId(l)===E.guid)&&(x==null||E.namespace&&x.test(E.namespace))&&(u==null||u===E.selector||u==="**"&&E.selector)&&(w.handlers.splice(S,1),E.selector&&(w.delegateCount-=1),b.remove&&b.remove(o,E))}v&&w.handlers.length===0&&((!b.teardown||b.teardown(o,m,f.handler)===!1)&&it.removeEventListener(o,y,f.handler),delete d[y])}),Object.keys(d).length===0&&Xs.remove(o))}n.off=s;function r(o,a,...l){const u=En.create(a);u.delegateTarget=o;const h=Fe.get(u.type);if(h.preDispatch&&h.preDispatch(o,u)===!1)return;const f=it.getHandlerQueue(o,u);for(let d=0,g=f.length;d<g&&!u.isPropagationStopped();d+=1){const p=f[d];u.currentTarget=p.elem;for(let m=0,y=p.handlers.length;m<y&&!u.isImmediatePropagationStopped();m+=1){const b=p.handlers[m];if(u.rnamespace==null||b.namespace&&u.rnamespace.test(b.namespace)){u.handleObj=b,u.data=b.data;const w=Fe.get(b.originType).handle,x=w?w(p.elem,u,...l):b.handler.call(p.elem,u,...l);x!==void 0&&(u.result=x,x===!1&&(u.preventDefault(),u.stopPropagation()))}}}return h.postDispatch&&h.postDispatch(o,u),u.result}n.dispatch=r;function i(o,a,l,u){let h=o,f=typeof o=="string"?o:o.type,d=typeof o=="string"||h.namespace==null?[]:h.namespace.split(".");const g=l;if(g.nodeType===3||g.nodeType===8)return;f.indexOf(".")>-1&&(d=f.split("."),f=d.shift(),d.sort());const p=f.indexOf(":")<0&&`on${f}`;h=o instanceof En?o:new En(f,typeof o=="object"?o:null),h.namespace=d.join("."),h.rnamespace=h.namespace?new RegExp(`(^|\\.)${d.join("\\.(?:.*\\.|)")}(\\.|$)`):null,h.result=void 0,h.target||(h.target=g);const m=[h];Array.isArray(a)?m.push(...a):m.push(a);const y=Fe.get(f);if(!u&&y.trigger&&y.trigger(g,h,a)===!1)return;let b;const w=[g];if(!u&&!y.noBubble&&!it.isWindow(g)){b=y.delegateType||f;let v=g,S=g.parentNode;for(;S!=null;)w.push(S),v=S,S=S.parentNode;const E=g.ownerDocument||document;if(v===E){const C=v.defaultView||v.parentWindow||window;w.push(C)}}let x=g;for(let v=0,S=w.length;v<S&&!h.isPropagationStopped();v+=1){const E=w[v];x=E,h.type=v>1?b:y.bindType||f;const C=Xs.get(E);C&&C.events[h.type]&&C.handler&&C.handler.call(E,...m);const M=p&&E[p]||null;M&&it.isValidTarget(E)&&(h.result=M.call(E,...m),h.result===!1&&h.preventDefault())}if(h.type=f,!u&&!h.isDefaultPrevented()){const v=y.preventDefault;if((v==null||v(w.pop(),h,a)===!1)&&it.isValidTarget(g)&&p&&typeof g[f]=="function"&&!it.isWindow(g)){const S=g[p];S&&(g[p]=null),t=f,h.isPropagationStopped()&&x.addEventListener(f,it.stopPropagationCallback),g[f](),h.isPropagationStopped()&&x.removeEventListener(f,it.stopPropagationCallback),t=void 0,S&&(g[p]=S)}}return h.result}n.trigger=i})(to||(to={}));var le;(function(n){function t(i,o,a,l,u){return eo.on(i,o,a,l,u),i}n.on=t;function e(i,o,a,l,u){return eo.on(i,o,a,l,u,!0),i}n.once=e;function s(i,o,a,l){return eo.off(i,o,a,l),i}n.off=s;function r(i,o,a,l){return to.trigger(o,a,i,l),i}n.trigger=r})(le||(le={}));var eo;(function(n){function t(s,r,i,o,a,l){if(typeof r=="object"){typeof i!="string"&&(o=o||i,i=void 0),Object.keys(r).forEach(u=>t(s,u,i,o,r[u],l));return}if(o==null&&a==null?(a=i,o=i=void 0):a==null&&(typeof i=="string"?(a=o,o=void 0):(a=o,o=i,i=void 0)),a===!1)a=it.returnFalse;else if(!a)return;if(l){const u=a;a=function(h,...f){return n.off(s,h),u.call(this,h,...f)},it.setHandlerId(a,it.ensureHandlerId(u))}to.on(s,r,a,o,i)}n.on=t;function e(s,r,i,o){const a=r;if(a&&a.preventDefault!=null&&a.handleObj!=null){const l=a.handleObj;e(a.delegateTarget,l.namespace?`${l.originType}.${l.namespace}`:l.originType,l.selector,l.handler);return}if(typeof r=="object"){const l=r;Object.keys(l).forEach(u=>e(s,u,i,l[u]));return}(i===!1||typeof i=="function")&&(o=i,i=void 0),o===!1&&(o=it.returnFalse),to.off(s,r,o,i)}n.off=e})(eo||(eo={}));class Ey{constructor(t,e,s){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=fs.isEventSupported("wheel")?"wheel":"mousewheel",this.target=t,this.onWheelCallback=e,this.onWheelGuard=s,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){this.target.addEventListener(this.eventName,this.onWheel,{passive:!1})}disable(){this.target.removeEventListener(this.eventName,this.onWheel)}onWheel(t){if(this.onWheelGuard!=null&&!this.onWheelGuard(t))return;this.deltaX+=t.deltaX,this.deltaY+=t.deltaY,t.preventDefault();let e;(this.deltaX!==0||this.deltaY!==0)&&(t.stopPropagation(),e=!0),e===!0&&this.animationFrameId===0&&(this.animationFrameId=requestAnimationFrame(()=>{this.didWheel(t)}))}didWheel(t){this.animationFrameId=0,this.onWheelCallback(t,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function Gu(n){const t=n.getBoundingClientRect(),e=n.ownerDocument.defaultView;return{top:t.top+e.pageYOffset,left:t.left+e.pageXOffset}}function WR(n){return n.getBoundingClientRect().width}function qR(n){return n.getBoundingClientRect().height}function Oy(n,t=60){let e=null;return(...s)=>{e&&clearTimeout(e),e=window.setTimeout(()=>{n.apply(this,s)},t)}}function JR(n){let t=null,e=[];const s=()=>{if(getComputedStyle(n).position==="static"){const u=n.style;u.position="relative"}const l=document.createElement("object");return l.onload=()=>{l.contentDocument.defaultView.addEventListener("resize",r),r()},l.style.display="block",l.style.position="absolute",l.style.top="0",l.style.left="0",l.style.height="100%",l.style.width="100%",l.style.overflow="hidden",l.style.pointerEvents="none",l.style.zIndex="-1",l.style.opacity="0",l.setAttribute("tabindex","-1"),l.type="text/html",n.appendChild(l),l.data="about:blank",l},r=Oy(()=>{e.forEach(l=>l(n))}),i=l=>{t||(t=s()),e.indexOf(l)===-1&&e.push(l)},o=()=>{t&&t.parentNode&&(t.contentDocument&&t.contentDocument.defaultView.removeEventListener("resize",r),t.parentNode.removeChild(t),t=null,e=[])};return{element:n,bind:i,destroy:o,unbind:l=>{const u=e.indexOf(l);u!==-1&&e.splice(u,1),e.length===0&&t&&o()}}}function XR(n){let t=null,e=[];const s=Oy(()=>{e.forEach(l=>{l(n)})}),r=()=>{const l=new ResizeObserver(s);return l.observe(n),s(),l},i=l=>{t||(t=r()),e.indexOf(l)===-1&&e.push(l)},o=()=>{t&&(t.disconnect(),e=[],t=null)};return{element:n,bind:i,destroy:o,unbind:l=>{const u=e.indexOf(l);u!==-1&&e.splice(u,1),e.length===0&&t&&o()}}}const KR=typeof ResizeObserver<"u"?XR:JR;var Ja;(function(n){const t=new WeakMap;function e(r){let i=t.get(r);return i||(i=KR(r),t.set(r,i),i)}function s(r){r.destroy(),t.delete(r.element)}n.bind=(r,i)=>{const o=e(r);return o.bind(i),()=>o.unbind(i)},n.clear=r=>{const i=e(r);s(i)}})(Ja||(Ja={}));class no{constructor(t={}){this.comparator=t.comparator||no.defaultComparator,this.index={},this.data=t.data||[],this.heapify()}isEmpty(){return this.data.length===0}insert(t,e,s){const r={priority:t,value:e},i=this.data.length;return s&&(r.id=s,this.index[s]=i),this.data.push(r),this.bubbleUp(i),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}updatePriority(t,e){const s=this.index[t];if(typeof s>"u")throw new Error(`Node with id '${t}' was not found in the heap.`);const r=this.data,i=r[s].priority,o=this.comparator(e,i);o<0?(r[s].priority=e,this.bubbleUp(s)):o>0&&(r[s].priority=e,this.bubbleDown(s))}remove(){const t=this.data,e=t[0],s=t.pop();return e.id&&delete this.index[e.id],t.length>0&&(t[0]=s,s.id&&(this.index[s.id]=0),this.bubbleDown(0)),e?e.value:null}heapify(){for(let t=0;t<this.data.length;t+=1)this.bubbleUp(t)}bubbleUp(t){const e=this.data;let s,r,i=t;for(;i>0&&(r=i-1>>>1,this.comparator(e[i].priority,e[r].priority)<0);){s=e[r],e[r]=e[i];let o=e[i].id;o!=null&&(this.index[o]=r),e[i]=s,o=e[i].id,o!=null&&(this.index[o]=i),i=r}}bubbleDown(t){const e=this.data,s=e.length-1;let r=t;for(;;){const i=(r<<1)+1,o=i+1;let a=r;if(i<=s&&this.comparator(e[i].priority,e[a].priority)<0&&(a=i),o<=s&&this.comparator(e[o].priority,e[a].priority)<0&&(a=o),a!==r){const l=e[a];e[a]=e[r];let u=e[r].id;u!=null&&(this.index[u]=a),e[r]=l,u=e[r].id,u!=null&&(this.index[u]=r),r=a}else break}}}(function(n){n.defaultComparator=(t,e)=>t-e})(no||(no={}));var Yu;(function(n){function t(e,s,r=(i,o)=>1){const i={},o={},a={},l=new no;for(i[s]=0,Object.keys(e).forEach(u=>{u!==s&&(i[u]=1/0),l.insert(i[u],u,u)});!l.isEmpty();){const u=l.remove();a[u]=!0;const h=e[u]||[];for(let f=0;f<h.length;f+=1){const d=h[f];if(!a[d]){const g=i[u]+r(u,d);g<i[d]&&(i[d]=g,o[d]=u,l.updatePriority(d,g))}}}return o}n.run=t})(Yu||(Yu={}));class Wn{constructor(t,e,s,r){if(t==null)return this.set(255,255,255,1);if(typeof t=="number")return this.set(t,e,s,r);if(typeof t=="string")return Wn.fromString(t)||this;if(Array.isArray(t))return this.set(t);this.set(t.r,t.g,t.b,t.a==null?1:t.a)}blend(t,e,s){this.set(t.r+(e.r-t.r)*s,t.g+(e.g-t.g)*s,t.b+(e.b-t.b)*s,t.a+(e.a-t.a)*s)}lighten(t){const e=Wn.lighten(this.toArray(),t);this.r=e[0],this.g=e[1],this.b=e[2],this.a=e[3]}darken(t){this.lighten(-t)}set(t,e,s,r){const i=Array.isArray(t)?t[0]:t,o=Array.isArray(t)?t[1]:e,a=Array.isArray(t)?t[2]:s,l=Array.isArray(t)?t[3]:r;return this.r=Math.round(we(i,0,255)),this.g=Math.round(we(o,0,255)),this.b=Math.round(we(a,0,255)),this.a=l==null?1:we(l,0,1),this}toHex(){return`#${["r","g","b"].map(e=>{const s=this[e].toString(16);return s.length<2?`0${s}`:s}).join("")}`}toRGBA(){return this.toArray()}toHSLA(){return Wn.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(t){const e=`${this.r},${this.g},${this.b},`;return t?`rgb(${e})`:`rgba(${e},${this.a})`}toGrey(){return Wn.makeGrey(Math.round((this.r+this.g+this.b)/3),this.a)}toArray(){return[this.r,this.g,this.b,this.a]}toString(){return this.toCSS()}}(function(n){function t(x){return new n(x)}n.fromArray=t;function e(x){return new n([...p(x),1])}n.fromHex=e;function s(x){const v=x.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(v){const S=v[1].split(/\s*,\s*/).map(E=>parseInt(E,10));return new n(S)}return null}n.fromRGBA=s;function r(x,v,S){S<0&&++S,S>1&&--S;const E=6*S;return E<1?x+(v-x)*E:2*S<1?v:3*S<2?x+(v-x)*(2/3-S)*6:x}function i(x){const v=x.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(v){const S=v[2].split(/\s*,\s*/),E=(parseFloat(S[0])%360+360)%360/360,C=parseFloat(S[1])/100,M=parseFloat(S[2])/100,T=S[3]==null?1:parseInt(S[3],10);return new n(u(E,C,M,T))}return null}n.fromHSLA=i;function o(x){if(x.startsWith("#"))return e(x);if(x.startsWith("rgb"))return s(x);const v=n.named[x];return v?e(v):i(x)}n.fromString=o;function a(x,v){return n.fromArray([x,x,x,v])}n.makeGrey=a;function l(x,v,S,E){const C=Array.isArray(x)?x[0]:x,M=Array.isArray(x)?x[1]:v,T=Array.isArray(x)?x[2]:S,k=Array.isArray(x)?x[3]:E,_=Math.max(C,M,T),D=Math.min(C,M,T),N=(_+D)/2;let V=0,A=0;if(D!==_){const P=_-D;switch(A=N>.5?P/(2-_-D):P/(_+D),_){case C:V=(M-T)/P+(M<T?6:0);break;case M:V=(T-C)/P+2;break;case T:V=(C-M)/P+4;break}V/=6}return[V,A,N,k??1]}n.rgba2hsla=l;function u(x,v,S,E){const C=Array.isArray(x)?x[0]:x,M=Array.isArray(x)?x[1]:v,T=Array.isArray(x)?x[2]:S,k=Array.isArray(x)?x[3]:E,_=T<=.5?T*(M+1):T+M-T*M,D=2*T-_;return[r(D,_,C+1/3)*256,r(D,_,C)*256,r(D,_,C-1/3)*256,k??1]}n.hsla2rgba=u;function h(x){return new n(Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),x?void 0:parseFloat(Math.random().toFixed(2)))}n.random=h;function f(){const x="0123456789ABCDEF";let v="#";for(let S=0;S<6;S+=1)v+=x[Math.floor(Math.random()*16)];return v}n.randomHex=f;function d(x){return h(x).toString()}n.randomRGBA=d;function g(x,v){if(typeof x=="string"){const T=x[0]==="#",[k,_,D]=p(x);return v?k*.299+_*.587+D*.114>186?"#000000":"#ffffff":`${T?"#":""}${m(255-k,255-_,255-D)}`}const S=x[0],E=x[1],C=x[2],M=x[3];return v?S*.299+E*.587+C*.114>186?[0,0,0,M]:[255,255,255,M]:[255-S,255-E,255-C,M]}n.invert=g;function p(x){const v=x.indexOf("#")===0?x:`#${x}`;let S=+`0x${v.substr(1)}`;if(!(v.length===4||v.length===7)||Number.isNaN(S))throw new Error("Invalid hex color.");const E=v.length===4?4:8,C=(1<<E)-1,M=["b","g","r"].map(()=>{const T=S&C;return S>>=E,E===4?17*T:T});return[M[2],M[1],M[0]]}function m(x,v,S){const E=C=>C.length<2?`0${C}`:C;return`${E(x.toString(16))}${E(v.toString(16))}${E(S.toString(16))}`}function y(x,v){return w(x,v)}n.lighten=y;function b(x,v){return w(x,-v)}n.darken=b;function w(x,v){if(typeof x=="string"){const C=x[0]==="#",M=parseInt(C?x.substr(1):x,16),T=we((M>>16)+v,0,255),k=we((M>>8&255)+v,0,255),_=we((M&255)+v,0,255);return`${C?"#":""}${(_|k<<8|T<<16).toString(16)}`}const S=m(x[0],x[1],x[2]),E=p(w(S,v));return[E[0],E[1],E[2],x[3]]}})(Wn||(Wn={})),function(n){n.named={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",burntsienna:"#ea7e5d",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",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",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"}}(Wn||(Wn={}));class Wu{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(t){return this.map.has(t)}get(t){return this.map.get(t)}set(t,e){this.map.set(t,e),this.arr.push(t)}delete(t){const e=this.arr.indexOf(t);e>=0&&this.arr.splice(e,1);const s=this.map.get(t);return this.map.delete(t),s}each(t){this.arr.forEach(e=>{const s=this.map.get(e);t(s,e)})}dispose(){this.clear()}}var ms;(function(n){function t(r){const i=[],o=[];return Array.isArray(r)?i.push(...r):r.split("|").forEach(a=>{a.indexOf("&")===-1?i.push(a):o.push(...a.split("&"))}),{or:i,and:o}}n.parse=t;function e(r,i){if(r!=null&&i!=null){const o=t(r),a=t(i),l=o.or.sort(),u=a.or.sort(),h=o.and.sort(),f=a.and.sort(),d=(g,p)=>g.length===p.length&&(g.length===0||g.every((m,y)=>m===p[y]));return d(l,u)&&d(h,f)}return r==null&&i==null}n.equals=e;function s(r,i,o){if(i==null||Array.isArray(i)&&i.length===0)return o?r.altKey!==!0&&r.ctrlKey!==!0&&r.metaKey!==!0&&r.shiftKey!==!0:!0;const{or:a,and:l}=t(i),u=h=>{const f=`${h.toLowerCase()}Key`;return r[f]===!0};return a.some(h=>u(h))&&l.every(h=>u(h))}n.isMatch=s})(ms||(ms={}));var Ks;(function(n){n.linear=t=>t,n.quad=t=>t*t,n.cubic=t=>t*t*t,n.inout=t=>{if(t<=0)return 0;if(t>=1)return 1;const e=t*t,s=e*t;return 4*(t<.5?s:3*(t-e)+s-.75)},n.exponential=t=>Math.pow(2,10*(t-1)),n.bounce=t=>{for(let e=0,s=1;;e+=s,s/=2)if(t>=(7-4*e)/11){const r=(11-6*e-11*t)/4;return-r*r+s*s}}})(Ks||(Ks={})),function(n){n.decorators={reverse(t){return e=>1-t(1-e)},reflect(t){return e=>.5*(e<.5?t(2*e):2-t(2-2*e))},clamp(t,e=0,s=1){return r=>{const i=t(r);return i<e?e:i>s?s:i}},back(t=1.70158){return e=>e*e*((t+1)*e-t)},elastic(t=1.5){return e=>Math.pow(2,10*(e-1))*Math.cos(20*Math.PI*t/3*e)}}}(Ks||(Ks={})),function(n){function t(A){return-1*Math.cos(A*(Math.PI/2))+1}n.easeInSine=t;function e(A){return Math.sin(A*(Math.PI/2))}n.easeOutSine=e;function s(A){return-.5*(Math.cos(Math.PI*A)-1)}n.easeInOutSine=s;function r(A){return A*A}n.easeInQuad=r;function i(A){return A*(2-A)}n.easeOutQuad=i;function o(A){return A<.5?2*A*A:-1+(4-2*A)*A}n.easeInOutQuad=o;function a(A){return A*A*A}n.easeInCubic=a;function l(A){const P=A-1;return P*P*P+1}n.easeOutCubic=l;function u(A){return A<.5?4*A*A*A:(A-1)*(2*A-2)*(2*A-2)+1}n.easeInOutCubic=u;function h(A){return A*A*A*A}n.easeInQuart=h;function f(A){const P=A-1;return 1-P*P*P*P}n.easeOutQuart=f;function d(A){const P=A-1;return A<.5?8*A*A*A*A:1-8*P*P*P*P}n.easeInOutQuart=d;function g(A){return A*A*A*A*A}n.easeInQuint=g;function p(A){const P=A-1;return 1+P*P*P*P*P}n.easeOutQuint=p;function m(A){const P=A-1;return A<.5?16*A*A*A*A*A:1+16*P*P*P*P*P}n.easeInOutQuint=m;function y(A){return A===0?0:Math.pow(2,10*(A-1))}n.easeInExpo=y;function b(A){return A===1?1:-Math.pow(2,-10*A)+1}n.easeOutExpo=b;function w(A){if(A===0||A===1)return A;const P=A*2,L=P-1;return P<1?.5*Math.pow(2,10*L):.5*(-Math.pow(2,-10*L)+2)}n.easeInOutExpo=w;function x(A){const P=A/1;return-1*(Math.sqrt(1-P*A)-1)}n.easeInCirc=x;function v(A){const P=A-1;return Math.sqrt(1-P*P)}n.easeOutCirc=v;function S(A){const P=A*2,L=P-2;return P<1?-.5*(Math.sqrt(1-P*P)-1):.5*(Math.sqrt(1-L*L)+1)}n.easeInOutCirc=S;function E(A,P=1.70158){return A*A*((P+1)*A-P)}n.easeInBack=E;function C(A,P=1.70158){const L=A/1-1;return L*L*((P+1)*L+P)+1}n.easeOutBack=C;function M(A,P=1.70158){const L=A*2,j=L-2,Y=P*1.525;return L<1?.5*L*L*((Y+1)*L-Y):.5*(j*j*((Y+1)*j+Y)+2)}n.easeInOutBack=M;function T(A,P=.7){if(A===0||A===1)return A;const j=A/1-1,Y=1-P,ot=Y/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*j)*Math.sin((j-ot)*(2*Math.PI)/Y))}n.easeInElastic=T;function k(A,P=.7){const L=1-P,j=A*2;if(A===0||A===1)return A;const Y=L/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*j)*Math.sin((j-Y)*(2*Math.PI)/L)+1}n.easeOutElastic=k;function _(A,P=.65){const L=1-P;if(A===0||A===1)return A;const j=A*2,Y=j-1,ot=L/(2*Math.PI)*Math.asin(1);return j<1?-.5*(Math.pow(2,10*Y)*Math.sin((Y-ot)*(2*Math.PI)/L)):Math.pow(2,-10*Y)*Math.sin((Y-ot)*(2*Math.PI)/L)*.5+1}n.easeInOutElastic=_;function D(A){const P=A/1;if(P<1/2.75)return 7.5625*P*P;if(P<2/2.75){const L=P-.5454545454545454;return 7.5625*L*L+.75}if(P<2.5/2.75){const L=P-.8181818181818182;return 7.5625*L*L+.9375}{const L=P-.9545454545454546;return 7.5625*L*L+.984375}}n.easeOutBounce=D;function N(A){return 1-D(1-A)}n.easeInBounce=N;function V(A){return A<.5?N(A*2)*.5:D(A*2-1)*.5+.5}n.easeInOutBounce=V}(Ks||(Ks={}));var Zs;(function(n){n.number=(t,e)=>{const s=e-t;return r=>t+s*r},n.object=(t,e)=>{const s=Object.keys(t);return r=>{const i={};for(let o=s.length-1;o!==-1;o-=1){const a=s[o];i[a]=t[a]+(e[a]-t[a])*r}return i}},n.unit=(t,e)=>{const s=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=s.exec(t),i=s.exec(e),o=i?i[1]:"",a=r?+r[1]:0,l=i?+i[1]:0,u=o.indexOf("."),h=u>0?o[1].length-u-1:0,f=l-a,d=r?r[2]:"";return g=>(a+f*g).toFixed(h)+d},n.color=(t,e)=>{const s=parseInt(t.slice(1),16),r=parseInt(e.slice(1),16),i=s&255,o=(r&255)-i,a=s&65280,l=(r&65280)-a,u=s&16711680,h=(r&16711680)-u;return f=>{const d=i+o*f&255,g=a+l*f&65280,p=u+h*f&16711680;return`#${(1<<24|d|g|p).toString(16).slice(1)}`}}})(Zs||(Zs={}));const so=[];function jr(n,t){const e=so.find(s=>s.name===n);if(!(e&&(e.loadTimes+=1,e.loadTimes>1))&&!fs.isApplyingHMR()){const s=document.createElement("style");s.setAttribute("type","text/css"),s.textContent=t;const r=document.querySelector("head");r&&r.insertBefore(s,r.firstChild),so.push({name:n,loadTimes:1,styleElement:s})}}function $r(n){const t=so.findIndex(e=>e.name===n);if(t>-1){const e=so[t];if(e.loadTimes-=1,e.loadTimes>0)return;let s=e.styleElement;s&&s.parentNode&&s.parentNode.removeChild(s),s=null,so.splice(t,1)}}var gt;(function(n){function t(s){return 180*s/Math.PI%360}n.toDeg=t,n.toRad=function(s,r=!1){return(r?s:s%360)*Math.PI/180};function e(s){return s%360+(s<0?360:0)}n.normalize=e})(gt||(gt={}));var wt;(function(n){function t(a,l=0){return Number.isInteger(a)?a:+a.toFixed(l)}n.round=t;function e(a,l){let u,h;if(l==null?(h=a??1,u=0):(h=l,u=a??0),h<u){const f=u;u=h,h=f}return Math.floor(Math.random()*(h-u+1)+u)}n.random=e;function s(a,l,u){return Number.isNaN(a)?NaN:Number.isNaN(l)||Number.isNaN(u)?0:l<u?a<l?l:a>u?u:a:a<u?u:a>l?l:a}n.clamp=s;function r(a,l){return l*Math.round(a/l)}n.snapToGrid=r;function i(a,l){return l!=null&&a!=null&&l.x>=a.x&&l.x<=a.x+a.width&&l.y>=a.y&&l.y<=a.y+a.height}n.containsPoint=i;function o(a,l){const u=a.x-l.x,h=a.y-l.y;return u*u+h*h}n.squaredLength=o})(wt||(wt={}));class ys{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class O extends ys{constructor(t,e){super(),this.x=t??0,this.y=e??0}round(t=0){return this.x=wt.round(this.x,t),this.y=wt.round(this.y,t),this}add(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}update(t,e){const s=O.create(t,e);return this.x=s.x,this.y=s.y,this}translate(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}rotate(t,e){const s=O.rotate(this,t,e);return this.x=s.x,this.y=s.y,this}scale(t,e,s=new O){const r=O.create(s);return this.x=r.x+t*(this.x-r.x),this.y=r.y+e*(this.y-r.y),this}closest(t){if(t.length===1)return O.create(t[0]);let e=null,s=1/0;return t.forEach(r=>{const i=this.squaredDistance(r);i<s&&(e=r,s=i)}),e?O.create(e):null}distance(t){return Math.sqrt(this.squaredDistance(t))}squaredDistance(t){const e=O.create(t),s=this.x-e.x,r=this.y-e.y;return s*s+r*r}manhattanDistance(t){const e=O.create(t);return Math.abs(e.x-this.x)+Math.abs(e.y-this.y)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)||.01}theta(t=new O){const e=O.create(t),s=-(e.y-this.y),r=e.x-this.x;let i=Math.atan2(s,r);return i<0&&(i=2*Math.PI+i),180*i/Math.PI}angleBetween(t,e){if(this.equals(t)||this.equals(e))return NaN;let s=this.theta(e)-this.theta(t);return s<0&&(s+=360),s}vectorAngle(t){return new O(0,0).angleBetween(this,t)}toPolar(t){return this.update(O.toPolar(this,t)),this}changeInAngle(t,e,s=new O){return this.clone().translate(-t,-e).theta(s)-this.theta(s)}adhereToRect(t){return wt.containsPoint(t,this)||(this.x=Math.min(Math.max(this.x,t.x),t.x+t.width),this.y=Math.min(Math.max(this.y,t.y),t.y+t.height)),this}bearing(t){const e=O.create(t),s=gt.toRad(this.y),r=gt.toRad(e.y),i=this.x,o=e.x,a=gt.toRad(o-i),l=Math.sin(a)*Math.cos(r),u=Math.cos(s)*Math.sin(r)-Math.sin(s)*Math.cos(r)*Math.cos(a),h=gt.toDeg(Math.atan2(l,u)),f=["NE","E","SE","S","SW","W","NW","N"];let d=h-22.5;return d<0&&(d+=360),d=parseInt(d/45,10),f[d]}cross(t,e){if(t!=null&&e!=null){const s=O.create(t),r=O.create(e);return(r.x-this.x)*(s.y-this.y)-(r.y-this.y)*(s.x-this.x)}return NaN}dot(t){const e=O.create(t);return this.x*e.x+this.y*e.y}diff(t,e){if(typeof t=="number")return new O(this.x-t,this.y-e);const s=O.create(t);return new O(this.x-s.x,this.y-s.y)}lerp(t,e){const s=O.create(t);return new O((1-e)*this.x+e*s.x,(1-e)*this.y+e*s.y)}normalize(t=1){const e=t/this.magnitude();return this.scale(e,e)}move(t,e){const s=O.create(t),r=gt.toRad(s.theta(this));return this.translate(Math.cos(r)*e,-Math.sin(r)*e)}reflection(t){return O.create(t).move(this,this.distance(t))}snapToGrid(t,e){return this.x=wt.snapToGrid(this.x,t),this.y=wt.snapToGrid(this.y,e??t),this}equals(t){const e=O.create(t);return e!=null&&e.x===this.x&&e.y===this.y}clone(){return O.clone(this)}toJSON(){return O.toJSON(this)}serialize(){return`${this.x} ${this.y}`}}(function(n){function t(e){return e!=null&&e instanceof n}n.isPoint=t})(O||(O={})),function(n){function t(s){return s!=null&&typeof s=="object"&&typeof s.x=="number"&&typeof s.y=="number"}n.isPointLike=t;function e(s){return s!=null&&Array.isArray(s)&&s.length===2&&typeof s[0]=="number"&&typeof s[1]=="number"}n.isPointData=e}(O||(O={})),function(n){function t(f,d){return f==null||typeof f=="number"?new n(f,d):e(f)}n.create=t;function e(f){return n.isPoint(f)?new n(f.x,f.y):Array.isArray(f)?new n(f[0],f[1]):new n(f.x,f.y)}n.clone=e;function s(f){return n.isPoint(f)?{x:f.x,y:f.y}:Array.isArray(f)?{x:f[0],y:f[1]}:{x:f.x,y:f.y}}n.toJSON=s;function r(f,d,g=new n){let p=Math.abs(f*Math.cos(d)),m=Math.abs(f*Math.sin(d));const y=e(g),b=gt.normalize(gt.toDeg(d));return b<90?m=-m:b<180?(p=-p,m=-m):b<270&&(p=-p),new n(y.x+p,y.y+m)}n.fromPolar=r;function i(f,d=new n){const g=e(f),p=e(d),m=g.x-p.x,y=g.y-p.y;return new n(Math.sqrt(m*m+y*y),gt.toRad(p.theta(g)))}n.toPolar=i;function o(f,d){return f===d?!0:f!=null&&d!=null?f.x===d.x&&f.y===d.y:!1}n.equals=o;function a(f,d){if(f==null&&d!=null||f!=null&&d==null||f!=null&&d!=null&&f.length!==d.length)return!1;if(f!=null&&d!=null){for(let g=0,p=f.length;g<p;g+=1)if(!o(f[g],d[g]))return!1}return!0}n.equalPoints=a;function l(f,d,g,p){return new n(wt.random(f,d),wt.random(g,p))}n.random=l;function u(f,d,g){const p=gt.toRad(gt.normalize(-d)),m=Math.sin(p),y=Math.cos(p);return h(f,y,m,g)}n.rotate=u;function h(f,d,g,p=new n){const m=e(f),y=e(p),b=m.x-y.x,w=m.y-y.y,x=b*d-w*g,v=w*d+b*g;return new n(x+y.x,v+y.y)}n.rotateEx=h}(O||(O={}));class z extends ys{get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get origin(){return new O(this.x,this.y)}get topLeft(){return new O(this.x,this.y)}get topCenter(){return new O(this.x+this.width/2,this.y)}get topRight(){return new O(this.x+this.width,this.y)}get center(){return new O(this.x+this.width/2,this.y+this.height/2)}get bottomLeft(){return new O(this.x,this.y+this.height)}get bottomCenter(){return new O(this.x+this.width/2,this.y+this.height)}get bottomRight(){return new O(this.x+this.width,this.y+this.height)}get corner(){return new O(this.x+this.width,this.y+this.height)}get rightMiddle(){return new O(this.x+this.width,this.y+this.height/2)}get leftMiddle(){return new O(this.x,this.y+this.height/2)}get topLine(){return new W(this.topLeft,this.topRight)}get rightLine(){return new W(this.topRight,this.bottomRight)}get bottomLine(){return new W(this.bottomLeft,this.bottomRight)}get leftLine(){return new W(this.topLeft,this.bottomLeft)}constructor(t,e,s,r){super(),this.x=t??0,this.y=e??0,this.width=s??0,this.height=r??0}getOrigin(){return this.origin}getTopLeft(){return this.topLeft}getTopCenter(){return this.topCenter}getTopRight(){return this.topRight}getCenter(){return this.center}getCenterX(){return this.x+this.width/2}getCenterY(){return this.y+this.height/2}getBottomLeft(){return this.bottomLeft}getBottomCenter(){return this.bottomCenter}getBottomRight(){return this.bottomRight}getCorner(){return this.corner}getRightMiddle(){return this.rightMiddle}getLeftMiddle(){return this.leftMiddle}getTopLine(){return this.topLine}getRightLine(){return this.rightLine}getBottomLine(){return this.bottomLine}getLeftLine(){return this.leftLine}bbox(t){if(!t)return this.clone();const e=gt.toRad(t),s=Math.abs(Math.sin(e)),r=Math.abs(Math.cos(e)),i=this.width*r+this.height*s,o=this.width*s+this.height*r;return new z(this.x+(this.width-i)/2,this.y+(this.height-o)/2,i,o)}round(t=0){return this.x=wt.round(this.x,t),this.y=wt.round(this.y,t),this.width=wt.round(this.width,t),this.height=wt.round(this.height,t),this}add(t,e,s,r){const i=z.create(t,e,s,r),o=Math.min(this.x,i.x),a=Math.min(this.y,i.y),l=Math.max(this.x+this.width,i.x+i.width),u=Math.max(this.y+this.height,i.y+i.height);return this.x=o,this.y=a,this.width=l-o,this.height=u-a,this}update(t,e,s,r){const i=z.create(t,e,s,r);return this.x=i.x,this.y=i.y,this.width=i.width,this.height=i.height,this}inflate(t,e){const s=t,r=e??t;return this.x-=s,this.y-=r,this.width+=2*s,this.height+=2*r,this}snapToGrid(t,e){const s=this.origin.snapToGrid(t,e),r=this.corner.snapToGrid(t,e);return this.x=s.x,this.y=s.y,this.width=r.x-s.x,this.height=r.y-s.y,this}translate(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}scale(t,e,s=new O){const r=this.origin.scale(t,e,s);return this.x=r.x,this.y=r.y,this.width*=t,this.height*=e,this}rotate(t,e=this.getCenter()){if(t!==0){const s=gt.toRad(t),r=Math.cos(s),i=Math.sin(s);let o=this.getOrigin(),a=this.getTopRight(),l=this.getBottomRight(),u=this.getBottomLeft();o=O.rotateEx(o,r,i,e),a=O.rotateEx(a,r,i,e),l=O.rotateEx(l,r,i,e),u=O.rotateEx(u,r,i,e);const h=new z(o.x,o.y,0,0);h.add(a.x,a.y,0,0),h.add(l.x,l.y,0,0),h.add(u.x,u.y,0,0),this.update(h)}return this}rotate90(){const t=(this.width-this.height)/2;this.x+=t,this.y-=t;const e=this.width;return this.width=this.height,this.height=e,this}moveAndExpand(t){const e=z.clone(t);return this.x+=e.x||0,this.y+=e.y||0,this.width+=e.width||0,this.height+=e.height||0,this}getMaxScaleToFit(t,e=this.center){const s=z.clone(t),r=e.x,i=e.y;let o=1/0,a=1/0,l=1/0,u=1/0,h=1/0,f=1/0,d=1/0,g=1/0;const p=s.topLeft;p.x<r&&(o=(this.x-r)/(p.x-r)),p.y<i&&(h=(this.y-i)/(p.y-i));const m=s.bottomRight;m.x>r&&(a=(this.x+this.width-r)/(m.x-r)),m.y>i&&(f=(this.y+this.height-i)/(m.y-i));const y=s.topRight;y.x>r&&(l=(this.x+this.width-r)/(y.x-r)),y.y<i&&(d=(this.y-i)/(y.y-i));const b=s.bottomLeft;return b.x<r&&(u=(this.x-r)/(b.x-r)),b.y>i&&(g=(this.y+this.height-i)/(b.y-i)),{sx:Math.min(o,a,l,u),sy:Math.min(h,f,d,g)}}getMaxUniformScaleToFit(t,e=this.center){const s=this.getMaxScaleToFit(t,e);return Math.min(s.sx,s.sy)}containsPoint(t,e){return wt.containsPoint(this,O.create(t,e))}containsRect(t,e,s,r){const i=z.create(t,e,s,r),o=this.x,a=this.y,l=this.width,u=this.height,h=i.x,f=i.y,d=i.width,g=i.height;return l===0||u===0||d===0||g===0?!1:h>=o&&f>=a&&h+d<=o+l&&f+g<=a+u}intersectsWithLine(t){const e=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],s=[],r=[];return e.forEach(i=>{const o=t.intersectsWithLine(i);o!==null&&r.indexOf(o.toString())<0&&(s.push(o),r.push(o.toString()))}),s.length>0?s:null}intersectsWithLineFromCenterToPoint(t,e){const s=O.clone(t),r=this.center;let i=null;e!=null&&e!==0&&s.rotate(e,r);const o=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],a=new W(r,s);for(let l=o.length-1;l>=0;l-=1){const u=o[l].intersectsWithLine(a);if(u!==null){i=u;break}}return i&&e!=null&&e!==0&&i.rotate(-e,r),i}intersectsWithRect(t,e,s,r){const i=z.create(t,e,s,r);if(!this.isIntersectWithRect(i))return null;const o=this.origin,a=this.corner,l=i.origin,u=i.corner,h=Math.max(o.x,l.x),f=Math.max(o.y,l.y);return new z(h,f,Math.min(a.x,u.x)-h,Math.min(a.y,u.y)-f)}isIntersectWithRect(t,e,s,r){const i=z.create(t,e,s,r),o=this.origin,a=this.corner,l=i.origin,u=i.corner;return!(u.x<=o.x||u.y<=o.y||l.x>=a.x||l.y>=a.y)}normalize(){let t=this.x,e=this.y,s=this.width,r=this.height;return this.width<0&&(t=this.x+this.width,s=-this.width),this.height<0&&(e=this.y+this.height,r=-this.height),this.x=t,this.y=e,this.width=s,this.height=r,this}union(t){const e=z.clone(t),s=this.origin,r=this.corner,i=e.origin,o=e.corner,a=Math.min(s.x,i.x),l=Math.min(s.y,i.y),u=Math.max(r.x,o.x),h=Math.max(r.y,o.y);return new z(a,l,u-a,h-l)}getNearestSideToPoint(t){const e=O.clone(t),s=e.x-this.x,r=this.x+this.width-e.x,i=e.y-this.y,o=this.y+this.height-e.y;let a=s,l="left";return r<a&&(a=r,l="right"),i<a&&(a=i,l="top"),o<a&&(l="bottom"),l}getNearestPointToPoint(t){const e=O.clone(t);if(this.containsPoint(e)){const s=this.getNearestSideToPoint(e);if(s==="left")return new O(this.x,e.y);if(s==="top")return new O(e.x,this.y);if(s==="right")return new O(this.x+this.width,e.y);if(s==="bottom")return new O(e.x,this.y+this.height)}return e.adhereToRect(this)}equals(t){return t!=null&&t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height}clone(){return new z(this.x,this.y,this.width,this.height)}toJSON(){return{x:this.x,y:this.y,width:this.width,height:this.height}}serialize(){return`${this.x} ${this.y} ${this.width} ${this.height}`}}(function(n){function t(e){return e!=null&&e instanceof n}n.isRectangle=t})(z||(z={})),function(n){function t(e){return e!=null&&typeof e=="object"&&typeof e.x=="number"&&typeof e.y=="number"&&typeof e.width=="number"&&typeof e.height=="number"}n.isRectangleLike=t}(z||(z={})),function(n){function t(o,a,l,u){return o==null||typeof o=="number"?new n(o,a,l,u):e(o)}n.create=t;function e(o){return n.isRectangle(o)?o.clone():Array.isArray(o)?new n(o[0],o[1],o[2],o[3]):new n(o.x,o.y,o.width,o.height)}n.clone=e;function s(o){return new n(o.x-o.a,o.y-o.b,2*o.a,2*o.b)}n.fromEllipse=s;function r(o){return new n(0,0,o.width,o.height)}n.fromSize=r;function i(o,a){return new n(o.x,o.y,a.width,a.height)}n.fromPositionAndSize=i}(z||(z={}));class W extends ys{get center(){return new O((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}constructor(t,e,s,r){super(),typeof t=="number"&&typeof e=="number"?(this.start=new O(t,e),this.end=new O(s,r)):(this.start=O.create(t),this.end=O.create(e))}getCenter(){return this.center}round(t=0){return this.start.round(t),this.end.round(t),this}translate(t,e){return typeof t=="number"?(this.start.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.end.translate(t)),this}rotate(t,e){return this.start.rotate(t,e),this.end.rotate(t,e),this}scale(t,e,s){return this.start.scale(t,e,s),this.end.scale(t,e,s),this}length(){return Math.sqrt(this.squaredLength())}squaredLength(){const t=this.start.x-this.end.x,e=this.start.y-this.end.y;return t*t+e*e}setLength(t){const e=this.length();if(!e)return this;const s=t/e;return this.scale(s,s,this.start)}parallel(t){const e=this.clone();if(!e.isDifferentiable())return e;const{start:s,end:r}=e,i=s.clone().rotate(270,r),o=r.clone().rotate(90,s);return s.move(o,t),r.move(i,t),e}vector(){return new O(this.end.x-this.start.x,this.end.y-this.start.y)}angle(){const t=new O(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,t)}bbox(){const t=Math.min(this.start.x,this.end.x),e=Math.min(this.start.y,this.end.y),s=Math.max(this.start.x,this.end.x),r=Math.max(this.start.y,this.end.y);return new z(t,e,s-t,r-e)}bearing(){return this.start.bearing(this.end)}closestPoint(t){return this.pointAt(this.closestPointNormalizedLength(t))}closestPointLength(t){return this.closestPointNormalizedLength(t)*this.length()}closestPointTangent(t){return this.tangentAt(this.closestPointNormalizedLength(t))}closestPointNormalizedLength(t){const e=this.vector().dot(new W(this.start,t).vector()),s=Math.min(1,Math.max(0,e/this.squaredLength()));return Number.isNaN(s)?0:s}pointAt(t){const e=this.start,s=this.end;return t<=0?e.clone():t>=1?s.clone():e.lerp(s,t)}pointAtLength(t){const e=this.start,s=this.end;let r=!0;t<0&&(r=!1,t=-t);const i=this.length();if(t>=i)return r?s.clone():e.clone();const o=(r?t:i-t)/i;return this.pointAt(o)}divideAt(t){const e=this.pointAt(t);return[new W(this.start,e),new W(e,this.end)]}divideAtLength(t){const e=this.pointAtLength(t);return[new W(this.start,e),new W(e,this.end)]}containsPoint(t){const e=this.start,s=this.end;if(e.cross(t,s)!==0)return!1;const r=this.length();return!(new W(e,t).length()>r||new W(t,s).length()>r)}intersect(t,e){const s=t.intersectsWithLine(this,e);return s?Array.isArray(s)?s:[s]:null}intersectsWithLine(t){const e=new O(this.end.x-this.start.x,this.end.y-this.start.y),s=new O(t.end.x-t.start.x,t.end.y-t.start.y),r=e.x*s.y-e.y*s.x,i=new O(t.start.x-this.start.x,t.start.y-this.start.y),o=i.x*s.y-i.y*s.x,a=i.x*e.y-i.y*e.x;if(r===0||o*r<0||a*r<0)return null;if(r>0){if(o>r||a>r)return null}else if(o<r||a<r)return null;return new O(this.start.x+o*e.x/r,this.start.y+o*e.y/r)}isDifferentiable(){return!this.start.equals(this.end)}pointOffset(t){const e=O.clone(t),s=this.start,r=this.end;return((r.x-s.x)*(e.y-s.y)-(r.y-s.y)*(e.x-s.x))/this.length()}pointSquaredDistance(t,e){const s=O.create(t,e);return this.closestPoint(s).squaredDistance(s)}pointDistance(t,e){const s=O.create(t,e);return this.closestPoint(s).distance(s)}tangentAt(t){if(!this.isDifferentiable())return null;const e=this.start,s=this.end,r=this.pointAt(t),i=new W(e,s);return i.translate(r.x-e.x,r.y-e.y),i}tangentAtLength(t){if(!this.isDifferentiable())return null;const e=this.start,s=this.end,r=this.pointAtLength(t),i=new W(e,s);return i.translate(r.x-e.x,r.y-e.y),i}relativeCcw(t,e){const s=O.create(t,e);let r=s.x-this.start.x,i=s.y-this.start.y;const o=this.end.x-this.start.x,a=this.end.y-this.start.y;let l=r*a-i*o;return l===0&&(l=r*o+i*a,l>0&&(r-=o,i-=a,l=r*o+i*a,l<0&&(l=0))),l<0?-1:l>0?1:0}equals(t){return t!=null&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.end.x===t.end.x&&this.end.y===t.end.y}clone(){return new W(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}(function(n){function t(e){return e!=null&&e instanceof n}n.isLine=t})(W||(W={}));class un extends ys{get center(){return new O(this.x,this.y)}constructor(t,e,s,r){super(),this.x=t??0,this.y=e??0,this.a=s??0,this.b=r??0}bbox(){return z.fromEllipse(this)}getCenter(){return this.center}inflate(t,e){const s=t,r=e??t;return this.a+=2*s,this.b+=2*r,this}normalizedDistance(t,e){const s=O.create(t,e),r=s.x-this.x,i=s.y-this.y,o=this.a,a=this.b;return r*r/(o*o)+i*i/(a*a)}containsPoint(t,e){return this.normalizedDistance(t,e)<=1}intersectsWithLine(t){const e=[],s=this.a,r=this.b,i=t.start,o=t.end,a=t.vector(),l=i.diff(new O(this.x,this.y)),u=new O(a.x/(s*s),a.y/(r*r)),h=new O(l.x/(s*s),l.y/(r*r)),f=a.dot(u),d=a.dot(h),g=l.dot(h)-1,p=d*d-f*g;if(p<0)return null;if(p>0){const m=Math.sqrt(p),y=(-d-m)/f,b=(-d+m)/f;if((y<0||y>1)&&(b<0||b>1))return null;y>=0&&y<=1&&e.push(i.lerp(o,y)),b>=0&&b<=1&&e.push(i.lerp(o,b))}else{const m=-d/f;if(m>=0&&m<=1)e.push(i.lerp(o,m));else return null}return e}intersectsWithLineFromCenterToPoint(t,e=0){const s=O.clone(t);e&&s.rotate(e,this.getCenter());const r=s.x-this.x,i=s.y-this.y;let o;if(r===0)return o=this.bbox().getNearestPointToPoint(s),e?o.rotate(-e,this.getCenter()):o;const a=i/r,l=a*a,u=this.a*this.a,h=this.b*this.b;let f=Math.sqrt(1/(1/u+l/h));f=r<0?-f:f;const d=a*f;return o=new O(this.x+f,this.y+d),e?o.rotate(-e,this.getCenter()):o}tangentTheta(t){const e=O.clone(t),s=e.x,r=e.y,i=this.a,o=this.b,a=this.bbox().center,l=a.x,u=a.y,h=30,f=s>a.x+i/2,d=s<a.x-i/2;let g,p;return f||d?(p=s>a.x?r-h:r+h,g=i*i/(s-l)-i*i*(r-u)*(p-u)/(o*o*(s-l))+l):(g=r>a.y?s+h:s-h,p=o*o/(r-u)-o*o*(s-l)*(g-l)/(i*i*(r-u))+u),new O(g,p).theta(e)}scale(t,e){return this.a*=t,this.b*=e,this}rotate(t,e){const s=z.fromEllipse(this);s.rotate(t,e);const r=un.fromRect(s);return this.a=r.a,this.b=r.b,this.x=r.x,this.y=r.y,this}translate(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}equals(t){return t!=null&&t.x===this.x&&t.y===this.y&&t.a===this.a&&t.b===this.b}clone(){return new un(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}}(function(n){function t(e){return e!=null&&e instanceof n}n.isEllipse=t})(un||(un={})),function(n){function t(r,i,o,a){return r==null||typeof r=="number"?new n(r,i,o,a):e(r)}n.create=t;function e(r){return n.isEllipse(r)?r.clone():Array.isArray(r)?new n(r[0],r[1],r[2],r[3]):new n(r.x,r.y,r.a,r.b)}n.parse=e;function s(r){const i=r.center;return new n(i.x,i.y,r.width/2,r.height/2)}n.fromRect=s}(un||(un={}));const ZR=new RegExp("^[\\s\\dLMCZz,.]*$");function QR(n){return typeof n!="string"?!1:ZR.test(n)}function qu(n,t){return(n%t+t)%t}function tI(n,t,e,s,r){const i=[],o=n[n.length-1],a=t!=null&&t>0,l=t||0;if(s&&a){n=n.slice();const f=n[0],d=new O(o.x+(f.x-o.x)/2,o.y+(f.y-o.y)/2);n.splice(0,0,d)}let u=n[0],h=1;for(e?i.push("M",u.x,u.y):i.push("L",u.x,u.y);h<(s?n.length:n.length-1);){let f=n[qu(h,n.length)],d=u.x-f.x,g=u.y-f.y;if(a&&(d!==0||g!==0)&&(r==null||r.indexOf(h-1)<0)){let p=Math.sqrt(d*d+g*g);const m=d*Math.min(l,p/2)/p,y=g*Math.min(l,p/2)/p,b=f.x+m,w=f.y+y;i.push("L",b,w);let x=n[qu(h+1,n.length)];for(;h<n.length-2&&Math.round(x.x-f.x)===0&&Math.round(x.y-f.y)===0;)x=n[qu(h+2,n.length)],h+=1;d=x.x-f.x,g=x.y-f.y,p=Math.max(1,Math.sqrt(d*d+g*g));const v=d*Math.min(l,p/2)/p,S=g*Math.min(l,p/2)/p,E=f.x+v,C=f.y+S;i.push("Q",f.x,f.y,E,C),f=new O(E,C)}else i.push("L",f.x,f.y);u=f,h+=1}return s?i.push("Z"):i.push("L",o.x,o.y),i.map(f=>typeof f=="string"?f:+f.toFixed(3)).join(" ")}function My(n,t={}){const e=[];return n&&n.length&&n.forEach(s=>{Array.isArray(s)?e.push({x:s[0],y:s[1]}):e.push({x:s.x,y:s.y})}),tI(e,t.round,t.initialMove==null||t.initialMove,t.close,t.exclude)}function Xa(n,t,e,s,r=0,i=0,o=0,a,l){if(e===0||s===0)return[];a-=n,l-=t,e=Math.abs(e),s=Math.abs(s);const u=-a/2,h=-l/2,f=Math.cos(r*Math.PI/180),d=Math.sin(r*Math.PI/180),g=f*u+d*h,p=-1*d*u+f*h,m=g*g,y=p*p,b=e*e,w=s*s,x=m/b+y/w;let v;if(x>1)e=Math.sqrt(x)*e,s=Math.sqrt(x)*s,v=0;else{let et=1;i===o&&(et=-1),v=et*Math.sqrt((b*w-b*y-w*m)/(b*y+w*m))}const S=v*e*p/s,E=-1*v*s*g/e,C=f*S-d*E+a/2,M=d*S+f*E+l/2;let T=Math.atan2((p-E)/s,(g-S)/e)-Math.atan2(0,1),k=T>=0?T:2*Math.PI+T;T=Math.atan2((-p-E)/s,(-g-S)/e)-Math.atan2((p-E)/s,(g-S)/e);let _=T>=0?T:2*Math.PI+T;o===0&&_>0?_-=2*Math.PI:o!==0&&_<0&&(_+=2*Math.PI);const D=_*2/Math.PI,N=Math.ceil(D<0?-1*D:D),V=_/N,A=8/3*Math.sin(V/4)*Math.sin(V/4)/Math.sin(V/2),P=f*e,L=f*s,j=d*e,Y=d*s;let ot=Math.cos(k),F=Math.sin(k),H=-A*(P*F+Y*ot),B=-A*(j*F-L*ot),K=0,nt=0;const rt=[];for(let et=0;et<N;et+=1){k+=V,ot=Math.cos(k),F=Math.sin(k),K=P*ot-Y*F+C,nt=j*ot+L*F+M;const ft=-A*(P*F+Y*ot),ge=-A*(j*F-L*ot),St=et*6;rt[St]=Number(H+n),rt[St+1]=Number(B+t),rt[St+2]=Number(K-ft+n),rt[St+3]=Number(nt-ge+t),rt[St+4]=Number(K+n),rt[St+5]=Number(nt+t),H=K+ft,B=nt+ge}return rt.map(et=>+et.toFixed(2))}function eI(n,t,e,s,r=0,i=0,o=0,a,l){const u=[],h=Xa(n,t,e,s,r,i,o,a,l);if(h!=null)for(let f=0,d=h.length;f<d;f+=6)u.push("C",h[f],h[f+1],h[f+2],h[f+3],h[f+4],h[f+5]);return u.join(" ")}class zt extends ys{get start(){return this.points[0]||null}get end(){return this.points[this.points.length-1]||null}constructor(t){if(super(),t!=null){if(typeof t=="string")return zt.parse(t);this.points=t.map(e=>O.create(e))}else this.points=[]}scale(t,e,s=new O){return this.points.forEach(r=>r.scale(t,e,s)),this}rotate(t,e){return this.points.forEach(s=>s.rotate(t,e)),this}translate(t,e){const s=O.create(t,e);return this.points.forEach(r=>r.translate(s.x,s.y)),this}round(t=0){return this.points.forEach(e=>e.round(t)),this}bbox(){if(this.points.length===0)return new z;let t=1/0,e=-1/0,s=1/0,r=-1/0;const i=this.points;for(let o=0,a=i.length;o<a;o+=1){const l=i[o],u=l.x,h=l.y;u<t&&(t=u),u>e&&(e=u),h<s&&(s=h),h>r&&(r=h)}return new z(t,s,e-t,r-s)}closestPoint(t){const e=this.closestPointLength(t);return this.pointAtLength(e)}closestPointLength(t){const e=this.points,s=e.length;if(s===0||s===1)return 0;let r=0,i=0,o=1/0;for(let a=0,l=s-1;a<l;a+=1){const u=new W(e[a],e[a+1]),h=u.length(),f=u.closestPointNormalizedLength(t),g=u.pointAt(f).squaredDistance(t);g<o&&(o=g,i=r+f*h),r+=h}return i}closestPointNormalizedLength(t){const e=this.length();return e===0?0:this.closestPointLength(t)/e}closestPointTangent(t){const e=this.closestPointLength(t);return this.tangentAtLength(e)}containsPoint(t){if(this.points.length===0)return!1;const e=O.clone(t),s=e.x,r=e.y,i=this.points,o=i.length;let a=o-1,l=0;for(let u=0;u<o;u+=1){const h=i[a],f=i[u];if(e.equals(h))return!0;const d=new W(h,f);if(d.containsPoint(t))return!0;if(r<=h.y&&r>f.y||r>h.y&&r<=f.y){const g=h.x-s>f.x-s?h.x-s:f.x-s;if(g>=0){const p=new O(s+g,r),m=new W(t,p);d.intersectsWithLine(m)&&(l+=1)}}a=u}return l%2===1}intersectsWithLine(t){const e=[];for(let s=0,r=this.points.length-1;s<r;s+=1){const i=this.points[s],o=this.points[s+1],a=t.intersectsWithLine(new W(i,o));a&&e.push(a)}return e.length>0?e:null}isDifferentiable(){for(let t=0,e=this.points.length-1;t<e;t+=1){const s=this.points[t],r=this.points[t+1];if(new W(s,r).isDifferentiable())return!0}return!1}length(){let t=0;for(let e=0,s=this.points.length-1;e<s;e+=1){const r=this.points[e],i=this.points[e+1];t+=r.distance(i)}return t}pointAt(t){const e=this.points,s=e.length;if(s===0)return null;if(s===1||t<=0)return e[0].clone();if(t>=1)return e[s-1].clone();const i=this.length()*t;return this.pointAtLength(i)}pointAtLength(t){const e=this.points,s=e.length;if(s===0)return null;if(s===1)return e[0].clone();let r=!0;t<0&&(r=!1,t=-t);let i=0;for(let a=0,l=s-1;a<l;a+=1){const u=r?a:l-1-a,h=e[u],f=e[u+1],d=new W(h,f),g=h.distance(f);if(t<=i+g)return d.pointAtLength((r?1:-1)*(t-i));i+=g}return(r?e[s-1]:e[0]).clone()}tangentAt(t){const s=this.points.length;if(s===0||s===1)return null;t<0&&(t=0),t>1&&(t=1);const i=this.length()*t;return this.tangentAtLength(i)}tangentAtLength(t){const e=this.points,s=e.length;if(s===0||s===1)return null;let r=!0;t<0&&(r=!1,t=-t);let i,o=0;for(let a=0,l=s-1;a<l;a+=1){const u=r?a:l-1-a,h=e[u],f=e[u+1],d=new W(h,f),g=h.distance(f);if(d.isDifferentiable()){if(t<=o+g)return d.tangentAtLength((r?1:-1)*(t-o));i=d}o+=g}if(i){const a=r?1:0;return i.tangentAt(a)}return null}simplify(t={}){const e=this.points;if(e.length<3)return this;const s=t.threshold||0;let r=0;for(;e[r+2];){const i=r,o=r+1,a=r+2,l=e[i],u=e[o],h=e[a];new W(l,h).closestPoint(u).distance(u)<=s?e.splice(o,1):r+=1}return this}toHull(){const t=this.points,e=t.length;if(e===0)return new zt;let s=t[0];for(let d=1;d<e;d+=1)(t[d].y<s.y||t[d].y===s.y&&t[d].x>s.x)&&(s=t[d]);const r=[];for(let d=0;d<e;d+=1){let g=s.theta(t[d]);g===0&&(g=360),r.push([t[d],d,g])}if(r.sort((d,g)=>{let p=d[2]-g[2];return p===0&&(p=g[1]-d[1]),p}),r.length>2){const d=r[r.length-1];r.unshift(d)}const i={},o=[],a=d=>`${d[0].toString()}@${d[1]}`;for(;r.length!==0;){const d=r.pop(),g=d[0];if(i[a(d)])continue;let p=!1;for(;!p;)if(o.length<2)o.push(d),p=!0;else{const m=o.pop(),y=m[0],b=o.pop(),w=b[0],x=w.cross(y,g);if(x<0)o.push(b),o.push(m),o.push(d),p=!0;else if(x===0){const S=y.angleBetween(w,g);Math.abs(S-180)<1e-10||y.equals(g)||w.equals(y)?(i[a(m)]=y,o.push(b)):Math.abs((S+1)%360-1)<1e-10&&(o.push(b),r.push(m))}else i[a(m)]=y,o.push(b)}}o.length>2&&o.pop();let l,u=-1;for(let d=0,g=o.length;d<g;d+=1){const p=o[d][1];(l===void 0||p<l)&&(l=p,u=d)}let h=[];if(u>0){const d=o.slice(u),g=o.slice(0,u);h=d.concat(g)}else h=o;const f=[];for(let d=0,g=h.length;d<g;d+=1)f.push(h[d][0]);return new zt(f)}equals(t){return t==null||t.points.length!==this.points.length?!1:t.points.every((e,s)=>e.equals(this.points[s]))}clone(){return new zt(this.points.map(t=>t.clone()))}toJSON(){return this.points.map(t=>t.toJSON())}serialize(){return this.points.map(t=>`${t.serialize()}`).join(" ")}}(function(n){function t(e){return e!=null&&e instanceof n}n.isPolyline=t})(zt||(zt={})),function(n){function t(e){const s=e.trim();if(s==="")return new n;const r=[],i=s.split(/\s*,\s*|\s+/);for(let o=0,a=i.length;o<a;o+=2)r.push({x:+i[o],y:+i[o+1]});return new n(r)}n.parse=t}(zt||(zt={}));class Vt extends ys{constructor(t,e,s,r){super(),this.PRECISION=3,this.start=O.create(t),this.controlPoint1=O.create(e),this.controlPoint2=O.create(s),this.end=O.create(r)}bbox(){const t=this.start,e=this.controlPoint1,s=this.controlPoint2,r=this.end,i=t.x,o=t.y,a=e.x,l=e.y,u=s.x,h=s.y,f=r.x,d=r.y,g=[],p=[[],[]];let m,y,b,w,x,v,S,E;for(let P=0;P<2;P+=1){if(P===0?(y=6*i-12*a+6*u,m=-3*i+9*a-9*u+3*f,b=3*a-3*i):(y=6*o-12*l+6*h,m=-3*o+9*l-9*h+3*d,b=3*l-3*o),Math.abs(m)<1e-12){if(Math.abs(y)<1e-12)continue;w=-b/y,w>0&&w<1&&g.push(w);continue}S=y*y-4*b*m,E=Math.sqrt(S),!(S<0)&&(x=(-y+E)/(2*m),x>0&&x<1&&g.push(x),v=(-y-E)/(2*m),v>0&&v<1&&g.push(v))}let C,M,T,k=g.length;const _=k;for(;k;)k-=1,w=g[k],T=1-w,C=T*T*T*i+3*T*T*w*a+3*T*w*w*u+w*w*w*f,p[0][k]=C,M=T*T*T*o+3*T*T*w*l+3*T*w*w*h+w*w*w*d,p[1][k]=M;g[_]=0,g[_+1]=1,p[0][_]=i,p[1][_]=o,p[0][_+1]=f,p[1][_+1]=d,g.length=_+2,p[0].length=_+2,p[1].length=_+2;const D=Math.min.apply(null,p[0]),N=Math.min.apply(null,p[1]),V=Math.max.apply(null,p[0]),A=Math.max.apply(null,p[1]);return new z(D,N,V-D,A-N)}closestPoint(t,e={}){return this.pointAtT(this.closestPointT(t,e))}closestPointLength(t,e={}){const s=this.getOptions(e);return this.lengthAtT(this.closestPointT(t,s),s)}closestPointNormalizedLength(t,e={}){const s=this.getOptions(e),r=this.closestPointLength(t,s);if(!r)return 0;const i=this.length(s);return i===0?0:r/i}closestPointT(t,e={}){const s=this.getPrecision(e),r=this.getDivisions(e),i=Math.pow(10,-s);let o=null,a=0,l=0,u=0,h=0,f=0,d=null;const g=r.length;let p=g>0?1/g:0;for(r.forEach((m,y)=>{const b=m.start.distance(t),w=m.end.distance(t),x=b+w;(d==null||x<d)&&(o=m,a=y*p,l=(y+1)*p,u=b,h=w,d=x,f=m.endpointDistance())});;){const m=u?Math.abs(u-h)/u:0,y=h!=null?Math.abs(u-h)/h:0,b=m<i||y<i,w=u?u<f*i:!0,x=h?h<f*i:!0;if(b||(w||x))return u<=h?a:l;const S=o.divide(.5);p/=2;const E=S[0].start.distance(t),C=S[0].end.distance(t),M=E+C,T=S[1].start.distance(t),k=S[1].end.distance(t),_=T+k;M<=_?(o=S[0],l-=p,u=E,h=C):(o=S[1],a+=p,u=T,h=k)}}closestPointTangent(t,e={}){return this.tangentAtT(this.closestPointT(t,e))}containsPoint(t,e={}){return this.toPolyline(e).containsPoint(t)}divideAt(t,e={}){if(t<=0)return this.divideAtT(0);if(t>=1)return this.divideAtT(1);const s=this.tAt(t,e);return this.divideAtT(s)}divideAtLength(t,e={}){const s=this.tAtLength(t,e);return this.divideAtT(s)}divide(t){return this.divideAtT(t)}divideAtT(t){const e=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return[new Vt(e,e,e,e),new Vt(e,s,r,i)];if(t>=1)return[new Vt(e,s,r,i),new Vt(i,i,i,i)];const o=this.getSkeletonPoints(t),a=o.startControlPoint1,l=o.startControlPoint2,u=o.divider,h=o.dividerControlPoint1,f=o.dividerControlPoint2;return[new Vt(e,a,l,u),new Vt(u,h,f,i)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(t){const e=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return{startControlPoint1:e.clone(),startControlPoint2:e.clone(),divider:e.clone(),dividerControlPoint1:s.clone(),dividerControlPoint2:r.clone()};if(t>=1)return{startControlPoint1:s.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};const o=new W(e,s).pointAt(t),a=new W(s,r).pointAt(t),l=new W(r,i).pointAt(t),u=new W(o,a).pointAt(t),h=new W(a,l).pointAt(t),f=new W(u,h).pointAt(t);return{startControlPoint1:o,startControlPoint2:u,divider:f,dividerControlPoint1:h,dividerControlPoint2:l}}getSubdivisions(t={}){const e=this.getPrecision(t);let s=[new Vt(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(e===0)return s;let r=this.endpointDistance();const i=Math.pow(10,-e);let o=0;for(;;){o+=1;const a=[];s.forEach(h=>{const f=h.divide(.5);a.push(f[0],f[1])});const l=a.reduce((h,f)=>h+f.endpointDistance(),0),u=l!==0?(l-r)/l:0;if(o>1&&u<i)return a;s=a,r=l}}length(t={}){return this.getDivisions(t).reduce((s,r)=>s+r.endpointDistance(),0)}lengthAtT(t,e={}){if(t<=0)return 0;const s=e.precision===void 0?this.PRECISION:e.precision;return this.divide(t)[0].length({precision:s})}pointAt(t,e={}){if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();const s=this.tAt(t,e);return this.pointAtT(s)}pointAtLength(t,e={}){const s=this.tAtLength(t,e);return this.pointAtT(s)}pointAtT(t){return t<=0?this.start.clone():t>=1?this.end.clone():this.getSkeletonPoints(t).divider}isDifferentiable(){const t=this.start,e=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(s)&&s.equals(r))}tangentAt(t,e={}){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);const s=this.tAt(t,e);return this.tangentAtT(s)}tangentAtLength(t,e={}){if(!this.isDifferentiable())return null;const s=this.tAtLength(t,e);return this.tangentAtT(s)}tangentAtT(t){if(!this.isDifferentiable())return null;t<0&&(t=0),t>1&&(t=1);const e=this.getSkeletonPoints(t),s=e.startControlPoint2,r=e.dividerControlPoint1,i=e.divider,o=new W(s,r);return o.translate(i.x-s.x,i.y-s.y),o}getPrecision(t={}){return t.precision==null?this.PRECISION:t.precision}getDivisions(t={}){if(t.subdivisions!=null)return t.subdivisions;const e=this.getPrecision(t);return this.getSubdivisions({precision:e})}getOptions(t={}){const e=this.getPrecision(t),s=this.getDivisions(t);return{precision:e,subdivisions:s}}tAt(t,e={}){if(t<=0)return 0;if(t>=1)return 1;const s=this.getOptions(e),i=this.length(s)*t;return this.tAtLength(i,s)}tAtLength(t,e={}){let s=!0;t<0&&(s=!1,t=-t);const r=this.getPrecision(e),i=this.getDivisions(e),o={precision:r,subdivisions:i};let a=null,l,u,h=0,f=0,d=0;const g=i.length;let p=g>0?1/g:0;for(let b=0;b<g;b+=1){const w=s?b:g-1-b,x=i[b],v=x.endpointDistance();if(t<=d+v){a=x,l=w*p,u=(w+1)*p,h=s?t-d:v+d-t,f=s?v+d-t:t-d;break}d+=v}if(a==null)return s?1:0;const m=this.length(o),y=Math.pow(10,-r);for(;;){let b;if(b=m!==0?h/m:0,b<y)return l;if(b=m!==0?f/m:0,b<y)return u;let w,x;const v=a.divide(.5);p/=2;const S=v[0].endpointDistance(),E=v[1].endpointDistance();h<=S?(a=v[0],u-=p,w=h,x=S-w):(a=v[1],l+=p,w=h-S,x=E-w),h=w,f=x}}toPoints(t={}){const e=this.getDivisions(t),s=[e[0].start.clone()];return e.forEach(r=>s.push(r.end.clone())),s}toPolyline(t={}){return new zt(this.toPoints(t))}scale(t,e,s){return this.start.scale(t,e,s),this.controlPoint1.scale(t,e,s),this.controlPoint2.scale(t,e,s),this.end.scale(t,e,s),this}rotate(t,e){return this.start.rotate(t,e),this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?(this.start.translate(t,e),this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return t!=null&&this.start.equals(t.start)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)&&this.end.equals(t.end)}clone(){return new Vt(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}(function(n){function t(e){return e!=null&&e instanceof n}n.isCurve=t})(Vt||(Vt={})),function(n){function t(r){const i=r.length,o=[],a=[];let l=2;o[0]=r[0]/l;for(let u=1;u<i;u+=1)a[u]=1/l,l=(u<i-1?4:3.5)-a[u],o[u]=(r[u]-o[u-1])/l;for(let u=1;u<i;u+=1)o[i-u-1]-=a[i-u]*o[i-u];return o}function e(r){const i=r.map(d=>O.clone(d)),o=[],a=[],l=i.length-1;if(l===1)return o[0]=new O((2*i[0].x+i[1].x)/3,(2*i[0].y+i[1].y)/3),a[0]=new O(2*o[0].x-i[0].x,2*o[0].y-i[0].y),[o,a];const u=[];for(let d=1;d<l-1;d+=1)u[d]=4*i[d].x+2*i[d+1].x;u[0]=i[0].x+2*i[1].x,u[l-1]=(8*i[l-1].x+i[l].x)/2;const h=t(u);for(let d=1;d<l-1;d+=1)u[d]=4*i[d].y+2*i[d+1].y;u[0]=i[0].y+2*i[1].y,u[l-1]=(8*i[l-1].y+i[l].y)/2;const f=t(u);for(let d=0;d<l;d+=1)o.push(new O(h[d],f[d])),d<l-1?a.push(new O(2*i[d+1].x-h[d+1],2*i[d+1].y-f[d+1])):a.push(new O((i[l].x+h[l-1])/2,(i[l].y+f[l-1])/2));return[o,a]}function s(r){if(r==null||Array.isArray(r)&&r.length<2)throw new Error("At least 2 points are required");const i=e(r),o=[];for(let a=0,l=i[0].length;a<l;a+=1){const u=new O(i[0][a].x,i[0][a].y),h=new O(i[1][a].x,i[1][a].y);o.push(new n(r[a],u,h,r[a+1]))}return o}n.throughPoints=s}(Vt||(Vt={}));class Ka extends ys{constructor(){super(...arguments),this.isVisible=!0,this.isSegment=!0,this.isSubpathStart=!1}get end(){return this.endPoint}get start(){if(this.previousSegment==null)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path, or segment has not yet been added to a path.)");return this.previousSegment.end}closestPointT(t,e){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(t);throw new Error("Neither `closestPointT` nor `closestPointNormalizedLength` method is implemented.")}lengthAtT(t,e){if(t<=0)return 0;const s=this.length();return t>=1?s:s*t}divideAtT(t){if(this.divideAt)return this.divideAt(t);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(t){if(this.pointAt)return this.pointAt(t);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(t){if(this.tangentAt)return this.tangentAt(t);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class fe extends Ka{constructor(t,e){super(),W.isLine(t)?this.endPoint=t.end.clone().round(2):this.endPoint=O.create(t,e).round(2)}get type(){return"L"}get line(){return new W(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[new fe(e[0]),new fe(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[new fe(e[0]),new fe(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return this.previousSegment==null?!1:!this.start.equals(this.end)}clone(){return new fe(this.end)}scale(t,e,s){return this.end.scale(t,e,s),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?this.end.translate(t,e):this.end.translate(t),this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}(function(n){function t(...e){const s=e.length,r=e[0];if(W.isLine(r))return new n(r);if(O.isPointLike(r))return s===1?new n(r):e.map(o=>new n(o));if(s===2)return new n(+e[0],+e[1]);const i=[];for(let o=0;o<s;o+=2){const a=+e[o],l=+e[o+1];i.push(new n(a,l))}return i}n.create=t})(fe||(fe={}));class zr extends Ka{get end(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. MoveTo), or segment has not yet been added to a path.)");return this.subpathStartSegment.end}get type(){return"Z"}get line(){return new W(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[e[1].isDifferentiable()?new fe(e[0]):this.clone(),new fe(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[e[1].isDifferentiable()?new fe(e[0]):this.clone(),new fe(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)}scale(){return this}rotate(){return this}translate(){return this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}clone(){return new zr}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return this.type}}(function(n){function t(){return new n}n.create=t})(zr||(zr={}));class Fr extends Ka{constructor(t,e){super(),this.isVisible=!1,this.isSubpathStart=!0,W.isLine(t)||Vt.isCurve(t)?this.endPoint=t.end.clone().round(2):this.endPoint=O.create(t,e).round(2)}get start(){throw new Error("Illegal access. Moveto segments should not need a start property.")}get type(){return"M"}bbox(){return null}closestPoint(){return this.end.clone()}closestPointLength(){return 0}closestPointNormalizedLength(){return 0}closestPointT(){return 1}closestPointTangent(){return null}length(){return 0}lengthAtT(){return 0}divideAt(){return[this.clone(),this.clone()]}divideAtLength(){return[this.clone(),this.clone()]}getSubdivisions(){return[]}pointAt(){return this.end.clone()}pointAtLength(){return this.end.clone()}pointAtT(){return this.end.clone()}tangentAt(){return null}tangentAtLength(){return null}tangentAtT(){return null}isDifferentiable(){return!1}scale(t,e,s){return this.end.scale(t,e,s),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?this.end.translate(t,e):this.end.translate(t),this}clone(){return new Fr(this.end)}equals(t){return this.type===t.type&&this.end.equals(t.end)}toJSON(){return{type:this.type,end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}(function(n){function t(...e){const s=e.length,r=e[0];if(W.isLine(r))return new n(r);if(Vt.isCurve(r))return new n(r);if(O.isPointLike(r)){if(s===1)return new n(r);const o=[];for(let a=0;a<s;a+=1)a===0?o.push(new n(e[a])):o.push(new fe(e[a]));return o}if(s===2)return new n(+e[0],+e[1]);const i=[];for(let o=0;o<s;o+=2){const a=+e[o],l=+e[o+1];o===0?i.push(new n(a,l)):i.push(new fe(a,l))}return i}n.create=t})(Fr||(Fr={}));class He extends Ka{constructor(t,e,s,r,i,o){super(),Vt.isCurve(t)?(this.controlPoint1=t.controlPoint1.clone().round(2),this.controlPoint2=t.controlPoint2.clone().round(2),this.endPoint=t.end.clone().round(2)):typeof t=="number"?(this.controlPoint1=new O(t,e).round(2),this.controlPoint2=new O(s,r).round(2),this.endPoint=new O(i,o).round(2)):(this.controlPoint1=O.create(t).round(2),this.controlPoint2=O.create(e).round(2),this.endPoint=O.create(s).round(2))}get type(){return"C"}get curve(){return new Vt(this.start,this.controlPoint1,this.controlPoint2,this.end)}bbox(){return this.curve.bbox()}closestPoint(t){return this.curve.closestPoint(t)}closestPointLength(t){return this.curve.closestPointLength(t)}closestPointNormalizedLength(t){return this.curve.closestPointNormalizedLength(t)}closestPointTangent(t){return this.curve.closestPointTangent(t)}length(){return this.curve.length()}divideAt(t,e={}){const s=this.curve.divideAt(t,e);return[new He(s[0]),new He(s[1])]}divideAtLength(t,e={}){const s=this.curve.divideAtLength(t,e);return[new He(s[0]),new He(s[1])]}divideAtT(t){const e=this.curve.divideAtT(t);return[new He(e[0]),new He(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.curve.pointAt(t)}pointAtLength(t){return this.curve.pointAtLength(t)}tangentAt(t){return this.curve.tangentAt(t)}tangentAtLength(t){return this.curve.tangentAtLength(t)}isDifferentiable(){if(!this.previousSegment)return!1;const t=this.start,e=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(s)&&s.equals(r))}scale(t,e,s){return this.controlPoint1.scale(t,e,s),this.controlPoint2.scale(t,e,s),this.end.scale(t,e,s),this}rotate(t,e){return this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?(this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return this.start.equals(t.start)&&this.end.equals(t.end)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)}clone(){return new He(this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){const t=this.controlPoint1,e=this.controlPoint2,s=this.end;return[this.type,t.x,t.y,e.x,e.y,s.x,s.y].join(" ")}}(function(n){function t(...e){const s=e.length,r=e[0];if(Vt.isCurve(r))return new n(r);if(O.isPointLike(r)){if(s===3)return new n(e[0],e[1],e[2]);const o=[];for(let a=0;a<s;a+=3)o.push(new n(e[a],e[a+1],e[a+2]));return o}if(s===6)return new n(e[0],e[1],e[2],e[3],e[4],e[5]);const i=[];for(let o=0;o<s;o+=6)i.push(new n(e[o],e[o+1],e[o+2],e[o+3],e[o+4],e[o+5]));return i}n.create=t})(He||(He={}));function Za(n,t,e){return{x:n*Math.cos(e)-t*Math.sin(e),y:n*Math.sin(e)+t*Math.cos(e)}}function Py(n,t,e,s,r,i){const o=.3333333333333333,a=2/3;return[o*n+a*e,o*t+a*s,o*r+a*e,o*i+a*s,r,i]}function Ay(n,t,e,s,r,i,o,a,l,u){const h=Math.PI*120/180,f=Math.PI/180*(+r||0);let d=[],g,p,m,y,b;if(u)p=u[0],m=u[1],y=u[2],b=u[3];else{g=Za(n,t,-f),n=g.x,t=g.y,g=Za(a,l,-f),a=g.x,l=g.y;const V=(n-a)/2,A=(t-l)/2;let P=V*V/(e*e)+A*A/(s*s);P>1&&(P=Math.sqrt(P),e=P*e,s=P*s);const L=e*e,j=s*s,Y=(i===o?-1:1)*Math.sqrt(Math.abs((L*j-L*A*A-j*V*V)/(L*A*A+j*V*V)));y=Y*e*A/s+(n+a)/2,b=Y*-s*V/e+(t+l)/2,p=Math.asin((t-b)/s),m=Math.asin((l-b)/s),p=n<y?Math.PI-p:p,m=a<y?Math.PI-m:m,p<0&&(p=Math.PI*2+p),m<0&&(m=Math.PI*2+m),o&&p>m&&(p-=Math.PI*2),!o&&m>p&&(m-=Math.PI*2)}let w=m-p;if(Math.abs(w)>h){const V=m,A=a,P=l;m=p+h*(o&&m>p?1:-1),a=y+e*Math.cos(m),l=b+s*Math.sin(m),d=Ay(a,l,e,s,r,0,o,A,P,[m,V,y,b])}w=m-p;const x=Math.cos(p),v=Math.sin(p),S=Math.cos(m),E=Math.sin(m),C=Math.tan(w/4),M=4/3*(e*C),T=4/3*(s*C),k=[n,t],_=[n+M*v,t-T*x],D=[a+M*E,l-T*S],N=[a,l];if(_[0]=2*k[0]-_[0],_[1]=2*k[1]-_[1],u)return[_,D,N].concat(d);{d=[_,D,N].concat(d).join().split(",");const V=[],A=d.length;for(let P=0;P<A;P+=1)V[P]=P%2?Za(+d[P-1],+d[P],f).y:Za(+d[P],+d[P+1],f).x;return V}}function nI(n){if(!n)return null;const t=`
34
+ `+i):s.stack=i}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Gs(this.defaults,e);const{transitional:s,paramsSerializer:r,headers:i}=e;s!==void 0&&bu.assertOptions(s,{silentJSONParsing:us.transitional(us.boolean),forcedJSONParsing:us.transitional(us.boolean),clarifyTimeoutError:us.transitional(us.boolean)},!1),r!=null&&(R.isFunction(r)?e.paramsSerializer={serialize:r}:bu.assertOptions(r,{encode:us.function,serialize:us.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&R.merge(i.common,i[e.method]);i&&R.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),e.headers=Se.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let h,f=0,d;if(!l){const p=[Om.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),d=p.length,h=Promise.resolve(e);f<d;)h=h.then(p[f++],p[f++]);return h}d=a.length;let g=e;for(f=0;f<d;){const p=a[f++],m=a[f++];try{g=p(g)}catch(y){m.call(this,y);break}}try{h=Om.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,d=u.length;f<d;)h=h.then(u[f++],u[f++]);return h}getUri(t){t=Gs(this.defaults,t);const e=mm(t.baseURL,t.url);return am(e,t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],function(t){Ys.prototype[t]=function(e,s){return this.request(Gs(s||{},{method:t,url:e,data:(s||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function e(s){return function(i,o,a){return this.request(Gs(a||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Ys.prototype[t]=e(),Ys.prototype[t+"Form"]=e(!0)});class wu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(i){e=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,a){s.reason||(s.reason=new Dr(i,o,a),e(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=s=>{t.abort(s)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new wu(function(r){t=r}),cancel:t}}}function TD(n){return function(e){return n.apply(null,e)}}function ND(n){return R.isObject(n)&&n.isAxiosError===!0}const xu={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(xu).forEach(([n,t])=>{xu[t]=n});function Am(n){const t=new Ys(n),e=Gp(Ys.prototype.request,t);return R.extend(e,Ys.prototype,t,{allOwnKeys:!0}),R.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Am(Gs(n,r))},e}const Wt=Am(Ui);Wt.Axios=Ys,Wt.CanceledError=Dr,Wt.CancelToken=wu,Wt.isCancel=dm,Wt.VERSION=Mm,Wt.toFormData=Ia,Wt.AxiosError=at,Wt.Cancel=Wt.CanceledError,Wt.all=function(t){return Promise.all(t)},Wt.spread=TD,Wt.isAxiosError=ND,Wt.mergeConfig=Gs,Wt.AxiosHeaders=Se,Wt.formToJSON=n=>um(R.isHTMLForm(n)?new FormData(n):n),Wt.getAdapter=Em.getAdapter,Wt.HttpStatusCode=xu,Wt.default=Wt;const hs=Wt.create({baseURL:"http://localhost:8001",timeout:1e4,headers:{"Content-Type":"application/json"}}),_D=n=>{hs.defaults.baseURL=n},kD=n=>{hs.interceptors.request.use(t=>{if(n)return t.headers.token=n,t},t=>Promise.reject(t))};hs.interceptors.response.use(n=>(n.data.isOk=n.data.code===200,n.data),n=>{if(n.response)switch(n.response.status){}return Promise.reject(n)});const Yi=(n,t={})=>hs.get(n,{params:t}),$a=(n,t={})=>hs.post(n,t),Tm=(n,t={})=>hs.delete(n,{params:t}),DD=(n,t={})=>hs.post(n,t,{headers:{"Content-Type":"multipart/form-data"}}),Wi=(n,t)=>{const e=document.querySelector(n),s=e.querySelectorAll(".x6-port-body"),r=e.querySelectorAll(".x6-port-label");for(let i=0,o=s.length;i<o;i+=1)s[i].style.visibility=t?"visible":"hidden";for(let i=0,o=r.length;i<o;i+=1)r[i].style.visibility=t?"visible":"hidden"},Nm=n=>Yi("/cny/template/selectOne",{id:n}).then(t=>{if(t!=null&&t.isOk){const e=JSON.parse(t.data.remark);return{background:e.background,grid:e.grid,data:e.data}}else Bt.error((t==null?void 0:t.msg)||"获取失败")}),RD=n=>$a("/cny/custom/arrRealData",n).then(t=>{if(t!=null&&t.isOk)return t.data;Bt.error((t==null?void 0:t.msg)||"获取失败")}),_m={color:"#000000"},km={size:10,visible:!1,type:"doubleMesh",args:[{color:"#282828",thickness:1},{color:"#363636",thickness:2,factor:4}]},ID={stencilGraphWidth:300,stencilGraphHeight:0,layoutOptions:{columns:3,columnWidth:74,resizeToFit:!0,center:!0}},za={position:"absolute",args:{x:0,y:0},attrs:{text:{fill:"#5174ff",fontSize:8},circle:{magnet:!0,stroke:"#5174ff",r:4}},label:{position:"top"}},LD={shape:"rect",label:"文本",width:50,height:30,attrs:{body:{fill:"#00000000",stroke:"#00000000",strokeWidth:1,rx:6,ry:6},text:{fill:"#ffffff"},label:{textAnchor:"start",x:-14,y:0}},data:{type:"text",content:"文本",field:[]},ports:{groups:{ports:{portOption:za}}}},vu={line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}},ports:{groups:{ports:{portOption:za}}}},Gn=(n,t)=>{const e=n.__vccOpts||n;for(const[s,r]of t)e[s]=r;return e},BD={class:"control"},VD={class:"row-column"},jD=Gn({__name:"index",props:{payload:Object},setup(n){var d,g,p,m,y,b,w,x,v,S,E,C,M,T,k,_,D,N,j,A,P;const t=n;console.log(t.payload.value.options.grid);const e=c.ref(((d=t.payload.value.options.background)==null?void 0:d.color)||null),s=c.ref(((p=(g=t.payload.value.options)==null?void 0:g.grid)==null?void 0:p.visible)||null),r=c.ref(((y=(m=t.payload.value.options)==null?void 0:m.grid)==null?void 0:y.size)||10),i=c.ref(((v=(x=(w=(b=t.payload.value.options)==null?void 0:b.grid)==null?void 0:w.args)==null?void 0:x[0])==null?void 0:v.color)||null),o=c.ref(((M=(C=(E=(S=t.payload.value.options)==null?void 0:S.grid)==null?void 0:E.args)==null?void 0:C[0])==null?void 0:M.thickness)||1),a=c.ref(((D=(_=(k=(T=t.payload.value.options)==null?void 0:T.grid)==null?void 0:k.args)==null?void 0:_[1])==null?void 0:D.color)||null),l=c.ref(((P=(A=(j=(N=t.payload.value.options)==null?void 0:N.grid)==null?void 0:j.args)==null?void 0:A[1])==null?void 0:P.thickness)||1),u=c.ref("1"),h=L=>{t.payload.value.drawBackground({color:L})},f=()=>{t.payload.value.drawGrid({visible:s.value,size:r.value,type:"doubleMesh",args:[{color:i.value,thickness:o.value},{color:a.value,thickness:l.value}]})};return(L,V)=>{const Y=c.resolveComponent("el-col"),ot=c.resolveComponent("el-color-picker"),F=c.resolveComponent("el-row"),H=c.resolveComponent("el-switch"),B=c.resolveComponent("el-input-number"),K=c.resolveComponent("el-collapse-item"),nt=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",BD,[c.createVNode(nt,{modelValue:u.value,"onUpdate:modelValue":V[7]||(V[7]=rt=>u.value=rt),accordion:""},{default:c.withCtx(()=>[c.createVNode(K,{title:"基础属性",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",VD,[c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>V[8]||(V[8]=[c.createElementVNode("div",{class:"row-label"},"背景色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:e.value,"onUpdate:modelValue":V[0]||(V[0]=rt=>e.value=rt),size:"small","show-alpha":"",onChange:h},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>V[9]||(V[9]=[c.createElementVNode("div",{class:"row-label"},"网格",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(H,{modelValue:s.value,"onUpdate:modelValue":V[1]||(V[1]=rt=>s.value=rt),"active-value":!0,"inactive-value":!1,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>V[10]||(V[10]=[c.createElementVNode("div",{class:"row-label"},"网格大小",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:r.value,"onUpdate:modelValue":V[2]||(V[2]=rt=>r.value=rt),min:1,max:20,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>V[11]||(V[11]=[c.createElementVNode("div",{class:"row-label"},"主网格颜色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:i.value,"onUpdate:modelValue":V[3]||(V[3]=rt=>i.value=rt),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>V[12]||(V[12]=[c.createElementVNode("div",{class:"row-label"},"次网格颜色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:a.value,"onUpdate:modelValue":V[4]||(V[4]=rt=>a.value=rt),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>V[13]||(V[13]=[c.createElementVNode("div",{class:"row-label"},"主网格粗细",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:o.value,"onUpdate:modelValue":V[5]||(V[5]=rt=>o.value=rt),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>V[14]||(V[14]=[c.createElementVNode("div",{class:"row-label"},"次网格粗细",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:l.value,"onUpdate:modelValue":V[6]||(V[6]=rt=>l.value=rt),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-270b8aa5"]]),$D={class:"control"},zD={class:"row-column"},FD={class:"row-column"},Dm=Gn(Object.assign({name:"text-control"},{__name:"index",props:{payload:Object},setup(n){var V,Y,ot,F;const t=n,e=c.ref((V=t.payload.attrs.label)!=null&&V.textAnchor?"0":"1"),s=c.ref([]),r=c.ref([]),i=()=>{Yi("/cny/custom/deviceList").then(H=>{s.value=H.data})},o=c.ref();let a=c.reactive({});const l=()=>{a=s.value.find(H=>H.deviceCode===o.value),a&&u()},u=()=>{Yi("/cny/custom/monitorInfo",{deviceCode:a.deviceCode,fieldType:1}).then(H=>{r.value=H.data})},h=/\$\{(.*?)\}/g,f=H=>H.replace(h,"--"),d=H=>{ak.confirm(`是否确定要添加${a.deviceName}-${H.name}?
35
+ 添加后为:--${H.unit??""}`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const B=H.unit??"",K=t.payload.data.content;t.payload.data.content=g.value=K+"${"+a.deviceName+"."+H.name+"}"+B;const nt=K.match(h),rt=(nt==null?void 0:nt.length)||0;t.payload.data.field.push({index:rt,deviceName:a.deviceName,deviceCode:a.deviceCode,field:H.dataField}),t.payload.label=f(t.payload.data.content),console.log("label:",t.payload.label,"content:",t.payload.data.content,"field:",t.payload.data.field)})},g=c.ref(t.payload.data.content||null),p=c.ref(t.payload.attrs.body.fill||null),m=c.ref(t.payload.attrs.body.stroke||null),y=c.ref(t.payload.attrs.body.strokeWidth||null),b=c.ref(t.payload.attrs.body.rx||null),w=c.ref(t.payload.attrs.body.ry||null),x=c.ref(t.payload.attrs.text.fill||null),v=c.ref(t.payload.attrs.text.fontSize||null),S=c.ref(((Y=t.payload.attrs.label)==null?void 0:Y.textAnchor)||null),E=c.ref(((ot=t.payload.attrs.label)==null?void 0:ot.x)||null),C=c.ref(((F=t.payload.attrs.label)==null?void 0:F.y)||null),M=()=>{t.payload.attr("body/fill",p.value),t.payload.attr("body/stroke",m.value),t.payload.attr("body/strokeWidth",y.value),t.payload.attr("body/rx",b.value),t.payload.attr("body/ry",w.value),t.payload.attr("text/fill",x.value),t.payload.attr("text/fontSize",v.value),t.payload.attr("label/textAnchor",S.value),t.payload.attr("label/x",E.value),t.payload.attr("label/y",C.value)},T=c.ref(null),k=()=>{if(t.payload.data.content.length>g.value.length&&t.payload.data.content.endsWith("}")){const H=t.payload.data.content.match(h);if(H){const B=H.length-1;t.payload.data.field.splice(B,1),g.value=t.payload.data.content.substring(0,t.payload.data.content.lastIndexOf("${"))}}t.payload.data.content=g.value,t.payload.label=f(g.value)},_=()=>{if(T.value){const H=T.value.$refs.textarea;H.focus();const B=g.value.length;H.setSelectionRange(B,B)}},D=c.ref([]),N=()=>{D.value=JSON.parse(JSON.stringify(t.payload.getPorts().map(H=>({id:H.id,attrs:H.attrs,args:{x:Number(H.args.x.replace("%","")),y:Number(H.args.y.replace("%",""))}}))))},j=()=>{const H=za;H.attrs.text.text=`${t.payload.getPorts().length+1}`,H.args.x="50%",H.args.y="50%",t.payload.addPorts([{group:"ports",...H}]),N()},A=()=>{Wi("#drawing-board",!0)},P=(H,B,K)=>{t.payload.portProp(H,"args/"+B,K+"%"),N()},L=H=>{t.payload.removePort(H),N()};return c.onMounted(()=>{N(),i(),document.addEventListener("selectionchange",()=>{document.activeElement.tagName==="TEXTAREA"&&_()})}),(H,B)=>{const K=c.resolveComponent("el-input"),nt=c.resolveComponent("el-alert"),rt=c.resolveComponent("el-option"),et=c.resolveComponent("el-select"),ft=c.resolveComponent("el-table-column"),ge=c.resolveComponent("el-table"),St=c.resolveComponent("el-collapse-item"),xt=c.resolveComponent("el-col"),An=c.resolveComponent("el-color-picker"),pe=c.resolveComponent("el-row"),dn=c.resolveComponent("el-input-number"),Ts=c.resolveComponent("el-button"),Ns=c.resolveComponent("el-slider"),ai=c.resolveComponent("el-icon"),li=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",$D,[c.createVNode(li,{modelValue:e.value,"onUpdate:modelValue":B[12]||(B[12]=st=>e.value=st),accordion:""},{default:c.withCtx(()=>[n.payload.data.type==="text"?(c.openBlock(),c.createBlock(St,{key:0,title:"文本内容",name:"0"},{default:c.withCtx(()=>[c.createVNode(K,{ref_key:"inputRef",ref:T,type:"textarea",modelValue:g.value,"onUpdate:modelValue":B[0]||(B[0]=st=>g.value=st),onInput:k,onFocus:_,rows:10},null,8,["modelValue"]),c.createVNode(nt,{type:"info",title:"提示",description:"请先选择设备,再选择字段,最后点击确定按钮,即可绑定设备数据。绑定完成后会由 $<> 进行包裹!",style:{"margin-top":"20px"}}),c.createVNode(et,{modelValue:o.value,"onUpdate:modelValue":B[1]||(B[1]=st=>o.value=st),placeholder:"请选择设备",onChange:l,filterable:"",clearable:"",style:{"margin-top":"20px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,st=>(c.openBlock(),c.createBlock(rt,{key:st.deviceCode,label:st.deviceName,value:st.deviceCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),c.createVNode(ge,{data:r.value,border:"",style:{"margin-top":"20px"},size:"small",height:"500",onRowClick:d},{default:c.withCtx(()=>[c.createVNode(ft,{type:"index",label:"序号",width:"50",align:"center"}),c.createVNode(ft,{prop:"name",label:"字段名称","show-overflow-tooltip":""}),c.createVNode(ft,{prop:"dataField",label:"字段编码","show-overflow-tooltip":""}),c.createVNode(ft,{prop:"unit",label:"单位",width:"50"})]),_:1},8,["data"])]),_:1})):c.createCommentVNode("",!0),c.createVNode(St,{title:"图形设置",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",zD,[c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[13]||(B[13]=[c.createElementVNode("div",{class:"row-label"},"背景颜色",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(An,{modelValue:p.value,"onUpdate:modelValue":B[2]||(B[2]=st=>p.value=st),"show-alpha":!0,size:"small",onChange:M},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[14]||(B[14]=[c.createElementVNode("div",{class:"row-label"},"边框颜色",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(An,{modelValue:m.value,"onUpdate:modelValue":B[3]||(B[3]=st=>m.value=st),"show-alpha":!0,size:"small",onChange:M},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[15]||(B[15]=[c.createElementVNode("div",{class:"row-label"},"边框宽度",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:y.value,"onUpdate:modelValue":B[4]||(B[4]=st=>y.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[16]||(B[16]=[c.createElementVNode("div",{class:"row-label"},"背景圆角rx",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:b.value,"onUpdate:modelValue":B[5]||(B[5]=st=>b.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[17]||(B[17]=[c.createElementVNode("div",{class:"row-label"},"背景圆角ry",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:w.value,"onUpdate:modelValue":B[6]||(B[6]=st=>w.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),n.payload.data.type==="text"?(c.openBlock(),c.createBlock(St,{key:1,title:"文字设置",name:"2"},{default:c.withCtx(()=>[c.createElementVNode("div",FD,[c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[18]||(B[18]=[c.createElementVNode("div",{class:"row-label"},"字体颜色",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(An,{modelValue:x.value,"onUpdate:modelValue":B[7]||(B[7]=st=>x.value=st),"show-alpha":!0,size:"small",onChange:M},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[19]||(B[19]=[c.createElementVNode("div",{class:"row-label"},"字体大小",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:v.value,"onUpdate:modelValue":B[8]||(B[8]=st=>v.value=st),size:"small","controls-position":"right",onChange:M,min:12,max:48,step:2},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[20]||(B[20]=[c.createElementVNode("div",{class:"row-label"},"对齐方式",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(et,{modelValue:S.value,"onUpdate:modelValue":B[9]||(B[9]=st=>S.value=st),size:"small",onChange:M},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(["start","middle","end"],st=>c.createVNode(rt,{key:st,label:st,value:st},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[21]||(B[21]=[c.createElementVNode("div",{class:"row-label"},"x轴偏移",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:E.value,"onUpdate:modelValue":B[10]||(B[10]=st=>E.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[22]||(B[22]=[c.createElementVNode("div",{class:"row-label"},"y轴偏移",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:C.value,"onUpdate:modelValue":B[11]||(B[11]=st=>C.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})):c.createCommentVNode("",!0),c.createVNode(St,{title:"连接桩设置",name:"3"},{default:c.withCtx(()=>[c.createVNode(Ts,{type:"primary",onClick:j,size:"small"},{default:c.withCtx(()=>B[23]||(B[23]=[c.createTextVNode("添加连接桩")])),_:1}),c.createVNode(Ts,{type:"primary",onClick:A,size:"small"},{default:c.withCtx(()=>B[24]||(B[24]=[c.createTextVNode("显示连接桩")])),_:1}),c.createVNode(ge,{data:D.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:c.withCtx(()=>[c.createVNode(ft,{label:"ID",width:"50",align:"center"},{default:c.withCtx(({row:st})=>[c.createTextVNode(c.toDisplayString(st.attrs.text.text),1)]),_:1}),c.createVNode(ft,{label:"x",width:"100",align:"center"},{default:c.withCtx(({row:st})=>[c.createVNode(Ns,{modelValue:st.args.x,"onUpdate:modelValue":ie=>st.args.x=ie,min:0,max:100,step:1,onInput:ie=>P(st.id,"x",ie)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(ft,{label:"y",width:"100",align:"center"},{default:c.withCtx(({row:st})=>[c.createVNode(Ns,{modelValue:st.args.y,"onUpdate:modelValue":ie=>st.args.y=ie,min:0,max:100,step:1,onInput:ie=>P(st.id,"y",ie)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(ft,{label:"操作",align:"center"},{default:c.withCtx(({row:st})=>[c.createVNode(Ts,{type:"danger",size:"small",onClick:ie=>L(st.id)},{default:c.withCtx(()=>[c.createVNode(ai,null,{default:c.withCtx(()=>[c.createVNode(c.unref(wg))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-764721f9"]]),HD={class:"container"},UD={class:"row-column"},GD={class:"row-column"},YD={class:"row-column"},WD=Gn({__name:"index",props:{payload:Object},setup(n){var l,u,h,f;const t=n,e=c.ref(t.payload.attrs.line.stroke),s=c.reactive({name:((l=t.payload.attrs.line.sourceMarker)==null?void 0:l.name)??null,args:((u=t.payload.attrs.line.sourceMarker)==null?void 0:u.args)??{}}),r=c.reactive({name:((h=t.payload.attrs.line.targetMarker)==null?void 0:h.name)??null,args:((f=t.payload.attrs.line.targetMarker)==null?void 0:f.args)??{}}),i=[{label:"Block",value:"block"},{label:"Classic",value:"classic"},{label:"Diamond",value:"diamond"},{label:"Cross",value:"cross"},{label:"Async",value:"async"},{label:"Circle",value:"circle"},{label:"CirclePlus",value:"circlePlus"},{label:"Ellipse",value:"ellipse"}],o=c.ref("0"),a=()=>{t.payload.attr("line/stroke",e.value),t.payload.attr("line/sourceMarker/name",s.name),t.payload.attr("line/sourceMarker/args",s.args),t.payload.attr("line/targetMarker/name",r.name),t.payload.attr("line/targetMarker/args",r.args),vu.line=t.payload.attrs.line};return(d,g)=>{const p=c.resolveComponent("el-col"),m=c.resolveComponent("el-color-picker"),y=c.resolveComponent("el-row"),b=c.resolveComponent("el-collapse-item"),w=c.resolveComponent("el-option"),x=c.resolveComponent("el-select"),v=c.resolveComponent("el-input-number"),S=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",HD,[c.createVNode(S,{modelValue:o.value,"onUpdate:modelValue":g[9]||(g[9]=E=>o.value=E),accordion:""},{default:c.withCtx(()=>[c.createVNode(b,{title:"线段设置",name:"0"},{default:c.withCtx(()=>[c.createElementVNode("div",UD,[c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[10]||(g[10]=[c.createElementVNode("div",{class:"row-label"},"颜色",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(m,{modelValue:e.value,"onUpdate:modelValue":g[0]||(g[0]=E=>e.value=E),"show-alpha":!0,size:"small",onChange:a},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),c.createVNode(b,{title:"箭头1设置",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",GD,[c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[11]||(g[11]=[c.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(x,{modelValue:s.name,"onUpdate:modelValue":g[1]||(g[1]=E=>s.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(i,E=>c.createVNode(w,{key:E.value,label:E.label,value:E.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[12]||(g[12]=[c.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:s.args.width,"onUpdate:modelValue":g[2]||(g[2]=E=>s.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[13]||(g[13]=[c.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:s.args.height,"onUpdate:modelValue":g[3]||(g[3]=E=>s.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[14]||(g[14]=[c.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:s.args.offset,"onUpdate:modelValue":g[4]||(g[4]=E=>s.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),c.createVNode(b,{title:"箭头2设置",name:"2"},{default:c.withCtx(()=>[c.createElementVNode("div",YD,[c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[15]||(g[15]=[c.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(x,{modelValue:r.name,"onUpdate:modelValue":g[5]||(g[5]=E=>r.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(i,E=>c.createVNode(w,{key:E.value,label:E.label,value:E.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[16]||(g[16]=[c.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:r.args.width,"onUpdate:modelValue":g[6]||(g[6]=E=>r.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[17]||(g[17]=[c.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:r.args.height,"onUpdate:modelValue":g[7]||(g[7]=E=>r.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[18]||(g[18]=[c.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:r.args.offset,"onUpdate:modelValue":g[8]||(g[8]=E=>r.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-19905aaf"]]),qD={class:"form-container"},JD=Gn({__name:"Shortcuts",setup(n){const t=c.ref([{name:"复制",windowsKey:"Ctrl + C",macKey:"Command + C"},{name:"粘贴",windowsKey:"Ctrl + V",macKey:"Command + V"},{name:"撤销",windowsKey:"Ctrl + Z",macKey:"Command + Z"},{name:"重做",windowsKey:"Ctrl + Y",macKey:"Command + Y"},{name:"框选",windowsKey:"Alt + LMB",macKey:"option + LMB"},{name:"多选",windowsKey:"Alt + LMB",macKey:"Command + LMB"}]);return(e,s)=>{const r=c.resolveComponent("el-table-column"),i=c.resolveComponent("el-table");return c.openBlock(),c.createElementBlock("div",qD,[c.createVNode(i,{data:t.value,size:"small",border:""},{default:c.withCtx(()=>[c.createVNode(r,{prop:"name",label:"名称"}),c.createVNode(r,{prop:"windowsKey",label:"windows"}),c.createVNode(r,{prop:"macKey",label:"mac"})]),_:1},8,["data"])])}}},[["__scopeId","data-v-99982d47"]]);typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&function(n){n.forEach(t=>{Object.prototype.hasOwnProperty.call(t,"append")||Object.defineProperty(t,"append",{configurable:!0,enumerable:!0,writable:!0,value(...e){const s=document.createDocumentFragment();e.forEach(r=>{const i=r instanceof Node;s.appendChild(i?r:document.createTextNode(String(r)))}),this.appendChild(s)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class ye{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(n){function t(){return(e,s,r)=>{const i=r.value,o=e.__proto__;r.value=function(...a){this.disposed||(i.call(this,...a),o.dispose.call(this))}}}n.dispose=t})(ye||(ye={}));class Rm{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(t=>{t.dispose()}),this.items.clear())}contains(t){return this.items.has(t)}add(t){this.items.add(t)}remove(t){this.items.delete(t)}clear(){this.items.clear()}}(function(n){function t(e){const s=new n;return e.forEach(r=>{s.add(r)}),s}n.from=t})(Rm||(Rm={}));function Im(n,t,e){if(e)switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2]);case 4:return n.call(t,e[0],e[1],e[2],e[3]);case 5:return n.call(t,e[0],e[1],e[2],e[3],e[4]);case 6:return n.call(t,e[0],e[1],e[2],e[3],e[4],e[5]);default:return n.apply(t,e)}return n.call(t)}function X(n,t,...e){return Im(n,t,e)}function XD(n){return typeof n=="object"&&n.then&&typeof n.then=="function"}function Cu(n){return n!=null&&(n instanceof Promise||XD(n))}function Su(...n){const t=[];if(n.forEach(s=>{Array.isArray(s)?t.push(...s):t.push(s)}),t.some(s=>Cu(s))){const s=t.map(r=>Cu(r)?r:Promise.resolve(r!==!1));return Promise.all(s).then(r=>r.reduce((i,o)=>o!==!1&&i,!0))}return t.every(s=>s!==!1)}function KD(...n){const t=Su(n);return typeof t=="boolean"?Promise.resolve(t):t}function Eu(n,t){const e=[];for(let s=0;s<n.length;s+=2){const r=n[s],i=n[s+1],o=Array.isArray(t)?t:[t],a=Im(r,i,o);e.push(a)}return Su(e)}class ZD{constructor(){this.listeners={}}on(t,e,s){return e==null?this:(this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e,s),this)}once(t,e,s){const r=(...i)=>(this.off(t,r),Eu([e,s],i));return this.on(t,r,this)}off(t,e,s){if(!(t||e||s))return this.listeners={},this;const r=this.listeners;return(t?[t]:Object.keys(r)).forEach(o=>{const a=r[o];if(a){if(!(e||s)){delete r[o];return}for(let l=a.length-2;l>=0;l-=2)e&&a[l]!==e||s&&a[l+1]!==s||a.splice(l,2)}}),this}trigger(t,...e){let s=!0;if(t!=="*"){const i=this.listeners[t];i!=null&&(s=Eu([...i],e))}const r=this.listeners["*"];return r!=null?Su([s,Eu([...r],[t,...e])]):s}emit(t,...e){return this.trigger(t,...e)}}function QD(n,...t){t.forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(n.prototype,s,Object.getOwnPropertyDescriptor(e.prototype,s))})})}const tR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])};function eR(n,t){tR(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}class nR{}const sR=/^\s*class\s+/.test(`${nR}`)||/^\s*class\s*\{/.test(`${class{}}`);function Ou(n,t){let e;return sR?e=class extends t{}:(e=function(){return t.apply(this,arguments)},eR(e,t)),Object.defineProperty(e,"name",{value:n}),e}function Lm(n){return n==="__proto__"}function Mu(n,t,e="/"){let s;const r=Array.isArray(t)?t:t.split(e);if(r.length)for(s=n;r.length;){const i=r.shift();if(Object(s)===s&&i&&i in s)s=s[i];else return}return s}function Rr(n,t,e,s="/"){const r=Array.isArray(t)?t:t.split(s),i=r.pop();if(i&&!Lm(i)){let o=n;r.forEach(a=>{Lm(a)||(o[a]==null&&(o[a]={}),o=o[a])}),o[i]=e}return n}function Bm(n,t,e="/"){const s=Array.isArray(t)?t.slice():t.split(e),r=s.pop();if(r)if(s.length>0){const i=Mu(n,s);i&&delete i[r]}else delete n[r];return n}var rR=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Nt extends ZD{dispose(){this.off()}}rR([ye.dispose()],Nt.prototype,"dispose",null),function(n){n.dispose=ye.dispose}(Nt||(Nt={})),QD(Nt,ye);const Vm=n=>{const t=Object.create(null);return e=>t[e]||(t[e]=n(e))},jm=Vm(n=>n.replace(/\B([A-Z])/g,"-$1").toLowerCase()),Pu=Vm(n=>C2(na(n)).replace(/ /g,""));function Au(n){let t=2166136261,e=!1,s=n;for(let r=0,i=s.length;r<i;r+=1){let o=s.charCodeAt(r);o>127&&!e&&(s=unescape(encodeURIComponent(s)),o=s.charCodeAt(r),e=!0),t^=o,t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24)}return t>>>0}function Fa(){let n="";const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let e=0,s=t.length;e<s;e+=1){const r=t[e],i=Math.random()*16|0,o=r==="x"?i:r==="y"?i&3|8:r;n+=o.toString(16)}return n}function iR(n,t,e){const s=Math.min(2,Math.floor(n.length*.34));let r=Math.floor(n.length*.4)+1,i,o=!1;const a=n.toLowerCase();for(const l of t){const u=e(l);if(u!==void 0&&Math.abs(u.length-a.length)<=s){const h=u.toLowerCase();if(h===a){if(u===n)continue;return l}if(o||u.length<3)continue;const f=oR(a,h,r-1);if(f===void 0)continue;f<3?(o=!0,i=l):(r=f,i=l)}}return i}function oR(n,t,e){let s=new Array(t.length+1),r=new Array(t.length+1);const i=e+1;for(let a=0;a<=t.length;a+=1)s[a]=a;for(let a=1;a<=n.length;a+=1){const l=n.charCodeAt(a-1),u=a>e?a-e:1,h=t.length>e+a?e+a:t.length;r[0]=a;let f=a;for(let g=1;g<u;g+=1)r[g]=i;for(let g=u;g<=h;g+=1){const p=l===t.charCodeAt(g-1)?s[g-1]:Math.min(s[g]+1,r[g-1]+1,s[g-1]+2);r[g]=p,f=Math.min(f,p)}for(let g=h+1;g<=t.length;g+=1)r[g]=i;if(f>e)return;const d=s;s=r,r=d}const o=s[t.length];return o>e?void 0:o}function Yn(n){return typeof n=="string"&&n.slice(-1)==="%"}function an(n,t){if(n==null)return 0;let e;if(typeof n=="string"){if(e=parseFloat(n),Yn(n)&&(e/=100,Number.isFinite(e)))return e*t}else e=n;return Number.isFinite(e)?e>0&&e<1?e*t:e:0}function ds(n){if(typeof n=="object"){let e=0,s=0,r=0,i=0;return n.vertical!=null&&Number.isFinite(n.vertical)&&(s=i=n.vertical),n.horizontal!=null&&Number.isFinite(n.horizontal)&&(r=e=n.horizontal),n.left!=null&&Number.isFinite(n.left)&&(e=n.left),n.top!=null&&Number.isFinite(n.top)&&(s=n.top),n.right!=null&&Number.isFinite(n.right)&&(r=n.right),n.bottom!=null&&Number.isFinite(n.bottom)&&(i=n.bottom),{top:s,right:r,bottom:i,left:e}}let t=0;return n!=null&&Number.isFinite(n)&&(t=n),{top:t,right:t,bottom:t,left:t}}let Tu=!1,$m=!1,zm=!1,Fm=!1,Hm=!1,Um=!1,Gm=!1,Ym=!1,Wm=!1,qm=!1,Jm=!1,Xm=!1,Km=!1,Zm=!1,Qm=!1,ty=!1;if(typeof navigator=="object"){const n=navigator.userAgent;Tu=n.indexOf("Macintosh")>=0,$m=!!n.match(/(iPad|iPhone|iPod)/g),zm=n.indexOf("Windows")>=0,Fm=n.indexOf("MSIE")>=0,Hm=!!n.match(/Trident\/7\./),Um=!!n.match(/Edge\//),Gm=n.indexOf("Mozilla/")>=0&&n.indexOf("MSIE")<0&&n.indexOf("Edge/")<0,Wm=n.indexOf("Chrome/")>=0&&n.indexOf("Edge/")<0,qm=n.indexOf("Opera/")>=0||n.indexOf("OPR/")>=0,Jm=n.indexOf("Firefox/")>=0,Xm=n.indexOf("AppleWebKit/")>=0&&n.indexOf("Chrome/")<0&&n.indexOf("Edge/")<0,typeof document=="object"&&(ty=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||n.indexOf("Opera/")>=0)}if(typeof window=="object"&&(Ym=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,Zm=window.PointerEvent!=null&&!Tu),typeof document=="object"){Km="ontouchstart"in document.documentElement;try{const n=Object.defineProperty({},"passive",{get(){Qm=!0}}),t=document.createElement("div");t.addEventListener&&t.addEventListener("click",()=>{},n)}catch{}}var fs;(function(n){n.IS_MAC=Tu,n.IS_IOS=$m,n.IS_WINDOWS=zm,n.IS_IE=Fm,n.IS_IE11=Hm,n.IS_EDGE=Um,n.IS_NETSCAPE=Gm,n.IS_CHROME_APP=Ym,n.IS_CHROME=Wm,n.IS_OPERA=qm,n.IS_FIREFOX=Jm,n.IS_SAFARI=Xm,n.SUPPORT_TOUCH=Km,n.SUPPORT_POINTER=Zm,n.SUPPORT_PASSIVE=Qm,n.NO_FOREIGNOBJECT=ty,n.SUPPORT_FOREIGNOBJECT=!n.NO_FOREIGNOBJECT})(fs||(fs={})),function(n){function t(){const i=window.module;return i!=null&&i.hot!=null&&i.hot.status!=null?i.hot.status():"unkonwn"}n.getHMRStatus=t;function e(){return t()==="apply"}n.isApplyingHMR=e;const s={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function r(i){const o=document.createElement(s[i]||"div"),a=`on${i}`;let l=a in o;return l||(o.setAttribute(a,"return;"),l=typeof o[a]=="function"),l}n.isEventSupported=r}(fs||(fs={}));const Nu=/[\t\r\n\f]/g,_u=/\S+/g,Ir=n=>` ${n} `;function Lr(n){return n&&n.getAttribute&&n.getAttribute("class")||""}function Sn(n,t){if(n==null||t==null)return!1;const e=Ir(Lr(n)),s=Ir(t);return n.nodeType===1?e.replace(Nu," ").includes(s):!1}function J(n,t){if(!(n==null||t==null)){if(typeof t=="function")return J(n,t(Lr(n)));if(typeof t=="string"&&n.nodeType===1){const e=t.match(_u)||[],s=Ir(Lr(n)).replace(Nu," ");let r=e.reduce((i,o)=>i.indexOf(Ir(o))<0?`${i}${o} `:i,s);r=r.trim(),s!==r&&n.setAttribute("class",r)}}}function Dt(n,t){if(n!=null){if(typeof t=="function")return Dt(n,t(Lr(n)));if((!t||typeof t=="string")&&n.nodeType===1){const e=(t||"").match(_u)||[],s=Ir(Lr(n)).replace(Nu," ");let r=e.reduce((i,o)=>{const a=Ir(o);return i.indexOf(a)>-1?i.replace(a," "):i},s);r=t?r.trim():"",s!==r&&n.setAttribute("class",r)}}}function ln(n,t,e){if(!(n==null||t==null)){if(e!=null&&typeof t=="string"){e?J(n,t):Dt(n,t);return}if(typeof t=="function")return ln(n,t(Lr(n),e),e);typeof t=="string"&&(t.match(_u)||[]).forEach(r=>{Sn(n,r)?Dt(n,r):J(n,r)})}}let ey=0;function aR(){return ey+=1,`v${ey}`}function ku(n){return(n.id==null||n.id==="")&&(n.id=aR()),n.id}function gs(n){return n==null?!1:typeof n.getScreenCTM=="function"&&n instanceof SVGElement}const ee={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},ny="1.1";function sy(n,t=document){return t.createElement(n)}function Du(n,t=ee.xhtml,e=document){return e.createElementNS(t,n)}function cn(n,t=document){return Du(n,ee.svg,t)}function Ha(n){if(n){const e=`<svg xmlns="${ee.svg}" xmlns:xlink="${ee.xlink}" version="${ny}">${n}</svg>`,{documentElement:s}=lR(e,{async:!1});return s}const t=document.createElementNS(ee.svg,"svg");return t.setAttributeNS(ee.xmlns,"xmlns:xlink",ee.xlink),t.setAttribute("version",ny),t}function lR(n,t={}){let e;try{const s=new DOMParser;if(t.async!=null){const r=s;r.async=t.async}e=s.parseFromString(n,t.mimeType||"text/xml")}catch{e=void 0}if(!e||e.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${n}`);return e}function cR(n,t=!0){const e=n.nodeName;return t?e.toLowerCase():e.toUpperCase()}function Ru(n){let t=0,e=n.previousSibling;for(;e;)e.nodeType===1&&(t+=1),e=e.previousSibling;return t}function uR(n,t){return n.querySelectorAll(t)}function hR(n,t){return n.querySelector(t)}function ry(n,t,e){const s=n.ownerSVGElement;let r=n.parentNode;for(;r&&r!==e&&r!==s;){if(Sn(r,t))return r;r=r.parentNode}return null}function Iu(n,t){const e=t&&t.parentNode;return n===e||!!(e&&e.nodeType===1&&n.compareDocumentPosition(e)&16)}function ze(n){n&&(Array.isArray(n)?n:[n]).forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)})}function qi(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Ne(n,t){(Array.isArray(t)?t:[t]).forEach(s=>{s!=null&&n.appendChild(s)})}function iy(n,t){const e=n.firstChild;return e?Lu(e,t):Ne(n,t)}function Lu(n,t){const e=n.parentNode;e&&(Array.isArray(t)?t:[t]).forEach(r=>{r!=null&&e.insertBefore(r,n)})}function ps(n,t){t!=null&&t.appendChild(n)}function oy(n){try{return n instanceof HTMLElement}catch{return typeof n=="object"&&n.nodeType===1&&typeof n.style=="object"&&typeof n.ownerDocument=="object"}}function dR(n,t){const e=[];let s=n.firstChild;for(;s;s=s.nextSibling)s.nodeType===1&&(!t||Sn(s,t))&&e.push(s);return e}const ay=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function fR(n,t){return n.getAttribute(t)}function Bu(n,t){const e=cy(t);e.ns?n.hasAttributeNS(e.ns,e.local)&&n.removeAttributeNS(e.ns,e.local):n.hasAttribute(t)&&n.removeAttribute(t)}function Vu(n,t,e){if(e==null)return Bu(n,t);const s=cy(t);s.ns&&typeof e=="string"?n.setAttributeNS(s.ns,t,e):t==="id"?n.id=`${e}`:n.setAttribute(t,`${e}`)}function ly(n,t){Object.keys(t).forEach(e=>{Vu(n,e,t[e])})}function ut(n,t,e){if(t==null){const s=n.attributes,r={};for(let i=0;i<s.length;i+=1)r[s[i].name]=s[i].value;return r}if(typeof t=="string"&&e===void 0)return n.getAttribute(t);typeof t=="object"?ly(n,t):Vu(n,t,e)}function cy(n){if(n.indexOf(":")!==-1){const t=n.split(":");return{ns:ee[t[0]],local:t[1]}}return{ns:null,local:n}}function Ji(n){const t={};return Object.keys(n).forEach(e=>{const s=ay.includes(e)?e:jm(e);t[s]=n[e]}),t}function Ua(n){const t={};return n.split(";").forEach(s=>{const r=s.trim();if(r){const i=r.split("=");i.length&&(t[i[0].trim()]=i[1]?i[1].trim():"")}}),t}function ju(n,t){return Object.keys(t).forEach(e=>{if(e==="class")n[e]=n[e]?`${n[e]} ${t[e]}`:t[e];else if(e==="style"){const s=typeof n[e]=="object",r=typeof t[e]=="object";let i,o;s&&r?(i=n[e],o=t[e]):s?(i=n[e],o=Ua(t[e])):r?(i=Ua(n[e]),o=t[e]):(i=Ua(n[e]),o=Ua(t[e])),n[e]=ju(i,o)}else n[e]=t[e]}),n}function gR(n,t,e={}){const s=e.offset||0,r=[],i=[];let o,a,l=null;for(let u=0;u<n.length;u+=1){o=i[u]=n[u];for(let h=0,f=t.length;h<f;h+=1){const d=t[h],g=d.start+s,p=d.end+s;u>=g&&u<p&&(typeof o=="string"?o=i[u]={t:n[u],attrs:d.attrs}:o.attrs=ju(ju({},o.attrs),d.attrs),e.includeAnnotationIndices&&(o.annotations==null&&(o.annotations=[]),o.annotations.push(h)))}a=i[u-1],a?Lt(o)&&Lt(a)?(l=l,JSON.stringify(o.attrs)===JSON.stringify(a.attrs)?l.t+=o.t:(r.push(l),l=o)):Lt(o)||Lt(a)?(l=l,r.push(l),l=o):l=(l||"")+o:l=o}return l!=null&&r.push(l),r}function pR(n){return n.replace(/ /g," ")}var Ws;(function(n){function t(u){const h="data:";return u.substr(0,h.length)===h}n.isDataUrl=t;function e(u,h){if(!u||t(u)){setTimeout(()=>h(null,u));return}const f=()=>{h(new Error(`Failed to load image: ${u}`))},d=window.FileReader?p=>{if(p.status===200){const m=new FileReader;m.onload=y=>{const b=y.target.result;h(null,b)},m.onerror=f,m.readAsDataURL(p.response)}else f()}:p=>{const m=y=>{const w=[];for(let x=0;x<y.length;x+=32768)w.push(String.fromCharCode.apply(null,y.subarray(x,x+32768)));return w.join("")};if(p.status===200){let y=u.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const b=`data:image/${y};base64,`,w=new Uint8Array(p.response),x=b+btoa(m(w));h(null,x)}else f()},g=new XMLHttpRequest;g.responseType=window.FileReader?"blob":"arraybuffer",g.open("GET",u,!0),g.addEventListener("error",f),g.addEventListener("load",()=>d(g)),g.send()}n.imageToDataUri=e;function s(u){let h=u.replace(/\s/g,"");h=decodeURIComponent(h);const f=h.indexOf(","),d=h.slice(0,f),g=d.split(":")[1].split(";")[0],p=h.slice(f+1);let m;d.indexOf("base64")>=0?m=atob(p):m=unescape(encodeURIComponent(p));const y=new Uint8Array(m.length);for(let b=0;b<m.length;b+=1)y[b]=m.charCodeAt(b);return new Blob([y],{type:g})}n.dataUriToBlob=s;function r(u,h){const f=window.navigator.msSaveBlob;if(f)f(u,h);else{const d=window.URL.createObjectURL(u),g=document.createElement("a");g.href=d,g.download=h,document.body.appendChild(g),g.click(),document.body.removeChild(g),window.URL.revokeObjectURL(d)}}n.downloadBlob=r;function i(u,h){const f=s(u);r(f,h)}n.downloadDataUri=i;function o(u){const h=u.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return h&&h[2]?h[2].replace(/\s+/," ").split(" "):null}function a(u){const h=parseFloat(u);return Number.isNaN(h)?null:h}function l(u,h={}){let f=null;const d=x=>(f==null&&(f=o(u)),f!=null?a(f[x]):null),g=x=>{const v=u.match(x);return v&&v[2]?a(v[2]):null};let p=h.width;if(p==null&&(p=g(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),p==null&&(p=d(2)),p==null)throw new Error("Can not parse width from svg string");let m=h.height;if(m==null&&(m=g(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),m==null&&(m=d(3)),m==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(u).replace(/'/g,"%27").replace(/"/g,"%22")}`}n.svgToDataUrl=l})(Ws||(Ws={}));let qs;const mR={px(n){return n},mm(n){return qs*n},cm(n){return qs*n*10},in(n){return qs*n*25.4},pt(n){return qs*(25.4*n/72)},pc(n){return qs*(25.4*n/6)}};var uy;(function(n){function t(s,r,i){const o=document.createElement("div"),a=o.style;a.display="inline-block",a.position="absolute",a.left="-15000px",a.top="-15000px",a.width=s+(i||"px"),a.height=r+(i||"px"),document.body.appendChild(o);const l=o.getBoundingClientRect(),u={width:l.width||0,height:l.height||0};return document.body.removeChild(o),u}n.measure=t;function e(s,r){qs==null&&(qs=t("1","1","mm").width);const i=r?mR[r]:null;return i?i(s):s}n.toPx=e})(uy||(uy={}));const yR=/-(.)/g;function bR(n){return n.replace(yR,(t,e)=>e.toUpperCase())}const $u={},hy=["webkit","ms","moz","o"],dy=typeof document<"u"?document.createElement("div").style:{};function wR(n){for(let t=0;t<hy.length;t+=1){const e=hy[t]+n;if(e in dy)return e}return null}function xR(n){const t=bR(n);if($u[t]==null){const e=t.charAt(0).toUpperCase()+t.slice(1);$u[t]=t in dy?t:wR(e)}return $u[t]}function fy(n,t){const e=n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.opener?n.ownerDocument.defaultView.getComputedStyle(n,null):window.getComputedStyle(n,null);return e&&t?e.getPropertyValue(t)||e[t]:e}const vR={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function CR(n){return/^--/.test(n)}function SR(n,t,e){const s=window.getComputedStyle(n,null);return e?s.getPropertyValue(t)||void 0:s[t]||n.style[t]}function ER(n,t){return!vR[n]&&typeof t=="number"?`${t}px`:t}function qt(n,t,e){if(typeof t=="string"){const s=CR(t);if(s||(t=xR(t)),e===void 0)return SR(n,t,s);s||(e=ER(t,e));const r=n.style;s?r.setProperty(t,e):r[t]=e;return}for(const s in t)qt(n,s,t[s])}const Ga=new WeakMap;function gy(n,t){const e=na(t),s=Ga.get(n);if(s)return s[e]}function OR(n,t,e){const s=na(t),r=Ga.get(n);r?r[s]=e:Ga.set(n,{[s]:e})}function Js(n,t,e){if(!t){const s={};return Object.keys(Ga).forEach(r=>{s[r]=gy(n,r)}),s}if(typeof t=="string"){if(e===void 0)return gy(n,t);OR(n,t,e);return}for(const s in t)Js(n,s,t[s])}class tt{get[Symbol.toStringTag](){return tt.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(t){this.node.id=t}constructor(t,e,s){if(!t)throw new TypeError("Invalid element to create vector");let r;if(tt.isVector(t))r=t.node;else if(typeof t=="string")if(t.toLowerCase()==="svg")r=Ha();else if(t[0]==="<"){const i=Ha(t);r=document.importNode(i.firstChild,!0)}else r=document.createElementNS(ee.svg,t);else r=t;this.node=r,e&&this.setAttributes(e),s&&this.append(s)}transform(t,e){return t==null?Vr(this.node):(Vr(this.node,t,e),this)}translate(t,e=0,s={}){return t==null?Sy(this.node):(Sy(this.node,t,e,s),this)}rotate(t,e,s,r={}){return t==null?Hu(this.node):(Hu(this.node,t,e,s,r),this)}scale(t,e){return t==null?Uu(this.node):(Uu(this.node,t,e),this)}getTransformToElement(t){const e=tt.toNode(t);return Qi(this.node,e)}removeAttribute(t){return Bu(this.node,t),this}getAttribute(t){return fR(this.node,t)}setAttribute(t,e){return Vu(this.node,t,e),this}setAttributes(t){return ly(this.node,t),this}attr(t,e){return t==null?ut(this.node):typeof t=="string"&&e===void 0?ut(this.node,t):(typeof t=="object"?ut(this.node,t):ut(this.node,t,e),this)}svg(){return this.node instanceof SVGSVGElement?this:tt.create(this.node.ownerSVGElement)}defs(){const t=this.svg()||this,e=t.node.getElementsByTagName("defs")[0];return e?tt.create(e):tt.create("defs").appendTo(t)}text(t,e={}){return my(this.node,t,e),this}tagName(){return cR(this.node)}clone(){return tt.create(this.node.cloneNode(!0))}remove(){return ze(this.node),this}empty(){return qi(this.node),this}append(t){return Ne(this.node,tt.toNodes(t)),this}appendTo(t){return ps(this.node,tt.isVector(t)?t.node:t),this}prepend(t){return iy(this.node,tt.toNodes(t)),this}before(t){return Lu(this.node,tt.toNodes(t)),this}replace(t){return this.node.parentNode&&this.node.parentNode.replaceChild(tt.toNode(t),this.node),tt.create(t)}first(){return this.node.firstChild?tt.create(this.node.firstChild):null}last(){return this.node.lastChild?tt.create(this.node.lastChild):null}get(t){const e=this.node.childNodes[t];return e?tt.create(e):null}indexOf(t){return Array.prototype.slice.call(this.node.childNodes).indexOf(tt.toNode(t))}find(t){const e=[],s=uR(this.node,t);if(s)for(let r=0,i=s.length;r<i;r+=1)e.push(tt.create(s[r]));return e}findOne(t){const e=hR(this.node,t);return e?tt.create(e):null}findParentByClass(t,e){const s=ry(this.node,t,e);return s?tt.create(s):null}matches(t){const e=this.node;this.node.matches;const s=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return s&&s.call(e,t)}contains(t){return Iu(this.node,tt.isVector(t)?t.node:t)}wrap(t){const e=tt.create(t),s=this.node.parentNode;return s!=null&&s.insertBefore(e.node,this.node),e.append(this)}parent(t){let e=this;if(e.node.parentNode==null)return null;if(e=tt.create(e.node.parentNode),t==null)return e;do if(typeof t=="string"?e.matches(t):e instanceof t)return e;while(e=tt.create(e.node.parentNode));return e}children(){const t=this.node.childNodes,e=[];for(let s=0;s<t.length;s+=1)t[s].nodeType===1&&e.push(tt.create(t[s]));return e}eachChild(t,e){const s=this.children();for(let r=0,i=s.length;r<i;r+=1)t.call(s[r],s[r],r,s),e&&s[r].eachChild(t,e);return this}index(){return Ru(this.node)}hasClass(t){return Sn(this.node,t)}addClass(t){return J(this.node,t),this}removeClass(t){return Dt(this.node,t),this}toggleClass(t,e){return ln(this.node,t,e),this}toLocalPoint(t,e){return GR(this.node,t,e)}sample(t=1){return this.node instanceof SVGPathElement?TR(this.node,t):[]}toPath(){return tt.create(LR(this.node))}toPathData(){return vy(this.node)}}(function(n){n.toStringTag=`X6.${n.name}`;function t(o){if(o==null)return!1;if(o instanceof n)return!0;const a=o[Symbol.toStringTag],l=o;return(a==null||a===n.toStringTag)&&l.node instanceof SVGElement&&typeof l.sample=="function"&&typeof l.toPath=="function"}n.isVector=t;function e(o,a,l){return new n(o,a,l)}n.create=e;function s(o){if(o[0]==="<"){const a=Ha(o),l=[];for(let u=0,h=a.childNodes.length;u<h;u+=1){const f=a.childNodes[u];l.push(e(document.importNode(f,!0)))}return l}return[e(o)]}n.createVectors=s;function r(o){return t(o)?o.node:o}n.toNode=r;function i(o){return Array.isArray(o)?o.map(a=>r(a)):[r(o)]}n.toNodes=i})(tt||(tt={}));function MR(n,t){const e=tt.create(t),s=tt.create("textPath"),r=n.d;if(r&&n["xlink:href"]===void 0){const i=tt.create("path").attr("d",r).appendTo(e.defs());s.attr("xlink:href",`#${i.id}`)}return typeof n=="object"&&s.attr(n),s.node}function PR(n,t,e){const s=e.eol,r=e.baseSize,i=e.lineHeight;let o=0,a;const l={},u=t.length-1;for(let h=0;h<=u;h+=1){let f=t[h],d=null;if(typeof f=="object"){const g=f.attrs,p=tt.create("tspan",g);a=p.node;let m=f.t;s&&h===u&&(m+=s),a.textContent=m;const y=g.class;y&&p.addClass(y),e.includeAnnotationIndices&&p.attr("annotations",f.annotations.join(",")),d=parseFloat(g["font-size"]),d===void 0&&(d=r),d&&d>o&&(o=d)}else s&&h===u&&(f+=s),a=document.createTextNode(f||" "),r&&r>o&&(o=r);n.appendChild(a)}return o&&(l.maxFontSize=o),i?l.lineHeight=i:o&&(l.lineHeight=o*1.2),l}const py=/em$/;function Ya(n,t){const e=parseFloat(n);return py.test(n)?e*t:e}function AR(n,t,e,s){if(!Array.isArray(t))return 0;const r=t.length;if(!r)return 0;let i=t[0];const o=Ya(i.maxFontSize,e)||e;let a=0;const l=Ya(s,e);for(let f=1;f<r;f+=1){i=t[f];const d=Ya(i.lineHeight,e)||l;a+=d}const u=Ya(i.maxFontSize,e)||e;let h;switch(n){case"middle":h=o/2-.15*u-a/2;break;case"bottom":h=-(.25*u)-a;break;case"top":default:h=.8*o;break}return h}function my(n,t,e={}){t=pR(t);const s=e.eol;let r=e.textPath;const i=e.textVerticalAnchor,o=i==="middle"||i==="bottom"||i==="top";let a=e.x;a===void 0&&(a=n.getAttribute("x")||0);const l=e.includeAnnotationIndices;let u=e.annotations;u&&!Array.isArray(u)&&(u=[u]);const h=e.lineHeight,f=h==="auto",d=f?"1.5em":h||"1em";let g=!0;const p=n.childNodes;if(p.length===1){const T=p[0];T&&T.tagName.toUpperCase()==="TITLE"&&(g=!1)}g&&qi(n),ut(n,{"xml:space":"preserve",display:t||e.displayEmpty?null:"none"});const m=ut(n,"font-size");let y=parseFloat(m);y||(y=16,(o||u)&&!m&&ut(n,"font-size",`${y}`));let b;r?(typeof r=="string"&&(r={d:r}),b=MR(r,n)):b=document.createDocumentFragment();let w,x=0,v;const S=t.split(`
36
+ `),E=[],C=S.length-1;for(let T=0;T<=C;T+=1){w=d;let k="v-line";const _=cn("tspan");let D,N=S[T];if(N)if(u){const j=gR(N,u,{offset:-x,includeAnnotationIndices:l});D=PR(_,j,{eol:T!==C&&s,baseSize:y,lineHeight:f?null:d,includeAnnotationIndices:l});const A=D.lineHeight;A&&f&&T!==0&&(w=A),T===0&&(v=D.maxFontSize*.8)}else s&&T!==C&&(N+=s),_.textContent=N;else{_.textContent="-",k+=" v-empty-line";const j=_.style;j.fillOpacity=0,j.strokeOpacity=0,u&&(D={})}D&&E.push(D),T>0&&_.setAttribute("dy",w),(T>0||r)&&_.setAttribute("x",a),_.className.baseVal=k,b.appendChild(_),x+=N.length+1}if(o)if(u)w=AR(i,E,y,d);else if(i==="top")w="0.8em";else{let T;switch(C>0?(T=parseFloat(d)||1,T*=C,py.test(d)||(T/=y)):T=0,i){case"middle":w=`${.3-T/2}em`;break;case"bottom":w=`${-T-.3}em`;break}}else i===0?w="0em":i?w=i:(w=0,n.getAttribute("y")==null&&n.setAttribute("y",`${v||"0.8em"}`));b.firstChild.setAttribute("dy",w),n.appendChild(b)}function Xi(n,t={}){const e=document.createElement("canvas").getContext("2d");if(!n)return{width:0};const s=[],r=t["font-size"]?`${parseFloat(t["font-size"])}px`:"14px";return s.push(t["font-style"]||"normal"),s.push(t["font-variant"]||"normal"),s.push(t["font-weight"]||400),s.push(r),s.push(t["font-family"]||"sans-serif"),e.font=s.join(" "),e.measureText(n)}function yy(n,t,e,s={}){if(t>=e)return[n,""];const r=n.length,i={};let o=Math.round(t/e*r-1);for(o<0&&(o=0);o>=0&&o<r;){const a=n.slice(0,o),l=i[a]||Xi(a,s).width,u=n.slice(0,o+1),h=i[u]||Xi(u,s).width;if(i[a]=l,i[u]=h,l>t)o-=1;else if(h<=t)o+=1;else break}return[n.slice(0,o),n.slice(o)]}function by(n,t,e={},s={}){const r=t.width,i=t.height,o=s.eol||`
37
+ `,a=e.fontSize||14,l=e.lineHeight?parseFloat(e.lineHeight):Math.ceil(a*1.4),u=Math.floor(i/l);if(n.indexOf(o)>-1){const y=Fa(),b=[];return n.split(o).map(w=>{const x=by(w,Object.assign(Object.assign({},t),{height:Number.MAX_SAFE_INTEGER}),e,Object.assign(Object.assign({},s),{eol:y}));x&&b.push(...x.split(y))}),b.slice(0,u).join(o)}const{width:h}=Xi(n,e);if(h<r)return n;const f=[];let d=n,g=h,p=s.ellipsis,m=0;p&&(typeof p!="string"&&(p="…"),m=Xi(p,e).width);for(let y=0;y<u;y+=1)if(g>r)if(y===u-1){const[w]=yy(d,r-m,g,e);f.push(p?`${w}${p}`:w)}else{const[w,x]=yy(d,r,g,e);f.push(w),d=x,g=Xi(d,e).width}else{f.push(d);break}return f.join(o)}const zu=.551784;function ae(n,t,e=NaN){const s=n.getAttribute(t);if(s==null)return e;const r=parseFloat(s);return Number.isNaN(r)?e:r}function TR(n,t=1){const e=n.getTotalLength(),s=[];let r=0,i;for(;r<e;)i=n.getPointAtLength(r),s.push({distance:r,x:i.x,y:i.y}),r+=t;return s}function NR(n){return["M",ae(n,"x1"),ae(n,"y1"),"L",ae(n,"x2"),ae(n,"y2")].join(" ")}function _R(n){const t=Wa(n);return t.length===0?null:`${wy(t)} Z`}function kR(n){const t=Wa(n);return t.length===0?null:wy(t)}function wy(n){return`M ${n.map(e=>`${e.x} ${e.y}`).join(" L")}`}function Wa(n){const t=[],e=n.points;if(e)for(let s=0,r=e.numberOfItems;s<r;s+=1)t.push(e.getItem(s));return t}function DR(n){const t=ae(n,"cx",0),e=ae(n,"cy",0),s=ae(n,"r"),r=s*zu;return["M",t,e-s,"C",t+r,e-s,t+s,e-r,t+s,e,"C",t+s,e+r,t+r,e+s,t,e+s,"C",t-r,e+s,t-s,e+r,t-s,e,"C",t-s,e-r,t-r,e-s,t,e-s,"Z"].join(" ")}function RR(n){const t=ae(n,"cx",0),e=ae(n,"cy",0),s=ae(n,"rx"),r=ae(n,"ry")||s,i=s*zu,o=r*zu;return["M",t,e-r,"C",t+i,e-r,t+s,e-o,t+s,e,"C",t+s,e+o,t+i,e+r,t,e+r,"C",t-i,e+r,t-s,e+o,t-s,e,"C",t-s,e-o,t-i,e-r,t,e-r,"Z"].join(" ")}function IR(n){return xy({x:ae(n,"x",0),y:ae(n,"y",0),width:ae(n,"width",0),height:ae(n,"height",0),rx:ae(n,"rx",0),ry:ae(n,"ry",0)})}function xy(n){let t;const e=n.x,s=n.y,r=n.width,i=n.height,o=Math.min(n.rx||n["top-rx"]||0,r/2),a=Math.min(n.rx||n["bottom-rx"]||0,r/2),l=Math.min(n.ry||n["top-ry"]||0,i/2),u=Math.min(n.ry||n["bottom-ry"]||0,i/2);return o||a||l||u?t=["M",e,s+l,"v",i-l-u,"a",a,u,0,0,0,a,u,"h",r-2*a,"a",a,u,0,0,0,a,-u,"v",-(i-u-l),"a",o,l,0,0,0,-o,-l,"h",-(r-2*o),"a",o,l,0,0,0,-o,l,"Z"]:t=["M",e,s,"H",e+r,"V",s+i,"H",e,"V",s,"Z"],t.join(" ")}function LR(n){const t=cn("path");ut(t,ut(n));const e=vy(n);return e&&t.setAttribute("d",e),t}function vy(n){const t=n.tagName.toLowerCase();switch(t){case"path":return n.getAttribute("d");case"line":return NR(n);case"polygon":return _R(n);case"polyline":return kR(n);case"ellipse":return RR(n);case"circle":return DR(n);case"rect":return IR(n)}throw new Error(`"${t}" cannot be converted to svg path element.`)}const BR=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,Cy=/[ ,]+/,VR=/^(\w+)\((.*)\)/;function jR(n,t){const s=cn("svg").createSVGPoint();return s.x=n,s.y=t,s}function ne(n){const e=cn("svg").createSVGMatrix();if(n!=null){const s=n,r=e;for(const i in s)r[i]=s[i]}return e}function Ki(n){const t=cn("svg");return n!=null?(n instanceof DOMMatrix||(n=ne(n)),t.createSVGTransformFromMatrix(n)):t.createSVGTransform()}function Zi(n){let t=ne();const e=n!=null&&n.match(BR);if(!e)return t;for(let s=0,r=e.length;s<r;s+=1){const o=e[s].match(VR);if(o){let a,l,u,h,f,d=ne();const g=o[2].split(Cy);switch(o[1].toLowerCase()){case"scale":a=parseFloat(g[0]),l=g[1]===void 0?a:parseFloat(g[1]),d=d.scaleNonUniform(a,l);break;case"translate":u=parseFloat(g[0]),h=parseFloat(g[1]),d=d.translate(u,h);break;case"rotate":f=parseFloat(g[0]),u=parseFloat(g[1])||0,h=parseFloat(g[2])||0,u!==0||h!==0?d=d.translate(u,h).rotate(f).translate(-u,-h):d=d.rotate(f);break;case"skewx":f=parseFloat(g[0]),d=d.skewX(f);break;case"skewy":f=parseFloat(g[0]),d=d.skewY(f);break;case"matrix":d.a=parseFloat(g[0]),d.b=parseFloat(g[1]),d.c=parseFloat(g[2]),d.d=parseFloat(g[3]),d.e=parseFloat(g[4]),d.f=parseFloat(g[5]);break;default:continue}t=t.multiply(d)}}return t}function Br(n){const t=n||{},e=t.a!=null?t.a:1,s=t.b!=null?t.b:0,r=t.c!=null?t.c:0,i=t.d!=null?t.d:1,o=t.e!=null?t.e:0,a=t.f!=null?t.f:0;return`matrix(${e},${s},${r},${i},${o},${a})`}function qa(n){let t,e,s;if(n){const i=Cy;if(n.trim().indexOf("matrix")>=0){const o=Zi(n),a=$R(o);t=[a.translateX,a.translateY],e=[a.rotation],s=[a.scaleX,a.scaleY];const l=[];(t[0]!==0||t[1]!==0)&&l.push(`translate(${t.join(",")})`),(s[0]!==1||s[1]!==1)&&l.push(`scale(${s.join(",")})`),e[0]!==0&&l.push(`rotate(${e[0]})`),n=l.join(" ")}else{const o=n.match(/translate\((.*?)\)/);o&&(t=o[1].split(i));const a=n.match(/rotate\((.*?)\)/);a&&(e=a[1].split(i));const l=n.match(/scale\((.*?)\)/);l&&(s=l[1].split(i))}}const r=s&&s[0]?parseFloat(s[0]):1;return{raw:n||"",translation:{tx:t&&t[0]?parseInt(t[0],10):0,ty:t&&t[1]?parseInt(t[1],10):0},rotation:{angle:e&&e[0]?parseInt(e[0],10):0,cx:e&&e[1]?parseInt(e[1],10):void 0,cy:e&&e[2]?parseInt(e[2],10):void 0},scale:{sx:r,sy:s&&s[1]?parseFloat(s[1]):r}}}function Fu(n,t){const e=t.x*n.a+t.y*n.c+0,s=t.x*n.b+t.y*n.d+0;return{x:e,y:s}}function $R(n){const t=Fu(n,{x:0,y:1}),e=Fu(n,{x:1,y:0}),s=180/Math.PI*Math.atan2(t.y,t.x)-90,r=180/Math.PI*Math.atan2(e.y,e.x);return{skewX:s,skewY:r,translateX:n.e,translateY:n.f,scaleX:Math.sqrt(n.a*n.a+n.b*n.b),scaleY:Math.sqrt(n.c*n.c+n.d*n.d),rotation:s}}function zR(n){let t,e,s,r;return n?(t=n.a==null?1:n.a,r=n.d==null?1:n.d,e=n.b,s=n.c):t=r=1,{sx:e?Math.sqrt(t*t+e*e):t,sy:s?Math.sqrt(s*s+r*r):r}}function FR(n){let t={x:0,y:1};n&&(t=Fu(n,t));const e=180*Math.atan2(t.y,t.x)/Math.PI%360-90;return{angle:e%360+(e<0?360:0)}}function HR(n){return{tx:n&&n.e||0,ty:n&&n.f||0}}function Vr(n,t,e={}){if(t==null)return Zi(ut(n,"transform"));if(e.absolute){n.setAttribute("transform",Br(t));return}const s=n.transform,r=Ki(t);s.baseVal.appendItem(r)}function Sy(n,t,e=0,s={}){let r=ut(n,"transform");const i=qa(r);if(t==null)return i.translation;r=i.raw,r=r.replace(/translate\([^)]*\)/g,"").trim();const o=s.absolute?t:i.translation.tx+t,a=s.absolute?e:i.translation.ty+e,l=`translate(${o},${a})`;n.setAttribute("transform",`${l} ${r}`.trim())}function Hu(n,t,e,s,r={}){let i=ut(n,"transform");const o=qa(i);if(t==null)return o.rotation;i=o.raw,i=i.replace(/rotate\([^)]*\)/g,"").trim(),t%=360;const a=r.absolute?t:o.rotation.angle+t,l=e!=null&&s!=null?`,${e},${s}`:"",u=`rotate(${a}${l})`;n.setAttribute("transform",`${i} ${u}`.trim())}function Uu(n,t,e){let s=ut(n,"transform");const r=qa(s);if(t==null)return r.scale;e=e??t,s=r.raw,s=s.replace(/scale\([^)]*\)/g,"").trim();const i=`scale(${t},${e})`;n.setAttribute("transform",`${s} ${i}`.trim())}function Qi(n,t){if(gs(t)&&gs(n)){const e=t.getScreenCTM(),s=n.getScreenCTM();if(e&&s)return e.inverse().multiply(s)}return ne()}function UR(n,t){let e=ne();if(gs(t)&&gs(n)){let s=n;const r=[];for(;s&&s!==t;){const i=s.getAttribute("transform")||null,o=Zi(i);r.push(o),s=s.parentNode}r.reverse().forEach(i=>{e=e.multiply(i)})}return e}function GR(n,t,e){const s=n instanceof SVGSVGElement?n:n.ownerSVGElement,r=s.createSVGPoint();r.x=t,r.y=e;try{const i=s.getScreenCTM(),o=r.matrixTransform(i.inverse()),a=Qi(n,s).inverse();return o.matrixTransform(a)}catch{return r}}var Fe;(function(n){const t={};function e(i){return t[i]||{}}n.get=e;function s(i,o){t[i]=o}n.register=s;function r(i){delete t[i]}n.unregister=r})(Fe||(Fe={}));var Xs;(function(n){const t=new WeakMap;function e(i){return t.has(i)||t.set(i,{events:Object.create(null)}),t.get(i)}n.ensure=e;function s(i){return t.get(i)}n.get=s;function r(i){return t.delete(i)}n.remove=r})(Xs||(Xs={}));var it;(function(n){n.returnTrue=()=>!0,n.returnFalse=()=>!1;function t(r){r.stopPropagation()}n.stopPropagationCallback=t;function e(r,i,o){r.addEventListener!=null&&r.addEventListener(i,o)}n.addEventListener=e;function s(r,i,o){r.removeEventListener!=null&&r.removeEventListener(i,o)}n.removeEventListener=s})(it||(it={})),function(n){const t=/[^\x20\t\r\n\f]+/g,e=/^([^.]*)(?:\.(.+)|)/;function s(a){return(a||"").match(t)||[""]}n.splitType=s;function r(a){const l=e.exec(a)||[];return{originType:l[1]?l[1].trim():l[1],namespaces:l[2]?l[2].split(".").map(u=>u.trim()).sort():[]}}n.normalizeType=r;function i(a){return a.nodeType===1||a.nodeType===9||!+a.nodeType}n.isValidTarget=i;function o(a,l){if(l){const u=a;return u.querySelector!=null&&u.querySelector(l)!=null}return!0}n.isValidSelector=o}(it||(it={})),function(n){let t=0;const e=new WeakMap;function s(a){return e.has(a)||(e.set(a,t),t+=1),e.get(a)}n.ensureHandlerId=s;function r(a){return e.get(a)}n.getHandlerId=r;function i(a){return e.delete(a)}n.removeHandlerId=i;function o(a,l){return e.set(a,l)}n.setHandlerId=o}(it||(it={})),function(n){function t(e,s){const r=[],i=Xs.get(e),o=i&&i.events&&i.events[s.type],a=o&&o.handlers||[],l=o?o.delegateCount:0;if(l>0&&!(s.type==="click"&&typeof s.button=="number"&&s.button>=1)){for(let u=s.target;u!==e;u=u.parentNode||e)if(u.nodeType===1&&!(s.type==="click"&&u.disabled===!0)){const h=[],f={};for(let d=0;d<l;d+=1){const g=a[d],p=g.selector;if(p!=null&&f[p]==null){const m=e,y=[];m.querySelectorAll(p).forEach(b=>{y.push(b)}),f[p]=y.includes(u)}f[p]&&h.push(g)}h.length&&r.push({elem:u,handlers:h})}}return l<a.length&&r.push({elem:e,handlers:a.slice(l)}),r}n.getHandlerQueue=t}(it||(it={})),function(n){function t(e){return e!=null&&e===e.window}n.isWindow=t}(it||(it={})),function(n){function t(e,s){const r=e.nodeType===9?e.documentElement:e,i=s&&s.parentNode;return e===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):e.compareDocumentPosition&&e.compareDocumentPosition(i)&16))}n.contains=t}(it||(it={}));class En{constructor(t,e){this.isDefaultPrevented=it.returnFalse,this.isPropagationStopped=it.returnFalse,this.isImmediatePropagationStopped=it.returnFalse,this.isSimulated=!1,this.preventDefault=()=>{const s=this.originalEvent;this.isDefaultPrevented=it.returnTrue,s&&!this.isSimulated&&s.preventDefault()},this.stopPropagation=()=>{const s=this.originalEvent;this.isPropagationStopped=it.returnTrue,s&&!this.isSimulated&&s.stopPropagation()},this.stopImmediatePropagation=()=>{const s=this.originalEvent;this.isImmediatePropagationStopped=it.returnTrue,s&&!this.isSimulated&&s.stopImmediatePropagation(),this.stopPropagation()},typeof t=="string"?this.type=t:t.type&&(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?it.returnTrue:it.returnFalse,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.timeStamp=t.timeStamp),e&&Object.assign(this,e),this.timeStamp||(this.timeStamp=Date.now())}}(function(n){function t(e){return e instanceof n?e:new n(e)}n.create=t})(En||(En={})),function(n){function t(e,s){Object.defineProperty(n.prototype,e,{enumerable:!0,configurable:!0,get:typeof s=="function"?function(){if(this.originalEvent)return s(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set(r){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:r})}})}n.addProperty=t}(En||(En={})),function(n){const t={bubbles:!0,cancelable:!0,eventPhase:!0,detail:!0,view:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pageX:!0,pageY:!0,screenX:!0,screenY:!0,toElement:!0,pointerId:!0,pointerType:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,touches:!0,changedTouches:!0,targetTouches:!0,which:!0,altKey:!0,ctrlKey:!0,metaKey:!0,shiftKey:!0};Object.keys(t).forEach(e=>n.addProperty(e,t[e]))}(En||(En={})),function(n){Fe.register("load",{noBubble:!0})}(),function(n){Fe.register("beforeunload",{postDispatch(t,e){e.result!==void 0&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}})}(),function(n){Fe.register("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(t,e){let s;const r=e.relatedTarget,i=e.handleObj;return(!r||r!==t&&!it.contains(t,r))&&(e.type=i.originType,s=i.handler.call(t,e),e.type="mouseover"),s}}),Fe.register("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(t,e){let s;const r=e.relatedTarget,i=e.handleObj;return(!r||r!==t&&!it.contains(t,r))&&(e.type=i.originType,s=i.handler.call(t,e),e.type="mouseout"),s}})}();var YR=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e},to;(function(n){let t;function e(o,a,l,u,h){if(!it.isValidTarget(o))return;let f;if(typeof l!="function"){const{handler:m,selector:y}=l,b=YR(l,["handler","selector"]);l=m,h=y,f=b}const d=Xs.ensure(o);let g=d.handler;g==null&&(g=d.handler=function(m,...y){return t!==m.type?r(o,m,...y):void 0});const p=it.ensureHandlerId(l);it.splitType(a).forEach(m=>{const{originType:y,namespaces:b}=it.normalizeType(m);if(!y)return;let w=y,x=Fe.get(w);w=(h?x.delegateType:x.bindType)||w,x=Fe.get(w);const v=Object.assign({type:w,originType:y,data:u,selector:h,guid:p,handler:l,namespace:b.join(".")},f),S=d.events;let E=S[w];E||(E=S[w]={handlers:[],delegateCount:0},(!x.setup||x.setup(o,u,b,g)===!1)&&it.addEventListener(o,w,g)),x.add&&(it.removeHandlerId(v.handler),x.add(o,v),it.setHandlerId(v.handler,p)),h?(E.handlers.splice(E.delegateCount,0,v),E.delegateCount+=1):E.handlers.push(v)})}n.on=e;function s(o,a,l,u,h){const f=Xs.get(o);if(!f)return;const d=f.events;d&&(it.splitType(a).forEach(g=>{const{originType:p,namespaces:m}=it.normalizeType(g);if(!p){Object.keys(d).forEach(S=>{s(o,S+g,l,u,!0)});return}let y=p;const b=Fe.get(y);y=(u?b.delegateType:b.bindType)||y;const w=d[y];if(!w)return;const x=m.length>0?new RegExp(`(^|\\.)${m.join("\\.(?:.*\\.|)")}(\\.|$)`):null,v=w.handlers.length;for(let S=w.handlers.length-1;S>=0;S-=1){const E=w.handlers[S];(h||p===E.originType)&&(!l||it.getHandlerId(l)===E.guid)&&(x==null||E.namespace&&x.test(E.namespace))&&(u==null||u===E.selector||u==="**"&&E.selector)&&(w.handlers.splice(S,1),E.selector&&(w.delegateCount-=1),b.remove&&b.remove(o,E))}v&&w.handlers.length===0&&((!b.teardown||b.teardown(o,m,f.handler)===!1)&&it.removeEventListener(o,y,f.handler),delete d[y])}),Object.keys(d).length===0&&Xs.remove(o))}n.off=s;function r(o,a,...l){const u=En.create(a);u.delegateTarget=o;const h=Fe.get(u.type);if(h.preDispatch&&h.preDispatch(o,u)===!1)return;const f=it.getHandlerQueue(o,u);for(let d=0,g=f.length;d<g&&!u.isPropagationStopped();d+=1){const p=f[d];u.currentTarget=p.elem;for(let m=0,y=p.handlers.length;m<y&&!u.isImmediatePropagationStopped();m+=1){const b=p.handlers[m];if(u.rnamespace==null||b.namespace&&u.rnamespace.test(b.namespace)){u.handleObj=b,u.data=b.data;const w=Fe.get(b.originType).handle,x=w?w(p.elem,u,...l):b.handler.call(p.elem,u,...l);x!==void 0&&(u.result=x,x===!1&&(u.preventDefault(),u.stopPropagation()))}}}return h.postDispatch&&h.postDispatch(o,u),u.result}n.dispatch=r;function i(o,a,l,u){let h=o,f=typeof o=="string"?o:o.type,d=typeof o=="string"||h.namespace==null?[]:h.namespace.split(".");const g=l;if(g.nodeType===3||g.nodeType===8)return;f.indexOf(".")>-1&&(d=f.split("."),f=d.shift(),d.sort());const p=f.indexOf(":")<0&&`on${f}`;h=o instanceof En?o:new En(f,typeof o=="object"?o:null),h.namespace=d.join("."),h.rnamespace=h.namespace?new RegExp(`(^|\\.)${d.join("\\.(?:.*\\.|)")}(\\.|$)`):null,h.result=void 0,h.target||(h.target=g);const m=[h];Array.isArray(a)?m.push(...a):m.push(a);const y=Fe.get(f);if(!u&&y.trigger&&y.trigger(g,h,a)===!1)return;let b;const w=[g];if(!u&&!y.noBubble&&!it.isWindow(g)){b=y.delegateType||f;let v=g,S=g.parentNode;for(;S!=null;)w.push(S),v=S,S=S.parentNode;const E=g.ownerDocument||document;if(v===E){const C=v.defaultView||v.parentWindow||window;w.push(C)}}let x=g;for(let v=0,S=w.length;v<S&&!h.isPropagationStopped();v+=1){const E=w[v];x=E,h.type=v>1?b:y.bindType||f;const C=Xs.get(E);C&&C.events[h.type]&&C.handler&&C.handler.call(E,...m);const M=p&&E[p]||null;M&&it.isValidTarget(E)&&(h.result=M.call(E,...m),h.result===!1&&h.preventDefault())}if(h.type=f,!u&&!h.isDefaultPrevented()){const v=y.preventDefault;if((v==null||v(w.pop(),h,a)===!1)&&it.isValidTarget(g)&&p&&typeof g[f]=="function"&&!it.isWindow(g)){const S=g[p];S&&(g[p]=null),t=f,h.isPropagationStopped()&&x.addEventListener(f,it.stopPropagationCallback),g[f](),h.isPropagationStopped()&&x.removeEventListener(f,it.stopPropagationCallback),t=void 0,S&&(g[p]=S)}}return h.result}n.trigger=i})(to||(to={}));var le;(function(n){function t(i,o,a,l,u){return eo.on(i,o,a,l,u),i}n.on=t;function e(i,o,a,l,u){return eo.on(i,o,a,l,u,!0),i}n.once=e;function s(i,o,a,l){return eo.off(i,o,a,l),i}n.off=s;function r(i,o,a,l){return to.trigger(o,a,i,l),i}n.trigger=r})(le||(le={}));var eo;(function(n){function t(s,r,i,o,a,l){if(typeof r=="object"){typeof i!="string"&&(o=o||i,i=void 0),Object.keys(r).forEach(u=>t(s,u,i,o,r[u],l));return}if(o==null&&a==null?(a=i,o=i=void 0):a==null&&(typeof i=="string"?(a=o,o=void 0):(a=o,o=i,i=void 0)),a===!1)a=it.returnFalse;else if(!a)return;if(l){const u=a;a=function(h,...f){return n.off(s,h),u.call(this,h,...f)},it.setHandlerId(a,it.ensureHandlerId(u))}to.on(s,r,a,o,i)}n.on=t;function e(s,r,i,o){const a=r;if(a&&a.preventDefault!=null&&a.handleObj!=null){const l=a.handleObj;e(a.delegateTarget,l.namespace?`${l.originType}.${l.namespace}`:l.originType,l.selector,l.handler);return}if(typeof r=="object"){const l=r;Object.keys(l).forEach(u=>e(s,u,i,l[u]));return}(i===!1||typeof i=="function")&&(o=i,i=void 0),o===!1&&(o=it.returnFalse),to.off(s,r,o,i)}n.off=e})(eo||(eo={}));class Ey{constructor(t,e,s){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=fs.isEventSupported("wheel")?"wheel":"mousewheel",this.target=t,this.onWheelCallback=e,this.onWheelGuard=s,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){this.target.addEventListener(this.eventName,this.onWheel,{passive:!1})}disable(){this.target.removeEventListener(this.eventName,this.onWheel)}onWheel(t){if(this.onWheelGuard!=null&&!this.onWheelGuard(t))return;this.deltaX+=t.deltaX,this.deltaY+=t.deltaY,t.preventDefault();let e;(this.deltaX!==0||this.deltaY!==0)&&(t.stopPropagation(),e=!0),e===!0&&this.animationFrameId===0&&(this.animationFrameId=requestAnimationFrame(()=>{this.didWheel(t)}))}didWheel(t){this.animationFrameId=0,this.onWheelCallback(t,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function Gu(n){const t=n.getBoundingClientRect(),e=n.ownerDocument.defaultView;return{top:t.top+e.pageYOffset,left:t.left+e.pageXOffset}}function WR(n){return n.getBoundingClientRect().width}function qR(n){return n.getBoundingClientRect().height}function Oy(n,t=60){let e=null;return(...s)=>{e&&clearTimeout(e),e=window.setTimeout(()=>{n.apply(this,s)},t)}}function JR(n){let t=null,e=[];const s=()=>{if(getComputedStyle(n).position==="static"){const u=n.style;u.position="relative"}const l=document.createElement("object");return l.onload=()=>{l.contentDocument.defaultView.addEventListener("resize",r),r()},l.style.display="block",l.style.position="absolute",l.style.top="0",l.style.left="0",l.style.height="100%",l.style.width="100%",l.style.overflow="hidden",l.style.pointerEvents="none",l.style.zIndex="-1",l.style.opacity="0",l.setAttribute("tabindex","-1"),l.type="text/html",n.appendChild(l),l.data="about:blank",l},r=Oy(()=>{e.forEach(l=>l(n))}),i=l=>{t||(t=s()),e.indexOf(l)===-1&&e.push(l)},o=()=>{t&&t.parentNode&&(t.contentDocument&&t.contentDocument.defaultView.removeEventListener("resize",r),t.parentNode.removeChild(t),t=null,e=[])};return{element:n,bind:i,destroy:o,unbind:l=>{const u=e.indexOf(l);u!==-1&&e.splice(u,1),e.length===0&&t&&o()}}}function XR(n){let t=null,e=[];const s=Oy(()=>{e.forEach(l=>{l(n)})}),r=()=>{const l=new ResizeObserver(s);return l.observe(n),s(),l},i=l=>{t||(t=r()),e.indexOf(l)===-1&&e.push(l)},o=()=>{t&&(t.disconnect(),e=[],t=null)};return{element:n,bind:i,destroy:o,unbind:l=>{const u=e.indexOf(l);u!==-1&&e.splice(u,1),e.length===0&&t&&o()}}}const KR=typeof ResizeObserver<"u"?XR:JR;var Ja;(function(n){const t=new WeakMap;function e(r){let i=t.get(r);return i||(i=KR(r),t.set(r,i),i)}function s(r){r.destroy(),t.delete(r.element)}n.bind=(r,i)=>{const o=e(r);return o.bind(i),()=>o.unbind(i)},n.clear=r=>{const i=e(r);s(i)}})(Ja||(Ja={}));class no{constructor(t={}){this.comparator=t.comparator||no.defaultComparator,this.index={},this.data=t.data||[],this.heapify()}isEmpty(){return this.data.length===0}insert(t,e,s){const r={priority:t,value:e},i=this.data.length;return s&&(r.id=s,this.index[s]=i),this.data.push(r),this.bubbleUp(i),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}updatePriority(t,e){const s=this.index[t];if(typeof s>"u")throw new Error(`Node with id '${t}' was not found in the heap.`);const r=this.data,i=r[s].priority,o=this.comparator(e,i);o<0?(r[s].priority=e,this.bubbleUp(s)):o>0&&(r[s].priority=e,this.bubbleDown(s))}remove(){const t=this.data,e=t[0],s=t.pop();return e.id&&delete this.index[e.id],t.length>0&&(t[0]=s,s.id&&(this.index[s.id]=0),this.bubbleDown(0)),e?e.value:null}heapify(){for(let t=0;t<this.data.length;t+=1)this.bubbleUp(t)}bubbleUp(t){const e=this.data;let s,r,i=t;for(;i>0&&(r=i-1>>>1,this.comparator(e[i].priority,e[r].priority)<0);){s=e[r],e[r]=e[i];let o=e[i].id;o!=null&&(this.index[o]=r),e[i]=s,o=e[i].id,o!=null&&(this.index[o]=i),i=r}}bubbleDown(t){const e=this.data,s=e.length-1;let r=t;for(;;){const i=(r<<1)+1,o=i+1;let a=r;if(i<=s&&this.comparator(e[i].priority,e[a].priority)<0&&(a=i),o<=s&&this.comparator(e[o].priority,e[a].priority)<0&&(a=o),a!==r){const l=e[a];e[a]=e[r];let u=e[r].id;u!=null&&(this.index[u]=a),e[r]=l,u=e[r].id,u!=null&&(this.index[u]=r),r=a}else break}}}(function(n){n.defaultComparator=(t,e)=>t-e})(no||(no={}));var Yu;(function(n){function t(e,s,r=(i,o)=>1){const i={},o={},a={},l=new no;for(i[s]=0,Object.keys(e).forEach(u=>{u!==s&&(i[u]=1/0),l.insert(i[u],u,u)});!l.isEmpty();){const u=l.remove();a[u]=!0;const h=e[u]||[];for(let f=0;f<h.length;f+=1){const d=h[f];if(!a[d]){const g=i[u]+r(u,d);g<i[d]&&(i[d]=g,o[d]=u,l.updatePriority(d,g))}}}return o}n.run=t})(Yu||(Yu={}));class Wn{constructor(t,e,s,r){if(t==null)return this.set(255,255,255,1);if(typeof t=="number")return this.set(t,e,s,r);if(typeof t=="string")return Wn.fromString(t)||this;if(Array.isArray(t))return this.set(t);this.set(t.r,t.g,t.b,t.a==null?1:t.a)}blend(t,e,s){this.set(t.r+(e.r-t.r)*s,t.g+(e.g-t.g)*s,t.b+(e.b-t.b)*s,t.a+(e.a-t.a)*s)}lighten(t){const e=Wn.lighten(this.toArray(),t);this.r=e[0],this.g=e[1],this.b=e[2],this.a=e[3]}darken(t){this.lighten(-t)}set(t,e,s,r){const i=Array.isArray(t)?t[0]:t,o=Array.isArray(t)?t[1]:e,a=Array.isArray(t)?t[2]:s,l=Array.isArray(t)?t[3]:r;return this.r=Math.round(we(i,0,255)),this.g=Math.round(we(o,0,255)),this.b=Math.round(we(a,0,255)),this.a=l==null?1:we(l,0,1),this}toHex(){return`#${["r","g","b"].map(e=>{const s=this[e].toString(16);return s.length<2?`0${s}`:s}).join("")}`}toRGBA(){return this.toArray()}toHSLA(){return Wn.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(t){const e=`${this.r},${this.g},${this.b},`;return t?`rgb(${e})`:`rgba(${e},${this.a})`}toGrey(){return Wn.makeGrey(Math.round((this.r+this.g+this.b)/3),this.a)}toArray(){return[this.r,this.g,this.b,this.a]}toString(){return this.toCSS()}}(function(n){function t(x){return new n(x)}n.fromArray=t;function e(x){return new n([...p(x),1])}n.fromHex=e;function s(x){const v=x.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(v){const S=v[1].split(/\s*,\s*/).map(E=>parseInt(E,10));return new n(S)}return null}n.fromRGBA=s;function r(x,v,S){S<0&&++S,S>1&&--S;const E=6*S;return E<1?x+(v-x)*E:2*S<1?v:3*S<2?x+(v-x)*(2/3-S)*6:x}function i(x){const v=x.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(v){const S=v[2].split(/\s*,\s*/),E=(parseFloat(S[0])%360+360)%360/360,C=parseFloat(S[1])/100,M=parseFloat(S[2])/100,T=S[3]==null?1:parseInt(S[3],10);return new n(u(E,C,M,T))}return null}n.fromHSLA=i;function o(x){if(x.startsWith("#"))return e(x);if(x.startsWith("rgb"))return s(x);const v=n.named[x];return v?e(v):i(x)}n.fromString=o;function a(x,v){return n.fromArray([x,x,x,v])}n.makeGrey=a;function l(x,v,S,E){const C=Array.isArray(x)?x[0]:x,M=Array.isArray(x)?x[1]:v,T=Array.isArray(x)?x[2]:S,k=Array.isArray(x)?x[3]:E,_=Math.max(C,M,T),D=Math.min(C,M,T),N=(_+D)/2;let j=0,A=0;if(D!==_){const P=_-D;switch(A=N>.5?P/(2-_-D):P/(_+D),_){case C:j=(M-T)/P+(M<T?6:0);break;case M:j=(T-C)/P+2;break;case T:j=(C-M)/P+4;break}j/=6}return[j,A,N,k??1]}n.rgba2hsla=l;function u(x,v,S,E){const C=Array.isArray(x)?x[0]:x,M=Array.isArray(x)?x[1]:v,T=Array.isArray(x)?x[2]:S,k=Array.isArray(x)?x[3]:E,_=T<=.5?T*(M+1):T+M-T*M,D=2*T-_;return[r(D,_,C+1/3)*256,r(D,_,C)*256,r(D,_,C-1/3)*256,k??1]}n.hsla2rgba=u;function h(x){return new n(Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),x?void 0:parseFloat(Math.random().toFixed(2)))}n.random=h;function f(){const x="0123456789ABCDEF";let v="#";for(let S=0;S<6;S+=1)v+=x[Math.floor(Math.random()*16)];return v}n.randomHex=f;function d(x){return h(x).toString()}n.randomRGBA=d;function g(x,v){if(typeof x=="string"){const T=x[0]==="#",[k,_,D]=p(x);return v?k*.299+_*.587+D*.114>186?"#000000":"#ffffff":`${T?"#":""}${m(255-k,255-_,255-D)}`}const S=x[0],E=x[1],C=x[2],M=x[3];return v?S*.299+E*.587+C*.114>186?[0,0,0,M]:[255,255,255,M]:[255-S,255-E,255-C,M]}n.invert=g;function p(x){const v=x.indexOf("#")===0?x:`#${x}`;let S=+`0x${v.substr(1)}`;if(!(v.length===4||v.length===7)||Number.isNaN(S))throw new Error("Invalid hex color.");const E=v.length===4?4:8,C=(1<<E)-1,M=["b","g","r"].map(()=>{const T=S&C;return S>>=E,E===4?17*T:T});return[M[2],M[1],M[0]]}function m(x,v,S){const E=C=>C.length<2?`0${C}`:C;return`${E(x.toString(16))}${E(v.toString(16))}${E(S.toString(16))}`}function y(x,v){return w(x,v)}n.lighten=y;function b(x,v){return w(x,-v)}n.darken=b;function w(x,v){if(typeof x=="string"){const C=x[0]==="#",M=parseInt(C?x.substr(1):x,16),T=we((M>>16)+v,0,255),k=we((M>>8&255)+v,0,255),_=we((M&255)+v,0,255);return`${C?"#":""}${(_|k<<8|T<<16).toString(16)}`}const S=m(x[0],x[1],x[2]),E=p(w(S,v));return[E[0],E[1],E[2],x[3]]}})(Wn||(Wn={})),function(n){n.named={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",burntsienna:"#ea7e5d",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",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",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"}}(Wn||(Wn={}));class Wu{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(t){return this.map.has(t)}get(t){return this.map.get(t)}set(t,e){this.map.set(t,e),this.arr.push(t)}delete(t){const e=this.arr.indexOf(t);e>=0&&this.arr.splice(e,1);const s=this.map.get(t);return this.map.delete(t),s}each(t){this.arr.forEach(e=>{const s=this.map.get(e);t(s,e)})}dispose(){this.clear()}}var ms;(function(n){function t(r){const i=[],o=[];return Array.isArray(r)?i.push(...r):r.split("|").forEach(a=>{a.indexOf("&")===-1?i.push(a):o.push(...a.split("&"))}),{or:i,and:o}}n.parse=t;function e(r,i){if(r!=null&&i!=null){const o=t(r),a=t(i),l=o.or.sort(),u=a.or.sort(),h=o.and.sort(),f=a.and.sort(),d=(g,p)=>g.length===p.length&&(g.length===0||g.every((m,y)=>m===p[y]));return d(l,u)&&d(h,f)}return r==null&&i==null}n.equals=e;function s(r,i,o){if(i==null||Array.isArray(i)&&i.length===0)return o?r.altKey!==!0&&r.ctrlKey!==!0&&r.metaKey!==!0&&r.shiftKey!==!0:!0;const{or:a,and:l}=t(i),u=h=>{const f=`${h.toLowerCase()}Key`;return r[f]===!0};return a.some(h=>u(h))&&l.every(h=>u(h))}n.isMatch=s})(ms||(ms={}));var Ks;(function(n){n.linear=t=>t,n.quad=t=>t*t,n.cubic=t=>t*t*t,n.inout=t=>{if(t<=0)return 0;if(t>=1)return 1;const e=t*t,s=e*t;return 4*(t<.5?s:3*(t-e)+s-.75)},n.exponential=t=>Math.pow(2,10*(t-1)),n.bounce=t=>{for(let e=0,s=1;;e+=s,s/=2)if(t>=(7-4*e)/11){const r=(11-6*e-11*t)/4;return-r*r+s*s}}})(Ks||(Ks={})),function(n){n.decorators={reverse(t){return e=>1-t(1-e)},reflect(t){return e=>.5*(e<.5?t(2*e):2-t(2-2*e))},clamp(t,e=0,s=1){return r=>{const i=t(r);return i<e?e:i>s?s:i}},back(t=1.70158){return e=>e*e*((t+1)*e-t)},elastic(t=1.5){return e=>Math.pow(2,10*(e-1))*Math.cos(20*Math.PI*t/3*e)}}}(Ks||(Ks={})),function(n){function t(A){return-1*Math.cos(A*(Math.PI/2))+1}n.easeInSine=t;function e(A){return Math.sin(A*(Math.PI/2))}n.easeOutSine=e;function s(A){return-.5*(Math.cos(Math.PI*A)-1)}n.easeInOutSine=s;function r(A){return A*A}n.easeInQuad=r;function i(A){return A*(2-A)}n.easeOutQuad=i;function o(A){return A<.5?2*A*A:-1+(4-2*A)*A}n.easeInOutQuad=o;function a(A){return A*A*A}n.easeInCubic=a;function l(A){const P=A-1;return P*P*P+1}n.easeOutCubic=l;function u(A){return A<.5?4*A*A*A:(A-1)*(2*A-2)*(2*A-2)+1}n.easeInOutCubic=u;function h(A){return A*A*A*A}n.easeInQuart=h;function f(A){const P=A-1;return 1-P*P*P*P}n.easeOutQuart=f;function d(A){const P=A-1;return A<.5?8*A*A*A*A:1-8*P*P*P*P}n.easeInOutQuart=d;function g(A){return A*A*A*A*A}n.easeInQuint=g;function p(A){const P=A-1;return 1+P*P*P*P*P}n.easeOutQuint=p;function m(A){const P=A-1;return A<.5?16*A*A*A*A*A:1+16*P*P*P*P*P}n.easeInOutQuint=m;function y(A){return A===0?0:Math.pow(2,10*(A-1))}n.easeInExpo=y;function b(A){return A===1?1:-Math.pow(2,-10*A)+1}n.easeOutExpo=b;function w(A){if(A===0||A===1)return A;const P=A*2,L=P-1;return P<1?.5*Math.pow(2,10*L):.5*(-Math.pow(2,-10*L)+2)}n.easeInOutExpo=w;function x(A){const P=A/1;return-1*(Math.sqrt(1-P*A)-1)}n.easeInCirc=x;function v(A){const P=A-1;return Math.sqrt(1-P*P)}n.easeOutCirc=v;function S(A){const P=A*2,L=P-2;return P<1?-.5*(Math.sqrt(1-P*P)-1):.5*(Math.sqrt(1-L*L)+1)}n.easeInOutCirc=S;function E(A,P=1.70158){return A*A*((P+1)*A-P)}n.easeInBack=E;function C(A,P=1.70158){const L=A/1-1;return L*L*((P+1)*L+P)+1}n.easeOutBack=C;function M(A,P=1.70158){const L=A*2,V=L-2,Y=P*1.525;return L<1?.5*L*L*((Y+1)*L-Y):.5*(V*V*((Y+1)*V+Y)+2)}n.easeInOutBack=M;function T(A,P=.7){if(A===0||A===1)return A;const V=A/1-1,Y=1-P,ot=Y/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*V)*Math.sin((V-ot)*(2*Math.PI)/Y))}n.easeInElastic=T;function k(A,P=.7){const L=1-P,V=A*2;if(A===0||A===1)return A;const Y=L/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*V)*Math.sin((V-Y)*(2*Math.PI)/L)+1}n.easeOutElastic=k;function _(A,P=.65){const L=1-P;if(A===0||A===1)return A;const V=A*2,Y=V-1,ot=L/(2*Math.PI)*Math.asin(1);return V<1?-.5*(Math.pow(2,10*Y)*Math.sin((Y-ot)*(2*Math.PI)/L)):Math.pow(2,-10*Y)*Math.sin((Y-ot)*(2*Math.PI)/L)*.5+1}n.easeInOutElastic=_;function D(A){const P=A/1;if(P<1/2.75)return 7.5625*P*P;if(P<2/2.75){const L=P-.5454545454545454;return 7.5625*L*L+.75}if(P<2.5/2.75){const L=P-.8181818181818182;return 7.5625*L*L+.9375}{const L=P-.9545454545454546;return 7.5625*L*L+.984375}}n.easeOutBounce=D;function N(A){return 1-D(1-A)}n.easeInBounce=N;function j(A){return A<.5?N(A*2)*.5:D(A*2-1)*.5+.5}n.easeInOutBounce=j}(Ks||(Ks={}));var Zs;(function(n){n.number=(t,e)=>{const s=e-t;return r=>t+s*r},n.object=(t,e)=>{const s=Object.keys(t);return r=>{const i={};for(let o=s.length-1;o!==-1;o-=1){const a=s[o];i[a]=t[a]+(e[a]-t[a])*r}return i}},n.unit=(t,e)=>{const s=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=s.exec(t),i=s.exec(e),o=i?i[1]:"",a=r?+r[1]:0,l=i?+i[1]:0,u=o.indexOf("."),h=u>0?o[1].length-u-1:0,f=l-a,d=r?r[2]:"";return g=>(a+f*g).toFixed(h)+d},n.color=(t,e)=>{const s=parseInt(t.slice(1),16),r=parseInt(e.slice(1),16),i=s&255,o=(r&255)-i,a=s&65280,l=(r&65280)-a,u=s&16711680,h=(r&16711680)-u;return f=>{const d=i+o*f&255,g=a+l*f&65280,p=u+h*f&16711680;return`#${(1<<24|d|g|p).toString(16).slice(1)}`}}})(Zs||(Zs={}));const so=[];function jr(n,t){const e=so.find(s=>s.name===n);if(!(e&&(e.loadTimes+=1,e.loadTimes>1))&&!fs.isApplyingHMR()){const s=document.createElement("style");s.setAttribute("type","text/css"),s.textContent=t;const r=document.querySelector("head");r&&r.insertBefore(s,r.firstChild),so.push({name:n,loadTimes:1,styleElement:s})}}function $r(n){const t=so.findIndex(e=>e.name===n);if(t>-1){const e=so[t];if(e.loadTimes-=1,e.loadTimes>0)return;let s=e.styleElement;s&&s.parentNode&&s.parentNode.removeChild(s),s=null,so.splice(t,1)}}var gt;(function(n){function t(s){return 180*s/Math.PI%360}n.toDeg=t,n.toRad=function(s,r=!1){return(r?s:s%360)*Math.PI/180};function e(s){return s%360+(s<0?360:0)}n.normalize=e})(gt||(gt={}));var wt;(function(n){function t(a,l=0){return Number.isInteger(a)?a:+a.toFixed(l)}n.round=t;function e(a,l){let u,h;if(l==null?(h=a??1,u=0):(h=l,u=a??0),h<u){const f=u;u=h,h=f}return Math.floor(Math.random()*(h-u+1)+u)}n.random=e;function s(a,l,u){return Number.isNaN(a)?NaN:Number.isNaN(l)||Number.isNaN(u)?0:l<u?a<l?l:a>u?u:a:a<u?u:a>l?l:a}n.clamp=s;function r(a,l){return l*Math.round(a/l)}n.snapToGrid=r;function i(a,l){return l!=null&&a!=null&&l.x>=a.x&&l.x<=a.x+a.width&&l.y>=a.y&&l.y<=a.y+a.height}n.containsPoint=i;function o(a,l){const u=a.x-l.x,h=a.y-l.y;return u*u+h*h}n.squaredLength=o})(wt||(wt={}));class ys{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class O extends ys{constructor(t,e){super(),this.x=t??0,this.y=e??0}round(t=0){return this.x=wt.round(this.x,t),this.y=wt.round(this.y,t),this}add(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}update(t,e){const s=O.create(t,e);return this.x=s.x,this.y=s.y,this}translate(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}rotate(t,e){const s=O.rotate(this,t,e);return this.x=s.x,this.y=s.y,this}scale(t,e,s=new O){const r=O.create(s);return this.x=r.x+t*(this.x-r.x),this.y=r.y+e*(this.y-r.y),this}closest(t){if(t.length===1)return O.create(t[0]);let e=null,s=1/0;return t.forEach(r=>{const i=this.squaredDistance(r);i<s&&(e=r,s=i)}),e?O.create(e):null}distance(t){return Math.sqrt(this.squaredDistance(t))}squaredDistance(t){const e=O.create(t),s=this.x-e.x,r=this.y-e.y;return s*s+r*r}manhattanDistance(t){const e=O.create(t);return Math.abs(e.x-this.x)+Math.abs(e.y-this.y)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)||.01}theta(t=new O){const e=O.create(t),s=-(e.y-this.y),r=e.x-this.x;let i=Math.atan2(s,r);return i<0&&(i=2*Math.PI+i),180*i/Math.PI}angleBetween(t,e){if(this.equals(t)||this.equals(e))return NaN;let s=this.theta(e)-this.theta(t);return s<0&&(s+=360),s}vectorAngle(t){return new O(0,0).angleBetween(this,t)}toPolar(t){return this.update(O.toPolar(this,t)),this}changeInAngle(t,e,s=new O){return this.clone().translate(-t,-e).theta(s)-this.theta(s)}adhereToRect(t){return wt.containsPoint(t,this)||(this.x=Math.min(Math.max(this.x,t.x),t.x+t.width),this.y=Math.min(Math.max(this.y,t.y),t.y+t.height)),this}bearing(t){const e=O.create(t),s=gt.toRad(this.y),r=gt.toRad(e.y),i=this.x,o=e.x,a=gt.toRad(o-i),l=Math.sin(a)*Math.cos(r),u=Math.cos(s)*Math.sin(r)-Math.sin(s)*Math.cos(r)*Math.cos(a),h=gt.toDeg(Math.atan2(l,u)),f=["NE","E","SE","S","SW","W","NW","N"];let d=h-22.5;return d<0&&(d+=360),d=parseInt(d/45,10),f[d]}cross(t,e){if(t!=null&&e!=null){const s=O.create(t),r=O.create(e);return(r.x-this.x)*(s.y-this.y)-(r.y-this.y)*(s.x-this.x)}return NaN}dot(t){const e=O.create(t);return this.x*e.x+this.y*e.y}diff(t,e){if(typeof t=="number")return new O(this.x-t,this.y-e);const s=O.create(t);return new O(this.x-s.x,this.y-s.y)}lerp(t,e){const s=O.create(t);return new O((1-e)*this.x+e*s.x,(1-e)*this.y+e*s.y)}normalize(t=1){const e=t/this.magnitude();return this.scale(e,e)}move(t,e){const s=O.create(t),r=gt.toRad(s.theta(this));return this.translate(Math.cos(r)*e,-Math.sin(r)*e)}reflection(t){return O.create(t).move(this,this.distance(t))}snapToGrid(t,e){return this.x=wt.snapToGrid(this.x,t),this.y=wt.snapToGrid(this.y,e??t),this}equals(t){const e=O.create(t);return e!=null&&e.x===this.x&&e.y===this.y}clone(){return O.clone(this)}toJSON(){return O.toJSON(this)}serialize(){return`${this.x} ${this.y}`}}(function(n){function t(e){return e!=null&&e instanceof n}n.isPoint=t})(O||(O={})),function(n){function t(s){return s!=null&&typeof s=="object"&&typeof s.x=="number"&&typeof s.y=="number"}n.isPointLike=t;function e(s){return s!=null&&Array.isArray(s)&&s.length===2&&typeof s[0]=="number"&&typeof s[1]=="number"}n.isPointData=e}(O||(O={})),function(n){function t(f,d){return f==null||typeof f=="number"?new n(f,d):e(f)}n.create=t;function e(f){return n.isPoint(f)?new n(f.x,f.y):Array.isArray(f)?new n(f[0],f[1]):new n(f.x,f.y)}n.clone=e;function s(f){return n.isPoint(f)?{x:f.x,y:f.y}:Array.isArray(f)?{x:f[0],y:f[1]}:{x:f.x,y:f.y}}n.toJSON=s;function r(f,d,g=new n){let p=Math.abs(f*Math.cos(d)),m=Math.abs(f*Math.sin(d));const y=e(g),b=gt.normalize(gt.toDeg(d));return b<90?m=-m:b<180?(p=-p,m=-m):b<270&&(p=-p),new n(y.x+p,y.y+m)}n.fromPolar=r;function i(f,d=new n){const g=e(f),p=e(d),m=g.x-p.x,y=g.y-p.y;return new n(Math.sqrt(m*m+y*y),gt.toRad(p.theta(g)))}n.toPolar=i;function o(f,d){return f===d?!0:f!=null&&d!=null?f.x===d.x&&f.y===d.y:!1}n.equals=o;function a(f,d){if(f==null&&d!=null||f!=null&&d==null||f!=null&&d!=null&&f.length!==d.length)return!1;if(f!=null&&d!=null){for(let g=0,p=f.length;g<p;g+=1)if(!o(f[g],d[g]))return!1}return!0}n.equalPoints=a;function l(f,d,g,p){return new n(wt.random(f,d),wt.random(g,p))}n.random=l;function u(f,d,g){const p=gt.toRad(gt.normalize(-d)),m=Math.sin(p),y=Math.cos(p);return h(f,y,m,g)}n.rotate=u;function h(f,d,g,p=new n){const m=e(f),y=e(p),b=m.x-y.x,w=m.y-y.y,x=b*d-w*g,v=w*d+b*g;return new n(x+y.x,v+y.y)}n.rotateEx=h}(O||(O={}));class z extends ys{get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get origin(){return new O(this.x,this.y)}get topLeft(){return new O(this.x,this.y)}get topCenter(){return new O(this.x+this.width/2,this.y)}get topRight(){return new O(this.x+this.width,this.y)}get center(){return new O(this.x+this.width/2,this.y+this.height/2)}get bottomLeft(){return new O(this.x,this.y+this.height)}get bottomCenter(){return new O(this.x+this.width/2,this.y+this.height)}get bottomRight(){return new O(this.x+this.width,this.y+this.height)}get corner(){return new O(this.x+this.width,this.y+this.height)}get rightMiddle(){return new O(this.x+this.width,this.y+this.height/2)}get leftMiddle(){return new O(this.x,this.y+this.height/2)}get topLine(){return new W(this.topLeft,this.topRight)}get rightLine(){return new W(this.topRight,this.bottomRight)}get bottomLine(){return new W(this.bottomLeft,this.bottomRight)}get leftLine(){return new W(this.topLeft,this.bottomLeft)}constructor(t,e,s,r){super(),this.x=t??0,this.y=e??0,this.width=s??0,this.height=r??0}getOrigin(){return this.origin}getTopLeft(){return this.topLeft}getTopCenter(){return this.topCenter}getTopRight(){return this.topRight}getCenter(){return this.center}getCenterX(){return this.x+this.width/2}getCenterY(){return this.y+this.height/2}getBottomLeft(){return this.bottomLeft}getBottomCenter(){return this.bottomCenter}getBottomRight(){return this.bottomRight}getCorner(){return this.corner}getRightMiddle(){return this.rightMiddle}getLeftMiddle(){return this.leftMiddle}getTopLine(){return this.topLine}getRightLine(){return this.rightLine}getBottomLine(){return this.bottomLine}getLeftLine(){return this.leftLine}bbox(t){if(!t)return this.clone();const e=gt.toRad(t),s=Math.abs(Math.sin(e)),r=Math.abs(Math.cos(e)),i=this.width*r+this.height*s,o=this.width*s+this.height*r;return new z(this.x+(this.width-i)/2,this.y+(this.height-o)/2,i,o)}round(t=0){return this.x=wt.round(this.x,t),this.y=wt.round(this.y,t),this.width=wt.round(this.width,t),this.height=wt.round(this.height,t),this}add(t,e,s,r){const i=z.create(t,e,s,r),o=Math.min(this.x,i.x),a=Math.min(this.y,i.y),l=Math.max(this.x+this.width,i.x+i.width),u=Math.max(this.y+this.height,i.y+i.height);return this.x=o,this.y=a,this.width=l-o,this.height=u-a,this}update(t,e,s,r){const i=z.create(t,e,s,r);return this.x=i.x,this.y=i.y,this.width=i.width,this.height=i.height,this}inflate(t,e){const s=t,r=e??t;return this.x-=s,this.y-=r,this.width+=2*s,this.height+=2*r,this}snapToGrid(t,e){const s=this.origin.snapToGrid(t,e),r=this.corner.snapToGrid(t,e);return this.x=s.x,this.y=s.y,this.width=r.x-s.x,this.height=r.y-s.y,this}translate(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}scale(t,e,s=new O){const r=this.origin.scale(t,e,s);return this.x=r.x,this.y=r.y,this.width*=t,this.height*=e,this}rotate(t,e=this.getCenter()){if(t!==0){const s=gt.toRad(t),r=Math.cos(s),i=Math.sin(s);let o=this.getOrigin(),a=this.getTopRight(),l=this.getBottomRight(),u=this.getBottomLeft();o=O.rotateEx(o,r,i,e),a=O.rotateEx(a,r,i,e),l=O.rotateEx(l,r,i,e),u=O.rotateEx(u,r,i,e);const h=new z(o.x,o.y,0,0);h.add(a.x,a.y,0,0),h.add(l.x,l.y,0,0),h.add(u.x,u.y,0,0),this.update(h)}return this}rotate90(){const t=(this.width-this.height)/2;this.x+=t,this.y-=t;const e=this.width;return this.width=this.height,this.height=e,this}moveAndExpand(t){const e=z.clone(t);return this.x+=e.x||0,this.y+=e.y||0,this.width+=e.width||0,this.height+=e.height||0,this}getMaxScaleToFit(t,e=this.center){const s=z.clone(t),r=e.x,i=e.y;let o=1/0,a=1/0,l=1/0,u=1/0,h=1/0,f=1/0,d=1/0,g=1/0;const p=s.topLeft;p.x<r&&(o=(this.x-r)/(p.x-r)),p.y<i&&(h=(this.y-i)/(p.y-i));const m=s.bottomRight;m.x>r&&(a=(this.x+this.width-r)/(m.x-r)),m.y>i&&(f=(this.y+this.height-i)/(m.y-i));const y=s.topRight;y.x>r&&(l=(this.x+this.width-r)/(y.x-r)),y.y<i&&(d=(this.y-i)/(y.y-i));const b=s.bottomLeft;return b.x<r&&(u=(this.x-r)/(b.x-r)),b.y>i&&(g=(this.y+this.height-i)/(b.y-i)),{sx:Math.min(o,a,l,u),sy:Math.min(h,f,d,g)}}getMaxUniformScaleToFit(t,e=this.center){const s=this.getMaxScaleToFit(t,e);return Math.min(s.sx,s.sy)}containsPoint(t,e){return wt.containsPoint(this,O.create(t,e))}containsRect(t,e,s,r){const i=z.create(t,e,s,r),o=this.x,a=this.y,l=this.width,u=this.height,h=i.x,f=i.y,d=i.width,g=i.height;return l===0||u===0||d===0||g===0?!1:h>=o&&f>=a&&h+d<=o+l&&f+g<=a+u}intersectsWithLine(t){const e=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],s=[],r=[];return e.forEach(i=>{const o=t.intersectsWithLine(i);o!==null&&r.indexOf(o.toString())<0&&(s.push(o),r.push(o.toString()))}),s.length>0?s:null}intersectsWithLineFromCenterToPoint(t,e){const s=O.clone(t),r=this.center;let i=null;e!=null&&e!==0&&s.rotate(e,r);const o=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],a=new W(r,s);for(let l=o.length-1;l>=0;l-=1){const u=o[l].intersectsWithLine(a);if(u!==null){i=u;break}}return i&&e!=null&&e!==0&&i.rotate(-e,r),i}intersectsWithRect(t,e,s,r){const i=z.create(t,e,s,r);if(!this.isIntersectWithRect(i))return null;const o=this.origin,a=this.corner,l=i.origin,u=i.corner,h=Math.max(o.x,l.x),f=Math.max(o.y,l.y);return new z(h,f,Math.min(a.x,u.x)-h,Math.min(a.y,u.y)-f)}isIntersectWithRect(t,e,s,r){const i=z.create(t,e,s,r),o=this.origin,a=this.corner,l=i.origin,u=i.corner;return!(u.x<=o.x||u.y<=o.y||l.x>=a.x||l.y>=a.y)}normalize(){let t=this.x,e=this.y,s=this.width,r=this.height;return this.width<0&&(t=this.x+this.width,s=-this.width),this.height<0&&(e=this.y+this.height,r=-this.height),this.x=t,this.y=e,this.width=s,this.height=r,this}union(t){const e=z.clone(t),s=this.origin,r=this.corner,i=e.origin,o=e.corner,a=Math.min(s.x,i.x),l=Math.min(s.y,i.y),u=Math.max(r.x,o.x),h=Math.max(r.y,o.y);return new z(a,l,u-a,h-l)}getNearestSideToPoint(t){const e=O.clone(t),s=e.x-this.x,r=this.x+this.width-e.x,i=e.y-this.y,o=this.y+this.height-e.y;let a=s,l="left";return r<a&&(a=r,l="right"),i<a&&(a=i,l="top"),o<a&&(l="bottom"),l}getNearestPointToPoint(t){const e=O.clone(t);if(this.containsPoint(e)){const s=this.getNearestSideToPoint(e);if(s==="left")return new O(this.x,e.y);if(s==="top")return new O(e.x,this.y);if(s==="right")return new O(this.x+this.width,e.y);if(s==="bottom")return new O(e.x,this.y+this.height)}return e.adhereToRect(this)}equals(t){return t!=null&&t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height}clone(){return new z(this.x,this.y,this.width,this.height)}toJSON(){return{x:this.x,y:this.y,width:this.width,height:this.height}}serialize(){return`${this.x} ${this.y} ${this.width} ${this.height}`}}(function(n){function t(e){return e!=null&&e instanceof n}n.isRectangle=t})(z||(z={})),function(n){function t(e){return e!=null&&typeof e=="object"&&typeof e.x=="number"&&typeof e.y=="number"&&typeof e.width=="number"&&typeof e.height=="number"}n.isRectangleLike=t}(z||(z={})),function(n){function t(o,a,l,u){return o==null||typeof o=="number"?new n(o,a,l,u):e(o)}n.create=t;function e(o){return n.isRectangle(o)?o.clone():Array.isArray(o)?new n(o[0],o[1],o[2],o[3]):new n(o.x,o.y,o.width,o.height)}n.clone=e;function s(o){return new n(o.x-o.a,o.y-o.b,2*o.a,2*o.b)}n.fromEllipse=s;function r(o){return new n(0,0,o.width,o.height)}n.fromSize=r;function i(o,a){return new n(o.x,o.y,a.width,a.height)}n.fromPositionAndSize=i}(z||(z={}));class W extends ys{get center(){return new O((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}constructor(t,e,s,r){super(),typeof t=="number"&&typeof e=="number"?(this.start=new O(t,e),this.end=new O(s,r)):(this.start=O.create(t),this.end=O.create(e))}getCenter(){return this.center}round(t=0){return this.start.round(t),this.end.round(t),this}translate(t,e){return typeof t=="number"?(this.start.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.end.translate(t)),this}rotate(t,e){return this.start.rotate(t,e),this.end.rotate(t,e),this}scale(t,e,s){return this.start.scale(t,e,s),this.end.scale(t,e,s),this}length(){return Math.sqrt(this.squaredLength())}squaredLength(){const t=this.start.x-this.end.x,e=this.start.y-this.end.y;return t*t+e*e}setLength(t){const e=this.length();if(!e)return this;const s=t/e;return this.scale(s,s,this.start)}parallel(t){const e=this.clone();if(!e.isDifferentiable())return e;const{start:s,end:r}=e,i=s.clone().rotate(270,r),o=r.clone().rotate(90,s);return s.move(o,t),r.move(i,t),e}vector(){return new O(this.end.x-this.start.x,this.end.y-this.start.y)}angle(){const t=new O(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,t)}bbox(){const t=Math.min(this.start.x,this.end.x),e=Math.min(this.start.y,this.end.y),s=Math.max(this.start.x,this.end.x),r=Math.max(this.start.y,this.end.y);return new z(t,e,s-t,r-e)}bearing(){return this.start.bearing(this.end)}closestPoint(t){return this.pointAt(this.closestPointNormalizedLength(t))}closestPointLength(t){return this.closestPointNormalizedLength(t)*this.length()}closestPointTangent(t){return this.tangentAt(this.closestPointNormalizedLength(t))}closestPointNormalizedLength(t){const e=this.vector().dot(new W(this.start,t).vector()),s=Math.min(1,Math.max(0,e/this.squaredLength()));return Number.isNaN(s)?0:s}pointAt(t){const e=this.start,s=this.end;return t<=0?e.clone():t>=1?s.clone():e.lerp(s,t)}pointAtLength(t){const e=this.start,s=this.end;let r=!0;t<0&&(r=!1,t=-t);const i=this.length();if(t>=i)return r?s.clone():e.clone();const o=(r?t:i-t)/i;return this.pointAt(o)}divideAt(t){const e=this.pointAt(t);return[new W(this.start,e),new W(e,this.end)]}divideAtLength(t){const e=this.pointAtLength(t);return[new W(this.start,e),new W(e,this.end)]}containsPoint(t){const e=this.start,s=this.end;if(e.cross(t,s)!==0)return!1;const r=this.length();return!(new W(e,t).length()>r||new W(t,s).length()>r)}intersect(t,e){const s=t.intersectsWithLine(this,e);return s?Array.isArray(s)?s:[s]:null}intersectsWithLine(t){const e=new O(this.end.x-this.start.x,this.end.y-this.start.y),s=new O(t.end.x-t.start.x,t.end.y-t.start.y),r=e.x*s.y-e.y*s.x,i=new O(t.start.x-this.start.x,t.start.y-this.start.y),o=i.x*s.y-i.y*s.x,a=i.x*e.y-i.y*e.x;if(r===0||o*r<0||a*r<0)return null;if(r>0){if(o>r||a>r)return null}else if(o<r||a<r)return null;return new O(this.start.x+o*e.x/r,this.start.y+o*e.y/r)}isDifferentiable(){return!this.start.equals(this.end)}pointOffset(t){const e=O.clone(t),s=this.start,r=this.end;return((r.x-s.x)*(e.y-s.y)-(r.y-s.y)*(e.x-s.x))/this.length()}pointSquaredDistance(t,e){const s=O.create(t,e);return this.closestPoint(s).squaredDistance(s)}pointDistance(t,e){const s=O.create(t,e);return this.closestPoint(s).distance(s)}tangentAt(t){if(!this.isDifferentiable())return null;const e=this.start,s=this.end,r=this.pointAt(t),i=new W(e,s);return i.translate(r.x-e.x,r.y-e.y),i}tangentAtLength(t){if(!this.isDifferentiable())return null;const e=this.start,s=this.end,r=this.pointAtLength(t),i=new W(e,s);return i.translate(r.x-e.x,r.y-e.y),i}relativeCcw(t,e){const s=O.create(t,e);let r=s.x-this.start.x,i=s.y-this.start.y;const o=this.end.x-this.start.x,a=this.end.y-this.start.y;let l=r*a-i*o;return l===0&&(l=r*o+i*a,l>0&&(r-=o,i-=a,l=r*o+i*a,l<0&&(l=0))),l<0?-1:l>0?1:0}equals(t){return t!=null&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.end.x===t.end.x&&this.end.y===t.end.y}clone(){return new W(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}(function(n){function t(e){return e!=null&&e instanceof n}n.isLine=t})(W||(W={}));class un extends ys{get center(){return new O(this.x,this.y)}constructor(t,e,s,r){super(),this.x=t??0,this.y=e??0,this.a=s??0,this.b=r??0}bbox(){return z.fromEllipse(this)}getCenter(){return this.center}inflate(t,e){const s=t,r=e??t;return this.a+=2*s,this.b+=2*r,this}normalizedDistance(t,e){const s=O.create(t,e),r=s.x-this.x,i=s.y-this.y,o=this.a,a=this.b;return r*r/(o*o)+i*i/(a*a)}containsPoint(t,e){return this.normalizedDistance(t,e)<=1}intersectsWithLine(t){const e=[],s=this.a,r=this.b,i=t.start,o=t.end,a=t.vector(),l=i.diff(new O(this.x,this.y)),u=new O(a.x/(s*s),a.y/(r*r)),h=new O(l.x/(s*s),l.y/(r*r)),f=a.dot(u),d=a.dot(h),g=l.dot(h)-1,p=d*d-f*g;if(p<0)return null;if(p>0){const m=Math.sqrt(p),y=(-d-m)/f,b=(-d+m)/f;if((y<0||y>1)&&(b<0||b>1))return null;y>=0&&y<=1&&e.push(i.lerp(o,y)),b>=0&&b<=1&&e.push(i.lerp(o,b))}else{const m=-d/f;if(m>=0&&m<=1)e.push(i.lerp(o,m));else return null}return e}intersectsWithLineFromCenterToPoint(t,e=0){const s=O.clone(t);e&&s.rotate(e,this.getCenter());const r=s.x-this.x,i=s.y-this.y;let o;if(r===0)return o=this.bbox().getNearestPointToPoint(s),e?o.rotate(-e,this.getCenter()):o;const a=i/r,l=a*a,u=this.a*this.a,h=this.b*this.b;let f=Math.sqrt(1/(1/u+l/h));f=r<0?-f:f;const d=a*f;return o=new O(this.x+f,this.y+d),e?o.rotate(-e,this.getCenter()):o}tangentTheta(t){const e=O.clone(t),s=e.x,r=e.y,i=this.a,o=this.b,a=this.bbox().center,l=a.x,u=a.y,h=30,f=s>a.x+i/2,d=s<a.x-i/2;let g,p;return f||d?(p=s>a.x?r-h:r+h,g=i*i/(s-l)-i*i*(r-u)*(p-u)/(o*o*(s-l))+l):(g=r>a.y?s+h:s-h,p=o*o/(r-u)-o*o*(s-l)*(g-l)/(i*i*(r-u))+u),new O(g,p).theta(e)}scale(t,e){return this.a*=t,this.b*=e,this}rotate(t,e){const s=z.fromEllipse(this);s.rotate(t,e);const r=un.fromRect(s);return this.a=r.a,this.b=r.b,this.x=r.x,this.y=r.y,this}translate(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}equals(t){return t!=null&&t.x===this.x&&t.y===this.y&&t.a===this.a&&t.b===this.b}clone(){return new un(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}}(function(n){function t(e){return e!=null&&e instanceof n}n.isEllipse=t})(un||(un={})),function(n){function t(r,i,o,a){return r==null||typeof r=="number"?new n(r,i,o,a):e(r)}n.create=t;function e(r){return n.isEllipse(r)?r.clone():Array.isArray(r)?new n(r[0],r[1],r[2],r[3]):new n(r.x,r.y,r.a,r.b)}n.parse=e;function s(r){const i=r.center;return new n(i.x,i.y,r.width/2,r.height/2)}n.fromRect=s}(un||(un={}));const ZR=new RegExp("^[\\s\\dLMCZz,.]*$");function QR(n){return typeof n!="string"?!1:ZR.test(n)}function qu(n,t){return(n%t+t)%t}function tI(n,t,e,s,r){const i=[],o=n[n.length-1],a=t!=null&&t>0,l=t||0;if(s&&a){n=n.slice();const f=n[0],d=new O(o.x+(f.x-o.x)/2,o.y+(f.y-o.y)/2);n.splice(0,0,d)}let u=n[0],h=1;for(e?i.push("M",u.x,u.y):i.push("L",u.x,u.y);h<(s?n.length:n.length-1);){let f=n[qu(h,n.length)],d=u.x-f.x,g=u.y-f.y;if(a&&(d!==0||g!==0)&&(r==null||r.indexOf(h-1)<0)){let p=Math.sqrt(d*d+g*g);const m=d*Math.min(l,p/2)/p,y=g*Math.min(l,p/2)/p,b=f.x+m,w=f.y+y;i.push("L",b,w);let x=n[qu(h+1,n.length)];for(;h<n.length-2&&Math.round(x.x-f.x)===0&&Math.round(x.y-f.y)===0;)x=n[qu(h+2,n.length)],h+=1;d=x.x-f.x,g=x.y-f.y,p=Math.max(1,Math.sqrt(d*d+g*g));const v=d*Math.min(l,p/2)/p,S=g*Math.min(l,p/2)/p,E=f.x+v,C=f.y+S;i.push("Q",f.x,f.y,E,C),f=new O(E,C)}else i.push("L",f.x,f.y);u=f,h+=1}return s?i.push("Z"):i.push("L",o.x,o.y),i.map(f=>typeof f=="string"?f:+f.toFixed(3)).join(" ")}function My(n,t={}){const e=[];return n&&n.length&&n.forEach(s=>{Array.isArray(s)?e.push({x:s[0],y:s[1]}):e.push({x:s.x,y:s.y})}),tI(e,t.round,t.initialMove==null||t.initialMove,t.close,t.exclude)}function Xa(n,t,e,s,r=0,i=0,o=0,a,l){if(e===0||s===0)return[];a-=n,l-=t,e=Math.abs(e),s=Math.abs(s);const u=-a/2,h=-l/2,f=Math.cos(r*Math.PI/180),d=Math.sin(r*Math.PI/180),g=f*u+d*h,p=-1*d*u+f*h,m=g*g,y=p*p,b=e*e,w=s*s,x=m/b+y/w;let v;if(x>1)e=Math.sqrt(x)*e,s=Math.sqrt(x)*s,v=0;else{let et=1;i===o&&(et=-1),v=et*Math.sqrt((b*w-b*y-w*m)/(b*y+w*m))}const S=v*e*p/s,E=-1*v*s*g/e,C=f*S-d*E+a/2,M=d*S+f*E+l/2;let T=Math.atan2((p-E)/s,(g-S)/e)-Math.atan2(0,1),k=T>=0?T:2*Math.PI+T;T=Math.atan2((-p-E)/s,(-g-S)/e)-Math.atan2((p-E)/s,(g-S)/e);let _=T>=0?T:2*Math.PI+T;o===0&&_>0?_-=2*Math.PI:o!==0&&_<0&&(_+=2*Math.PI);const D=_*2/Math.PI,N=Math.ceil(D<0?-1*D:D),j=_/N,A=8/3*Math.sin(j/4)*Math.sin(j/4)/Math.sin(j/2),P=f*e,L=f*s,V=d*e,Y=d*s;let ot=Math.cos(k),F=Math.sin(k),H=-A*(P*F+Y*ot),B=-A*(V*F-L*ot),K=0,nt=0;const rt=[];for(let et=0;et<N;et+=1){k+=j,ot=Math.cos(k),F=Math.sin(k),K=P*ot-Y*F+C,nt=V*ot+L*F+M;const ft=-A*(P*F+Y*ot),ge=-A*(V*F-L*ot),St=et*6;rt[St]=Number(H+n),rt[St+1]=Number(B+t),rt[St+2]=Number(K-ft+n),rt[St+3]=Number(nt-ge+t),rt[St+4]=Number(K+n),rt[St+5]=Number(nt+t),H=K+ft,B=nt+ge}return rt.map(et=>+et.toFixed(2))}function eI(n,t,e,s,r=0,i=0,o=0,a,l){const u=[],h=Xa(n,t,e,s,r,i,o,a,l);if(h!=null)for(let f=0,d=h.length;f<d;f+=6)u.push("C",h[f],h[f+1],h[f+2],h[f+3],h[f+4],h[f+5]);return u.join(" ")}class zt extends ys{get start(){return this.points[0]||null}get end(){return this.points[this.points.length-1]||null}constructor(t){if(super(),t!=null){if(typeof t=="string")return zt.parse(t);this.points=t.map(e=>O.create(e))}else this.points=[]}scale(t,e,s=new O){return this.points.forEach(r=>r.scale(t,e,s)),this}rotate(t,e){return this.points.forEach(s=>s.rotate(t,e)),this}translate(t,e){const s=O.create(t,e);return this.points.forEach(r=>r.translate(s.x,s.y)),this}round(t=0){return this.points.forEach(e=>e.round(t)),this}bbox(){if(this.points.length===0)return new z;let t=1/0,e=-1/0,s=1/0,r=-1/0;const i=this.points;for(let o=0,a=i.length;o<a;o+=1){const l=i[o],u=l.x,h=l.y;u<t&&(t=u),u>e&&(e=u),h<s&&(s=h),h>r&&(r=h)}return new z(t,s,e-t,r-s)}closestPoint(t){const e=this.closestPointLength(t);return this.pointAtLength(e)}closestPointLength(t){const e=this.points,s=e.length;if(s===0||s===1)return 0;let r=0,i=0,o=1/0;for(let a=0,l=s-1;a<l;a+=1){const u=new W(e[a],e[a+1]),h=u.length(),f=u.closestPointNormalizedLength(t),g=u.pointAt(f).squaredDistance(t);g<o&&(o=g,i=r+f*h),r+=h}return i}closestPointNormalizedLength(t){const e=this.length();return e===0?0:this.closestPointLength(t)/e}closestPointTangent(t){const e=this.closestPointLength(t);return this.tangentAtLength(e)}containsPoint(t){if(this.points.length===0)return!1;const e=O.clone(t),s=e.x,r=e.y,i=this.points,o=i.length;let a=o-1,l=0;for(let u=0;u<o;u+=1){const h=i[a],f=i[u];if(e.equals(h))return!0;const d=new W(h,f);if(d.containsPoint(t))return!0;if(r<=h.y&&r>f.y||r>h.y&&r<=f.y){const g=h.x-s>f.x-s?h.x-s:f.x-s;if(g>=0){const p=new O(s+g,r),m=new W(t,p);d.intersectsWithLine(m)&&(l+=1)}}a=u}return l%2===1}intersectsWithLine(t){const e=[];for(let s=0,r=this.points.length-1;s<r;s+=1){const i=this.points[s],o=this.points[s+1],a=t.intersectsWithLine(new W(i,o));a&&e.push(a)}return e.length>0?e:null}isDifferentiable(){for(let t=0,e=this.points.length-1;t<e;t+=1){const s=this.points[t],r=this.points[t+1];if(new W(s,r).isDifferentiable())return!0}return!1}length(){let t=0;for(let e=0,s=this.points.length-1;e<s;e+=1){const r=this.points[e],i=this.points[e+1];t+=r.distance(i)}return t}pointAt(t){const e=this.points,s=e.length;if(s===0)return null;if(s===1||t<=0)return e[0].clone();if(t>=1)return e[s-1].clone();const i=this.length()*t;return this.pointAtLength(i)}pointAtLength(t){const e=this.points,s=e.length;if(s===0)return null;if(s===1)return e[0].clone();let r=!0;t<0&&(r=!1,t=-t);let i=0;for(let a=0,l=s-1;a<l;a+=1){const u=r?a:l-1-a,h=e[u],f=e[u+1],d=new W(h,f),g=h.distance(f);if(t<=i+g)return d.pointAtLength((r?1:-1)*(t-i));i+=g}return(r?e[s-1]:e[0]).clone()}tangentAt(t){const s=this.points.length;if(s===0||s===1)return null;t<0&&(t=0),t>1&&(t=1);const i=this.length()*t;return this.tangentAtLength(i)}tangentAtLength(t){const e=this.points,s=e.length;if(s===0||s===1)return null;let r=!0;t<0&&(r=!1,t=-t);let i,o=0;for(let a=0,l=s-1;a<l;a+=1){const u=r?a:l-1-a,h=e[u],f=e[u+1],d=new W(h,f),g=h.distance(f);if(d.isDifferentiable()){if(t<=o+g)return d.tangentAtLength((r?1:-1)*(t-o));i=d}o+=g}if(i){const a=r?1:0;return i.tangentAt(a)}return null}simplify(t={}){const e=this.points;if(e.length<3)return this;const s=t.threshold||0;let r=0;for(;e[r+2];){const i=r,o=r+1,a=r+2,l=e[i],u=e[o],h=e[a];new W(l,h).closestPoint(u).distance(u)<=s?e.splice(o,1):r+=1}return this}toHull(){const t=this.points,e=t.length;if(e===0)return new zt;let s=t[0];for(let d=1;d<e;d+=1)(t[d].y<s.y||t[d].y===s.y&&t[d].x>s.x)&&(s=t[d]);const r=[];for(let d=0;d<e;d+=1){let g=s.theta(t[d]);g===0&&(g=360),r.push([t[d],d,g])}if(r.sort((d,g)=>{let p=d[2]-g[2];return p===0&&(p=g[1]-d[1]),p}),r.length>2){const d=r[r.length-1];r.unshift(d)}const i={},o=[],a=d=>`${d[0].toString()}@${d[1]}`;for(;r.length!==0;){const d=r.pop(),g=d[0];if(i[a(d)])continue;let p=!1;for(;!p;)if(o.length<2)o.push(d),p=!0;else{const m=o.pop(),y=m[0],b=o.pop(),w=b[0],x=w.cross(y,g);if(x<0)o.push(b),o.push(m),o.push(d),p=!0;else if(x===0){const S=y.angleBetween(w,g);Math.abs(S-180)<1e-10||y.equals(g)||w.equals(y)?(i[a(m)]=y,o.push(b)):Math.abs((S+1)%360-1)<1e-10&&(o.push(b),r.push(m))}else i[a(m)]=y,o.push(b)}}o.length>2&&o.pop();let l,u=-1;for(let d=0,g=o.length;d<g;d+=1){const p=o[d][1];(l===void 0||p<l)&&(l=p,u=d)}let h=[];if(u>0){const d=o.slice(u),g=o.slice(0,u);h=d.concat(g)}else h=o;const f=[];for(let d=0,g=h.length;d<g;d+=1)f.push(h[d][0]);return new zt(f)}equals(t){return t==null||t.points.length!==this.points.length?!1:t.points.every((e,s)=>e.equals(this.points[s]))}clone(){return new zt(this.points.map(t=>t.clone()))}toJSON(){return this.points.map(t=>t.toJSON())}serialize(){return this.points.map(t=>`${t.serialize()}`).join(" ")}}(function(n){function t(e){return e!=null&&e instanceof n}n.isPolyline=t})(zt||(zt={})),function(n){function t(e){const s=e.trim();if(s==="")return new n;const r=[],i=s.split(/\s*,\s*|\s+/);for(let o=0,a=i.length;o<a;o+=2)r.push({x:+i[o],y:+i[o+1]});return new n(r)}n.parse=t}(zt||(zt={}));class Vt extends ys{constructor(t,e,s,r){super(),this.PRECISION=3,this.start=O.create(t),this.controlPoint1=O.create(e),this.controlPoint2=O.create(s),this.end=O.create(r)}bbox(){const t=this.start,e=this.controlPoint1,s=this.controlPoint2,r=this.end,i=t.x,o=t.y,a=e.x,l=e.y,u=s.x,h=s.y,f=r.x,d=r.y,g=[],p=[[],[]];let m,y,b,w,x,v,S,E;for(let P=0;P<2;P+=1){if(P===0?(y=6*i-12*a+6*u,m=-3*i+9*a-9*u+3*f,b=3*a-3*i):(y=6*o-12*l+6*h,m=-3*o+9*l-9*h+3*d,b=3*l-3*o),Math.abs(m)<1e-12){if(Math.abs(y)<1e-12)continue;w=-b/y,w>0&&w<1&&g.push(w);continue}S=y*y-4*b*m,E=Math.sqrt(S),!(S<0)&&(x=(-y+E)/(2*m),x>0&&x<1&&g.push(x),v=(-y-E)/(2*m),v>0&&v<1&&g.push(v))}let C,M,T,k=g.length;const _=k;for(;k;)k-=1,w=g[k],T=1-w,C=T*T*T*i+3*T*T*w*a+3*T*w*w*u+w*w*w*f,p[0][k]=C,M=T*T*T*o+3*T*T*w*l+3*T*w*w*h+w*w*w*d,p[1][k]=M;g[_]=0,g[_+1]=1,p[0][_]=i,p[1][_]=o,p[0][_+1]=f,p[1][_+1]=d,g.length=_+2,p[0].length=_+2,p[1].length=_+2;const D=Math.min.apply(null,p[0]),N=Math.min.apply(null,p[1]),j=Math.max.apply(null,p[0]),A=Math.max.apply(null,p[1]);return new z(D,N,j-D,A-N)}closestPoint(t,e={}){return this.pointAtT(this.closestPointT(t,e))}closestPointLength(t,e={}){const s=this.getOptions(e);return this.lengthAtT(this.closestPointT(t,s),s)}closestPointNormalizedLength(t,e={}){const s=this.getOptions(e),r=this.closestPointLength(t,s);if(!r)return 0;const i=this.length(s);return i===0?0:r/i}closestPointT(t,e={}){const s=this.getPrecision(e),r=this.getDivisions(e),i=Math.pow(10,-s);let o=null,a=0,l=0,u=0,h=0,f=0,d=null;const g=r.length;let p=g>0?1/g:0;for(r.forEach((m,y)=>{const b=m.start.distance(t),w=m.end.distance(t),x=b+w;(d==null||x<d)&&(o=m,a=y*p,l=(y+1)*p,u=b,h=w,d=x,f=m.endpointDistance())});;){const m=u?Math.abs(u-h)/u:0,y=h!=null?Math.abs(u-h)/h:0,b=m<i||y<i,w=u?u<f*i:!0,x=h?h<f*i:!0;if(b||(w||x))return u<=h?a:l;const S=o.divide(.5);p/=2;const E=S[0].start.distance(t),C=S[0].end.distance(t),M=E+C,T=S[1].start.distance(t),k=S[1].end.distance(t),_=T+k;M<=_?(o=S[0],l-=p,u=E,h=C):(o=S[1],a+=p,u=T,h=k)}}closestPointTangent(t,e={}){return this.tangentAtT(this.closestPointT(t,e))}containsPoint(t,e={}){return this.toPolyline(e).containsPoint(t)}divideAt(t,e={}){if(t<=0)return this.divideAtT(0);if(t>=1)return this.divideAtT(1);const s=this.tAt(t,e);return this.divideAtT(s)}divideAtLength(t,e={}){const s=this.tAtLength(t,e);return this.divideAtT(s)}divide(t){return this.divideAtT(t)}divideAtT(t){const e=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return[new Vt(e,e,e,e),new Vt(e,s,r,i)];if(t>=1)return[new Vt(e,s,r,i),new Vt(i,i,i,i)];const o=this.getSkeletonPoints(t),a=o.startControlPoint1,l=o.startControlPoint2,u=o.divider,h=o.dividerControlPoint1,f=o.dividerControlPoint2;return[new Vt(e,a,l,u),new Vt(u,h,f,i)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(t){const e=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return{startControlPoint1:e.clone(),startControlPoint2:e.clone(),divider:e.clone(),dividerControlPoint1:s.clone(),dividerControlPoint2:r.clone()};if(t>=1)return{startControlPoint1:s.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};const o=new W(e,s).pointAt(t),a=new W(s,r).pointAt(t),l=new W(r,i).pointAt(t),u=new W(o,a).pointAt(t),h=new W(a,l).pointAt(t),f=new W(u,h).pointAt(t);return{startControlPoint1:o,startControlPoint2:u,divider:f,dividerControlPoint1:h,dividerControlPoint2:l}}getSubdivisions(t={}){const e=this.getPrecision(t);let s=[new Vt(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(e===0)return s;let r=this.endpointDistance();const i=Math.pow(10,-e);let o=0;for(;;){o+=1;const a=[];s.forEach(h=>{const f=h.divide(.5);a.push(f[0],f[1])});const l=a.reduce((h,f)=>h+f.endpointDistance(),0),u=l!==0?(l-r)/l:0;if(o>1&&u<i)return a;s=a,r=l}}length(t={}){return this.getDivisions(t).reduce((s,r)=>s+r.endpointDistance(),0)}lengthAtT(t,e={}){if(t<=0)return 0;const s=e.precision===void 0?this.PRECISION:e.precision;return this.divide(t)[0].length({precision:s})}pointAt(t,e={}){if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();const s=this.tAt(t,e);return this.pointAtT(s)}pointAtLength(t,e={}){const s=this.tAtLength(t,e);return this.pointAtT(s)}pointAtT(t){return t<=0?this.start.clone():t>=1?this.end.clone():this.getSkeletonPoints(t).divider}isDifferentiable(){const t=this.start,e=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(s)&&s.equals(r))}tangentAt(t,e={}){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);const s=this.tAt(t,e);return this.tangentAtT(s)}tangentAtLength(t,e={}){if(!this.isDifferentiable())return null;const s=this.tAtLength(t,e);return this.tangentAtT(s)}tangentAtT(t){if(!this.isDifferentiable())return null;t<0&&(t=0),t>1&&(t=1);const e=this.getSkeletonPoints(t),s=e.startControlPoint2,r=e.dividerControlPoint1,i=e.divider,o=new W(s,r);return o.translate(i.x-s.x,i.y-s.y),o}getPrecision(t={}){return t.precision==null?this.PRECISION:t.precision}getDivisions(t={}){if(t.subdivisions!=null)return t.subdivisions;const e=this.getPrecision(t);return this.getSubdivisions({precision:e})}getOptions(t={}){const e=this.getPrecision(t),s=this.getDivisions(t);return{precision:e,subdivisions:s}}tAt(t,e={}){if(t<=0)return 0;if(t>=1)return 1;const s=this.getOptions(e),i=this.length(s)*t;return this.tAtLength(i,s)}tAtLength(t,e={}){let s=!0;t<0&&(s=!1,t=-t);const r=this.getPrecision(e),i=this.getDivisions(e),o={precision:r,subdivisions:i};let a=null,l,u,h=0,f=0,d=0;const g=i.length;let p=g>0?1/g:0;for(let b=0;b<g;b+=1){const w=s?b:g-1-b,x=i[b],v=x.endpointDistance();if(t<=d+v){a=x,l=w*p,u=(w+1)*p,h=s?t-d:v+d-t,f=s?v+d-t:t-d;break}d+=v}if(a==null)return s?1:0;const m=this.length(o),y=Math.pow(10,-r);for(;;){let b;if(b=m!==0?h/m:0,b<y)return l;if(b=m!==0?f/m:0,b<y)return u;let w,x;const v=a.divide(.5);p/=2;const S=v[0].endpointDistance(),E=v[1].endpointDistance();h<=S?(a=v[0],u-=p,w=h,x=S-w):(a=v[1],l+=p,w=h-S,x=E-w),h=w,f=x}}toPoints(t={}){const e=this.getDivisions(t),s=[e[0].start.clone()];return e.forEach(r=>s.push(r.end.clone())),s}toPolyline(t={}){return new zt(this.toPoints(t))}scale(t,e,s){return this.start.scale(t,e,s),this.controlPoint1.scale(t,e,s),this.controlPoint2.scale(t,e,s),this.end.scale(t,e,s),this}rotate(t,e){return this.start.rotate(t,e),this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?(this.start.translate(t,e),this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return t!=null&&this.start.equals(t.start)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)&&this.end.equals(t.end)}clone(){return new Vt(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}(function(n){function t(e){return e!=null&&e instanceof n}n.isCurve=t})(Vt||(Vt={})),function(n){function t(r){const i=r.length,o=[],a=[];let l=2;o[0]=r[0]/l;for(let u=1;u<i;u+=1)a[u]=1/l,l=(u<i-1?4:3.5)-a[u],o[u]=(r[u]-o[u-1])/l;for(let u=1;u<i;u+=1)o[i-u-1]-=a[i-u]*o[i-u];return o}function e(r){const i=r.map(d=>O.clone(d)),o=[],a=[],l=i.length-1;if(l===1)return o[0]=new O((2*i[0].x+i[1].x)/3,(2*i[0].y+i[1].y)/3),a[0]=new O(2*o[0].x-i[0].x,2*o[0].y-i[0].y),[o,a];const u=[];for(let d=1;d<l-1;d+=1)u[d]=4*i[d].x+2*i[d+1].x;u[0]=i[0].x+2*i[1].x,u[l-1]=(8*i[l-1].x+i[l].x)/2;const h=t(u);for(let d=1;d<l-1;d+=1)u[d]=4*i[d].y+2*i[d+1].y;u[0]=i[0].y+2*i[1].y,u[l-1]=(8*i[l-1].y+i[l].y)/2;const f=t(u);for(let d=0;d<l;d+=1)o.push(new O(h[d],f[d])),d<l-1?a.push(new O(2*i[d+1].x-h[d+1],2*i[d+1].y-f[d+1])):a.push(new O((i[l].x+h[l-1])/2,(i[l].y+f[l-1])/2));return[o,a]}function s(r){if(r==null||Array.isArray(r)&&r.length<2)throw new Error("At least 2 points are required");const i=e(r),o=[];for(let a=0,l=i[0].length;a<l;a+=1){const u=new O(i[0][a].x,i[0][a].y),h=new O(i[1][a].x,i[1][a].y);o.push(new n(r[a],u,h,r[a+1]))}return o}n.throughPoints=s}(Vt||(Vt={}));class Ka extends ys{constructor(){super(...arguments),this.isVisible=!0,this.isSegment=!0,this.isSubpathStart=!1}get end(){return this.endPoint}get start(){if(this.previousSegment==null)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path, or segment has not yet been added to a path.)");return this.previousSegment.end}closestPointT(t,e){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(t);throw new Error("Neither `closestPointT` nor `closestPointNormalizedLength` method is implemented.")}lengthAtT(t,e){if(t<=0)return 0;const s=this.length();return t>=1?s:s*t}divideAtT(t){if(this.divideAt)return this.divideAt(t);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(t){if(this.pointAt)return this.pointAt(t);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(t){if(this.tangentAt)return this.tangentAt(t);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class fe extends Ka{constructor(t,e){super(),W.isLine(t)?this.endPoint=t.end.clone().round(2):this.endPoint=O.create(t,e).round(2)}get type(){return"L"}get line(){return new W(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[new fe(e[0]),new fe(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[new fe(e[0]),new fe(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return this.previousSegment==null?!1:!this.start.equals(this.end)}clone(){return new fe(this.end)}scale(t,e,s){return this.end.scale(t,e,s),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?this.end.translate(t,e):this.end.translate(t),this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}(function(n){function t(...e){const s=e.length,r=e[0];if(W.isLine(r))return new n(r);if(O.isPointLike(r))return s===1?new n(r):e.map(o=>new n(o));if(s===2)return new n(+e[0],+e[1]);const i=[];for(let o=0;o<s;o+=2){const a=+e[o],l=+e[o+1];i.push(new n(a,l))}return i}n.create=t})(fe||(fe={}));class zr extends Ka{get end(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. MoveTo), or segment has not yet been added to a path.)");return this.subpathStartSegment.end}get type(){return"Z"}get line(){return new W(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[e[1].isDifferentiable()?new fe(e[0]):this.clone(),new fe(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[e[1].isDifferentiable()?new fe(e[0]):this.clone(),new fe(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)}scale(){return this}rotate(){return this}translate(){return this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}clone(){return new zr}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return this.type}}(function(n){function t(){return new n}n.create=t})(zr||(zr={}));class Fr extends Ka{constructor(t,e){super(),this.isVisible=!1,this.isSubpathStart=!0,W.isLine(t)||Vt.isCurve(t)?this.endPoint=t.end.clone().round(2):this.endPoint=O.create(t,e).round(2)}get start(){throw new Error("Illegal access. Moveto segments should not need a start property.")}get type(){return"M"}bbox(){return null}closestPoint(){return this.end.clone()}closestPointLength(){return 0}closestPointNormalizedLength(){return 0}closestPointT(){return 1}closestPointTangent(){return null}length(){return 0}lengthAtT(){return 0}divideAt(){return[this.clone(),this.clone()]}divideAtLength(){return[this.clone(),this.clone()]}getSubdivisions(){return[]}pointAt(){return this.end.clone()}pointAtLength(){return this.end.clone()}pointAtT(){return this.end.clone()}tangentAt(){return null}tangentAtLength(){return null}tangentAtT(){return null}isDifferentiable(){return!1}scale(t,e,s){return this.end.scale(t,e,s),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?this.end.translate(t,e):this.end.translate(t),this}clone(){return new Fr(this.end)}equals(t){return this.type===t.type&&this.end.equals(t.end)}toJSON(){return{type:this.type,end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}(function(n){function t(...e){const s=e.length,r=e[0];if(W.isLine(r))return new n(r);if(Vt.isCurve(r))return new n(r);if(O.isPointLike(r)){if(s===1)return new n(r);const o=[];for(let a=0;a<s;a+=1)a===0?o.push(new n(e[a])):o.push(new fe(e[a]));return o}if(s===2)return new n(+e[0],+e[1]);const i=[];for(let o=0;o<s;o+=2){const a=+e[o],l=+e[o+1];o===0?i.push(new n(a,l)):i.push(new fe(a,l))}return i}n.create=t})(Fr||(Fr={}));class He extends Ka{constructor(t,e,s,r,i,o){super(),Vt.isCurve(t)?(this.controlPoint1=t.controlPoint1.clone().round(2),this.controlPoint2=t.controlPoint2.clone().round(2),this.endPoint=t.end.clone().round(2)):typeof t=="number"?(this.controlPoint1=new O(t,e).round(2),this.controlPoint2=new O(s,r).round(2),this.endPoint=new O(i,o).round(2)):(this.controlPoint1=O.create(t).round(2),this.controlPoint2=O.create(e).round(2),this.endPoint=O.create(s).round(2))}get type(){return"C"}get curve(){return new Vt(this.start,this.controlPoint1,this.controlPoint2,this.end)}bbox(){return this.curve.bbox()}closestPoint(t){return this.curve.closestPoint(t)}closestPointLength(t){return this.curve.closestPointLength(t)}closestPointNormalizedLength(t){return this.curve.closestPointNormalizedLength(t)}closestPointTangent(t){return this.curve.closestPointTangent(t)}length(){return this.curve.length()}divideAt(t,e={}){const s=this.curve.divideAt(t,e);return[new He(s[0]),new He(s[1])]}divideAtLength(t,e={}){const s=this.curve.divideAtLength(t,e);return[new He(s[0]),new He(s[1])]}divideAtT(t){const e=this.curve.divideAtT(t);return[new He(e[0]),new He(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.curve.pointAt(t)}pointAtLength(t){return this.curve.pointAtLength(t)}tangentAt(t){return this.curve.tangentAt(t)}tangentAtLength(t){return this.curve.tangentAtLength(t)}isDifferentiable(){if(!this.previousSegment)return!1;const t=this.start,e=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(s)&&s.equals(r))}scale(t,e,s){return this.controlPoint1.scale(t,e,s),this.controlPoint2.scale(t,e,s),this.end.scale(t,e,s),this}rotate(t,e){return this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?(this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return this.start.equals(t.start)&&this.end.equals(t.end)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)}clone(){return new He(this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){const t=this.controlPoint1,e=this.controlPoint2,s=this.end;return[this.type,t.x,t.y,e.x,e.y,s.x,s.y].join(" ")}}(function(n){function t(...e){const s=e.length,r=e[0];if(Vt.isCurve(r))return new n(r);if(O.isPointLike(r)){if(s===3)return new n(e[0],e[1],e[2]);const o=[];for(let a=0;a<s;a+=3)o.push(new n(e[a],e[a+1],e[a+2]));return o}if(s===6)return new n(e[0],e[1],e[2],e[3],e[4],e[5]);const i=[];for(let o=0;o<s;o+=6)i.push(new n(e[o],e[o+1],e[o+2],e[o+3],e[o+4],e[o+5]));return i}n.create=t})(He||(He={}));function Za(n,t,e){return{x:n*Math.cos(e)-t*Math.sin(e),y:n*Math.sin(e)+t*Math.cos(e)}}function Py(n,t,e,s,r,i){const o=.3333333333333333,a=2/3;return[o*n+a*e,o*t+a*s,o*r+a*e,o*i+a*s,r,i]}function Ay(n,t,e,s,r,i,o,a,l,u){const h=Math.PI*120/180,f=Math.PI/180*(+r||0);let d=[],g,p,m,y,b;if(u)p=u[0],m=u[1],y=u[2],b=u[3];else{g=Za(n,t,-f),n=g.x,t=g.y,g=Za(a,l,-f),a=g.x,l=g.y;const j=(n-a)/2,A=(t-l)/2;let P=j*j/(e*e)+A*A/(s*s);P>1&&(P=Math.sqrt(P),e=P*e,s=P*s);const L=e*e,V=s*s,Y=(i===o?-1:1)*Math.sqrt(Math.abs((L*V-L*A*A-V*j*j)/(L*A*A+V*j*j)));y=Y*e*A/s+(n+a)/2,b=Y*-s*j/e+(t+l)/2,p=Math.asin((t-b)/s),m=Math.asin((l-b)/s),p=n<y?Math.PI-p:p,m=a<y?Math.PI-m:m,p<0&&(p=Math.PI*2+p),m<0&&(m=Math.PI*2+m),o&&p>m&&(p-=Math.PI*2),!o&&m>p&&(m-=Math.PI*2)}let w=m-p;if(Math.abs(w)>h){const j=m,A=a,P=l;m=p+h*(o&&m>p?1:-1),a=y+e*Math.cos(m),l=b+s*Math.sin(m),d=Ay(a,l,e,s,r,0,o,A,P,[m,j,y,b])}w=m-p;const x=Math.cos(p),v=Math.sin(p),S=Math.cos(m),E=Math.sin(m),C=Math.tan(w/4),M=4/3*(e*C),T=4/3*(s*C),k=[n,t],_=[n+M*v,t-T*x],D=[a+M*E,l-T*S],N=[a,l];if(_[0]=2*k[0]-_[0],_[1]=2*k[1]-_[1],u)return[_,D,N].concat(d);{d=[_,D,N].concat(d).join().split(",");const j=[],A=d.length;for(let P=0;P<A;P+=1)j[P]=P%2?Za(+d[P-1],+d[P],f).y:Za(+d[P],+d[P+1],f).x;return j}}function nI(n){if(!n)return null;const t=`
38
38
  \v\f\r   ᠎              \u2028\u2029`,e=new RegExp(`([a-z])[${t},]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[${t}]*,?[${t}]*)+)`,"ig"),s=new RegExp(`(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[${t}]*,?[${t}]*`,"ig"),r={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return n.replace(e,(o,a,l)=>{const u=[];let h=a.toLowerCase();l.replace(s,(d,g)=>(g&&u.push(+g),d)),h==="m"&&u.length>2&&(i.push([a,...u.splice(0,2)]),h="l",a=a==="m"?"l":"L");const f=r[h];for(;u.length>=f&&(i.push([a,...u.splice(0,f)]),!!f););return o}),i}function sI(n){const t=nI(n);if(!t||!t.length)return[["M",0,0]];let e=0,s=0,r=0,i=0;const o=[];for(let a=0,l=t.length;a<l;a+=1){const u=[];o.push(u);const h=t[a],f=h[0];if(f!==f.toUpperCase())switch(u[0]=f.toUpperCase(),u[0]){case"A":u[1]=h[1],u[2]=h[2],u[3]=h[3],u[4]=h[4],u[5]=h[5],u[6]=+h[6]+e,u[7]=+h[7]+s;break;case"V":u[1]=+h[1]+s;break;case"H":u[1]=+h[1]+e;break;case"M":r=+h[1]+e,i=+h[2]+s;for(let d=1,g=h.length;d<g;d+=1)u[d]=+h[d]+(d%2?e:s);break;default:for(let d=1,g=h.length;d<g;d+=1)u[d]=+h[d]+(d%2?e:s);break}else for(let d=0,g=h.length;d<g;d+=1)u[d]=h[d];switch(u[0]){case"Z":e=+r,s=+i;break;case"H":e=u[1];break;case"V":s=u[1];break;case"M":r=u[u.length-2],i=u[u.length-1],e=u[u.length-2],s=u[u.length-1];break;default:e=u[u.length-2],s=u[u.length-1];break}}return o}function rI(n){const t=sI(n),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function s(l,u,h){let f,d;if(!l)return["C",u.x,u.y,u.x,u.y,u.x,u.y];switch(l[0]in{T:1,Q:1}||(u.qx=null,u.qy=null),l[0]){case"M":u.X=l[1],u.Y=l[2];break;case"A":return parseFloat(l[1])===0||parseFloat(l[2])===0?["L",l[6],l[7]]:["C"].concat(Ay.apply(0,[u.x,u.y].concat(l.slice(1))));case"S":return h==="C"||h==="S"?(f=u.x*2-u.bx,d=u.y*2-u.by):(f=u.x,d=u.y),["C",f,d].concat(l.slice(1));case"T":return h==="Q"||h==="T"?(u.qx=u.x*2-u.qx,u.qy=u.y*2-u.qy):(u.qx=u.x,u.qy=u.y),["C"].concat(Py(u.x,u.y,u.qx,u.qy,l[1],l[2]));case"Q":return u.qx=l[1],u.qy=l[2],["C"].concat(Py(u.x,u.y,l[1],l[2],l[3],l[4]));case"H":return["L"].concat(l[1],u.y);case"V":return["L"].concat(u.x,l[1])}return l}function r(l,u){if(l[u].length>7){l[u].shift();const h=l[u];for(;h.length;)i[u]="A",u+=1,l.splice(u,0,["C"].concat(h.splice(0,6)));l.splice(u,1),a=t.length}}const i=[];let o="",a=t.length;for(let l=0;l<a;l+=1){let u="";t[l]&&(u=t[l][0]),u!=="C"&&(i[l]=u,l>0&&(o=i[l-1])),t[l]=s(t[l],e,o),i[l]!=="A"&&u==="C"&&(i[l]="C"),r(t,l);const h=t[l],f=h.length;e.x=h[f-2],e.y=h[f-1],e.bx=parseFloat(h[f-4])||e.x,e.by=parseFloat(h[f-3])||e.y}return(!t[0][0]||t[0][0]!=="M")&&t.unshift(["M",0,0]),t}function iI(n){return rI(n).map(t=>t.map(e=>typeof e=="string"?e:wt.round(e,2))).join(",").split(",").join(" ")}class Z extends ys{constructor(t){if(super(),this.PRECISION=3,this.segments=[],Array.isArray(t))if(W.isLine(t[0])||Vt.isCurve(t[0])){let e=null;t.forEach((r,i)=>{i===0&&this.appendSegment(Z.createSegment("M",r.start)),e!=null&&!e.end.equals(r.start)&&this.appendSegment(Z.createSegment("M",r.start)),W.isLine(r)?this.appendSegment(Z.createSegment("L",r.end)):Vt.isCurve(r)&&this.appendSegment(Z.createSegment("C",r.controlPoint1,r.controlPoint2,r.end)),e=r})}else t.forEach(s=>{s.isSegment&&this.appendSegment(s)});else t!=null&&(W.isLine(t)?(this.appendSegment(Z.createSegment("M",t.start)),this.appendSegment(Z.createSegment("L",t.end))):Vt.isCurve(t)?(this.appendSegment(Z.createSegment("M",t.start)),this.appendSegment(Z.createSegment("C",t.controlPoint1,t.controlPoint2,t.end))):zt.isPolyline(t)?t.points&&t.points.length&&t.points.forEach((e,s)=>{const r=s===0?Z.createSegment("M",e):Z.createSegment("L",e);this.appendSegment(r)}):t.isSegment&&this.appendSegment(t))}get start(){const t=this.segments,e=t.length;if(e===0)return null;for(let s=0;s<e;s+=1){const r=t[s];if(r.isVisible)return r.start}return t[e-1].end}get end(){const t=this.segments,e=t.length;if(e===0)return null;for(let s=e-1;s>=0;s-=1){const r=t[s];if(r.isVisible)return r.end}return t[e-1].end}moveTo(...t){return this.appendSegment(Fr.create.call(null,...t))}lineTo(...t){return this.appendSegment(fe.create.call(null,...t))}curveTo(...t){return this.appendSegment(He.create.call(null,...t))}arcTo(t,e,s,r,i,o,a){const l=this.end||new O,u=typeof o=="number"?Xa(l.x,l.y,t,e,s,r,i,o,a):Xa(l.x,l.y,t,e,s,r,i,o.x,o.y);if(u!=null)for(let h=0,f=u.length;h<f;h+=6)this.curveTo(u[h],u[h+1],u[h+2],u[h+3],u[h+4],u[h+5]);return this}quadTo(t,e,s,r){const i=this.end||new O,o=["M",i.x,i.y];if(typeof t=="number")o.push("Q",t,e,s,r);else{const l=e;o.push("Q",t.x,t.y,l.x,l.y)}const a=Z.parse(o.join(" "));return this.appendSegment(a.segments.slice(1)),this}close(){return this.appendSegment(zr.create())}drawPoints(t,e={}){const s=My(t,e),r=Z.parse(s);r&&r.segments&&this.appendSegment(r.segments)}bbox(){const t=this.segments,e=t.length;if(e===0)return null;let s;for(let i=0;i<e;i+=1){const o=t[i];if(o.isVisible){const a=o.bbox();a!=null&&(s=s?s.union(a):a)}}if(s!=null)return s;const r=t[e-1];return new z(r.end.x,r.end.y,0,0)}appendSegment(t){const e=this.segments.length;let s=e!==0?this.segments[e-1]:null,r;const i=null;if(Array.isArray(t))for(let o=0,a=t.length;o<a;o+=1){const l=t[o];r=this.prepareSegment(l,s,i),this.segments.push(r),s=r}else t!=null&&t.isSegment&&(r=this.prepareSegment(t,s,i),this.segments.push(r));return this}insertSegment(t,e){const s=this.segments.length;if(t<0&&(t=s+t+1),t>s||t<0)throw new Error("Index out of range.");let r,i=null,o=null;if(s!==0&&(t>=1?(i=this.segments[t-1],o=i.nextSegment):(i=null,o=this.segments[0])),!Array.isArray(e))r=this.prepareSegment(e,i,o),this.segments.splice(t,0,r);else for(let a=0,l=e.length;a<l;a+=1){const u=e[a];r=this.prepareSegment(u,i,o),this.segments.splice(t+a,0,r),i=r}return this}removeSegment(t){const e=this.fixIndex(t),s=this.segments.splice(e,1)[0],r=s.previousSegment,i=s.nextSegment;return r&&(r.nextSegment=i),i&&(i.previousSegment=r),s.isSubpathStart&&i&&this.updateSubpathStartSegment(i),s}replaceSegment(t,e){const s=this.fixIndex(t);let r;const i=this.segments[s];let o=i.previousSegment;const a=i.nextSegment;let l=i.isSubpathStart;if(!Array.isArray(e))r=this.prepareSegment(e,o,a),this.segments.splice(s,1,r),l&&r.isSubpathStart&&(l=!1);else{this.segments.splice(t,1);for(let u=0,h=e.length;u<h;u+=1){const f=e[u];r=this.prepareSegment(f,o,a),this.segments.splice(t+u,0,r),o=r,l&&r.isSubpathStart&&(l=!1)}}l&&a&&this.updateSubpathStartSegment(a)}getSegment(t){const e=this.fixIndex(t);return this.segments[e]}fixIndex(t){const e=this.segments.length;if(e===0)throw new Error("Path has no segments.");let s=t;for(;s<0;)s=e+s;if(s>=e||s<0)throw new Error("Index out of range.");return s}segmentAt(t,e={}){const s=this.segmentIndexAt(t,e);return s?this.getSegment(s):null}segmentAtLength(t,e={}){const s=this.segmentIndexAtLength(t,e);return s?this.getSegment(s):null}segmentIndexAt(t,e={}){if(this.segments.length===0)return null;const s=wt.clamp(t,0,1),r=this.getOptions(e),o=this.length(r)*s;return this.segmentIndexAtLength(o,r)}segmentIndexAtLength(t,e={}){const s=this.segments.length;if(s===0)return null;let r=!0;t<0&&(r=!1,t=-t);const i=this.getPrecision(e),o=this.getSubdivisions(e);let a=0,l=null;for(let u=0;u<s;u+=1){const h=r?u:s-1-u,f=this.segments[h],d=o[h],g=f.length({precision:i,subdivisions:d});if(f.isVisible){if(t<=a+g)return h;l=h}a+=g}return l}getSegmentSubdivisions(t={}){const e=this.getPrecision(t),s=[];for(let r=0,i=this.segments.length;r<i;r+=1){const a=this.segments[r].getSubdivisions({precision:e});s.push(a)}return s}updateSubpathStartSegment(t){let e=t.previousSegment,s=t;for(;s&&!s.isSubpathStart;)e!=null?s.subpathStartSegment=e.subpathStartSegment:s.subpathStartSegment=null,e=s,s=s.nextSegment}prepareSegment(t,e,s){t.previousSegment=e,t.nextSegment=s,e!=null&&(e.nextSegment=t),s!=null&&(s.previousSegment=t);let r=t;return t.isSubpathStart&&(t.subpathStartSegment=t,r=s),r!=null&&this.updateSubpathStartSegment(r),t}closestPoint(t,e={}){const s=this.closestPointT(t,e);return s?this.pointAtT(s):null}closestPointLength(t,e={}){const s=this.getOptions(e),r=this.closestPointT(t,s);return r?this.lengthAtT(r,s):0}closestPointNormalizedLength(t,e={}){const s=this.getOptions(e),r=this.closestPointLength(t,s);if(r===0)return 0;const i=this.length(s);return i===0?0:r/i}closestPointT(t,e={}){if(this.segments.length===0)return null;const s=this.getPrecision(e),r=this.getSubdivisions(e);let i,o=1/0;for(let a=0,l=this.segments.length;a<l;a+=1){const u=this.segments[a],h=r[a];if(u.isVisible){const f=u.closestPointT(t,{precision:s,subdivisions:h}),d=u.pointAtT(f),g=wt.squaredLength(d,t);g<o&&(i={segmentIndex:a,value:f},o=g)}}return i||{segmentIndex:this.segments.length-1,value:1}}closestPointTangent(t,e={}){if(this.segments.length===0)return null;const s=this.getPrecision(e),r=this.getSubdivisions(e);let i,o=1/0;for(let a=0,l=this.segments.length;a<l;a+=1){const u=this.segments[a],h=r[a];if(u.isDifferentiable()){const f=u.closestPointT(t,{precision:s,subdivisions:h}),d=u.pointAtT(f),g=wt.squaredLength(d,t);g<o&&(i=u.tangentAtT(f),o=g)}}return i||null}containsPoint(t,e={}){const s=this.toPolylines(e);if(!s)return!1;let r=0;for(let i=0,o=s.length;i<o;i+=1)s[i].containsPoint(t)&&(r+=1);return r%2===1}pointAt(t,e={}){if(this.segments.length===0)return null;if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();const s=this.getOptions(e),i=this.length(s)*t;return this.pointAtLength(i,s)}pointAtLength(t,e={}){if(this.segments.length===0)return null;if(t===0)return this.start.clone();let s=!0;t<0&&(s=!1,t=-t);const r=this.getPrecision(e),i=this.getSubdivisions(e);let o,a=0;for(let u=0,h=this.segments.length;u<h;u+=1){const f=s?u:h-1-u,d=this.segments[f],g=i[f],p=d.length({precision:r,subdivisions:g});if(d.isVisible){if(t<=a+p)return d.pointAtLength((s?1:-1)*(t-a),{precision:r,subdivisions:g});o=d}a+=p}return o?s?o.end:o.start:this.segments[this.segments.length-1].end.clone()}pointAtT(t){const e=this.segments,s=e.length;if(s===0)return null;const r=t.segmentIndex;if(r<0)return e[0].pointAtT(0);if(r>=s)return e[s-1].pointAtT(1);const i=wt.clamp(t.value,0,1);return e[r].pointAtT(i)}divideAt(t,e={}){if(this.segments.length===0)return null;const s=wt.clamp(t,0,1),r=this.getOptions(e),o=this.length(r)*s;return this.divideAtLength(o,r)}divideAtLength(t,e={}){if(this.segments.length===0)return null;let s=!0;t<0&&(s=!1,t=-t);const r=this.getPrecision(e),i=this.getSubdivisions(e);let o=0,a,l,u,h,f;for(let S=0,E=this.segments.length;S<E;S+=1){const C=s?S:E-1-S,M=this.getSegment(C),T=i[C],k={precision:r,subdivisions:T},_=M.length(k);if(M.isDifferentiable()&&(u=M,h=C,t<=o+_)){l=C,a=M.divideAtLength((s?1:-1)*(t-o),k);break}o+=_}if(!u)return null;a||(l=h,f=s?1:0,a=u.divideAtT(f));const d=this.clone(),g=l;d.replaceSegment(g,a);const p=g;let m=g+1,y=g+2;a[0].isDifferentiable()||(d.removeSegment(p),m-=1,y-=1);const b=d.getSegment(m).start;d.insertSegment(m,Z.createSegment("M",b)),y+=1,a[1].isDifferentiable()||(d.removeSegment(y-1),y-=1);const w=y-p-1;for(let S=y,E=d.segments.length;S<E;S+=1){const C=this.getSegment(S-w),M=d.getSegment(S);if(M.type==="Z"&&!C.subpathStartSegment.end.equals(M.subpathStartSegment.end)){const T=Z.createSegment("L",C.end);d.replaceSegment(S,T)}}const x=new Z(d.segments.slice(0,m)),v=new Z(d.segments.slice(m));return[x,v]}intersectsWithLine(t,e={}){const s=this.toPolylines(e);if(s==null)return null;let r=null;for(let i=0,o=s.length;i<o;i+=1){const a=s[i],l=t.intersect(a);l&&(r==null&&(r=[]),Array.isArray(l)?r.push(...l):r.push(l))}return r}isDifferentiable(){for(let t=0,e=this.segments.length;t<e;t+=1)if(this.segments[t].isDifferentiable())return!0;return!1}isValid(){const t=this.segments;return t.length===0||t[0].type==="M"}length(t={}){if(this.segments.length===0)return 0;const e=this.getSubdivisions(t);let s=0;for(let r=0,i=this.segments.length;r<i;r+=1){const o=this.segments[r],a=e[r];s+=o.length({subdivisions:a})}return s}lengthAtT(t,e={}){const s=this.segments.length;if(s===0)return 0;let r=t.segmentIndex;if(r<0)return 0;let i=wt.clamp(t.value,0,1);r>=s&&(r=s-1,i=1);const o=this.getPrecision(e),a=this.getSubdivisions(e);let l=0;for(let f=0;f<r;f+=1){const d=this.segments[f],g=a[f];l+=d.length({precision:o,subdivisions:g})}const u=this.segments[r],h=a[r];return l+=u.lengthAtT(i,{precision:o,subdivisions:h}),l}tangentAt(t,e={}){if(this.segments.length===0)return null;const s=wt.clamp(t,0,1),r=this.getOptions(e),o=this.length(r)*s;return this.tangentAtLength(o,r)}tangentAtLength(t,e={}){if(this.segments.length===0)return null;let s=!0;t<0&&(s=!1,t=-t);const r=this.getPrecision(e),i=this.getSubdivisions(e);let o,a=0;for(let l=0,u=this.segments.length;l<u;l+=1){const h=s?l:u-1-l,f=this.segments[h],d=i[h],g=f.length({precision:r,subdivisions:d});if(f.isDifferentiable()){if(t<=a+g)return f.tangentAtLength((s?1:-1)*(t-a),{precision:r,subdivisions:d});o=f}a+=g}if(o){const l=s?1:0;return o.tangentAtT(l)}return null}tangentAtT(t){const e=this.segments.length;if(e===0)return null;const s=t.segmentIndex;if(s<0)return this.segments[0].tangentAtT(0);if(s>=e)return this.segments[e-1].tangentAtT(1);const r=wt.clamp(t.value,0,1);return this.segments[s].tangentAtT(r)}getPrecision(t={}){return t.precision==null?this.PRECISION:t.precision}getSubdivisions(t={}){if(t.segmentSubdivisions==null){const e=this.getPrecision(t);return this.getSegmentSubdivisions({precision:e})}return t.segmentSubdivisions}getOptions(t={}){const e=this.getPrecision(t),s=this.getSubdivisions(t);return{precision:e,segmentSubdivisions:s}}toPoints(t={}){const e=this.segments,s=e.length;if(s===0)return null;const r=this.getSubdivisions(t),i=[];let o=[];for(let a=0;a<s;a+=1){const l=e[a];if(l.isVisible){const u=r[a];u.length>0?u.forEach(h=>o.push(h.start)):o.push(l.start)}else o.length>0&&(o.push(e[a-1].end),i.push(o),o=[])}return o.length>0&&(o.push(this.end),i.push(o)),i}toPolylines(t={}){const e=this.toPoints(t);return e?e.map(s=>new zt(s)):null}scale(t,e,s){return this.segments.forEach(r=>r.scale(t,e,s)),this}rotate(t,e){return this.segments.forEach(s=>s.rotate(t,e)),this}translate(t,e){return typeof t=="number"?this.segments.forEach(s=>s.translate(t,e)):this.segments.forEach(s=>s.translate(t)),this}clone(){const t=new Z;return this.segments.forEach(e=>t.appendSegment(e.clone())),t}equals(t){if(t==null)return!1;const e=this.segments,s=t.segments,r=e.length;if(s.length!==r)return!1;for(let i=0;i<r;i+=1){const o=e[i],a=s[i];if(o.type!==a.type||!o.equals(a))return!1}return!0}toJSON(){return this.segments.map(t=>t.toJSON())}serialize(){if(!this.isValid())throw new Error("Invalid path segments.");return this.segments.map(t=>t.serialize()).join(" ")}toString(){return this.serialize()}}(function(n){function t(e){return e!=null&&e instanceof n}n.isPath=t})(Z||(Z={})),function(n){function t(s){if(!s)return new n;const r=new n,i=/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g,o=n.normalize(s).match(i);if(o!=null)for(let a=0,l=o.length;a<l;a+=1){const u=o[a],h=/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g,f=u.match(h);if(f!=null){const d=f[0],g=f.slice(1).map(m=>+m),p=e.call(null,d,...g);r.appendSegment(p)}}return r}n.parse=t;function e(s,...r){if(s==="M")return Fr.create.call(null,...r);if(s==="L")return fe.create.call(null,...r);if(s==="C")return He.create.call(null,...r);if(s==="z"||s==="Z")return zr.create();throw new Error(`Invalid path segment type "${s}"`)}n.createSegment=e}(Z||(Z={})),function(n){n.normalize=iI,n.isValid=QR,n.drawArc=eI,n.drawPoints=My,n.arcToCurves=Xa}(Z||(Z={}));class Ft{constructor(t){this.options=Object.assign({},t),this.data=this.options.data||{},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this)}get names(){return Object.keys(this.data)}register(t,e,s=!1){if(typeof t=="object"){Object.entries(t).forEach(([o,a])=>{this.register(o,a,e)});return}this.exist(t)&&!s&&!fs.isApplyingHMR()&&this.onDuplicated(t);const r=this.options.process,i=r?X(r,this,t,e):e;return this.data[t]=i,i}unregister(t){const e=t?this.data[t]:null;return delete this.data[t],e}get(t){return t?this.data[t]:null}exist(t){return t?this.data[t]!=null:!1}onDuplicated(t){try{throw this.options.onConflict&&X(this.options.onConflict,this,t),new Error(`${ea(this.options.type)} with name '${t}' already registered.`)}catch(e){throw e}}onNotFound(t,e){throw new Error(this.getSpellingSuggestion(t,e))}getSpellingSuggestion(t,e){const s=this.getSpellingSuggestionForName(t),r=e?`${e} ${s2(this.options.type)}`:this.options.type;return`${ea(r)} with name '${t}' does not exist.${s?` Did you mean '${s}'?`:""}`}getSpellingSuggestionForName(t){return iR(t,Object.keys(this.data),e=>e)}}(function(n){function t(e){return new n(e)}n.create=t})(Ft||(Ft={}));const oI=Object.freeze(Object.defineProperty({__proto__:null,dot:{color:"#aaaaaa",thickness:1,markup:"rect",update(n,t){const e=t.thickness*t.sx,s=t.thickness*t.sy;ut(n,{width:e,height:s,rx:e,ry:s,fill:t.color})}},doubleMesh:[{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(n,t){let e;const s=t.width,r=t.height,i=t.thickness;s-i>=0&&r-i>=0?e=["M",s,0,"H0 M0 0 V0",r].join(" "):e="M 0 0 0 0",ut(n,{d:e,stroke:t.color,"stroke-width":t.thickness})}},{color:"rgba(224,224,224,0.2)",thickness:3,factor:4,markup:"path",update(n,t){let e;const s=t.factor||1,r=t.width*s,i=t.height*s,o=t.thickness;r-o>=0&&i-o>=0?e=["M",r,0,"H0 M0 0 V0",i].join(" "):e="M 0 0 0 0",t.width=r,t.height=i,ut(n,{d:e,stroke:t.color,"stroke-width":t.thickness})}}],fixedDot:{color:"#aaaaaa",thickness:1,markup:"rect",update(n,t){const e=t.sx<=1?t.thickness*t.sx:t.thickness;ut(n,{width:e,height:e,rx:e,ry:e,fill:t.color})}},mesh:{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(n,t){let e;const s=t.width,r=t.height,i=t.thickness;s-i>=0&&r-i>=0?e=["M",s,0,"H0 M0 0 V0",r].join(" "):e="M 0 0 0 0",ut(n,{d:e,stroke:t.color,"stroke-width":t.thickness})}}},Symbol.toStringTag,{value:"Module"}));class bs{constructor(){this.patterns={},this.root=tt.create(Ha(),{width:"100%",height:"100%"},[cn("defs")]).node}add(t,e){const s=this.root.childNodes[0];s&&s.appendChild(e),this.patterns[t]=e,tt.create("rect",{width:"100%",height:"100%",fill:`url(#${t})`}).appendTo(this.root)}get(t){return this.patterns[t]}has(t){return this.patterns[t]!=null}}(function(n){n.presets=oI,n.registry=Ft.create({type:"grid"}),n.registry.register(n.presets,!0)})(bs||(bs={}));const Ty=function(n){const t=document.createElement("canvas"),e=n.width,s=n.height;t.width=e*2,t.height=s;const r=t.getContext("2d");return r.drawImage(n,0,0,e,s),r.translate(2*e,0),r.scale(-1,1),r.drawImage(n,0,0,e,s),t},Ny=function(n){const t=document.createElement("canvas"),e=n.width,s=n.height;t.width=e,t.height=s*2;const r=t.getContext("2d");return r.drawImage(n,0,0,e,s),r.translate(0,2*s),r.scale(1,-1),r.drawImage(n,0,0,e,s),t},_y=function(n){const t=document.createElement("canvas"),e=n.width,s=n.height;t.width=2*e,t.height=2*s;const r=t.getContext("2d");return r.drawImage(n,0,0,e,s),r.setTransform(-1,0,0,-1,t.width,t.height),r.drawImage(n,0,0,e,s),r.setTransform(-1,0,0,1,t.width,0),r.drawImage(n,0,0,e,s),r.setTransform(1,0,0,-1,0,t.height),r.drawImage(n,0,0,e,s),t},aI=Object.freeze(Object.defineProperty({__proto__:null,flipX:Ty,flipXY:_y,flipY:Ny,watermark:function(n,t){const e=n.width,s=n.height,r=document.createElement("canvas");r.width=e*3,r.height=s*3;const i=r.getContext("2d"),o=t.angle!=null?-t.angle:-20,a=gt.toRad(o),l=r.width/4,u=r.height/4;for(let h=0;h<4;h+=1)for(let f=0;f<4;f+=1)(h+f)%2>0&&(i.setTransform(1,0,0,1,(2*h-1)*l,(2*f-1)*u),i.rotate(a),i.drawImage(n,-e/2,-s/2,e,s));return r}},Symbol.toStringTag,{value:"Module"}));var ro;(function(n){n.presets=Object.assign({},aI),n.presets["flip-x"]=Ty,n.presets["flip-y"]=Ny,n.presets["flip-xy"]=_y,n.registry=Ft.create({type:"background pattern"}),n.registry.register(n.presets,!0)})(ro||(ro={}));function Ju(n,t){return n??t}function se(n,t){return n!=null&&Number.isFinite(n)?n:t}function lI(n={}){const t=Ju(n.color,"blue"),e=se(n.width,1),s=se(n.margin,2),r=se(n.opacity,1),i=s,o=s+e;return`
39
39
  <filter>
40
40
  <feFlood flood-color="${t}" flood-opacity="${r}" result="colored"/>
@@ -113,7 +113,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
113
113
  <feFuncB type="linear" slope="${t}" intercept="${e}"/>
114
114
  </feComponentTransfer>
115
115
  </filter>
116
- `.trim()}const wI=Object.freeze(Object.defineProperty({__proto__:null,blur:uI,brightness:yI,contrast:bI,dropShadow:hI,grayScale:dI,highlight:cI,hueRotate:pI,invert:mI,outline:lI,saturate:gI,sepia:fI},Symbol.toStringTag,{value:"Module"}));var Hr;(function(n){n.presets=wI,n.registry=Ft.create({type:"filter"}),n.registry.register(n.presets,!0)})(Hr||(Hr={}));const xI={xlinkHref:"xlink:href",xlinkShow:"xlink:show",xlinkRole:"xlink:role",xlinkType:"xlink:type",xlinkArcrole:"xlink:arcrole",xlinkTitle:"xlink:title",xlinkActuate:"xlink:actuate",xmlSpace:"xml:space",xmlBase:"xml:base",xmlLang:"xml:lang",preserveAspectRatio:"preserveAspectRatio",requiredExtension:"requiredExtension",requiredFeatures:"requiredFeatures",systemLanguage:"systemLanguage",externalResourcesRequired:"externalResourceRequired"},vI={},ky={position:Qa("x","width","origin")},Dy={position:Qa("y","height","origin")},CI={position:Qa("x","width","corner")},SI={position:Qa("y","height","corner")},Ry={set:ws("width","width")},Iy={set:ws("height","height")},EI={set:ws("rx","width")},OI={set:ws("ry","height")},Ly={set:(n=>{const t=ws(n,"width"),e=ws(n,"height");return function(s,r){const i=r.refBBox,o=i.height>i.width?t:e;return X(o,this,s,r)}})("r")},MI={set(n,{refBBox:t}){let e=parseFloat(n);const s=Yn(n);s&&(e/=100);const r=Math.sqrt(t.height*t.height+t.width*t.width);let i;return Number.isFinite(e)&&(s||e>=0&&e<=1?i=e*r:i=Math.max(e+r,0)),{r:i}}},PI={set:ws("cx","width")},AI={set:ws("cy","height")},By={set:$y({resetOffset:!0})},TI={set:$y({resetOffset:!1})},Vy={set:zy({resetOffset:!0})},NI={set:zy({resetOffset:!1})},_I=Ly,kI=By,DI=Vy,RI=ky,II=Dy,LI=Ry,BI=Iy;function Qa(n,t,e){return(s,{refBBox:r})=>{if(s==null)return null;let i=parseFloat(s);const o=Yn(s);o&&(i/=100);let a;if(Number.isFinite(i)){const u=r[e];o||i>0&&i<1?a=u[n]+r[t]*i:a=u[n]+i}const l=new O;return l[n]=a||0,l}}function ws(n,t){return function(e,{refBBox:s}){let r=parseFloat(e);const i=Yn(e);i&&(r/=100);const o={};if(Number.isFinite(r)){const a=i||r>=0&&r<=1?r*s[t]:Math.max(r+s[t],0);o[n]=a}return o}}function jy(n,t){const e="x6-shape",s=t&&t.resetOffset;return function(r,{elem:i,refBBox:o}){let a=Js(i,e);if(!a||a.value!==r){const m=n(r);a={value:r,shape:m,shapeBBox:m.bbox()},Js(i,e,a)}const l=a.shape.clone(),u=a.shapeBBox.clone(),h=u.getOrigin(),f=o.getOrigin();u.x=f.x,u.y=f.y;const d=o.getMaxScaleToFit(u,f),g=u.width===0||o.width===0?1:d.sx,p=u.height===0||o.height===0?1:d.sy;return l.scale(g,p,h),s&&l.translate(-h.x,-h.y),l}}function $y(n){function t(s){return Z.parse(s)}const e=jy(t,n);return(s,r)=>({d:e(s,r).serialize()})}function zy(n){const t=jy(e=>new zt(e),n);return(e,s)=>({points:t(e,s).serialize()})}const VI={qualify:bn,set(n,{view:t}){return`url(#${t.graph.defineGradient(n)})`}},jI={qualify:bn,set(n,{view:t}){const e=t.cell,s=Object.assign({},n);if(e.isEdge()&&s.type==="linearGradient"){const r=t,i=r.sourcePoint,o=r.targetPoint;s.id=`gradient-${s.type}-${e.id}`,s.attrs=Object.assign(Object.assign({},s.attrs),{x1:i.x,y1:i.y,x2:o.x,y2:o.y,gradientUnits:"userSpaceOnUse"}),t.graph.defs.remove(s.id)}return`url(#${t.graph.defineGradient(s)})`}},Fy={qualify(n,{attrs:t}){return t.textWrap==null||!bn(t.textWrap)},set(n,{view:t,elem:e,attrs:s}){const r="x6-text",i=Js(e,r),o=h=>{try{return JSON.parse(h)}catch{return h}},a={x:s.x,eol:s.eol,annotations:o(s.annotations),textPath:o(s["text-path"]||s.textPath),textVerticalAnchor:s["text-vertical-anchor"]||s.textVerticalAnchor,displayEmpty:(s["display-empty"]||s.displayEmpty)==="true",lineHeight:s["line-height"]||s.lineHeight},l=s["font-size"]||s.fontSize,u=JSON.stringify([n,a]);if(l&&e.setAttribute("font-size",l),i==null||i!==u){const h=a.textPath;if(h!=null&&typeof h=="object"){const f=h.selector;if(typeof f=="string"){const d=t.find(f)[0];d instanceof SVGPathElement&&(ku(d),a.textPath=Object.assign({"xlink:href":`#${d.id}`},h))}}my(e,`${n}`,a),Js(e,r,u)}}},$I={qualify:bn,set(n,{view:t,elem:e,attrs:s,refBBox:r}){const i=n,o=i.width||0;Yn(o)?r.width*=parseFloat(o)/100:o<=0?r.width+=o:r.width=o;const a=i.height||0;Yn(a)?r.height*=parseFloat(a)/100:a<=0?r.height+=a:r.height=a;let l,u=i.text;u==null&&(u=s.text||(e==null?void 0:e.textContent)),u!=null?l=by(`${u}`,r,{"font-weight":s["font-weight"]||s.fontWeight,"font-size":s["font-size"]||s.fontSize,"font-family":s["font-family"]||s.fontFamily,lineHeight:s.lineHeight},{ellipsis:i.ellipsis}):l="",X(Fy.set,this,l,{view:t,elem:e,attrs:s,refBBox:r,cell:t.cell})}},Ur=(n,{attrs:t})=>t.text!==void 0,zI={qualify:Ur},FI={qualify:Ur},HI={qualify:Ur},UI={qualify:Ur},GI={qualify:Ur},YI={qualify:Ur},WI={qualify(n,{elem:t}){return t instanceof SVGElement},set(n,{elem:t}){const e="x6-title",s=`${n}`,r=Js(t,e);if(r==null||r!==s){Js(t,e,s);const i=t.firstChild;if(i&&i.tagName.toUpperCase()==="TITLE"){const o=i;o.textContent=s}else{const o=document.createElementNS(t.namespaceURI,"title");o.textContent=s,t.insertBefore(o,i)}}}},qI={offset:Hy("x","width","right")},JI={offset:Hy("y","height","bottom")},XI={offset(n,{refBBox:t}){return n?{x:-t.x,y:-t.y}:{x:0,y:0}}};function Hy(n,t,e){return(s,{refBBox:r})=>{const i=new O;let o;return s==="middle"?o=r[t]/2:s===e?o=r[t]:typeof s=="number"&&Number.isFinite(s)?o=s>-1&&s<1?-r[t]*s:-s:Yn(s)?o=r[t]*parseFloat(s)/100:o=0,i[n]=-(r[n]+o),i}}const KI={qualify:bn,set(n,{elem:t}){qt(t,n)}},ZI={set(n,{elem:t}){t.innerHTML=`${n}`}},QI={qualify:bn,set(n,{view:t}){return`url(#${t.graph.defineFilter(n)})`}},tL={set(n){return n!=null&&typeof n=="object"&&n.id?n.id:n}};function xs(n,t,e){let s,r;typeof t=="object"?(s=t.x,r=t.y):(s=t,r=e);const i=Z.parse(n),o=i.bbox();if(o){let a=-o.height/2-o.y,l=-o.width/2-o.x;typeof s=="number"&&(l-=s),typeof r=="number"&&(a-=r),i.translate(l,a)}return i.serialize()}var Uy=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const eL=n=>{var{size:t,width:e,height:s,offset:r,open:i}=n,o=Uy(n,["size","width","height","offset","open"]);return Gy({size:t,width:e,height:s,offset:r},i===!0,!0,void 0,o)},nL=n=>{var{size:t,width:e,height:s,offset:r,factor:i}=n,o=Uy(n,["size","width","height","offset","factor"]);return Gy({size:t,width:e,height:s,offset:r},!1,!1,i,o)};function Gy(n,t,e,s=3/4,r={}){const i=n.size||10,o=n.width||i,a=n.height||i,l=new Z,u={};if(t)l.moveTo(o,0).lineTo(0,a/2).lineTo(o,a),u.fill="none";else{if(l.moveTo(0,a/2),l.lineTo(o,0),!e){const h=we(s,0,1);l.lineTo(o*h,a/2)}l.lineTo(o,a),l.close()}return Object.assign(Object.assign(Object.assign({},u),r),{tagName:"path",d:xs(l.serialize(),{x:n.offset!=null?n.offset:-o/2})})}var sL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const rL=n=>{var{size:t,width:e,height:s,offset:r}=n,i=sL(n,["size","width","height","offset"]);const o=t||10,a=e||o,l=s||o,u=new Z;return u.moveTo(0,l/2).lineTo(a/2,0).lineTo(a,l/2).lineTo(a/2,l).close(),Object.assign(Object.assign({},i),{tagName:"path",d:xs(u.serialize(),r??-a/2)})};var iL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const oL=n=>{var{d:t,offsetX:e,offsetY:s}=n,r=iL(n,["d","offsetX","offsetY"]);return Object.assign(Object.assign({},r),{tagName:"path",d:xs(t,e,s)})};var aL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const lL=n=>{var{size:t,width:e,height:s,offset:r}=n,i=aL(n,["size","width","height","offset"]);const o=t||10,a=e||o,l=s||o,u=new Z;return u.moveTo(0,0).lineTo(a,l).moveTo(0,l).lineTo(a,0),Object.assign(Object.assign({},i),{tagName:"path",fill:"none",d:xs(u.serialize(),r||-a/2)})};var cL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const uL=n=>{var{width:t,height:e,offset:s,open:r,flip:i}=n,o=cL(n,["width","height","offset","open","flip"]);let a=e||6;const l=t||10,u=r===!0,h=i===!0,f=Object.assign(Object.assign({},o),{tagName:"path"});h&&(a=-a);const d=new Z;return d.moveTo(0,a).lineTo(l,0),u?f.fill="none":(d.lineTo(l,a),d.close()),f.d=xs(d.serialize(),{x:s||-l/2,y:a/2}),f};var Yy=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const Wy=n=>{var{r:t}=n,e=Yy(n,["r"]);const s=t||5;return Object.assign(Object.assign({cx:s},e),{tagName:"circle",r:s})},hL=n=>{var{r:t}=n,e=Yy(n,["r"]);const s=t||5,r=new Z;return r.moveTo(s,0).lineTo(s,s*2),r.moveTo(0,s).lineTo(s*2,s),{children:[Object.assign(Object.assign({},Wy({r:s})),{fill:"none"}),Object.assign(Object.assign({},e),{tagName:"path",d:xs(r.serialize(),-s)})]}};var dL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const fL=Object.freeze(Object.defineProperty({__proto__:null,async:uL,block:eL,circle:Wy,circlePlus:hL,classic:nL,cross:lL,diamond:rL,ellipse:n=>{var{rx:t,ry:e}=n,s=dL(n,["rx","ry"]);const r=t||5,i=e||5;return Object.assign(Object.assign({cx:r},s),{tagName:"ellipse",rx:r,ry:i})},path:oL},Symbol.toStringTag,{value:"Module"}));var vs;(function(n){n.presets=fL,n.registry=Ft.create({type:"marker"}),n.registry.register(n.presets,!0)})(vs||(vs={})),function(n){n.normalize=xs}(vs||(vs={}));var gL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};function Xu(n){return typeof n=="string"||bn(n)}const pL={qualify:Xu,set(n,{view:t,attrs:e}){return Ku("marker-start",n,t,e)}},mL={qualify:Xu,set(n,{view:t,attrs:e}){return Ku("marker-end",n,t,e,{transform:"rotate(180)"})}},yL={qualify:Xu,set(n,{view:t,attrs:e}){return Ku("marker-mid",n,t,e)}};function Ku(n,t,e,s,r={}){const i=typeof t=="string"?{name:t}:t,{name:o,args:a}=i,l=gL(i,["name","args"]);let u=l;if(o&&typeof o=="string"){const f=vs.registry.get(o);if(f)u=f(Object.assign(Object.assign({},l),a));else return vs.registry.onNotFound(o)}const h=Object.assign(Object.assign(Object.assign({},bL(s,n)),r),u);return{[n]:`url(#${e.graph.defineMarker(h)})`}}function bL(n,t){const e={},s=n.stroke;typeof s=="string"&&(e.stroke=s,e.fill=s);let r=n.strokeOpacity;if(r==null&&(r=n["stroke-opacity"]),r==null&&(r=n.opacity),r!=null&&(e["stroke-opacity"]=r,e["fill-opacity"]=r),t!=="marker-mid"){const i=parseFloat(n.strokeWidth||n["stroke-width"]);if(Number.isFinite(i)&&i>1){const o=Math.ceil(i/2);e.refX=t==="marker-start"?o:-o}}return e}const io=(n,{view:t})=>t.cell.isEdge(),wL={qualify:io,set(n,t){var e,s,r,i;const o=t.view,a=n.reverse||!1,l=n.stubs||0;let u;if(Number.isFinite(l)&&l!==0)if(a){let h,f;const d=o.getConnectionLength()||0;l<0?(h=(d+l)/2,f=-l):(h=l,f=d-l*2);const g=o.getConnection();u=(i=(r=(s=(e=g==null?void 0:g.divideAtLength(h))===null||e===void 0?void 0:e[1])===null||s===void 0?void 0:s.divideAtLength(f))===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.serialize()}else{let h;l<0?h=((o.getConnectionLength()||0)+l)/2:h=l;const f=o.getConnection();if(f){const d=f.divideAtLength(h),g=f.divideAtLength(-h);d&&g&&(u=`${d[0].serialize()} ${g[1].serialize()}`)}}return{d:u||o.getConnectionPathData()}}},qy={qualify:io,set:tl("getTangentAtLength",{rotate:!0})},xL={qualify:io,set:tl("getTangentAtLength",{rotate:!1})},Jy={qualify:io,set:tl("getTangentAtRatio",{rotate:!0})},vL={qualify:io,set:tl("getTangentAtRatio",{rotate:!1})},CL=qy,SL=Jy;function tl(n,t){const e={x:1,y:0};return(s,r)=>{let i,o;const a=r.view,l=a[n](Number(s));return l?(o=t.rotate?l.vector().vectorAngle(e):0,i=l.start):(i=a.path.start,o=0),o===0?{transform:`translate(${i.x},${i.y}')`}:{transform:`translate(${i.x},${i.y}') rotate(${o})`}}}const EL=Object.freeze(Object.defineProperty({__proto__:null,annotations:UI,atConnectionLength:CL,atConnectionLengthIgnoreGradient:xL,atConnectionLengthKeepGradient:qy,atConnectionRatio:SL,atConnectionRatioIgnoreGradient:vL,atConnectionRatioKeepGradient:Jy,connection:wL,displayEmpty:YI,eol:GI,fill:VI,filter:QI,html:ZI,lineHeight:zI,port:tL,ref:vI,refCx:PI,refCy:AI,refD:kI,refDKeepOffset:TI,refDResetOffset:By,refDx:CI,refDy:SI,refHeight:Iy,refHeight2:BI,refPoints:DI,refPointsKeepOffset:NI,refPointsResetOffset:Vy,refR:_I,refRCircumscribed:MI,refRInscribed:Ly,refRx:EI,refRy:OI,refWidth:Ry,refWidth2:LI,refX:ky,refX2:RI,refY:Dy,refY2:II,resetOffset:XI,sourceMarker:pL,stroke:jI,style:KI,targetMarker:mL,text:Fy,textPath:HI,textVerticalAnchor:FI,textWrap:$I,title:WI,vertexMarker:yL,xAlign:qI,yAlign:JI},Symbol.toStringTag,{value:"Module"}));var On;(function(n){function t(e,s,r){return!!(e!=null&&(typeof e=="string"||typeof e.qualify!="function"||X(e.qualify,this,s,r)))}n.isValidDefinition=t})(On||(On={})),function(n){n.presets=Object.assign(Object.assign({},xI),EL),n.registry=Ft.create({type:"attribute definition"}),n.registry.register(n.presets,!0)}(On||(On={}));const Ue={prefixCls:"x6",autoInsertCSS:!0,useCSSSelector:!0,prefix(n){return`${Ue.prefixCls}-${n}`}},Xy=Ue.prefix("highlighted"),OL={highlight(n,t,e){const s=e&&e.className||Xy;J(t,s)},unhighlight(n,t,e){const s=e&&e.className||Xy;Dt(t,s)}},Ky=Ue.prefix("highlight-opacity"),ML={highlight(n,t){J(t,Ky)},unhighlight(n,t){Dt(t,Ky)}};var vt;(function(n){n.normalizeMarker=xs;function t(d,g){const p=jR(d.x,d.y).matrixTransform(g);return new O(p.x,p.y)}n.transformPoint=t;function e(d,g){return new W(t(d.start,g),t(d.end,g))}n.transformLine=e;function s(d,g){let p=d instanceof zt?d.points:d;return Array.isArray(p)||(p=[]),new zt(p.map(m=>t(m,g)))}n.transformPolyline=s;function r(d,g){const m=cn("svg").createSVGPoint();m.x=d.x,m.y=d.y;const y=m.matrixTransform(g);m.x=d.x+d.width,m.y=d.y;const b=m.matrixTransform(g);m.x=d.x+d.width,m.y=d.y+d.height;const w=m.matrixTransform(g);m.x=d.x,m.y=d.y+d.height;const x=m.matrixTransform(g),v=Math.min(y.x,b.x,w.x,x.x),S=Math.max(y.x,b.x,w.x,x.x),E=Math.min(y.y,b.y,w.y,x.y),C=Math.max(y.y,b.y,w.y,x.y);return new z(v,E,S-v,C-E)}n.transformRectangle=r;function i(d,g,p){let m;const y=d.ownerSVGElement;if(!y)return new z(0,0,0,0);try{m=d.getBBox()}catch{m={x:d.clientLeft,y:d.clientTop,width:d.clientWidth,height:d.clientHeight}}if(g)return z.create(m);const b=Qi(d,p||y);return r(m,b)}n.bbox=i;function o(d,g={}){let p;if(!d.ownerSVGElement||!gs(d)){if(oy(d)){const{left:w,top:x,width:v,height:S}=a(d);return new z(w,x,v,S)}return new z(0,0,0,0)}let y=g.target;if(!g.recursive){try{p=d.getBBox()}catch{p={x:d.clientLeft,y:d.clientTop,width:d.clientWidth,height:d.clientHeight}}if(!y)return z.create(p);const w=Qi(d,y);return r(p,w)}{const w=d.childNodes,x=w.length;if(x===0)return o(d,{target:y});y||(y=d);for(let v=0;v<x;v+=1){const S=w[v];let E;S.childNodes.length===0?E=o(S,{target:y}):E=o(S,{target:y,recursive:!0}),p?p=p.union(E):p=E}return p}}n.getBBox=o;function a(d){let g=0,p=0,m=0,y=0;if(d){let b=d;for(;b;)g+=b.offsetLeft,p+=b.offsetTop,b=b.offsetParent,b&&(g+=parseInt(fy(b,"borderLeft"),10),p+=parseInt(fy(b,"borderTop"),10));m=d.offsetWidth,y=d.offsetHeight}return{left:g,top:p,width:m,height:y}}n.getBoundingOffsetRect=a;function l(d){const g=p=>{const m=d.getAttribute(p),y=m?parseFloat(m):0;return Number.isNaN(y)?0:y};switch(d instanceof SVGElement&&d.nodeName.toLowerCase()){case"rect":return new z(g("x"),g("y"),g("width"),g("height"));case"circle":return new un(g("cx"),g("cy"),g("r"),g("r"));case"ellipse":return new un(g("cx"),g("cy"),g("rx"),g("ry"));case"polyline":{const p=Wa(d);return new zt(p)}case"polygon":{const p=Wa(d);return p.length>1&&p.push(p[0]),new zt(p)}case"path":{let p=d.getAttribute("d");return Z.isValid(p)||(p=Z.normalize(p)),Z.parse(p)}case"line":return new W(g("x1"),g("y1"),g("x2"),g("y2"))}return o(d)}n.toGeometryShape=l;function u(d,g,p,m){const y=O.create(g),b=O.create(p);m||(m=d instanceof SVGSVGElement?d:d.ownerSVGElement);const w=Uu(d);d.setAttribute("transform","");const x=o(d,{target:m}).scale(w.sx,w.sy),v=Ki();v.setTranslate(-x.x-x.width/2,-x.y-x.height/2);const S=Ki(),E=y.angleBetween(b,y.clone().translate(1,0));E&&S.setRotate(E,0,0);const C=Ki(),M=y.clone().move(b,x.width/2);C.setTranslate(2*y.x-M.x,2*y.y-M.y);const T=Qi(d,m),k=Ki();k.setMatrix(C.matrix.multiply(S.matrix.multiply(v.matrix.multiply(T.scale(w.sx,w.sy))))),d.setAttribute("transform",Br(k.matrix))}n.translateAndAutoOrient=u;function h(d){if(d==null)return null;let g=d;do{let p=g.tagName;if(typeof p!="string")return null;if(p=p.toUpperCase(),Sn(g,"x6-port"))g=g.nextElementSibling;else if(p==="G")g=g.firstElementChild;else if(p==="TITLE")g=g.nextElementSibling;else break}while(g);return g}n.findShapeNode=h;function f(d){const g=h(d);if(!gs(g)){if(oy(d)){const{left:y,top:b,width:w,height:x}=a(d);return new z(y,b,w,x)}return new z(0,0,0,0)}return l(g).bbox()||z.create()}n.getBBoxV2=f})(vt||(vt={}));const PL={padding:3,rx:0,ry:0,attrs:{"stroke-width":3,stroke:"#FEB663"}},AL={highlight(n,t,e){const s=Cs.getHighlighterId(t,e);if(Cs.hasCache(s))return;e=ig({},e,PL);const r=tt.create(t);let i,o;try{i=r.toPathData()}catch{o=vt.bbox(r.node,!0),i=xy(Object.assign(Object.assign({},e),o))}const a=cn("path");if(ut(a,Object.assign({d:i,"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},e.attrs?Ji(e.attrs):null)),n.isEdgeElement(t))ut(a,"d",n.getConnectionPathData());else{let h=r.getTransformToElement(n.container);const f=e.padding;if(f){o==null&&(o=vt.bbox(r.node,!0));const d=o.x+o.width/2,g=o.y+o.height/2;o=vt.transformRectangle(o,h);const p=Math.max(o.width,1),m=Math.max(o.height,1),y=(p+f)/p,b=(m+f)/m,w=ne({a:y,b:0,c:0,d:b,e:d-y*d,f:g-b*g});h=h.multiply(w)}Vr(a,h)}J(a,Ue.prefix("highlight-stroke"));const l=n.cell,u=()=>Cs.removeHighlighter(s);l.on("removed",u),l.model&&l.model.on("reseted",u),n.container.appendChild(a),Cs.setCache(s,a)},unhighlight(n,t,e){Cs.removeHighlighter(Cs.getHighlighterId(t,e))}};var Cs;(function(n){function t(o,a){return ku(o),o.id+JSON.stringify(a)}n.getHighlighterId=t;const e={};function s(o,a){e[o]=a}n.setCache=s;function r(o){return e[o]!=null}n.hasCache=r;function i(o){const a=e[o];a&&(ze(a),delete e[o])}n.removeHighlighter=i})(Cs||(Cs={}));const TL=Object.freeze(Object.defineProperty({__proto__:null,className:OL,opacity:ML,stroke:AL},Symbol.toStringTag,{value:"Module"}));var qn;(function(n){function t(e,s){if(typeof s.highlight!="function")throw new Error(`Highlighter '${e}' is missing required \`highlight()\` method`);if(typeof s.unhighlight!="function")throw new Error(`Highlighter '${e}' is missing required \`unhighlight()\` method`)}n.check=t})(qn||(qn={})),function(n){n.presets=TL,n.registry=Ft.create({type:"highlighter"}),n.registry.register(n.presets,!0)}(qn||(qn={}));function Zu(n,t={}){return new O(an(t.x,n.width),an(t.y,n.height))}function Qu(n,t,e){return Object.assign({angle:t,position:n.toJSON()},e)}const NL=(n,t)=>n.map(({x:e,y:s,angle:r})=>Qu(Zu(t,{x:e,y:s}),r||0)),_L=(n,t,e)=>{const s=e.start||0,r=e.step||20;return Zy(n,t,s,(i,o)=>(i+.5-o/2)*r)},kL=(n,t,e)=>{const s=e.start||0,r=e.step||360/n.length;return Zy(n,t,s,i=>i*r)};function Zy(n,t,e,s){const r=t.getCenter(),i=t.getTopCenter(),o=t.width/t.height,a=un.fromRect(t),l=n.length;return n.map((u,h)=>{const f=e+s(h,l),d=i.clone().rotate(-f,r).scale(o,1,r),g=u.compensateRotate?-a.tangentTheta(d):0;return(u.dx||u.dy)&&d.translate(u.dx||0,u.dy||0),u.dr&&d.move(r,u.dr),Qu(d.round(),g,u)})}var DL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const RL=(n,t,e)=>{const s=Zu(t,e.start||t.getOrigin()),r=Zu(t,e.end||t.getCorner());return oo(n,s,r,e)},IL=(n,t,e)=>oo(n,t.getTopLeft(),t.getBottomLeft(),e),LL=(n,t,e)=>oo(n,t.getTopRight(),t.getBottomRight(),e),BL=(n,t,e)=>oo(n,t.getTopLeft(),t.getTopRight(),e),VL=(n,t,e)=>oo(n,t.getBottomLeft(),t.getBottomRight(),e);function oo(n,t,e,s){const r=new W(t,e),i=n.length;return n.map((o,a)=>{var{strict:l}=o,u=DL(o,["strict"]);const h=l||s.strict?(a+1)/(i+1):(a+.5)/i,f=r.pointAt(h);return(u.dx||u.dy)&&f.translate(u.dx||0,u.dy||0),Qu(f.round(),0,u)})}const jL=Object.freeze(Object.defineProperty({__proto__:null,absolute:NL,bottom:VL,ellipse:_L,ellipseSpread:kL,left:IL,line:RL,right:LL,top:BL},Symbol.toStringTag,{value:"Module"}));var Qs;(function(n){n.presets=jL,n.registry=Ft.create({type:"port layout"}),n.registry.register(n.presets,!0)})(Qs||(Qs={}));const $L={position:{x:0,y:0},angle:0,attrs:{".":{y:"0","text-anchor":"start"}}};function Ss(n,t){const{x:e,y:s,angle:r,attrs:i}=t||{};return ig({},{angle:r,attrs:i,position:{x:e,y:s}},n,$L)}const zL=(n,t,e)=>Ss({position:t.getTopLeft()},e),FL=(n,t,e)=>Ss({position:{x:-15,y:0},attrs:{".":{y:".3em","text-anchor":"end"}}},e),HL=(n,t,e)=>Ss({position:{x:15,y:0},attrs:{".":{y:".3em","text-anchor":"start"}}},e),UL=(n,t,e)=>Ss({position:{x:0,y:-15},attrs:{".":{"text-anchor":"middle"}}},e),GL=(n,t,e)=>Ss({position:{x:0,y:15},attrs:{".":{y:".6em","text-anchor":"middle"}}},e),YL=(n,t,e)=>Qy(n,t,!1,e),WL=(n,t,e)=>Qy(n,t,!0,e),qL=(n,t,e)=>tb(n,t,!1,e),JL=(n,t,e)=>tb(n,t,!0,e);function Qy(n,t,e,s){const r=s.offset!=null?s.offset:15,i=t.getCenter().theta(n),o=eb(t);let a,l,u,h,f=0;return i<o[1]||i>o[2]?(a=".3em",l=r,u=0,h="start"):i<o[0]?(a="0",l=0,u=-r,e?(f=-90,h="start"):h="middle"):i<o[3]?(a=".3em",l=-r,u=0,h="end"):(a=".6em",l=0,u=r,e?(f=90,h="start"):h="middle"),Ss({position:{x:Math.round(l),y:Math.round(u)},angle:f,attrs:{".":{y:a,"text-anchor":h}}},s)}function tb(n,t,e,s){const r=s.offset!=null?s.offset:15,i=t.getCenter().theta(n),o=eb(t);let a,l,u,h,f=0;return i<o[1]||i>o[2]?(a=".3em",l=-r,u=0,h="end"):i<o[0]?(a=".6em",l=0,u=r,e?(f=90,h="start"):h="middle"):i<o[3]?(a=".3em",l=r,u=0,h="start"):(a="0em",l=0,u=-r,e?(f=-90,h="start"):h="middle"),Ss({position:{x:Math.round(l),y:Math.round(u)},angle:f,attrs:{".":{y:a,"text-anchor":h}}},s)}function eb(n){const t=n.getCenter(),e=t.theta(n.getTopLeft()),s=t.theta(n.getBottomLeft()),r=t.theta(n.getBottomRight()),i=t.theta(n.getTopRight());return[e,i,r,s]}const XL=(n,t,e)=>nb(n.diff(t.getCenter()),!1,e),KL=(n,t,e)=>nb(n.diff(t.getCenter()),!0,e);function nb(n,t,e){const s=e.offset!=null?e.offset:20,r=new O(0,0),i=-n.theta(r),o=n.clone().move(r,s).diff(n).round();let a=".3em",l,u=i;return(i+90)%180===0?(l=t?"end":"middle",!t&&i===-270&&(a="0em")):i>-270&&i<-90?(l="start",u=i-180):l="end",Ss({position:o.round().toJSON(),angle:t?u:0,attrs:{".":{y:a,"text-anchor":l}}},e)}const ZL=Object.freeze(Object.defineProperty({__proto__:null,bottom:GL,inside:qL,insideOriented:JL,left:FL,manual:zL,outside:YL,outsideOriented:WL,radial:XL,radialOriented:KL,right:HL,top:UL},Symbol.toStringTag,{value:"Module"}));var Gr;(function(n){n.presets=ZL,n.registry=Ft.create({type:"port label layout"}),n.registry.register(n.presets,!0)})(Gr||(Gr={}));var QL=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class pt extends Nt{get priority(){return 2}get disposeContainer(){return!0}constructor(){super(),this.cid=th.uniqueId(),pt.views[this.cid]=this}confirmUpdate(t,e){return 0}empty(t=this.container){return qi(t),this}unmount(t=this.container){return ze(t),this}remove(t=this.container){return t===this.container?(this.removeEventListeners(document),this.onRemove(),delete pt.views[this.cid],this.disposeContainer&&this.unmount(t)):this.unmount(t),this}onRemove(){}setClass(t,e=this.container){e.classList.value=Array.isArray(t)?t.join(" "):t}addClass(t,e=this.container){return J(e,Array.isArray(t)?t.join(" "):t),this}removeClass(t,e=this.container){return Dt(e,Array.isArray(t)?t.join(" "):t),this}setStyle(t,e=this.container){return qt(e,t),this}setAttrs(t,e=this.container){return t!=null&&e!=null&&ut(e,t),this}findAttr(t,e=this.container){let s=e;for(;s&&s.nodeType===1;){const r=s.getAttribute(t);if(r!=null)return r;if(s===this.container)return null;s=s.parentNode}return null}find(t,e=this.container,s=this.selectors){return pt.find(t,e,s).elems}findOne(t,e=this.container,s=this.selectors){const r=this.find(t,e,s);return r.length>0?r[0]:null}findByAttr(t,e=this.container){let s=e;for(;s&&s.getAttribute;){const r=s.getAttribute(t);if((r!=null||s===this.container)&&r!=="false")return s;s=s.parentNode}return null}getSelector(t,e){let s;if(t===this.container)return typeof e=="string"&&(s=`> ${e}`),s;if(t){const r=Ru(t)+1;s=`${t.tagName.toLowerCase()}:nth-child(${r})`,e&&(s+=` > ${e}`),s=this.getSelector(t.parentNode,s)}return s}prefixClassName(t){return Ue.prefix(t)}delegateEvents(t,e){if(t==null)return this;e||this.undelegateEvents();const s=/^(\S+)\s*(.*)$/;return Object.keys(t).forEach(r=>{const i=r.match(s);if(i==null)return;const o=this.getEventHandler(t[r]);typeof o=="function"&&this.delegateEvent(i[1],i[2],o)}),this}undelegateEvents(){return le.off(this.container,this.getEventNamespace()),this}delegateDocumentEvents(t,e){return this.addEventListeners(document,t,e),this}undelegateDocumentEvents(){return this.removeEventListeners(document),this}delegateEvent(t,e,s){return le.on(this.container,t+this.getEventNamespace(),e,s),this}undelegateEvent(t,e,s){const r=t+this.getEventNamespace();return e==null?le.off(this.container,r):typeof e=="string"?le.off(this.container,r,e,s):le.off(this.container,r,e),this}addEventListeners(t,e,s){if(e==null)return this;const r=this.getEventNamespace();return Object.keys(e).forEach(i=>{const o=this.getEventHandler(e[i]);typeof o=="function"&&le.on(t,i+r,s,o)}),this}removeEventListeners(t){return t!=null&&le.off(t,this.getEventNamespace()),this}getEventNamespace(){return`.${Ue.prefixCls}-event-${this.cid}`}getEventHandler(t){let e;if(typeof t=="string"){const s=this[t];typeof s=="function"&&(e=(...r)=>s.call(this,...r))}else e=(...s)=>t.call(this,...s);return e}getEventTarget(t,e={}){const{target:s,type:r,clientX:i=0,clientY:o=0}=t;return e.fromPoint||r==="touchmove"||r==="touchend"?document.elementFromPoint(i,o):s}stopPropagation(t){return this.setEventData(t,{propagationStopped:!0}),this}isPropagationStopped(t){return this.getEventData(t).propagationStopped===!0}getEventData(t){return this.eventData(t)}setEventData(t,e){return this.eventData(t,e)}eventData(t,e){if(t==null)throw new TypeError("Event object required");let s=t.data;const r=`__${this.cid}__`;return e==null?s==null?{}:s[r]||{}:(s==null&&(s=t.data={}),s[r]==null?s[r]=Object.assign({},e):s[r]=Object.assign(Object.assign({},s[r]),e),s[r])}normalizeEvent(t){return pt.normalizeEvent(t)}dispose(){this.remove()}}QL([pt.dispose()],pt.prototype,"dispose",null),function(n){function t(r,i){return i?cn(r||"g"):Du(r||"div")}n.createElement=t;function e(r,i,o){if(!r||r===".")return{elems:[i]};if(o){const a=o[r];if(a)return{elems:Array.isArray(a)?a:[a]}}{const a=r.includes(">")?`:scope ${r}`:r;return{isCSSSelector:!0,elems:Array.prototype.slice.call(i.querySelectorAll(a))}}}n.find=e;function s(r){let i=r;const o=r.originalEvent,a=o&&o.changedTouches&&o.changedTouches[0];if(a){for(const l in r)a[l]===void 0&&(a[l]=r[l]);i=a}return i}n.normalizeEvent=s}(pt||(pt={})),function(n){n.views={};function t(e){return n.views[e]||null}n.getView=t}(pt||(pt={}));var th;(function(n){let t=0;function e(){const s=`v${t}`;return t+=1,s}n.uniqueId=e})(th||(th={}));class tB{constructor(t){this.view=t,this.clean()}clean(){this.elemCache&&this.elemCache.dispose(),this.elemCache=new Wu,this.pathCache={}}get(t){return this.elemCache.has(t)||this.elemCache.set(t,{}),this.elemCache.get(t)}getData(t){const e=this.get(t);return e.data||(e.data={}),e.data}getMatrix(t){const e=this.get(t);if(e.matrix==null){const s=this.view.container;e.matrix=UR(t,s)}return ne(e.matrix)}getShape(t){const e=this.get(t);return e.shape==null&&(e.shape=vt.toGeometryShape(t)),e.shape.clone()}getBoundingRect(t){const e=this.get(t);return e.boundingRect==null&&(e.boundingRect=vt.getBBoxV2(t)),e.boundingRect.clone()}}var _t;(function(n){function t(u){return u!=null&&!e(u)}n.isJSONMarkup=t;function e(u){return u!=null&&typeof u=="string"}n.isStringMarkup=e;function s(u){return u==null||e(u)?u:Tt(u)}n.clone=s;function r(u){return`${u}`.trim().replace(/[\r|\n]/g," ").replace(/>\s+</g,"><")}n.sanitize=r;function i(u,h={ns:ee.svg}){const f=document.createDocumentFragment(),d={},g={},p=[{markup:Array.isArray(u)?u:[u],parent:f,ns:h.ns}];for(;p.length>0;){const m=p.pop();let y=m.ns||ee.svg;const b=m.markup,w=m.parent;b.forEach(x=>{const v=x.tagName;if(!v)throw new TypeError("Invalid tagName");x.ns&&(y=x.ns);const S=y?Du(v,y):sy(v),E=x.attrs;E&&ut(S,Ji(E));const C=x.style;C&&qt(S,C);const M=x.className;M!=null&&S.setAttribute("class",Array.isArray(M)?M.join(" "):M),x.textContent&&(S.textContent=x.textContent);const T=x.selector;if(T!=null){if(g[T])throw new TypeError("Selector must be unique");g[T]=S}if(x.groupSelector){let _=x.groupSelector;Array.isArray(_)||(_=[_]),_.forEach(D=>{d[D]||(d[D]=[]),d[D].push(S)})}w.appendChild(S);const k=x.children;Array.isArray(k)&&p.push({ns:y,markup:k,parent:S})})}return Object.keys(d).forEach(m=>{if(g[m])throw new Error("Ambiguous group selector");g[m]=d[m]}),{fragment:f,selectors:g,groups:d}}n.parseJSONMarkup=i;function o(u){return u instanceof SVGElement?cn("g"):sy("div")}function a(u){if(e(u)){const g=tt.createVectors(u),p=g.length;if(p===1)return{elem:g[0].node};if(p>1){const m=o(g[0].node);return g.forEach(y=>{m.appendChild(y.node)}),{elem:m}}return{}}const h=i(u),f=h.fragment;let d=null;return f.childNodes.length>1?(d=o(f.firstChild),d.appendChild(f)):d=f.firstChild,{elem:d,selectors:h.selectors}}n.renderMarkup=a;function l(u){const h=tt.createVectors(u),f=document.createDocumentFragment();for(let d=0,g=h.length;d<g;d+=1){const p=h[d].node;f.appendChild(p)}return{fragment:f,selectors:{}}}n.parseLabelStringMarkup=l})(_t||(_t={})),function(n){function t(e,s,r){if(e!=null){let i;const o=e.tagName.toLowerCase();if(e===s)return typeof r=="string"?i=`> ${o} > ${r}`:i=`> ${o}`,i;const a=e.parentNode;if(a&&a.childNodes.length>1){const l=Ru(e)+1;i=`${o}:nth-child(${l})`}else i=o;return r&&(i+=` > ${r}`),t(e.parentNode,s,i)}return r}n.getSelector=t}(_t||(_t={})),function(n){function t(){return"g"}n.getPortContainerMarkup=t;function e(){return{tagName:"circle",selector:"circle",attrs:{r:10,fill:"#FFFFFF",stroke:"#000000"}}}n.getPortMarkup=e;function s(){return{tagName:"text",selector:"text",attrs:{fill:"#000000"}}}n.getPortLabelMarkup=s}(_t||(_t={})),function(n){function t(){return[{tagName:"path",selector:"wrap",groupSelector:"lines",attrs:{fill:"none",cursor:"pointer",stroke:"transparent",strokeLinecap:"round"}},{tagName:"path",selector:"line",groupSelector:"lines",attrs:{fill:"none",pointerEvents:"none"}}]}n.getEdgeMarkup=t}(_t||(_t={})),function(n){function t(e=!1){return{tagName:"foreignObject",selector:"fo",children:[{ns:ee.xhtml,tagName:"body",selector:"foBody",attrs:{xmlns:ee.xhtml},style:{width:"100%",height:"100%",background:"transparent"},children:e?[]:[{tagName:"div",selector:"foContent",style:{width:"100%",height:"100%"}}]}]}}n.getForeignObjectMarkup=t}(_t||(_t={}));class sb{constructor(t){this.view=t}get cell(){return this.view.cell}getDefinition(t){return this.cell.getAttrDefinition(t)}processAttrs(t,e){let s,r,i,o;const a=[];return Object.keys(e).forEach(l=>{const u=e[l],h=this.getDefinition(l),f=X(On.isValidDefinition,this.view,h,u,{elem:t,attrs:e,cell:this.cell,view:this.view});if(h&&f)typeof h=="string"?(s==null&&(s={}),s[h]=u):u!==null&&a.push({name:l,definition:h});else{s==null&&(s={});const d=ay.includes(l)?l:jm(l);s[d]=u}}),a.forEach(({name:l,definition:u})=>{const h=e[l];typeof u.set=="function"&&(r==null&&(r={}),r[l]=h),typeof u.offset=="function"&&(i==null&&(i={}),i[l]=h),typeof u.position=="function"&&(o==null&&(o={}),o[l]=h)}),{raw:e,normal:s,set:r,offset:i,position:o}}mergeProcessedAttrs(t,e){t.set=Object.assign(Object.assign({},t.set),e.set),t.position=Object.assign(Object.assign({},t.position),e.position),t.offset=Object.assign(Object.assign({},t.offset),e.offset);const s=t.normal&&t.normal.transform;s!=null&&e.normal&&(e.normal.transform=s),t.normal=e.normal}findAttrs(t,e,s,r){const i=[],o=new Wu;return Object.keys(t).forEach(a=>{const l=t[a];if(!bn(l))return;const{isCSSSelector:u,elems:h}=pt.find(a,e,r);s[a]=h;for(let f=0,d=h.length;f<d;f+=1){const g=h[f],p=r&&r[a]===g,m=o.get(g);if(m){m.array||(i.push(g),m.array=!0,m.attrs=[m.attrs],m.priority=[m.priority]);const y=m.attrs,b=m.priority;if(p)y.unshift(l),b.unshift(-1);else{const w=x2(b,u?-1:d);y.splice(w,0,l),b.splice(w,0,d)}}else o.set(g,{elem:g,attrs:l,priority:p?-1:d,array:!1})}}),i.forEach(a=>{const l=o.get(a),u=l.attrs;l.attrs=u.reduceRight((h,f)=>Yt(h,f),{})}),o}updateRelativeAttrs(t,e,s){const r=e.raw||{};let i=e.normal||{};const o=e.set,a=e.position,l=e.offset,u=()=>({elem:t,cell:this.cell,view:this.view,attrs:r,refBBox:s.clone()});if(o!=null&&Object.keys(o).forEach(y=>{const b=o[y],w=this.getDefinition(y);if(w!=null){const x=X(w.set,this.view,b,u());typeof x=="object"?i=Object.assign(Object.assign({},i),x):x!=null&&(i[y]=x)}}),t instanceof HTMLElement){this.view.setAttrs(i,t);return}const h=i.transform,f=h?`${h}`:null,d=Zi(f),g=new O(d.e,d.f);h&&(delete i.transform,d.e=0,d.f=0);let p=!1;a!=null&&Object.keys(a).forEach(y=>{const b=a[y],w=this.getDefinition(y);if(w!=null){const x=X(w.position,this.view,b,u());x!=null&&(p=!0,g.translate(O.create(x)))}}),this.view.setAttrs(i,t);let m=!1;if(l!=null){const y=this.view.getBoundingRectOfElement(t);if(y.width>0&&y.height>0){const b=vt.transformRectangle(y,d);Object.keys(l).forEach(w=>{const x=l[w],v=this.getDefinition(w);if(v!=null){const S=X(v.offset,this.view,x,{elem:t,cell:this.cell,view:this.view,attrs:r,refBBox:b});S!=null&&(m=!0,g.translate(O.create(S)))}})}}(h!=null||p||m)&&(g.round(1),d.e=g.x,d.f=g.y,t.setAttribute("transform",Br(d)))}update(t,e,s){const r={},i=this.findAttrs(s.attrs||e,t,r,s.selectors),o=s.attrs?this.findAttrs(e,t,r,s.selectors):i,a=[];i.each(h=>{const f=h.elem,d=h.attrs,g=this.processAttrs(f,d);if(g.set==null&&g.position==null&&g.offset==null)this.view.setAttrs(g.normal,f);else{const p=o.get(f),m=p?p.attrs:null,y=m&&d.ref==null?m.ref:d.ref;let b;if(y){if(b=(r[y]||this.view.find(y,t,s.selectors))[0],!b)throw new Error(`"${y}" reference does not exist.`)}else b=null;const w={node:f,refNode:b,attributes:m,processedAttributes:g},x=a.findIndex(v=>v.refNode===f);x>-1?a.splice(x,0,w):a.push(w)}});const l=new Wu;let u;a.forEach(h=>{const f=h.node,d=h.refNode;let g;const p=d!=null&&s.rotatableNode!=null&&Iu(s.rotatableNode,d);if(d&&(g=l.get(d)),!g){const b=p?s.rotatableNode:t;g=d?vt.getBBox(d,{target:b}):s.rootBBox,d&&l.set(d,g)}let m;s.attrs&&h.attributes?(m=this.processAttrs(f,h.attributes),this.mergeProcessedAttrs(m,h.processedAttributes)):m=h.processedAttributes;let y=g;p&&s.rotatableNode!=null&&!s.rotatableNode.contains(f)&&(u||(u=Zi(ut(s.rotatableNode,"transform"))),y=vt.transformRectangle(g,u)),this.updateRelativeAttrs(f,m,y)})}}class rb{get cell(){return this.view.cell}constructor(t,e,s=[]){this.view=t;const r={},i={};let o=0;Object.keys(e).forEach(l=>{let u=e[l];Array.isArray(u)||(u=[u]),u.forEach(h=>{let f=r[h];f||(o+=1,f=r[h]=1<<o),i[l]|=f})});let a=s;if(Array.isArray(a)||(a=[a]),a.forEach(l=>{r[l]||(o+=1,r[l]=1<<o)}),o>25)throw new Error("Maximum number of flags exceeded.");this.flags=r,this.attrs=i,this.bootstrap=s}getFlag(t){const e=this.flags;return e==null?0:Array.isArray(t)?t.reduce((s,r)=>s|e[r],0):e[t]|0}hasAction(t,e){return t&this.getFlag(e)}removeAction(t,e){return t^t&this.getFlag(e)}getBootstrapFlag(){return this.getFlag(this.bootstrap)}getChangedFlag(){let t=0;return this.attrs&&Object.keys(this.attrs).forEach(e=>{this.cell.hasChanged(e)&&(t|=this.attrs[e])}),t}}var eB=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i},nB=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class Ht extends pt{static getDefaults(){return this.defaults}static config(t){this.defaults=this.getOptions(t)}static getOptions(t){const e=(u,h)=>h!=null?hg([...Array.isArray(u)?u:[u],...Array.isArray(h)?h:[h]]):Array.isArray(u)?[...u]:[u],s=Tt(this.getDefaults()),{bootstrap:r,actions:i,events:o,documentEvents:a}=t,l=nB(t,["bootstrap","actions","events","documentEvents"]);return r&&(s.bootstrap=e(s.bootstrap,r)),i&&Object.entries(i).forEach(([u,h])=>{const f=s.actions[u];h&&f?s.actions[u]=e(f,h):h&&(s.actions[u]=e(h))}),o&&(s.events=Object.assign(Object.assign({},s.events),o)),t.documentEvents&&(s.documentEvents=Object.assign(Object.assign({},s.documentEvents),a)),Yt(s,l)}get[Symbol.toStringTag](){return Ht.toStringTag}constructor(t,e={}){super(),this.cell=t,this.options=this.ensureOptions(e),this.graph=this.options.graph,this.attr=new sb(this),this.flag=new rb(this,this.options.actions,this.options.bootstrap),this.cache=new tB(this),this.setContainer(this.ensureContainer()),this.setup(),this.init()}init(){}onRemove(){this.removeTools()}get priority(){return this.options.priority}get rootSelector(){return this.options.rootSelector}getConstructor(){return this.constructor}ensureOptions(t){return this.getConstructor().getOptions(t)}getContainerTagName(){return this.options.isSvgElement?"g":"div"}getContainerStyle(){}getContainerAttrs(){return{"data-cell-id":this.cell.id,"data-shape":this.cell.shape}}getContainerClassName(){return this.prefixClassName("cell")}ensureContainer(){return pt.createElement(this.getContainerTagName(),this.options.isSvgElement)}setContainer(t){if(this.container!==t){this.undelegateEvents(),this.container=t,this.options.events!=null&&this.delegateEvents(this.options.events);const e=this.getContainerAttrs();e!=null&&this.setAttrs(e,t);const s=this.getContainerStyle();s!=null&&this.setStyle(s,t);const r=this.getContainerClassName();r!=null&&this.addClass(r,t)}return this}isNodeView(){return!1}isEdgeView(){return!1}render(){return this}confirmUpdate(t,e={}){return 0}getBootstrapFlag(){return this.flag.getBootstrapFlag()}getFlag(t){return this.flag.getFlag(t)}hasAction(t,e){return this.flag.hasAction(t,e)}removeAction(t,e){return this.flag.removeAction(t,e)}handleAction(t,e,s,r){if(this.hasAction(t,e)){s();const i=[e];return r&&(typeof r=="string"?i.push(r):i.push(...r)),this.removeAction(t,i)}return t}setup(){this.cell.on("changed",this.onCellChanged,this)}onCellChanged({options:t}){this.onAttrsChange(t)}onAttrsChange(t){let e=this.flag.getChangedFlag();t.updated||!e||(t.dirty&&this.hasAction(e,"update")&&(e|=this.getFlag("render")),t.toolId&&(t.async=!1),this.graph!=null&&this.graph.renderer.requestViewUpdate(this,e,t))}parseJSONMarkup(t,e){const s=_t.parseJSONMarkup(t),r=s.selectors,i=this.rootSelector;if(e&&i){if(r[i])throw new Error("Invalid root selector");r[i]=e}return s}can(t){let e=this.graph.options.interacting;if(typeof e=="function"&&(e=X(e,this.graph,this)),typeof e=="object"){let s=e[t];return typeof s=="function"&&(s=X(s,this.graph,this)),s!==!1}return typeof e=="boolean"?e:!1}cleanCache(){return this.cache.clean(),this}getCache(t){return this.cache.get(t)}getDataOfElement(t){return this.cache.getData(t)}getMatrixOfElement(t){return this.cache.getMatrix(t)}getShapeOfElement(t){return this.cache.getShape(t)}getBoundingRectOfElement(t){return this.cache.getBoundingRect(t)}getBBoxOfElement(t){const e=this.getBoundingRectOfElement(t),s=this.getMatrixOfElement(t),r=this.getRootRotatedMatrix(),i=this.getRootTranslatedMatrix();return vt.transformRectangle(e,i.multiply(r).multiply(s))}getUnrotatedBBoxOfElement(t){const e=this.getBoundingRectOfElement(t),s=this.getMatrixOfElement(t),r=this.getRootTranslatedMatrix();return vt.transformRectangle(e,r.multiply(s))}getBBox(t={}){let e;if(t.useCellGeometry){const s=this.cell,r=s.isNode()?s.getAngle():0;e=s.getBBox().bbox(r)}else e=this.getBBoxOfElement(this.container);return this.graph.coord.localToGraphRect(e)}getRootTranslatedMatrix(){const t=this.cell,e=t.isNode()?t.getPosition():{x:0,y:0};return ne().translate(e.x,e.y)}getRootRotatedMatrix(){let t=ne();const e=this.cell,s=e.isNode()?e.getAngle():0;if(s){const r=e.getBBox(),i=r.width/2,o=r.height/2;t=t.translate(i,o).rotate(s).translate(-i,-o)}return t}findMagnet(t=this.container){return this.findByAttr("magnet",t)}updateAttrs(t,e,s={}){s.rootBBox==null&&(s.rootBBox=new z),s.selectors==null&&(s.selectors=this.selectors),this.attr.update(t,e,s)}isEdgeElement(t){return this.cell.isEdge()&&(t==null||t===this.container)}prepareHighlight(t,e={}){const s=t||this.container;return e.partial=s===this.container,s}highlight(t,e={}){const s=this.prepareHighlight(t,e);return this.notify("cell:highlight",{magnet:s,options:e,view:this,cell:this.cell}),this.isEdgeView()?this.notify("edge:highlight",{magnet:s,options:e,view:this,edge:this.cell,cell:this.cell}):this.isNodeView()&&this.notify("node:highlight",{magnet:s,options:e,view:this,node:this.cell,cell:this.cell}),this}unhighlight(t,e={}){const s=this.prepareHighlight(t,e);return this.notify("cell:unhighlight",{magnet:s,options:e,view:this,cell:this.cell}),this.isNodeView()?this.notify("node:unhighlight",{magnet:s,options:e,view:this,node:this.cell,cell:this.cell}):this.isEdgeView()&&this.notify("edge:unhighlight",{magnet:s,options:e,view:this,edge:this.cell,cell:this.cell}),this}notifyUnhighlight(t,e){}getEdgeTerminal(t,e,s,r,i){const o=this.cell,a=this.findAttr("port",t),l=t.getAttribute("data-selector"),u={cell:o.id};return l!=null&&(u.magnet=l),a!=null?(u.port=a,o.isNode()&&!o.hasPort(a)&&l==null&&(u.selector=this.getSelector(t))):l==null&&this.container!==t&&(u.selector=this.getSelector(t)),u}getMagnetFromEdgeTerminal(t){const e=this.cell,s=this.container,r=t.port;let i=t.magnet,o;return r!=null&&e.isNode()&&e.hasPort(r)?o=this.findPortElem(r,i)||s:(i||(i=t.selector),!i&&r!=null&&(i=`[port="${r}"]`),o=this.findOne(i,s,this.selectors)),o}hasTools(t){const e=this.tools;return e==null?!1:t==null?!0:e.name===t}addTools(t){if(this.removeTools(),t){if(!this.can("toolsAddable"))return this;const e=Jt.isToolsView(t)?t:new Jt(t);this.tools=e,e.config({view:this}),e.mount()}return this}updateTools(t={}){return this.tools&&this.tools.update(t),this}removeTools(){return this.tools&&(this.tools.remove(),this.tools=null),this}hideTools(){return this.tools&&this.tools.hide(),this}showTools(){return this.tools&&this.tools.show(),this}renderTools(){const t=this.cell.getTools();return this.addTools(t),this}notify(t,e){return this.trigger(t,e),this.graph.trigger(t,e),this}getEventArgs(t,e,s){const r=this,i=r.cell;return e==null||s==null?{e:t,view:r,cell:i}:{e:t,x:e,y:s,view:r,cell:i}}onClick(t,e,s){this.notify("cell:click",this.getEventArgs(t,e,s))}onDblClick(t,e,s){this.notify("cell:dblclick",this.getEventArgs(t,e,s))}onContextMenu(t,e,s){this.notify("cell:contextmenu",this.getEventArgs(t,e,s))}onMouseDown(t,e,s){this.cell.model&&(this.cachedModelForMouseEvent=this.cell.model,this.cachedModelForMouseEvent.startBatch("mouse")),this.notify("cell:mousedown",this.getEventArgs(t,e,s))}onMouseUp(t,e,s){this.notify("cell:mouseup",this.getEventArgs(t,e,s)),this.cachedModelForMouseEvent&&(this.cachedModelForMouseEvent.stopBatch("mouse",{cell:this.cell}),this.cachedModelForMouseEvent=null)}onMouseMove(t,e,s){this.notify("cell:mousemove",this.getEventArgs(t,e,s))}onMouseOver(t){this.notify("cell:mouseover",this.getEventArgs(t))}onMouseOut(t){this.notify("cell:mouseout",this.getEventArgs(t))}onMouseEnter(t){this.notify("cell:mouseenter",this.getEventArgs(t))}onMouseLeave(t){this.notify("cell:mouseleave",this.getEventArgs(t))}onMouseWheel(t,e,s,r){this.notify("cell:mousewheel",Object.assign({delta:r},this.getEventArgs(t,e,s)))}onCustomEvent(t,e,s,r){this.notify("cell:customevent",Object.assign({name:e},this.getEventArgs(t,s,r))),this.notify(e,Object.assign({},this.getEventArgs(t,s,r)))}onMagnetMouseDown(t,e,s,r){}onMagnetDblClick(t,e,s,r){}onMagnetContextMenu(t,e,s,r){}onLabelMouseDown(t,e,s){}checkMouseleave(t){const e=this.getEventTarget(t,{fromPoint:!0}),s=this.graph.findViewByElem(e);s!==this&&(this.onMouseLeave(t),s&&s.onMouseEnter(t))}dispose(){this.cell.off("changed",this.onCellChanged,this)}}Ht.defaults={isSvgElement:!0,rootSelector:"root",priority:0,bootstrap:[],actions:{}},eB([Ht.dispose()],Ht.prototype,"dispose",null),function(n){n.Flag=rb,n.Attr=sb}(Ht||(Ht={})),function(n){n.toStringTag=`X6.${n.name}`;function t(e){if(e==null)return!1;if(e instanceof n)return!0;const s=e[Symbol.toStringTag],r=e;return(s==null||s===n.toStringTag)&&typeof r.isNodeView=="function"&&typeof r.isEdgeView=="function"&&typeof r.confirmUpdate=="function"}n.isCellView=t}(Ht||(Ht={})),function(n){function t(s){return function(r){r.config({priority:s})}}n.priority=t;function e(s){return function(r){r.config({bootstrap:s})}}n.bootstrap=e}(Ht||(Ht={})),function(n){n.registry=Ft.create({type:"view"})}(Ht||(Ht={}));class Jt extends pt{get name(){return this.options.name}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get[Symbol.toStringTag](){return Jt.toStringTag}constructor(t={}){super(),this.svgContainer=this.createContainer(!0,t),this.htmlContainer=this.createContainer(!1,t),this.config(t)}createContainer(t,e){const s=t?pt.createElement("g",!0):pt.createElement("div",!1);return J(s,this.prefixClassName("cell-tools")),e.className&&J(s,e.className),s}config(t){if(this.options=Object.assign(Object.assign({},this.options),t),!Ht.isCellView(t.view)||t.view===this.cellView)return this;this.cellView=t.view,this.cell.isEdge()?(J(this.svgContainer,this.prefixClassName("edge-tools")),J(this.htmlContainer,this.prefixClassName("edge-tools"))):this.cell.isNode()&&(J(this.svgContainer,this.prefixClassName("node-tools")),J(this.htmlContainer,this.prefixClassName("node-tools"))),this.svgContainer.setAttribute("data-cell-id",this.cell.id),this.htmlContainer.setAttribute("data-cell-id",this.cell.id),this.name&&(this.svgContainer.setAttribute("data-tools-name",this.name),this.htmlContainer.setAttribute("data-tools-name",this.name));const e=this.options.items;if(!Array.isArray(e))return this;this.tools=[];const s=[];e.forEach(r=>{Jt.ToolItem.isToolItem(r)?r.name==="vertices"?s.unshift(r):s.push(r):(typeof r=="object"?r.name:r)==="vertices"?s.unshift(r):s.push(r)});for(let r=0;r<s.length;r+=1){const i=s[r];let o;if(Jt.ToolItem.isToolItem(i))o=i;else{const a=typeof i=="object"?i.name:i,l=typeof i=="object"?i.args||{}:{};if(a){if(this.cell.isNode()){const u=Wr.registry.get(a);if(u)o=new u(l);else return Wr.registry.onNotFound(a)}else if(this.cell.isEdge()){const u=qr.registry.get(a);if(u)o=new u(l);else return qr.registry.onNotFound(a)}}}o&&(o.config(this.cellView,this),o.render(),(o.options.isSVGElement!==!1?this.svgContainer:this.htmlContainer).appendChild(o.container),this.tools.push(o))}return this}update(t={}){const e=this.tools;return e&&e.forEach(s=>{t.toolId!==s.cid&&s.isVisible()&&s.update()}),this}focus(t){const e=this.tools;return e&&e.forEach(s=>{t===s?s.show():s.hide()}),this}blur(t){const e=this.tools;return e&&e.forEach(s=>{s!==t&&!s.isVisible()&&(s.show(),s.update())}),this}hide(){return this.focus(null)}show(){return this.blur(null)}remove(){const t=this.tools;return t&&(t.forEach(e=>e.remove()),this.tools=null),ze(this.svgContainer),ze(this.htmlContainer),super.remove()}mount(){const t=this.tools,e=this.cellView;if(e&&t){const s=t.some(i=>i.options.isSVGElement!==!1),r=t.some(i=>i.options.isSVGElement===!1);s&&(this.options.local?e.container:e.graph.view.decorator).appendChild(this.svgContainer),r&&this.graph.container.appendChild(this.htmlContainer)}return this}}(function(n){n.toStringTag=`X6.${n.name}`;function t(e){if(e==null)return!1;if(e instanceof n)return!0;const s=e[Symbol.toStringTag],r=e;return(s==null||s===n.toStringTag)&&r.graph!=null&&r.cell!=null&&typeof r.config=="function"&&typeof r.update=="function"&&typeof r.focus=="function"&&typeof r.blur=="function"&&typeof r.show=="function"&&typeof r.hide=="function"}n.isToolsView=t})(Jt||(Jt={})),function(n){class t extends pt{static getDefaults(){return this.defaults}static config(s){this.defaults=this.getOptions(s)}static getOptions(s){return Yt(Tt(this.getDefaults()),s)}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get name(){return this.options.name}get[Symbol.toStringTag](){return t.toStringTag}constructor(s={}){super(),this.visible=!0,this.options=this.getOptions(s),this.container=pt.createElement(this.options.tagName||"g",this.options.isSVGElement!==!1),J(this.container,this.prefixClassName("cell-tool")),typeof this.options.className=="string"&&J(this.container,this.options.className),this.init()}init(){}getOptions(s){return this.constructor.getOptions(s)}delegateEvents(){return this.options.events&&super.delegateEvents(this.options.events),this}config(s,r){return this.cellView=s,this.parent=r,this.stamp(this.container),this.cell.isEdge()?J(this.container,this.prefixClassName("edge-tool")):this.cell.isNode()&&J(this.container,this.prefixClassName("node-tool")),this.name&&this.container.setAttribute("data-tool-name",this.name),this.delegateEvents(),this}render(){this.empty();const s=this.options.markup;if(s){const r=_t.parseJSONMarkup(s);this.container.appendChild(r.fragment),this.childNodes=r.selectors}return this.onRender(),this}onRender(){}update(){return this}stamp(s){s&&s.setAttribute("data-cell-id",this.cellView.cell.id)}show(){return this.container.style.display="",this.visible=!0,this}hide(){return this.container.style.display="none",this.visible=!1,this}isVisible(){return this.visible}focus(){const s=this.options.focusOpacity;return s!=null&&Number.isFinite(s)&&(this.container.style.opacity=`${s}`),this.parent.focus(this),this}blur(){return this.container.style.opacity="",this.parent.blur(this),this}guard(s){return this.graph==null||this.cellView==null?!0:this.graph.view.guard(s,this.cellView)}}t.defaults={isSVGElement:!0,tagName:"g"},n.ToolItem=t,function(e){let s=0;function r(o){return o?Pu(o):(s+=1,`CustomTool${s}`)}function i(o){const a=Ou(r(o.name),this);return a.config(o),a}e.define=i}(t=n.ToolItem||(n.ToolItem={})),function(e){e.toStringTag=`X6.${e.name}`;function s(r){if(r==null)return!1;if(r instanceof e)return!0;const i=r[Symbol.toStringTag],o=r;return(i==null||i===e.toStringTag)&&o.graph!=null&&o.cell!=null&&typeof o.config=="function"&&typeof o.update=="function"&&typeof o.focus=="function"&&typeof o.blur=="function"&&typeof o.show=="function"&&typeof o.hide=="function"&&typeof o.isVisible=="function"}e.isToolItem=s}(t=n.ToolItem||(n.ToolItem={}))}(Jt||(Jt={}));const sB=n=>n;function ib(n,t){return t===0?"0%":`${Math.round(n/t*100)}%`}function ob(n){return(e,s,r,i)=>s.isEdgeElement(r)?iB(n,e,s,r,i):rB(n,e,s,r,i)}function rB(n,t,e,s,r){const i=e.cell,o=i.getAngle(),a=e.getUnrotatedBBoxOfElement(s),l=i.getBBox().getCenter(),u=O.create(r).rotate(o,l);let h=u.x-a.x,f=u.y-a.y;return n&&(h=ib(h,a.width),f=ib(f,a.height)),t.anchor={name:"topLeft",args:{dx:h,dy:f,rotate:!0}},t}function iB(n,t,e,s,r){const i=e.getConnection();if(!i)return t;const o=i.closestPointLength(r);if(n){const a=i.length();t.anchor={name:"ratio",args:{ratio:o/a}}}else t.anchor={name:"length",args:{length:o}};return t}const oB=ob(!0),aB=ob(!1),lB=Object.freeze(Object.defineProperty({__proto__:null,noop:sB,pinAbsolute:aB,pinRelative:oB},Symbol.toStringTag,{value:"Module"}));var eh;(function(n){n.presets=lB,n.registry=Ft.create({type:"connection strategy"}),n.registry.register(n.presets,!0)})(eh||(eh={}));function ab(n,t,e,s){return X(eh.presets.pinRelative,this.graph,{},t,e,n,this.cell,s,{}).anchor}function lb(n,t){return t?n.cell.getBBox():n.cell.isEdge()?n.getConnection().bbox():n.getUnrotatedBBoxOfElement(n.container)}class Es extends Jt.ToolItem{onRender(){J(this.container,this.prefixClassName("cell-tool-button")),this.update()}update(){return this.updatePosition(),this}updatePosition(){const e=this.cellView.cell.isEdge()?this.getEdgeMatrix():this.getNodeMatrix();Vr(this.container,e,{absolute:!0})}getNodeMatrix(){const t=this.cellView,e=this.options;let{x:s=0,y:r=0}=e;const{offset:i,useCellGeometry:o,rotate:a}=e;let l=lb(t,o);const u=t.cell.getAngle();a||(l=l.bbox(u));let h=0,f=0;typeof i=="number"?(h=i,f=i):typeof i=="object"&&(h=i.x,f=i.y),s=an(s,l.width),r=an(r,l.height);let d=ne().translate(l.x+l.width/2,l.y+l.height/2);return a&&(d=d.rotate(u)),d=d.translate(s+h-l.width/2,r+f-l.height/2),d}getEdgeMatrix(){const t=this.cellView,e=this.options,{offset:s=0,distance:r=0,rotate:i}=e;let o,a,l;const u=an(r,1);u>=0&&u<=1?o=t.getTangentAtRatio(u):o=t.getTangentAtLength(u),o?(a=o.start,l=o.vector().vectorAngle(new O(1,0))||0):(a=t.getConnection().start,l=0);let h=ne().translate(a.x,a.y).rotate(l);return typeof s=="object"?h=h.translate(s.x||0,s.y||0):h=h.translate(0,s),i||(h=h.rotate(-l)),h}onMouseDown(t){if(this.guard(t))return;t.stopPropagation(),t.preventDefault();const e=this.options.onClick;typeof e=="function"&&X(e,this.cellView,{e:t,view:this.cellView,cell:this.cellView.cell,btn:this})}}(function(n){n.config({name:"button",useCellGeometry:!0,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"}})})(Es||(Es={})),function(n){n.Remove=n.define({name:"button-remove",markup:[{tagName:"circle",selector:"button",attrs:{r:7,fill:"#FF1D00",cursor:"pointer"}},{tagName:"path",selector:"icon",attrs:{d:"M -3 -3 3 3 M -3 3 3 -3",fill:"none",stroke:"#FFFFFF","stroke-width":2,"pointer-events":"none"}}],distance:60,offset:0,useCellGeometry:!0,onClick({view:t,btn:e}){e.parent.remove(),t.cell.remove({ui:!0,toolId:e.cid})}})}(Es||(Es={}));var cB=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class el extends Jt.ToolItem{onRender(){if(J(this.container,this.prefixClassName("cell-tool-boundary")),this.options.attrs){const t=this.options.attrs,{class:e}=t,s=cB(t,["class"]);ut(this.container,Ji(s)),e&&J(this.container,e)}this.update()}update(){const t=this.cellView,e=this.options,{useCellGeometry:s,rotate:r}=e,i=ds(e.padding);let o=lb(t,s).moveAndExpand({x:-i.left,y:-i.top,width:i.left+i.right,height:i.top+i.bottom});const a=t.cell;if(a.isNode()){const l=a.getAngle();if(l)if(r){const u=a.getBBox().getCenter();Hu(this.container,l,u.x,u.y,{absolute:!0})}else o=o.bbox(l)}return ut(this.container,o.toJSON()),this}}(function(n){n.config({name:"boundary",tagName:"rect",padding:10,useCellGeometry:!0,attrs:{fill:"none",stroke:"#333","stroke-width":.5,"stroke-dasharray":"5, 5","pointer-events":"none"}})})(el||(el={}));class ao extends Jt.ToolItem{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}onRender(){return this.addClass(this.prefixClassName("edge-tool-vertices")),this.options.addable&&this.updatePath(),this.resetHandles(),this.renderHandles(),this}update(){return this.vertices.length===this.handles.length?this.updateHandles():(this.resetHandles(),this.renderHandles()),this.options.addable&&this.updatePath(),this}resetHandles(){const t=this.handles;this.handles=[],t&&t.forEach(e=>{this.stopHandleListening(e),e.remove()})}renderHandles(){const t=this.vertices;for(let e=0,s=t.length;e<s;e+=1){const r=t[e],i=this.options.createHandle,o=this.options.processHandle,a=i({index:e,graph:this.graph,guard:l=>this.guard(l),attrs:this.options.attrs||{}});o&&o(a),a.updatePosition(r.x,r.y),this.stamp(a.container),this.container.appendChild(a.container),this.handles.push(a),this.startHandleListening(a)}}updateHandles(){const t=this.vertices;for(let e=0,s=t.length;e<s;e+=1){const r=t[e],i=this.handles[e];i&&i.updatePosition(r.x,r.y)}}updatePath(){const t=this.childNodes.connection;t&&t.setAttribute("d",this.cellView.getConnectionPathData())}startHandleListening(t){const e=this.cellView;e.can("vertexMovable")&&(t.on("change",this.onHandleChange,this),t.on("changing",this.onHandleChanging,this),t.on("changed",this.onHandleChanged,this)),e.can("vertexDeletable")&&t.on("remove",this.onHandleRemove,this)}stopHandleListening(t){const e=this.cellView;e.can("vertexMovable")&&(t.off("change",this.onHandleChange,this),t.off("changing",this.onHandleChanging,this),t.off("changed",this.onHandleChanged,this)),e.can("vertexDeletable")&&t.off("remove",this.onHandleRemove,this)}getNeighborPoints(t){const e=this.cellView,s=this.vertices,r=t>0?s[t-1]:e.sourceAnchor,i=t<s.length-1?s[t+1]:e.targetAnchor;return{prev:O.create(r),next:O.create(i)}}getMouseEventArgs(t){const e=this.normalizeEvent(t),{x:s,y:r}=this.graph.snapToGrid(e.clientX,e.clientY);return{e,x:s,y:r}}onHandleChange({e:t}){this.focus();const e=this.cellView;if(e.cell.startBatch("move-vertex",{ui:!0,toolId:this.cid}),!this.options.stopPropagation){const{e:s,x:r,y:i}=this.getMouseEventArgs(t);this.eventData(s,{start:{x:r,y:i}}),e.notifyMouseDown(s,r,i)}}onHandleChanging({handle:t,e}){const s=this.cellView,r=t.options.index,{e:i,x:o,y:a}=this.getMouseEventArgs(e),l={x:o,y:a};this.snapVertex(l,r),s.cell.setVertexAt(r,l,{ui:!0,toolId:this.cid}),t.updatePosition(l.x,l.y),this.options.stopPropagation||s.notifyMouseMove(i,o,a)}stopBatch(t){this.cell.stopBatch("move-vertex",{ui:!0,toolId:this.cid}),t&&this.cell.stopBatch("add-vertex",{ui:!0,toolId:this.cid})}onHandleChanged({e:t}){const e=this.options,s=this.cellView;if(e.addable&&this.updatePath(),!e.removeRedundancies){this.stopBatch(this.eventData(t).vertexAdded);return}s.removeRedundantLinearVertices({ui:!0,toolId:this.cid})&&this.render(),this.blur(),this.stopBatch(this.eventData(t).vertexAdded);const{e:i,x:o,y:a}=this.getMouseEventArgs(t);if(!this.options.stopPropagation){s.notifyMouseUp(i,o,a);const{start:l}=this.eventData(i);if(l){const{x:u,y:h}=l;u===o&&h===a&&s.onClick(i,o,a)}}s.checkMouseleave(i),e.onChanged&&e.onChanged({edge:s.cell,edgeView:s})}snapVertex(t,e){const s=this.options.snapRadius||0;if(s>0){const r=this.getNeighborPoints(e),i=r.prev,o=r.next;Math.abs(t.x-i.x)<s?t.x=i.x:Math.abs(t.x-o.x)<s&&(t.x=o.x),Math.abs(t.y-i.y)<s?t.y=r.prev.y:Math.abs(t.y-o.y)<s&&(t.y=o.y)}}onHandleRemove({handle:t,e}){if(this.options.removable){const s=t.options.index,r=this.cellView;r.cell.removeVertexAt(s,{ui:!0}),this.options.addable&&this.updatePath(),r.checkMouseleave(this.normalizeEvent(e))}}allowAddVertex(t){const e=this.guard(t),s=this.options.addable&&this.cellView.can("vertexAddable"),r=this.options.modifiers?ms.isMatch(t,this.options.modifiers):!0;return!e&&s&&r}onPathMouseDown(t){const e=this.cellView;if(!this.allowAddVertex(t))return;t.stopPropagation(),t.preventDefault();const s=this.normalizeEvent(t),r=this.graph.snapToGrid(s.clientX,s.clientY).toJSON();e.cell.startBatch("add-vertex",{ui:!0,toolId:this.cid});const i=e.getVertexIndex(r.x,r.y);this.snapVertex(r,i),e.cell.insertVertex(r,i,{ui:!0,toolId:this.cid}),this.render();const o=this.handles[i];this.eventData(s,{vertexAdded:!0}),o.onMouseDown(s)}onRemove(){this.resetHandles()}}(function(n){class t extends pt{get graph(){return this.options.graph}constructor(s){super(),this.options=s,this.render(),this.delegateEvents({mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDoubleClick"})}render(){this.container=pt.createElement("circle",!0);const s=this.options.attrs;if(typeof s=="function"){const r=n.getDefaults();this.setAttrs(Object.assign(Object.assign({},r.attrs),s(this)))}else this.setAttrs(s);this.addClass(this.prefixClassName("edge-tool-vertex"))}updatePosition(s,r){this.setAttrs({cx:s,cy:r})}onMouseDown(s){this.options.guard(s)||(s.stopPropagation(),s.preventDefault(),this.graph.view.undelegateEvents(),this.delegateDocumentEvents({mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},s.data),this.emit("change",{e:s,handle:this}))}onMouseMove(s){this.emit("changing",{e:s,handle:this})}onMouseUp(s){this.emit("changed",{e:s,handle:this}),this.undelegateDocumentEvents(),this.graph.view.delegateEvents()}onDoubleClick(s){this.emit("remove",{e:s,handle:this})}}n.Handle=t})(ao||(ao={})),function(n){const t=Ue.prefix("edge-tool-vertex-path");n.config({name:"vertices",snapRadius:20,addable:!0,removable:!0,removeRedundancies:!0,stopPropagation:!0,attrs:{r:6,fill:"#333",stroke:"#fff",cursor:"move","stroke-width":2},createHandle:e=>new n.Handle(e),markup:[{tagName:"path",selector:"connection",className:t,attrs:{fill:"none",stroke:"transparent","stroke-width":10,cursor:"pointer"}}],events:{[`mousedown .${t}`]:"onPathMouseDown",[`touchstart .${t}`]:"onPathMouseDown"}})}(ao||(ao={}));class lo extends Jt.ToolItem{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}update(){return this.render(),this}onRender(){J(this.container,this.prefixClassName("edge-tool-segments")),this.resetHandles();const t=this.cellView,e=[...this.vertices];e.unshift(t.sourcePoint),e.push(t.targetPoint);for(let s=0,r=e.length;s<r-1;s+=1){const i=e[s],o=e[s+1],a=this.renderHandle(i,o,s);this.stamp(a.container),this.handles.push(a)}return this}renderHandle(t,e,s){const r=this.options.createHandle({index:s,graph:this.graph,guard:i=>this.guard(i),attrs:this.options.attrs||{}});return this.options.processHandle&&this.options.processHandle(r),this.updateHandle(r,t,e),this.container.appendChild(r.container),this.startHandleListening(r),r}startHandleListening(t){t.on("change",this.onHandleChange,this),t.on("changing",this.onHandleChanging,this),t.on("changed",this.onHandleChanged,this)}stopHandleListening(t){t.off("change",this.onHandleChange,this),t.off("changing",this.onHandleChanging,this),t.off("changed",this.onHandleChanged,this)}resetHandles(){const t=this.handles;this.handles=[],t&&t.forEach(e=>{this.stopHandleListening(e),e.remove()})}shiftHandleIndexes(t){const e=this.handles;for(let s=0,r=e.length;s<r;s+=1)e[s].options.index+=t}resetAnchor(t,e){const s=this.cellView.cell,r={ui:!0,toolId:this.cid};e?s.prop([t,"anchor"],e,r):s.removeProp([t,"anchor"],r)}snapHandle(t,e,s){const r=t.options.axis,i=t.options.index,l=this.cellView.cell.getVertices(),u=l[i-2]||s.sourceAnchor,h=l[i+1]||s.targetAnchor,f=this.options.snapRadius;return Math.abs(e[r]-u[r])<f?e[r]=u[r]:Math.abs(e[r]-h[r])<f&&(e[r]=h[r]),e}onHandleChanging({handle:t,e}){const s=this.graph,r=this.options,i=this.cellView,o=r.anchor,a=t.options.axis,l=t.options.index-1,u=this.getEventData(e),h=this.normalizeEvent(e),f=s.snapToGrid(h.clientX,h.clientY),d=this.snapHandle(t,f.clone(),u),g=Tt(this.vertices);let p=g[l],m=g[l+1];const y=i.sourceView,b=i.sourceBBox;let w=!1,x=!1;if(p?l===0?b.containsPoint(p)?(g.shift(),this.shiftHandleIndexes(-1),w=!0):(p[a]=d[a],x=!0):p[a]=d[a]:(p=i.sourceAnchor.toJSON(),p[a]=d[a],b.containsPoint(p)?w=!0:(g.unshift(p),this.shiftHandleIndexes(1),x=!0)),typeof o=="function"&&y){if(w){const M=u.sourceAnchor.clone();M[a]=d[a];const T=X(o,i,M,y,i.sourceMagnet||y.container,"source",i,this);this.resetAnchor("source",T)}x&&this.resetAnchor("source",u.sourceAnchorDef)}const v=i.targetView,S=i.targetBBox;let E=!1,C=!1;if(m?l===g.length-2?S.containsPoint(m)?(g.pop(),E=!0):(m[a]=d[a],C=!0):m[a]=d[a]:(m=i.targetAnchor.toJSON(),m[a]=d[a],S.containsPoint(m)?E=!0:(g.push(m),C=!0)),typeof o=="function"&&v){if(E){const M=u.targetAnchor.clone();M[a]=d[a];const T=X(o,i,M,v,i.targetMagnet||v.container,"target",i,this);this.resetAnchor("target",T)}C&&this.resetAnchor("target",u.targetAnchorDef)}O.equalPoints(g,this.vertices)||this.cellView.cell.setVertices(g,{ui:!0,toolId:this.cid}),this.updateHandle(t,p,m,0),r.stopPropagation||i.notifyMouseMove(h,f.x,f.y)}onHandleChange({handle:t,e}){const s=this.options,r=this.handles,i=this.cellView,o=t.options.index;if(Array.isArray(r)){for(let a=0,l=r.length;a<l;a+=1)a!==o&&r[a].hide();if(this.focus(),this.setEventData(e,{sourceAnchor:i.sourceAnchor.clone(),targetAnchor:i.targetAnchor.clone(),sourceAnchorDef:Tt(this.cell.prop(["source","anchor"])),targetAnchorDef:Tt(this.cell.prop(["target","anchor"]))}),this.cell.startBatch("move-segment",{ui:!0,toolId:this.cid}),!s.stopPropagation){const a=this.normalizeEvent(e),l=this.graph.snapToGrid(a.clientX,a.clientY);i.notifyMouseDown(a,l.x,l.y)}}}onHandleChanged({e:t}){const e=this.options,s=this.cellView;e.removeRedundancies&&s.removeRedundantLinearVertices({ui:!0,toolId:this.cid});const r=this.normalizeEvent(t),i=this.graph.snapToGrid(r.clientX,r.clientY);this.render(),this.blur(),this.cell.stopBatch("move-segment",{ui:!0,toolId:this.cid}),e.stopPropagation||s.notifyMouseUp(r,i.x,i.y),s.checkMouseleave(r),e.onChanged&&e.onChanged({edge:s.cell,edgeView:s})}updateHandle(t,e,s,r=0){const i=this.options.precision||0,o=Math.abs(e.x-s.x)<i,a=Math.abs(e.y-s.y)<i;if(o||a){const l=new W(e,s);if(l.length()<this.options.threshold)t.hide();else{const h=l.getCenter(),f=o?"x":"y";h[f]+=r||0;const d=l.vector().vectorAngle(new O(1,0));t.updatePosition(h.x,h.y,d,this.cellView),t.show(),t.options.axis=f}}else t.hide()}onRemove(){this.resetHandles()}}(function(n){class t extends pt{constructor(s){super(),this.options=s,this.render(),this.delegateEvents({mousedown:"onMouseDown",touchstart:"onMouseDown"})}render(){this.container=pt.createElement("rect",!0);const s=this.options.attrs;if(typeof s=="function"){const r=n.getDefaults();this.setAttrs(Object.assign(Object.assign({},r.attrs),s(this)))}else this.setAttrs(s);this.addClass(this.prefixClassName("edge-tool-segment"))}updatePosition(s,r,i,o){const a=o.getClosestPoint(new O(s,r))||new O(s,r);let l=ne().translate(a.x,a.y);if(a.equals({x:s,y:r}))l=l.rotate(i);else{let h=new W(s,r,a.x,a.y).vector().vectorAngle(new O(1,0));h!==0&&(h+=90),l=l.rotate(h)}this.setAttrs({transform:Br(l),cursor:i%180===0?"row-resize":"col-resize"})}onMouseDown(s){this.options.guard(s)||(this.trigger("change",{e:s,handle:this}),s.stopPropagation(),s.preventDefault(),this.options.graph.view.undelegateEvents(),this.delegateDocumentEvents({mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},s.data))}onMouseMove(s){this.emit("changing",{e:s,handle:this})}onMouseUp(s){this.emit("changed",{e:s,handle:this}),this.undelegateDocumentEvents(),this.options.graph.view.delegateEvents()}show(){this.container.style.display=""}hide(){this.container.style.display="none"}}n.Handle=t})(lo||(lo={})),function(n){n.config({name:"segments",precision:.5,threshold:40,snapRadius:10,stopPropagation:!0,removeRedundancies:!0,attrs:{width:20,height:8,x:-10,y:-4,rx:4,ry:4,fill:"#333",stroke:"#fff","stroke-width":2},createHandle:t=>new n.Handle(t),anchor:ab})}(lo||(lo={}));class nl extends Jt.ToolItem{get type(){return this.options.type}onRender(){J(this.container,this.prefixClassName(`edge-tool-${this.type}-anchor`)),this.toggleArea(!1),this.update()}update(){const t=this.type;return this.cellView.getTerminalView(t)?(this.updateAnchor(),this.updateArea(),this.container.style.display=""):this.container.style.display="none",this}updateAnchor(){const t=this.childNodes;if(!t)return;const e=t.anchor;if(!e)return;const s=this.type,r=this.cellView,i=this.options,o=r.getTerminalAnchor(s),a=r.cell.prop([s,"anchor"]);e.setAttribute("transform",`translate(${o.x}, ${o.y})`);const l=a?i.customAnchorAttrs:i.defaultAnchorAttrs;l&&Object.keys(l).forEach(u=>{e.setAttribute(u,l[u])})}updateArea(){const t=this.childNodes;if(!t)return;const e=t.area;if(!e)return;const s=this.type,r=this.cellView,i=r.getTerminalView(s);if(i){const o=i.cell,a=r.getTerminalMagnet(s);let l=this.options.areaPadding||0;Number.isFinite(l)||(l=0);let u,h,f;i.isEdgeElement(a)?(u=i.getBBox(),h=0,f=u.getCenter()):(u=i.getUnrotatedBBoxOfElement(a),h=o.getAngle(),f=u.getCenter(),h&&f.rotate(-h,o.getBBox().getCenter())),u.inflate(l),ut(e,{x:-u.width/2,y:-u.height/2,width:u.width,height:u.height,transform:`translate(${f.x}, ${f.y}) rotate(${h})`})}}toggleArea(t){if(this.childNodes){const e=this.childNodes.area;e&&(e.style.display=t?"":"none")}}onMouseDown(t){this.guard(t)||(t.stopPropagation(),t.preventDefault(),this.graph.view.undelegateEvents(),this.options.documentEvents&&this.delegateDocumentEvents(this.options.documentEvents),this.focus(),this.toggleArea(this.options.restrictArea),this.cell.startBatch("move-anchor",{ui:!0,toolId:this.cid}))}resetAnchor(t){const e=this.type,s=this.cell;t?s.prop([e,"anchor"],t,{rewrite:!0,ui:!0,toolId:this.cid}):s.removeProp([e,"anchor"],{ui:!0,toolId:this.cid})}onMouseMove(t){const e=this.type,s=this.cellView,r=s.getTerminalView(e);if(r==null)return;const i=this.normalizeEvent(t),o=r.cell,a=s.getTerminalMagnet(e);let l=this.graph.coord.clientToLocalPoint(i.clientX,i.clientY);const u=this.options.snap;if(typeof u=="function"){const d=X(u,s,l,r,a,e,s,this);l=O.create(d)}if(this.options.restrictArea)if(r.isEdgeElement(a)){const d=r.getClosestPoint(l);d&&(l=d)}else{const d=r.getUnrotatedBBoxOfElement(a),g=o.getAngle(),p=o.getBBox().getCenter(),m=l.clone().rotate(g,p);d.containsPoint(m)||(l=d.getNearestPointToPoint(m).rotate(-g,p))}let h;const f=this.options.anchor;typeof f=="function"&&(h=X(f,s,l,r,a,e,s,this)),this.resetAnchor(h),this.update()}onMouseUp(t){this.graph.view.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);const e=this.cellView;this.options.removeRedundancies&&e.removeRedundantLinearVertices({ui:!0,toolId:this.cid}),this.cell.stopBatch("move-anchor",{ui:!0,toolId:this.cid})}onDblClick(){const t=this.options.resetAnchor;t&&this.resetAnchor(t===!0?void 0:t),this.update()}}(function(n){n.config({tagName:"g",markup:[{tagName:"circle",selector:"anchor",attrs:{cursor:"pointer"}},{tagName:"rect",selector:"area",attrs:{"pointer-events":"none",fill:"none",stroke:"#33334F","stroke-dasharray":"2,4",rx:5,ry:5}}],events:{mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDblClick"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},customAnchorAttrs:{"stroke-width":4,stroke:"#33334F",fill:"#FFFFFF",r:5},defaultAnchorAttrs:{"stroke-width":2,stroke:"#FFFFFF",fill:"#33334F",r:6},areaPadding:6,snapRadius:10,resetAnchor:!0,restrictArea:!0,removeRedundancies:!0,anchor:ab,snap(t,e,s,r,i,o){const a=o.options.snapRadius||0,l=r==="source",u=l?0:-1,h=this.cell.getVertexAt(u)||this.getTerminalAnchor(l?"target":"source");return h&&(Math.abs(h.x-t.x)<a&&(t.x=h.x),Math.abs(h.y-t.y)<a&&(t.y=h.y)),t}})})(nl||(nl={}));const uB=nl.define({name:"source-anchor",type:"source"}),hB=nl.define({name:"target-anchor",type:"target"});var dB=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class sl extends Jt.ToolItem{get type(){return this.options.type}get ratio(){return this.options.ratio}init(){if(this.options.attrs){const t=this.options.attrs,{class:e}=t,s=dB(t,["class"]);this.setAttrs(s,this.container),e&&J(this.container,e)}}onRender(){J(this.container,this.prefixClassName(`edge-tool-${this.type}-arrowhead`)),this.update()}update(){const t=this.ratio,e=this.cellView,s=e.getTangentAtRatio(t),r=s?s.start:e.getPointAtRatio(t),i=s&&s.vector().vectorAngle(new O(1,0))||0;if(!r)return this;const o=ne().translate(r.x,r.y).rotate(i);return Vr(this.container,o,{absolute:!0}),this}onMouseDown(t){if(this.guard(t))return;t.stopPropagation(),t.preventDefault();const e=this.cellView;if(e.can("arrowheadMovable")){e.cell.startBatch("move-arrowhead",{ui:!0,toolId:this.cid});const s=this.graph.snapToGrid(t.clientX,t.clientY),r=e.prepareArrowheadDragging(this.type,{x:s.x,y:s.y,options:Object.assign(Object.assign({},this.options),{toolId:this.cid})});this.cellView.setEventData(t,r),this.delegateDocumentEvents(this.options.documentEvents,t.data),e.graph.view.undelegateEvents(),this.container.style.pointerEvents="none"}this.focus()}onMouseMove(t){const e=this.normalizeEvent(t),s=this.graph.snapToGrid(e.clientX,e.clientY);this.cellView.onMouseMove(e,s.x,s.y),this.update()}onMouseUp(t){this.undelegateDocumentEvents();const e=this.normalizeEvent(t),s=this.cellView,r=this.graph.snapToGrid(e.clientX,e.clientY);s.onMouseUp(e,r.x,r.y),this.graph.view.delegateEvents(),this.blur(),this.container.style.pointerEvents="",s.cell.stopBatch("move-arrowhead",{ui:!0,toolId:this.cid})}}(function(n){n.config({tagName:"path",isSVGElement:!0,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"}})})(sl||(sl={}));const fB=sl.define({name:"source-arrowhead",type:"source",ratio:0,attrs:{d:"M 10 -8 -10 0 10 8 Z",fill:"#333",stroke:"#fff","stroke-width":2,cursor:"move"}}),gB=sl.define({name:"target-arrowhead",type:"target",ratio:1,attrs:{d:"M -10 -8 10 0 -10 8 Z",fill:"#333",stroke:"#fff","stroke-width":2,cursor:"move"}});class Yr extends Jt.ToolItem{constructor(){super(...arguments),this.labelIndex=-1,this.distance=.5,this.dblClick=this.onCellDblClick.bind(this)}onRender(){const t=this.cellView;t&&t.on("cell:dblclick",this.dblClick)}createElement(){const t=[this.prefixClassName(`${this.cell.isEdge()?"edge":"node"}-tool-editor`),this.prefixClassName("cell-tool-editor")];this.editor=Jt.createElement("div",!1),this.addClass(t,this.editor),this.editor.contentEditable="true",this.container.appendChild(this.editor)}removeElement(){this.undelegateDocumentEvents(),this.editor&&(this.container.removeChild(this.editor),this.editor=null)}updateEditor(){const{cell:t,editor:e}=this;if(!e)return;const{style:s}=e;t.isNode()?this.updateNodeEditorTransform():t.isEdge()&&this.updateEdgeEditorTransform();const{attrs:r}=this.options;s.fontSize=`${r.fontSize}px`,s.fontFamily=r.fontFamily,s.color=r.color,s.backgroundColor=r.backgroundColor;const i=this.getCellText()||"";return e.innerText=i,this.setCellText(""),this}updateNodeEditorTransform(){const{graph:t,cell:e,editor:s}=this;if(!s)return;let r=O.create(),i=20,o="",{x:a,y:l}=this.options;const{width:u,height:h}=this.options;if(typeof a<"u"&&typeof l<"u"){const g=e.getBBox();a=an(a,g.width),l=an(l,g.height),r=g.topLeft.translate(a,l),i=g.width-a*2}else{const g=e.getBBox();r=g.center,i=g.width-4,o="translate(-50%, -50%)"}const f=t.scale(),{style:d}=s;r=t.localToGraph(r),d.left=`${r.x}px`,d.top=`${r.y}px`,d.transform=`scale(${f.sx}, ${f.sy}) ${o}`,d.minWidth=`${i}px`,typeof u=="number"&&(d.width=`${u}px`),typeof h=="number"&&(d.height=`${h}px`)}updateEdgeEditorTransform(){if(!this.event)return;const{graph:t,editor:e}=this;if(!e)return;let s=O.create(),r=20;const{style:i}=e,o=this.event.target,a=o.parentElement;if(a&&Sn(a,this.prefixClassName("edge-label"))){const h=a.getAttribute("data-index")||"0";this.labelIndex=parseInt(h,10);const f=a.getAttribute("transform"),{translation:d}=qa(f);s=new O(d.tx,d.ty),r=vt.getBBox(o).width}else{if(!this.options.labelAddable)return this;s=t.clientToLocal(O.create(this.event.clientX,this.event.clientY));const f=this.cellView.path.closestPointLength(s);this.distance=f,this.labelIndex=-1}s=t.localToGraph(s);const u=t.scale();i.left=`${s.x}px`,i.top=`${s.y}px`,i.minWidth=`${r}px`,i.transform=`scale(${u.sx}, ${u.sy}) translate(-50%, -50%)`}onDocumentMouseUp(t){if(this.editor&&t.target!==this.editor){const e=this.editor.innerText.replace(/\n$/,"")||"";this.setCellText(e!==""?e:null),this.removeElement()}}onCellDblClick({e:t}){this.editor||(t.stopPropagation(),this.removeElement(),this.event=t,this.createElement(),this.updateEditor(),this.autoFocus(),this.delegateDocumentEvents(this.options.documentEvents))}onMouseDown(t){t.stopPropagation()}autoFocus(){setTimeout(()=>{this.editor&&(this.editor.focus(),this.selectText())})}selectText(){if(window.getSelection&&this.editor){const t=document.createRange(),e=window.getSelection();t.selectNodeContents(this.editor),e.removeAllRanges(),e.addRange(t)}}getCellText(){const{getText:t}=this.options;if(typeof t=="function")return X(t,this.cellView,{cell:this.cell,index:this.labelIndex});if(typeof t=="string"){if(this.cell.isNode())return this.cell.attr(t);if(this.cell.isEdge()&&this.labelIndex!==-1)return this.cell.prop(`labels/${this.labelIndex}/attrs/${t}`)}}setCellText(t){const e=this.options.setText;if(typeof e=="function"){X(e,this.cellView,{cell:this.cell,value:t,index:this.labelIndex,distance:this.distance});return}if(typeof e=="string"){if(this.cell.isNode()){t!==null&&this.cell.attr(e,t);return}if(this.cell.isEdge()){const s=this.cell;if(this.labelIndex===-1){if(t){const r={position:{distance:this.distance},attrs:{}};Rr(r,`attrs/${e}`,t),s.appendLabel(r)}}else t!==null?s.prop(`labels/${this.labelIndex}/attrs/${e}`,t):typeof this.labelIndex=="number"&&s.removeLabelAt(this.labelIndex)}}}onRemove(){const t=this.cellView;t&&t.off("cell:dblclick",this.dblClick),this.removeElement()}}(function(n){n.config({tagName:"div",isSVGElement:!1,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"},documentEvents:{mouseup:"onDocumentMouseUp",touchend:"onDocumentMouseUp",touchcancel:"onDocumentMouseUp"}})})(Yr||(Yr={})),function(n){n.NodeEditor=n.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},getText:"text/text",setText:"text/text"}),n.EdgeEditor=n.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},labelAddable:!0,getText:"label/text",setText:"label/text"})}(Yr||(Yr={}));var cb=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e},Wr;(function(n){n.presets={boundary:el,button:Es,"button-remove":Es.Remove,"node-editor":Yr.NodeEditor},n.registry=Ft.create({type:"node tool",process(t,e){if(typeof e=="function")return e;let s=Jt.ToolItem;const{inherit:r}=e,i=cb(e,["inherit"]);if(r){const o=this.get(r);o==null?this.onNotFound(r,"inherited"):s=o}return i.name==null&&(i.name=t),s.define.call(s,i)}}),n.registry.register(n.presets,!0)})(Wr||(Wr={}));var qr;(function(n){n.presets={boundary:el,vertices:ao,segments:lo,button:Es,"button-remove":Es.Remove,"source-anchor":uB,"target-anchor":hB,"source-arrowhead":fB,"target-arrowhead":gB,"edge-editor":Yr.EdgeEditor},n.registry=Ft.create({type:"edge tool",process(t,e){if(typeof e=="function")return e;let s=Jt.ToolItem;const{inherit:r}=e,i=cb(e,["inherit"]);if(r){const o=this.get(r);o==null?this.onNotFound(r,"inherited"):s=o}return i.name==null&&(i.name=t),s.define.call(s,i)}}),n.registry.register(n.presets,!0)})(qr||(qr={}));const pB=Jn("center"),mB=Jn("topCenter"),yB=Jn("bottomCenter"),bB=Jn("leftMiddle"),wB=Jn("rightMiddle"),xB=Jn("topLeft"),vB=Jn("topRight"),CB=Jn("bottomLeft"),SB=Jn("bottomRight");function Jn(n){return function(t,e,s,r={}){const i=r.rotate?t.getUnrotatedBBoxOfElement(e):t.getBBoxOfElement(e),o=i[n];o.x+=an(r.dx,i.width),o.y+=an(r.dy,i.height);const a=t.cell;return r.rotate?o.rotate(-a.getAngle(),a.getBBox().getCenter()):o}}function rl(n){return function(t,e,s,r){if(s instanceof Element){const i=this.graph.findViewByElem(s);let o;if(i)if(i.isEdgeElement(s)){const a=r.fixedAt!=null?r.fixedAt:"50%";o=ub(i,a)}else o=i.getBBoxOfElement(s).getCenter();else o=new O;return n.call(this,t,e,o,r)}return n.apply(this,arguments)}}function ub(n,t){const e=Yn(t),s=typeof t=="string"?parseFloat(t):t;return e?n.getPointAtRatio(s/100):n.getPointAtLength(s)}const EB=rl(function(n,t,e,s){const r=gt.normalize(n.cell.getAngle()),i=n.getBBoxOfElement(t),o=i.getCenter(),a=i.getTopLeft(),l=i.getBottomRight();let u=s.padding;if(Number.isFinite(u)||(u=0),a.y+u<=e.y&&e.y<=l.y-u){const h=e.y-o.y;o.x+=r===0||r===180?0:h*1/Math.tan(gt.toRad(r)),o.y+=h}else if(a.x+u<=e.x&&e.x<=l.x-u){const h=e.x-o.x;o.y+=r===90||r===270?0:h*Math.tan(gt.toRad(r)),o.x+=h}return o}),OB=function(n,t,e,s,r){const i=n.cell.getConnectionPoint(this.cell,r);return(s.dx||s.dy)&&i.translate(s.dx||0,s.dy||0),i},MB=rl(function(n,t,e,s){let r,i=0,o;const a=n.cell;s.rotate?(r=n.getUnrotatedBBoxOfElement(t),o=a.getBBox().getCenter(),i=a.getAngle()):r=n.getBBoxOfElement(t);const l=s.padding;l!=null&&Number.isFinite(l)&&r.inflate(l),s.rotate&&e.rotate(i,o);const u=r.getNearestSideToPoint(e);let h;switch(u){case"left":h=r.getLeftMiddle();break;case"right":h=r.getRightMiddle();break;case"top":h=r.getTopCenter();break;case"bottom":h=r.getBottomCenter();break}const f=s.direction;return f==="H"?(u==="top"||u==="bottom")&&(e.x<=r.x+r.width?h=r.getLeftMiddle():h=r.getRightMiddle()):f==="V"&&(e.y<=r.y+r.height?h=r.getTopCenter():h=r.getBottomCenter()),s.rotate?h.rotate(-i,o):h}),PB=Object.freeze(Object.defineProperty({__proto__:null,bottom:yB,bottomLeft:CB,bottomRight:SB,center:pB,left:bB,midSide:MB,nodeCenter:OB,orth:EB,right:wB,top:mB,topLeft:xB,topRight:vB},Symbol.toStringTag,{value:"Module"}));var Jr;(function(n){n.presets=PB,n.registry=Ft.create({type:"node endpoint"}),n.registry.register(n.presets,!0)})(Jr||(Jr={}));const AB=function(n,t,e,s){let r=s.ratio!=null?s.ratio:.5;return r>1&&(r/=100),n.getPointAtRatio(r)},TB=function(n,t,e,s){const r=s.length!=null?s.length:20;return n.getPointAtLength(r)},hb=function(n,t,e,s){const r=n.getClosestPoint(e);return r??new O},NB=rl(hb),_B=rl(function(n,t,e,s){const i=n.getConnection(),o=n.getConnectionSubdivisions(),a=new W(e.clone().translate(0,1e6),e.clone().translate(0,-1e6)),l=new W(e.clone().translate(1e6,0),e.clone().translate(-1e6,0)),u=a.intersect(i,{segmentSubdivisions:o}),h=l.intersect(i,{segmentSubdivisions:o}),f=[];return u&&f.push(...u),h&&f.push(...h),f.length>0?e.closest(f):s.fallbackAt!=null?ub(n,s.fallbackAt):X(hb,this,n,t,e,s)}),kB=Object.freeze(Object.defineProperty({__proto__:null,closest:NB,length:TB,orth:_B,ratio:AB},Symbol.toStringTag,{value:"Module"}));var Xr;(function(n){n.presets=kB,n.registry=Ft.create({type:"edge endpoint"}),n.registry.register(n.presets,!0)})(Xr||(Xr={}));function il(n,t,e){let s;if(typeof e=="object"){if(Number.isFinite(e.y)){const i=new W(t,n),{start:o,end:a}=i.parallel(e.y);t=o,n=a}s=e.x}else s=e;if(s==null||!Number.isFinite(s))return n;const r=n.distance(t);return s===0&&r>0?n:n.move(t,-Math.min(s,r-1))}function ol(n){const t=n.getAttribute("stroke-width");return t===null?0:parseFloat(t)||0}function DB(n){if(n==null)return null;let t=n;do{let e=t.tagName;if(typeof e!="string")return null;if(e=e.toUpperCase(),e==="G")t=t.firstElementChild;else if(e==="TITLE")t=t.nextElementSibling;else break}while(t);return t}const db=function(n,t,e,s){const r=t.getBBoxOfElement(e);s.stroked&&r.inflate(ol(e)/2);const i=n.intersect(r),o=i&&i.length?n.start.closest(i):n.end;return il(o,n.start,s.offset)},RB=function(n,t,e,s,r){const i=t.cell,o=i.isNode()?i.getAngle():0;if(o===0)return X(db,this,n,t,e,s,r);const a=t.getUnrotatedBBoxOfElement(e);s.stroked&&a.inflate(ol(e)/2);const l=a.getCenter(),u=n.clone().rotate(o,l),h=u.setLength(1e6).intersect(a),f=h&&h.length?u.start.closest(h).rotate(-o,l):n.end;return il(f,n.start,s.offset)},IB=function(n,t,e,s){let r,i;const o=n.end,a=s.selector;if(typeof a=="string"?r=t.findOne(a):Array.isArray(a)?r=Mu(e,a):r=DB(e),!gs(r)){if(r===e||!gs(e))return o;r=e}const l=t.getShapeOfElement(r),u=t.getMatrixOfElement(r),h=t.getRootTranslatedMatrix(),f=t.getRootRotatedMatrix(),d=h.multiply(f).multiply(u),g=d.inverse(),p=vt.transformLine(n,g),m=p.start.clone(),y=t.getDataOfElement(r);if(s.insideout===!1){y.shapeBBox==null&&(y.shapeBBox=l.bbox());const v=y.shapeBBox;if(v!=null&&v.containsPoint(m))return o}s.extrapolate===!0&&p.setLength(1e6);let b;if(Z.isPath(l)){const v=s.precision||2;y.segmentSubdivisions==null&&(y.segmentSubdivisions=l.getSegmentSubdivisions({precision:v})),b={precision:v,segmentSubdivisions:y.segmentSubdivisions},i=p.intersect(l,b)}else i=p.intersect(l);i?Array.isArray(i)&&(i=m.closest(i)):s.sticky===!0&&(z.isRectangle(l)?i=l.getNearestPointToPoint(m):un.isEllipse(l)?i=l.intersectsWithLineFromCenterToPoint(m):i=l.closestPoint(m,b));const w=i?vt.transformPoint(i,d):o;let x=s.offset||0;return s.stroked!==!1&&(typeof x=="object"?(x=Object.assign({},x),x.x==null&&(x.x=0),x.x+=ol(r)/2):x+=ol(r)/2),il(w,n.start,x)};function LB(n,t,e=0){const{start:s,end:r}=n;let i,o,a,l;switch(t){case"left":l="x",i=r,o=s,a=-1;break;case"right":l="x",i=s,o=r,a=1;break;case"top":l="y",i=r,o=s,a=-1;break;case"bottom":l="y",i=s,o=r,a=1;break;default:return}s[l]<r[l]?i[l]=o[l]:o[l]=i[l],Number.isFinite(e)&&(i[l]+=a*e,o[l]+=a*e)}const BB=Object.freeze(Object.defineProperty({__proto__:null,anchor:function(n,t,e,s){const{alignOffset:r,align:i}=s;return i&&LB(n,i,r),il(n.end,n.start,s.offset)},bbox:db,boundary:IB,rect:RB},Symbol.toStringTag,{value:"Module"}));var Kr;(function(n){n.presets=BB,n.registry=Ft.create({type:"connection point"}),n.registry.register(n.presets,!0)})(Kr||(Kr={}));const VB=function(n){return[...n]},jB=function(n,t,e){const s=t.side||"bottom",r=ds(t.padding||40),i=e.sourceBBox,o=e.targetBBox,a=i.getCenter(),l=o.getCenter();let u,h,f;switch(s){case"top":f=-1,u="y",h="height";break;case"left":f=-1,u="x",h="width";break;case"right":f=1,u="x",h="width";break;case"bottom":default:f=1,u="y",h="height";break}return a[u]+=f*(i[h]/2+r[s]),l[u]+=f*(o[h]/2+r[s]),f*(a[u]-l[u])>0?l[u]=a[u]:a[u]=l[u],[a.toJSON(),...n,l.toJSON()]};function al(n){return new z(n.x,n.y,0,0)}function ll(n={}){const t=ds(n.padding||20);return{x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}function fb(n,t={}){return n.sourceBBox.clone().moveAndExpand(ll(t))}function gb(n,t={}){return n.targetBBox.clone().moveAndExpand(ll(t))}function $B(n,t={}){return n.sourceAnchor?n.sourceAnchor:fb(n,t).getCenter()}function zB(n,t={}){return n.targetAnchor?n.targetAnchor:gb(n,t).getCenter()}const pb=function(n,t,e){let s=fb(e,t),r=gb(e,t);const i=$B(e,t),o=zB(e,t);s=s.union(al(i)),r=r.union(al(o));const a=n.map(h=>O.create(h));a.unshift(i),a.push(o);let l=null;const u=[];for(let h=0,f=a.length-1;h<f;h+=1){let d=null;const g=a[h],p=a[h+1],m=Ge.getBearing(g,p)!=null;if(h===0)h+1===f?s.intersectsWithRect(r.clone().inflate(1))?d=Ge.insideNode(g,p,s,r):m||(d=Ge.nodeToNode(g,p,s,r)):s.containsPoint(p)?d=Ge.insideNode(g,p,s,al(p).moveAndExpand(ll(t))):m||(d=Ge.nodeToVertex(g,p,s));else if(h+1===f){const y=m&&Ge.getBearing(p,g)===l;r.containsPoint(g)||y?d=Ge.insideNode(g,p,al(g).moveAndExpand(ll(t)),r,l):m||(d=Ge.vertexToNode(g,p,r,l))}else m||(d=Ge.vertexToVertex(g,p,l));d?(u.push(...d.points),l=d.direction):l=Ge.getBearing(g,p),h+1<f&&u.push(p)}return u};var Ge;(function(n){const t={N:"S",S:"N",E:"W",W:"E"},e={N:-Math.PI/2*3,S:-Math.PI/2,E:0,W:Math.PI};function s(f,d,g){let p=new O(f.x,d.y);return g.containsPoint(p)&&(p=new O(d.x,f.y)),p}function r(f,d){return f[d==="W"||d==="E"?"width":"height"]}n.getBBoxSize=r;function i(f,d){return f.x===d.x?f.y>d.y?"N":"S":f.y===d.y?f.x>d.x?"W":"E":null}n.getBearing=i;function o(f,d,g){const p=new O(f.x,d.y),m=new O(d.x,f.y),y=i(f,p),b=i(f,m),w=g?t[g]:null,x=y===g||y!==w&&(b===w||b!==g)?p:m;return{points:[x],direction:i(x,d)}}n.vertexToVertex=o;function a(f,d,g){const p=s(f,d,g);return{points:[p],direction:i(p,d)}}n.nodeToVertex=a;function l(f,d,g,p){const m=[new O(f.x,d.y),new O(d.x,f.y)],y=m.filter(x=>!g.containsPoint(x)),b=y.filter(x=>i(x,f)!==p);let w;if(b.length>0)return w=b.filter(x=>i(f,x)===p).pop(),w=w||b[0],{points:[w],direction:i(w,d)};{w=HP(m,y)[0];const x=O.create(d).move(w,-r(g,p)/2);return{points:[s(x,f,g),x],direction:i(x,d)}}}n.vertexToNode=l;function u(f,d,g,p){let m=a(d,f,p);const y=m.points[0];if(g.containsPoint(y)){m=a(f,d,g);const b=m.points[0];if(p.containsPoint(b)){const w=O.create(f).move(b,-r(g,i(f,b))/2),x=O.create(d).move(y,-r(p,i(d,y))/2),v=new W(w,x).getCenter(),S=a(f,v,g),E=o(v,d,S.direction);m.points=[S.points[0],E.points[0]],m.direction=E.direction}}return m}n.nodeToNode=u;function h(f,d,g,p,m){const y=g.union(p).inflate(1),b=y.getCenter(),w=b.distance(d)>b.distance(f),x=w?d:f,v=w?f:d;let S,E,C;m?(S=O.fromPolar(y.width+y.height,e[m],x),S=y.getNearestPointToPoint(S).move(S,-1)):S=y.getNearestPointToPoint(x).move(x,1),E=s(S,v,y);let M;S.round().equals(E.round())?(E=O.fromPolar(y.width+y.height,gt.toRad(S.theta(x))+Math.PI/2,v),E=y.getNearestPointToPoint(E).move(v,1).round(),C=s(S,E,y),M=w?[E,C,S]:[S,C,E]):M=w?[E,S]:[S,E];const T=i(w?S:E,d);return{points:M,direction:T}}n.insideNode=h})(Ge||(Ge={}));const FB={step:10,maxLoopCount:2e3,precision:1,maxDirectionChange:90,perpendicular:!0,excludeTerminals:[],excludeNodes:[],excludeShapes:[],startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost(){return Os(this.step,this)},directions(){const n=Os(this.step,this),t=Os(this.cost,this);return[{cost:t,offsetX:n,offsetY:0},{cost:t,offsetX:-n,offsetY:0},{cost:t,offsetX:0,offsetY:n},{cost:t,offsetX:0,offsetY:-n}]},penalties(){const n=Os(this.step,this);return{0:0,45:n/2,90:n/2}},paddingBox(){const n=Os(this.step,this);return{x:-n,y:-n,width:2*n,height:2*n}},fallbackRouter:pb,draggingRouter:null,snapToGrid:!0};function Os(n,t){return typeof n=="function"?n.call(t):n}function HB(n){const t=Object.keys(n).reduce((e,s)=>{const r=e;return s==="fallbackRouter"||s==="draggingRouter"||s==="fallbackRoute"?r[s]=n[s]:r[s]=Os(n[s],n),e},{});if(t.padding){const e=ds(t.padding);t.paddingBox={x:-e.left,y:-e.top,width:e.left+e.right,height:e.top+e.bottom}}return t.directions.forEach(e=>{const s=new O(0,0),r=new O(e.offsetX,e.offsetY);e.angle=gt.normalize(s.theta(r))}),t}const mb=1,yb=2;class UB{constructor(){this.items=[],this.hash={},this.values={}}add(t,e){this.hash[t]?this.items.splice(this.items.indexOf(t),1):this.hash[t]=mb,this.values[t]=e;const s=v2(this.items,t,r=>this.values[r]);this.items.splice(s,0,t)}pop(){const t=this.items.shift();return t&&(this.hash[t]=yb),t}isOpen(t){return this.hash[t]===mb}isClose(t){return this.hash[t]===yb}isEmpty(){return this.items.length===0}}class GB{constructor(t){this.options=t,this.mapGridSize=100,this.map={}}build(t,e){const s=this.options,r=s.excludeTerminals.reduce((u,h)=>{const f=e[h];if(f){const d=t.getCell(f.cell);d&&u.push(d)}return u},[]);let i=[];const o=t.getCell(e.getSourceCellId());o&&(i=ug(i,o.getAncestors().map(u=>u.id)));const a=t.getCell(e.getTargetCellId());a&&(i=ug(i,a.getAncestors().map(u=>u.id)));const l=this.mapGridSize;return t.getNodes().reduce((u,h)=>{const f=r.some(y=>y.id===h.id),d=h.shape?s.excludeShapes.includes(h.shape):!1,g=s.excludeNodes.some(y=>typeof y=="string"?h.id===y:y===h),p=i.includes(h.id),m=d||f||g||p;if(h.isVisible()&&!m){const y=h.getBBox().moveAndExpand(s.paddingBox),b=y.getOrigin().snapToGrid(l),w=y.getCorner().snapToGrid(l);for(let x=b.x;x<=w.x;x+=l)for(let v=b.y;v<=w.y;v+=l){const S=new O(x,v).toString();u[S]==null&&(u[S]=[]),u[S].push(y)}}return u},this.map),this}isAccessible(t){const e=t.clone().snapToGrid(this.mapGridSize).toString(),s=this.map[e];return s?s.every(r=>!r.containsPoint(t)):!0}}function bb(n,t){const e=n.sourceBBox.clone();return t&&t.paddingBox?e.moveAndExpand(t.paddingBox):e}function wb(n,t){const e=n.targetBBox.clone();return t&&t.paddingBox?e.moveAndExpand(t.paddingBox):e}function xb(n,t){return n.sourceAnchor?n.sourceAnchor:bb(n,t).getCenter()}function YB(n,t){return n.targetAnchor?n.targetAnchor:wb(n,t).getCenter()}function nh(n,t,e,s,r){const i=360/e,o=n.theta(WB(n,t,s,r)),a=gt.normalize(o+i/2);return i*Math.floor(a/i)}function WB(n,t,e,s){const r=s.step,i=t.x-n.x,o=t.y-n.y,a=i/e.x,l=o/e.y,u=a*r,h=l*r;return new O(n.x+u,n.y+h)}function vb(n,t){const e=Math.abs(n-t);return e>180?360-e:e}function qB(n,t){const e=t.step;return t.directions.forEach(s=>{s.gridOffsetX=s.offsetX/e*n.x,s.gridOffsetY=s.offsetY/e*n.y}),t.directions}function JB(n,t,e){return{source:t.clone(),x:Cb(e.x-t.x,n),y:Cb(e.y-t.y,n)}}function Cb(n,t){if(!n)return t;const e=Math.abs(n),s=Math.round(e/t);if(!s)return e;const r=s*t,o=(e-r)/s;return t+o}function XB(n,t){const e=t.source,s=wt.snapToGrid(n.x-e.x,t.x)+e.x,r=wt.snapToGrid(n.y-e.y,t.y)+e.y;return new O(s,r)}function co(n,t){return n.round(t)}function cl(n,t,e){return co(XB(n.clone(),t),e)}function uo(n){return n.toString()}function sh(n){return new O(n.x===0?0:Math.abs(n.x)/n.x,n.y===0?0:Math.abs(n.y)/n.y)}function Sb(n,t){let e=1/0;for(let s=0,r=t.length;s<r;s+=1){const i=n.manhattanDistance(t[s]);i<e&&(e=i)}return e}function Eb(n,t,e,s,r){const i=r.precision,o=r.directionMap,a=n.diff(t.getCenter()),l=Object.keys(o).reduce((u,h)=>{if(e.includes(h)){const f=o[h],d=new O(n.x+f.x*(Math.abs(a.x)+t.width),n.y+f.y*(Math.abs(a.y)+t.height)),p=new W(n,d).intersect(t)||[];let m,y=null;for(let b=0;b<p.length;b+=1){const w=p[b],x=n.squaredDistance(w);(m==null||x>m)&&(m=x,y=w)}if(y){let b=cl(y,s,i);t.containsPoint(b)&&(b=cl(b.translate(f.x*s.x,f.y*s.y),s,i)),u.push(b)}}return u},[]);return t.containsPoint(n)||l.push(cl(n,s,i)),l}function KB(n,t,e,s,r){const i=[];let o=sh(r.diff(e)),a=uo(e),l=n[a],u;for(;l;){u=t[a];const d=sh(u.diff(l));d.equals(o)||(i.unshift(u),o=d),a=uo(l),l=n[a]}const h=t[a];return sh(h.diff(s)).equals(o)||i.unshift(h),i}function ZB(n,t,e,s,r){const i=r.precision;let o,a;z.isRectangle(t)?o=co(xb(n,r).clone(),i):o=co(t.clone(),i),z.isRectangle(e)?a=co(YB(n,r).clone(),i):a=co(e.clone(),i);const l=JB(r.step,o,a),u=o,h=a;let f,d;if(z.isRectangle(t)?f=Eb(u,t,r.startDirections,l,r):f=[u],z.isRectangle(e)?d=Eb(a,e,r.endDirections,l,r):d=[h],f=f.filter(g=>s.isAccessible(g)),d=d.filter(g=>s.isAccessible(g)),f.length>0&&d.length>0){const g=new UB,p={},m={},y={};for(let k=0,_=f.length;k<_;k+=1){const D=f[k],N=uo(D);g.add(N,Sb(D,d)),p[N]=D,y[N]=0}const b=r.previousDirectionAngle,w=b===void 0;let x,v;const S=qB(l,r),E=S.length,C=d.reduce((k,_)=>{const D=uo(_);return k.push(D),k},[]),M=O.equalPoints(f,d);let T=r.maxLoopCount;for(;!g.isEmpty()&&T>0;){const k=g.pop(),_=p[k],D=m[k],N=y[k],V=_.equals(u),A=D==null;let P;if(A?w?V?P=null:P=nh(u,_,E,l,r):P=b:P=nh(D,_,E,l,r),!(A&&M)&&C.indexOf(k)>=0)return r.previousDirectionAngle=P,KB(m,p,_,u,h);for(let j=0;j<E;j+=1){x=S[j];const Y=x.angle;if(v=vb(P,Y),!(w&&V)&&v>r.maxDirectionChange)continue;const ot=cl(_.clone().translate(x.gridOffsetX||0,x.gridOffsetY||0),l,i),F=uo(ot);if(g.isClose(F)||!s.isAccessible(ot))continue;if(C.indexOf(F)>=0&&!ot.equals(h)){const rt=nh(ot,h,E,l,r);if(vb(Y,rt)>r.maxDirectionChange)continue}const H=x.cost,B=V?0:r.penalties[v],K=N+H+B;(!g.isOpen(F)||K<y[F])&&(p[F]=ot,m[F]=_,y[F]=K,g.add(F,K+Sb(ot,d)))}T-=1}}return r.fallbackRoute?X(r.fallbackRoute,this,u,h,r):null}function QB(n,t=10){if(n.length<=1)return n;for(let e=0,s=n.length;e<s-1;e+=1){const r=n[e],i=n[e+1];if(r.x===i.x){const o=t*Math.round(r.x/t);r.x!==o&&(r.x=o,i.x=o)}else if(r.y===i.y){const o=t*Math.round(r.y/t);r.y!==o&&(r.y=o,i.y=o)}}return n}const tV=function(n,t,e){const s=HB(t),r=bb(e,s),i=wb(e,s),o=xb(e,s),a=new GB(s).build(e.graph.model,e.cell),l=n.map(g=>O.create(g)),u=[];let h=o,f,d;for(let g=0,p=l.length;g<=p;g+=1){let m=null;if(f=d||r,d=l[g],d==null){d=i;const b=e.cell;if((b.getSourceCellId()==null||b.getTargetCellId()==null)&&typeof s.draggingRouter=="function"){const x=f===r?o:f,v=d.getOrigin();m=X(s.draggingRouter,e,x,v,s)}}if(m==null&&(m=ZB(e,f,d,a,s)),m===null)return console.warn("Unable to execute manhattan algorithm, use orth instead"),X(s.fallbackRouter,this,n,s,e);const y=m[0];y&&y.equals(h)&&m.shift(),h=m[m.length-1]||h,u.push(...m)}return s.snapToGrid?QB(u,e.graph.grid.getGridSize()):u},Ob=function(n,t,e){return X(tV,this,n,Object.assign(Object.assign({},FB),t),e)},eV={maxDirectionChange:45,directions(){const n=Os(this.step,this),t=Os(this.cost,this),e=Math.ceil(Math.sqrt(n*n<<1));return[{cost:t,offsetX:n,offsetY:0},{cost:e,offsetX:n,offsetY:n},{cost:t,offsetX:0,offsetY:n},{cost:e,offsetX:-n,offsetY:n},{cost:t,offsetX:-n,offsetY:0},{cost:e,offsetX:-n,offsetY:-n},{cost:t,offsetX:0,offsetY:-n},{cost:e,offsetX:n,offsetY:-n}]},fallbackRoute(n,t,e){const s=n.theta(t),r=[];let i={x:t.x,y:n.y},o={x:n.x,y:t.y};if(s%180>90){const x=i;i=o,o=x}const a=s%90<45?i:o,l=new W(n,a),u=90*Math.ceil(s/90),h=O.fromPolar(l.squaredLength(),gt.toRad(u+135),a),f=new W(t,h),d=l.intersectsWithLine(f),g=d||t,p=d?g:n,m=360/e.directions.length,y=p.theta(t),b=gt.normalize(y+m/2),w=m*Math.floor(b/m);return e.previousDirectionAngle=w,g&&r.push(g.round()),r.push(t),r}},nV=function(n,t,e){return X(Ob,this,n,Object.assign(Object.assign({},eV),t),e)},sV=function(n,t,e){const s=t.offset||32,r=t.min==null?16:t.min;let i=0,o=t.direction;const a=e.sourceBBox,l=e.targetBBox,u=a.getCenter(),h=l.getCenter();if(typeof s=="number"&&(i=s),o==null){let b=l.left-a.right,w=l.top-a.bottom;b>=0&&w>=0?o=b>=w?"L":"T":b<=0&&w>=0?(b=a.left-l.right,b>=0?o=b>=w?"R":"T":o="T"):b>=0&&w<=0?(w=a.top-l.bottom,w>=0?o=b>=w?"L":"B":o="L"):(b=a.left-l.right,w=a.top-l.bottom,b>=0&&w>=0?o=b>=w?"R":"B":b<=0&&w>=0?o="B":b>=0&&w<=0?o="R":o=Math.abs(b)>Math.abs(w)?"R":"B")}o==="H"?o=h.x-u.x>=0?"L":"R":o==="V"&&(o=h.y-u.y>=0?"T":"B"),s==="center"&&(o==="L"?i=(l.left-a.right)/2:o==="R"?i=(a.left-l.right)/2:o==="T"?i=(l.top-a.bottom)/2:o==="B"&&(i=(a.top-l.bottom)/2));let f,d,g;const p=o==="L"||o==="R";if(p){if(h.y===u.y)return[...n];g=o==="L"?1:-1,f="x",d="width"}else{if(h.x===u.x)return[...n];g=o==="T"?1:-1,f="y",d="height"}const m=u.clone(),y=h.clone();if(m[f]+=g*(a[d]/2+i),y[f]-=g*(l[d]/2+i),p){const b=m.x,w=y.x,x=a.width/2+r,v=l.width/2+r;h.x>u.x?w<=b&&(m.x=Math.max(w,u.x+x),y.x=Math.min(b,h.x-v)):w>=b&&(m.x=Math.min(w,u.x-x),y.x=Math.max(b,h.x+v))}else{const b=m.y,w=y.y,x=a.height/2+r,v=l.height/2+r;h.y>u.y?w<=b&&(m.y=Math.max(w,u.y+x),y.y=Math.min(b,h.y-v)):w>=b&&(m.y=Math.min(w,u.y-x),y.y=Math.max(b,h.y+v))}return[m.toJSON(),...n,y.toJSON()]};function Zr(n,t){if(t!=null&&t!==!1){const e=typeof t=="boolean"?0:t;if(e>0){const s=O.create(n[1]).move(n[2],e),r=O.create(n[1]).move(n[0],e);return[s.toJSON(),...n,r.toJSON()]}{const s=n[1];return[Object.assign({},s),...n,Object.assign({},s)]}}return n}const rV=Object.freeze(Object.defineProperty({__proto__:null,er:sV,loop:function(n,t,e){const s=t.width||50,i=(t.height||80)/2,o=t.angle||"auto",a=e.sourceAnchor,l=e.targetAnchor,u=e.sourceBBox,h=e.targetBBox;if(a.equals(l)){const f=b=>{const w=gt.toRad(b),x=Math.sin(w),v=Math.cos(w),S=new O(a.x+v*s,a.y+x*s),E=new O(S.x-v*i,S.y-x*i),C=E.clone().rotate(-90,S),M=E.clone().rotate(90,S);return[C.toJSON(),S.toJSON(),M.toJSON()]},d=b=>{const w=a.clone().move(b,-1),x=new W(w,b);return!u.containsPoint(b)&&!u.intersectsWithLine(x)},g=[0,90,180,270,45,135,225,315];if(typeof o=="number")return Zr(f(o),t.merge);const p=u.getCenter();if(p.equals(a))return Zr(f(0),t.merge);const m=p.angleBetween(a,p.clone().translate(1,0));let y=f(m);if(d(y[1]))return Zr(y,t.merge);for(let b=1,w=g.length;b<w;b+=1)if(y=f(m+g[b]),d(y[1]))return Zr(y,t.merge);return Zr(y,t.merge)}{const f=new W(a,l);let d=f.parallel(-s),g=d.getCenter(),p=d.start.clone().move(d.end,i),m=d.end.clone().move(d.start,i);const y=f.parallel(-1),b=new W(y.start,g),w=new W(y.end,g);if((u.containsPoint(g)||h.containsPoint(g)||u.intersectsWithLine(b)||u.intersectsWithLine(w)||h.intersectsWithLine(b)||h.intersectsWithLine(w))&&(d=f.parallel(s),g=d.getCenter(),p=d.start.clone().move(d.end,i),m=d.end.clone().move(d.start,i)),t.merge){const x=new W(a,l),v=new W(g,x.center).setLength(Number.MAX_SAFE_INTEGER),S=u.intersectsWithLine(v),E=h.intersectsWithLine(v),C=S?Array.isArray(S)?S:[S]:[];E&&(Array.isArray(E)?C.push(...E):C.push(E));const M=x.center.closest(C);M?(e.sourceAnchor=M.clone(),e.targetAnchor=M.clone()):(e.sourceAnchor=x.center.clone(),e.targetAnchor=x.center.clone())}return Zr([p.toJSON(),g.toJSON(),m.toJSON()],t.merge)}},manhattan:Ob,metro:nV,normal:VB,oneSide:jB,orth:pb},Symbol.toStringTag,{value:"Module"}));var Ms;(function(n){n.presets=rV,n.registry=Ft.create({type:"router"}),n.registry.register(n.presets,!0)})(Ms||(Ms={}));const iV=function(n,t,e,s={}){const r=[n,...e,t],i=new zt(r),o=new Z(i);return s.raw?o:o.serialize()},oV=function(n,t,e,s={}){const r=e.length===3?0:1,i=O.create(e[0+r]),o=O.create(e[2+r]),a=O.create(e[1+r]);if(!O.equals(n,t)){const u=new O((n.x+t.x)/2,(n.y+t.y)/2),h=u.angleBetween(O.create(n).rotate(90,u),a);h>1&&(i.rotate(180-h,u),o.rotate(180-h,u),a.rotate(180-h,u))}const l=`
116
+ `.trim()}const wI=Object.freeze(Object.defineProperty({__proto__:null,blur:uI,brightness:yI,contrast:bI,dropShadow:hI,grayScale:dI,highlight:cI,hueRotate:pI,invert:mI,outline:lI,saturate:gI,sepia:fI},Symbol.toStringTag,{value:"Module"}));var Hr;(function(n){n.presets=wI,n.registry=Ft.create({type:"filter"}),n.registry.register(n.presets,!0)})(Hr||(Hr={}));const xI={xlinkHref:"xlink:href",xlinkShow:"xlink:show",xlinkRole:"xlink:role",xlinkType:"xlink:type",xlinkArcrole:"xlink:arcrole",xlinkTitle:"xlink:title",xlinkActuate:"xlink:actuate",xmlSpace:"xml:space",xmlBase:"xml:base",xmlLang:"xml:lang",preserveAspectRatio:"preserveAspectRatio",requiredExtension:"requiredExtension",requiredFeatures:"requiredFeatures",systemLanguage:"systemLanguage",externalResourcesRequired:"externalResourceRequired"},vI={},ky={position:Qa("x","width","origin")},Dy={position:Qa("y","height","origin")},CI={position:Qa("x","width","corner")},SI={position:Qa("y","height","corner")},Ry={set:ws("width","width")},Iy={set:ws("height","height")},EI={set:ws("rx","width")},OI={set:ws("ry","height")},Ly={set:(n=>{const t=ws(n,"width"),e=ws(n,"height");return function(s,r){const i=r.refBBox,o=i.height>i.width?t:e;return X(o,this,s,r)}})("r")},MI={set(n,{refBBox:t}){let e=parseFloat(n);const s=Yn(n);s&&(e/=100);const r=Math.sqrt(t.height*t.height+t.width*t.width);let i;return Number.isFinite(e)&&(s||e>=0&&e<=1?i=e*r:i=Math.max(e+r,0)),{r:i}}},PI={set:ws("cx","width")},AI={set:ws("cy","height")},By={set:$y({resetOffset:!0})},TI={set:$y({resetOffset:!1})},Vy={set:zy({resetOffset:!0})},NI={set:zy({resetOffset:!1})},_I=Ly,kI=By,DI=Vy,RI=ky,II=Dy,LI=Ry,BI=Iy;function Qa(n,t,e){return(s,{refBBox:r})=>{if(s==null)return null;let i=parseFloat(s);const o=Yn(s);o&&(i/=100);let a;if(Number.isFinite(i)){const u=r[e];o||i>0&&i<1?a=u[n]+r[t]*i:a=u[n]+i}const l=new O;return l[n]=a||0,l}}function ws(n,t){return function(e,{refBBox:s}){let r=parseFloat(e);const i=Yn(e);i&&(r/=100);const o={};if(Number.isFinite(r)){const a=i||r>=0&&r<=1?r*s[t]:Math.max(r+s[t],0);o[n]=a}return o}}function jy(n,t){const e="x6-shape",s=t&&t.resetOffset;return function(r,{elem:i,refBBox:o}){let a=Js(i,e);if(!a||a.value!==r){const m=n(r);a={value:r,shape:m,shapeBBox:m.bbox()},Js(i,e,a)}const l=a.shape.clone(),u=a.shapeBBox.clone(),h=u.getOrigin(),f=o.getOrigin();u.x=f.x,u.y=f.y;const d=o.getMaxScaleToFit(u,f),g=u.width===0||o.width===0?1:d.sx,p=u.height===0||o.height===0?1:d.sy;return l.scale(g,p,h),s&&l.translate(-h.x,-h.y),l}}function $y(n){function t(s){return Z.parse(s)}const e=jy(t,n);return(s,r)=>({d:e(s,r).serialize()})}function zy(n){const t=jy(e=>new zt(e),n);return(e,s)=>({points:t(e,s).serialize()})}const VI={qualify:bn,set(n,{view:t}){return`url(#${t.graph.defineGradient(n)})`}},jI={qualify:bn,set(n,{view:t}){const e=t.cell,s=Object.assign({},n);if(e.isEdge()&&s.type==="linearGradient"){const r=t,i=r.sourcePoint,o=r.targetPoint;s.id=`gradient-${s.type}-${e.id}`,s.attrs=Object.assign(Object.assign({},s.attrs),{x1:i.x,y1:i.y,x2:o.x,y2:o.y,gradientUnits:"userSpaceOnUse"}),t.graph.defs.remove(s.id)}return`url(#${t.graph.defineGradient(s)})`}},Fy={qualify(n,{attrs:t}){return t.textWrap==null||!bn(t.textWrap)},set(n,{view:t,elem:e,attrs:s}){const r="x6-text",i=Js(e,r),o=h=>{try{return JSON.parse(h)}catch{return h}},a={x:s.x,eol:s.eol,annotations:o(s.annotations),textPath:o(s["text-path"]||s.textPath),textVerticalAnchor:s["text-vertical-anchor"]||s.textVerticalAnchor,displayEmpty:(s["display-empty"]||s.displayEmpty)==="true",lineHeight:s["line-height"]||s.lineHeight},l=s["font-size"]||s.fontSize,u=JSON.stringify([n,a]);if(l&&e.setAttribute("font-size",l),i==null||i!==u){const h=a.textPath;if(h!=null&&typeof h=="object"){const f=h.selector;if(typeof f=="string"){const d=t.find(f)[0];d instanceof SVGPathElement&&(ku(d),a.textPath=Object.assign({"xlink:href":`#${d.id}`},h))}}my(e,`${n}`,a),Js(e,r,u)}}},$I={qualify:bn,set(n,{view:t,elem:e,attrs:s,refBBox:r}){const i=n,o=i.width||0;Yn(o)?r.width*=parseFloat(o)/100:o<=0?r.width+=o:r.width=o;const a=i.height||0;Yn(a)?r.height*=parseFloat(a)/100:a<=0?r.height+=a:r.height=a;let l,u=i.text;u==null&&(u=s.text||(e==null?void 0:e.textContent)),u!=null?l=by(`${u}`,r,{"font-weight":s["font-weight"]||s.fontWeight,"font-size":s["font-size"]||s.fontSize,"font-family":s["font-family"]||s.fontFamily,lineHeight:s.lineHeight},{ellipsis:i.ellipsis}):l="",X(Fy.set,this,l,{view:t,elem:e,attrs:s,refBBox:r,cell:t.cell})}},Ur=(n,{attrs:t})=>t.text!==void 0,zI={qualify:Ur},FI={qualify:Ur},HI={qualify:Ur},UI={qualify:Ur},GI={qualify:Ur},YI={qualify:Ur},WI={qualify(n,{elem:t}){return t instanceof SVGElement},set(n,{elem:t}){const e="x6-title",s=`${n}`,r=Js(t,e);if(r==null||r!==s){Js(t,e,s);const i=t.firstChild;if(i&&i.tagName.toUpperCase()==="TITLE"){const o=i;o.textContent=s}else{const o=document.createElementNS(t.namespaceURI,"title");o.textContent=s,t.insertBefore(o,i)}}}},qI={offset:Hy("x","width","right")},JI={offset:Hy("y","height","bottom")},XI={offset(n,{refBBox:t}){return n?{x:-t.x,y:-t.y}:{x:0,y:0}}};function Hy(n,t,e){return(s,{refBBox:r})=>{const i=new O;let o;return s==="middle"?o=r[t]/2:s===e?o=r[t]:typeof s=="number"&&Number.isFinite(s)?o=s>-1&&s<1?-r[t]*s:-s:Yn(s)?o=r[t]*parseFloat(s)/100:o=0,i[n]=-(r[n]+o),i}}const KI={qualify:bn,set(n,{elem:t}){qt(t,n)}},ZI={set(n,{elem:t}){t.innerHTML=`${n}`}},QI={qualify:bn,set(n,{view:t}){return`url(#${t.graph.defineFilter(n)})`}},tL={set(n){return n!=null&&typeof n=="object"&&n.id?n.id:n}};function xs(n,t,e){let s,r;typeof t=="object"?(s=t.x,r=t.y):(s=t,r=e);const i=Z.parse(n),o=i.bbox();if(o){let a=-o.height/2-o.y,l=-o.width/2-o.x;typeof s=="number"&&(l-=s),typeof r=="number"&&(a-=r),i.translate(l,a)}return i.serialize()}var Uy=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const eL=n=>{var{size:t,width:e,height:s,offset:r,open:i}=n,o=Uy(n,["size","width","height","offset","open"]);return Gy({size:t,width:e,height:s,offset:r},i===!0,!0,void 0,o)},nL=n=>{var{size:t,width:e,height:s,offset:r,factor:i}=n,o=Uy(n,["size","width","height","offset","factor"]);return Gy({size:t,width:e,height:s,offset:r},!1,!1,i,o)};function Gy(n,t,e,s=3/4,r={}){const i=n.size||10,o=n.width||i,a=n.height||i,l=new Z,u={};if(t)l.moveTo(o,0).lineTo(0,a/2).lineTo(o,a),u.fill="none";else{if(l.moveTo(0,a/2),l.lineTo(o,0),!e){const h=we(s,0,1);l.lineTo(o*h,a/2)}l.lineTo(o,a),l.close()}return Object.assign(Object.assign(Object.assign({},u),r),{tagName:"path",d:xs(l.serialize(),{x:n.offset!=null?n.offset:-o/2})})}var sL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const rL=n=>{var{size:t,width:e,height:s,offset:r}=n,i=sL(n,["size","width","height","offset"]);const o=t||10,a=e||o,l=s||o,u=new Z;return u.moveTo(0,l/2).lineTo(a/2,0).lineTo(a,l/2).lineTo(a/2,l).close(),Object.assign(Object.assign({},i),{tagName:"path",d:xs(u.serialize(),r??-a/2)})};var iL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const oL=n=>{var{d:t,offsetX:e,offsetY:s}=n,r=iL(n,["d","offsetX","offsetY"]);return Object.assign(Object.assign({},r),{tagName:"path",d:xs(t,e,s)})};var aL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const lL=n=>{var{size:t,width:e,height:s,offset:r}=n,i=aL(n,["size","width","height","offset"]);const o=t||10,a=e||o,l=s||o,u=new Z;return u.moveTo(0,0).lineTo(a,l).moveTo(0,l).lineTo(a,0),Object.assign(Object.assign({},i),{tagName:"path",fill:"none",d:xs(u.serialize(),r||-a/2)})};var cL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const uL=n=>{var{width:t,height:e,offset:s,open:r,flip:i}=n,o=cL(n,["width","height","offset","open","flip"]);let a=e||6;const l=t||10,u=r===!0,h=i===!0,f=Object.assign(Object.assign({},o),{tagName:"path"});h&&(a=-a);const d=new Z;return d.moveTo(0,a).lineTo(l,0),u?f.fill="none":(d.lineTo(l,a),d.close()),f.d=xs(d.serialize(),{x:s||-l/2,y:a/2}),f};var Yy=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const Wy=n=>{var{r:t}=n,e=Yy(n,["r"]);const s=t||5;return Object.assign(Object.assign({cx:s},e),{tagName:"circle",r:s})},hL=n=>{var{r:t}=n,e=Yy(n,["r"]);const s=t||5,r=new Z;return r.moveTo(s,0).lineTo(s,s*2),r.moveTo(0,s).lineTo(s*2,s),{children:[Object.assign(Object.assign({},Wy({r:s})),{fill:"none"}),Object.assign(Object.assign({},e),{tagName:"path",d:xs(r.serialize(),-s)})]}};var dL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const fL=Object.freeze(Object.defineProperty({__proto__:null,async:uL,block:eL,circle:Wy,circlePlus:hL,classic:nL,cross:lL,diamond:rL,ellipse:n=>{var{rx:t,ry:e}=n,s=dL(n,["rx","ry"]);const r=t||5,i=e||5;return Object.assign(Object.assign({cx:r},s),{tagName:"ellipse",rx:r,ry:i})},path:oL},Symbol.toStringTag,{value:"Module"}));var vs;(function(n){n.presets=fL,n.registry=Ft.create({type:"marker"}),n.registry.register(n.presets,!0)})(vs||(vs={})),function(n){n.normalize=xs}(vs||(vs={}));var gL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};function Xu(n){return typeof n=="string"||bn(n)}const pL={qualify:Xu,set(n,{view:t,attrs:e}){return Ku("marker-start",n,t,e)}},mL={qualify:Xu,set(n,{view:t,attrs:e}){return Ku("marker-end",n,t,e,{transform:"rotate(180)"})}},yL={qualify:Xu,set(n,{view:t,attrs:e}){return Ku("marker-mid",n,t,e)}};function Ku(n,t,e,s,r={}){const i=typeof t=="string"?{name:t}:t,{name:o,args:a}=i,l=gL(i,["name","args"]);let u=l;if(o&&typeof o=="string"){const f=vs.registry.get(o);if(f)u=f(Object.assign(Object.assign({},l),a));else return vs.registry.onNotFound(o)}const h=Object.assign(Object.assign(Object.assign({},bL(s,n)),r),u);return{[n]:`url(#${e.graph.defineMarker(h)})`}}function bL(n,t){const e={},s=n.stroke;typeof s=="string"&&(e.stroke=s,e.fill=s);let r=n.strokeOpacity;if(r==null&&(r=n["stroke-opacity"]),r==null&&(r=n.opacity),r!=null&&(e["stroke-opacity"]=r,e["fill-opacity"]=r),t!=="marker-mid"){const i=parseFloat(n.strokeWidth||n["stroke-width"]);if(Number.isFinite(i)&&i>1){const o=Math.ceil(i/2);e.refX=t==="marker-start"?o:-o}}return e}const io=(n,{view:t})=>t.cell.isEdge(),wL={qualify:io,set(n,t){var e,s,r,i;const o=t.view,a=n.reverse||!1,l=n.stubs||0;let u;if(Number.isFinite(l)&&l!==0)if(a){let h,f;const d=o.getConnectionLength()||0;l<0?(h=(d+l)/2,f=-l):(h=l,f=d-l*2);const g=o.getConnection();u=(i=(r=(s=(e=g==null?void 0:g.divideAtLength(h))===null||e===void 0?void 0:e[1])===null||s===void 0?void 0:s.divideAtLength(f))===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.serialize()}else{let h;l<0?h=((o.getConnectionLength()||0)+l)/2:h=l;const f=o.getConnection();if(f){const d=f.divideAtLength(h),g=f.divideAtLength(-h);d&&g&&(u=`${d[0].serialize()} ${g[1].serialize()}`)}}return{d:u||o.getConnectionPathData()}}},qy={qualify:io,set:tl("getTangentAtLength",{rotate:!0})},xL={qualify:io,set:tl("getTangentAtLength",{rotate:!1})},Jy={qualify:io,set:tl("getTangentAtRatio",{rotate:!0})},vL={qualify:io,set:tl("getTangentAtRatio",{rotate:!1})},CL=qy,SL=Jy;function tl(n,t){const e={x:1,y:0};return(s,r)=>{let i,o;const a=r.view,l=a[n](Number(s));return l?(o=t.rotate?l.vector().vectorAngle(e):0,i=l.start):(i=a.path.start,o=0),o===0?{transform:`translate(${i.x},${i.y}')`}:{transform:`translate(${i.x},${i.y}') rotate(${o})`}}}const EL=Object.freeze(Object.defineProperty({__proto__:null,annotations:UI,atConnectionLength:CL,atConnectionLengthIgnoreGradient:xL,atConnectionLengthKeepGradient:qy,atConnectionRatio:SL,atConnectionRatioIgnoreGradient:vL,atConnectionRatioKeepGradient:Jy,connection:wL,displayEmpty:YI,eol:GI,fill:VI,filter:QI,html:ZI,lineHeight:zI,port:tL,ref:vI,refCx:PI,refCy:AI,refD:kI,refDKeepOffset:TI,refDResetOffset:By,refDx:CI,refDy:SI,refHeight:Iy,refHeight2:BI,refPoints:DI,refPointsKeepOffset:NI,refPointsResetOffset:Vy,refR:_I,refRCircumscribed:MI,refRInscribed:Ly,refRx:EI,refRy:OI,refWidth:Ry,refWidth2:LI,refX:ky,refX2:RI,refY:Dy,refY2:II,resetOffset:XI,sourceMarker:pL,stroke:jI,style:KI,targetMarker:mL,text:Fy,textPath:HI,textVerticalAnchor:FI,textWrap:$I,title:WI,vertexMarker:yL,xAlign:qI,yAlign:JI},Symbol.toStringTag,{value:"Module"}));var On;(function(n){function t(e,s,r){return!!(e!=null&&(typeof e=="string"||typeof e.qualify!="function"||X(e.qualify,this,s,r)))}n.isValidDefinition=t})(On||(On={})),function(n){n.presets=Object.assign(Object.assign({},xI),EL),n.registry=Ft.create({type:"attribute definition"}),n.registry.register(n.presets,!0)}(On||(On={}));const Ue={prefixCls:"x6",autoInsertCSS:!0,useCSSSelector:!0,prefix(n){return`${Ue.prefixCls}-${n}`}},Xy=Ue.prefix("highlighted"),OL={highlight(n,t,e){const s=e&&e.className||Xy;J(t,s)},unhighlight(n,t,e){const s=e&&e.className||Xy;Dt(t,s)}},Ky=Ue.prefix("highlight-opacity"),ML={highlight(n,t){J(t,Ky)},unhighlight(n,t){Dt(t,Ky)}};var vt;(function(n){n.normalizeMarker=xs;function t(d,g){const p=jR(d.x,d.y).matrixTransform(g);return new O(p.x,p.y)}n.transformPoint=t;function e(d,g){return new W(t(d.start,g),t(d.end,g))}n.transformLine=e;function s(d,g){let p=d instanceof zt?d.points:d;return Array.isArray(p)||(p=[]),new zt(p.map(m=>t(m,g)))}n.transformPolyline=s;function r(d,g){const m=cn("svg").createSVGPoint();m.x=d.x,m.y=d.y;const y=m.matrixTransform(g);m.x=d.x+d.width,m.y=d.y;const b=m.matrixTransform(g);m.x=d.x+d.width,m.y=d.y+d.height;const w=m.matrixTransform(g);m.x=d.x,m.y=d.y+d.height;const x=m.matrixTransform(g),v=Math.min(y.x,b.x,w.x,x.x),S=Math.max(y.x,b.x,w.x,x.x),E=Math.min(y.y,b.y,w.y,x.y),C=Math.max(y.y,b.y,w.y,x.y);return new z(v,E,S-v,C-E)}n.transformRectangle=r;function i(d,g,p){let m;const y=d.ownerSVGElement;if(!y)return new z(0,0,0,0);try{m=d.getBBox()}catch{m={x:d.clientLeft,y:d.clientTop,width:d.clientWidth,height:d.clientHeight}}if(g)return z.create(m);const b=Qi(d,p||y);return r(m,b)}n.bbox=i;function o(d,g={}){let p;if(!d.ownerSVGElement||!gs(d)){if(oy(d)){const{left:w,top:x,width:v,height:S}=a(d);return new z(w,x,v,S)}return new z(0,0,0,0)}let y=g.target;if(!g.recursive){try{p=d.getBBox()}catch{p={x:d.clientLeft,y:d.clientTop,width:d.clientWidth,height:d.clientHeight}}if(!y)return z.create(p);const w=Qi(d,y);return r(p,w)}{const w=d.childNodes,x=w.length;if(x===0)return o(d,{target:y});y||(y=d);for(let v=0;v<x;v+=1){const S=w[v];let E;S.childNodes.length===0?E=o(S,{target:y}):E=o(S,{target:y,recursive:!0}),p?p=p.union(E):p=E}return p}}n.getBBox=o;function a(d){let g=0,p=0,m=0,y=0;if(d){let b=d;for(;b;)g+=b.offsetLeft,p+=b.offsetTop,b=b.offsetParent,b&&(g+=parseInt(fy(b,"borderLeft"),10),p+=parseInt(fy(b,"borderTop"),10));m=d.offsetWidth,y=d.offsetHeight}return{left:g,top:p,width:m,height:y}}n.getBoundingOffsetRect=a;function l(d){const g=p=>{const m=d.getAttribute(p),y=m?parseFloat(m):0;return Number.isNaN(y)?0:y};switch(d instanceof SVGElement&&d.nodeName.toLowerCase()){case"rect":return new z(g("x"),g("y"),g("width"),g("height"));case"circle":return new un(g("cx"),g("cy"),g("r"),g("r"));case"ellipse":return new un(g("cx"),g("cy"),g("rx"),g("ry"));case"polyline":{const p=Wa(d);return new zt(p)}case"polygon":{const p=Wa(d);return p.length>1&&p.push(p[0]),new zt(p)}case"path":{let p=d.getAttribute("d");return Z.isValid(p)||(p=Z.normalize(p)),Z.parse(p)}case"line":return new W(g("x1"),g("y1"),g("x2"),g("y2"))}return o(d)}n.toGeometryShape=l;function u(d,g,p,m){const y=O.create(g),b=O.create(p);m||(m=d instanceof SVGSVGElement?d:d.ownerSVGElement);const w=Uu(d);d.setAttribute("transform","");const x=o(d,{target:m}).scale(w.sx,w.sy),v=Ki();v.setTranslate(-x.x-x.width/2,-x.y-x.height/2);const S=Ki(),E=y.angleBetween(b,y.clone().translate(1,0));E&&S.setRotate(E,0,0);const C=Ki(),M=y.clone().move(b,x.width/2);C.setTranslate(2*y.x-M.x,2*y.y-M.y);const T=Qi(d,m),k=Ki();k.setMatrix(C.matrix.multiply(S.matrix.multiply(v.matrix.multiply(T.scale(w.sx,w.sy))))),d.setAttribute("transform",Br(k.matrix))}n.translateAndAutoOrient=u;function h(d){if(d==null)return null;let g=d;do{let p=g.tagName;if(typeof p!="string")return null;if(p=p.toUpperCase(),Sn(g,"x6-port"))g=g.nextElementSibling;else if(p==="G")g=g.firstElementChild;else if(p==="TITLE")g=g.nextElementSibling;else break}while(g);return g}n.findShapeNode=h;function f(d){const g=h(d);if(!gs(g)){if(oy(d)){const{left:y,top:b,width:w,height:x}=a(d);return new z(y,b,w,x)}return new z(0,0,0,0)}return l(g).bbox()||z.create()}n.getBBoxV2=f})(vt||(vt={}));const PL={padding:3,rx:0,ry:0,attrs:{"stroke-width":3,stroke:"#FEB663"}},AL={highlight(n,t,e){const s=Cs.getHighlighterId(t,e);if(Cs.hasCache(s))return;e=ig({},e,PL);const r=tt.create(t);let i,o;try{i=r.toPathData()}catch{o=vt.bbox(r.node,!0),i=xy(Object.assign(Object.assign({},e),o))}const a=cn("path");if(ut(a,Object.assign({d:i,"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},e.attrs?Ji(e.attrs):null)),n.isEdgeElement(t))ut(a,"d",n.getConnectionPathData());else{let h=r.getTransformToElement(n.container);const f=e.padding;if(f){o==null&&(o=vt.bbox(r.node,!0));const d=o.x+o.width/2,g=o.y+o.height/2;o=vt.transformRectangle(o,h);const p=Math.max(o.width,1),m=Math.max(o.height,1),y=(p+f)/p,b=(m+f)/m,w=ne({a:y,b:0,c:0,d:b,e:d-y*d,f:g-b*g});h=h.multiply(w)}Vr(a,h)}J(a,Ue.prefix("highlight-stroke"));const l=n.cell,u=()=>Cs.removeHighlighter(s);l.on("removed",u),l.model&&l.model.on("reseted",u),n.container.appendChild(a),Cs.setCache(s,a)},unhighlight(n,t,e){Cs.removeHighlighter(Cs.getHighlighterId(t,e))}};var Cs;(function(n){function t(o,a){return ku(o),o.id+JSON.stringify(a)}n.getHighlighterId=t;const e={};function s(o,a){e[o]=a}n.setCache=s;function r(o){return e[o]!=null}n.hasCache=r;function i(o){const a=e[o];a&&(ze(a),delete e[o])}n.removeHighlighter=i})(Cs||(Cs={}));const TL=Object.freeze(Object.defineProperty({__proto__:null,className:OL,opacity:ML,stroke:AL},Symbol.toStringTag,{value:"Module"}));var qn;(function(n){function t(e,s){if(typeof s.highlight!="function")throw new Error(`Highlighter '${e}' is missing required \`highlight()\` method`);if(typeof s.unhighlight!="function")throw new Error(`Highlighter '${e}' is missing required \`unhighlight()\` method`)}n.check=t})(qn||(qn={})),function(n){n.presets=TL,n.registry=Ft.create({type:"highlighter"}),n.registry.register(n.presets,!0)}(qn||(qn={}));function Zu(n,t={}){return new O(an(t.x,n.width),an(t.y,n.height))}function Qu(n,t,e){return Object.assign({angle:t,position:n.toJSON()},e)}const NL=(n,t)=>n.map(({x:e,y:s,angle:r})=>Qu(Zu(t,{x:e,y:s}),r||0)),_L=(n,t,e)=>{const s=e.start||0,r=e.step||20;return Zy(n,t,s,(i,o)=>(i+.5-o/2)*r)},kL=(n,t,e)=>{const s=e.start||0,r=e.step||360/n.length;return Zy(n,t,s,i=>i*r)};function Zy(n,t,e,s){const r=t.getCenter(),i=t.getTopCenter(),o=t.width/t.height,a=un.fromRect(t),l=n.length;return n.map((u,h)=>{const f=e+s(h,l),d=i.clone().rotate(-f,r).scale(o,1,r),g=u.compensateRotate?-a.tangentTheta(d):0;return(u.dx||u.dy)&&d.translate(u.dx||0,u.dy||0),u.dr&&d.move(r,u.dr),Qu(d.round(),g,u)})}var DL=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};const RL=(n,t,e)=>{const s=Zu(t,e.start||t.getOrigin()),r=Zu(t,e.end||t.getCorner());return oo(n,s,r,e)},IL=(n,t,e)=>oo(n,t.getTopLeft(),t.getBottomLeft(),e),LL=(n,t,e)=>oo(n,t.getTopRight(),t.getBottomRight(),e),BL=(n,t,e)=>oo(n,t.getTopLeft(),t.getTopRight(),e),VL=(n,t,e)=>oo(n,t.getBottomLeft(),t.getBottomRight(),e);function oo(n,t,e,s){const r=new W(t,e),i=n.length;return n.map((o,a)=>{var{strict:l}=o,u=DL(o,["strict"]);const h=l||s.strict?(a+1)/(i+1):(a+.5)/i,f=r.pointAt(h);return(u.dx||u.dy)&&f.translate(u.dx||0,u.dy||0),Qu(f.round(),0,u)})}const jL=Object.freeze(Object.defineProperty({__proto__:null,absolute:NL,bottom:VL,ellipse:_L,ellipseSpread:kL,left:IL,line:RL,right:LL,top:BL},Symbol.toStringTag,{value:"Module"}));var Qs;(function(n){n.presets=jL,n.registry=Ft.create({type:"port layout"}),n.registry.register(n.presets,!0)})(Qs||(Qs={}));const $L={position:{x:0,y:0},angle:0,attrs:{".":{y:"0","text-anchor":"start"}}};function Ss(n,t){const{x:e,y:s,angle:r,attrs:i}=t||{};return ig({},{angle:r,attrs:i,position:{x:e,y:s}},n,$L)}const zL=(n,t,e)=>Ss({position:t.getTopLeft()},e),FL=(n,t,e)=>Ss({position:{x:-15,y:0},attrs:{".":{y:".3em","text-anchor":"end"}}},e),HL=(n,t,e)=>Ss({position:{x:15,y:0},attrs:{".":{y:".3em","text-anchor":"start"}}},e),UL=(n,t,e)=>Ss({position:{x:0,y:-15},attrs:{".":{"text-anchor":"middle"}}},e),GL=(n,t,e)=>Ss({position:{x:0,y:15},attrs:{".":{y:".6em","text-anchor":"middle"}}},e),YL=(n,t,e)=>Qy(n,t,!1,e),WL=(n,t,e)=>Qy(n,t,!0,e),qL=(n,t,e)=>tb(n,t,!1,e),JL=(n,t,e)=>tb(n,t,!0,e);function Qy(n,t,e,s){const r=s.offset!=null?s.offset:15,i=t.getCenter().theta(n),o=eb(t);let a,l,u,h,f=0;return i<o[1]||i>o[2]?(a=".3em",l=r,u=0,h="start"):i<o[0]?(a="0",l=0,u=-r,e?(f=-90,h="start"):h="middle"):i<o[3]?(a=".3em",l=-r,u=0,h="end"):(a=".6em",l=0,u=r,e?(f=90,h="start"):h="middle"),Ss({position:{x:Math.round(l),y:Math.round(u)},angle:f,attrs:{".":{y:a,"text-anchor":h}}},s)}function tb(n,t,e,s){const r=s.offset!=null?s.offset:15,i=t.getCenter().theta(n),o=eb(t);let a,l,u,h,f=0;return i<o[1]||i>o[2]?(a=".3em",l=-r,u=0,h="end"):i<o[0]?(a=".6em",l=0,u=r,e?(f=90,h="start"):h="middle"):i<o[3]?(a=".3em",l=r,u=0,h="start"):(a="0em",l=0,u=-r,e?(f=-90,h="start"):h="middle"),Ss({position:{x:Math.round(l),y:Math.round(u)},angle:f,attrs:{".":{y:a,"text-anchor":h}}},s)}function eb(n){const t=n.getCenter(),e=t.theta(n.getTopLeft()),s=t.theta(n.getBottomLeft()),r=t.theta(n.getBottomRight()),i=t.theta(n.getTopRight());return[e,i,r,s]}const XL=(n,t,e)=>nb(n.diff(t.getCenter()),!1,e),KL=(n,t,e)=>nb(n.diff(t.getCenter()),!0,e);function nb(n,t,e){const s=e.offset!=null?e.offset:20,r=new O(0,0),i=-n.theta(r),o=n.clone().move(r,s).diff(n).round();let a=".3em",l,u=i;return(i+90)%180===0?(l=t?"end":"middle",!t&&i===-270&&(a="0em")):i>-270&&i<-90?(l="start",u=i-180):l="end",Ss({position:o.round().toJSON(),angle:t?u:0,attrs:{".":{y:a,"text-anchor":l}}},e)}const ZL=Object.freeze(Object.defineProperty({__proto__:null,bottom:GL,inside:qL,insideOriented:JL,left:FL,manual:zL,outside:YL,outsideOriented:WL,radial:XL,radialOriented:KL,right:HL,top:UL},Symbol.toStringTag,{value:"Module"}));var Gr;(function(n){n.presets=ZL,n.registry=Ft.create({type:"port label layout"}),n.registry.register(n.presets,!0)})(Gr||(Gr={}));var QL=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class pt extends Nt{get priority(){return 2}get disposeContainer(){return!0}constructor(){super(),this.cid=th.uniqueId(),pt.views[this.cid]=this}confirmUpdate(t,e){return 0}empty(t=this.container){return qi(t),this}unmount(t=this.container){return ze(t),this}remove(t=this.container){return t===this.container?(this.removeEventListeners(document),this.onRemove(),delete pt.views[this.cid],this.disposeContainer&&this.unmount(t)):this.unmount(t),this}onRemove(){}setClass(t,e=this.container){e.classList.value=Array.isArray(t)?t.join(" "):t}addClass(t,e=this.container){return J(e,Array.isArray(t)?t.join(" "):t),this}removeClass(t,e=this.container){return Dt(e,Array.isArray(t)?t.join(" "):t),this}setStyle(t,e=this.container){return qt(e,t),this}setAttrs(t,e=this.container){return t!=null&&e!=null&&ut(e,t),this}findAttr(t,e=this.container){let s=e;for(;s&&s.nodeType===1;){const r=s.getAttribute(t);if(r!=null)return r;if(s===this.container)return null;s=s.parentNode}return null}find(t,e=this.container,s=this.selectors){return pt.find(t,e,s).elems}findOne(t,e=this.container,s=this.selectors){const r=this.find(t,e,s);return r.length>0?r[0]:null}findByAttr(t,e=this.container){let s=e;for(;s&&s.getAttribute;){const r=s.getAttribute(t);if((r!=null||s===this.container)&&r!=="false")return s;s=s.parentNode}return null}getSelector(t,e){let s;if(t===this.container)return typeof e=="string"&&(s=`> ${e}`),s;if(t){const r=Ru(t)+1;s=`${t.tagName.toLowerCase()}:nth-child(${r})`,e&&(s+=` > ${e}`),s=this.getSelector(t.parentNode,s)}return s}prefixClassName(t){return Ue.prefix(t)}delegateEvents(t,e){if(t==null)return this;e||this.undelegateEvents();const s=/^(\S+)\s*(.*)$/;return Object.keys(t).forEach(r=>{const i=r.match(s);if(i==null)return;const o=this.getEventHandler(t[r]);typeof o=="function"&&this.delegateEvent(i[1],i[2],o)}),this}undelegateEvents(){return le.off(this.container,this.getEventNamespace()),this}delegateDocumentEvents(t,e){return this.addEventListeners(document,t,e),this}undelegateDocumentEvents(){return this.removeEventListeners(document),this}delegateEvent(t,e,s){return le.on(this.container,t+this.getEventNamespace(),e,s),this}undelegateEvent(t,e,s){const r=t+this.getEventNamespace();return e==null?le.off(this.container,r):typeof e=="string"?le.off(this.container,r,e,s):le.off(this.container,r,e),this}addEventListeners(t,e,s){if(e==null)return this;const r=this.getEventNamespace();return Object.keys(e).forEach(i=>{const o=this.getEventHandler(e[i]);typeof o=="function"&&le.on(t,i+r,s,o)}),this}removeEventListeners(t){return t!=null&&le.off(t,this.getEventNamespace()),this}getEventNamespace(){return`.${Ue.prefixCls}-event-${this.cid}`}getEventHandler(t){let e;if(typeof t=="string"){const s=this[t];typeof s=="function"&&(e=(...r)=>s.call(this,...r))}else e=(...s)=>t.call(this,...s);return e}getEventTarget(t,e={}){const{target:s,type:r,clientX:i=0,clientY:o=0}=t;return e.fromPoint||r==="touchmove"||r==="touchend"?document.elementFromPoint(i,o):s}stopPropagation(t){return this.setEventData(t,{propagationStopped:!0}),this}isPropagationStopped(t){return this.getEventData(t).propagationStopped===!0}getEventData(t){return this.eventData(t)}setEventData(t,e){return this.eventData(t,e)}eventData(t,e){if(t==null)throw new TypeError("Event object required");let s=t.data;const r=`__${this.cid}__`;return e==null?s==null?{}:s[r]||{}:(s==null&&(s=t.data={}),s[r]==null?s[r]=Object.assign({},e):s[r]=Object.assign(Object.assign({},s[r]),e),s[r])}normalizeEvent(t){return pt.normalizeEvent(t)}dispose(){this.remove()}}QL([pt.dispose()],pt.prototype,"dispose",null),function(n){function t(r,i){return i?cn(r||"g"):Du(r||"div")}n.createElement=t;function e(r,i,o){if(!r||r===".")return{elems:[i]};if(o){const a=o[r];if(a)return{elems:Array.isArray(a)?a:[a]}}{const a=r.includes(">")?`:scope ${r}`:r;return{isCSSSelector:!0,elems:Array.prototype.slice.call(i.querySelectorAll(a))}}}n.find=e;function s(r){let i=r;const o=r.originalEvent,a=o&&o.changedTouches&&o.changedTouches[0];if(a){for(const l in r)a[l]===void 0&&(a[l]=r[l]);i=a}return i}n.normalizeEvent=s}(pt||(pt={})),function(n){n.views={};function t(e){return n.views[e]||null}n.getView=t}(pt||(pt={}));var th;(function(n){let t=0;function e(){const s=`v${t}`;return t+=1,s}n.uniqueId=e})(th||(th={}));class tB{constructor(t){this.view=t,this.clean()}clean(){this.elemCache&&this.elemCache.dispose(),this.elemCache=new Wu,this.pathCache={}}get(t){return this.elemCache.has(t)||this.elemCache.set(t,{}),this.elemCache.get(t)}getData(t){const e=this.get(t);return e.data||(e.data={}),e.data}getMatrix(t){const e=this.get(t);if(e.matrix==null){const s=this.view.container;e.matrix=UR(t,s)}return ne(e.matrix)}getShape(t){const e=this.get(t);return e.shape==null&&(e.shape=vt.toGeometryShape(t)),e.shape.clone()}getBoundingRect(t){const e=this.get(t);return e.boundingRect==null&&(e.boundingRect=vt.getBBoxV2(t)),e.boundingRect.clone()}}var _t;(function(n){function t(u){return u!=null&&!e(u)}n.isJSONMarkup=t;function e(u){return u!=null&&typeof u=="string"}n.isStringMarkup=e;function s(u){return u==null||e(u)?u:Tt(u)}n.clone=s;function r(u){return`${u}`.trim().replace(/[\r|\n]/g," ").replace(/>\s+</g,"><")}n.sanitize=r;function i(u,h={ns:ee.svg}){const f=document.createDocumentFragment(),d={},g={},p=[{markup:Array.isArray(u)?u:[u],parent:f,ns:h.ns}];for(;p.length>0;){const m=p.pop();let y=m.ns||ee.svg;const b=m.markup,w=m.parent;b.forEach(x=>{const v=x.tagName;if(!v)throw new TypeError("Invalid tagName");x.ns&&(y=x.ns);const S=y?Du(v,y):sy(v),E=x.attrs;E&&ut(S,Ji(E));const C=x.style;C&&qt(S,C);const M=x.className;M!=null&&S.setAttribute("class",Array.isArray(M)?M.join(" "):M),x.textContent&&(S.textContent=x.textContent);const T=x.selector;if(T!=null){if(g[T])throw new TypeError("Selector must be unique");g[T]=S}if(x.groupSelector){let _=x.groupSelector;Array.isArray(_)||(_=[_]),_.forEach(D=>{d[D]||(d[D]=[]),d[D].push(S)})}w.appendChild(S);const k=x.children;Array.isArray(k)&&p.push({ns:y,markup:k,parent:S})})}return Object.keys(d).forEach(m=>{if(g[m])throw new Error("Ambiguous group selector");g[m]=d[m]}),{fragment:f,selectors:g,groups:d}}n.parseJSONMarkup=i;function o(u){return u instanceof SVGElement?cn("g"):sy("div")}function a(u){if(e(u)){const g=tt.createVectors(u),p=g.length;if(p===1)return{elem:g[0].node};if(p>1){const m=o(g[0].node);return g.forEach(y=>{m.appendChild(y.node)}),{elem:m}}return{}}const h=i(u),f=h.fragment;let d=null;return f.childNodes.length>1?(d=o(f.firstChild),d.appendChild(f)):d=f.firstChild,{elem:d,selectors:h.selectors}}n.renderMarkup=a;function l(u){const h=tt.createVectors(u),f=document.createDocumentFragment();for(let d=0,g=h.length;d<g;d+=1){const p=h[d].node;f.appendChild(p)}return{fragment:f,selectors:{}}}n.parseLabelStringMarkup=l})(_t||(_t={})),function(n){function t(e,s,r){if(e!=null){let i;const o=e.tagName.toLowerCase();if(e===s)return typeof r=="string"?i=`> ${o} > ${r}`:i=`> ${o}`,i;const a=e.parentNode;if(a&&a.childNodes.length>1){const l=Ru(e)+1;i=`${o}:nth-child(${l})`}else i=o;return r&&(i+=` > ${r}`),t(e.parentNode,s,i)}return r}n.getSelector=t}(_t||(_t={})),function(n){function t(){return"g"}n.getPortContainerMarkup=t;function e(){return{tagName:"circle",selector:"circle",attrs:{r:10,fill:"#FFFFFF",stroke:"#000000"}}}n.getPortMarkup=e;function s(){return{tagName:"text",selector:"text",attrs:{fill:"#000000"}}}n.getPortLabelMarkup=s}(_t||(_t={})),function(n){function t(){return[{tagName:"path",selector:"wrap",groupSelector:"lines",attrs:{fill:"none",cursor:"pointer",stroke:"transparent",strokeLinecap:"round"}},{tagName:"path",selector:"line",groupSelector:"lines",attrs:{fill:"none",pointerEvents:"none"}}]}n.getEdgeMarkup=t}(_t||(_t={})),function(n){function t(e=!1){return{tagName:"foreignObject",selector:"fo",children:[{ns:ee.xhtml,tagName:"body",selector:"foBody",attrs:{xmlns:ee.xhtml},style:{width:"100%",height:"100%",background:"transparent"},children:e?[]:[{tagName:"div",selector:"foContent",style:{width:"100%",height:"100%"}}]}]}}n.getForeignObjectMarkup=t}(_t||(_t={}));class sb{constructor(t){this.view=t}get cell(){return this.view.cell}getDefinition(t){return this.cell.getAttrDefinition(t)}processAttrs(t,e){let s,r,i,o;const a=[];return Object.keys(e).forEach(l=>{const u=e[l],h=this.getDefinition(l),f=X(On.isValidDefinition,this.view,h,u,{elem:t,attrs:e,cell:this.cell,view:this.view});if(h&&f)typeof h=="string"?(s==null&&(s={}),s[h]=u):u!==null&&a.push({name:l,definition:h});else{s==null&&(s={});const d=ay.includes(l)?l:jm(l);s[d]=u}}),a.forEach(({name:l,definition:u})=>{const h=e[l];typeof u.set=="function"&&(r==null&&(r={}),r[l]=h),typeof u.offset=="function"&&(i==null&&(i={}),i[l]=h),typeof u.position=="function"&&(o==null&&(o={}),o[l]=h)}),{raw:e,normal:s,set:r,offset:i,position:o}}mergeProcessedAttrs(t,e){t.set=Object.assign(Object.assign({},t.set),e.set),t.position=Object.assign(Object.assign({},t.position),e.position),t.offset=Object.assign(Object.assign({},t.offset),e.offset);const s=t.normal&&t.normal.transform;s!=null&&e.normal&&(e.normal.transform=s),t.normal=e.normal}findAttrs(t,e,s,r){const i=[],o=new Wu;return Object.keys(t).forEach(a=>{const l=t[a];if(!bn(l))return;const{isCSSSelector:u,elems:h}=pt.find(a,e,r);s[a]=h;for(let f=0,d=h.length;f<d;f+=1){const g=h[f],p=r&&r[a]===g,m=o.get(g);if(m){m.array||(i.push(g),m.array=!0,m.attrs=[m.attrs],m.priority=[m.priority]);const y=m.attrs,b=m.priority;if(p)y.unshift(l),b.unshift(-1);else{const w=x2(b,u?-1:d);y.splice(w,0,l),b.splice(w,0,d)}}else o.set(g,{elem:g,attrs:l,priority:p?-1:d,array:!1})}}),i.forEach(a=>{const l=o.get(a),u=l.attrs;l.attrs=u.reduceRight((h,f)=>Yt(h,f),{})}),o}updateRelativeAttrs(t,e,s){const r=e.raw||{};let i=e.normal||{};const o=e.set,a=e.position,l=e.offset,u=()=>({elem:t,cell:this.cell,view:this.view,attrs:r,refBBox:s.clone()});if(o!=null&&Object.keys(o).forEach(y=>{const b=o[y],w=this.getDefinition(y);if(w!=null){const x=X(w.set,this.view,b,u());typeof x=="object"?i=Object.assign(Object.assign({},i),x):x!=null&&(i[y]=x)}}),t instanceof HTMLElement){this.view.setAttrs(i,t);return}const h=i.transform,f=h?`${h}`:null,d=Zi(f),g=new O(d.e,d.f);h&&(delete i.transform,d.e=0,d.f=0);let p=!1;a!=null&&Object.keys(a).forEach(y=>{const b=a[y],w=this.getDefinition(y);if(w!=null){const x=X(w.position,this.view,b,u());x!=null&&(p=!0,g.translate(O.create(x)))}}),this.view.setAttrs(i,t);let m=!1;if(l!=null){const y=this.view.getBoundingRectOfElement(t);if(y.width>0&&y.height>0){const b=vt.transformRectangle(y,d);Object.keys(l).forEach(w=>{const x=l[w],v=this.getDefinition(w);if(v!=null){const S=X(v.offset,this.view,x,{elem:t,cell:this.cell,view:this.view,attrs:r,refBBox:b});S!=null&&(m=!0,g.translate(O.create(S)))}})}}(h!=null||p||m)&&(g.round(1),d.e=g.x,d.f=g.y,t.setAttribute("transform",Br(d)))}update(t,e,s){const r={},i=this.findAttrs(s.attrs||e,t,r,s.selectors),o=s.attrs?this.findAttrs(e,t,r,s.selectors):i,a=[];i.each(h=>{const f=h.elem,d=h.attrs,g=this.processAttrs(f,d);if(g.set==null&&g.position==null&&g.offset==null)this.view.setAttrs(g.normal,f);else{const p=o.get(f),m=p?p.attrs:null,y=m&&d.ref==null?m.ref:d.ref;let b;if(y){if(b=(r[y]||this.view.find(y,t,s.selectors))[0],!b)throw new Error(`"${y}" reference does not exist.`)}else b=null;const w={node:f,refNode:b,attributes:m,processedAttributes:g},x=a.findIndex(v=>v.refNode===f);x>-1?a.splice(x,0,w):a.push(w)}});const l=new Wu;let u;a.forEach(h=>{const f=h.node,d=h.refNode;let g;const p=d!=null&&s.rotatableNode!=null&&Iu(s.rotatableNode,d);if(d&&(g=l.get(d)),!g){const b=p?s.rotatableNode:t;g=d?vt.getBBox(d,{target:b}):s.rootBBox,d&&l.set(d,g)}let m;s.attrs&&h.attributes?(m=this.processAttrs(f,h.attributes),this.mergeProcessedAttrs(m,h.processedAttributes)):m=h.processedAttributes;let y=g;p&&s.rotatableNode!=null&&!s.rotatableNode.contains(f)&&(u||(u=Zi(ut(s.rotatableNode,"transform"))),y=vt.transformRectangle(g,u)),this.updateRelativeAttrs(f,m,y)})}}class rb{get cell(){return this.view.cell}constructor(t,e,s=[]){this.view=t;const r={},i={};let o=0;Object.keys(e).forEach(l=>{let u=e[l];Array.isArray(u)||(u=[u]),u.forEach(h=>{let f=r[h];f||(o+=1,f=r[h]=1<<o),i[l]|=f})});let a=s;if(Array.isArray(a)||(a=[a]),a.forEach(l=>{r[l]||(o+=1,r[l]=1<<o)}),o>25)throw new Error("Maximum number of flags exceeded.");this.flags=r,this.attrs=i,this.bootstrap=s}getFlag(t){const e=this.flags;return e==null?0:Array.isArray(t)?t.reduce((s,r)=>s|e[r],0):e[t]|0}hasAction(t,e){return t&this.getFlag(e)}removeAction(t,e){return t^t&this.getFlag(e)}getBootstrapFlag(){return this.getFlag(this.bootstrap)}getChangedFlag(){let t=0;return this.attrs&&Object.keys(this.attrs).forEach(e=>{this.cell.hasChanged(e)&&(t|=this.attrs[e])}),t}}var eB=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i},nB=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class Ht extends pt{static getDefaults(){return this.defaults}static config(t){this.defaults=this.getOptions(t)}static getOptions(t){const e=(u,h)=>h!=null?hg([...Array.isArray(u)?u:[u],...Array.isArray(h)?h:[h]]):Array.isArray(u)?[...u]:[u],s=Tt(this.getDefaults()),{bootstrap:r,actions:i,events:o,documentEvents:a}=t,l=nB(t,["bootstrap","actions","events","documentEvents"]);return r&&(s.bootstrap=e(s.bootstrap,r)),i&&Object.entries(i).forEach(([u,h])=>{const f=s.actions[u];h&&f?s.actions[u]=e(f,h):h&&(s.actions[u]=e(h))}),o&&(s.events=Object.assign(Object.assign({},s.events),o)),t.documentEvents&&(s.documentEvents=Object.assign(Object.assign({},s.documentEvents),a)),Yt(s,l)}get[Symbol.toStringTag](){return Ht.toStringTag}constructor(t,e={}){super(),this.cell=t,this.options=this.ensureOptions(e),this.graph=this.options.graph,this.attr=new sb(this),this.flag=new rb(this,this.options.actions,this.options.bootstrap),this.cache=new tB(this),this.setContainer(this.ensureContainer()),this.setup(),this.init()}init(){}onRemove(){this.removeTools()}get priority(){return this.options.priority}get rootSelector(){return this.options.rootSelector}getConstructor(){return this.constructor}ensureOptions(t){return this.getConstructor().getOptions(t)}getContainerTagName(){return this.options.isSvgElement?"g":"div"}getContainerStyle(){}getContainerAttrs(){return{"data-cell-id":this.cell.id,"data-shape":this.cell.shape}}getContainerClassName(){return this.prefixClassName("cell")}ensureContainer(){return pt.createElement(this.getContainerTagName(),this.options.isSvgElement)}setContainer(t){if(this.container!==t){this.undelegateEvents(),this.container=t,this.options.events!=null&&this.delegateEvents(this.options.events);const e=this.getContainerAttrs();e!=null&&this.setAttrs(e,t);const s=this.getContainerStyle();s!=null&&this.setStyle(s,t);const r=this.getContainerClassName();r!=null&&this.addClass(r,t)}return this}isNodeView(){return!1}isEdgeView(){return!1}render(){return this}confirmUpdate(t,e={}){return 0}getBootstrapFlag(){return this.flag.getBootstrapFlag()}getFlag(t){return this.flag.getFlag(t)}hasAction(t,e){return this.flag.hasAction(t,e)}removeAction(t,e){return this.flag.removeAction(t,e)}handleAction(t,e,s,r){if(this.hasAction(t,e)){s();const i=[e];return r&&(typeof r=="string"?i.push(r):i.push(...r)),this.removeAction(t,i)}return t}setup(){this.cell.on("changed",this.onCellChanged,this)}onCellChanged({options:t}){this.onAttrsChange(t)}onAttrsChange(t){let e=this.flag.getChangedFlag();t.updated||!e||(t.dirty&&this.hasAction(e,"update")&&(e|=this.getFlag("render")),t.toolId&&(t.async=!1),this.graph!=null&&this.graph.renderer.requestViewUpdate(this,e,t))}parseJSONMarkup(t,e){const s=_t.parseJSONMarkup(t),r=s.selectors,i=this.rootSelector;if(e&&i){if(r[i])throw new Error("Invalid root selector");r[i]=e}return s}can(t){let e=this.graph.options.interacting;if(typeof e=="function"&&(e=X(e,this.graph,this)),typeof e=="object"){let s=e[t];return typeof s=="function"&&(s=X(s,this.graph,this)),s!==!1}return typeof e=="boolean"?e:!1}cleanCache(){return this.cache.clean(),this}getCache(t){return this.cache.get(t)}getDataOfElement(t){return this.cache.getData(t)}getMatrixOfElement(t){return this.cache.getMatrix(t)}getShapeOfElement(t){return this.cache.getShape(t)}getBoundingRectOfElement(t){return this.cache.getBoundingRect(t)}getBBoxOfElement(t){const e=this.getBoundingRectOfElement(t),s=this.getMatrixOfElement(t),r=this.getRootRotatedMatrix(),i=this.getRootTranslatedMatrix();return vt.transformRectangle(e,i.multiply(r).multiply(s))}getUnrotatedBBoxOfElement(t){const e=this.getBoundingRectOfElement(t),s=this.getMatrixOfElement(t),r=this.getRootTranslatedMatrix();return vt.transformRectangle(e,r.multiply(s))}getBBox(t={}){let e;if(t.useCellGeometry){const s=this.cell,r=s.isNode()?s.getAngle():0;e=s.getBBox().bbox(r)}else e=this.getBBoxOfElement(this.container);return this.graph.coord.localToGraphRect(e)}getRootTranslatedMatrix(){const t=this.cell,e=t.isNode()?t.getPosition():{x:0,y:0};return ne().translate(e.x,e.y)}getRootRotatedMatrix(){let t=ne();const e=this.cell,s=e.isNode()?e.getAngle():0;if(s){const r=e.getBBox(),i=r.width/2,o=r.height/2;t=t.translate(i,o).rotate(s).translate(-i,-o)}return t}findMagnet(t=this.container){return this.findByAttr("magnet",t)}updateAttrs(t,e,s={}){s.rootBBox==null&&(s.rootBBox=new z),s.selectors==null&&(s.selectors=this.selectors),this.attr.update(t,e,s)}isEdgeElement(t){return this.cell.isEdge()&&(t==null||t===this.container)}prepareHighlight(t,e={}){const s=t||this.container;return e.partial=s===this.container,s}highlight(t,e={}){const s=this.prepareHighlight(t,e);return this.notify("cell:highlight",{magnet:s,options:e,view:this,cell:this.cell}),this.isEdgeView()?this.notify("edge:highlight",{magnet:s,options:e,view:this,edge:this.cell,cell:this.cell}):this.isNodeView()&&this.notify("node:highlight",{magnet:s,options:e,view:this,node:this.cell,cell:this.cell}),this}unhighlight(t,e={}){const s=this.prepareHighlight(t,e);return this.notify("cell:unhighlight",{magnet:s,options:e,view:this,cell:this.cell}),this.isNodeView()?this.notify("node:unhighlight",{magnet:s,options:e,view:this,node:this.cell,cell:this.cell}):this.isEdgeView()&&this.notify("edge:unhighlight",{magnet:s,options:e,view:this,edge:this.cell,cell:this.cell}),this}notifyUnhighlight(t,e){}getEdgeTerminal(t,e,s,r,i){const o=this.cell,a=this.findAttr("port",t),l=t.getAttribute("data-selector"),u={cell:o.id};return l!=null&&(u.magnet=l),a!=null?(u.port=a,o.isNode()&&!o.hasPort(a)&&l==null&&(u.selector=this.getSelector(t))):l==null&&this.container!==t&&(u.selector=this.getSelector(t)),u}getMagnetFromEdgeTerminal(t){const e=this.cell,s=this.container,r=t.port;let i=t.magnet,o;return r!=null&&e.isNode()&&e.hasPort(r)?o=this.findPortElem(r,i)||s:(i||(i=t.selector),!i&&r!=null&&(i=`[port="${r}"]`),o=this.findOne(i,s,this.selectors)),o}hasTools(t){const e=this.tools;return e==null?!1:t==null?!0:e.name===t}addTools(t){if(this.removeTools(),t){if(!this.can("toolsAddable"))return this;const e=Jt.isToolsView(t)?t:new Jt(t);this.tools=e,e.config({view:this}),e.mount()}return this}updateTools(t={}){return this.tools&&this.tools.update(t),this}removeTools(){return this.tools&&(this.tools.remove(),this.tools=null),this}hideTools(){return this.tools&&this.tools.hide(),this}showTools(){return this.tools&&this.tools.show(),this}renderTools(){const t=this.cell.getTools();return this.addTools(t),this}notify(t,e){return this.trigger(t,e),this.graph.trigger(t,e),this}getEventArgs(t,e,s){const r=this,i=r.cell;return e==null||s==null?{e:t,view:r,cell:i}:{e:t,x:e,y:s,view:r,cell:i}}onClick(t,e,s){this.notify("cell:click",this.getEventArgs(t,e,s))}onDblClick(t,e,s){this.notify("cell:dblclick",this.getEventArgs(t,e,s))}onContextMenu(t,e,s){this.notify("cell:contextmenu",this.getEventArgs(t,e,s))}onMouseDown(t,e,s){this.cell.model&&(this.cachedModelForMouseEvent=this.cell.model,this.cachedModelForMouseEvent.startBatch("mouse")),this.notify("cell:mousedown",this.getEventArgs(t,e,s))}onMouseUp(t,e,s){this.notify("cell:mouseup",this.getEventArgs(t,e,s)),this.cachedModelForMouseEvent&&(this.cachedModelForMouseEvent.stopBatch("mouse",{cell:this.cell}),this.cachedModelForMouseEvent=null)}onMouseMove(t,e,s){this.notify("cell:mousemove",this.getEventArgs(t,e,s))}onMouseOver(t){this.notify("cell:mouseover",this.getEventArgs(t))}onMouseOut(t){this.notify("cell:mouseout",this.getEventArgs(t))}onMouseEnter(t){this.notify("cell:mouseenter",this.getEventArgs(t))}onMouseLeave(t){this.notify("cell:mouseleave",this.getEventArgs(t))}onMouseWheel(t,e,s,r){this.notify("cell:mousewheel",Object.assign({delta:r},this.getEventArgs(t,e,s)))}onCustomEvent(t,e,s,r){this.notify("cell:customevent",Object.assign({name:e},this.getEventArgs(t,s,r))),this.notify(e,Object.assign({},this.getEventArgs(t,s,r)))}onMagnetMouseDown(t,e,s,r){}onMagnetDblClick(t,e,s,r){}onMagnetContextMenu(t,e,s,r){}onLabelMouseDown(t,e,s){}checkMouseleave(t){const e=this.getEventTarget(t,{fromPoint:!0}),s=this.graph.findViewByElem(e);s!==this&&(this.onMouseLeave(t),s&&s.onMouseEnter(t))}dispose(){this.cell.off("changed",this.onCellChanged,this)}}Ht.defaults={isSvgElement:!0,rootSelector:"root",priority:0,bootstrap:[],actions:{}},eB([Ht.dispose()],Ht.prototype,"dispose",null),function(n){n.Flag=rb,n.Attr=sb}(Ht||(Ht={})),function(n){n.toStringTag=`X6.${n.name}`;function t(e){if(e==null)return!1;if(e instanceof n)return!0;const s=e[Symbol.toStringTag],r=e;return(s==null||s===n.toStringTag)&&typeof r.isNodeView=="function"&&typeof r.isEdgeView=="function"&&typeof r.confirmUpdate=="function"}n.isCellView=t}(Ht||(Ht={})),function(n){function t(s){return function(r){r.config({priority:s})}}n.priority=t;function e(s){return function(r){r.config({bootstrap:s})}}n.bootstrap=e}(Ht||(Ht={})),function(n){n.registry=Ft.create({type:"view"})}(Ht||(Ht={}));class Jt extends pt{get name(){return this.options.name}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get[Symbol.toStringTag](){return Jt.toStringTag}constructor(t={}){super(),this.svgContainer=this.createContainer(!0,t),this.htmlContainer=this.createContainer(!1,t),this.config(t)}createContainer(t,e){const s=t?pt.createElement("g",!0):pt.createElement("div",!1);return J(s,this.prefixClassName("cell-tools")),e.className&&J(s,e.className),s}config(t){if(this.options=Object.assign(Object.assign({},this.options),t),!Ht.isCellView(t.view)||t.view===this.cellView)return this;this.cellView=t.view,this.cell.isEdge()?(J(this.svgContainer,this.prefixClassName("edge-tools")),J(this.htmlContainer,this.prefixClassName("edge-tools"))):this.cell.isNode()&&(J(this.svgContainer,this.prefixClassName("node-tools")),J(this.htmlContainer,this.prefixClassName("node-tools"))),this.svgContainer.setAttribute("data-cell-id",this.cell.id),this.htmlContainer.setAttribute("data-cell-id",this.cell.id),this.name&&(this.svgContainer.setAttribute("data-tools-name",this.name),this.htmlContainer.setAttribute("data-tools-name",this.name));const e=this.options.items;if(!Array.isArray(e))return this;this.tools=[];const s=[];e.forEach(r=>{Jt.ToolItem.isToolItem(r)?r.name==="vertices"?s.unshift(r):s.push(r):(typeof r=="object"?r.name:r)==="vertices"?s.unshift(r):s.push(r)});for(let r=0;r<s.length;r+=1){const i=s[r];let o;if(Jt.ToolItem.isToolItem(i))o=i;else{const a=typeof i=="object"?i.name:i,l=typeof i=="object"?i.args||{}:{};if(a){if(this.cell.isNode()){const u=Wr.registry.get(a);if(u)o=new u(l);else return Wr.registry.onNotFound(a)}else if(this.cell.isEdge()){const u=qr.registry.get(a);if(u)o=new u(l);else return qr.registry.onNotFound(a)}}}o&&(o.config(this.cellView,this),o.render(),(o.options.isSVGElement!==!1?this.svgContainer:this.htmlContainer).appendChild(o.container),this.tools.push(o))}return this}update(t={}){const e=this.tools;return e&&e.forEach(s=>{t.toolId!==s.cid&&s.isVisible()&&s.update()}),this}focus(t){const e=this.tools;return e&&e.forEach(s=>{t===s?s.show():s.hide()}),this}blur(t){const e=this.tools;return e&&e.forEach(s=>{s!==t&&!s.isVisible()&&(s.show(),s.update())}),this}hide(){return this.focus(null)}show(){return this.blur(null)}remove(){const t=this.tools;return t&&(t.forEach(e=>e.remove()),this.tools=null),ze(this.svgContainer),ze(this.htmlContainer),super.remove()}mount(){const t=this.tools,e=this.cellView;if(e&&t){const s=t.some(i=>i.options.isSVGElement!==!1),r=t.some(i=>i.options.isSVGElement===!1);s&&(this.options.local?e.container:e.graph.view.decorator).appendChild(this.svgContainer),r&&this.graph.container.appendChild(this.htmlContainer)}return this}}(function(n){n.toStringTag=`X6.${n.name}`;function t(e){if(e==null)return!1;if(e instanceof n)return!0;const s=e[Symbol.toStringTag],r=e;return(s==null||s===n.toStringTag)&&r.graph!=null&&r.cell!=null&&typeof r.config=="function"&&typeof r.update=="function"&&typeof r.focus=="function"&&typeof r.blur=="function"&&typeof r.show=="function"&&typeof r.hide=="function"}n.isToolsView=t})(Jt||(Jt={})),function(n){class t extends pt{static getDefaults(){return this.defaults}static config(s){this.defaults=this.getOptions(s)}static getOptions(s){return Yt(Tt(this.getDefaults()),s)}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get name(){return this.options.name}get[Symbol.toStringTag](){return t.toStringTag}constructor(s={}){super(),this.visible=!0,this.options=this.getOptions(s),this.container=pt.createElement(this.options.tagName||"g",this.options.isSVGElement!==!1),J(this.container,this.prefixClassName("cell-tool")),typeof this.options.className=="string"&&J(this.container,this.options.className),this.init()}init(){}getOptions(s){return this.constructor.getOptions(s)}delegateEvents(){return this.options.events&&super.delegateEvents(this.options.events),this}config(s,r){return this.cellView=s,this.parent=r,this.stamp(this.container),this.cell.isEdge()?J(this.container,this.prefixClassName("edge-tool")):this.cell.isNode()&&J(this.container,this.prefixClassName("node-tool")),this.name&&this.container.setAttribute("data-tool-name",this.name),this.delegateEvents(),this}render(){this.empty();const s=this.options.markup;if(s){const r=_t.parseJSONMarkup(s);this.container.appendChild(r.fragment),this.childNodes=r.selectors}return this.onRender(),this}onRender(){}update(){return this}stamp(s){s&&s.setAttribute("data-cell-id",this.cellView.cell.id)}show(){return this.container.style.display="",this.visible=!0,this}hide(){return this.container.style.display="none",this.visible=!1,this}isVisible(){return this.visible}focus(){const s=this.options.focusOpacity;return s!=null&&Number.isFinite(s)&&(this.container.style.opacity=`${s}`),this.parent.focus(this),this}blur(){return this.container.style.opacity="",this.parent.blur(this),this}guard(s){return this.graph==null||this.cellView==null?!0:this.graph.view.guard(s,this.cellView)}}t.defaults={isSVGElement:!0,tagName:"g"},n.ToolItem=t,function(e){let s=0;function r(o){return o?Pu(o):(s+=1,`CustomTool${s}`)}function i(o){const a=Ou(r(o.name),this);return a.config(o),a}e.define=i}(t=n.ToolItem||(n.ToolItem={})),function(e){e.toStringTag=`X6.${e.name}`;function s(r){if(r==null)return!1;if(r instanceof e)return!0;const i=r[Symbol.toStringTag],o=r;return(i==null||i===e.toStringTag)&&o.graph!=null&&o.cell!=null&&typeof o.config=="function"&&typeof o.update=="function"&&typeof o.focus=="function"&&typeof o.blur=="function"&&typeof o.show=="function"&&typeof o.hide=="function"&&typeof o.isVisible=="function"}e.isToolItem=s}(t=n.ToolItem||(n.ToolItem={}))}(Jt||(Jt={}));const sB=n=>n;function ib(n,t){return t===0?"0%":`${Math.round(n/t*100)}%`}function ob(n){return(e,s,r,i)=>s.isEdgeElement(r)?iB(n,e,s,r,i):rB(n,e,s,r,i)}function rB(n,t,e,s,r){const i=e.cell,o=i.getAngle(),a=e.getUnrotatedBBoxOfElement(s),l=i.getBBox().getCenter(),u=O.create(r).rotate(o,l);let h=u.x-a.x,f=u.y-a.y;return n&&(h=ib(h,a.width),f=ib(f,a.height)),t.anchor={name:"topLeft",args:{dx:h,dy:f,rotate:!0}},t}function iB(n,t,e,s,r){const i=e.getConnection();if(!i)return t;const o=i.closestPointLength(r);if(n){const a=i.length();t.anchor={name:"ratio",args:{ratio:o/a}}}else t.anchor={name:"length",args:{length:o}};return t}const oB=ob(!0),aB=ob(!1),lB=Object.freeze(Object.defineProperty({__proto__:null,noop:sB,pinAbsolute:aB,pinRelative:oB},Symbol.toStringTag,{value:"Module"}));var eh;(function(n){n.presets=lB,n.registry=Ft.create({type:"connection strategy"}),n.registry.register(n.presets,!0)})(eh||(eh={}));function ab(n,t,e,s){return X(eh.presets.pinRelative,this.graph,{},t,e,n,this.cell,s,{}).anchor}function lb(n,t){return t?n.cell.getBBox():n.cell.isEdge()?n.getConnection().bbox():n.getUnrotatedBBoxOfElement(n.container)}class Es extends Jt.ToolItem{onRender(){J(this.container,this.prefixClassName("cell-tool-button")),this.update()}update(){return this.updatePosition(),this}updatePosition(){const e=this.cellView.cell.isEdge()?this.getEdgeMatrix():this.getNodeMatrix();Vr(this.container,e,{absolute:!0})}getNodeMatrix(){const t=this.cellView,e=this.options;let{x:s=0,y:r=0}=e;const{offset:i,useCellGeometry:o,rotate:a}=e;let l=lb(t,o);const u=t.cell.getAngle();a||(l=l.bbox(u));let h=0,f=0;typeof i=="number"?(h=i,f=i):typeof i=="object"&&(h=i.x,f=i.y),s=an(s,l.width),r=an(r,l.height);let d=ne().translate(l.x+l.width/2,l.y+l.height/2);return a&&(d=d.rotate(u)),d=d.translate(s+h-l.width/2,r+f-l.height/2),d}getEdgeMatrix(){const t=this.cellView,e=this.options,{offset:s=0,distance:r=0,rotate:i}=e;let o,a,l;const u=an(r,1);u>=0&&u<=1?o=t.getTangentAtRatio(u):o=t.getTangentAtLength(u),o?(a=o.start,l=o.vector().vectorAngle(new O(1,0))||0):(a=t.getConnection().start,l=0);let h=ne().translate(a.x,a.y).rotate(l);return typeof s=="object"?h=h.translate(s.x||0,s.y||0):h=h.translate(0,s),i||(h=h.rotate(-l)),h}onMouseDown(t){if(this.guard(t))return;t.stopPropagation(),t.preventDefault();const e=this.options.onClick;typeof e=="function"&&X(e,this.cellView,{e:t,view:this.cellView,cell:this.cellView.cell,btn:this})}}(function(n){n.config({name:"button",useCellGeometry:!0,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"}})})(Es||(Es={})),function(n){n.Remove=n.define({name:"button-remove",markup:[{tagName:"circle",selector:"button",attrs:{r:7,fill:"#FF1D00",cursor:"pointer"}},{tagName:"path",selector:"icon",attrs:{d:"M -3 -3 3 3 M -3 3 3 -3",fill:"none",stroke:"#FFFFFF","stroke-width":2,"pointer-events":"none"}}],distance:60,offset:0,useCellGeometry:!0,onClick({view:t,btn:e}){e.parent.remove(),t.cell.remove({ui:!0,toolId:e.cid})}})}(Es||(Es={}));var cB=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class el extends Jt.ToolItem{onRender(){if(J(this.container,this.prefixClassName("cell-tool-boundary")),this.options.attrs){const t=this.options.attrs,{class:e}=t,s=cB(t,["class"]);ut(this.container,Ji(s)),e&&J(this.container,e)}this.update()}update(){const t=this.cellView,e=this.options,{useCellGeometry:s,rotate:r}=e,i=ds(e.padding);let o=lb(t,s).moveAndExpand({x:-i.left,y:-i.top,width:i.left+i.right,height:i.top+i.bottom});const a=t.cell;if(a.isNode()){const l=a.getAngle();if(l)if(r){const u=a.getBBox().getCenter();Hu(this.container,l,u.x,u.y,{absolute:!0})}else o=o.bbox(l)}return ut(this.container,o.toJSON()),this}}(function(n){n.config({name:"boundary",tagName:"rect",padding:10,useCellGeometry:!0,attrs:{fill:"none",stroke:"#333","stroke-width":.5,"stroke-dasharray":"5, 5","pointer-events":"none"}})})(el||(el={}));class ao extends Jt.ToolItem{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}onRender(){return this.addClass(this.prefixClassName("edge-tool-vertices")),this.options.addable&&this.updatePath(),this.resetHandles(),this.renderHandles(),this}update(){return this.vertices.length===this.handles.length?this.updateHandles():(this.resetHandles(),this.renderHandles()),this.options.addable&&this.updatePath(),this}resetHandles(){const t=this.handles;this.handles=[],t&&t.forEach(e=>{this.stopHandleListening(e),e.remove()})}renderHandles(){const t=this.vertices;for(let e=0,s=t.length;e<s;e+=1){const r=t[e],i=this.options.createHandle,o=this.options.processHandle,a=i({index:e,graph:this.graph,guard:l=>this.guard(l),attrs:this.options.attrs||{}});o&&o(a),a.updatePosition(r.x,r.y),this.stamp(a.container),this.container.appendChild(a.container),this.handles.push(a),this.startHandleListening(a)}}updateHandles(){const t=this.vertices;for(let e=0,s=t.length;e<s;e+=1){const r=t[e],i=this.handles[e];i&&i.updatePosition(r.x,r.y)}}updatePath(){const t=this.childNodes.connection;t&&t.setAttribute("d",this.cellView.getConnectionPathData())}startHandleListening(t){const e=this.cellView;e.can("vertexMovable")&&(t.on("change",this.onHandleChange,this),t.on("changing",this.onHandleChanging,this),t.on("changed",this.onHandleChanged,this)),e.can("vertexDeletable")&&t.on("remove",this.onHandleRemove,this)}stopHandleListening(t){const e=this.cellView;e.can("vertexMovable")&&(t.off("change",this.onHandleChange,this),t.off("changing",this.onHandleChanging,this),t.off("changed",this.onHandleChanged,this)),e.can("vertexDeletable")&&t.off("remove",this.onHandleRemove,this)}getNeighborPoints(t){const e=this.cellView,s=this.vertices,r=t>0?s[t-1]:e.sourceAnchor,i=t<s.length-1?s[t+1]:e.targetAnchor;return{prev:O.create(r),next:O.create(i)}}getMouseEventArgs(t){const e=this.normalizeEvent(t),{x:s,y:r}=this.graph.snapToGrid(e.clientX,e.clientY);return{e,x:s,y:r}}onHandleChange({e:t}){this.focus();const e=this.cellView;if(e.cell.startBatch("move-vertex",{ui:!0,toolId:this.cid}),!this.options.stopPropagation){const{e:s,x:r,y:i}=this.getMouseEventArgs(t);this.eventData(s,{start:{x:r,y:i}}),e.notifyMouseDown(s,r,i)}}onHandleChanging({handle:t,e}){const s=this.cellView,r=t.options.index,{e:i,x:o,y:a}=this.getMouseEventArgs(e),l={x:o,y:a};this.snapVertex(l,r),s.cell.setVertexAt(r,l,{ui:!0,toolId:this.cid}),t.updatePosition(l.x,l.y),this.options.stopPropagation||s.notifyMouseMove(i,o,a)}stopBatch(t){this.cell.stopBatch("move-vertex",{ui:!0,toolId:this.cid}),t&&this.cell.stopBatch("add-vertex",{ui:!0,toolId:this.cid})}onHandleChanged({e:t}){const e=this.options,s=this.cellView;if(e.addable&&this.updatePath(),!e.removeRedundancies){this.stopBatch(this.eventData(t).vertexAdded);return}s.removeRedundantLinearVertices({ui:!0,toolId:this.cid})&&this.render(),this.blur(),this.stopBatch(this.eventData(t).vertexAdded);const{e:i,x:o,y:a}=this.getMouseEventArgs(t);if(!this.options.stopPropagation){s.notifyMouseUp(i,o,a);const{start:l}=this.eventData(i);if(l){const{x:u,y:h}=l;u===o&&h===a&&s.onClick(i,o,a)}}s.checkMouseleave(i),e.onChanged&&e.onChanged({edge:s.cell,edgeView:s})}snapVertex(t,e){const s=this.options.snapRadius||0;if(s>0){const r=this.getNeighborPoints(e),i=r.prev,o=r.next;Math.abs(t.x-i.x)<s?t.x=i.x:Math.abs(t.x-o.x)<s&&(t.x=o.x),Math.abs(t.y-i.y)<s?t.y=r.prev.y:Math.abs(t.y-o.y)<s&&(t.y=o.y)}}onHandleRemove({handle:t,e}){if(this.options.removable){const s=t.options.index,r=this.cellView;r.cell.removeVertexAt(s,{ui:!0}),this.options.addable&&this.updatePath(),r.checkMouseleave(this.normalizeEvent(e))}}allowAddVertex(t){const e=this.guard(t),s=this.options.addable&&this.cellView.can("vertexAddable"),r=this.options.modifiers?ms.isMatch(t,this.options.modifiers):!0;return!e&&s&&r}onPathMouseDown(t){const e=this.cellView;if(!this.allowAddVertex(t))return;t.stopPropagation(),t.preventDefault();const s=this.normalizeEvent(t),r=this.graph.snapToGrid(s.clientX,s.clientY).toJSON();e.cell.startBatch("add-vertex",{ui:!0,toolId:this.cid});const i=e.getVertexIndex(r.x,r.y);this.snapVertex(r,i),e.cell.insertVertex(r,i,{ui:!0,toolId:this.cid}),this.render();const o=this.handles[i];this.eventData(s,{vertexAdded:!0}),o.onMouseDown(s)}onRemove(){this.resetHandles()}}(function(n){class t extends pt{get graph(){return this.options.graph}constructor(s){super(),this.options=s,this.render(),this.delegateEvents({mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDoubleClick"})}render(){this.container=pt.createElement("circle",!0);const s=this.options.attrs;if(typeof s=="function"){const r=n.getDefaults();this.setAttrs(Object.assign(Object.assign({},r.attrs),s(this)))}else this.setAttrs(s);this.addClass(this.prefixClassName("edge-tool-vertex"))}updatePosition(s,r){this.setAttrs({cx:s,cy:r})}onMouseDown(s){this.options.guard(s)||(s.stopPropagation(),s.preventDefault(),this.graph.view.undelegateEvents(),this.delegateDocumentEvents({mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},s.data),this.emit("change",{e:s,handle:this}))}onMouseMove(s){this.emit("changing",{e:s,handle:this})}onMouseUp(s){this.emit("changed",{e:s,handle:this}),this.undelegateDocumentEvents(),this.graph.view.delegateEvents()}onDoubleClick(s){this.emit("remove",{e:s,handle:this})}}n.Handle=t})(ao||(ao={})),function(n){const t=Ue.prefix("edge-tool-vertex-path");n.config({name:"vertices",snapRadius:20,addable:!0,removable:!0,removeRedundancies:!0,stopPropagation:!0,attrs:{r:6,fill:"#333",stroke:"#fff",cursor:"move","stroke-width":2},createHandle:e=>new n.Handle(e),markup:[{tagName:"path",selector:"connection",className:t,attrs:{fill:"none",stroke:"transparent","stroke-width":10,cursor:"pointer"}}],events:{[`mousedown .${t}`]:"onPathMouseDown",[`touchstart .${t}`]:"onPathMouseDown"}})}(ao||(ao={}));class lo extends Jt.ToolItem{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}update(){return this.render(),this}onRender(){J(this.container,this.prefixClassName("edge-tool-segments")),this.resetHandles();const t=this.cellView,e=[...this.vertices];e.unshift(t.sourcePoint),e.push(t.targetPoint);for(let s=0,r=e.length;s<r-1;s+=1){const i=e[s],o=e[s+1],a=this.renderHandle(i,o,s);this.stamp(a.container),this.handles.push(a)}return this}renderHandle(t,e,s){const r=this.options.createHandle({index:s,graph:this.graph,guard:i=>this.guard(i),attrs:this.options.attrs||{}});return this.options.processHandle&&this.options.processHandle(r),this.updateHandle(r,t,e),this.container.appendChild(r.container),this.startHandleListening(r),r}startHandleListening(t){t.on("change",this.onHandleChange,this),t.on("changing",this.onHandleChanging,this),t.on("changed",this.onHandleChanged,this)}stopHandleListening(t){t.off("change",this.onHandleChange,this),t.off("changing",this.onHandleChanging,this),t.off("changed",this.onHandleChanged,this)}resetHandles(){const t=this.handles;this.handles=[],t&&t.forEach(e=>{this.stopHandleListening(e),e.remove()})}shiftHandleIndexes(t){const e=this.handles;for(let s=0,r=e.length;s<r;s+=1)e[s].options.index+=t}resetAnchor(t,e){const s=this.cellView.cell,r={ui:!0,toolId:this.cid};e?s.prop([t,"anchor"],e,r):s.removeProp([t,"anchor"],r)}snapHandle(t,e,s){const r=t.options.axis,i=t.options.index,l=this.cellView.cell.getVertices(),u=l[i-2]||s.sourceAnchor,h=l[i+1]||s.targetAnchor,f=this.options.snapRadius;return Math.abs(e[r]-u[r])<f?e[r]=u[r]:Math.abs(e[r]-h[r])<f&&(e[r]=h[r]),e}onHandleChanging({handle:t,e}){const s=this.graph,r=this.options,i=this.cellView,o=r.anchor,a=t.options.axis,l=t.options.index-1,u=this.getEventData(e),h=this.normalizeEvent(e),f=s.snapToGrid(h.clientX,h.clientY),d=this.snapHandle(t,f.clone(),u),g=Tt(this.vertices);let p=g[l],m=g[l+1];const y=i.sourceView,b=i.sourceBBox;let w=!1,x=!1;if(p?l===0?b.containsPoint(p)?(g.shift(),this.shiftHandleIndexes(-1),w=!0):(p[a]=d[a],x=!0):p[a]=d[a]:(p=i.sourceAnchor.toJSON(),p[a]=d[a],b.containsPoint(p)?w=!0:(g.unshift(p),this.shiftHandleIndexes(1),x=!0)),typeof o=="function"&&y){if(w){const M=u.sourceAnchor.clone();M[a]=d[a];const T=X(o,i,M,y,i.sourceMagnet||y.container,"source",i,this);this.resetAnchor("source",T)}x&&this.resetAnchor("source",u.sourceAnchorDef)}const v=i.targetView,S=i.targetBBox;let E=!1,C=!1;if(m?l===g.length-2?S.containsPoint(m)?(g.pop(),E=!0):(m[a]=d[a],C=!0):m[a]=d[a]:(m=i.targetAnchor.toJSON(),m[a]=d[a],S.containsPoint(m)?E=!0:(g.push(m),C=!0)),typeof o=="function"&&v){if(E){const M=u.targetAnchor.clone();M[a]=d[a];const T=X(o,i,M,v,i.targetMagnet||v.container,"target",i,this);this.resetAnchor("target",T)}C&&this.resetAnchor("target",u.targetAnchorDef)}O.equalPoints(g,this.vertices)||this.cellView.cell.setVertices(g,{ui:!0,toolId:this.cid}),this.updateHandle(t,p,m,0),r.stopPropagation||i.notifyMouseMove(h,f.x,f.y)}onHandleChange({handle:t,e}){const s=this.options,r=this.handles,i=this.cellView,o=t.options.index;if(Array.isArray(r)){for(let a=0,l=r.length;a<l;a+=1)a!==o&&r[a].hide();if(this.focus(),this.setEventData(e,{sourceAnchor:i.sourceAnchor.clone(),targetAnchor:i.targetAnchor.clone(),sourceAnchorDef:Tt(this.cell.prop(["source","anchor"])),targetAnchorDef:Tt(this.cell.prop(["target","anchor"]))}),this.cell.startBatch("move-segment",{ui:!0,toolId:this.cid}),!s.stopPropagation){const a=this.normalizeEvent(e),l=this.graph.snapToGrid(a.clientX,a.clientY);i.notifyMouseDown(a,l.x,l.y)}}}onHandleChanged({e:t}){const e=this.options,s=this.cellView;e.removeRedundancies&&s.removeRedundantLinearVertices({ui:!0,toolId:this.cid});const r=this.normalizeEvent(t),i=this.graph.snapToGrid(r.clientX,r.clientY);this.render(),this.blur(),this.cell.stopBatch("move-segment",{ui:!0,toolId:this.cid}),e.stopPropagation||s.notifyMouseUp(r,i.x,i.y),s.checkMouseleave(r),e.onChanged&&e.onChanged({edge:s.cell,edgeView:s})}updateHandle(t,e,s,r=0){const i=this.options.precision||0,o=Math.abs(e.x-s.x)<i,a=Math.abs(e.y-s.y)<i;if(o||a){const l=new W(e,s);if(l.length()<this.options.threshold)t.hide();else{const h=l.getCenter(),f=o?"x":"y";h[f]+=r||0;const d=l.vector().vectorAngle(new O(1,0));t.updatePosition(h.x,h.y,d,this.cellView),t.show(),t.options.axis=f}}else t.hide()}onRemove(){this.resetHandles()}}(function(n){class t extends pt{constructor(s){super(),this.options=s,this.render(),this.delegateEvents({mousedown:"onMouseDown",touchstart:"onMouseDown"})}render(){this.container=pt.createElement("rect",!0);const s=this.options.attrs;if(typeof s=="function"){const r=n.getDefaults();this.setAttrs(Object.assign(Object.assign({},r.attrs),s(this)))}else this.setAttrs(s);this.addClass(this.prefixClassName("edge-tool-segment"))}updatePosition(s,r,i,o){const a=o.getClosestPoint(new O(s,r))||new O(s,r);let l=ne().translate(a.x,a.y);if(a.equals({x:s,y:r}))l=l.rotate(i);else{let h=new W(s,r,a.x,a.y).vector().vectorAngle(new O(1,0));h!==0&&(h+=90),l=l.rotate(h)}this.setAttrs({transform:Br(l),cursor:i%180===0?"row-resize":"col-resize"})}onMouseDown(s){this.options.guard(s)||(this.trigger("change",{e:s,handle:this}),s.stopPropagation(),s.preventDefault(),this.options.graph.view.undelegateEvents(),this.delegateDocumentEvents({mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},s.data))}onMouseMove(s){this.emit("changing",{e:s,handle:this})}onMouseUp(s){this.emit("changed",{e:s,handle:this}),this.undelegateDocumentEvents(),this.options.graph.view.delegateEvents()}show(){this.container.style.display=""}hide(){this.container.style.display="none"}}n.Handle=t})(lo||(lo={})),function(n){n.config({name:"segments",precision:.5,threshold:40,snapRadius:10,stopPropagation:!0,removeRedundancies:!0,attrs:{width:20,height:8,x:-10,y:-4,rx:4,ry:4,fill:"#333",stroke:"#fff","stroke-width":2},createHandle:t=>new n.Handle(t),anchor:ab})}(lo||(lo={}));class nl extends Jt.ToolItem{get type(){return this.options.type}onRender(){J(this.container,this.prefixClassName(`edge-tool-${this.type}-anchor`)),this.toggleArea(!1),this.update()}update(){const t=this.type;return this.cellView.getTerminalView(t)?(this.updateAnchor(),this.updateArea(),this.container.style.display=""):this.container.style.display="none",this}updateAnchor(){const t=this.childNodes;if(!t)return;const e=t.anchor;if(!e)return;const s=this.type,r=this.cellView,i=this.options,o=r.getTerminalAnchor(s),a=r.cell.prop([s,"anchor"]);e.setAttribute("transform",`translate(${o.x}, ${o.y})`);const l=a?i.customAnchorAttrs:i.defaultAnchorAttrs;l&&Object.keys(l).forEach(u=>{e.setAttribute(u,l[u])})}updateArea(){const t=this.childNodes;if(!t)return;const e=t.area;if(!e)return;const s=this.type,r=this.cellView,i=r.getTerminalView(s);if(i){const o=i.cell,a=r.getTerminalMagnet(s);let l=this.options.areaPadding||0;Number.isFinite(l)||(l=0);let u,h,f;i.isEdgeElement(a)?(u=i.getBBox(),h=0,f=u.getCenter()):(u=i.getUnrotatedBBoxOfElement(a),h=o.getAngle(),f=u.getCenter(),h&&f.rotate(-h,o.getBBox().getCenter())),u.inflate(l),ut(e,{x:-u.width/2,y:-u.height/2,width:u.width,height:u.height,transform:`translate(${f.x}, ${f.y}) rotate(${h})`})}}toggleArea(t){if(this.childNodes){const e=this.childNodes.area;e&&(e.style.display=t?"":"none")}}onMouseDown(t){this.guard(t)||(t.stopPropagation(),t.preventDefault(),this.graph.view.undelegateEvents(),this.options.documentEvents&&this.delegateDocumentEvents(this.options.documentEvents),this.focus(),this.toggleArea(this.options.restrictArea),this.cell.startBatch("move-anchor",{ui:!0,toolId:this.cid}))}resetAnchor(t){const e=this.type,s=this.cell;t?s.prop([e,"anchor"],t,{rewrite:!0,ui:!0,toolId:this.cid}):s.removeProp([e,"anchor"],{ui:!0,toolId:this.cid})}onMouseMove(t){const e=this.type,s=this.cellView,r=s.getTerminalView(e);if(r==null)return;const i=this.normalizeEvent(t),o=r.cell,a=s.getTerminalMagnet(e);let l=this.graph.coord.clientToLocalPoint(i.clientX,i.clientY);const u=this.options.snap;if(typeof u=="function"){const d=X(u,s,l,r,a,e,s,this);l=O.create(d)}if(this.options.restrictArea)if(r.isEdgeElement(a)){const d=r.getClosestPoint(l);d&&(l=d)}else{const d=r.getUnrotatedBBoxOfElement(a),g=o.getAngle(),p=o.getBBox().getCenter(),m=l.clone().rotate(g,p);d.containsPoint(m)||(l=d.getNearestPointToPoint(m).rotate(-g,p))}let h;const f=this.options.anchor;typeof f=="function"&&(h=X(f,s,l,r,a,e,s,this)),this.resetAnchor(h),this.update()}onMouseUp(t){this.graph.view.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);const e=this.cellView;this.options.removeRedundancies&&e.removeRedundantLinearVertices({ui:!0,toolId:this.cid}),this.cell.stopBatch("move-anchor",{ui:!0,toolId:this.cid})}onDblClick(){const t=this.options.resetAnchor;t&&this.resetAnchor(t===!0?void 0:t),this.update()}}(function(n){n.config({tagName:"g",markup:[{tagName:"circle",selector:"anchor",attrs:{cursor:"pointer"}},{tagName:"rect",selector:"area",attrs:{"pointer-events":"none",fill:"none",stroke:"#33334F","stroke-dasharray":"2,4",rx:5,ry:5}}],events:{mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDblClick"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},customAnchorAttrs:{"stroke-width":4,stroke:"#33334F",fill:"#FFFFFF",r:5},defaultAnchorAttrs:{"stroke-width":2,stroke:"#FFFFFF",fill:"#33334F",r:6},areaPadding:6,snapRadius:10,resetAnchor:!0,restrictArea:!0,removeRedundancies:!0,anchor:ab,snap(t,e,s,r,i,o){const a=o.options.snapRadius||0,l=r==="source",u=l?0:-1,h=this.cell.getVertexAt(u)||this.getTerminalAnchor(l?"target":"source");return h&&(Math.abs(h.x-t.x)<a&&(t.x=h.x),Math.abs(h.y-t.y)<a&&(t.y=h.y)),t}})})(nl||(nl={}));const uB=nl.define({name:"source-anchor",type:"source"}),hB=nl.define({name:"target-anchor",type:"target"});var dB=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class sl extends Jt.ToolItem{get type(){return this.options.type}get ratio(){return this.options.ratio}init(){if(this.options.attrs){const t=this.options.attrs,{class:e}=t,s=dB(t,["class"]);this.setAttrs(s,this.container),e&&J(this.container,e)}}onRender(){J(this.container,this.prefixClassName(`edge-tool-${this.type}-arrowhead`)),this.update()}update(){const t=this.ratio,e=this.cellView,s=e.getTangentAtRatio(t),r=s?s.start:e.getPointAtRatio(t),i=s&&s.vector().vectorAngle(new O(1,0))||0;if(!r)return this;const o=ne().translate(r.x,r.y).rotate(i);return Vr(this.container,o,{absolute:!0}),this}onMouseDown(t){if(this.guard(t))return;t.stopPropagation(),t.preventDefault();const e=this.cellView;if(e.can("arrowheadMovable")){e.cell.startBatch("move-arrowhead",{ui:!0,toolId:this.cid});const s=this.graph.snapToGrid(t.clientX,t.clientY),r=e.prepareArrowheadDragging(this.type,{x:s.x,y:s.y,options:Object.assign(Object.assign({},this.options),{toolId:this.cid})});this.cellView.setEventData(t,r),this.delegateDocumentEvents(this.options.documentEvents,t.data),e.graph.view.undelegateEvents(),this.container.style.pointerEvents="none"}this.focus()}onMouseMove(t){const e=this.normalizeEvent(t),s=this.graph.snapToGrid(e.clientX,e.clientY);this.cellView.onMouseMove(e,s.x,s.y),this.update()}onMouseUp(t){this.undelegateDocumentEvents();const e=this.normalizeEvent(t),s=this.cellView,r=this.graph.snapToGrid(e.clientX,e.clientY);s.onMouseUp(e,r.x,r.y),this.graph.view.delegateEvents(),this.blur(),this.container.style.pointerEvents="",s.cell.stopBatch("move-arrowhead",{ui:!0,toolId:this.cid})}}(function(n){n.config({tagName:"path",isSVGElement:!0,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"}})})(sl||(sl={}));const fB=sl.define({name:"source-arrowhead",type:"source",ratio:0,attrs:{d:"M 10 -8 -10 0 10 8 Z",fill:"#333",stroke:"#fff","stroke-width":2,cursor:"move"}}),gB=sl.define({name:"target-arrowhead",type:"target",ratio:1,attrs:{d:"M -10 -8 10 0 -10 8 Z",fill:"#333",stroke:"#fff","stroke-width":2,cursor:"move"}});class Yr extends Jt.ToolItem{constructor(){super(...arguments),this.labelIndex=-1,this.distance=.5,this.dblClick=this.onCellDblClick.bind(this)}onRender(){const t=this.cellView;t&&t.on("cell:dblclick",this.dblClick)}createElement(){const t=[this.prefixClassName(`${this.cell.isEdge()?"edge":"node"}-tool-editor`),this.prefixClassName("cell-tool-editor")];this.editor=Jt.createElement("div",!1),this.addClass(t,this.editor),this.editor.contentEditable="true",this.container.appendChild(this.editor)}removeElement(){this.undelegateDocumentEvents(),this.editor&&(this.container.removeChild(this.editor),this.editor=null)}updateEditor(){const{cell:t,editor:e}=this;if(!e)return;const{style:s}=e;t.isNode()?this.updateNodeEditorTransform():t.isEdge()&&this.updateEdgeEditorTransform();const{attrs:r}=this.options;s.fontSize=`${r.fontSize}px`,s.fontFamily=r.fontFamily,s.color=r.color,s.backgroundColor=r.backgroundColor;const i=this.getCellText()||"";return e.innerText=i,this.setCellText(""),this}updateNodeEditorTransform(){const{graph:t,cell:e,editor:s}=this;if(!s)return;let r=O.create(),i=20,o="",{x:a,y:l}=this.options;const{width:u,height:h}=this.options;if(typeof a<"u"&&typeof l<"u"){const g=e.getBBox();a=an(a,g.width),l=an(l,g.height),r=g.topLeft.translate(a,l),i=g.width-a*2}else{const g=e.getBBox();r=g.center,i=g.width-4,o="translate(-50%, -50%)"}const f=t.scale(),{style:d}=s;r=t.localToGraph(r),d.left=`${r.x}px`,d.top=`${r.y}px`,d.transform=`scale(${f.sx}, ${f.sy}) ${o}`,d.minWidth=`${i}px`,typeof u=="number"&&(d.width=`${u}px`),typeof h=="number"&&(d.height=`${h}px`)}updateEdgeEditorTransform(){if(!this.event)return;const{graph:t,editor:e}=this;if(!e)return;let s=O.create(),r=20;const{style:i}=e,o=this.event.target,a=o.parentElement;if(a&&Sn(a,this.prefixClassName("edge-label"))){const h=a.getAttribute("data-index")||"0";this.labelIndex=parseInt(h,10);const f=a.getAttribute("transform"),{translation:d}=qa(f);s=new O(d.tx,d.ty),r=vt.getBBox(o).width}else{if(!this.options.labelAddable)return this;s=t.clientToLocal(O.create(this.event.clientX,this.event.clientY));const f=this.cellView.path.closestPointLength(s);this.distance=f,this.labelIndex=-1}s=t.localToGraph(s);const u=t.scale();i.left=`${s.x}px`,i.top=`${s.y}px`,i.minWidth=`${r}px`,i.transform=`scale(${u.sx}, ${u.sy}) translate(-50%, -50%)`}onDocumentMouseUp(t){if(this.editor&&t.target!==this.editor){const e=this.editor.innerText.replace(/\n$/,"")||"";this.setCellText(e!==""?e:null),this.removeElement()}}onCellDblClick({e:t}){this.editor||(t.stopPropagation(),this.removeElement(),this.event=t,this.createElement(),this.updateEditor(),this.autoFocus(),this.delegateDocumentEvents(this.options.documentEvents))}onMouseDown(t){t.stopPropagation()}autoFocus(){setTimeout(()=>{this.editor&&(this.editor.focus(),this.selectText())})}selectText(){if(window.getSelection&&this.editor){const t=document.createRange(),e=window.getSelection();t.selectNodeContents(this.editor),e.removeAllRanges(),e.addRange(t)}}getCellText(){const{getText:t}=this.options;if(typeof t=="function")return X(t,this.cellView,{cell:this.cell,index:this.labelIndex});if(typeof t=="string"){if(this.cell.isNode())return this.cell.attr(t);if(this.cell.isEdge()&&this.labelIndex!==-1)return this.cell.prop(`labels/${this.labelIndex}/attrs/${t}`)}}setCellText(t){const e=this.options.setText;if(typeof e=="function"){X(e,this.cellView,{cell:this.cell,value:t,index:this.labelIndex,distance:this.distance});return}if(typeof e=="string"){if(this.cell.isNode()){t!==null&&this.cell.attr(e,t);return}if(this.cell.isEdge()){const s=this.cell;if(this.labelIndex===-1){if(t){const r={position:{distance:this.distance},attrs:{}};Rr(r,`attrs/${e}`,t),s.appendLabel(r)}}else t!==null?s.prop(`labels/${this.labelIndex}/attrs/${e}`,t):typeof this.labelIndex=="number"&&s.removeLabelAt(this.labelIndex)}}}onRemove(){const t=this.cellView;t&&t.off("cell:dblclick",this.dblClick),this.removeElement()}}(function(n){n.config({tagName:"div",isSVGElement:!1,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"},documentEvents:{mouseup:"onDocumentMouseUp",touchend:"onDocumentMouseUp",touchcancel:"onDocumentMouseUp"}})})(Yr||(Yr={})),function(n){n.NodeEditor=n.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},getText:"text/text",setText:"text/text"}),n.EdgeEditor=n.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},labelAddable:!0,getText:"label/text",setText:"label/text"})}(Yr||(Yr={}));var cb=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e},Wr;(function(n){n.presets={boundary:el,button:Es,"button-remove":Es.Remove,"node-editor":Yr.NodeEditor},n.registry=Ft.create({type:"node tool",process(t,e){if(typeof e=="function")return e;let s=Jt.ToolItem;const{inherit:r}=e,i=cb(e,["inherit"]);if(r){const o=this.get(r);o==null?this.onNotFound(r,"inherited"):s=o}return i.name==null&&(i.name=t),s.define.call(s,i)}}),n.registry.register(n.presets,!0)})(Wr||(Wr={}));var qr;(function(n){n.presets={boundary:el,vertices:ao,segments:lo,button:Es,"button-remove":Es.Remove,"source-anchor":uB,"target-anchor":hB,"source-arrowhead":fB,"target-arrowhead":gB,"edge-editor":Yr.EdgeEditor},n.registry=Ft.create({type:"edge tool",process(t,e){if(typeof e=="function")return e;let s=Jt.ToolItem;const{inherit:r}=e,i=cb(e,["inherit"]);if(r){const o=this.get(r);o==null?this.onNotFound(r,"inherited"):s=o}return i.name==null&&(i.name=t),s.define.call(s,i)}}),n.registry.register(n.presets,!0)})(qr||(qr={}));const pB=Jn("center"),mB=Jn("topCenter"),yB=Jn("bottomCenter"),bB=Jn("leftMiddle"),wB=Jn("rightMiddle"),xB=Jn("topLeft"),vB=Jn("topRight"),CB=Jn("bottomLeft"),SB=Jn("bottomRight");function Jn(n){return function(t,e,s,r={}){const i=r.rotate?t.getUnrotatedBBoxOfElement(e):t.getBBoxOfElement(e),o=i[n];o.x+=an(r.dx,i.width),o.y+=an(r.dy,i.height);const a=t.cell;return r.rotate?o.rotate(-a.getAngle(),a.getBBox().getCenter()):o}}function rl(n){return function(t,e,s,r){if(s instanceof Element){const i=this.graph.findViewByElem(s);let o;if(i)if(i.isEdgeElement(s)){const a=r.fixedAt!=null?r.fixedAt:"50%";o=ub(i,a)}else o=i.getBBoxOfElement(s).getCenter();else o=new O;return n.call(this,t,e,o,r)}return n.apply(this,arguments)}}function ub(n,t){const e=Yn(t),s=typeof t=="string"?parseFloat(t):t;return e?n.getPointAtRatio(s/100):n.getPointAtLength(s)}const EB=rl(function(n,t,e,s){const r=gt.normalize(n.cell.getAngle()),i=n.getBBoxOfElement(t),o=i.getCenter(),a=i.getTopLeft(),l=i.getBottomRight();let u=s.padding;if(Number.isFinite(u)||(u=0),a.y+u<=e.y&&e.y<=l.y-u){const h=e.y-o.y;o.x+=r===0||r===180?0:h*1/Math.tan(gt.toRad(r)),o.y+=h}else if(a.x+u<=e.x&&e.x<=l.x-u){const h=e.x-o.x;o.y+=r===90||r===270?0:h*Math.tan(gt.toRad(r)),o.x+=h}return o}),OB=function(n,t,e,s,r){const i=n.cell.getConnectionPoint(this.cell,r);return(s.dx||s.dy)&&i.translate(s.dx||0,s.dy||0),i},MB=rl(function(n,t,e,s){let r,i=0,o;const a=n.cell;s.rotate?(r=n.getUnrotatedBBoxOfElement(t),o=a.getBBox().getCenter(),i=a.getAngle()):r=n.getBBoxOfElement(t);const l=s.padding;l!=null&&Number.isFinite(l)&&r.inflate(l),s.rotate&&e.rotate(i,o);const u=r.getNearestSideToPoint(e);let h;switch(u){case"left":h=r.getLeftMiddle();break;case"right":h=r.getRightMiddle();break;case"top":h=r.getTopCenter();break;case"bottom":h=r.getBottomCenter();break}const f=s.direction;return f==="H"?(u==="top"||u==="bottom")&&(e.x<=r.x+r.width?h=r.getLeftMiddle():h=r.getRightMiddle()):f==="V"&&(e.y<=r.y+r.height?h=r.getTopCenter():h=r.getBottomCenter()),s.rotate?h.rotate(-i,o):h}),PB=Object.freeze(Object.defineProperty({__proto__:null,bottom:yB,bottomLeft:CB,bottomRight:SB,center:pB,left:bB,midSide:MB,nodeCenter:OB,orth:EB,right:wB,top:mB,topLeft:xB,topRight:vB},Symbol.toStringTag,{value:"Module"}));var Jr;(function(n){n.presets=PB,n.registry=Ft.create({type:"node endpoint"}),n.registry.register(n.presets,!0)})(Jr||(Jr={}));const AB=function(n,t,e,s){let r=s.ratio!=null?s.ratio:.5;return r>1&&(r/=100),n.getPointAtRatio(r)},TB=function(n,t,e,s){const r=s.length!=null?s.length:20;return n.getPointAtLength(r)},hb=function(n,t,e,s){const r=n.getClosestPoint(e);return r??new O},NB=rl(hb),_B=rl(function(n,t,e,s){const i=n.getConnection(),o=n.getConnectionSubdivisions(),a=new W(e.clone().translate(0,1e6),e.clone().translate(0,-1e6)),l=new W(e.clone().translate(1e6,0),e.clone().translate(-1e6,0)),u=a.intersect(i,{segmentSubdivisions:o}),h=l.intersect(i,{segmentSubdivisions:o}),f=[];return u&&f.push(...u),h&&f.push(...h),f.length>0?e.closest(f):s.fallbackAt!=null?ub(n,s.fallbackAt):X(hb,this,n,t,e,s)}),kB=Object.freeze(Object.defineProperty({__proto__:null,closest:NB,length:TB,orth:_B,ratio:AB},Symbol.toStringTag,{value:"Module"}));var Xr;(function(n){n.presets=kB,n.registry=Ft.create({type:"edge endpoint"}),n.registry.register(n.presets,!0)})(Xr||(Xr={}));function il(n,t,e){let s;if(typeof e=="object"){if(Number.isFinite(e.y)){const i=new W(t,n),{start:o,end:a}=i.parallel(e.y);t=o,n=a}s=e.x}else s=e;if(s==null||!Number.isFinite(s))return n;const r=n.distance(t);return s===0&&r>0?n:n.move(t,-Math.min(s,r-1))}function ol(n){const t=n.getAttribute("stroke-width");return t===null?0:parseFloat(t)||0}function DB(n){if(n==null)return null;let t=n;do{let e=t.tagName;if(typeof e!="string")return null;if(e=e.toUpperCase(),e==="G")t=t.firstElementChild;else if(e==="TITLE")t=t.nextElementSibling;else break}while(t);return t}const db=function(n,t,e,s){const r=t.getBBoxOfElement(e);s.stroked&&r.inflate(ol(e)/2);const i=n.intersect(r),o=i&&i.length?n.start.closest(i):n.end;return il(o,n.start,s.offset)},RB=function(n,t,e,s,r){const i=t.cell,o=i.isNode()?i.getAngle():0;if(o===0)return X(db,this,n,t,e,s,r);const a=t.getUnrotatedBBoxOfElement(e);s.stroked&&a.inflate(ol(e)/2);const l=a.getCenter(),u=n.clone().rotate(o,l),h=u.setLength(1e6).intersect(a),f=h&&h.length?u.start.closest(h).rotate(-o,l):n.end;return il(f,n.start,s.offset)},IB=function(n,t,e,s){let r,i;const o=n.end,a=s.selector;if(typeof a=="string"?r=t.findOne(a):Array.isArray(a)?r=Mu(e,a):r=DB(e),!gs(r)){if(r===e||!gs(e))return o;r=e}const l=t.getShapeOfElement(r),u=t.getMatrixOfElement(r),h=t.getRootTranslatedMatrix(),f=t.getRootRotatedMatrix(),d=h.multiply(f).multiply(u),g=d.inverse(),p=vt.transformLine(n,g),m=p.start.clone(),y=t.getDataOfElement(r);if(s.insideout===!1){y.shapeBBox==null&&(y.shapeBBox=l.bbox());const v=y.shapeBBox;if(v!=null&&v.containsPoint(m))return o}s.extrapolate===!0&&p.setLength(1e6);let b;if(Z.isPath(l)){const v=s.precision||2;y.segmentSubdivisions==null&&(y.segmentSubdivisions=l.getSegmentSubdivisions({precision:v})),b={precision:v,segmentSubdivisions:y.segmentSubdivisions},i=p.intersect(l,b)}else i=p.intersect(l);i?Array.isArray(i)&&(i=m.closest(i)):s.sticky===!0&&(z.isRectangle(l)?i=l.getNearestPointToPoint(m):un.isEllipse(l)?i=l.intersectsWithLineFromCenterToPoint(m):i=l.closestPoint(m,b));const w=i?vt.transformPoint(i,d):o;let x=s.offset||0;return s.stroked!==!1&&(typeof x=="object"?(x=Object.assign({},x),x.x==null&&(x.x=0),x.x+=ol(r)/2):x+=ol(r)/2),il(w,n.start,x)};function LB(n,t,e=0){const{start:s,end:r}=n;let i,o,a,l;switch(t){case"left":l="x",i=r,o=s,a=-1;break;case"right":l="x",i=s,o=r,a=1;break;case"top":l="y",i=r,o=s,a=-1;break;case"bottom":l="y",i=s,o=r,a=1;break;default:return}s[l]<r[l]?i[l]=o[l]:o[l]=i[l],Number.isFinite(e)&&(i[l]+=a*e,o[l]+=a*e)}const BB=Object.freeze(Object.defineProperty({__proto__:null,anchor:function(n,t,e,s){const{alignOffset:r,align:i}=s;return i&&LB(n,i,r),il(n.end,n.start,s.offset)},bbox:db,boundary:IB,rect:RB},Symbol.toStringTag,{value:"Module"}));var Kr;(function(n){n.presets=BB,n.registry=Ft.create({type:"connection point"}),n.registry.register(n.presets,!0)})(Kr||(Kr={}));const VB=function(n){return[...n]},jB=function(n,t,e){const s=t.side||"bottom",r=ds(t.padding||40),i=e.sourceBBox,o=e.targetBBox,a=i.getCenter(),l=o.getCenter();let u,h,f;switch(s){case"top":f=-1,u="y",h="height";break;case"left":f=-1,u="x",h="width";break;case"right":f=1,u="x",h="width";break;case"bottom":default:f=1,u="y",h="height";break}return a[u]+=f*(i[h]/2+r[s]),l[u]+=f*(o[h]/2+r[s]),f*(a[u]-l[u])>0?l[u]=a[u]:a[u]=l[u],[a.toJSON(),...n,l.toJSON()]};function al(n){return new z(n.x,n.y,0,0)}function ll(n={}){const t=ds(n.padding||20);return{x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}function fb(n,t={}){return n.sourceBBox.clone().moveAndExpand(ll(t))}function gb(n,t={}){return n.targetBBox.clone().moveAndExpand(ll(t))}function $B(n,t={}){return n.sourceAnchor?n.sourceAnchor:fb(n,t).getCenter()}function zB(n,t={}){return n.targetAnchor?n.targetAnchor:gb(n,t).getCenter()}const pb=function(n,t,e){let s=fb(e,t),r=gb(e,t);const i=$B(e,t),o=zB(e,t);s=s.union(al(i)),r=r.union(al(o));const a=n.map(h=>O.create(h));a.unshift(i),a.push(o);let l=null;const u=[];for(let h=0,f=a.length-1;h<f;h+=1){let d=null;const g=a[h],p=a[h+1],m=Ge.getBearing(g,p)!=null;if(h===0)h+1===f?s.intersectsWithRect(r.clone().inflate(1))?d=Ge.insideNode(g,p,s,r):m||(d=Ge.nodeToNode(g,p,s,r)):s.containsPoint(p)?d=Ge.insideNode(g,p,s,al(p).moveAndExpand(ll(t))):m||(d=Ge.nodeToVertex(g,p,s));else if(h+1===f){const y=m&&Ge.getBearing(p,g)===l;r.containsPoint(g)||y?d=Ge.insideNode(g,p,al(g).moveAndExpand(ll(t)),r,l):m||(d=Ge.vertexToNode(g,p,r,l))}else m||(d=Ge.vertexToVertex(g,p,l));d?(u.push(...d.points),l=d.direction):l=Ge.getBearing(g,p),h+1<f&&u.push(p)}return u};var Ge;(function(n){const t={N:"S",S:"N",E:"W",W:"E"},e={N:-Math.PI/2*3,S:-Math.PI/2,E:0,W:Math.PI};function s(f,d,g){let p=new O(f.x,d.y);return g.containsPoint(p)&&(p=new O(d.x,f.y)),p}function r(f,d){return f[d==="W"||d==="E"?"width":"height"]}n.getBBoxSize=r;function i(f,d){return f.x===d.x?f.y>d.y?"N":"S":f.y===d.y?f.x>d.x?"W":"E":null}n.getBearing=i;function o(f,d,g){const p=new O(f.x,d.y),m=new O(d.x,f.y),y=i(f,p),b=i(f,m),w=g?t[g]:null,x=y===g||y!==w&&(b===w||b!==g)?p:m;return{points:[x],direction:i(x,d)}}n.vertexToVertex=o;function a(f,d,g){const p=s(f,d,g);return{points:[p],direction:i(p,d)}}n.nodeToVertex=a;function l(f,d,g,p){const m=[new O(f.x,d.y),new O(d.x,f.y)],y=m.filter(x=>!g.containsPoint(x)),b=y.filter(x=>i(x,f)!==p);let w;if(b.length>0)return w=b.filter(x=>i(f,x)===p).pop(),w=w||b[0],{points:[w],direction:i(w,d)};{w=HP(m,y)[0];const x=O.create(d).move(w,-r(g,p)/2);return{points:[s(x,f,g),x],direction:i(x,d)}}}n.vertexToNode=l;function u(f,d,g,p){let m=a(d,f,p);const y=m.points[0];if(g.containsPoint(y)){m=a(f,d,g);const b=m.points[0];if(p.containsPoint(b)){const w=O.create(f).move(b,-r(g,i(f,b))/2),x=O.create(d).move(y,-r(p,i(d,y))/2),v=new W(w,x).getCenter(),S=a(f,v,g),E=o(v,d,S.direction);m.points=[S.points[0],E.points[0]],m.direction=E.direction}}return m}n.nodeToNode=u;function h(f,d,g,p,m){const y=g.union(p).inflate(1),b=y.getCenter(),w=b.distance(d)>b.distance(f),x=w?d:f,v=w?f:d;let S,E,C;m?(S=O.fromPolar(y.width+y.height,e[m],x),S=y.getNearestPointToPoint(S).move(S,-1)):S=y.getNearestPointToPoint(x).move(x,1),E=s(S,v,y);let M;S.round().equals(E.round())?(E=O.fromPolar(y.width+y.height,gt.toRad(S.theta(x))+Math.PI/2,v),E=y.getNearestPointToPoint(E).move(v,1).round(),C=s(S,E,y),M=w?[E,C,S]:[S,C,E]):M=w?[E,S]:[S,E];const T=i(w?S:E,d);return{points:M,direction:T}}n.insideNode=h})(Ge||(Ge={}));const FB={step:10,maxLoopCount:2e3,precision:1,maxDirectionChange:90,perpendicular:!0,excludeTerminals:[],excludeNodes:[],excludeShapes:[],startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost(){return Os(this.step,this)},directions(){const n=Os(this.step,this),t=Os(this.cost,this);return[{cost:t,offsetX:n,offsetY:0},{cost:t,offsetX:-n,offsetY:0},{cost:t,offsetX:0,offsetY:n},{cost:t,offsetX:0,offsetY:-n}]},penalties(){const n=Os(this.step,this);return{0:0,45:n/2,90:n/2}},paddingBox(){const n=Os(this.step,this);return{x:-n,y:-n,width:2*n,height:2*n}},fallbackRouter:pb,draggingRouter:null,snapToGrid:!0};function Os(n,t){return typeof n=="function"?n.call(t):n}function HB(n){const t=Object.keys(n).reduce((e,s)=>{const r=e;return s==="fallbackRouter"||s==="draggingRouter"||s==="fallbackRoute"?r[s]=n[s]:r[s]=Os(n[s],n),e},{});if(t.padding){const e=ds(t.padding);t.paddingBox={x:-e.left,y:-e.top,width:e.left+e.right,height:e.top+e.bottom}}return t.directions.forEach(e=>{const s=new O(0,0),r=new O(e.offsetX,e.offsetY);e.angle=gt.normalize(s.theta(r))}),t}const mb=1,yb=2;class UB{constructor(){this.items=[],this.hash={},this.values={}}add(t,e){this.hash[t]?this.items.splice(this.items.indexOf(t),1):this.hash[t]=mb,this.values[t]=e;const s=v2(this.items,t,r=>this.values[r]);this.items.splice(s,0,t)}pop(){const t=this.items.shift();return t&&(this.hash[t]=yb),t}isOpen(t){return this.hash[t]===mb}isClose(t){return this.hash[t]===yb}isEmpty(){return this.items.length===0}}class GB{constructor(t){this.options=t,this.mapGridSize=100,this.map={}}build(t,e){const s=this.options,r=s.excludeTerminals.reduce((u,h)=>{const f=e[h];if(f){const d=t.getCell(f.cell);d&&u.push(d)}return u},[]);let i=[];const o=t.getCell(e.getSourceCellId());o&&(i=ug(i,o.getAncestors().map(u=>u.id)));const a=t.getCell(e.getTargetCellId());a&&(i=ug(i,a.getAncestors().map(u=>u.id)));const l=this.mapGridSize;return t.getNodes().reduce((u,h)=>{const f=r.some(y=>y.id===h.id),d=h.shape?s.excludeShapes.includes(h.shape):!1,g=s.excludeNodes.some(y=>typeof y=="string"?h.id===y:y===h),p=i.includes(h.id),m=d||f||g||p;if(h.isVisible()&&!m){const y=h.getBBox().moveAndExpand(s.paddingBox),b=y.getOrigin().snapToGrid(l),w=y.getCorner().snapToGrid(l);for(let x=b.x;x<=w.x;x+=l)for(let v=b.y;v<=w.y;v+=l){const S=new O(x,v).toString();u[S]==null&&(u[S]=[]),u[S].push(y)}}return u},this.map),this}isAccessible(t){const e=t.clone().snapToGrid(this.mapGridSize).toString(),s=this.map[e];return s?s.every(r=>!r.containsPoint(t)):!0}}function bb(n,t){const e=n.sourceBBox.clone();return t&&t.paddingBox?e.moveAndExpand(t.paddingBox):e}function wb(n,t){const e=n.targetBBox.clone();return t&&t.paddingBox?e.moveAndExpand(t.paddingBox):e}function xb(n,t){return n.sourceAnchor?n.sourceAnchor:bb(n,t).getCenter()}function YB(n,t){return n.targetAnchor?n.targetAnchor:wb(n,t).getCenter()}function nh(n,t,e,s,r){const i=360/e,o=n.theta(WB(n,t,s,r)),a=gt.normalize(o+i/2);return i*Math.floor(a/i)}function WB(n,t,e,s){const r=s.step,i=t.x-n.x,o=t.y-n.y,a=i/e.x,l=o/e.y,u=a*r,h=l*r;return new O(n.x+u,n.y+h)}function vb(n,t){const e=Math.abs(n-t);return e>180?360-e:e}function qB(n,t){const e=t.step;return t.directions.forEach(s=>{s.gridOffsetX=s.offsetX/e*n.x,s.gridOffsetY=s.offsetY/e*n.y}),t.directions}function JB(n,t,e){return{source:t.clone(),x:Cb(e.x-t.x,n),y:Cb(e.y-t.y,n)}}function Cb(n,t){if(!n)return t;const e=Math.abs(n),s=Math.round(e/t);if(!s)return e;const r=s*t,o=(e-r)/s;return t+o}function XB(n,t){const e=t.source,s=wt.snapToGrid(n.x-e.x,t.x)+e.x,r=wt.snapToGrid(n.y-e.y,t.y)+e.y;return new O(s,r)}function co(n,t){return n.round(t)}function cl(n,t,e){return co(XB(n.clone(),t),e)}function uo(n){return n.toString()}function sh(n){return new O(n.x===0?0:Math.abs(n.x)/n.x,n.y===0?0:Math.abs(n.y)/n.y)}function Sb(n,t){let e=1/0;for(let s=0,r=t.length;s<r;s+=1){const i=n.manhattanDistance(t[s]);i<e&&(e=i)}return e}function Eb(n,t,e,s,r){const i=r.precision,o=r.directionMap,a=n.diff(t.getCenter()),l=Object.keys(o).reduce((u,h)=>{if(e.includes(h)){const f=o[h],d=new O(n.x+f.x*(Math.abs(a.x)+t.width),n.y+f.y*(Math.abs(a.y)+t.height)),p=new W(n,d).intersect(t)||[];let m,y=null;for(let b=0;b<p.length;b+=1){const w=p[b],x=n.squaredDistance(w);(m==null||x>m)&&(m=x,y=w)}if(y){let b=cl(y,s,i);t.containsPoint(b)&&(b=cl(b.translate(f.x*s.x,f.y*s.y),s,i)),u.push(b)}}return u},[]);return t.containsPoint(n)||l.push(cl(n,s,i)),l}function KB(n,t,e,s,r){const i=[];let o=sh(r.diff(e)),a=uo(e),l=n[a],u;for(;l;){u=t[a];const d=sh(u.diff(l));d.equals(o)||(i.unshift(u),o=d),a=uo(l),l=n[a]}const h=t[a];return sh(h.diff(s)).equals(o)||i.unshift(h),i}function ZB(n,t,e,s,r){const i=r.precision;let o,a;z.isRectangle(t)?o=co(xb(n,r).clone(),i):o=co(t.clone(),i),z.isRectangle(e)?a=co(YB(n,r).clone(),i):a=co(e.clone(),i);const l=JB(r.step,o,a),u=o,h=a;let f,d;if(z.isRectangle(t)?f=Eb(u,t,r.startDirections,l,r):f=[u],z.isRectangle(e)?d=Eb(a,e,r.endDirections,l,r):d=[h],f=f.filter(g=>s.isAccessible(g)),d=d.filter(g=>s.isAccessible(g)),f.length>0&&d.length>0){const g=new UB,p={},m={},y={};for(let k=0,_=f.length;k<_;k+=1){const D=f[k],N=uo(D);g.add(N,Sb(D,d)),p[N]=D,y[N]=0}const b=r.previousDirectionAngle,w=b===void 0;let x,v;const S=qB(l,r),E=S.length,C=d.reduce((k,_)=>{const D=uo(_);return k.push(D),k},[]),M=O.equalPoints(f,d);let T=r.maxLoopCount;for(;!g.isEmpty()&&T>0;){const k=g.pop(),_=p[k],D=m[k],N=y[k],j=_.equals(u),A=D==null;let P;if(A?w?j?P=null:P=nh(u,_,E,l,r):P=b:P=nh(D,_,E,l,r),!(A&&M)&&C.indexOf(k)>=0)return r.previousDirectionAngle=P,KB(m,p,_,u,h);for(let V=0;V<E;V+=1){x=S[V];const Y=x.angle;if(v=vb(P,Y),!(w&&j)&&v>r.maxDirectionChange)continue;const ot=cl(_.clone().translate(x.gridOffsetX||0,x.gridOffsetY||0),l,i),F=uo(ot);if(g.isClose(F)||!s.isAccessible(ot))continue;if(C.indexOf(F)>=0&&!ot.equals(h)){const rt=nh(ot,h,E,l,r);if(vb(Y,rt)>r.maxDirectionChange)continue}const H=x.cost,B=j?0:r.penalties[v],K=N+H+B;(!g.isOpen(F)||K<y[F])&&(p[F]=ot,m[F]=_,y[F]=K,g.add(F,K+Sb(ot,d)))}T-=1}}return r.fallbackRoute?X(r.fallbackRoute,this,u,h,r):null}function QB(n,t=10){if(n.length<=1)return n;for(let e=0,s=n.length;e<s-1;e+=1){const r=n[e],i=n[e+1];if(r.x===i.x){const o=t*Math.round(r.x/t);r.x!==o&&(r.x=o,i.x=o)}else if(r.y===i.y){const o=t*Math.round(r.y/t);r.y!==o&&(r.y=o,i.y=o)}}return n}const tV=function(n,t,e){const s=HB(t),r=bb(e,s),i=wb(e,s),o=xb(e,s),a=new GB(s).build(e.graph.model,e.cell),l=n.map(g=>O.create(g)),u=[];let h=o,f,d;for(let g=0,p=l.length;g<=p;g+=1){let m=null;if(f=d||r,d=l[g],d==null){d=i;const b=e.cell;if((b.getSourceCellId()==null||b.getTargetCellId()==null)&&typeof s.draggingRouter=="function"){const x=f===r?o:f,v=d.getOrigin();m=X(s.draggingRouter,e,x,v,s)}}if(m==null&&(m=ZB(e,f,d,a,s)),m===null)return console.warn("Unable to execute manhattan algorithm, use orth instead"),X(s.fallbackRouter,this,n,s,e);const y=m[0];y&&y.equals(h)&&m.shift(),h=m[m.length-1]||h,u.push(...m)}return s.snapToGrid?QB(u,e.graph.grid.getGridSize()):u},Ob=function(n,t,e){return X(tV,this,n,Object.assign(Object.assign({},FB),t),e)},eV={maxDirectionChange:45,directions(){const n=Os(this.step,this),t=Os(this.cost,this),e=Math.ceil(Math.sqrt(n*n<<1));return[{cost:t,offsetX:n,offsetY:0},{cost:e,offsetX:n,offsetY:n},{cost:t,offsetX:0,offsetY:n},{cost:e,offsetX:-n,offsetY:n},{cost:t,offsetX:-n,offsetY:0},{cost:e,offsetX:-n,offsetY:-n},{cost:t,offsetX:0,offsetY:-n},{cost:e,offsetX:n,offsetY:-n}]},fallbackRoute(n,t,e){const s=n.theta(t),r=[];let i={x:t.x,y:n.y},o={x:n.x,y:t.y};if(s%180>90){const x=i;i=o,o=x}const a=s%90<45?i:o,l=new W(n,a),u=90*Math.ceil(s/90),h=O.fromPolar(l.squaredLength(),gt.toRad(u+135),a),f=new W(t,h),d=l.intersectsWithLine(f),g=d||t,p=d?g:n,m=360/e.directions.length,y=p.theta(t),b=gt.normalize(y+m/2),w=m*Math.floor(b/m);return e.previousDirectionAngle=w,g&&r.push(g.round()),r.push(t),r}},nV=function(n,t,e){return X(Ob,this,n,Object.assign(Object.assign({},eV),t),e)},sV=function(n,t,e){const s=t.offset||32,r=t.min==null?16:t.min;let i=0,o=t.direction;const a=e.sourceBBox,l=e.targetBBox,u=a.getCenter(),h=l.getCenter();if(typeof s=="number"&&(i=s),o==null){let b=l.left-a.right,w=l.top-a.bottom;b>=0&&w>=0?o=b>=w?"L":"T":b<=0&&w>=0?(b=a.left-l.right,b>=0?o=b>=w?"R":"T":o="T"):b>=0&&w<=0?(w=a.top-l.bottom,w>=0?o=b>=w?"L":"B":o="L"):(b=a.left-l.right,w=a.top-l.bottom,b>=0&&w>=0?o=b>=w?"R":"B":b<=0&&w>=0?o="B":b>=0&&w<=0?o="R":o=Math.abs(b)>Math.abs(w)?"R":"B")}o==="H"?o=h.x-u.x>=0?"L":"R":o==="V"&&(o=h.y-u.y>=0?"T":"B"),s==="center"&&(o==="L"?i=(l.left-a.right)/2:o==="R"?i=(a.left-l.right)/2:o==="T"?i=(l.top-a.bottom)/2:o==="B"&&(i=(a.top-l.bottom)/2));let f,d,g;const p=o==="L"||o==="R";if(p){if(h.y===u.y)return[...n];g=o==="L"?1:-1,f="x",d="width"}else{if(h.x===u.x)return[...n];g=o==="T"?1:-1,f="y",d="height"}const m=u.clone(),y=h.clone();if(m[f]+=g*(a[d]/2+i),y[f]-=g*(l[d]/2+i),p){const b=m.x,w=y.x,x=a.width/2+r,v=l.width/2+r;h.x>u.x?w<=b&&(m.x=Math.max(w,u.x+x),y.x=Math.min(b,h.x-v)):w>=b&&(m.x=Math.min(w,u.x-x),y.x=Math.max(b,h.x+v))}else{const b=m.y,w=y.y,x=a.height/2+r,v=l.height/2+r;h.y>u.y?w<=b&&(m.y=Math.max(w,u.y+x),y.y=Math.min(b,h.y-v)):w>=b&&(m.y=Math.min(w,u.y-x),y.y=Math.max(b,h.y+v))}return[m.toJSON(),...n,y.toJSON()]};function Zr(n,t){if(t!=null&&t!==!1){const e=typeof t=="boolean"?0:t;if(e>0){const s=O.create(n[1]).move(n[2],e),r=O.create(n[1]).move(n[0],e);return[s.toJSON(),...n,r.toJSON()]}{const s=n[1];return[Object.assign({},s),...n,Object.assign({},s)]}}return n}const rV=Object.freeze(Object.defineProperty({__proto__:null,er:sV,loop:function(n,t,e){const s=t.width||50,i=(t.height||80)/2,o=t.angle||"auto",a=e.sourceAnchor,l=e.targetAnchor,u=e.sourceBBox,h=e.targetBBox;if(a.equals(l)){const f=b=>{const w=gt.toRad(b),x=Math.sin(w),v=Math.cos(w),S=new O(a.x+v*s,a.y+x*s),E=new O(S.x-v*i,S.y-x*i),C=E.clone().rotate(-90,S),M=E.clone().rotate(90,S);return[C.toJSON(),S.toJSON(),M.toJSON()]},d=b=>{const w=a.clone().move(b,-1),x=new W(w,b);return!u.containsPoint(b)&&!u.intersectsWithLine(x)},g=[0,90,180,270,45,135,225,315];if(typeof o=="number")return Zr(f(o),t.merge);const p=u.getCenter();if(p.equals(a))return Zr(f(0),t.merge);const m=p.angleBetween(a,p.clone().translate(1,0));let y=f(m);if(d(y[1]))return Zr(y,t.merge);for(let b=1,w=g.length;b<w;b+=1)if(y=f(m+g[b]),d(y[1]))return Zr(y,t.merge);return Zr(y,t.merge)}{const f=new W(a,l);let d=f.parallel(-s),g=d.getCenter(),p=d.start.clone().move(d.end,i),m=d.end.clone().move(d.start,i);const y=f.parallel(-1),b=new W(y.start,g),w=new W(y.end,g);if((u.containsPoint(g)||h.containsPoint(g)||u.intersectsWithLine(b)||u.intersectsWithLine(w)||h.intersectsWithLine(b)||h.intersectsWithLine(w))&&(d=f.parallel(s),g=d.getCenter(),p=d.start.clone().move(d.end,i),m=d.end.clone().move(d.start,i)),t.merge){const x=new W(a,l),v=new W(g,x.center).setLength(Number.MAX_SAFE_INTEGER),S=u.intersectsWithLine(v),E=h.intersectsWithLine(v),C=S?Array.isArray(S)?S:[S]:[];E&&(Array.isArray(E)?C.push(...E):C.push(E));const M=x.center.closest(C);M?(e.sourceAnchor=M.clone(),e.targetAnchor=M.clone()):(e.sourceAnchor=x.center.clone(),e.targetAnchor=x.center.clone())}return Zr([p.toJSON(),g.toJSON(),m.toJSON()],t.merge)}},manhattan:Ob,metro:nV,normal:VB,oneSide:jB,orth:pb},Symbol.toStringTag,{value:"Module"}));var Ms;(function(n){n.presets=rV,n.registry=Ft.create({type:"router"}),n.registry.register(n.presets,!0)})(Ms||(Ms={}));const iV=function(n,t,e,s={}){const r=[n,...e,t],i=new zt(r),o=new Z(i);return s.raw?o:o.serialize()},oV=function(n,t,e,s={}){const r=e.length===3?0:1,i=O.create(e[0+r]),o=O.create(e[2+r]),a=O.create(e[1+r]);if(!O.equals(n,t)){const u=new O((n.x+t.x)/2,(n.y+t.y)/2),h=u.angleBetween(O.create(n).rotate(90,u),a);h>1&&(i.rotate(180-h,u),o.rotate(180-h,u),a.rotate(180-h,u))}const l=`
117
117
  M ${n.x} ${n.y}
118
118
  Q ${i.x} ${i.y} ${a.x} ${a.y}
119
119
  Q ${o.x} ${o.y} ${t.x} ${t.y}
@@ -296,7 +296,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
296
296
  background: transparent;
297
297
  box-shadow: none;
298
298
  }
299
- `;var WV=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class As extends pt{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}get snapline(){return this.options.target.getPlugin("snapline")}constructor(t){super(),this.name="dnd",this.options=Object.assign(Object.assign({},As.defaults),t),this.init()}init(){jr(this.name,YV),this.container=document.createElement("div"),J(this.container,this.prefixClassName("widget-dnd")),this.draggingGraph=new I(Object.assign(Object.assign({},this.options.delegateGraphOptions),{container:document.createElement("div"),width:1,height:1,async:!1})),Ne(this.container,this.draggingGraph.container)}start(t,e){const s=e;s.preventDefault(),this.targetModel.startBatch("dnd"),J(this.container,"dragging"),ps(this.container,this.options.draggingContainer||document.body),this.sourceNode=t,this.prepareDragging(t,s.clientX,s.clientY);const r=this.updateNodePosition(s.clientX,s.clientY);this.isSnaplineEnabled()&&(this.snapline.captureCursorOffset({e:s,node:t,cell:t,view:this.draggingView,x:r.x,y:r.y}),this.draggingNode.on("change:position",this.snap,this)),this.delegateDocumentEvents(As.documentEvents,s.data)}isSnaplineEnabled(){return this.snapline&&this.snapline.isEnabled()}prepareDragging(t,e,s){const r=this.draggingGraph,i=r.model,o=this.options.getDragNode(t,{sourceNode:t,draggingGraph:r,targetGraph:this.targetGraph});o.position(0,0);let a=5;if(this.isSnaplineEnabled()&&(a+=this.snapline.options.tolerance||0),this.isSnaplineEnabled()||this.options.scaled){const h=this.targetGraph.transform.getScale();r.scale(h.sx,h.sy),a*=Math.max(h.sx,h.sy)}else r.scale(1,1);this.clearDragging(),i.resetCells([o]);const l=r.findViewByCell(o);l.undelegateEvents(),l.cell.off("changed"),r.fitToContent({padding:a,allowNewOrigin:"any",useCellGeometry:!1});const u=l.getBBox();this.geometryBBox=l.getBBox({useCellGeometry:!0}),this.delta=this.geometryBBox.getTopLeft().diff(u.getTopLeft()),this.draggingNode=o,this.draggingView=l,this.draggingBBox=o.getBBox(),this.padding=a,this.originOffset=this.updateGraphPosition(e,s)}updateGraphPosition(t,e){const s=document.body.scrollTop||document.documentElement.scrollTop,r=document.body.scrollLeft||document.documentElement.scrollLeft,i=this.delta,o=this.geometryBBox,a=this.padding||5,l={left:t-i.x-o.width/2-a+r,top:e-i.y-o.height/2-a+s};return this.draggingGraph&&qt(this.container,{left:`${l.left}px`,top:`${l.top}px`}),l}updateNodePosition(t,e){const s=this.targetGraph.clientToLocal(t,e),r=this.draggingBBox;return s.x-=r.width/2,s.y-=r.height/2,this.draggingNode.position(s.x,s.y),s}snap({cell:t,current:e,options:s}){const r=t;if(s.snapped){const i=this.draggingBBox;r.position(i.x+s.tx,i.y+s.ty,{silent:!0}),this.draggingView.translate(),r.position(e.x,e.y,{silent:!0}),this.snapOffset={x:s.tx,y:s.ty}}else this.snapOffset=null}onDragging(t){const e=this.draggingView;if(e){t.preventDefault();const s=this.normalizeEvent(t),r=s.clientX,i=s.clientY;this.updateGraphPosition(r,i);const o=this.updateNodePosition(r,i),a=this.targetGraph.options.embedding.enabled,l=(a||this.isSnaplineEnabled())&&this.isInsideValidArea({x:r,y:i});if(a){e.setEventData(s,{graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView});const u=e.getEventData(s);l?e.processEmbedding(s,u):e.clearEmbedding(u),this.candidateEmbedView=u.candidateEmbedView}this.isSnaplineEnabled()&&(l?this.snapline.snapOnMoving({e:s,view:e,x:o.x,y:o.y}):this.snapline.hide())}}onDragEnd(t){const e=this.draggingNode;if(e){const s=this.normalizeEvent(t),r=this.draggingView,i=this.draggingBBox,o=this.snapOffset;let a=i.x,l=i.y;o&&(a+=o.x,l+=o.y),e.position(a,l,{silent:!0});const u=this.drop(e,{x:s.clientX,y:s.clientY}),h=f=>{f?(this.onDropped(e),this.targetGraph.options.embedding.enabled&&r&&(r.setEventData(s,{cell:f,graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView}),r.finalizeEmbedding(s,r.getEventData(s)))):this.onDropInvalid(),this.candidateEmbedView=null,this.targetModel.stopBatch("dnd")};Cu(u)?(this.undelegateDocumentEvents(),u.then(h)):h(u)}}clearDragging(){this.draggingNode&&(this.sourceNode=null,this.draggingNode.remove(),this.draggingNode=null,this.draggingView=null,this.delta=null,this.padding=null,this.snapOffset=null,this.originOffset=null,this.undelegateDocumentEvents())}onDropped(t){this.draggingNode===t&&(this.clearDragging(),Dt(this.container,"dragging"),ze(this.container))}onDropInvalid(){const t=this.draggingNode;t&&this.onDropped(t)}isInsideValidArea(t){let e,s=null;const r=this.targetGraph,i=this.targetScroller;this.options.dndContainer&&(s=this.getDropArea(this.options.dndContainer));const o=s&&s.containsPoint(t);if(i)if(i.options.autoResize)e=this.getDropArea(i.container);else{const a=this.getDropArea(i.container);e=this.getDropArea(r.container).intersectsWithRect(a)}else e=this.getDropArea(r.container);return!o&&e&&e.containsPoint(t)}getDropArea(t){const e=Gu(t),s=document.body.scrollTop||document.documentElement.scrollTop,r=document.body.scrollLeft||document.documentElement.scrollLeft;return z.create({x:e.left+parseInt(qt(t,"border-left-width"),10)-r,y:e.top+parseInt(qt(t,"border-top-width"),10)-s,width:t.clientWidth,height:t.clientHeight})}drop(t,e){if(this.isInsideValidArea(e)){const s=this.targetGraph,r=s.model,i=s.clientToLocal(e),o=this.sourceNode,a=this.options.getDropNode(t,{sourceNode:o,draggingNode:t,targetGraph:this.targetGraph,draggingGraph:this.draggingGraph}),l=a.getBBox();i.x+=l.x-l.width/2,i.y+=l.y-l.height/2;const u=this.snapOffset?1:s.getGridSize();a.position(wt.snapToGrid(i.x,u),wt.snapToGrid(i.y,u)),a.removeZIndex();const h=this.options.validateNode,f=h?h(a,{sourceNode:o,draggingNode:t,droppingNode:a,targetGraph:s,draggingGraph:this.draggingGraph}):!0;return typeof f=="boolean"?f?(r.addCell(a,{stencil:this.cid}),a):null:KD(f).then(d=>d?(r.addCell(a,{stencil:this.cid}),a):null)}return null}onRemove(){this.draggingGraph&&(this.draggingGraph.view.remove(),this.draggingGraph.dispose())}dispose(){this.remove(),$r(this.name)}}WV([pt.dispose()],As.prototype,"dispose",null),function(n){n.defaults={getDragNode:t=>t.clone(),getDropNode:t=>t.clone()},n.documentEvents={mousemove:"onDragging",touchmove:"onDragging",mouseup:"onDragEnd",touchend:"onDragEnd",touchcancel:"onDragEnd"}}(As||(As={}));function qV(n,t={}){const e=Zt.isModel(n)?n:new Zt().resetCells(n,{sort:!1,dryrun:!0}),s=e.getNodes(),r=t.columns||1,i=Math.ceil(s.length/r),o=t.dx||0,a=t.dy||0,l=t.center!==!1,u=t.resizeToFit===!0,h=t.marginX||0,f=t.marginY||0,d=[];let g=t.columnWidth;if(g==="compact")for(let w=0;w<r;w+=1){const x=Pn.getNodesInColumn(s,w,r);d.push(Pn.getMaxDim(x,"width")+o)}else{(g==null||g==="auto")&&(g=Pn.getMaxDim(s,"width")+o);for(let w=0;w<r;w+=1)d.push(g)}const p=Pn.accumulate(d,h),m=[];let y=t.rowHeight;if(y==="compact")for(let w=0;w<i;w+=1){const x=Pn.getNodesInRow(s,w,r);m.push(Pn.getMaxDim(x,"height")+a)}else{(y==null||y==="auto")&&(y=Pn.getMaxDim(s,"height")+a);for(let w=0;w<i;w+=1)m.push(y)}const b=Pn.accumulate(m,f);e.startBatch("layout"),s.forEach((w,x)=>{const v=x%r,S=Math.floor(x/r),E=d[v],C=m[S];let M=0,T=0,k=w.getSize();if(u){let _=E-2*o,D=C-2*a;const N=k.height*(k.width?_/k.width:1),V=k.width*(k.height?D/k.height:1);C<N?_=V:D=N,k={width:_,height:D},w.setSize(k,t)}l&&(M=(E-k.width)/2,T=(C-k.height)/2),w.position(p[v]+o+M,b[S]+a+T,t)}),e.stopBatch("layout")}var Pn;(function(n){function t(i,o){return i.reduce((a,l)=>Math.max(l==null?void 0:l.getSize()[o],a),0)}n.getMaxDim=t;function e(i,o,a){const l=[];for(let u=a*o,h=u+a;u<h;u+=1)i[u]&&l.push(i[u]);return l}n.getNodesInRow=e;function s(i,o,a){const l=[];for(let u=o,h=i.length;u<h;u+=a)i[u]&&l.push(i[u]);return l}n.getNodesInColumn=s;function r(i,o){return i.reduce((a,l,u)=>(a.push(a[u]+l),a),[o||0])}n.accumulate=r})(Pn||(Pn={}));const JV=`.x6-widget-dnd {
299
+ `;var WV=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class As extends pt{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}get snapline(){return this.options.target.getPlugin("snapline")}constructor(t){super(),this.name="dnd",this.options=Object.assign(Object.assign({},As.defaults),t),this.init()}init(){jr(this.name,YV),this.container=document.createElement("div"),J(this.container,this.prefixClassName("widget-dnd")),this.draggingGraph=new I(Object.assign(Object.assign({},this.options.delegateGraphOptions),{container:document.createElement("div"),width:1,height:1,async:!1})),Ne(this.container,this.draggingGraph.container)}start(t,e){const s=e;s.preventDefault(),this.targetModel.startBatch("dnd"),J(this.container,"dragging"),ps(this.container,this.options.draggingContainer||document.body),this.sourceNode=t,this.prepareDragging(t,s.clientX,s.clientY);const r=this.updateNodePosition(s.clientX,s.clientY);this.isSnaplineEnabled()&&(this.snapline.captureCursorOffset({e:s,node:t,cell:t,view:this.draggingView,x:r.x,y:r.y}),this.draggingNode.on("change:position",this.snap,this)),this.delegateDocumentEvents(As.documentEvents,s.data)}isSnaplineEnabled(){return this.snapline&&this.snapline.isEnabled()}prepareDragging(t,e,s){const r=this.draggingGraph,i=r.model,o=this.options.getDragNode(t,{sourceNode:t,draggingGraph:r,targetGraph:this.targetGraph});o.position(0,0);let a=5;if(this.isSnaplineEnabled()&&(a+=this.snapline.options.tolerance||0),this.isSnaplineEnabled()||this.options.scaled){const h=this.targetGraph.transform.getScale();r.scale(h.sx,h.sy),a*=Math.max(h.sx,h.sy)}else r.scale(1,1);this.clearDragging(),i.resetCells([o]);const l=r.findViewByCell(o);l.undelegateEvents(),l.cell.off("changed"),r.fitToContent({padding:a,allowNewOrigin:"any",useCellGeometry:!1});const u=l.getBBox();this.geometryBBox=l.getBBox({useCellGeometry:!0}),this.delta=this.geometryBBox.getTopLeft().diff(u.getTopLeft()),this.draggingNode=o,this.draggingView=l,this.draggingBBox=o.getBBox(),this.padding=a,this.originOffset=this.updateGraphPosition(e,s)}updateGraphPosition(t,e){const s=document.body.scrollTop||document.documentElement.scrollTop,r=document.body.scrollLeft||document.documentElement.scrollLeft,i=this.delta,o=this.geometryBBox,a=this.padding||5,l={left:t-i.x-o.width/2-a+r,top:e-i.y-o.height/2-a+s};return this.draggingGraph&&qt(this.container,{left:`${l.left}px`,top:`${l.top}px`}),l}updateNodePosition(t,e){const s=this.targetGraph.clientToLocal(t,e),r=this.draggingBBox;return s.x-=r.width/2,s.y-=r.height/2,this.draggingNode.position(s.x,s.y),s}snap({cell:t,current:e,options:s}){const r=t;if(s.snapped){const i=this.draggingBBox;r.position(i.x+s.tx,i.y+s.ty,{silent:!0}),this.draggingView.translate(),r.position(e.x,e.y,{silent:!0}),this.snapOffset={x:s.tx,y:s.ty}}else this.snapOffset=null}onDragging(t){const e=this.draggingView;if(e){t.preventDefault();const s=this.normalizeEvent(t),r=s.clientX,i=s.clientY;this.updateGraphPosition(r,i);const o=this.updateNodePosition(r,i),a=this.targetGraph.options.embedding.enabled,l=(a||this.isSnaplineEnabled())&&this.isInsideValidArea({x:r,y:i});if(a){e.setEventData(s,{graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView});const u=e.getEventData(s);l?e.processEmbedding(s,u):e.clearEmbedding(u),this.candidateEmbedView=u.candidateEmbedView}this.isSnaplineEnabled()&&(l?this.snapline.snapOnMoving({e:s,view:e,x:o.x,y:o.y}):this.snapline.hide())}}onDragEnd(t){const e=this.draggingNode;if(e){const s=this.normalizeEvent(t),r=this.draggingView,i=this.draggingBBox,o=this.snapOffset;let a=i.x,l=i.y;o&&(a+=o.x,l+=o.y),e.position(a,l,{silent:!0});const u=this.drop(e,{x:s.clientX,y:s.clientY}),h=f=>{f?(this.onDropped(e),this.targetGraph.options.embedding.enabled&&r&&(r.setEventData(s,{cell:f,graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView}),r.finalizeEmbedding(s,r.getEventData(s)))):this.onDropInvalid(),this.candidateEmbedView=null,this.targetModel.stopBatch("dnd")};Cu(u)?(this.undelegateDocumentEvents(),u.then(h)):h(u)}}clearDragging(){this.draggingNode&&(this.sourceNode=null,this.draggingNode.remove(),this.draggingNode=null,this.draggingView=null,this.delta=null,this.padding=null,this.snapOffset=null,this.originOffset=null,this.undelegateDocumentEvents())}onDropped(t){this.draggingNode===t&&(this.clearDragging(),Dt(this.container,"dragging"),ze(this.container))}onDropInvalid(){const t=this.draggingNode;t&&this.onDropped(t)}isInsideValidArea(t){let e,s=null;const r=this.targetGraph,i=this.targetScroller;this.options.dndContainer&&(s=this.getDropArea(this.options.dndContainer));const o=s&&s.containsPoint(t);if(i)if(i.options.autoResize)e=this.getDropArea(i.container);else{const a=this.getDropArea(i.container);e=this.getDropArea(r.container).intersectsWithRect(a)}else e=this.getDropArea(r.container);return!o&&e&&e.containsPoint(t)}getDropArea(t){const e=Gu(t),s=document.body.scrollTop||document.documentElement.scrollTop,r=document.body.scrollLeft||document.documentElement.scrollLeft;return z.create({x:e.left+parseInt(qt(t,"border-left-width"),10)-r,y:e.top+parseInt(qt(t,"border-top-width"),10)-s,width:t.clientWidth,height:t.clientHeight})}drop(t,e){if(this.isInsideValidArea(e)){const s=this.targetGraph,r=s.model,i=s.clientToLocal(e),o=this.sourceNode,a=this.options.getDropNode(t,{sourceNode:o,draggingNode:t,targetGraph:this.targetGraph,draggingGraph:this.draggingGraph}),l=a.getBBox();i.x+=l.x-l.width/2,i.y+=l.y-l.height/2;const u=this.snapOffset?1:s.getGridSize();a.position(wt.snapToGrid(i.x,u),wt.snapToGrid(i.y,u)),a.removeZIndex();const h=this.options.validateNode,f=h?h(a,{sourceNode:o,draggingNode:t,droppingNode:a,targetGraph:s,draggingGraph:this.draggingGraph}):!0;return typeof f=="boolean"?f?(r.addCell(a,{stencil:this.cid}),a):null:KD(f).then(d=>d?(r.addCell(a,{stencil:this.cid}),a):null)}return null}onRemove(){this.draggingGraph&&(this.draggingGraph.view.remove(),this.draggingGraph.dispose())}dispose(){this.remove(),$r(this.name)}}WV([pt.dispose()],As.prototype,"dispose",null),function(n){n.defaults={getDragNode:t=>t.clone(),getDropNode:t=>t.clone()},n.documentEvents={mousemove:"onDragging",touchmove:"onDragging",mouseup:"onDragEnd",touchend:"onDragEnd",touchcancel:"onDragEnd"}}(As||(As={}));function qV(n,t={}){const e=Zt.isModel(n)?n:new Zt().resetCells(n,{sort:!1,dryrun:!0}),s=e.getNodes(),r=t.columns||1,i=Math.ceil(s.length/r),o=t.dx||0,a=t.dy||0,l=t.center!==!1,u=t.resizeToFit===!0,h=t.marginX||0,f=t.marginY||0,d=[];let g=t.columnWidth;if(g==="compact")for(let w=0;w<r;w+=1){const x=Pn.getNodesInColumn(s,w,r);d.push(Pn.getMaxDim(x,"width")+o)}else{(g==null||g==="auto")&&(g=Pn.getMaxDim(s,"width")+o);for(let w=0;w<r;w+=1)d.push(g)}const p=Pn.accumulate(d,h),m=[];let y=t.rowHeight;if(y==="compact")for(let w=0;w<i;w+=1){const x=Pn.getNodesInRow(s,w,r);m.push(Pn.getMaxDim(x,"height")+a)}else{(y==null||y==="auto")&&(y=Pn.getMaxDim(s,"height")+a);for(let w=0;w<i;w+=1)m.push(y)}const b=Pn.accumulate(m,f);e.startBatch("layout"),s.forEach((w,x)=>{const v=x%r,S=Math.floor(x/r),E=d[v],C=m[S];let M=0,T=0,k=w.getSize();if(u){let _=E-2*o,D=C-2*a;const N=k.height*(k.width?_/k.width:1),j=k.width*(k.height?D/k.height:1);C<N?_=j:D=N,k={width:_,height:D},w.setSize(k,t)}l&&(M=(E-k.width)/2,T=(C-k.height)/2),w.position(p[v]+o+M,b[S]+a+T,t)}),e.stopBatch("layout")}var Pn;(function(n){function t(i,o){return i.reduce((a,l)=>Math.max(l==null?void 0:l.getSize()[o],a),0)}n.getMaxDim=t;function e(i,o,a){const l=[];for(let u=a*o,h=u+a;u<h;u+=1)i[u]&&l.push(i[u]);return l}n.getNodesInRow=e;function s(i,o,a){const l=[];for(let u=o,h=i.length;u<h;u+=a)i[u]&&l.push(i[u]);return l}n.getNodesInColumn=s;function r(i,o){return i.reduce((a,l,u)=>(a.push(a[u]+l),a),[o||0])}n.accumulate=r})(Pn||(Pn={}));const JV=`.x6-widget-dnd {
300
300
  position: absolute;
301
301
  top: -10000px;
302
302
  left: -10000px;
@@ -657,7 +657,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
657
657
  display: block;
658
658
  background-color: #808080;
659
659
  }
660
- `;I.prototype.createTransformWidget=function(n){const t=this.getPlugin("transform");return t&&t.createWidget(n),this},I.prototype.clearTransformWidgets=function(){const n=this.getPlugin("transform");return n&&n.clearWidgets(),this};var QV=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class er extends Nt{constructor(t={}){super(),this.name="transform",this.widgets=new Map,this.disabled=!1,this.options=t,jr(this.name,ZV)}init(t){this.graph=t,!this.disabled&&this.startListening()}startListening(){this.graph.on("node:click",this.onNodeClick,this),this.graph.on("blank:mousedown",this.onBlankMouseDown,this)}stopListening(){this.graph.off("node:click",this.onNodeClick,this),this.graph.off("blank:mousedown",this.onBlankMouseDown,this)}enable(){this.disabled&&(this.disabled=!1,this.startListening())}disable(){this.disabled||(this.disabled=!0,this.stopListening())}isEnabled(){return!this.disabled}createWidget(t){this.clearWidgets();const e=this.createTransform(t);e&&(this.widgets.set(t,e),e.on("*",(s,r)=>{this.trigger(s,r),this.graph.trigger(s,r)}))}onNodeClick({node:t}){this.createWidget(t)}onBlankMouseDown(){this.clearWidgets()}createTransform(t){const e=this.getTransformOptions(t);return e.resizable||e.rotatable?new Bb(e,t,this.graph):null}getTransformOptions(t){this.options.resizing||(this.options.resizing={enabled:!1}),this.options.rotating||(this.options.rotating={enabled:!1}),typeof this.options.resizing=="boolean"&&(this.options.resizing={enabled:this.options.resizing}),typeof this.options.rotating=="boolean"&&(this.options.rotating={enabled:this.options.rotating});const e=er.parseOptionGroup(this.graph,t,this.options.resizing),s=er.parseOptionGroup(this.graph,t,this.options.rotating);return{resizable:!!e.enabled,minWidth:e.minWidth||0,maxWidth:e.maxWidth||Number.MAX_SAFE_INTEGER,minHeight:e.minHeight||0,maxHeight:e.maxHeight||Number.MAX_SAFE_INTEGER,orthogonalResizing:typeof e.orthogonal=="boolean"?e.orthogonal:!0,restrictedResizing:!!e.restrict,autoScrollOnResizing:typeof e.autoScroll=="boolean"?e.autoScroll:!0,preserveAspectRatio:!!e.preserveAspectRatio,allowReverse:typeof e.allowReverse=="boolean"?e.allowReverse:!0,rotatable:!!s.enabled,rotateGrid:s.grid||15}}clearWidgets(){this.widgets.forEach((t,e)=>{this.graph.getCellById(e.id)&&t.dispose()}),this.widgets.clear()}dispose(){this.clearWidgets(),this.stopListening(),this.off(),$r(this.name)}}QV([Nt.dispose()],er.prototype,"dispose",null),function(n){function t(e,s,r){const i={};return Object.keys(r||{}).forEach(o=>{const a=r[o];i[o]=typeof a=="function"?a.call(e,s):a}),i}n.parseOptionGroup=t}(er||(er={}));var tj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i},ej=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class Vb extends pt{get model(){return this.graph.model}get containerClassName(){return this.prefixClassName("widget-snapline")}get verticalClassName(){return`${this.containerClassName}-vertical`}get horizontalClassName(){return`${this.containerClassName}-horizontal`}constructor(t){super();const{graph:e}=t,s=ej(t,["graph"]);this.graph=e,this.options=Object.assign({},s),this.offset={x:0,y:0},this.render(),this.disabled||this.startListening()}get disabled(){return this.options.enabled!==!0}enable(){this.disabled&&(this.options.enabled=!0,this.startListening())}disable(){this.disabled||(this.options.enabled=!1,this.stopListening())}setFilter(t){this.options.filter=t}render(){const t=this.containerWrapper=new tt("svg"),e=this.horizontal=new tt("line"),s=this.vertical=new tt("line");t.addClass(this.containerClassName),e.addClass(this.horizontalClassName),s.addClass(this.verticalClassName),t.setAttribute("width","100%"),t.setAttribute("height","100%"),e.setAttribute("display","none"),s.setAttribute("display","none"),t.append([e,s]),this.options.className&&t.addClass(this.options.className),this.container=this.containerWrapper.node}startListening(){this.stopListening(),this.graph.on("node:mousedown",this.captureCursorOffset,this),this.graph.on("node:mousemove",this.snapOnMoving,this),this.model.on("batch:stop",this.onBatchStop,this),this.delegateDocumentEvents({mouseup:"hide",touchend:"hide"})}stopListening(){this.graph.off("node:mousedown",this.captureCursorOffset,this),this.graph.off("node:mousemove",this.snapOnMoving,this),this.model.off("batch:stop",this.onBatchStop,this),this.undelegateDocumentEvents()}onBatchStop({name:t,data:e}){t==="resize"&&this.snapOnResizing(e.cell,e)}captureCursorOffset({view:t,x:e,y:s}){const r=t.getDelegatedView();if(r&&this.isNodeMovable(r)){const i=t.cell.getPosition();this.offset={x:e-i.x,y:s-i.y}}}isNodeMovable(t){return t&&t.cell.isNode()&&t.can("nodeMovable")}getRestrictArea(t){const e=this.graph.options.translating.restrict,s=typeof e=="function"?X(e,this.graph,t):e;return typeof s=="number"?this.graph.transform.getGraphArea().inflate(s):s===!0?this.graph.transform.getGraphArea():s||null}snapOnResizing(t,e){if(this.options.resizing&&!e.snapped&&e.ui&&e.direction&&e.trueDirection){const s=this.graph.renderer.findViewByCell(t);if(s&&s.cell.isNode()){const r=t.getBBox(),i=r.bbox(t.getAngle()),o=i.getTopLeft(),a=i.getBottomRight(),l=gt.normalize(t.getAngle()),u=this.options.tolerance||0;let h,f,d,g,p,m;const y={vertical:0,horizontal:0},b=e.direction,w=e.trueDirection,x=e.relativeDirection;w.indexOf("right")!==-1?y.vertical=a.x:y.vertical=o.x,w.indexOf("bottom")!==-1?y.horizontal=a.y:y.horizontal=o.y,this.model.getNodes().some(D=>{if(this.isIgnored(t,D))return!1;const N=D.getBBox().bbox(D.getAngle()),V=N.getTopLeft(),A=N.getBottomRight(),P={vertical:[V.x,A.x],horizontal:[V.y,A.y]},L={};return Object.keys(P).forEach(j=>{const Y=j,ot=P[Y].map(F=>({position:F,distance:Math.abs(F-y[Y])})).filter(F=>F.distance<=u);L[Y]=Pc(ot,F=>F.distance)}),h==null&&L.vertical.length>0&&(h=L.vertical[0].position,f=Math.min(i.y,N.y),d=Math.max(a.y,A.y)-f),g==null&&L.horizontal.length>0&&(g=L.horizontal[0].position,p=Math.min(i.x,N.x),m=Math.max(a.x,A.x)-p),h!=null&&g!=null}),this.hide();let v=0,S=0;(g!=null||h!=null)&&(h!=null&&(v=w.indexOf("right")!==-1?h-a.x:o.x-h),g!=null&&(S=w.indexOf("bottom")!==-1?g-a.y:o.y-g));let E=0,C=0;if(l%90===0)l===90||l===270?(E=S,C=v):(E=v,C=S);else{const D=l>=0&&l<90?1:l>=90&&l<180?4:l>=180&&l<270?3:2;g!=null&&h!=null&&(v<S?(S=0,g=void 0):(v=0,h=void 0));const N=gt.toRad(l%90);v&&(E=D===3?v/Math.cos(N):v/Math.sin(N)),S&&(C=D===3?S/Math.cos(N):S/Math.sin(N));const V=D===1||D===3;switch(x){case"top":case"bottom":C=S?S/(V?Math.cos(N):Math.sin(N)):v/(V?Math.sin(N):Math.cos(N));break;case"left":case"right":E=v?v/(V?Math.cos(N):Math.sin(N)):S/(V?Math.sin(N):Math.cos(N));break}}switch(x){case"top":case"bottom":E=0;break;case"left":case"right":C=0;break}const M=this.graph.getGridSize();let T=Math.max(r.width+E,M),k=Math.max(r.height+C,M);e.minWidth&&e.minWidth>M&&(T=Math.max(T,e.minWidth)),e.minHeight&&e.minHeight>M&&(k=Math.max(k,e.minHeight)),e.maxWidth&&(T=Math.min(T,e.maxWidth)),e.maxHeight&&(k=Math.min(k,e.maxHeight)),e.preserveAspectRatio&&(C<E?k=T*(r.height/r.width):T=k*(r.width/r.height)),(T!==r.width||k!==r.height)&&(t.resize(T,k,{direction:b,relativeDirection:x,trueDirection:w,snapped:!0,snaplines:this.cid,restrict:this.getRestrictArea(s)}),d&&(d+=k-r.height),m&&(m+=T-r.width));const _=t.getBBox().bbox(l);h&&Math.abs(_.x-h)>1&&Math.abs(_.width+_.x-h)>1&&(h=void 0),g&&Math.abs(_.y-g)>1&&Math.abs(_.height+_.y-g)>1&&(g=void 0),this.update({verticalLeft:h,verticalTop:f,verticalHeight:d,horizontalTop:g,horizontalLeft:p,horizontalWidth:m})}}}snapOnMoving({view:t,e,x:s,y:r}){const i=t.getEventData(e).delegatedView||t;if(!this.isNodeMovable(i))return;const o=i.cell,a=o.getSize(),l=o.getPosition(),u=new z(s-this.offset.x,r-this.offset.y,a.width,a.height),h=o.getAngle(),f=u.getCenter(),d=u.bbox(h),g=d.getTopLeft(),p=d.getBottomRight(),m=this.options.tolerance||0;let y,b,w,x,v,S,E=0,C=0;if(this.model.getNodes().some(M=>{if(this.isIgnored(o,M))return!1;const T=M.getBBox().bbox(M.getAngle()),k=T.getCenter(),_=T.getTopLeft(),D=T.getBottomRight();return y==null&&(Math.abs(k.x-f.x)<m?(y=k.x,E=.5):Math.abs(_.x-g.x)<m?(y=_.x,E=0):Math.abs(_.x-p.x)<m?(y=_.x,E=1):Math.abs(D.x-p.x)<m?(y=D.x,E=1):Math.abs(D.x-g.x)<m&&(y=D.x),y!=null&&(b=Math.min(d.y,T.y),w=Math.max(p.y,D.y)-b)),x==null&&(Math.abs(k.y-f.y)<m?(x=k.y,C=.5):Math.abs(_.y-g.y)<m?x=_.y:Math.abs(_.y-p.y)<m?(x=_.y,C=1):Math.abs(D.y-p.y)<m?(x=D.y,C=1):Math.abs(D.y-g.y)<m&&(x=D.y),x!=null&&(v=Math.min(d.x,T.x),S=Math.max(p.x,D.x)-v)),y!=null&&x!=null}),this.hide(),x!=null||y!=null){x!=null&&(d.y=x-C*d.height),y!=null&&(d.x=y-E*d.width);const M=d.getCenter(),T=M.x-u.width/2,k=M.y-u.height/2,_=T-l.x,D=k-l.y;(_!==0||D!==0)&&(o.translate(_,D,{snapped:!0,restrict:this.getRestrictArea(i)}),S&&(S+=_),w&&(w+=D)),this.update({verticalLeft:y,verticalTop:b,verticalHeight:w,horizontalTop:x,horizontalLeft:v,horizontalWidth:S})}}isIgnored(t,e){return e.id===t.id||e.isDescendantOf(t)||!this.filter(e)}filter(t){const e=this.options.filter;return Array.isArray(e)?e.some(s=>typeof s=="string"?t.shape===s:t.id===s.id):typeof e=="function"?X(e,this.graph,t):!0}update(t){if(t.horizontalTop){const e=this.graph.localToGraph(new O(t.horizontalLeft,t.horizontalTop)),s=this.graph.localToGraph(new O(t.horizontalLeft+t.horizontalWidth,t.horizontalTop));this.horizontal.setAttributes({x1:this.options.sharp?`${e.x}`:"0",y1:`${e.y}`,x2:this.options.sharp?`${s.x}`:"100%",y2:`${s.y}`,display:"inherit"})}else this.horizontal.setAttribute("display","none");if(t.verticalLeft){const e=this.graph.localToGraph(new O(t.verticalLeft,t.verticalTop)),s=this.graph.localToGraph(new O(t.verticalLeft,t.verticalTop+t.verticalHeight));this.vertical.setAttributes({x1:`${e.x}`,y1:this.options.sharp?`${e.y}`:"0",x2:`${s.x}`,y2:this.options.sharp?`${s.y}`:"100%",display:"inherit"})}else this.vertical.setAttribute("display","none");this.show()}resetTimer(){this.timer&&(clearTimeout(this.timer),this.timer=null)}show(){return this.resetTimer(),this.container.parentNode==null&&this.graph.container.appendChild(this.container),this}hide(){this.resetTimer(),this.vertical.setAttribute("display","none"),this.horizontal.setAttribute("display","none");const t=this.options.clean,e=typeof t=="number"?t:t!==!1?3e3:0;return e>0&&(this.timer=window.setTimeout(()=>{this.container.parentNode!==null&&this.unmount()},e)),this}onRemove(){this.stopListening(),this.hide()}dispose(){this.remove()}}tj([pt.dispose()],Vb.prototype,"dispose",null);const nj=`.x6-widget-snapline {
660
+ `;I.prototype.createTransformWidget=function(n){const t=this.getPlugin("transform");return t&&t.createWidget(n),this},I.prototype.clearTransformWidgets=function(){const n=this.getPlugin("transform");return n&&n.clearWidgets(),this};var QV=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class er extends Nt{constructor(t={}){super(),this.name="transform",this.widgets=new Map,this.disabled=!1,this.options=t,jr(this.name,ZV)}init(t){this.graph=t,!this.disabled&&this.startListening()}startListening(){this.graph.on("node:click",this.onNodeClick,this),this.graph.on("blank:mousedown",this.onBlankMouseDown,this)}stopListening(){this.graph.off("node:click",this.onNodeClick,this),this.graph.off("blank:mousedown",this.onBlankMouseDown,this)}enable(){this.disabled&&(this.disabled=!1,this.startListening())}disable(){this.disabled||(this.disabled=!0,this.stopListening())}isEnabled(){return!this.disabled}createWidget(t){this.clearWidgets();const e=this.createTransform(t);e&&(this.widgets.set(t,e),e.on("*",(s,r)=>{this.trigger(s,r),this.graph.trigger(s,r)}))}onNodeClick({node:t}){this.createWidget(t)}onBlankMouseDown(){this.clearWidgets()}createTransform(t){const e=this.getTransformOptions(t);return e.resizable||e.rotatable?new Bb(e,t,this.graph):null}getTransformOptions(t){this.options.resizing||(this.options.resizing={enabled:!1}),this.options.rotating||(this.options.rotating={enabled:!1}),typeof this.options.resizing=="boolean"&&(this.options.resizing={enabled:this.options.resizing}),typeof this.options.rotating=="boolean"&&(this.options.rotating={enabled:this.options.rotating});const e=er.parseOptionGroup(this.graph,t,this.options.resizing),s=er.parseOptionGroup(this.graph,t,this.options.rotating);return{resizable:!!e.enabled,minWidth:e.minWidth||0,maxWidth:e.maxWidth||Number.MAX_SAFE_INTEGER,minHeight:e.minHeight||0,maxHeight:e.maxHeight||Number.MAX_SAFE_INTEGER,orthogonalResizing:typeof e.orthogonal=="boolean"?e.orthogonal:!0,restrictedResizing:!!e.restrict,autoScrollOnResizing:typeof e.autoScroll=="boolean"?e.autoScroll:!0,preserveAspectRatio:!!e.preserveAspectRatio,allowReverse:typeof e.allowReverse=="boolean"?e.allowReverse:!0,rotatable:!!s.enabled,rotateGrid:s.grid||15}}clearWidgets(){this.widgets.forEach((t,e)=>{this.graph.getCellById(e.id)&&t.dispose()}),this.widgets.clear()}dispose(){this.clearWidgets(),this.stopListening(),this.off(),$r(this.name)}}QV([Nt.dispose()],er.prototype,"dispose",null),function(n){function t(e,s,r){const i={};return Object.keys(r||{}).forEach(o=>{const a=r[o];i[o]=typeof a=="function"?a.call(e,s):a}),i}n.parseOptionGroup=t}(er||(er={}));var tj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i},ej=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class Vb extends pt{get model(){return this.graph.model}get containerClassName(){return this.prefixClassName("widget-snapline")}get verticalClassName(){return`${this.containerClassName}-vertical`}get horizontalClassName(){return`${this.containerClassName}-horizontal`}constructor(t){super();const{graph:e}=t,s=ej(t,["graph"]);this.graph=e,this.options=Object.assign({},s),this.offset={x:0,y:0},this.render(),this.disabled||this.startListening()}get disabled(){return this.options.enabled!==!0}enable(){this.disabled&&(this.options.enabled=!0,this.startListening())}disable(){this.disabled||(this.options.enabled=!1,this.stopListening())}setFilter(t){this.options.filter=t}render(){const t=this.containerWrapper=new tt("svg"),e=this.horizontal=new tt("line"),s=this.vertical=new tt("line");t.addClass(this.containerClassName),e.addClass(this.horizontalClassName),s.addClass(this.verticalClassName),t.setAttribute("width","100%"),t.setAttribute("height","100%"),e.setAttribute("display","none"),s.setAttribute("display","none"),t.append([e,s]),this.options.className&&t.addClass(this.options.className),this.container=this.containerWrapper.node}startListening(){this.stopListening(),this.graph.on("node:mousedown",this.captureCursorOffset,this),this.graph.on("node:mousemove",this.snapOnMoving,this),this.model.on("batch:stop",this.onBatchStop,this),this.delegateDocumentEvents({mouseup:"hide",touchend:"hide"})}stopListening(){this.graph.off("node:mousedown",this.captureCursorOffset,this),this.graph.off("node:mousemove",this.snapOnMoving,this),this.model.off("batch:stop",this.onBatchStop,this),this.undelegateDocumentEvents()}onBatchStop({name:t,data:e}){t==="resize"&&this.snapOnResizing(e.cell,e)}captureCursorOffset({view:t,x:e,y:s}){const r=t.getDelegatedView();if(r&&this.isNodeMovable(r)){const i=t.cell.getPosition();this.offset={x:e-i.x,y:s-i.y}}}isNodeMovable(t){return t&&t.cell.isNode()&&t.can("nodeMovable")}getRestrictArea(t){const e=this.graph.options.translating.restrict,s=typeof e=="function"?X(e,this.graph,t):e;return typeof s=="number"?this.graph.transform.getGraphArea().inflate(s):s===!0?this.graph.transform.getGraphArea():s||null}snapOnResizing(t,e){if(this.options.resizing&&!e.snapped&&e.ui&&e.direction&&e.trueDirection){const s=this.graph.renderer.findViewByCell(t);if(s&&s.cell.isNode()){const r=t.getBBox(),i=r.bbox(t.getAngle()),o=i.getTopLeft(),a=i.getBottomRight(),l=gt.normalize(t.getAngle()),u=this.options.tolerance||0;let h,f,d,g,p,m;const y={vertical:0,horizontal:0},b=e.direction,w=e.trueDirection,x=e.relativeDirection;w.indexOf("right")!==-1?y.vertical=a.x:y.vertical=o.x,w.indexOf("bottom")!==-1?y.horizontal=a.y:y.horizontal=o.y,this.model.getNodes().some(D=>{if(this.isIgnored(t,D))return!1;const N=D.getBBox().bbox(D.getAngle()),j=N.getTopLeft(),A=N.getBottomRight(),P={vertical:[j.x,A.x],horizontal:[j.y,A.y]},L={};return Object.keys(P).forEach(V=>{const Y=V,ot=P[Y].map(F=>({position:F,distance:Math.abs(F-y[Y])})).filter(F=>F.distance<=u);L[Y]=Pc(ot,F=>F.distance)}),h==null&&L.vertical.length>0&&(h=L.vertical[0].position,f=Math.min(i.y,N.y),d=Math.max(a.y,A.y)-f),g==null&&L.horizontal.length>0&&(g=L.horizontal[0].position,p=Math.min(i.x,N.x),m=Math.max(a.x,A.x)-p),h!=null&&g!=null}),this.hide();let v=0,S=0;(g!=null||h!=null)&&(h!=null&&(v=w.indexOf("right")!==-1?h-a.x:o.x-h),g!=null&&(S=w.indexOf("bottom")!==-1?g-a.y:o.y-g));let E=0,C=0;if(l%90===0)l===90||l===270?(E=S,C=v):(E=v,C=S);else{const D=l>=0&&l<90?1:l>=90&&l<180?4:l>=180&&l<270?3:2;g!=null&&h!=null&&(v<S?(S=0,g=void 0):(v=0,h=void 0));const N=gt.toRad(l%90);v&&(E=D===3?v/Math.cos(N):v/Math.sin(N)),S&&(C=D===3?S/Math.cos(N):S/Math.sin(N));const j=D===1||D===3;switch(x){case"top":case"bottom":C=S?S/(j?Math.cos(N):Math.sin(N)):v/(j?Math.sin(N):Math.cos(N));break;case"left":case"right":E=v?v/(j?Math.cos(N):Math.sin(N)):S/(j?Math.sin(N):Math.cos(N));break}}switch(x){case"top":case"bottom":E=0;break;case"left":case"right":C=0;break}const M=this.graph.getGridSize();let T=Math.max(r.width+E,M),k=Math.max(r.height+C,M);e.minWidth&&e.minWidth>M&&(T=Math.max(T,e.minWidth)),e.minHeight&&e.minHeight>M&&(k=Math.max(k,e.minHeight)),e.maxWidth&&(T=Math.min(T,e.maxWidth)),e.maxHeight&&(k=Math.min(k,e.maxHeight)),e.preserveAspectRatio&&(C<E?k=T*(r.height/r.width):T=k*(r.width/r.height)),(T!==r.width||k!==r.height)&&(t.resize(T,k,{direction:b,relativeDirection:x,trueDirection:w,snapped:!0,snaplines:this.cid,restrict:this.getRestrictArea(s)}),d&&(d+=k-r.height),m&&(m+=T-r.width));const _=t.getBBox().bbox(l);h&&Math.abs(_.x-h)>1&&Math.abs(_.width+_.x-h)>1&&(h=void 0),g&&Math.abs(_.y-g)>1&&Math.abs(_.height+_.y-g)>1&&(g=void 0),this.update({verticalLeft:h,verticalTop:f,verticalHeight:d,horizontalTop:g,horizontalLeft:p,horizontalWidth:m})}}}snapOnMoving({view:t,e,x:s,y:r}){const i=t.getEventData(e).delegatedView||t;if(!this.isNodeMovable(i))return;const o=i.cell,a=o.getSize(),l=o.getPosition(),u=new z(s-this.offset.x,r-this.offset.y,a.width,a.height),h=o.getAngle(),f=u.getCenter(),d=u.bbox(h),g=d.getTopLeft(),p=d.getBottomRight(),m=this.options.tolerance||0;let y,b,w,x,v,S,E=0,C=0;if(this.model.getNodes().some(M=>{if(this.isIgnored(o,M))return!1;const T=M.getBBox().bbox(M.getAngle()),k=T.getCenter(),_=T.getTopLeft(),D=T.getBottomRight();return y==null&&(Math.abs(k.x-f.x)<m?(y=k.x,E=.5):Math.abs(_.x-g.x)<m?(y=_.x,E=0):Math.abs(_.x-p.x)<m?(y=_.x,E=1):Math.abs(D.x-p.x)<m?(y=D.x,E=1):Math.abs(D.x-g.x)<m&&(y=D.x),y!=null&&(b=Math.min(d.y,T.y),w=Math.max(p.y,D.y)-b)),x==null&&(Math.abs(k.y-f.y)<m?(x=k.y,C=.5):Math.abs(_.y-g.y)<m?x=_.y:Math.abs(_.y-p.y)<m?(x=_.y,C=1):Math.abs(D.y-p.y)<m?(x=D.y,C=1):Math.abs(D.y-g.y)<m&&(x=D.y),x!=null&&(v=Math.min(d.x,T.x),S=Math.max(p.x,D.x)-v)),y!=null&&x!=null}),this.hide(),x!=null||y!=null){x!=null&&(d.y=x-C*d.height),y!=null&&(d.x=y-E*d.width);const M=d.getCenter(),T=M.x-u.width/2,k=M.y-u.height/2,_=T-l.x,D=k-l.y;(_!==0||D!==0)&&(o.translate(_,D,{snapped:!0,restrict:this.getRestrictArea(i)}),S&&(S+=_),w&&(w+=D)),this.update({verticalLeft:y,verticalTop:b,verticalHeight:w,horizontalTop:x,horizontalLeft:v,horizontalWidth:S})}}isIgnored(t,e){return e.id===t.id||e.isDescendantOf(t)||!this.filter(e)}filter(t){const e=this.options.filter;return Array.isArray(e)?e.some(s=>typeof s=="string"?t.shape===s:t.id===s.id):typeof e=="function"?X(e,this.graph,t):!0}update(t){if(t.horizontalTop){const e=this.graph.localToGraph(new O(t.horizontalLeft,t.horizontalTop)),s=this.graph.localToGraph(new O(t.horizontalLeft+t.horizontalWidth,t.horizontalTop));this.horizontal.setAttributes({x1:this.options.sharp?`${e.x}`:"0",y1:`${e.y}`,x2:this.options.sharp?`${s.x}`:"100%",y2:`${s.y}`,display:"inherit"})}else this.horizontal.setAttribute("display","none");if(t.verticalLeft){const e=this.graph.localToGraph(new O(t.verticalLeft,t.verticalTop)),s=this.graph.localToGraph(new O(t.verticalLeft,t.verticalTop+t.verticalHeight));this.vertical.setAttributes({x1:`${e.x}`,y1:this.options.sharp?`${e.y}`:"0",x2:`${s.x}`,y2:this.options.sharp?`${s.y}`:"100%",display:"inherit"})}else this.vertical.setAttribute("display","none");this.show()}resetTimer(){this.timer&&(clearTimeout(this.timer),this.timer=null)}show(){return this.resetTimer(),this.container.parentNode==null&&this.graph.container.appendChild(this.container),this}hide(){this.resetTimer(),this.vertical.setAttribute("display","none"),this.horizontal.setAttribute("display","none");const t=this.options.clean,e=typeof t=="number"?t:t!==!1?3e3:0;return e>0&&(this.timer=window.setTimeout(()=>{this.container.parentNode!==null&&this.unmount()},e)),this}onRemove(){this.stopListening(),this.hide()}dispose(){this.remove()}}tj([pt.dispose()],Vb.prototype,"dispose",null);const nj=`.x6-widget-snapline {
661
661
  position: absolute;
662
662
  top: 0;
663
663
  right: 0;
@@ -670,7 +670,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
670
670
  stroke: #2ecc71;
671
671
  stroke-width: 1px;
672
672
  }
673
- `;I.prototype.isSnaplineEnabled=function(){const n=this.getPlugin("snapline");return n?n.isEnabled():!1},I.prototype.enableSnapline=function(){const n=this.getPlugin("snapline");return n&&n.enable(),this},I.prototype.disableSnapline=function(){const n=this.getPlugin("snapline");return n&&n.disable(),this},I.prototype.toggleSnapline=function(){const n=this.getPlugin("snapline");return n&&n.toggleEnabled(),this},I.prototype.hideSnapline=function(){const n=this.getPlugin("snapline");return n&&n.hide(),this},I.prototype.setSnaplineFilter=function(n){const t=this.getPlugin("snapline");return t&&t.setFilter(n),this},I.prototype.isSnaplineOnResizingEnabled=function(){const n=this.getPlugin("snapline");return n?n.isOnResizingEnabled():!1},I.prototype.enableSnaplineOnResizing=function(){const n=this.getPlugin("snapline");return n&&n.enableOnResizing(),this},I.prototype.disableSnaplineOnResizing=function(){const n=this.getPlugin("snapline");return n&&n.disableOnResizing(),this},I.prototype.toggleSnaplineOnResizing=function(n){const t=this.getPlugin("snapline");return t&&t.toggleOnResizing(n),this},I.prototype.isSharpSnapline=function(){const n=this.getPlugin("snapline");return n?n.isSharp():!1},I.prototype.enableSharpSnapline=function(){const n=this.getPlugin("snapline");return n&&n.enableSharp(),this},I.prototype.disableSharpSnapline=function(){const n=this.getPlugin("snapline");return n&&n.disableSharp(),this},I.prototype.toggleSharpSnapline=function(n){const t=this.getPlugin("snapline");return t&&t.toggleSharp(n),this},I.prototype.getSnaplineTolerance=function(){const n=this.getPlugin("snapline");if(n)return n.getTolerance()},I.prototype.setSnaplineTolerance=function(n){const t=this.getPlugin("snapline");return t&&t.setTolerance(n),this};var sj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class jb extends ye{constructor(t={}){super(),this.name="snapline",this.options=Object.assign({enabled:!0,tolerance:10},t),jr(this.name,nj)}init(t){this.snaplineImpl=new Vb(Object.assign(Object.assign({},this.options),{graph:t}))}isEnabled(){return!this.snaplineImpl.disabled}enable(){this.snaplineImpl.enable()}disable(){this.snaplineImpl.disable()}toggleEnabled(t){if(t!=null)t!==this.isEnabled()&&(t?this.enable():this.disable());else return this.isEnabled()?this.disable():this.enable(),this}hide(){return this.snaplineImpl.hide(),this}setFilter(t){return this.snaplineImpl.setFilter(t),this}isOnResizingEnabled(){return this.snaplineImpl.options.resizing===!0}enableOnResizing(){return this.snaplineImpl.options.resizing=!0,this}disableOnResizing(){return this.snaplineImpl.options.resizing=!1,this}toggleOnResizing(t){return t!=null?t!==this.isOnResizingEnabled()&&(t?this.enableOnResizing():this.disableOnResizing()):this.isOnResizingEnabled()?this.disableOnResizing():this.enableOnResizing(),this}isSharp(){return this.snaplineImpl.options.sharp===!0}enableSharp(){return this.snaplineImpl.options.sharp=!0,this}disableSharp(){return this.snaplineImpl.options.sharp=!1,this}toggleSharp(t){return t!=null?t!==this.isSharp()&&(t?this.enableSharp():this.disableSharp()):this.isSharp()?this.disableSharp():this.enableSharp(),this}getTolerance(){return this.snaplineImpl.options.tolerance}setTolerance(t){return this.snaplineImpl.options.tolerance=t,this}captureCursorOffset(t){this.snaplineImpl.captureCursorOffset(t)}snapOnMoving(t){this.snaplineImpl.snapOnMoving(t)}dispose(){this.snaplineImpl.dispose(),$r(this.name)}}sj([ye.dispose()],jb.prototype,"dispose",null);class rj{constructor(){this.cells=[]}copy(t,e,s={}){this.options=Object.assign({},s);const i=(Zt.isModel(e)?e:e.model).cloneSubGraph(t,s);this.cells=Pc(Object.keys(i).map(o=>i[o]),o=>o.isEdge()?2:1),this.serialize(s)}cut(t,e,s={}){this.copy(t,e,s),(I.isGraph(e)?e.model:e).batchUpdate("cut",()=>{t.forEach(i=>i.remove())})}paste(t,e={}){const s=Object.assign(Object.assign({},this.options),e),{offset:r,edgeProps:i,nodeProps:o}=s;let a=20,l=20;r&&(a=typeof r=="number"?r:r.dx,l=typeof r=="number"?r:r.dy),this.deserialize(s);const u=this.cells;u.forEach(f=>{f.model=null,f.removeProp("zIndex"),(a||l)&&f.translate(a,l),o&&f.isNode()&&f.prop(o),i&&f.isEdge()&&f.prop(i)});const h=I.isGraph(t)?t.model:t;return h.batchUpdate("paste",()=>{h.addCells(this.cells)}),this.copy(u,t,e),u}serialize(t){t.useLocalStorage!==!1&&mo.save(this.cells)}deserialize(t){if(t.useLocalStorage){const e=mo.fetch();e&&(this.cells=e)}}isEmpty(t={}){return t.useLocalStorage&&this.deserialize(t),this.cells.length<=0}clean(){this.options={},this.cells=[],mo.clean()}}var mo;(function(n){const t=`${Ue.prefixCls}.clipboard.cells`;function e(i){if(window.localStorage){const o=i.map(a=>a.toJSON());localStorage.setItem(t,JSON.stringify(o))}}n.save=e;function s(){if(window.localStorage){const i=localStorage.getItem(t),o=i?JSON.parse(i):[];if(o)return Zt.fromJSON(o)}}n.fetch=s;function r(){window.localStorage&&localStorage.removeItem(t)}n.clean=r})(mo||(mo={})),I.prototype.isClipboardEnabled=function(){const n=this.getPlugin("clipboard");return n?n.isEnabled():!1},I.prototype.enableClipboard=function(){const n=this.getPlugin("clipboard");return n&&n.enable(),this},I.prototype.disableClipboard=function(){const n=this.getPlugin("clipboard");return n&&n.disable(),this},I.prototype.toggleClipboard=function(n){const t=this.getPlugin("clipboard");return t&&t.toggleEnabled(n),this},I.prototype.isClipboardEmpty=function(n){const t=this.getPlugin("clipboard");return t?t.isEmpty(n):!0},I.prototype.getCellsInClipboard=function(){const n=this.getPlugin("clipboard");return n?n.getCellsInClipboard():[]},I.prototype.cleanClipboard=function(){const n=this.getPlugin("clipboard");return n&&n.clean(),this},I.prototype.copy=function(n,t){const e=this.getPlugin("clipboard");return e&&e.copy(n,t),this},I.prototype.cut=function(n,t){const e=this.getPlugin("clipboard");return e&&e.cut(n,t),this},I.prototype.paste=function(n,t){const e=this.getPlugin("clipboard");return e?e.paste(n,t):[]};var ij=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i},oj=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class $b extends Nt{get disabled(){return this.options.enabled!==!0}get cells(){return this.clipboardImpl.cells}constructor(t={}){super(),this.name="clipboard",this.options=Object.assign({enabled:!0},t)}init(t){this.graph=t,this.clipboardImpl=new rj,this.clipboardImpl.deserialize(this.options)}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}isEmpty(t={}){return this.clipboardImpl.isEmpty(t)}getCellsInClipboard(){return this.cells}clean(t){return(!this.disabled||t)&&(this.clipboardImpl.clean(),this.notify("clipboard:changed",{cells:[]})),this}copy(t,e={}){return this.disabled||(this.clipboardImpl.copy(t,this.graph,Object.assign(Object.assign({},this.commonOptions),e)),this.notify("clipboard:changed",{cells:t})),this}cut(t,e={}){return this.disabled||(this.clipboardImpl.cut(t,this.graph,Object.assign(Object.assign({},this.commonOptions),e)),this.notify("clipboard:changed",{cells:t})),this}paste(t={},e=this.graph){return this.disabled?[]:this.clipboardImpl.paste(e,Object.assign(Object.assign({},this.commonOptions),t))}get commonOptions(){const t=this.options;return oj(t,["enabled"])}notify(t,e){this.trigger(t,e),this.graph.trigger(t,e)}dispose(){this.clean(!0),this.off()}}ij([Nt.dispose()],$b.prototype,"dispose",null);var zb={exports:{}};(function(n){(function(t,e,s){if(!t)return;for(var r={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"},i={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},o={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},a={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)r[111+u]="f"+u;for(u=0;u<=9;++u)r[u+96]=u.toString();function h(C,M,T){if(C.addEventListener){C.addEventListener(M,T,!1);return}C.attachEvent("on"+M,T)}function f(C){if(C.type=="keypress"){var M=String.fromCharCode(C.which);return C.shiftKey||(M=M.toLowerCase()),M}return r[C.which]?r[C.which]:i[C.which]?i[C.which]:String.fromCharCode(C.which).toLowerCase()}function d(C,M){return C.sort().join(",")===M.sort().join(",")}function g(C){var M=[];return C.shiftKey&&M.push("shift"),C.altKey&&M.push("alt"),C.ctrlKey&&M.push("ctrl"),C.metaKey&&M.push("meta"),M}function p(C){if(C.preventDefault){C.preventDefault();return}C.returnValue=!1}function m(C){if(C.stopPropagation){C.stopPropagation();return}C.cancelBubble=!0}function y(C){return C=="shift"||C=="ctrl"||C=="alt"||C=="meta"}function b(){if(!l){l={};for(var C in r)C>95&&C<112||r.hasOwnProperty(C)&&(l[r[C]]=C)}return l}function w(C,M,T){return T||(T=b()[C]?"keydown":"keypress"),T=="keypress"&&M.length&&(T="keydown"),T}function x(C){return C==="+"?["+"]:(C=C.replace(/\+{2}/g,"+plus"),C.split("+"))}function v(C,M){var T,k,_,D=[];for(T=x(C),_=0;_<T.length;++_)k=T[_],a[k]&&(k=a[k]),M&&M!="keypress"&&o[k]&&(k=o[k],D.push("shift")),y(k)&&D.push(k);return M=w(k,D,M),{key:k,modifiers:D,action:M}}function S(C,M){return C===null||C===e?!1:C===M?!0:S(C.parentNode,M)}function E(C){var M=this;if(C=C||e,!(M instanceof E))return new E(C);M.target=C,M._callbacks={},M._directMap={};var T={},k,_=!1,D=!1,N=!1;function V(F){F=F||{};var H=!1,B;for(B in T){if(F[B]){H=!0;continue}T[B]=0}H||(N=!1)}function A(F,H,B,K,nt,rt){var et,ft,ge=[],St=B.type;if(!M._callbacks[F])return[];for(St=="keyup"&&y(F)&&(H=[F]),et=0;et<M._callbacks[F].length;++et)if(ft=M._callbacks[F][et],!(!K&&ft.seq&&T[ft.seq]!=ft.level)&&St==ft.action&&(St=="keypress"&&!B.metaKey&&!B.ctrlKey||d(H,ft.modifiers))){var xt=!K&&ft.combo==nt,An=K&&ft.seq==K&&ft.level==rt;(xt||An)&&M._callbacks[F].splice(et,1),ge.push(ft)}return ge}function P(F,H,B,K){M.stopCallback(H,H.target||H.srcElement,B,K)||F(H,B)===!1&&(p(H),m(H))}M._handleKey=function(F,H,B){var K=A(F,H,B),nt,rt={},et=0,ft=!1;for(nt=0;nt<K.length;++nt)K[nt].seq&&(et=Math.max(et,K[nt].level));for(nt=0;nt<K.length;++nt){if(K[nt].seq){if(K[nt].level!=et)continue;ft=!0,rt[K[nt].seq]=1,P(K[nt].callback,B,K[nt].combo,K[nt].seq);continue}ft||P(K[nt].callback,B,K[nt].combo)}var ge=B.type=="keypress"&&D;B.type==N&&!y(F)&&!ge&&V(rt),D=ft&&B.type=="keydown"};function L(F){typeof F.which!="number"&&(F.which=F.keyCode);var H=f(F);if(H){if(F.type=="keyup"&&_===H){_=!1;return}M.handleKey(H,g(F),F)}}function j(){clearTimeout(k),k=setTimeout(V,1e3)}function Y(F,H,B,K){T[F]=0;function nt(St){return function(){N=St,++T[F],j()}}function rt(St){P(B,St,F),K!=="keyup"&&(_=f(St)),setTimeout(V,10)}for(var et=0;et<H.length;++et){var ft=et+1===H.length,ge=ft?rt:nt(K||v(H[et+1]).action);ot(H[et],ge,K,F,et)}}function ot(F,H,B,K,nt){M._directMap[F+":"+B]=H,F=F.replace(/\s+/g," ");var rt=F.split(" "),et;if(rt.length>1){Y(F,rt,H,B);return}et=v(F,B),M._callbacks[et.key]=M._callbacks[et.key]||[],A(et.key,et.modifiers,{type:et.action},K,F,nt),M._callbacks[et.key][K?"unshift":"push"]({callback:H,modifiers:et.modifiers,action:et.action,seq:K,level:nt,combo:F})}M._bindMultiple=function(F,H,B){for(var K=0;K<F.length;++K)ot(F[K],H,B)},h(C,"keypress",L),h(C,"keydown",L),h(C,"keyup",L)}E.prototype.bind=function(C,M,T){var k=this;return C=C instanceof Array?C:[C],k._bindMultiple.call(k,C,M,T),k},E.prototype.unbind=function(C,M){var T=this;return T.bind.call(T,C,function(){},M)},E.prototype.trigger=function(C,M){var T=this;return T._directMap[C+":"+M]&&T._directMap[C+":"+M]({},C),T},E.prototype.reset=function(){var C=this;return C._callbacks={},C._directMap={},C},E.prototype.stopCallback=function(C,M){var T=this;if((" "+M.className+" ").indexOf(" mousetrap ")>-1||S(M,T.target))return!1;if("composedPath"in C&&typeof C.composedPath=="function"){var k=C.composedPath()[0];k!==C.target&&(M=k)}return M.tagName=="INPUT"||M.tagName=="SELECT"||M.tagName=="TEXTAREA"||M.isContentEditable},E.prototype.handleKey=function(){var C=this;return C._handleKey.apply(C,arguments)},E.addKeycodes=function(C){for(var M in C)C.hasOwnProperty(M)&&(r[M]=C[M]);l=null},E.init=function(){var C=E(e);for(var M in C)M.charAt(0)!=="_"&&(E[M]=function(T){return function(){return C[T].apply(C,arguments)}}(M))},E.init(),t.Mousetrap=E,n.exports&&(n.exports=E)})(typeof window<"u"?window:null,typeof window<"u"?document:null)})(zb);var aj=zb.exports;const lj=k_(aj);var cj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class ri extends ye{get graph(){return this.options.graph}constructor(t){super(),this.options=t;const e=this.graph.getPlugin("scroller");this.container=e?e.container:this.graph.container,t.global?this.target=document:(this.target=this.container,this.disabled||this.target.setAttribute("tabindex","-1"),this.graph.on("cell:mouseup",this.focus,this),this.graph.on("blank:mouseup",this.focus,this)),this.mousetrap=ri.createMousetrap(this)}get disabled(){return this.options.enabled!==!0}enable(){this.disabled&&(this.options.enabled=!0,this.target instanceof HTMLElement&&this.target.setAttribute("tabindex","-1"))}disable(){this.disabled||(this.options.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}on(t,e,s){this.mousetrap.bind(this.getKeys(t),e,s)}off(t,e){this.mousetrap.unbind(this.getKeys(t),e)}clear(){this.mousetrap.reset()}trigger(t,e){this.mousetrap.trigger(t,e)}focus(t){if(this.isInputEvent(t.e))return;this.target.focus({preventScroll:!0})}getKeys(t){return(Array.isArray(t)?t:[t]).map(e=>this.formatkey(e))}formatkey(t){const e=t.toLocaleLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command").replace("arrowup","up").replace("arrowright","right").replace("arrowdown","down").replace("arrowleft","left"),s=this.options.format;return s?X(s,this.graph,e):e}isGraphEvent(t){const e=t.target,s=t.currentTarget;return e?e===this.target||s===this.target||e===document.body?!0:Iu(this.container,e):!1}isInputEvent(t){var e;const s=t.target,r=(e=s==null?void 0:s.tagName)===null||e===void 0?void 0:e.toLowerCase();let i=["input","textarea"].includes(r);return ut(s,"contenteditable")==="true"&&(i=!0),i}isEnabledForEvent(t){const e=!this.disabled&&this.isGraphEvent(t),s=this.isInputEvent(t);if(e){if(s&&(t.key==="Backspace"||t.key==="Delete"))return!1;if(this.options.guard)return X(this.options.guard,this.graph,t)}return e}dispose(){this.mousetrap.reset()}}cj([ye.dispose()],ri.prototype,"dispose",null),function(n){function t(e){const s=new lj(e.target),r=s.stopCallback;return s.stopCallback=(i,o,a)=>e.isEnabledForEvent(i)?r?r.call(s,i,o,a):!1:!0,s}n.createMousetrap=t}(ri||(ri={})),I.prototype.isKeyboardEnabled=function(){const n=this.getPlugin("keyboard");return n?n.isEnabled():!1},I.prototype.enableKeyboard=function(){const n=this.getPlugin("keyboard");return n&&n.enable(),this},I.prototype.disableKeyboard=function(){const n=this.getPlugin("keyboard");return n&&n.disable(),this},I.prototype.toggleKeyboard=function(n){const t=this.getPlugin("keyboard");return t&&t.toggleEnabled(n),this},I.prototype.bindKey=function(n,t,e){const s=this.getPlugin("keyboard");return s&&s.bindKey(n,t,e),this},I.prototype.unbindKey=function(n,t){const e=this.getPlugin("keyboard");return e&&e.unbindKey(n,t),this},I.prototype.clearKeys=function(){const n=this.getPlugin("keyboard");return n&&n.clear(),this},I.prototype.triggerKey=function(n,t){const e=this.getPlugin("keyboard");return e&&e.trigger(n,t),this};var uj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Fb extends ye{constructor(t={}){super(),this.name="keyboard",this.options=Object.assign({enabled:!0},t)}init(t){this.keyboardImpl=new ri(Object.assign(Object.assign({},this.options),{graph:t}))}isEnabled(){return!this.keyboardImpl.disabled}enable(){this.keyboardImpl.enable()}disable(){this.keyboardImpl.disable()}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}bindKey(t,e,s){return this.keyboardImpl.on(t,e,s),this}trigger(t,e){return this.keyboardImpl.trigger(t,e),this}clear(){return this.keyboardImpl.clear(),this}unbindKey(t,e){return this.keyboardImpl.off(t,e),this}dispose(){this.keyboardImpl.dispose()}}uj([ye.dispose()],Fb.prototype,"dispose",null);var hj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Hb extends pt{get graph(){return this.options.graph}get boxClassName(){return this.prefixClassName(Oe.classNames.box)}get $boxes(){return dR(this.container,this.boxClassName)}get handleOptions(){return this.options}constructor(t){super(),this.options=t,this.options.model&&(this.options.collection=this.options.model.collection),this.options.collection?this.collection=this.options.collection:(this.collection=new pl([],{comparator:Oe.depthComparator}),this.options.collection=this.collection),this.boxCount=0,this.createContainer(),this.startListening()}startListening(){const t=this.graph,e=this.collection;this.delegateEvents({[`mousedown .${this.boxClassName}`]:"onSelectionBoxMouseDown",[`touchstart .${this.boxClassName}`]:"onSelectionBoxMouseDown"},!0),t.on("scale",this.onGraphTransformed,this),t.on("translate",this.onGraphTransformed,this),t.model.on("updated",this.onModelUpdated,this),e.on("added",this.onCellAdded,this),e.on("removed",this.onCellRemoved,this),e.on("reseted",this.onReseted,this),e.on("updated",this.onCollectionUpdated,this),e.on("node:change:position",this.onNodePositionChanged,this),e.on("cell:changed",this.onCellChanged,this)}stopListening(){const t=this.graph,e=this.collection;this.undelegateEvents(),t.off("scale",this.onGraphTransformed,this),t.off("translate",this.onGraphTransformed,this),t.model.off("updated",this.onModelUpdated,this),e.off("added",this.onCellAdded,this),e.off("removed",this.onCellRemoved,this),e.off("reseted",this.onReseted,this),e.off("updated",this.onCollectionUpdated,this),e.off("node:change:position",this.onNodePositionChanged,this),e.off("cell:changed",this.onCellChanged,this)}onRemove(){this.stopListening()}onGraphTransformed(){this.updateSelectionBoxes()}onCellChanged(){this.updateSelectionBoxes()}onNodePositionChanged({node:t,options:e}){const{showNodeSelectionBox:s,pointerEvents:r}=this.options,{ui:i,selection:o,translateBy:a,snapped:l}=e,u=(s!==!0||r&&this.getPointerEventsValue(r)==="none")&&!this.translating&&!o,h=i&&a&&t.id===a;if(u&&(h||l)){this.translating=!0;const f=t.position(),d=t.previous("position"),g=f.x-d.x,p=f.y-d.y;(g!==0||p!==0)&&this.translateSelectedNodes(g,p,t,e),this.translating=!1}}onModelUpdated({removed:t}){t&&t.length&&this.unselect(t)}isEmpty(){return this.length<=0}isSelected(t){return this.collection.has(t)}get length(){return this.collection.length}get cells(){return this.collection.toArray()}select(t,e={}){e.dryrun=!0;const s=this.filter(Array.isArray(t)?t:[t]);return this.collection.add(s,e),this}unselect(t,e={}){return e.dryrun=!0,this.collection.remove(Array.isArray(t)?t:[t],e),this}reset(t,e={}){if(t){if(e.batch){const u=this.filter(Array.isArray(t)?t:[t]);return this.collection.reset(u,Object.assign(Object.assign({},e),{ui:!0})),this}const s=this.cells,r=this.filter(Array.isArray(t)?t:[t]),i={},o={};s.forEach(u=>i[u.id]=u),r.forEach(u=>o[u.id]=u);const a=[],l=[];return r.forEach(u=>{i[u.id]||a.push(u)}),s.forEach(u=>{o[u.id]||l.push(u)}),l.length&&this.unselect(l,Object.assign(Object.assign({},e),{ui:!0})),a.length&&this.select(a,Object.assign(Object.assign({},e),{ui:!0})),l.length===0&&a.length===0&&this.updateContainer(),this}return this.clean(e)}clean(t={}){return this.length&&(t.batch===!1?this.unselect(this.cells,t):this.collection.reset([],Object.assign(Object.assign({},t),{ui:!0}))),this}setFilter(t){this.options.filter=t}setContent(t){this.options.content=t}startSelecting(t){t=this.normalizeEvent(t),this.clean();let e,s;const r=this.graph.container;if(t.offsetX!=null&&t.offsetY!=null&&r.contains(t.target))e=t.offsetX,s=t.offsetY;else{const i=Gu(r),o=r.scrollLeft,a=r.scrollTop;e=t.clientX-i.left+window.pageXOffset+o,s=t.clientY-i.top+window.pageYOffset+a}qt(this.container,{top:s,left:e,width:1,height:1}),this.setEventData(t,{action:"selecting",clientX:t.clientX,clientY:t.clientY,offsetX:e,offsetY:s,scrollerX:0,scrollerY:0,moving:!1}),this.delegateDocumentEvents(Oe.documentEvents,t.data)}filter(t){const e=this.options.filter;return t.filter(s=>Array.isArray(e)?e.some(r=>typeof r=="string"?s.shape===r:s.id===r.id):typeof e=="function"?X(e,this.graph,s):!0)}stopSelecting(t){const e=this.graph,s=this.getEventData(t);switch(s.action){case"selecting":{let i=WR(this.container),o=qR(this.container);const a=Gu(this.container),l=e.pageToLocal(a.left,a.top),u=e.transform.getScale();i/=u.sx,o/=u.sy;const h=new z(l.x,l.y,i,o),f=this.getCellViewsInArea(h).map(d=>d.cell);this.reset(f,{batch:!0}),this.hideRubberband();break}case"translating":{const i=e.snapToGrid(t.clientX,t.clientY);if(!this.options.following){const o=s;this.updateSelectedNodesPosition({dx:o.clientX-o.originX,dy:o.clientY-o.originY})}this.graph.model.stopBatch("move-selection"),this.notifyBoxEvent("box:mouseup",t,i.x,i.y);break}default:{this.clean();break}}}onMouseUp(t){this.getEventData(t).action&&(this.stopSelecting(t),this.undelegateDocumentEvents())}onSelectionBoxMouseDown(t){this.options.following||t.stopPropagation();const e=this.normalizeEvent(t);this.options.movable&&this.startTranslating(e);const s=this.getCellViewFromElem(e.target);this.setEventData(e,{activeView:s});const r=this.graph.snapToGrid(e.clientX,e.clientY);this.notifyBoxEvent("box:mousedown",e,r.x,r.y),this.delegateDocumentEvents(Oe.documentEvents,e.data)}startTranslating(t){this.graph.model.startBatch("move-selection");const e=this.graph.snapToGrid(t.clientX,t.clientY);this.setEventData(t,{action:"translating",clientX:e.x,clientY:e.y,originX:e.x,originY:e.y})}getRestrictArea(){const t=this.graph.options.translating.restrict,e=typeof t=="function"?X(t,this.graph,null):t;return typeof e=="number"?this.graph.transform.getGraphArea().inflate(e):e===!0?this.graph.transform.getGraphArea():e||null}getSelectionOffset(t,e){let s=t.x-e.clientX,r=t.y-e.clientY;const i=this.getRestrictArea();if(i){const o=this.collection.toArray(),a=ht.getCellsBBox(o,{deep:!0})||z.create(),l=i.x-a.x,u=i.y-a.y,h=i.x+i.width-(a.x+a.width),f=i.y+i.height-(a.y+a.height);if(s<l&&(s=l),r<u&&(r=u),h<s&&(s=h),f<r&&(r=f),!this.options.following){const d=t.x-e.originX,g=t.y-e.originY;s=d<=l||d>=h?0:s,r=g<=u||g>=f?0:r}}return{dx:s,dy:r}}updateElementPosition(t,e,s){const r=qt(t,"left"),i=qt(t,"top"),o=r?parseFloat(r):0,a=i?parseFloat(i):0;qt(t,"left",o+e),qt(t,"top",a+s)}updateSelectedNodesPosition(t){const{dx:e,dy:s}=t;if(e||s)if(this.translateSelectedNodes(e,s),this.boxesUpdated)this.collection.length>1&&this.updateSelectionBoxes();else{const r=this.graph.transform.getScale();for(let i=0,o=this.$boxes,a=o.length;i<a;i+=1)this.updateElementPosition(o[i],e*r.sx,s*r.sy);this.updateElementPosition(this.selectionContainer,e*r.sx,s*r.sy)}}autoScrollGraph(t,e){const s=this.graph.getPlugin("scroller");return s?s.autoScroll(t,e):{scrollerX:0,scrollerY:0}}adjustSelection(t){const e=this.normalizeEvent(t),s=this.getEventData(e);switch(s.action){case"selecting":{const i=s;i.moving!==!0&&(ps(this.container,this.graph.container),this.showRubberband(),i.moving=!0);const{scrollerX:o,scrollerY:a}=this.autoScrollGraph(e.clientX,e.clientY);i.scrollerX+=o,i.scrollerY+=a;const l=e.clientX-i.clientX+i.scrollerX,u=e.clientY-i.clientY+i.scrollerY,h=parseInt(qt(this.container,"left")||"0",10),f=parseInt(qt(this.container,"top")||"0",10);qt(this.container,{left:l<0?i.offsetX+l:h,top:u<0?i.offsetY+u:f,width:Math.abs(l),height:Math.abs(u)});break}case"translating":{const i=this.graph.snapToGrid(e.clientX,e.clientY),o=s,a=this.getSelectionOffset(i,o);this.options.following?this.updateSelectedNodesPosition(a):this.updateContainerPosition(a),a.dx&&(o.clientX=i.x),a.dy&&(o.clientY=i.y),this.notifyBoxEvent("box:mousemove",t,i.x,i.y);break}}this.boxesUpdated=!1}translateSelectedNodes(t,e,s,r){const i={},o=[];if(s&&(i[s.id]=!0),this.collection.toArray().forEach(a=>{a.getDescendants({deep:!0}).forEach(l=>{i[l.id]=!0})}),r&&r.translateBy){const a=this.graph.getCellById(r.translateBy);a&&(i[a.id]=!0,a.getDescendants({deep:!0}).forEach(l=>{i[l.id]=!0}),o.push(a))}this.collection.toArray().forEach(a=>{if(!i[a.id]){const l=Object.assign(Object.assign({},r),{selection:this.cid,exclude:o});a.translate(t,e,l),this.graph.model.getConnectedEdges(a).forEach(u=>{i[u.id]||(u.translate(t,e,l),i[u.id]=!0)})}})}getCellViewsInArea(t){const e=this.graph,s={strict:this.options.strict};let r=[];return this.options.rubberNode&&(r=r.concat(e.model.getNodesInArea(t,s).map(i=>e.renderer.findViewByCell(i)).filter(i=>i!=null))),this.options.rubberEdge&&(r=r.concat(e.model.getEdgesInArea(t,s).map(i=>e.renderer.findViewByCell(i)).filter(i=>i!=null))),r}notifyBoxEvent(t,e,s,r){const o=this.getEventData(e).activeView;this.trigger(t,{e,view:o,x:s,y:r,cell:o.cell})}getSelectedClassName(t){return this.prefixClassName(`${t.isNode()?"node":"edge"}-selected`)}addCellSelectedClassName(t){const e=this.graph.renderer.findViewByCell(t);e&&e.addClass(this.getSelectedClassName(t))}removeCellUnSelectedClassName(t){const e=this.graph.renderer.findViewByCell(t);e&&e.removeClass(this.getSelectedClassName(t))}destroySelectionBox(t){this.removeCellUnSelectedClassName(t),this.canShowSelectionBox(t)&&(ze(this.container.querySelector(`[data-cell-id="${t.id}"]`)),this.$boxes.length===0&&this.hide(),this.boxCount=Math.max(0,this.boxCount-1))}destroyAllSelectionBoxes(t){t.forEach(e=>this.removeCellUnSelectedClassName(e)),this.hide(),ze(this.$boxes),this.boxCount=0}hide(){Dt(this.container,this.prefixClassName(Oe.classNames.rubberband)),Dt(this.container,this.prefixClassName(Oe.classNames.selected))}showRubberband(){J(this.container,this.prefixClassName(Oe.classNames.rubberband))}hideRubberband(){Dt(this.container,this.prefixClassName(Oe.classNames.rubberband))}showSelected(){Bu(this.container,"style"),J(this.container,this.prefixClassName(Oe.classNames.selected))}createContainer(){this.container=document.createElement("div"),J(this.container,this.prefixClassName(Oe.classNames.root)),this.options.className&&J(this.container,this.options.className),this.selectionContainer=document.createElement("div"),J(this.selectionContainer,this.prefixClassName(Oe.classNames.inner)),this.selectionContent=document.createElement("div"),J(this.selectionContent,this.prefixClassName(Oe.classNames.content)),Ne(this.selectionContainer,this.selectionContent),ut(this.selectionContainer,"data-selection-length",this.collection.length),iy(this.container,this.selectionContainer)}updateContainerPosition(t){(t.dx||t.dy)&&this.updateElementPosition(this.selectionContainer,t.dx,t.dy)}updateContainer(){const t={x:1/0,y:1/0},e={x:0,y:0};this.collection.toArray().filter(i=>this.canShowSelectionBox(i)).forEach(i=>{const o=this.graph.renderer.findViewByCell(i);if(o){const a=o.getBBox({useCellGeometry:!0});t.x=Math.min(t.x,a.x),t.y=Math.min(t.y,a.y),e.x=Math.max(e.x,a.x+a.width),e.y=Math.max(e.y,a.y+a.height)}}),qt(this.selectionContainer,{position:"absolute",pointerEvents:"none",left:t.x,top:t.y,width:e.x-t.x,height:e.y-t.y}),ut(this.selectionContainer,"data-selection-length",this.collection.length);const r=this.options.content;if(r)if(typeof r=="function"){const i=X(r,this.graph,this,this.selectionContent);i&&(this.selectionContent.innerHTML=i)}else this.selectionContent.innerHTML=r;this.collection.length>0&&!this.container.parentNode?ps(this.container,this.graph.container):this.collection.length<=0&&this.container.parentNode&&this.container.parentNode.removeChild(this.container)}canShowSelectionBox(t){return t.isNode()&&this.options.showNodeSelectionBox===!0||t.isEdge()&&this.options.showEdgeSelectionBox===!0}getPointerEventsValue(t){return typeof t=="string"?t:t(this.cells)}createSelectionBox(t){if(this.addCellSelectedClassName(t),this.canShowSelectionBox(t)){const e=this.graph.renderer.findViewByCell(t);if(e){const s=e.getBBox({useCellGeometry:!0}),r=this.boxClassName,i=document.createElement("div"),o=this.options.pointerEvents;J(i,r),J(i,`${r}-${t.isNode()?"node":"edge"}`),ut(i,"data-cell-id",t.id),qt(i,{position:"absolute",left:s.x,top:s.y,width:s.width,height:s.height,pointerEvents:o?this.getPointerEventsValue(o):"auto"}),ps(i,this.container),this.showSelected(),this.boxCount+=1}}}updateSelectionBoxes(){this.collection.length>0&&(this.boxesUpdated=!0,this.confirmUpdate())}confirmUpdate(){if(this.boxCount){this.hide();for(let t=0,e=this.$boxes,s=e.length;t<s;t+=1){const r=e[t],i=ut(r,"data-cell-id");ze(r),this.boxCount-=1;const o=this.collection.get(i);o&&this.createSelectionBox(o)}this.updateContainer()}return 0}getCellViewFromElem(t){const e=t.getAttribute("data-cell-id");if(e){const s=this.collection.get(e);if(s)return this.graph.renderer.findViewByCell(s)}return null}onCellRemoved({cell:t}){this.destroySelectionBox(t),this.updateContainer()}onReseted({previous:t,current:e}){this.destroyAllSelectionBoxes(t),e.forEach(s=>{this.listenCellRemoveEvent(s),this.createSelectionBox(s)}),this.updateContainer()}onCellAdded({cell:t}){this.listenCellRemoveEvent(t),this.createSelectionBox(t),this.updateContainer()}listenCellRemoveEvent(t){t.off("removed",this.onCellRemoved,this),t.on("removed",this.onCellRemoved,this)}onCollectionUpdated({added:t,removed:e,options:s}){t.forEach(i=>{this.trigger("cell:selected",{cell:i,options:s}),i.isNode()?this.trigger("node:selected",{cell:i,options:s,node:i}):i.isEdge()&&this.trigger("edge:selected",{cell:i,options:s,edge:i})}),e.forEach(i=>{this.trigger("cell:unselected",{cell:i,options:s}),i.isNode()?this.trigger("node:unselected",{cell:i,options:s,node:i}):i.isEdge()&&this.trigger("edge:unselected",{cell:i,options:s,edge:i})});const r={added:t,removed:e,options:s,selected:this.cells.filter(i=>!!this.graph.getCellById(i.id))};this.trigger("selection:changed",r)}dispose(){this.clean(),this.remove(),this.off()}}hj([pt.dispose()],Hb.prototype,"dispose",null);var Oe;(function(n){const t="widget-selection";n.classNames={root:t,inner:`${t}-inner`,box:`${t}-box`,content:`${t}-content`,rubberband:`${t}-rubberband`,selected:`${t}-selected`},n.documentEvents={mousemove:"adjustSelection",touchmove:"adjustSelection",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"};function e(s){return s.getAncestors().length}n.depthComparator=e})(Oe||(Oe={}));const dj=`.x6-widget-selection {
673
+ `;I.prototype.isSnaplineEnabled=function(){const n=this.getPlugin("snapline");return n?n.isEnabled():!1},I.prototype.enableSnapline=function(){const n=this.getPlugin("snapline");return n&&n.enable(),this},I.prototype.disableSnapline=function(){const n=this.getPlugin("snapline");return n&&n.disable(),this},I.prototype.toggleSnapline=function(){const n=this.getPlugin("snapline");return n&&n.toggleEnabled(),this},I.prototype.hideSnapline=function(){const n=this.getPlugin("snapline");return n&&n.hide(),this},I.prototype.setSnaplineFilter=function(n){const t=this.getPlugin("snapline");return t&&t.setFilter(n),this},I.prototype.isSnaplineOnResizingEnabled=function(){const n=this.getPlugin("snapline");return n?n.isOnResizingEnabled():!1},I.prototype.enableSnaplineOnResizing=function(){const n=this.getPlugin("snapline");return n&&n.enableOnResizing(),this},I.prototype.disableSnaplineOnResizing=function(){const n=this.getPlugin("snapline");return n&&n.disableOnResizing(),this},I.prototype.toggleSnaplineOnResizing=function(n){const t=this.getPlugin("snapline");return t&&t.toggleOnResizing(n),this},I.prototype.isSharpSnapline=function(){const n=this.getPlugin("snapline");return n?n.isSharp():!1},I.prototype.enableSharpSnapline=function(){const n=this.getPlugin("snapline");return n&&n.enableSharp(),this},I.prototype.disableSharpSnapline=function(){const n=this.getPlugin("snapline");return n&&n.disableSharp(),this},I.prototype.toggleSharpSnapline=function(n){const t=this.getPlugin("snapline");return t&&t.toggleSharp(n),this},I.prototype.getSnaplineTolerance=function(){const n=this.getPlugin("snapline");if(n)return n.getTolerance()},I.prototype.setSnaplineTolerance=function(n){const t=this.getPlugin("snapline");return t&&t.setTolerance(n),this};var sj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class jb extends ye{constructor(t={}){super(),this.name="snapline",this.options=Object.assign({enabled:!0,tolerance:10},t),jr(this.name,nj)}init(t){this.snaplineImpl=new Vb(Object.assign(Object.assign({},this.options),{graph:t}))}isEnabled(){return!this.snaplineImpl.disabled}enable(){this.snaplineImpl.enable()}disable(){this.snaplineImpl.disable()}toggleEnabled(t){if(t!=null)t!==this.isEnabled()&&(t?this.enable():this.disable());else return this.isEnabled()?this.disable():this.enable(),this}hide(){return this.snaplineImpl.hide(),this}setFilter(t){return this.snaplineImpl.setFilter(t),this}isOnResizingEnabled(){return this.snaplineImpl.options.resizing===!0}enableOnResizing(){return this.snaplineImpl.options.resizing=!0,this}disableOnResizing(){return this.snaplineImpl.options.resizing=!1,this}toggleOnResizing(t){return t!=null?t!==this.isOnResizingEnabled()&&(t?this.enableOnResizing():this.disableOnResizing()):this.isOnResizingEnabled()?this.disableOnResizing():this.enableOnResizing(),this}isSharp(){return this.snaplineImpl.options.sharp===!0}enableSharp(){return this.snaplineImpl.options.sharp=!0,this}disableSharp(){return this.snaplineImpl.options.sharp=!1,this}toggleSharp(t){return t!=null?t!==this.isSharp()&&(t?this.enableSharp():this.disableSharp()):this.isSharp()?this.disableSharp():this.enableSharp(),this}getTolerance(){return this.snaplineImpl.options.tolerance}setTolerance(t){return this.snaplineImpl.options.tolerance=t,this}captureCursorOffset(t){this.snaplineImpl.captureCursorOffset(t)}snapOnMoving(t){this.snaplineImpl.snapOnMoving(t)}dispose(){this.snaplineImpl.dispose(),$r(this.name)}}sj([ye.dispose()],jb.prototype,"dispose",null);class rj{constructor(){this.cells=[]}copy(t,e,s={}){this.options=Object.assign({},s);const i=(Zt.isModel(e)?e:e.model).cloneSubGraph(t,s);this.cells=Pc(Object.keys(i).map(o=>i[o]),o=>o.isEdge()?2:1),this.serialize(s)}cut(t,e,s={}){this.copy(t,e,s),(I.isGraph(e)?e.model:e).batchUpdate("cut",()=>{t.forEach(i=>i.remove())})}paste(t,e={}){const s=Object.assign(Object.assign({},this.options),e),{offset:r,edgeProps:i,nodeProps:o}=s;let a=20,l=20;r&&(a=typeof r=="number"?r:r.dx,l=typeof r=="number"?r:r.dy),this.deserialize(s);const u=this.cells;u.forEach(f=>{f.model=null,f.removeProp("zIndex"),(a||l)&&f.translate(a,l),o&&f.isNode()&&f.prop(o),i&&f.isEdge()&&f.prop(i)});const h=I.isGraph(t)?t.model:t;return h.batchUpdate("paste",()=>{h.addCells(this.cells)}),this.copy(u,t,e),u}serialize(t){t.useLocalStorage!==!1&&mo.save(this.cells)}deserialize(t){if(t.useLocalStorage){const e=mo.fetch();e&&(this.cells=e)}}isEmpty(t={}){return t.useLocalStorage&&this.deserialize(t),this.cells.length<=0}clean(){this.options={},this.cells=[],mo.clean()}}var mo;(function(n){const t=`${Ue.prefixCls}.clipboard.cells`;function e(i){if(window.localStorage){const o=i.map(a=>a.toJSON());localStorage.setItem(t,JSON.stringify(o))}}n.save=e;function s(){if(window.localStorage){const i=localStorage.getItem(t),o=i?JSON.parse(i):[];if(o)return Zt.fromJSON(o)}}n.fetch=s;function r(){window.localStorage&&localStorage.removeItem(t)}n.clean=r})(mo||(mo={})),I.prototype.isClipboardEnabled=function(){const n=this.getPlugin("clipboard");return n?n.isEnabled():!1},I.prototype.enableClipboard=function(){const n=this.getPlugin("clipboard");return n&&n.enable(),this},I.prototype.disableClipboard=function(){const n=this.getPlugin("clipboard");return n&&n.disable(),this},I.prototype.toggleClipboard=function(n){const t=this.getPlugin("clipboard");return t&&t.toggleEnabled(n),this},I.prototype.isClipboardEmpty=function(n){const t=this.getPlugin("clipboard");return t?t.isEmpty(n):!0},I.prototype.getCellsInClipboard=function(){const n=this.getPlugin("clipboard");return n?n.getCellsInClipboard():[]},I.prototype.cleanClipboard=function(){const n=this.getPlugin("clipboard");return n&&n.clean(),this},I.prototype.copy=function(n,t){const e=this.getPlugin("clipboard");return e&&e.copy(n,t),this},I.prototype.cut=function(n,t){const e=this.getPlugin("clipboard");return e&&e.cut(n,t),this},I.prototype.paste=function(n,t){const e=this.getPlugin("clipboard");return e?e.paste(n,t):[]};var ij=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i},oj=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e};class $b extends Nt{get disabled(){return this.options.enabled!==!0}get cells(){return this.clipboardImpl.cells}constructor(t={}){super(),this.name="clipboard",this.options=Object.assign({enabled:!0},t)}init(t){this.graph=t,this.clipboardImpl=new rj,this.clipboardImpl.deserialize(this.options)}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}isEmpty(t={}){return this.clipboardImpl.isEmpty(t)}getCellsInClipboard(){return this.cells}clean(t){return(!this.disabled||t)&&(this.clipboardImpl.clean(),this.notify("clipboard:changed",{cells:[]})),this}copy(t,e={}){return this.disabled||(this.clipboardImpl.copy(t,this.graph,Object.assign(Object.assign({},this.commonOptions),e)),this.notify("clipboard:changed",{cells:t})),this}cut(t,e={}){return this.disabled||(this.clipboardImpl.cut(t,this.graph,Object.assign(Object.assign({},this.commonOptions),e)),this.notify("clipboard:changed",{cells:t})),this}paste(t={},e=this.graph){return this.disabled?[]:this.clipboardImpl.paste(e,Object.assign(Object.assign({},this.commonOptions),t))}get commonOptions(){const t=this.options;return oj(t,["enabled"])}notify(t,e){this.trigger(t,e),this.graph.trigger(t,e)}dispose(){this.clean(!0),this.off()}}ij([Nt.dispose()],$b.prototype,"dispose",null);var zb={exports:{}};(function(n){(function(t,e,s){if(!t)return;for(var r={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"},i={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},o={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},a={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)r[111+u]="f"+u;for(u=0;u<=9;++u)r[u+96]=u.toString();function h(C,M,T){if(C.addEventListener){C.addEventListener(M,T,!1);return}C.attachEvent("on"+M,T)}function f(C){if(C.type=="keypress"){var M=String.fromCharCode(C.which);return C.shiftKey||(M=M.toLowerCase()),M}return r[C.which]?r[C.which]:i[C.which]?i[C.which]:String.fromCharCode(C.which).toLowerCase()}function d(C,M){return C.sort().join(",")===M.sort().join(",")}function g(C){var M=[];return C.shiftKey&&M.push("shift"),C.altKey&&M.push("alt"),C.ctrlKey&&M.push("ctrl"),C.metaKey&&M.push("meta"),M}function p(C){if(C.preventDefault){C.preventDefault();return}C.returnValue=!1}function m(C){if(C.stopPropagation){C.stopPropagation();return}C.cancelBubble=!0}function y(C){return C=="shift"||C=="ctrl"||C=="alt"||C=="meta"}function b(){if(!l){l={};for(var C in r)C>95&&C<112||r.hasOwnProperty(C)&&(l[r[C]]=C)}return l}function w(C,M,T){return T||(T=b()[C]?"keydown":"keypress"),T=="keypress"&&M.length&&(T="keydown"),T}function x(C){return C==="+"?["+"]:(C=C.replace(/\+{2}/g,"+plus"),C.split("+"))}function v(C,M){var T,k,_,D=[];for(T=x(C),_=0;_<T.length;++_)k=T[_],a[k]&&(k=a[k]),M&&M!="keypress"&&o[k]&&(k=o[k],D.push("shift")),y(k)&&D.push(k);return M=w(k,D,M),{key:k,modifiers:D,action:M}}function S(C,M){return C===null||C===e?!1:C===M?!0:S(C.parentNode,M)}function E(C){var M=this;if(C=C||e,!(M instanceof E))return new E(C);M.target=C,M._callbacks={},M._directMap={};var T={},k,_=!1,D=!1,N=!1;function j(F){F=F||{};var H=!1,B;for(B in T){if(F[B]){H=!0;continue}T[B]=0}H||(N=!1)}function A(F,H,B,K,nt,rt){var et,ft,ge=[],St=B.type;if(!M._callbacks[F])return[];for(St=="keyup"&&y(F)&&(H=[F]),et=0;et<M._callbacks[F].length;++et)if(ft=M._callbacks[F][et],!(!K&&ft.seq&&T[ft.seq]!=ft.level)&&St==ft.action&&(St=="keypress"&&!B.metaKey&&!B.ctrlKey||d(H,ft.modifiers))){var xt=!K&&ft.combo==nt,An=K&&ft.seq==K&&ft.level==rt;(xt||An)&&M._callbacks[F].splice(et,1),ge.push(ft)}return ge}function P(F,H,B,K){M.stopCallback(H,H.target||H.srcElement,B,K)||F(H,B)===!1&&(p(H),m(H))}M._handleKey=function(F,H,B){var K=A(F,H,B),nt,rt={},et=0,ft=!1;for(nt=0;nt<K.length;++nt)K[nt].seq&&(et=Math.max(et,K[nt].level));for(nt=0;nt<K.length;++nt){if(K[nt].seq){if(K[nt].level!=et)continue;ft=!0,rt[K[nt].seq]=1,P(K[nt].callback,B,K[nt].combo,K[nt].seq);continue}ft||P(K[nt].callback,B,K[nt].combo)}var ge=B.type=="keypress"&&D;B.type==N&&!y(F)&&!ge&&j(rt),D=ft&&B.type=="keydown"};function L(F){typeof F.which!="number"&&(F.which=F.keyCode);var H=f(F);if(H){if(F.type=="keyup"&&_===H){_=!1;return}M.handleKey(H,g(F),F)}}function V(){clearTimeout(k),k=setTimeout(j,1e3)}function Y(F,H,B,K){T[F]=0;function nt(St){return function(){N=St,++T[F],V()}}function rt(St){P(B,St,F),K!=="keyup"&&(_=f(St)),setTimeout(j,10)}for(var et=0;et<H.length;++et){var ft=et+1===H.length,ge=ft?rt:nt(K||v(H[et+1]).action);ot(H[et],ge,K,F,et)}}function ot(F,H,B,K,nt){M._directMap[F+":"+B]=H,F=F.replace(/\s+/g," ");var rt=F.split(" "),et;if(rt.length>1){Y(F,rt,H,B);return}et=v(F,B),M._callbacks[et.key]=M._callbacks[et.key]||[],A(et.key,et.modifiers,{type:et.action},K,F,nt),M._callbacks[et.key][K?"unshift":"push"]({callback:H,modifiers:et.modifiers,action:et.action,seq:K,level:nt,combo:F})}M._bindMultiple=function(F,H,B){for(var K=0;K<F.length;++K)ot(F[K],H,B)},h(C,"keypress",L),h(C,"keydown",L),h(C,"keyup",L)}E.prototype.bind=function(C,M,T){var k=this;return C=C instanceof Array?C:[C],k._bindMultiple.call(k,C,M,T),k},E.prototype.unbind=function(C,M){var T=this;return T.bind.call(T,C,function(){},M)},E.prototype.trigger=function(C,M){var T=this;return T._directMap[C+":"+M]&&T._directMap[C+":"+M]({},C),T},E.prototype.reset=function(){var C=this;return C._callbacks={},C._directMap={},C},E.prototype.stopCallback=function(C,M){var T=this;if((" "+M.className+" ").indexOf(" mousetrap ")>-1||S(M,T.target))return!1;if("composedPath"in C&&typeof C.composedPath=="function"){var k=C.composedPath()[0];k!==C.target&&(M=k)}return M.tagName=="INPUT"||M.tagName=="SELECT"||M.tagName=="TEXTAREA"||M.isContentEditable},E.prototype.handleKey=function(){var C=this;return C._handleKey.apply(C,arguments)},E.addKeycodes=function(C){for(var M in C)C.hasOwnProperty(M)&&(r[M]=C[M]);l=null},E.init=function(){var C=E(e);for(var M in C)M.charAt(0)!=="_"&&(E[M]=function(T){return function(){return C[T].apply(C,arguments)}}(M))},E.init(),t.Mousetrap=E,n.exports&&(n.exports=E)})(typeof window<"u"?window:null,typeof window<"u"?document:null)})(zb);var aj=zb.exports;const lj=k_(aj);var cj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class ri extends ye{get graph(){return this.options.graph}constructor(t){super(),this.options=t;const e=this.graph.getPlugin("scroller");this.container=e?e.container:this.graph.container,t.global?this.target=document:(this.target=this.container,this.disabled||this.target.setAttribute("tabindex","-1"),this.graph.on("cell:mouseup",this.focus,this),this.graph.on("blank:mouseup",this.focus,this)),this.mousetrap=ri.createMousetrap(this)}get disabled(){return this.options.enabled!==!0}enable(){this.disabled&&(this.options.enabled=!0,this.target instanceof HTMLElement&&this.target.setAttribute("tabindex","-1"))}disable(){this.disabled||(this.options.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}on(t,e,s){this.mousetrap.bind(this.getKeys(t),e,s)}off(t,e){this.mousetrap.unbind(this.getKeys(t),e)}clear(){this.mousetrap.reset()}trigger(t,e){this.mousetrap.trigger(t,e)}focus(t){if(this.isInputEvent(t.e))return;this.target.focus({preventScroll:!0})}getKeys(t){return(Array.isArray(t)?t:[t]).map(e=>this.formatkey(e))}formatkey(t){const e=t.toLocaleLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command").replace("arrowup","up").replace("arrowright","right").replace("arrowdown","down").replace("arrowleft","left"),s=this.options.format;return s?X(s,this.graph,e):e}isGraphEvent(t){const e=t.target,s=t.currentTarget;return e?e===this.target||s===this.target||e===document.body?!0:Iu(this.container,e):!1}isInputEvent(t){var e;const s=t.target,r=(e=s==null?void 0:s.tagName)===null||e===void 0?void 0:e.toLowerCase();let i=["input","textarea"].includes(r);return ut(s,"contenteditable")==="true"&&(i=!0),i}isEnabledForEvent(t){const e=!this.disabled&&this.isGraphEvent(t),s=this.isInputEvent(t);if(e){if(s&&(t.key==="Backspace"||t.key==="Delete"))return!1;if(this.options.guard)return X(this.options.guard,this.graph,t)}return e}dispose(){this.mousetrap.reset()}}cj([ye.dispose()],ri.prototype,"dispose",null),function(n){function t(e){const s=new lj(e.target),r=s.stopCallback;return s.stopCallback=(i,o,a)=>e.isEnabledForEvent(i)?r?r.call(s,i,o,a):!1:!0,s}n.createMousetrap=t}(ri||(ri={})),I.prototype.isKeyboardEnabled=function(){const n=this.getPlugin("keyboard");return n?n.isEnabled():!1},I.prototype.enableKeyboard=function(){const n=this.getPlugin("keyboard");return n&&n.enable(),this},I.prototype.disableKeyboard=function(){const n=this.getPlugin("keyboard");return n&&n.disable(),this},I.prototype.toggleKeyboard=function(n){const t=this.getPlugin("keyboard");return t&&t.toggleEnabled(n),this},I.prototype.bindKey=function(n,t,e){const s=this.getPlugin("keyboard");return s&&s.bindKey(n,t,e),this},I.prototype.unbindKey=function(n,t){const e=this.getPlugin("keyboard");return e&&e.unbindKey(n,t),this},I.prototype.clearKeys=function(){const n=this.getPlugin("keyboard");return n&&n.clear(),this},I.prototype.triggerKey=function(n,t){const e=this.getPlugin("keyboard");return e&&e.trigger(n,t),this};var uj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Fb extends ye{constructor(t={}){super(),this.name="keyboard",this.options=Object.assign({enabled:!0},t)}init(t){this.keyboardImpl=new ri(Object.assign(Object.assign({},this.options),{graph:t}))}isEnabled(){return!this.keyboardImpl.disabled}enable(){this.keyboardImpl.enable()}disable(){this.keyboardImpl.disable()}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}bindKey(t,e,s){return this.keyboardImpl.on(t,e,s),this}trigger(t,e){return this.keyboardImpl.trigger(t,e),this}clear(){return this.keyboardImpl.clear(),this}unbindKey(t,e){return this.keyboardImpl.off(t,e),this}dispose(){this.keyboardImpl.dispose()}}uj([ye.dispose()],Fb.prototype,"dispose",null);var hj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Hb extends pt{get graph(){return this.options.graph}get boxClassName(){return this.prefixClassName(Oe.classNames.box)}get $boxes(){return dR(this.container,this.boxClassName)}get handleOptions(){return this.options}constructor(t){super(),this.options=t,this.options.model&&(this.options.collection=this.options.model.collection),this.options.collection?this.collection=this.options.collection:(this.collection=new pl([],{comparator:Oe.depthComparator}),this.options.collection=this.collection),this.boxCount=0,this.createContainer(),this.startListening()}startListening(){const t=this.graph,e=this.collection;this.delegateEvents({[`mousedown .${this.boxClassName}`]:"onSelectionBoxMouseDown",[`touchstart .${this.boxClassName}`]:"onSelectionBoxMouseDown"},!0),t.on("scale",this.onGraphTransformed,this),t.on("translate",this.onGraphTransformed,this),t.model.on("updated",this.onModelUpdated,this),e.on("added",this.onCellAdded,this),e.on("removed",this.onCellRemoved,this),e.on("reseted",this.onReseted,this),e.on("updated",this.onCollectionUpdated,this),e.on("node:change:position",this.onNodePositionChanged,this),e.on("cell:changed",this.onCellChanged,this)}stopListening(){const t=this.graph,e=this.collection;this.undelegateEvents(),t.off("scale",this.onGraphTransformed,this),t.off("translate",this.onGraphTransformed,this),t.model.off("updated",this.onModelUpdated,this),e.off("added",this.onCellAdded,this),e.off("removed",this.onCellRemoved,this),e.off("reseted",this.onReseted,this),e.off("updated",this.onCollectionUpdated,this),e.off("node:change:position",this.onNodePositionChanged,this),e.off("cell:changed",this.onCellChanged,this)}onRemove(){this.stopListening()}onGraphTransformed(){this.updateSelectionBoxes()}onCellChanged(){this.updateSelectionBoxes()}onNodePositionChanged({node:t,options:e}){const{showNodeSelectionBox:s,pointerEvents:r}=this.options,{ui:i,selection:o,translateBy:a,snapped:l}=e,u=(s!==!0||r&&this.getPointerEventsValue(r)==="none")&&!this.translating&&!o,h=i&&a&&t.id===a;if(u&&(h||l)){this.translating=!0;const f=t.position(),d=t.previous("position"),g=f.x-d.x,p=f.y-d.y;(g!==0||p!==0)&&this.translateSelectedNodes(g,p,t,e),this.translating=!1}}onModelUpdated({removed:t}){t&&t.length&&this.unselect(t)}isEmpty(){return this.length<=0}isSelected(t){return this.collection.has(t)}get length(){return this.collection.length}get cells(){return this.collection.toArray()}select(t,e={}){e.dryrun=!0;const s=this.filter(Array.isArray(t)?t:[t]);return this.collection.add(s,e),this}unselect(t,e={}){return e.dryrun=!0,this.collection.remove(Array.isArray(t)?t:[t],e),this}reset(t,e={}){if(t){if(e.batch){const u=this.filter(Array.isArray(t)?t:[t]);return this.collection.reset(u,Object.assign(Object.assign({},e),{ui:!0})),this}const s=this.cells,r=this.filter(Array.isArray(t)?t:[t]),i={},o={};s.forEach(u=>i[u.id]=u),r.forEach(u=>o[u.id]=u);const a=[],l=[];return r.forEach(u=>{i[u.id]||a.push(u)}),s.forEach(u=>{o[u.id]||l.push(u)}),l.length&&this.unselect(l,Object.assign(Object.assign({},e),{ui:!0})),a.length&&this.select(a,Object.assign(Object.assign({},e),{ui:!0})),l.length===0&&a.length===0&&this.updateContainer(),this}return this.clean(e)}clean(t={}){return this.length&&(t.batch===!1?this.unselect(this.cells,t):this.collection.reset([],Object.assign(Object.assign({},t),{ui:!0}))),this}setFilter(t){this.options.filter=t}setContent(t){this.options.content=t}startSelecting(t){t=this.normalizeEvent(t),this.clean();let e,s;const r=this.graph.container;if(t.offsetX!=null&&t.offsetY!=null&&r.contains(t.target))e=t.offsetX,s=t.offsetY;else{const i=Gu(r),o=r.scrollLeft,a=r.scrollTop;e=t.clientX-i.left+window.pageXOffset+o,s=t.clientY-i.top+window.pageYOffset+a}qt(this.container,{top:s,left:e,width:1,height:1}),this.setEventData(t,{action:"selecting",clientX:t.clientX,clientY:t.clientY,offsetX:e,offsetY:s,scrollerX:0,scrollerY:0,moving:!1}),this.delegateDocumentEvents(Oe.documentEvents,t.data)}filter(t){const e=this.options.filter;return t.filter(s=>Array.isArray(e)?e.some(r=>typeof r=="string"?s.shape===r:s.id===r.id):typeof e=="function"?X(e,this.graph,s):!0)}stopSelecting(t){const e=this.graph,s=this.getEventData(t);switch(s.action){case"selecting":{let i=WR(this.container),o=qR(this.container);const a=Gu(this.container),l=e.pageToLocal(a.left,a.top),u=e.transform.getScale();i/=u.sx,o/=u.sy;const h=new z(l.x,l.y,i,o),f=this.getCellViewsInArea(h).map(d=>d.cell);this.reset(f,{batch:!0}),this.hideRubberband();break}case"translating":{const i=e.snapToGrid(t.clientX,t.clientY);if(!this.options.following){const o=s;this.updateSelectedNodesPosition({dx:o.clientX-o.originX,dy:o.clientY-o.originY})}this.graph.model.stopBatch("move-selection"),this.notifyBoxEvent("box:mouseup",t,i.x,i.y);break}default:{this.clean();break}}}onMouseUp(t){this.getEventData(t).action&&(this.stopSelecting(t),this.undelegateDocumentEvents())}onSelectionBoxMouseDown(t){this.options.following||t.stopPropagation();const e=this.normalizeEvent(t);this.options.movable&&this.startTranslating(e);const s=this.getCellViewFromElem(e.target);this.setEventData(e,{activeView:s});const r=this.graph.snapToGrid(e.clientX,e.clientY);this.notifyBoxEvent("box:mousedown",e,r.x,r.y),this.delegateDocumentEvents(Oe.documentEvents,e.data)}startTranslating(t){this.graph.model.startBatch("move-selection");const e=this.graph.snapToGrid(t.clientX,t.clientY);this.setEventData(t,{action:"translating",clientX:e.x,clientY:e.y,originX:e.x,originY:e.y})}getRestrictArea(){const t=this.graph.options.translating.restrict,e=typeof t=="function"?X(t,this.graph,null):t;return typeof e=="number"?this.graph.transform.getGraphArea().inflate(e):e===!0?this.graph.transform.getGraphArea():e||null}getSelectionOffset(t,e){let s=t.x-e.clientX,r=t.y-e.clientY;const i=this.getRestrictArea();if(i){const o=this.collection.toArray(),a=ht.getCellsBBox(o,{deep:!0})||z.create(),l=i.x-a.x,u=i.y-a.y,h=i.x+i.width-(a.x+a.width),f=i.y+i.height-(a.y+a.height);if(s<l&&(s=l),r<u&&(r=u),h<s&&(s=h),f<r&&(r=f),!this.options.following){const d=t.x-e.originX,g=t.y-e.originY;s=d<=l||d>=h?0:s,r=g<=u||g>=f?0:r}}return{dx:s,dy:r}}updateElementPosition(t,e,s){const r=qt(t,"left"),i=qt(t,"top"),o=r?parseFloat(r):0,a=i?parseFloat(i):0;qt(t,"left",o+e),qt(t,"top",a+s)}updateSelectedNodesPosition(t){const{dx:e,dy:s}=t;if(e||s)if(this.translateSelectedNodes(e,s),this.boxesUpdated)this.collection.length>1&&this.updateSelectionBoxes();else{const r=this.graph.transform.getScale();for(let i=0,o=this.$boxes,a=o.length;i<a;i+=1)this.updateElementPosition(o[i],e*r.sx,s*r.sy);this.updateElementPosition(this.selectionContainer,e*r.sx,s*r.sy)}}autoScrollGraph(t,e){const s=this.graph.getPlugin("scroller");return s?s.autoScroll(t,e):{scrollerX:0,scrollerY:0}}adjustSelection(t){const e=this.normalizeEvent(t),s=this.getEventData(e);switch(s.action){case"selecting":{const i=s;i.moving!==!0&&(ps(this.container,this.graph.container),this.showRubberband(),i.moving=!0);const{scrollerX:o,scrollerY:a}=this.autoScrollGraph(e.clientX,e.clientY);i.scrollerX+=o,i.scrollerY+=a;const l=e.clientX-i.clientX+i.scrollerX,u=e.clientY-i.clientY+i.scrollerY,h=parseInt(qt(this.container,"left")||"0",10),f=parseInt(qt(this.container,"top")||"0",10);qt(this.container,{left:l<0?i.offsetX+l:h,top:u<0?i.offsetY+u:f,width:Math.abs(l),height:Math.abs(u)});break}case"translating":{const i=this.graph.snapToGrid(e.clientX,e.clientY),o=s,a=this.getSelectionOffset(i,o);this.options.following?this.updateSelectedNodesPosition(a):this.updateContainerPosition(a),a.dx&&(o.clientX=i.x),a.dy&&(o.clientY=i.y),this.notifyBoxEvent("box:mousemove",t,i.x,i.y);break}}this.boxesUpdated=!1}translateSelectedNodes(t,e,s,r){const i={},o=[];if(s&&(i[s.id]=!0),this.collection.toArray().forEach(a=>{a.getDescendants({deep:!0}).forEach(l=>{i[l.id]=!0})}),r&&r.translateBy){const a=this.graph.getCellById(r.translateBy);a&&(i[a.id]=!0,a.getDescendants({deep:!0}).forEach(l=>{i[l.id]=!0}),o.push(a))}this.collection.toArray().forEach(a=>{if(!i[a.id]){const l=Object.assign(Object.assign({},r),{selection:this.cid,exclude:o});a.translate(t,e,l),this.graph.model.getConnectedEdges(a).forEach(u=>{i[u.id]||(u.translate(t,e,l),i[u.id]=!0)})}})}getCellViewsInArea(t){const e=this.graph,s={strict:this.options.strict};let r=[];return this.options.rubberNode&&(r=r.concat(e.model.getNodesInArea(t,s).map(i=>e.renderer.findViewByCell(i)).filter(i=>i!=null))),this.options.rubberEdge&&(r=r.concat(e.model.getEdgesInArea(t,s).map(i=>e.renderer.findViewByCell(i)).filter(i=>i!=null))),r}notifyBoxEvent(t,e,s,r){const o=this.getEventData(e).activeView;this.trigger(t,{e,view:o,x:s,y:r,cell:o.cell})}getSelectedClassName(t){return this.prefixClassName(`${t.isNode()?"node":"edge"}-selected`)}addCellSelectedClassName(t){const e=this.graph.renderer.findViewByCell(t);e&&e.addClass(this.getSelectedClassName(t))}removeCellUnSelectedClassName(t){const e=this.graph.renderer.findViewByCell(t);e&&e.removeClass(this.getSelectedClassName(t))}destroySelectionBox(t){this.removeCellUnSelectedClassName(t),this.canShowSelectionBox(t)&&(ze(this.container.querySelector(`[data-cell-id="${t.id}"]`)),this.$boxes.length===0&&this.hide(),this.boxCount=Math.max(0,this.boxCount-1))}destroyAllSelectionBoxes(t){t.forEach(e=>this.removeCellUnSelectedClassName(e)),this.hide(),ze(this.$boxes),this.boxCount=0}hide(){Dt(this.container,this.prefixClassName(Oe.classNames.rubberband)),Dt(this.container,this.prefixClassName(Oe.classNames.selected))}showRubberband(){J(this.container,this.prefixClassName(Oe.classNames.rubberband))}hideRubberband(){Dt(this.container,this.prefixClassName(Oe.classNames.rubberband))}showSelected(){Bu(this.container,"style"),J(this.container,this.prefixClassName(Oe.classNames.selected))}createContainer(){this.container=document.createElement("div"),J(this.container,this.prefixClassName(Oe.classNames.root)),this.options.className&&J(this.container,this.options.className),this.selectionContainer=document.createElement("div"),J(this.selectionContainer,this.prefixClassName(Oe.classNames.inner)),this.selectionContent=document.createElement("div"),J(this.selectionContent,this.prefixClassName(Oe.classNames.content)),Ne(this.selectionContainer,this.selectionContent),ut(this.selectionContainer,"data-selection-length",this.collection.length),iy(this.container,this.selectionContainer)}updateContainerPosition(t){(t.dx||t.dy)&&this.updateElementPosition(this.selectionContainer,t.dx,t.dy)}updateContainer(){const t={x:1/0,y:1/0},e={x:0,y:0};this.collection.toArray().filter(i=>this.canShowSelectionBox(i)).forEach(i=>{const o=this.graph.renderer.findViewByCell(i);if(o){const a=o.getBBox({useCellGeometry:!0});t.x=Math.min(t.x,a.x),t.y=Math.min(t.y,a.y),e.x=Math.max(e.x,a.x+a.width),e.y=Math.max(e.y,a.y+a.height)}}),qt(this.selectionContainer,{position:"absolute",pointerEvents:"none",left:t.x,top:t.y,width:e.x-t.x,height:e.y-t.y}),ut(this.selectionContainer,"data-selection-length",this.collection.length);const r=this.options.content;if(r)if(typeof r=="function"){const i=X(r,this.graph,this,this.selectionContent);i&&(this.selectionContent.innerHTML=i)}else this.selectionContent.innerHTML=r;this.collection.length>0&&!this.container.parentNode?ps(this.container,this.graph.container):this.collection.length<=0&&this.container.parentNode&&this.container.parentNode.removeChild(this.container)}canShowSelectionBox(t){return t.isNode()&&this.options.showNodeSelectionBox===!0||t.isEdge()&&this.options.showEdgeSelectionBox===!0}getPointerEventsValue(t){return typeof t=="string"?t:t(this.cells)}createSelectionBox(t){if(this.addCellSelectedClassName(t),this.canShowSelectionBox(t)){const e=this.graph.renderer.findViewByCell(t);if(e){const s=e.getBBox({useCellGeometry:!0}),r=this.boxClassName,i=document.createElement("div"),o=this.options.pointerEvents;J(i,r),J(i,`${r}-${t.isNode()?"node":"edge"}`),ut(i,"data-cell-id",t.id),qt(i,{position:"absolute",left:s.x,top:s.y,width:s.width,height:s.height,pointerEvents:o?this.getPointerEventsValue(o):"auto"}),ps(i,this.container),this.showSelected(),this.boxCount+=1}}}updateSelectionBoxes(){this.collection.length>0&&(this.boxesUpdated=!0,this.confirmUpdate())}confirmUpdate(){if(this.boxCount){this.hide();for(let t=0,e=this.$boxes,s=e.length;t<s;t+=1){const r=e[t],i=ut(r,"data-cell-id");ze(r),this.boxCount-=1;const o=this.collection.get(i);o&&this.createSelectionBox(o)}this.updateContainer()}return 0}getCellViewFromElem(t){const e=t.getAttribute("data-cell-id");if(e){const s=this.collection.get(e);if(s)return this.graph.renderer.findViewByCell(s)}return null}onCellRemoved({cell:t}){this.destroySelectionBox(t),this.updateContainer()}onReseted({previous:t,current:e}){this.destroyAllSelectionBoxes(t),e.forEach(s=>{this.listenCellRemoveEvent(s),this.createSelectionBox(s)}),this.updateContainer()}onCellAdded({cell:t}){this.listenCellRemoveEvent(t),this.createSelectionBox(t),this.updateContainer()}listenCellRemoveEvent(t){t.off("removed",this.onCellRemoved,this),t.on("removed",this.onCellRemoved,this)}onCollectionUpdated({added:t,removed:e,options:s}){t.forEach(i=>{this.trigger("cell:selected",{cell:i,options:s}),i.isNode()?this.trigger("node:selected",{cell:i,options:s,node:i}):i.isEdge()&&this.trigger("edge:selected",{cell:i,options:s,edge:i})}),e.forEach(i=>{this.trigger("cell:unselected",{cell:i,options:s}),i.isNode()?this.trigger("node:unselected",{cell:i,options:s,node:i}):i.isEdge()&&this.trigger("edge:unselected",{cell:i,options:s,edge:i})});const r={added:t,removed:e,options:s,selected:this.cells.filter(i=>!!this.graph.getCellById(i.id))};this.trigger("selection:changed",r)}dispose(){this.clean(),this.remove(),this.off()}}hj([pt.dispose()],Hb.prototype,"dispose",null);var Oe;(function(n){const t="widget-selection";n.classNames={root:t,inner:`${t}-inner`,box:`${t}-box`,content:`${t}-content`,rubberband:`${t}-rubberband`,selected:`${t}-selected`},n.documentEvents={mousemove:"adjustSelection",touchmove:"adjustSelection",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"};function e(s){return s.getAncestors().length}n.depthComparator=e})(Oe||(Oe={}));const dj=`.x6-widget-selection {
674
674
  position: absolute;
675
675
  top: 0;
676
676
  left: 0;
@@ -735,4 +735,4 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
735
735
  font-size: 10px;
736
736
  background-color: #6a6b8a;
737
737
  }
738
- `;I.prototype.isSelectionEnabled=function(){const n=this.getPlugin("selection");return n?n.isEnabled():!1},I.prototype.enableSelection=function(){const n=this.getPlugin("selection");return n&&n.enable(),this},I.prototype.disableSelection=function(){const n=this.getPlugin("selection");return n&&n.disable(),this},I.prototype.toggleSelection=function(n){const t=this.getPlugin("selection");return t&&t.toggleEnabled(n),this},I.prototype.isMultipleSelection=function(){const n=this.getPlugin("selection");return n?n.isMultipleSelection():!1},I.prototype.enableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.enableMultipleSelection(),this},I.prototype.disableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.disableMultipleSelection(),this},I.prototype.toggleMultipleSelection=function(n){const t=this.getPlugin("selection");return t&&t.toggleMultipleSelection(n),this},I.prototype.isSelectionMovable=function(){const n=this.getPlugin("selection");return n?n.isSelectionMovable():!1},I.prototype.enableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.enableSelectionMovable(),this},I.prototype.disableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.disableSelectionMovable(),this},I.prototype.toggleSelectionMovable=function(n){const t=this.getPlugin("selection");return t&&t.toggleSelectionMovable(n),this},I.prototype.isRubberbandEnabled=function(){const n=this.getPlugin("selection");return n?n.isRubberbandEnabled():!1},I.prototype.enableRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableRubberband(),this},I.prototype.disableRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableRubberband(),this},I.prototype.toggleRubberband=function(n){const t=this.getPlugin("selection");return t&&t.toggleRubberband(n),this},I.prototype.isStrictRubberband=function(){const n=this.getPlugin("selection");return n?n.isStrictRubberband():!1},I.prototype.enableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableStrictRubberband(),this},I.prototype.disableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableStrictRubberband(),this},I.prototype.toggleStrictRubberband=function(n){const t=this.getPlugin("selection");return t&&t.toggleStrictRubberband(n),this},I.prototype.setRubberbandModifiers=function(n){const t=this.getPlugin("selection");return t&&t.setRubberbandModifiers(n),this},I.prototype.setSelectionFilter=function(n){const t=this.getPlugin("selection");return t&&t.setSelectionFilter(n),this},I.prototype.setSelectionDisplayContent=function(n){const t=this.getPlugin("selection");return t&&t.setSelectionDisplayContent(n),this},I.prototype.isSelectionEmpty=function(){const n=this.getPlugin("selection");return n?n.isEmpty():!0},I.prototype.cleanSelection=function(n){const t=this.getPlugin("selection");return t&&t.clean(n),this},I.prototype.resetSelection=function(n,t){const e=this.getPlugin("selection");return e&&e.reset(n,t),this},I.prototype.getSelectedCells=function(){const n=this.getPlugin("selection");return n?n.getSelectedCells():[]},I.prototype.getSelectedCellCount=function(){const n=this.getPlugin("selection");return n?n.getSelectedCellCount():0},I.prototype.isSelected=function(n){const t=this.getPlugin("selection");return t?t.isSelected(n):!1},I.prototype.select=function(n,t){const e=this.getPlugin("selection");return e&&e.select(n,t),this},I.prototype.unselect=function(n,t){const e=this.getPlugin("selection");return e&&e.unselect(n,t),this};var fj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class ii extends Nt{get rubberbandDisabled(){return this.options.enabled!==!0||this.options.rubberband!==!0}get disabled(){return this.options.enabled!==!0}get length(){return this.selectionImpl.length}get cells(){return this.selectionImpl.cells}constructor(t={}){super(),this.name="selection",this.movedMap=new WeakMap,this.unselectMap=new WeakMap,this.options=Object.assign(Object.assign({enabled:!0},ii.defaultOptions),t),jr(this.name,dj)}init(t){this.graph=t,this.selectionImpl=new Hb(Object.assign(Object.assign({},this.options),{graph:t})),this.setup(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}isMultipleSelection(){return this.isMultiple()}enableMultipleSelection(){return this.enableMultiple(),this}disableMultipleSelection(){return this.disableMultiple(),this}toggleMultipleSelection(t){return t!=null?t!==this.isMultipleSelection()&&(t?this.enableMultipleSelection():this.disableMultipleSelection()):this.isMultipleSelection()?this.disableMultipleSelection():this.enableMultipleSelection(),this}isSelectionMovable(){return this.options.movable!==!1}enableSelectionMovable(){return this.selectionImpl.options.movable=!0,this}disableSelectionMovable(){return this.selectionImpl.options.movable=!1,this}toggleSelectionMovable(t){return t!=null?t!==this.isSelectionMovable()&&(t?this.enableSelectionMovable():this.disableSelectionMovable()):this.isSelectionMovable()?this.disableSelectionMovable():this.enableSelectionMovable(),this}isRubberbandEnabled(){return!this.rubberbandDisabled}enableRubberband(){return this.rubberbandDisabled&&(this.options.rubberband=!0),this}disableRubberband(){return this.rubberbandDisabled||(this.options.rubberband=!1),this}toggleRubberband(t){return t!=null?t!==this.isRubberbandEnabled()&&(t?this.enableRubberband():this.disableRubberband()):this.isRubberbandEnabled()?this.disableRubberband():this.enableRubberband(),this}isStrictRubberband(){return this.selectionImpl.options.strict===!0}enableStrictRubberband(){return this.selectionImpl.options.strict=!0,this}disableStrictRubberband(){return this.selectionImpl.options.strict=!1,this}toggleStrictRubberband(t){return t!=null?t!==this.isStrictRubberband()&&(t?this.enableStrictRubberband():this.disableStrictRubberband()):this.isStrictRubberband()?this.disableStrictRubberband():this.enableStrictRubberband(),this}setRubberbandModifiers(t){this.setModifiers(t)}setSelectionFilter(t){return this.setFilter(t),this}setSelectionDisplayContent(t){return this.setContent(t),this}isEmpty(){return this.length<=0}clean(t={}){return this.selectionImpl.clean(t),this}reset(t,e={}){return this.selectionImpl.reset(t?this.getCells(t):[],e),this}getSelectedCells(){return this.cells}getSelectedCellCount(){return this.length}isSelected(t){return this.selectionImpl.isSelected(t)}select(t,e={}){const s=this.getCells(t);return s.length&&(this.isMultiple()?this.selectionImpl.select(s,e):this.reset(s.slice(0,1),e)),this}unselect(t,e={}){return this.selectionImpl.unselect(this.getCells(t),e),this}setup(){this.selectionImpl.on("*",(t,e)=>{this.trigger(t,e),this.graph.trigger(t,e)})}startListening(){this.graph.on("blank:mousedown",this.onBlankMouseDown,this),this.graph.on("blank:click",this.onBlankClick,this),this.graph.on("cell:mousemove",this.onCellMouseMove,this),this.graph.on("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.on("box:mousedown",this.onBoxMouseDown,this)}stopListening(){this.graph.off("blank:mousedown",this.onBlankMouseDown,this),this.graph.off("blank:click",this.onBlankClick,this),this.graph.off("cell:mousemove",this.onCellMouseMove,this),this.graph.off("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.off("box:mousedown",this.onBoxMouseDown,this)}onBlankMouseDown({e:t}){if(!this.allowBlankMouseDown(t))return;const e=this.graph.panning.allowPanning(t,!0),s=this.graph.getPlugin("scroller"),r=s&&s.allowPanning(t,!0);(this.allowRubberband(t,!0)||this.allowRubberband(t)&&!r&&!e)&&this.startRubberband(t)}allowBlankMouseDown(t){const e=this.options.eventTypes;return(e==null?void 0:e.includes("leftMouseDown"))&&t.button===0||(e==null?void 0:e.includes("mouseWheelDown"))&&t.button===1}onBlankClick(){this.clean()}allowRubberband(t,e){return!this.rubberbandDisabled&&ms.isMatch(t,this.options.modifiers,e)}allowMultipleSelection(t){return this.isMultiple()&&ms.isMatch(t,this.options.multipleSelectionModifiers)}onCellMouseMove({cell:t}){this.movedMap.set(t,!0)}onCellMouseUp({e:t,cell:e}){const s=this.options;let r=this.disabled;!r&&this.movedMap.has(e)&&(r=s.selectCellOnMoved===!1,r||(r=s.selectNodeOnMoved===!1&&e.isNode()),r||(r=s.selectEdgeOnMoved===!1&&e.isEdge())),r||(this.allowMultipleSelection(t)?this.unselectMap.has(e)?this.unselectMap.delete(e):this.isSelected(e)?this.unselect(e):this.select(e):this.reset(e)),this.movedMap.delete(e)}onBoxMouseDown({e:t,cell:e}){this.disabled||this.allowMultipleSelection(t)&&(this.unselect(e),this.unselectMap.set(e,!0))}getCells(t){return(Array.isArray(t)?t:[t]).map(e=>typeof e=="string"?this.graph.getCellById(e):e).filter(e=>e!=null)}startRubberband(t){return this.rubberbandDisabled||this.selectionImpl.startSelecting(t),this}isMultiple(){return this.options.multiple!==!1}enableMultiple(){return this.options.multiple=!0,this}disableMultiple(){return this.options.multiple=!1,this}setModifiers(t){return this.options.modifiers=t,this}setContent(t){return this.selectionImpl.setContent(t),this}setFilter(t){return this.selectionImpl.setFilter(t),this}dispose(){this.stopListening(),this.off(),this.selectionImpl.dispose(),$r(this.name)}}fj([Nt.dispose()],ii.prototype,"dispose",null),function(n){n.defaultOptions={rubberband:!1,rubberNode:!0,rubberEdge:!1,pointerEvents:"auto",multiple:!0,multipleSelectionModifiers:["ctrl","meta"],movable:!0,strict:!1,selectCellOnMoved:!1,selectNodeOnMoved:!1,selectEdgeOnMoved:!1,following:!0,content:null,eventTypes:["leftMouseDown","mouseWheelDown"]}}(ii||(ii={})),I.prototype.isHistoryEnabled=function(){const n=this.getPlugin("history");return n?n.isEnabled():!1},I.prototype.enableHistory=function(){const n=this.getPlugin("history");return n&&n.enable(),this},I.prototype.disableHistory=function(){const n=this.getPlugin("history");return n&&n.disable(),this},I.prototype.toggleHistory=function(n){const t=this.getPlugin("history");return t&&t.toggleEnabled(n),this},I.prototype.undo=function(n){const t=this.getPlugin("history");return t&&t.undo(n),this},I.prototype.redo=function(n){const t=this.getPlugin("history");return t&&t.redo(n),this},I.prototype.undoAndCancel=function(n){const t=this.getPlugin("history");return t&&t.cancel(n),this},I.prototype.canUndo=function(){const n=this.getPlugin("history");return n?n.canUndo():!1},I.prototype.canRedo=function(){const n=this.getPlugin("history");return n?n.canRedo():!1},I.prototype.cleanHistory=function(n){const t=this.getPlugin("history");return t&&t.clean(n),this},I.prototype.getHistoryStackSize=function(){return this.getPlugin("history").getSize()},I.prototype.getUndoStackSize=function(){return this.getPlugin("history").getUndoSize()},I.prototype.getRedoStackSize=function(){return this.getPlugin("history").getRedoSize()},I.prototype.getUndoRemainSize=function(){return this.getPlugin("history").getUndoRemainSize()};var Ub=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class oi extends Nt{constructor(t={}){super(),this.name="history",this.batchCommands=null,this.batchLevel=0,this.lastBatchIndex=-1,this.freezed=!1,this.stackSize=0,this.handlers=[];const{stackSize:e=0}=t;this.stackSize=e,this.options=It.getOptions(t),this.validator=new oi.Validator({history:this,cancelInvalid:this.options.cancelInvalid})}init(t){this.graph=t,this.model=this.graph.model,this.clean(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}undo(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack.push(e),this.notify("undo",e,t))}return this}redo(t={}){if(!this.disabled){const e=this.redoStack.pop();e&&(this.applyCommand(e,t),this.undoStackPush(e),this.notify("redo",e,t))}return this}cancel(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack=[],this.notify("cancel",e,t))}return this}getSize(){return this.stackSize}getUndoRemainSize(){const t=this.undoStack.length;return this.stackSize-t}getUndoSize(){return this.undoStack.length}getRedoSize(){return this.redoStack.length}canUndo(){return!this.disabled&&this.undoStack.length>0}canRedo(){return!this.disabled&&this.redoStack.length>0}clean(t={}){return this.undoStack=[],this.redoStack=[],this.notify("clean",null,t),this}get disabled(){return this.options.enabled!==!0}validate(t,...e){return this.validator.validate(t,...e),this}startListening(){this.model.on("batch:start",this.initBatchCommand,this),this.model.on("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&this.options.eventNames.forEach((t,e)=>{this.handlers[e]=this.addCommand.bind(this,t),this.model.on(t,this.handlers[e])}),this.validator.on("invalid",t=>this.trigger("invalid",t))}stopListening(){this.model.off("batch:start",this.initBatchCommand,this),this.model.off("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&(this.options.eventNames.forEach((t,e)=>{this.model.off(t,this.handlers[e])}),this.handlers.length=0),this.validator.off("invalid")}createCommand(t){return{batch:t?t.batch:!1,data:{}}}revertCommand(t,e){this.freezed=!0;const s=Array.isArray(t)?It.sortBatchCommands(t):[t];for(let r=s.length-1;r>=0;r-=1){const i=s[r],o=Object.assign(Object.assign({},e),Mc(i.options,this.options.revertOptionsList||[]));this.executeCommand(i,!0,o)}this.freezed=!1}applyCommand(t,e){this.freezed=!0;const s=Array.isArray(t)?It.sortBatchCommands(t):[t];for(let r=0;r<s.length;r+=1){const i=s[r],o=Object.assign(Object.assign({},e),Mc(i.options,this.options.applyOptionsList||[]));this.executeCommand(i,!1,o)}this.freezed=!1}executeCommand(t,e,s){const r=this.model,i=r.getCell(t.data.id),o=t.event;if(It.isAddEvent(o)&&e||It.isRemoveEvent(o)&&!e)i&&i.remove(s);else if(It.isAddEvent(o)&&!e||It.isRemoveEvent(o)&&e){const a=t.data;a.node?r.addNode(a.props,s):a.edge&&r.addEdge(a.props,s)}else if(It.isChangeEvent(o)){const a=t.data,l=a.key;if(l&&i){const u=e?a.prev[l]:a.next[l];a.key==="attrs"&&this.ensureUndefinedAttrs(u,e?a.next[l]:a.prev[l])&&(s.dirty=!0),i.prop(l,u,s)}}else{const a=this.options.executeCommand;a&&X(a,this,t,e,s)}}addCommand(t,e){if(this.freezed||this.disabled)return;const s=e,r=s.options||{};if(r.dryrun||It.isAddEvent(t)&&this.options.ignoreAdd||It.isRemoveEvent(t)&&this.options.ignoreRemove||It.isChangeEvent(t)&&this.options.ignoreChange)return;const i=this.options.beforeAddCommand;if(i!=null&&X(i,this,t,e)===!1)return;t==="cell:change:*"&&(t=`cell:change:${s.key}`);const o=s.cell,a=Zt.isModel(o);let l;if(this.batchCommands){l=this.batchCommands[Math.max(this.lastBatchIndex,0)];const h=a&&!l.modelChange||l.data.id!==o.id,f=l.event!==t;if(this.lastBatchIndex>=0&&(h||f)){const d=this.batchCommands.findIndex(g=>(a&&g.modelChange||g.data.id===o.id)&&g.event===t);d<0||It.isAddEvent(t)||It.isRemoveEvent(t)?l=this.createCommand({batch:!0}):(l=this.batchCommands[d],this.batchCommands.splice(d,1)),this.batchCommands.push(l),this.lastBatchIndex=this.batchCommands.length-1}}else l=this.createCommand({batch:!1});if(It.isAddEvent(t)||It.isRemoveEvent(t)){const h=l.data;return l.event=t,l.options=r,h.id=o.id,h.props=Tt(o.toJSON()),o.isEdge()?h.edge=!0:o.isNode()&&(h.node=!0),this.push(l,r)}if(It.isChangeEvent(t)){const h=e.key,f=l.data;return(!l.batch||!l.event)&&(l.event=t,l.options=r,f.key=h,f.prev==null&&(f.prev={}),f.prev[h]=Tt(o.previous(h)),a?l.modelChange=!0:f.id=o.id),f.next==null&&(f.next={}),f.next[h]=Tt(o.prop(h)),this.push(l,r)}const u=this.options.afterAddCommand;u&&X(u,this,t,e,l),this.push(l,r)}initBatchCommand(t){this.freezed||(this.batchCommands?this.batchLevel+=1:(this.batchCommands=[this.createCommand({batch:!0})],this.batchLevel=0,this.lastBatchIndex=-1))}storeBatchCommand(t){if(!this.freezed)if(this.batchCommands&&this.batchLevel<=0){const e=this.filterBatchCommand(this.batchCommands);e.length>0&&(this.redoStack=[],this.undoStackPush(e),this.consolidateCommands(),this.notify("add",e,t)),this.batchCommands=null,this.lastBatchIndex=-1,this.batchLevel=0}else this.batchCommands&&this.batchLevel>0&&(this.batchLevel-=1)}filterBatchCommand(t){let e=t.slice();const s=[];for(;e.length>0;){const r=e.shift(),i=r.event,o=r.data.id;if(i!=null&&(o!=null||r.modelChange)){if(It.isAddEvent(i)){const a=e.findIndex(l=>It.isRemoveEvent(l.event)&&l.data.id===o);if(a>=0){e=e.filter((l,u)=>a<u||l.data.id!==o);continue}}else if(It.isRemoveEvent(i)){const a=e.findIndex(l=>It.isAddEvent(l.event)&&l.data.id===o);if(a>=0){e.splice(a,1);continue}}else if(It.isChangeEvent(i)){const a=r.data;if(wn(a.prev,a.next))continue}s.push(r)}}return s}notify(t,e,s){const r=e==null?null:Array.isArray(e)?e:[e];this.emit(t,{cmds:r,options:s}),this.graph.trigger(`history:${t}`,{cmds:r,options:s}),this.emit("change",{cmds:r,options:s}),this.graph.trigger("history:change",{cmds:r,options:s})}push(t,e){this.redoStack=[],t.batch?(this.lastBatchIndex=Math.max(this.lastBatchIndex,0),this.emit("batch",{cmd:t,options:e})):(this.undoStackPush(t),this.consolidateCommands(),this.notify("add",t,e))}consolidateCommands(){var t;const e=this.undoStack[this.undoStack.length-1],s=this.undoStack[this.undoStack.length-2];if(!Array.isArray(e))return;const r=new Set(e.map(o=>o.event));if(r.size!==2||!r.has("cell:change:parent")||!r.has("cell:change:children")||!e.every(o=>{var a;return o.batch&&((a=o.options)===null||a===void 0?void 0:a.ui)})||!Array.isArray(s)||s.length!==1)return;const i=s[0];i.event!=="cell:change:position"||!(!((t=i.options)===null||t===void 0)&&t.ui)||(s.push(...e),this.undoStack.pop())}undoStackPush(t){if(this.stackSize===0){this.undoStack.push(t);return}this.undoStack.length>=this.stackSize&&this.undoStack.shift(),this.undoStack.push(t)}ensureUndefinedAttrs(t,e){let s=!1;return t!==null&&e!==null&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(r=>{t[r]===void 0&&e[r]!==void 0?(t[r]=void 0,s=!0):typeof t[r]=="object"&&typeof e[r]=="object"&&(s=this.ensureUndefinedAttrs(t[r],e[r]))}),s}dispose(){this.validator.dispose(),this.clean(),this.stopListening(),this.off()}}Ub([Nt.dispose()],oi.prototype,"dispose",null),function(n){class t extends Nt{constructor(s){super(),this.map={},this.command=s.history,this.cancelInvalid=s.cancelInvalid!==!1,this.command.on("add",this.onCommandAdded,this)}onCommandAdded({cmds:s}){return Array.isArray(s)?s.every(r=>this.isValidCommand(r)):this.isValidCommand(s)}isValidCommand(s){if(s.options&&s.options.validation===!1)return!0;const r=s.event&&this.map[s.event]||[];let i=null;return r.forEach(o=>{let a=0;const l=u=>{const h=o[a];a+=1;try{if(h)h(u,s,l);else{i=u;return}}catch(f){l(f)}};l(i)}),i?(this.cancelInvalid&&this.command.cancel(),this.emit("invalid",{err:i}),!1):!0}validate(s,...r){const i=Array.isArray(s)?s:s.split(/\s+/);return r.forEach(o=>{if(typeof o!="function")throw new Error(`${i.join(" ")} requires callback functions.`)}),i.forEach(o=>{this.map[o]==null&&(this.map[o]=[]),this.map[o].push(r)}),this}dispose(){this.command.off("add",this.onCommandAdded,this)}}Ub([Nt.dispose()],t.prototype,"dispose",null),n.Validator=t}(oi||(oi={}));var It;(function(n){function t(o){return o==="cell:added"}n.isAddEvent=t;function e(o){return o==="cell:removed"}n.isRemoveEvent=e;function s(o){return o!=null&&o.startsWith("cell:change:")}n.isChangeEvent=s;function r(o){const a=["cell:added","cell:removed","cell:change:*"],l=["batch:start","batch:stop"],u=o.eventNames?o.eventNames.filter(h=>!(n.isChangeEvent(h)||a.includes(h)||l.includes(h))):a;return Object.assign(Object.assign({enabled:!0},o),{eventNames:u,applyOptionsList:o.applyOptionsList||["propertyPath"],revertOptionsList:o.revertOptionsList||["propertyPath"]})}n.getOptions=r;function i(o){const a=[];for(let l=0,u=o.length;l<u;l+=1){const h=o[l];let f=null;if(n.isAddEvent(h.event)){const d=h.data.id;for(let g=0;g<l;g+=1)if(o[g].data.id===d){f=g;break}}f!==null?a.splice(f,0,h):a.push(h)}return a}n.sortBatchCommands=i})(It||(It={})),I.prototype.toSVG=function(n,t){const e=this.getPlugin("export");e&&e.toSVG(n,t)},I.prototype.toPNG=function(n,t){const e=this.getPlugin("export");e&&e.toPNG(n,t)},I.prototype.toJPEG=function(n,t){const e=this.getPlugin("export");e&&e.toJPEG(n,t)},I.prototype.exportPNG=function(n,t){const e=this.getPlugin("export");e&&e.exportPNG(n,t)},I.prototype.exportJPEG=function(n,t){const e=this.getPlugin("export");e&&e.exportJPEG(n,t)},I.prototype.exportSVG=function(n,t){const e=this.getPlugin("export");e&&e.exportSVG(n,t)};var gj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Gb extends Nt{constructor(){super(),this.name="export"}get view(){return this.graph.view}init(t){this.graph=t}exportPNG(t="chart",e={}){this.toPNG(s=>{Ws.downloadDataUri(s,t)},e)}exportJPEG(t="chart",e={}){this.toPNG(s=>{Ws.downloadDataUri(s,t)},e)}exportSVG(t="chart",e={}){this.toSVG(s=>{Ws.downloadDataUri(Ws.svgToDataUrl(s),t)},e)}toSVG(t,e={}){this.notify("before:export",e);const s=this.view.svg,r=tt.create(s).clone();let i=r.node;const o=r.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),a=e.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),l=e.preserveDimensions;if(l){const f=typeof l=="boolean"?a:l;r.attr({width:f.width,height:f.height})}if(r.removeAttribute("style").attr("viewBox",[a.x,a.y,a.width,a.height].join(" ")),o.removeAttribute("transform"),e.copyStyles!==!1){const f=s.ownerDocument,d=Array.from(s.querySelectorAll("*")),g=Array.from(i.querySelectorAll("*")),p=f.styleSheets.length,m=[];for(let w=p-1;w>=0;w-=1)m[w]=f.styleSheets[w],f.styleSheets[w].disabled=!0;const y={};d.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S={};Object.keys(v).forEach(E=>{S[E]=v.getPropertyValue(E)}),y[x]=S}),p!==f.styleSheets.length&&m.forEach((w,x)=>{f.styleSheets[x]=w});for(let w=0;w<p;w+=1)f.styleSheets[w].disabled=!1;const b={};d.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S=y[x],E={};Object.keys(v).forEach(C=>{!Oc(C)&&v.getPropertyValue(C)!==S[C]&&(E[C]=v.getPropertyValue(C))}),b[x]=E}),g.forEach((w,x)=>{qt(w,b[x])})}const u=e.stylesheet;if(typeof u=="string"){const f=s.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(u);r.prepend(tt.create("style",{type:"text/css"},[f]))}const h=()=>{const f=e.beforeSerialize;if(typeof f=="function"){const g=X(f,this.graph,i);g instanceof SVGSVGElement&&(i=g)}const d=new XMLSerializer().serializeToString(i).replace(/&nbsp;/g," ");this.notify("after:export",e),t(d)};if(e.serializeImages){const f=r.find("image").map(d=>new Promise(g=>{const p=d.attr("xlink:href")||d.attr("href");Ws.imageToDataUri(p,(m,y)=>{!m&&y&&d.attr("xlink:href",y),g()})}));Promise.all(f).then(h)}else h()}toDataURL(t,e){let s=e.viewBox||this.graph.getContentBBox();const r=ds(e.padding);e.width&&e.height&&(r.left+r.right>=e.width&&(r.left=r.right=0),r.top+r.bottom>=e.height&&(r.top=r.bottom=0));const i=new z(-r.left,-r.top,r.left+r.right,r.top+r.bottom);if(e.width&&e.height){const h=s.width+r.left+r.right,f=s.height+r.top+r.bottom;i.scale(h/e.width,f/e.height)}s=z.create(s).moveAndExpand(i);const o=typeof e.width=="number"&&typeof e.height=="number"?{width:e.width,height:e.height}:s;let a=e.ratio?parseFloat(e.ratio):1;(!Number.isFinite(a)||a===0)&&(a=1);const l={width:Math.max(Math.round(o.width*a),1),height:Math.max(Math.round(o.height*a),1)};{const h=document.createElement("canvas"),f=h.getContext("2d");h.width=l.width,h.height=l.height;const d=l.width-1,g=l.height-1;f.fillStyle="rgb(1,1,1)",f.fillRect(d,g,1,1);const p=f.getImageData(d,g,1,1).data;if(p[0]!==1||p[1]!==1||p[2]!==1)throw new Error("size exceeded")}const u=new Image;u.onload=()=>{const h=document.createElement("canvas");h.width=l.width,h.height=l.height;const f=h.getContext("2d");f.fillStyle=e.backgroundColor||"white",f.fillRect(0,0,l.width,l.height);try{f.drawImage(u,0,0,l.width,l.height);const d=h.toDataURL(e.type,e.quality);t(d)}catch{}},this.toSVG(h=>{u.src=`data:image/svg+xml,${encodeURIComponent(h)}`},Object.assign(Object.assign({},e),{viewBox:s,serializeImages:!0,preserveDimensions:Object.assign({},l)}))}toPNG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/png"}))}toJPEG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/jpeg"}))}notify(t,e){this.trigger(t,e),this.graph.trigger(t,e)}dispose(){this.off()}}gj([Nt.dispose()],Gb.prototype,"dispose",null);const pj={class:"control-box"},mj=Gn({__name:"index",props:{payload:Object},setup(n){const t=n,e=c.ref("3"),s=c.ref([]),r=()=>{s.value=JSON.parse(JSON.stringify(t.payload.getPorts().map(u=>({id:u.id,attrs:u.attrs,args:{x:Number(u.args.x.replace("%","")),y:Number(u.args.y.replace("%",""))}}))))},i=()=>{const u=za;u.attrs.text.text=`${t.payload.getPorts().length+1}`,u.args.x="50%",u.args.y="50%",t.payload.addPorts([{group:"ports",...u}]),r()},o=()=>{Wi("#drawing-board",!0)},a=(u,h,f)=>{t.payload.portProp(u,"args/"+h,f+"%"),r()},l=u=>{t.payload.removePort(u),r()};return c.onMounted(()=>{r()}),(u,h)=>{const f=c.resolveComponent("el-button"),d=c.resolveComponent("el-table-column"),g=c.resolveComponent("el-slider"),p=c.resolveComponent("el-icon"),m=c.resolveComponent("el-table"),y=c.resolveComponent("el-collapse-item"),b=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",pj,[c.createVNode(b,{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=w=>e.value=w),accordion:""},{default:c.withCtx(()=>[c.createVNode(y,{title:"连接桩设置",name:"3"},{default:c.withCtx(()=>[c.createVNode(f,{type:"primary",onClick:i,size:"small"},{default:c.withCtx(()=>h[1]||(h[1]=[c.createTextVNode("添加连接桩")])),_:1}),c.createVNode(f,{type:"primary",onClick:o,size:"small"},{default:c.withCtx(()=>h[2]||(h[2]=[c.createTextVNode("显示连接桩")])),_:1}),c.createVNode(m,{data:s.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:c.withCtx(()=>[c.createVNode(d,{label:"ID",width:"50",align:"center"},{default:c.withCtx(({row:w})=>[c.createTextVNode(c.toDisplayString(w.attrs.text.text),1)]),_:1}),c.createVNode(d,{label:"x",width:"100",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(g,{modelValue:w.args.x,"onUpdate:modelValue":x=>w.args.x=x,min:0,max:100,step:1,onInput:x=>a(w.id,"x",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(d,{label:"y",width:"100",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(g,{modelValue:w.args.y,"onUpdate:modelValue":x=>w.args.y=x,min:0,max:100,step:1,onInput:x=>a(w.id,"y",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(d,{label:"操作",width:"70",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(f,{type:"danger",size:"small",onClick:x=>l(w.id)},{default:c.withCtx(()=>[c.createVNode(p,null,{default:c.withCtx(()=>[c.createVNode(c.unref(wg))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-b280098c"]]),yl=[{shape:"rect",width:60,height:5,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:0}},data:{type:"base-shape"}},{shape:"rect",width:60,height:20,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape",label:"母线"}},{shape:"circle",width:40,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape"}},{shape:"ellipse",width:60,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff"}},data:{type:"base-shape"}}],Yb={groups:{ports:{position:"absolute",args:{x:0,y:0},attrs:{circle:{magnet:!0,stroke:"#8f8f8f",r:4}},label:{position:"top"}}}},hh=Object.assign({name:"wiring-diagram-preview"},{__name:"index",props:{id:{type:String,default:""},background:{type:Object,default:()=>({})},grid:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},setup(n){const t=n,e=c.ref([]),s=c.ref(),r=()=>{const y=document.getElementById("preview-container");s.value=new I({container:y,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center"},interacting:{nodeMovable:!1,magnetConnectable:!1,edgeMovable:!1,edgeLabelMovable:!1,arrowheadMovable:!1,vertexMovable:!1,vertexAddable:!1,vertexDeletable:!1}}),s.value.on("blank:dblclick",()=>{h()})},i=async()=>{let y,b,w;if(t.id){const{background:x,grid:v,data:S}=await Nm(t.id);y=x,b={},w=S}else y=t.background,b={},w=t.data;s.value.drawBackground(y),s.value.drawGrid(b),s.value.fromJSON(w),l()},o=c.ref(null),a=c.ref([]),l=()=>{a.value=f();const y=/\$\{(.*?)\}/g;a.value.forEach(b=>{if(!b.data||!b.data.field)return;const w=b.data.content.match(y);e.value.push(...b.data.field),w&&(b.matches=w)}),a&&h()},u=c.ref(!0),h=async()=>{if(!e.value.length)return;if(!u.value){Bt.warning("数据正在更新中,请稍后再试");return}o.value&&clearInterval(o.value),u.value=!1;const y=await RD(e.value);if(u.value=!0,!Array.isArray(y)||!y.length)return;let b=0;a.value.forEach((w,x)=>{if(!w.data||!w.data.field)return;if(w.matches){const S=x===0?0:b||0,E=b=S+w.data.field.length;w.label=d(w.data.content,y.slice(S,E))}}),o.value=setTimeout(()=>{h()},1e4)},f=()=>s.value.getNodes().filter(b=>{var w;return((w=b.data)==null?void 0:w.type)==="text"}),d=(y,b)=>{let w=0;return y.replace(/\$\{.*?\}/g,()=>w<b.length?b[w++]:"--")},g=()=>{s.value.zoomToFit({maxScale:1,padding:20})},p=c.shallowRef(),m=()=>{new ResizeObserver(()=>{g()}).observe(p.value)};return c.onMounted(()=>{r(),i(),setTimeout(()=>{Wi("#preview-container",!1),g()},100),m()}),c.onUnmounted(()=>{clearInterval(o.value)}),(y,b)=>(c.openBlock(),c.createElementBlock("div",{id:"preview-container",ref_key:"previewRef",ref:p,onDblclick:g},null,544))}}),yj={class:"form-container"},bj={class:"footer"},wj=Gn({__name:"group-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:t}){const e=n,s=t,r=c.reactive({groupName:"",sort:1,isShow:1}),i=c.reactive({groupName:[{required:!0,message:"请输入分组名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}],isShow:[{required:!0,message:"请选择是否显示",trigger:"change"}]}),o=c.ref(),a=()=>{console.log(r),o.value.validate(u=>{if(u)r.id?$a("/cny/custom/updateGroup",r).then(h=>{h!=null&&h.isOk?(Bt.success("保存成功"),s("close",!0)):Bt.error((h==null?void 0:h.msg)||"保存失败")}):$a("/cny/custom/saveGroup",r).then(h=>{h!=null&&h.isOk?(Bt.success("保存成功"),s("close",!0)):Bt.error((h==null?void 0:h.msg)||"保存失败")});else return!1})},l=()=>{s("close",!1)};return c.onMounted(()=>{var u;(u=e.payload)!=null&&u.id&&(r.id=e.payload.id,r.groupName=e.payload.groupName,r.sort=e.payload.sort,r.isShow=e.payload.isShow)}),(u,h)=>{const f=c.resolveComponent("el-input"),d=c.resolveComponent("el-form-item"),g=c.resolveComponent("el-input-number"),p=c.resolveComponent("el-switch"),m=c.resolveComponent("el-button"),y=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",yj,[c.createVNode(y,{ref_key:"form",ref:o,model:r,rules:i,"label-width":"90px","label-suffix":":"},{default:c.withCtx(()=>[c.createVNode(d,{label:"分组名称",prop:"groupName"},{default:c.withCtx(()=>[c.createVNode(f,{modelValue:r.groupName,"onUpdate:modelValue":h[0]||(h[0]=b=>r.groupName=b),placeholder:"请输入分组名称",clearable:""},null,8,["modelValue"])]),_:1}),c.createVNode(d,{label:"排序",prop:"sort"},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:r.sort,"onUpdate:modelValue":h[1]||(h[1]=b=>r.sort=b),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),c.createVNode(d,{label:"是否显示",prop:"isShow"},{default:c.withCtx(()=>[c.createVNode(p,{modelValue:r.isShow,"onUpdate:modelValue":h[2]||(h[2]=b=>r.isShow=b),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),c.createElementVNode("div",bj,[c.createVNode(m,{type:"primary",onClick:a},{default:c.withCtx(()=>h[3]||(h[3]=[c.createTextVNode("保存")])),_:1}),c.createVNode(m,{onClick:l},{default:c.withCtx(()=>h[4]||(h[4]=[c.createTextVNode("取消")])),_:1})])]),_:1},8,["model","rules"])])}}},[["__scopeId","data-v-a2a7ce25"]]),xj={class:"form-container"},vj={class:"footer"},Cj=Gn({__name:"image-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:t}){const e=t,s=n,r=c.shallowRef(null),i=c.reactive({groupId:"",id:"",imageName:"",sort:0,isShow:1,imageUrl:""}),o={imageName:[{required:!0,message:"请输入图片名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}]},a=c.ref(""),l=f=>{if(f.raw.type.indexOf("image")===-1){Bt.error("请上传图片格式的文件");return}const d=new FormData;d.append("file",f.raw),DD("/cny/file/fileUpload",d).then(g=>{g!=null&&g.isOk?(a.value=hs.defaults.baseURL+"/cny/upload/"+(g==null?void 0:g.data),i.imageUrl=g==null?void 0:g.data):Bt.error((g==null?void 0:g.msg)||"上传失败")})},u=()=>{console.log(i),r.value.validate(f=>{if(f)$a("/cny/custom/savePicture",i).then(d=>{d!=null&&d.isOk?(Bt.success("保存成功"),e("close",!0)):Bt.error((d==null?void 0:d.msg)||"保存失败")});else return!1})},h=()=>{e("close",!1)};return c.onMounted(()=>{var f;(f=s.payload)!=null&&f.id&&(i.id=s.payload.id,i.imageName=s.payload.imageName,i.sort=s.payload.sort,i.isShow=s.payload.isShow,i.imageUrl=s.payload.imageUrl,a.value=i.imageUrl),i.groupId=s.payload.groupId}),(f,d)=>{const g=c.resolveComponent("el-input"),p=c.resolveComponent("el-form-item"),m=c.resolveComponent("el-input-number"),y=c.resolveComponent("el-switch"),b=c.resolveComponent("el-image"),w=c.resolveComponent("el-icon"),x=c.resolveComponent("el-upload"),v=c.resolveComponent("el-button"),S=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",xj,[c.createVNode(S,{ref_key:"form",ref:r,model:i,rules:o,"label-width":"90px","label-suffix":":"},{default:c.withCtx(()=>[c.createVNode(p,{label:"图片名称",prop:"imageName"},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:i.imageName,"onUpdate:modelValue":d[0]||(d[0]=E=>i.imageName=E),placeholder:"请输入图片名称"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"排序",prop:"sort"},{default:c.withCtx(()=>[c.createVNode(m,{modelValue:i.sort,"onUpdate:modelValue":d[1]||(d[1]=E=>i.sort=E),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"是否显示",prop:"isShow"},{default:c.withCtx(()=>[c.createVNode(y,{modelValue:i.isShow,"onUpdate:modelValue":d[2]||(d[2]=E=>i.isShow=E),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"上传",prop:"image"},{default:c.withCtx(()=>[c.createVNode(x,{action:"","list-type":"picture",class:"avatar-uploader","show-file-list":!1,"on-change":l,"auto-upload":!1},{default:c.withCtx(()=>[a.value?(c.openBlock(),c.createBlock(b,{key:0,src:a.value,fit:"cover",style:{width:"64px",height:"64px"}},null,8,["src"])):(c.openBlock(),c.createBlock(w,{key:1,class:"avatar-uploader-icon"},{default:c.withCtx(()=>[c.createVNode(c.unref(K2))]),_:1}))]),_:1})]),_:1}),c.createElementVNode("div",vj,[c.createVNode(v,{type:"primary",onClick:u},{default:c.withCtx(()=>d[3]||(d[3]=[c.createTextVNode("保存")])),_:1}),c.createVNode(v,{onClick:h},{default:c.withCtx(()=>d[4]||(d[4]=[c.createTextVNode("取消")])),_:1})])]),_:1},8,["model"])])}}},[["__scopeId","data-v-c7d87a18"]]),Sj={class:"form-container"},Ej={style:{padding:"0 10px",display:"flex","flex-direction":"column",gap:"5px","align-items":"flex-start"}},Oj=["src"],Mj=Gn({__name:"image-management",setup(n){const t=c.reactive({items:[]}),e=()=>{Yi("/cny/custom/groupList").then(d=>{t.items=d.data})},s=c.reactive({show:!1,title:"新增图片分组",payload:null}),r=()=>{s.show=!0,s.title="新增图片分组",s.payload=null},i=d=>{s.show=!0,s.title="编辑图片分组",s.payload={id:d.id,groupName:d.groupName,sort:d.sort,isShow:d.isShow}},o=d=>{Tm("/cny/custom/removeGroup/"+d).then(g=>{g.code===200?(Bt.success("删除成功"),e()):Bt.error(g.msg||"删除失败")})},a=c.reactive({show:!1,title:"新增图片",payload:null}),l=d=>{a.show=!0,a.title="新增图片",a.payload={groupId:d}},u=d=>{a.show=!0,a.title="编辑图片",a.payload={id:d.id,groupId:d.groupId,imageName:d.imageName,sort:d.sort,isShow:d.isShow,imageUrl:d.imageUrl}},h=d=>{Tm("/cny/custom/removePicture/"+d).then(g=>{g.code===200?(Bt.success("删除成功"),e()):Bt.error(g.msg||"删除失败")})},f=d=>{s.show=!1,a.show=!1,d&&e()};return c.onMounted(()=>{e()}),(d,g)=>{const p=c.resolveComponent("el-button"),m=c.resolveComponent("el-table-column"),y=c.resolveComponent("el-table"),b=c.resolveComponent("el-dialog");return c.openBlock(),c.createElementBlock("div",Sj,[c.createVNode(p,{type:"primary",onClick:r,size:"small"},{default:c.withCtx(()=>g[2]||(g[2]=[c.createTextVNode("新增图片分组")])),_:1}),c.createVNode(y,{data:t.items,border:"",height:"500"},{default:c.withCtx(()=>[c.createVNode(m,{type:"expand"},{default:c.withCtx(w=>[c.createElementVNode("div",Ej,[c.createVNode(p,{type:"primary",size:"small",onClick:x=>l(w.row.id)},{default:c.withCtx(()=>g[3]||(g[3]=[c.createTextVNode("新增图片")])),_:2},1032,["onClick"]),c.createVNode(y,{data:w.row.pictureList,border:"",size:"small"},{default:c.withCtx(()=>[c.createVNode(m,{label:"名称",prop:"imageName",align:"center"}),c.createVNode(m,{label:"图片",prop:"imageUrl",align:"center"},{default:c.withCtx(x=>[c.createElementVNode("img",{src:x.row.imageUrl,alt:"",style:{width:"64px",height:"64px"}},null,8,Oj)]),_:1}),c.createVNode(m,{label:"排序",prop:"sort",align:"center"}),c.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:c.withCtx(x=>[c.createTextVNode(c.toDisplayString(x.row.isShow===1?"是":"否"),1)]),_:1}),c.createVNode(m,{label:"操作",align:"center"},{default:c.withCtx(x=>[c.createVNode(p,{type:"primary",size:"small",onClick:v=>u(x.row)},{default:c.withCtx(()=>g[4]||(g[4]=[c.createTextVNode("编辑")])),_:2},1032,["onClick"]),c.createVNode(p,{type:"danger",size:"small",onClick:v=>h(x.row.id)},{default:c.withCtx(()=>g[5]||(g[5]=[c.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:2},1032,["data"])])]),_:1}),c.createVNode(m,{label:"分组名称",prop:"groupName",align:"center"}),c.createVNode(m,{label:"排序",prop:"sort",align:"center"}),c.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:c.withCtx(w=>[c.createTextVNode(c.toDisplayString(w.row.isShow===1?"是":"否"),1)]),_:1}),c.createVNode(m,{label:"操作",align:"center"},{default:c.withCtx(w=>[c.createVNode(p,{type:"primary",size:"small",onClick:x=>i(w.row)},{default:c.withCtx(()=>g[6]||(g[6]=[c.createTextVNode("编辑")])),_:2},1032,["onClick"]),c.createVNode(p,{type:"danger",size:"small",onClick:x=>o(w.row.id)},{default:c.withCtx(()=>g[7]||(g[7]=[c.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),c.createVNode(b,{modelValue:s.show,"onUpdate:modelValue":g[0]||(g[0]=w=>s.show=w),title:s.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[s.show?(c.openBlock(),c.createBlock(wj,{key:0,payload:s.payload,onClose:f},null,8,["payload"])):c.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),c.createVNode(b,{modelValue:a.show,"onUpdate:modelValue":g[1]||(g[1]=w=>a.show=w),title:a.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[a.show?(c.openBlock(),c.createBlock(Cj,{key:0,payload:a.payload,onClose:f},null,8,["payload"])):c.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}}},[["__scopeId","data-v-75a537f2"]]),Pj={class:"page-container"},Aj={class:"tool-bar"},Tj={class:"action"},Nj={class:"el-dropdown-link"},_j={class:"action",style:{"margin-right":"50px"}},kj={class:"board"},Dj={class:"drawing-board-box"},Rj={id:"controls"},Ij={key:0,class:"controls-label"},Lj={style:{width:"100%",height:"100%",background:"black"}},Wb=Gn(Object.assign({name:"editor"},{__name:"index",props:{id:{type:String,default:""}},emits:["getJson"],setup(n,{emit:t}){const e=n,s=c.ref(),r=c.reactive({label:null,component:c.shallowRef(null)}),i=c.ref(null),o=c.ref(null),a=()=>{const D=document.getElementById("drawing-board");window.__x6_instances__=[],s.value=new I({container:D,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center",createEdge(){return s.value.createEdge({inherit:"edge",attrs:{...vu},zIndex:0})}}}),window.__x6_instances__.push(s.value),s.value.use(new er({resizing:{enabled:!0,preserveAspectRatio:!1},rotating:!0})),s.value.use(new Fb),s.value.use(new jb),s.value.use(new $b({format(N){return N.replace(/\s/g,"").replace("cmd","command")}})),s.value.use(new oi),s.value.use(new ii({enabled:!0,multiple:!0,rubberband:!0,modifiers:["alt"],showNodeSelectionBox:!0})),s.value.bindKey(["delete","backspace"],()=>{const N=s.value.getSelectedCells();return N.length&&s.value.removeCells(N),!1}),s.value.bindKey(["ctrl+c","cmd + c"],()=>{const N=s.value.getSelectedCells();return N.length&&(s.value.copy(N),Bt.success("复制成功")),!1}),s.value.bindKey(["ctrl+v","cmd + v"],()=>{if(!s.value.isClipboardEmpty()){const N=s.value.paste({offset:32});s.value.cleanSelection(),s.value.select(N),Bt.success("粘贴成功")}return!1}),s.value.bindKey(["ctrl+z","cmd + z"],()=>(s.value.canUndo()&&s.value.undo(),!1)),s.value.bindKey(["ctrl+y","cmd + y"],()=>(s.value.canRedo()&&s.value.redo(),!1)),s.value.on("blank:click",({e:N,x:V,y:A})=>{o.value=s,r.component=jD,r.label="画布属性",i.value=G().valueOf()}),s.value.on("cell:click",({cell:N})=>{var V,A,P;if(console.log("cell:click",N,((V=N==null?void 0:N.data)==null?void 0:V.type)??(N==null?void 0:N.shape)),o.value=N,i.value=G().valueOf(),((A=N.data)==null?void 0:A.type)==="text"){r.component=Dm,r.label="文本属性";return}if(((P=N.data)==null?void 0:P.type)==="base-shape"){r.component=Dm,r.label="基础图形属性";return}if((N==null?void 0:N.shape)==="edge"){r.component=WD,r.label="连线属性";return}if((N==null?void 0:N.shape)==="image"){r.component=mj,r.label="图片属性";return}r.component=null,r.label=null}),s.value.on("edge:mouseenter",({cell:N})=>{N.addTools([{name:"vertices",args:{snapRadius:3,attrs:{r:3,fill:"#239edd",cursor:"move","stroke-width":0},modifiers:["alt"]}}])}),s.value.on("edge:mouseleave",({cell:N})=>{N.removeTools()}),s.value.on("node:mouseenter",()=>{Wi("#drawing-board",!0)}),s.value.on("node:mouseleave",()=>{Wi("#drawing-board",!1)}),s.value.use(new Gb)},l=c.ref(),u=()=>{l.value=new si({target:s.value,...ID,groups:[{name:"基础组件",graphPadding:30}],search(V,A){var P;return((P=V.label)==null?void 0:P.indexOf(A))!==-1},placeholder:"搜索",notFoundText:"未找到匹配项",getDragNode:V=>{const A=V.clone({keepId:!0});return A.label!=="文本"&&(A.label=""),A},getDropNode:V=>V.clone({keepId:!0})});const D=s.value.createNode({...LD}),N=yl.map(V=>(V.ports=Yb,s.value.createNode(V)));l.value.load([D,...N],"基础组件"),Yi("/cny/custom/groupList").then(V=>{const A=(V==null?void 0:V.data)||[];A==null||A.forEach(P=>{l.value.addGroup({name:P==null?void 0:P.groupName,graphPadding:30});const L=P==null?void 0:P.pictureList.map(j=>{const Y={shape:"image",imageUrl:j==null?void 0:j.imageUrl,ports:Yb,width:64,height:64,label:j.imageName};return s.value.createNode(Y)});l.value.load(L,P==null?void 0:P.groupName),document.getElementById("stencil").appendChild(l.value.container)})}).finally(()=>{setTimeout(()=>{l.value.container.querySelectorAll(".x6-node").forEach((A,P)=>{if(P>yl.length){const L=A.querySelector("text");A.style.position="relative",L&&(L.style.display="none",L.setAttribute("x","0%"),L.setAttribute("y","30%"),L.style.fontSize="12px",L.style.fontWeight="bold",L.style.fill="#ffffff")}A.addEventListener("mouseenter",L=>{if(P>yl.length){const j=A.querySelector("text");j&&(j.style.display="block")}}),A.addEventListener("mouseleave",L=>{if(P>yl.length){const j=A.querySelector("text");j&&(j.style.display="none")}})})},20)})},h=D=>{switch(D){case"snapLine":s.value.isSnaplineEnabled()?(s.value.disableSnapline(),Bt.warning("关闭对齐线")):(s.value.enableSnapline(),Bt.success("开启对齐线"));break;case"select":s.value.isSelectionEnabled()?(s.value.disableSelection(),Bt.warning("关闭框选")):(s.value.enableSelection(),Bt.success("开启框选"));break;case"drawLine":g();break;case"adaptive":p();break;case"shortcuts":y();break;case"image":w();break;case"clear":x();break;case"export":v();break}},f=c.ref(!1),d=c.ref(null),g=()=>{f.value=!0;const D=new Date;s.value.startBatch(D),s.value.disablePanning(),s.value.once("blank:mousedown",({e:N,x:V,y:A})=>{f.value&&(d.value=s.value.addEdge({source:{x:V,y:A},target:{x:V,y:A},attrs:vu,data:{type:"edge",isConnector:!1},zIndex:0}))}),s.value.on("blank:mousemove",({e:N,x:V,y:A})=>{f.value&&d.value.setTarget({x:V,y:A})}),s.value.on("blank:mouseup",({e:N,x:V,y:A})=>{f.value=!1,s.value.enablePanning(),s.value.stopBatch(D)})},p=()=>{s.value.zoomToFit({maxScale:1,padding:20})},m=c.reactive({show:!1}),y=()=>{m.show=!0},b=c.reactive({show:!1}),w=()=>{b.show=!0},x=()=>{s.value.clearCells(),s.value.drawBackground(_m),s.value.drawGrid(km),Bt.success("清空成功")},v=()=>{const D=G().format("YYYYMMDDHHmmss");s.value.exportPNG(D,{padding:10,quality:1,backgroundColor:s.value.options.background.color})},S=t,E=c.reactive({show:!1,background:null,grid:null,data:null}),C=()=>{E.background=s.value.options.background,E.grid=s.value.options.grid,E.data=s.value.toJSON(),E.show=!0},M=()=>{S("getJson",{background:s.value.options.background,grid:s.value.options.grid,data:s.value.toJSON()})},T=async()=>{if(!e.id){s.value.drawBackground(_m),s.value.drawGrid(km),s.value.fromJSON({cells:[]});return}const{background:D,grid:N,data:V}=await Nm(e.id);s.value.drawBackground(D),s.value.drawGrid(N),s.value.fromJSON(V),p()},k=c.shallowRef(null),_=()=>{new ResizeObserver(()=>{p()}).observe(k.value)};return c.onMounted(()=>{a(),u(),T(),_()}),(D,N)=>{const V=c.resolveComponent("el-icon"),A=c.resolveComponent("el-button"),P=c.resolveComponent("el-dropdown-item"),L=c.resolveComponent("el-dropdown-menu"),j=c.resolveComponent("el-dropdown"),Y=c.resolveComponent("el-scrollbar"),ot=c.resolveComponent("el-dialog"),F=c.resolveComponent("el-drawer");return c.openBlock(),c.createElementBlock("div",Pj,[c.createElementVNode("div",Aj,[c.createElementVNode("div",Tj,[c.createVNode(j,{onCommand:h},{dropdown:c.withCtx(()=>[c.createVNode(L,null,{default:c.withCtx(()=>[c.createVNode(P,{command:"snapLine"},{default:c.withCtx(()=>N[4]||(N[4]=[c.createTextVNode("对齐线")])),_:1}),c.createVNode(P,{command:"select"},{default:c.withCtx(()=>N[5]||(N[5]=[c.createTextVNode("框选")])),_:1}),c.createVNode(P,{command:"drawLine"},{default:c.withCtx(()=>N[6]||(N[6]=[c.createTextVNode("绘制直线")])),_:1}),c.createVNode(P,{command:"adaptive"},{default:c.withCtx(()=>N[7]||(N[7]=[c.createTextVNode("视图自适应")])),_:1}),c.createVNode(P,{command:"shortcuts"},{default:c.withCtx(()=>N[8]||(N[8]=[c.createTextVNode("查看快捷键")])),_:1}),c.createVNode(P,{command:"image"},{default:c.withCtx(()=>N[9]||(N[9]=[c.createTextVNode("图片管理")])),_:1}),c.createVNode(P,{command:"clear"},{default:c.withCtx(()=>N[10]||(N[10]=[c.createTextVNode("清空画布")])),_:1}),c.createVNode(P,{command:"export"},{default:c.withCtx(()=>N[11]||(N[11]=[c.createTextVNode("导出成图片")])),_:1})]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("span",Nj,[c.createVNode(A,{size:"small",text:""},{default:c.withCtx(()=>[N[3]||(N[3]=c.createTextVNode("工具 ")),c.createVNode(V,null,{default:c.withCtx(()=>[c.createVNode(c.unref(L2))]),_:1})]),_:1})])]),_:1})]),c.createElementVNode("div",_j,[c.createVNode(c.unref(Rp),{content:"预览",placement:"bottom"},{default:c.withCtx(()=>[c.createVNode(A,{size:"small",icon:c.unref(Cg),onClick:C},null,8,["icon"])]),_:1}),c.createVNode(c.unref(Rp),{content:"保存",placement:"bottom"},{default:c.withCtx(()=>[c.createVNode(A,{size:"small",icon:c.unref(G2),onClick:M},null,8,["icon"])]),_:1})])]),c.createElementVNode("div",kj,[N[12]||(N[12]=c.createElementVNode("div",{id:"stencil"},null,-1)),c.createElementVNode("div",Dj,[c.createElementVNode("div",{id:"drawing-board",ref_key:"drawBoard",ref:k},null,512)]),c.createElementVNode("div",Rj,[r.label?(c.openBlock(),c.createElementBlock("div",Ij,c.toDisplayString(r.label),1)):c.createCommentVNode("",!0),c.createVNode(Y,null,{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{graph:s.value,payload:o.value,key:i.value},null,8,["graph","payload"]))]),_:1})])]),c.createVNode(ot,{modelValue:m.show,"onUpdate:modelValue":N[0]||(N[0]=H=>m.show=H),width:"400px",title:"快捷键","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[c.createVNode(JD)]),_:1},8,["modelValue"]),c.createVNode(ot,{modelValue:b.show,"onUpdate:modelValue":N[1]||(N[1]=H=>b.show=H),width:"800px",title:"图片管理","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[c.createVNode(Mj)]),_:1},8,["modelValue"]),c.createVNode(F,{class:"no-border-drawer",modelValue:E.show,"onUpdate:modelValue":N[2]||(N[2]=H=>E.show=H),title:"预览",direction:"ttb",size:"100%"},{default:c.withCtx(()=>[c.createElementVNode("div",Lj,[E.show?(c.openBlock(),c.createBlock(hh,{key:0,background:E.background,grid:E.grid,data:E.data},null,8,["background","grid","data"])):c.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-74192f25"]]),Bj=[Wb,hh],qb=(n,t)=>{Bj.forEach(e=>{n.component(e.name,e)})};typeof window<"u"&&window.Vue&&qb(window.Vue);const Vj={install:qb};Rt.WiringDiagramEditor=Wb,Rt.WiringDiagramPreview=hh,Rt.default=Vj,Rt.setBaseURL=_D,Rt.setToken=kD,Object.defineProperties(Rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
738
+ `;I.prototype.isSelectionEnabled=function(){const n=this.getPlugin("selection");return n?n.isEnabled():!1},I.prototype.enableSelection=function(){const n=this.getPlugin("selection");return n&&n.enable(),this},I.prototype.disableSelection=function(){const n=this.getPlugin("selection");return n&&n.disable(),this},I.prototype.toggleSelection=function(n){const t=this.getPlugin("selection");return t&&t.toggleEnabled(n),this},I.prototype.isMultipleSelection=function(){const n=this.getPlugin("selection");return n?n.isMultipleSelection():!1},I.prototype.enableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.enableMultipleSelection(),this},I.prototype.disableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.disableMultipleSelection(),this},I.prototype.toggleMultipleSelection=function(n){const t=this.getPlugin("selection");return t&&t.toggleMultipleSelection(n),this},I.prototype.isSelectionMovable=function(){const n=this.getPlugin("selection");return n?n.isSelectionMovable():!1},I.prototype.enableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.enableSelectionMovable(),this},I.prototype.disableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.disableSelectionMovable(),this},I.prototype.toggleSelectionMovable=function(n){const t=this.getPlugin("selection");return t&&t.toggleSelectionMovable(n),this},I.prototype.isRubberbandEnabled=function(){const n=this.getPlugin("selection");return n?n.isRubberbandEnabled():!1},I.prototype.enableRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableRubberband(),this},I.prototype.disableRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableRubberband(),this},I.prototype.toggleRubberband=function(n){const t=this.getPlugin("selection");return t&&t.toggleRubberband(n),this},I.prototype.isStrictRubberband=function(){const n=this.getPlugin("selection");return n?n.isStrictRubberband():!1},I.prototype.enableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableStrictRubberband(),this},I.prototype.disableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableStrictRubberband(),this},I.prototype.toggleStrictRubberband=function(n){const t=this.getPlugin("selection");return t&&t.toggleStrictRubberband(n),this},I.prototype.setRubberbandModifiers=function(n){const t=this.getPlugin("selection");return t&&t.setRubberbandModifiers(n),this},I.prototype.setSelectionFilter=function(n){const t=this.getPlugin("selection");return t&&t.setSelectionFilter(n),this},I.prototype.setSelectionDisplayContent=function(n){const t=this.getPlugin("selection");return t&&t.setSelectionDisplayContent(n),this},I.prototype.isSelectionEmpty=function(){const n=this.getPlugin("selection");return n?n.isEmpty():!0},I.prototype.cleanSelection=function(n){const t=this.getPlugin("selection");return t&&t.clean(n),this},I.prototype.resetSelection=function(n,t){const e=this.getPlugin("selection");return e&&e.reset(n,t),this},I.prototype.getSelectedCells=function(){const n=this.getPlugin("selection");return n?n.getSelectedCells():[]},I.prototype.getSelectedCellCount=function(){const n=this.getPlugin("selection");return n?n.getSelectedCellCount():0},I.prototype.isSelected=function(n){const t=this.getPlugin("selection");return t?t.isSelected(n):!1},I.prototype.select=function(n,t){const e=this.getPlugin("selection");return e&&e.select(n,t),this},I.prototype.unselect=function(n,t){const e=this.getPlugin("selection");return e&&e.unselect(n,t),this};var fj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class ii extends Nt{get rubberbandDisabled(){return this.options.enabled!==!0||this.options.rubberband!==!0}get disabled(){return this.options.enabled!==!0}get length(){return this.selectionImpl.length}get cells(){return this.selectionImpl.cells}constructor(t={}){super(),this.name="selection",this.movedMap=new WeakMap,this.unselectMap=new WeakMap,this.options=Object.assign(Object.assign({enabled:!0},ii.defaultOptions),t),jr(this.name,dj)}init(t){this.graph=t,this.selectionImpl=new Hb(Object.assign(Object.assign({},this.options),{graph:t})),this.setup(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}isMultipleSelection(){return this.isMultiple()}enableMultipleSelection(){return this.enableMultiple(),this}disableMultipleSelection(){return this.disableMultiple(),this}toggleMultipleSelection(t){return t!=null?t!==this.isMultipleSelection()&&(t?this.enableMultipleSelection():this.disableMultipleSelection()):this.isMultipleSelection()?this.disableMultipleSelection():this.enableMultipleSelection(),this}isSelectionMovable(){return this.options.movable!==!1}enableSelectionMovable(){return this.selectionImpl.options.movable=!0,this}disableSelectionMovable(){return this.selectionImpl.options.movable=!1,this}toggleSelectionMovable(t){return t!=null?t!==this.isSelectionMovable()&&(t?this.enableSelectionMovable():this.disableSelectionMovable()):this.isSelectionMovable()?this.disableSelectionMovable():this.enableSelectionMovable(),this}isRubberbandEnabled(){return!this.rubberbandDisabled}enableRubberband(){return this.rubberbandDisabled&&(this.options.rubberband=!0),this}disableRubberband(){return this.rubberbandDisabled||(this.options.rubberband=!1),this}toggleRubberband(t){return t!=null?t!==this.isRubberbandEnabled()&&(t?this.enableRubberband():this.disableRubberband()):this.isRubberbandEnabled()?this.disableRubberband():this.enableRubberband(),this}isStrictRubberband(){return this.selectionImpl.options.strict===!0}enableStrictRubberband(){return this.selectionImpl.options.strict=!0,this}disableStrictRubberband(){return this.selectionImpl.options.strict=!1,this}toggleStrictRubberband(t){return t!=null?t!==this.isStrictRubberband()&&(t?this.enableStrictRubberband():this.disableStrictRubberband()):this.isStrictRubberband()?this.disableStrictRubberband():this.enableStrictRubberband(),this}setRubberbandModifiers(t){this.setModifiers(t)}setSelectionFilter(t){return this.setFilter(t),this}setSelectionDisplayContent(t){return this.setContent(t),this}isEmpty(){return this.length<=0}clean(t={}){return this.selectionImpl.clean(t),this}reset(t,e={}){return this.selectionImpl.reset(t?this.getCells(t):[],e),this}getSelectedCells(){return this.cells}getSelectedCellCount(){return this.length}isSelected(t){return this.selectionImpl.isSelected(t)}select(t,e={}){const s=this.getCells(t);return s.length&&(this.isMultiple()?this.selectionImpl.select(s,e):this.reset(s.slice(0,1),e)),this}unselect(t,e={}){return this.selectionImpl.unselect(this.getCells(t),e),this}setup(){this.selectionImpl.on("*",(t,e)=>{this.trigger(t,e),this.graph.trigger(t,e)})}startListening(){this.graph.on("blank:mousedown",this.onBlankMouseDown,this),this.graph.on("blank:click",this.onBlankClick,this),this.graph.on("cell:mousemove",this.onCellMouseMove,this),this.graph.on("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.on("box:mousedown",this.onBoxMouseDown,this)}stopListening(){this.graph.off("blank:mousedown",this.onBlankMouseDown,this),this.graph.off("blank:click",this.onBlankClick,this),this.graph.off("cell:mousemove",this.onCellMouseMove,this),this.graph.off("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.off("box:mousedown",this.onBoxMouseDown,this)}onBlankMouseDown({e:t}){if(!this.allowBlankMouseDown(t))return;const e=this.graph.panning.allowPanning(t,!0),s=this.graph.getPlugin("scroller"),r=s&&s.allowPanning(t,!0);(this.allowRubberband(t,!0)||this.allowRubberband(t)&&!r&&!e)&&this.startRubberband(t)}allowBlankMouseDown(t){const e=this.options.eventTypes;return(e==null?void 0:e.includes("leftMouseDown"))&&t.button===0||(e==null?void 0:e.includes("mouseWheelDown"))&&t.button===1}onBlankClick(){this.clean()}allowRubberband(t,e){return!this.rubberbandDisabled&&ms.isMatch(t,this.options.modifiers,e)}allowMultipleSelection(t){return this.isMultiple()&&ms.isMatch(t,this.options.multipleSelectionModifiers)}onCellMouseMove({cell:t}){this.movedMap.set(t,!0)}onCellMouseUp({e:t,cell:e}){const s=this.options;let r=this.disabled;!r&&this.movedMap.has(e)&&(r=s.selectCellOnMoved===!1,r||(r=s.selectNodeOnMoved===!1&&e.isNode()),r||(r=s.selectEdgeOnMoved===!1&&e.isEdge())),r||(this.allowMultipleSelection(t)?this.unselectMap.has(e)?this.unselectMap.delete(e):this.isSelected(e)?this.unselect(e):this.select(e):this.reset(e)),this.movedMap.delete(e)}onBoxMouseDown({e:t,cell:e}){this.disabled||this.allowMultipleSelection(t)&&(this.unselect(e),this.unselectMap.set(e,!0))}getCells(t){return(Array.isArray(t)?t:[t]).map(e=>typeof e=="string"?this.graph.getCellById(e):e).filter(e=>e!=null)}startRubberband(t){return this.rubberbandDisabled||this.selectionImpl.startSelecting(t),this}isMultiple(){return this.options.multiple!==!1}enableMultiple(){return this.options.multiple=!0,this}disableMultiple(){return this.options.multiple=!1,this}setModifiers(t){return this.options.modifiers=t,this}setContent(t){return this.selectionImpl.setContent(t),this}setFilter(t){return this.selectionImpl.setFilter(t),this}dispose(){this.stopListening(),this.off(),this.selectionImpl.dispose(),$r(this.name)}}fj([Nt.dispose()],ii.prototype,"dispose",null),function(n){n.defaultOptions={rubberband:!1,rubberNode:!0,rubberEdge:!1,pointerEvents:"auto",multiple:!0,multipleSelectionModifiers:["ctrl","meta"],movable:!0,strict:!1,selectCellOnMoved:!1,selectNodeOnMoved:!1,selectEdgeOnMoved:!1,following:!0,content:null,eventTypes:["leftMouseDown","mouseWheelDown"]}}(ii||(ii={})),I.prototype.isHistoryEnabled=function(){const n=this.getPlugin("history");return n?n.isEnabled():!1},I.prototype.enableHistory=function(){const n=this.getPlugin("history");return n&&n.enable(),this},I.prototype.disableHistory=function(){const n=this.getPlugin("history");return n&&n.disable(),this},I.prototype.toggleHistory=function(n){const t=this.getPlugin("history");return t&&t.toggleEnabled(n),this},I.prototype.undo=function(n){const t=this.getPlugin("history");return t&&t.undo(n),this},I.prototype.redo=function(n){const t=this.getPlugin("history");return t&&t.redo(n),this},I.prototype.undoAndCancel=function(n){const t=this.getPlugin("history");return t&&t.cancel(n),this},I.prototype.canUndo=function(){const n=this.getPlugin("history");return n?n.canUndo():!1},I.prototype.canRedo=function(){const n=this.getPlugin("history");return n?n.canRedo():!1},I.prototype.cleanHistory=function(n){const t=this.getPlugin("history");return t&&t.clean(n),this},I.prototype.getHistoryStackSize=function(){return this.getPlugin("history").getSize()},I.prototype.getUndoStackSize=function(){return this.getPlugin("history").getUndoSize()},I.prototype.getRedoStackSize=function(){return this.getPlugin("history").getRedoSize()},I.prototype.getUndoRemainSize=function(){return this.getPlugin("history").getUndoRemainSize()};var Ub=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class oi extends Nt{constructor(t={}){super(),this.name="history",this.batchCommands=null,this.batchLevel=0,this.lastBatchIndex=-1,this.freezed=!1,this.stackSize=0,this.handlers=[];const{stackSize:e=0}=t;this.stackSize=e,this.options=It.getOptions(t),this.validator=new oi.Validator({history:this,cancelInvalid:this.options.cancelInvalid})}init(t){this.graph=t,this.model=this.graph.model,this.clean(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}undo(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack.push(e),this.notify("undo",e,t))}return this}redo(t={}){if(!this.disabled){const e=this.redoStack.pop();e&&(this.applyCommand(e,t),this.undoStackPush(e),this.notify("redo",e,t))}return this}cancel(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack=[],this.notify("cancel",e,t))}return this}getSize(){return this.stackSize}getUndoRemainSize(){const t=this.undoStack.length;return this.stackSize-t}getUndoSize(){return this.undoStack.length}getRedoSize(){return this.redoStack.length}canUndo(){return!this.disabled&&this.undoStack.length>0}canRedo(){return!this.disabled&&this.redoStack.length>0}clean(t={}){return this.undoStack=[],this.redoStack=[],this.notify("clean",null,t),this}get disabled(){return this.options.enabled!==!0}validate(t,...e){return this.validator.validate(t,...e),this}startListening(){this.model.on("batch:start",this.initBatchCommand,this),this.model.on("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&this.options.eventNames.forEach((t,e)=>{this.handlers[e]=this.addCommand.bind(this,t),this.model.on(t,this.handlers[e])}),this.validator.on("invalid",t=>this.trigger("invalid",t))}stopListening(){this.model.off("batch:start",this.initBatchCommand,this),this.model.off("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&(this.options.eventNames.forEach((t,e)=>{this.model.off(t,this.handlers[e])}),this.handlers.length=0),this.validator.off("invalid")}createCommand(t){return{batch:t?t.batch:!1,data:{}}}revertCommand(t,e){this.freezed=!0;const s=Array.isArray(t)?It.sortBatchCommands(t):[t];for(let r=s.length-1;r>=0;r-=1){const i=s[r],o=Object.assign(Object.assign({},e),Mc(i.options,this.options.revertOptionsList||[]));this.executeCommand(i,!0,o)}this.freezed=!1}applyCommand(t,e){this.freezed=!0;const s=Array.isArray(t)?It.sortBatchCommands(t):[t];for(let r=0;r<s.length;r+=1){const i=s[r],o=Object.assign(Object.assign({},e),Mc(i.options,this.options.applyOptionsList||[]));this.executeCommand(i,!1,o)}this.freezed=!1}executeCommand(t,e,s){const r=this.model,i=r.getCell(t.data.id),o=t.event;if(It.isAddEvent(o)&&e||It.isRemoveEvent(o)&&!e)i&&i.remove(s);else if(It.isAddEvent(o)&&!e||It.isRemoveEvent(o)&&e){const a=t.data;a.node?r.addNode(a.props,s):a.edge&&r.addEdge(a.props,s)}else if(It.isChangeEvent(o)){const a=t.data,l=a.key;if(l&&i){const u=e?a.prev[l]:a.next[l];a.key==="attrs"&&this.ensureUndefinedAttrs(u,e?a.next[l]:a.prev[l])&&(s.dirty=!0),i.prop(l,u,s)}}else{const a=this.options.executeCommand;a&&X(a,this,t,e,s)}}addCommand(t,e){if(this.freezed||this.disabled)return;const s=e,r=s.options||{};if(r.dryrun||It.isAddEvent(t)&&this.options.ignoreAdd||It.isRemoveEvent(t)&&this.options.ignoreRemove||It.isChangeEvent(t)&&this.options.ignoreChange)return;const i=this.options.beforeAddCommand;if(i!=null&&X(i,this,t,e)===!1)return;t==="cell:change:*"&&(t=`cell:change:${s.key}`);const o=s.cell,a=Zt.isModel(o);let l;if(this.batchCommands){l=this.batchCommands[Math.max(this.lastBatchIndex,0)];const h=a&&!l.modelChange||l.data.id!==o.id,f=l.event!==t;if(this.lastBatchIndex>=0&&(h||f)){const d=this.batchCommands.findIndex(g=>(a&&g.modelChange||g.data.id===o.id)&&g.event===t);d<0||It.isAddEvent(t)||It.isRemoveEvent(t)?l=this.createCommand({batch:!0}):(l=this.batchCommands[d],this.batchCommands.splice(d,1)),this.batchCommands.push(l),this.lastBatchIndex=this.batchCommands.length-1}}else l=this.createCommand({batch:!1});if(It.isAddEvent(t)||It.isRemoveEvent(t)){const h=l.data;return l.event=t,l.options=r,h.id=o.id,h.props=Tt(o.toJSON()),o.isEdge()?h.edge=!0:o.isNode()&&(h.node=!0),this.push(l,r)}if(It.isChangeEvent(t)){const h=e.key,f=l.data;return(!l.batch||!l.event)&&(l.event=t,l.options=r,f.key=h,f.prev==null&&(f.prev={}),f.prev[h]=Tt(o.previous(h)),a?l.modelChange=!0:f.id=o.id),f.next==null&&(f.next={}),f.next[h]=Tt(o.prop(h)),this.push(l,r)}const u=this.options.afterAddCommand;u&&X(u,this,t,e,l),this.push(l,r)}initBatchCommand(t){this.freezed||(this.batchCommands?this.batchLevel+=1:(this.batchCommands=[this.createCommand({batch:!0})],this.batchLevel=0,this.lastBatchIndex=-1))}storeBatchCommand(t){if(!this.freezed)if(this.batchCommands&&this.batchLevel<=0){const e=this.filterBatchCommand(this.batchCommands);e.length>0&&(this.redoStack=[],this.undoStackPush(e),this.consolidateCommands(),this.notify("add",e,t)),this.batchCommands=null,this.lastBatchIndex=-1,this.batchLevel=0}else this.batchCommands&&this.batchLevel>0&&(this.batchLevel-=1)}filterBatchCommand(t){let e=t.slice();const s=[];for(;e.length>0;){const r=e.shift(),i=r.event,o=r.data.id;if(i!=null&&(o!=null||r.modelChange)){if(It.isAddEvent(i)){const a=e.findIndex(l=>It.isRemoveEvent(l.event)&&l.data.id===o);if(a>=0){e=e.filter((l,u)=>a<u||l.data.id!==o);continue}}else if(It.isRemoveEvent(i)){const a=e.findIndex(l=>It.isAddEvent(l.event)&&l.data.id===o);if(a>=0){e.splice(a,1);continue}}else if(It.isChangeEvent(i)){const a=r.data;if(wn(a.prev,a.next))continue}s.push(r)}}return s}notify(t,e,s){const r=e==null?null:Array.isArray(e)?e:[e];this.emit(t,{cmds:r,options:s}),this.graph.trigger(`history:${t}`,{cmds:r,options:s}),this.emit("change",{cmds:r,options:s}),this.graph.trigger("history:change",{cmds:r,options:s})}push(t,e){this.redoStack=[],t.batch?(this.lastBatchIndex=Math.max(this.lastBatchIndex,0),this.emit("batch",{cmd:t,options:e})):(this.undoStackPush(t),this.consolidateCommands(),this.notify("add",t,e))}consolidateCommands(){var t;const e=this.undoStack[this.undoStack.length-1],s=this.undoStack[this.undoStack.length-2];if(!Array.isArray(e))return;const r=new Set(e.map(o=>o.event));if(r.size!==2||!r.has("cell:change:parent")||!r.has("cell:change:children")||!e.every(o=>{var a;return o.batch&&((a=o.options)===null||a===void 0?void 0:a.ui)})||!Array.isArray(s)||s.length!==1)return;const i=s[0];i.event!=="cell:change:position"||!(!((t=i.options)===null||t===void 0)&&t.ui)||(s.push(...e),this.undoStack.pop())}undoStackPush(t){if(this.stackSize===0){this.undoStack.push(t);return}this.undoStack.length>=this.stackSize&&this.undoStack.shift(),this.undoStack.push(t)}ensureUndefinedAttrs(t,e){let s=!1;return t!==null&&e!==null&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(r=>{t[r]===void 0&&e[r]!==void 0?(t[r]=void 0,s=!0):typeof t[r]=="object"&&typeof e[r]=="object"&&(s=this.ensureUndefinedAttrs(t[r],e[r]))}),s}dispose(){this.validator.dispose(),this.clean(),this.stopListening(),this.off()}}Ub([Nt.dispose()],oi.prototype,"dispose",null),function(n){class t extends Nt{constructor(s){super(),this.map={},this.command=s.history,this.cancelInvalid=s.cancelInvalid!==!1,this.command.on("add",this.onCommandAdded,this)}onCommandAdded({cmds:s}){return Array.isArray(s)?s.every(r=>this.isValidCommand(r)):this.isValidCommand(s)}isValidCommand(s){if(s.options&&s.options.validation===!1)return!0;const r=s.event&&this.map[s.event]||[];let i=null;return r.forEach(o=>{let a=0;const l=u=>{const h=o[a];a+=1;try{if(h)h(u,s,l);else{i=u;return}}catch(f){l(f)}};l(i)}),i?(this.cancelInvalid&&this.command.cancel(),this.emit("invalid",{err:i}),!1):!0}validate(s,...r){const i=Array.isArray(s)?s:s.split(/\s+/);return r.forEach(o=>{if(typeof o!="function")throw new Error(`${i.join(" ")} requires callback functions.`)}),i.forEach(o=>{this.map[o]==null&&(this.map[o]=[]),this.map[o].push(r)}),this}dispose(){this.command.off("add",this.onCommandAdded,this)}}Ub([Nt.dispose()],t.prototype,"dispose",null),n.Validator=t}(oi||(oi={}));var It;(function(n){function t(o){return o==="cell:added"}n.isAddEvent=t;function e(o){return o==="cell:removed"}n.isRemoveEvent=e;function s(o){return o!=null&&o.startsWith("cell:change:")}n.isChangeEvent=s;function r(o){const a=["cell:added","cell:removed","cell:change:*"],l=["batch:start","batch:stop"],u=o.eventNames?o.eventNames.filter(h=>!(n.isChangeEvent(h)||a.includes(h)||l.includes(h))):a;return Object.assign(Object.assign({enabled:!0},o),{eventNames:u,applyOptionsList:o.applyOptionsList||["propertyPath"],revertOptionsList:o.revertOptionsList||["propertyPath"]})}n.getOptions=r;function i(o){const a=[];for(let l=0,u=o.length;l<u;l+=1){const h=o[l];let f=null;if(n.isAddEvent(h.event)){const d=h.data.id;for(let g=0;g<l;g+=1)if(o[g].data.id===d){f=g;break}}f!==null?a.splice(f,0,h):a.push(h)}return a}n.sortBatchCommands=i})(It||(It={})),I.prototype.toSVG=function(n,t){const e=this.getPlugin("export");e&&e.toSVG(n,t)},I.prototype.toPNG=function(n,t){const e=this.getPlugin("export");e&&e.toPNG(n,t)},I.prototype.toJPEG=function(n,t){const e=this.getPlugin("export");e&&e.toJPEG(n,t)},I.prototype.exportPNG=function(n,t){const e=this.getPlugin("export");e&&e.exportPNG(n,t)},I.prototype.exportJPEG=function(n,t){const e=this.getPlugin("export");e&&e.exportJPEG(n,t)},I.prototype.exportSVG=function(n,t){const e=this.getPlugin("export");e&&e.exportSVG(n,t)};var gj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Gb extends Nt{constructor(){super(),this.name="export"}get view(){return this.graph.view}init(t){this.graph=t}exportPNG(t="chart",e={}){this.toPNG(s=>{Ws.downloadDataUri(s,t)},e)}exportJPEG(t="chart",e={}){this.toPNG(s=>{Ws.downloadDataUri(s,t)},e)}exportSVG(t="chart",e={}){this.toSVG(s=>{Ws.downloadDataUri(Ws.svgToDataUrl(s),t)},e)}toSVG(t,e={}){this.notify("before:export",e);const s=this.view.svg,r=tt.create(s).clone();let i=r.node;const o=r.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),a=e.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),l=e.preserveDimensions;if(l){const f=typeof l=="boolean"?a:l;r.attr({width:f.width,height:f.height})}if(r.removeAttribute("style").attr("viewBox",[a.x,a.y,a.width,a.height].join(" ")),o.removeAttribute("transform"),e.copyStyles!==!1){const f=s.ownerDocument,d=Array.from(s.querySelectorAll("*")),g=Array.from(i.querySelectorAll("*")),p=f.styleSheets.length,m=[];for(let w=p-1;w>=0;w-=1)m[w]=f.styleSheets[w],f.styleSheets[w].disabled=!0;const y={};d.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S={};Object.keys(v).forEach(E=>{S[E]=v.getPropertyValue(E)}),y[x]=S}),p!==f.styleSheets.length&&m.forEach((w,x)=>{f.styleSheets[x]=w});for(let w=0;w<p;w+=1)f.styleSheets[w].disabled=!1;const b={};d.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S=y[x],E={};Object.keys(v).forEach(C=>{!Oc(C)&&v.getPropertyValue(C)!==S[C]&&(E[C]=v.getPropertyValue(C))}),b[x]=E}),g.forEach((w,x)=>{qt(w,b[x])})}const u=e.stylesheet;if(typeof u=="string"){const f=s.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(u);r.prepend(tt.create("style",{type:"text/css"},[f]))}const h=()=>{const f=e.beforeSerialize;if(typeof f=="function"){const g=X(f,this.graph,i);g instanceof SVGSVGElement&&(i=g)}const d=new XMLSerializer().serializeToString(i).replace(/&nbsp;/g," ");this.notify("after:export",e),t(d)};if(e.serializeImages){const f=r.find("image").map(d=>new Promise(g=>{const p=d.attr("xlink:href")||d.attr("href");Ws.imageToDataUri(p,(m,y)=>{!m&&y&&d.attr("xlink:href",y),g()})}));Promise.all(f).then(h)}else h()}toDataURL(t,e){let s=e.viewBox||this.graph.getContentBBox();const r=ds(e.padding);e.width&&e.height&&(r.left+r.right>=e.width&&(r.left=r.right=0),r.top+r.bottom>=e.height&&(r.top=r.bottom=0));const i=new z(-r.left,-r.top,r.left+r.right,r.top+r.bottom);if(e.width&&e.height){const h=s.width+r.left+r.right,f=s.height+r.top+r.bottom;i.scale(h/e.width,f/e.height)}s=z.create(s).moveAndExpand(i);const o=typeof e.width=="number"&&typeof e.height=="number"?{width:e.width,height:e.height}:s;let a=e.ratio?parseFloat(e.ratio):1;(!Number.isFinite(a)||a===0)&&(a=1);const l={width:Math.max(Math.round(o.width*a),1),height:Math.max(Math.round(o.height*a),1)};{const h=document.createElement("canvas"),f=h.getContext("2d");h.width=l.width,h.height=l.height;const d=l.width-1,g=l.height-1;f.fillStyle="rgb(1,1,1)",f.fillRect(d,g,1,1);const p=f.getImageData(d,g,1,1).data;if(p[0]!==1||p[1]!==1||p[2]!==1)throw new Error("size exceeded")}const u=new Image;u.onload=()=>{const h=document.createElement("canvas");h.width=l.width,h.height=l.height;const f=h.getContext("2d");f.fillStyle=e.backgroundColor||"white",f.fillRect(0,0,l.width,l.height);try{f.drawImage(u,0,0,l.width,l.height);const d=h.toDataURL(e.type,e.quality);t(d)}catch{}},this.toSVG(h=>{u.src=`data:image/svg+xml,${encodeURIComponent(h)}`},Object.assign(Object.assign({},e),{viewBox:s,serializeImages:!0,preserveDimensions:Object.assign({},l)}))}toPNG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/png"}))}toJPEG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/jpeg"}))}notify(t,e){this.trigger(t,e),this.graph.trigger(t,e)}dispose(){this.off()}}gj([Nt.dispose()],Gb.prototype,"dispose",null);const pj={class:"control-box"},mj=Gn({__name:"index",props:{payload:Object},setup(n){const t=n,e=c.ref("3"),s=c.ref([]),r=()=>{s.value=JSON.parse(JSON.stringify(t.payload.getPorts().map(u=>({id:u.id,attrs:u.attrs,args:{x:Number(u.args.x.replace("%","")),y:Number(u.args.y.replace("%",""))}}))))},i=()=>{const u=za;u.attrs.text.text=`${t.payload.getPorts().length+1}`,u.args.x="50%",u.args.y="50%",t.payload.addPorts([{group:"ports",...u}]),r()},o=()=>{Wi("#drawing-board",!0)},a=(u,h,f)=>{t.payload.portProp(u,"args/"+h,f+"%"),r()},l=u=>{t.payload.removePort(u),r()};return c.onMounted(()=>{r()}),(u,h)=>{const f=c.resolveComponent("el-button"),d=c.resolveComponent("el-table-column"),g=c.resolveComponent("el-slider"),p=c.resolveComponent("el-icon"),m=c.resolveComponent("el-table"),y=c.resolveComponent("el-collapse-item"),b=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",pj,[c.createVNode(b,{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=w=>e.value=w),accordion:""},{default:c.withCtx(()=>[c.createVNode(y,{title:"连接桩设置",name:"3"},{default:c.withCtx(()=>[c.createVNode(f,{type:"primary",onClick:i,size:"small"},{default:c.withCtx(()=>h[1]||(h[1]=[c.createTextVNode("添加连接桩")])),_:1}),c.createVNode(f,{type:"primary",onClick:o,size:"small"},{default:c.withCtx(()=>h[2]||(h[2]=[c.createTextVNode("显示连接桩")])),_:1}),c.createVNode(m,{data:s.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:c.withCtx(()=>[c.createVNode(d,{label:"ID",width:"50",align:"center"},{default:c.withCtx(({row:w})=>[c.createTextVNode(c.toDisplayString(w.attrs.text.text),1)]),_:1}),c.createVNode(d,{label:"x",width:"100",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(g,{modelValue:w.args.x,"onUpdate:modelValue":x=>w.args.x=x,min:0,max:100,step:1,onInput:x=>a(w.id,"x",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(d,{label:"y",width:"100",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(g,{modelValue:w.args.y,"onUpdate:modelValue":x=>w.args.y=x,min:0,max:100,step:1,onInput:x=>a(w.id,"y",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(d,{label:"操作",width:"70",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(f,{type:"danger",size:"small",onClick:x=>l(w.id)},{default:c.withCtx(()=>[c.createVNode(p,null,{default:c.withCtx(()=>[c.createVNode(c.unref(wg))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-b280098c"]]),yl=[{shape:"rect",width:60,height:5,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:0}},data:{type:"base-shape"}},{shape:"rect",width:60,height:20,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape",label:"母线"}},{shape:"circle",width:40,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape"}},{shape:"ellipse",width:60,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff"}},data:{type:"base-shape"}}],Yb={groups:{ports:{position:"absolute",args:{x:0,y:0},attrs:{circle:{magnet:!0,stroke:"#8f8f8f",r:4}},label:{position:"top"}}}},hh=Object.assign({name:"wiring-diagram-preview"},{__name:"index",props:{id:{type:String,default:""},background:{type:Object,default:()=>({})},grid:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},setup(n){const t=n,e=c.ref([]),s=c.ref(),r=()=>{const y=document.getElementById("preview-container");s.value=new I({container:y,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center"},interacting:{nodeMovable:!1,magnetConnectable:!1,edgeMovable:!1,edgeLabelMovable:!1,arrowheadMovable:!1,vertexMovable:!1,vertexAddable:!1,vertexDeletable:!1}}),s.value.on("blank:dblclick",()=>{h()})},i=async()=>{let y,b,w;if(t.id){const{background:x,grid:v,data:S}=await Nm(t.id);y=x,b={},w=S}else y=t.background,b={},w=t.data;s.value.drawBackground(y),s.value.drawGrid(b),s.value.fromJSON(w),l()},o=c.ref(null),a=c.ref([]),l=()=>{a.value=f();const y=/\$\{(.*?)\}/g;a.value.forEach(b=>{if(!b.data||!b.data.field)return;const w=b.data.content.match(y);e.value.push(...b.data.field),w&&(b.matches=w)}),a&&h()},u=c.ref(!0),h=async()=>{if(!e.value.length)return;if(!u.value){Bt.warning("数据正在更新中,请稍后再试");return}o.value&&clearInterval(o.value),u.value=!1;const y=await RD(e.value);if(u.value=!0,!Array.isArray(y)||!y.length)return;let b=0;a.value.forEach((w,x)=>{if(!w.data||!w.data.field)return;if(w.matches){const S=x===0?0:b||0,E=b=S+w.data.field.length;w.label=d(w.data.content,y.slice(S,E))}}),o.value=setTimeout(()=>{h()},1e4)},f=()=>s.value.getNodes().filter(b=>{var w;return((w=b.data)==null?void 0:w.type)==="text"}),d=(y,b)=>{let w=0;return y.replace(/\$\{.*?\}/g,()=>w<b.length?b[w++]:"--")},g=()=>{s.value.zoomToFit({maxScale:10,padding:20})},p=c.shallowRef(),m=()=>{new ResizeObserver(()=>{g()}).observe(p.value)};return c.onMounted(()=>{r(),i(),setTimeout(()=>{Wi("#preview-container",!1),g()},100),m()}),c.onUnmounted(()=>{clearInterval(o.value)}),(y,b)=>(c.openBlock(),c.createElementBlock("div",{id:"preview-container",ref_key:"previewRef",ref:p,onDblclick:g},null,544))}}),yj={class:"form-container"},bj={class:"footer"},wj=Gn({__name:"group-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:t}){const e=n,s=t,r=c.reactive({groupName:"",sort:1,isShow:1}),i=c.reactive({groupName:[{required:!0,message:"请输入分组名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}],isShow:[{required:!0,message:"请选择是否显示",trigger:"change"}]}),o=c.ref(),a=()=>{console.log(r),o.value.validate(u=>{if(u)r.id?$a("/cny/custom/updateGroup",r).then(h=>{h!=null&&h.isOk?(Bt.success("保存成功"),s("close",!0)):Bt.error((h==null?void 0:h.msg)||"保存失败")}):$a("/cny/custom/saveGroup",r).then(h=>{h!=null&&h.isOk?(Bt.success("保存成功"),s("close",!0)):Bt.error((h==null?void 0:h.msg)||"保存失败")});else return!1})},l=()=>{s("close",!1)};return c.onMounted(()=>{var u;(u=e.payload)!=null&&u.id&&(r.id=e.payload.id,r.groupName=e.payload.groupName,r.sort=e.payload.sort,r.isShow=e.payload.isShow)}),(u,h)=>{const f=c.resolveComponent("el-input"),d=c.resolveComponent("el-form-item"),g=c.resolveComponent("el-input-number"),p=c.resolveComponent("el-switch"),m=c.resolveComponent("el-button"),y=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",yj,[c.createVNode(y,{ref_key:"form",ref:o,model:r,rules:i,"label-width":"90px","label-suffix":":"},{default:c.withCtx(()=>[c.createVNode(d,{label:"分组名称",prop:"groupName"},{default:c.withCtx(()=>[c.createVNode(f,{modelValue:r.groupName,"onUpdate:modelValue":h[0]||(h[0]=b=>r.groupName=b),placeholder:"请输入分组名称",clearable:""},null,8,["modelValue"])]),_:1}),c.createVNode(d,{label:"排序",prop:"sort"},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:r.sort,"onUpdate:modelValue":h[1]||(h[1]=b=>r.sort=b),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),c.createVNode(d,{label:"是否显示",prop:"isShow"},{default:c.withCtx(()=>[c.createVNode(p,{modelValue:r.isShow,"onUpdate:modelValue":h[2]||(h[2]=b=>r.isShow=b),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),c.createElementVNode("div",bj,[c.createVNode(m,{type:"primary",onClick:a},{default:c.withCtx(()=>h[3]||(h[3]=[c.createTextVNode("保存")])),_:1}),c.createVNode(m,{onClick:l},{default:c.withCtx(()=>h[4]||(h[4]=[c.createTextVNode("取消")])),_:1})])]),_:1},8,["model","rules"])])}}},[["__scopeId","data-v-a2a7ce25"]]),xj={class:"form-container"},vj={class:"footer"},Cj=Gn({__name:"image-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:t}){const e=t,s=n,r=c.shallowRef(null),i=c.reactive({groupId:"",id:"",imageName:"",sort:0,isShow:1,imageUrl:""}),o={imageName:[{required:!0,message:"请输入图片名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}]},a=c.ref(""),l=f=>{if(f.raw.type.indexOf("image")===-1){Bt.error("请上传图片格式的文件");return}const d=new FormData;d.append("file",f.raw),DD("/cny/file/fileUpload",d).then(g=>{g!=null&&g.isOk?(a.value=hs.defaults.baseURL+"/cny/upload/"+(g==null?void 0:g.data),i.imageUrl=g==null?void 0:g.data):Bt.error((g==null?void 0:g.msg)||"上传失败")})},u=()=>{console.log(i),r.value.validate(f=>{if(f)$a("/cny/custom/savePicture",i).then(d=>{d!=null&&d.isOk?(Bt.success("保存成功"),e("close",!0)):Bt.error((d==null?void 0:d.msg)||"保存失败")});else return!1})},h=()=>{e("close",!1)};return c.onMounted(()=>{var f;(f=s.payload)!=null&&f.id&&(i.id=s.payload.id,i.imageName=s.payload.imageName,i.sort=s.payload.sort,i.isShow=s.payload.isShow,i.imageUrl=s.payload.imageUrl,a.value=i.imageUrl),i.groupId=s.payload.groupId}),(f,d)=>{const g=c.resolveComponent("el-input"),p=c.resolveComponent("el-form-item"),m=c.resolveComponent("el-input-number"),y=c.resolveComponent("el-switch"),b=c.resolveComponent("el-image"),w=c.resolveComponent("el-icon"),x=c.resolveComponent("el-upload"),v=c.resolveComponent("el-button"),S=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",xj,[c.createVNode(S,{ref_key:"form",ref:r,model:i,rules:o,"label-width":"90px","label-suffix":":"},{default:c.withCtx(()=>[c.createVNode(p,{label:"图片名称",prop:"imageName"},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:i.imageName,"onUpdate:modelValue":d[0]||(d[0]=E=>i.imageName=E),placeholder:"请输入图片名称"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"排序",prop:"sort"},{default:c.withCtx(()=>[c.createVNode(m,{modelValue:i.sort,"onUpdate:modelValue":d[1]||(d[1]=E=>i.sort=E),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"是否显示",prop:"isShow"},{default:c.withCtx(()=>[c.createVNode(y,{modelValue:i.isShow,"onUpdate:modelValue":d[2]||(d[2]=E=>i.isShow=E),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"上传",prop:"image"},{default:c.withCtx(()=>[c.createVNode(x,{action:"","list-type":"picture",class:"avatar-uploader","show-file-list":!1,"on-change":l,"auto-upload":!1},{default:c.withCtx(()=>[a.value?(c.openBlock(),c.createBlock(b,{key:0,src:a.value,fit:"cover",style:{width:"64px",height:"64px"}},null,8,["src"])):(c.openBlock(),c.createBlock(w,{key:1,class:"avatar-uploader-icon"},{default:c.withCtx(()=>[c.createVNode(c.unref(K2))]),_:1}))]),_:1})]),_:1}),c.createElementVNode("div",vj,[c.createVNode(v,{type:"primary",onClick:u},{default:c.withCtx(()=>d[3]||(d[3]=[c.createTextVNode("保存")])),_:1}),c.createVNode(v,{onClick:h},{default:c.withCtx(()=>d[4]||(d[4]=[c.createTextVNode("取消")])),_:1})])]),_:1},8,["model"])])}}},[["__scopeId","data-v-c7d87a18"]]),Sj={class:"form-container"},Ej={style:{padding:"0 10px",display:"flex","flex-direction":"column",gap:"5px","align-items":"flex-start"}},Oj=["src"],Mj=Gn({__name:"image-management",setup(n){const t=c.reactive({items:[]}),e=()=>{Yi("/cny/custom/groupList").then(d=>{t.items=d.data})},s=c.reactive({show:!1,title:"新增图片分组",payload:null}),r=()=>{s.show=!0,s.title="新增图片分组",s.payload=null},i=d=>{s.show=!0,s.title="编辑图片分组",s.payload={id:d.id,groupName:d.groupName,sort:d.sort,isShow:d.isShow}},o=d=>{Tm("/cny/custom/removeGroup/"+d).then(g=>{g.code===200?(Bt.success("删除成功"),e()):Bt.error(g.msg||"删除失败")})},a=c.reactive({show:!1,title:"新增图片",payload:null}),l=d=>{a.show=!0,a.title="新增图片",a.payload={groupId:d}},u=d=>{a.show=!0,a.title="编辑图片",a.payload={id:d.id,groupId:d.groupId,imageName:d.imageName,sort:d.sort,isShow:d.isShow,imageUrl:d.imageUrl}},h=d=>{Tm("/cny/custom/removePicture/"+d).then(g=>{g.code===200?(Bt.success("删除成功"),e()):Bt.error(g.msg||"删除失败")})},f=d=>{s.show=!1,a.show=!1,d&&e()};return c.onMounted(()=>{e()}),(d,g)=>{const p=c.resolveComponent("el-button"),m=c.resolveComponent("el-table-column"),y=c.resolveComponent("el-table"),b=c.resolveComponent("el-dialog");return c.openBlock(),c.createElementBlock("div",Sj,[c.createVNode(p,{type:"primary",onClick:r,size:"small"},{default:c.withCtx(()=>g[2]||(g[2]=[c.createTextVNode("新增图片分组")])),_:1}),c.createVNode(y,{data:t.items,border:"",height:"500"},{default:c.withCtx(()=>[c.createVNode(m,{type:"expand"},{default:c.withCtx(w=>[c.createElementVNode("div",Ej,[c.createVNode(p,{type:"primary",size:"small",onClick:x=>l(w.row.id)},{default:c.withCtx(()=>g[3]||(g[3]=[c.createTextVNode("新增图片")])),_:2},1032,["onClick"]),c.createVNode(y,{data:w.row.pictureList,border:"",size:"small"},{default:c.withCtx(()=>[c.createVNode(m,{label:"名称",prop:"imageName",align:"center"}),c.createVNode(m,{label:"图片",prop:"imageUrl",align:"center"},{default:c.withCtx(x=>[c.createElementVNode("img",{src:x.row.imageUrl,alt:"",style:{width:"64px",height:"64px"}},null,8,Oj)]),_:1}),c.createVNode(m,{label:"排序",prop:"sort",align:"center"}),c.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:c.withCtx(x=>[c.createTextVNode(c.toDisplayString(x.row.isShow===1?"是":"否"),1)]),_:1}),c.createVNode(m,{label:"操作",align:"center"},{default:c.withCtx(x=>[c.createVNode(p,{type:"primary",size:"small",onClick:v=>u(x.row)},{default:c.withCtx(()=>g[4]||(g[4]=[c.createTextVNode("编辑")])),_:2},1032,["onClick"]),c.createVNode(p,{type:"danger",size:"small",onClick:v=>h(x.row.id)},{default:c.withCtx(()=>g[5]||(g[5]=[c.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:2},1032,["data"])])]),_:1}),c.createVNode(m,{label:"分组名称",prop:"groupName",align:"center"}),c.createVNode(m,{label:"排序",prop:"sort",align:"center"}),c.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:c.withCtx(w=>[c.createTextVNode(c.toDisplayString(w.row.isShow===1?"是":"否"),1)]),_:1}),c.createVNode(m,{label:"操作",align:"center"},{default:c.withCtx(w=>[c.createVNode(p,{type:"primary",size:"small",onClick:x=>i(w.row)},{default:c.withCtx(()=>g[6]||(g[6]=[c.createTextVNode("编辑")])),_:2},1032,["onClick"]),c.createVNode(p,{type:"danger",size:"small",onClick:x=>o(w.row.id)},{default:c.withCtx(()=>g[7]||(g[7]=[c.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),c.createVNode(b,{modelValue:s.show,"onUpdate:modelValue":g[0]||(g[0]=w=>s.show=w),title:s.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[s.show?(c.openBlock(),c.createBlock(wj,{key:0,payload:s.payload,onClose:f},null,8,["payload"])):c.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),c.createVNode(b,{modelValue:a.show,"onUpdate:modelValue":g[1]||(g[1]=w=>a.show=w),title:a.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[a.show?(c.openBlock(),c.createBlock(Cj,{key:0,payload:a.payload,onClose:f},null,8,["payload"])):c.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}}},[["__scopeId","data-v-75a537f2"]]),Pj={class:"page-container"},Aj={class:"tool-bar"},Tj={class:"action"},Nj={class:"el-dropdown-link"},_j={class:"action",style:{"margin-right":"50px"}},kj={class:"board"},Dj={class:"drawing-board-box"},Rj={id:"controls"},Ij={key:0,class:"controls-label"},Lj={style:{width:"100%",height:"100%",background:"black"}},Wb=Gn(Object.assign({name:"editor"},{__name:"index",props:{id:{type:String,default:""}},emits:["getJson"],setup(n,{emit:t}){const e=n,s=c.ref(),r=c.reactive({label:null,component:c.shallowRef(null)}),i=c.ref(null),o=c.ref(null),a=()=>{const D=document.getElementById("drawing-board");window.__x6_instances__=[],s.value=new I({container:D,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center",createEdge(){return s.value.createEdge({inherit:"edge",attrs:{...vu},zIndex:0})}}}),window.__x6_instances__.push(s.value),s.value.use(new er({resizing:{enabled:!0,preserveAspectRatio:!1},rotating:!0})),s.value.use(new Fb),s.value.use(new jb),s.value.use(new $b({format(N){return N.replace(/\s/g,"").replace("cmd","command")}})),s.value.use(new oi),s.value.use(new ii({enabled:!0,multiple:!0,rubberband:!0,modifiers:["alt"],showNodeSelectionBox:!0})),s.value.bindKey(["delete","backspace"],()=>{const N=s.value.getSelectedCells();return N.length&&s.value.removeCells(N),!1}),s.value.bindKey(["ctrl+c","cmd + c"],()=>{const N=s.value.getSelectedCells();return N.length&&(s.value.copy(N),Bt.success("复制成功")),!1}),s.value.bindKey(["ctrl+v","cmd + v"],()=>{if(!s.value.isClipboardEmpty()){const N=s.value.paste({offset:32});s.value.cleanSelection(),s.value.select(N),Bt.success("粘贴成功")}return!1}),s.value.bindKey(["ctrl+z","cmd + z"],()=>(s.value.canUndo()&&s.value.undo(),!1)),s.value.bindKey(["ctrl+y","cmd + y"],()=>(s.value.canRedo()&&s.value.redo(),!1)),s.value.on("blank:click",({e:N,x:j,y:A})=>{o.value=s,r.component=jD,r.label="画布属性",i.value=G().valueOf()}),s.value.on("cell:click",({cell:N})=>{var j,A,P;if(console.log("cell:click",N,((j=N==null?void 0:N.data)==null?void 0:j.type)??(N==null?void 0:N.shape)),o.value=N,i.value=G().valueOf(),((A=N.data)==null?void 0:A.type)==="text"){r.component=Dm,r.label="文本属性";return}if(((P=N.data)==null?void 0:P.type)==="base-shape"){r.component=Dm,r.label="基础图形属性";return}if((N==null?void 0:N.shape)==="edge"){r.component=WD,r.label="连线属性";return}if((N==null?void 0:N.shape)==="image"){r.component=mj,r.label="图片属性";return}r.component=null,r.label=null}),s.value.on("edge:mouseenter",({cell:N})=>{N.addTools([{name:"vertices",args:{snapRadius:3,attrs:{r:3,fill:"#239edd",cursor:"move","stroke-width":0},modifiers:["alt"]}}])}),s.value.on("edge:mouseleave",({cell:N})=>{N.removeTools()}),s.value.on("node:mouseenter",()=>{Wi("#drawing-board",!0)}),s.value.on("node:mouseleave",()=>{Wi("#drawing-board",!1)}),s.value.use(new Gb)},l=c.ref(),u=()=>{l.value=new si({target:s.value,...ID,groups:[{name:"基础组件",graphPadding:30}],search(j,A){var P;return((P=j.label)==null?void 0:P.indexOf(A))!==-1},placeholder:"搜索",notFoundText:"未找到匹配项",getDragNode:j=>{const A=j.clone({keepId:!0});return A.label!=="文本"&&(A.label=""),A}});const D=s.value.createNode({...LD}),N=yl.map(j=>(j.ports=Yb,s.value.createNode(j)));l.value.load([D,...N],"基础组件"),Yi("/cny/custom/groupList").then(j=>{const A=(j==null?void 0:j.data)||[];A==null||A.forEach(P=>{l.value.addGroup({name:P==null?void 0:P.groupName,graphPadding:30});const L=P==null?void 0:P.pictureList.map(V=>{const Y={shape:"image",imageUrl:V==null?void 0:V.imageUrl,ports:Yb,width:64,height:64,label:V.imageName};return s.value.createNode(Y)});l.value.load(L,P==null?void 0:P.groupName),document.getElementById("stencil").appendChild(l.value.container)})}).finally(()=>{setTimeout(()=>{l.value.container.querySelectorAll(".x6-node").forEach((A,P)=>{if(P>yl.length){const L=A.querySelector("text");A.style.position="relative",L&&(L.style.display="none",L.setAttribute("x","0%"),L.setAttribute("y","40"),L.style.fontSize="12px",L.style.fill="#ffffff")}A.addEventListener("mouseenter",L=>{if(P>yl.length){const V=A.querySelector("text");V&&(V.style.display="block")}}),A.addEventListener("mouseleave",L=>{if(P>yl.length){const V=A.querySelector("text");V&&(V.style.display="none")}})})},20)})},h=D=>{switch(D){case"snapLine":s.value.isSnaplineEnabled()?(s.value.disableSnapline(),Bt.warning("关闭对齐线")):(s.value.enableSnapline(),Bt.success("开启对齐线"));break;case"select":s.value.isSelectionEnabled()?(s.value.disableSelection(),Bt.warning("关闭框选")):(s.value.enableSelection(),Bt.success("开启框选"));break;case"drawLine":g();break;case"adaptive":p();break;case"shortcuts":y();break;case"image":w();break;case"clear":x();break;case"export":v();break}},f=c.ref(!1),d=c.ref(null),g=()=>{f.value=!0;const D=new Date;s.value.startBatch(D),s.value.disablePanning(),s.value.once("blank:mousedown",({e:N,x:j,y:A})=>{f.value&&(d.value=s.value.addEdge({source:{x:j,y:A},target:{x:j,y:A},attrs:vu,data:{type:"edge",isConnector:!1},zIndex:0}))}),s.value.on("blank:mousemove",({e:N,x:j,y:A})=>{f.value&&d.value.setTarget({x:j,y:A})}),s.value.on("blank:mouseup",({e:N,x:j,y:A})=>{f.value=!1,s.value.enablePanning(),s.value.stopBatch(D)})},p=()=>{s.value.zoomToFit({maxScale:1,padding:20})},m=c.reactive({show:!1}),y=()=>{m.show=!0},b=c.reactive({show:!1}),w=()=>{b.show=!0},x=()=>{s.value.clearCells(),s.value.drawBackground(_m),s.value.drawGrid(km),Bt.success("清空成功")},v=()=>{const D=G().format("YYYYMMDDHHmmss");s.value.exportPNG(D,{padding:10,quality:1,backgroundColor:s.value.options.background.color})},S=t,E=c.reactive({show:!1,background:null,grid:null,data:null}),C=()=>{E.background=s.value.options.background,E.grid=s.value.options.grid,E.data=s.value.toJSON(),E.show=!0},M=()=>{S("getJson",{background:s.value.options.background,grid:s.value.options.grid,data:s.value.toJSON()})},T=async()=>{if(!e.id){s.value.drawBackground(_m),s.value.drawGrid(km),s.value.fromJSON({cells:[]});return}const{background:D,grid:N,data:j}=await Nm(e.id);s.value.drawBackground(D),s.value.drawGrid(N),s.value.fromJSON(j),p()},k=c.shallowRef(null),_=()=>{new ResizeObserver(()=>{p()}).observe(k.value)};return c.onMounted(()=>{a(),u(),T(),_()}),(D,N)=>{const j=c.resolveComponent("el-icon"),A=c.resolveComponent("el-button"),P=c.resolveComponent("el-dropdown-item"),L=c.resolveComponent("el-dropdown-menu"),V=c.resolveComponent("el-dropdown"),Y=c.resolveComponent("el-scrollbar"),ot=c.resolveComponent("el-dialog"),F=c.resolveComponent("el-drawer");return c.openBlock(),c.createElementBlock("div",Pj,[c.createElementVNode("div",Aj,[c.createElementVNode("div",Tj,[c.createVNode(V,{onCommand:h},{dropdown:c.withCtx(()=>[c.createVNode(L,null,{default:c.withCtx(()=>[c.createVNode(P,{command:"snapLine"},{default:c.withCtx(()=>N[4]||(N[4]=[c.createTextVNode("对齐线")])),_:1}),c.createVNode(P,{command:"select"},{default:c.withCtx(()=>N[5]||(N[5]=[c.createTextVNode("框选")])),_:1}),c.createVNode(P,{command:"drawLine"},{default:c.withCtx(()=>N[6]||(N[6]=[c.createTextVNode("绘制直线")])),_:1}),c.createVNode(P,{command:"adaptive"},{default:c.withCtx(()=>N[7]||(N[7]=[c.createTextVNode("视图自适应")])),_:1}),c.createVNode(P,{command:"shortcuts"},{default:c.withCtx(()=>N[8]||(N[8]=[c.createTextVNode("查看快捷键")])),_:1}),c.createVNode(P,{command:"image"},{default:c.withCtx(()=>N[9]||(N[9]=[c.createTextVNode("图片管理")])),_:1}),c.createVNode(P,{command:"clear"},{default:c.withCtx(()=>N[10]||(N[10]=[c.createTextVNode("清空画布")])),_:1}),c.createVNode(P,{command:"export"},{default:c.withCtx(()=>N[11]||(N[11]=[c.createTextVNode("导出成图片")])),_:1})]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("span",Nj,[c.createVNode(A,{size:"small",text:""},{default:c.withCtx(()=>[N[3]||(N[3]=c.createTextVNode("工具 ")),c.createVNode(j,null,{default:c.withCtx(()=>[c.createVNode(c.unref(L2))]),_:1})]),_:1})])]),_:1})]),c.createElementVNode("div",_j,[c.createVNode(c.unref(Rp),{content:"预览",placement:"bottom"},{default:c.withCtx(()=>[c.createVNode(A,{size:"small",icon:c.unref(Cg),onClick:C},null,8,["icon"])]),_:1}),c.createVNode(c.unref(Rp),{content:"保存",placement:"bottom"},{default:c.withCtx(()=>[c.createVNode(A,{size:"small",icon:c.unref(G2),onClick:M},null,8,["icon"])]),_:1})])]),c.createElementVNode("div",kj,[N[12]||(N[12]=c.createElementVNode("div",{id:"stencil"},null,-1)),c.createElementVNode("div",Dj,[c.createElementVNode("div",{id:"drawing-board",ref_key:"drawBoard",ref:k},null,512)]),c.createElementVNode("div",Rj,[r.label?(c.openBlock(),c.createElementBlock("div",Ij,c.toDisplayString(r.label),1)):c.createCommentVNode("",!0),c.createVNode(Y,null,{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{graph:s.value,payload:o.value,key:i.value},null,8,["graph","payload"]))]),_:1})])]),c.createVNode(ot,{modelValue:m.show,"onUpdate:modelValue":N[0]||(N[0]=H=>m.show=H),width:"400px",title:"快捷键","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[c.createVNode(JD)]),_:1},8,["modelValue"]),c.createVNode(ot,{modelValue:b.show,"onUpdate:modelValue":N[1]||(N[1]=H=>b.show=H),width:"800px",title:"图片管理","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[c.createVNode(Mj)]),_:1},8,["modelValue"]),c.createVNode(F,{class:"no-border-drawer",modelValue:E.show,"onUpdate:modelValue":N[2]||(N[2]=H=>E.show=H),title:"预览",direction:"ttb",size:"100%"},{default:c.withCtx(()=>[c.createElementVNode("div",Lj,[E.show?(c.openBlock(),c.createBlock(hh,{key:0,background:E.background,grid:E.grid,data:E.data},null,8,["background","grid","data"])):c.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-24c3e5a5"]]),Bj=[Wb,hh],qb=(n,t)=>{Bj.forEach(e=>{n.component(e.name,e)})};typeof window<"u"&&window.Vue&&qb(window.Vue);const Vj={install:qb};Rt.WiringDiagramEditor=Wb,Rt.WiringDiagramPreview=hh,Rt.default=Vj,Rt.setBaseURL=_D,Rt.setToken=kD,Object.defineProperties(Rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});