@abi-software/map-utilities 1.1.3-beta.2 → 1.1.3-beta.4

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.
@@ -1,15 +1,15 @@
1
- (function(Ke,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(Ke=typeof globalThis<"u"?globalThis:Ke||self,s(Ke.MapUtilities={},Ke.Vue))})(this,function(Ke,s){"use strict";var XP=Object.defineProperty;var ZP=(Ke,s,It)=>s in Ke?XP(Ke,s,{enumerable:!0,configurable:!0,writable:!0,value:It}):Ke[s]=It;var Br=(Ke,s,It)=>ZP(Ke,typeof s!="symbol"?s+"":s,It);const It=(t,e,{checkForDefaultPrevented:r=!0}={})=>a=>{const i=t==null?void 0:t(a);if(r===!1||!i)return e==null?void 0:e(a)};var Vc;const et=typeof window<"u",gg=t=>typeof t=="string",$c=()=>{},Ts=et&&((Vc=window==null?void 0:window.navigator)==null?void 0:Vc.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function zc(t){return typeof t=="function"?t():s.unref(t)}function mg(t){return t}function Wi(t){return s.getCurrentScope()?(s.onScopeDispose(t),!0):!1}function yg(t,e=!0){s.getCurrentInstance()?s.onMounted(t):e?t():s.nextTick(t)}function Nr(t){var e;const r=zc(t);return(e=r==null?void 0:r.$el)!=null?e:r}const ji=et?window:void 0;function jt(...t){let e,r,n,a;if(gg(t[0])||Array.isArray(t[0])?([r,n,a]=t,e=ji):[e,r,n,a]=t,!e)return $c;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const i=[],o=()=>{i.forEach(d=>d()),i.length=0},l=(d,f,p,v)=>(d.addEventListener(f,p,v),()=>d.removeEventListener(f,p,v)),u=s.watch(()=>[Nr(e),zc(a)],([d,f])=>{o(),d&&i.push(...r.flatMap(p=>n.map(v=>l(d,p,v,f))))},{immediate:!0,flush:"post"}),c=()=>{u(),o()};return Wi(c),c}let Hc=!1;function bg(t,e,r={}){const{window:n=ji,ignore:a=[],capture:i=!0,detectIframe:o=!1}=r;if(!n)return;Ts&&!Hc&&(Hc=!0,Array.from(n.document.body.children).forEach(p=>p.addEventListener("click",$c)));let l=!0;const u=p=>a.some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(h=>h===p.target||p.composedPath().includes(h));{const h=Nr(v);return h&&(p.target===h||p.composedPath().includes(h))}}),d=[jt(n,"click",p=>{const v=Nr(t);if(!(!v||v===p.target||p.composedPath().includes(v))){if(p.detail===0&&(l=!u(p)),!l){l=!0;return}e(p)}},{passive:!0,capture:i}),jt(n,"pointerdown",p=>{const v=Nr(t);v&&(l=!p.composedPath().includes(v)&&!u(p))},{passive:!0}),o&&jt(n,"blur",p=>{var v;const h=Nr(t);((v=n.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(h!=null&&h.contains(n.document.activeElement))&&e(p)})].filter(Boolean);return()=>d.forEach(p=>p())}function Kc(t,e=!1){const r=s.ref(),n=()=>r.value=!!t();return n(),yg(n,e),r}const qc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Uc="__vueuse_ssr_handlers__";qc[Uc]=qc[Uc]||{};var Gc=Object.getOwnPropertySymbols,wg=Object.prototype.hasOwnProperty,Cg=Object.prototype.propertyIsEnumerable,kg=(t,e)=>{var r={};for(var n in t)wg.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Gc)for(var n of Gc(t))e.indexOf(n)<0&&Cg.call(t,n)&&(r[n]=t[n]);return r};function Dr(t,e,r={}){const n=r,{window:a=ji}=n,i=kg(n,["window"]);let o;const l=Kc(()=>a&&"ResizeObserver"in a),u=()=>{o&&(o.disconnect(),o=void 0)},c=s.watch(()=>Nr(t),f=>{u(),l.value&&a&&f&&(o=new ResizeObserver(e),o.observe(f,i))},{immediate:!0,flush:"post"}),d=()=>{u(),c()};return Wi(d),{isSupported:l,stop:d}}var Wc=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,Eg=Object.prototype.propertyIsEnumerable,Sg=(t,e)=>{var r={};for(var n in t)xg.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Wc)for(var n of Wc(t))e.indexOf(n)<0&&Eg.call(t,n)&&(r[n]=t[n]);return r};function Tg(t,e,r={}){const n=r,{window:a=ji}=n,i=Sg(n,["window"]);let o;const l=Kc(()=>a&&"MutationObserver"in a),u=()=>{o&&(o.disconnect(),o=void 0)},c=s.watch(()=>Nr(t),f=>{u(),l.value&&a&&f&&(o=new MutationObserver(e),o.observe(f,i))},{immediate:!0}),d=()=>{u(),c()};return Wi(d),{isSupported:l,stop:d}}var jc;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(jc||(jc={}));var Bg=Object.defineProperty,Yc=Object.getOwnPropertySymbols,Ng=Object.prototype.hasOwnProperty,Dg=Object.prototype.propertyIsEnumerable,Xc=(t,e,r)=>e in t?Bg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pg=(t,e)=>{for(var r in e||(e={}))Ng.call(e,r)&&Xc(t,r,e[r]);if(Yc)for(var r of Yc(e))Dg.call(e,r)&&Xc(t,r,e[r]);return t};Pg({linear:mg},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Og=()=>et&&/firefox/i.test(window.navigator.userAgent),Bs=t=>{let e,r;return t.type==="touchend"?(r=t.changedTouches[0].clientY,e=t.changedTouches[0].clientX):t.type.startsWith("touch")?(r=t.touches[0].clientY,e=t.touches[0].clientX):(r=t.clientY,e=t.clientX),{clientX:e,clientY:r}};/**
1
+ (function(Ke,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(Ke=typeof globalThis<"u"?globalThis:Ke||self,s(Ke.MapUtilities={},Ke.Vue))})(this,function(Ke,s){"use strict";var ZP=Object.defineProperty;var QP=(Ke,s,It)=>s in Ke?ZP(Ke,s,{enumerable:!0,configurable:!0,writable:!0,value:It}):Ke[s]=It;var Br=(Ke,s,It)=>QP(Ke,typeof s!="symbol"?s+"":s,It);const It=(t,e,{checkForDefaultPrevented:r=!0}={})=>a=>{const i=t==null?void 0:t(a);if(r===!1||!i)return e==null?void 0:e(a)};var $c;const et=typeof window<"u",gg=t=>typeof t=="string",zc=()=>{},Ts=et&&(($c=window==null?void 0:window.navigator)==null?void 0:$c.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Hc(t){return typeof t=="function"?t():s.unref(t)}function mg(t){return t}function Wi(t){return s.getCurrentScope()?(s.onScopeDispose(t),!0):!1}function yg(t,e=!0){s.getCurrentInstance()?s.onMounted(t):e?t():s.nextTick(t)}function Nr(t){var e;const r=Hc(t);return(e=r==null?void 0:r.$el)!=null?e:r}const ji=et?window:void 0;function jt(...t){let e,r,n,a;if(gg(t[0])||Array.isArray(t[0])?([r,n,a]=t,e=ji):[e,r,n,a]=t,!e)return zc;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const i=[],o=()=>{i.forEach(d=>d()),i.length=0},l=(d,f,p,v)=>(d.addEventListener(f,p,v),()=>d.removeEventListener(f,p,v)),u=s.watch(()=>[Nr(e),Hc(a)],([d,f])=>{o(),d&&i.push(...r.flatMap(p=>n.map(v=>l(d,p,v,f))))},{immediate:!0,flush:"post"}),c=()=>{u(),o()};return Wi(c),c}let Kc=!1;function bg(t,e,r={}){const{window:n=ji,ignore:a=[],capture:i=!0,detectIframe:o=!1}=r;if(!n)return;Ts&&!Kc&&(Kc=!0,Array.from(n.document.body.children).forEach(p=>p.addEventListener("click",zc)));let l=!0;const u=p=>a.some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(h=>h===p.target||p.composedPath().includes(h));{const h=Nr(v);return h&&(p.target===h||p.composedPath().includes(h))}}),d=[jt(n,"click",p=>{const v=Nr(t);if(!(!v||v===p.target||p.composedPath().includes(v))){if(p.detail===0&&(l=!u(p)),!l){l=!0;return}e(p)}},{passive:!0,capture:i}),jt(n,"pointerdown",p=>{const v=Nr(t);v&&(l=!p.composedPath().includes(v)&&!u(p))},{passive:!0}),o&&jt(n,"blur",p=>{var v;const h=Nr(t);((v=n.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(h!=null&&h.contains(n.document.activeElement))&&e(p)})].filter(Boolean);return()=>d.forEach(p=>p())}function qc(t,e=!1){const r=s.ref(),n=()=>r.value=!!t();return n(),yg(n,e),r}const Uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gc="__vueuse_ssr_handlers__";Uc[Gc]=Uc[Gc]||{};var Wc=Object.getOwnPropertySymbols,wg=Object.prototype.hasOwnProperty,Cg=Object.prototype.propertyIsEnumerable,kg=(t,e)=>{var r={};for(var n in t)wg.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Wc)for(var n of Wc(t))e.indexOf(n)<0&&Cg.call(t,n)&&(r[n]=t[n]);return r};function Dr(t,e,r={}){const n=r,{window:a=ji}=n,i=kg(n,["window"]);let o;const l=qc(()=>a&&"ResizeObserver"in a),u=()=>{o&&(o.disconnect(),o=void 0)},c=s.watch(()=>Nr(t),f=>{u(),l.value&&a&&f&&(o=new ResizeObserver(e),o.observe(f,i))},{immediate:!0,flush:"post"}),d=()=>{u(),c()};return Wi(d),{isSupported:l,stop:d}}var jc=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,Eg=Object.prototype.propertyIsEnumerable,Sg=(t,e)=>{var r={};for(var n in t)xg.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&jc)for(var n of jc(t))e.indexOf(n)<0&&Eg.call(t,n)&&(r[n]=t[n]);return r};function Tg(t,e,r={}){const n=r,{window:a=ji}=n,i=Sg(n,["window"]);let o;const l=qc(()=>a&&"MutationObserver"in a),u=()=>{o&&(o.disconnect(),o=void 0)},c=s.watch(()=>Nr(t),f=>{u(),l.value&&a&&f&&(o=new MutationObserver(e),o.observe(f,i))},{immediate:!0}),d=()=>{u(),c()};return Wi(d),{isSupported:l,stop:d}}var Yc;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(Yc||(Yc={}));var Bg=Object.defineProperty,Xc=Object.getOwnPropertySymbols,Ng=Object.prototype.hasOwnProperty,Dg=Object.prototype.propertyIsEnumerable,Zc=(t,e,r)=>e in t?Bg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pg=(t,e)=>{for(var r in e||(e={}))Ng.call(e,r)&&Zc(t,r,e[r]);if(Xc)for(var r of Xc(e))Dg.call(e,r)&&Zc(t,r,e[r]);return t};Pg({linear:mg},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Og=()=>et&&/firefox/i.test(window.navigator.userAgent),Bs=t=>{let e,r;return t.type==="touchend"?(r=t.changedTouches[0].clientY,e=t.changedTouches[0].clientX):t.type.startsWith("touch")?(r=t.touches[0].clientY,e=t.touches[0].clientX):(r=t.clientY,e=t.clientX),{clientX:e,clientY:r}};/**
2
2
  * @vue/shared v3.4.27
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
- **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Ha=()=>{},_g=Object.prototype.hasOwnProperty,wn=(t,e)=>_g.call(t,e),At=Array.isArray,Lt=t=>typeof t=="function",St=t=>typeof t=="string",vt=t=>t!==null&&typeof t=="object",Fg=Object.prototype.toString,Lg=t=>Fg.call(t),Ns=t=>Lg(t).slice(8,-1),Zc=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},Mg=/-(\w)/g,Ig=Zc(t=>t.replace(Mg,(e,r)=>r?r.toUpperCase():"")),Ag=/\B([A-Z])/g,Rg=Zc(t=>t.replace(Ag,"-$1").toLowerCase());var Qc=typeof global=="object"&&global&&global.Object===Object&&global,Vg=typeof self=="object"&&self&&self.Object===Object&&self,pr=Qc||Vg||Function("return this")(),vr=pr.Symbol,Jc=Object.prototype,$g=Jc.hasOwnProperty,zg=Jc.toString,Ka=vr?vr.toStringTag:void 0;function Hg(t){var e=$g.call(t,Ka),r=t[Ka];try{t[Ka]=void 0;var n=!0}catch{}var a=zg.call(t);return n&&(e?t[Ka]=r:delete t[Ka]),a}var Kg=Object.prototype,qg=Kg.toString;function Ug(t){return qg.call(t)}var Gg="[object Null]",Wg="[object Undefined]",eu=vr?vr.toStringTag:void 0;function Xn(t){return t==null?t===void 0?Wg:Gg:eu&&eu in Object(t)?Hg(t):Ug(t)}function Zn(t){return t!=null&&typeof t=="object"}var jg="[object Symbol]";function Yi(t){return typeof t=="symbol"||Zn(t)&&Xn(t)==jg}function Yg(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var nr=Array.isArray,Xg=1/0,tu=vr?vr.prototype:void 0,ru=tu?tu.toString:void 0;function nu(t){if(typeof t=="string")return t;if(nr(t))return Yg(t,nu)+"";if(Yi(t))return ru?ru.call(t):"";var e=t+"";return e=="0"&&1/t==-Xg?"-0":e}var Zg=/\s/;function Qg(t){for(var e=t.length;e--&&Zg.test(t.charAt(e)););return e}var Jg=/^\s+/;function em(t){return t&&t.slice(0,Qg(t)+1).replace(Jg,"")}function Ur(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var au=NaN,tm=/^[-+]0x[0-9a-f]+$/i,rm=/^0b[01]+$/i,nm=/^0o[0-7]+$/i,am=parseInt;function iu(t){if(typeof t=="number")return t;if(Yi(t))return au;if(Ur(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ur(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=em(t);var r=rm.test(t);return r||nm.test(t)?am(t.slice(2),r?2:8):tm.test(t)?au:+t}function ou(t){return t}var im="[object AsyncFunction]",om="[object Function]",sm="[object GeneratorFunction]",lm="[object Proxy]";function su(t){if(!Ur(t))return!1;var e=Xn(t);return e==om||e==sm||e==im||e==lm}var Ds=pr["__core-js_shared__"],lu=function(){var t=/[^.]+$/.exec(Ds&&Ds.keys&&Ds.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function cm(t){return!!lu&&lu in t}var um=Function.prototype,dm=um.toString;function Cn(t){if(t!=null){try{return dm.call(t)}catch{}try{return t+""}catch{}}return""}var fm=/[\\^$.*+?()[\]{}|]/g,hm=/^\[object .+?Constructor\]$/,pm=Function.prototype,vm=Object.prototype,gm=pm.toString,mm=vm.hasOwnProperty,ym=RegExp("^"+gm.call(mm).replace(fm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bm(t){if(!Ur(t)||cm(t))return!1;var e=su(t)?ym:hm;return e.test(Cn(t))}function wm(t,e){return t==null?void 0:t[e]}function kn(t,e){var r=wm(t,e);return bm(r)?r:void 0}var Ps=kn(pr,"WeakMap");function Cm(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var km=800,xm=16,Em=Date.now;function Sm(t){var e=0,r=0;return function(){var n=Em(),a=xm-(n-r);if(r=n,a>0){if(++e>=km)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Tm(t){return function(){return t}}var Xi=function(){try{var t=kn(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Bm=Xi?function(t,e){return Xi(t,"toString",{configurable:!0,enumerable:!1,value:Tm(e),writable:!0})}:ou,Nm=Sm(Bm);function Dm(t,e,r,n){t.length;for(var a=r+1;a--;)if(e(t[a],a,t))return a;return-1}var Pm=9007199254740991,Om=/^(?:0|[1-9]\d*)$/;function Os(t,e){var r=typeof t;return e=e??Pm,!!e&&(r=="number"||r!="symbol"&&Om.test(t))&&t>-1&&t%1==0&&t<e}function _m(t,e,r){e=="__proto__"&&Xi?Xi(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function _s(t,e){return t===e||t!==t&&e!==e}var Fm=Object.prototype,Lm=Fm.hasOwnProperty;function Mm(t,e,r){var n=t[e];(!(Lm.call(t,e)&&_s(n,r))||r===void 0&&!(e in t))&&_m(t,e,r)}var cu=Math.max;function Im(t,e,r){return e=cu(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=cu(n.length-e,0),o=Array(i);++a<i;)o[a]=n[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=n[a];return l[e]=r(o),Cm(t,this,l)}}var Am=9007199254740991;function Fs(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Am}function Rm(t){return t!=null&&Fs(t.length)&&!su(t)}var Vm=Object.prototype;function $m(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Vm;return t===r}function zm(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Hm="[object Arguments]";function uu(t){return Zn(t)&&Xn(t)==Hm}var du=Object.prototype,Km=du.hasOwnProperty,qm=du.propertyIsEnumerable,Ls=uu(function(){return arguments}())?uu:function(t){return Zn(t)&&Km.call(t,"callee")&&!qm.call(t,"callee")};function Um(){return!1}var fu=typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,hu=fu&&typeof module=="object"&&module&&!module.nodeType&&module,Gm=hu&&hu.exports===fu,pu=Gm?pr.Buffer:void 0,Wm=pu?pu.isBuffer:void 0,Ms=Wm||Um,jm="[object Arguments]",Ym="[object Array]",Xm="[object Boolean]",Zm="[object Date]",Qm="[object Error]",Jm="[object Function]",e0="[object Map]",t0="[object Number]",r0="[object Object]",n0="[object RegExp]",a0="[object Set]",i0="[object String]",o0="[object WeakMap]",s0="[object ArrayBuffer]",l0="[object DataView]",c0="[object Float32Array]",u0="[object Float64Array]",d0="[object Int8Array]",f0="[object Int16Array]",h0="[object Int32Array]",p0="[object Uint8Array]",v0="[object Uint8ClampedArray]",g0="[object Uint16Array]",m0="[object Uint32Array]",We={};We[c0]=We[u0]=We[d0]=We[f0]=We[h0]=We[p0]=We[v0]=We[g0]=We[m0]=!0,We[jm]=We[Ym]=We[s0]=We[Xm]=We[l0]=We[Zm]=We[Qm]=We[Jm]=We[e0]=We[t0]=We[r0]=We[n0]=We[a0]=We[i0]=We[o0]=!1;function y0(t){return Zn(t)&&Fs(t.length)&&!!We[Xn(t)]}function b0(t){return function(e){return t(e)}}var vu=typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,qa=vu&&typeof module=="object"&&module&&!module.nodeType&&module,w0=qa&&qa.exports===vu,Is=w0&&Qc.process,gu=function(){try{var t=qa&&qa.require&&qa.require("util").types;return t||Is&&Is.binding&&Is.binding("util")}catch{}}(),mu=gu&&gu.isTypedArray,yu=mu?b0(mu):y0,C0=Object.prototype,k0=C0.hasOwnProperty;function x0(t,e){var r=nr(t),n=!r&&Ls(t),a=!r&&!n&&Ms(t),i=!r&&!n&&!a&&yu(t),o=r||n||a||i,l=o?zm(t.length,String):[],u=l.length;for(var c in t)k0.call(t,c)&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Os(c,u)))&&l.push(c);return l}function E0(t,e){return function(r){return t(e(r))}}var S0=E0(Object.keys,Object),T0=Object.prototype,B0=T0.hasOwnProperty;function N0(t){if(!$m(t))return S0(t);var e=[];for(var r in Object(t))B0.call(t,r)&&r!="constructor"&&e.push(r);return e}function bu(t){return Rm(t)?x0(t):N0(t)}var D0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P0=/^\w*$/;function As(t,e){if(nr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Yi(t)?!0:P0.test(t)||!D0.test(t)||e!=null&&t in Object(e)}var Ua=kn(Object,"create");function O0(){this.__data__=Ua?Ua(null):{},this.size=0}function _0(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var F0="__lodash_hash_undefined__",L0=Object.prototype,M0=L0.hasOwnProperty;function I0(t){var e=this.__data__;if(Ua){var r=e[t];return r===F0?void 0:r}return M0.call(e,t)?e[t]:void 0}var A0=Object.prototype,R0=A0.hasOwnProperty;function V0(t){var e=this.__data__;return Ua?e[t]!==void 0:R0.call(e,t)}var $0="__lodash_hash_undefined__";function z0(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ua&&e===void 0?$0:e,this}function xn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}xn.prototype.clear=O0,xn.prototype.delete=_0,xn.prototype.get=I0,xn.prototype.has=V0,xn.prototype.set=z0;function H0(){this.__data__=[],this.size=0}function Zi(t,e){for(var r=t.length;r--;)if(_s(t[r][0],e))return r;return-1}var K0=Array.prototype,q0=K0.splice;function U0(t){var e=this.__data__,r=Zi(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():q0.call(e,r,1),--this.size,!0}function G0(t){var e=this.__data__,r=Zi(e,t);return r<0?void 0:e[r][1]}function W0(t){return Zi(this.__data__,t)>-1}function j0(t,e){var r=this.__data__,n=Zi(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Pr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Pr.prototype.clear=H0,Pr.prototype.delete=U0,Pr.prototype.get=G0,Pr.prototype.has=W0,Pr.prototype.set=j0;var Ga=kn(pr,"Map");function Y0(){this.size=0,this.__data__={hash:new xn,map:new(Ga||Pr),string:new xn}}function X0(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Qi(t,e){var r=t.__data__;return X0(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Z0(t){var e=Qi(this,t).delete(t);return this.size-=e?1:0,e}function Q0(t){return Qi(this,t).get(t)}function J0(t){return Qi(this,t).has(t)}function ey(t,e){var r=Qi(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Or(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Or.prototype.clear=Y0,Or.prototype.delete=Z0,Or.prototype.get=Q0,Or.prototype.has=J0,Or.prototype.set=ey;var ty="Expected a function";function Rs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ty);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Rs.Cache||Or),r}Rs.Cache=Or;var ry=500;function ny(t){var e=Rs(t,function(n){return r.size===ry&&r.clear(),n}),r=e.cache;return e}var ay=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,iy=/\\(\\)?/g,oy=ny(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ay,function(r,n,a,i){e.push(a?i.replace(iy,"$1"):n||r)}),e});function sy(t){return t==null?"":nu(t)}function Ji(t,e){return nr(t)?t:As(t,e)?[t]:oy(sy(t))}var ly=1/0;function Wa(t){if(typeof t=="string"||Yi(t))return t;var e=t+"";return e=="0"&&1/t==-ly?"-0":e}function Vs(t,e){e=Ji(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Wa(e[r++])];return r&&r==n?t:void 0}function _r(t,e,r){var n=t==null?void 0:Vs(t,e);return n===void 0?r:n}function wu(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}var Cu=vr?vr.isConcatSpreadable:void 0;function cy(t){return nr(t)||Ls(t)||!!(Cu&&t&&t[Cu])}function uy(t,e,r,n,a){var i=-1,o=t.length;for(r||(r=cy),a||(a=[]);++i<o;){var l=t[i];r(l)?wu(a,l):a[a.length]=l}return a}function dy(t){var e=t==null?0:t.length;return e?uy(t):[]}function fy(t){return Nm(Im(t,void 0,dy),t+"")}function Gr(){if(!arguments.length)return[];var t=arguments[0];return nr(t)?t:[t]}function hy(){this.__data__=new Pr,this.size=0}function py(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function vy(t){return this.__data__.get(t)}function gy(t){return this.__data__.has(t)}var my=200;function yy(t,e){var r=this.__data__;if(r instanceof Pr){var n=r.__data__;if(!Ga||n.length<my-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Or(n)}return r.set(t,e),this.size=r.size,this}function Fr(t){var e=this.__data__=new Pr(t);this.size=e.size}Fr.prototype.clear=hy,Fr.prototype.delete=py,Fr.prototype.get=vy,Fr.prototype.has=gy,Fr.prototype.set=yy;function by(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var o=t[r];e(o,r,t)&&(i[a++]=o)}return i}function wy(){return[]}var Cy=Object.prototype,ky=Cy.propertyIsEnumerable,ku=Object.getOwnPropertySymbols,xy=ku?function(t){return t==null?[]:(t=Object(t),by(ku(t),function(e){return ky.call(t,e)}))}:wy;function Ey(t,e,r){var n=e(t);return nr(t)?n:wu(n,r(t))}function xu(t){return Ey(t,bu,xy)}var $s=kn(pr,"DataView"),zs=kn(pr,"Promise"),Hs=kn(pr,"Set"),Eu="[object Map]",Sy="[object Object]",Su="[object Promise]",Tu="[object Set]",Bu="[object WeakMap]",Nu="[object DataView]",Ty=Cn($s),By=Cn(Ga),Ny=Cn(zs),Dy=Cn(Hs),Py=Cn(Ps),Wr=Xn;($s&&Wr(new $s(new ArrayBuffer(1)))!=Nu||Ga&&Wr(new Ga)!=Eu||zs&&Wr(zs.resolve())!=Su||Hs&&Wr(new Hs)!=Tu||Ps&&Wr(new Ps)!=Bu)&&(Wr=function(t){var e=Xn(t),r=e==Sy?t.constructor:void 0,n=r?Cn(r):"";if(n)switch(n){case Ty:return Nu;case By:return Eu;case Ny:return Su;case Dy:return Tu;case Py:return Bu}return e});var Du=pr.Uint8Array,Oy="__lodash_hash_undefined__";function _y(t){return this.__data__.set(t,Oy),this}function Fy(t){return this.__data__.has(t)}function eo(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Or;++e<r;)this.add(t[e])}eo.prototype.add=eo.prototype.push=_y,eo.prototype.has=Fy;function Ly(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function My(t,e){return t.has(e)}var Iy=1,Ay=2;function Pu(t,e,r,n,a,i){var o=r&Iy,l=t.length,u=e.length;if(l!=u&&!(o&&u>l))return!1;var c=i.get(t),d=i.get(e);if(c&&d)return c==e&&d==t;var f=-1,p=!0,v=r&Ay?new eo:void 0;for(i.set(t,e),i.set(e,t);++f<l;){var h=t[f],g=e[f];if(n)var y=o?n(g,h,f,e,t,i):n(h,g,f,t,e,i);if(y!==void 0){if(y)continue;p=!1;break}if(v){if(!Ly(e,function(m,b){if(!My(v,b)&&(h===m||a(h,m,r,n,i)))return v.push(b)})){p=!1;break}}else if(!(h===g||a(h,g,r,n,i))){p=!1;break}}return i.delete(t),i.delete(e),p}function Ry(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}function Vy(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var $y=1,zy=2,Hy="[object Boolean]",Ky="[object Date]",qy="[object Error]",Uy="[object Map]",Gy="[object Number]",Wy="[object RegExp]",jy="[object Set]",Yy="[object String]",Xy="[object Symbol]",Zy="[object ArrayBuffer]",Qy="[object DataView]",Ou=vr?vr.prototype:void 0,Ks=Ou?Ou.valueOf:void 0;function Jy(t,e,r,n,a,i,o){switch(r){case Qy:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Zy:return!(t.byteLength!=e.byteLength||!i(new Du(t),new Du(e)));case Hy:case Ky:case Gy:return _s(+t,+e);case qy:return t.name==e.name&&t.message==e.message;case Wy:case Yy:return t==e+"";case Uy:var l=Ry;case jy:var u=n&$y;if(l||(l=Vy),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;n|=zy,o.set(t,e);var d=Pu(l(t),l(e),n,a,i,o);return o.delete(t),d;case Xy:if(Ks)return Ks.call(t)==Ks.call(e)}return!1}var e1=1,t1=Object.prototype,r1=t1.hasOwnProperty;function n1(t,e,r,n,a,i){var o=r&e1,l=xu(t),u=l.length,c=xu(e),d=c.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in e:r1.call(e,p)))return!1}var v=i.get(t),h=i.get(e);if(v&&h)return v==e&&h==t;var g=!0;i.set(t,e),i.set(e,t);for(var y=o;++f<u;){p=l[f];var m=t[p],b=e[p];if(n)var w=o?n(b,m,p,e,t,i):n(m,b,p,t,e,i);if(!(w===void 0?m===b||a(m,b,r,n,i):w)){g=!1;break}y||(y=p=="constructor")}if(g&&!y){var C=t.constructor,x=e.constructor;C!=x&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof x=="function"&&x instanceof x)&&(g=!1)}return i.delete(t),i.delete(e),g}var a1=1,_u="[object Arguments]",Fu="[object Array]",to="[object Object]",i1=Object.prototype,Lu=i1.hasOwnProperty;function o1(t,e,r,n,a,i){var o=nr(t),l=nr(e),u=o?Fu:Wr(t),c=l?Fu:Wr(e);u=u==_u?to:u,c=c==_u?to:c;var d=u==to,f=c==to,p=u==c;if(p&&Ms(t)){if(!Ms(e))return!1;o=!0,d=!1}if(p&&!d)return i||(i=new Fr),o||yu(t)?Pu(t,e,r,n,a,i):Jy(t,e,u,r,n,a,i);if(!(r&a1)){var v=d&&Lu.call(t,"__wrapped__"),h=f&&Lu.call(e,"__wrapped__");if(v||h){var g=v?t.value():t,y=h?e.value():e;return i||(i=new Fr),a(g,y,r,n,i)}}return p?(i||(i=new Fr),n1(t,e,r,n,a,i)):!1}function ro(t,e,r,n,a){return t===e?!0:t==null||e==null||!Zn(t)&&!Zn(e)?t!==t&&e!==e:o1(t,e,r,n,ro,a)}var s1=1,l1=2;function c1(t,e,r,n){var a=r.length,i=a;if(t==null)return!i;for(t=Object(t);a--;){var o=r[a];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++a<i;){o=r[a];var l=o[0],u=t[l],c=o[1];if(o[2]){if(u===void 0&&!(l in t))return!1}else{var d=new Fr,f;if(!(f===void 0?ro(c,u,s1|l1,n,d):f))return!1}}return!0}function Mu(t){return t===t&&!Ur(t)}function u1(t){for(var e=bu(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,Mu(a)]}return e}function Iu(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function d1(t){var e=u1(t);return e.length==1&&e[0][2]?Iu(e[0][0],e[0][1]):function(r){return r===t||c1(r,t,e)}}function f1(t,e){return t!=null&&e in Object(t)}function h1(t,e,r){e=Ji(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=Wa(e[n]);if(!(i=t!=null&&r(t,o)))break;t=t[o]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&Fs(a)&&Os(o,a)&&(nr(t)||Ls(t)))}function Au(t,e){return t!=null&&h1(t,e,f1)}var p1=1,v1=2;function g1(t,e){return As(t)&&Mu(e)?Iu(Wa(t),e):function(r){var n=_r(r,t);return n===void 0&&n===e?Au(r,t):ro(e,n,p1|v1)}}function m1(t){return function(e){return e==null?void 0:e[t]}}function y1(t){return function(e){return Vs(e,t)}}function b1(t){return As(t)?m1(Wa(t)):y1(t)}function w1(t){return typeof t=="function"?t:t==null?ou:typeof t=="object"?nr(t)?g1(t[0],t[1]):d1(t):b1(t)}var qs=function(){return pr.Date.now()},C1="Expected a function",k1=Math.max,x1=Math.min;function Ru(t,e,r){var n,a,i,o,l,u,c=0,d=!1,f=!1,p=!0;if(typeof t!="function")throw new TypeError(C1);e=iu(e)||0,Ur(r)&&(d=!!r.leading,f="maxWait"in r,i=f?k1(iu(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p);function v(E){var k=n,B=a;return n=a=void 0,c=E,o=t.apply(B,k),o}function h(E){return c=E,l=setTimeout(m,e),d?v(E):o}function g(E){var k=E-u,B=E-c,S=e-k;return f?x1(S,i-B):S}function y(E){var k=E-u,B=E-c;return u===void 0||k>=e||k<0||f&&B>=i}function m(){var E=qs();if(y(E))return b(E);l=setTimeout(m,g(E))}function b(E){return l=void 0,p&&n?v(E):(n=a=void 0,o)}function w(){l!==void 0&&clearTimeout(l),c=0,n=u=a=l=void 0}function C(){return l===void 0?o:b(qs())}function x(){var E=qs(),k=y(E);if(n=arguments,a=this,u=E,k){if(l===void 0)return h(u);if(f)return clearTimeout(l),l=setTimeout(m,e),v(u)}return l===void 0&&(l=setTimeout(m,e)),o}return x.cancel=w,x.flush=C,x}function E1(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=n-1;return Dm(t,w1(e),a)}function no(t){for(var e=-1,r=t==null?0:t.length,n={};++e<r;){var a=t[e];n[a[0]]=a[1]}return n}function ao(t,e){return ro(t,e)}function jr(t){return t==null}function S1(t){return t===void 0}function T1(t,e,r,n){if(!Ur(t))return t;e=Ji(e,t);for(var a=-1,i=e.length,o=i-1,l=t;l!=null&&++a<i;){var u=Wa(e[a]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(a!=o){var d=l[u];c=void 0,c===void 0&&(c=Ur(d)?d:Os(e[a+1])?[]:{})}Mm(l,u,c),l=l[u]}return t}function B1(t,e,r){for(var n=-1,a=e.length,i={};++n<a;){var o=e[n],l=Vs(t,o);r(l,o)&&T1(i,Ji(o,t),l)}return i}function N1(t,e){return B1(t,e,function(r,n){return Au(t,n)})}var Vu=fy(function(t,e){return t==null?{}:N1(t,e)});const Yr=t=>t===void 0,Qn=t=>typeof t=="boolean",gt=t=>typeof t=="number",En=t=>typeof Element>"u"?!1:t instanceof Element,io=t=>jr(t),D1=t=>St(t)?!Number.isNaN(Number(t)):!1,P1=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),$u=t=>Object.keys(t);class zu extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function O1(t,e){throw new zu(`[${t}] ${e}`)}function tt(t,e){if(process.env.NODE_ENV!=="production"){const r=St(t)?new zu(`[${t}] ${e}`):t;console.warn(r)}}const _1="utils/dom/style",Hu=(t="")=>t.split(" ").filter(e=>!!e.trim()),Us=(t,e)=>{!t||!e.trim()||t.classList.add(...Hu(e))},Sn=(t,e)=>{!t||!e.trim()||t.classList.remove(...Hu(e))},ja=(t,e)=>{var r;if(!et||!t||!e)return"";let n=Ig(e);n==="float"&&(n="cssFloat");try{const a=t.style[n];if(a)return a;const i=(r=document.defaultView)==null?void 0:r.getComputedStyle(t,"");return i?i[n]:""}catch{return t.style[n]}};function Jn(t,e="px"){if(!t)return"";if(gt(t)||D1(t))return`${t}${e}`;if(St(t))return t;tt(_1,"binding value must be a string or number")}function F1(t,e){if(!et)return;if(!e){t.scrollTop=0;return}const r=[];let n=e.offsetParent;for(;n!==null&&t!==n&&t.contains(n);)r.push(n),n=n.offsetParent;const a=e.offsetTop+r.reduce((u,c)=>u+c.offsetTop,0),i=a+e.offsetHeight,o=t.scrollTop,l=o+t.clientHeight;a<o?t.scrollTop=a:i>l&&(t.scrollTop=i-t.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var L1=s.defineComponent({name:"Aim",__name:"aim",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"}),s.createElementVNode("path",{fill:"currentColor",d:"M512 96a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V128a32 32 0 0 1 32-32m0 576a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V704a32 32 0 0 1 32-32M96 512a32 32 0 0 1 32-32h192a32 32 0 0 1 0 64H128a32 32 0 0 1-32-32m576 0a32 32 0 0 1 32-32h192a32 32 0 1 1 0 64H704a32 32 0 0 1-32-32"})]))}}),M1=L1,I1=s.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"})]))}}),oo=I1,A1=s.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),Ku=A1,R1=s.defineComponent({name:"CaretRight",__name:"caret-right",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),V1=R1,$1=s.defineComponent({name:"CircleCheck",__name:"circle-check",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"}),s.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"})]))}}),z1=$1,H1=s.defineComponent({name:"CircleClose",__name:"circle-close",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"}),s.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"})]))}}),Gs=H1,K1=s.defineComponent({name:"Close",__name:"close",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"})]))}}),so=K1,q1=s.defineComponent({name:"CopyDocument",__name:"copy-document",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),s.createElementVNode("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),U1=q1,G1=s.defineComponent({name:"Delete",__name:"delete",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),W1=G1,j1=s.defineComponent({name:"Edit",__name:"edit",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),s.createElementVNode("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),Y1=j1,X1=s.defineComponent({name:"Finished",__name:"finished",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),Z1=X1,Q1=s.defineComponent({name:"Hide",__name:"hide",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"}),s.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"})]))}}),J1=Q1,eb=s.defineComponent({name:"Loading",__name:"loading",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"})]))}}),Ws=eb,tb=s.defineComponent({name:"Lock",__name:"lock",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),s.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),rb=tb,nb=s.defineComponent({name:"Notebook",__name:"notebook",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),s.createElementVNode("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}}),ab=nb,ib=s.defineComponent({name:"Unlock",__name:"unlock",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),s.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"})]))}}),ob=ib,sb=s.defineComponent({name:"View",__name:"view",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"})]))}}),lb=sb,cb=s.defineComponent({name:"Warning",__name:"warning",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"})]))}}),ub=cb;const qu="__epPropKey",ke=t=>t,db=t=>vt(t)&&!!t[qu],lo=(t,e)=>{if(!vt(t)||db(t))return t;const{values:r,required:n,default:a,type:i,validator:o}=t,u={type:i,required:!!n,validator:r||o?c=>{let d=!1,f=[];if(r&&(f=Array.from(r),wn(t,"default")&&f.push(a),d||(d=f.includes(c))),o&&(d||(d=o(c))),!d&&f.length>0){const p=[...new Set(f)].map(v=>JSON.stringify(v)).join(", ");s.warn(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${p}], got value ${JSON.stringify(c)}.`)}return d}:void 0,[qu]:!0};return wn(t,"default")&&(u.default=a),u},Ie=t=>no(Object.entries(t).map(([e,r])=>[e,lo(r,e)])),Xr=ke([String,Object,Function]),Uu={validating:Ws,success:z1,error:Gs},dt=(t,e)=>{if(t.install=r=>{for(const n of[t,...Object.values(e??{})])r.component(n.name,n)},e)for(const[r,n]of Object.entries(e))t[r]=n;return t},fb=(t,e)=>(t.install=r=>{r.directive(e,t)},t),Lr=t=>(t.install=Ha,t),it={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"},mt="update:modelValue",js="change",Gu=["","default","small","large"],hb=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t),ea=t=>t,pb=["class","style"],vb=/^on[A-Z]/,gb=(t={})=>{const{excludeListeners:e=!1,excludeKeys:r}=t,n=s.computed(()=>((r==null?void 0:r.value)||[]).concat(pb)),a=s.getCurrentInstance();return a?s.computed(()=>{var i;return no(Object.entries((i=a.proxy)==null?void 0:i.$attrs).filter(([o])=>!n.value.includes(o)&&!(e&&vb.test(o))))}):(tt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),s.computed(()=>({})))},co=({from:t,replacement:e,scope:r,version:n,ref:a,type:i="API"},o)=>{s.watch(()=>s.unref(o),l=>{l&&tt(r,`[${i}] ${t} is about to be deprecated in version ${n}, please use ${e} instead.
5
+ **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Ha=()=>{},_g=Object.prototype.hasOwnProperty,wn=(t,e)=>_g.call(t,e),At=Array.isArray,Ft=t=>typeof t=="function",St=t=>typeof t=="string",vt=t=>t!==null&&typeof t=="object",Lg=Object.prototype.toString,Fg=t=>Lg.call(t),Ns=t=>Fg(t).slice(8,-1),Qc=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},Mg=/-(\w)/g,Ig=Qc(t=>t.replace(Mg,(e,r)=>r?r.toUpperCase():"")),Ag=/\B([A-Z])/g,Vg=Qc(t=>t.replace(Ag,"-$1").toLowerCase());var Jc=typeof global=="object"&&global&&global.Object===Object&&global,Rg=typeof self=="object"&&self&&self.Object===Object&&self,pr=Jc||Rg||Function("return this")(),vr=pr.Symbol,eu=Object.prototype,$g=eu.hasOwnProperty,zg=eu.toString,Ka=vr?vr.toStringTag:void 0;function Hg(t){var e=$g.call(t,Ka),r=t[Ka];try{t[Ka]=void 0;var n=!0}catch{}var a=zg.call(t);return n&&(e?t[Ka]=r:delete t[Ka]),a}var Kg=Object.prototype,qg=Kg.toString;function Ug(t){return qg.call(t)}var Gg="[object Null]",Wg="[object Undefined]",tu=vr?vr.toStringTag:void 0;function Xn(t){return t==null?t===void 0?Wg:Gg:tu&&tu in Object(t)?Hg(t):Ug(t)}function Zn(t){return t!=null&&typeof t=="object"}var jg="[object Symbol]";function Yi(t){return typeof t=="symbol"||Zn(t)&&Xn(t)==jg}function Yg(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var nr=Array.isArray,Xg=1/0,ru=vr?vr.prototype:void 0,nu=ru?ru.toString:void 0;function au(t){if(typeof t=="string")return t;if(nr(t))return Yg(t,au)+"";if(Yi(t))return nu?nu.call(t):"";var e=t+"";return e=="0"&&1/t==-Xg?"-0":e}var Zg=/\s/;function Qg(t){for(var e=t.length;e--&&Zg.test(t.charAt(e)););return e}var Jg=/^\s+/;function em(t){return t&&t.slice(0,Qg(t)+1).replace(Jg,"")}function Ur(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var iu=NaN,tm=/^[-+]0x[0-9a-f]+$/i,rm=/^0b[01]+$/i,nm=/^0o[0-7]+$/i,am=parseInt;function ou(t){if(typeof t=="number")return t;if(Yi(t))return iu;if(Ur(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ur(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=em(t);var r=rm.test(t);return r||nm.test(t)?am(t.slice(2),r?2:8):tm.test(t)?iu:+t}function su(t){return t}var im="[object AsyncFunction]",om="[object Function]",sm="[object GeneratorFunction]",lm="[object Proxy]";function lu(t){if(!Ur(t))return!1;var e=Xn(t);return e==om||e==sm||e==im||e==lm}var Ds=pr["__core-js_shared__"],cu=function(){var t=/[^.]+$/.exec(Ds&&Ds.keys&&Ds.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function cm(t){return!!cu&&cu in t}var um=Function.prototype,dm=um.toString;function Cn(t){if(t!=null){try{return dm.call(t)}catch{}try{return t+""}catch{}}return""}var fm=/[\\^$.*+?()[\]{}|]/g,hm=/^\[object .+?Constructor\]$/,pm=Function.prototype,vm=Object.prototype,gm=pm.toString,mm=vm.hasOwnProperty,ym=RegExp("^"+gm.call(mm).replace(fm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bm(t){if(!Ur(t)||cm(t))return!1;var e=lu(t)?ym:hm;return e.test(Cn(t))}function wm(t,e){return t==null?void 0:t[e]}function kn(t,e){var r=wm(t,e);return bm(r)?r:void 0}var Ps=kn(pr,"WeakMap");function Cm(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var km=800,xm=16,Em=Date.now;function Sm(t){var e=0,r=0;return function(){var n=Em(),a=xm-(n-r);if(r=n,a>0){if(++e>=km)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Tm(t){return function(){return t}}var Xi=function(){try{var t=kn(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Bm=Xi?function(t,e){return Xi(t,"toString",{configurable:!0,enumerable:!1,value:Tm(e),writable:!0})}:su,Nm=Sm(Bm);function Dm(t,e,r,n){t.length;for(var a=r+1;a--;)if(e(t[a],a,t))return a;return-1}var Pm=9007199254740991,Om=/^(?:0|[1-9]\d*)$/;function Os(t,e){var r=typeof t;return e=e??Pm,!!e&&(r=="number"||r!="symbol"&&Om.test(t))&&t>-1&&t%1==0&&t<e}function _m(t,e,r){e=="__proto__"&&Xi?Xi(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function _s(t,e){return t===e||t!==t&&e!==e}var Lm=Object.prototype,Fm=Lm.hasOwnProperty;function Mm(t,e,r){var n=t[e];(!(Fm.call(t,e)&&_s(n,r))||r===void 0&&!(e in t))&&_m(t,e,r)}var uu=Math.max;function Im(t,e,r){return e=uu(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=uu(n.length-e,0),o=Array(i);++a<i;)o[a]=n[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=n[a];return l[e]=r(o),Cm(t,this,l)}}var Am=9007199254740991;function Ls(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Am}function Vm(t){return t!=null&&Ls(t.length)&&!lu(t)}var Rm=Object.prototype;function $m(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Rm;return t===r}function zm(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Hm="[object Arguments]";function du(t){return Zn(t)&&Xn(t)==Hm}var fu=Object.prototype,Km=fu.hasOwnProperty,qm=fu.propertyIsEnumerable,Fs=du(function(){return arguments}())?du:function(t){return Zn(t)&&Km.call(t,"callee")&&!qm.call(t,"callee")};function Um(){return!1}var hu=typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,pu=hu&&typeof module=="object"&&module&&!module.nodeType&&module,Gm=pu&&pu.exports===hu,vu=Gm?pr.Buffer:void 0,Wm=vu?vu.isBuffer:void 0,Ms=Wm||Um,jm="[object Arguments]",Ym="[object Array]",Xm="[object Boolean]",Zm="[object Date]",Qm="[object Error]",Jm="[object Function]",e0="[object Map]",t0="[object Number]",r0="[object Object]",n0="[object RegExp]",a0="[object Set]",i0="[object String]",o0="[object WeakMap]",s0="[object ArrayBuffer]",l0="[object DataView]",c0="[object Float32Array]",u0="[object Float64Array]",d0="[object Int8Array]",f0="[object Int16Array]",h0="[object Int32Array]",p0="[object Uint8Array]",v0="[object Uint8ClampedArray]",g0="[object Uint16Array]",m0="[object Uint32Array]",We={};We[c0]=We[u0]=We[d0]=We[f0]=We[h0]=We[p0]=We[v0]=We[g0]=We[m0]=!0,We[jm]=We[Ym]=We[s0]=We[Xm]=We[l0]=We[Zm]=We[Qm]=We[Jm]=We[e0]=We[t0]=We[r0]=We[n0]=We[a0]=We[i0]=We[o0]=!1;function y0(t){return Zn(t)&&Ls(t.length)&&!!We[Xn(t)]}function b0(t){return function(e){return t(e)}}var gu=typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,qa=gu&&typeof module=="object"&&module&&!module.nodeType&&module,w0=qa&&qa.exports===gu,Is=w0&&Jc.process,mu=function(){try{var t=qa&&qa.require&&qa.require("util").types;return t||Is&&Is.binding&&Is.binding("util")}catch{}}(),yu=mu&&mu.isTypedArray,bu=yu?b0(yu):y0,C0=Object.prototype,k0=C0.hasOwnProperty;function x0(t,e){var r=nr(t),n=!r&&Fs(t),a=!r&&!n&&Ms(t),i=!r&&!n&&!a&&bu(t),o=r||n||a||i,l=o?zm(t.length,String):[],u=l.length;for(var c in t)k0.call(t,c)&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Os(c,u)))&&l.push(c);return l}function E0(t,e){return function(r){return t(e(r))}}var S0=E0(Object.keys,Object),T0=Object.prototype,B0=T0.hasOwnProperty;function N0(t){if(!$m(t))return S0(t);var e=[];for(var r in Object(t))B0.call(t,r)&&r!="constructor"&&e.push(r);return e}function wu(t){return Vm(t)?x0(t):N0(t)}var D0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P0=/^\w*$/;function As(t,e){if(nr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Yi(t)?!0:P0.test(t)||!D0.test(t)||e!=null&&t in Object(e)}var Ua=kn(Object,"create");function O0(){this.__data__=Ua?Ua(null):{},this.size=0}function _0(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var L0="__lodash_hash_undefined__",F0=Object.prototype,M0=F0.hasOwnProperty;function I0(t){var e=this.__data__;if(Ua){var r=e[t];return r===L0?void 0:r}return M0.call(e,t)?e[t]:void 0}var A0=Object.prototype,V0=A0.hasOwnProperty;function R0(t){var e=this.__data__;return Ua?e[t]!==void 0:V0.call(e,t)}var $0="__lodash_hash_undefined__";function z0(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ua&&e===void 0?$0:e,this}function xn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}xn.prototype.clear=O0,xn.prototype.delete=_0,xn.prototype.get=I0,xn.prototype.has=R0,xn.prototype.set=z0;function H0(){this.__data__=[],this.size=0}function Zi(t,e){for(var r=t.length;r--;)if(_s(t[r][0],e))return r;return-1}var K0=Array.prototype,q0=K0.splice;function U0(t){var e=this.__data__,r=Zi(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():q0.call(e,r,1),--this.size,!0}function G0(t){var e=this.__data__,r=Zi(e,t);return r<0?void 0:e[r][1]}function W0(t){return Zi(this.__data__,t)>-1}function j0(t,e){var r=this.__data__,n=Zi(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Pr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Pr.prototype.clear=H0,Pr.prototype.delete=U0,Pr.prototype.get=G0,Pr.prototype.has=W0,Pr.prototype.set=j0;var Ga=kn(pr,"Map");function Y0(){this.size=0,this.__data__={hash:new xn,map:new(Ga||Pr),string:new xn}}function X0(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Qi(t,e){var r=t.__data__;return X0(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Z0(t){var e=Qi(this,t).delete(t);return this.size-=e?1:0,e}function Q0(t){return Qi(this,t).get(t)}function J0(t){return Qi(this,t).has(t)}function ey(t,e){var r=Qi(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Or(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Or.prototype.clear=Y0,Or.prototype.delete=Z0,Or.prototype.get=Q0,Or.prototype.has=J0,Or.prototype.set=ey;var ty="Expected a function";function Vs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ty);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Vs.Cache||Or),r}Vs.Cache=Or;var ry=500;function ny(t){var e=Vs(t,function(n){return r.size===ry&&r.clear(),n}),r=e.cache;return e}var ay=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,iy=/\\(\\)?/g,oy=ny(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ay,function(r,n,a,i){e.push(a?i.replace(iy,"$1"):n||r)}),e});function sy(t){return t==null?"":au(t)}function Ji(t,e){return nr(t)?t:As(t,e)?[t]:oy(sy(t))}var ly=1/0;function Wa(t){if(typeof t=="string"||Yi(t))return t;var e=t+"";return e=="0"&&1/t==-ly?"-0":e}function Rs(t,e){e=Ji(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Wa(e[r++])];return r&&r==n?t:void 0}function _r(t,e,r){var n=t==null?void 0:Rs(t,e);return n===void 0?r:n}function Cu(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}var ku=vr?vr.isConcatSpreadable:void 0;function cy(t){return nr(t)||Fs(t)||!!(ku&&t&&t[ku])}function uy(t,e,r,n,a){var i=-1,o=t.length;for(r||(r=cy),a||(a=[]);++i<o;){var l=t[i];r(l)?Cu(a,l):a[a.length]=l}return a}function dy(t){var e=t==null?0:t.length;return e?uy(t):[]}function fy(t){return Nm(Im(t,void 0,dy),t+"")}function Gr(){if(!arguments.length)return[];var t=arguments[0];return nr(t)?t:[t]}function hy(){this.__data__=new Pr,this.size=0}function py(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function vy(t){return this.__data__.get(t)}function gy(t){return this.__data__.has(t)}var my=200;function yy(t,e){var r=this.__data__;if(r instanceof Pr){var n=r.__data__;if(!Ga||n.length<my-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Or(n)}return r.set(t,e),this.size=r.size,this}function Lr(t){var e=this.__data__=new Pr(t);this.size=e.size}Lr.prototype.clear=hy,Lr.prototype.delete=py,Lr.prototype.get=vy,Lr.prototype.has=gy,Lr.prototype.set=yy;function by(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var o=t[r];e(o,r,t)&&(i[a++]=o)}return i}function wy(){return[]}var Cy=Object.prototype,ky=Cy.propertyIsEnumerable,xu=Object.getOwnPropertySymbols,xy=xu?function(t){return t==null?[]:(t=Object(t),by(xu(t),function(e){return ky.call(t,e)}))}:wy;function Ey(t,e,r){var n=e(t);return nr(t)?n:Cu(n,r(t))}function Eu(t){return Ey(t,wu,xy)}var $s=kn(pr,"DataView"),zs=kn(pr,"Promise"),Hs=kn(pr,"Set"),Su="[object Map]",Sy="[object Object]",Tu="[object Promise]",Bu="[object Set]",Nu="[object WeakMap]",Du="[object DataView]",Ty=Cn($s),By=Cn(Ga),Ny=Cn(zs),Dy=Cn(Hs),Py=Cn(Ps),Wr=Xn;($s&&Wr(new $s(new ArrayBuffer(1)))!=Du||Ga&&Wr(new Ga)!=Su||zs&&Wr(zs.resolve())!=Tu||Hs&&Wr(new Hs)!=Bu||Ps&&Wr(new Ps)!=Nu)&&(Wr=function(t){var e=Xn(t),r=e==Sy?t.constructor:void 0,n=r?Cn(r):"";if(n)switch(n){case Ty:return Du;case By:return Su;case Ny:return Tu;case Dy:return Bu;case Py:return Nu}return e});var Pu=pr.Uint8Array,Oy="__lodash_hash_undefined__";function _y(t){return this.__data__.set(t,Oy),this}function Ly(t){return this.__data__.has(t)}function eo(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Or;++e<r;)this.add(t[e])}eo.prototype.add=eo.prototype.push=_y,eo.prototype.has=Ly;function Fy(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function My(t,e){return t.has(e)}var Iy=1,Ay=2;function Ou(t,e,r,n,a,i){var o=r&Iy,l=t.length,u=e.length;if(l!=u&&!(o&&u>l))return!1;var c=i.get(t),d=i.get(e);if(c&&d)return c==e&&d==t;var f=-1,p=!0,v=r&Ay?new eo:void 0;for(i.set(t,e),i.set(e,t);++f<l;){var h=t[f],g=e[f];if(n)var y=o?n(g,h,f,e,t,i):n(h,g,f,t,e,i);if(y!==void 0){if(y)continue;p=!1;break}if(v){if(!Fy(e,function(m,b){if(!My(v,b)&&(h===m||a(h,m,r,n,i)))return v.push(b)})){p=!1;break}}else if(!(h===g||a(h,g,r,n,i))){p=!1;break}}return i.delete(t),i.delete(e),p}function Vy(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}function Ry(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var $y=1,zy=2,Hy="[object Boolean]",Ky="[object Date]",qy="[object Error]",Uy="[object Map]",Gy="[object Number]",Wy="[object RegExp]",jy="[object Set]",Yy="[object String]",Xy="[object Symbol]",Zy="[object ArrayBuffer]",Qy="[object DataView]",_u=vr?vr.prototype:void 0,Ks=_u?_u.valueOf:void 0;function Jy(t,e,r,n,a,i,o){switch(r){case Qy:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Zy:return!(t.byteLength!=e.byteLength||!i(new Pu(t),new Pu(e)));case Hy:case Ky:case Gy:return _s(+t,+e);case qy:return t.name==e.name&&t.message==e.message;case Wy:case Yy:return t==e+"";case Uy:var l=Vy;case jy:var u=n&$y;if(l||(l=Ry),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;n|=zy,o.set(t,e);var d=Ou(l(t),l(e),n,a,i,o);return o.delete(t),d;case Xy:if(Ks)return Ks.call(t)==Ks.call(e)}return!1}var e1=1,t1=Object.prototype,r1=t1.hasOwnProperty;function n1(t,e,r,n,a,i){var o=r&e1,l=Eu(t),u=l.length,c=Eu(e),d=c.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in e:r1.call(e,p)))return!1}var v=i.get(t),h=i.get(e);if(v&&h)return v==e&&h==t;var g=!0;i.set(t,e),i.set(e,t);for(var y=o;++f<u;){p=l[f];var m=t[p],b=e[p];if(n)var w=o?n(b,m,p,e,t,i):n(m,b,p,t,e,i);if(!(w===void 0?m===b||a(m,b,r,n,i):w)){g=!1;break}y||(y=p=="constructor")}if(g&&!y){var C=t.constructor,x=e.constructor;C!=x&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof x=="function"&&x instanceof x)&&(g=!1)}return i.delete(t),i.delete(e),g}var a1=1,Lu="[object Arguments]",Fu="[object Array]",to="[object Object]",i1=Object.prototype,Mu=i1.hasOwnProperty;function o1(t,e,r,n,a,i){var o=nr(t),l=nr(e),u=o?Fu:Wr(t),c=l?Fu:Wr(e);u=u==Lu?to:u,c=c==Lu?to:c;var d=u==to,f=c==to,p=u==c;if(p&&Ms(t)){if(!Ms(e))return!1;o=!0,d=!1}if(p&&!d)return i||(i=new Lr),o||bu(t)?Ou(t,e,r,n,a,i):Jy(t,e,u,r,n,a,i);if(!(r&a1)){var v=d&&Mu.call(t,"__wrapped__"),h=f&&Mu.call(e,"__wrapped__");if(v||h){var g=v?t.value():t,y=h?e.value():e;return i||(i=new Lr),a(g,y,r,n,i)}}return p?(i||(i=new Lr),n1(t,e,r,n,a,i)):!1}function ro(t,e,r,n,a){return t===e?!0:t==null||e==null||!Zn(t)&&!Zn(e)?t!==t&&e!==e:o1(t,e,r,n,ro,a)}var s1=1,l1=2;function c1(t,e,r,n){var a=r.length,i=a;if(t==null)return!i;for(t=Object(t);a--;){var o=r[a];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++a<i;){o=r[a];var l=o[0],u=t[l],c=o[1];if(o[2]){if(u===void 0&&!(l in t))return!1}else{var d=new Lr,f;if(!(f===void 0?ro(c,u,s1|l1,n,d):f))return!1}}return!0}function Iu(t){return t===t&&!Ur(t)}function u1(t){for(var e=wu(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,Iu(a)]}return e}function Au(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function d1(t){var e=u1(t);return e.length==1&&e[0][2]?Au(e[0][0],e[0][1]):function(r){return r===t||c1(r,t,e)}}function f1(t,e){return t!=null&&e in Object(t)}function h1(t,e,r){e=Ji(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=Wa(e[n]);if(!(i=t!=null&&r(t,o)))break;t=t[o]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&Ls(a)&&Os(o,a)&&(nr(t)||Fs(t)))}function Vu(t,e){return t!=null&&h1(t,e,f1)}var p1=1,v1=2;function g1(t,e){return As(t)&&Iu(e)?Au(Wa(t),e):function(r){var n=_r(r,t);return n===void 0&&n===e?Vu(r,t):ro(e,n,p1|v1)}}function m1(t){return function(e){return e==null?void 0:e[t]}}function y1(t){return function(e){return Rs(e,t)}}function b1(t){return As(t)?m1(Wa(t)):y1(t)}function w1(t){return typeof t=="function"?t:t==null?su:typeof t=="object"?nr(t)?g1(t[0],t[1]):d1(t):b1(t)}var qs=function(){return pr.Date.now()},C1="Expected a function",k1=Math.max,x1=Math.min;function Ru(t,e,r){var n,a,i,o,l,u,c=0,d=!1,f=!1,p=!0;if(typeof t!="function")throw new TypeError(C1);e=ou(e)||0,Ur(r)&&(d=!!r.leading,f="maxWait"in r,i=f?k1(ou(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p);function v(E){var k=n,B=a;return n=a=void 0,c=E,o=t.apply(B,k),o}function h(E){return c=E,l=setTimeout(m,e),d?v(E):o}function g(E){var k=E-u,B=E-c,S=e-k;return f?x1(S,i-B):S}function y(E){var k=E-u,B=E-c;return u===void 0||k>=e||k<0||f&&B>=i}function m(){var E=qs();if(y(E))return b(E);l=setTimeout(m,g(E))}function b(E){return l=void 0,p&&n?v(E):(n=a=void 0,o)}function w(){l!==void 0&&clearTimeout(l),c=0,n=u=a=l=void 0}function C(){return l===void 0?o:b(qs())}function x(){var E=qs(),k=y(E);if(n=arguments,a=this,u=E,k){if(l===void 0)return h(u);if(f)return clearTimeout(l),l=setTimeout(m,e),v(u)}return l===void 0&&(l=setTimeout(m,e)),o}return x.cancel=w,x.flush=C,x}function E1(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=n-1;return Dm(t,w1(e),a)}function no(t){for(var e=-1,r=t==null?0:t.length,n={};++e<r;){var a=t[e];n[a[0]]=a[1]}return n}function ao(t,e){return ro(t,e)}function jr(t){return t==null}function S1(t){return t===void 0}function T1(t,e,r,n){if(!Ur(t))return t;e=Ji(e,t);for(var a=-1,i=e.length,o=i-1,l=t;l!=null&&++a<i;){var u=Wa(e[a]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(a!=o){var d=l[u];c=void 0,c===void 0&&(c=Ur(d)?d:Os(e[a+1])?[]:{})}Mm(l,u,c),l=l[u]}return t}function B1(t,e,r){for(var n=-1,a=e.length,i={};++n<a;){var o=e[n],l=Rs(t,o);r(l,o)&&T1(i,Ji(o,t),l)}return i}function N1(t,e){return B1(t,e,function(r,n){return Vu(t,n)})}var $u=fy(function(t,e){return t==null?{}:N1(t,e)});const Yr=t=>t===void 0,Qn=t=>typeof t=="boolean",gt=t=>typeof t=="number",En=t=>typeof Element>"u"?!1:t instanceof Element,io=t=>jr(t),D1=t=>St(t)?!Number.isNaN(Number(t)):!1,P1=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),zu=t=>Object.keys(t);class Hu extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function O1(t,e){throw new Hu(`[${t}] ${e}`)}function tt(t,e){if(process.env.NODE_ENV!=="production"){const r=St(t)?new Hu(`[${t}] ${e}`):t;console.warn(r)}}const _1="utils/dom/style",Ku=(t="")=>t.split(" ").filter(e=>!!e.trim()),Us=(t,e)=>{!t||!e.trim()||t.classList.add(...Ku(e))},Sn=(t,e)=>{!t||!e.trim()||t.classList.remove(...Ku(e))},ja=(t,e)=>{var r;if(!et||!t||!e)return"";let n=Ig(e);n==="float"&&(n="cssFloat");try{const a=t.style[n];if(a)return a;const i=(r=document.defaultView)==null?void 0:r.getComputedStyle(t,"");return i?i[n]:""}catch{return t.style[n]}};function Jn(t,e="px"){if(!t)return"";if(gt(t)||D1(t))return`${t}${e}`;if(St(t))return t;tt(_1,"binding value must be a string or number")}function L1(t,e){if(!et)return;if(!e){t.scrollTop=0;return}const r=[];let n=e.offsetParent;for(;n!==null&&t!==n&&t.contains(n);)r.push(n),n=n.offsetParent;const a=e.offsetTop+r.reduce((u,c)=>u+c.offsetTop,0),i=a+e.offsetHeight,o=t.scrollTop,l=o+t.clientHeight;a<o?t.scrollTop=a:i>l&&(t.scrollTop=i-t.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var F1=s.defineComponent({name:"Aim",__name:"aim",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"}),s.createElementVNode("path",{fill:"currentColor",d:"M512 96a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V128a32 32 0 0 1 32-32m0 576a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V704a32 32 0 0 1 32-32M96 512a32 32 0 0 1 32-32h192a32 32 0 0 1 0 64H128a32 32 0 0 1-32-32m576 0a32 32 0 0 1 32-32h192a32 32 0 1 1 0 64H704a32 32 0 0 1-32-32"})]))}}),M1=F1,I1=s.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"})]))}}),oo=I1,A1=s.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),qu=A1,V1=s.defineComponent({name:"CaretRight",__name:"caret-right",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),R1=V1,$1=s.defineComponent({name:"CircleCheck",__name:"circle-check",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"}),s.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"})]))}}),z1=$1,H1=s.defineComponent({name:"CircleClose",__name:"circle-close",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"}),s.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"})]))}}),Gs=H1,K1=s.defineComponent({name:"Close",__name:"close",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"})]))}}),so=K1,q1=s.defineComponent({name:"CopyDocument",__name:"copy-document",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),s.createElementVNode("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),U1=q1,G1=s.defineComponent({name:"Delete",__name:"delete",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),W1=G1,j1=s.defineComponent({name:"Edit",__name:"edit",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),s.createElementVNode("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),Y1=j1,X1=s.defineComponent({name:"Finished",__name:"finished",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),Z1=X1,Q1=s.defineComponent({name:"Hide",__name:"hide",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"}),s.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"})]))}}),J1=Q1,eb=s.defineComponent({name:"Loading",__name:"loading",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"})]))}}),Ws=eb,tb=s.defineComponent({name:"Lock",__name:"lock",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),s.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),rb=tb,nb=s.defineComponent({name:"Notebook",__name:"notebook",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),s.createElementVNode("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}}),ab=nb,ib=s.defineComponent({name:"Unlock",__name:"unlock",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),s.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"})]))}}),ob=ib,sb=s.defineComponent({name:"View",__name:"view",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.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"})]))}}),lb=sb,cb=s.defineComponent({name:"Warning",__name:"warning",setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"})]))}}),ub=cb;const Uu="__epPropKey",ke=t=>t,db=t=>vt(t)&&!!t[Uu],lo=(t,e)=>{if(!vt(t)||db(t))return t;const{values:r,required:n,default:a,type:i,validator:o}=t,u={type:i,required:!!n,validator:r||o?c=>{let d=!1,f=[];if(r&&(f=Array.from(r),wn(t,"default")&&f.push(a),d||(d=f.includes(c))),o&&(d||(d=o(c))),!d&&f.length>0){const p=[...new Set(f)].map(v=>JSON.stringify(v)).join(", ");s.warn(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${p}], got value ${JSON.stringify(c)}.`)}return d}:void 0,[Uu]:!0};return wn(t,"default")&&(u.default=a),u},Ie=t=>no(Object.entries(t).map(([e,r])=>[e,lo(r,e)])),Xr=ke([String,Object,Function]),Gu={validating:Ws,success:z1,error:Gs},dt=(t,e)=>{if(t.install=r=>{for(const n of[t,...Object.values(e??{})])r.component(n.name,n)},e)for(const[r,n]of Object.entries(e))t[r]=n;return t},fb=(t,e)=>(t.install=r=>{r.directive(e,t)},t),Fr=t=>(t.install=Ha,t),it={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"},mt="update:modelValue",js="change",Wu=["","default","small","large"],hb=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t),ea=t=>t,pb=["class","style"],vb=/^on[A-Z]/,gb=(t={})=>{const{excludeListeners:e=!1,excludeKeys:r}=t,n=s.computed(()=>((r==null?void 0:r.value)||[]).concat(pb)),a=s.getCurrentInstance();return a?s.computed(()=>{var i;return no(Object.entries((i=a.proxy)==null?void 0:i.$attrs).filter(([o])=>!n.value.includes(o)&&!(e&&vb.test(o))))}):(tt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),s.computed(()=>({})))},co=({from:t,replacement:e,scope:r,version:n,ref:a,type:i="API"},o)=>{s.watch(()=>s.unref(o),l=>{l&&tt(r,`[${i}] ${t} is about to be deprecated in version ${n}, please use ${e} instead.
6
6
  For more detail, please visit: ${a}
7
- `)},{immediate:!0})};var mb={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 yb=t=>(e,r)=>bb(e,r,s.unref(t)),bb=(t,e,r)=>_r(r,t,t).replace(/\{(\w+)\}/g,(n,a)=>{var i;return`${(i=e==null?void 0:e[a])!=null?i:`{${a}}`}`}),wb=t=>{const e=s.computed(()=>s.unref(t).name),r=s.isRef(t)?t:s.ref(t);return{lang:e,locale:r,t:yb(t)}},Wu=Symbol("localeContextKey"),Ya=t=>{const e=t||s.inject(Wu,s.ref());return wb(s.computed(()=>e.value||mb))},uo="el",Cb="is-",Tn=(t,e,r,n,a)=>{let i=`${t}-${e}`;return r&&(i+=`-${r}`),n&&(i+=`__${n}`),a&&(i+=`--${a}`),i},ju=Symbol("namespaceContextKey"),Ys=t=>{const e=t||(s.getCurrentInstance()?s.inject(ju,s.ref(uo)):s.ref(uo));return s.computed(()=>s.unref(e)||uo)},Be=(t,e)=>{const r=Ys(e);return{namespace:r,b:(g="")=>Tn(r.value,t,g,"",""),e:g=>g?Tn(r.value,t,"",g,""):"",m:g=>g?Tn(r.value,t,"","",g):"",be:(g,y)=>g&&y?Tn(r.value,t,g,y,""):"",em:(g,y)=>g&&y?Tn(r.value,t,"",g,y):"",bm:(g,y)=>g&&y?Tn(r.value,t,g,"",y):"",bem:(g,y,m)=>g&&y&&m?Tn(r.value,t,g,y,m):"",is:(g,...y)=>{const m=y.length>=1?y[0]:!0;return g&&m?`${Cb}${g}`:""},cssVar:g=>{const y={};for(const m in g)g[m]&&(y[`--${r.value}-${m}`]=g[m]);return y},cssVarName:g=>`--${r.value}-${g}`,cssVarBlock:g=>{const y={};for(const m in g)g[m]&&(y[`--${r.value}-${t}-${m}`]=g[m]);return y},cssVarBlockName:g=>`--${r.value}-${t}-${g}`}},kb=lo({type:ke(Boolean),default:null}),xb=lo({type:ke(Function)}),Eb=t=>{const e=`update:${t}`,r=`onUpdate:${t}`,n=[e],a={[t]:kb,[r]:xb};return{useModelToggle:({indicator:o,toggleReason:l,shouldHideWhenRouteChanges:u,shouldProceed:c,onShow:d,onHide:f})=>{const p=s.getCurrentInstance(),{emit:v}=p,h=p.props,g=s.computed(()=>Lt(h[r])),y=s.computed(()=>h[t]===null),m=k=>{o.value!==!0&&(o.value=!0,l&&(l.value=k),Lt(d)&&d(k))},b=k=>{o.value!==!1&&(o.value=!1,l&&(l.value=k),Lt(f)&&f(k))},w=k=>{if(h.disabled===!0||Lt(c)&&!c())return;const B=g.value&&et;B&&v(e,!0),(y.value||!B)&&m(k)},C=k=>{if(h.disabled===!0||!et)return;const B=g.value&&et;B&&v(e,!1),(y.value||!B)&&b(k)},x=k=>{Qn(k)&&(h.disabled&&k?g.value&&v(e,!1):o.value!==k&&(k?m():b()))},E=()=>{o.value?C():w()};return s.watch(()=>h[t],x),u&&p.appContext.config.globalProperties.$route!==void 0&&s.watch(()=>({...p.proxy.$route}),()=>{u.value&&o.value&&C()}),s.onMounted(()=>{x(h[t])}),{hide:C,show:w,toggle:E,hasUpdateHandler:g}},useModelToggleProps:a,useModelToggleEmits:n}},Yu=t=>{const e=s.getCurrentInstance();return s.computed(()=>{var r,n;return(n=(r=e==null?void 0:e.proxy)==null?void 0:r.$props)==null?void 0:n[t]})};var Rt="top",Yt="bottom",Xt="right",Vt="left",Xs="auto",Xa=[Rt,Yt,Xt,Vt],ta="start",Za="end",Sb="clippingParents",Xu="viewport",Qa="popper",Tb="reference",Zu=Xa.reduce(function(t,e){return t.concat([e+"-"+ta,e+"-"+Za])},[]),fo=[].concat(Xa,[Xs]).reduce(function(t,e){return t.concat([e,e+"-"+ta,e+"-"+Za])},[]),Bb="beforeRead",Nb="read",Db="afterRead",Pb="beforeMain",Ob="main",_b="afterMain",Fb="beforeWrite",Lb="write",Mb="afterWrite",Ib=[Bb,Nb,Db,Pb,Ob,_b,Fb,Lb,Mb];function gr(t){return t?(t.nodeName||"").toLowerCase():null}function ar(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ra(t){var e=ar(t).Element;return t instanceof e||t instanceof Element}function Zt(t){var e=ar(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Zs(t){if(typeof ShadowRoot>"u")return!1;var e=ar(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Ab(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},a=e.attributes[r]||{},i=e.elements[r];!Zt(i)||!gr(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(o){var l=a[o];l===!1?i.removeAttribute(o):i.setAttribute(o,l===!0?"":l)}))})}function Rb(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var a=e.elements[n],i=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),l=o.reduce(function(u,c){return u[c]="",u},{});!Zt(a)||!gr(a)||(Object.assign(a.style,l),Object.keys(i).forEach(function(u){a.removeAttribute(u)}))})}}var Qu={name:"applyStyles",enabled:!0,phase:"write",fn:Ab,effect:Rb,requires:["computeStyles"]};function mr(t){return t.split("-")[0]}var Bn=Math.max,ho=Math.min,na=Math.round;function aa(t,e){e===void 0&&(e=!1);var r=t.getBoundingClientRect(),n=1,a=1;if(Zt(t)&&e){var i=t.offsetHeight,o=t.offsetWidth;o>0&&(n=na(r.width)/o||1),i>0&&(a=na(r.height)/i||1)}return{width:r.width/n,height:r.height/a,top:r.top/a,right:r.right/n,bottom:r.bottom/a,left:r.left/n,x:r.left/n,y:r.top/a}}function Qs(t){var e=aa(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function Ju(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&Zs(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Mr(t){return ar(t).getComputedStyle(t)}function Vb(t){return["table","td","th"].indexOf(gr(t))>=0}function Zr(t){return((ra(t)?t.ownerDocument:t.document)||window.document).documentElement}function po(t){return gr(t)==="html"?t:t.assignedSlot||t.parentNode||(Zs(t)?t.host:null)||Zr(t)}function ed(t){return!Zt(t)||Mr(t).position==="fixed"?null:t.offsetParent}function $b(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&Zt(t)){var n=Mr(t);if(n.position==="fixed")return null}var a=po(t);for(Zs(a)&&(a=a.host);Zt(a)&&["html","body"].indexOf(gr(a))<0;){var i=Mr(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function Ja(t){for(var e=ar(t),r=ed(t);r&&Vb(r)&&Mr(r).position==="static";)r=ed(r);return r&&(gr(r)==="html"||gr(r)==="body"&&Mr(r).position==="static")?e:r||$b(t)||e}function Js(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ei(t,e,r){return Bn(t,ho(e,r))}function zb(t,e,r){var n=ei(t,e,r);return n>r?r:n}function td(){return{top:0,right:0,bottom:0,left:0}}function rd(t){return Object.assign({},td(),t)}function nd(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var Hb=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,rd(typeof t!="number"?t:nd(t,Xa))};function Kb(t){var e,r=t.state,n=t.name,a=t.options,i=r.elements.arrow,o=r.modifiersData.popperOffsets,l=mr(r.placement),u=Js(l),c=[Vt,Xt].indexOf(l)>=0,d=c?"height":"width";if(!(!i||!o)){var f=Hb(a.padding,r),p=Qs(i),v=u==="y"?Rt:Vt,h=u==="y"?Yt:Xt,g=r.rects.reference[d]+r.rects.reference[u]-o[u]-r.rects.popper[d],y=o[u]-r.rects.reference[u],m=Ja(i),b=m?u==="y"?m.clientHeight||0:m.clientWidth||0:0,w=g/2-y/2,C=f[v],x=b-p[d]-f[h],E=b/2-p[d]/2+w,k=ei(C,E,x),B=u;r.modifiersData[n]=(e={},e[B]=k,e.centerOffset=k-E,e)}}function qb(t){var e=t.state,r=t.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=e.elements.popper.querySelector(a),!a)||!Ju(e.elements.popper,a)||(e.elements.arrow=a))}var Ub={name:"arrow",enabled:!0,phase:"main",fn:Kb,effect:qb,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ia(t){return t.split("-")[1]}var Gb={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Wb(t){var e=t.x,r=t.y,n=window,a=n.devicePixelRatio||1;return{x:na(e*a)/a||0,y:na(r*a)/a||0}}function ad(t){var e,r=t.popper,n=t.popperRect,a=t.placement,i=t.variation,o=t.offsets,l=t.position,u=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,f=t.isFixed,p=o.x,v=p===void 0?0:p,h=o.y,g=h===void 0?0:h,y=typeof d=="function"?d({x:v,y:g}):{x:v,y:g};v=y.x,g=y.y;var m=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),w=Vt,C=Rt,x=window;if(c){var E=Ja(r),k="clientHeight",B="clientWidth";if(E===ar(r)&&(E=Zr(r),Mr(E).position!=="static"&&l==="absolute"&&(k="scrollHeight",B="scrollWidth")),E=E,a===Rt||(a===Vt||a===Xt)&&i===Za){C=Yt;var S=f&&E===x&&x.visualViewport?x.visualViewport.height:E[k];g-=S-n.height,g*=u?1:-1}if(a===Vt||(a===Rt||a===Yt)&&i===Za){w=Xt;var N=f&&E===x&&x.visualViewport?x.visualViewport.width:E[B];v-=N-n.width,v*=u?1:-1}}var D=Object.assign({position:l},c&&Gb),P=d===!0?Wb({x:v,y:g}):{x:v,y:g};if(v=P.x,g=P.y,u){var F;return Object.assign({},D,(F={},F[C]=b?"0":"",F[w]=m?"0":"",F.transform=(x.devicePixelRatio||1)<=1?"translate("+v+"px, "+g+"px)":"translate3d("+v+"px, "+g+"px, 0)",F))}return Object.assign({},D,(e={},e[C]=b?g+"px":"",e[w]=m?v+"px":"",e.transform="",e))}function jb(t){var e=t.state,r=t.options,n=r.gpuAcceleration,a=n===void 0?!0:n,i=r.adaptive,o=i===void 0?!0:i,l=r.roundOffsets,u=l===void 0?!0:l,c={placement:mr(e.placement),variation:ia(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:a,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ad(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ad(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var id={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jb,data:{}},vo={passive:!0};function Yb(t){var e=t.state,r=t.instance,n=t.options,a=n.scroll,i=a===void 0?!0:a,o=n.resize,l=o===void 0?!0:o,u=ar(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(d){d.addEventListener("scroll",r.update,vo)}),l&&u.addEventListener("resize",r.update,vo),function(){i&&c.forEach(function(d){d.removeEventListener("scroll",r.update,vo)}),l&&u.removeEventListener("resize",r.update,vo)}}var od={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Yb,data:{}},Xb={left:"right",right:"left",bottom:"top",top:"bottom"};function go(t){return t.replace(/left|right|bottom|top/g,function(e){return Xb[e]})}var Zb={start:"end",end:"start"};function sd(t){return t.replace(/start|end/g,function(e){return Zb[e]})}function el(t){var e=ar(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function tl(t){return aa(Zr(t)).left+el(t).scrollLeft}function Qb(t){var e=ar(t),r=Zr(t),n=e.visualViewport,a=r.clientWidth,i=r.clientHeight,o=0,l=0;return n&&(a=n.width,i=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=n.offsetLeft,l=n.offsetTop)),{width:a,height:i,x:o+tl(t),y:l}}function Jb(t){var e,r=Zr(t),n=el(t),a=(e=t.ownerDocument)==null?void 0:e.body,i=Bn(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=Bn(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-n.scrollLeft+tl(t),u=-n.scrollTop;return Mr(a||r).direction==="rtl"&&(l+=Bn(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:l,y:u}}function rl(t){var e=Mr(t),r=e.overflow,n=e.overflowX,a=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function ld(t){return["html","body","#document"].indexOf(gr(t))>=0?t.ownerDocument.body:Zt(t)&&rl(t)?t:ld(po(t))}function ti(t,e){var r;e===void 0&&(e=[]);var n=ld(t),a=n===((r=t.ownerDocument)==null?void 0:r.body),i=ar(n),o=a?[i].concat(i.visualViewport||[],rl(n)?n:[]):n,l=e.concat(o);return a?l:l.concat(ti(po(o)))}function nl(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ew(t){var e=aa(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function cd(t,e){return e===Xu?nl(Qb(t)):ra(e)?ew(e):nl(Jb(Zr(t)))}function tw(t){var e=ti(po(t)),r=["absolute","fixed"].indexOf(Mr(t).position)>=0,n=r&&Zt(t)?Ja(t):t;return ra(n)?e.filter(function(a){return ra(a)&&Ju(a,n)&&gr(a)!=="body"}):[]}function rw(t,e,r){var n=e==="clippingParents"?tw(t):[].concat(e),a=[].concat(n,[r]),i=a[0],o=a.reduce(function(l,u){var c=cd(t,u);return l.top=Bn(c.top,l.top),l.right=ho(c.right,l.right),l.bottom=ho(c.bottom,l.bottom),l.left=Bn(c.left,l.left),l},cd(t,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function ud(t){var e=t.reference,r=t.element,n=t.placement,a=n?mr(n):null,i=n?ia(n):null,o=e.x+e.width/2-r.width/2,l=e.y+e.height/2-r.height/2,u;switch(a){case Rt:u={x:o,y:e.y-r.height};break;case Yt:u={x:o,y:e.y+e.height};break;case Xt:u={x:e.x+e.width,y:l};break;case Vt:u={x:e.x-r.width,y:l};break;default:u={x:e.x,y:e.y}}var c=a?Js(a):null;if(c!=null){var d=c==="y"?"height":"width";switch(i){case ta:u[c]=u[c]-(e[d]/2-r[d]/2);break;case Za:u[c]=u[c]+(e[d]/2-r[d]/2);break}}return u}function ri(t,e){e===void 0&&(e={});var r=e,n=r.placement,a=n===void 0?t.placement:n,i=r.boundary,o=i===void 0?Sb:i,l=r.rootBoundary,u=l===void 0?Xu:l,c=r.elementContext,d=c===void 0?Qa:c,f=r.altBoundary,p=f===void 0?!1:f,v=r.padding,h=v===void 0?0:v,g=rd(typeof h!="number"?h:nd(h,Xa)),y=d===Qa?Tb:Qa,m=t.rects.popper,b=t.elements[p?y:d],w=rw(ra(b)?b:b.contextElement||Zr(t.elements.popper),o,u),C=aa(t.elements.reference),x=ud({reference:C,element:m,strategy:"absolute",placement:a}),E=nl(Object.assign({},m,x)),k=d===Qa?E:C,B={top:w.top-k.top+g.top,bottom:k.bottom-w.bottom+g.bottom,left:w.left-k.left+g.left,right:k.right-w.right+g.right},S=t.modifiersData.offset;if(d===Qa&&S){var N=S[a];Object.keys(B).forEach(function(D){var P=[Xt,Yt].indexOf(D)>=0?1:-1,F=[Rt,Yt].indexOf(D)>=0?"y":"x";B[D]+=N[F]*P})}return B}function nw(t,e){e===void 0&&(e={});var r=e,n=r.placement,a=r.boundary,i=r.rootBoundary,o=r.padding,l=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?fo:u,d=ia(n),f=d?l?Zu:Zu.filter(function(h){return ia(h)===d}):Xa,p=f.filter(function(h){return c.indexOf(h)>=0});p.length===0&&(p=f);var v=p.reduce(function(h,g){return h[g]=ri(t,{placement:g,boundary:a,rootBoundary:i,padding:o})[mr(g)],h},{});return Object.keys(v).sort(function(h,g){return v[h]-v[g]})}function aw(t){if(mr(t)===Xs)return[];var e=go(t);return[sd(t),e,sd(e)]}function iw(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,l=o===void 0?!0:o,u=r.fallbackPlacements,c=r.padding,d=r.boundary,f=r.rootBoundary,p=r.altBoundary,v=r.flipVariations,h=v===void 0?!0:v,g=r.allowedAutoPlacements,y=e.options.placement,m=mr(y),b=m===y,w=u||(b||!h?[go(y)]:aw(y)),C=[y].concat(w).reduce(function(ee,J){return ee.concat(mr(J)===Xs?nw(e,{placement:J,boundary:d,rootBoundary:f,padding:c,flipVariations:h,allowedAutoPlacements:g}):J)},[]),x=e.rects.reference,E=e.rects.popper,k=new Map,B=!0,S=C[0],N=0;N<C.length;N++){var D=C[N],P=mr(D),F=ia(D)===ta,O=[Rt,Yt].indexOf(P)>=0,I=O?"width":"height",_=ri(e,{placement:D,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),M=O?F?Xt:Vt:F?Yt:Rt;x[I]>E[I]&&(M=go(M));var L=go(M),R=[];if(i&&R.push(_[P]<=0),l&&R.push(_[M]<=0,_[L]<=0),R.every(function(ee){return ee})){S=D,B=!1;break}k.set(D,R)}if(B)for(var H=h?3:1,$=function(ee){var J=C.find(function(Z){var re=k.get(Z);if(re)return re.slice(0,ee).every(function(Y){return Y})});if(J)return S=J,"break"},z=H;z>0;z--){var j=$(z);if(j==="break")break}e.placement!==S&&(e.modifiersData[n]._skip=!0,e.placement=S,e.reset=!0)}}var ow={name:"flip",enabled:!0,phase:"main",fn:iw,requiresIfExists:["offset"],data:{_skip:!1}};function dd(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function fd(t){return[Rt,Xt,Yt,Vt].some(function(e){return t[e]>=0})}function sw(t){var e=t.state,r=t.name,n=e.rects.reference,a=e.rects.popper,i=e.modifiersData.preventOverflow,o=ri(e,{elementContext:"reference"}),l=ri(e,{altBoundary:!0}),u=dd(o,n),c=dd(l,a,i),d=fd(u),f=fd(c);e.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}var lw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sw};function cw(t,e,r){var n=mr(t),a=[Vt,Rt].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,o=i[0],l=i[1];return o=o||0,l=(l||0)*a,[Vt,Xt].indexOf(n)>=0?{x:l,y:o}:{x:o,y:l}}function uw(t){var e=t.state,r=t.options,n=t.name,a=r.offset,i=a===void 0?[0,0]:a,o=fo.reduce(function(d,f){return d[f]=cw(f,e.rects,i),d},{}),l=o[e.placement],u=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=o}var dw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uw};function fw(t){var e=t.state,r=t.name;e.modifiersData[r]=ud({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var hd={name:"popperOffsets",enabled:!0,phase:"read",fn:fw,data:{}};function hw(t){return t==="x"?"y":"x"}function pw(t){var e=t.state,r=t.options,n=t.name,a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,l=o===void 0?!1:o,u=r.boundary,c=r.rootBoundary,d=r.altBoundary,f=r.padding,p=r.tether,v=p===void 0?!0:p,h=r.tetherOffset,g=h===void 0?0:h,y=ri(e,{boundary:u,rootBoundary:c,padding:f,altBoundary:d}),m=mr(e.placement),b=ia(e.placement),w=!b,C=Js(m),x=hw(C),E=e.modifiersData.popperOffsets,k=e.rects.reference,B=e.rects.popper,S=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,N=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(E){if(i){var F,O=C==="y"?Rt:Vt,I=C==="y"?Yt:Xt,_=C==="y"?"height":"width",M=E[C],L=M+y[O],R=M-y[I],H=v?-B[_]/2:0,$=b===ta?k[_]:B[_],z=b===ta?-B[_]:-k[_],j=e.elements.arrow,ee=v&&j?Qs(j):{width:0,height:0},J=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:td(),Z=J[O],re=J[I],Y=ei(0,k[_],ee[_]),A=w?k[_]/2-H-Y-Z-N.mainAxis:$-Y-Z-N.mainAxis,K=w?-k[_]/2+H+Y+re+N.mainAxis:z+Y+re+N.mainAxis,W=e.elements.arrow&&Ja(e.elements.arrow),oe=W?C==="y"?W.clientTop||0:W.clientLeft||0:0,he=(F=D==null?void 0:D[C])!=null?F:0,ne=M+A-he-oe,se=M+K-he,ue=ei(v?ho(L,ne):L,M,v?Bn(R,se):R);E[C]=ue,P[C]=ue-M}if(l){var pe,de=C==="x"?Rt:Vt,me=C==="x"?Yt:Xt,Ne=E[x],De=x==="y"?"height":"width",Ee=Ne+y[de],Pe=Ne-y[me],te=[Rt,Vt].indexOf(m)!==-1,T=(pe=D==null?void 0:D[x])!=null?pe:0,V=te?Ee:Ne-k[De]-B[De]-T+N.altAxis,Q=te?Ne+k[De]+B[De]-T-N.altAxis:Pe,G=v&&te?zb(V,Ne,Q):ei(v?V:Ee,Ne,v?Q:Pe);E[x]=G,P[x]=G-Ne}e.modifiersData[n]=P}}var vw={name:"preventOverflow",enabled:!0,phase:"main",fn:pw,requiresIfExists:["offset"]};function gw(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function mw(t){return t===ar(t)||!Zt(t)?el(t):gw(t)}function yw(t){var e=t.getBoundingClientRect(),r=na(e.width)/t.offsetWidth||1,n=na(e.height)/t.offsetHeight||1;return r!==1||n!==1}function bw(t,e,r){r===void 0&&(r=!1);var n=Zt(e),a=Zt(e)&&yw(e),i=Zr(e),o=aa(t,a),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&((gr(e)!=="body"||rl(i))&&(l=mw(e)),Zt(e)?(u=aa(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):i&&(u.x=tl(i))),{x:o.left+l.scrollLeft-u.x,y:o.top+l.scrollTop-u.y,width:o.width,height:o.height}}function ww(t){var e=new Map,r=new Set,n=[];t.forEach(function(i){e.set(i.name,i)});function a(i){r.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(l){if(!r.has(l)){var u=e.get(l);u&&a(u)}}),n.push(i)}return t.forEach(function(i){r.has(i.name)||a(i)}),n}function Cw(t){var e=ww(t);return Ib.reduce(function(r,n){return r.concat(e.filter(function(a){return a.phase===n}))},[])}function kw(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function xw(t){var e=t.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var pd={placement:"bottom",modifiers:[],strategy:"absolute"};function vd(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function al(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,a=e.defaultOptions,i=a===void 0?pd:a;return function(o,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},pd,i),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:c,setOptions:function(g){var y=typeof g=="function"?g(c.options):g;h(),c.options=Object.assign({},i,c.options,y),c.scrollParents={reference:ra(o)?ti(o):o.contextElement?ti(o.contextElement):[],popper:ti(l)};var m=Cw(xw([].concat(n,c.options.modifiers)));return c.orderedModifiers=m.filter(function(b){return b.enabled}),v(),p.update()},forceUpdate:function(){if(!f){var g=c.elements,y=g.reference,m=g.popper;if(vd(y,m)){c.rects={reference:bw(y,Ja(m),c.options.strategy==="fixed"),popper:Qs(m)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(B){return c.modifiersData[B.name]=Object.assign({},B.data)});for(var b=0;b<c.orderedModifiers.length;b++){if(c.reset===!0){c.reset=!1,b=-1;continue}var w=c.orderedModifiers[b],C=w.fn,x=w.options,E=x===void 0?{}:x,k=w.name;typeof C=="function"&&(c=C({state:c,options:E,name:k,instance:p})||c)}}}},update:kw(function(){return new Promise(function(g){p.forceUpdate(),g(c)})}),destroy:function(){h(),f=!0}};if(!vd(o,l))return p;p.setOptions(u).then(function(g){!f&&u.onFirstUpdate&&u.onFirstUpdate(g)});function v(){c.orderedModifiers.forEach(function(g){var y=g.name,m=g.options,b=m===void 0?{}:m,w=g.effect;if(typeof w=="function"){var C=w({state:c,name:y,instance:p,options:b}),x=function(){};d.push(C||x)}})}function h(){d.forEach(function(g){return g()}),d=[]}return p}}al();var Ew=[od,hd,id,Qu];al({defaultModifiers:Ew});var Sw=[od,hd,id,Qu,dw,ow,vw,Ub,lw],Tw=al({defaultModifiers:Sw});const Bw=(t,e,r={})=>{const n={name:"updateState",enabled:!0,phase:"write",fn:({state:u})=>{const c=Nw(u);Object.assign(o.value,c)},requires:["computeStyles"]},a=s.computed(()=>{const{onFirstUpdate:u,placement:c,strategy:d,modifiers:f}=s.unref(r);return{onFirstUpdate:u,placement:c||"bottom",strategy:d||"absolute",modifiers:[...f||[],n,{name:"applyStyles",enabled:!1}]}}),i=s.shallowRef(),o=s.ref({styles:{popper:{position:s.unref(a).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{i.value&&(i.value.destroy(),i.value=void 0)};return s.watch(a,u=>{const c=s.unref(i);c&&c.setOptions(u)},{deep:!0}),s.watch([t,e],([u,c])=>{l(),!(!u||!c)&&(i.value=Tw(u,c,s.unref(a)))}),s.onBeforeUnmount(()=>{l()}),{state:s.computed(()=>{var u;return{...((u=s.unref(i))==null?void 0:u.state)||{}}}),styles:s.computed(()=>s.unref(o).styles),attributes:s.computed(()=>s.unref(o).attributes),update:()=>{var u;return(u=s.unref(i))==null?void 0:u.update()},forceUpdate:()=>{var u;return(u=s.unref(i))==null?void 0:u.forceUpdate()},instanceRef:s.computed(()=>s.unref(i))}};function Nw(t){const e=Object.keys(t.elements),r=no(e.map(a=>[a,t.styles[a]||{}])),n=no(e.map(a=>[a,t.attributes[a]]));return{styles:r,attributes:n}}function gd(){let t;const e=(n,a)=>{r(),t=window.setTimeout(n,a)},r=()=>window.clearTimeout(t);return Wi(()=>r()),{registerTimeout:e,cancelTimeout:r}}const il={prefix:Math.floor(Math.random()*1e4),current:0},Dw=Symbol("elIdInjection"),md=()=>s.getCurrentInstance()?s.inject(Dw,il):il,mo=t=>{const e=md();!et&&e===il&&tt("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
7
+ `)},{immediate:!0})};var mb={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 yb=t=>(e,r)=>bb(e,r,s.unref(t)),bb=(t,e,r)=>_r(r,t,t).replace(/\{(\w+)\}/g,(n,a)=>{var i;return`${(i=e==null?void 0:e[a])!=null?i:`{${a}}`}`}),wb=t=>{const e=s.computed(()=>s.unref(t).name),r=s.isRef(t)?t:s.ref(t);return{lang:e,locale:r,t:yb(t)}},ju=Symbol("localeContextKey"),Ya=t=>{const e=t||s.inject(ju,s.ref());return wb(s.computed(()=>e.value||mb))},uo="el",Cb="is-",Tn=(t,e,r,n,a)=>{let i=`${t}-${e}`;return r&&(i+=`-${r}`),n&&(i+=`__${n}`),a&&(i+=`--${a}`),i},Yu=Symbol("namespaceContextKey"),Ys=t=>{const e=t||(s.getCurrentInstance()?s.inject(Yu,s.ref(uo)):s.ref(uo));return s.computed(()=>s.unref(e)||uo)},Be=(t,e)=>{const r=Ys(e);return{namespace:r,b:(g="")=>Tn(r.value,t,g,"",""),e:g=>g?Tn(r.value,t,"",g,""):"",m:g=>g?Tn(r.value,t,"","",g):"",be:(g,y)=>g&&y?Tn(r.value,t,g,y,""):"",em:(g,y)=>g&&y?Tn(r.value,t,"",g,y):"",bm:(g,y)=>g&&y?Tn(r.value,t,g,"",y):"",bem:(g,y,m)=>g&&y&&m?Tn(r.value,t,g,y,m):"",is:(g,...y)=>{const m=y.length>=1?y[0]:!0;return g&&m?`${Cb}${g}`:""},cssVar:g=>{const y={};for(const m in g)g[m]&&(y[`--${r.value}-${m}`]=g[m]);return y},cssVarName:g=>`--${r.value}-${g}`,cssVarBlock:g=>{const y={};for(const m in g)g[m]&&(y[`--${r.value}-${t}-${m}`]=g[m]);return y},cssVarBlockName:g=>`--${r.value}-${t}-${g}`}},kb=lo({type:ke(Boolean),default:null}),xb=lo({type:ke(Function)}),Eb=t=>{const e=`update:${t}`,r=`onUpdate:${t}`,n=[e],a={[t]:kb,[r]:xb};return{useModelToggle:({indicator:o,toggleReason:l,shouldHideWhenRouteChanges:u,shouldProceed:c,onShow:d,onHide:f})=>{const p=s.getCurrentInstance(),{emit:v}=p,h=p.props,g=s.computed(()=>Ft(h[r])),y=s.computed(()=>h[t]===null),m=k=>{o.value!==!0&&(o.value=!0,l&&(l.value=k),Ft(d)&&d(k))},b=k=>{o.value!==!1&&(o.value=!1,l&&(l.value=k),Ft(f)&&f(k))},w=k=>{if(h.disabled===!0||Ft(c)&&!c())return;const B=g.value&&et;B&&v(e,!0),(y.value||!B)&&m(k)},C=k=>{if(h.disabled===!0||!et)return;const B=g.value&&et;B&&v(e,!1),(y.value||!B)&&b(k)},x=k=>{Qn(k)&&(h.disabled&&k?g.value&&v(e,!1):o.value!==k&&(k?m():b()))},E=()=>{o.value?C():w()};return s.watch(()=>h[t],x),u&&p.appContext.config.globalProperties.$route!==void 0&&s.watch(()=>({...p.proxy.$route}),()=>{u.value&&o.value&&C()}),s.onMounted(()=>{x(h[t])}),{hide:C,show:w,toggle:E,hasUpdateHandler:g}},useModelToggleProps:a,useModelToggleEmits:n}},Xu=t=>{const e=s.getCurrentInstance();return s.computed(()=>{var r,n;return(n=(r=e==null?void 0:e.proxy)==null?void 0:r.$props)==null?void 0:n[t]})};var Vt="top",Yt="bottom",Xt="right",Rt="left",Xs="auto",Xa=[Vt,Yt,Xt,Rt],ta="start",Za="end",Sb="clippingParents",Zu="viewport",Qa="popper",Tb="reference",Qu=Xa.reduce(function(t,e){return t.concat([e+"-"+ta,e+"-"+Za])},[]),fo=[].concat(Xa,[Xs]).reduce(function(t,e){return t.concat([e,e+"-"+ta,e+"-"+Za])},[]),Bb="beforeRead",Nb="read",Db="afterRead",Pb="beforeMain",Ob="main",_b="afterMain",Lb="beforeWrite",Fb="write",Mb="afterWrite",Ib=[Bb,Nb,Db,Pb,Ob,_b,Lb,Fb,Mb];function gr(t){return t?(t.nodeName||"").toLowerCase():null}function ar(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ra(t){var e=ar(t).Element;return t instanceof e||t instanceof Element}function Zt(t){var e=ar(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Zs(t){if(typeof ShadowRoot>"u")return!1;var e=ar(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Ab(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},a=e.attributes[r]||{},i=e.elements[r];!Zt(i)||!gr(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(o){var l=a[o];l===!1?i.removeAttribute(o):i.setAttribute(o,l===!0?"":l)}))})}function Vb(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var a=e.elements[n],i=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),l=o.reduce(function(u,c){return u[c]="",u},{});!Zt(a)||!gr(a)||(Object.assign(a.style,l),Object.keys(i).forEach(function(u){a.removeAttribute(u)}))})}}var Ju={name:"applyStyles",enabled:!0,phase:"write",fn:Ab,effect:Vb,requires:["computeStyles"]};function mr(t){return t.split("-")[0]}var Bn=Math.max,ho=Math.min,na=Math.round;function aa(t,e){e===void 0&&(e=!1);var r=t.getBoundingClientRect(),n=1,a=1;if(Zt(t)&&e){var i=t.offsetHeight,o=t.offsetWidth;o>0&&(n=na(r.width)/o||1),i>0&&(a=na(r.height)/i||1)}return{width:r.width/n,height:r.height/a,top:r.top/a,right:r.right/n,bottom:r.bottom/a,left:r.left/n,x:r.left/n,y:r.top/a}}function Qs(t){var e=aa(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function ed(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&Zs(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Mr(t){return ar(t).getComputedStyle(t)}function Rb(t){return["table","td","th"].indexOf(gr(t))>=0}function Zr(t){return((ra(t)?t.ownerDocument:t.document)||window.document).documentElement}function po(t){return gr(t)==="html"?t:t.assignedSlot||t.parentNode||(Zs(t)?t.host:null)||Zr(t)}function td(t){return!Zt(t)||Mr(t).position==="fixed"?null:t.offsetParent}function $b(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&Zt(t)){var n=Mr(t);if(n.position==="fixed")return null}var a=po(t);for(Zs(a)&&(a=a.host);Zt(a)&&["html","body"].indexOf(gr(a))<0;){var i=Mr(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function Ja(t){for(var e=ar(t),r=td(t);r&&Rb(r)&&Mr(r).position==="static";)r=td(r);return r&&(gr(r)==="html"||gr(r)==="body"&&Mr(r).position==="static")?e:r||$b(t)||e}function Js(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ei(t,e,r){return Bn(t,ho(e,r))}function zb(t,e,r){var n=ei(t,e,r);return n>r?r:n}function rd(){return{top:0,right:0,bottom:0,left:0}}function nd(t){return Object.assign({},rd(),t)}function ad(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var Hb=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,nd(typeof t!="number"?t:ad(t,Xa))};function Kb(t){var e,r=t.state,n=t.name,a=t.options,i=r.elements.arrow,o=r.modifiersData.popperOffsets,l=mr(r.placement),u=Js(l),c=[Rt,Xt].indexOf(l)>=0,d=c?"height":"width";if(!(!i||!o)){var f=Hb(a.padding,r),p=Qs(i),v=u==="y"?Vt:Rt,h=u==="y"?Yt:Xt,g=r.rects.reference[d]+r.rects.reference[u]-o[u]-r.rects.popper[d],y=o[u]-r.rects.reference[u],m=Ja(i),b=m?u==="y"?m.clientHeight||0:m.clientWidth||0:0,w=g/2-y/2,C=f[v],x=b-p[d]-f[h],E=b/2-p[d]/2+w,k=ei(C,E,x),B=u;r.modifiersData[n]=(e={},e[B]=k,e.centerOffset=k-E,e)}}function qb(t){var e=t.state,r=t.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=e.elements.popper.querySelector(a),!a)||!ed(e.elements.popper,a)||(e.elements.arrow=a))}var Ub={name:"arrow",enabled:!0,phase:"main",fn:Kb,effect:qb,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ia(t){return t.split("-")[1]}var Gb={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Wb(t){var e=t.x,r=t.y,n=window,a=n.devicePixelRatio||1;return{x:na(e*a)/a||0,y:na(r*a)/a||0}}function id(t){var e,r=t.popper,n=t.popperRect,a=t.placement,i=t.variation,o=t.offsets,l=t.position,u=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,f=t.isFixed,p=o.x,v=p===void 0?0:p,h=o.y,g=h===void 0?0:h,y=typeof d=="function"?d({x:v,y:g}):{x:v,y:g};v=y.x,g=y.y;var m=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),w=Rt,C=Vt,x=window;if(c){var E=Ja(r),k="clientHeight",B="clientWidth";if(E===ar(r)&&(E=Zr(r),Mr(E).position!=="static"&&l==="absolute"&&(k="scrollHeight",B="scrollWidth")),E=E,a===Vt||(a===Rt||a===Xt)&&i===Za){C=Yt;var S=f&&E===x&&x.visualViewport?x.visualViewport.height:E[k];g-=S-n.height,g*=u?1:-1}if(a===Rt||(a===Vt||a===Yt)&&i===Za){w=Xt;var N=f&&E===x&&x.visualViewport?x.visualViewport.width:E[B];v-=N-n.width,v*=u?1:-1}}var D=Object.assign({position:l},c&&Gb),P=d===!0?Wb({x:v,y:g}):{x:v,y:g};if(v=P.x,g=P.y,u){var L;return Object.assign({},D,(L={},L[C]=b?"0":"",L[w]=m?"0":"",L.transform=(x.devicePixelRatio||1)<=1?"translate("+v+"px, "+g+"px)":"translate3d("+v+"px, "+g+"px, 0)",L))}return Object.assign({},D,(e={},e[C]=b?g+"px":"",e[w]=m?v+"px":"",e.transform="",e))}function jb(t){var e=t.state,r=t.options,n=r.gpuAcceleration,a=n===void 0?!0:n,i=r.adaptive,o=i===void 0?!0:i,l=r.roundOffsets,u=l===void 0?!0:l,c={placement:mr(e.placement),variation:ia(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:a,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,id(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,id(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var od={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jb,data:{}},vo={passive:!0};function Yb(t){var e=t.state,r=t.instance,n=t.options,a=n.scroll,i=a===void 0?!0:a,o=n.resize,l=o===void 0?!0:o,u=ar(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(d){d.addEventListener("scroll",r.update,vo)}),l&&u.addEventListener("resize",r.update,vo),function(){i&&c.forEach(function(d){d.removeEventListener("scroll",r.update,vo)}),l&&u.removeEventListener("resize",r.update,vo)}}var sd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Yb,data:{}},Xb={left:"right",right:"left",bottom:"top",top:"bottom"};function go(t){return t.replace(/left|right|bottom|top/g,function(e){return Xb[e]})}var Zb={start:"end",end:"start"};function ld(t){return t.replace(/start|end/g,function(e){return Zb[e]})}function el(t){var e=ar(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function tl(t){return aa(Zr(t)).left+el(t).scrollLeft}function Qb(t){var e=ar(t),r=Zr(t),n=e.visualViewport,a=r.clientWidth,i=r.clientHeight,o=0,l=0;return n&&(a=n.width,i=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=n.offsetLeft,l=n.offsetTop)),{width:a,height:i,x:o+tl(t),y:l}}function Jb(t){var e,r=Zr(t),n=el(t),a=(e=t.ownerDocument)==null?void 0:e.body,i=Bn(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=Bn(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-n.scrollLeft+tl(t),u=-n.scrollTop;return Mr(a||r).direction==="rtl"&&(l+=Bn(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:l,y:u}}function rl(t){var e=Mr(t),r=e.overflow,n=e.overflowX,a=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function cd(t){return["html","body","#document"].indexOf(gr(t))>=0?t.ownerDocument.body:Zt(t)&&rl(t)?t:cd(po(t))}function ti(t,e){var r;e===void 0&&(e=[]);var n=cd(t),a=n===((r=t.ownerDocument)==null?void 0:r.body),i=ar(n),o=a?[i].concat(i.visualViewport||[],rl(n)?n:[]):n,l=e.concat(o);return a?l:l.concat(ti(po(o)))}function nl(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ew(t){var e=aa(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function ud(t,e){return e===Zu?nl(Qb(t)):ra(e)?ew(e):nl(Jb(Zr(t)))}function tw(t){var e=ti(po(t)),r=["absolute","fixed"].indexOf(Mr(t).position)>=0,n=r&&Zt(t)?Ja(t):t;return ra(n)?e.filter(function(a){return ra(a)&&ed(a,n)&&gr(a)!=="body"}):[]}function rw(t,e,r){var n=e==="clippingParents"?tw(t):[].concat(e),a=[].concat(n,[r]),i=a[0],o=a.reduce(function(l,u){var c=ud(t,u);return l.top=Bn(c.top,l.top),l.right=ho(c.right,l.right),l.bottom=ho(c.bottom,l.bottom),l.left=Bn(c.left,l.left),l},ud(t,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function dd(t){var e=t.reference,r=t.element,n=t.placement,a=n?mr(n):null,i=n?ia(n):null,o=e.x+e.width/2-r.width/2,l=e.y+e.height/2-r.height/2,u;switch(a){case Vt:u={x:o,y:e.y-r.height};break;case Yt:u={x:o,y:e.y+e.height};break;case Xt:u={x:e.x+e.width,y:l};break;case Rt:u={x:e.x-r.width,y:l};break;default:u={x:e.x,y:e.y}}var c=a?Js(a):null;if(c!=null){var d=c==="y"?"height":"width";switch(i){case ta:u[c]=u[c]-(e[d]/2-r[d]/2);break;case Za:u[c]=u[c]+(e[d]/2-r[d]/2);break}}return u}function ri(t,e){e===void 0&&(e={});var r=e,n=r.placement,a=n===void 0?t.placement:n,i=r.boundary,o=i===void 0?Sb:i,l=r.rootBoundary,u=l===void 0?Zu:l,c=r.elementContext,d=c===void 0?Qa:c,f=r.altBoundary,p=f===void 0?!1:f,v=r.padding,h=v===void 0?0:v,g=nd(typeof h!="number"?h:ad(h,Xa)),y=d===Qa?Tb:Qa,m=t.rects.popper,b=t.elements[p?y:d],w=rw(ra(b)?b:b.contextElement||Zr(t.elements.popper),o,u),C=aa(t.elements.reference),x=dd({reference:C,element:m,strategy:"absolute",placement:a}),E=nl(Object.assign({},m,x)),k=d===Qa?E:C,B={top:w.top-k.top+g.top,bottom:k.bottom-w.bottom+g.bottom,left:w.left-k.left+g.left,right:k.right-w.right+g.right},S=t.modifiersData.offset;if(d===Qa&&S){var N=S[a];Object.keys(B).forEach(function(D){var P=[Xt,Yt].indexOf(D)>=0?1:-1,L=[Vt,Yt].indexOf(D)>=0?"y":"x";B[D]+=N[L]*P})}return B}function nw(t,e){e===void 0&&(e={});var r=e,n=r.placement,a=r.boundary,i=r.rootBoundary,o=r.padding,l=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?fo:u,d=ia(n),f=d?l?Qu:Qu.filter(function(h){return ia(h)===d}):Xa,p=f.filter(function(h){return c.indexOf(h)>=0});p.length===0&&(p=f);var v=p.reduce(function(h,g){return h[g]=ri(t,{placement:g,boundary:a,rootBoundary:i,padding:o})[mr(g)],h},{});return Object.keys(v).sort(function(h,g){return v[h]-v[g]})}function aw(t){if(mr(t)===Xs)return[];var e=go(t);return[ld(t),e,ld(e)]}function iw(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,l=o===void 0?!0:o,u=r.fallbackPlacements,c=r.padding,d=r.boundary,f=r.rootBoundary,p=r.altBoundary,v=r.flipVariations,h=v===void 0?!0:v,g=r.allowedAutoPlacements,y=e.options.placement,m=mr(y),b=m===y,w=u||(b||!h?[go(y)]:aw(y)),C=[y].concat(w).reduce(function(ee,J){return ee.concat(mr(J)===Xs?nw(e,{placement:J,boundary:d,rootBoundary:f,padding:c,flipVariations:h,allowedAutoPlacements:g}):J)},[]),x=e.rects.reference,E=e.rects.popper,k=new Map,B=!0,S=C[0],N=0;N<C.length;N++){var D=C[N],P=mr(D),L=ia(D)===ta,O=[Vt,Yt].indexOf(P)>=0,I=O?"width":"height",_=ri(e,{placement:D,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),M=O?L?Xt:Rt:L?Yt:Vt;x[I]>E[I]&&(M=go(M));var F=go(M),V=[];if(i&&V.push(_[P]<=0),l&&V.push(_[M]<=0,_[F]<=0),V.every(function(ee){return ee})){S=D,B=!1;break}k.set(D,V)}if(B)for(var H=h?3:1,$=function(ee){var J=C.find(function(Z){var re=k.get(Z);if(re)return re.slice(0,ee).every(function(Y){return Y})});if(J)return S=J,"break"},z=H;z>0;z--){var j=$(z);if(j==="break")break}e.placement!==S&&(e.modifiersData[n]._skip=!0,e.placement=S,e.reset=!0)}}var ow={name:"flip",enabled:!0,phase:"main",fn:iw,requiresIfExists:["offset"],data:{_skip:!1}};function fd(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function hd(t){return[Vt,Xt,Yt,Rt].some(function(e){return t[e]>=0})}function sw(t){var e=t.state,r=t.name,n=e.rects.reference,a=e.rects.popper,i=e.modifiersData.preventOverflow,o=ri(e,{elementContext:"reference"}),l=ri(e,{altBoundary:!0}),u=fd(o,n),c=fd(l,a,i),d=hd(u),f=hd(c);e.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}var lw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sw};function cw(t,e,r){var n=mr(t),a=[Rt,Vt].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,o=i[0],l=i[1];return o=o||0,l=(l||0)*a,[Rt,Xt].indexOf(n)>=0?{x:l,y:o}:{x:o,y:l}}function uw(t){var e=t.state,r=t.options,n=t.name,a=r.offset,i=a===void 0?[0,0]:a,o=fo.reduce(function(d,f){return d[f]=cw(f,e.rects,i),d},{}),l=o[e.placement],u=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=o}var dw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uw};function fw(t){var e=t.state,r=t.name;e.modifiersData[r]=dd({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var pd={name:"popperOffsets",enabled:!0,phase:"read",fn:fw,data:{}};function hw(t){return t==="x"?"y":"x"}function pw(t){var e=t.state,r=t.options,n=t.name,a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,l=o===void 0?!1:o,u=r.boundary,c=r.rootBoundary,d=r.altBoundary,f=r.padding,p=r.tether,v=p===void 0?!0:p,h=r.tetherOffset,g=h===void 0?0:h,y=ri(e,{boundary:u,rootBoundary:c,padding:f,altBoundary:d}),m=mr(e.placement),b=ia(e.placement),w=!b,C=Js(m),x=hw(C),E=e.modifiersData.popperOffsets,k=e.rects.reference,B=e.rects.popper,S=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,N=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(E){if(i){var L,O=C==="y"?Vt:Rt,I=C==="y"?Yt:Xt,_=C==="y"?"height":"width",M=E[C],F=M+y[O],V=M-y[I],H=v?-B[_]/2:0,$=b===ta?k[_]:B[_],z=b===ta?-B[_]:-k[_],j=e.elements.arrow,ee=v&&j?Qs(j):{width:0,height:0},J=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:rd(),Z=J[O],re=J[I],Y=ei(0,k[_],ee[_]),A=w?k[_]/2-H-Y-Z-N.mainAxis:$-Y-Z-N.mainAxis,K=w?-k[_]/2+H+Y+re+N.mainAxis:z+Y+re+N.mainAxis,W=e.elements.arrow&&Ja(e.elements.arrow),oe=W?C==="y"?W.clientTop||0:W.clientLeft||0:0,he=(L=D==null?void 0:D[C])!=null?L:0,ne=M+A-he-oe,se=M+K-he,ue=ei(v?ho(F,ne):F,M,v?Bn(V,se):V);E[C]=ue,P[C]=ue-M}if(l){var pe,de=C==="x"?Vt:Rt,me=C==="x"?Yt:Xt,Ne=E[x],De=x==="y"?"height":"width",Ee=Ne+y[de],Pe=Ne-y[me],te=[Vt,Rt].indexOf(m)!==-1,T=(pe=D==null?void 0:D[x])!=null?pe:0,R=te?Ee:Ne-k[De]-B[De]-T+N.altAxis,Q=te?Ne+k[De]+B[De]-T-N.altAxis:Pe,G=v&&te?zb(R,Ne,Q):ei(v?R:Ee,Ne,v?Q:Pe);E[x]=G,P[x]=G-Ne}e.modifiersData[n]=P}}var vw={name:"preventOverflow",enabled:!0,phase:"main",fn:pw,requiresIfExists:["offset"]};function gw(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function mw(t){return t===ar(t)||!Zt(t)?el(t):gw(t)}function yw(t){var e=t.getBoundingClientRect(),r=na(e.width)/t.offsetWidth||1,n=na(e.height)/t.offsetHeight||1;return r!==1||n!==1}function bw(t,e,r){r===void 0&&(r=!1);var n=Zt(e),a=Zt(e)&&yw(e),i=Zr(e),o=aa(t,a),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&((gr(e)!=="body"||rl(i))&&(l=mw(e)),Zt(e)?(u=aa(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):i&&(u.x=tl(i))),{x:o.left+l.scrollLeft-u.x,y:o.top+l.scrollTop-u.y,width:o.width,height:o.height}}function ww(t){var e=new Map,r=new Set,n=[];t.forEach(function(i){e.set(i.name,i)});function a(i){r.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(l){if(!r.has(l)){var u=e.get(l);u&&a(u)}}),n.push(i)}return t.forEach(function(i){r.has(i.name)||a(i)}),n}function Cw(t){var e=ww(t);return Ib.reduce(function(r,n){return r.concat(e.filter(function(a){return a.phase===n}))},[])}function kw(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function xw(t){var e=t.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var vd={placement:"bottom",modifiers:[],strategy:"absolute"};function gd(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function al(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,a=e.defaultOptions,i=a===void 0?vd:a;return function(o,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},vd,i),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:c,setOptions:function(g){var y=typeof g=="function"?g(c.options):g;h(),c.options=Object.assign({},i,c.options,y),c.scrollParents={reference:ra(o)?ti(o):o.contextElement?ti(o.contextElement):[],popper:ti(l)};var m=Cw(xw([].concat(n,c.options.modifiers)));return c.orderedModifiers=m.filter(function(b){return b.enabled}),v(),p.update()},forceUpdate:function(){if(!f){var g=c.elements,y=g.reference,m=g.popper;if(gd(y,m)){c.rects={reference:bw(y,Ja(m),c.options.strategy==="fixed"),popper:Qs(m)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(B){return c.modifiersData[B.name]=Object.assign({},B.data)});for(var b=0;b<c.orderedModifiers.length;b++){if(c.reset===!0){c.reset=!1,b=-1;continue}var w=c.orderedModifiers[b],C=w.fn,x=w.options,E=x===void 0?{}:x,k=w.name;typeof C=="function"&&(c=C({state:c,options:E,name:k,instance:p})||c)}}}},update:kw(function(){return new Promise(function(g){p.forceUpdate(),g(c)})}),destroy:function(){h(),f=!0}};if(!gd(o,l))return p;p.setOptions(u).then(function(g){!f&&u.onFirstUpdate&&u.onFirstUpdate(g)});function v(){c.orderedModifiers.forEach(function(g){var y=g.name,m=g.options,b=m===void 0?{}:m,w=g.effect;if(typeof w=="function"){var C=w({state:c,name:y,instance:p,options:b}),x=function(){};d.push(C||x)}})}function h(){d.forEach(function(g){return g()}),d=[]}return p}}al();var Ew=[sd,pd,od,Ju];al({defaultModifiers:Ew});var Sw=[sd,pd,od,Ju,dw,ow,vw,Ub,lw],Tw=al({defaultModifiers:Sw});const Bw=(t,e,r={})=>{const n={name:"updateState",enabled:!0,phase:"write",fn:({state:u})=>{const c=Nw(u);Object.assign(o.value,c)},requires:["computeStyles"]},a=s.computed(()=>{const{onFirstUpdate:u,placement:c,strategy:d,modifiers:f}=s.unref(r);return{onFirstUpdate:u,placement:c||"bottom",strategy:d||"absolute",modifiers:[...f||[],n,{name:"applyStyles",enabled:!1}]}}),i=s.shallowRef(),o=s.ref({styles:{popper:{position:s.unref(a).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{i.value&&(i.value.destroy(),i.value=void 0)};return s.watch(a,u=>{const c=s.unref(i);c&&c.setOptions(u)},{deep:!0}),s.watch([t,e],([u,c])=>{l(),!(!u||!c)&&(i.value=Tw(u,c,s.unref(a)))}),s.onBeforeUnmount(()=>{l()}),{state:s.computed(()=>{var u;return{...((u=s.unref(i))==null?void 0:u.state)||{}}}),styles:s.computed(()=>s.unref(o).styles),attributes:s.computed(()=>s.unref(o).attributes),update:()=>{var u;return(u=s.unref(i))==null?void 0:u.update()},forceUpdate:()=>{var u;return(u=s.unref(i))==null?void 0:u.forceUpdate()},instanceRef:s.computed(()=>s.unref(i))}};function Nw(t){const e=Object.keys(t.elements),r=no(e.map(a=>[a,t.styles[a]||{}])),n=no(e.map(a=>[a,t.attributes[a]]));return{styles:r,attributes:n}}function md(){let t;const e=(n,a)=>{r(),t=window.setTimeout(n,a)},r=()=>window.clearTimeout(t);return Wi(()=>r()),{registerTimeout:e,cancelTimeout:r}}const il={prefix:Math.floor(Math.random()*1e4),current:0},Dw=Symbol("elIdInjection"),yd=()=>s.getCurrentInstance()?s.inject(Dw,il):il,mo=t=>{const e=yd();!et&&e===il&&tt("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
8
8
  usage: app.provide(ID_INJECTION_KEY, {
9
9
  prefix: number,
10
10
  current: number,
11
- })`);const r=Ys();return s.computed(()=>s.unref(t)||`${r.value}-id-${e.prefix}-${e.current++}`)};let oa=[];const yd=t=>{const e=t;e.key===it.esc&&oa.forEach(r=>r(e))},Pw=t=>{s.onMounted(()=>{oa.length===0&&document.addEventListener("keydown",yd),et&&oa.push(t)}),s.onBeforeUnmount(()=>{oa=oa.filter(e=>e!==t),oa.length===0&&et&&document.removeEventListener("keydown",yd)})};let bd;const wd=()=>{const t=Ys(),e=md(),r=s.computed(()=>`${t.value}-popper-container-${e.prefix}`),n=s.computed(()=>`#${r.value}`);return{id:r,selector:n}},Ow=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},_w=()=>{const{id:t,selector:e}=wd();return s.onBeforeMount(()=>{et&&(process.env.NODE_ENV==="test"||!bd||!document.body.querySelector(e.value))&&(bd=Ow(t.value))}),{id:t,selector:e}},Fw=Ie({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),Lw=({showAfter:t,hideAfter:e,autoClose:r,open:n,close:a})=>{const{registerTimeout:i}=gd(),{registerTimeout:o,cancelTimeout:l}=gd();return{onOpen:d=>{i(()=>{n(d);const f=s.unref(r);gt(f)&&f>0&&o(()=>{a(d)},f)},s.unref(t))},onClose:d=>{l(),i(()=>{a(d)},s.unref(e))}}},Cd=Symbol("elForwardRef"),Mw=t=>{const e=r=>{t.value=r};s.provide(Cd,{setForwardRef:e})},Iw=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),kd={current:0},xd=s.ref(0),Ed=2e3,Sd=Symbol("elZIndexContextKey"),Td=Symbol("zIndexContextKey"),Bd=t=>{const e=s.getCurrentInstance()?s.inject(Sd,kd):kd,r=t||(s.getCurrentInstance()?s.inject(Td,void 0):void 0),n=s.computed(()=>{const o=s.unref(r);return gt(o)?o:Ed}),a=s.computed(()=>n.value+xd.value),i=()=>(e.current++,xd.value=e.current,a.value);return!et&&!s.inject(Sd)&&tt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
12
- usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,currentZIndex:a,nextZIndex:i}};function Aw(t){let e;function r(){if(t.value==null)return;const{selectionStart:a,selectionEnd:i,value:o}=t.value;if(a==null||i==null)return;const l=o.slice(0,Math.max(0,a)),u=o.slice(Math.max(0,i));e={selectionStart:a,selectionEnd:i,value:o,beforeTxt:l,afterTxt:u}}function n(){if(t.value==null||e==null)return;const{value:a}=t.value,{beforeTxt:i,afterTxt:o,selectionStart:l}=e;if(i==null||o==null||l==null)return;let u=a.length;if(a.endsWith(o))u=a.length-o.length;else if(a.startsWith(i))u=i.length;else{const c=i[l-1],d=a.indexOf(c,l-1);d!==-1&&(u=d+1)}t.value.setSelectionRange(u,u)}return[r,n]}const sa=lo({type:String,values:Gu,required:!1}),Nd=Symbol("size"),Rw=()=>{const t=s.inject(Nd,{});return s.computed(()=>s.unref(t.size)||"")};function ol(t,{beforeFocus:e,afterFocus:r,beforeBlur:n,afterBlur:a}={}){const i=s.getCurrentInstance(),{emit:o}=i,l=s.shallowRef(),u=s.ref(!1),c=p=>{Lt(e)&&e(p)||u.value||(u.value=!0,o("focus",p),r==null||r())},d=p=>{var v;Lt(n)&&n(p)||p.relatedTarget&&((v=l.value)!=null&&v.contains(p.relatedTarget))||(u.value=!1,o("blur",p),a==null||a())},f=()=>{var p,v;(p=l.value)!=null&&p.contains(document.activeElement)&&l.value!==document.activeElement||(v=t.value)==null||v.focus()};return s.watch(l,p=>{p&&p.setAttribute("tabindex","-1")}),jt(l,"focus",c,!0),jt(l,"blur",d,!0),jt(l,"click",f,!0),process.env.NODE_ENV==="test"&&s.onMounted(()=>{const p=En(t.value)?t.value:document.querySelector("input,textarea");p&&(jt(p,"focus",c,!0),jt(p,"blur",d,!0))}),{isFocused:u,wrapperRef:l,handleFocus:c,handleBlur:d}}function Dd({afterComposition:t,emit:e}){const r=s.ref(!1),n=l=>{e==null||e("compositionstart",l),r.value=!0},a=l=>{var u;e==null||e("compositionupdate",l);const c=(u=l.target)==null?void 0:u.value,d=c[c.length-1]||"";r.value=!hb(d)},i=l=>{e==null||e("compositionend",l),r.value&&(r.value=!1,s.nextTick(()=>t(l)))};return{isComposing:r,handleComposition:l=>{l.type==="compositionend"?i(l):a(l)},handleCompositionStart:n,handleCompositionUpdate:a,handleCompositionEnd:i}}const Pd=Symbol("emptyValuesContextKey"),Vw="use-empty-values",$w=["",void 0,null],zw=void 0,Hw=Ie({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:t=>Lt(t)?!t():!t}}),Kw=(t,e)=>{const r=s.getCurrentInstance()?s.inject(Pd,s.ref({})):s.ref({}),n=s.computed(()=>t.emptyValues||r.value.emptyValues||$w),a=s.computed(()=>Lt(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:Lt(r.value.valueOnClear)?r.value.valueOnClear():r.value.valueOnClear!==void 0?r.value.valueOnClear:zw),i=o=>n.value.includes(o);return n.value.includes(a.value)||tt(Vw,"value-on-clear should be a value of empty-values"),{emptyValues:n,valueOnClear:a,isEmptyValue:i}},qw=Ie({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Qr=t=>Vu(qw,t),Od=Symbol(),yo=s.ref();function sl(t,e=void 0){const r=s.getCurrentInstance()?s.inject(Od,yo):yo;return t?s.computed(()=>{var n,a;return(a=(n=r.value)==null?void 0:n[t])!=null?a:e}):r}function Uw(t,e){const r=sl(),n=Be(t,s.computed(()=>{var l;return((l=r.value)==null?void 0:l.namespace)||uo})),a=Ya(s.computed(()=>{var l;return(l=r.value)==null?void 0:l.locale})),i=Bd(s.computed(()=>{var l;return((l=r.value)==null?void 0:l.zIndex)||Ed})),o=s.computed(()=>{var l;return s.unref(e)||((l=r.value)==null?void 0:l.size)||""});return Gw(s.computed(()=>s.unref(r)||{})),{ns:n,locale:a,zIndex:i,size:o}}const Gw=(t,e,r=!1)=>{var n;const a=!!s.getCurrentInstance(),i=a?sl():void 0,o=(n=void 0)!=null?n:a?s.provide:void 0;if(!o){tt("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const l=s.computed(()=>{const u=s.unref(t);return i!=null&&i.value?Ww(i.value,u):u});return o(Od,l),o(Wu,s.computed(()=>l.value.locale)),o(ju,s.computed(()=>l.value.namespace)),o(Td,s.computed(()=>l.value.zIndex)),o(Nd,{size:s.computed(()=>l.value.size||"")}),o(Pd,s.computed(()=>({emptyValues:l.value.emptyValues,valueOnClear:l.value.valueOnClear}))),(r||!yo.value)&&(yo.value=l.value),l},Ww=(t,e)=>{const r=[...new Set([...$u(t),...$u(e)])],n={};for(const a of r)n[a]=e[a]!==void 0?e[a]:t[a];return n};var Te=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r};const jw=Ie({size:{type:ke([Number,String])},color:{type:String}}),Yw=s.defineComponent({name:"ElIcon",inheritAttrs:!1}),Xw=s.defineComponent({...Yw,props:jw,setup(t){const e=t,r=Be("icon"),n=s.computed(()=>{const{size:a,color:i}=e;return!a&&!i?{}:{fontSize:Yr(a)?void 0:Jn(a),"--color":i}});return(a,i)=>(s.openBlock(),s.createElementBlock("i",s.mergeProps({class:s.unref(r).b(),style:s.unref(n)},a.$attrs),[s.renderSlot(a.$slots,"default")],16))}});var Zw=Te(Xw,[["__file","icon.vue"]]);const yt=dt(Zw),ll=Symbol("formContextKey"),ni=Symbol("formItemContextKey"),Nn=(t,e={})=>{const r=s.ref(void 0),n=e.prop?r:Yu("size"),a=e.global?r:Rw(),i=e.form?{size:void 0}:s.inject(ll,void 0),o=e.formItem?{size:void 0}:s.inject(ni,void 0);return s.computed(()=>n.value||s.unref(t)||(o==null?void 0:o.size)||(i==null?void 0:i.size)||a.value||"")},ai=t=>{const e=Yu("disabled"),r=s.inject(ll,void 0);return s.computed(()=>e.value||s.unref(t)||(r==null?void 0:r.disabled)||!1)},Dn=()=>{const t=s.inject(ll,void 0),e=s.inject(ni,void 0);return{form:t,formItem:e}},ii=(t,{formItemContext:e,disableIdGeneration:r,disableIdManagement:n})=>{r||(r=s.ref(!1)),n||(n=s.ref(!1));const a=s.ref();let i;const o=s.computed(()=>{var l;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((l=e.inputIds)==null?void 0:l.length)<=1)});return s.onMounted(()=>{i=s.watch([s.toRef(t,"id"),r],([l,u])=>{const c=l??(u?void 0:mo().value);c!==a.value&&(e!=null&&e.removeInputId&&(a.value&&e.removeInputId(a.value),!(n!=null&&n.value)&&!u&&c&&e.addInputId(c)),a.value=c)},{immediate:!0})}),s.onUnmounted(()=>{i&&i(),e!=null&&e.removeInputId&&a.value&&e.removeInputId(a.value)}),{isLabeledByFormItem:o,inputId:a}};let ir;const Qw=`
11
+ })`);const r=Ys();return s.computed(()=>s.unref(t)||`${r.value}-id-${e.prefix}-${e.current++}`)};let oa=[];const bd=t=>{const e=t;e.key===it.esc&&oa.forEach(r=>r(e))},Pw=t=>{s.onMounted(()=>{oa.length===0&&document.addEventListener("keydown",bd),et&&oa.push(t)}),s.onBeforeUnmount(()=>{oa=oa.filter(e=>e!==t),oa.length===0&&et&&document.removeEventListener("keydown",bd)})};let wd;const Cd=()=>{const t=Ys(),e=yd(),r=s.computed(()=>`${t.value}-popper-container-${e.prefix}`),n=s.computed(()=>`#${r.value}`);return{id:r,selector:n}},Ow=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},_w=()=>{const{id:t,selector:e}=Cd();return s.onBeforeMount(()=>{et&&(process.env.NODE_ENV==="test"||!wd||!document.body.querySelector(e.value))&&(wd=Ow(t.value))}),{id:t,selector:e}},Lw=Ie({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),Fw=({showAfter:t,hideAfter:e,autoClose:r,open:n,close:a})=>{const{registerTimeout:i}=md(),{registerTimeout:o,cancelTimeout:l}=md();return{onOpen:d=>{i(()=>{n(d);const f=s.unref(r);gt(f)&&f>0&&o(()=>{a(d)},f)},s.unref(t))},onClose:d=>{l(),i(()=>{a(d)},s.unref(e))}}},kd=Symbol("elForwardRef"),Mw=t=>{const e=r=>{t.value=r};s.provide(kd,{setForwardRef:e})},Iw=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),xd={current:0},Ed=s.ref(0),Sd=2e3,Td=Symbol("elZIndexContextKey"),Bd=Symbol("zIndexContextKey"),Nd=t=>{const e=s.getCurrentInstance()?s.inject(Td,xd):xd,r=t||(s.getCurrentInstance()?s.inject(Bd,void 0):void 0),n=s.computed(()=>{const o=s.unref(r);return gt(o)?o:Sd}),a=s.computed(()=>n.value+Ed.value),i=()=>(e.current++,Ed.value=e.current,a.value);return!et&&!s.inject(Td)&&tt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
12
+ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,currentZIndex:a,nextZIndex:i}};function Aw(t){let e;function r(){if(t.value==null)return;const{selectionStart:a,selectionEnd:i,value:o}=t.value;if(a==null||i==null)return;const l=o.slice(0,Math.max(0,a)),u=o.slice(Math.max(0,i));e={selectionStart:a,selectionEnd:i,value:o,beforeTxt:l,afterTxt:u}}function n(){if(t.value==null||e==null)return;const{value:a}=t.value,{beforeTxt:i,afterTxt:o,selectionStart:l}=e;if(i==null||o==null||l==null)return;let u=a.length;if(a.endsWith(o))u=a.length-o.length;else if(a.startsWith(i))u=i.length;else{const c=i[l-1],d=a.indexOf(c,l-1);d!==-1&&(u=d+1)}t.value.setSelectionRange(u,u)}return[r,n]}const sa=lo({type:String,values:Wu,required:!1}),Dd=Symbol("size"),Vw=()=>{const t=s.inject(Dd,{});return s.computed(()=>s.unref(t.size)||"")};function ol(t,{beforeFocus:e,afterFocus:r,beforeBlur:n,afterBlur:a}={}){const i=s.getCurrentInstance(),{emit:o}=i,l=s.shallowRef(),u=s.ref(!1),c=p=>{Ft(e)&&e(p)||u.value||(u.value=!0,o("focus",p),r==null||r())},d=p=>{var v;Ft(n)&&n(p)||p.relatedTarget&&((v=l.value)!=null&&v.contains(p.relatedTarget))||(u.value=!1,o("blur",p),a==null||a())},f=()=>{var p,v;(p=l.value)!=null&&p.contains(document.activeElement)&&l.value!==document.activeElement||(v=t.value)==null||v.focus()};return s.watch(l,p=>{p&&p.setAttribute("tabindex","-1")}),jt(l,"focus",c,!0),jt(l,"blur",d,!0),jt(l,"click",f,!0),process.env.NODE_ENV==="test"&&s.onMounted(()=>{const p=En(t.value)?t.value:document.querySelector("input,textarea");p&&(jt(p,"focus",c,!0),jt(p,"blur",d,!0))}),{isFocused:u,wrapperRef:l,handleFocus:c,handleBlur:d}}function Pd({afterComposition:t,emit:e}){const r=s.ref(!1),n=l=>{e==null||e("compositionstart",l),r.value=!0},a=l=>{var u;e==null||e("compositionupdate",l);const c=(u=l.target)==null?void 0:u.value,d=c[c.length-1]||"";r.value=!hb(d)},i=l=>{e==null||e("compositionend",l),r.value&&(r.value=!1,s.nextTick(()=>t(l)))};return{isComposing:r,handleComposition:l=>{l.type==="compositionend"?i(l):a(l)},handleCompositionStart:n,handleCompositionUpdate:a,handleCompositionEnd:i}}const Od=Symbol("emptyValuesContextKey"),Rw="use-empty-values",$w=["",void 0,null],zw=void 0,Hw=Ie({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:t=>Ft(t)?!t():!t}}),Kw=(t,e)=>{const r=s.getCurrentInstance()?s.inject(Od,s.ref({})):s.ref({}),n=s.computed(()=>t.emptyValues||r.value.emptyValues||$w),a=s.computed(()=>Ft(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:Ft(r.value.valueOnClear)?r.value.valueOnClear():r.value.valueOnClear!==void 0?r.value.valueOnClear:zw),i=o=>n.value.includes(o);return n.value.includes(a.value)||tt(Rw,"value-on-clear should be a value of empty-values"),{emptyValues:n,valueOnClear:a,isEmptyValue:i}},qw=Ie({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Qr=t=>$u(qw,t),_d=Symbol(),yo=s.ref();function sl(t,e=void 0){const r=s.getCurrentInstance()?s.inject(_d,yo):yo;return t?s.computed(()=>{var n,a;return(a=(n=r.value)==null?void 0:n[t])!=null?a:e}):r}function Uw(t,e){const r=sl(),n=Be(t,s.computed(()=>{var l;return((l=r.value)==null?void 0:l.namespace)||uo})),a=Ya(s.computed(()=>{var l;return(l=r.value)==null?void 0:l.locale})),i=Nd(s.computed(()=>{var l;return((l=r.value)==null?void 0:l.zIndex)||Sd})),o=s.computed(()=>{var l;return s.unref(e)||((l=r.value)==null?void 0:l.size)||""});return Gw(s.computed(()=>s.unref(r)||{})),{ns:n,locale:a,zIndex:i,size:o}}const Gw=(t,e,r=!1)=>{var n;const a=!!s.getCurrentInstance(),i=a?sl():void 0,o=(n=void 0)!=null?n:a?s.provide:void 0;if(!o){tt("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const l=s.computed(()=>{const u=s.unref(t);return i!=null&&i.value?Ww(i.value,u):u});return o(_d,l),o(ju,s.computed(()=>l.value.locale)),o(Yu,s.computed(()=>l.value.namespace)),o(Bd,s.computed(()=>l.value.zIndex)),o(Dd,{size:s.computed(()=>l.value.size||"")}),o(Od,s.computed(()=>({emptyValues:l.value.emptyValues,valueOnClear:l.value.valueOnClear}))),(r||!yo.value)&&(yo.value=l.value),l},Ww=(t,e)=>{const r=[...new Set([...zu(t),...zu(e)])],n={};for(const a of r)n[a]=e[a]!==void 0?e[a]:t[a];return n};var Te=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r};const jw=Ie({size:{type:ke([Number,String])},color:{type:String}}),Yw=s.defineComponent({name:"ElIcon",inheritAttrs:!1}),Xw=s.defineComponent({...Yw,props:jw,setup(t){const e=t,r=Be("icon"),n=s.computed(()=>{const{size:a,color:i}=e;return!a&&!i?{}:{fontSize:Yr(a)?void 0:Jn(a),"--color":i}});return(a,i)=>(s.openBlock(),s.createElementBlock("i",s.mergeProps({class:s.unref(r).b(),style:s.unref(n)},a.$attrs),[s.renderSlot(a.$slots,"default")],16))}});var Zw=Te(Xw,[["__file","icon.vue"]]);const yt=dt(Zw),ll=Symbol("formContextKey"),ni=Symbol("formItemContextKey"),Nn=(t,e={})=>{const r=s.ref(void 0),n=e.prop?r:Xu("size"),a=e.global?r:Vw(),i=e.form?{size:void 0}:s.inject(ll,void 0),o=e.formItem?{size:void 0}:s.inject(ni,void 0);return s.computed(()=>n.value||s.unref(t)||(o==null?void 0:o.size)||(i==null?void 0:i.size)||a.value||"")},ai=t=>{const e=Xu("disabled"),r=s.inject(ll,void 0);return s.computed(()=>e.value||s.unref(t)||(r==null?void 0:r.disabled)||!1)},Dn=()=>{const t=s.inject(ll,void 0),e=s.inject(ni,void 0);return{form:t,formItem:e}},ii=(t,{formItemContext:e,disableIdGeneration:r,disableIdManagement:n})=>{r||(r=s.ref(!1)),n||(n=s.ref(!1));const a=s.ref();let i;const o=s.computed(()=>{var l;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((l=e.inputIds)==null?void 0:l.length)<=1)});return s.onMounted(()=>{i=s.watch([s.toRef(t,"id"),r],([l,u])=>{const c=l??(u?void 0:mo().value);c!==a.value&&(e!=null&&e.removeInputId&&(a.value&&e.removeInputId(a.value),!(n!=null&&n.value)&&!u&&c&&e.addInputId(c)),a.value=c)},{immediate:!0})}),s.onUnmounted(()=>{i&&i(),e!=null&&e.removeInputId&&a.value&&e.removeInputId(a.value)}),{isLabeledByFormItem:o,inputId:a}};let ir;const Qw=`
13
13
  height:0 !important;
14
14
  visibility:hidden !important;
15
15
  ${Og()?"":"overflow:hidden !important;"}
@@ -17,7 +17,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,curr
17
17
  z-index:-1000 !important;
18
18
  top:0 !important;
19
19
  right:0 !important;
20
- `,Jw=["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 e2(t){const e=window.getComputedStyle(t),r=e.getPropertyValue("box-sizing"),n=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),a=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:Jw.map(o=>`${o}:${e.getPropertyValue(o)}`).join(";"),paddingSize:n,borderSize:a,boxSizing:r}}function _d(t,e=1,r){var n;ir||(ir=document.createElement("textarea"),document.body.appendChild(ir));const{paddingSize:a,borderSize:i,boxSizing:o,contextStyle:l}=e2(t);ir.setAttribute("style",`${l};${Qw}`),ir.value=t.value||t.placeholder||"";let u=ir.scrollHeight;const c={};o==="border-box"?u=u+i:o==="content-box"&&(u=u-a),ir.value="";const d=ir.scrollHeight-a;if(gt(e)){let f=d*e;o==="border-box"&&(f=f+a+i),u=Math.max(f,u),c.minHeight=`${f}px`}if(gt(r)){let f=d*r;o==="border-box"&&(f=f+a+i),u=Math.min(f,u)}return c.height=`${u}px`,(n=ir.parentNode)==null||n.removeChild(ir),ir=void 0,c}const t2=Ie({id:{type:String,default:void 0},size:sa,disabled:Boolean,modelValue:{type:ke([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:ke([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:Xr},prefixIcon:{type:Xr},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:ke([Object,Array,String]),default:()=>ea({})},autofocus:Boolean,rows:{type:Number,default:2},...Qr(["ariaLabel"])}),r2={[mt]:t=>St(t),input:t=>St(t),change:t=>St(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},n2=s.defineComponent({name:"ElInput",inheritAttrs:!1}),a2=s.defineComponent({...n2,props:t2,emits:r2,setup(t,{expose:e,emit:r}){const n=t,a=s.useAttrs(),i=s.useSlots(),o=s.computed(()=>{const T={};return n.containerRole==="combobox"&&(T["aria-haspopup"]=a["aria-haspopup"],T["aria-owns"]=a["aria-owns"],T["aria-expanded"]=a["aria-expanded"]),T}),l=s.computed(()=>[n.type==="textarea"?y.b():g.b(),g.m(v.value),g.is("disabled",h.value),g.is("exceed",j.value),{[g.b("group")]:i.prepend||i.append,[g.m("prefix")]:i.prefix||n.prefixIcon,[g.m("suffix")]:i.suffix||n.suffixIcon||n.clearable||n.showPassword,[g.bm("suffix","password-clear")]:R.value&&H.value,[g.b("hidden")]:n.type==="hidden"},a.class]),u=s.computed(()=>[g.e("wrapper"),g.is("focus",S.value)]),c=gb({excludeKeys:s.computed(()=>Object.keys(o.value))}),{form:d,formItem:f}=Dn(),{inputId:p}=ii(n,{formItemContext:f}),v=Nn(),h=ai(),g=Be("input"),y=Be("textarea"),m=s.shallowRef(),b=s.shallowRef(),w=s.ref(!1),C=s.ref(!1),x=s.ref(),E=s.shallowRef(n.inputStyle),k=s.computed(()=>m.value||b.value),{wrapperRef:B,isFocused:S,handleFocus:N,handleBlur:D}=ol(k,{beforeFocus(){return h.value},afterBlur(){var T;n.validateEvent&&((T=f==null?void 0:f.validate)==null||T.call(f,"blur").catch(V=>tt(V)))}}),P=s.computed(()=>{var T;return(T=d==null?void 0:d.statusIcon)!=null?T:!1}),F=s.computed(()=>(f==null?void 0:f.validateState)||""),O=s.computed(()=>F.value&&Uu[F.value]),I=s.computed(()=>C.value?lb:J1),_=s.computed(()=>[a.style]),M=s.computed(()=>[n.inputStyle,E.value,{resize:n.resize}]),L=s.computed(()=>jr(n.modelValue)?"":String(n.modelValue)),R=s.computed(()=>n.clearable&&!h.value&&!n.readonly&&!!L.value&&(S.value||w.value)),H=s.computed(()=>n.showPassword&&!h.value&&!n.readonly&&!!L.value&&(!!L.value||S.value)),$=s.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!h.value&&!n.readonly&&!n.showPassword),z=s.computed(()=>L.value.length),j=s.computed(()=>!!$.value&&z.value>Number(n.maxlength)),ee=s.computed(()=>!!i.suffix||!!n.suffixIcon||R.value||n.showPassword||$.value||!!F.value&&P.value),[J,Z]=Aw(m);Dr(b,T=>{if(A(),!$.value||n.resize!=="both")return;const V=T[0],{width:Q}=V.contentRect;x.value={right:`calc(100% - ${Q+15+6}px)`}});const re=()=>{const{type:T,autosize:V}=n;if(!(!et||T!=="textarea"||!b.value))if(V){const Q=vt(V)?V.minRows:void 0,G=vt(V)?V.maxRows:void 0,U=_d(b.value,Q,G);E.value={overflowY:"hidden",...U},s.nextTick(()=>{b.value.offsetHeight,E.value=U})}else E.value={minHeight:_d(b.value).minHeight}},A=(T=>{let V=!1;return()=>{var Q;if(V||!n.autosize)return;((Q=b.value)==null?void 0:Q.offsetParent)===null||(T(),V=!0)}})(re),K=()=>{const T=k.value,V=n.formatter?n.formatter(L.value):L.value;!T||T.value===V||(T.value=V)},W=async T=>{J();let{value:V}=T.target;if(n.formatter&&(V=n.parser?n.parser(V):V),!he.value){if(V===L.value){K();return}r(mt,V),r("input",V),await s.nextTick(),K(),Z()}},oe=T=>{r("change",T.target.value)},{isComposing:he,handleCompositionStart:ne,handleCompositionUpdate:se,handleCompositionEnd:ue}=Dd({emit:r,afterComposition:W}),pe=()=>{C.value=!C.value,de()},de=async()=>{var T;await s.nextTick(),(T=k.value)==null||T.focus()},me=()=>{var T;return(T=k.value)==null?void 0:T.blur()},Ne=T=>{w.value=!1,r("mouseleave",T)},De=T=>{w.value=!0,r("mouseenter",T)},Ee=T=>{r("keydown",T)},Pe=()=>{var T;(T=k.value)==null||T.select()},te=()=>{r(mt,""),r("change",""),r("clear"),r("input","")};return s.watch(()=>n.modelValue,()=>{var T;s.nextTick(()=>re()),n.validateEvent&&((T=f==null?void 0:f.validate)==null||T.call(f,"change").catch(V=>tt(V)))}),s.watch(L,()=>K()),s.watch(()=>n.type,async()=>{await s.nextTick(),K(),re()}),s.onMounted(()=>{!n.formatter&&n.parser&&tt("ElInput","If you set the parser, you also need to set the formatter."),K(),s.nextTick(re)}),e({input:m,textarea:b,ref:k,textareaStyle:M,autosize:s.toRef(n,"autosize"),isComposing:he,focus:de,blur:me,select:Pe,clear:te,resizeTextarea:re}),(T,V)=>(s.openBlock(),s.createElementBlock("div",s.mergeProps(s.unref(o),{class:[s.unref(l),{[s.unref(g).bm("group","append")]:T.$slots.append,[s.unref(g).bm("group","prepend")]:T.$slots.prepend}],style:s.unref(_),role:T.containerRole,onMouseenter:De,onMouseleave:Ne}),[s.createCommentVNode(" input "),T.type!=="textarea"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createCommentVNode(" prepend slot "),T.$slots.prepend?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(s.unref(g).be("group","prepend"))},[s.renderSlot(T.$slots,"prepend")],2)):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{ref_key:"wrapperRef",ref:B,class:s.normalizeClass(s.unref(u))},[s.createCommentVNode(" prefix slot "),T.$slots.prefix||T.prefixIcon?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(s.unref(g).e("prefix"))},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(g).e("prefix-inner"))},[s.renderSlot(T.$slots,"prefix"),T.prefixIcon?(s.openBlock(),s.createBlock(s.unref(yt),{key:0,class:s.normalizeClass(s.unref(g).e("icon"))},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(T.prefixIcon)))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0)],2)],2)):s.createCommentVNode("v-if",!0),s.createElementVNode("input",s.mergeProps({id:s.unref(p),ref_key:"input",ref:m,class:s.unref(g).e("inner")},s.unref(c),{minlength:T.minlength,maxlength:T.maxlength,type:T.showPassword?C.value?"text":"password":T.type,disabled:s.unref(h),readonly:T.readonly,autocomplete:T.autocomplete,tabindex:T.tabindex,"aria-label":T.ariaLabel,placeholder:T.placeholder,style:T.inputStyle,form:T.form,autofocus:T.autofocus,onCompositionstart:s.unref(ne),onCompositionupdate:s.unref(se),onCompositionend:s.unref(ue),onInput:W,onChange:oe,onKeydown:Ee}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","onCompositionstart","onCompositionupdate","onCompositionend"]),s.createCommentVNode(" suffix slot "),s.unref(ee)?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(s.unref(g).e("suffix"))},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(g).e("suffix-inner"))},[!s.unref(R)||!s.unref(H)||!s.unref($)?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.renderSlot(T.$slots,"suffix"),T.suffixIcon?(s.openBlock(),s.createBlock(s.unref(yt),{key:0,class:s.normalizeClass(s.unref(g).e("icon"))},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(T.suffixIcon)))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0)],64)):s.createCommentVNode("v-if",!0),s.unref(R)?(s.openBlock(),s.createBlock(s.unref(yt),{key:1,class:s.normalizeClass([s.unref(g).e("icon"),s.unref(g).e("clear")]),onMousedown:s.withModifiers(s.unref(Ha),["prevent"]),onClick:te},{default:s.withCtx(()=>[s.createVNode(s.unref(Gs))]),_:1},8,["class","onMousedown"])):s.createCommentVNode("v-if",!0),s.unref(H)?(s.openBlock(),s.createBlock(s.unref(yt),{key:2,class:s.normalizeClass([s.unref(g).e("icon"),s.unref(g).e("password")]),onClick:pe},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(I))))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0),s.unref($)?(s.openBlock(),s.createElementBlock("span",{key:3,class:s.normalizeClass(s.unref(g).e("count"))},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(g).e("count-inner"))},s.toDisplayString(s.unref(z))+" / "+s.toDisplayString(T.maxlength),3)],2)):s.createCommentVNode("v-if",!0),s.unref(F)&&s.unref(O)&&s.unref(P)?(s.openBlock(),s.createBlock(s.unref(yt),{key:4,class:s.normalizeClass([s.unref(g).e("icon"),s.unref(g).e("validateIcon"),s.unref(g).is("loading",s.unref(F)==="validating")])},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(O))))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0)],2)],2)):s.createCommentVNode("v-if",!0)],2),s.createCommentVNode(" append slot "),T.$slots.append?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(s.unref(g).be("group","append"))},[s.renderSlot(T.$slots,"append")],2)):s.createCommentVNode("v-if",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createCommentVNode(" textarea "),s.createElementVNode("textarea",s.mergeProps({id:s.unref(p),ref_key:"textarea",ref:b,class:[s.unref(y).e("inner"),s.unref(g).is("focus",s.unref(S))]},s.unref(c),{minlength:T.minlength,maxlength:T.maxlength,tabindex:T.tabindex,disabled:s.unref(h),readonly:T.readonly,autocomplete:T.autocomplete,style:s.unref(M),"aria-label":T.ariaLabel,placeholder:T.placeholder,form:T.form,autofocus:T.autofocus,rows:T.rows,onCompositionstart:s.unref(ne),onCompositionupdate:s.unref(se),onCompositionend:s.unref(ue),onInput:W,onFocus:s.unref(N),onBlur:s.unref(D),onChange:oe,onKeydown:Ee}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),s.unref($)?(s.openBlock(),s.createElementBlock("span",{key:0,style:s.normalizeStyle(x.value),class:s.normalizeClass(s.unref(g).e("count"))},s.toDisplayString(s.unref(z))+" / "+s.toDisplayString(T.maxlength),7)):s.createCommentVNode("v-if",!0)],64))],16,["role"]))}});var i2=Te(a2,[["__file","input.vue"]]);const Fd=dt(i2),la=4,o2={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},s2=({move:t,size:e,bar:r})=>({[r.size]:e,transform:`translate${r.axis}(${t}%)`}),cl=Symbol("scrollbarContextKey"),l2=Ie({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),c2="Thumb";var Ld=Te(s.defineComponent({__name:"thumb",props:l2,setup(t){const e=t,r=s.inject(cl),n=Be("scrollbar");r||O1(c2,"can not inject scrollbar context");const a=s.ref(),i=s.ref(),o=s.ref({}),l=s.ref(!1);let u=!1,c=!1,d=et?document.onselectstart:null;const f=s.computed(()=>o2[e.vertical?"vertical":"horizontal"]),p=s.computed(()=>s2({size:e.size,move:e.move,bar:f.value})),v=s.computed(()=>a.value[f.value.offset]**2/r.wrapElement[f.value.scrollSize]/e.ratio/i.value[f.value.offset]),h=E=>{var k;if(E.stopPropagation(),E.ctrlKey||[1,2].includes(E.button))return;(k=window.getSelection())==null||k.removeAllRanges(),y(E);const B=E.currentTarget;B&&(o.value[f.value.axis]=B[f.value.offset]-(E[f.value.client]-B.getBoundingClientRect()[f.value.direction]))},g=E=>{if(!i.value||!a.value||!r.wrapElement)return;const k=Math.abs(E.target.getBoundingClientRect()[f.value.direction]-E[f.value.client]),B=i.value[f.value.offset]/2,S=(k-B)*100*v.value/a.value[f.value.offset];r.wrapElement[f.value.scroll]=S*r.wrapElement[f.value.scrollSize]/100},y=E=>{E.stopImmediatePropagation(),u=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",b),d=document.onselectstart,document.onselectstart=()=>!1},m=E=>{if(!a.value||!i.value||u===!1)return;const k=o.value[f.value.axis];if(!k)return;const B=(a.value.getBoundingClientRect()[f.value.direction]-E[f.value.client])*-1,S=i.value[f.value.offset]-k,N=(B-S)*100*v.value/a.value[f.value.offset];r.wrapElement[f.value.scroll]=N*r.wrapElement[f.value.scrollSize]/100},b=()=>{u=!1,o.value[f.value.axis]=0,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",b),x(),c&&(l.value=!1)},w=()=>{c=!1,l.value=!!e.size},C=()=>{c=!0,l.value=u};s.onBeforeUnmount(()=>{x(),document.removeEventListener("mouseup",b)});const x=()=>{document.onselectstart!==d&&(document.onselectstart=d)};return jt(s.toRef(r,"scrollbarElement"),"mousemove",w),jt(s.toRef(r,"scrollbarElement"),"mouseleave",C),(E,k)=>(s.openBlock(),s.createBlock(s.Transition,{name:s.unref(n).b("fade"),persisted:""},{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",{ref_key:"instance",ref:a,class:s.normalizeClass([s.unref(n).e("bar"),s.unref(n).is(s.unref(f).key)]),onMousedown:g},[s.createElementVNode("div",{ref_key:"thumb",ref:i,class:s.normalizeClass(s.unref(n).e("thumb")),style:s.normalizeStyle(s.unref(p)),onMousedown:h},null,38)],34),[[s.vShow,E.always||l.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const u2=Ie({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var d2=Te(s.defineComponent({__name:"bar",props:u2,setup(t,{expose:e}){const r=t,n=s.inject(cl),a=s.ref(0),i=s.ref(0),o=s.ref(""),l=s.ref(""),u=s.ref(1),c=s.ref(1);return e({handleScroll:p=>{if(p){const v=p.offsetHeight-la,h=p.offsetWidth-la;i.value=p.scrollTop*100/v*u.value,a.value=p.scrollLeft*100/h*c.value}},update:()=>{const p=n==null?void 0:n.wrapElement;if(!p)return;const v=p.offsetHeight-la,h=p.offsetWidth-la,g=v**2/p.scrollHeight,y=h**2/p.scrollWidth,m=Math.max(g,r.minSize),b=Math.max(y,r.minSize);u.value=g/(v-g)/(m/(v-m)),c.value=y/(h-y)/(b/(h-b)),l.value=m+la<v?`${m}px`:"",o.value=b+la<h?`${b}px`:""}}),(p,v)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(Ld,{move:a.value,ratio:c.value,size:o.value,always:p.always},null,8,["move","ratio","size","always"]),s.createVNode(Ld,{move:i.value,ratio:u.value,size:l.value,vertical:"",always:p.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const f2=Ie({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:ke([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Qr(["ariaLabel","ariaOrientation"])}),h2={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(gt)},ul="ElScrollbar",p2=s.defineComponent({name:ul}),v2=s.defineComponent({...p2,props:f2,emits:h2,setup(t,{expose:e,emit:r}){const n=t,a=Be("scrollbar");let i,o,l=0,u=0;const c=s.ref(),d=s.ref(),f=s.ref(),p=s.ref(),v=s.computed(()=>{const x={};return n.height&&(x.height=Jn(n.height)),n.maxHeight&&(x.maxHeight=Jn(n.maxHeight)),[n.wrapStyle,x]}),h=s.computed(()=>[n.wrapClass,a.e("wrap"),{[a.em("wrap","hidden-default")]:!n.native}]),g=s.computed(()=>[a.e("view"),n.viewClass]),y=()=>{var x;d.value&&((x=p.value)==null||x.handleScroll(d.value),l=d.value.scrollTop,u=d.value.scrollLeft,r("scroll",{scrollTop:d.value.scrollTop,scrollLeft:d.value.scrollLeft}))};function m(x,E){vt(x)?d.value.scrollTo(x):gt(x)&&gt(E)&&d.value.scrollTo(x,E)}const b=x=>{if(!gt(x)){tt(ul,"value must be a number");return}d.value.scrollTop=x},w=x=>{if(!gt(x)){tt(ul,"value must be a number");return}d.value.scrollLeft=x},C=()=>{var x;(x=p.value)==null||x.update()};return s.watch(()=>n.noresize,x=>{x?(i==null||i(),o==null||o()):({stop:i}=Dr(f,C),o=jt("resize",C))},{immediate:!0}),s.watch(()=>[n.maxHeight,n.height],()=>{n.native||s.nextTick(()=>{var x;C(),d.value&&((x=p.value)==null||x.handleScroll(d.value))})}),s.provide(cl,s.reactive({scrollbarElement:c,wrapElement:d})),s.onActivated(()=>{d.value&&(d.value.scrollTop=l,d.value.scrollLeft=u)}),s.onMounted(()=>{n.native||s.nextTick(()=>{C()})}),s.onUpdated(()=>C()),e({wrapRef:d,update:C,scrollTo:m,setScrollTop:b,setScrollLeft:w,handleScroll:y}),(x,E)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"scrollbarRef",ref:c,class:s.normalizeClass(s.unref(a).b())},[s.createElementVNode("div",{ref_key:"wrapRef",ref:d,class:s.normalizeClass(s.unref(h)),style:s.normalizeStyle(s.unref(v)),tabindex:x.tabindex,onScroll:y},[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(x.tag),{id:x.id,ref_key:"resizeRef",ref:f,class:s.normalizeClass(s.unref(g)),style:s.normalizeStyle(x.viewStyle),role:x.role,"aria-label":x.ariaLabel,"aria-orientation":x.ariaOrientation},{default:s.withCtx(()=>[s.renderSlot(x.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),x.native?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createBlock(d2,{key:0,ref_key:"barRef",ref:p,always:x.always,"min-size":x.minSize},null,8,["always","min-size"]))],2))}});var g2=Te(v2,[["__file","scrollbar.vue"]]);const m2=dt(g2),dl=Symbol("popper"),Md=Symbol("popperContent"),Id=Ie({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),y2=s.defineComponent({name:"ElPopper",inheritAttrs:!1}),b2=s.defineComponent({...y2,props:Id,setup(t,{expose:e}){const r=t,n=s.ref(),a=s.ref(),i=s.ref(),o=s.ref(),l=s.computed(()=>r.role),u={triggerRef:n,popperInstanceRef:a,contentRef:i,referenceRef:o,role:l};return e(u),s.provide(dl,u),(c,d)=>s.renderSlot(c.$slots,"default")}});var w2=Te(b2,[["__file","popper.vue"]]);const Ad=Ie({arrowOffset:{type:Number,default:5}}),C2=s.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),k2=s.defineComponent({...C2,props:Ad,setup(t,{expose:e}){const r=t,n=Be("popper"),{arrowOffset:a,arrowRef:i,arrowStyle:o}=s.inject(Md,void 0);return s.watch(()=>r.arrowOffset,l=>{a.value=l}),s.onBeforeUnmount(()=>{i.value=void 0}),e({arrowRef:i}),(l,u)=>(s.openBlock(),s.createElementBlock("span",{ref_key:"arrowRef",ref:i,class:s.normalizeClass(s.unref(n).e("arrow")),style:s.normalizeStyle(s.unref(o)),"data-popper-arrow":""},null,6))}});var x2=Te(k2,[["__file","arrow.vue"]]);const fl="ElOnlyChild",E2=s.defineComponent({name:fl,setup(t,{slots:e,attrs:r}){var n;const a=s.inject(Cd),i=Iw((n=a==null?void 0:a.setForwardRef)!=null?n:Ha);return()=>{var o;const l=(o=e.default)==null?void 0:o.call(e,r);if(!l)return null;if(l.length>1)return tt(fl,"requires exact only one valid child."),null;const u=Rd(l);return u?s.withDirectives(s.cloneVNode(u,r),[[i]]):(tt(fl,"no valid child node found"),null)}}});function Rd(t){if(!t)return null;const e=t;for(const r of e){if(vt(r))switch(r.type){case s.Comment:continue;case s.Text:case"svg":return Vd(r);case s.Fragment:return Rd(r.children);default:return r}return Vd(r)}return null}function Vd(t){const e=Be("only-child");return s.createVNode("span",{class:e.e("content")},[t])}const $d=Ie({virtualRef:{type:ke(Object)},virtualTriggering:Boolean,onMouseenter:{type:ke(Function)},onMouseleave:{type:ke(Function)},onClick:{type:ke(Function)},onKeydown:{type:ke(Function)},onFocus:{type:ke(Function)},onBlur:{type:ke(Function)},onContextmenu:{type:ke(Function)},id:String,open:Boolean}),S2=s.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),T2=s.defineComponent({...S2,props:$d,setup(t,{expose:e}){const r=t,{role:n,triggerRef:a}=s.inject(dl,void 0);Mw(a);const i=s.computed(()=>l.value?r.id:void 0),o=s.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),l=s.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),u=s.computed(()=>l.value?`${r.open}`:void 0);let c;const d=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return s.onMounted(()=>{s.watch(()=>r.virtualRef,f=>{f&&(a.value=Nr(f))},{immediate:!0}),s.watch(a,(f,p)=>{c==null||c(),c=void 0,En(f)&&(d.forEach(v=>{var h;const g=r[v];g&&(f.addEventListener(v.slice(2).toLowerCase(),g),(h=p==null?void 0:p.removeEventListener)==null||h.call(p,v.slice(2).toLowerCase(),g))}),c=s.watch([i,o,l,u],v=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,g)=>{jr(v[g])?f.removeAttribute(h):f.setAttribute(h,v[g])})},{immediate:!0})),En(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(v=>p.removeAttribute(v))},{immediate:!0})}),s.onBeforeUnmount(()=>{if(c==null||c(),c=void 0,a.value&&En(a.value)){const f=a.value;d.forEach(p=>{const v=r[p];v&&f.removeEventListener(p.slice(2).toLowerCase(),v)}),a.value=void 0}}),e({triggerRef:a}),(f,p)=>f.virtualTriggering?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createBlock(s.unref(E2),s.mergeProps({key:0},f.$attrs,{"aria-controls":s.unref(i),"aria-describedby":s.unref(o),"aria-expanded":s.unref(u),"aria-haspopup":s.unref(l)}),{default:s.withCtx(()=>[s.renderSlot(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var B2=Te(T2,[["__file","trigger.vue"]]);const hl="focus-trap.focus-after-trapped",pl="focus-trap.focus-after-released",N2="focus-trap.focusout-prevented",zd={cancelable:!0,bubbles:!1},D2={cancelable:!0,bubbles:!1},Hd="focusAfterTrapped",Kd="focusAfterReleased",P2=Symbol("elFocusTrap"),vl=s.ref(),bo=s.ref(0),gl=s.ref(0);let wo=0;const qd=t=>{const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e},Ud=(t,e)=>{for(const r of t)if(!O2(r,e))return r},O2=(t,e)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},_2=t=>{const e=qd(t),r=Ud(e,t),n=Ud(e.reverse(),t);return[r,n]},F2=t=>t instanceof HTMLInputElement&&"select"in t,Jr=(t,e)=>{if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),gl.value=window.performance.now(),t!==r&&F2(t)&&e&&t.select()}};function Gd(t,e){const r=[...t],n=t.indexOf(e);return n!==-1&&r.splice(n,1),r}const L2=()=>{let t=[];return{push:n=>{const a=t[0];a&&n!==a&&a.pause(),t=Gd(t,n),t.unshift(n)},remove:n=>{var a,i;t=Gd(t,n),(i=(a=t[0])==null?void 0:a.resume)==null||i.call(a)}}},M2=(t,e=!1)=>{const r=document.activeElement;for(const n of t)if(Jr(n,e),document.activeElement!==r)return},Wd=L2(),I2=()=>bo.value>gl.value,Co=()=>{vl.value="pointer",bo.value=window.performance.now()},jd=()=>{vl.value="keyboard",bo.value=window.performance.now()},A2=()=>(s.onMounted(()=>{wo===0&&(document.addEventListener("mousedown",Co),document.addEventListener("touchstart",Co),document.addEventListener("keydown",jd)),wo++}),s.onBeforeUnmount(()=>{wo--,wo<=0&&(document.removeEventListener("mousedown",Co),document.removeEventListener("touchstart",Co),document.removeEventListener("keydown",jd))}),{focusReason:vl,lastUserFocusTimestamp:bo,lastAutomatedFocusTimestamp:gl}),ko=t=>new CustomEvent(N2,{...D2,detail:t}),R2=s.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Hd,Kd,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const r=s.ref();let n,a;const{focusReason:i}=A2();Pw(h=>{t.trapped&&!o.paused&&e("release-requested",h)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=h=>{if(!t.loop&&!t.trapped||o.paused)return;const{key:g,altKey:y,ctrlKey:m,metaKey:b,currentTarget:w,shiftKey:C}=h,{loop:x}=t,E=g===it.tab&&!y&&!m&&!b,k=document.activeElement;if(E&&k){const B=w,[S,N]=_2(B);if(S&&N){if(!C&&k===N){const P=ko({focusReason:i.value});e("focusout-prevented",P),P.defaultPrevented||(h.preventDefault(),x&&Jr(S,!0))}else if(C&&[S,B].includes(k)){const P=ko({focusReason:i.value});e("focusout-prevented",P),P.defaultPrevented||(h.preventDefault(),x&&Jr(N,!0))}}else if(k===B){const P=ko({focusReason:i.value});e("focusout-prevented",P),P.defaultPrevented||h.preventDefault()}}};s.provide(P2,{focusTrapRef:r,onKeydown:l}),s.watch(()=>t.focusTrapEl,h=>{h&&(r.value=h)},{immediate:!0}),s.watch([r],([h],[g])=>{h&&(h.addEventListener("keydown",l),h.addEventListener("focusin",d),h.addEventListener("focusout",f)),g&&(g.removeEventListener("keydown",l),g.removeEventListener("focusin",d),g.removeEventListener("focusout",f))});const u=h=>{e(Hd,h)},c=h=>e(Kd,h),d=h=>{const g=s.unref(r);if(!g)return;const y=h.target,m=h.relatedTarget,b=y&&g.contains(y);t.trapped||m&&g.contains(m)||(n=m),b&&e("focusin",h),!o.paused&&t.trapped&&(b?a=y:Jr(a,!0))},f=h=>{const g=s.unref(r);if(!(o.paused||!g))if(t.trapped){const y=h.relatedTarget;!jr(y)&&!g.contains(y)&&setTimeout(()=>{if(!o.paused&&t.trapped){const m=ko({focusReason:i.value});e("focusout-prevented",m),m.defaultPrevented||Jr(a,!0)}},0)}else{const y=h.target;y&&g.contains(y)||e("focusout",h)}};async function p(){await s.nextTick();const h=s.unref(r);if(h){Wd.push(o);const g=h.contains(document.activeElement)?n:document.activeElement;if(n=g,!h.contains(g)){const m=new Event(hl,zd);h.addEventListener(hl,u),h.dispatchEvent(m),m.defaultPrevented||s.nextTick(()=>{let b=t.focusStartEl;St(b)||(Jr(b),document.activeElement!==b&&(b="first")),b==="first"&&M2(qd(h),!0),(document.activeElement===g||b==="container")&&Jr(h)})}}}function v(){const h=s.unref(r);if(h){h.removeEventListener(hl,u);const g=new CustomEvent(pl,{...zd,detail:{focusReason:i.value}});h.addEventListener(pl,c),h.dispatchEvent(g),!g.defaultPrevented&&(i.value=="keyboard"||!I2()||h.contains(document.activeElement))&&Jr(n??document.body),h.removeEventListener(pl,c),Wd.remove(o)}}return s.onMounted(()=>{t.trapped&&p(),s.watch(()=>t.trapped,h=>{h?p():v()})}),s.onBeforeUnmount(()=>{t.trapped&&v(),r.value&&(r.value.removeEventListener("keydown",l),r.value.removeEventListener("focusin",d),r.value.removeEventListener("focusout",f),r.value=void 0)}),{onKeydown:l}}});function V2(t,e,r,n,a,i){return s.renderSlot(t.$slots,"default",{handleKeydown:t.onKeydown})}var $2=Te(R2,[["render",V2],["__file","focus-trap.vue"]]);const z2=["fixed","absolute"],H2=Ie({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:ke(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:fo,default:"bottom"},popperOptions:{type:ke(Object),default:()=>({})},strategy:{type:String,values:z2,default:"absolute"}}),Yd=Ie({...H2,id:String,style:{type:ke([String,Array,Object])},className:{type:ke([String,Array,Object])},effect:{type:ke(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:ke([String,Array,Object])},popperStyle:{type:ke([String,Array,Object])},referenceEl:{type:ke(Object)},triggerTargetEl:{type:ke(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Qr(["ariaLabel"])}),K2={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},q2=(t,e=[])=>{const{placement:r,strategy:n,popperOptions:a}=t,i={placement:r,strategy:n,...a,modifiers:[...G2(t),...e]};return W2(i,a==null?void 0:a.modifiers),i},U2=t=>{if(et)return Nr(t)};function G2(t){const{offset:e,gpuAcceleration:r,fallbackPlacements:n}=t;return[{name:"offset",options:{offset:[0,e??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function W2(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const j2=0,Y2=t=>{const{popperInstanceRef:e,contentRef:r,triggerRef:n,role:a}=s.inject(dl,void 0),i=s.ref(),o=s.ref(),l=s.computed(()=>({name:"eventListeners",enabled:!!t.visible})),u=s.computed(()=>{var m;const b=s.unref(i),w=(m=s.unref(o))!=null?m:j2;return{name:"arrow",enabled:!S1(b),options:{element:b,padding:w}}}),c=s.computed(()=>({onFirstUpdate:()=>{h()},...q2(t,[s.unref(u),s.unref(l)])})),d=s.computed(()=>U2(t.referenceEl)||s.unref(n)),{attributes:f,state:p,styles:v,update:h,forceUpdate:g,instanceRef:y}=Bw(d,r,c);return s.watch(y,m=>e.value=m),s.onMounted(()=>{s.watch(()=>{var m;return(m=s.unref(d))==null?void 0:m.getBoundingClientRect()},()=>{h()})}),{attributes:f,arrowRef:i,contentRef:r,instanceRef:y,state:p,styles:v,role:a,forceUpdate:g,update:h}},X2=(t,{attributes:e,styles:r,role:n})=>{const{nextZIndex:a}=Bd(),i=Be("popper"),o=s.computed(()=>s.unref(e).popper),l=s.ref(gt(t.zIndex)?t.zIndex:a()),u=s.computed(()=>[i.b(),i.is("pure",t.pure),i.is(t.effect),t.popperClass]),c=s.computed(()=>[{zIndex:s.unref(l)},s.unref(r).popper,t.popperStyle||{}]),d=s.computed(()=>n.value==="dialog"?"false":void 0),f=s.computed(()=>s.unref(r).arrow||{});return{ariaModal:d,arrowStyle:f,contentAttrs:o,contentClass:u,contentStyle:c,contentZIndex:l,updateZIndex:()=>{l.value=gt(t.zIndex)?t.zIndex:a()}}},Z2=(t,e)=>{const r=s.ref(!1),n=s.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:c=>{var d;((d=c.detail)==null?void 0:d.focusReason)!=="pointer"&&(n.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:c=>{t.visible&&!r.value&&(c.target&&(n.value=c.target),r.value=!0)},onFocusoutPrevented:c=>{t.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,e("close")}}},Q2=s.defineComponent({name:"ElPopperContent"}),J2=s.defineComponent({...Q2,props:Yd,emits:K2,setup(t,{expose:e,emit:r}){const n=t,{focusStartRef:a,trapped:i,onFocusAfterReleased:o,onFocusAfterTrapped:l,onFocusInTrap:u,onFocusoutPrevented:c,onReleaseRequested:d}=Z2(n,r),{attributes:f,arrowRef:p,contentRef:v,styles:h,instanceRef:g,role:y,update:m}=Y2(n),{ariaModal:b,arrowStyle:w,contentAttrs:C,contentClass:x,contentStyle:E,updateZIndex:k}=X2(n,{styles:h,attributes:f,role:y}),B=s.inject(ni,void 0),S=s.ref();s.provide(Md,{arrowStyle:w,arrowRef:p,arrowOffset:S}),B&&s.provide(ni,{...B,addInputId:Ha,removeInputId:Ha});let N;const D=(F=!0)=>{m(),F&&k()},P=()=>{D(!1),n.visible&&n.focusOnShow?i.value=!0:n.visible===!1&&(i.value=!1)};return s.onMounted(()=>{s.watch(()=>n.triggerTargetEl,(F,O)=>{N==null||N(),N=void 0;const I=s.unref(F||v.value),_=s.unref(O||v.value);En(I)&&(N=s.watch([y,()=>n.ariaLabel,b,()=>n.id],M=>{["role","aria-label","aria-modal","id"].forEach((L,R)=>{jr(M[R])?I.removeAttribute(L):I.setAttribute(L,M[R])})},{immediate:!0})),_!==I&&En(_)&&["role","aria-label","aria-modal","id"].forEach(M=>{_.removeAttribute(M)})},{immediate:!0}),s.watch(()=>n.visible,P,{immediate:!0})}),s.onBeforeUnmount(()=>{N==null||N(),N=void 0}),e({popperContentRef:v,popperInstanceRef:g,updatePopper:D,contentStyle:E}),(F,O)=>(s.openBlock(),s.createElementBlock("div",s.mergeProps({ref_key:"contentRef",ref:v},s.unref(C),{style:s.unref(E),class:s.unref(x),tabindex:"-1",onMouseenter:I=>F.$emit("mouseenter",I),onMouseleave:I=>F.$emit("mouseleave",I)}),[s.createVNode(s.unref($2),{trapped:s.unref(i),"trap-on-focus-in":!0,"focus-trap-el":s.unref(v),"focus-start-el":s.unref(a),onFocusAfterTrapped:s.unref(l),onFocusAfterReleased:s.unref(o),onFocusin:s.unref(u),onFocusoutPrevented:s.unref(c),onReleaseRequested:s.unref(d)},{default:s.withCtx(()=>[s.renderSlot(F.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var eC=Te(J2,[["__file","content.vue"]]);const tC=dt(w2),ml=Symbol("elTooltip"),$t=Ie({...Fw,...Yd,appendTo:{type:ke([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:ke(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Qr(["ariaLabel"])}),oi=Ie({...$d,disabled:Boolean,trigger:{type:ke([String,Array]),default:"hover"},triggerKeys:{type:ke(Array),default:()=>[it.enter,it.space]}}),{useModelToggleProps:rC,useModelToggleEmits:nC,useModelToggle:aC}=Eb("visible"),iC=Ie({...Id,...rC,...$t,...oi,...Ad,showArrow:{type:Boolean,default:!0}}),oC=[...nC,"before-show","before-hide","show","hide","open","close"],sC=(t,e)=>At(t)?t.includes(e):t===e,ca=(t,e,r)=>n=>{sC(s.unref(t),e)&&r(n)},lC=s.defineComponent({name:"ElTooltipTrigger"}),cC=s.defineComponent({...lC,props:oi,setup(t,{expose:e}){const r=t,n=Be("tooltip"),{controlled:a,id:i,open:o,onOpen:l,onClose:u,onToggle:c}=s.inject(ml,void 0),d=s.ref(null),f=()=>{if(s.unref(a)||r.disabled)return!0},p=s.toRef(r,"trigger"),v=It(f,ca(p,"hover",l)),h=It(f,ca(p,"hover",u)),g=It(f,ca(p,"click",C=>{C.button===0&&c(C)})),y=It(f,ca(p,"focus",l)),m=It(f,ca(p,"focus",u)),b=It(f,ca(p,"contextmenu",C=>{C.preventDefault(),c(C)})),w=It(f,C=>{const{code:x}=C;r.triggerKeys.includes(x)&&(C.preventDefault(),c(C))});return e({triggerRef:d}),(C,x)=>(s.openBlock(),s.createBlock(s.unref(B2),{id:s.unref(i),"virtual-ref":C.virtualRef,open:s.unref(o),"virtual-triggering":C.virtualTriggering,class:s.normalizeClass(s.unref(n).e("trigger")),onBlur:s.unref(m),onClick:s.unref(g),onContextmenu:s.unref(b),onFocus:s.unref(y),onMouseenter:s.unref(v),onMouseleave:s.unref(h),onKeydown:s.unref(w)},{default:s.withCtx(()=>[s.renderSlot(C.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var uC=Te(cC,[["__file","trigger.vue"]]);const dC=Ie({to:{type:ke([String,Object]),required:!0},disabled:Boolean});var fC=Te(s.defineComponent({__name:"teleport",props:dC,setup(t){return(e,r)=>e.disabled?s.renderSlot(e.$slots,"default",{key:0}):(s.openBlock(),s.createBlock(s.Teleport,{key:1,to:e.to},[s.renderSlot(e.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const hC=dt(fC),pC=s.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),vC=s.defineComponent({...pC,props:$t,setup(t,{expose:e}){const r=t,{selector:n}=wd(),a=Be("tooltip"),i=s.ref(null);let o;const{controlled:l,id:u,open:c,trigger:d,onClose:f,onOpen:p,onShow:v,onHide:h,onBeforeShow:g,onBeforeHide:y}=s.inject(ml,void 0),m=s.computed(()=>r.transition||`${a.namespace.value}-fade-in-linear`),b=s.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);s.onBeforeUnmount(()=>{o==null||o()});const w=s.computed(()=>s.unref(b)?!0:s.unref(c)),C=s.computed(()=>r.disabled?!1:s.unref(c)),x=s.computed(()=>r.appendTo||n.value),E=s.computed(()=>{var _;return(_=r.style)!=null?_:{}}),k=s.ref(!0),B=()=>{h(),k.value=!0},S=()=>{if(s.unref(l))return!0},N=It(S,()=>{r.enterable&&s.unref(d)==="hover"&&p()}),D=It(S,()=>{s.unref(d)==="hover"&&f()}),P=()=>{var _,M;(M=(_=i.value)==null?void 0:_.updatePopper)==null||M.call(_),g==null||g()},F=()=>{y==null||y()},O=()=>{v(),o=bg(s.computed(()=>{var _;return(_=i.value)==null?void 0:_.popperContentRef}),()=>{if(s.unref(l))return;s.unref(d)!=="hover"&&f()})},I=()=>{r.virtualTriggering||f()};return s.watch(()=>s.unref(c),_=>{_?k.value=!1:o==null||o()},{flush:"post"}),s.watch(()=>r.content,()=>{var _,M;(M=(_=i.value)==null?void 0:_.updatePopper)==null||M.call(_)}),e({contentRef:i}),(_,M)=>(s.openBlock(),s.createBlock(s.unref(hC),{disabled:!_.teleported,to:s.unref(x)},{default:s.withCtx(()=>[s.createVNode(s.Transition,{name:s.unref(m),onAfterLeave:B,onBeforeEnter:P,onAfterEnter:O,onBeforeLeave:F},{default:s.withCtx(()=>[s.unref(w)?s.withDirectives((s.openBlock(),s.createBlock(s.unref(eC),s.mergeProps({key:0,id:s.unref(u),ref_key:"contentRef",ref:i},_.$attrs,{"aria-label":_.ariaLabel,"aria-hidden":k.value,"boundaries-padding":_.boundariesPadding,"fallback-placements":_.fallbackPlacements,"gpu-acceleration":_.gpuAcceleration,offset:_.offset,placement:_.placement,"popper-options":_.popperOptions,strategy:_.strategy,effect:_.effect,enterable:_.enterable,pure:_.pure,"popper-class":_.popperClass,"popper-style":[_.popperStyle,s.unref(E)],"reference-el":_.referenceEl,"trigger-target-el":_.triggerTargetEl,visible:s.unref(C),"z-index":_.zIndex,onMouseenter:s.unref(N),onMouseleave:s.unref(D),onBlur:I,onClose:s.unref(f)}),{default:s.withCtx(()=>[s.renderSlot(_.$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"])),[[s.vShow,s.unref(C)]]):s.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var gC=Te(vC,[["__file","content.vue"]]);const mC=s.defineComponent({name:"ElTooltip"}),yC=s.defineComponent({...mC,props:iC,emits:oC,setup(t,{expose:e,emit:r}){const n=t;_w();const a=mo(),i=s.ref(),o=s.ref(),l=()=>{var m;const b=s.unref(i);b&&((m=b.popperInstanceRef)==null||m.update())},u=s.ref(!1),c=s.ref(),{show:d,hide:f,hasUpdateHandler:p}=aC({indicator:u,toggleReason:c}),{onOpen:v,onClose:h}=Lw({showAfter:s.toRef(n,"showAfter"),hideAfter:s.toRef(n,"hideAfter"),autoClose:s.toRef(n,"autoClose"),open:d,close:f}),g=s.computed(()=>Qn(n.visible)&&!p.value);s.provide(ml,{controlled:g,id:a,open:s.readonly(u),trigger:s.toRef(n,"trigger"),onOpen:m=>{v(m)},onClose:m=>{h(m)},onToggle:m=>{s.unref(u)?h(m):v(m)},onShow:()=>{r("show",c.value)},onHide:()=>{r("hide",c.value)},onBeforeShow:()=>{r("before-show",c.value)},onBeforeHide:()=>{r("before-hide",c.value)},updatePopper:l}),s.watch(()=>n.disabled,m=>{m&&u.value&&(u.value=!1)});const y=m=>{var b,w;const C=(w=(b=o.value)==null?void 0:b.contentRef)==null?void 0:w.popperContentRef,x=(m==null?void 0:m.relatedTarget)||document.activeElement;return C&&C.contains(x)};return s.onDeactivated(()=>u.value&&f()),e({popperRef:i,contentRef:o,isFocusInsideContent:y,updatePopper:l,onOpen:v,onClose:h,hide:f}),(m,b)=>(s.openBlock(),s.createBlock(s.unref(tC),{ref_key:"popperRef",ref:i,role:m.role},{default:s.withCtx(()=>[s.createVNode(uC,{disabled:m.disabled,trigger:m.trigger,"trigger-keys":m.triggerKeys,"virtual-ref":m.virtualRef,"virtual-triggering":m.virtualTriggering},{default:s.withCtx(()=>[m.$slots.default?s.renderSlot(m.$slots,"default",{key:0}):s.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),s.createVNode(gC,{ref_key:"contentRef",ref:o,"aria-label":m.ariaLabel,"boundaries-padding":m.boundariesPadding,content:m.content,disabled:m.disabled,effect:m.effect,enterable:m.enterable,"fallback-placements":m.fallbackPlacements,"hide-after":m.hideAfter,"gpu-acceleration":m.gpuAcceleration,offset:m.offset,persistent:m.persistent,"popper-class":m.popperClass,"popper-style":m.popperStyle,placement:m.placement,"popper-options":m.popperOptions,pure:m.pure,"raw-content":m.rawContent,"reference-el":m.referenceEl,"trigger-target-el":m.triggerTargetEl,"show-after":m.showAfter,strategy:m.strategy,teleported:m.teleported,transition:m.transition,"virtual-triggering":m.virtualTriggering,"z-index":m.zIndex,"append-to":m.appendTo},{default:s.withCtx(()=>[s.renderSlot(m.$slots,"content",{},()=>[m.rawContent?(s.openBlock(),s.createElementBlock("span",{key:0,innerHTML:m.content},null,8,["innerHTML"])):(s.openBlock(),s.createElementBlock("span",{key:1},s.toDisplayString(m.content),1))]),m.showArrow?(s.openBlock(),s.createBlock(s.unref(x2),{key:0,"arrow-offset":m.arrowOffset},null,8,["arrow-offset"])):s.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 bC=Te(yC,[["__file","tooltip.vue"]]);const si=dt(bC),Xd=Symbol("buttonGroupContextKey"),wC=(t,e)=>{co({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},s.computed(()=>t.type==="text"));const r=s.inject(Xd,void 0),n=sl("button"),{form:a}=Dn(),i=Nn(s.computed(()=>r==null?void 0:r.size)),o=ai(),l=s.ref(),u=s.useSlots(),c=s.computed(()=>t.type||(r==null?void 0:r.type)||""),d=s.computed(()=>{var h,g,y;return(y=(g=t.autoInsertSpace)!=null?g:(h=n.value)==null?void 0:h.autoInsertSpace)!=null?y:!1}),f=s.computed(()=>t.tag==="button"?{ariaDisabled:o.value||t.loading,disabled:o.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),p=s.computed(()=>{var h;const g=(h=u.default)==null?void 0:h.call(u);if(d.value&&(g==null?void 0:g.length)===1){const y=g[0];if((y==null?void 0:y.type)===s.Text){const m=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(m.trim())}}return!1});return{_disabled:o,_size:i,_type:c,_ref:l,_props:f,shouldAddSpace:p,handleClick:h=>{if(o.value||t.loading){h.stopPropagation();return}t.nativeType==="reset"&&(a==null||a.resetFields()),e("click",h)}}},yl=Ie({size:sa,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:Xr},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:Xr,default:()=>Ws},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:ke([String,Object]),default:"button"}}),CC={click:t=>t instanceof MouseEvent};function bt(t,e){kC(t)&&(t="100%");var r=xC(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function xo(t){return Math.min(1,Math.max(0,t))}function kC(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function xC(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Zd(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Eo(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Pn(t){return t.length===1?"0"+t:String(t)}function EC(t,e,r){return{r:bt(t,255)*255,g:bt(e,255)*255,b:bt(r,255)*255}}function Qd(t,e,r){t=bt(t,255),e=bt(e,255),r=bt(r,255);var n=Math.max(t,e,r),a=Math.min(t,e,r),i=0,o=0,l=(n+a)/2;if(n===a)o=0,i=0;else{var u=n-a;switch(o=l>.5?u/(2-n-a):u/(n+a),n){case t:i=(e-r)/u+(e<r?6:0);break;case e:i=(r-t)/u+2;break;case r:i=(t-e)/u+4;break}i/=6}return{h:i,s:o,l}}function bl(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*(6*r):r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function SC(t,e,r){var n,a,i;if(t=bt(t,360),e=bt(e,100),r=bt(r,100),e===0)a=r,i=r,n=r;else{var o=r<.5?r*(1+e):r+e-r*e,l=2*r-o;n=bl(l,o,t+1/3),a=bl(l,o,t),i=bl(l,o,t-1/3)}return{r:n*255,g:a*255,b:i*255}}function Jd(t,e,r){t=bt(t,255),e=bt(e,255),r=bt(r,255);var n=Math.max(t,e,r),a=Math.min(t,e,r),i=0,o=n,l=n-a,u=n===0?0:l/n;if(n===a)i=0;else{switch(n){case t:i=(e-r)/l+(e<r?6:0);break;case e:i=(r-t)/l+2;break;case r:i=(t-e)/l+4;break}i/=6}return{h:i,s:u,v:o}}function TC(t,e,r){t=bt(t,360)*6,e=bt(e,100),r=bt(r,100);var n=Math.floor(t),a=t-n,i=r*(1-e),o=r*(1-a*e),l=r*(1-(1-a)*e),u=n%6,c=[r,o,i,i,l,r][u],d=[l,r,r,o,i,i][u],f=[i,i,l,r,r,o][u];return{r:c*255,g:d*255,b:f*255}}function ef(t,e,r,n){var a=[Pn(Math.round(t).toString(16)),Pn(Math.round(e).toString(16)),Pn(Math.round(r).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function BC(t,e,r,n,a){var i=[Pn(Math.round(t).toString(16)),Pn(Math.round(e).toString(16)),Pn(Math.round(r).toString(16)),Pn(NC(n))];return a&&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 NC(t){return Math.round(parseFloat(t)*255).toString(16)}function tf(t){return qt(t)/255}function qt(t){return parseInt(t,16)}function DC(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var wl={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 PC(t){var e={r:0,g:0,b:0},r=1,n=null,a=null,i=null,o=!1,l=!1;return typeof t=="string"&&(t=FC(t)),typeof t=="object"&&(Ir(t.r)&&Ir(t.g)&&Ir(t.b)?(e=EC(t.r,t.g,t.b),o=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Ir(t.h)&&Ir(t.s)&&Ir(t.v)?(n=Eo(t.s),a=Eo(t.v),e=TC(t.h,n,a),o=!0,l="hsv"):Ir(t.h)&&Ir(t.s)&&Ir(t.l)&&(n=Eo(t.s),i=Eo(t.l),e=SC(t.h,n,i),o=!0,l="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(r=t.a)),r=Zd(r),{ok:o,format:t.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}var OC="[-\\+]?\\d+%?",_C="[-\\+]?\\d*\\.\\d+%?",en="(?:".concat(_C,")|(?:").concat(OC,")"),Cl="[\\s|\\(]+(".concat(en,")[,|\\s]+(").concat(en,")[,|\\s]+(").concat(en,")\\s*\\)?"),kl="[\\s|\\(]+(".concat(en,")[,|\\s]+(").concat(en,")[,|\\s]+(").concat(en,")[,|\\s]+(").concat(en,")\\s*\\)?"),or={CSS_UNIT:new RegExp(en),rgb:new RegExp("rgb"+Cl),rgba:new RegExp("rgba"+kl),hsl:new RegExp("hsl"+Cl),hsla:new RegExp("hsla"+kl),hsv:new RegExp("hsv"+Cl),hsva:new RegExp("hsva"+kl),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 FC(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(wl[t])t=wl[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=or.rgb.exec(t);return r?{r:r[1],g:r[2],b:r[3]}:(r=or.rgba.exec(t),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=or.hsl.exec(t),r?{h:r[1],s:r[2],l:r[3]}:(r=or.hsla.exec(t),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=or.hsv.exec(t),r?{h:r[1],s:r[2],v:r[3]}:(r=or.hsva.exec(t),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=or.hex8.exec(t),r?{r:qt(r[1]),g:qt(r[2]),b:qt(r[3]),a:tf(r[4]),format:e?"name":"hex8"}:(r=or.hex6.exec(t),r?{r:qt(r[1]),g:qt(r[2]),b:qt(r[3]),format:e?"name":"hex"}:(r=or.hex4.exec(t),r?{r:qt(r[1]+r[1]),g:qt(r[2]+r[2]),b:qt(r[3]+r[3]),a:tf(r[4]+r[4]),format:e?"name":"hex8"}:(r=or.hex3.exec(t),r?{r:qt(r[1]+r[1]),g:qt(r[2]+r[2]),b:qt(r[3]+r[3]),format:e?"name":"hex"}:!1)))))))))}function Ir(t){return!!or.CSS_UNIT.exec(String(t))}var LC=function(){function t(e,r){e===void 0&&(e=""),r===void 0&&(r={});var n;if(e instanceof t)return e;typeof e=="number"&&(e=DC(e)),this.originalInput=e;var a=PC(e);this.originalInput=e,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:a.format,this.gradientType=r.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=a.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),r,n,a,i=e.r/255,o=e.g/255,l=e.b/255;return i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),l<=.03928?a=l/12.92:a=Math.pow((l+.055)/1.055,2.4),.2126*r+.7152*n+.0722*a},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=Zd(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=Jd(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=Jd(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=Qd(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=Qd(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),ef(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),BC(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(r,", ").concat(n,")"):"rgba(".concat(e,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(r){return"".concat(Math.round(bt(r,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(r){return Math.round(bt(r,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+ef(this.r,this.g,this.b,!1),r=0,n=Object.entries(wl);r<n.length;r++){var a=n[r],i=a[0],o=a[1];if(e===o)return i}return!1},t.prototype.toString=function(e){var r=!!e;e=e??this.format;var n=!1,a=this.a<1&&this.a>=0,i=!r&&a&&(e.startsWith("hex")||e==="name");return i?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l+=e/100,r.l=xo(r.l),new t(r)},t.prototype.brighten=function(e){e===void 0&&(e=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),new t(r)},t.prototype.darken=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l-=e/100,r.l=xo(r.l),new t(r)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s-=e/100,r.s=xo(r.s),new t(r)},t.prototype.saturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s+=e/100,r.s=xo(r.s),new t(r)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var r=this.toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,new t(r)},t.prototype.mix=function(e,r){r===void 0&&(r=50);var n=this.toRgb(),a=new t(e).toRgb(),i=r/100,o={r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a};return new t(o)},t.prototype.analogous=function(e,r){e===void 0&&(e=6),r===void 0&&(r=30);var n=this.toHsl(),a=360/r,i=[this];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,i.push(new t(n));return i},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var r=this.toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/e;e--;)o.push(new t({h:n,s:a,v:i})),i=(i+l)%1;return o},t.prototype.splitcomplement=function(){var e=this.toHsl(),r=e.h;return[this,new t({h:(r+72)%360,s:e.s,l:e.l}),new t({h:(r+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var r=this.toRgb(),n=new t(e).toRgb(),a=r.a+n.a*(1-r.a);return new t({r:(r.r*r.a+n.r*n.a*(1-r.a))/a,g:(r.g*r.a+n.g*n.a*(1-r.a))/a,b:(r.b*r.a+n.b*n.a*(1-r.a))/a,a})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var r=this.toHsl(),n=r.h,a=[this],i=360/e,o=1;o<e;o++)a.push(new t({h:(n+o*i)%360,s:r.s,l:r.l}));return a},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function tn(t,e=20){return t.mix("#141414",e).toString()}function MC(t){const e=ai(),r=Be("button");return s.computed(()=>{let n={},a=t.color;if(a){const i=a.match(/var\((.*?)\)/);i&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));const o=new LC(a),l=t.dark?o.tint(20).toString():tn(o,20);if(t.plain)n=r.cssVarBlock({"bg-color":t.dark?tn(o,90):o.tint(90).toString(),"text-color":a,"border-color":t.dark?tn(o,50):o.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":l,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":l}),e.value&&(n[r.cssVarBlockName("disabled-bg-color")]=t.dark?tn(o,90):o.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=t.dark?tn(o,50):o.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=t.dark?tn(o,80):o.tint(80).toString());else{const u=t.dark?tn(o,30):o.tint(30).toString(),c=o.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":a,"text-color":c,"border-color":a,"hover-bg-color":u,"hover-text-color":c,"hover-border-color":u,"active-bg-color":l,"active-border-color":l}),e.value){const d=t.dark?tn(o,50):o.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=d,n[r.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=d}}}return n})}const IC=s.defineComponent({name:"ElButton"}),AC=s.defineComponent({...IC,props:yl,emits:CC,setup(t,{expose:e,emit:r}){const n=t,a=MC(n),i=Be("button"),{_ref:o,_size:l,_type:u,_disabled:c,_props:d,shouldAddSpace:f,handleClick:p}=wC(n,r),v=s.computed(()=>[i.b(),i.m(u.value),i.m(l.value),i.is("disabled",c.value),i.is("loading",n.loading),i.is("plain",n.plain),i.is("round",n.round),i.is("circle",n.circle),i.is("text",n.text),i.is("link",n.link),i.is("has-bg",n.bg)]);return e({ref:o,size:l,type:u,disabled:c,shouldAddSpace:f}),(h,g)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(h.tag),s.mergeProps({ref_key:"_ref",ref:o},s.unref(d),{class:s.unref(v),style:s.unref(a),onClick:s.unref(p)}),{default:s.withCtx(()=>[h.loading?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[h.$slots.loading?s.renderSlot(h.$slots,"loading",{key:0}):(s.openBlock(),s.createBlock(s.unref(yt),{key:1,class:s.normalizeClass(s.unref(i).is("loading"))},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(h.loadingIcon)))]),_:1},8,["class"]))],64)):h.icon||h.$slots.icon?(s.openBlock(),s.createBlock(s.unref(yt),{key:1},{default:s.withCtx(()=>[h.icon?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(h.icon),{key:0})):s.renderSlot(h.$slots,"icon",{key:1})]),_:3})):s.createCommentVNode("v-if",!0),h.$slots.default?(s.openBlock(),s.createElementBlock("span",{key:2,class:s.normalizeClass({[s.unref(i).em("text","expand")]:s.unref(f)})},[s.renderSlot(h.$slots,"default")],2)):s.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var RC=Te(AC,[["__file","button.vue"]]);const VC={size:yl.size,type:yl.type},$C=s.defineComponent({name:"ElButtonGroup"}),zC=s.defineComponent({...$C,props:VC,setup(t){const e=t;s.provide(Xd,s.reactive({size:s.toRef(e,"size"),type:s.toRef(e,"type")}));const r=Be("button");return(n,a)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(s.unref(r).b("group"))},[s.renderSlot(n.$slots,"default")],2))}});var rf=Te(zC,[["__file","button-group.vue"]]);const Ar=dt(RC,{ButtonGroup:rf}),HC=Lr(rf),rn=new Map;if(et){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const r of rn.values())for(const{documentHandler:n}of r)n(e,t);t=void 0}})}function nf(t,e){let r=[];return Array.isArray(e.arg)?r=e.arg:En(e.arg)&&r.push(e.arg),function(n,a){const i=e.instance.popperRef,o=n.target,l=a==null?void 0:a.target,u=!e||!e.instance,c=!o||!l,d=t.contains(o)||t.contains(l),f=t===o,p=r.length&&r.some(h=>h==null?void 0:h.contains(o))||r.length&&r.includes(l),v=i&&(i.contains(o)||i.contains(l));u||c||d||f||p||v||e.value(n,a)}}const af={beforeMount(t,e){rn.has(t)||rn.set(t,[]),rn.get(t).push({documentHandler:nf(t,e),bindingFn:e.value})},updated(t,e){rn.has(t)||rn.set(t,[]);const r=rn.get(t),n=r.findIndex(i=>i.bindingFn===e.oldValue),a={documentHandler:nf(t,e),bindingFn:e.value};n>=0?r.splice(n,1,a):r.push(a)},unmounted(t){rn.delete(t)}},KC=Ie({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:ke([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),qC=s.defineComponent({name:"ElCard"}),UC=s.defineComponent({...qC,props:KC,setup(t){const e=Be("card");return(r,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([s.unref(e).b(),s.unref(e).is(`${r.shadow}-shadow`)])},[r.$slots.header||r.header?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(s.unref(e).e("header"))},[s.renderSlot(r.$slots,"header",{},()=>[s.createTextVNode(s.toDisplayString(r.header),1)])],2)):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{class:s.normalizeClass([s.unref(e).e("body"),r.bodyClass]),style:s.normalizeStyle(r.bodyStyle)},[s.renderSlot(r.$slots,"default")],6),r.$slots.footer||r.footer?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(s.unref(e).e("footer"))},[s.renderSlot(r.$slots,"footer",{},()=>[s.createTextVNode(s.toDisplayString(r.footer),1)])],2)):s.createCommentVNode("v-if",!0)],2))}});var GC=Te(UC,[["__file","card.vue"]]);const WC=dt(GC),of={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:sa,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...Qr(["ariaControls"])},sf={[mt]:t=>St(t)||gt(t)||Qn(t),change:t=>St(t)||gt(t)||Qn(t)},ua=Symbol("checkboxGroupContextKey"),jC=({model:t,isChecked:e})=>{const r=s.inject(ua,void 0),n=s.computed(()=>{var i,o;const l=(i=r==null?void 0:r.max)==null?void 0:i.value,u=(o=r==null?void 0:r.min)==null?void 0:o.value;return!Yr(l)&&t.value.length>=l&&!e.value||!Yr(u)&&t.value.length<=u&&e.value});return{isDisabled:ai(s.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},YC=(t,{model:e,isLimitExceeded:r,hasOwnLabel:n,isDisabled:a,isLabeledByFormItem:i})=>{const o=s.inject(ua,void 0),{formItem:l}=Dn(),{emit:u}=s.getCurrentInstance();function c(h){var g,y,m,b;return[!0,t.trueValue,t.trueLabel].includes(h)?(y=(g=t.trueValue)!=null?g:t.trueLabel)!=null?y:!0:(b=(m=t.falseValue)!=null?m:t.falseLabel)!=null?b:!1}function d(h,g){u("change",c(h),g)}function f(h){if(r.value)return;const g=h.target;u("change",c(g.checked),h)}async function p(h){r.value||!n.value&&!a.value&&i.value&&(h.composedPath().some(m=>m.tagName==="LABEL")||(e.value=c([!1,t.falseValue,t.falseLabel].includes(e.value)),await s.nextTick(),d(e.value,h)))}const v=s.computed(()=>(o==null?void 0:o.validateEvent)||t.validateEvent);return s.watch(()=>t.modelValue,()=>{v.value&&(l==null||l.validate("change").catch(h=>tt(h)))}),{handleChange:f,onClickRoot:p}},XC=t=>{const e=s.ref(!1),{emit:r}=s.getCurrentInstance(),n=s.inject(ua,void 0),a=s.computed(()=>Yr(n)===!1),i=s.ref(!1),o=s.computed({get(){var l,u;return a.value?(l=n==null?void 0:n.modelValue)==null?void 0:l.value:(u=t.modelValue)!=null?u:e.value},set(l){var u,c;a.value&&At(l)?(i.value=((u=n==null?void 0:n.max)==null?void 0:u.value)!==void 0&&l.length>(n==null?void 0:n.max.value)&&l.length>o.value.length,i.value===!1&&((c=n==null?void 0:n.changeEvent)==null||c.call(n,l))):(r(mt,l),e.value=l)}});return{model:o,isGroup:a,isLimitExceeded:i}},ZC=(t,e,{model:r})=>{const n=s.inject(ua,void 0),a=s.ref(!1),i=s.computed(()=>io(t.value)?t.label:t.value),o=s.computed(()=>{const d=r.value;return Qn(d)?d:At(d)?vt(i.value)?d.map(s.toRaw).some(f=>ao(f,i.value)):d.map(s.toRaw).includes(i.value):d!=null?d===t.trueValue||d===t.trueLabel:!!d}),l=Nn(s.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value}),{prop:!0}),u=Nn(s.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value})),c=s.computed(()=>!!e.default||!io(i.value));return{checkboxButtonSize:l,isChecked:o,isFocused:a,checkboxSize:u,hasOwnLabel:c,actualValue:i}},lf=(t,e)=>{const{formItem:r}=Dn(),{model:n,isGroup:a,isLimitExceeded:i}=XC(t),{isFocused:o,isChecked:l,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,actualValue:f}=ZC(t,e,{model:n}),{isDisabled:p}=jC({model:n,isChecked:l}),{inputId:v,isLabeledByFormItem:h}=ii(t,{formItemContext:r,disableIdGeneration:d,disableIdManagement:a}),{handleChange:g,onClickRoot:y}=YC(t,{model:n,isLimitExceeded:i,hasOwnLabel:d,isDisabled:p,isLabeledByFormItem:h});return(()=>{function b(){var w,C;At(n.value)&&!n.value.includes(f.value)?n.value.push(f.value):n.value=(C=(w=t.trueValue)!=null?w:t.trueLabel)!=null?C:!0}t.checked&&b()})(),co({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},s.computed(()=>a.value&&io(t.value))),co({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},s.computed(()=>!!t.trueLabel)),co({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},s.computed(()=>!!t.falseLabel)),{inputId:v,isLabeledByFormItem:h,isChecked:l,isDisabled:p,isFocused:o,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,model:n,actualValue:f,handleChange:g,onClickRoot:y}},QC=s.defineComponent({name:"ElCheckbox"}),JC=s.defineComponent({...QC,props:of,emits:sf,setup(t){const e=t,r=s.useSlots(),{inputId:n,isLabeledByFormItem:a,isChecked:i,isDisabled:o,isFocused:l,checkboxSize:u,hasOwnLabel:c,model:d,actualValue:f,handleChange:p,onClickRoot:v}=lf(e,r),h=Be("checkbox"),g=s.computed(()=>[h.b(),h.m(u.value),h.is("disabled",o.value),h.is("bordered",e.border),h.is("checked",i.value)]),y=s.computed(()=>[h.e("input"),h.is("disabled",o.value),h.is("checked",i.value),h.is("indeterminate",e.indeterminate),h.is("focus",l.value)]);return(m,b)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(!s.unref(c)&&s.unref(a)?"span":"label"),{class:s.normalizeClass(s.unref(g)),"aria-controls":m.indeterminate?m.ariaControls:null,onClick:s.unref(v)},{default:s.withCtx(()=>{var w,C,x,E;return[s.createElementVNode("span",{class:s.normalizeClass(s.unref(y))},[m.trueValue||m.falseValue||m.trueLabel||m.falseLabel?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:0,id:s.unref(n),"onUpdate:modelValue":k=>s.isRef(d)?d.value=k:null,class:s.normalizeClass(s.unref(h).e("original")),type:"checkbox",indeterminate:m.indeterminate,name:m.name,tabindex:m.tabindex,disabled:s.unref(o),"true-value":(C=(w=m.trueValue)!=null?w:m.trueLabel)!=null?C:!0,"false-value":(E=(x=m.falseValue)!=null?x:m.falseLabel)!=null?E:!1,onChange:s.unref(p),onFocus:k=>l.value=!0,onBlur:k=>l.value=!1,onClick:s.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[s.vModelCheckbox,s.unref(d)]]):s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,id:s.unref(n),"onUpdate:modelValue":k=>s.isRef(d)?d.value=k:null,class:s.normalizeClass(s.unref(h).e("original")),type:"checkbox",indeterminate:m.indeterminate,disabled:s.unref(o),value:s.unref(f),name:m.name,tabindex:m.tabindex,onChange:s.unref(p),onFocus:k=>l.value=!0,onBlur:k=>l.value=!1,onClick:s.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[s.vModelCheckbox,s.unref(d)]]),s.createElementVNode("span",{class:s.normalizeClass(s.unref(h).e("inner"))},null,2)],2),s.unref(c)?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(s.unref(h).e("label"))},[s.renderSlot(m.$slots,"default"),m.$slots.default?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(m.label),1)],64))],2)):s.createCommentVNode("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var ek=Te(JC,[["__file","checkbox.vue"]]);const tk=s.defineComponent({name:"ElCheckboxButton"}),rk=s.defineComponent({...tk,props:of,emits:sf,setup(t){const e=t,r=s.useSlots(),{isFocused:n,isChecked:a,isDisabled:i,checkboxButtonSize:o,model:l,actualValue:u,handleChange:c}=lf(e,r),d=s.inject(ua,void 0),f=Be("checkbox"),p=s.computed(()=>{var h,g,y,m;const b=(g=(h=d==null?void 0:d.fill)==null?void 0:h.value)!=null?g:"";return{backgroundColor:b,borderColor:b,color:(m=(y=d==null?void 0:d.textColor)==null?void 0:y.value)!=null?m:"",boxShadow:b?`-1px 0 0 0 ${b}`:void 0}}),v=s.computed(()=>[f.b("button"),f.bm("button",o.value),f.is("disabled",i.value),f.is("checked",a.value),f.is("focus",n.value)]);return(h,g)=>{var y,m,b,w;return s.openBlock(),s.createElementBlock("label",{class:s.normalizeClass(s.unref(v))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:0,"onUpdate:modelValue":C=>s.isRef(l)?l.value=C:null,class:s.normalizeClass(s.unref(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:s.unref(i),"true-value":(m=(y=h.trueValue)!=null?y:h.trueLabel)!=null?m:!0,"false-value":(w=(b=h.falseValue)!=null?b:h.falseLabel)!=null?w:!1,onChange:s.unref(c),onFocus:C=>n.value=!0,onBlur:C=>n.value=!1,onClick:s.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[s.vModelCheckbox,s.unref(l)]]):s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,"onUpdate:modelValue":C=>s.isRef(l)?l.value=C:null,class:s.normalizeClass(s.unref(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:s.unref(i),value:s.unref(u),onChange:s.unref(c),onFocus:C=>n.value=!0,onBlur:C=>n.value=!1,onClick:s.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[s.vModelCheckbox,s.unref(l)]]),h.$slots.default||h.label?(s.openBlock(),s.createElementBlock("span",{key:2,class:s.normalizeClass(s.unref(f).be("button","inner")),style:s.normalizeStyle(s.unref(a)?s.unref(p):void 0)},[s.renderSlot(h.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(h.label),1)])],6)):s.createCommentVNode("v-if",!0)],2)}}});var cf=Te(rk,[["__file","checkbox-button.vue"]]);const nk=Ie({modelValue:{type:ke(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:sa,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...Qr(["ariaLabel"])}),ak={[mt]:t=>At(t),change:t=>At(t)},ik=s.defineComponent({name:"ElCheckboxGroup"}),ok=s.defineComponent({...ik,props:nk,emits:ak,setup(t,{emit:e}){const r=t,n=Be("checkbox"),{formItem:a}=Dn(),{inputId:i,isLabeledByFormItem:o}=ii(r,{formItemContext:a}),l=async c=>{e(mt,c),await s.nextTick(),e("change",c)},u=s.computed({get(){return r.modelValue},set(c){l(c)}});return s.provide(ua,{...Vu(s.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:u,changeEvent:l}),s.watch(()=>r.modelValue,()=>{r.validateEvent&&(a==null||a.validate("change").catch(c=>tt(c)))}),(c,d)=>{var f;return s.openBlock(),s.createBlock(s.resolveDynamicComponent(c.tag),{id:s.unref(i),class:s.normalizeClass(s.unref(n).b("group")),role:"group","aria-label":s.unref(o)?void 0:c.ariaLabel||"checkbox-group","aria-labelledby":s.unref(o)?(f=s.unref(a))==null?void 0:f.labelId:void 0},{default:s.withCtx(()=>[s.renderSlot(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var uf=Te(ok,[["__file","checkbox-group.vue"]]);const sk=dt(ek,{CheckboxButton:cf,CheckboxGroup:uf});Lr(cf),Lr(uf);const xl=Ie({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Gu},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),lk={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},ck=s.defineComponent({name:"ElTag"}),uk=s.defineComponent({...ck,props:xl,emits:lk,setup(t,{emit:e}){const r=t,n=Nn(),a=Be("tag"),i=s.computed(()=>{const{type:c,hit:d,effect:f,closable:p,round:v}=r;return[a.b(),a.is("closable",p),a.m(c||"primary"),a.m(n.value),a.m(f),a.is("hit",d),a.is("round",v)]}),o=c=>{e("close",c)},l=c=>{e("click",c)},u=c=>{c.component.subTree.component.bum=null};return(c,d)=>c.disableTransitions?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(s.unref(i)),style:s.normalizeStyle({backgroundColor:c.color}),onClick:l},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(a).e("content"))},[s.renderSlot(c.$slots,"default")],2),c.closable?(s.openBlock(),s.createBlock(s.unref(yt),{key:0,class:s.normalizeClass(s.unref(a).e("close")),onClick:s.withModifiers(o,["stop"])},{default:s.withCtx(()=>[s.createVNode(s.unref(so))]),_:1},8,["class","onClick"])):s.createCommentVNode("v-if",!0)],6)):(s.openBlock(),s.createBlock(s.Transition,{key:1,name:`${s.unref(a).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass(s.unref(i)),style:s.normalizeStyle({backgroundColor:c.color}),onClick:l},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(a).e("content"))},[s.renderSlot(c.$slots,"default")],2),c.closable?(s.openBlock(),s.createBlock(s.unref(yt),{key:0,class:s.normalizeClass(s.unref(a).e("close")),onClick:s.withModifiers(o,["stop"])},{default:s.withCtx(()=>[s.createVNode(s.unref(so))]),_:1},8,["class","onClick"])):s.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var dk=Te(uk,[["__file","tag.vue"]]);const fk=dt(dk),df=Symbol("rowContextKey"),hk=Ie({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),pk=s.defineComponent({name:"ElRow"}),vk=s.defineComponent({...pk,props:hk,setup(t){const e=t,r=Be("row"),n=s.computed(()=>e.gutter);s.provide(df,{gutter:n});const a=s.computed(()=>{const o={};return e.gutter&&(o.marginRight=o.marginLeft=`-${e.gutter/2}px`),o}),i=s.computed(()=>[r.b(),r.is(`justify-${e.justify}`,e.justify!=="start"),r.is(`align-${e.align}`,!!e.align)]);return(o,l)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.tag),{class:s.normalizeClass(s.unref(i)),style:s.normalizeStyle(s.unref(a))},{default:s.withCtx(()=>[s.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});var gk=Te(vk,[["__file","row.vue"]]);const El=dt(gk),mk=Ie({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:ke([Number,Object]),default:()=>ea({})},sm:{type:ke([Number,Object]),default:()=>ea({})},md:{type:ke([Number,Object]),default:()=>ea({})},lg:{type:ke([Number,Object]),default:()=>ea({})},xl:{type:ke([Number,Object]),default:()=>ea({})}}),yk=s.defineComponent({name:"ElCol"}),bk=s.defineComponent({...yk,props:mk,setup(t){const e=t,{gutter:r}=s.inject(df,{gutter:s.computed(()=>0)}),n=Be("col"),a=s.computed(()=>{const o={};return r.value&&(o.paddingLeft=o.paddingRight=`${r.value/2}px`),o}),i=s.computed(()=>{const o=[];return["span","offset","pull","push"].forEach(c=>{const d=e[c];gt(d)&&(c==="span"?o.push(n.b(`${e[c]}`)):d>0&&o.push(n.b(`${c}-${e[c]}`)))}),["xs","sm","md","lg","xl"].forEach(c=>{gt(e[c])?o.push(n.b(`${c}-${e[c]}`)):vt(e[c])&&Object.entries(e[c]).forEach(([d,f])=>{o.push(d!=="span"?n.b(`${c}-${d}-${f}`):n.b(`${c}-${f}`))})}),r.value&&o.push(n.is("guttered")),[n.b(),o]});return(o,l)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.tag),{class:s.normalizeClass(s.unref(i)),style:s.normalizeStyle(s.unref(a))},{default:s.withCtx(()=>[s.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});var wk=Te(bk,[["__file","col.vue"]]);const Sl=dt(wk),Ck=s.defineComponent({name:"ElCollapseTransition"}),kk=s.defineComponent({...Ck,setup(t){const e=Be("collapse-transition"),r=a=>{a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom},n={beforeEnter(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.style.height&&(a.dataset.elExistsHeight=a.style.height),a.style.maxHeight=0,a.style.paddingTop=0,a.style.paddingBottom=0},enter(a){requestAnimationFrame(()=>{a.dataset.oldOverflow=a.style.overflow,a.dataset.elExistsHeight?a.style.maxHeight=a.dataset.elExistsHeight:a.scrollHeight!==0?a.style.maxHeight=`${a.scrollHeight}px`:a.style.maxHeight=0,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom,a.style.overflow="hidden"})},afterEnter(a){a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow},enterCancelled(a){r(a)},beforeLeave(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.dataset.oldOverflow=a.style.overflow,a.style.maxHeight=`${a.scrollHeight}px`,a.style.overflow="hidden"},leave(a){a.scrollHeight!==0&&(a.style.maxHeight=0,a.style.paddingTop=0,a.style.paddingBottom=0)},afterLeave(a){r(a)},leaveCancelled(a){r(a)}};return(a,i)=>(s.openBlock(),s.createBlock(s.Transition,s.mergeProps({name:s.unref(e).b()},s.toHandlers(n)),{default:s.withCtx(()=>[s.renderSlot(a.$slots,"default")]),_:3},16,["name"]))}});var xk=Te(kk,[["__file","collapse-transition.vue"]]);const Ek=dt(xk),Sk=Ie({color:{type:ke(Object),required:!0},vertical:{type:Boolean,default:!1}});let Tl=!1;function li(t,e){if(!et)return;const r=function(i){var o;(o=e.drag)==null||o.call(e,i)},n=function(i){var o;document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,Tl=!1,(o=e.end)==null||o.call(e,i)},a=function(i){var o;Tl||(i.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),Tl=!0,(o=e.start)==null||o.call(e,i))};t.addEventListener("mousedown",a),t.addEventListener("touchstart",a,{passive:!1})}const Tk=t=>{const e=s.getCurrentInstance(),{t:r}=Ya(),n=s.shallowRef(),a=s.shallowRef(),i=s.computed(()=>t.color.get("alpha")),o=s.computed(()=>r("el.colorpicker.alphaLabel"));function l(f){var p;f.target!==n.value&&u(f),(p=n.value)==null||p.focus()}function u(f){if(!a.value||!n.value)return;const v=e.vnode.el.getBoundingClientRect(),{clientX:h,clientY:g}=Bs(f);if(t.vertical){let y=g-v.top;y=Math.max(n.value.offsetHeight/2,y),y=Math.min(y,v.height-n.value.offsetHeight/2),t.color.set("alpha",Math.round((y-n.value.offsetHeight/2)/(v.height-n.value.offsetHeight)*100))}else{let y=h-v.left;y=Math.max(n.value.offsetWidth/2,y),y=Math.min(y,v.width-n.value.offsetWidth/2),t.color.set("alpha",Math.round((y-n.value.offsetWidth/2)/(v.width-n.value.offsetWidth)*100))}}function c(f){const{code:p,shiftKey:v}=f,h=v?10:1;switch(p){case it.left:case it.down:f.preventDefault(),f.stopPropagation(),d(-h);break;case it.right:case it.up:f.preventDefault(),f.stopPropagation(),d(h);break}}function d(f){let p=i.value+f;p=p<0?0:p>100?100:p,t.color.set("alpha",p)}return{thumb:n,bar:a,alpha:i,alphaLabel:o,handleDrag:u,handleClick:l,handleKeydown:c}},Bk=(t,{bar:e,thumb:r,handleDrag:n})=>{const a=s.getCurrentInstance(),i=Be("color-alpha-slider"),o=s.ref(0),l=s.ref(0),u=s.ref();function c(){if(!r.value||t.vertical)return 0;const b=a.vnode.el,w=t.color.get("alpha");return b?Math.round(w*(b.offsetWidth-r.value.offsetWidth/2)/100):0}function d(){if(!r.value)return 0;const b=a.vnode.el;if(!t.vertical)return 0;const w=t.color.get("alpha");return b?Math.round(w*(b.offsetHeight-r.value.offsetHeight/2)/100):0}function f(){if(t.color&&t.color.value){const{r:b,g:w,b:C}=t.color.toRgb();return`linear-gradient(to right, rgba(${b}, ${w}, ${C}, 0) 0%, rgba(${b}, ${w}, ${C}, 1) 100%)`}return""}function p(){o.value=c(),l.value=d(),u.value=f()}s.onMounted(()=>{if(!e.value||!r.value)return;const b={drag:w=>{n(w)},end:w=>{n(w)}};li(e.value,b),li(r.value,b),p()}),s.watch(()=>t.color.get("alpha"),()=>p()),s.watch(()=>t.color.value,()=>p());const v=s.computed(()=>[i.b(),i.is("vertical",t.vertical)]),h=s.computed(()=>i.e("bar")),g=s.computed(()=>i.e("thumb")),y=s.computed(()=>({background:u.value})),m=s.computed(()=>({left:Jn(o.value),top:Jn(l.value)}));return{rootKls:v,barKls:h,barStyle:y,thumbKls:g,thumbStyle:m,update:p}},Nk=s.defineComponent({name:"ElColorAlphaSlider"}),Dk=s.defineComponent({...Nk,props:Sk,setup(t,{expose:e}){const r=t,{alpha:n,alphaLabel:a,bar:i,thumb:o,handleDrag:l,handleClick:u,handleKeydown:c}=Tk(r),{rootKls:d,barKls:f,barStyle:p,thumbKls:v,thumbStyle:h,update:g}=Bk(r,{bar:i,thumb:o,handleDrag:l});return e({update:g,bar:i,thumb:o}),(y,m)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(s.unref(d))},[s.createElementVNode("div",{ref_key:"bar",ref:i,class:s.normalizeClass(s.unref(f)),style:s.normalizeStyle(s.unref(p)),onClick:s.unref(u)},null,14,["onClick"]),s.createElementVNode("div",{ref_key:"thumb",ref:o,class:s.normalizeClass(s.unref(v)),style:s.normalizeStyle(s.unref(h)),"aria-label":s.unref(a),"aria-valuenow":s.unref(n),"aria-orientation":y.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:s.unref(c)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var Pk=Te(Dk,[["__file","alpha-slider.vue"]]);const Ok=s.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=Be("color-hue-slider"),r=s.getCurrentInstance(),n=s.ref(),a=s.ref(),i=s.ref(0),o=s.ref(0),l=s.computed(()=>t.color.get("hue"));s.watch(()=>l.value,()=>{p()});function u(v){v.target!==n.value&&c(v)}function c(v){if(!a.value||!n.value)return;const g=r.vnode.el.getBoundingClientRect(),{clientX:y,clientY:m}=Bs(v);let b;if(t.vertical){let w=m-g.top;w=Math.min(w,g.height-n.value.offsetHeight/2),w=Math.max(n.value.offsetHeight/2,w),b=Math.round((w-n.value.offsetHeight/2)/(g.height-n.value.offsetHeight)*360)}else{let w=y-g.left;w=Math.min(w,g.width-n.value.offsetWidth/2),w=Math.max(n.value.offsetWidth/2,w),b=Math.round((w-n.value.offsetWidth/2)/(g.width-n.value.offsetWidth)*360)}t.color.set("hue",b)}function d(){if(!n.value)return 0;const v=r.vnode.el;if(t.vertical)return 0;const h=t.color.get("hue");return v?Math.round(h*(v.offsetWidth-n.value.offsetWidth/2)/360):0}function f(){if(!n.value)return 0;const v=r.vnode.el;if(!t.vertical)return 0;const h=t.color.get("hue");return v?Math.round(h*(v.offsetHeight-n.value.offsetHeight/2)/360):0}function p(){i.value=d(),o.value=f()}return s.onMounted(()=>{if(!a.value||!n.value)return;const v={drag:h=>{c(h)},end:h=>{c(h)}};li(a.value,v),li(n.value,v),p()}),{bar:a,thumb:n,thumbLeft:i,thumbTop:o,hueValue:l,handleClick:u,update:p,ns:e}}});function _k(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([t.ns.b(),t.ns.is("vertical",t.vertical)])},[s.createElementVNode("div",{ref:"bar",class:s.normalizeClass(t.ns.e("bar")),onClick:t.handleClick},null,10,["onClick"]),s.createElementVNode("div",{ref:"thumb",class:s.normalizeClass(t.ns.e("thumb")),style:s.normalizeStyle({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var Fk=Te(Ok,[["render",_k],["__file","hue-slider.vue"]]);const Lk=Ie({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:sa,popperClass:{type:String,default:""},tabindex:{type:[String,Number],default:0},teleported:$t.teleported,predefine:{type:ke(Array)},validateEvent:{type:Boolean,default:!0},...Qr(["ariaLabel"])}),Mk={[mt]:t=>St(t)||jr(t),[js]:t=>St(t)||jr(t),activeChange:t=>St(t)||jr(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},ff=Symbol("colorPickerContextKey"),hf=function(t,e,r){return[t,e*r/((t=(2-e)*r)<1?t:2-t)||0,t/2]},Ik=function(t){return typeof t=="string"&&t.includes(".")&&Number.parseFloat(t)===1},Ak=function(t){return typeof t=="string"&&t.includes("%")},da=function(t,e){Ik(t)&&(t="100%");const r=Ak(t);return t=Math.min(e,Math.max(0,Number.parseFloat(`${t}`))),r&&(t=Number.parseInt(`${t*e}`,10)/100),Math.abs(t-e)<1e-6?1:t%e/Number.parseFloat(e)},pf={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},So=t=>{t=Math.min(Math.round(t),255);const e=Math.floor(t/16),r=t%16;return`${pf[e]||e}${pf[r]||r}`},vf=function({r:t,g:e,b:r}){return Number.isNaN(+t)||Number.isNaN(+e)||Number.isNaN(+r)?"":`#${So(t)}${So(e)}${So(r)}`},Bl={A:10,B:11,C:12,D:13,E:14,F:15},On=function(t){return t.length===2?(Bl[t[0].toUpperCase()]||+t[0])*16+(Bl[t[1].toUpperCase()]||+t[1]):Bl[t[1].toUpperCase()]||+t[1]},Rk=function(t,e,r){e=e/100,r=r/100;let n=e;const a=Math.max(r,.01);r*=2,e*=r<=1?r:2-r,n*=a<=1?a:2-a;const i=(r+e)/2,o=r===0?2*n/(a+n):2*e/(r+e);return{h:t,s:o*100,v:i*100}},gf=(t,e,r)=>{t=da(t,255),e=da(e,255),r=da(r,255);const n=Math.max(t,e,r),a=Math.min(t,e,r);let i;const o=n,l=n-a,u=n===0?0:l/n;if(n===a)i=0;else{switch(n){case t:{i=(e-r)/l+(e<r?6:0);break}case e:{i=(r-t)/l+2;break}case r:{i=(t-e)/l+4;break}}i/=6}return{h:i*360,s:u*100,v:o*100}},ci=function(t,e,r){t=da(t,360)*6,e=da(e,100),r=da(r,100);const n=Math.floor(t),a=t-n,i=r*(1-e),o=r*(1-a*e),l=r*(1-(1-a)*e),u=n%6,c=[r,o,i,i,l,r][u],d=[l,r,r,o,i,i][u],f=[i,i,l,r,r,o][u];return{r:Math.round(c*255),g:Math.round(d*255),b:Math.round(f*255)}};class ui{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in e)wn(e,r)&&(this[r]=e[r]);e.value?this.fromString(e.value):this.doOnChange()}set(e,r){if(arguments.length===1&&typeof e=="object"){for(const n in e)wn(e,n)&&this.set(n,e[n]);return}this[`_${e}`]=r,this.doOnChange()}get(e){return e==="alpha"?Math.floor(this[`_${e}`]):this[`_${e}`]}toRgb(){return ci(this._hue,this._saturation,this._value)}fromString(e){if(!e){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const r=(n,a,i)=>{this._hue=Math.max(0,Math.min(360,n)),this._saturation=Math.max(0,Math.min(100,a)),this._value=Math.max(0,Math.min(100,i)),this.doOnChange()};if(e.includes("hsl")){const n=e.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(a=>a!=="").map((a,i)=>i>2?Number.parseFloat(a):Number.parseInt(a,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:a,s:i,v:o}=Rk(n[0],n[1],n[2]);r(a,i,o)}}else if(e.includes("hsv")){const n=e.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(a=>a!=="").map((a,i)=>i>2?Number.parseFloat(a):Number.parseInt(a,10));n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3&&r(n[0],n[1],n[2])}else if(e.includes("rgb")){const n=e.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(a=>a!=="").map((a,i)=>i>2?Number.parseFloat(a):Number.parseInt(a,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:a,s:i,v:o}=gf(n[0],n[1],n[2]);r(a,i,o)}}else if(e.includes("#")){const n=e.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(n))return;let a,i,o;n.length===3?(a=On(n[0]+n[0]),i=On(n[1]+n[1]),o=On(n[2]+n[2])):(n.length===6||n.length===8)&&(a=On(n.slice(0,2)),i=On(n.slice(2,4)),o=On(n.slice(4,6))),n.length===8?this._alpha=On(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:l,s:u,v:c}=gf(a,i,o);r(l,u,c)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:r,_value:n,_alpha:a,format:i}=this;if(this.enableAlpha)switch(i){case"hsl":{const o=hf(e,r/100,n/100);this.value=`hsla(${e}, ${Math.round(o[1]*100)}%, ${Math.round(o[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${e}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${vf(ci(e,r,n))}${So(a*255/100)}`;break}default:{const{r:o,g:l,b:u}=ci(e,r,n);this.value=`rgba(${o}, ${l}, ${u}, ${this.get("alpha")/100})`}}else switch(i){case"hsl":{const o=hf(e,r/100,n/100);this.value=`hsl(${e}, ${Math.round(o[1]*100)}%, ${Math.round(o[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${e}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:o,g:l,b:u}=ci(e,r,n);this.value=`rgb(${o}, ${l}, ${u})`;break}default:this.value=vf(ci(e,r,n))}}}const Vk=s.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(t){const e=Be("color-predefine"),{currentColor:r}=s.inject(ff),n=s.ref(i(t.colors,t.color));s.watch(()=>r.value,o=>{const l=new ui;l.fromString(o),n.value.forEach(u=>{u.selected=l.compare(u)})}),s.watchEffect(()=>{n.value=i(t.colors,t.color)});function a(o){t.color.fromString(t.colors[o])}function i(o,l){return o.map(u=>{const c=new ui;return c.enableAlpha=t.enableAlpha,c.format="rgba",c.fromString(u),c.selected=c.value===l.value,c})}return{rgbaColors:n,handleSelect:a,ns:e}}});function $k(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(t.ns.b())},[s.createElementVNode("div",{class:s.normalizeClass(t.ns.e("colors"))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.rgbaColors,(o,l)=>(s.openBlock(),s.createElementBlock("div",{key:t.colors[l],class:s.normalizeClass([t.ns.e("color-selector"),t.ns.is("alpha",o._alpha<100),{selected:o.selected}]),onClick:u=>t.handleSelect(l)},[s.createElementVNode("div",{style:s.normalizeStyle({backgroundColor:o.value})},null,4)],10,["onClick"]))),128))],2)],2)}var zk=Te(Vk,[["render",$k],["__file","predefine.vue"]]);const Hk=s.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=Be("color-svpanel"),r=s.getCurrentInstance(),n=s.ref(0),a=s.ref(0),i=s.ref("hsl(0, 100%, 50%)"),o=s.computed(()=>{const c=t.color.get("hue"),d=t.color.get("value");return{hue:c,value:d}});function l(){const c=t.color.get("saturation"),d=t.color.get("value"),f=r.vnode.el,{clientWidth:p,clientHeight:v}=f;a.value=c*p/100,n.value=(100-d)*v/100,i.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}function u(c){const f=r.vnode.el.getBoundingClientRect(),{clientX:p,clientY:v}=Bs(c);let h=p-f.left,g=v-f.top;h=Math.max(0,h),h=Math.min(h,f.width),g=Math.max(0,g),g=Math.min(g,f.height),a.value=h,n.value=g,t.color.set({saturation:h/f.width*100,value:100-g/f.height*100})}return s.watch(()=>o.value,()=>{l()}),s.onMounted(()=>{li(r.vnode.el,{drag:c=>{u(c)},end:c=>{u(c)}}),l()}),{cursorTop:n,cursorLeft:a,background:i,colorValue:o,handleDrag:u,update:l,ns:e}}});function Kk(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(t.ns.b()),style:s.normalizeStyle({backgroundColor:t.background})},[s.createElementVNode("div",{class:s.normalizeClass(t.ns.e("white"))},null,2),s.createElementVNode("div",{class:s.normalizeClass(t.ns.e("black"))},null,2),s.createElementVNode("div",{class:s.normalizeClass(t.ns.e("cursor")),style:s.normalizeStyle({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},[s.createElementVNode("div")],6)],6)}var qk=Te(Hk,[["render",Kk],["__file","sv-panel.vue"]]);const Uk=s.defineComponent({name:"ElColorPicker"}),Gk=s.defineComponent({...Uk,props:Lk,emits:Mk,setup(t,{expose:e,emit:r}){const n=t,{t:a}=Ya(),i=Be("color"),{formItem:o}=Dn(),l=Nn(),u=ai(),{inputId:c,isLabeledByFormItem:d}=ii(n,{formItemContext:o}),f=s.ref(),p=s.ref(),v=s.ref(),h=s.ref(),g=s.ref(),y=s.ref(),{isFocused:m,handleFocus:b,handleBlur:w}=ol(g,{beforeFocus(){return u.value},beforeBlur(A){var K;return(K=h.value)==null?void 0:K.isFocusInsideContent(A)},afterBlur(){I(!1),R()}});let C=!0;const x=s.reactive(new ui({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),E=s.ref(!1),k=s.ref(!1),B=s.ref(""),S=s.computed(()=>!n.modelValue&&!k.value?"transparent":O(x,n.showAlpha)),N=s.computed(()=>!n.modelValue&&!k.value?"":x.value),D=s.computed(()=>d.value?void 0:n.ariaLabel||a("el.colorpicker.defaultLabel")),P=s.computed(()=>d.value?o==null?void 0:o.labelId:void 0),F=s.computed(()=>[i.b("picker"),i.is("disabled",u.value),i.bm("picker",l.value),i.is("focused",m.value)]);function O(A,K){if(!(A instanceof ui))throw new TypeError("color should be instance of _color Class");const{r:W,g:oe,b:he}=A.toRgb();return K?`rgba(${W}, ${oe}, ${he}, ${A.get("alpha")/100})`:`rgb(${W}, ${oe}, ${he})`}function I(A){E.value=A}const _=Ru(I,100,{leading:!0});function M(){u.value||I(!0)}function L(){_(!1),R()}function R(){s.nextTick(()=>{n.modelValue?x.fromString(n.modelValue):(x.value="",s.nextTick(()=>{k.value=!1}))})}function H(){u.value||_(!E.value)}function $(){x.fromString(B.value)}function z(){const A=x.value;r(mt,A),r("change",A),n.validateEvent&&(o==null||o.validate("change").catch(K=>tt(K))),_(!1),s.nextTick(()=>{const K=new ui({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});x.compare(K)||R()})}function j(){_(!1),r(mt,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(o==null||o.validate("change").catch(A=>tt(A))),R()}function ee(){E.value&&(L(),m.value&&re())}function J(A){A.preventDefault(),A.stopPropagation(),I(!1),R()}function Z(A){switch(A.code){case it.enter:case it.space:A.preventDefault(),A.stopPropagation(),M(),y.value.focus();break;case it.esc:J(A);break}}function re(){g.value.focus()}function Y(){g.value.blur()}return s.onMounted(()=>{n.modelValue&&(B.value=N.value)}),s.watch(()=>n.modelValue,A=>{A?A&&A!==x.value&&(C=!1,x.fromString(A)):k.value=!1}),s.watch(()=>[n.colorFormat,n.showAlpha],()=>{x.enableAlpha=n.showAlpha,x.format=n.colorFormat||x.format,x.doOnChange(),r(mt,x.value)}),s.watch(()=>N.value,A=>{B.value=A,C&&r("activeChange",A),C=!0}),s.watch(()=>x.value,()=>{!n.modelValue&&!k.value&&(k.value=!0)}),s.watch(()=>E.value,()=>{s.nextTick(()=>{var A,K,W;(A=f.value)==null||A.update(),(K=p.value)==null||K.update(),(W=v.value)==null||W.update()})}),s.provide(ff,{currentColor:N}),e({color:x,show:M,hide:L,focus:re,blur:Y}),(A,K)=>(s.openBlock(),s.createBlock(s.unref(si),{ref_key:"popper",ref:h,visible:E.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[s.unref(i).be("picker","panel"),s.unref(i).b("dropdown"),A.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:A.teleported,transition:`${s.unref(i).namespace.value}-zoom-in-top`,persistent:"",onHide:W=>I(!1)},{content:s.withCtx(()=>[s.withDirectives((s.openBlock(),s.createElementBlock("div",{onKeydown:s.withKeys(J,["esc"])},[s.createElementVNode("div",{class:s.normalizeClass(s.unref(i).be("dropdown","main-wrapper"))},[s.createVNode(Fk,{ref_key:"hue",ref:f,class:"hue-slider",color:s.unref(x),vertical:""},null,8,["color"]),s.createVNode(qk,{ref_key:"sv",ref:p,color:s.unref(x)},null,8,["color"])],2),A.showAlpha?(s.openBlock(),s.createBlock(Pk,{key:0,ref_key:"alpha",ref:v,color:s.unref(x)},null,8,["color"])):s.createCommentVNode("v-if",!0),A.predefine?(s.openBlock(),s.createBlock(zk,{key:1,ref:"predefine","enable-alpha":A.showAlpha,color:s.unref(x),colors:A.predefine},null,8,["enable-alpha","color","colors"])):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{class:s.normalizeClass(s.unref(i).be("dropdown","btns"))},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(i).be("dropdown","value"))},[s.createVNode(s.unref(Fd),{ref_key:"inputRef",ref:y,modelValue:B.value,"onUpdate:modelValue":W=>B.value=W,"validate-event":!1,size:"small",onKeyup:s.withKeys($,["enter"]),onBlur:$},null,8,["modelValue","onUpdate:modelValue","onKeyup"])],2),s.createVNode(s.unref(Ar),{class:s.normalizeClass(s.unref(i).be("dropdown","link-btn")),text:"",size:"small",onClick:j},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(s.unref(a)("el.colorpicker.clear")),1)]),_:1},8,["class"]),s.createVNode(s.unref(Ar),{plain:"",size:"small",class:s.normalizeClass(s.unref(i).be("dropdown","btn")),onClick:z},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(s.unref(a)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,["onKeydown"])),[[s.unref(af),ee]])]),default:s.withCtx(()=>[s.createElementVNode("div",s.mergeProps({id:s.unref(c),ref_key:"triggerRef",ref:g},A.$attrs,{class:s.unref(F),role:"button","aria-label":s.unref(D),"aria-labelledby":s.unref(P),"aria-description":s.unref(a)("el.colorpicker.description",{color:A.modelValue||""}),"aria-disabled":s.unref(u),tabindex:s.unref(u)?-1:A.tabindex,onKeydown:Z,onFocus:s.unref(b),onBlur:s.unref(w)}),[s.unref(u)?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(s.unref(i).be("picker","mask"))},null,2)):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{class:s.normalizeClass(s.unref(i).be("picker","trigger")),onClick:H},[s.createElementVNode("span",{class:s.normalizeClass([s.unref(i).be("picker","color"),s.unref(i).is("alpha",A.showAlpha)])},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(i).be("picker","color-inner")),style:s.normalizeStyle({backgroundColor:s.unref(S)})},[s.withDirectives(s.createVNode(s.unref(yt),{class:s.normalizeClass([s.unref(i).be("picker","icon"),s.unref(i).is("icon-arrow-down")])},{default:s.withCtx(()=>[s.createVNode(s.unref(oo))]),_:1},8,["class"]),[[s.vShow,A.modelValue||k.value]]),s.withDirectives(s.createVNode(s.unref(yt),{class:s.normalizeClass([s.unref(i).be("picker","empty"),s.unref(i).is("icon-close")])},{default:s.withCtx(()=>[s.createVNode(s.unref(so))]),_:1},8,["class"]),[[s.vShow,!A.modelValue&&!k.value]])],6)],2)],2)],16,["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex","onFocus","onBlur"])]),_:1},8,["visible","popper-class","teleported","transition","onHide"]))}});var Wk=Te(Gk,[["__file","color-picker.vue"]]);const jk=dt(Wk),Yk=s.defineComponent({name:"ElContainer"}),Xk=s.defineComponent({...Yk,props:{direction:{type:String}},setup(t){const e=t,r=s.useSlots(),n=Be("container"),a=s.computed(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:r&&r.default?r.default().some(o=>{const l=o.type.name;return l==="ElHeader"||l==="ElFooter"}):!1);return(i,o)=>(s.openBlock(),s.createElementBlock("section",{class:s.normalizeClass([s.unref(n).b(),s.unref(n).is("vertical",s.unref(a))])},[s.renderSlot(i.$slots,"default")],2))}});var Zk=Te(Xk,[["__file","container.vue"]]);const Qk=s.defineComponent({name:"ElAside"}),Jk=s.defineComponent({...Qk,props:{width:{type:String,default:null}},setup(t){const e=t,r=Be("aside"),n=s.computed(()=>e.width?r.cssVarBlock({width:e.width}):{});return(a,i)=>(s.openBlock(),s.createElementBlock("aside",{class:s.normalizeClass(s.unref(r).b()),style:s.normalizeStyle(s.unref(n))},[s.renderSlot(a.$slots,"default")],6))}});var mf=Te(Jk,[["__file","aside.vue"]]);const ex=s.defineComponent({name:"ElFooter"}),tx=s.defineComponent({...ex,props:{height:{type:String,default:null}},setup(t){const e=t,r=Be("footer"),n=s.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(a,i)=>(s.openBlock(),s.createElementBlock("footer",{class:s.normalizeClass(s.unref(r).b()),style:s.normalizeStyle(s.unref(n))},[s.renderSlot(a.$slots,"default")],6))}});var yf=Te(tx,[["__file","footer.vue"]]);const rx=s.defineComponent({name:"ElHeader"}),nx=s.defineComponent({...rx,props:{height:{type:String,default:null}},setup(t){const e=t,r=Be("header"),n=s.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(a,i)=>(s.openBlock(),s.createElementBlock("header",{class:s.normalizeClass(s.unref(r).b()),style:s.normalizeStyle(s.unref(n))},[s.renderSlot(a.$slots,"default")],6))}});var bf=Te(nx,[["__file","header.vue"]]);const ax=s.defineComponent({name:"ElMain"}),ix=s.defineComponent({...ax,setup(t){const e=Be("main");return(r,n)=>(s.openBlock(),s.createElementBlock("main",{class:s.normalizeClass(s.unref(e).b())},[s.renderSlot(r.$slots,"default")],2))}});var wf=Te(ix,[["__file","main.vue"]]);dt(Zk,{Aside:mf,Footer:yf,Header:bf,Main:wf}),Lr(mf),Lr(yf),Lr(bf);const ox=Lr(wf),sx=s.defineComponent({inheritAttrs:!1});function lx(t,e,r,n,a,i){return s.renderSlot(t.$slots,"default")}var cx=Te(sx,[["render",lx],["__file","collection.vue"]]);const ux=s.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function dx(t,e,r,n,a,i){return s.renderSlot(t.$slots,"default")}var fx=Te(ux,[["render",dx],["__file","collection-item.vue"]]);const hx="data-el-collection-item",px=t=>{const e=`El${t}Collection`,r=`${e}Item`,n=Symbol(e),a=Symbol(r),i={...cx,name:e,setup(){const l=s.ref(null),u=new Map,c=()=>{const d=s.unref(l);if(!d)return[];const f=Array.from(d.querySelectorAll(`[${hx}]`));return[...u.values()].sort((v,h)=>f.indexOf(v.ref)-f.indexOf(h.ref))};s.provide(n,{itemMap:u,getItems:c,collectionRef:l})}},o={...fx,name:r,setup(l,{attrs:u}){const c=s.ref(null),d=s.inject(n,void 0);s.provide(a,{collectionItemRef:c}),s.onMounted(()=>{const f=s.unref(c);f&&d.itemMap.set(f,{ref:f,...u})}),s.onBeforeUnmount(()=>{const f=s.unref(c);d.itemMap.delete(f)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:a,ElCollection:i,ElCollectionItem:o}},Nl=Ie({trigger:oi.trigger,effect:{...$t.effect,default:"light"},type:{type:ke(String)},placement:{type:ke(String),default:"bottom"},popperOptions:{type:ke(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:ke([Number,String]),default:0},maxHeight:{type:ke([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:ke(Object)},teleported:$t.teleported});Ie({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Xr}}),Ie({onKeydown:{type:ke(Function)}}),px("Dropdown");const Cf=Symbol("ElSelectGroup"),di=Symbol("ElSelect");function vx(t,e){const r=s.inject(di),n=s.inject(Cf,{disabled:!1}),a=s.computed(()=>d(Gr(r.props.modelValue),t.value)),i=s.computed(()=>{var v;if(r.props.multiple){const h=Gr((v=r.props.modelValue)!=null?v:[]);return!a.value&&h.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),o=s.computed(()=>t.label||(vt(t.value)?"":t.value)),l=s.computed(()=>t.value||t.label||""),u=s.computed(()=>t.disabled||e.groupDisabled||i.value),c=s.getCurrentInstance(),d=(v=[],h)=>{if(vt(t.value)){const g=r.props.valueKey;return v&&v.some(y=>s.toRaw(_r(y,g))===_r(h,g))}else return v&&v.includes(h)},f=()=>{!t.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(c.proxy))},p=v=>{const h=new RegExp(P1(v),"i");e.visible=h.test(o.value)||t.created};return s.watch(()=>o.value,()=>{!t.created&&!r.props.remote&&r.setSelected()}),s.watch(()=>t.value,(v,h)=>{const{remote:g,valueKey:y}=r.props;if(v!==h&&(r.onOptionDestroy(h,c.proxy),r.onOptionCreate(c.proxy)),!t.created&&!g){if(y&&vt(v)&&vt(h)&&v[y]===h[y])return;r.setSelected()}}),s.watch(()=>n.disabled,()=>{e.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:o,currentValue:l,itemSelected:a,isDisabled:u,hoverItem:f,updateOption:p}}const gx=s.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const e=Be("select"),r=mo(),n=s.computed(()=>[e.be("dropdown","item"),e.is("disabled",s.unref(l)),e.is("selected",s.unref(o)),e.is("hovering",s.unref(p))]),a=s.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:i,itemSelected:o,isDisabled:l,select:u,hoverItem:c,updateOption:d}=vx(t,a),{visible:f,hover:p}=s.toRefs(a),v=s.getCurrentInstance().proxy;u.onOptionCreate(v),s.onBeforeUnmount(()=>{const g=v.value,{selected:y}=u.states,b=(u.props.multiple?y:[y]).some(w=>w.value===v.value);s.nextTick(()=>{u.states.cachedOptions.get(g)===v&&!b&&u.states.cachedOptions.delete(g)}),u.onOptionDestroy(g,v)});function h(){l.value||u.handleOptionSelect(v)}return{ns:e,id:r,containerKls:n,currentLabel:i,itemSelected:o,isDisabled:l,select:u,hoverItem:c,updateOption:d,visible:f,hover:p,selectOptionClick:h,states:a}}});function mx(t,e,r,n,a,i){return s.withDirectives((s.openBlock(),s.createElementBlock("li",{id:t.id,class:s.normalizeClass(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMouseenter:t.hoverItem,onClick:s.withModifiers(t.selectOptionClick,["stop"])},[s.renderSlot(t.$slots,"default",{},()=>[s.createElementVNode("span",null,s.toDisplayString(t.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[s.vShow,t.visible]])}var Dl=Te(gx,[["render",mx],["__file","option.vue"]]);const yx=s.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=s.inject(di),e=Be("select"),r=s.computed(()=>t.props.popperClass),n=s.computed(()=>t.props.multiple),a=s.computed(()=>t.props.fitInputWidth),i=s.ref("");function o(){var l;i.value=`${(l=t.selectRef)==null?void 0:l.offsetWidth}px`}return s.onMounted(()=>{o(),Dr(t.selectRef,o)}),{ns:e,minWidth:i,popperClass:r,isMultiple:n,isFitInputWidth:a}}});function bx(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:s.normalizeStyle({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(t.ns.be("dropdown","header"))},[s.renderSlot(t.$slots,"header")],2)):s.createCommentVNode("v-if",!0),s.renderSlot(t.$slots,"default"),t.$slots.footer?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(t.ns.be("dropdown","footer"))},[s.renderSlot(t.$slots,"footer")],2)):s.createCommentVNode("v-if",!0)],6)}var wx=Te(yx,[["render",bx],["__file","select-dropdown.vue"]]);const Cx=11,kx=(t,e)=>{const{t:r}=Ya(),n=mo(),a=Be("select"),i=Be("input"),o=s.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=s.ref(null),u=s.ref(null),c=s.ref(null),d=s.ref(null),f=s.ref(null),p=s.ref(null),v=s.ref(null),h=s.ref(null),g=s.ref(null),y=s.ref(null),m=s.ref(null),b=s.ref(null),{isComposing:w,handleCompositionStart:C,handleCompositionUpdate:x,handleCompositionEnd:E}=Dd({afterComposition:q=>Q(q)}),{wrapperRef:k,isFocused:B}=ol(f,{beforeFocus(){return _.value},afterFocus(){t.automaticDropdown&&!S.value&&(S.value=!0,o.menuVisibleOnFocus=!0)},beforeBlur(q){var ce,Oe;return((ce=c.value)==null?void 0:ce.isFocusInsideContent(q))||((Oe=d.value)==null?void 0:Oe.isFocusInsideContent(q))},afterBlur(){S.value=!1,o.menuVisibleOnFocus=!1}}),S=s.ref(!1),N=s.ref(),{form:D,formItem:P}=Dn(),{inputId:F}=ii(t,{formItemContext:P}),{valueOnClear:O,isEmptyValue:I}=Kw(t),_=s.computed(()=>t.disabled||(D==null?void 0:D.disabled)),M=s.computed(()=>At(t.modelValue)?t.modelValue.length>0:!I(t.modelValue)),L=s.computed(()=>t.clearable&&!_.value&&o.inputHovering&&M.value),R=s.computed(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),H=s.computed(()=>a.is("reverse",R.value&&S.value)),$=s.computed(()=>(P==null?void 0:P.validateState)||""),z=s.computed(()=>Uu[$.value]),j=s.computed(()=>t.remote?300:0),ee=s.computed(()=>t.loading?t.loadingText||r("el.select.loading"):t.remote&&!o.inputValue&&o.options.size===0?!1:t.filterable&&o.inputValue&&o.options.size>0&&J.value===0?t.noMatchText||r("el.select.noMatch"):o.options.size===0?t.noDataText||r("el.select.noData"):null),J=s.computed(()=>Z.value.filter(q=>q.visible).length),Z=s.computed(()=>{const q=Array.from(o.options.values()),ce=[];return o.optionValues.forEach(Oe=>{const ze=q.findIndex(Tr=>Tr.value===Oe);ze>-1&&ce.push(q[ze])}),ce.length>=q.length?ce:q}),re=s.computed(()=>Array.from(o.cachedOptions.values())),Y=s.computed(()=>{const q=Z.value.filter(ce=>!ce.created).some(ce=>ce.currentLabel===o.inputValue);return t.filterable&&t.allowCreate&&o.inputValue!==""&&!q}),A=()=>{t.filterable&&Lt(t.filterMethod)||t.filterable&&t.remote&&Lt(t.remoteMethod)||Z.value.forEach(q=>{var ce;(ce=q.updateOption)==null||ce.call(q,o.inputValue)})},K=Nn(),W=s.computed(()=>["small"].includes(K.value)?"small":"default"),oe=s.computed({get(){return S.value&&ee.value!==!1},set(q){S.value=q}}),he=s.computed(()=>{if(t.multiple&&!Yr(t.modelValue))return Gr(t.modelValue).length===0&&!o.inputValue;const q=At(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||Yr(q)?!o.inputValue:!0}),ne=s.computed(()=>{var q;const ce=(q=t.placeholder)!=null?q:r("el.select.placeholder");return t.multiple||!M.value?ce:o.selectedLabel}),se=s.computed(()=>Ts?null:"mouseenter");s.watch(()=>t.modelValue,(q,ce)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(o.inputValue="",ue("")),de(),!ao(q,ce)&&t.validateEvent&&(P==null||P.validate("change").catch(Oe=>tt(Oe)))},{flush:"post",deep:!0}),s.watch(()=>S.value,q=>{q?ue(o.inputValue):(o.inputValue="",o.previousQuery=null,o.isBeforeHide=!0),e("visible-change",q)}),s.watch(()=>o.options.entries(),()=>{var q;if(!et)return;const ce=((q=l.value)==null?void 0:q.querySelectorAll("input"))||[];(!t.filterable&&!t.defaultFirstOption&&!Yr(t.modelValue)||!Array.from(ce).includes(document.activeElement))&&de(),t.defaultFirstOption&&(t.filterable||t.remote)&&J.value&&pe()},{flush:"post"}),s.watch(()=>o.hoveringIndex,q=>{gt(q)&&q>-1?N.value=Z.value[q]||{}:N.value={},Z.value.forEach(ce=>{ce.hover=N.value===ce})}),s.watchEffect(()=>{o.isBeforeHide||A()});const ue=q=>{o.previousQuery===q||w.value||(o.previousQuery=q,t.filterable&&Lt(t.filterMethod)?t.filterMethod(q):t.filterable&&t.remote&&Lt(t.remoteMethod)&&t.remoteMethod(q),t.defaultFirstOption&&(t.filterable||t.remote)&&J.value?s.nextTick(pe):s.nextTick(Ne))},pe=()=>{const q=Z.value.filter(ze=>ze.visible&&!ze.disabled&&!ze.states.groupDisabled),ce=q.find(ze=>ze.created),Oe=q[0];o.hoveringIndex=ge(Z.value,ce||Oe)},de=()=>{if(t.multiple)o.selectedLabel="";else{const ce=At(t.modelValue)?t.modelValue[0]:t.modelValue,Oe=me(ce);o.selectedLabel=Oe.currentLabel,o.selected=[Oe];return}const q=[];Yr(t.modelValue)||Gr(t.modelValue).forEach(ce=>{q.push(me(ce))}),o.selected=q},me=q=>{let ce;const Oe=Ns(q).toLowerCase()==="object",ze=Ns(q).toLowerCase()==="null",Tr=Ns(q).toLowerCase()==="undefined";for(let qr=o.cachedOptions.size-1;qr>=0;qr--){const rr=re.value[qr];if(Oe?_r(rr.value,t.valueKey)===_r(q,t.valueKey):rr.value===q){ce={value:q,currentLabel:rr.currentLabel,get isDisabled(){return rr.isDisabled}};break}}if(ce)return ce;const yn=Oe?q.label:!ze&&!Tr?q:"";return{value:q,currentLabel:yn}},Ne=()=>{o.hoveringIndex=Z.value.findIndex(q=>o.selected.some(ce=>_t(ce)===_t(q)))},De=()=>{o.selectionWidth=u.value.getBoundingClientRect().width},Ee=()=>{o.calculatorWidth=p.value.getBoundingClientRect().width},Pe=()=>{o.collapseItemWidth=m.value.getBoundingClientRect().width},te=()=>{var q,ce;(ce=(q=c.value)==null?void 0:q.updatePopper)==null||ce.call(q)},T=()=>{var q,ce;(ce=(q=d.value)==null?void 0:q.updatePopper)==null||ce.call(q)},V=()=>{o.inputValue.length>0&&!S.value&&(S.value=!0),ue(o.inputValue)},Q=q=>{if(o.inputValue=q.target.value,t.remote)G();else return V()},G=Ru(()=>{V()},j.value),U=q=>{ao(t.modelValue,q)||e(js,q)},ie=q=>E1(q,ce=>!o.disabledOptions.has(ce)),X=q=>{if(t.multiple&&q.code!==it.delete&&q.target.value.length<=0){const ce=Gr(t.modelValue).slice(),Oe=ie(ce);if(Oe<0)return;const ze=ce[Oe];ce.splice(Oe,1),e(mt,ce),U(ce),e("remove-tag",ze)}},ae=(q,ce)=>{const Oe=o.selected.indexOf(ce);if(Oe>-1&&!_.value){const ze=Gr(t.modelValue).slice();ze.splice(Oe,1),e(mt,ze),U(ze),e("remove-tag",ce.value)}q.stopPropagation(),rt()},we=q=>{q.stopPropagation();const ce=t.multiple?[]:O.value;if(t.multiple)for(const Oe of o.selected)Oe.isDisabled&&ce.push(Oe.value);e(mt,ce),U(ce),o.hoveringIndex=-1,S.value=!1,e("clear"),rt()},Ce=q=>{var ce;if(t.multiple){const Oe=Gr((ce=t.modelValue)!=null?ce:[]).slice(),ze=ge(Oe,q.value);ze>-1?Oe.splice(ze,1):(t.multipleLimit<=0||Oe.length<t.multipleLimit)&&Oe.push(q.value),e(mt,Oe),U(Oe),q.created&&ue(""),t.filterable&&!t.reserveKeyword&&(o.inputValue="")}else e(mt,q.value),U(q.value),S.value=!1;rt(),!S.value&&s.nextTick(()=>{Se(q)})},ge=(q=[],ce)=>{if(!vt(ce))return q.indexOf(ce);const Oe=t.valueKey;let ze=-1;return q.some((Tr,yn)=>s.toRaw(_r(Tr,Oe))===_r(ce,Oe)?(ze=yn,!0):!1),ze},Se=q=>{var ce,Oe,ze,Tr,yn;const za=At(q)?q[0]:q;let qr=null;if(za!=null&&za.value){const rr=Z.value.filter(bn=>bn.value===za.value);rr.length>0&&(qr=rr[0].$el)}if(c.value&&qr){const rr=(Tr=(ze=(Oe=(ce=c.value)==null?void 0:ce.popperRef)==null?void 0:Oe.contentRef)==null?void 0:ze.querySelector)==null?void 0:Tr.call(ze,`.${a.be("dropdown","wrap")}`);rr&&F1(rr,qr)}(yn=b.value)==null||yn.handleScroll()},ve=q=>{o.options.set(q.value,q),o.cachedOptions.set(q.value,q),q.disabled&&o.disabledOptions.set(q.value,q)},ye=(q,ce)=>{o.options.get(q)===ce&&o.options.delete(q)},Ge=s.computed(()=>{var q,ce;return(ce=(q=c.value)==null?void 0:q.popperRef)==null?void 0:ce.contentRef}),Ve=()=>{o.isBeforeHide=!1,s.nextTick(()=>Se(o.selected))},rt=()=>{var q;(q=f.value)==null||q.focus()},nt=()=>{var q;(q=f.value)==null||q.blur()},Qe=q=>{we(q)},Ot=()=>{S.value=!1,B.value&&nt()},ut=()=>{o.inputValue.length>0?o.inputValue="":S.value=!1},ht=()=>{_.value||(Ts&&(o.inputHovering=!0),o.menuVisibleOnFocus?o.menuVisibleOnFocus=!1:S.value=!S.value)},Wt=()=>{S.value?Z.value[o.hoveringIndex]&&Ce(Z.value[o.hoveringIndex]):ht()},_t=q=>vt(q.value)?_r(q.value,t.valueKey):q.value,Ft=s.computed(()=>Z.value.filter(q=>q.visible).every(q=>q.disabled)),tr=s.computed(()=>t.multiple?t.collapseTags?o.selected.slice(0,t.maxCollapseTags):o.selected:[]),dr=s.computed(()=>t.multiple?t.collapseTags?o.selected.slice(t.maxCollapseTags):[]:[]),Kt=q=>{if(!S.value){S.value=!0;return}if(!(o.options.size===0||o.filteredOptionsCount===0||w.value)&&!Ft.value){q==="next"?(o.hoveringIndex++,o.hoveringIndex===o.options.size&&(o.hoveringIndex=0)):q==="prev"&&(o.hoveringIndex--,o.hoveringIndex<0&&(o.hoveringIndex=o.options.size-1));const ce=Z.value[o.hoveringIndex];(ce.disabled===!0||ce.states.groupDisabled===!0||!ce.visible)&&Kt(q),s.nextTick(()=>Se(N.value))}},Je=()=>{if(!u.value)return 0;const q=window.getComputedStyle(u.value);return Number.parseFloat(q.gap||"6px")},at=s.computed(()=>{const q=Je();return{maxWidth:`${m.value&&t.maxCollapseTags===1?o.selectionWidth-o.collapseItemWidth-q:o.selectionWidth}px`}}),pt=s.computed(()=>({maxWidth:`${o.selectionWidth}px`})),mn=s.computed(()=>({width:`${Math.max(o.calculatorWidth,Cx)}px`}));return Dr(u,De),Dr(p,Ee),Dr(g,te),Dr(k,te),Dr(y,T),Dr(m,Pe),s.onMounted(()=>{de()}),{inputId:F,contentId:n,nsSelect:a,nsInput:i,states:o,isFocused:B,expanded:S,optionsArray:Z,hoverOption:N,selectSize:K,filteredOptionsCount:J,resetCalculatorWidth:Ee,updateTooltip:te,updateTagTooltip:T,debouncedOnInputChange:G,onInput:Q,deletePrevTag:X,deleteTag:ae,deleteSelected:we,handleOptionSelect:Ce,scrollToOption:Se,hasModelValue:M,shouldShowPlaceholder:he,currentPlaceholder:ne,mouseEnterEventName:se,showClose:L,iconComponent:R,iconReverse:H,validateState:$,validateIcon:z,showNewOption:Y,updateOptions:A,collapseTagSize:W,setSelected:de,selectDisabled:_,emptyText:ee,handleCompositionStart:C,handleCompositionUpdate:x,handleCompositionEnd:E,onOptionCreate:ve,onOptionDestroy:ye,handleMenuEnter:Ve,focus:rt,blur:nt,handleClearClick:Qe,handleClickOutside:Ot,handleEsc:ut,toggleMenu:ht,selectOption:Wt,getValueKey:_t,navigateOptions:Kt,dropdownMenuVisible:oe,showTagList:tr,collapseTagList:dr,tagStyle:at,collapseTagStyle:pt,inputStyle:mn,popperRef:Ge,inputRef:f,tooltipRef:c,tagTooltipRef:d,calculatorRef:p,prefixRef:v,suffixRef:h,selectRef:l,wrapperRef:k,selectionRef:u,scrollbarRef:b,menuRef:g,tagMenuRef:y,collapseItemRef:m}};var xx=s.defineComponent({name:"ElOptions",setup(t,{slots:e}){const r=s.inject(di);let n=[];return()=>{var a,i;const o=(a=e.default)==null?void 0:a.call(e),l=[];function u(c){At(c)&&c.forEach(d=>{var f,p,v,h;const g=(f=(d==null?void 0:d.type)||{})==null?void 0:f.name;g==="ElOptionGroup"?u(!St(d.children)&&!At(d.children)&&Lt((p=d.children)==null?void 0:p.default)?(v=d.children)==null?void 0:v.default():d.children):g==="ElOption"?l.push((h=d.props)==null?void 0:h.value):At(d.children)&&u(d.children)})}return o.length&&u((i=o[0])==null?void 0:i.children),ao(l,n)||(n=l,r&&(r.states.optionValues=l)),o}}});const Ex=Ie({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:sa,effect:{type:ke(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:ke(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:$t.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Xr,default:Gs},fitInputWidth:Boolean,suffixIcon:{type:Xr,default:oo},tagType:{...xl.type,default:"info"},tagEffect:{...xl.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:ke(String),values:fo,default:"bottom-start"},fallbackPlacements:{type:ke(Array),default:["bottom-start","top-start","right","left"]},appendTo:String,...Hw,...Qr(["ariaLabel"])}),kf="ElSelect",Sx=s.defineComponent({name:kf,componentName:kf,components:{ElSelectMenu:wx,ElOption:Dl,ElOptions:xx,ElTag:fk,ElScrollbar:m2,ElTooltip:si,ElIcon:yt},directives:{ClickOutside:af},props:Ex,emits:[mt,js,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const r=s.computed(()=>{const{modelValue:i,multiple:o}=t,l=o?[]:void 0;return At(i)?o?i:l:o?l:i}),n=s.reactive({...s.toRefs(t),modelValue:r}),a=kx(n,e);return s.provide(di,s.reactive({props:n,states:a.states,optionsArray:a.optionsArray,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy,selectRef:a.selectRef,setSelected:a.setSelected})),{...a,modelValue:r}}});function Tx(t,e,r,n,a,i){const o=s.resolveComponent("el-tag"),l=s.resolveComponent("el-tooltip"),u=s.resolveComponent("el-icon"),c=s.resolveComponent("el-option"),d=s.resolveComponent("el-options"),f=s.resolveComponent("el-scrollbar"),p=s.resolveComponent("el-select-menu"),v=s.resolveDirective("click-outside");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{ref:"selectRef",class:s.normalizeClass([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),[s.toHandlerKey(t.mouseEnterEventName)]:h=>t.states.inputHovering=!0,onMouseleave:h=>t.states.inputHovering=!1},[s.createVNode(l,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,onBeforeShow:t.handleMenuEnter,onHide:h=>t.states.isBeforeHide=!1},{default:s.withCtx(()=>{var h;return[s.createElementVNode("div",{ref:"wrapperRef",class:s.normalizeClass([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:s.withModifiers(t.toggleMenu,["prevent"])},[t.$slots.prefix?(s.openBlock(),s.createElementBlock("div",{key:0,ref:"prefixRef",class:s.normalizeClass(t.nsSelect.e("prefix"))},[s.renderSlot(t.$slots,"prefix")],2)):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{ref:"selectionRef",class:s.normalizeClass([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?s.renderSlot(t.$slots,"tag",{key:0},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.showTagList,g=>(s.openBlock(),s.createElementBlock("div",{key:t.getValueKey(g),class:s.normalizeClass(t.nsSelect.e("selected-item"))},[s.createVNode(o,{closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:s.normalizeStyle(t.tagStyle),onClose:y=>t.deleteTag(y,g)},{default:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass(t.nsSelect.e("tags-text"))},[s.renderSlot(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[s.createTextVNode(s.toDisplayString(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(s.openBlock(),s.createBlock(l,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:s.withCtx(()=>[s.createElementVNode("div",{ref:"collapseItemRef",class:s.normalizeClass(t.nsSelect.e("selected-item"))},[s.createVNode(o,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:s.normalizeStyle(t.collapseTagStyle)},{default:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass(t.nsSelect.e("tags-text"))}," + "+s.toDisplayString(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:s.withCtx(()=>[s.createElementVNode("div",{ref:"tagMenuRef",class:s.normalizeClass(t.nsSelect.e("selection"))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.collapseTagList,g=>(s.openBlock(),s.createElementBlock("div",{key:t.getValueKey(g),class:s.normalizeClass(t.nsSelect.e("selected-item"))},[s.createVNode(o,{class:"in-tooltip",closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:y=>t.deleteTag(y,g)},{default:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass(t.nsSelect.e("tags-text"))},[s.renderSlot(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[s.createTextVNode(s.toDisplayString(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):s.createCommentVNode("v-if",!0)]):s.createCommentVNode("v-if",!0),t.selectDisabled?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[s.withDirectives(s.createElementVNode("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":g=>t.states.inputValue=g,type:"text",name:t.name,class:s.normalizeClass([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:s.normalizeStyle(t.inputStyle),role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((h=t.hoverOption)==null?void 0:h.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[s.withKeys(s.withModifiers(g=>t.navigateOptions("next"),["stop","prevent"]),["down"]),s.withKeys(s.withModifiers(g=>t.navigateOptions("prev"),["stop","prevent"]),["up"]),s.withKeys(s.withModifiers(t.handleEsc,["stop","prevent"]),["esc"]),s.withKeys(s.withModifiers(t.selectOption,["stop","prevent"]),["enter"]),s.withKeys(s.withModifiers(t.deletePrevTag,["stop"]),["delete"])],onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onInput:t.onInput,onClick:s.withModifiers(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[s.vModelText,t.states.inputValue]]),t.filterable?(s.openBlock(),s.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:s.normalizeClass(t.nsSelect.e("input-calculator")),textContent:s.toDisplayString(t.states.inputValue)},null,10,["textContent"])):s.createCommentVNode("v-if",!0)],2)),t.shouldShowPlaceholder?(s.openBlock(),s.createElementBlock("div",{key:2,class:s.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?s.renderSlot(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[s.createElementVNode("span",null,s.toDisplayString(t.currentPlaceholder),1)]):(s.openBlock(),s.createElementBlock("span",{key:1},s.toDisplayString(t.currentPlaceholder),1))],2)):s.createCommentVNode("v-if",!0)],2),s.createElementVNode("div",{ref:"suffixRef",class:s.normalizeClass(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(s.openBlock(),s.createBlock(u,{key:0,class:s.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0),t.showClose&&t.clearIcon?(s.openBlock(),s.createBlock(u,{key:1,class:s.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onClick"])):s.createCommentVNode("v-if",!0),t.validateState&&t.validateIcon?(s.openBlock(),s.createBlock(u,{key:2,class:s.normalizeClass([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.validateIcon)))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:s.withCtx(()=>[s.createVNode(p,{ref:"menuRef"},{default:s.withCtx(()=>[t.$slots.header?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(t.nsSelect.be("dropdown","header")),onClick:s.withModifiers(()=>{},["stop"])},[s.renderSlot(t.$slots,"header")],10,["onClick"])):s.createCommentVNode("v-if",!0),s.withDirectives(s.createVNode(f,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:s.normalizeClass([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:s.withCtx(()=>[t.showNewOption?(s.openBlock(),s.createBlock(c,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):s.createCommentVNode("v-if",!0),s.createVNode(d,null,{default:s.withCtx(()=>[s.renderSlot(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[s.vShow,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(t.nsSelect.be("dropdown","loading"))},[s.renderSlot(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(s.openBlock(),s.createElementBlock("div",{key:2,class:s.normalizeClass(t.nsSelect.be("dropdown","empty"))},[s.renderSlot(t.$slots,"empty",{},()=>[s.createElementVNode("span",null,s.toDisplayString(t.emptyText),1)])],2)):s.createCommentVNode("v-if",!0),t.$slots.footer?(s.openBlock(),s.createElementBlock("div",{key:3,class:s.normalizeClass(t.nsSelect.be("dropdown","footer")),onClick:s.withModifiers(()=>{},["stop"])},[s.renderSlot(t.$slots,"footer")],10,["onClick"])):s.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","onBeforeShow","onHide"])],16,["onMouseleave"])),[[v,t.handleClickOutside,t.popperRef]])}var Bx=Te(Sx,[["render",Tx],["__file","select.vue"]]);const Nx=s.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Be("select"),r=s.ref(null),n=s.getCurrentInstance(),a=s.ref([]);s.provide(Cf,s.reactive({...s.toRefs(t)}));const i=s.computed(()=>a.value.some(c=>c.visible===!0)),o=c=>{var d,f;return((d=c.type)==null?void 0:d.name)==="ElOption"&&!!((f=c.component)!=null&&f.proxy)},l=c=>{const d=Gr(c),f=[];return d.forEach(p=>{var v,h;o(p)?f.push(p.component.proxy):(v=p.children)!=null&&v.length?f.push(...l(p.children)):(h=p.component)!=null&&h.subTree&&f.push(...l(p.component.subTree))}),f},u=()=>{a.value=l(n.subTree)};return s.onMounted(()=>{u()}),Tg(r,u,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:i,ns:e}}});function Dx(t,e,r,n,a,i){return s.withDirectives((s.openBlock(),s.createElementBlock("ul",{ref:"groupRef",class:s.normalizeClass(t.ns.be("group","wrap"))},[s.createElementVNode("li",{class:s.normalizeClass(t.ns.be("group","title"))},s.toDisplayString(t.label),3),s.createElementVNode("li",null,[s.createElementVNode("ul",{class:s.normalizeClass(t.ns.b("group"))},[s.renderSlot(t.$slots,"default")],2)])],2)),[[s.vShow,t.visible]])}var xf=Te(Nx,[["render",Dx],["__file","option-group.vue"]]);const Px=dt(Bx,{Option:Dl,OptionGroup:xf}),Ox=Lr(Dl);Lr(xf);const _x=Ie({trigger:oi.trigger,placement:Nl.placement,disabled:oi.disabled,visible:$t.visible,transition:$t.transition,popperOptions:Nl.popperOptions,tabindex:Nl.tabindex,content:$t.content,popperStyle:$t.popperStyle,popperClass:$t.popperClass,enterable:{...$t.enterable,default:!0},effect:{...$t.effect,default:"light"},teleported:$t.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),Fx={"update:visible":t=>Qn(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Lx="onUpdate:visible",Mx=s.defineComponent({name:"ElPopover"}),Ix=s.defineComponent({...Mx,props:_x,emits:Fx,setup(t,{expose:e,emit:r}){const n=t,a=s.computed(()=>n[Lx]),i=Be("popover"),o=s.ref(),l=s.computed(()=>{var y;return(y=s.unref(o))==null?void 0:y.popperRef}),u=s.computed(()=>[{width:Jn(n.width)},n.popperStyle]),c=s.computed(()=>[i.b(),n.popperClass,{[i.m("plain")]:!!n.content}]),d=s.computed(()=>n.transition===`${i.namespace.value}-fade-in-linear`),f=()=>{var y;(y=o.value)==null||y.hide()},p=()=>{r("before-enter")},v=()=>{r("before-leave")},h=()=>{r("after-enter")},g=()=>{r("update:visible",!1),r("after-leave")};return e({popperRef:l,hide:f}),(y,m)=>(s.openBlock(),s.createBlock(s.unref(si),s.mergeProps({ref_key:"tooltipRef",ref:o},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":s.unref(c),"popper-style":s.unref(u),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":s.unref(d),"onUpdate:visible":s.unref(a),onBeforeShow:p,onBeforeHide:v,onShow:h,onHide:g}),{content:s.withCtx(()=>[y.title?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(s.unref(i).e("title")),role:"title"},s.toDisplayString(y.title),3)):s.createCommentVNode("v-if",!0),s.renderSlot(y.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(y.content),1)])]),default:s.withCtx(()=>[y.$slots.reference?s.renderSlot(y.$slots,"reference",{key:0}):s.createCommentVNode("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var Ax=Te(Ix,[["__file","popover.vue"]]);const Ef=(t,e)=>{const r=e.arg||e.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=t)};var Rx={mounted(t,e){Ef(t,e)},updated(t,e){Ef(t,e)}};const Vx=fb(Rx,"popover"),Pl=dt(Ax,{directive:Vx}),fa="$treeNodeId",Sf=function(t,e){!e||e[fa]||Object.defineProperty(e,fa,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},Ol=function(t,e){return t?e[t]:e[fa]},_l=(t,e,r)=>{const n=t.value.currentNode;r();const a=t.value.currentNode;n!==a&&e("current-change",a?a.data:null,a)},Fl=t=>{let e=!0,r=!0,n=!0;for(let a=0,i=t.length;a<i;a++){const o=t[a];(o.checked!==!0||o.indeterminate)&&(e=!1,o.disabled||(n=!1)),(o.checked!==!1||o.indeterminate)&&(r=!1)}return{all:e,none:r,allWithoutDisable:n,half:!e&&!r}},fi=function(t){if(t.childNodes.length===0||t.loading)return;const{all:e,none:r,half:n}=Fl(t.childNodes);e?(t.checked=!0,t.indeterminate=!1):n?(t.checked=!1,t.indeterminate=!0):r&&(t.checked=!1,t.indeterminate=!1);const a=t.parent;!a||a.level===0||t.store.checkStrictly||fi(a)},To=function(t,e){const r=t.store.props,n=t.data||{},a=r[e];if(typeof a=="function")return a(n,t);if(typeof a=="string")return n[a];if(typeof a>"u"){const i=n[e];return i===void 0?"":i}};let $x=0;class _n{constructor(e){this.id=$x++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const r in e)wn(e,r)&&(this[r]=e[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const e=this.store;if(!e)throw new Error("[Node]store is required!");e.registerNode(this);const r=e.props;if(r&&typeof r.isLeaf<"u"){const i=To(this,"isLeaf");typeof i=="boolean"&&(this.isLeafByUser=i)}if(e.lazy!==!0&&this.data?(this.setData(this.data),e.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&e.lazy&&e.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Array.isArray(this.data)||Sf(this,this.data),!this.data)return;const n=e.defaultExpandedKeys,a=e.key;a&&n&&n.includes(this.key)&&this.expand(null,e.autoExpandParent),a&&e.currentNodeKey!==void 0&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(e){Array.isArray(e)||Sf(this,e),this.data=e,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=To(this,"children")||[];for(let n=0,a=r.length;n<a;n++)this.insertChild({data:r[n]})}get label(){return To(this,"label")}get key(){const e=this.store.key;return this.data?this.data[e]:null}get disabled(){return To(this,"disabled")}get nextSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return e.childNodes[r+1]}return null}get previousSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return r>0?e.childNodes[r-1]:null}return null}contains(e,r=!0){return(this.childNodes||[]).some(n=>n===e||r&&n.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,r,n){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof _n)){if(!n){const a=this.getChildren(!0);a.includes(e.data)||(typeof r>"u"||r<0?a.push(e.data):a.splice(r,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=s.reactive(new _n(e)),e instanceof _n&&e.initialize()}e.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),this.updateLeafState()}insertBefore(e,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(e,n)}insertAfter(e,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(e,n)}removeChild(e){const r=this.getChildren()||[],n=r.indexOf(e.data);n>-1&&r.splice(n,1);const a=this.childNodes.indexOf(e);a>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(a,1)),this.updateLeafState()}removeChildByData(e){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===e){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(e,r){const n=()=>{if(r){let a=this.parent;for(;a.level>0;)a.expanded=!0,a=a.parent}this.expanded=!0,e&&e(),this.childNodes.forEach(a=>{a.canFocus=!0})};this.shouldLoadData()?this.loadData(a=>{Array.isArray(a)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||fi(this),n())}):n()}doCreateChildren(e,r={}){e.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(e=>{e.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0;return}this.isLeaf=!1}setChecked(e,r,n,a){if(this.indeterminate=e==="half",this.checked=e===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:o,allWithoutDisable:l}=Fl(this.childNodes);!this.isLeaf&&!o&&l&&(this.checked=!1,e=!1);const u=()=>{if(r){const c=this.childNodes;for(let p=0,v=c.length;p<v;p++){const h=c[p];a=a||e!==!1;const g=h.disabled?h.checked:a;h.setChecked(g,r,!0,a)}const{half:d,all:f}=Fl(c);f||(this.checked=f,this.indeterminate=d)}};if(this.shouldLoadData()){this.loadData(()=>{u(),fi(this)},{checked:e!==!1});return}else u()}const i=this.parent;!i||i.level===0||n||fi(i)}getChildren(e=!1){if(this.level===0)return this.data;const r=this.data;if(!r)return null;const n=this.store.props;let a="children";return n&&(a=n.children||"children"),r[a]===void 0&&(r[a]=null),e&&!r[a]&&(r[a]=[]),r[a]}updateChildren(){const e=this.getChildren()||[],r=this.childNodes.map(i=>i.data),n={},a=[];e.forEach((i,o)=>{const l=i[fa];!!l&&r.findIndex(c=>c[fa]===l)>=0?n[l]={index:o,data:i}:a.push({index:o,data:i})}),this.store.lazy||r.forEach(i=>{n[i[fa]]||this.removeChildByData(i)}),a.forEach(({index:i,data:o})=>{this.insertChild({data:o},i)}),this.updateLeafState()}loadData(e,r={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(r).length)){this.loading=!0;const n=i=>{this.childNodes=[],this.doCreateChildren(i,r),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,i)},a=()=>{this.loading=!1};this.store.load(this,n,a)}else e&&e.call(this)}eachNode(e){const r=[this];for(;r.length;){const n=r.shift();r.unshift(...n.childNodes),e(n)}}reInitChecked(){this.store.checkStrictly||fi(this)}}class zx{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const r in e)wn(e,r)&&(this[r]=e[r]);this.nodesMap={}}initialize(){if(this.root=new _n({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(e){const r=this.filterNodeMethod,n=this.lazy,a=function(i){const o=i.root?i.root.childNodes:i.childNodes;if(o.forEach(l=>{l.visible=r.call(l,e,l.data,l),a(l)}),!i.visible&&o.length){let l=!0;l=!o.some(u=>u.visible),i.root?i.root.visible=l===!1:i.visible=l===!1}e&&i.visible&&!i.isLeaf&&(!n||i.loaded)&&i.expand()};a(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(e){if(e instanceof _n)return e;const r=vt(e)?Ol(this.key,e):e;return this.nodesMap[r]||null}insertBefore(e,r){const n=this.getNode(r);n.parent.insertBefore({data:e},n)}insertAfter(e,r){const n=this.getNode(r);n.parent.insertAfter({data:e},n)}remove(e){const r=this.getNode(e);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(e,r){const n=io(r)?this.root:this.getNode(r);n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],r=this.nodesMap;e.forEach(n=>{const a=r[n];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const r=this.key;!e||!e.data||(r?e.key!==void 0&&(this.nodesMap[e.key]=e):this.nodesMap[e.id]=e)}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,r=!1){const n=[],a=function(i){(i.root?i.root.childNodes:i.childNodes).forEach(l=>{(l.checked||r&&l.indeterminate)&&(!e||e&&l.isLeaf)&&n.push(l.data),a(l)})};return a(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const e=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(i=>{i.indeterminate&&e.push(i.data),r(i)})};return r(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],r=this.nodesMap;for(const n in r)wn(r,n)&&e.push(r[n]);return e}updateChildren(e,r){const n=this.nodesMap[e];if(!n)return;const a=n.childNodes;for(let i=a.length-1;i>=0;i--){const o=a[i];this.remove(o.data)}for(let i=0,o=r.length;i<o;i++){const l=r[i];this.append(l,n.data)}}_setCheckedKeys(e,r=!1,n){const a=this._getAllNodes().sort((u,c)=>u.level-c.level),i=Object.create(null),o=Object.keys(n);a.forEach(u=>u.setChecked(!1,!1));const l=u=>{u.childNodes.forEach(c=>{var d;i[c.data[e]]=!0,(d=c.childNodes)!=null&&d.length&&l(c)})};for(let u=0,c=a.length;u<c;u++){const d=a[u],f=d.data[e].toString();if(!o.includes(f)){d.checked&&!i[f]&&d.setChecked(!1,!1);continue}if(d.childNodes.length&&l(d),d.isLeaf||this.checkStrictly){d.setChecked(!0,!1);continue}if(d.setChecked(!0,!0),r){d.setChecked(!1,!1);const v=function(h){h.childNodes.forEach(y=>{y.isLeaf||y.setChecked(!1,!1),v(y)})};v(d)}}}setCheckedNodes(e,r=!1){const n=this.key,a={};e.forEach(i=>{a[(i||{})[n]]=!0}),this._setCheckedKeys(n,r,a)}setCheckedKeys(e,r=!1){this.defaultCheckedKeys=e;const n=this.key,a={};e.forEach(i=>{a[i]=!0}),this._setCheckedKeys(n,r,a)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(e,r,n){const a=this.getNode(e);a&&a.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,r=!0){const n=e[this.key],a=this.nodesMap[n];this.setCurrentNode(a),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,r=!0){if(e==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(e);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const Hx=s.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=Be("tree"),r=s.inject("NodeInstance"),n=s.inject("RootTree");return()=>{const a=t.node,{data:i,store:o}=a;return t.renderContent?t.renderContent(s.h,{_self:r,node:a,data:i,store:o}):s.renderSlot(n.ctx.slots,"default",{node:a,data:i},()=>[s.h("span",{class:e.be("node","label")},[a.label])])}}});var Kx=Te(Hx,[["__file","tree-node-content.vue"]]);function Tf(t){const e=s.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{t.node!==n&&t.node.collapse()},children:[]};return e&&e.children.push(r),s.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(t.accordion)for(const a of r.children)a.treeNodeExpand(n)}}}const Bf=Symbol("dragEvents");function qx({props:t,ctx:e,el$:r,dropIndicator$:n,store:a}){const i=Be("tree"),o=s.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),l=({event:d,treeNode:f})=>{if(typeof t.allowDrag=="function"&&!t.allowDrag(f.node))return d.preventDefault(),!1;d.dataTransfer.effectAllowed="move";try{d.dataTransfer.setData("text/plain","")}catch{}o.value.draggingNode=f,e.emit("node-drag-start",f.node,d)},u=({event:d,treeNode:f})=>{const p=f,v=o.value.dropNode;v&&v.node.id!==p.node.id&&Sn(v.$el,i.is("drop-inner"));const h=o.value.draggingNode;if(!h||!p)return;let g=!0,y=!0,m=!0,b=!0;typeof t.allowDrop=="function"&&(g=t.allowDrop(h.node,p.node,"prev"),b=y=t.allowDrop(h.node,p.node,"inner"),m=t.allowDrop(h.node,p.node,"next")),d.dataTransfer.dropEffect=y||g||m?"move":"none",(g||y||m)&&(v==null?void 0:v.node.id)!==p.node.id&&(v&&e.emit("node-drag-leave",h.node,v.node,d),e.emit("node-drag-enter",h.node,p.node,d)),g||y||m?o.value.dropNode=p:o.value.dropNode=null,p.node.nextSibling===h.node&&(m=!1),p.node.previousSibling===h.node&&(g=!1),p.node.contains(h.node,!1)&&(y=!1),(h.node===p.node||h.node.contains(p.node))&&(g=!1,y=!1,m=!1);const w=p.$el.querySelector(`.${i.be("node","content")}`).getBoundingClientRect(),C=r.value.getBoundingClientRect();let x;const E=g?y?.25:m?.45:1:-1,k=m?y?.75:g?.55:0:1;let B=-9999;const S=d.clientY-w.top;S<w.height*E?x="before":S>w.height*k?x="after":y?x="inner":x="none";const N=p.$el.querySelector(`.${i.be("node","expand-icon")}`).getBoundingClientRect(),D=n.value;x==="before"?B=N.top-C.top:x==="after"&&(B=N.bottom-C.top),D.style.top=`${B}px`,D.style.left=`${N.right-C.left}px`,x==="inner"?Us(p.$el,i.is("drop-inner")):Sn(p.$el,i.is("drop-inner")),o.value.showDropIndicator=x==="before"||x==="after",o.value.allowDrop=o.value.showDropIndicator||b,o.value.dropType=x,e.emit("node-drag-over",h.node,p.node,d)},c=d=>{const{draggingNode:f,dropType:p,dropNode:v}=o.value;if(d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="move"),f&&v){const h={data:f.node.data};p!=="none"&&f.node.remove(),p==="before"?v.node.parent.insertBefore(h,v.node):p==="after"?v.node.parent.insertAfter(h,v.node):p==="inner"&&v.node.insertChild(h),p!=="none"&&(a.value.registerNode(h),a.value.key&&f.node.eachNode(g=>{var y;(y=a.value.nodesMap[g.data[a.value.key]])==null||y.setChecked(g.checked,!a.value.checkStrictly)})),Sn(v.$el,i.is("drop-inner")),e.emit("node-drag-end",f.node,v.node,p,d),p!=="none"&&e.emit("node-drop",f.node,v.node,p,d)}f&&!v&&e.emit("node-drag-end",f.node,null,p,d),o.value.showDropIndicator=!1,o.value.draggingNode=null,o.value.dropNode=null,o.value.allowDrop=!0};return s.provide(Bf,{treeNodeDragStart:l,treeNodeDragOver:u,treeNodeDragEnd:c}),{dragState:o}}const Ux=s.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:Ek,ElCheckbox:sk,NodeContent:Kx,ElIcon:yt,Loading:Ws},props:{node:{type:_n,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(t,e){const r=Be("tree"),{broadcastExpanded:n}=Tf(t),a=s.inject("RootTree"),i=s.ref(!1),o=s.ref(!1),l=s.ref(null),u=s.ref(null),c=s.ref(null),d=s.inject(Bf),f=s.getCurrentInstance();s.provide("NodeInstance",f),a||tt("Tree","Can not find node's tree."),t.node.expanded&&(i.value=!0,o.value=!0);const p=a.props.props.children||"children";s.watch(()=>{const S=t.node.data[p];return S&&[...S]},()=>{t.node.updateChildren()}),s.watch(()=>t.node.indeterminate,S=>{g(t.node.checked,S)}),s.watch(()=>t.node.checked,S=>{g(S,t.node.indeterminate)}),s.watch(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),s.watch(()=>t.node.expanded,S=>{s.nextTick(()=>i.value=S),S&&(o.value=!0)});const v=S=>Ol(a.props.nodeKey,S.data),h=S=>{const N=t.props.class;if(!N)return{};let D;if(Lt(N)){const{data:P}=S;D=N(P,S)}else D=N;return St(D)?{[D]:!0}:D},g=(S,N)=>{(l.value!==S||u.value!==N)&&a.ctx.emit("check-change",t.node.data,S,N),l.value=S,u.value=N},y=S=>{_l(a.store,a.ctx.emit,()=>a.store.value.setCurrentNode(t.node)),a.currentNode.value=t.node,a.props.expandOnClickNode&&b(),a.props.checkOnClickNode&&!t.node.disabled&&w(null,{target:{checked:!t.node.checked}}),a.ctx.emit("node-click",t.node.data,t.node,f,S)},m=S=>{a.instance.vnode.props.onNodeContextmenu&&(S.stopPropagation(),S.preventDefault()),a.ctx.emit("node-contextmenu",S,t.node.data,t.node,f)},b=()=>{t.node.isLeaf||(i.value?(a.ctx.emit("node-collapse",t.node.data,t.node,f),t.node.collapse()):t.node.expand(()=>{e.emit("node-expand",t.node.data,t.node,f)}))},w=(S,N)=>{t.node.setChecked(N.target.checked,!a.props.checkStrictly),s.nextTick(()=>{const D=a.store.value;a.ctx.emit("check",t.node.data,{checkedNodes:D.getCheckedNodes(),checkedKeys:D.getCheckedKeys(),halfCheckedNodes:D.getHalfCheckedNodes(),halfCheckedKeys:D.getHalfCheckedKeys()})})};return{ns:r,node$:c,tree:a,expanded:i,childNodeRendered:o,oldChecked:l,oldIndeterminate:u,getNodeKey:v,getNodeClass:h,handleSelectChange:g,handleClick:y,handleContextMenu:m,handleExpandIconClick:b,handleCheckChange:w,handleChildNodeExpand:(S,N,D)=>{n(N),a.ctx.emit("node-expand",S,N,D)},handleDragStart:S=>{a.props.draggable&&d.treeNodeDragStart({event:S,treeNode:t})},handleDragOver:S=>{S.preventDefault(),a.props.draggable&&d.treeNodeDragOver({event:S,treeNode:{$el:c.value,node:t.node}})},handleDrop:S=>{S.preventDefault()},handleDragEnd:S=>{a.props.draggable&&d.treeNodeDragEnd(S)},CaretRight:V1}}});function Gx(t,e,r,n,a,i){const o=s.resolveComponent("el-icon"),l=s.resolveComponent("el-checkbox"),u=s.resolveComponent("loading"),c=s.resolveComponent("node-content"),d=s.resolveComponent("el-tree-node"),f=s.resolveComponent("el-collapse-transition");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{ref:"node$",class:s.normalizeClass([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:s.withModifiers(t.handleClick,["stop"]),onContextmenu:t.handleContextMenu,onDragstart:s.withModifiers(t.handleDragStart,["stop"]),onDragover:s.withModifiers(t.handleDragOver,["stop"]),onDragend:s.withModifiers(t.handleDragEnd,["stop"]),onDrop:s.withModifiers(t.handleDrop,["stop"])},[s.createElementVNode("div",{class:s.normalizeClass(t.ns.be("node","content")),style:s.normalizeStyle({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(s.openBlock(),s.createBlock(o,{key:0,class:s.normalizeClass([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:s.withModifiers(t.handleExpandIconClick,["stop"])},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):s.createCommentVNode("v-if",!0),t.showCheckbox?(s.openBlock(),s.createBlock(l,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:s.withModifiers(()=>{},["stop"]),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):s.createCommentVNode("v-if",!0),t.node.loading?(s.openBlock(),s.createBlock(o,{key:2,class:s.normalizeClass([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:s.withCtx(()=>[s.createVNode(u)]),_:1},8,["class"])):s.createCommentVNode("v-if",!0),s.createVNode(c,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),s.createVNode(f,null,{default:s.withCtx(()=>[!t.renderAfterExpand||t.childNodeRendered?s.withDirectives((s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.node.childNodes,p=>(s.openBlock(),s.createBlock(d,{key:t.getNodeKey(p),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:p,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded"])),[[s.vShow,t.expanded]]):s.createCommentVNode("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[s.vShow,t.node.visible]])}var Wx=Te(Ux,[["render",Gx],["__file","tree-node.vue"]]);function jx({el$:t},e){const r=Be("tree"),n=s.shallowRef([]),a=s.shallowRef([]);s.onMounted(()=>{o()}),s.onUpdated(()=>{n.value=Array.from(t.value.querySelectorAll("[role=treeitem]")),a.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"))}),s.watch(a,l=>{l.forEach(u=>{u.setAttribute("tabindex","-1")})}),jt(t,"keydown",l=>{const u=l.target;if(!u.className.includes(r.b("node")))return;const c=l.code;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const d=n.value.indexOf(u);let f;if([it.up,it.down].includes(c)){if(l.preventDefault(),c===it.up){f=d===-1?0:d!==0?d-1:n.value.length-1;const v=f;for(;!e.value.getNode(n.value[f].dataset.key).canFocus;){if(f--,f===v){f=-1;break}f<0&&(f=n.value.length-1)}}else{f=d===-1?0:d<n.value.length-1?d+1:0;const v=f;for(;!e.value.getNode(n.value[f].dataset.key).canFocus;){if(f++,f===v){f=-1;break}f>=n.value.length&&(f=0)}}f!==-1&&n.value[f].focus()}[it.left,it.right].includes(c)&&(l.preventDefault(),u.click());const p=u.querySelector('[type="checkbox"]');[it.enter,it.space].includes(c)&&p&&(l.preventDefault(),p.click())});const o=()=>{var l;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),a.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"));const u=t.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(u.length){u[0].setAttribute("tabindex","0");return}(l=n.value[0])==null||l.setAttribute("tabindex","0")}}const Yx=s.defineComponent({name:"ElTree",components:{ElTreeNode:Wx},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:Xr}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(t,e){const{t:r}=Ya(),n=Be("tree"),a=s.inject(di,null),i=s.ref(new zx({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));i.value.initialize();const o=s.ref(i.value.root),l=s.ref(null),u=s.ref(null),c=s.ref(null),{broadcastExpanded:d}=Tf(t),{dragState:f}=qx({props:t,ctx:e,el$:u,dropIndicator$:c,store:i});jx({el$:u},i);const p=s.computed(()=>{const{childNodes:L}=o.value,R=a?a.hasFilteredOptions!==0:!1;return(!L||L.length===0||L.every(({visible:H})=>!H))&&!R});s.watch(()=>t.currentNodeKey,L=>{i.value.setCurrentNodeKey(L)}),s.watch(()=>t.defaultCheckedKeys,L=>{i.value.setDefaultCheckedKey(L)}),s.watch(()=>t.defaultExpandedKeys,L=>{i.value.setDefaultExpandedKeys(L)}),s.watch(()=>t.data,L=>{i.value.setData(L)},{deep:!0}),s.watch(()=>t.checkStrictly,L=>{i.value.checkStrictly=L});const v=L=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(L)},h=L=>Ol(t.nodeKey,L.data),g=L=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const R=i.value.getNode(L);if(!R)return[];const H=[R.data];let $=R.parent;for(;$&&$!==o.value;)H.push($.data),$=$.parent;return H.reverse()},y=(L,R)=>i.value.getCheckedNodes(L,R),m=L=>i.value.getCheckedKeys(L),b=()=>{const L=i.value.getCurrentNode();return L?L.data:null},w=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const L=b();return L?L[t.nodeKey]:null},C=(L,R)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(L,R)},x=(L,R)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(L,R)},E=(L,R,H)=>{i.value.setChecked(L,R,H)},k=()=>i.value.getHalfCheckedNodes(),B=()=>i.value.getHalfCheckedKeys(),S=(L,R=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");_l(i,e.emit,()=>{d(L),i.value.setUserCurrentNode(L,R)})},N=(L,R=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");_l(i,e.emit,()=>{d(),i.value.setCurrentNodeKey(L,R)})},D=L=>i.value.getNode(L),P=L=>{i.value.remove(L)},F=(L,R)=>{i.value.append(L,R)},O=(L,R)=>{i.value.insertBefore(L,R)},I=(L,R)=>{i.value.insertAfter(L,R)},_=(L,R,H)=>{d(R),e.emit("node-expand",L,R,H)},M=(L,R)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(L,R)};return s.provide("RootTree",{ctx:e,props:t,store:i,root:o,currentNode:l,instance:s.getCurrentInstance()}),s.provide(ni,void 0),{ns:n,store:i,root:o,currentNode:l,dragState:f,el$:u,dropIndicator$:c,isEmpty:p,filter:v,getNodeKey:h,getNodePath:g,getCheckedNodes:y,getCheckedKeys:m,getCurrentNode:b,getCurrentKey:w,setCheckedNodes:C,setCheckedKeys:x,setChecked:E,getHalfCheckedNodes:k,getHalfCheckedKeys:B,setCurrentNode:S,setCurrentKey:N,t:r,getNode:D,remove:P,append:F,insertBefore:O,insertAfter:I,handleNodeExpand:_,updateKeyChildren:M}}});function Xx(t,e,r,n,a,i){const o=s.resolveComponent("el-tree-node");return s.openBlock(),s.createElementBlock("div",{ref:"el$",class:s.normalizeClass([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.root.childNodes,l=>(s.openBlock(),s.createBlock(o,{key:t.getNodeKey(l),node:l,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(t.ns.e("empty-block"))},[s.renderSlot(t.$slots,"empty",{},()=>{var l;return[s.createElementVNode("span",{class:s.normalizeClass(t.ns.e("empty-text"))},s.toDisplayString((l=t.emptyText)!=null?l:t.t("el.tree.emptyText")),3)]})],2)):s.createCommentVNode("v-if",!0),s.withDirectives(s.createElementVNode("div",{ref:"dropIndicator$",class:s.normalizeClass(t.ns.e("drop-indicator"))},null,2),[[s.vShow,t.dragState.showDropIndicator]])],2)}var Zx=Te(Yx,[["render",Xx],["__file","tree.vue"]]);const Qx=dt(Zx);function Jx(t){let e;const r=s.ref(!1),n=s.reactive({...t,originalPosition:"",originalOverflow:"",visible:!1});function a(p){n.text=p}function i(){const p=n.parent,v=f.ns;if(!p.vLoadingAddClassList){let h=p.getAttribute("loading-number");h=Number.parseInt(h)-1,h?p.setAttribute("loading-number",h.toString()):(Sn(p,v.bm("parent","relative")),p.removeAttribute("loading-number")),Sn(p,v.bm("parent","hidden"))}o(),d.unmount()}function o(){var p,v;(v=(p=f.$el)==null?void 0:p.parentNode)==null||v.removeChild(f.$el)}function l(){var p;t.beforeClose&&!t.beforeClose()||(r.value=!0,clearTimeout(e),e=setTimeout(u,400),n.visible=!1,(p=t.closed)==null||p.call(t))}function u(){if(!r.value)return;const p=n.parent;r.value=!1,p.vLoadingAddClassList=void 0,i()}const c=s.defineComponent({name:"ElLoading",setup(p,{expose:v}){const{ns:h,zIndex:g}=Uw("loading");return v({ns:h,zIndex:g}),()=>{const y=n.spinner||n.svg,m=s.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[s.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),b=n.text?s.h("p",{class:h.b("text")},[n.text]):void 0;return s.h(s.Transition,{name:h.b("fade"),onAfterLeave:u},{default:s.withCtx(()=>[s.withDirectives(s.createVNode("div",{style:{backgroundColor:n.background||""},class:[h.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[s.h("div",{class:h.b("spinner")},[m,b])]),[[s.vShow,n.visible]])])})}}}),d=s.createApp(c),f=d.mount(document.createElement("div"));return{...s.toRefs(n),setText:a,removeElLoadingChild:o,close:l,handleAfterLeave:u,vm:f,get $el(){return f.$el}}}let Bo;const eE=function(t={}){if(!et)return;const e=tE(t);if(e.fullscreen&&Bo)return Bo;const r=Jx({...e,closed:()=>{var a;(a=e.closed)==null||a.call(e),e.fullscreen&&(Bo=void 0)}});rE(e,e.parent,r),Nf(e,e.parent,r),e.parent.vLoadingAddClassList=()=>Nf(e,e.parent,r);let n=e.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",e.parent.setAttribute("loading-number",n),e.parent.appendChild(r.$el),s.nextTick(()=>r.visible.value=e.visible),e.fullscreen&&(Bo=r),r},tE=t=>{var e,r,n,a;let i;return St(t.target)?i=(e=document.querySelector(t.target))!=null?e:document.body:i=t.target||document.body,{parent:i===document.body||t.body?document.body:i,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:i===document.body&&((r=t.fullscreen)!=null?r:!0),lock:(n=t.lock)!=null?n:!1,customClass:t.customClass||"",visible:(a=t.visible)!=null?a:!0,beforeClose:t.beforeClose,closed:t.closed,target:i}},rE=async(t,e,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,a={};if(t.fullscreen)r.originalPosition.value=ja(document.body,"position"),r.originalOverflow.value=ja(document.body,"overflow"),a.zIndex=n();else if(t.parent===document.body){r.originalPosition.value=ja(document.body,"position"),await s.nextTick();for(const i of["top","left"]){const o=i==="top"?"scrollTop":"scrollLeft";a[i]=`${t.target.getBoundingClientRect()[i]+document.body[o]+document.documentElement[o]-Number.parseInt(ja(document.body,`margin-${i}`),10)}px`}for(const i of["height","width"])a[i]=`${t.target.getBoundingClientRect()[i]}px`}else r.originalPosition.value=ja(e,"position");for(const[i,o]of Object.entries(a))r.$el.style[i]=o},Nf=(t,e,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?Sn(e,n.bm("parent","relative")):Us(e,n.bm("parent","relative")),t.fullscreen&&t.lock?Us(e,n.bm("parent","hidden")):Sn(e,n.bm("parent","hidden"))},No=Symbol("ElLoading"),Df=(t,e)=>{var r,n,a,i;const o=e.instance,l=p=>vt(e.value)?e.value[p]:void 0,u=p=>{const v=St(p)&&(o==null?void 0:o[p])||p;return v&&s.ref(v)},c=p=>u(l(p)||t.getAttribute(`element-loading-${Rg(p)}`)),d=(r=l("fullscreen"))!=null?r:e.modifiers.fullscreen,f={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:d,target:(n=l("target"))!=null?n:d?void 0:t,body:(a=l("body"))!=null?a:e.modifiers.body,lock:(i=l("lock"))!=null?i:e.modifiers.lock};t[No]={options:f,instance:eE(f)}},nE=(t,e)=>{for(const r of Object.keys(e))s.isRef(e[r])&&(e[r].value=t[r])},Pf={mounted(t,e){e.value&&Df(t,e)},updated(t,e){const r=t[No];e.oldValue!==e.value&&(e.value&&!e.oldValue?Df(t,e):e.value&&e.oldValue?vt(e.value)&&nE(e.value,r.options):r==null||r.instance.close())},unmounted(t){var e;(e=t[No])==null||e.instance.close(),t[No]=null}},yr=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r},aE=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""},iE={name:"ConnectionDialog",props:{connectionEntry:{type:Object,default:{}},inDrawing:{type:Boolean,default:!1},connectionExist:{type:Boolean,default:!1}},data:function(){return{tooltipId:void 0}},methods:{shadowDisplay:function(t){return this.tooltipId===t?"always":"hover"},capitalise:function(t){return aE(t)},handleTooltip:function(t){this.tooltipId=this.tooltipId===t?void 0:t,this.$emit("featureTooltip",this.tooltipId)}}},Ll=t=>(s.pushScopeId("data-v-8168ee98"),t=t(),s.popScopeId(),t),oE={class:"dialog-container"},sE=Ll(()=>s.createElementVNode("span",{class:"dialog-title"},"Finalise drawing",-1)),lE=Ll(()=>s.createElementVNode("span",{class:"dialog-title"},"Visualise connection",-1)),cE=Ll(()=>s.createElementVNode("b",null,[s.createElementVNode("span",null,"Related Features")],-1));function uE(t,e,r,n,a,i){const o=Ar,l=HC,u=El,c=Sl,d=WC;return s.openBlock(),s.createElementBlock("div",oE,[s.createVNode(u,null,{default:s.withCtx(()=>[s.createVNode(c,null,{default:s.withCtx(()=>[r.inDrawing?(s.openBlock(),s.createBlock(u,{key:0},{default:s.withCtx(()=>[sE,s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(o,{type:"primary",plain:"",onClick:e[0]||(e[0]=f=>t.$emit("confirmDrawn",!0))},{default:s.withCtx(()=>[s.createTextVNode(" Confirm ")]),_:1}),s.createVNode(o,{type:"primary",plain:"",onClick:e[1]||(e[1]=f=>t.$emit("cancelDrawn",!0))},{default:s.withCtx(()=>[s.createTextVNode(" Cancel ")]),_:1})]),_:1})]),_:1})):(s.openBlock(),s.createBlock(u,{key:1},{default:s.withCtx(()=>[lE,s.createVNode(o,{type:"primary",plain:"",onClick:e[2]||(e[2]=f=>t.$emit("dialogDisplay",!1))},{default:s.withCtx(()=>[s.createTextVNode(" Close ")]),_:1})]),_:1}))]),_:1})]),_:1}),r.connectionExist?(s.openBlock(),s.createBlock(u,{key:0},{default:s.withCtx(()=>[s.createVNode(c,null,{default:s.withCtx(()=>[cE,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.connectionEntry,(f,p)=>(s.openBlock(),s.createBlock(u,{key:p},{default:s.withCtx(()=>[s.createVNode(d,{shadow:i.shadowDisplay(p),onClick:v=>i.handleTooltip(p)},{default:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(i.capitalise(f.label)),1)]),_:2},1032,["shadow","onClick"])]),_:2},1024))),128))]),_:1})]),_:1})):s.createCommentVNode("",!0)])}const dE=yr(iE,[["render",uE],["__scopeId","data-v-8168ee98"]]),Of=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r},fE=["xlink:href"],hE={__name:"SvgIcon",props:{icon:{type:String,required:!0},spin:{type:Boolean,default:!1}},setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{class:s.normalizeClass(["map-icon",{"map-icon-spin":t.spin}])},[s.createElementVNode("use",{"xlink:href":`#${t.icon}`},null,8,fE)],2))}},pE=Of(hE,[["__scopeId","data-v-e172d5ff"]]),_f=`<?xml version="1.0" encoding="UTF-8"?>
20
+ `,Jw=["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 e2(t){const e=window.getComputedStyle(t),r=e.getPropertyValue("box-sizing"),n=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),a=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:Jw.map(o=>`${o}:${e.getPropertyValue(o)}`).join(";"),paddingSize:n,borderSize:a,boxSizing:r}}function Ld(t,e=1,r){var n;ir||(ir=document.createElement("textarea"),document.body.appendChild(ir));const{paddingSize:a,borderSize:i,boxSizing:o,contextStyle:l}=e2(t);ir.setAttribute("style",`${l};${Qw}`),ir.value=t.value||t.placeholder||"";let u=ir.scrollHeight;const c={};o==="border-box"?u=u+i:o==="content-box"&&(u=u-a),ir.value="";const d=ir.scrollHeight-a;if(gt(e)){let f=d*e;o==="border-box"&&(f=f+a+i),u=Math.max(f,u),c.minHeight=`${f}px`}if(gt(r)){let f=d*r;o==="border-box"&&(f=f+a+i),u=Math.min(f,u)}return c.height=`${u}px`,(n=ir.parentNode)==null||n.removeChild(ir),ir=void 0,c}const t2=Ie({id:{type:String,default:void 0},size:sa,disabled:Boolean,modelValue:{type:ke([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:ke([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:Xr},prefixIcon:{type:Xr},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:ke([Object,Array,String]),default:()=>ea({})},autofocus:Boolean,rows:{type:Number,default:2},...Qr(["ariaLabel"])}),r2={[mt]:t=>St(t),input:t=>St(t),change:t=>St(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},n2=s.defineComponent({name:"ElInput",inheritAttrs:!1}),a2=s.defineComponent({...n2,props:t2,emits:r2,setup(t,{expose:e,emit:r}){const n=t,a=s.useAttrs(),i=s.useSlots(),o=s.computed(()=>{const T={};return n.containerRole==="combobox"&&(T["aria-haspopup"]=a["aria-haspopup"],T["aria-owns"]=a["aria-owns"],T["aria-expanded"]=a["aria-expanded"]),T}),l=s.computed(()=>[n.type==="textarea"?y.b():g.b(),g.m(v.value),g.is("disabled",h.value),g.is("exceed",j.value),{[g.b("group")]:i.prepend||i.append,[g.m("prefix")]:i.prefix||n.prefixIcon,[g.m("suffix")]:i.suffix||n.suffixIcon||n.clearable||n.showPassword,[g.bm("suffix","password-clear")]:V.value&&H.value,[g.b("hidden")]:n.type==="hidden"},a.class]),u=s.computed(()=>[g.e("wrapper"),g.is("focus",S.value)]),c=gb({excludeKeys:s.computed(()=>Object.keys(o.value))}),{form:d,formItem:f}=Dn(),{inputId:p}=ii(n,{formItemContext:f}),v=Nn(),h=ai(),g=Be("input"),y=Be("textarea"),m=s.shallowRef(),b=s.shallowRef(),w=s.ref(!1),C=s.ref(!1),x=s.ref(),E=s.shallowRef(n.inputStyle),k=s.computed(()=>m.value||b.value),{wrapperRef:B,isFocused:S,handleFocus:N,handleBlur:D}=ol(k,{beforeFocus(){return h.value},afterBlur(){var T;n.validateEvent&&((T=f==null?void 0:f.validate)==null||T.call(f,"blur").catch(R=>tt(R)))}}),P=s.computed(()=>{var T;return(T=d==null?void 0:d.statusIcon)!=null?T:!1}),L=s.computed(()=>(f==null?void 0:f.validateState)||""),O=s.computed(()=>L.value&&Gu[L.value]),I=s.computed(()=>C.value?lb:J1),_=s.computed(()=>[a.style]),M=s.computed(()=>[n.inputStyle,E.value,{resize:n.resize}]),F=s.computed(()=>jr(n.modelValue)?"":String(n.modelValue)),V=s.computed(()=>n.clearable&&!h.value&&!n.readonly&&!!F.value&&(S.value||w.value)),H=s.computed(()=>n.showPassword&&!h.value&&!n.readonly&&!!F.value&&(!!F.value||S.value)),$=s.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!h.value&&!n.readonly&&!n.showPassword),z=s.computed(()=>F.value.length),j=s.computed(()=>!!$.value&&z.value>Number(n.maxlength)),ee=s.computed(()=>!!i.suffix||!!n.suffixIcon||V.value||n.showPassword||$.value||!!L.value&&P.value),[J,Z]=Aw(m);Dr(b,T=>{if(A(),!$.value||n.resize!=="both")return;const R=T[0],{width:Q}=R.contentRect;x.value={right:`calc(100% - ${Q+15+6}px)`}});const re=()=>{const{type:T,autosize:R}=n;if(!(!et||T!=="textarea"||!b.value))if(R){const Q=vt(R)?R.minRows:void 0,G=vt(R)?R.maxRows:void 0,U=Ld(b.value,Q,G);E.value={overflowY:"hidden",...U},s.nextTick(()=>{b.value.offsetHeight,E.value=U})}else E.value={minHeight:Ld(b.value).minHeight}},A=(T=>{let R=!1;return()=>{var Q;if(R||!n.autosize)return;((Q=b.value)==null?void 0:Q.offsetParent)===null||(T(),R=!0)}})(re),K=()=>{const T=k.value,R=n.formatter?n.formatter(F.value):F.value;!T||T.value===R||(T.value=R)},W=async T=>{J();let{value:R}=T.target;if(n.formatter&&(R=n.parser?n.parser(R):R),!he.value){if(R===F.value){K();return}r(mt,R),r("input",R),await s.nextTick(),K(),Z()}},oe=T=>{r("change",T.target.value)},{isComposing:he,handleCompositionStart:ne,handleCompositionUpdate:se,handleCompositionEnd:ue}=Pd({emit:r,afterComposition:W}),pe=()=>{C.value=!C.value,de()},de=async()=>{var T;await s.nextTick(),(T=k.value)==null||T.focus()},me=()=>{var T;return(T=k.value)==null?void 0:T.blur()},Ne=T=>{w.value=!1,r("mouseleave",T)},De=T=>{w.value=!0,r("mouseenter",T)},Ee=T=>{r("keydown",T)},Pe=()=>{var T;(T=k.value)==null||T.select()},te=()=>{r(mt,""),r("change",""),r("clear"),r("input","")};return s.watch(()=>n.modelValue,()=>{var T;s.nextTick(()=>re()),n.validateEvent&&((T=f==null?void 0:f.validate)==null||T.call(f,"change").catch(R=>tt(R)))}),s.watch(F,()=>K()),s.watch(()=>n.type,async()=>{await s.nextTick(),K(),re()}),s.onMounted(()=>{!n.formatter&&n.parser&&tt("ElInput","If you set the parser, you also need to set the formatter."),K(),s.nextTick(re)}),e({input:m,textarea:b,ref:k,textareaStyle:M,autosize:s.toRef(n,"autosize"),isComposing:he,focus:de,blur:me,select:Pe,clear:te,resizeTextarea:re}),(T,R)=>(s.openBlock(),s.createElementBlock("div",s.mergeProps(s.unref(o),{class:[s.unref(l),{[s.unref(g).bm("group","append")]:T.$slots.append,[s.unref(g).bm("group","prepend")]:T.$slots.prepend}],style:s.unref(_),role:T.containerRole,onMouseenter:De,onMouseleave:Ne}),[s.createCommentVNode(" input "),T.type!=="textarea"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createCommentVNode(" prepend slot "),T.$slots.prepend?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(s.unref(g).be("group","prepend"))},[s.renderSlot(T.$slots,"prepend")],2)):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{ref_key:"wrapperRef",ref:B,class:s.normalizeClass(s.unref(u))},[s.createCommentVNode(" prefix slot "),T.$slots.prefix||T.prefixIcon?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(s.unref(g).e("prefix"))},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(g).e("prefix-inner"))},[s.renderSlot(T.$slots,"prefix"),T.prefixIcon?(s.openBlock(),s.createBlock(s.unref(yt),{key:0,class:s.normalizeClass(s.unref(g).e("icon"))},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(T.prefixIcon)))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0)],2)],2)):s.createCommentVNode("v-if",!0),s.createElementVNode("input",s.mergeProps({id:s.unref(p),ref_key:"input",ref:m,class:s.unref(g).e("inner")},s.unref(c),{minlength:T.minlength,maxlength:T.maxlength,type:T.showPassword?C.value?"text":"password":T.type,disabled:s.unref(h),readonly:T.readonly,autocomplete:T.autocomplete,tabindex:T.tabindex,"aria-label":T.ariaLabel,placeholder:T.placeholder,style:T.inputStyle,form:T.form,autofocus:T.autofocus,onCompositionstart:s.unref(ne),onCompositionupdate:s.unref(se),onCompositionend:s.unref(ue),onInput:W,onChange:oe,onKeydown:Ee}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","onCompositionstart","onCompositionupdate","onCompositionend"]),s.createCommentVNode(" suffix slot "),s.unref(ee)?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(s.unref(g).e("suffix"))},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(g).e("suffix-inner"))},[!s.unref(V)||!s.unref(H)||!s.unref($)?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.renderSlot(T.$slots,"suffix"),T.suffixIcon?(s.openBlock(),s.createBlock(s.unref(yt),{key:0,class:s.normalizeClass(s.unref(g).e("icon"))},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(T.suffixIcon)))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0)],64)):s.createCommentVNode("v-if",!0),s.unref(V)?(s.openBlock(),s.createBlock(s.unref(yt),{key:1,class:s.normalizeClass([s.unref(g).e("icon"),s.unref(g).e("clear")]),onMousedown:s.withModifiers(s.unref(Ha),["prevent"]),onClick:te},{default:s.withCtx(()=>[s.createVNode(s.unref(Gs))]),_:1},8,["class","onMousedown"])):s.createCommentVNode("v-if",!0),s.unref(H)?(s.openBlock(),s.createBlock(s.unref(yt),{key:2,class:s.normalizeClass([s.unref(g).e("icon"),s.unref(g).e("password")]),onClick:pe},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(I))))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0),s.unref($)?(s.openBlock(),s.createElementBlock("span",{key:3,class:s.normalizeClass(s.unref(g).e("count"))},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(g).e("count-inner"))},s.toDisplayString(s.unref(z))+" / "+s.toDisplayString(T.maxlength),3)],2)):s.createCommentVNode("v-if",!0),s.unref(L)&&s.unref(O)&&s.unref(P)?(s.openBlock(),s.createBlock(s.unref(yt),{key:4,class:s.normalizeClass([s.unref(g).e("icon"),s.unref(g).e("validateIcon"),s.unref(g).is("loading",s.unref(L)==="validating")])},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(O))))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0)],2)],2)):s.createCommentVNode("v-if",!0)],2),s.createCommentVNode(" append slot "),T.$slots.append?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(s.unref(g).be("group","append"))},[s.renderSlot(T.$slots,"append")],2)):s.createCommentVNode("v-if",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createCommentVNode(" textarea "),s.createElementVNode("textarea",s.mergeProps({id:s.unref(p),ref_key:"textarea",ref:b,class:[s.unref(y).e("inner"),s.unref(g).is("focus",s.unref(S))]},s.unref(c),{minlength:T.minlength,maxlength:T.maxlength,tabindex:T.tabindex,disabled:s.unref(h),readonly:T.readonly,autocomplete:T.autocomplete,style:s.unref(M),"aria-label":T.ariaLabel,placeholder:T.placeholder,form:T.form,autofocus:T.autofocus,rows:T.rows,onCompositionstart:s.unref(ne),onCompositionupdate:s.unref(se),onCompositionend:s.unref(ue),onInput:W,onFocus:s.unref(N),onBlur:s.unref(D),onChange:oe,onKeydown:Ee}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),s.unref($)?(s.openBlock(),s.createElementBlock("span",{key:0,style:s.normalizeStyle(x.value),class:s.normalizeClass(s.unref(g).e("count"))},s.toDisplayString(s.unref(z))+" / "+s.toDisplayString(T.maxlength),7)):s.createCommentVNode("v-if",!0)],64))],16,["role"]))}});var i2=Te(a2,[["__file","input.vue"]]);const Fd=dt(i2),la=4,o2={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},s2=({move:t,size:e,bar:r})=>({[r.size]:e,transform:`translate${r.axis}(${t}%)`}),cl=Symbol("scrollbarContextKey"),l2=Ie({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),c2="Thumb";var Md=Te(s.defineComponent({__name:"thumb",props:l2,setup(t){const e=t,r=s.inject(cl),n=Be("scrollbar");r||O1(c2,"can not inject scrollbar context");const a=s.ref(),i=s.ref(),o=s.ref({}),l=s.ref(!1);let u=!1,c=!1,d=et?document.onselectstart:null;const f=s.computed(()=>o2[e.vertical?"vertical":"horizontal"]),p=s.computed(()=>s2({size:e.size,move:e.move,bar:f.value})),v=s.computed(()=>a.value[f.value.offset]**2/r.wrapElement[f.value.scrollSize]/e.ratio/i.value[f.value.offset]),h=E=>{var k;if(E.stopPropagation(),E.ctrlKey||[1,2].includes(E.button))return;(k=window.getSelection())==null||k.removeAllRanges(),y(E);const B=E.currentTarget;B&&(o.value[f.value.axis]=B[f.value.offset]-(E[f.value.client]-B.getBoundingClientRect()[f.value.direction]))},g=E=>{if(!i.value||!a.value||!r.wrapElement)return;const k=Math.abs(E.target.getBoundingClientRect()[f.value.direction]-E[f.value.client]),B=i.value[f.value.offset]/2,S=(k-B)*100*v.value/a.value[f.value.offset];r.wrapElement[f.value.scroll]=S*r.wrapElement[f.value.scrollSize]/100},y=E=>{E.stopImmediatePropagation(),u=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",b),d=document.onselectstart,document.onselectstart=()=>!1},m=E=>{if(!a.value||!i.value||u===!1)return;const k=o.value[f.value.axis];if(!k)return;const B=(a.value.getBoundingClientRect()[f.value.direction]-E[f.value.client])*-1,S=i.value[f.value.offset]-k,N=(B-S)*100*v.value/a.value[f.value.offset];r.wrapElement[f.value.scroll]=N*r.wrapElement[f.value.scrollSize]/100},b=()=>{u=!1,o.value[f.value.axis]=0,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",b),x(),c&&(l.value=!1)},w=()=>{c=!1,l.value=!!e.size},C=()=>{c=!0,l.value=u};s.onBeforeUnmount(()=>{x(),document.removeEventListener("mouseup",b)});const x=()=>{document.onselectstart!==d&&(document.onselectstart=d)};return jt(s.toRef(r,"scrollbarElement"),"mousemove",w),jt(s.toRef(r,"scrollbarElement"),"mouseleave",C),(E,k)=>(s.openBlock(),s.createBlock(s.Transition,{name:s.unref(n).b("fade"),persisted:""},{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",{ref_key:"instance",ref:a,class:s.normalizeClass([s.unref(n).e("bar"),s.unref(n).is(s.unref(f).key)]),onMousedown:g},[s.createElementVNode("div",{ref_key:"thumb",ref:i,class:s.normalizeClass(s.unref(n).e("thumb")),style:s.normalizeStyle(s.unref(p)),onMousedown:h},null,38)],34),[[s.vShow,E.always||l.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const u2=Ie({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var d2=Te(s.defineComponent({__name:"bar",props:u2,setup(t,{expose:e}){const r=t,n=s.inject(cl),a=s.ref(0),i=s.ref(0),o=s.ref(""),l=s.ref(""),u=s.ref(1),c=s.ref(1);return e({handleScroll:p=>{if(p){const v=p.offsetHeight-la,h=p.offsetWidth-la;i.value=p.scrollTop*100/v*u.value,a.value=p.scrollLeft*100/h*c.value}},update:()=>{const p=n==null?void 0:n.wrapElement;if(!p)return;const v=p.offsetHeight-la,h=p.offsetWidth-la,g=v**2/p.scrollHeight,y=h**2/p.scrollWidth,m=Math.max(g,r.minSize),b=Math.max(y,r.minSize);u.value=g/(v-g)/(m/(v-m)),c.value=y/(h-y)/(b/(h-b)),l.value=m+la<v?`${m}px`:"",o.value=b+la<h?`${b}px`:""}}),(p,v)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(Md,{move:a.value,ratio:c.value,size:o.value,always:p.always},null,8,["move","ratio","size","always"]),s.createVNode(Md,{move:i.value,ratio:u.value,size:l.value,vertical:"",always:p.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const f2=Ie({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:ke([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Qr(["ariaLabel","ariaOrientation"])}),h2={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(gt)},ul="ElScrollbar",p2=s.defineComponent({name:ul}),v2=s.defineComponent({...p2,props:f2,emits:h2,setup(t,{expose:e,emit:r}){const n=t,a=Be("scrollbar");let i,o,l=0,u=0;const c=s.ref(),d=s.ref(),f=s.ref(),p=s.ref(),v=s.computed(()=>{const x={};return n.height&&(x.height=Jn(n.height)),n.maxHeight&&(x.maxHeight=Jn(n.maxHeight)),[n.wrapStyle,x]}),h=s.computed(()=>[n.wrapClass,a.e("wrap"),{[a.em("wrap","hidden-default")]:!n.native}]),g=s.computed(()=>[a.e("view"),n.viewClass]),y=()=>{var x;d.value&&((x=p.value)==null||x.handleScroll(d.value),l=d.value.scrollTop,u=d.value.scrollLeft,r("scroll",{scrollTop:d.value.scrollTop,scrollLeft:d.value.scrollLeft}))};function m(x,E){vt(x)?d.value.scrollTo(x):gt(x)&&gt(E)&&d.value.scrollTo(x,E)}const b=x=>{if(!gt(x)){tt(ul,"value must be a number");return}d.value.scrollTop=x},w=x=>{if(!gt(x)){tt(ul,"value must be a number");return}d.value.scrollLeft=x},C=()=>{var x;(x=p.value)==null||x.update()};return s.watch(()=>n.noresize,x=>{x?(i==null||i(),o==null||o()):({stop:i}=Dr(f,C),o=jt("resize",C))},{immediate:!0}),s.watch(()=>[n.maxHeight,n.height],()=>{n.native||s.nextTick(()=>{var x;C(),d.value&&((x=p.value)==null||x.handleScroll(d.value))})}),s.provide(cl,s.reactive({scrollbarElement:c,wrapElement:d})),s.onActivated(()=>{d.value&&(d.value.scrollTop=l,d.value.scrollLeft=u)}),s.onMounted(()=>{n.native||s.nextTick(()=>{C()})}),s.onUpdated(()=>C()),e({wrapRef:d,update:C,scrollTo:m,setScrollTop:b,setScrollLeft:w,handleScroll:y}),(x,E)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"scrollbarRef",ref:c,class:s.normalizeClass(s.unref(a).b())},[s.createElementVNode("div",{ref_key:"wrapRef",ref:d,class:s.normalizeClass(s.unref(h)),style:s.normalizeStyle(s.unref(v)),tabindex:x.tabindex,onScroll:y},[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(x.tag),{id:x.id,ref_key:"resizeRef",ref:f,class:s.normalizeClass(s.unref(g)),style:s.normalizeStyle(x.viewStyle),role:x.role,"aria-label":x.ariaLabel,"aria-orientation":x.ariaOrientation},{default:s.withCtx(()=>[s.renderSlot(x.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),x.native?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createBlock(d2,{key:0,ref_key:"barRef",ref:p,always:x.always,"min-size":x.minSize},null,8,["always","min-size"]))],2))}});var g2=Te(v2,[["__file","scrollbar.vue"]]);const m2=dt(g2),dl=Symbol("popper"),Id=Symbol("popperContent"),Ad=Ie({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),y2=s.defineComponent({name:"ElPopper",inheritAttrs:!1}),b2=s.defineComponent({...y2,props:Ad,setup(t,{expose:e}){const r=t,n=s.ref(),a=s.ref(),i=s.ref(),o=s.ref(),l=s.computed(()=>r.role),u={triggerRef:n,popperInstanceRef:a,contentRef:i,referenceRef:o,role:l};return e(u),s.provide(dl,u),(c,d)=>s.renderSlot(c.$slots,"default")}});var w2=Te(b2,[["__file","popper.vue"]]);const Vd=Ie({arrowOffset:{type:Number,default:5}}),C2=s.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),k2=s.defineComponent({...C2,props:Vd,setup(t,{expose:e}){const r=t,n=Be("popper"),{arrowOffset:a,arrowRef:i,arrowStyle:o}=s.inject(Id,void 0);return s.watch(()=>r.arrowOffset,l=>{a.value=l}),s.onBeforeUnmount(()=>{i.value=void 0}),e({arrowRef:i}),(l,u)=>(s.openBlock(),s.createElementBlock("span",{ref_key:"arrowRef",ref:i,class:s.normalizeClass(s.unref(n).e("arrow")),style:s.normalizeStyle(s.unref(o)),"data-popper-arrow":""},null,6))}});var x2=Te(k2,[["__file","arrow.vue"]]);const fl="ElOnlyChild",E2=s.defineComponent({name:fl,setup(t,{slots:e,attrs:r}){var n;const a=s.inject(kd),i=Iw((n=a==null?void 0:a.setForwardRef)!=null?n:Ha);return()=>{var o;const l=(o=e.default)==null?void 0:o.call(e,r);if(!l)return null;if(l.length>1)return tt(fl,"requires exact only one valid child."),null;const u=Rd(l);return u?s.withDirectives(s.cloneVNode(u,r),[[i]]):(tt(fl,"no valid child node found"),null)}}});function Rd(t){if(!t)return null;const e=t;for(const r of e){if(vt(r))switch(r.type){case s.Comment:continue;case s.Text:case"svg":return $d(r);case s.Fragment:return Rd(r.children);default:return r}return $d(r)}return null}function $d(t){const e=Be("only-child");return s.createVNode("span",{class:e.e("content")},[t])}const zd=Ie({virtualRef:{type:ke(Object)},virtualTriggering:Boolean,onMouseenter:{type:ke(Function)},onMouseleave:{type:ke(Function)},onClick:{type:ke(Function)},onKeydown:{type:ke(Function)},onFocus:{type:ke(Function)},onBlur:{type:ke(Function)},onContextmenu:{type:ke(Function)},id:String,open:Boolean}),S2=s.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),T2=s.defineComponent({...S2,props:zd,setup(t,{expose:e}){const r=t,{role:n,triggerRef:a}=s.inject(dl,void 0);Mw(a);const i=s.computed(()=>l.value?r.id:void 0),o=s.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),l=s.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),u=s.computed(()=>l.value?`${r.open}`:void 0);let c;const d=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return s.onMounted(()=>{s.watch(()=>r.virtualRef,f=>{f&&(a.value=Nr(f))},{immediate:!0}),s.watch(a,(f,p)=>{c==null||c(),c=void 0,En(f)&&(d.forEach(v=>{var h;const g=r[v];g&&(f.addEventListener(v.slice(2).toLowerCase(),g),(h=p==null?void 0:p.removeEventListener)==null||h.call(p,v.slice(2).toLowerCase(),g))}),c=s.watch([i,o,l,u],v=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,g)=>{jr(v[g])?f.removeAttribute(h):f.setAttribute(h,v[g])})},{immediate:!0})),En(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(v=>p.removeAttribute(v))},{immediate:!0})}),s.onBeforeUnmount(()=>{if(c==null||c(),c=void 0,a.value&&En(a.value)){const f=a.value;d.forEach(p=>{const v=r[p];v&&f.removeEventListener(p.slice(2).toLowerCase(),v)}),a.value=void 0}}),e({triggerRef:a}),(f,p)=>f.virtualTriggering?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createBlock(s.unref(E2),s.mergeProps({key:0},f.$attrs,{"aria-controls":s.unref(i),"aria-describedby":s.unref(o),"aria-expanded":s.unref(u),"aria-haspopup":s.unref(l)}),{default:s.withCtx(()=>[s.renderSlot(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var B2=Te(T2,[["__file","trigger.vue"]]);const hl="focus-trap.focus-after-trapped",pl="focus-trap.focus-after-released",N2="focus-trap.focusout-prevented",Hd={cancelable:!0,bubbles:!1},D2={cancelable:!0,bubbles:!1},Kd="focusAfterTrapped",qd="focusAfterReleased",P2=Symbol("elFocusTrap"),vl=s.ref(),bo=s.ref(0),gl=s.ref(0);let wo=0;const Ud=t=>{const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e},Gd=(t,e)=>{for(const r of t)if(!O2(r,e))return r},O2=(t,e)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},_2=t=>{const e=Ud(t),r=Gd(e,t),n=Gd(e.reverse(),t);return[r,n]},L2=t=>t instanceof HTMLInputElement&&"select"in t,Jr=(t,e)=>{if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),gl.value=window.performance.now(),t!==r&&L2(t)&&e&&t.select()}};function Wd(t,e){const r=[...t],n=t.indexOf(e);return n!==-1&&r.splice(n,1),r}const F2=()=>{let t=[];return{push:n=>{const a=t[0];a&&n!==a&&a.pause(),t=Wd(t,n),t.unshift(n)},remove:n=>{var a,i;t=Wd(t,n),(i=(a=t[0])==null?void 0:a.resume)==null||i.call(a)}}},M2=(t,e=!1)=>{const r=document.activeElement;for(const n of t)if(Jr(n,e),document.activeElement!==r)return},jd=F2(),I2=()=>bo.value>gl.value,Co=()=>{vl.value="pointer",bo.value=window.performance.now()},Yd=()=>{vl.value="keyboard",bo.value=window.performance.now()},A2=()=>(s.onMounted(()=>{wo===0&&(document.addEventListener("mousedown",Co),document.addEventListener("touchstart",Co),document.addEventListener("keydown",Yd)),wo++}),s.onBeforeUnmount(()=>{wo--,wo<=0&&(document.removeEventListener("mousedown",Co),document.removeEventListener("touchstart",Co),document.removeEventListener("keydown",Yd))}),{focusReason:vl,lastUserFocusTimestamp:bo,lastAutomatedFocusTimestamp:gl}),ko=t=>new CustomEvent(N2,{...D2,detail:t}),V2=s.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Kd,qd,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const r=s.ref();let n,a;const{focusReason:i}=A2();Pw(h=>{t.trapped&&!o.paused&&e("release-requested",h)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=h=>{if(!t.loop&&!t.trapped||o.paused)return;const{key:g,altKey:y,ctrlKey:m,metaKey:b,currentTarget:w,shiftKey:C}=h,{loop:x}=t,E=g===it.tab&&!y&&!m&&!b,k=document.activeElement;if(E&&k){const B=w,[S,N]=_2(B);if(S&&N){if(!C&&k===N){const P=ko({focusReason:i.value});e("focusout-prevented",P),P.defaultPrevented||(h.preventDefault(),x&&Jr(S,!0))}else if(C&&[S,B].includes(k)){const P=ko({focusReason:i.value});e("focusout-prevented",P),P.defaultPrevented||(h.preventDefault(),x&&Jr(N,!0))}}else if(k===B){const P=ko({focusReason:i.value});e("focusout-prevented",P),P.defaultPrevented||h.preventDefault()}}};s.provide(P2,{focusTrapRef:r,onKeydown:l}),s.watch(()=>t.focusTrapEl,h=>{h&&(r.value=h)},{immediate:!0}),s.watch([r],([h],[g])=>{h&&(h.addEventListener("keydown",l),h.addEventListener("focusin",d),h.addEventListener("focusout",f)),g&&(g.removeEventListener("keydown",l),g.removeEventListener("focusin",d),g.removeEventListener("focusout",f))});const u=h=>{e(Kd,h)},c=h=>e(qd,h),d=h=>{const g=s.unref(r);if(!g)return;const y=h.target,m=h.relatedTarget,b=y&&g.contains(y);t.trapped||m&&g.contains(m)||(n=m),b&&e("focusin",h),!o.paused&&t.trapped&&(b?a=y:Jr(a,!0))},f=h=>{const g=s.unref(r);if(!(o.paused||!g))if(t.trapped){const y=h.relatedTarget;!jr(y)&&!g.contains(y)&&setTimeout(()=>{if(!o.paused&&t.trapped){const m=ko({focusReason:i.value});e("focusout-prevented",m),m.defaultPrevented||Jr(a,!0)}},0)}else{const y=h.target;y&&g.contains(y)||e("focusout",h)}};async function p(){await s.nextTick();const h=s.unref(r);if(h){jd.push(o);const g=h.contains(document.activeElement)?n:document.activeElement;if(n=g,!h.contains(g)){const m=new Event(hl,Hd);h.addEventListener(hl,u),h.dispatchEvent(m),m.defaultPrevented||s.nextTick(()=>{let b=t.focusStartEl;St(b)||(Jr(b),document.activeElement!==b&&(b="first")),b==="first"&&M2(Ud(h),!0),(document.activeElement===g||b==="container")&&Jr(h)})}}}function v(){const h=s.unref(r);if(h){h.removeEventListener(hl,u);const g=new CustomEvent(pl,{...Hd,detail:{focusReason:i.value}});h.addEventListener(pl,c),h.dispatchEvent(g),!g.defaultPrevented&&(i.value=="keyboard"||!I2()||h.contains(document.activeElement))&&Jr(n??document.body),h.removeEventListener(pl,c),jd.remove(o)}}return s.onMounted(()=>{t.trapped&&p(),s.watch(()=>t.trapped,h=>{h?p():v()})}),s.onBeforeUnmount(()=>{t.trapped&&v(),r.value&&(r.value.removeEventListener("keydown",l),r.value.removeEventListener("focusin",d),r.value.removeEventListener("focusout",f),r.value=void 0)}),{onKeydown:l}}});function R2(t,e,r,n,a,i){return s.renderSlot(t.$slots,"default",{handleKeydown:t.onKeydown})}var $2=Te(V2,[["render",R2],["__file","focus-trap.vue"]]);const z2=["fixed","absolute"],H2=Ie({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:ke(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:fo,default:"bottom"},popperOptions:{type:ke(Object),default:()=>({})},strategy:{type:String,values:z2,default:"absolute"}}),Xd=Ie({...H2,id:String,style:{type:ke([String,Array,Object])},className:{type:ke([String,Array,Object])},effect:{type:ke(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:ke([String,Array,Object])},popperStyle:{type:ke([String,Array,Object])},referenceEl:{type:ke(Object)},triggerTargetEl:{type:ke(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Qr(["ariaLabel"])}),K2={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},q2=(t,e=[])=>{const{placement:r,strategy:n,popperOptions:a}=t,i={placement:r,strategy:n,...a,modifiers:[...G2(t),...e]};return W2(i,a==null?void 0:a.modifiers),i},U2=t=>{if(et)return Nr(t)};function G2(t){const{offset:e,gpuAcceleration:r,fallbackPlacements:n}=t;return[{name:"offset",options:{offset:[0,e??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function W2(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const j2=0,Y2=t=>{const{popperInstanceRef:e,contentRef:r,triggerRef:n,role:a}=s.inject(dl,void 0),i=s.ref(),o=s.ref(),l=s.computed(()=>({name:"eventListeners",enabled:!!t.visible})),u=s.computed(()=>{var m;const b=s.unref(i),w=(m=s.unref(o))!=null?m:j2;return{name:"arrow",enabled:!S1(b),options:{element:b,padding:w}}}),c=s.computed(()=>({onFirstUpdate:()=>{h()},...q2(t,[s.unref(u),s.unref(l)])})),d=s.computed(()=>U2(t.referenceEl)||s.unref(n)),{attributes:f,state:p,styles:v,update:h,forceUpdate:g,instanceRef:y}=Bw(d,r,c);return s.watch(y,m=>e.value=m),s.onMounted(()=>{s.watch(()=>{var m;return(m=s.unref(d))==null?void 0:m.getBoundingClientRect()},()=>{h()})}),{attributes:f,arrowRef:i,contentRef:r,instanceRef:y,state:p,styles:v,role:a,forceUpdate:g,update:h}},X2=(t,{attributes:e,styles:r,role:n})=>{const{nextZIndex:a}=Nd(),i=Be("popper"),o=s.computed(()=>s.unref(e).popper),l=s.ref(gt(t.zIndex)?t.zIndex:a()),u=s.computed(()=>[i.b(),i.is("pure",t.pure),i.is(t.effect),t.popperClass]),c=s.computed(()=>[{zIndex:s.unref(l)},s.unref(r).popper,t.popperStyle||{}]),d=s.computed(()=>n.value==="dialog"?"false":void 0),f=s.computed(()=>s.unref(r).arrow||{});return{ariaModal:d,arrowStyle:f,contentAttrs:o,contentClass:u,contentStyle:c,contentZIndex:l,updateZIndex:()=>{l.value=gt(t.zIndex)?t.zIndex:a()}}},Z2=(t,e)=>{const r=s.ref(!1),n=s.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:c=>{var d;((d=c.detail)==null?void 0:d.focusReason)!=="pointer"&&(n.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:c=>{t.visible&&!r.value&&(c.target&&(n.value=c.target),r.value=!0)},onFocusoutPrevented:c=>{t.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,e("close")}}},Q2=s.defineComponent({name:"ElPopperContent"}),J2=s.defineComponent({...Q2,props:Xd,emits:K2,setup(t,{expose:e,emit:r}){const n=t,{focusStartRef:a,trapped:i,onFocusAfterReleased:o,onFocusAfterTrapped:l,onFocusInTrap:u,onFocusoutPrevented:c,onReleaseRequested:d}=Z2(n,r),{attributes:f,arrowRef:p,contentRef:v,styles:h,instanceRef:g,role:y,update:m}=Y2(n),{ariaModal:b,arrowStyle:w,contentAttrs:C,contentClass:x,contentStyle:E,updateZIndex:k}=X2(n,{styles:h,attributes:f,role:y}),B=s.inject(ni,void 0),S=s.ref();s.provide(Id,{arrowStyle:w,arrowRef:p,arrowOffset:S}),B&&s.provide(ni,{...B,addInputId:Ha,removeInputId:Ha});let N;const D=(L=!0)=>{m(),L&&k()},P=()=>{D(!1),n.visible&&n.focusOnShow?i.value=!0:n.visible===!1&&(i.value=!1)};return s.onMounted(()=>{s.watch(()=>n.triggerTargetEl,(L,O)=>{N==null||N(),N=void 0;const I=s.unref(L||v.value),_=s.unref(O||v.value);En(I)&&(N=s.watch([y,()=>n.ariaLabel,b,()=>n.id],M=>{["role","aria-label","aria-modal","id"].forEach((F,V)=>{jr(M[V])?I.removeAttribute(F):I.setAttribute(F,M[V])})},{immediate:!0})),_!==I&&En(_)&&["role","aria-label","aria-modal","id"].forEach(M=>{_.removeAttribute(M)})},{immediate:!0}),s.watch(()=>n.visible,P,{immediate:!0})}),s.onBeforeUnmount(()=>{N==null||N(),N=void 0}),e({popperContentRef:v,popperInstanceRef:g,updatePopper:D,contentStyle:E}),(L,O)=>(s.openBlock(),s.createElementBlock("div",s.mergeProps({ref_key:"contentRef",ref:v},s.unref(C),{style:s.unref(E),class:s.unref(x),tabindex:"-1",onMouseenter:I=>L.$emit("mouseenter",I),onMouseleave:I=>L.$emit("mouseleave",I)}),[s.createVNode(s.unref($2),{trapped:s.unref(i),"trap-on-focus-in":!0,"focus-trap-el":s.unref(v),"focus-start-el":s.unref(a),onFocusAfterTrapped:s.unref(l),onFocusAfterReleased:s.unref(o),onFocusin:s.unref(u),onFocusoutPrevented:s.unref(c),onReleaseRequested:s.unref(d)},{default:s.withCtx(()=>[s.renderSlot(L.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var eC=Te(J2,[["__file","content.vue"]]);const tC=dt(w2),ml=Symbol("elTooltip"),$t=Ie({...Lw,...Xd,appendTo:{type:ke([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:ke(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Qr(["ariaLabel"])}),oi=Ie({...zd,disabled:Boolean,trigger:{type:ke([String,Array]),default:"hover"},triggerKeys:{type:ke(Array),default:()=>[it.enter,it.space]}}),{useModelToggleProps:rC,useModelToggleEmits:nC,useModelToggle:aC}=Eb("visible"),iC=Ie({...Ad,...rC,...$t,...oi,...Vd,showArrow:{type:Boolean,default:!0}}),oC=[...nC,"before-show","before-hide","show","hide","open","close"],sC=(t,e)=>At(t)?t.includes(e):t===e,ca=(t,e,r)=>n=>{sC(s.unref(t),e)&&r(n)},lC=s.defineComponent({name:"ElTooltipTrigger"}),cC=s.defineComponent({...lC,props:oi,setup(t,{expose:e}){const r=t,n=Be("tooltip"),{controlled:a,id:i,open:o,onOpen:l,onClose:u,onToggle:c}=s.inject(ml,void 0),d=s.ref(null),f=()=>{if(s.unref(a)||r.disabled)return!0},p=s.toRef(r,"trigger"),v=It(f,ca(p,"hover",l)),h=It(f,ca(p,"hover",u)),g=It(f,ca(p,"click",C=>{C.button===0&&c(C)})),y=It(f,ca(p,"focus",l)),m=It(f,ca(p,"focus",u)),b=It(f,ca(p,"contextmenu",C=>{C.preventDefault(),c(C)})),w=It(f,C=>{const{code:x}=C;r.triggerKeys.includes(x)&&(C.preventDefault(),c(C))});return e({triggerRef:d}),(C,x)=>(s.openBlock(),s.createBlock(s.unref(B2),{id:s.unref(i),"virtual-ref":C.virtualRef,open:s.unref(o),"virtual-triggering":C.virtualTriggering,class:s.normalizeClass(s.unref(n).e("trigger")),onBlur:s.unref(m),onClick:s.unref(g),onContextmenu:s.unref(b),onFocus:s.unref(y),onMouseenter:s.unref(v),onMouseleave:s.unref(h),onKeydown:s.unref(w)},{default:s.withCtx(()=>[s.renderSlot(C.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var uC=Te(cC,[["__file","trigger.vue"]]);const dC=Ie({to:{type:ke([String,Object]),required:!0},disabled:Boolean});var fC=Te(s.defineComponent({__name:"teleport",props:dC,setup(t){return(e,r)=>e.disabled?s.renderSlot(e.$slots,"default",{key:0}):(s.openBlock(),s.createBlock(s.Teleport,{key:1,to:e.to},[s.renderSlot(e.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const hC=dt(fC),pC=s.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),vC=s.defineComponent({...pC,props:$t,setup(t,{expose:e}){const r=t,{selector:n}=Cd(),a=Be("tooltip"),i=s.ref(null);let o;const{controlled:l,id:u,open:c,trigger:d,onClose:f,onOpen:p,onShow:v,onHide:h,onBeforeShow:g,onBeforeHide:y}=s.inject(ml,void 0),m=s.computed(()=>r.transition||`${a.namespace.value}-fade-in-linear`),b=s.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);s.onBeforeUnmount(()=>{o==null||o()});const w=s.computed(()=>s.unref(b)?!0:s.unref(c)),C=s.computed(()=>r.disabled?!1:s.unref(c)),x=s.computed(()=>r.appendTo||n.value),E=s.computed(()=>{var _;return(_=r.style)!=null?_:{}}),k=s.ref(!0),B=()=>{h(),k.value=!0},S=()=>{if(s.unref(l))return!0},N=It(S,()=>{r.enterable&&s.unref(d)==="hover"&&p()}),D=It(S,()=>{s.unref(d)==="hover"&&f()}),P=()=>{var _,M;(M=(_=i.value)==null?void 0:_.updatePopper)==null||M.call(_),g==null||g()},L=()=>{y==null||y()},O=()=>{v(),o=bg(s.computed(()=>{var _;return(_=i.value)==null?void 0:_.popperContentRef}),()=>{if(s.unref(l))return;s.unref(d)!=="hover"&&f()})},I=()=>{r.virtualTriggering||f()};return s.watch(()=>s.unref(c),_=>{_?k.value=!1:o==null||o()},{flush:"post"}),s.watch(()=>r.content,()=>{var _,M;(M=(_=i.value)==null?void 0:_.updatePopper)==null||M.call(_)}),e({contentRef:i}),(_,M)=>(s.openBlock(),s.createBlock(s.unref(hC),{disabled:!_.teleported,to:s.unref(x)},{default:s.withCtx(()=>[s.createVNode(s.Transition,{name:s.unref(m),onAfterLeave:B,onBeforeEnter:P,onAfterEnter:O,onBeforeLeave:L},{default:s.withCtx(()=>[s.unref(w)?s.withDirectives((s.openBlock(),s.createBlock(s.unref(eC),s.mergeProps({key:0,id:s.unref(u),ref_key:"contentRef",ref:i},_.$attrs,{"aria-label":_.ariaLabel,"aria-hidden":k.value,"boundaries-padding":_.boundariesPadding,"fallback-placements":_.fallbackPlacements,"gpu-acceleration":_.gpuAcceleration,offset:_.offset,placement:_.placement,"popper-options":_.popperOptions,strategy:_.strategy,effect:_.effect,enterable:_.enterable,pure:_.pure,"popper-class":_.popperClass,"popper-style":[_.popperStyle,s.unref(E)],"reference-el":_.referenceEl,"trigger-target-el":_.triggerTargetEl,visible:s.unref(C),"z-index":_.zIndex,onMouseenter:s.unref(N),onMouseleave:s.unref(D),onBlur:I,onClose:s.unref(f)}),{default:s.withCtx(()=>[s.renderSlot(_.$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"])),[[s.vShow,s.unref(C)]]):s.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var gC=Te(vC,[["__file","content.vue"]]);const mC=s.defineComponent({name:"ElTooltip"}),yC=s.defineComponent({...mC,props:iC,emits:oC,setup(t,{expose:e,emit:r}){const n=t;_w();const a=mo(),i=s.ref(),o=s.ref(),l=()=>{var m;const b=s.unref(i);b&&((m=b.popperInstanceRef)==null||m.update())},u=s.ref(!1),c=s.ref(),{show:d,hide:f,hasUpdateHandler:p}=aC({indicator:u,toggleReason:c}),{onOpen:v,onClose:h}=Fw({showAfter:s.toRef(n,"showAfter"),hideAfter:s.toRef(n,"hideAfter"),autoClose:s.toRef(n,"autoClose"),open:d,close:f}),g=s.computed(()=>Qn(n.visible)&&!p.value);s.provide(ml,{controlled:g,id:a,open:s.readonly(u),trigger:s.toRef(n,"trigger"),onOpen:m=>{v(m)},onClose:m=>{h(m)},onToggle:m=>{s.unref(u)?h(m):v(m)},onShow:()=>{r("show",c.value)},onHide:()=>{r("hide",c.value)},onBeforeShow:()=>{r("before-show",c.value)},onBeforeHide:()=>{r("before-hide",c.value)},updatePopper:l}),s.watch(()=>n.disabled,m=>{m&&u.value&&(u.value=!1)});const y=m=>{var b,w;const C=(w=(b=o.value)==null?void 0:b.contentRef)==null?void 0:w.popperContentRef,x=(m==null?void 0:m.relatedTarget)||document.activeElement;return C&&C.contains(x)};return s.onDeactivated(()=>u.value&&f()),e({popperRef:i,contentRef:o,isFocusInsideContent:y,updatePopper:l,onOpen:v,onClose:h,hide:f}),(m,b)=>(s.openBlock(),s.createBlock(s.unref(tC),{ref_key:"popperRef",ref:i,role:m.role},{default:s.withCtx(()=>[s.createVNode(uC,{disabled:m.disabled,trigger:m.trigger,"trigger-keys":m.triggerKeys,"virtual-ref":m.virtualRef,"virtual-triggering":m.virtualTriggering},{default:s.withCtx(()=>[m.$slots.default?s.renderSlot(m.$slots,"default",{key:0}):s.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),s.createVNode(gC,{ref_key:"contentRef",ref:o,"aria-label":m.ariaLabel,"boundaries-padding":m.boundariesPadding,content:m.content,disabled:m.disabled,effect:m.effect,enterable:m.enterable,"fallback-placements":m.fallbackPlacements,"hide-after":m.hideAfter,"gpu-acceleration":m.gpuAcceleration,offset:m.offset,persistent:m.persistent,"popper-class":m.popperClass,"popper-style":m.popperStyle,placement:m.placement,"popper-options":m.popperOptions,pure:m.pure,"raw-content":m.rawContent,"reference-el":m.referenceEl,"trigger-target-el":m.triggerTargetEl,"show-after":m.showAfter,strategy:m.strategy,teleported:m.teleported,transition:m.transition,"virtual-triggering":m.virtualTriggering,"z-index":m.zIndex,"append-to":m.appendTo},{default:s.withCtx(()=>[s.renderSlot(m.$slots,"content",{},()=>[m.rawContent?(s.openBlock(),s.createElementBlock("span",{key:0,innerHTML:m.content},null,8,["innerHTML"])):(s.openBlock(),s.createElementBlock("span",{key:1},s.toDisplayString(m.content),1))]),m.showArrow?(s.openBlock(),s.createBlock(s.unref(x2),{key:0,"arrow-offset":m.arrowOffset},null,8,["arrow-offset"])):s.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 bC=Te(yC,[["__file","tooltip.vue"]]);const si=dt(bC),Zd=Symbol("buttonGroupContextKey"),wC=(t,e)=>{co({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},s.computed(()=>t.type==="text"));const r=s.inject(Zd,void 0),n=sl("button"),{form:a}=Dn(),i=Nn(s.computed(()=>r==null?void 0:r.size)),o=ai(),l=s.ref(),u=s.useSlots(),c=s.computed(()=>t.type||(r==null?void 0:r.type)||""),d=s.computed(()=>{var h,g,y;return(y=(g=t.autoInsertSpace)!=null?g:(h=n.value)==null?void 0:h.autoInsertSpace)!=null?y:!1}),f=s.computed(()=>t.tag==="button"?{ariaDisabled:o.value||t.loading,disabled:o.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),p=s.computed(()=>{var h;const g=(h=u.default)==null?void 0:h.call(u);if(d.value&&(g==null?void 0:g.length)===1){const y=g[0];if((y==null?void 0:y.type)===s.Text){const m=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(m.trim())}}return!1});return{_disabled:o,_size:i,_type:c,_ref:l,_props:f,shouldAddSpace:p,handleClick:h=>{if(o.value||t.loading){h.stopPropagation();return}t.nativeType==="reset"&&(a==null||a.resetFields()),e("click",h)}}},yl=Ie({size:sa,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:Xr},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:Xr,default:()=>Ws},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:ke([String,Object]),default:"button"}}),CC={click:t=>t instanceof MouseEvent};function bt(t,e){kC(t)&&(t="100%");var r=xC(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function xo(t){return Math.min(1,Math.max(0,t))}function kC(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function xC(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Qd(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Eo(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Pn(t){return t.length===1?"0"+t:String(t)}function EC(t,e,r){return{r:bt(t,255)*255,g:bt(e,255)*255,b:bt(r,255)*255}}function Jd(t,e,r){t=bt(t,255),e=bt(e,255),r=bt(r,255);var n=Math.max(t,e,r),a=Math.min(t,e,r),i=0,o=0,l=(n+a)/2;if(n===a)o=0,i=0;else{var u=n-a;switch(o=l>.5?u/(2-n-a):u/(n+a),n){case t:i=(e-r)/u+(e<r?6:0);break;case e:i=(r-t)/u+2;break;case r:i=(t-e)/u+4;break}i/=6}return{h:i,s:o,l}}function bl(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*(6*r):r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function SC(t,e,r){var n,a,i;if(t=bt(t,360),e=bt(e,100),r=bt(r,100),e===0)a=r,i=r,n=r;else{var o=r<.5?r*(1+e):r+e-r*e,l=2*r-o;n=bl(l,o,t+1/3),a=bl(l,o,t),i=bl(l,o,t-1/3)}return{r:n*255,g:a*255,b:i*255}}function ef(t,e,r){t=bt(t,255),e=bt(e,255),r=bt(r,255);var n=Math.max(t,e,r),a=Math.min(t,e,r),i=0,o=n,l=n-a,u=n===0?0:l/n;if(n===a)i=0;else{switch(n){case t:i=(e-r)/l+(e<r?6:0);break;case e:i=(r-t)/l+2;break;case r:i=(t-e)/l+4;break}i/=6}return{h:i,s:u,v:o}}function TC(t,e,r){t=bt(t,360)*6,e=bt(e,100),r=bt(r,100);var n=Math.floor(t),a=t-n,i=r*(1-e),o=r*(1-a*e),l=r*(1-(1-a)*e),u=n%6,c=[r,o,i,i,l,r][u],d=[l,r,r,o,i,i][u],f=[i,i,l,r,r,o][u];return{r:c*255,g:d*255,b:f*255}}function tf(t,e,r,n){var a=[Pn(Math.round(t).toString(16)),Pn(Math.round(e).toString(16)),Pn(Math.round(r).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function BC(t,e,r,n,a){var i=[Pn(Math.round(t).toString(16)),Pn(Math.round(e).toString(16)),Pn(Math.round(r).toString(16)),Pn(NC(n))];return a&&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 NC(t){return Math.round(parseFloat(t)*255).toString(16)}function rf(t){return qt(t)/255}function qt(t){return parseInt(t,16)}function DC(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var wl={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 PC(t){var e={r:0,g:0,b:0},r=1,n=null,a=null,i=null,o=!1,l=!1;return typeof t=="string"&&(t=LC(t)),typeof t=="object"&&(Ir(t.r)&&Ir(t.g)&&Ir(t.b)?(e=EC(t.r,t.g,t.b),o=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Ir(t.h)&&Ir(t.s)&&Ir(t.v)?(n=Eo(t.s),a=Eo(t.v),e=TC(t.h,n,a),o=!0,l="hsv"):Ir(t.h)&&Ir(t.s)&&Ir(t.l)&&(n=Eo(t.s),i=Eo(t.l),e=SC(t.h,n,i),o=!0,l="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(r=t.a)),r=Qd(r),{ok:o,format:t.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}var OC="[-\\+]?\\d+%?",_C="[-\\+]?\\d*\\.\\d+%?",en="(?:".concat(_C,")|(?:").concat(OC,")"),Cl="[\\s|\\(]+(".concat(en,")[,|\\s]+(").concat(en,")[,|\\s]+(").concat(en,")\\s*\\)?"),kl="[\\s|\\(]+(".concat(en,")[,|\\s]+(").concat(en,")[,|\\s]+(").concat(en,")[,|\\s]+(").concat(en,")\\s*\\)?"),or={CSS_UNIT:new RegExp(en),rgb:new RegExp("rgb"+Cl),rgba:new RegExp("rgba"+kl),hsl:new RegExp("hsl"+Cl),hsla:new RegExp("hsla"+kl),hsv:new RegExp("hsv"+Cl),hsva:new RegExp("hsva"+kl),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 LC(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(wl[t])t=wl[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=or.rgb.exec(t);return r?{r:r[1],g:r[2],b:r[3]}:(r=or.rgba.exec(t),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=or.hsl.exec(t),r?{h:r[1],s:r[2],l:r[3]}:(r=or.hsla.exec(t),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=or.hsv.exec(t),r?{h:r[1],s:r[2],v:r[3]}:(r=or.hsva.exec(t),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=or.hex8.exec(t),r?{r:qt(r[1]),g:qt(r[2]),b:qt(r[3]),a:rf(r[4]),format:e?"name":"hex8"}:(r=or.hex6.exec(t),r?{r:qt(r[1]),g:qt(r[2]),b:qt(r[3]),format:e?"name":"hex"}:(r=or.hex4.exec(t),r?{r:qt(r[1]+r[1]),g:qt(r[2]+r[2]),b:qt(r[3]+r[3]),a:rf(r[4]+r[4]),format:e?"name":"hex8"}:(r=or.hex3.exec(t),r?{r:qt(r[1]+r[1]),g:qt(r[2]+r[2]),b:qt(r[3]+r[3]),format:e?"name":"hex"}:!1)))))))))}function Ir(t){return!!or.CSS_UNIT.exec(String(t))}var FC=function(){function t(e,r){e===void 0&&(e=""),r===void 0&&(r={});var n;if(e instanceof t)return e;typeof e=="number"&&(e=DC(e)),this.originalInput=e;var a=PC(e);this.originalInput=e,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:a.format,this.gradientType=r.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=a.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),r,n,a,i=e.r/255,o=e.g/255,l=e.b/255;return i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),l<=.03928?a=l/12.92:a=Math.pow((l+.055)/1.055,2.4),.2126*r+.7152*n+.0722*a},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=Qd(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=ef(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=ef(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=Jd(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=Jd(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),tf(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),BC(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(r,", ").concat(n,")"):"rgba(".concat(e,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(r){return"".concat(Math.round(bt(r,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(r){return Math.round(bt(r,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+tf(this.r,this.g,this.b,!1),r=0,n=Object.entries(wl);r<n.length;r++){var a=n[r],i=a[0],o=a[1];if(e===o)return i}return!1},t.prototype.toString=function(e){var r=!!e;e=e??this.format;var n=!1,a=this.a<1&&this.a>=0,i=!r&&a&&(e.startsWith("hex")||e==="name");return i?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l+=e/100,r.l=xo(r.l),new t(r)},t.prototype.brighten=function(e){e===void 0&&(e=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),new t(r)},t.prototype.darken=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l-=e/100,r.l=xo(r.l),new t(r)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s-=e/100,r.s=xo(r.s),new t(r)},t.prototype.saturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s+=e/100,r.s=xo(r.s),new t(r)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var r=this.toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,new t(r)},t.prototype.mix=function(e,r){r===void 0&&(r=50);var n=this.toRgb(),a=new t(e).toRgb(),i=r/100,o={r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a};return new t(o)},t.prototype.analogous=function(e,r){e===void 0&&(e=6),r===void 0&&(r=30);var n=this.toHsl(),a=360/r,i=[this];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,i.push(new t(n));return i},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var r=this.toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/e;e--;)o.push(new t({h:n,s:a,v:i})),i=(i+l)%1;return o},t.prototype.splitcomplement=function(){var e=this.toHsl(),r=e.h;return[this,new t({h:(r+72)%360,s:e.s,l:e.l}),new t({h:(r+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var r=this.toRgb(),n=new t(e).toRgb(),a=r.a+n.a*(1-r.a);return new t({r:(r.r*r.a+n.r*n.a*(1-r.a))/a,g:(r.g*r.a+n.g*n.a*(1-r.a))/a,b:(r.b*r.a+n.b*n.a*(1-r.a))/a,a})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var r=this.toHsl(),n=r.h,a=[this],i=360/e,o=1;o<e;o++)a.push(new t({h:(n+o*i)%360,s:r.s,l:r.l}));return a},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function tn(t,e=20){return t.mix("#141414",e).toString()}function MC(t){const e=ai(),r=Be("button");return s.computed(()=>{let n={},a=t.color;if(a){const i=a.match(/var\((.*?)\)/);i&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));const o=new FC(a),l=t.dark?o.tint(20).toString():tn(o,20);if(t.plain)n=r.cssVarBlock({"bg-color":t.dark?tn(o,90):o.tint(90).toString(),"text-color":a,"border-color":t.dark?tn(o,50):o.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":l,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":l}),e.value&&(n[r.cssVarBlockName("disabled-bg-color")]=t.dark?tn(o,90):o.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=t.dark?tn(o,50):o.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=t.dark?tn(o,80):o.tint(80).toString());else{const u=t.dark?tn(o,30):o.tint(30).toString(),c=o.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":a,"text-color":c,"border-color":a,"hover-bg-color":u,"hover-text-color":c,"hover-border-color":u,"active-bg-color":l,"active-border-color":l}),e.value){const d=t.dark?tn(o,50):o.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=d,n[r.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=d}}}return n})}const IC=s.defineComponent({name:"ElButton"}),AC=s.defineComponent({...IC,props:yl,emits:CC,setup(t,{expose:e,emit:r}){const n=t,a=MC(n),i=Be("button"),{_ref:o,_size:l,_type:u,_disabled:c,_props:d,shouldAddSpace:f,handleClick:p}=wC(n,r),v=s.computed(()=>[i.b(),i.m(u.value),i.m(l.value),i.is("disabled",c.value),i.is("loading",n.loading),i.is("plain",n.plain),i.is("round",n.round),i.is("circle",n.circle),i.is("text",n.text),i.is("link",n.link),i.is("has-bg",n.bg)]);return e({ref:o,size:l,type:u,disabled:c,shouldAddSpace:f}),(h,g)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(h.tag),s.mergeProps({ref_key:"_ref",ref:o},s.unref(d),{class:s.unref(v),style:s.unref(a),onClick:s.unref(p)}),{default:s.withCtx(()=>[h.loading?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[h.$slots.loading?s.renderSlot(h.$slots,"loading",{key:0}):(s.openBlock(),s.createBlock(s.unref(yt),{key:1,class:s.normalizeClass(s.unref(i).is("loading"))},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(h.loadingIcon)))]),_:1},8,["class"]))],64)):h.icon||h.$slots.icon?(s.openBlock(),s.createBlock(s.unref(yt),{key:1},{default:s.withCtx(()=>[h.icon?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(h.icon),{key:0})):s.renderSlot(h.$slots,"icon",{key:1})]),_:3})):s.createCommentVNode("v-if",!0),h.$slots.default?(s.openBlock(),s.createElementBlock("span",{key:2,class:s.normalizeClass({[s.unref(i).em("text","expand")]:s.unref(f)})},[s.renderSlot(h.$slots,"default")],2)):s.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var VC=Te(AC,[["__file","button.vue"]]);const RC={size:yl.size,type:yl.type},$C=s.defineComponent({name:"ElButtonGroup"}),zC=s.defineComponent({...$C,props:RC,setup(t){const e=t;s.provide(Zd,s.reactive({size:s.toRef(e,"size"),type:s.toRef(e,"type")}));const r=Be("button");return(n,a)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(s.unref(r).b("group"))},[s.renderSlot(n.$slots,"default")],2))}});var nf=Te(zC,[["__file","button-group.vue"]]);const Ar=dt(VC,{ButtonGroup:nf}),HC=Fr(nf),rn=new Map;if(et){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const r of rn.values())for(const{documentHandler:n}of r)n(e,t);t=void 0}})}function af(t,e){let r=[];return Array.isArray(e.arg)?r=e.arg:En(e.arg)&&r.push(e.arg),function(n,a){const i=e.instance.popperRef,o=n.target,l=a==null?void 0:a.target,u=!e||!e.instance,c=!o||!l,d=t.contains(o)||t.contains(l),f=t===o,p=r.length&&r.some(h=>h==null?void 0:h.contains(o))||r.length&&r.includes(l),v=i&&(i.contains(o)||i.contains(l));u||c||d||f||p||v||e.value(n,a)}}const of={beforeMount(t,e){rn.has(t)||rn.set(t,[]),rn.get(t).push({documentHandler:af(t,e),bindingFn:e.value})},updated(t,e){rn.has(t)||rn.set(t,[]);const r=rn.get(t),n=r.findIndex(i=>i.bindingFn===e.oldValue),a={documentHandler:af(t,e),bindingFn:e.value};n>=0?r.splice(n,1,a):r.push(a)},unmounted(t){rn.delete(t)}},KC=Ie({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:ke([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),qC=s.defineComponent({name:"ElCard"}),UC=s.defineComponent({...qC,props:KC,setup(t){const e=Be("card");return(r,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([s.unref(e).b(),s.unref(e).is(`${r.shadow}-shadow`)])},[r.$slots.header||r.header?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(s.unref(e).e("header"))},[s.renderSlot(r.$slots,"header",{},()=>[s.createTextVNode(s.toDisplayString(r.header),1)])],2)):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{class:s.normalizeClass([s.unref(e).e("body"),r.bodyClass]),style:s.normalizeStyle(r.bodyStyle)},[s.renderSlot(r.$slots,"default")],6),r.$slots.footer||r.footer?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(s.unref(e).e("footer"))},[s.renderSlot(r.$slots,"footer",{},()=>[s.createTextVNode(s.toDisplayString(r.footer),1)])],2)):s.createCommentVNode("v-if",!0)],2))}});var GC=Te(UC,[["__file","card.vue"]]);const WC=dt(GC),sf={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:sa,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...Qr(["ariaControls"])},lf={[mt]:t=>St(t)||gt(t)||Qn(t),change:t=>St(t)||gt(t)||Qn(t)},ua=Symbol("checkboxGroupContextKey"),jC=({model:t,isChecked:e})=>{const r=s.inject(ua,void 0),n=s.computed(()=>{var i,o;const l=(i=r==null?void 0:r.max)==null?void 0:i.value,u=(o=r==null?void 0:r.min)==null?void 0:o.value;return!Yr(l)&&t.value.length>=l&&!e.value||!Yr(u)&&t.value.length<=u&&e.value});return{isDisabled:ai(s.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},YC=(t,{model:e,isLimitExceeded:r,hasOwnLabel:n,isDisabled:a,isLabeledByFormItem:i})=>{const o=s.inject(ua,void 0),{formItem:l}=Dn(),{emit:u}=s.getCurrentInstance();function c(h){var g,y,m,b;return[!0,t.trueValue,t.trueLabel].includes(h)?(y=(g=t.trueValue)!=null?g:t.trueLabel)!=null?y:!0:(b=(m=t.falseValue)!=null?m:t.falseLabel)!=null?b:!1}function d(h,g){u("change",c(h),g)}function f(h){if(r.value)return;const g=h.target;u("change",c(g.checked),h)}async function p(h){r.value||!n.value&&!a.value&&i.value&&(h.composedPath().some(m=>m.tagName==="LABEL")||(e.value=c([!1,t.falseValue,t.falseLabel].includes(e.value)),await s.nextTick(),d(e.value,h)))}const v=s.computed(()=>(o==null?void 0:o.validateEvent)||t.validateEvent);return s.watch(()=>t.modelValue,()=>{v.value&&(l==null||l.validate("change").catch(h=>tt(h)))}),{handleChange:f,onClickRoot:p}},XC=t=>{const e=s.ref(!1),{emit:r}=s.getCurrentInstance(),n=s.inject(ua,void 0),a=s.computed(()=>Yr(n)===!1),i=s.ref(!1),o=s.computed({get(){var l,u;return a.value?(l=n==null?void 0:n.modelValue)==null?void 0:l.value:(u=t.modelValue)!=null?u:e.value},set(l){var u,c;a.value&&At(l)?(i.value=((u=n==null?void 0:n.max)==null?void 0:u.value)!==void 0&&l.length>(n==null?void 0:n.max.value)&&l.length>o.value.length,i.value===!1&&((c=n==null?void 0:n.changeEvent)==null||c.call(n,l))):(r(mt,l),e.value=l)}});return{model:o,isGroup:a,isLimitExceeded:i}},ZC=(t,e,{model:r})=>{const n=s.inject(ua,void 0),a=s.ref(!1),i=s.computed(()=>io(t.value)?t.label:t.value),o=s.computed(()=>{const d=r.value;return Qn(d)?d:At(d)?vt(i.value)?d.map(s.toRaw).some(f=>ao(f,i.value)):d.map(s.toRaw).includes(i.value):d!=null?d===t.trueValue||d===t.trueLabel:!!d}),l=Nn(s.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value}),{prop:!0}),u=Nn(s.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value})),c=s.computed(()=>!!e.default||!io(i.value));return{checkboxButtonSize:l,isChecked:o,isFocused:a,checkboxSize:u,hasOwnLabel:c,actualValue:i}},cf=(t,e)=>{const{formItem:r}=Dn(),{model:n,isGroup:a,isLimitExceeded:i}=XC(t),{isFocused:o,isChecked:l,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,actualValue:f}=ZC(t,e,{model:n}),{isDisabled:p}=jC({model:n,isChecked:l}),{inputId:v,isLabeledByFormItem:h}=ii(t,{formItemContext:r,disableIdGeneration:d,disableIdManagement:a}),{handleChange:g,onClickRoot:y}=YC(t,{model:n,isLimitExceeded:i,hasOwnLabel:d,isDisabled:p,isLabeledByFormItem:h});return(()=>{function b(){var w,C;At(n.value)&&!n.value.includes(f.value)?n.value.push(f.value):n.value=(C=(w=t.trueValue)!=null?w:t.trueLabel)!=null?C:!0}t.checked&&b()})(),co({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},s.computed(()=>a.value&&io(t.value))),co({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},s.computed(()=>!!t.trueLabel)),co({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},s.computed(()=>!!t.falseLabel)),{inputId:v,isLabeledByFormItem:h,isChecked:l,isDisabled:p,isFocused:o,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,model:n,actualValue:f,handleChange:g,onClickRoot:y}},QC=s.defineComponent({name:"ElCheckbox"}),JC=s.defineComponent({...QC,props:sf,emits:lf,setup(t){const e=t,r=s.useSlots(),{inputId:n,isLabeledByFormItem:a,isChecked:i,isDisabled:o,isFocused:l,checkboxSize:u,hasOwnLabel:c,model:d,actualValue:f,handleChange:p,onClickRoot:v}=cf(e,r),h=Be("checkbox"),g=s.computed(()=>[h.b(),h.m(u.value),h.is("disabled",o.value),h.is("bordered",e.border),h.is("checked",i.value)]),y=s.computed(()=>[h.e("input"),h.is("disabled",o.value),h.is("checked",i.value),h.is("indeterminate",e.indeterminate),h.is("focus",l.value)]);return(m,b)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(!s.unref(c)&&s.unref(a)?"span":"label"),{class:s.normalizeClass(s.unref(g)),"aria-controls":m.indeterminate?m.ariaControls:null,onClick:s.unref(v)},{default:s.withCtx(()=>{var w,C,x,E;return[s.createElementVNode("span",{class:s.normalizeClass(s.unref(y))},[m.trueValue||m.falseValue||m.trueLabel||m.falseLabel?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:0,id:s.unref(n),"onUpdate:modelValue":k=>s.isRef(d)?d.value=k:null,class:s.normalizeClass(s.unref(h).e("original")),type:"checkbox",indeterminate:m.indeterminate,name:m.name,tabindex:m.tabindex,disabled:s.unref(o),"true-value":(C=(w=m.trueValue)!=null?w:m.trueLabel)!=null?C:!0,"false-value":(E=(x=m.falseValue)!=null?x:m.falseLabel)!=null?E:!1,onChange:s.unref(p),onFocus:k=>l.value=!0,onBlur:k=>l.value=!1,onClick:s.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[s.vModelCheckbox,s.unref(d)]]):s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,id:s.unref(n),"onUpdate:modelValue":k=>s.isRef(d)?d.value=k:null,class:s.normalizeClass(s.unref(h).e("original")),type:"checkbox",indeterminate:m.indeterminate,disabled:s.unref(o),value:s.unref(f),name:m.name,tabindex:m.tabindex,onChange:s.unref(p),onFocus:k=>l.value=!0,onBlur:k=>l.value=!1,onClick:s.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[s.vModelCheckbox,s.unref(d)]]),s.createElementVNode("span",{class:s.normalizeClass(s.unref(h).e("inner"))},null,2)],2),s.unref(c)?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(s.unref(h).e("label"))},[s.renderSlot(m.$slots,"default"),m.$slots.default?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(m.label),1)],64))],2)):s.createCommentVNode("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var ek=Te(JC,[["__file","checkbox.vue"]]);const tk=s.defineComponent({name:"ElCheckboxButton"}),rk=s.defineComponent({...tk,props:sf,emits:lf,setup(t){const e=t,r=s.useSlots(),{isFocused:n,isChecked:a,isDisabled:i,checkboxButtonSize:o,model:l,actualValue:u,handleChange:c}=cf(e,r),d=s.inject(ua,void 0),f=Be("checkbox"),p=s.computed(()=>{var h,g,y,m;const b=(g=(h=d==null?void 0:d.fill)==null?void 0:h.value)!=null?g:"";return{backgroundColor:b,borderColor:b,color:(m=(y=d==null?void 0:d.textColor)==null?void 0:y.value)!=null?m:"",boxShadow:b?`-1px 0 0 0 ${b}`:void 0}}),v=s.computed(()=>[f.b("button"),f.bm("button",o.value),f.is("disabled",i.value),f.is("checked",a.value),f.is("focus",n.value)]);return(h,g)=>{var y,m,b,w;return s.openBlock(),s.createElementBlock("label",{class:s.normalizeClass(s.unref(v))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:0,"onUpdate:modelValue":C=>s.isRef(l)?l.value=C:null,class:s.normalizeClass(s.unref(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:s.unref(i),"true-value":(m=(y=h.trueValue)!=null?y:h.trueLabel)!=null?m:!0,"false-value":(w=(b=h.falseValue)!=null?b:h.falseLabel)!=null?w:!1,onChange:s.unref(c),onFocus:C=>n.value=!0,onBlur:C=>n.value=!1,onClick:s.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[s.vModelCheckbox,s.unref(l)]]):s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,"onUpdate:modelValue":C=>s.isRef(l)?l.value=C:null,class:s.normalizeClass(s.unref(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:s.unref(i),value:s.unref(u),onChange:s.unref(c),onFocus:C=>n.value=!0,onBlur:C=>n.value=!1,onClick:s.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[s.vModelCheckbox,s.unref(l)]]),h.$slots.default||h.label?(s.openBlock(),s.createElementBlock("span",{key:2,class:s.normalizeClass(s.unref(f).be("button","inner")),style:s.normalizeStyle(s.unref(a)?s.unref(p):void 0)},[s.renderSlot(h.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(h.label),1)])],6)):s.createCommentVNode("v-if",!0)],2)}}});var uf=Te(rk,[["__file","checkbox-button.vue"]]);const nk=Ie({modelValue:{type:ke(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:sa,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...Qr(["ariaLabel"])}),ak={[mt]:t=>At(t),change:t=>At(t)},ik=s.defineComponent({name:"ElCheckboxGroup"}),ok=s.defineComponent({...ik,props:nk,emits:ak,setup(t,{emit:e}){const r=t,n=Be("checkbox"),{formItem:a}=Dn(),{inputId:i,isLabeledByFormItem:o}=ii(r,{formItemContext:a}),l=async c=>{e(mt,c),await s.nextTick(),e("change",c)},u=s.computed({get(){return r.modelValue},set(c){l(c)}});return s.provide(ua,{...$u(s.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:u,changeEvent:l}),s.watch(()=>r.modelValue,()=>{r.validateEvent&&(a==null||a.validate("change").catch(c=>tt(c)))}),(c,d)=>{var f;return s.openBlock(),s.createBlock(s.resolveDynamicComponent(c.tag),{id:s.unref(i),class:s.normalizeClass(s.unref(n).b("group")),role:"group","aria-label":s.unref(o)?void 0:c.ariaLabel||"checkbox-group","aria-labelledby":s.unref(o)?(f=s.unref(a))==null?void 0:f.labelId:void 0},{default:s.withCtx(()=>[s.renderSlot(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var df=Te(ok,[["__file","checkbox-group.vue"]]);const sk=dt(ek,{CheckboxButton:uf,CheckboxGroup:df});Fr(uf),Fr(df);const xl=Ie({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Wu},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),lk={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},ck=s.defineComponent({name:"ElTag"}),uk=s.defineComponent({...ck,props:xl,emits:lk,setup(t,{emit:e}){const r=t,n=Nn(),a=Be("tag"),i=s.computed(()=>{const{type:c,hit:d,effect:f,closable:p,round:v}=r;return[a.b(),a.is("closable",p),a.m(c||"primary"),a.m(n.value),a.m(f),a.is("hit",d),a.is("round",v)]}),o=c=>{e("close",c)},l=c=>{e("click",c)},u=c=>{c.component.subTree.component.bum=null};return(c,d)=>c.disableTransitions?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(s.unref(i)),style:s.normalizeStyle({backgroundColor:c.color}),onClick:l},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(a).e("content"))},[s.renderSlot(c.$slots,"default")],2),c.closable?(s.openBlock(),s.createBlock(s.unref(yt),{key:0,class:s.normalizeClass(s.unref(a).e("close")),onClick:s.withModifiers(o,["stop"])},{default:s.withCtx(()=>[s.createVNode(s.unref(so))]),_:1},8,["class","onClick"])):s.createCommentVNode("v-if",!0)],6)):(s.openBlock(),s.createBlock(s.Transition,{key:1,name:`${s.unref(a).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass(s.unref(i)),style:s.normalizeStyle({backgroundColor:c.color}),onClick:l},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(a).e("content"))},[s.renderSlot(c.$slots,"default")],2),c.closable?(s.openBlock(),s.createBlock(s.unref(yt),{key:0,class:s.normalizeClass(s.unref(a).e("close")),onClick:s.withModifiers(o,["stop"])},{default:s.withCtx(()=>[s.createVNode(s.unref(so))]),_:1},8,["class","onClick"])):s.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var dk=Te(uk,[["__file","tag.vue"]]);const fk=dt(dk),ff=Symbol("rowContextKey"),hk=Ie({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),pk=s.defineComponent({name:"ElRow"}),vk=s.defineComponent({...pk,props:hk,setup(t){const e=t,r=Be("row"),n=s.computed(()=>e.gutter);s.provide(ff,{gutter:n});const a=s.computed(()=>{const o={};return e.gutter&&(o.marginRight=o.marginLeft=`-${e.gutter/2}px`),o}),i=s.computed(()=>[r.b(),r.is(`justify-${e.justify}`,e.justify!=="start"),r.is(`align-${e.align}`,!!e.align)]);return(o,l)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.tag),{class:s.normalizeClass(s.unref(i)),style:s.normalizeStyle(s.unref(a))},{default:s.withCtx(()=>[s.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});var gk=Te(vk,[["__file","row.vue"]]);const El=dt(gk),mk=Ie({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:ke([Number,Object]),default:()=>ea({})},sm:{type:ke([Number,Object]),default:()=>ea({})},md:{type:ke([Number,Object]),default:()=>ea({})},lg:{type:ke([Number,Object]),default:()=>ea({})},xl:{type:ke([Number,Object]),default:()=>ea({})}}),yk=s.defineComponent({name:"ElCol"}),bk=s.defineComponent({...yk,props:mk,setup(t){const e=t,{gutter:r}=s.inject(ff,{gutter:s.computed(()=>0)}),n=Be("col"),a=s.computed(()=>{const o={};return r.value&&(o.paddingLeft=o.paddingRight=`${r.value/2}px`),o}),i=s.computed(()=>{const o=[];return["span","offset","pull","push"].forEach(c=>{const d=e[c];gt(d)&&(c==="span"?o.push(n.b(`${e[c]}`)):d>0&&o.push(n.b(`${c}-${e[c]}`)))}),["xs","sm","md","lg","xl"].forEach(c=>{gt(e[c])?o.push(n.b(`${c}-${e[c]}`)):vt(e[c])&&Object.entries(e[c]).forEach(([d,f])=>{o.push(d!=="span"?n.b(`${c}-${d}-${f}`):n.b(`${c}-${f}`))})}),r.value&&o.push(n.is("guttered")),[n.b(),o]});return(o,l)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.tag),{class:s.normalizeClass(s.unref(i)),style:s.normalizeStyle(s.unref(a))},{default:s.withCtx(()=>[s.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});var wk=Te(bk,[["__file","col.vue"]]);const Sl=dt(wk),Ck=s.defineComponent({name:"ElCollapseTransition"}),kk=s.defineComponent({...Ck,setup(t){const e=Be("collapse-transition"),r=a=>{a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom},n={beforeEnter(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.style.height&&(a.dataset.elExistsHeight=a.style.height),a.style.maxHeight=0,a.style.paddingTop=0,a.style.paddingBottom=0},enter(a){requestAnimationFrame(()=>{a.dataset.oldOverflow=a.style.overflow,a.dataset.elExistsHeight?a.style.maxHeight=a.dataset.elExistsHeight:a.scrollHeight!==0?a.style.maxHeight=`${a.scrollHeight}px`:a.style.maxHeight=0,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom,a.style.overflow="hidden"})},afterEnter(a){a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow},enterCancelled(a){r(a)},beforeLeave(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.dataset.oldOverflow=a.style.overflow,a.style.maxHeight=`${a.scrollHeight}px`,a.style.overflow="hidden"},leave(a){a.scrollHeight!==0&&(a.style.maxHeight=0,a.style.paddingTop=0,a.style.paddingBottom=0)},afterLeave(a){r(a)},leaveCancelled(a){r(a)}};return(a,i)=>(s.openBlock(),s.createBlock(s.Transition,s.mergeProps({name:s.unref(e).b()},s.toHandlers(n)),{default:s.withCtx(()=>[s.renderSlot(a.$slots,"default")]),_:3},16,["name"]))}});var xk=Te(kk,[["__file","collapse-transition.vue"]]);const Ek=dt(xk),Sk=Ie({color:{type:ke(Object),required:!0},vertical:{type:Boolean,default:!1}});let Tl=!1;function li(t,e){if(!et)return;const r=function(i){var o;(o=e.drag)==null||o.call(e,i)},n=function(i){var o;document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,Tl=!1,(o=e.end)==null||o.call(e,i)},a=function(i){var o;Tl||(i.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),Tl=!0,(o=e.start)==null||o.call(e,i))};t.addEventListener("mousedown",a),t.addEventListener("touchstart",a,{passive:!1})}const Tk=t=>{const e=s.getCurrentInstance(),{t:r}=Ya(),n=s.shallowRef(),a=s.shallowRef(),i=s.computed(()=>t.color.get("alpha")),o=s.computed(()=>r("el.colorpicker.alphaLabel"));function l(f){var p;f.target!==n.value&&u(f),(p=n.value)==null||p.focus()}function u(f){if(!a.value||!n.value)return;const v=e.vnode.el.getBoundingClientRect(),{clientX:h,clientY:g}=Bs(f);if(t.vertical){let y=g-v.top;y=Math.max(n.value.offsetHeight/2,y),y=Math.min(y,v.height-n.value.offsetHeight/2),t.color.set("alpha",Math.round((y-n.value.offsetHeight/2)/(v.height-n.value.offsetHeight)*100))}else{let y=h-v.left;y=Math.max(n.value.offsetWidth/2,y),y=Math.min(y,v.width-n.value.offsetWidth/2),t.color.set("alpha",Math.round((y-n.value.offsetWidth/2)/(v.width-n.value.offsetWidth)*100))}}function c(f){const{code:p,shiftKey:v}=f,h=v?10:1;switch(p){case it.left:case it.down:f.preventDefault(),f.stopPropagation(),d(-h);break;case it.right:case it.up:f.preventDefault(),f.stopPropagation(),d(h);break}}function d(f){let p=i.value+f;p=p<0?0:p>100?100:p,t.color.set("alpha",p)}return{thumb:n,bar:a,alpha:i,alphaLabel:o,handleDrag:u,handleClick:l,handleKeydown:c}},Bk=(t,{bar:e,thumb:r,handleDrag:n})=>{const a=s.getCurrentInstance(),i=Be("color-alpha-slider"),o=s.ref(0),l=s.ref(0),u=s.ref();function c(){if(!r.value||t.vertical)return 0;const b=a.vnode.el,w=t.color.get("alpha");return b?Math.round(w*(b.offsetWidth-r.value.offsetWidth/2)/100):0}function d(){if(!r.value)return 0;const b=a.vnode.el;if(!t.vertical)return 0;const w=t.color.get("alpha");return b?Math.round(w*(b.offsetHeight-r.value.offsetHeight/2)/100):0}function f(){if(t.color&&t.color.value){const{r:b,g:w,b:C}=t.color.toRgb();return`linear-gradient(to right, rgba(${b}, ${w}, ${C}, 0) 0%, rgba(${b}, ${w}, ${C}, 1) 100%)`}return""}function p(){o.value=c(),l.value=d(),u.value=f()}s.onMounted(()=>{if(!e.value||!r.value)return;const b={drag:w=>{n(w)},end:w=>{n(w)}};li(e.value,b),li(r.value,b),p()}),s.watch(()=>t.color.get("alpha"),()=>p()),s.watch(()=>t.color.value,()=>p());const v=s.computed(()=>[i.b(),i.is("vertical",t.vertical)]),h=s.computed(()=>i.e("bar")),g=s.computed(()=>i.e("thumb")),y=s.computed(()=>({background:u.value})),m=s.computed(()=>({left:Jn(o.value),top:Jn(l.value)}));return{rootKls:v,barKls:h,barStyle:y,thumbKls:g,thumbStyle:m,update:p}},Nk=s.defineComponent({name:"ElColorAlphaSlider"}),Dk=s.defineComponent({...Nk,props:Sk,setup(t,{expose:e}){const r=t,{alpha:n,alphaLabel:a,bar:i,thumb:o,handleDrag:l,handleClick:u,handleKeydown:c}=Tk(r),{rootKls:d,barKls:f,barStyle:p,thumbKls:v,thumbStyle:h,update:g}=Bk(r,{bar:i,thumb:o,handleDrag:l});return e({update:g,bar:i,thumb:o}),(y,m)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(s.unref(d))},[s.createElementVNode("div",{ref_key:"bar",ref:i,class:s.normalizeClass(s.unref(f)),style:s.normalizeStyle(s.unref(p)),onClick:s.unref(u)},null,14,["onClick"]),s.createElementVNode("div",{ref_key:"thumb",ref:o,class:s.normalizeClass(s.unref(v)),style:s.normalizeStyle(s.unref(h)),"aria-label":s.unref(a),"aria-valuenow":s.unref(n),"aria-orientation":y.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:s.unref(c)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var Pk=Te(Dk,[["__file","alpha-slider.vue"]]);const Ok=s.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=Be("color-hue-slider"),r=s.getCurrentInstance(),n=s.ref(),a=s.ref(),i=s.ref(0),o=s.ref(0),l=s.computed(()=>t.color.get("hue"));s.watch(()=>l.value,()=>{p()});function u(v){v.target!==n.value&&c(v)}function c(v){if(!a.value||!n.value)return;const g=r.vnode.el.getBoundingClientRect(),{clientX:y,clientY:m}=Bs(v);let b;if(t.vertical){let w=m-g.top;w=Math.min(w,g.height-n.value.offsetHeight/2),w=Math.max(n.value.offsetHeight/2,w),b=Math.round((w-n.value.offsetHeight/2)/(g.height-n.value.offsetHeight)*360)}else{let w=y-g.left;w=Math.min(w,g.width-n.value.offsetWidth/2),w=Math.max(n.value.offsetWidth/2,w),b=Math.round((w-n.value.offsetWidth/2)/(g.width-n.value.offsetWidth)*360)}t.color.set("hue",b)}function d(){if(!n.value)return 0;const v=r.vnode.el;if(t.vertical)return 0;const h=t.color.get("hue");return v?Math.round(h*(v.offsetWidth-n.value.offsetWidth/2)/360):0}function f(){if(!n.value)return 0;const v=r.vnode.el;if(!t.vertical)return 0;const h=t.color.get("hue");return v?Math.round(h*(v.offsetHeight-n.value.offsetHeight/2)/360):0}function p(){i.value=d(),o.value=f()}return s.onMounted(()=>{if(!a.value||!n.value)return;const v={drag:h=>{c(h)},end:h=>{c(h)}};li(a.value,v),li(n.value,v),p()}),{bar:a,thumb:n,thumbLeft:i,thumbTop:o,hueValue:l,handleClick:u,update:p,ns:e}}});function _k(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([t.ns.b(),t.ns.is("vertical",t.vertical)])},[s.createElementVNode("div",{ref:"bar",class:s.normalizeClass(t.ns.e("bar")),onClick:t.handleClick},null,10,["onClick"]),s.createElementVNode("div",{ref:"thumb",class:s.normalizeClass(t.ns.e("thumb")),style:s.normalizeStyle({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var Lk=Te(Ok,[["render",_k],["__file","hue-slider.vue"]]);const Fk=Ie({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:sa,popperClass:{type:String,default:""},tabindex:{type:[String,Number],default:0},teleported:$t.teleported,predefine:{type:ke(Array)},validateEvent:{type:Boolean,default:!0},...Qr(["ariaLabel"])}),Mk={[mt]:t=>St(t)||jr(t),[js]:t=>St(t)||jr(t),activeChange:t=>St(t)||jr(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},hf=Symbol("colorPickerContextKey"),pf=function(t,e,r){return[t,e*r/((t=(2-e)*r)<1?t:2-t)||0,t/2]},Ik=function(t){return typeof t=="string"&&t.includes(".")&&Number.parseFloat(t)===1},Ak=function(t){return typeof t=="string"&&t.includes("%")},da=function(t,e){Ik(t)&&(t="100%");const r=Ak(t);return t=Math.min(e,Math.max(0,Number.parseFloat(`${t}`))),r&&(t=Number.parseInt(`${t*e}`,10)/100),Math.abs(t-e)<1e-6?1:t%e/Number.parseFloat(e)},vf={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},So=t=>{t=Math.min(Math.round(t),255);const e=Math.floor(t/16),r=t%16;return`${vf[e]||e}${vf[r]||r}`},gf=function({r:t,g:e,b:r}){return Number.isNaN(+t)||Number.isNaN(+e)||Number.isNaN(+r)?"":`#${So(t)}${So(e)}${So(r)}`},Bl={A:10,B:11,C:12,D:13,E:14,F:15},On=function(t){return t.length===2?(Bl[t[0].toUpperCase()]||+t[0])*16+(Bl[t[1].toUpperCase()]||+t[1]):Bl[t[1].toUpperCase()]||+t[1]},Vk=function(t,e,r){e=e/100,r=r/100;let n=e;const a=Math.max(r,.01);r*=2,e*=r<=1?r:2-r,n*=a<=1?a:2-a;const i=(r+e)/2,o=r===0?2*n/(a+n):2*e/(r+e);return{h:t,s:o*100,v:i*100}},mf=(t,e,r)=>{t=da(t,255),e=da(e,255),r=da(r,255);const n=Math.max(t,e,r),a=Math.min(t,e,r);let i;const o=n,l=n-a,u=n===0?0:l/n;if(n===a)i=0;else{switch(n){case t:{i=(e-r)/l+(e<r?6:0);break}case e:{i=(r-t)/l+2;break}case r:{i=(t-e)/l+4;break}}i/=6}return{h:i*360,s:u*100,v:o*100}},ci=function(t,e,r){t=da(t,360)*6,e=da(e,100),r=da(r,100);const n=Math.floor(t),a=t-n,i=r*(1-e),o=r*(1-a*e),l=r*(1-(1-a)*e),u=n%6,c=[r,o,i,i,l,r][u],d=[l,r,r,o,i,i][u],f=[i,i,l,r,r,o][u];return{r:Math.round(c*255),g:Math.round(d*255),b:Math.round(f*255)}};class ui{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in e)wn(e,r)&&(this[r]=e[r]);e.value?this.fromString(e.value):this.doOnChange()}set(e,r){if(arguments.length===1&&typeof e=="object"){for(const n in e)wn(e,n)&&this.set(n,e[n]);return}this[`_${e}`]=r,this.doOnChange()}get(e){return e==="alpha"?Math.floor(this[`_${e}`]):this[`_${e}`]}toRgb(){return ci(this._hue,this._saturation,this._value)}fromString(e){if(!e){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const r=(n,a,i)=>{this._hue=Math.max(0,Math.min(360,n)),this._saturation=Math.max(0,Math.min(100,a)),this._value=Math.max(0,Math.min(100,i)),this.doOnChange()};if(e.includes("hsl")){const n=e.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(a=>a!=="").map((a,i)=>i>2?Number.parseFloat(a):Number.parseInt(a,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:a,s:i,v:o}=Vk(n[0],n[1],n[2]);r(a,i,o)}}else if(e.includes("hsv")){const n=e.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(a=>a!=="").map((a,i)=>i>2?Number.parseFloat(a):Number.parseInt(a,10));n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3&&r(n[0],n[1],n[2])}else if(e.includes("rgb")){const n=e.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(a=>a!=="").map((a,i)=>i>2?Number.parseFloat(a):Number.parseInt(a,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:a,s:i,v:o}=mf(n[0],n[1],n[2]);r(a,i,o)}}else if(e.includes("#")){const n=e.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(n))return;let a,i,o;n.length===3?(a=On(n[0]+n[0]),i=On(n[1]+n[1]),o=On(n[2]+n[2])):(n.length===6||n.length===8)&&(a=On(n.slice(0,2)),i=On(n.slice(2,4)),o=On(n.slice(4,6))),n.length===8?this._alpha=On(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:l,s:u,v:c}=mf(a,i,o);r(l,u,c)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:r,_value:n,_alpha:a,format:i}=this;if(this.enableAlpha)switch(i){case"hsl":{const o=pf(e,r/100,n/100);this.value=`hsla(${e}, ${Math.round(o[1]*100)}%, ${Math.round(o[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${e}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${gf(ci(e,r,n))}${So(a*255/100)}`;break}default:{const{r:o,g:l,b:u}=ci(e,r,n);this.value=`rgba(${o}, ${l}, ${u}, ${this.get("alpha")/100})`}}else switch(i){case"hsl":{const o=pf(e,r/100,n/100);this.value=`hsl(${e}, ${Math.round(o[1]*100)}%, ${Math.round(o[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${e}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:o,g:l,b:u}=ci(e,r,n);this.value=`rgb(${o}, ${l}, ${u})`;break}default:this.value=gf(ci(e,r,n))}}}const Rk=s.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(t){const e=Be("color-predefine"),{currentColor:r}=s.inject(hf),n=s.ref(i(t.colors,t.color));s.watch(()=>r.value,o=>{const l=new ui;l.fromString(o),n.value.forEach(u=>{u.selected=l.compare(u)})}),s.watchEffect(()=>{n.value=i(t.colors,t.color)});function a(o){t.color.fromString(t.colors[o])}function i(o,l){return o.map(u=>{const c=new ui;return c.enableAlpha=t.enableAlpha,c.format="rgba",c.fromString(u),c.selected=c.value===l.value,c})}return{rgbaColors:n,handleSelect:a,ns:e}}});function $k(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(t.ns.b())},[s.createElementVNode("div",{class:s.normalizeClass(t.ns.e("colors"))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.rgbaColors,(o,l)=>(s.openBlock(),s.createElementBlock("div",{key:t.colors[l],class:s.normalizeClass([t.ns.e("color-selector"),t.ns.is("alpha",o._alpha<100),{selected:o.selected}]),onClick:u=>t.handleSelect(l)},[s.createElementVNode("div",{style:s.normalizeStyle({backgroundColor:o.value})},null,4)],10,["onClick"]))),128))],2)],2)}var zk=Te(Rk,[["render",$k],["__file","predefine.vue"]]);const Hk=s.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=Be("color-svpanel"),r=s.getCurrentInstance(),n=s.ref(0),a=s.ref(0),i=s.ref("hsl(0, 100%, 50%)"),o=s.computed(()=>{const c=t.color.get("hue"),d=t.color.get("value");return{hue:c,value:d}});function l(){const c=t.color.get("saturation"),d=t.color.get("value"),f=r.vnode.el,{clientWidth:p,clientHeight:v}=f;a.value=c*p/100,n.value=(100-d)*v/100,i.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}function u(c){const f=r.vnode.el.getBoundingClientRect(),{clientX:p,clientY:v}=Bs(c);let h=p-f.left,g=v-f.top;h=Math.max(0,h),h=Math.min(h,f.width),g=Math.max(0,g),g=Math.min(g,f.height),a.value=h,n.value=g,t.color.set({saturation:h/f.width*100,value:100-g/f.height*100})}return s.watch(()=>o.value,()=>{l()}),s.onMounted(()=>{li(r.vnode.el,{drag:c=>{u(c)},end:c=>{u(c)}}),l()}),{cursorTop:n,cursorLeft:a,background:i,colorValue:o,handleDrag:u,update:l,ns:e}}});function Kk(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(t.ns.b()),style:s.normalizeStyle({backgroundColor:t.background})},[s.createElementVNode("div",{class:s.normalizeClass(t.ns.e("white"))},null,2),s.createElementVNode("div",{class:s.normalizeClass(t.ns.e("black"))},null,2),s.createElementVNode("div",{class:s.normalizeClass(t.ns.e("cursor")),style:s.normalizeStyle({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},[s.createElementVNode("div")],6)],6)}var qk=Te(Hk,[["render",Kk],["__file","sv-panel.vue"]]);const Uk=s.defineComponent({name:"ElColorPicker"}),Gk=s.defineComponent({...Uk,props:Fk,emits:Mk,setup(t,{expose:e,emit:r}){const n=t,{t:a}=Ya(),i=Be("color"),{formItem:o}=Dn(),l=Nn(),u=ai(),{inputId:c,isLabeledByFormItem:d}=ii(n,{formItemContext:o}),f=s.ref(),p=s.ref(),v=s.ref(),h=s.ref(),g=s.ref(),y=s.ref(),{isFocused:m,handleFocus:b,handleBlur:w}=ol(g,{beforeFocus(){return u.value},beforeBlur(A){var K;return(K=h.value)==null?void 0:K.isFocusInsideContent(A)},afterBlur(){I(!1),V()}});let C=!0;const x=s.reactive(new ui({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),E=s.ref(!1),k=s.ref(!1),B=s.ref(""),S=s.computed(()=>!n.modelValue&&!k.value?"transparent":O(x,n.showAlpha)),N=s.computed(()=>!n.modelValue&&!k.value?"":x.value),D=s.computed(()=>d.value?void 0:n.ariaLabel||a("el.colorpicker.defaultLabel")),P=s.computed(()=>d.value?o==null?void 0:o.labelId:void 0),L=s.computed(()=>[i.b("picker"),i.is("disabled",u.value),i.bm("picker",l.value),i.is("focused",m.value)]);function O(A,K){if(!(A instanceof ui))throw new TypeError("color should be instance of _color Class");const{r:W,g:oe,b:he}=A.toRgb();return K?`rgba(${W}, ${oe}, ${he}, ${A.get("alpha")/100})`:`rgb(${W}, ${oe}, ${he})`}function I(A){E.value=A}const _=Ru(I,100,{leading:!0});function M(){u.value||I(!0)}function F(){_(!1),V()}function V(){s.nextTick(()=>{n.modelValue?x.fromString(n.modelValue):(x.value="",s.nextTick(()=>{k.value=!1}))})}function H(){u.value||_(!E.value)}function $(){x.fromString(B.value)}function z(){const A=x.value;r(mt,A),r("change",A),n.validateEvent&&(o==null||o.validate("change").catch(K=>tt(K))),_(!1),s.nextTick(()=>{const K=new ui({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});x.compare(K)||V()})}function j(){_(!1),r(mt,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(o==null||o.validate("change").catch(A=>tt(A))),V()}function ee(){E.value&&(F(),m.value&&re())}function J(A){A.preventDefault(),A.stopPropagation(),I(!1),V()}function Z(A){switch(A.code){case it.enter:case it.space:A.preventDefault(),A.stopPropagation(),M(),y.value.focus();break;case it.esc:J(A);break}}function re(){g.value.focus()}function Y(){g.value.blur()}return s.onMounted(()=>{n.modelValue&&(B.value=N.value)}),s.watch(()=>n.modelValue,A=>{A?A&&A!==x.value&&(C=!1,x.fromString(A)):k.value=!1}),s.watch(()=>[n.colorFormat,n.showAlpha],()=>{x.enableAlpha=n.showAlpha,x.format=n.colorFormat||x.format,x.doOnChange(),r(mt,x.value)}),s.watch(()=>N.value,A=>{B.value=A,C&&r("activeChange",A),C=!0}),s.watch(()=>x.value,()=>{!n.modelValue&&!k.value&&(k.value=!0)}),s.watch(()=>E.value,()=>{s.nextTick(()=>{var A,K,W;(A=f.value)==null||A.update(),(K=p.value)==null||K.update(),(W=v.value)==null||W.update()})}),s.provide(hf,{currentColor:N}),e({color:x,show:M,hide:F,focus:re,blur:Y}),(A,K)=>(s.openBlock(),s.createBlock(s.unref(si),{ref_key:"popper",ref:h,visible:E.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[s.unref(i).be("picker","panel"),s.unref(i).b("dropdown"),A.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:A.teleported,transition:`${s.unref(i).namespace.value}-zoom-in-top`,persistent:"",onHide:W=>I(!1)},{content:s.withCtx(()=>[s.withDirectives((s.openBlock(),s.createElementBlock("div",{onKeydown:s.withKeys(J,["esc"])},[s.createElementVNode("div",{class:s.normalizeClass(s.unref(i).be("dropdown","main-wrapper"))},[s.createVNode(Lk,{ref_key:"hue",ref:f,class:"hue-slider",color:s.unref(x),vertical:""},null,8,["color"]),s.createVNode(qk,{ref_key:"sv",ref:p,color:s.unref(x)},null,8,["color"])],2),A.showAlpha?(s.openBlock(),s.createBlock(Pk,{key:0,ref_key:"alpha",ref:v,color:s.unref(x)},null,8,["color"])):s.createCommentVNode("v-if",!0),A.predefine?(s.openBlock(),s.createBlock(zk,{key:1,ref:"predefine","enable-alpha":A.showAlpha,color:s.unref(x),colors:A.predefine},null,8,["enable-alpha","color","colors"])):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{class:s.normalizeClass(s.unref(i).be("dropdown","btns"))},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(i).be("dropdown","value"))},[s.createVNode(s.unref(Fd),{ref_key:"inputRef",ref:y,modelValue:B.value,"onUpdate:modelValue":W=>B.value=W,"validate-event":!1,size:"small",onKeyup:s.withKeys($,["enter"]),onBlur:$},null,8,["modelValue","onUpdate:modelValue","onKeyup"])],2),s.createVNode(s.unref(Ar),{class:s.normalizeClass(s.unref(i).be("dropdown","link-btn")),text:"",size:"small",onClick:j},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(s.unref(a)("el.colorpicker.clear")),1)]),_:1},8,["class"]),s.createVNode(s.unref(Ar),{plain:"",size:"small",class:s.normalizeClass(s.unref(i).be("dropdown","btn")),onClick:z},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(s.unref(a)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,["onKeydown"])),[[s.unref(of),ee]])]),default:s.withCtx(()=>[s.createElementVNode("div",s.mergeProps({id:s.unref(c),ref_key:"triggerRef",ref:g},A.$attrs,{class:s.unref(L),role:"button","aria-label":s.unref(D),"aria-labelledby":s.unref(P),"aria-description":s.unref(a)("el.colorpicker.description",{color:A.modelValue||""}),"aria-disabled":s.unref(u),tabindex:s.unref(u)?-1:A.tabindex,onKeydown:Z,onFocus:s.unref(b),onBlur:s.unref(w)}),[s.unref(u)?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(s.unref(i).be("picker","mask"))},null,2)):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{class:s.normalizeClass(s.unref(i).be("picker","trigger")),onClick:H},[s.createElementVNode("span",{class:s.normalizeClass([s.unref(i).be("picker","color"),s.unref(i).is("alpha",A.showAlpha)])},[s.createElementVNode("span",{class:s.normalizeClass(s.unref(i).be("picker","color-inner")),style:s.normalizeStyle({backgroundColor:s.unref(S)})},[s.withDirectives(s.createVNode(s.unref(yt),{class:s.normalizeClass([s.unref(i).be("picker","icon"),s.unref(i).is("icon-arrow-down")])},{default:s.withCtx(()=>[s.createVNode(s.unref(oo))]),_:1},8,["class"]),[[s.vShow,A.modelValue||k.value]]),s.withDirectives(s.createVNode(s.unref(yt),{class:s.normalizeClass([s.unref(i).be("picker","empty"),s.unref(i).is("icon-close")])},{default:s.withCtx(()=>[s.createVNode(s.unref(so))]),_:1},8,["class"]),[[s.vShow,!A.modelValue&&!k.value]])],6)],2)],2)],16,["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex","onFocus","onBlur"])]),_:1},8,["visible","popper-class","teleported","transition","onHide"]))}});var Wk=Te(Gk,[["__file","color-picker.vue"]]);const jk=dt(Wk),Yk=s.defineComponent({name:"ElContainer"}),Xk=s.defineComponent({...Yk,props:{direction:{type:String}},setup(t){const e=t,r=s.useSlots(),n=Be("container"),a=s.computed(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:r&&r.default?r.default().some(o=>{const l=o.type.name;return l==="ElHeader"||l==="ElFooter"}):!1);return(i,o)=>(s.openBlock(),s.createElementBlock("section",{class:s.normalizeClass([s.unref(n).b(),s.unref(n).is("vertical",s.unref(a))])},[s.renderSlot(i.$slots,"default")],2))}});var Zk=Te(Xk,[["__file","container.vue"]]);const Qk=s.defineComponent({name:"ElAside"}),Jk=s.defineComponent({...Qk,props:{width:{type:String,default:null}},setup(t){const e=t,r=Be("aside"),n=s.computed(()=>e.width?r.cssVarBlock({width:e.width}):{});return(a,i)=>(s.openBlock(),s.createElementBlock("aside",{class:s.normalizeClass(s.unref(r).b()),style:s.normalizeStyle(s.unref(n))},[s.renderSlot(a.$slots,"default")],6))}});var yf=Te(Jk,[["__file","aside.vue"]]);const ex=s.defineComponent({name:"ElFooter"}),tx=s.defineComponent({...ex,props:{height:{type:String,default:null}},setup(t){const e=t,r=Be("footer"),n=s.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(a,i)=>(s.openBlock(),s.createElementBlock("footer",{class:s.normalizeClass(s.unref(r).b()),style:s.normalizeStyle(s.unref(n))},[s.renderSlot(a.$slots,"default")],6))}});var bf=Te(tx,[["__file","footer.vue"]]);const rx=s.defineComponent({name:"ElHeader"}),nx=s.defineComponent({...rx,props:{height:{type:String,default:null}},setup(t){const e=t,r=Be("header"),n=s.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(a,i)=>(s.openBlock(),s.createElementBlock("header",{class:s.normalizeClass(s.unref(r).b()),style:s.normalizeStyle(s.unref(n))},[s.renderSlot(a.$slots,"default")],6))}});var wf=Te(nx,[["__file","header.vue"]]);const ax=s.defineComponent({name:"ElMain"}),ix=s.defineComponent({...ax,setup(t){const e=Be("main");return(r,n)=>(s.openBlock(),s.createElementBlock("main",{class:s.normalizeClass(s.unref(e).b())},[s.renderSlot(r.$slots,"default")],2))}});var Cf=Te(ix,[["__file","main.vue"]]);dt(Zk,{Aside:yf,Footer:bf,Header:wf,Main:Cf}),Fr(yf),Fr(bf),Fr(wf);const ox=Fr(Cf),sx=s.defineComponent({inheritAttrs:!1});function lx(t,e,r,n,a,i){return s.renderSlot(t.$slots,"default")}var cx=Te(sx,[["render",lx],["__file","collection.vue"]]);const ux=s.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function dx(t,e,r,n,a,i){return s.renderSlot(t.$slots,"default")}var fx=Te(ux,[["render",dx],["__file","collection-item.vue"]]);const hx="data-el-collection-item",px=t=>{const e=`El${t}Collection`,r=`${e}Item`,n=Symbol(e),a=Symbol(r),i={...cx,name:e,setup(){const l=s.ref(null),u=new Map,c=()=>{const d=s.unref(l);if(!d)return[];const f=Array.from(d.querySelectorAll(`[${hx}]`));return[...u.values()].sort((v,h)=>f.indexOf(v.ref)-f.indexOf(h.ref))};s.provide(n,{itemMap:u,getItems:c,collectionRef:l})}},o={...fx,name:r,setup(l,{attrs:u}){const c=s.ref(null),d=s.inject(n,void 0);s.provide(a,{collectionItemRef:c}),s.onMounted(()=>{const f=s.unref(c);f&&d.itemMap.set(f,{ref:f,...u})}),s.onBeforeUnmount(()=>{const f=s.unref(c);d.itemMap.delete(f)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:a,ElCollection:i,ElCollectionItem:o}},Nl=Ie({trigger:oi.trigger,effect:{...$t.effect,default:"light"},type:{type:ke(String)},placement:{type:ke(String),default:"bottom"},popperOptions:{type:ke(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:ke([Number,String]),default:0},maxHeight:{type:ke([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:ke(Object)},teleported:$t.teleported});Ie({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Xr}}),Ie({onKeydown:{type:ke(Function)}}),px("Dropdown");const kf=Symbol("ElSelectGroup"),di=Symbol("ElSelect");function vx(t,e){const r=s.inject(di),n=s.inject(kf,{disabled:!1}),a=s.computed(()=>d(Gr(r.props.modelValue),t.value)),i=s.computed(()=>{var v;if(r.props.multiple){const h=Gr((v=r.props.modelValue)!=null?v:[]);return!a.value&&h.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),o=s.computed(()=>t.label||(vt(t.value)?"":t.value)),l=s.computed(()=>t.value||t.label||""),u=s.computed(()=>t.disabled||e.groupDisabled||i.value),c=s.getCurrentInstance(),d=(v=[],h)=>{if(vt(t.value)){const g=r.props.valueKey;return v&&v.some(y=>s.toRaw(_r(y,g))===_r(h,g))}else return v&&v.includes(h)},f=()=>{!t.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(c.proxy))},p=v=>{const h=new RegExp(P1(v),"i");e.visible=h.test(o.value)||t.created};return s.watch(()=>o.value,()=>{!t.created&&!r.props.remote&&r.setSelected()}),s.watch(()=>t.value,(v,h)=>{const{remote:g,valueKey:y}=r.props;if(v!==h&&(r.onOptionDestroy(h,c.proxy),r.onOptionCreate(c.proxy)),!t.created&&!g){if(y&&vt(v)&&vt(h)&&v[y]===h[y])return;r.setSelected()}}),s.watch(()=>n.disabled,()=>{e.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:o,currentValue:l,itemSelected:a,isDisabled:u,hoverItem:f,updateOption:p}}const gx=s.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const e=Be("select"),r=mo(),n=s.computed(()=>[e.be("dropdown","item"),e.is("disabled",s.unref(l)),e.is("selected",s.unref(o)),e.is("hovering",s.unref(p))]),a=s.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:i,itemSelected:o,isDisabled:l,select:u,hoverItem:c,updateOption:d}=vx(t,a),{visible:f,hover:p}=s.toRefs(a),v=s.getCurrentInstance().proxy;u.onOptionCreate(v),s.onBeforeUnmount(()=>{const g=v.value,{selected:y}=u.states,b=(u.props.multiple?y:[y]).some(w=>w.value===v.value);s.nextTick(()=>{u.states.cachedOptions.get(g)===v&&!b&&u.states.cachedOptions.delete(g)}),u.onOptionDestroy(g,v)});function h(){l.value||u.handleOptionSelect(v)}return{ns:e,id:r,containerKls:n,currentLabel:i,itemSelected:o,isDisabled:l,select:u,hoverItem:c,updateOption:d,visible:f,hover:p,selectOptionClick:h,states:a}}});function mx(t,e,r,n,a,i){return s.withDirectives((s.openBlock(),s.createElementBlock("li",{id:t.id,class:s.normalizeClass(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMouseenter:t.hoverItem,onClick:s.withModifiers(t.selectOptionClick,["stop"])},[s.renderSlot(t.$slots,"default",{},()=>[s.createElementVNode("span",null,s.toDisplayString(t.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[s.vShow,t.visible]])}var Dl=Te(gx,[["render",mx],["__file","option.vue"]]);const yx=s.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=s.inject(di),e=Be("select"),r=s.computed(()=>t.props.popperClass),n=s.computed(()=>t.props.multiple),a=s.computed(()=>t.props.fitInputWidth),i=s.ref("");function o(){var l;i.value=`${(l=t.selectRef)==null?void 0:l.offsetWidth}px`}return s.onMounted(()=>{o(),Dr(t.selectRef,o)}),{ns:e,minWidth:i,popperClass:r,isMultiple:n,isFitInputWidth:a}}});function bx(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:s.normalizeStyle({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(t.ns.be("dropdown","header"))},[s.renderSlot(t.$slots,"header")],2)):s.createCommentVNode("v-if",!0),s.renderSlot(t.$slots,"default"),t.$slots.footer?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(t.ns.be("dropdown","footer"))},[s.renderSlot(t.$slots,"footer")],2)):s.createCommentVNode("v-if",!0)],6)}var wx=Te(yx,[["render",bx],["__file","select-dropdown.vue"]]);const Cx=11,kx=(t,e)=>{const{t:r}=Ya(),n=mo(),a=Be("select"),i=Be("input"),o=s.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=s.ref(null),u=s.ref(null),c=s.ref(null),d=s.ref(null),f=s.ref(null),p=s.ref(null),v=s.ref(null),h=s.ref(null),g=s.ref(null),y=s.ref(null),m=s.ref(null),b=s.ref(null),{isComposing:w,handleCompositionStart:C,handleCompositionUpdate:x,handleCompositionEnd:E}=Pd({afterComposition:q=>Q(q)}),{wrapperRef:k,isFocused:B}=ol(f,{beforeFocus(){return _.value},afterFocus(){t.automaticDropdown&&!S.value&&(S.value=!0,o.menuVisibleOnFocus=!0)},beforeBlur(q){var ce,Oe;return((ce=c.value)==null?void 0:ce.isFocusInsideContent(q))||((Oe=d.value)==null?void 0:Oe.isFocusInsideContent(q))},afterBlur(){S.value=!1,o.menuVisibleOnFocus=!1}}),S=s.ref(!1),N=s.ref(),{form:D,formItem:P}=Dn(),{inputId:L}=ii(t,{formItemContext:P}),{valueOnClear:O,isEmptyValue:I}=Kw(t),_=s.computed(()=>t.disabled||(D==null?void 0:D.disabled)),M=s.computed(()=>At(t.modelValue)?t.modelValue.length>0:!I(t.modelValue)),F=s.computed(()=>t.clearable&&!_.value&&o.inputHovering&&M.value),V=s.computed(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),H=s.computed(()=>a.is("reverse",V.value&&S.value)),$=s.computed(()=>(P==null?void 0:P.validateState)||""),z=s.computed(()=>Gu[$.value]),j=s.computed(()=>t.remote?300:0),ee=s.computed(()=>t.loading?t.loadingText||r("el.select.loading"):t.remote&&!o.inputValue&&o.options.size===0?!1:t.filterable&&o.inputValue&&o.options.size>0&&J.value===0?t.noMatchText||r("el.select.noMatch"):o.options.size===0?t.noDataText||r("el.select.noData"):null),J=s.computed(()=>Z.value.filter(q=>q.visible).length),Z=s.computed(()=>{const q=Array.from(o.options.values()),ce=[];return o.optionValues.forEach(Oe=>{const ze=q.findIndex(Tr=>Tr.value===Oe);ze>-1&&ce.push(q[ze])}),ce.length>=q.length?ce:q}),re=s.computed(()=>Array.from(o.cachedOptions.values())),Y=s.computed(()=>{const q=Z.value.filter(ce=>!ce.created).some(ce=>ce.currentLabel===o.inputValue);return t.filterable&&t.allowCreate&&o.inputValue!==""&&!q}),A=()=>{t.filterable&&Ft(t.filterMethod)||t.filterable&&t.remote&&Ft(t.remoteMethod)||Z.value.forEach(q=>{var ce;(ce=q.updateOption)==null||ce.call(q,o.inputValue)})},K=Nn(),W=s.computed(()=>["small"].includes(K.value)?"small":"default"),oe=s.computed({get(){return S.value&&ee.value!==!1},set(q){S.value=q}}),he=s.computed(()=>{if(t.multiple&&!Yr(t.modelValue))return Gr(t.modelValue).length===0&&!o.inputValue;const q=At(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||Yr(q)?!o.inputValue:!0}),ne=s.computed(()=>{var q;const ce=(q=t.placeholder)!=null?q:r("el.select.placeholder");return t.multiple||!M.value?ce:o.selectedLabel}),se=s.computed(()=>Ts?null:"mouseenter");s.watch(()=>t.modelValue,(q,ce)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(o.inputValue="",ue("")),de(),!ao(q,ce)&&t.validateEvent&&(P==null||P.validate("change").catch(Oe=>tt(Oe)))},{flush:"post",deep:!0}),s.watch(()=>S.value,q=>{q?ue(o.inputValue):(o.inputValue="",o.previousQuery=null,o.isBeforeHide=!0),e("visible-change",q)}),s.watch(()=>o.options.entries(),()=>{var q;if(!et)return;const ce=((q=l.value)==null?void 0:q.querySelectorAll("input"))||[];(!t.filterable&&!t.defaultFirstOption&&!Yr(t.modelValue)||!Array.from(ce).includes(document.activeElement))&&de(),t.defaultFirstOption&&(t.filterable||t.remote)&&J.value&&pe()},{flush:"post"}),s.watch(()=>o.hoveringIndex,q=>{gt(q)&&q>-1?N.value=Z.value[q]||{}:N.value={},Z.value.forEach(ce=>{ce.hover=N.value===ce})}),s.watchEffect(()=>{o.isBeforeHide||A()});const ue=q=>{o.previousQuery===q||w.value||(o.previousQuery=q,t.filterable&&Ft(t.filterMethod)?t.filterMethod(q):t.filterable&&t.remote&&Ft(t.remoteMethod)&&t.remoteMethod(q),t.defaultFirstOption&&(t.filterable||t.remote)&&J.value?s.nextTick(pe):s.nextTick(Ne))},pe=()=>{const q=Z.value.filter(ze=>ze.visible&&!ze.disabled&&!ze.states.groupDisabled),ce=q.find(ze=>ze.created),Oe=q[0];o.hoveringIndex=ge(Z.value,ce||Oe)},de=()=>{if(t.multiple)o.selectedLabel="";else{const ce=At(t.modelValue)?t.modelValue[0]:t.modelValue,Oe=me(ce);o.selectedLabel=Oe.currentLabel,o.selected=[Oe];return}const q=[];Yr(t.modelValue)||Gr(t.modelValue).forEach(ce=>{q.push(me(ce))}),o.selected=q},me=q=>{let ce;const Oe=Ns(q).toLowerCase()==="object",ze=Ns(q).toLowerCase()==="null",Tr=Ns(q).toLowerCase()==="undefined";for(let qr=o.cachedOptions.size-1;qr>=0;qr--){const rr=re.value[qr];if(Oe?_r(rr.value,t.valueKey)===_r(q,t.valueKey):rr.value===q){ce={value:q,currentLabel:rr.currentLabel,get isDisabled(){return rr.isDisabled}};break}}if(ce)return ce;const yn=Oe?q.label:!ze&&!Tr?q:"";return{value:q,currentLabel:yn}},Ne=()=>{o.hoveringIndex=Z.value.findIndex(q=>o.selected.some(ce=>_t(ce)===_t(q)))},De=()=>{o.selectionWidth=u.value.getBoundingClientRect().width},Ee=()=>{o.calculatorWidth=p.value.getBoundingClientRect().width},Pe=()=>{o.collapseItemWidth=m.value.getBoundingClientRect().width},te=()=>{var q,ce;(ce=(q=c.value)==null?void 0:q.updatePopper)==null||ce.call(q)},T=()=>{var q,ce;(ce=(q=d.value)==null?void 0:q.updatePopper)==null||ce.call(q)},R=()=>{o.inputValue.length>0&&!S.value&&(S.value=!0),ue(o.inputValue)},Q=q=>{if(o.inputValue=q.target.value,t.remote)G();else return R()},G=Ru(()=>{R()},j.value),U=q=>{ao(t.modelValue,q)||e(js,q)},ie=q=>E1(q,ce=>!o.disabledOptions.has(ce)),X=q=>{if(t.multiple&&q.code!==it.delete&&q.target.value.length<=0){const ce=Gr(t.modelValue).slice(),Oe=ie(ce);if(Oe<0)return;const ze=ce[Oe];ce.splice(Oe,1),e(mt,ce),U(ce),e("remove-tag",ze)}},ae=(q,ce)=>{const Oe=o.selected.indexOf(ce);if(Oe>-1&&!_.value){const ze=Gr(t.modelValue).slice();ze.splice(Oe,1),e(mt,ze),U(ze),e("remove-tag",ce.value)}q.stopPropagation(),rt()},we=q=>{q.stopPropagation();const ce=t.multiple?[]:O.value;if(t.multiple)for(const Oe of o.selected)Oe.isDisabled&&ce.push(Oe.value);e(mt,ce),U(ce),o.hoveringIndex=-1,S.value=!1,e("clear"),rt()},Ce=q=>{var ce;if(t.multiple){const Oe=Gr((ce=t.modelValue)!=null?ce:[]).slice(),ze=ge(Oe,q.value);ze>-1?Oe.splice(ze,1):(t.multipleLimit<=0||Oe.length<t.multipleLimit)&&Oe.push(q.value),e(mt,Oe),U(Oe),q.created&&ue(""),t.filterable&&!t.reserveKeyword&&(o.inputValue="")}else e(mt,q.value),U(q.value),S.value=!1;rt(),!S.value&&s.nextTick(()=>{Se(q)})},ge=(q=[],ce)=>{if(!vt(ce))return q.indexOf(ce);const Oe=t.valueKey;let ze=-1;return q.some((Tr,yn)=>s.toRaw(_r(Tr,Oe))===_r(ce,Oe)?(ze=yn,!0):!1),ze},Se=q=>{var ce,Oe,ze,Tr,yn;const za=At(q)?q[0]:q;let qr=null;if(za!=null&&za.value){const rr=Z.value.filter(bn=>bn.value===za.value);rr.length>0&&(qr=rr[0].$el)}if(c.value&&qr){const rr=(Tr=(ze=(Oe=(ce=c.value)==null?void 0:ce.popperRef)==null?void 0:Oe.contentRef)==null?void 0:ze.querySelector)==null?void 0:Tr.call(ze,`.${a.be("dropdown","wrap")}`);rr&&L1(rr,qr)}(yn=b.value)==null||yn.handleScroll()},ve=q=>{o.options.set(q.value,q),o.cachedOptions.set(q.value,q),q.disabled&&o.disabledOptions.set(q.value,q)},ye=(q,ce)=>{o.options.get(q)===ce&&o.options.delete(q)},Ge=s.computed(()=>{var q,ce;return(ce=(q=c.value)==null?void 0:q.popperRef)==null?void 0:ce.contentRef}),Re=()=>{o.isBeforeHide=!1,s.nextTick(()=>Se(o.selected))},rt=()=>{var q;(q=f.value)==null||q.focus()},nt=()=>{var q;(q=f.value)==null||q.blur()},Qe=q=>{we(q)},Ot=()=>{S.value=!1,B.value&&nt()},ut=()=>{o.inputValue.length>0?o.inputValue="":S.value=!1},ht=()=>{_.value||(Ts&&(o.inputHovering=!0),o.menuVisibleOnFocus?o.menuVisibleOnFocus=!1:S.value=!S.value)},Wt=()=>{S.value?Z.value[o.hoveringIndex]&&Ce(Z.value[o.hoveringIndex]):ht()},_t=q=>vt(q.value)?_r(q.value,t.valueKey):q.value,Lt=s.computed(()=>Z.value.filter(q=>q.visible).every(q=>q.disabled)),tr=s.computed(()=>t.multiple?t.collapseTags?o.selected.slice(0,t.maxCollapseTags):o.selected:[]),dr=s.computed(()=>t.multiple?t.collapseTags?o.selected.slice(t.maxCollapseTags):[]:[]),Kt=q=>{if(!S.value){S.value=!0;return}if(!(o.options.size===0||o.filteredOptionsCount===0||w.value)&&!Lt.value){q==="next"?(o.hoveringIndex++,o.hoveringIndex===o.options.size&&(o.hoveringIndex=0)):q==="prev"&&(o.hoveringIndex--,o.hoveringIndex<0&&(o.hoveringIndex=o.options.size-1));const ce=Z.value[o.hoveringIndex];(ce.disabled===!0||ce.states.groupDisabled===!0||!ce.visible)&&Kt(q),s.nextTick(()=>Se(N.value))}},Je=()=>{if(!u.value)return 0;const q=window.getComputedStyle(u.value);return Number.parseFloat(q.gap||"6px")},at=s.computed(()=>{const q=Je();return{maxWidth:`${m.value&&t.maxCollapseTags===1?o.selectionWidth-o.collapseItemWidth-q:o.selectionWidth}px`}}),pt=s.computed(()=>({maxWidth:`${o.selectionWidth}px`})),mn=s.computed(()=>({width:`${Math.max(o.calculatorWidth,Cx)}px`}));return Dr(u,De),Dr(p,Ee),Dr(g,te),Dr(k,te),Dr(y,T),Dr(m,Pe),s.onMounted(()=>{de()}),{inputId:L,contentId:n,nsSelect:a,nsInput:i,states:o,isFocused:B,expanded:S,optionsArray:Z,hoverOption:N,selectSize:K,filteredOptionsCount:J,resetCalculatorWidth:Ee,updateTooltip:te,updateTagTooltip:T,debouncedOnInputChange:G,onInput:Q,deletePrevTag:X,deleteTag:ae,deleteSelected:we,handleOptionSelect:Ce,scrollToOption:Se,hasModelValue:M,shouldShowPlaceholder:he,currentPlaceholder:ne,mouseEnterEventName:se,showClose:F,iconComponent:V,iconReverse:H,validateState:$,validateIcon:z,showNewOption:Y,updateOptions:A,collapseTagSize:W,setSelected:de,selectDisabled:_,emptyText:ee,handleCompositionStart:C,handleCompositionUpdate:x,handleCompositionEnd:E,onOptionCreate:ve,onOptionDestroy:ye,handleMenuEnter:Re,focus:rt,blur:nt,handleClearClick:Qe,handleClickOutside:Ot,handleEsc:ut,toggleMenu:ht,selectOption:Wt,getValueKey:_t,navigateOptions:Kt,dropdownMenuVisible:oe,showTagList:tr,collapseTagList:dr,tagStyle:at,collapseTagStyle:pt,inputStyle:mn,popperRef:Ge,inputRef:f,tooltipRef:c,tagTooltipRef:d,calculatorRef:p,prefixRef:v,suffixRef:h,selectRef:l,wrapperRef:k,selectionRef:u,scrollbarRef:b,menuRef:g,tagMenuRef:y,collapseItemRef:m}};var xx=s.defineComponent({name:"ElOptions",setup(t,{slots:e}){const r=s.inject(di);let n=[];return()=>{var a,i;const o=(a=e.default)==null?void 0:a.call(e),l=[];function u(c){At(c)&&c.forEach(d=>{var f,p,v,h;const g=(f=(d==null?void 0:d.type)||{})==null?void 0:f.name;g==="ElOptionGroup"?u(!St(d.children)&&!At(d.children)&&Ft((p=d.children)==null?void 0:p.default)?(v=d.children)==null?void 0:v.default():d.children):g==="ElOption"?l.push((h=d.props)==null?void 0:h.value):At(d.children)&&u(d.children)})}return o.length&&u((i=o[0])==null?void 0:i.children),ao(l,n)||(n=l,r&&(r.states.optionValues=l)),o}}});const Ex=Ie({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:sa,effect:{type:ke(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:ke(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:$t.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Xr,default:Gs},fitInputWidth:Boolean,suffixIcon:{type:Xr,default:oo},tagType:{...xl.type,default:"info"},tagEffect:{...xl.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:ke(String),values:fo,default:"bottom-start"},fallbackPlacements:{type:ke(Array),default:["bottom-start","top-start","right","left"]},appendTo:String,...Hw,...Qr(["ariaLabel"])}),xf="ElSelect",Sx=s.defineComponent({name:xf,componentName:xf,components:{ElSelectMenu:wx,ElOption:Dl,ElOptions:xx,ElTag:fk,ElScrollbar:m2,ElTooltip:si,ElIcon:yt},directives:{ClickOutside:of},props:Ex,emits:[mt,js,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const r=s.computed(()=>{const{modelValue:i,multiple:o}=t,l=o?[]:void 0;return At(i)?o?i:l:o?l:i}),n=s.reactive({...s.toRefs(t),modelValue:r}),a=kx(n,e);return s.provide(di,s.reactive({props:n,states:a.states,optionsArray:a.optionsArray,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy,selectRef:a.selectRef,setSelected:a.setSelected})),{...a,modelValue:r}}});function Tx(t,e,r,n,a,i){const o=s.resolveComponent("el-tag"),l=s.resolveComponent("el-tooltip"),u=s.resolveComponent("el-icon"),c=s.resolveComponent("el-option"),d=s.resolveComponent("el-options"),f=s.resolveComponent("el-scrollbar"),p=s.resolveComponent("el-select-menu"),v=s.resolveDirective("click-outside");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{ref:"selectRef",class:s.normalizeClass([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),[s.toHandlerKey(t.mouseEnterEventName)]:h=>t.states.inputHovering=!0,onMouseleave:h=>t.states.inputHovering=!1},[s.createVNode(l,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,onBeforeShow:t.handleMenuEnter,onHide:h=>t.states.isBeforeHide=!1},{default:s.withCtx(()=>{var h;return[s.createElementVNode("div",{ref:"wrapperRef",class:s.normalizeClass([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:s.withModifiers(t.toggleMenu,["prevent"])},[t.$slots.prefix?(s.openBlock(),s.createElementBlock("div",{key:0,ref:"prefixRef",class:s.normalizeClass(t.nsSelect.e("prefix"))},[s.renderSlot(t.$slots,"prefix")],2)):s.createCommentVNode("v-if",!0),s.createElementVNode("div",{ref:"selectionRef",class:s.normalizeClass([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?s.renderSlot(t.$slots,"tag",{key:0},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.showTagList,g=>(s.openBlock(),s.createElementBlock("div",{key:t.getValueKey(g),class:s.normalizeClass(t.nsSelect.e("selected-item"))},[s.createVNode(o,{closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:s.normalizeStyle(t.tagStyle),onClose:y=>t.deleteTag(y,g)},{default:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass(t.nsSelect.e("tags-text"))},[s.renderSlot(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[s.createTextVNode(s.toDisplayString(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(s.openBlock(),s.createBlock(l,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:s.withCtx(()=>[s.createElementVNode("div",{ref:"collapseItemRef",class:s.normalizeClass(t.nsSelect.e("selected-item"))},[s.createVNode(o,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:s.normalizeStyle(t.collapseTagStyle)},{default:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass(t.nsSelect.e("tags-text"))}," + "+s.toDisplayString(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:s.withCtx(()=>[s.createElementVNode("div",{ref:"tagMenuRef",class:s.normalizeClass(t.nsSelect.e("selection"))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.collapseTagList,g=>(s.openBlock(),s.createElementBlock("div",{key:t.getValueKey(g),class:s.normalizeClass(t.nsSelect.e("selected-item"))},[s.createVNode(o,{class:"in-tooltip",closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:y=>t.deleteTag(y,g)},{default:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass(t.nsSelect.e("tags-text"))},[s.renderSlot(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[s.createTextVNode(s.toDisplayString(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):s.createCommentVNode("v-if",!0)]):s.createCommentVNode("v-if",!0),t.selectDisabled?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[s.withDirectives(s.createElementVNode("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":g=>t.states.inputValue=g,type:"text",name:t.name,class:s.normalizeClass([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:s.normalizeStyle(t.inputStyle),role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((h=t.hoverOption)==null?void 0:h.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[s.withKeys(s.withModifiers(g=>t.navigateOptions("next"),["stop","prevent"]),["down"]),s.withKeys(s.withModifiers(g=>t.navigateOptions("prev"),["stop","prevent"]),["up"]),s.withKeys(s.withModifiers(t.handleEsc,["stop","prevent"]),["esc"]),s.withKeys(s.withModifiers(t.selectOption,["stop","prevent"]),["enter"]),s.withKeys(s.withModifiers(t.deletePrevTag,["stop"]),["delete"])],onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onInput:t.onInput,onClick:s.withModifiers(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[s.vModelText,t.states.inputValue]]),t.filterable?(s.openBlock(),s.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:s.normalizeClass(t.nsSelect.e("input-calculator")),textContent:s.toDisplayString(t.states.inputValue)},null,10,["textContent"])):s.createCommentVNode("v-if",!0)],2)),t.shouldShowPlaceholder?(s.openBlock(),s.createElementBlock("div",{key:2,class:s.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?s.renderSlot(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[s.createElementVNode("span",null,s.toDisplayString(t.currentPlaceholder),1)]):(s.openBlock(),s.createElementBlock("span",{key:1},s.toDisplayString(t.currentPlaceholder),1))],2)):s.createCommentVNode("v-if",!0)],2),s.createElementVNode("div",{ref:"suffixRef",class:s.normalizeClass(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(s.openBlock(),s.createBlock(u,{key:0,class:s.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0),t.showClose&&t.clearIcon?(s.openBlock(),s.createBlock(u,{key:1,class:s.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onClick"])):s.createCommentVNode("v-if",!0),t.validateState&&t.validateIcon?(s.openBlock(),s.createBlock(u,{key:2,class:s.normalizeClass([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.validateIcon)))]),_:1},8,["class"])):s.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:s.withCtx(()=>[s.createVNode(p,{ref:"menuRef"},{default:s.withCtx(()=>[t.$slots.header?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(t.nsSelect.be("dropdown","header")),onClick:s.withModifiers(()=>{},["stop"])},[s.renderSlot(t.$slots,"header")],10,["onClick"])):s.createCommentVNode("v-if",!0),s.withDirectives(s.createVNode(f,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:s.normalizeClass([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:s.withCtx(()=>[t.showNewOption?(s.openBlock(),s.createBlock(c,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):s.createCommentVNode("v-if",!0),s.createVNode(d,null,{default:s.withCtx(()=>[s.renderSlot(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[s.vShow,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(t.nsSelect.be("dropdown","loading"))},[s.renderSlot(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(s.openBlock(),s.createElementBlock("div",{key:2,class:s.normalizeClass(t.nsSelect.be("dropdown","empty"))},[s.renderSlot(t.$slots,"empty",{},()=>[s.createElementVNode("span",null,s.toDisplayString(t.emptyText),1)])],2)):s.createCommentVNode("v-if",!0),t.$slots.footer?(s.openBlock(),s.createElementBlock("div",{key:3,class:s.normalizeClass(t.nsSelect.be("dropdown","footer")),onClick:s.withModifiers(()=>{},["stop"])},[s.renderSlot(t.$slots,"footer")],10,["onClick"])):s.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","onBeforeShow","onHide"])],16,["onMouseleave"])),[[v,t.handleClickOutside,t.popperRef]])}var Bx=Te(Sx,[["render",Tx],["__file","select.vue"]]);const Nx=s.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Be("select"),r=s.ref(null),n=s.getCurrentInstance(),a=s.ref([]);s.provide(kf,s.reactive({...s.toRefs(t)}));const i=s.computed(()=>a.value.some(c=>c.visible===!0)),o=c=>{var d,f;return((d=c.type)==null?void 0:d.name)==="ElOption"&&!!((f=c.component)!=null&&f.proxy)},l=c=>{const d=Gr(c),f=[];return d.forEach(p=>{var v,h;o(p)?f.push(p.component.proxy):(v=p.children)!=null&&v.length?f.push(...l(p.children)):(h=p.component)!=null&&h.subTree&&f.push(...l(p.component.subTree))}),f},u=()=>{a.value=l(n.subTree)};return s.onMounted(()=>{u()}),Tg(r,u,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:i,ns:e}}});function Dx(t,e,r,n,a,i){return s.withDirectives((s.openBlock(),s.createElementBlock("ul",{ref:"groupRef",class:s.normalizeClass(t.ns.be("group","wrap"))},[s.createElementVNode("li",{class:s.normalizeClass(t.ns.be("group","title"))},s.toDisplayString(t.label),3),s.createElementVNode("li",null,[s.createElementVNode("ul",{class:s.normalizeClass(t.ns.b("group"))},[s.renderSlot(t.$slots,"default")],2)])],2)),[[s.vShow,t.visible]])}var Ef=Te(Nx,[["render",Dx],["__file","option-group.vue"]]);const Px=dt(Bx,{Option:Dl,OptionGroup:Ef}),Ox=Fr(Dl);Fr(Ef);const _x=Ie({trigger:oi.trigger,placement:Nl.placement,disabled:oi.disabled,visible:$t.visible,transition:$t.transition,popperOptions:Nl.popperOptions,tabindex:Nl.tabindex,content:$t.content,popperStyle:$t.popperStyle,popperClass:$t.popperClass,enterable:{...$t.enterable,default:!0},effect:{...$t.effect,default:"light"},teleported:$t.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),Lx={"update:visible":t=>Qn(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Fx="onUpdate:visible",Mx=s.defineComponent({name:"ElPopover"}),Ix=s.defineComponent({...Mx,props:_x,emits:Lx,setup(t,{expose:e,emit:r}){const n=t,a=s.computed(()=>n[Fx]),i=Be("popover"),o=s.ref(),l=s.computed(()=>{var y;return(y=s.unref(o))==null?void 0:y.popperRef}),u=s.computed(()=>[{width:Jn(n.width)},n.popperStyle]),c=s.computed(()=>[i.b(),n.popperClass,{[i.m("plain")]:!!n.content}]),d=s.computed(()=>n.transition===`${i.namespace.value}-fade-in-linear`),f=()=>{var y;(y=o.value)==null||y.hide()},p=()=>{r("before-enter")},v=()=>{r("before-leave")},h=()=>{r("after-enter")},g=()=>{r("update:visible",!1),r("after-leave")};return e({popperRef:l,hide:f}),(y,m)=>(s.openBlock(),s.createBlock(s.unref(si),s.mergeProps({ref_key:"tooltipRef",ref:o},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":s.unref(c),"popper-style":s.unref(u),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":s.unref(d),"onUpdate:visible":s.unref(a),onBeforeShow:p,onBeforeHide:v,onShow:h,onHide:g}),{content:s.withCtx(()=>[y.title?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(s.unref(i).e("title")),role:"title"},s.toDisplayString(y.title),3)):s.createCommentVNode("v-if",!0),s.renderSlot(y.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(y.content),1)])]),default:s.withCtx(()=>[y.$slots.reference?s.renderSlot(y.$slots,"reference",{key:0}):s.createCommentVNode("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var Ax=Te(Ix,[["__file","popover.vue"]]);const Sf=(t,e)=>{const r=e.arg||e.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=t)};var Vx={mounted(t,e){Sf(t,e)},updated(t,e){Sf(t,e)}};const Rx=fb(Vx,"popover"),Pl=dt(Ax,{directive:Rx}),fa="$treeNodeId",Tf=function(t,e){!e||e[fa]||Object.defineProperty(e,fa,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},Ol=function(t,e){return t?e[t]:e[fa]},_l=(t,e,r)=>{const n=t.value.currentNode;r();const a=t.value.currentNode;n!==a&&e("current-change",a?a.data:null,a)},Ll=t=>{let e=!0,r=!0,n=!0;for(let a=0,i=t.length;a<i;a++){const o=t[a];(o.checked!==!0||o.indeterminate)&&(e=!1,o.disabled||(n=!1)),(o.checked!==!1||o.indeterminate)&&(r=!1)}return{all:e,none:r,allWithoutDisable:n,half:!e&&!r}},fi=function(t){if(t.childNodes.length===0||t.loading)return;const{all:e,none:r,half:n}=Ll(t.childNodes);e?(t.checked=!0,t.indeterminate=!1):n?(t.checked=!1,t.indeterminate=!0):r&&(t.checked=!1,t.indeterminate=!1);const a=t.parent;!a||a.level===0||t.store.checkStrictly||fi(a)},To=function(t,e){const r=t.store.props,n=t.data||{},a=r[e];if(typeof a=="function")return a(n,t);if(typeof a=="string")return n[a];if(typeof a>"u"){const i=n[e];return i===void 0?"":i}};let $x=0;class _n{constructor(e){this.id=$x++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const r in e)wn(e,r)&&(this[r]=e[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const e=this.store;if(!e)throw new Error("[Node]store is required!");e.registerNode(this);const r=e.props;if(r&&typeof r.isLeaf<"u"){const i=To(this,"isLeaf");typeof i=="boolean"&&(this.isLeafByUser=i)}if(e.lazy!==!0&&this.data?(this.setData(this.data),e.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&e.lazy&&e.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Array.isArray(this.data)||Tf(this,this.data),!this.data)return;const n=e.defaultExpandedKeys,a=e.key;a&&n&&n.includes(this.key)&&this.expand(null,e.autoExpandParent),a&&e.currentNodeKey!==void 0&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(e){Array.isArray(e)||Tf(this,e),this.data=e,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=To(this,"children")||[];for(let n=0,a=r.length;n<a;n++)this.insertChild({data:r[n]})}get label(){return To(this,"label")}get key(){const e=this.store.key;return this.data?this.data[e]:null}get disabled(){return To(this,"disabled")}get nextSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return e.childNodes[r+1]}return null}get previousSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return r>0?e.childNodes[r-1]:null}return null}contains(e,r=!0){return(this.childNodes||[]).some(n=>n===e||r&&n.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,r,n){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof _n)){if(!n){const a=this.getChildren(!0);a.includes(e.data)||(typeof r>"u"||r<0?a.push(e.data):a.splice(r,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=s.reactive(new _n(e)),e instanceof _n&&e.initialize()}e.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),this.updateLeafState()}insertBefore(e,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(e,n)}insertAfter(e,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(e,n)}removeChild(e){const r=this.getChildren()||[],n=r.indexOf(e.data);n>-1&&r.splice(n,1);const a=this.childNodes.indexOf(e);a>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(a,1)),this.updateLeafState()}removeChildByData(e){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===e){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(e,r){const n=()=>{if(r){let a=this.parent;for(;a.level>0;)a.expanded=!0,a=a.parent}this.expanded=!0,e&&e(),this.childNodes.forEach(a=>{a.canFocus=!0})};this.shouldLoadData()?this.loadData(a=>{Array.isArray(a)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||fi(this),n())}):n()}doCreateChildren(e,r={}){e.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(e=>{e.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0;return}this.isLeaf=!1}setChecked(e,r,n,a){if(this.indeterminate=e==="half",this.checked=e===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:o,allWithoutDisable:l}=Ll(this.childNodes);!this.isLeaf&&!o&&l&&(this.checked=!1,e=!1);const u=()=>{if(r){const c=this.childNodes;for(let p=0,v=c.length;p<v;p++){const h=c[p];a=a||e!==!1;const g=h.disabled?h.checked:a;h.setChecked(g,r,!0,a)}const{half:d,all:f}=Ll(c);f||(this.checked=f,this.indeterminate=d)}};if(this.shouldLoadData()){this.loadData(()=>{u(),fi(this)},{checked:e!==!1});return}else u()}const i=this.parent;!i||i.level===0||n||fi(i)}getChildren(e=!1){if(this.level===0)return this.data;const r=this.data;if(!r)return null;const n=this.store.props;let a="children";return n&&(a=n.children||"children"),r[a]===void 0&&(r[a]=null),e&&!r[a]&&(r[a]=[]),r[a]}updateChildren(){const e=this.getChildren()||[],r=this.childNodes.map(i=>i.data),n={},a=[];e.forEach((i,o)=>{const l=i[fa];!!l&&r.findIndex(c=>c[fa]===l)>=0?n[l]={index:o,data:i}:a.push({index:o,data:i})}),this.store.lazy||r.forEach(i=>{n[i[fa]]||this.removeChildByData(i)}),a.forEach(({index:i,data:o})=>{this.insertChild({data:o},i)}),this.updateLeafState()}loadData(e,r={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(r).length)){this.loading=!0;const n=i=>{this.childNodes=[],this.doCreateChildren(i,r),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,i)},a=()=>{this.loading=!1};this.store.load(this,n,a)}else e&&e.call(this)}eachNode(e){const r=[this];for(;r.length;){const n=r.shift();r.unshift(...n.childNodes),e(n)}}reInitChecked(){this.store.checkStrictly||fi(this)}}class zx{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const r in e)wn(e,r)&&(this[r]=e[r]);this.nodesMap={}}initialize(){if(this.root=new _n({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(e){const r=this.filterNodeMethod,n=this.lazy,a=function(i){const o=i.root?i.root.childNodes:i.childNodes;if(o.forEach(l=>{l.visible=r.call(l,e,l.data,l),a(l)}),!i.visible&&o.length){let l=!0;l=!o.some(u=>u.visible),i.root?i.root.visible=l===!1:i.visible=l===!1}e&&i.visible&&!i.isLeaf&&(!n||i.loaded)&&i.expand()};a(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(e){if(e instanceof _n)return e;const r=vt(e)?Ol(this.key,e):e;return this.nodesMap[r]||null}insertBefore(e,r){const n=this.getNode(r);n.parent.insertBefore({data:e},n)}insertAfter(e,r){const n=this.getNode(r);n.parent.insertAfter({data:e},n)}remove(e){const r=this.getNode(e);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(e,r){const n=io(r)?this.root:this.getNode(r);n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],r=this.nodesMap;e.forEach(n=>{const a=r[n];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const r=this.key;!e||!e.data||(r?e.key!==void 0&&(this.nodesMap[e.key]=e):this.nodesMap[e.id]=e)}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,r=!1){const n=[],a=function(i){(i.root?i.root.childNodes:i.childNodes).forEach(l=>{(l.checked||r&&l.indeterminate)&&(!e||e&&l.isLeaf)&&n.push(l.data),a(l)})};return a(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const e=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(i=>{i.indeterminate&&e.push(i.data),r(i)})};return r(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],r=this.nodesMap;for(const n in r)wn(r,n)&&e.push(r[n]);return e}updateChildren(e,r){const n=this.nodesMap[e];if(!n)return;const a=n.childNodes;for(let i=a.length-1;i>=0;i--){const o=a[i];this.remove(o.data)}for(let i=0,o=r.length;i<o;i++){const l=r[i];this.append(l,n.data)}}_setCheckedKeys(e,r=!1,n){const a=this._getAllNodes().sort((u,c)=>u.level-c.level),i=Object.create(null),o=Object.keys(n);a.forEach(u=>u.setChecked(!1,!1));const l=u=>{u.childNodes.forEach(c=>{var d;i[c.data[e]]=!0,(d=c.childNodes)!=null&&d.length&&l(c)})};for(let u=0,c=a.length;u<c;u++){const d=a[u],f=d.data[e].toString();if(!o.includes(f)){d.checked&&!i[f]&&d.setChecked(!1,!1);continue}if(d.childNodes.length&&l(d),d.isLeaf||this.checkStrictly){d.setChecked(!0,!1);continue}if(d.setChecked(!0,!0),r){d.setChecked(!1,!1);const v=function(h){h.childNodes.forEach(y=>{y.isLeaf||y.setChecked(!1,!1),v(y)})};v(d)}}}setCheckedNodes(e,r=!1){const n=this.key,a={};e.forEach(i=>{a[(i||{})[n]]=!0}),this._setCheckedKeys(n,r,a)}setCheckedKeys(e,r=!1){this.defaultCheckedKeys=e;const n=this.key,a={};e.forEach(i=>{a[i]=!0}),this._setCheckedKeys(n,r,a)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(e,r,n){const a=this.getNode(e);a&&a.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,r=!0){const n=e[this.key],a=this.nodesMap[n];this.setCurrentNode(a),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,r=!0){if(e==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(e);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const Hx=s.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=Be("tree"),r=s.inject("NodeInstance"),n=s.inject("RootTree");return()=>{const a=t.node,{data:i,store:o}=a;return t.renderContent?t.renderContent(s.h,{_self:r,node:a,data:i,store:o}):s.renderSlot(n.ctx.slots,"default",{node:a,data:i},()=>[s.h("span",{class:e.be("node","label")},[a.label])])}}});var Kx=Te(Hx,[["__file","tree-node-content.vue"]]);function Bf(t){const e=s.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{t.node!==n&&t.node.collapse()},children:[]};return e&&e.children.push(r),s.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(t.accordion)for(const a of r.children)a.treeNodeExpand(n)}}}const Nf=Symbol("dragEvents");function qx({props:t,ctx:e,el$:r,dropIndicator$:n,store:a}){const i=Be("tree"),o=s.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),l=({event:d,treeNode:f})=>{if(typeof t.allowDrag=="function"&&!t.allowDrag(f.node))return d.preventDefault(),!1;d.dataTransfer.effectAllowed="move";try{d.dataTransfer.setData("text/plain","")}catch{}o.value.draggingNode=f,e.emit("node-drag-start",f.node,d)},u=({event:d,treeNode:f})=>{const p=f,v=o.value.dropNode;v&&v.node.id!==p.node.id&&Sn(v.$el,i.is("drop-inner"));const h=o.value.draggingNode;if(!h||!p)return;let g=!0,y=!0,m=!0,b=!0;typeof t.allowDrop=="function"&&(g=t.allowDrop(h.node,p.node,"prev"),b=y=t.allowDrop(h.node,p.node,"inner"),m=t.allowDrop(h.node,p.node,"next")),d.dataTransfer.dropEffect=y||g||m?"move":"none",(g||y||m)&&(v==null?void 0:v.node.id)!==p.node.id&&(v&&e.emit("node-drag-leave",h.node,v.node,d),e.emit("node-drag-enter",h.node,p.node,d)),g||y||m?o.value.dropNode=p:o.value.dropNode=null,p.node.nextSibling===h.node&&(m=!1),p.node.previousSibling===h.node&&(g=!1),p.node.contains(h.node,!1)&&(y=!1),(h.node===p.node||h.node.contains(p.node))&&(g=!1,y=!1,m=!1);const w=p.$el.querySelector(`.${i.be("node","content")}`).getBoundingClientRect(),C=r.value.getBoundingClientRect();let x;const E=g?y?.25:m?.45:1:-1,k=m?y?.75:g?.55:0:1;let B=-9999;const S=d.clientY-w.top;S<w.height*E?x="before":S>w.height*k?x="after":y?x="inner":x="none";const N=p.$el.querySelector(`.${i.be("node","expand-icon")}`).getBoundingClientRect(),D=n.value;x==="before"?B=N.top-C.top:x==="after"&&(B=N.bottom-C.top),D.style.top=`${B}px`,D.style.left=`${N.right-C.left}px`,x==="inner"?Us(p.$el,i.is("drop-inner")):Sn(p.$el,i.is("drop-inner")),o.value.showDropIndicator=x==="before"||x==="after",o.value.allowDrop=o.value.showDropIndicator||b,o.value.dropType=x,e.emit("node-drag-over",h.node,p.node,d)},c=d=>{const{draggingNode:f,dropType:p,dropNode:v}=o.value;if(d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="move"),f&&v){const h={data:f.node.data};p!=="none"&&f.node.remove(),p==="before"?v.node.parent.insertBefore(h,v.node):p==="after"?v.node.parent.insertAfter(h,v.node):p==="inner"&&v.node.insertChild(h),p!=="none"&&(a.value.registerNode(h),a.value.key&&f.node.eachNode(g=>{var y;(y=a.value.nodesMap[g.data[a.value.key]])==null||y.setChecked(g.checked,!a.value.checkStrictly)})),Sn(v.$el,i.is("drop-inner")),e.emit("node-drag-end",f.node,v.node,p,d),p!=="none"&&e.emit("node-drop",f.node,v.node,p,d)}f&&!v&&e.emit("node-drag-end",f.node,null,p,d),o.value.showDropIndicator=!1,o.value.draggingNode=null,o.value.dropNode=null,o.value.allowDrop=!0};return s.provide(Nf,{treeNodeDragStart:l,treeNodeDragOver:u,treeNodeDragEnd:c}),{dragState:o}}const Ux=s.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:Ek,ElCheckbox:sk,NodeContent:Kx,ElIcon:yt,Loading:Ws},props:{node:{type:_n,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(t,e){const r=Be("tree"),{broadcastExpanded:n}=Bf(t),a=s.inject("RootTree"),i=s.ref(!1),o=s.ref(!1),l=s.ref(null),u=s.ref(null),c=s.ref(null),d=s.inject(Nf),f=s.getCurrentInstance();s.provide("NodeInstance",f),a||tt("Tree","Can not find node's tree."),t.node.expanded&&(i.value=!0,o.value=!0);const p=a.props.props.children||"children";s.watch(()=>{const S=t.node.data[p];return S&&[...S]},()=>{t.node.updateChildren()}),s.watch(()=>t.node.indeterminate,S=>{g(t.node.checked,S)}),s.watch(()=>t.node.checked,S=>{g(S,t.node.indeterminate)}),s.watch(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),s.watch(()=>t.node.expanded,S=>{s.nextTick(()=>i.value=S),S&&(o.value=!0)});const v=S=>Ol(a.props.nodeKey,S.data),h=S=>{const N=t.props.class;if(!N)return{};let D;if(Ft(N)){const{data:P}=S;D=N(P,S)}else D=N;return St(D)?{[D]:!0}:D},g=(S,N)=>{(l.value!==S||u.value!==N)&&a.ctx.emit("check-change",t.node.data,S,N),l.value=S,u.value=N},y=S=>{_l(a.store,a.ctx.emit,()=>a.store.value.setCurrentNode(t.node)),a.currentNode.value=t.node,a.props.expandOnClickNode&&b(),a.props.checkOnClickNode&&!t.node.disabled&&w(null,{target:{checked:!t.node.checked}}),a.ctx.emit("node-click",t.node.data,t.node,f,S)},m=S=>{a.instance.vnode.props.onNodeContextmenu&&(S.stopPropagation(),S.preventDefault()),a.ctx.emit("node-contextmenu",S,t.node.data,t.node,f)},b=()=>{t.node.isLeaf||(i.value?(a.ctx.emit("node-collapse",t.node.data,t.node,f),t.node.collapse()):t.node.expand(()=>{e.emit("node-expand",t.node.data,t.node,f)}))},w=(S,N)=>{t.node.setChecked(N.target.checked,!a.props.checkStrictly),s.nextTick(()=>{const D=a.store.value;a.ctx.emit("check",t.node.data,{checkedNodes:D.getCheckedNodes(),checkedKeys:D.getCheckedKeys(),halfCheckedNodes:D.getHalfCheckedNodes(),halfCheckedKeys:D.getHalfCheckedKeys()})})};return{ns:r,node$:c,tree:a,expanded:i,childNodeRendered:o,oldChecked:l,oldIndeterminate:u,getNodeKey:v,getNodeClass:h,handleSelectChange:g,handleClick:y,handleContextMenu:m,handleExpandIconClick:b,handleCheckChange:w,handleChildNodeExpand:(S,N,D)=>{n(N),a.ctx.emit("node-expand",S,N,D)},handleDragStart:S=>{a.props.draggable&&d.treeNodeDragStart({event:S,treeNode:t})},handleDragOver:S=>{S.preventDefault(),a.props.draggable&&d.treeNodeDragOver({event:S,treeNode:{$el:c.value,node:t.node}})},handleDrop:S=>{S.preventDefault()},handleDragEnd:S=>{a.props.draggable&&d.treeNodeDragEnd(S)},CaretRight:R1}}});function Gx(t,e,r,n,a,i){const o=s.resolveComponent("el-icon"),l=s.resolveComponent("el-checkbox"),u=s.resolveComponent("loading"),c=s.resolveComponent("node-content"),d=s.resolveComponent("el-tree-node"),f=s.resolveComponent("el-collapse-transition");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{ref:"node$",class:s.normalizeClass([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:s.withModifiers(t.handleClick,["stop"]),onContextmenu:t.handleContextMenu,onDragstart:s.withModifiers(t.handleDragStart,["stop"]),onDragover:s.withModifiers(t.handleDragOver,["stop"]),onDragend:s.withModifiers(t.handleDragEnd,["stop"]),onDrop:s.withModifiers(t.handleDrop,["stop"])},[s.createElementVNode("div",{class:s.normalizeClass(t.ns.be("node","content")),style:s.normalizeStyle({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(s.openBlock(),s.createBlock(o,{key:0,class:s.normalizeClass([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:s.withModifiers(t.handleExpandIconClick,["stop"])},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):s.createCommentVNode("v-if",!0),t.showCheckbox?(s.openBlock(),s.createBlock(l,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:s.withModifiers(()=>{},["stop"]),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):s.createCommentVNode("v-if",!0),t.node.loading?(s.openBlock(),s.createBlock(o,{key:2,class:s.normalizeClass([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:s.withCtx(()=>[s.createVNode(u)]),_:1},8,["class"])):s.createCommentVNode("v-if",!0),s.createVNode(c,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),s.createVNode(f,null,{default:s.withCtx(()=>[!t.renderAfterExpand||t.childNodeRendered?s.withDirectives((s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.node.childNodes,p=>(s.openBlock(),s.createBlock(d,{key:t.getNodeKey(p),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:p,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded"])),[[s.vShow,t.expanded]]):s.createCommentVNode("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[s.vShow,t.node.visible]])}var Wx=Te(Ux,[["render",Gx],["__file","tree-node.vue"]]);function jx({el$:t},e){const r=Be("tree"),n=s.shallowRef([]),a=s.shallowRef([]);s.onMounted(()=>{o()}),s.onUpdated(()=>{n.value=Array.from(t.value.querySelectorAll("[role=treeitem]")),a.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"))}),s.watch(a,l=>{l.forEach(u=>{u.setAttribute("tabindex","-1")})}),jt(t,"keydown",l=>{const u=l.target;if(!u.className.includes(r.b("node")))return;const c=l.code;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const d=n.value.indexOf(u);let f;if([it.up,it.down].includes(c)){if(l.preventDefault(),c===it.up){f=d===-1?0:d!==0?d-1:n.value.length-1;const v=f;for(;!e.value.getNode(n.value[f].dataset.key).canFocus;){if(f--,f===v){f=-1;break}f<0&&(f=n.value.length-1)}}else{f=d===-1?0:d<n.value.length-1?d+1:0;const v=f;for(;!e.value.getNode(n.value[f].dataset.key).canFocus;){if(f++,f===v){f=-1;break}f>=n.value.length&&(f=0)}}f!==-1&&n.value[f].focus()}[it.left,it.right].includes(c)&&(l.preventDefault(),u.click());const p=u.querySelector('[type="checkbox"]');[it.enter,it.space].includes(c)&&p&&(l.preventDefault(),p.click())});const o=()=>{var l;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),a.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"));const u=t.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(u.length){u[0].setAttribute("tabindex","0");return}(l=n.value[0])==null||l.setAttribute("tabindex","0")}}const Yx=s.defineComponent({name:"ElTree",components:{ElTreeNode:Wx},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:Xr}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(t,e){const{t:r}=Ya(),n=Be("tree"),a=s.inject(di,null),i=s.ref(new zx({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));i.value.initialize();const o=s.ref(i.value.root),l=s.ref(null),u=s.ref(null),c=s.ref(null),{broadcastExpanded:d}=Bf(t),{dragState:f}=qx({props:t,ctx:e,el$:u,dropIndicator$:c,store:i});jx({el$:u},i);const p=s.computed(()=>{const{childNodes:F}=o.value,V=a?a.hasFilteredOptions!==0:!1;return(!F||F.length===0||F.every(({visible:H})=>!H))&&!V});s.watch(()=>t.currentNodeKey,F=>{i.value.setCurrentNodeKey(F)}),s.watch(()=>t.defaultCheckedKeys,F=>{i.value.setDefaultCheckedKey(F)}),s.watch(()=>t.defaultExpandedKeys,F=>{i.value.setDefaultExpandedKeys(F)}),s.watch(()=>t.data,F=>{i.value.setData(F)},{deep:!0}),s.watch(()=>t.checkStrictly,F=>{i.value.checkStrictly=F});const v=F=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(F)},h=F=>Ol(t.nodeKey,F.data),g=F=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const V=i.value.getNode(F);if(!V)return[];const H=[V.data];let $=V.parent;for(;$&&$!==o.value;)H.push($.data),$=$.parent;return H.reverse()},y=(F,V)=>i.value.getCheckedNodes(F,V),m=F=>i.value.getCheckedKeys(F),b=()=>{const F=i.value.getCurrentNode();return F?F.data:null},w=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const F=b();return F?F[t.nodeKey]:null},C=(F,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(F,V)},x=(F,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(F,V)},E=(F,V,H)=>{i.value.setChecked(F,V,H)},k=()=>i.value.getHalfCheckedNodes(),B=()=>i.value.getHalfCheckedKeys(),S=(F,V=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");_l(i,e.emit,()=>{d(F),i.value.setUserCurrentNode(F,V)})},N=(F,V=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");_l(i,e.emit,()=>{d(),i.value.setCurrentNodeKey(F,V)})},D=F=>i.value.getNode(F),P=F=>{i.value.remove(F)},L=(F,V)=>{i.value.append(F,V)},O=(F,V)=>{i.value.insertBefore(F,V)},I=(F,V)=>{i.value.insertAfter(F,V)},_=(F,V,H)=>{d(V),e.emit("node-expand",F,V,H)},M=(F,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(F,V)};return s.provide("RootTree",{ctx:e,props:t,store:i,root:o,currentNode:l,instance:s.getCurrentInstance()}),s.provide(ni,void 0),{ns:n,store:i,root:o,currentNode:l,dragState:f,el$:u,dropIndicator$:c,isEmpty:p,filter:v,getNodeKey:h,getNodePath:g,getCheckedNodes:y,getCheckedKeys:m,getCurrentNode:b,getCurrentKey:w,setCheckedNodes:C,setCheckedKeys:x,setChecked:E,getHalfCheckedNodes:k,getHalfCheckedKeys:B,setCurrentNode:S,setCurrentKey:N,t:r,getNode:D,remove:P,append:L,insertBefore:O,insertAfter:I,handleNodeExpand:_,updateKeyChildren:M}}});function Xx(t,e,r,n,a,i){const o=s.resolveComponent("el-tree-node");return s.openBlock(),s.createElementBlock("div",{ref:"el$",class:s.normalizeClass([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.root.childNodes,l=>(s.openBlock(),s.createBlock(o,{key:t.getNodeKey(l),node:l,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(t.ns.e("empty-block"))},[s.renderSlot(t.$slots,"empty",{},()=>{var l;return[s.createElementVNode("span",{class:s.normalizeClass(t.ns.e("empty-text"))},s.toDisplayString((l=t.emptyText)!=null?l:t.t("el.tree.emptyText")),3)]})],2)):s.createCommentVNode("v-if",!0),s.withDirectives(s.createElementVNode("div",{ref:"dropIndicator$",class:s.normalizeClass(t.ns.e("drop-indicator"))},null,2),[[s.vShow,t.dragState.showDropIndicator]])],2)}var Zx=Te(Yx,[["render",Xx],["__file","tree.vue"]]);const Qx=dt(Zx);function Jx(t){let e;const r=s.ref(!1),n=s.reactive({...t,originalPosition:"",originalOverflow:"",visible:!1});function a(p){n.text=p}function i(){const p=n.parent,v=f.ns;if(!p.vLoadingAddClassList){let h=p.getAttribute("loading-number");h=Number.parseInt(h)-1,h?p.setAttribute("loading-number",h.toString()):(Sn(p,v.bm("parent","relative")),p.removeAttribute("loading-number")),Sn(p,v.bm("parent","hidden"))}o(),d.unmount()}function o(){var p,v;(v=(p=f.$el)==null?void 0:p.parentNode)==null||v.removeChild(f.$el)}function l(){var p;t.beforeClose&&!t.beforeClose()||(r.value=!0,clearTimeout(e),e=setTimeout(u,400),n.visible=!1,(p=t.closed)==null||p.call(t))}function u(){if(!r.value)return;const p=n.parent;r.value=!1,p.vLoadingAddClassList=void 0,i()}const c=s.defineComponent({name:"ElLoading",setup(p,{expose:v}){const{ns:h,zIndex:g}=Uw("loading");return v({ns:h,zIndex:g}),()=>{const y=n.spinner||n.svg,m=s.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[s.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),b=n.text?s.h("p",{class:h.b("text")},[n.text]):void 0;return s.h(s.Transition,{name:h.b("fade"),onAfterLeave:u},{default:s.withCtx(()=>[s.withDirectives(s.createVNode("div",{style:{backgroundColor:n.background||""},class:[h.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[s.h("div",{class:h.b("spinner")},[m,b])]),[[s.vShow,n.visible]])])})}}}),d=s.createApp(c),f=d.mount(document.createElement("div"));return{...s.toRefs(n),setText:a,removeElLoadingChild:o,close:l,handleAfterLeave:u,vm:f,get $el(){return f.$el}}}let Bo;const eE=function(t={}){if(!et)return;const e=tE(t);if(e.fullscreen&&Bo)return Bo;const r=Jx({...e,closed:()=>{var a;(a=e.closed)==null||a.call(e),e.fullscreen&&(Bo=void 0)}});rE(e,e.parent,r),Df(e,e.parent,r),e.parent.vLoadingAddClassList=()=>Df(e,e.parent,r);let n=e.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",e.parent.setAttribute("loading-number",n),e.parent.appendChild(r.$el),s.nextTick(()=>r.visible.value=e.visible),e.fullscreen&&(Bo=r),r},tE=t=>{var e,r,n,a;let i;return St(t.target)?i=(e=document.querySelector(t.target))!=null?e:document.body:i=t.target||document.body,{parent:i===document.body||t.body?document.body:i,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:i===document.body&&((r=t.fullscreen)!=null?r:!0),lock:(n=t.lock)!=null?n:!1,customClass:t.customClass||"",visible:(a=t.visible)!=null?a:!0,beforeClose:t.beforeClose,closed:t.closed,target:i}},rE=async(t,e,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,a={};if(t.fullscreen)r.originalPosition.value=ja(document.body,"position"),r.originalOverflow.value=ja(document.body,"overflow"),a.zIndex=n();else if(t.parent===document.body){r.originalPosition.value=ja(document.body,"position"),await s.nextTick();for(const i of["top","left"]){const o=i==="top"?"scrollTop":"scrollLeft";a[i]=`${t.target.getBoundingClientRect()[i]+document.body[o]+document.documentElement[o]-Number.parseInt(ja(document.body,`margin-${i}`),10)}px`}for(const i of["height","width"])a[i]=`${t.target.getBoundingClientRect()[i]}px`}else r.originalPosition.value=ja(e,"position");for(const[i,o]of Object.entries(a))r.$el.style[i]=o},Df=(t,e,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?Sn(e,n.bm("parent","relative")):Us(e,n.bm("parent","relative")),t.fullscreen&&t.lock?Us(e,n.bm("parent","hidden")):Sn(e,n.bm("parent","hidden"))},No=Symbol("ElLoading"),Pf=(t,e)=>{var r,n,a,i;const o=e.instance,l=p=>vt(e.value)?e.value[p]:void 0,u=p=>{const v=St(p)&&(o==null?void 0:o[p])||p;return v&&s.ref(v)},c=p=>u(l(p)||t.getAttribute(`element-loading-${Vg(p)}`)),d=(r=l("fullscreen"))!=null?r:e.modifiers.fullscreen,f={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:d,target:(n=l("target"))!=null?n:d?void 0:t,body:(a=l("body"))!=null?a:e.modifiers.body,lock:(i=l("lock"))!=null?i:e.modifiers.lock};t[No]={options:f,instance:eE(f)}},nE=(t,e)=>{for(const r of Object.keys(e))s.isRef(e[r])&&(e[r].value=t[r])},Fl={mounted(t,e){e.value&&Pf(t,e)},updated(t,e){const r=t[No];e.oldValue!==e.value&&(e.value&&!e.oldValue?Pf(t,e):e.value&&e.oldValue?vt(e.value)&&nE(e.value,r.options):r==null||r.instance.close())},unmounted(t){var e;(e=t[No])==null||e.instance.close(),t[No]=null}},yr=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r},aE=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""},iE={name:"ConnectionDialog",props:{connectionEntry:{type:Object,default:{}},inDrawing:{type:Boolean,default:!1},connectionExist:{type:Boolean,default:!1}},data:function(){return{tooltipId:void 0}},methods:{shadowDisplay:function(t){return this.tooltipId===t?"always":"hover"},capitalise:function(t){return aE(t)},handleTooltip:function(t){this.tooltipId=this.tooltipId===t?void 0:t,this.$emit("featureTooltip",this.tooltipId)}}},Ml=t=>(s.pushScopeId("data-v-8168ee98"),t=t(),s.popScopeId(),t),oE={class:"dialog-container"},sE=Ml(()=>s.createElementVNode("span",{class:"dialog-title"},"Finalise drawing",-1)),lE=Ml(()=>s.createElementVNode("span",{class:"dialog-title"},"Visualise connection",-1)),cE=Ml(()=>s.createElementVNode("b",null,[s.createElementVNode("span",null,"Related Features")],-1));function uE(t,e,r,n,a,i){const o=Ar,l=HC,u=El,c=Sl,d=WC;return s.openBlock(),s.createElementBlock("div",oE,[s.createVNode(u,null,{default:s.withCtx(()=>[s.createVNode(c,null,{default:s.withCtx(()=>[r.inDrawing?(s.openBlock(),s.createBlock(u,{key:0},{default:s.withCtx(()=>[sE,s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(o,{type:"primary",plain:"",onClick:e[0]||(e[0]=f=>t.$emit("confirmDrawn",!0))},{default:s.withCtx(()=>[s.createTextVNode(" Confirm ")]),_:1}),s.createVNode(o,{type:"primary",plain:"",onClick:e[1]||(e[1]=f=>t.$emit("cancelDrawn",!0))},{default:s.withCtx(()=>[s.createTextVNode(" Cancel ")]),_:1})]),_:1})]),_:1})):(s.openBlock(),s.createBlock(u,{key:1},{default:s.withCtx(()=>[lE,s.createVNode(o,{type:"primary",plain:"",onClick:e[2]||(e[2]=f=>t.$emit("dialogDisplay",!1))},{default:s.withCtx(()=>[s.createTextVNode(" Close ")]),_:1})]),_:1}))]),_:1})]),_:1}),r.connectionExist?(s.openBlock(),s.createBlock(u,{key:0},{default:s.withCtx(()=>[s.createVNode(c,null,{default:s.withCtx(()=>[cE,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.connectionEntry,(f,p)=>(s.openBlock(),s.createBlock(u,{key:p},{default:s.withCtx(()=>[s.createVNode(d,{shadow:i.shadowDisplay(p),onClick:v=>i.handleTooltip(p)},{default:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(i.capitalise(f.label)),1)]),_:2},1032,["shadow","onClick"])]),_:2},1024))),128))]),_:1})]),_:1})):s.createCommentVNode("",!0)])}const dE=yr(iE,[["render",uE],["__scopeId","data-v-8168ee98"]]),Of=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r},fE=["xlink:href"],hE={__name:"SvgIcon",props:{icon:{type:String,required:!0},spin:{type:Boolean,default:!1}},setup(t){return(e,r)=>(s.openBlock(),s.createElementBlock("svg",{class:s.normalizeClass(["map-icon",{"map-icon-spin":t.spin}])},[s.createElementVNode("use",{"xlink:href":`#${t.icon}`},null,8,fE)],2))}},pE=Of(hE,[["__scopeId","data-v-e172d5ff"]]),_f=`<?xml version="1.0" encoding="UTF-8"?>
21
21
  <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
22
22
  <title>2horpanel</title>
23
23
  <g id="2horpanel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
@@ -32,7 +32,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,curr
32
32
  <line x1="18.5" y1="12" x2="5.5" y2="12" id="Line-10" stroke="#FFFFFF" stroke-linecap="square"></line>
33
33
  </g>
34
34
  </g>
35
- </svg>`,Ff=`<?xml version="1.0" encoding="UTF-8"?>
35
+ </svg>`,Lf=`<?xml version="1.0" encoding="UTF-8"?>
36
36
  <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
37
37
  <title>2vertpanel</title>
38
38
  <g id="2vertpanel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
@@ -47,7 +47,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,curr
47
47
  <line x1="12" y1="7.5" x2="12" y2="16.5" id="Line-6" stroke="#FFFFFF" stroke-linecap="square"></line>
48
48
  </g>
49
49
  </g>
50
- </svg>`,Lf=`<?xml version="1.0" encoding="UTF-8"?>
50
+ </svg>`,Ff=`<?xml version="1.0" encoding="UTF-8"?>
51
51
  <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
52
52
  <title>3panel</title>
53
53
  <g id="3panel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
@@ -114,7 +114,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,curr
114
114
  <line x1="9.5" y1="16" x2="9.5" y2="7" id="Line-6" stroke="#FFFFFF" stroke-linecap="square"></line>
115
115
  </g>
116
116
  </g>
117
- </svg>`,Rf=`<?xml version="1.0" encoding="UTF-8"?>
117
+ </svg>`,Vf=`<?xml version="1.0" encoding="UTF-8"?>
118
118
  <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
119
119
  <title>4panel</title>
120
120
  <g id="4panel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
@@ -131,7 +131,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,curr
131
131
  <line x1="18.5" y1="13.8" x2="5.5" y2="13.8" id="Line-10" stroke="#FFFFFF" stroke-linecap="square"></line>
132
132
  </g>
133
133
  </g>
134
- </svg>`,Vf=`<?xml version="1.0" encoding="UTF-8"?>
134
+ </svg>`,Rf=`<?xml version="1.0" encoding="UTF-8"?>
135
135
  <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
136
136
  <title>changeBckgd</title>
137
137
  <g id="changeBckgd" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
@@ -426,27 +426,27 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,curr
426
426
  <line x1="9" y1="9.5" x2="12" y2="9.5" id="Line-6-Copy-2" stroke="#FFFFFF" stroke-width="2" stroke-linecap="square"></line>
427
427
  </g>
428
428
  </g>
429
- </svg>`,dh=(t,e,r,n)=>{const a=["title","desc","defs","style"],i=["width","height"],o=n||[];let l=document.createElement("div");l.innerHTML=t,a.map(c=>{const d=l.querySelector(c);d&&d.remove()}),i.map(c=>{l.querySelector("svg").removeAttribute(c)}),n&&o.map(c=>{Object.values(l.querySelectorAll(`[${c}]`)).map(d=>{d.removeAttribute(c)})});const u=l.innerHTML;return l=null,u},fh=t=>[[/<\?xml[\s\S]*?>/gi,""],[/<!doctype[\s\S]*?>/gi,""],[/<!--.*-->/gi,""],[/\<([A-Za-z]+)([^\>]*)\/\>/g,"<$1$2></$1>"],[/\s+/g," "],[/\> \</g,"><"]].reduce((e,r)=>"".replace.apply(e,r),t).trim(),vE=!0,gE=!0,mE=["fill"],Ml=Object.assign({"/assets/icons/2horpanel.svg":_f,"/assets/icons/2vertpanel.svg":Ff,"/assets/icons/3panel.svg":Lf,"/assets/icons/4panel.svg":Mf,"/assets/icons/5panel.svg":If,"/assets/icons/6panel.svg":Af,"/assets/icons/6panelVertical.svg":Rf,"/assets/icons/changeBckgd.svg":Vf,"/assets/icons/close-no-bk.svg":$f,"/assets/icons/close.svg":zf,"/assets/icons/closeFullScreen.svg":Hf,"/assets/icons/comment.svg":Kf,"/assets/icons/connection.svg":qf,"/assets/icons/dock.svg":Uf,"/assets/icons/drawLine.svg":Gf,"/assets/icons/drawPoint.svg":Wf,"/assets/icons/drawPolygon.svg":jf,"/assets/icons/drawTrash.svg":Yf,"/assets/icons/fitWindow.svg":Xf,"/assets/icons/fullScreen.svg":Zf,"/assets/icons/help.svg":Qf,"/assets/icons/magnifyingGlass.svg":Jf,"/assets/icons/noun-filter.svg":eh,"/assets/icons/openMap.svg":th,"/assets/icons/pause.svg":rh,"/assets/icons/permalink.svg":nh,"/assets/icons/play.svg":ah,"/assets/icons/resetZoom.svg":ih,"/assets/icons/singlepanel.svg":oh,"/assets/icons/tooltips.svg":sh,"/assets/icons/undock.svg":lh,"/assets/icons/zoomIn.svg":ch,"/assets/icons/zoomOut.svg":uh});Object.keys(Ml).map(t=>{const e=dh(Ml[t],vE,gE,mE),r=t.replace(/^.+\/(\w+).svg$/,"$1");return fh(e).replace("<svg",`<symbol id="${r}"`).replace("svg>","symbol>")}).join(`
430
- `);const Il=Object.assign({"/assets/icons/2horpanel.svg":_f,"/assets/icons/2vertpanel.svg":Ff,"/assets/icons/3panel.svg":Lf,"/assets/icons/4panel.svg":Mf,"/assets/icons/5panel.svg":If,"/assets/icons/6panel.svg":Af,"/assets/icons/6panelVertical.svg":Rf,"/assets/icons/changeBckgd.svg":Vf,"/assets/icons/close-no-bk.svg":$f,"/assets/icons/close.svg":zf,"/assets/icons/closeFullScreen.svg":Hf,"/assets/icons/comment.svg":Kf,"/assets/icons/connection.svg":qf,"/assets/icons/dock.svg":Uf,"/assets/icons/drawLine.svg":Gf,"/assets/icons/drawPoint.svg":Wf,"/assets/icons/drawPolygon.svg":jf,"/assets/icons/drawTrash.svg":Yf,"/assets/icons/fitWindow.svg":Xf,"/assets/icons/fullScreen.svg":Zf,"/assets/icons/help.svg":Qf,"/assets/icons/magnifyingGlass.svg":Jf,"/assets/icons/noun-filter.svg":eh,"/assets/icons/openMap.svg":th,"/assets/icons/pause.svg":rh,"/assets/icons/permalink.svg":nh,"/assets/icons/play.svg":ah,"/assets/icons/resetZoom.svg":ih,"/assets/icons/singlepanel.svg":oh,"/assets/icons/tooltips.svg":sh,"/assets/icons/undock.svg":lh,"/assets/icons/zoomIn.svg":ch,"/assets/icons/zoomOut.svg":uh}),yE=Object.keys(Il).map(t=>{const e=dh(Il[t]),r=t.replace(/^.+\/(\w+).svg$/,"$1");return fh(e).replace("<svg",`<symbol id="${r}"`).replace("svg>","symbol>")}),bE={name:"MapSvgSpriteColor",svgContext:Il,svgSprite:yE.join(`
431
- `)},wE=["innerHTML"];function CE(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("svg",{width:"0",height:"0",style:{display:"none"},innerHTML:t.$options.svgSprite},null,8,wE)}const kE=Of(bE,[["render",CE]]),xE=(t,e)=>{let r,n,a,i,o,l;e.style.left="",e.style.top="",e.addEventListener("mousedown",c=>{c.preventDefault(),r=e.offsetLeft,n=e.offsetTop,a=c.clientX,i=c.clientY,e.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",()=>{e.removeEventListener("mousemove",u,!1)},!1)},!1);function u(c){c.preventDefault(),o=r-(a-c.clientX),l=n-(i-c.clientY),e.style.left=`${o}px`,e.style.top=`${l}px`}},EE={name:"DrawToolbar",components:{MapSvgIcon:pE,MapSvgSpriteColor:kE},props:{mapCanvas:{type:Object,default:void 0},toolbarOptions:{type:Array,default:["Edit","Delete","Point","LineString","Polygon","Connection"]},drawnType:{type:String,default:"All tools"},activeDrawTool:{required:!0},activeDrawMode:{required:!0},newlyDrawnEntry:{type:Object,default:{}},connectionEntry:{type:Object,default:{}},hoverVisibilities:{type:Array,required:!0,default:[{value:!1,ref:"editPopover"},{value:!1,ref:"deletePopover"},{value:!1,ref:"pointPopover"},{value:!1,ref:"lineStringPopover"},{value:!1,ref:"polygonPopover"},{value:!1,ref:"connectionPopover"}]}},data:function(){return{toolbarIcons:[{name:"Edit",active:!1,disabled:!1},{name:"Delete",active:!1,disabled:!1},{name:"Point",active:!1,disabled:!1},{name:"LineString",active:!1,disabled:!1},{name:"Polygon",active:!1,disabled:!1},{name:"Connection",active:!1,disabled:!0}],connectionDisplay:!1,dialogPosition:{offsetX:0,offsetY:0,x:void 0,y:void 0}}},computed:{showAllToolIcons:function(){return this.drawnType==="All tools"||this.drawnType==="None"},showEditModeIcon:function(){return this.toolbarOptions.includes("Edit")},showDeleteModeIcon:function(){return this.toolbarOptions.includes("Delete")},showDrawPointIcon:function(){return this.toolbarOptions.includes("Point")&&(this.showAllToolIcons||this.drawnType==="Point")},showDrawLineStringIcon:function(){return this.toolbarOptions.includes("LineString")&&(this.showAllToolIcons||this.drawnType==="LineString")},showDrawPolygonIcon:function(){return this.toolbarOptions.includes("Polygon")&&(this.showAllToolIcons||this.drawnType==="Polygon")},showConnectionIcon:function(){return this.toolbarOptions.includes("Connection")&&this.toolbarOptions.includes("LineString")&&(this.showAllToolIcons||this.drawnType==="LineString")},inDrawing:function(){return this.activeDrawTool!==void 0},newlyDrawnExist:function(){return Object.keys(this.newlyDrawnEntry).length>0},connectionExist:function(){return Object.keys(this.connectionEntry).length>0}},watch:{drawnType:function(){this.disabledToolbarConnectionIcon(!0)},activeDrawMode:function(t){this.updateToolbarIcons(t),t==="Delete"&&(this.connectionDisplay=!1)},activeDrawTool:function(t){this.updateToolbarIcons(t),t||(this.connectionDisplay=!1)},newlyDrawnExist:function(t){t&&(this.connectionDisplay=!0)},connectionExist:function(t){this.disabledToolbarConnectionIcon(!t),t||(this.connectionDisplay=!1)},connectionDisplay:function(t){this.activeToolbarConnectionIcon(t),t?this.dialogCssHacks():this.$emit("featureTooltip",void 0)},dialogPosition:{handler:function(){const t=this.$el.getBoundingClientRect();this.dialogPosition.offsetX=t.x,this.dialogPosition.offsetY=t.y},deep:!0,once:!0}},methods:{iconDisabled:function(t){return this.toolbarIcons.filter(e=>e.name===t)[0].disabled},modeClickEvent:function(t){if(!this.iconDisabled(t)){const e=this.activeDrawMode===t?void 0:t;this.$emit("clickToolbar","mode",e)}},toolClickEvent:function(t){if(!this.iconDisabled(t)){const e=this.activeDrawTool===t?void 0:t;this.$emit("clickToolbar","tool",e)}},connectionClickEvent:function(){!this.iconDisabled("Connection")&&!this.newlyDrawnExist&&(this.connectionDisplay=!this.connectionDisplay)},updateToolbarIcons:function(t){this.toolbarIcons.map(e=>{e.name===t?e.active=!0:e.active=!1}),this.toolbarIcons.filter(e=>e.name!=="Connection"&&e.name!==t).map(e=>{t?e.disabled=!0:e.disabled=!1}),this.toolbarCssHacks()},disabledToolbarConnectionIcon:function(t){this.toolbarIcons.filter(e=>e.name==="Connection").map(e=>{t?e.disabled=!0:e.disabled=!1,this.activeDrawMode==="Delete"&&(e.disabled=!0)}),this.toolbarCssHacks()},activeToolbarConnectionIcon:function(t){this.toolbarIcons.filter(e=>e.name==="Connection").map(e=>{t?e.active=!0:e.active=!1}),this.toolbarCssHacks()},toolbarCssHacks:function(){this.$nextTick(()=>{this.toolbarIcons.map(t=>{const e=this.$el.querySelector(`.draw${t.name}`);e&&(t.active?e.classList.add("active"):e.classList.remove("active"),t.disabled?e.classList.add("disabled"):e.classList.remove("disabled"))})})},dialogCssHacks:function(){this.$nextTick(()=>{const t=this.$el.querySelector(".connection-dialog");xE(this.mapCanvas.containerHTML,t);let e,r;const n=this.mapCanvas.containerHTML.getBoundingClientRect(),a=t.getBoundingClientRect();this.dialogPosition.x>n.width/2?e=this.dialogPosition.x-a.width:e=this.dialogPosition.x,this.dialogPosition.y>n.height/2?r=this.dialogPosition.y-a.height:r=this.dialogPosition.y,t.style.transform=`translate(${e-this.dialogPosition.offsetX}px, ${r-this.dialogPosition.offsetY}px)`})},hoverIndex:function(t){return this.hoverVisibilities.findIndex(e=>e.ref===t)},showTooltip:function(t){this.$emit("showTooltip",t)},hideTooltip:function(t){this.$emit("hideTooltip",t)},dialogPopUpPositionHandler:function(t){t.preventDefault(),this.dialogPosition.x=t.clientX,this.dialogPosition.y=t.clientY,this.activeDrawTool==="Point"&&this.dialogCssHacks()}},mounted:function(){this.$nextTick(()=>{this.toolbarCssHacks(),this.mapCanvas&&this.mapCanvas.containerHTML.querySelector(this.mapCanvas.class).addEventListener("click",this.dialogPopUpPositionHandler,!1)})},destroyed:function(){this.mapCanvas&&this.mapCanvas.containerHTML.querySelector(this.mapCanvas.class).removeEventListener("click",this.dialogPopUpPositionHandler,!1)}},SE={class:"toolbar-container"},TE={class:"toolbar-icons"};function BE(t,e,r,n,a,i){const o=s.resolveComponent("map-svg-sprite-color"),l=s.resolveComponent("map-svg-icon"),u=Pl,c=dE;return s.openBlock(),s.createElementBlock("div",SE,[s.createVNode(o),s.createElementVNode("div",TE,[i.showEditModeIcon?(s.openBlock(),s.createBlock(u,{key:0,content:"Edit Mode",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("editPopover")].value,ref:"editPopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"comment",class:"icon-button drawEdit",onClick:e[0]||(e[0]=d=>i.modeClickEvent("Edit")),onMouseover:e[1]||(e[1]=d=>i.showTooltip(i.hoverIndex("editPopover"))),onMouseout:e[2]||(e[2]=d=>i.hideTooltip(i.hoverIndex("editPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showDeleteModeIcon?(s.openBlock(),s.createBlock(u,{key:1,content:"Delete Mode",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("deletePopover")].value,ref:"deletePopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"drawTrash",class:"icon-button drawDelete",onClick:e[3]||(e[3]=d=>i.modeClickEvent("Delete")),onMouseover:e[4]||(e[4]=d=>i.showTooltip(i.hoverIndex("deletePopover"))),onMouseout:e[5]||(e[5]=d=>i.hideTooltip(i.hoverIndex("deletePopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showDrawPointIcon?(s.openBlock(),s.createBlock(u,{key:2,content:"Draw Point",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("pointPopover")].value,ref:"pointPopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"drawPoint",class:"icon-button drawPoint",onClick:e[6]||(e[6]=d=>i.toolClickEvent("Point")),onMouseover:e[7]||(e[7]=d=>i.showTooltip(i.hoverIndex("pointPopover"))),onMouseout:e[8]||(e[8]=d=>i.hideTooltip(i.hoverIndex("pointPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showDrawLineStringIcon?(s.openBlock(),s.createBlock(u,{key:3,content:"Draw LineString",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("lineStringPopover")].value,ref:"drawLinePopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"drawLine",class:"icon-button drawLineString",onClick:e[9]||(e[9]=d=>i.toolClickEvent("LineString")),onMouseover:e[10]||(e[10]=d=>i.showTooltip(i.hoverIndex("lineStringPopover"))),onMouseout:e[11]||(e[11]=d=>i.hideTooltip(i.hoverIndex("lineStringPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showDrawPolygonIcon?(s.openBlock(),s.createBlock(u,{key:4,content:"Draw Polygon",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("polygonPopover")].value,ref:"polygonPopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"drawPolygon",class:"icon-button drawPolygon",onClick:e[12]||(e[12]=d=>i.toolClickEvent("Polygon")),onMouseover:e[13]||(e[13]=d=>i.showTooltip(i.hoverIndex("polygonPopover"))),onMouseout:e[14]||(e[14]=d=>i.hideTooltip(i.hoverIndex("polygonPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showConnectionIcon?(s.openBlock(),s.createBlock(u,{key:5,content:"Connectivity",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("connectionPopover")].value,ref:"connectionPopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"connection",class:"icon-button drawConnection",onClick:e[15]||(e[15]=d=>i.connectionClickEvent()),onMouseover:e[16]||(e[16]=d=>i.showTooltip(i.hoverIndex("connectionPopover"))),onMouseout:e[17]||(e[17]=d=>i.hideTooltip(i.hoverIndex("connectionPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0)]),r.mapCanvas?s.withDirectives((s.openBlock(),s.createBlock(c,{key:0,class:"connection-dialog",connectionEntry:r.connectionEntry,inDrawing:i.inDrawing,connectionExist:i.connectionExist,onDialogDisplay:e[18]||(e[18]=d=>i.connectionClickEvent()),onConfirmDrawn:e[19]||(e[19]=d=>t.$emit("confirmDrawn",d)),onCancelDrawn:e[20]||(e[20]=d=>t.$emit("cancelDrawn",d)),onFeatureTooltip:e[21]||(e[21]=d=>t.$emit("featureTooltip",d))},null,8,["connectionEntry","inDrawing","connectionExist"])),[[s.vShow,t.connectionDisplay]]):s.createCommentVNode("",!0)])}const NE=yr(EE,[["render",BE],["__scopeId","data-v-6ac1a744"]]),DE={name:"HelpModeDialog",props:{multiflatmapRef:{type:Object,default:null},flatmapRef:{type:Object,default:null},scaffoldRef:{type:Object,default:null},lastItem:{type:Boolean,default:!1,required:!1}},mounted:function(){this.toggleHelpModeHighlight(!0),this.toggleTooltipHighlight()},unmounted:function(){this.toggleHelpModeHighlight(!1)},watch:{lastItem:function(t){t&&this.toggleTooltipHighlight()}},methods:{showNext:function(){this.$emit("show-next")},finishHelpMode:function(){this.$emit("finish-help-mode")},toggleTooltipPinHighlight:function(){const t=this.getCurrentFlatmap();this.resetHighlightedItems(),this.$nextTick(()=>{var i;const e=t.querySelectorAll(".maplibregl-marker"),r=t.querySelector(".flatmap-popup-popper"),n=((i=r==null?void 0:r.style)==null?void 0:i.transform)||"",a=this.extractMarkerPosition(n);e.forEach(o=>{const l=o.style.transform;this.extractMarkerPosition(l)===a&&o.classList.add("in-help-highlight")})})},toggleTooltipHighlight:function(){this.resetHighlightedItems(),this.$nextTick(()=>{document.querySelectorAll('.el-popper:not([style*="none"])').forEach(e=>{const r=e.classList.contains("flatmap-popper"),n=e.classList.contains("el-fade-in-linear-enter-active");(r||n)&&this.toggleHighlight(e)})})},toggleHighlight:function(t){const e=(t==null?void 0:t.id)||"",r=document.querySelector(`[aria-describedby="${e}"]`);r&&r.classList.add("in-help-highlight")},resetHighlightedItems:function(){document.querySelectorAll(".in-help-highlight").forEach(e=>{e.classList.remove("in-help-highlight")})},getCurrentScaffold:function(){var e;return((e=this.scaffoldRef)==null?void 0:e.$el)||null},getCurrentMultiflatmap:function(){var e;return((e=this.multiflatmapRef)==null?void 0:e.$el)||null},getCurrentFlatmap:function(){var r;const t=this.flatmapRef||((r=this.multiflatmapRef)==null?void 0:r.getCurrentFlatmap());return(t==null?void 0:t.$el)||null},toggleHelpModeHighlight:function(t){const e=this.getCurrentMultiflatmap(),r=this.getCurrentFlatmap(),n=this.getCurrentScaffold(),a=document.querySelectorAll(".in-help-highlight");e&&(t?e.classList.add("in-help"):e.classList.remove("in-help")),r&&(t?r.classList.add("in-help"):r.classList.remove("in-help")),n&&(t?n.classList.add("in-help"):n.classList.remove("in-help")),t||a.forEach(i=>{i.classList.remove("in-help-highlight")})},extractMarkerPosition:function(t){const e=/translate\((.*?)\)/g,r=t.match(e);return r?r[r.length-1].slice(10,-1):""}}},Al=t=>(s.pushScopeId("data-v-3efb89fb"),t=t(),s.popScopeId(),t),PE=Al(()=>s.createElementVNode("h4",null,"Help Mode",-1)),OE=Al(()=>s.createElementVNode("p",null,[s.createTextVNode(" All caught up! "),s.createElementVNode("br"),s.createTextVNode(" Click 'Help' to restart. ")],-1)),_E=Al(()=>s.createElementVNode("p",null,'Click "Next" to see the next item.',-1));function FE(t,e,r,n,a,i){const o=Ar;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["help-mode-dialog",{finish:r.lastItem}])},[PE,r.lastItem?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[OE,s.createElementVNode("div",null,[s.createVNode(o,{class:"button",onClick:i.finishHelpMode},{default:s.withCtx(()=>[s.createTextVNode(" Finish ")]),_:1},8,["onClick"])])],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[_E,s.createElementVNode("div",null,[s.createVNode(o,{class:"button",onClick:i.showNext},{default:s.withCtx(()=>[s.createTextVNode(" Next ")]),_:1},8,["onClick"]),s.createVNode(o,{class:"button secondary",onClick:i.finishHelpMode},{default:s.withCtx(()=>[s.createTextVNode(" Exit Help Mode ")]),_:1},8,["onClick"])])],64))],2)}const LE=yr(DE,[["render",FE],["__scopeId","data-v-3efb89fb"]]);function ME(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(a){a(r)}),(n=t.get("*"))&&n.slice().map(function(a){a(e,r)})}}}const hi=new ME,IE={name:"ExternalResourceCard",props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:s.shallowRef(ab)}},methods:{capitalise:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},openUrl:function(t){hi.emit("open-pubmed-url",t),window.open(t,"_blank")}}},AE={class:"resource-container"};function RE(t,e,r,n,a,i){const o=Ar;return s.openBlock(),s.createElementBlock("div",AE,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.resources,l=>(s.openBlock(),s.createElementBlock("div",{key:l.id,class:"resource"},[l.id==="pubmed"?(s.openBlock(),s.createBlock(o,{key:0,class:"button",id:"open-pubmed-button",icon:t.ElIconNotebook,onClick:u=>i.openUrl(l.url)},{default:s.withCtx(()=>[s.createTextVNode(" Open publications in PubMed ")]),_:2},1032,["icon","onClick"])):s.createCommentVNode("",!0)]))),128))])}const VE=yr(IE,[["render",RE],["__scopeId","data-v-4f8d8b0f"]]),$E=t=>t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),zE=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""},HE={name:"ProvenancePopup",props:{tooltipEntry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},inject:["getFeaturesAlert"],data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},computed:{featuresAlert(){return this.getFeaturesAlert()},resources:function(){let t=[];return this.tooltipEntry&&this.tooltipEntry.hyperlinks&&(t=this.tooltipEntry.hyperlinks),t},originDescription:function(){return this.tooltipEntry&&this.tooltipEntry.title&&this.tooltipEntry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let t="Studied in";return this.tooltipEntry.provenanceTaxonomyLabel.forEach(e=>{t+=` ${e},`}),t=t.slice(0,-1),t+=" species",t}},methods:{titleCase:function(t){return $E(t)},capitalise:function(t){return zE(t)},openUrl:function(t){window.open(t,"_blank")},openAll:function(){hi.emit("onActionClick",{type:"Facets",labels:this.tooltipEntry.componentsWithDatasets.map(t=>t.name)})},openAxons:function(){hi.emit("onActionClick",{type:"Facets",labels:this.tooltipEntry.destinationsWithDatasets.map(t=>t.name)})},openDendrites:function(){hi.emit("onActionClick",{type:"Facets",labels:this.tooltipEntry.originsWithDatasets.map(t=>t.name)})},pubmedSearchUrlUpdate:function(t){this.pubmedSearchUrl=t}}},ha=t=>(s.pushScopeId("data-v-ef9a0f6d"),t=t(),s.popScopeId(),t),KE={key:0,class:"main"},qE={key:0,class:"block"},UE={class:"title"},GE={key:0,class:"subtitle"},WE={key:1,class:"block"},jE={class:"title"},YE={key:2,class:"attribute-title-container"},XE=ha(()=>s.createElementVNode("span",{class:"attribute-title"},"Alert",-1)),ZE={style:{"word-break":"keep-all"}},QE={class:"content-container scrollbar"},JE={key:0,class:"block"},eS={class:"attribute-title-container"},tS=ha(()=>s.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),rS={style:{"word-break":"keep-all"}},nS=ha(()=>s.createElementVNode("i",null,"Origin",-1)),aS=["origin-item-label"],iS={key:0,class:"separator"},oS={key:1,class:"block"},sS=ha(()=>s.createElementVNode("div",{class:"attribute-title-container"},[s.createElementVNode("div",{class:"attribute-title"},"Components")],-1)),lS=["component-item-label"],cS={key:0,class:"separator"},uS={key:2,class:"block"},dS={class:"attribute-title-container"},fS=ha(()=>s.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),hS=ha(()=>s.createElementVNode("span",{style:{"word-break":"keep-all"}},[s.createElementVNode("i",null,"Destination"),s.createTextVNode(" is where the axons terminate ")],-1)),pS=["destination-item-label"],vS={key:0,class:"separator"};function gS(t,e,r,n,a,i){const o=ub,l=yt,u=Pl,c=Ku,d=oo,f=Ar,p=VE,v=Pf;return r.tooltipEntry?s.withDirectives((s.openBlock(),s.createElementBlock("div",KE,[r.tooltipEntry.title?(s.openBlock(),s.createElementBlock("div",qE,[s.createElementVNode("div",UE,s.toDisplayString(i.capitalise(r.tooltipEntry.title)),1),r.tooltipEntry.provenanceTaxonomyLabel&&r.tooltipEntry.provenanceTaxonomyLabel.length>0?(s.openBlock(),s.createElementBlock("div",GE,s.toDisplayString(i.provSpeciesDescription),1)):s.createCommentVNode("",!0)])):(s.openBlock(),s.createElementBlock("div",WE,[s.createElementVNode("div",jE,s.toDisplayString(r.tooltipEntry.featureId),1)])),i.featuresAlert?(s.openBlock(),s.createElementBlock("div",YE,[XE,s.createVNode(u,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:s.withCtx(()=>[s.createVNode(l,{class:"info"},{default:s.withCtx(()=>[s.createVNode(o)]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("span",ZE,s.toDisplayString(i.featuresAlert),1)]),_:1})])):s.createCommentVNode("",!0),s.withDirectives(s.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:e[0]||(e[0]=h=>t.showDetails=!1)},[s.createTextVNode(" Hide path information "),s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(c)]),_:1})],512),[[s.vShow,t.showDetails]]),s.withDirectives(s.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:e[1]||(e[1]=h=>t.showDetails=!0)},[s.createTextVNode(" Show path information "),s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(d)]),_:1})],512),[[s.vShow,!t.showDetails]]),s.createVNode(s.Transition,{name:"slide-fade"},{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",QE,[s.createTextVNode(s.toDisplayString(r.tooltipEntry.paths)+" ",1),r.tooltipEntry.origins&&r.tooltipEntry.origins.length>0?(s.openBlock(),s.createElementBlock("div",JE,[s.createElementVNode("div",eS,[tS,s.createVNode(u,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:s.withCtx(()=>[s.createVNode(l,{class:"info"},{default:s.withCtx(()=>[s.createVNode(o)]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("span",rS,[nS,s.createTextVNode(" "+s.toDisplayString(i.originDescription),1)])]),_:1})]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.tooltipEntry.origins,(h,g)=>(s.openBlock(),s.createElementBlock("div",{class:"attribute-content","origin-item-label":h,key:h},[s.createTextVNode(s.toDisplayString(i.capitalise(h))+" ",1),g!=r.tooltipEntry.origins.length-1?(s.openBlock(),s.createElementBlock("div",iS)):s.createCommentVNode("",!0)],8,aS))),128)),s.withDirectives(s.createVNode(f,{class:"button",id:"open-dendrites-button",onClick:i.openDendrites},{default:s.withCtx(()=>[s.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[s.vShow,r.tooltipEntry.originsWithDatasets&&r.tooltipEntry.originsWithDatasets.length>0]])])):s.createCommentVNode("",!0),r.tooltipEntry.components&&r.tooltipEntry.components.length>0?(s.openBlock(),s.createElementBlock("div",oS,[sS,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.tooltipEntry.components,(h,g)=>(s.openBlock(),s.createElementBlock("div",{class:"attribute-content","component-item-label":h,key:h},[s.createTextVNode(s.toDisplayString(i.capitalise(h))+" ",1),g!=r.tooltipEntry.components.length-1?(s.openBlock(),s.createElementBlock("div",cS)):s.createCommentVNode("",!0)],8,lS))),128))])):s.createCommentVNode("",!0),r.tooltipEntry.destinations&&r.tooltipEntry.destinations.length>0?(s.openBlock(),s.createElementBlock("div",uS,[s.createElementVNode("div",dS,[fS,s.createVNode(u,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:s.withCtx(()=>[s.createVNode(l,{class:"info"},{default:s.withCtx(()=>[s.createVNode(o)]),_:1})]),default:s.withCtx(()=>[hS]),_:1})]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.tooltipEntry.destinations,(h,g)=>(s.openBlock(),s.createElementBlock("div",{class:"attribute-content","destination-item-label":h,key:h},[s.createTextVNode(s.toDisplayString(i.capitalise(h))+" ",1),g!=r.tooltipEntry.destinations.length-1?(s.openBlock(),s.createElementBlock("div",vS)):s.createCommentVNode("",!0)],8,pS))),128)),s.withDirectives(s.createVNode(f,{class:"button",onClick:i.openAxons},{default:s.withCtx(()=>[s.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[s.vShow,r.tooltipEntry.destinationsWithDatasets&&r.tooltipEntry.destinationsWithDatasets.length>0]])])):s.createCommentVNode("",!0),s.withDirectives(s.createVNode(f,{class:"button",onClick:i.openAll},{default:s.withCtx(()=>[s.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[s.vShow,r.tooltipEntry.componentsWithDatasets&&r.tooltipEntry.componentsWithDatasets.length>0]]),s.createVNode(p,{resources:i.resources},null,8,["resources"])],512),[[s.vShow,t.showDetails]])]),_:1})])),[[v,t.loading]]):s.createCommentVNode("",!0)}const mS=yr(HE,[["render",gS],["__scopeId","data-v-ef9a0f6d"]]),yS={name:"AnnotationPopup",props:{annotationEntry:{type:Object}},inject:["$annotator","userApiKey"],data:function(){return{displayPair:{"Feature ID":"featureId",Tooltip:"label",Models:"models",Name:"name",Resource:"resourceId"},editing:!1,evidencePrefixes:["DOI:","PMID:"],evidencePrefix:"DOI:",evidence:[],authenticated:!1,newEvidence:"",comment:"",prevSubs:[],showSubmissions:!0,errorMessage:"",creator:void 0}},computed:{isEditable:function(){return this.annotationEntry.resourceId&&this.annotationEntry.featureId},isPositionUpdated:function(){return this.annotationEntry.resourceId&&this.annotationEntry.type==="updated"&&this.annotationEntry.positionUpdated},isDeleted:function(){return this.annotationEntry.resourceId&&this.annotationEntry.type==="deleted"}},methods:{evidenceEntered:function(t){t&&(this.evidence.push(this.evidencePrefix+t),this.newEvidence="")},formatTime:function(t){const e={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},updatePrevSubmissions:function(){var t;this.$annotator&&this.authenticated&&this.annotationEntry.resourceId&&this.annotationEntry.featureId&&((t=this.$annotator)==null||t.itemAnnotations(this.userApiKey,this.annotationEntry.resourceId,this.annotationEntry.featureId).then(e=>{this.prevSubs=e}).catch(e=>{console.log(e)}))},submit:function(){var t;if(this.annotationEntry.type==="updated"&&this.annotationEntry.positionUpdated?this.comment=this.comment?`Position Updated: ${this.comment}`:"Position Updated":this.annotationEntry.type==="deleted"&&(this.comment=this.comment?`Feature Deleted: ${this.comment}`:"Feature Deleted"),(this.evidence.length>0||this.comment)&&this.annotationEntry.resourceId&&this.annotationEntry.featureId){const e=[];this.evidence.forEach(n=>{if(n.includes("DOI:")){const a=n.replace("DOI:","https://doi.org/");e.push(new URL(a))}else if(n.includes("PMID:")){const a=n.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");e.push(new URL(a))}});const r={resource:this.annotationEntry.resourceId,item:Object.assign({id:this.annotationEntry.featureId},Object.fromEntries(Object.entries(this.annotationEntry).filter(([n])=>["label","models"].includes(n)))),body:{evidence:e,comment:this.comment},feature:this.annotationEntry.feature};Object.assign(r.body,this.annotationEntry.body),this.annotationEntry.type==="deleted"&&(r.feature=void 0),this.creator&&(r.creator=this.creator),(t=this.$annotator)==null||t.addAnnotation(this.userApiKey,r).then(()=>{this.$emit("annotation",r),this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(t){this.evidence.splice(t,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(t,e){t!==e&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){var t;(t=this.$annotator)==null||t.authenticate(this.userApiKey).then(e=>{e.name&&e.email&&e.canUpdate?(this.creator=e,e.orcid||(this.creator.orcid="0000-0000-0000-0000"),this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},Fn=t=>(s.pushScopeId("data-v-09c78af1"),t=t(),s.popScopeId(),t),bS={class:"block"},wS=Fn(()=>s.createElementVNode("div",{class:"title"},"Feature Annotations",-1)),CS=Fn(()=>s.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),kS=Fn(()=>s.createElementVNode("strong",null,"Evidence: ",-1)),xS=["href"],ES=Fn(()=>s.createElementVNode("strong",null,"Comment: ",-1)),SS=Fn(()=>s.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),TS=Fn(()=>s.createElementVNode("strong",null,"Evidence:",-1)),BS=Fn(()=>s.createElementVNode("strong",null,"Comment:",-1)),NS={class:"sub-title"};function DS(t,e,r,n,a,i){const o=El,l=Ku,u=yt,c=oo,d=Y1,f=W1,p=Z1,v=Sl,h=so,g=Ox,y=Px,m=Fd,b=Ar,w=ox;return s.openBlock(),s.createBlock(w,{class:"main"},{default:s.withCtx(()=>[s.createElementVNode("div",bS,[s.createVNode(o,{class:"info-field"},{default:s.withCtx(()=>[wS]),_:1}),r.annotationEntry?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.displayPair,(C,x)=>s.withDirectives((s.openBlock(),s.createBlock(o,{class:"dialog-text",key:C},{default:s.withCtx(()=>[s.createElementVNode("strong",null,s.toDisplayString(x)+": ",1),s.createTextVNode(" "+s.toDisplayString(r.annotationEntry[C]),1)]),_:2},1024)),[[s.vShow,r.annotationEntry[C]]])),128)),t.prevSubs.length>0?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.withDirectives(s.createElementVNode("div",{class:"hide",onClick:e[0]||(e[0]=C=>t.showSubmissions=!1)},[s.createTextVNode(" Hide previous submissions "),s.createVNode(u,null,{default:s.withCtx(()=>[s.createVNode(l)]),_:1})],512),[[s.vShow,t.showSubmissions]]),s.withDirectives(s.createElementVNode("div",{class:"hide",onClick:e[1]||(e[1]=C=>t.showSubmissions=!0)},[s.createTextVNode(" Show previous "+s.toDisplayString(t.prevSubs.length)+" submission(s) ",1),s.createVNode(u,null,{default:s.withCtx(()=>[s.createVNode(c)]),_:1})],512),[[s.vShow,!t.showSubmissions]]),t.showSubmissions?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(o,{class:"dialog-spacer"}),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[CS]),_:1}),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.prevSubs,(C,x)=>(s.openBlock(),s.createElementBlock("div",{class:"entry",key:x},[s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[s.createElementVNode("strong",null,s.toDisplayString(i.formatTime(C.created)),1),s.createTextVNode(" "+s.toDisplayString(C.creator.name),1)]),_:2},1024),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[kS,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(C.body.evidence,E=>(s.openBlock(),s.createBlock(o,{key:E,class:"dialog-text"},{default:s.withCtx(()=>[s.createElementVNode("a",{href:E,target:"_blank"},s.toDisplayString(E),9,xS)]),_:2},1024))),128))]),_:2},1024),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[ES,s.createTextVNode(" "+s.toDisplayString(C.body.comment),1)]),_:2},1024)]))),128))],64)):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0),t.authenticated?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[i.isEditable?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(o,{class:"dialog-spacer"}),t.editing?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[SS]),_:1}),i.isDeleted?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[TS]),_:1}),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.evidence,(C,x)=>(s.openBlock(),s.createBlock(o,{key:C},{default:s.withCtx(()=>[s.createVNode(v,{span:20},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.evidence[x]),1)]),_:2},1024),s.createVNode(v,{span:4},{default:s.withCtx(()=>[s.createVNode(u,{class:"standard-icon"},{default:s.withCtx(()=>[s.createVNode(h,{onClick:E=>i.removeEvidence(x)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),s.createVNode(o,null,{default:s.withCtx(()=>[s.createVNode(m,{size:"small",placeholder:"Enter",modelValue:t.newEvidence,"onUpdate:modelValue":e[4]||(e[4]=C=>t.newEvidence=C),onChange:e[5]||(e[5]=C=>i.evidenceEntered(C))},{prepend:s.withCtx(()=>[s.createVNode(y,{teleported:!1,modelValue:t.evidencePrefix,"onUpdate:modelValue":e[3]||(e[3]=C=>t.evidencePrefix=C),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.evidencePrefixes,C=>(s.openBlock(),s.createBlock(g,{key:C,label:C,value:C},{default:s.withCtx(()=>[s.createVNode(o,null,{default:s.withCtx(()=>[s.createVNode(v,{span:12},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(C),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})],64)),s.createVNode(o,null,{default:s.withCtx(()=>[BS]),_:1}),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[s.createVNode(m,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:t.comment,"onUpdate:modelValue":e[6]||(e[6]=C=>t.comment=C)},null,8,["modelValue"])]),_:1}),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[s.createVNode(b,{class:"button",type:"primary",plain:"",onClick:i.submit},{default:s.withCtx(()=>[s.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(s.openBlock(),s.createBlock(o,{key:0},{default:s.withCtx(()=>[s.createVNode(u,{class:"standard-icon"},{default:s.withCtx(()=>[s.createVNode(d,{onClick:e[2]||(e[2]=C=>t.editing=!0)})]),_:1}),i.isDeleted?(s.openBlock(),s.createBlock(u,{key:0,class:"standard-icon"},{default:s.withCtx(()=>[s.createVNode(f,{onClick:i.submit},null,8,["onClick"])]),_:1})):i.isPositionUpdated?(s.openBlock(),s.createBlock(u,{key:1,class:"standard-icon"},{default:s.withCtx(()=>[s.createVNode(p,{onClick:i.submit},null,8,["onClick"])]),_:1})):s.createCommentVNode("",!0)]),_:1})),t.errorMessage?(s.openBlock(),s.createBlock(o,{key:2,class:"dialog-text"},{default:s.withCtx(()=>[s.createElementVNode("strong",NS,s.toDisplayString(t.errorMessage),1)]),_:1})):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)])]),_:1})}const PS=yr(yS,[["render",DS],["__scopeId","data-v-09c78af1"]]),OS={name:"Tooltip",props:{tooltipEntry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}},mounted:function(){hi.on("onActionClick",t=>{this.$emit("onActionClick",t)})}},_S={class:"tooltip-container",id:"tooltip-container"};function FS(t,e,r,n,a,i){const o=PS,l=mS;return s.openBlock(),s.createElementBlock("div",_S,[r.annotationDisplay?(s.openBlock(),s.createBlock(o,{key:0,annotationEntry:r.annotationEntry,onAnnotation:e[0]||(e[0]=u=>t.$emit("annotation",u))},null,8,["annotationEntry"])):(s.openBlock(),s.createBlock(l,{key:1,tooltipEntry:r.tooltipEntry},null,8,["tooltipEntry"]))])}const LS=yr(OS,[["render",FS],["__scopeId","data-v-229b3988"]]),MS={name:"TreeControls",props:{mapType:{type:String,required:!0},isReady:{type:Boolean,default:!0},title:{type:String},treeData:{type:Array,default:function(){return[]}},showColourPicker:{type:Boolean,default:!1},active:{type:[String,Array],required:!0},hover:{type:[String,Array],required:!0}},data:function(){return{defaultExpandedKeys:["All"],myPopperClass:"hide-scaffold-colour-popup",tooltipVisible:!1,tooltipLabel:"",tooltipAtBottom:!1}},computed:{isFlatmap:function(){return this.mapType==="flatmap"},isScaffold:function(){return this.mapType==="scaffold"},nodeKey:function(){if(this.isFlatmap)return"key";if(this.isScaffold)return"id"},expandedKeys:function(){if(this.isFlatmap)return this.defaultExpandedKeys;if(this.isScaffold)return[]}},watch:{showColourPicker:{immediate:!0,handler:function(){this.showColourPicker?this.myPopperClass="showPicker":this.myPopperClass="hide-scaffold-colour-popup"}}},methods:{setColour:function(t,e){this.$emit("setColour",t,e)},getBackgroundStyles:function(t){return"colour"in t?{background:t.colour}:{}},nodeIsActive:function(t){return this.active===t.models},nodeIsHover:function(t){return this.hover===t.models},changeActiveByNode:function(t,e=!1){this.isFlatmap?t.models&&this.$emit("changeActive",t.models):this.isScaffold&&(t.isPrimitives||t.isRegion)&&this.$emit("changeActive",t,e)},changeHoverByNode:function(t,e=!1){this.isFlatmap?t.models&&this.$emit("changeHover",t.models):this.isScaffold&&t.isPrimitives&&this.$emit("changeHover",t,e)},checkChanged:function(t,e){if(this.isFlatmap){const r=e.checkedKeys.includes(t.key);t.key==="All"?this.$emit("checkAll",r):this.$emit("checkChanged",{key:t.key,value:r})}else this.isScaffold&&this.$emit("checkChanged",t,e)},displayTooltip:function(t,e,r){const a=r.target.closest(".el-tree-node__content"),i=a.clientWidth,o=a.getBoundingClientRect().x,l=a.querySelector(".lastChildInItem");let u=0;if(l){const d=l.getBoundingClientRect();u=d.x+d.width-o}const c=u>i;this.tooltipVisible=c&&e,this.tooltipLabel=t,this.tooltipAtBottom=.5>r.layerY/this.$refs.treeContainer.clientHeight}},unmounted:function(){this.sortedPrimitiveGroups=void 0}},IS={class:"selections-container"},AS={class:"title-text"},RS={class:"tree-container",ref:"treeContainer"},VS={class:"tooltip-text"},$S=["onClick","onMouseover","onMouseenter"],zS=["onClick","onMouseover","onMouseenter"],HS={class:"lastChildInItem"},KS={key:0,class:"node-options"};function qS(t,e,r,n,a,i){const o=Sl,l=El,u=Pl,c=jk,d=Qx,f=Pf;return s.openBlock(),s.createElementBlock("div",IS,[r.title?(s.openBlock(),s.createBlock(l,{key:0},{default:s.withCtx(()=>[s.createVNode(o,{span:12},{default:s.withCtx(()=>[s.createElementVNode("div",AS,s.toDisplayString(r.title),1)]),_:1})]),_:1})):s.createCommentVNode("",!0),s.createElementVNode("div",RS,[s.createElementVNode("div",{class:s.normalizeClass(["tree-tooltip",t.tooltipAtBottom?"bottom":""])},[s.createVNode(u,{ref:"tooltip",visible:t.tooltipVisible,placement:"top","show-arrow":!1,teleported:!1,trigger:"manual","popper-class":"tree-tooltip-popper","virtual-triggering":"",width:260},{default:s.withCtx(()=>[s.createElementVNode("div",VS,s.toDisplayString(t.tooltipLabel),1)]),_:1},8,["visible"])],2),s.withDirectives((s.openBlock(),s.createBlock(d,{ref:"regionTree","element-loading-background":"rgba(0, 0, 0, 0.3)","show-checkbox":"","node-key":i.nodeKey,data:r.treeData,"check-strictly":!1,"expand-on-click-node":!1,"render-after-expand":!1,"default-expanded-keys":i.expandedKeys,onCheck:i.checkChanged,indent:8,class:s.normalizeClass([r.mapType==="flatmap"?"hide_grandchildren_checkbox":""])},{default:s.withCtx(({node:p,data:v})=>[r.mapType==="flatmap"?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["region-tree-node",{activeItem:i.nodeIsActive(v),hoverItem:i.nodeIsHover(v)}]),onClick:h=>i.changeActiveByNode(v),onMouseover:h=>i.changeHoverByNode(v,!1),onMouseenter:h=>i.displayTooltip(p.label,!0,h),onMouseleave:e[0]||(e[0]=h=>i.displayTooltip("",!1,h))},[s.createElementVNode("div",{style:s.normalizeStyle(i.getBackgroundStyles(v)),class:"lastChildInItem"},s.toDisplayString(p.label),5)],42,$S)):r.mapType==="scaffold"?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["region-tree-node",{activeItem:r.active.includes(v.id),hoverItem:r.hover.includes(v.id)}]),onClick:h=>i.changeActiveByNode(v,!0),onMouseover:h=>i.changeHoverByNode(v,!0,h),onMouseenter:h=>i.displayTooltip(p.label,!0,h),onMouseleave:e[1]||(e[1]=h=>i.displayTooltip("",!1,h))},[v.isPrimitives?(s.openBlock(),s.createBlock(c,{key:0,class:s.normalizeClass({"show-picker":r.showColourPicker}),modelValue:v.activeColour,"onUpdate:modelValue":h=>v.activeColour=h,size:"small","popper-class":t.myPopperClass,onChange:h=>i.setColour(v,h)},null,8,["class","modelValue","onUpdate:modelValue","popper-class","onChange"])):s.createCommentVNode("",!0),s.createElementVNode("div",HS,[s.createElementVNode("span",null,s.toDisplayString(p.label),1),v.isTextureSlides?(s.openBlock(),s.createElementBlock("span",KS," (Texture) ")):s.createCommentVNode("",!0)])],42,zS)):s.createCommentVNode("",!0)]),_:1},8,["node-key","data","default-expanded-keys","onCheck","class"])),[[f,!r.isReady]])],512)])}const US=yr(MS,[["render",qS],["__scopeId","data-v-aa649eae"]]),hh="Copy to clipboard",GS="Copied!",WS="#8300bf",jS={name:"CopyToClipboard",props:{content:{type:String,default:""},theme:{type:String,default:""}},data:function(){return{textLabel:hh,autoHideTimeout:0,iconColor:WS}},methods:{copyToClipboard:async function(){let t=!0;this.autoHideTimeout=600;try{const e=this.content.replaceAll(`
432
- `,""),r=document.createElement("div");r.innerHTML=this.content;const n=r.textContent||r.innerText||"",a=new Blob([e],{type:"text/html"}),i=new Blob([n],{type:"text/plain"}),o=new ClipboardItem({"text/html":a,"text/plain":i});await navigator.clipboard.write([o])}catch(e){console.error("Error when trying to use navigator.clipboard.write()",e),t=!1}t?this.textLabel=GS:this.textLabel="Error trying to copy to clipboard!"},resetSettings:function(){this.autoHideTimeout=0,this.textLabel=hh}}},YS={class:"visually-hidden"};function XS(t,e,r,n,a,i){const o=U1,l=yt,u=Ar,c=si;return s.openBlock(),s.createBlock(c,{content:t.textLabel,placement:"bottom","hide-after":t.autoHideTimeout,effect:"clipboard-tooltip",onHide:i.resetSettings},{default:s.withCtx(()=>[s.createVNode(u,{class:s.normalizeClass(["copy-clipboard-button",r.theme]),size:"small",onClick:i.copyToClipboard},{default:s.withCtx(()=>[s.createVNode(l,{color:t.iconColor},{default:s.withCtx(()=>[s.createVNode(o)]),_:1},8,["color"]),s.createElementVNode("span",YS,s.toDisplayString(t.textLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content","hide-after","onHide"])}const ZS=yr(jS,[["render",XS],["__scopeId","data-v-de3b5311"]]);function ot(t){"@babel/helpers - typeof";return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ot(t)}function Rl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function QS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Vl(t,e,r){return e&&QS(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ph(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sr(t,e){return JS(t)||eT(t,e)||vh(t,e)||tT()}function JS(t){if(Array.isArray(t))return t}function eT(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],a=!0,i=!1,o,l;try{for(r=r.call(t);!(a=(o=r.next()).done)&&(n.push(o.value),!(e&&n.length===e));a=!0);}catch(u){i=!0,l=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function vh(t,e){if(t){if(typeof t=="string")return gh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gh(t,e)}}function gh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function tT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
429
+ </svg>`,dh=(t,e,r,n)=>{const a=["title","desc","defs","style"],i=["width","height"],o=n||[];let l=document.createElement("div");l.innerHTML=t,a.map(c=>{const d=l.querySelector(c);d&&d.remove()}),i.map(c=>{l.querySelector("svg").removeAttribute(c)}),n&&o.map(c=>{Object.values(l.querySelectorAll(`[${c}]`)).map(d=>{d.removeAttribute(c)})});const u=l.innerHTML;return l=null,u},fh=t=>[[/<\?xml[\s\S]*?>/gi,""],[/<!doctype[\s\S]*?>/gi,""],[/<!--.*-->/gi,""],[/\<([A-Za-z]+)([^\>]*)\/\>/g,"<$1$2></$1>"],[/\s+/g," "],[/\> \</g,"><"]].reduce((e,r)=>"".replace.apply(e,r),t).trim(),vE=!0,gE=!0,mE=["fill"],Il=Object.assign({"/assets/icons/2horpanel.svg":_f,"/assets/icons/2vertpanel.svg":Lf,"/assets/icons/3panel.svg":Ff,"/assets/icons/4panel.svg":Mf,"/assets/icons/5panel.svg":If,"/assets/icons/6panel.svg":Af,"/assets/icons/6panelVertical.svg":Vf,"/assets/icons/changeBckgd.svg":Rf,"/assets/icons/close-no-bk.svg":$f,"/assets/icons/close.svg":zf,"/assets/icons/closeFullScreen.svg":Hf,"/assets/icons/comment.svg":Kf,"/assets/icons/connection.svg":qf,"/assets/icons/dock.svg":Uf,"/assets/icons/drawLine.svg":Gf,"/assets/icons/drawPoint.svg":Wf,"/assets/icons/drawPolygon.svg":jf,"/assets/icons/drawTrash.svg":Yf,"/assets/icons/fitWindow.svg":Xf,"/assets/icons/fullScreen.svg":Zf,"/assets/icons/help.svg":Qf,"/assets/icons/magnifyingGlass.svg":Jf,"/assets/icons/noun-filter.svg":eh,"/assets/icons/openMap.svg":th,"/assets/icons/pause.svg":rh,"/assets/icons/permalink.svg":nh,"/assets/icons/play.svg":ah,"/assets/icons/resetZoom.svg":ih,"/assets/icons/singlepanel.svg":oh,"/assets/icons/tooltips.svg":sh,"/assets/icons/undock.svg":lh,"/assets/icons/zoomIn.svg":ch,"/assets/icons/zoomOut.svg":uh});Object.keys(Il).map(t=>{const e=dh(Il[t],vE,gE,mE),r=t.replace(/^.+\/(\w+).svg$/,"$1");return fh(e).replace("<svg",`<symbol id="${r}"`).replace("svg>","symbol>")}).join(`
430
+ `);const Al=Object.assign({"/assets/icons/2horpanel.svg":_f,"/assets/icons/2vertpanel.svg":Lf,"/assets/icons/3panel.svg":Ff,"/assets/icons/4panel.svg":Mf,"/assets/icons/5panel.svg":If,"/assets/icons/6panel.svg":Af,"/assets/icons/6panelVertical.svg":Vf,"/assets/icons/changeBckgd.svg":Rf,"/assets/icons/close-no-bk.svg":$f,"/assets/icons/close.svg":zf,"/assets/icons/closeFullScreen.svg":Hf,"/assets/icons/comment.svg":Kf,"/assets/icons/connection.svg":qf,"/assets/icons/dock.svg":Uf,"/assets/icons/drawLine.svg":Gf,"/assets/icons/drawPoint.svg":Wf,"/assets/icons/drawPolygon.svg":jf,"/assets/icons/drawTrash.svg":Yf,"/assets/icons/fitWindow.svg":Xf,"/assets/icons/fullScreen.svg":Zf,"/assets/icons/help.svg":Qf,"/assets/icons/magnifyingGlass.svg":Jf,"/assets/icons/noun-filter.svg":eh,"/assets/icons/openMap.svg":th,"/assets/icons/pause.svg":rh,"/assets/icons/permalink.svg":nh,"/assets/icons/play.svg":ah,"/assets/icons/resetZoom.svg":ih,"/assets/icons/singlepanel.svg":oh,"/assets/icons/tooltips.svg":sh,"/assets/icons/undock.svg":lh,"/assets/icons/zoomIn.svg":ch,"/assets/icons/zoomOut.svg":uh}),yE=Object.keys(Al).map(t=>{const e=dh(Al[t]),r=t.replace(/^.+\/(\w+).svg$/,"$1");return fh(e).replace("<svg",`<symbol id="${r}"`).replace("svg>","symbol>")}),bE={name:"MapSvgSpriteColor",svgContext:Al,svgSprite:yE.join(`
431
+ `)},wE=["innerHTML"];function CE(t,e,r,n,a,i){return s.openBlock(),s.createElementBlock("svg",{width:"0",height:"0",style:{display:"none"},innerHTML:t.$options.svgSprite},null,8,wE)}const kE=Of(bE,[["render",CE]]),xE=(t,e)=>{let r,n,a,i,o,l;e.style.left="",e.style.top="",e.addEventListener("mousedown",c=>{c.preventDefault(),r=e.offsetLeft,n=e.offsetTop,a=c.clientX,i=c.clientY,e.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",()=>{e.removeEventListener("mousemove",u,!1)},!1)},!1);function u(c){c.preventDefault(),o=r-(a-c.clientX),l=n-(i-c.clientY),e.style.left=`${o}px`,e.style.top=`${l}px`}},EE={name:"DrawToolbar",components:{MapSvgIcon:pE,MapSvgSpriteColor:kE},props:{mapCanvas:{type:Object,default:void 0},toolbarOptions:{type:Array,default:["Edit","Delete","Point","LineString","Polygon","Connection"]},drawnType:{type:String,default:"All tools"},activeDrawTool:{required:!0},activeDrawMode:{required:!0},newlyDrawnEntry:{type:Object,default:{}},connectionEntry:{type:Object,default:{}},hoverVisibilities:{type:Array,required:!0,default:[{value:!1,ref:"editPopover"},{value:!1,ref:"deletePopover"},{value:!1,ref:"pointPopover"},{value:!1,ref:"lineStringPopover"},{value:!1,ref:"polygonPopover"},{value:!1,ref:"connectionPopover"}]}},data:function(){return{toolbarIcons:[{name:"Edit",active:!1,disabled:!1},{name:"Delete",active:!1,disabled:!1},{name:"Point",active:!1,disabled:!1},{name:"LineString",active:!1,disabled:!1},{name:"Polygon",active:!1,disabled:!1},{name:"Connection",active:!1,disabled:!0}],connectionDisplay:!1,dialogPosition:{offsetX:0,offsetY:0,x:void 0,y:void 0}}},computed:{showAllToolIcons:function(){return this.drawnType==="All tools"||this.drawnType==="None"},showEditModeIcon:function(){return this.toolbarOptions.includes("Edit")},showDeleteModeIcon:function(){return this.toolbarOptions.includes("Delete")},showDrawPointIcon:function(){return this.toolbarOptions.includes("Point")&&(this.showAllToolIcons||this.drawnType==="Point")},showDrawLineStringIcon:function(){return this.toolbarOptions.includes("LineString")&&(this.showAllToolIcons||this.drawnType==="LineString")},showDrawPolygonIcon:function(){return this.toolbarOptions.includes("Polygon")&&(this.showAllToolIcons||this.drawnType==="Polygon")},showConnectionIcon:function(){return this.toolbarOptions.includes("Connection")&&this.toolbarOptions.includes("LineString")&&(this.showAllToolIcons||this.drawnType==="LineString")},inDrawing:function(){return this.activeDrawTool!==void 0},newlyDrawnExist:function(){return Object.keys(this.newlyDrawnEntry).length>0},connectionExist:function(){return Object.keys(this.connectionEntry).length>0}},watch:{drawnType:function(){this.disabledToolbarConnectionIcon(!0)},activeDrawMode:function(t){this.updateToolbarIcons(t),t==="Delete"&&(this.connectionDisplay=!1)},activeDrawTool:function(t){this.updateToolbarIcons(t),t||(this.connectionDisplay=!1)},newlyDrawnExist:function(t){t&&(this.connectionDisplay=!0)},connectionExist:function(t){this.disabledToolbarConnectionIcon(!t),t||(this.connectionDisplay=!1)},connectionDisplay:function(t){this.activeToolbarConnectionIcon(t),t?this.dialogCssHacks():this.$emit("featureTooltip",void 0)},dialogPosition:{handler:function(){const t=this.$el.getBoundingClientRect();this.dialogPosition.offsetX=t.x,this.dialogPosition.offsetY=t.y},deep:!0,once:!0}},methods:{iconDisabled:function(t){return this.toolbarIcons.filter(e=>e.name===t)[0].disabled},modeClickEvent:function(t){if(!this.iconDisabled(t)){const e=this.activeDrawMode===t?void 0:t;this.$emit("clickToolbar","mode",e)}},toolClickEvent:function(t){if(!this.iconDisabled(t)){const e=this.activeDrawTool===t?void 0:t;this.$emit("clickToolbar","tool",e)}},connectionClickEvent:function(){!this.iconDisabled("Connection")&&!this.newlyDrawnExist&&(this.connectionDisplay=!this.connectionDisplay)},updateToolbarIcons:function(t){this.toolbarIcons.map(e=>{e.name===t?e.active=!0:e.active=!1}),this.toolbarIcons.filter(e=>e.name!=="Connection"&&e.name!==t).map(e=>{t?e.disabled=!0:e.disabled=!1}),this.toolbarCssHacks()},disabledToolbarConnectionIcon:function(t){this.toolbarIcons.filter(e=>e.name==="Connection").map(e=>{t?e.disabled=!0:e.disabled=!1,this.activeDrawMode==="Delete"&&(e.disabled=!0)}),this.toolbarCssHacks()},activeToolbarConnectionIcon:function(t){this.toolbarIcons.filter(e=>e.name==="Connection").map(e=>{t?e.active=!0:e.active=!1}),this.toolbarCssHacks()},toolbarCssHacks:function(){this.$nextTick(()=>{this.toolbarIcons.map(t=>{const e=this.$el.querySelector(`.draw${t.name}`);e&&(t.active?e.classList.add("active"):e.classList.remove("active"),t.disabled?e.classList.add("disabled"):e.classList.remove("disabled"))})})},dialogCssHacks:function(){this.$nextTick(()=>{const t=this.$el.querySelector(".connection-dialog");xE(this.mapCanvas.containerHTML,t);let e,r;const n=this.mapCanvas.containerHTML.getBoundingClientRect(),a=t.getBoundingClientRect();this.dialogPosition.x>n.width/2?e=this.dialogPosition.x-a.width:e=this.dialogPosition.x,this.dialogPosition.y>n.height/2?r=this.dialogPosition.y-a.height:r=this.dialogPosition.y,t.style.transform=`translate(${e-this.dialogPosition.offsetX}px, ${r-this.dialogPosition.offsetY}px)`})},hoverIndex:function(t){return this.hoverVisibilities.findIndex(e=>e.ref===t)},showTooltip:function(t){this.$emit("showTooltip",t)},hideTooltip:function(t){this.$emit("hideTooltip",t)},dialogPopUpPositionHandler:function(t){t.preventDefault(),this.dialogPosition.x=t.clientX,this.dialogPosition.y=t.clientY,this.activeDrawTool==="Point"&&this.dialogCssHacks()}},mounted:function(){this.$nextTick(()=>{this.toolbarCssHacks(),this.mapCanvas&&this.mapCanvas.containerHTML.querySelector(this.mapCanvas.class).addEventListener("click",this.dialogPopUpPositionHandler,!1)})},destroyed:function(){this.mapCanvas&&this.mapCanvas.containerHTML.querySelector(this.mapCanvas.class).removeEventListener("click",this.dialogPopUpPositionHandler,!1)}},SE={class:"toolbar-container"},TE={class:"toolbar-icons"};function BE(t,e,r,n,a,i){const o=s.resolveComponent("map-svg-sprite-color"),l=s.resolveComponent("map-svg-icon"),u=Pl,c=dE;return s.openBlock(),s.createElementBlock("div",SE,[s.createVNode(o),s.createElementVNode("div",TE,[i.showEditModeIcon?(s.openBlock(),s.createBlock(u,{key:0,content:"Edit Mode",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("editPopover")].value,ref:"editPopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"comment",class:"icon-button drawEdit",onClick:e[0]||(e[0]=d=>i.modeClickEvent("Edit")),onMouseover:e[1]||(e[1]=d=>i.showTooltip(i.hoverIndex("editPopover"))),onMouseout:e[2]||(e[2]=d=>i.hideTooltip(i.hoverIndex("editPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showDeleteModeIcon?(s.openBlock(),s.createBlock(u,{key:1,content:"Delete Mode",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("deletePopover")].value,ref:"deletePopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"drawTrash",class:"icon-button drawDelete",onClick:e[3]||(e[3]=d=>i.modeClickEvent("Delete")),onMouseover:e[4]||(e[4]=d=>i.showTooltip(i.hoverIndex("deletePopover"))),onMouseout:e[5]||(e[5]=d=>i.hideTooltip(i.hoverIndex("deletePopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showDrawPointIcon?(s.openBlock(),s.createBlock(u,{key:2,content:"Draw Point",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("pointPopover")].value,ref:"pointPopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"drawPoint",class:"icon-button drawPoint",onClick:e[6]||(e[6]=d=>i.toolClickEvent("Point")),onMouseover:e[7]||(e[7]=d=>i.showTooltip(i.hoverIndex("pointPopover"))),onMouseout:e[8]||(e[8]=d=>i.hideTooltip(i.hoverIndex("pointPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showDrawLineStringIcon?(s.openBlock(),s.createBlock(u,{key:3,content:"Draw LineString",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("lineStringPopover")].value,ref:"drawLinePopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"drawLine",class:"icon-button drawLineString",onClick:e[9]||(e[9]=d=>i.toolClickEvent("LineString")),onMouseover:e[10]||(e[10]=d=>i.showTooltip(i.hoverIndex("lineStringPopover"))),onMouseout:e[11]||(e[11]=d=>i.hideTooltip(i.hoverIndex("lineStringPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showDrawPolygonIcon?(s.openBlock(),s.createBlock(u,{key:4,content:"Draw Polygon",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("polygonPopover")].value,ref:"polygonPopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"drawPolygon",class:"icon-button drawPolygon",onClick:e[12]||(e[12]=d=>i.toolClickEvent("Polygon")),onMouseover:e[13]||(e[13]=d=>i.showTooltip(i.hoverIndex("polygonPopover"))),onMouseout:e[14]||(e[14]=d=>i.hideTooltip(i.hoverIndex("polygonPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0),i.showConnectionIcon?(s.openBlock(),s.createBlock(u,{key:5,content:"Connectivity",placement:"top",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[i.hoverIndex("connectionPopover")].value,ref:"connectionPopover"},{reference:s.withCtx(()=>[s.createVNode(l,{icon:"connection",class:"icon-button drawConnection",onClick:e[15]||(e[15]=d=>i.connectionClickEvent()),onMouseover:e[16]||(e[16]=d=>i.showTooltip(i.hoverIndex("connectionPopover"))),onMouseout:e[17]||(e[17]=d=>i.hideTooltip(i.hoverIndex("connectionPopover")))})]),_:1},8,["visible"])):s.createCommentVNode("",!0)]),r.mapCanvas?s.withDirectives((s.openBlock(),s.createBlock(c,{key:0,class:"connection-dialog",connectionEntry:r.connectionEntry,inDrawing:i.inDrawing,connectionExist:i.connectionExist,onDialogDisplay:e[18]||(e[18]=d=>i.connectionClickEvent()),onConfirmDrawn:e[19]||(e[19]=d=>t.$emit("confirmDrawn",d)),onCancelDrawn:e[20]||(e[20]=d=>t.$emit("cancelDrawn",d)),onFeatureTooltip:e[21]||(e[21]=d=>t.$emit("featureTooltip",d))},null,8,["connectionEntry","inDrawing","connectionExist"])),[[s.vShow,t.connectionDisplay]]):s.createCommentVNode("",!0)])}const NE=yr(EE,[["render",BE],["__scopeId","data-v-6ac1a744"]]),DE={name:"HelpModeDialog",props:{multiflatmapRef:{type:Object,default:null},flatmapRef:{type:Object,default:null},scaffoldRef:{type:Object,default:null},lastItem:{type:Boolean,default:!1,required:!1}},mounted:function(){this.toggleHelpModeHighlight(!0),this.toggleTooltipHighlight()},unmounted:function(){this.toggleHelpModeHighlight(!1)},watch:{lastItem:function(t){t&&this.toggleTooltipHighlight()}},methods:{showNext:function(){this.$emit("show-next")},finishHelpMode:function(){this.$emit("finish-help-mode")},toggleTooltipPinHighlight:function(){const t=this.getCurrentFlatmap();this.resetHighlightedItems(),this.$nextTick(()=>{var i;const e=t.querySelectorAll(".maplibregl-marker"),r=t.querySelector(".flatmap-popup-popper"),n=((i=r==null?void 0:r.style)==null?void 0:i.transform)||"",a=this.extractMarkerPosition(n);e.forEach(o=>{const l=o.style.transform;this.extractMarkerPosition(l)===a&&o.classList.add("in-help-highlight")})})},toggleTooltipHighlight:function(){this.resetHighlightedItems(),this.$nextTick(()=>{document.querySelectorAll('.el-popper:not([style*="none"])').forEach(e=>{const r=e.classList.contains("flatmap-popper"),n=e.classList.contains("el-fade-in-linear-enter-active");(r||n)&&this.toggleHighlight(e)})})},toggleHighlight:function(t){const e=(t==null?void 0:t.id)||"",r=document.querySelector(`[aria-describedby="${e}"]`);r&&r.classList.add("in-help-highlight")},resetHighlightedItems:function(){document.querySelectorAll(".in-help-highlight").forEach(e=>{e.classList.remove("in-help-highlight")})},getCurrentScaffold:function(){var e;return((e=this.scaffoldRef)==null?void 0:e.$el)||null},getCurrentMultiflatmap:function(){var e;return((e=this.multiflatmapRef)==null?void 0:e.$el)||null},getCurrentFlatmap:function(){var r;const t=this.flatmapRef||((r=this.multiflatmapRef)==null?void 0:r.getCurrentFlatmap());return(t==null?void 0:t.$el)||null},toggleHelpModeHighlight:function(t){const e=this.getCurrentMultiflatmap(),r=this.getCurrentFlatmap(),n=this.getCurrentScaffold(),a=document.querySelectorAll(".in-help-highlight");e&&(t?e.classList.add("in-help"):e.classList.remove("in-help")),r&&(t?r.classList.add("in-help"):r.classList.remove("in-help")),n&&(t?n.classList.add("in-help"):n.classList.remove("in-help")),t||a.forEach(i=>{i.classList.remove("in-help-highlight")})},extractMarkerPosition:function(t){const e=/translate\((.*?)\)/g,r=t.match(e);return r?r[r.length-1].slice(10,-1):""}}},Vl=t=>(s.pushScopeId("data-v-3efb89fb"),t=t(),s.popScopeId(),t),PE=Vl(()=>s.createElementVNode("h4",null,"Help Mode",-1)),OE=Vl(()=>s.createElementVNode("p",null,[s.createTextVNode(" All caught up! "),s.createElementVNode("br"),s.createTextVNode(" Click 'Help' to restart. ")],-1)),_E=Vl(()=>s.createElementVNode("p",null,'Click "Next" to see the next item.',-1));function LE(t,e,r,n,a,i){const o=Ar;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["help-mode-dialog",{finish:r.lastItem}])},[PE,r.lastItem?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[OE,s.createElementVNode("div",null,[s.createVNode(o,{class:"button",onClick:i.finishHelpMode},{default:s.withCtx(()=>[s.createTextVNode(" Finish ")]),_:1},8,["onClick"])])],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[_E,s.createElementVNode("div",null,[s.createVNode(o,{class:"button",onClick:i.showNext},{default:s.withCtx(()=>[s.createTextVNode(" Next ")]),_:1},8,["onClick"]),s.createVNode(o,{class:"button secondary",onClick:i.finishHelpMode},{default:s.withCtx(()=>[s.createTextVNode(" Exit Help Mode ")]),_:1},8,["onClick"])])],64))],2)}const FE=yr(DE,[["render",LE],["__scopeId","data-v-3efb89fb"]]);function ME(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(a){a(r)}),(n=t.get("*"))&&n.slice().map(function(a){a(e,r)})}}}const hi=new ME,IE={name:"ExternalResourceCard",props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:s.shallowRef(ab)}},methods:{capitalise:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},openUrl:function(t){hi.emit("open-pubmed-url",t),window.open(t,"_blank")}}},AE={class:"resource-container"};function VE(t,e,r,n,a,i){const o=Ar;return s.openBlock(),s.createElementBlock("div",AE,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.resources,l=>(s.openBlock(),s.createElementBlock("div",{key:l.id,class:"resource"},[l.id==="pubmed"?(s.openBlock(),s.createBlock(o,{key:0,class:"button",id:"open-pubmed-button",icon:t.ElIconNotebook,onClick:u=>i.openUrl(l.url)},{default:s.withCtx(()=>[s.createTextVNode(" Open publications in PubMed ")]),_:2},1032,["icon","onClick"])):s.createCommentVNode("",!0)]))),128))])}const RE=yr(IE,[["render",VE],["__scopeId","data-v-4f8d8b0f"]]),$E=t=>t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),zE=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""},HE={name:"ProvenancePopup",props:{tooltipEntry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},inject:["getFeaturesAlert"],data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},computed:{featuresAlert(){return this.getFeaturesAlert()},resources:function(){let t=[];return this.tooltipEntry&&this.tooltipEntry.hyperlinks&&(t=this.tooltipEntry.hyperlinks),t},originDescription:function(){return this.tooltipEntry&&this.tooltipEntry.title&&this.tooltipEntry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let t="Studied in";return this.tooltipEntry.provenanceTaxonomyLabel.forEach(e=>{t+=` ${e},`}),t=t.slice(0,-1),t+=" species",t}},methods:{titleCase:function(t){return $E(t)},capitalise:function(t){return zE(t)},openUrl:function(t){window.open(t,"_blank")},openAll:function(){hi.emit("onActionClick",{type:"Facets",labels:this.tooltipEntry.componentsWithDatasets.map(t=>t.name)})},openAxons:function(){hi.emit("onActionClick",{type:"Facets",labels:this.tooltipEntry.destinationsWithDatasets.map(t=>t.name)})},openDendrites:function(){hi.emit("onActionClick",{type:"Facets",labels:this.tooltipEntry.originsWithDatasets.map(t=>t.name)})},pubmedSearchUrlUpdate:function(t){this.pubmedSearchUrl=t}}},ha=t=>(s.pushScopeId("data-v-ef9a0f6d"),t=t(),s.popScopeId(),t),KE={key:0,class:"main"},qE={key:0,class:"block"},UE={class:"title"},GE={key:0,class:"subtitle"},WE={key:1,class:"block"},jE={class:"title"},YE={key:2,class:"attribute-title-container"},XE=ha(()=>s.createElementVNode("span",{class:"attribute-title"},"Alert",-1)),ZE={style:{"word-break":"keep-all"}},QE={class:"content-container scrollbar"},JE={key:0,class:"block"},eS={class:"attribute-title-container"},tS=ha(()=>s.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),rS={style:{"word-break":"keep-all"}},nS=ha(()=>s.createElementVNode("i",null,"Origin",-1)),aS=["origin-item-label"],iS={key:0,class:"separator"},oS={key:1,class:"block"},sS=ha(()=>s.createElementVNode("div",{class:"attribute-title-container"},[s.createElementVNode("div",{class:"attribute-title"},"Components")],-1)),lS=["component-item-label"],cS={key:0,class:"separator"},uS={key:2,class:"block"},dS={class:"attribute-title-container"},fS=ha(()=>s.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),hS=ha(()=>s.createElementVNode("span",{style:{"word-break":"keep-all"}},[s.createElementVNode("i",null,"Destination"),s.createTextVNode(" is where the axons terminate ")],-1)),pS=["destination-item-label"],vS={key:0,class:"separator"};function gS(t,e,r,n,a,i){const o=ub,l=yt,u=Pl,c=qu,d=oo,f=Ar,p=RE,v=Fl;return r.tooltipEntry?s.withDirectives((s.openBlock(),s.createElementBlock("div",KE,[r.tooltipEntry.title?(s.openBlock(),s.createElementBlock("div",qE,[s.createElementVNode("div",UE,s.toDisplayString(i.capitalise(r.tooltipEntry.title)),1),r.tooltipEntry.provenanceTaxonomyLabel&&r.tooltipEntry.provenanceTaxonomyLabel.length>0?(s.openBlock(),s.createElementBlock("div",GE,s.toDisplayString(i.provSpeciesDescription),1)):s.createCommentVNode("",!0)])):(s.openBlock(),s.createElementBlock("div",WE,[s.createElementVNode("div",jE,s.toDisplayString(r.tooltipEntry.featureId),1)])),i.featuresAlert?(s.openBlock(),s.createElementBlock("div",YE,[XE,s.createVNode(u,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:s.withCtx(()=>[s.createVNode(l,{class:"info"},{default:s.withCtx(()=>[s.createVNode(o)]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("span",ZE,s.toDisplayString(i.featuresAlert),1)]),_:1})])):s.createCommentVNode("",!0),s.withDirectives(s.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:e[0]||(e[0]=h=>t.showDetails=!1)},[s.createTextVNode(" Hide path information "),s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(c)]),_:1})],512),[[s.vShow,t.showDetails]]),s.withDirectives(s.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:e[1]||(e[1]=h=>t.showDetails=!0)},[s.createTextVNode(" Show path information "),s.createVNode(l,null,{default:s.withCtx(()=>[s.createVNode(d)]),_:1})],512),[[s.vShow,!t.showDetails]]),s.createVNode(s.Transition,{name:"slide-fade"},{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",QE,[s.createTextVNode(s.toDisplayString(r.tooltipEntry.paths)+" ",1),r.tooltipEntry.origins&&r.tooltipEntry.origins.length>0?(s.openBlock(),s.createElementBlock("div",JE,[s.createElementVNode("div",eS,[tS,s.createVNode(u,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:s.withCtx(()=>[s.createVNode(l,{class:"info"},{default:s.withCtx(()=>[s.createVNode(o)]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("span",rS,[nS,s.createTextVNode(" "+s.toDisplayString(i.originDescription),1)])]),_:1})]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.tooltipEntry.origins,(h,g)=>(s.openBlock(),s.createElementBlock("div",{class:"attribute-content","origin-item-label":h,key:h},[s.createTextVNode(s.toDisplayString(i.capitalise(h))+" ",1),g!=r.tooltipEntry.origins.length-1?(s.openBlock(),s.createElementBlock("div",iS)):s.createCommentVNode("",!0)],8,aS))),128)),s.withDirectives(s.createVNode(f,{class:"button",id:"open-dendrites-button",onClick:i.openDendrites},{default:s.withCtx(()=>[s.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[s.vShow,r.tooltipEntry.originsWithDatasets&&r.tooltipEntry.originsWithDatasets.length>0]])])):s.createCommentVNode("",!0),r.tooltipEntry.components&&r.tooltipEntry.components.length>0?(s.openBlock(),s.createElementBlock("div",oS,[sS,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.tooltipEntry.components,(h,g)=>(s.openBlock(),s.createElementBlock("div",{class:"attribute-content","component-item-label":h,key:h},[s.createTextVNode(s.toDisplayString(i.capitalise(h))+" ",1),g!=r.tooltipEntry.components.length-1?(s.openBlock(),s.createElementBlock("div",cS)):s.createCommentVNode("",!0)],8,lS))),128))])):s.createCommentVNode("",!0),r.tooltipEntry.destinations&&r.tooltipEntry.destinations.length>0?(s.openBlock(),s.createElementBlock("div",uS,[s.createElementVNode("div",dS,[fS,s.createVNode(u,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:s.withCtx(()=>[s.createVNode(l,{class:"info"},{default:s.withCtx(()=>[s.createVNode(o)]),_:1})]),default:s.withCtx(()=>[hS]),_:1})]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.tooltipEntry.destinations,(h,g)=>(s.openBlock(),s.createElementBlock("div",{class:"attribute-content","destination-item-label":h,key:h},[s.createTextVNode(s.toDisplayString(i.capitalise(h))+" ",1),g!=r.tooltipEntry.destinations.length-1?(s.openBlock(),s.createElementBlock("div",vS)):s.createCommentVNode("",!0)],8,pS))),128)),s.withDirectives(s.createVNode(f,{class:"button",onClick:i.openAxons},{default:s.withCtx(()=>[s.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[s.vShow,r.tooltipEntry.destinationsWithDatasets&&r.tooltipEntry.destinationsWithDatasets.length>0]])])):s.createCommentVNode("",!0),s.withDirectives(s.createVNode(f,{class:"button",onClick:i.openAll},{default:s.withCtx(()=>[s.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[s.vShow,r.tooltipEntry.componentsWithDatasets&&r.tooltipEntry.componentsWithDatasets.length>0]]),s.createVNode(p,{resources:i.resources},null,8,["resources"])],512),[[s.vShow,t.showDetails]])]),_:1})])),[[v,t.loading]]):s.createCommentVNode("",!0)}const mS=yr(HE,[["render",gS],["__scopeId","data-v-ef9a0f6d"]]),yS={name:"AnnotationPopup",props:{annotationEntry:{type:Object}},inject:["$annotator","userApiKey"],data:function(){return{displayPair:{"Feature ID":"featureId",Tooltip:"label",Models:"models",Name:"name",Resource:"resourceId"},editing:!1,evidencePrefixes:["DOI:","PMID:"],evidencePrefix:"DOI:",evidence:[],authenticated:!1,newEvidence:"",comment:"",prevSubs:[],showSubmissions:!0,errorMessage:"",creator:void 0}},computed:{isEditable:function(){return this.annotationEntry.resourceId&&this.annotationEntry.featureId},isPositionUpdated:function(){return this.annotationEntry.resourceId&&this.annotationEntry.type==="updated"&&this.annotationEntry.positionUpdated},isDeleted:function(){return this.annotationEntry.resourceId&&this.annotationEntry.type==="deleted"}},methods:{evidenceEntered:function(t){t&&(this.evidence.push(this.evidencePrefix+t),this.newEvidence="")},formatTime:function(t){const e={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},updatePrevSubmissions:function(){var t;this.$annotator&&this.authenticated&&this.annotationEntry.resourceId&&this.annotationEntry.featureId&&((t=this.$annotator)==null||t.itemAnnotations(this.userApiKey,this.annotationEntry.resourceId,this.annotationEntry.featureId).then(e=>{this.prevSubs=e}).catch(e=>{console.log(e)}))},submit:function(){var t;if(this.annotationEntry.type==="updated"&&this.annotationEntry.positionUpdated?this.comment=this.comment?`Position Updated: ${this.comment}`:"Position Updated":this.annotationEntry.type==="deleted"&&(this.comment=this.comment?`Feature Deleted: ${this.comment}`:"Feature Deleted"),(this.evidence.length>0||this.comment)&&this.annotationEntry.resourceId&&this.annotationEntry.featureId){const e=[];this.evidence.forEach(n=>{if(n.includes("DOI:")){const a=n.replace("DOI:","https://doi.org/");e.push(new URL(a))}else if(n.includes("PMID:")){const a=n.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");e.push(new URL(a))}});const r={resource:this.annotationEntry.resourceId,item:Object.assign({id:this.annotationEntry.featureId},Object.fromEntries(Object.entries(this.annotationEntry).filter(([n])=>["label","models"].includes(n)))),body:{evidence:e,comment:this.comment},feature:this.annotationEntry.feature};Object.assign(r.body,this.annotationEntry.body),this.annotationEntry.type==="deleted"&&(r.feature=void 0),this.creator&&(r.creator=this.creator),(t=this.$annotator)==null||t.addAnnotation(this.userApiKey,r).then(()=>{this.$emit("annotation",r),this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(t){this.evidence.splice(t,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(t,e){t!==e&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){var t;(t=this.$annotator)==null||t.authenticate(this.userApiKey).then(e=>{e.name&&e.email&&e.canUpdate?(this.creator=e,e.orcid||(this.creator.orcid="0000-0000-0000-0000"),this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},Ln=t=>(s.pushScopeId("data-v-09c78af1"),t=t(),s.popScopeId(),t),bS={class:"block"},wS=Ln(()=>s.createElementVNode("div",{class:"title"},"Feature Annotations",-1)),CS=Ln(()=>s.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),kS=Ln(()=>s.createElementVNode("strong",null,"Evidence: ",-1)),xS=["href"],ES=Ln(()=>s.createElementVNode("strong",null,"Comment: ",-1)),SS=Ln(()=>s.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),TS=Ln(()=>s.createElementVNode("strong",null,"Evidence:",-1)),BS=Ln(()=>s.createElementVNode("strong",null,"Comment:",-1)),NS={class:"sub-title"};function DS(t,e,r,n,a,i){const o=El,l=qu,u=yt,c=oo,d=Y1,f=W1,p=Z1,v=Sl,h=so,g=Ox,y=Px,m=Fd,b=Ar,w=ox;return s.openBlock(),s.createBlock(w,{class:"main"},{default:s.withCtx(()=>[s.createElementVNode("div",bS,[s.createVNode(o,{class:"info-field"},{default:s.withCtx(()=>[wS]),_:1}),r.annotationEntry?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.displayPair,(C,x)=>s.withDirectives((s.openBlock(),s.createBlock(o,{class:"dialog-text",key:C},{default:s.withCtx(()=>[s.createElementVNode("strong",null,s.toDisplayString(x)+": ",1),s.createTextVNode(" "+s.toDisplayString(r.annotationEntry[C]),1)]),_:2},1024)),[[s.vShow,r.annotationEntry[C]]])),128)),t.prevSubs.length>0?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.withDirectives(s.createElementVNode("div",{class:"hide",onClick:e[0]||(e[0]=C=>t.showSubmissions=!1)},[s.createTextVNode(" Hide previous submissions "),s.createVNode(u,null,{default:s.withCtx(()=>[s.createVNode(l)]),_:1})],512),[[s.vShow,t.showSubmissions]]),s.withDirectives(s.createElementVNode("div",{class:"hide",onClick:e[1]||(e[1]=C=>t.showSubmissions=!0)},[s.createTextVNode(" Show previous "+s.toDisplayString(t.prevSubs.length)+" submission(s) ",1),s.createVNode(u,null,{default:s.withCtx(()=>[s.createVNode(c)]),_:1})],512),[[s.vShow,!t.showSubmissions]]),t.showSubmissions?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(o,{class:"dialog-spacer"}),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[CS]),_:1}),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.prevSubs,(C,x)=>(s.openBlock(),s.createElementBlock("div",{class:"entry",key:x},[s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[s.createElementVNode("strong",null,s.toDisplayString(i.formatTime(C.created)),1),s.createTextVNode(" "+s.toDisplayString(C.creator.name),1)]),_:2},1024),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[kS,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(C.body.evidence,E=>(s.openBlock(),s.createBlock(o,{key:E,class:"dialog-text"},{default:s.withCtx(()=>[s.createElementVNode("a",{href:E,target:"_blank"},s.toDisplayString(E),9,xS)]),_:2},1024))),128))]),_:2},1024),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[ES,s.createTextVNode(" "+s.toDisplayString(C.body.comment),1)]),_:2},1024)]))),128))],64)):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0),t.authenticated?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[i.isEditable?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(o,{class:"dialog-spacer"}),t.editing?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[SS]),_:1}),i.isDeleted?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[TS]),_:1}),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.evidence,(C,x)=>(s.openBlock(),s.createBlock(o,{key:C},{default:s.withCtx(()=>[s.createVNode(v,{span:20},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.evidence[x]),1)]),_:2},1024),s.createVNode(v,{span:4},{default:s.withCtx(()=>[s.createVNode(u,{class:"standard-icon"},{default:s.withCtx(()=>[s.createVNode(h,{onClick:E=>i.removeEvidence(x)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),s.createVNode(o,null,{default:s.withCtx(()=>[s.createVNode(m,{size:"small",placeholder:"Enter",modelValue:t.newEvidence,"onUpdate:modelValue":e[4]||(e[4]=C=>t.newEvidence=C),onChange:e[5]||(e[5]=C=>i.evidenceEntered(C))},{prepend:s.withCtx(()=>[s.createVNode(y,{teleported:!1,modelValue:t.evidencePrefix,"onUpdate:modelValue":e[3]||(e[3]=C=>t.evidencePrefix=C),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.evidencePrefixes,C=>(s.openBlock(),s.createBlock(g,{key:C,label:C,value:C},{default:s.withCtx(()=>[s.createVNode(o,null,{default:s.withCtx(()=>[s.createVNode(v,{span:12},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(C),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})],64)),s.createVNode(o,null,{default:s.withCtx(()=>[BS]),_:1}),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[s.createVNode(m,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:t.comment,"onUpdate:modelValue":e[6]||(e[6]=C=>t.comment=C)},null,8,["modelValue"])]),_:1}),s.createVNode(o,{class:"dialog-text"},{default:s.withCtx(()=>[s.createVNode(b,{class:"button",type:"primary",plain:"",onClick:i.submit},{default:s.withCtx(()=>[s.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(s.openBlock(),s.createBlock(o,{key:0},{default:s.withCtx(()=>[s.createVNode(u,{class:"standard-icon"},{default:s.withCtx(()=>[s.createVNode(d,{onClick:e[2]||(e[2]=C=>t.editing=!0)})]),_:1}),i.isDeleted?(s.openBlock(),s.createBlock(u,{key:0,class:"standard-icon"},{default:s.withCtx(()=>[s.createVNode(f,{onClick:i.submit},null,8,["onClick"])]),_:1})):i.isPositionUpdated?(s.openBlock(),s.createBlock(u,{key:1,class:"standard-icon"},{default:s.withCtx(()=>[s.createVNode(p,{onClick:i.submit},null,8,["onClick"])]),_:1})):s.createCommentVNode("",!0)]),_:1})),t.errorMessage?(s.openBlock(),s.createBlock(o,{key:2,class:"dialog-text"},{default:s.withCtx(()=>[s.createElementVNode("strong",NS,s.toDisplayString(t.errorMessage),1)]),_:1})):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)])]),_:1})}const PS=yr(yS,[["render",DS],["__scopeId","data-v-09c78af1"]]),OS={name:"Tooltip",props:{tooltipEntry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}},mounted:function(){hi.on("onActionClick",t=>{this.$emit("onActionClick",t)})}},_S={class:"tooltip-container",id:"tooltip-container"};function LS(t,e,r,n,a,i){const o=PS,l=mS;return s.openBlock(),s.createElementBlock("div",_S,[r.annotationDisplay?(s.openBlock(),s.createBlock(o,{key:0,annotationEntry:r.annotationEntry,onAnnotation:e[0]||(e[0]=u=>t.$emit("annotation",u))},null,8,["annotationEntry"])):(s.openBlock(),s.createBlock(l,{key:1,tooltipEntry:r.tooltipEntry},null,8,["tooltipEntry"]))])}const FS=yr(OS,[["render",LS],["__scopeId","data-v-229b3988"]]),MS={name:"TreeControls",props:{mapType:{type:String,required:!0},isReady:{type:Boolean,default:!0},title:{type:String},treeData:{type:Array,default:function(){return[]}},showColourPicker:{type:Boolean,default:!1},active:{type:[String,Array],required:!0},hover:{type:[String,Array],required:!0}},data:function(){return{defaultExpandedKeys:["All"],myPopperClass:"hide-scaffold-colour-popup",tooltipVisible:!1,tooltipLabel:"",tooltipAtBottom:!1}},computed:{isFlatmap:function(){return this.mapType==="flatmap"},isScaffold:function(){return this.mapType==="scaffold"},nodeKey:function(){if(this.isFlatmap)return"key";if(this.isScaffold)return"id"},expandedKeys:function(){if(this.isFlatmap)return this.defaultExpandedKeys;if(this.isScaffold)return[]}},watch:{showColourPicker:{immediate:!0,handler:function(){this.showColourPicker?this.myPopperClass="showPicker":this.myPopperClass="hide-scaffold-colour-popup"}}},methods:{setColour:function(t,e){this.$emit("setColour",t,e)},getBackgroundStyles:function(t){return"colour"in t?{background:t.colour}:{}},nodeIsActive:function(t){return this.active===t.models},nodeIsHover:function(t){return this.hover===t.models},changeActiveByNode:function(t,e=!1){this.isFlatmap?t.models&&this.$emit("changeActive",t.models):this.isScaffold&&(t.isPrimitives||t.isRegion)&&this.$emit("changeActive",t,e)},changeHoverByNode:function(t,e=!1){this.isFlatmap?t.models&&this.$emit("changeHover",t.models):this.isScaffold&&t.isPrimitives&&this.$emit("changeHover",t,e)},checkChanged:function(t,e){if(this.isFlatmap){const r=e.checkedKeys.includes(t.key);t.key==="All"?this.$emit("checkAll",r):this.$emit("checkChanged",{key:t.key,value:r})}else this.isScaffold&&this.$emit("checkChanged",t,e)},displayTooltip:function(t,e,r){const a=r.target.closest(".el-tree-node__content"),i=a.clientWidth,o=a.getBoundingClientRect().x,l=a.querySelector(".lastChildInItem");let u=0;if(l){const d=l.getBoundingClientRect();u=d.x+d.width-o}const c=u>i;this.tooltipVisible=c&&e,this.tooltipLabel=t,this.tooltipAtBottom=.5>r.layerY/this.$refs.treeContainer.clientHeight}},unmounted:function(){this.sortedPrimitiveGroups=void 0}},IS={class:"selections-container"},AS={class:"title-text"},VS={class:"tree-container",ref:"treeContainer"},RS={class:"tooltip-text"},$S=["onClick","onMouseover","onMouseenter"],zS=["onClick","onMouseover","onMouseenter"],HS={class:"lastChildInItem"},KS={key:0,class:"node-options"};function qS(t,e,r,n,a,i){const o=Sl,l=El,u=Pl,c=jk,d=Qx,f=Fl;return s.openBlock(),s.createElementBlock("div",IS,[r.title?(s.openBlock(),s.createBlock(l,{key:0},{default:s.withCtx(()=>[s.createVNode(o,{span:12},{default:s.withCtx(()=>[s.createElementVNode("div",AS,s.toDisplayString(r.title),1)]),_:1})]),_:1})):s.createCommentVNode("",!0),s.createElementVNode("div",VS,[s.createElementVNode("div",{class:s.normalizeClass(["tree-tooltip",t.tooltipAtBottom?"bottom":""])},[s.createVNode(u,{ref:"tooltip",visible:t.tooltipVisible,placement:"top","show-arrow":!1,teleported:!1,trigger:"manual","popper-class":"tree-tooltip-popper","virtual-triggering":"",width:260},{default:s.withCtx(()=>[s.createElementVNode("div",RS,s.toDisplayString(t.tooltipLabel),1)]),_:1},8,["visible"])],2),s.withDirectives((s.openBlock(),s.createBlock(d,{ref:"regionTree","element-loading-background":"rgba(0, 0, 0, 0.3)","show-checkbox":"","node-key":i.nodeKey,data:r.treeData,"check-strictly":!1,"expand-on-click-node":!1,"render-after-expand":!1,"default-expanded-keys":i.expandedKeys,onCheck:i.checkChanged,indent:8,class:s.normalizeClass([r.mapType==="flatmap"?"hide_grandchildren_checkbox":""])},{default:s.withCtx(({node:p,data:v})=>[r.mapType==="flatmap"?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["region-tree-node",{activeItem:i.nodeIsActive(v),hoverItem:i.nodeIsHover(v)}]),onClick:h=>i.changeActiveByNode(v),onMouseover:h=>i.changeHoverByNode(v,!1),onMouseenter:h=>i.displayTooltip(p.label,!0,h),onMouseleave:e[0]||(e[0]=h=>i.displayTooltip("",!1,h))},[s.createElementVNode("div",{style:s.normalizeStyle(i.getBackgroundStyles(v)),class:"lastChildInItem"},s.toDisplayString(p.label),5)],42,$S)):r.mapType==="scaffold"?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["region-tree-node",{activeItem:r.active.includes(v.id),hoverItem:r.hover.includes(v.id)}]),onClick:h=>i.changeActiveByNode(v,!0),onMouseover:h=>i.changeHoverByNode(v,!0,h),onMouseenter:h=>i.displayTooltip(p.label,!0,h),onMouseleave:e[1]||(e[1]=h=>i.displayTooltip("",!1,h))},[v.isPrimitives?(s.openBlock(),s.createBlock(c,{key:0,class:s.normalizeClass({"show-picker":r.showColourPicker}),modelValue:v.activeColour,"onUpdate:modelValue":h=>v.activeColour=h,size:"small","popper-class":t.myPopperClass,onChange:h=>i.setColour(v,h)},null,8,["class","modelValue","onUpdate:modelValue","popper-class","onChange"])):s.createCommentVNode("",!0),s.createElementVNode("div",HS,[s.createElementVNode("span",null,s.toDisplayString(p.label),1),v.isTextureSlides?(s.openBlock(),s.createElementBlock("span",KS," (Texture) ")):s.createCommentVNode("",!0)])],42,zS)):s.createCommentVNode("",!0)]),_:1},8,["node-key","data","default-expanded-keys","onCheck","class"])),[[f,!r.isReady]])],512)])}const US=yr(MS,[["render",qS],["__scopeId","data-v-aa649eae"]]),hh="Copy to clipboard",GS="Copied!",WS="#8300bf",jS={name:"CopyToClipboard",props:{content:{type:String,default:""},theme:{type:String,default:""}},data:function(){return{textLabel:hh,autoHideTimeout:0,iconColor:WS}},methods:{copyToClipboard:async function(){let t=!0;this.autoHideTimeout=600;try{const e=this.content.replaceAll(`
432
+ `,""),r=document.createElement("div");r.innerHTML=this.content;const n=r.textContent||r.innerText||"",a=new Blob([e],{type:"text/html"}),i=new Blob([n],{type:"text/plain"}),o=new ClipboardItem({"text/html":a,"text/plain":i});await navigator.clipboard.write([o])}catch(e){console.error("Error when trying to use navigator.clipboard.write()",e),t=!1}t?this.textLabel=GS:this.textLabel="Error trying to copy to clipboard!"},resetSettings:function(){this.autoHideTimeout=0,this.textLabel=hh}}},YS={class:"visually-hidden"};function XS(t,e,r,n,a,i){const o=U1,l=yt,u=Ar,c=si;return s.openBlock(),s.createBlock(c,{content:t.textLabel,placement:"bottom","hide-after":t.autoHideTimeout,effect:"clipboard-tooltip",onHide:i.resetSettings},{default:s.withCtx(()=>[s.createVNode(u,{class:s.normalizeClass(["copy-clipboard-button",r.theme]),size:"small",onClick:i.copyToClipboard},{default:s.withCtx(()=>[s.createVNode(l,{color:t.iconColor},{default:s.withCtx(()=>[s.createVNode(o)]),_:1},8,["color"]),s.createElementVNode("span",YS,s.toDisplayString(t.textLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content","hide-after","onHide"])}const ZS=yr(jS,[["render",XS],["__scopeId","data-v-de3b5311"]]);function ot(t){"@babel/helpers - typeof";return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ot(t)}function Rl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function QS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $l(t,e,r){return e&&QS(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ph(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sr(t,e){return JS(t)||eT(t,e)||vh(t,e)||tT()}function JS(t){if(Array.isArray(t))return t}function eT(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],a=!0,i=!1,o,l;try{for(r=r.call(t);!(a=(o=r.next()).done)&&(n.push(o.value),!(e&&n.length===e));a=!0);}catch(u){i=!0,l=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function vh(t,e){if(t){if(typeof t=="string")return gh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gh(t,e)}}function gh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function tT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
433
433
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mh(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=vh(t))||e){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
434
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,l;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,l=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw l}}}}var st=typeof window>"u"?null:window,yh=st?st.navigator:null;st&&st.document;var rT=ot(""),bh=ot({}),nT=ot(function(){}),aT=typeof HTMLElement>"u"?"undefined":ot(HTMLElement),pi=function(e){return e&&e.instanceString&&Ye(e.instanceString)?e.instanceString():null},be=function(e){return e!=null&&ot(e)==rT},Ye=function(e){return e!=null&&ot(e)===nT},He=function(e){return!Ut(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},_e=function(e){return e!=null&&ot(e)===bh&&!He(e)&&e.constructor===Object},iT=function(e){return e!=null&&ot(e)===bh},le=function(e){return e!=null&&ot(e)===ot(1)&&!isNaN(e)},oT=function(e){return le(e)&&Math.floor(e)===e},Do=function(e){if(aT!=="undefined")return e!=null&&e instanceof HTMLElement},Ut=function(e){return vi(e)||wh(e)},vi=function(e){return pi(e)==="collection"&&e._private.single},wh=function(e){return pi(e)==="collection"&&!e._private.single},$l=function(e){return pi(e)==="core"},Ch=function(e){return pi(e)==="stylesheet"},sT=function(e){return pi(e)==="event"},nn=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},lT=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},cT=function(e){return _e(e)&&le(e.x1)&&le(e.x2)&&le(e.y1)&&le(e.y2)},uT=function(e){return iT(e)&&Ye(e.then)},dT=function(){return yh&&yh.userAgent.match(/msie|trident|edge/i)},gi=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);return i.join("$")});var n=function a(){var i=this,o=arguments,l,u=r.apply(i,o),c=a.cache;return(l=c[u])||(l=c[u]=e.apply(i,o)),l};return n.cache={},n},zl=gi(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Po=gi(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),kh=gi(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),xh=function(e){return nn(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},lt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",fT="rgb[a]?\\(("+lt+"[%]?)\\s*,\\s*("+lt+"[%]?)\\s*,\\s*("+lt+"[%]?)(?:\\s*,\\s*("+lt+"))?\\)",hT="rgb[a]?\\((?:"+lt+"[%]?)\\s*,\\s*(?:"+lt+"[%]?)\\s*,\\s*(?:"+lt+"[%]?)(?:\\s*,\\s*(?:"+lt+"))?\\)",pT="hsl[a]?\\(("+lt+")\\s*,\\s*("+lt+"[%])\\s*,\\s*("+lt+"[%])(?:\\s*,\\s*("+lt+"))?\\)",vT="hsl[a]?\\((?:"+lt+")\\s*,\\s*(?:"+lt+"[%])\\s*,\\s*(?:"+lt+"[%])(?:\\s*,\\s*(?:"+lt+"))?\\)",gT="\\#[0-9a-fA-F]{3}",mT="\\#[0-9a-fA-F]{6}",Eh=function(e,r){return e<r?-1:e>r?1:0},yT=function(e,r){return-1*Eh(e,r)},xe=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(n!=null)for(var a=Object.keys(n),i=0;i<a.length;i++){var o=a[i];t[o]=n[o]}}return t},bT=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,n,a,i,o=16;return r?(n=parseInt(e[1]+e[1],o),a=parseInt(e[2]+e[2],o),i=parseInt(e[3]+e[3],o)):(n=parseInt(e[1]+e[2],o),a=parseInt(e[3]+e[4],o),i=parseInt(e[5]+e[6],o)),[n,a,i]}},wT=function(e){var r,n,a,i,o,l,u,c;function d(h,g,y){return y<0&&(y+=1),y>1&&(y-=1),y<1/6?h+(g-h)*6*y:y<1/2?g:y<2/3?h+(g-h)*(2/3-y)*6:h}var f=new RegExp("^"+pT+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,a=parseFloat(f[2]),a<0||a>100||(a=a/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,o=f[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(a===0)l=u=c=Math.round(i*255);else{var p=i<.5?i*(1+a):i+a-i*a,v=2*i-p;l=Math.round(255*d(v,p,n+1/3)),u=Math.round(255*d(v,p,n)),c=Math.round(255*d(v,p,n-1/3))}r=[l,u,c,o]}return r},CT=function(e){var r,n=new RegExp("^"+fT+"$").exec(e);if(n){r=[];for(var a=[],i=1;i<=3;i++){var o=n[i];if(o[o.length-1]==="%"&&(a[i]=!0),o=parseFloat(o),a[i]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var l=a[1]||a[2]||a[3],u=a[1]&&a[2]&&a[3];if(l&&!u)return;var c=n[4];if(c!==void 0){if(c=parseFloat(c),c<0||c>1)return;r.push(c)}}return r},kT=function(e){return ET[e.toLowerCase()]},xT=function(e){return(He(e)?e:null)||kT(e)||bT(e)||CT(e)||wT(e)},ET={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Sh=function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i<a;i++){var o=n[i];if(_e(o))throw Error("Tried to set map with object key");i<n.length-1?(r[o]==null&&(r[o]={}),r=r[o]):r[o]=e.value}},Th=function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i<a;i++){var o=n[i];if(_e(o))throw Error("Tried to get map with object key");if(r=r[o],r==null)return r}return r};function ST(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ln=ST,mi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function TT(t,e){return e={exports:{}},t(e,e.exports),e.exports}var BT=typeof mi=="object"&&mi&&mi.Object===Object&&mi,NT=BT,DT=typeof self=="object"&&self&&self.Object===Object&&self,PT=NT||DT||Function("return this")(),Oo=PT,OT=function(){return Oo.Date.now()},Hl=OT,_T=/\s/;function FT(t){for(var e=t.length;e--&&_T.test(t.charAt(e)););return e}var LT=FT,MT=/^\s+/;function IT(t){return t&&t.slice(0,LT(t)+1).replace(MT,"")}var AT=IT,RT=Oo.Symbol,pa=RT,Bh=Object.prototype,VT=Bh.hasOwnProperty,$T=Bh.toString,yi=pa?pa.toStringTag:void 0;function zT(t){var e=VT.call(t,yi),r=t[yi];try{t[yi]=void 0;var n=!0}catch{}var a=$T.call(t);return n&&(e?t[yi]=r:delete t[yi]),a}var HT=zT,KT=Object.prototype,qT=KT.toString;function UT(t){return qT.call(t)}var GT=UT,WT="[object Null]",jT="[object Undefined]",Nh=pa?pa.toStringTag:void 0;function YT(t){return t==null?t===void 0?jT:WT:Nh&&Nh in Object(t)?HT(t):GT(t)}var Dh=YT;function XT(t){return t!=null&&typeof t=="object"}var ZT=XT,QT="[object Symbol]";function JT(t){return typeof t=="symbol"||ZT(t)&&Dh(t)==QT}var bi=JT,Ph=NaN,eB=/^[-+]0x[0-9a-f]+$/i,tB=/^0b[01]+$/i,rB=/^0o[0-7]+$/i,nB=parseInt;function aB(t){if(typeof t=="number")return t;if(bi(t))return Ph;if(Ln(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ln(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=AT(t);var r=tB.test(t);return r||rB.test(t)?nB(t.slice(2),r?2:8):eB.test(t)?Ph:+t}var Oh=aB,iB="Expected a function",oB=Math.max,sB=Math.min;function lB(t,e,r){var n,a,i,o,l,u,c=0,d=!1,f=!1,p=!0;if(typeof t!="function")throw new TypeError(iB);e=Oh(e)||0,Ln(r)&&(d=!!r.leading,f="maxWait"in r,i=f?oB(Oh(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p);function v(E){var k=n,B=a;return n=a=void 0,c=E,o=t.apply(B,k),o}function h(E){return c=E,l=setTimeout(m,e),d?v(E):o}function g(E){var k=E-u,B=E-c,S=e-k;return f?sB(S,i-B):S}function y(E){var k=E-u,B=E-c;return u===void 0||k>=e||k<0||f&&B>=i}function m(){var E=Hl();if(y(E))return b(E);l=setTimeout(m,g(E))}function b(E){return l=void 0,p&&n?v(E):(n=a=void 0,o)}function w(){l!==void 0&&clearTimeout(l),c=0,n=u=a=l=void 0}function C(){return l===void 0?o:b(Hl())}function x(){var E=Hl(),k=y(E);if(n=arguments,a=this,u=E,k){if(l===void 0)return h(u);if(f)return clearTimeout(l),l=setTimeout(m,e),v(u)}return l===void 0&&(l=setTimeout(m,e)),o}return x.cancel=w,x.flush=C,x}var _o=lB,Kl=st?st.performance:null,_h=Kl&&Kl.now?function(){return Kl.now()}:function(){return Date.now()},cB=function(){if(st){if(st.requestAnimationFrame)return function(t){st.requestAnimationFrame(t)};if(st.mozRequestAnimationFrame)return function(t){st.mozRequestAnimationFrame(t)};if(st.webkitRequestAnimationFrame)return function(t){st.webkitRequestAnimationFrame(t)};if(st.msRequestAnimationFrame)return function(t){st.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(_h())},1e3/60)}}(),Fo=function(e){return cB(e)},Rr=_h,va=9261,Fh=65599,wi=5381,Lh=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:va,n=r,a;a=e.next(),!a.done;)n=n*Fh+a.value|0;return n},Ci=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:va;return r*Fh+e|0},ki=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi;return(r<<5)+r+e|0},uB=function(e,r){return e*2097152+r},an=function(e){return e[0]*2097152+e[1]},Lo=function(e,r){return[Ci(e[0],r[0]),ki(e[1],r[1])]},dB=function(e,r){var n={value:0,done:!1},a=0,i=e.length,o={next:function(){return a<i?n.value=e[a++]:n.done=!0,n}};return Lh(o,r)},Mn=function(e,r){var n={value:0,done:!1},a=0,i=e.length,o={next:function(){return a<i?n.value=e.charCodeAt(a++):n.done=!0,n}};return Lh(o,r)},Mh=function(){return fB(arguments)},fB=function(e){for(var r,n=0;n<e.length;n++){var a=e[n];n===0?r=Mn(a):r=Mn(a,r)}return r},Ih=!0,hB=console.warn!=null,pB=console.trace!=null,ql=Number.MAX_SAFE_INTEGER||9007199254740991,Ah=function(){return!0},Mo=function(){return!1},Rh=function(){return 0},Ul=function(){},Xe=function(e){throw new Error(e)},Vh=function(e){if(e!==void 0)Ih=!!e;else return Ih},Ae=function(e){Vh()&&(hB?console.warn(e):(console.log(e),pB&&console.trace()))},vB=function(e){return xe({},e)},br=function(e){return e==null?e:He(e)?e.slice():_e(e)?vB(e):e},gB=function(e){return e.slice()},$h=function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},mB={},zh=function(){return mB},wt=function(e){var r=Object.keys(e);return function(n){for(var a={},i=0;i<r.length;i++){var o=r[i],l=n==null?void 0:n[o];a[o]=l===void 0?e[o]:l}return a}},on=function(e,r,n){for(var a=e.length-1;a>=0;a--)e[a]===r&&e.splice(a,1)},Gl=function(e){e.splice(0,e.length)},yB=function(e,r){for(var n=0;n<r.length;n++){var a=r[n];e.push(a)}},lr=function(e,r,n){return n&&(r=kh(n,r)),e[r]},sn=function(e,r,n,a){n&&(r=kh(n,r)),e[r]=a},bB=function(){function t(){Rl(this,t),this._obj={}}return Vl(t,[{key:"set",value:function(r,n){return this._obj[r]=n,this}},{key:"delete",value:function(r){return this._obj[r]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(r){return this._obj[r]!==void 0}},{key:"get",value:function(r){return this._obj[r]}}]),t}(),wr=typeof Map<"u"?Map:bB,wB="undefined",CB=function(){function t(e){if(Rl(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var n=0;n<r.length;n++)this.add(r[n])}}return Vl(t,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(r){var n=this._obj;n[r]!==1&&(n[r]=1,this.size++)}},{key:"delete",value:function(r){var n=this._obj;n[r]===1&&(n[r]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(r){return this._obj[r]===1}},{key:"toArray",value:function(){var r=this;return Object.keys(this._obj).filter(function(n){return r.has(n)})}},{key:"forEach",value:function(r,n){return this.toArray().forEach(r,n)}}]),t}(),ga=(typeof Set>"u"?"undefined":ot(Set))!==wB?Set:CB,Io=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!$l(e)){Xe("An element must have a core reference and parameters set");return}var a=r.group;if(a==null&&(r.data&&r.data.source!=null&&r.data.target!=null?a="edges":a="nodes"),a!=="nodes"&&a!=="edges"){Xe("An element must be of type `nodes` or `edges`; you specified `"+a+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:a,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?a==="edges":!!r.pannable,active:!1,classes:new ga,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var o=r.renderedPosition,l=e.pan(),u=e.zoom();i.position={x:(o.x-l.x)/u,y:(o.y-l.y)/u}}var c=[];He(r.classes)?c=r.classes:be(r.classes)&&(c=r.classes.split(/\s+/));for(var d=0,f=c.length;d<f;d++){var p=c[d];!p||p===""||i.classes.add(p)}this.createEmitter();var v=r.style||r.css;v&&(Ae("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(v)),(n===void 0||n)&&this.restore()},Hh=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(n,a,i){var o;_e(n)&&!Ut(n)&&(o=n,n=o.roots||o.root,a=o.visit,i=o.directed),i=arguments.length===2&&!Ye(a)?a:i,a=Ye(a)?a:function(){};for(var l=this._private.cy,u=n=be(n)?this.filter(n):n,c=[],d=[],f={},p={},v={},h=0,g,y=this.byGroup(),m=y.nodes,b=y.edges,w=0;w<u.length;w++){var C=u[w],x=C.id();C.isNode()&&(c.unshift(C),e.bfs&&(v[x]=!0,d.push(C)),p[x]=0)}for(var E=function(){var F=e.bfs?c.shift():c.pop(),O=F.id();if(e.dfs){if(v[O])return"continue";v[O]=!0,d.push(F)}var I=p[O],_=f[O],M=_!=null?_.source():null,L=_!=null?_.target():null,R=_==null?void 0:F.same(M)?L[0]:M[0],H=void 0;if(H=a(F,_,R,h++,I),H===!0)return g=F,"break";if(H===!1)return"break";for(var $=F.connectedEdges().filter(function(Z){return(!i||Z.source().same(F))&&b.has(Z)}),z=0;z<$.length;z++){var j=$[z],ee=j.connectedNodes().filter(function(Z){return!Z.same(F)&&m.has(Z)}),J=ee.id();ee.length!==0&&!v[J]&&(ee=ee[0],c.push(ee),e.bfs&&(v[J]=!0,d.push(ee)),f[J]=j,p[J]=p[O]+1)}};c.length!==0;){var k=E();if(k!=="continue"&&k==="break")break}for(var B=l.collection(),S=0;S<d.length;S++){var N=d[S],D=f[N.id()];D!=null&&B.push(D),B.push(N)}return{path:l.collection(B),found:l.collection(g)}}},xi={breadthFirstSearch:Hh({bfs:!0}),depthFirstSearch:Hh({dfs:!0})};xi.bfs=xi.breadthFirstSearch,xi.dfs=xi.depthFirstSearch;var kB=TT(function(t,e){(function(){var r,n,a,i,o,l,u,c,d,f,p,v,h,g,y;a=Math.floor,f=Math.min,n=function(m,b){return m<b?-1:m>b?1:0},d=function(m,b,w,C,x){var E;if(w==null&&(w=0),x==null&&(x=n),w<0)throw new Error("lo must be non-negative");for(C==null&&(C=m.length);w<C;)E=a((w+C)/2),x(b,m[E])<0?C=E:w=E+1;return[].splice.apply(m,[w,w-w].concat(b)),b},l=function(m,b,w){return w==null&&(w=n),m.push(b),g(m,0,m.length-1,w)},o=function(m,b){var w,C;return b==null&&(b=n),w=m.pop(),m.length?(C=m[0],m[0]=w,y(m,0,b)):C=w,C},c=function(m,b,w){var C;return w==null&&(w=n),C=m[0],m[0]=b,y(m,0,w),C},u=function(m,b,w){var C;return w==null&&(w=n),m.length&&w(m[0],b)<0&&(C=[m[0],b],b=C[0],m[0]=C[1],y(m,0,w)),b},i=function(m,b){var w,C,x,E,k,B;for(b==null&&(b=n),E=(function(){B=[];for(var S=0,N=a(m.length/2);0<=N?S<N:S>N;0<=N?S++:S--)B.push(S);return B}).apply(this).reverse(),k=[],C=0,x=E.length;C<x;C++)w=E[C],k.push(y(m,w,b));return k},h=function(m,b,w){var C;if(w==null&&(w=n),C=m.indexOf(b),C!==-1)return g(m,0,C,w),y(m,C,w)},p=function(m,b,w){var C,x,E,k,B;if(w==null&&(w=n),x=m.slice(0,b),!x.length)return x;for(i(x,w),B=m.slice(b),E=0,k=B.length;E<k;E++)C=B[E],u(x,C,w);return x.sort(w).reverse()},v=function(m,b,w){var C,x,E,k,B,S,N,D,P;if(w==null&&(w=n),b*10<=m.length){if(E=m.slice(0,b).sort(w),!E.length)return E;for(x=E[E.length-1],N=m.slice(b),k=0,S=N.length;k<S;k++)C=N[k],w(C,x)<0&&(d(E,C,0,null,w),E.pop(),x=E[E.length-1]);return E}for(i(m,w),P=[],B=0,D=f(b,m.length);0<=D?B<D:B>D;0<=D?++B:--B)P.push(o(m,w));return P},g=function(m,b,w,C){var x,E,k;for(C==null&&(C=n),x=m[w];w>b;){if(k=w-1>>1,E=m[k],C(x,E)<0){m[w]=E,w=k;continue}break}return m[w]=x},y=function(m,b,w){var C,x,E,k,B;for(w==null&&(w=n),x=m.length,B=b,E=m[b],C=2*b+1;C<x;)k=C+1,k<x&&!(w(m[C],m[k])<0)&&(C=k),m[b]=m[C],b=C,C=2*b+1;return m[b]=E,g(m,B,b,w)},r=function(){m.push=l,m.pop=o,m.replace=c,m.pushpop=u,m.heapify=i,m.updateItem=h,m.nlargest=p,m.nsmallest=v;function m(b){this.cmp=b??n,this.nodes=[]}return m.prototype.push=function(b){return l(this.nodes,b,this.cmp)},m.prototype.pop=function(){return o(this.nodes,this.cmp)},m.prototype.peek=function(){return this.nodes[0]},m.prototype.contains=function(b){return this.nodes.indexOf(b)!==-1},m.prototype.replace=function(b){return c(this.nodes,b,this.cmp)},m.prototype.pushpop=function(b){return u(this.nodes,b,this.cmp)},m.prototype.heapify=function(){return i(this.nodes,this.cmp)},m.prototype.updateItem=function(b){return h(this.nodes,b,this.cmp)},m.prototype.clear=function(){return this.nodes=[]},m.prototype.empty=function(){return this.nodes.length===0},m.prototype.size=function(){return this.nodes.length},m.prototype.clone=function(){var b;return b=new m,b.nodes=this.nodes.slice(0),b},m.prototype.toArray=function(){return this.nodes.slice(0)},m.prototype.insert=m.prototype.push,m.prototype.top=m.prototype.peek,m.prototype.front=m.prototype.peek,m.prototype.has=m.prototype.contains,m.prototype.copy=m.prototype.clone,m}(),function(m,b){return t.exports=b()}(this,function(){return r})}).call(mi)}),Ei=kB,xB=wt({root:null,weight:function(e){return 1},directed:!1}),EB={dijkstra:function(e){if(!_e(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var n=xB(e),a=n.root,i=n.weight,o=n.directed,l=this,u=i,c=be(a)?this.filter(a)[0]:a[0],d={},f={},p={},v=this.byGroup(),h=v.nodes,g=v.edges;g.unmergeBy(function(I){return I.isLoop()});for(var y=function(_){return d[_.id()]},m=function(_,M){d[_.id()]=M,b.updateItem(_)},b=new Ei(function(I,_){return y(I)-y(_)}),w=0;w<h.length;w++){var C=h[w];d[C.id()]=C.same(c)?0:1/0,b.push(C)}for(var x=function(_,M){for(var L=(o?_.edgesTo(M):_.edgesWith(M)).intersect(g),R=1/0,H,$=0;$<L.length;$++){var z=L[$],j=u(z);(j<R||!H)&&(R=j,H=z)}return{edge:H,dist:R}};b.size()>0;){var E=b.pop(),k=y(E),B=E.id();if(p[B]=k,k!==1/0)for(var S=E.neighborhood().intersect(h),N=0;N<S.length;N++){var D=S[N],P=D.id(),F=x(E,D),O=k+F.dist;O<y(D)&&(m(D,O),f[P]={node:E,edge:F.edge})}}return{distanceTo:function(_){var M=be(_)?h.filter(_)[0]:_[0];return p[M.id()]},pathTo:function(_){var M=be(_)?h.filter(_)[0]:_[0],L=[],R=M,H=R.id();if(M.length>0)for(L.unshift(M);f[H];){var $=f[H];L.unshift($.edge),L.unshift($.node),R=$.node,H=R.id()}return l.spawn(L)}}}},SB={kruskal:function(e){e=e||function(w){return 1};for(var r=this.byGroup(),n=r.nodes,a=r.edges,i=n.length,o=new Array(i),l=n,u=function(C){for(var x=0;x<o.length;x++){var E=o[x];if(E.has(C))return x}},c=0;c<i;c++)o[c]=this.spawn(n[c]);for(var d=a.sort(function(w,C){return e(w)-e(C)}),f=0;f<d.length;f++){var p=d[f],v=p.source()[0],h=p.target()[0],g=u(v),y=u(h),m=o[g],b=o[y];g!==y&&(l.merge(p),m.merge(b),o.splice(y,1))}return l}},TB=wt({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),BB={aStar:function(e){var r=this.cy(),n=TB(e),a=n.root,i=n.goal,o=n.heuristic,l=n.directed,u=n.weight;a=r.collection(a)[0],i=r.collection(i)[0];var c=a.id(),d=i.id(),f={},p={},v={},h=new Ei(function(H,$){return p[H.id()]-p[$.id()]}),g=new ga,y={},m={},b=function($,z){h.push($),g.add(z)},w,C,x=function(){w=h.pop(),C=w.id(),g.delete(C)},E=function($){return g.has($)};b(a,c),f[c]=0,p[c]=o(a);for(var k=0;h.size()>0;){if(x(),k++,C===d){for(var B=[],S=i,N=d,D=m[N];B.unshift(S),D!=null&&B.unshift(D),S=y[N],S!=null;)N=S.id(),D=m[N];return{found:!0,distance:f[C],path:this.spawn(B),steps:k}}v[C]=!0;for(var P=w._private.edges,F=0;F<P.length;F++){var O=P[F];if(this.hasElementWithId(O.id())&&!(l&&O.data("source")!==C)){var I=O.source(),_=O.target(),M=I.id()!==C?I:_,L=M.id();if(this.hasElementWithId(L)&&!v[L]){var R=f[C]+u(O);if(!E(L)){f[L]=R,p[L]=R+o(M),b(M,L),y[L]=w,m[L]=O;continue}R<f[L]&&(f[L]=R,p[L]=R+o(M),y[L]=w,m[L]=O)}}}}return{found:!1,distance:void 0,path:void 0,steps:k}}},NB=wt({weight:function(e){return 1},directed:!1}),DB={floydWarshall:function(e){for(var r=this.cy(),n=NB(e),a=n.weight,i=n.directed,o=a,l=this.byGroup(),u=l.nodes,c=l.edges,d=u.length,f=d*d,p=function(j){return u.indexOf(j)},v=function(j){return u[j]},h=new Array(f),g=0;g<f;g++){var y=g%d,m=(g-y)/d;m===y?h[g]=0:h[g]=1/0}for(var b=new Array(f),w=new Array(f),C=0;C<c.length;C++){var x=c[C],E=x.source()[0],k=x.target()[0];if(E!==k){var B=p(E),S=p(k),N=B*d+S,D=o(x);if(h[N]>D&&(h[N]=D,b[N]=S,w[N]=x),!i){var P=S*d+B;!i&&h[P]>D&&(h[P]=D,b[P]=B,w[P]=x)}}}for(var F=0;F<d;F++)for(var O=0;O<d;O++)for(var I=O*d+F,_=0;_<d;_++){var M=O*d+_,L=F*d+_;h[I]+h[L]<h[M]&&(h[M]=h[I]+h[L],b[M]=b[I])}var R=function(j){return(be(j)?r.filter(j):j)[0]},H=function(j){return p(R(j))},$={distance:function(j,ee){var J=H(j),Z=H(ee);return h[J*d+Z]},path:function(j,ee){var J=H(j),Z=H(ee),re=v(J);if(J===Z)return re.collection();if(b[J*d+Z]==null)return r.collection();var Y=r.collection(),A=J,K;for(Y.merge(re);J!==Z;)A=J,J=b[J*d+Z],K=w[A*d+J],Y.merge(K),Y.merge(v(J));return Y}};return $}},PB=wt({weight:function(e){return 1},directed:!1,root:null}),OB={bellmanFord:function(e){var r=this,n=PB(e),a=n.weight,i=n.directed,o=n.root,l=a,u=this,c=this.cy(),d=this.byGroup(),f=d.edges,p=d.nodes,v=p.length,h=new wr,g=!1,y=[];o=c.collection(o)[0],f.unmergeBy(function(pe){return pe.isLoop()});for(var m=f.length,b=function(de){var me=h.get(de.id());return me||(me={},h.set(de.id(),me)),me},w=function(de){return(be(de)?c.$(de):de)[0]},C=function(de){return b(w(de)).dist},x=function(de){for(var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o,Ne=w(de),De=[],Ee=Ne;;){if(Ee==null)return r.spawn();var Pe=b(Ee),te=Pe.edge,T=Pe.pred;if(De.unshift(Ee[0]),Ee.same(me)&&De.length>0)break;te!=null&&De.unshift(te),Ee=T}return u.spawn(De)},E=0;E<v;E++){var k=p[E],B=b(k);k.same(o)?B.dist=0:B.dist=1/0,B.pred=null,B.edge=null}for(var S=!1,N=function(de,me,Ne,De,Ee,Pe){var te=De.dist+Pe;te<Ee.dist&&!Ne.same(De.edge)&&(Ee.dist=te,Ee.pred=de,Ee.edge=Ne,S=!0)},D=1;D<v;D++){S=!1;for(var P=0;P<m;P++){var F=f[P],O=F.source(),I=F.target(),_=l(F),M=b(O),L=b(I);N(O,I,F,M,L,_),i||N(I,O,F,L,M,_)}if(!S)break}if(S)for(var R=[],H=0;H<m;H++){var $=f[H],z=$.source(),j=$.target(),ee=l($),J=b(z).dist,Z=b(j).dist;if(J+ee<Z||!i&&Z+ee<J)if(g||(Ae("Graph contains a negative weight cycle for Bellman-Ford"),g=!0),e.findNegativeWeightCycles!==!1){var re=[];J+ee<Z&&re.push(z),!i&&Z+ee<J&&re.push(j);for(var Y=re.length,A=0;A<Y;A++){var K=re[A],W=[K];W.push(b(K).edge);for(var oe=b(K).pred;W.indexOf(oe)===-1;)W.push(oe),W.push(b(oe).edge),oe=b(oe).pred;W=W.slice(W.indexOf(oe));for(var he=W[0].id(),ne=0,se=2;se<W.length;se+=2)W[se].id()<he&&(he=W[se].id(),ne=se);W=W.slice(ne).concat(W.slice(0,ne)),W.push(W[0]);var ue=W.map(function(pe){return pe.id()}).join(",");R.indexOf(ue)===-1&&(y.push(u.spawn(W)),R.push(ue))}}else break}return{distanceTo:C,pathTo:x,hasNegativeWeightCycle:g,negativeWeightCycles:y}}},_B=Math.sqrt(2),FB=function(e,r,n){n.length===0&&Xe("Karger-Stein must be run on a connected (sub)graph");for(var a=n[e],i=a[1],o=a[2],l=r[i],u=r[o],c=n,d=c.length-1;d>=0;d--){var f=c[d],p=f[1],v=f[2];(r[p]===l&&r[v]===u||r[p]===u&&r[v]===l)&&c.splice(d,1)}for(var h=0;h<c.length;h++){var g=c[h];g[1]===u?(c[h]=g.slice(),c[h][1]=l):g[2]===u&&(c[h]=g.slice(),c[h][2]=l)}for(var y=0;y<r.length;y++)r[y]===u&&(r[y]=l);return c},Wl=function(e,r,n,a){for(;n>a;){var i=Math.floor(Math.random()*r.length);r=FB(i,e,r),n--}return r},LB={kargerStein:function(){var e=this,r=this.byGroup(),n=r.nodes,a=r.edges;a.unmergeBy(function(L){return L.isLoop()});var i=n.length,o=a.length,l=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),u=Math.floor(i/_B);if(i<2){Xe("At least 2 nodes are required for Karger-Stein algorithm");return}for(var c=[],d=0;d<o;d++){var f=a[d];c.push([d,n.indexOf(f.source()),n.indexOf(f.target())])}for(var p=1/0,v=[],h=new Array(i),g=new Array(i),y=new Array(i),m=function(R,H){for(var $=0;$<i;$++)H[$]=R[$]},b=0;b<=l;b++){for(var w=0;w<i;w++)g[w]=w;var C=Wl(g,c.slice(),i,u),x=C.slice();m(g,y);var E=Wl(g,C,u,2),k=Wl(y,x,u,2);E.length<=k.length&&E.length<p?(p=E.length,v=E,m(g,h)):k.length<=E.length&&k.length<p&&(p=k.length,v=k,m(y,h))}for(var B=this.spawn(v.map(function(L){return a[L[0]]})),S=this.spawn(),N=this.spawn(),D=h[0],P=0;P<h.length;P++){var F=h[P],O=n[P];F===D?S.merge(O):N.merge(O)}var I=function(R){var H=e.spawn();return R.forEach(function($){H.merge($),$.connectedEdges().forEach(function(z){e.contains(z)&&!B.contains(z)&&H.merge(z)})}),H},_=[I(S),I(N)],M={cut:B,components:_,partition1:S,partition2:N};return M}},MB=function(e){return{x:e.x,y:e.y}},Ao=function(e,r,n){return{x:e.x*r+n.x,y:e.y*r+n.y}},Kh=function(e,r,n){return{x:(e.x-n.x)/r,y:(e.y-n.y)/r}},ma=function(e){return{x:e[0],y:e[1]}},IB=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=1/0,i=r;i<n;i++){var o=e[i];isFinite(o)&&(a=Math.min(o,a))}return a},AB=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=-1/0,i=r;i<n;i++){var o=e[i];isFinite(o)&&(a=Math.max(o,a))}return a},RB=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=0,i=0,o=r;o<n;o++){var l=e[o];isFinite(l)&&(a+=l,i++)}return a/i},VB=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;a?e=e.slice(r,n):(n<e.length&&e.splice(n,e.length-n),r>0&&e.splice(0,r));for(var l=0,u=e.length-1;u>=0;u--){var c=e[u];o?isFinite(c)||(e[u]=-1/0,l++):e.splice(u,1)}i&&e.sort(function(p,v){return p-v});var d=e.length,f=Math.floor(d/2);return d%2!==0?e[f+1+l]:(e[f-1+l]+e[f+l])/2},$B=function(e){return Math.PI*e/180},Ro=function(e,r){return Math.atan2(r,e)-Math.PI/2},jl=Math.log2||function(t){return Math.log(t)/Math.log(2)},qh=function(e){return e>0?1:e<0?-1:0},In=function(e,r){return Math.sqrt(An(e,r))},An=function(e,r){var n=r.x-e.x,a=r.y-e.y;return n*n+a*a},zB=function(e){for(var r=e.length,n=0,a=0;a<r;a++)n+=e[a];for(var i=0;i<r;i++)e[i]=e[i]/n;return e},ft=function(e,r,n,a){return(1-a)*(1-a)*e+2*(1-a)*a*r+a*a*n},ya=function(e,r,n,a){return{x:ft(e.x,r.x,n.x,a),y:ft(e.y,r.y,n.y,a)}},HB=function(e,r,n,a){var i={x:r.x-e.x,y:r.y-e.y},o=In(e,r),l={x:i.x/o,y:i.y/o};return n=n??0,a=a??n*o,{x:e.x+l.x*a,y:e.y+l.y*a}},Si=function(e,r,n){return Math.max(e,Math.min(n,r))},zt=function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},KB=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},qB=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},UB=function(e,r,n){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+n,y2:e.y2+n,w:e.w,h:e.h}},Uh=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},GB=function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Vo=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},$o=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,a,i,o;if(r.length===1)n=a=i=o=r[0];else if(r.length===2)n=i=r[0],o=a=r[1];else if(r.length===4){var l=sr(r,4);n=l[0],a=l[1],i=l[2],o=l[3]}return e.x1-=o,e.x2+=a,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Gh=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Yl=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},ba=function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},WB=function(e,r){return ba(e,r.x,r.y)},Wh=function(e,r){return ba(e,r.x1,r.y1)&&ba(e,r.x2,r.y2)},jh=function(e,r,n,a,i,o,l){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",c=u==="auto"?Vn(i,o):u,d=i/2,f=o/2;c=Math.min(c,d,f);var p=c!==d,v=c!==f,h;if(p){var g=n-d+c-l,y=a-f-l,m=n+d-c+l,b=y;if(h=ln(e,r,n,a,g,y,m,b,!1),h.length>0)return h}if(v){var w=n+d+l,C=a-f+c-l,x=w,E=a+f-c+l;if(h=ln(e,r,n,a,w,C,x,E,!1),h.length>0)return h}if(p){var k=n-d+c-l,B=a+f+l,S=n+d-c+l,N=B;if(h=ln(e,r,n,a,k,B,S,N,!1),h.length>0)return h}if(v){var D=n-d-l,P=a-f+c-l,F=D,O=a+f-c+l;if(h=ln(e,r,n,a,D,P,F,O,!1),h.length>0)return h}var I;{var _=n-d+c,M=a-f+c;if(I=Ti(e,r,n,a,_,M,c+l),I.length>0&&I[0]<=_&&I[1]<=M)return[I[0],I[1]]}{var L=n+d-c,R=a-f+c;if(I=Ti(e,r,n,a,L,R,c+l),I.length>0&&I[0]>=L&&I[1]<=R)return[I[0],I[1]]}{var H=n+d-c,$=a+f-c;if(I=Ti(e,r,n,a,H,$,c+l),I.length>0&&I[0]>=H&&I[1]>=$)return[I[0],I[1]]}{var z=n-d+c,j=a+f-c;if(I=Ti(e,r,n,a,z,j,c+l),I.length>0&&I[0]<=z&&I[1]>=j)return[I[0],I[1]]}return[]},jB=function(e,r,n,a,i,o,l){var u=l,c=Math.min(n,i),d=Math.max(n,i),f=Math.min(a,o),p=Math.max(a,o);return c-u<=e&&e<=d+u&&f-u<=r&&r<=p+u},YB=function(e,r,n,a,i,o,l,u,c){var d={x1:Math.min(n,l,i)-c,x2:Math.max(n,l,i)+c,y1:Math.min(a,u,o)-c,y2:Math.max(a,u,o)+c};return!(e<d.x1||e>d.x2||r<d.y1||r>d.y2)},XB=function(e,r,n,a){n-=a;var i=r*r-4*e*n;if(i<0)return[];var o=Math.sqrt(i),l=2*e,u=(-r+o)/l,c=(-r-o)/l;return[u,c]},ZB=function(e,r,n,a,i){var o=1e-5;e===0&&(e=o),r/=e,n/=e,a/=e;var l,u,c,d,f,p,v,h;if(u=(3*n-r*r)/9,c=-(27*a)+r*(9*n-2*(r*r)),c/=54,l=u*u*u+c*c,i[1]=0,v=r/3,l>0){f=c+Math.sqrt(l),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),p=c-Math.sqrt(l),p=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),i[0]=-v+f+p,v+=(f+p)/2,i[4]=i[2]=-v,v=Math.sqrt(3)*(-p+f)/2,i[3]=v,i[5]=-v;return}if(i[5]=i[3]=0,l===0){h=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-v+2*h,i[4]=i[2]=-(h+v);return}u=-u,d=u*u*u,d=Math.acos(c/Math.sqrt(d)),h=2*Math.sqrt(u),i[0]=-v+h*Math.cos(d/3),i[2]=-v+h*Math.cos((d+2*Math.PI)/3),i[4]=-v+h*Math.cos((d+4*Math.PI)/3)},QB=function(e,r,n,a,i,o,l,u){var c=1*n*n-4*n*i+2*n*l+4*i*i-4*i*l+l*l+a*a-4*a*o+2*a*u+4*o*o-4*o*u+u*u,d=1*9*n*i-3*n*n-3*n*l-6*i*i+3*i*l+9*a*o-3*a*a-3*a*u-6*o*o+3*o*u,f=1*3*n*n-6*n*i+n*l-n*e+2*i*i+2*i*e-l*e+3*a*a-6*a*o+a*u-a*r+2*o*o+2*o*r-u*r,p=1*n*i-n*n+n*e-i*e+a*o-a*a+a*r-o*r,v=[];ZB(c,d,f,p,v);for(var h=1e-7,g=[],y=0;y<6;y+=2)Math.abs(v[y+1])<h&&v[y]>=0&&v[y]<=1&&g.push(v[y]);g.push(1),g.push(0);for(var m=-1,b,w,C,x=0;x<g.length;x++)b=Math.pow(1-g[x],2)*n+2*(1-g[x])*g[x]*i+g[x]*g[x]*l,w=Math.pow(1-g[x],2)*a+2*(1-g[x])*g[x]*o+g[x]*g[x]*u,C=Math.pow(b-e,2)+Math.pow(w-r,2),m>=0?C<m&&(m=C):m=C;return m},JB=function(e,r,n,a,i,o){var l=[e-n,r-a],u=[i-n,o-a],c=u[0]*u[0]+u[1]*u[1],d=l[0]*l[0]+l[1]*l[1],f=l[0]*u[0]+l[1]*u[1],p=f*f/c;return f<0?d:p>c?(e-i)*(e-i)+(r-o)*(r-o):d-p},Ht=function(e,r,n){for(var a,i,o,l,u,c=0,d=0;d<n.length/2;d++)if(a=n[d*2],i=n[d*2+1],d+1<n.length/2?(o=n[(d+1)*2],l=n[(d+1)*2+1]):(o=n[(d+1-n.length/2)*2],l=n[(d+1-n.length/2)*2+1]),!(a==e&&o==e))if(a>=e&&e>=o||a<=e&&e<=o)u=(e-a)/(o-a)*(l-i)+i,u>r&&c++;else continue;return c%2!==0},Vr=function(e,r,n,a,i,o,l,u,c){var d=new Array(n.length),f;u[0]!=null?(f=Math.atan(u[1]/u[0]),u[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=u;for(var p=Math.cos(-f),v=Math.sin(-f),h=0;h<d.length/2;h++)d[h*2]=o/2*(n[h*2]*p-n[h*2+1]*v),d[h*2+1]=l/2*(n[h*2+1]*p+n[h*2]*v),d[h*2]+=a,d[h*2+1]+=i;var g;if(c>0){var y=Ho(d,-c);g=zo(y)}else g=d;return Ht(e,r,g)},e5=function(e,r,n,a,i,o,l,u){for(var c=new Array(n.length*2),d=0;d<u.length;d++){var f=u[d];c[d*4+0]=f.startX,c[d*4+1]=f.startY,c[d*4+2]=f.stopX,c[d*4+3]=f.stopY;var p=Math.pow(f.cx-e,2)+Math.pow(f.cy-r,2);if(p<=Math.pow(f.radius,2))return!0}return Ht(e,r,c)},zo=function(e){for(var r=new Array(e.length/2),n,a,i,o,l,u,c,d,f=0;f<e.length/4;f++){n=e[f*4],a=e[f*4+1],i=e[f*4+2],o=e[f*4+3],f<e.length/4-1?(l=e[(f+1)*4],u=e[(f+1)*4+1],c=e[(f+1)*4+2],d=e[(f+1)*4+3]):(l=e[0],u=e[1],c=e[2],d=e[3]);var p=ln(n,a,i,o,l,u,c,d,!0);r[f*2]=p[0],r[f*2+1]=p[1]}return r},Ho=function(e,r){for(var n=new Array(e.length*2),a,i,o,l,u=0;u<e.length/2;u++){a=e[u*2],i=e[u*2+1],u<e.length/2-1?(o=e[(u+1)*2],l=e[(u+1)*2+1]):(o=e[0],l=e[1]);var c=l-i,d=-(o-a),f=Math.sqrt(c*c+d*d),p=c/f,v=d/f;n[u*4]=a+p*r,n[u*4+1]=i+v*r,n[u*4+2]=o+p*r,n[u*4+3]=l+v*r}return n},t5=function(e,r,n,a,i,o){var l=n-e,u=a-r;l/=i,u/=o;var c=Math.sqrt(l*l+u*u),d=c-1;if(d<0)return[];var f=d/c;return[(n-e)*f+e,(a-r)*f+r]},Rn=function(e,r,n,a,i,o,l){return e-=i,r-=o,e/=n/2+l,r/=a/2+l,e*e+r*r<=1},Ti=function(e,r,n,a,i,o,l){var u=[n-e,a-r],c=[e-i,r-o],d=u[0]*u[0]+u[1]*u[1],f=2*(c[0]*u[0]+c[1]*u[1]),p=c[0]*c[0]+c[1]*c[1]-l*l,v=f*f-4*d*p;if(v<0)return[];var h=(-f+Math.sqrt(v))/(2*d),g=(-f-Math.sqrt(v))/(2*d),y=Math.min(h,g),m=Math.max(h,g),b=[];if(y>=0&&y<=1&&b.push(y),m>=0&&m<=1&&b.push(m),b.length===0)return[];var w=b[0]*u[0]+e,C=b[0]*u[1]+r;if(b.length>1){if(b[0]==b[1])return[w,C];var x=b[1]*u[0]+e,E=b[1]*u[1]+r;return[w,C,x,E]}else return[w,C]},Xl=function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},ln=function(e,r,n,a,i,o,l,u,c){var d=e-i,f=n-e,p=l-i,v=r-o,h=a-r,g=u-o,y=p*v-g*d,m=f*v-h*d,b=g*f-p*h;if(b!==0){var w=y/b,C=m/b,x=.001,E=0-x,k=1+x;return E<=w&&w<=k&&E<=C&&C<=k?[e+w*f,r+w*h]:c?[e+w*f,r+w*h]:[]}else return y===0||m===0?Xl(e,n,l)===l?[l,u]:Xl(e,n,i)===i?[i,o]:Xl(i,l,n)===n?[n,a]:[]:[]},Bi=function(e,r,n,a,i,o,l,u){var c=[],d,f=new Array(n.length),p=!0;o==null&&(p=!1);var v;if(p){for(var h=0;h<f.length/2;h++)f[h*2]=n[h*2]*o+a,f[h*2+1]=n[h*2+1]*l+i;if(u>0){var g=Ho(f,-u);v=zo(g)}else v=f}else v=n;for(var y,m,b,w,C=0;C<v.length/2;C++)y=v[C*2],m=v[C*2+1],C<v.length/2-1?(b=v[(C+1)*2],w=v[(C+1)*2+1]):(b=v[0],w=v[1]),d=ln(e,r,a,i,y,m,b,w),d.length!==0&&c.push(d[0],d[1]);return c},r5=function(e,r,n,a,i,o,l,u,c){var d=[],f,p=new Array(n.length*2);c.forEach(function(b,w){w===0?(p[p.length-2]=b.startX,p[p.length-1]=b.startY):(p[w*4-2]=b.startX,p[w*4-1]=b.startY),p[w*4]=b.stopX,p[w*4+1]=b.stopY,f=Ti(e,r,a,i,b.cx,b.cy,b.radius),f.length!==0&&d.push(f[0],f[1])});for(var v=0;v<p.length/4;v++)f=ln(e,r,a,i,p[v*4],p[v*4+1],p[v*4+2],p[v*4+3],!1),f.length!==0&&d.push(f[0],f[1]);if(d.length>2){for(var h=[d[0],d[1]],g=Math.pow(h[0]-e,2)+Math.pow(h[1]-r,2),y=1;y<d.length/2;y++){var m=Math.pow(d[y*2]-e,2)+Math.pow(d[y*2+1]-r,2);m<=g&&(h[0]=d[y*2],h[1]=d[y*2+1],g=m)}return h}return d},Ko=function(e,r,n){var a=[e[0]-r[0],e[1]-r[1]],i=Math.sqrt(a[0]*a[0]+a[1]*a[1]),o=(i-n)/i;return o<0&&(o=1e-5),[r[0]+o*a[0],r[1]+o*a[1]]},Mt=function(e,r){var n=Zl(e,r);return n=Yh(n),n},Yh=function(e){for(var r,n,a=e.length/2,i=1/0,o=1/0,l=-1/0,u=-1/0,c=0;c<a;c++)r=e[2*c],n=e[2*c+1],i=Math.min(i,r),l=Math.max(l,r),o=Math.min(o,n),u=Math.max(u,n);for(var d=2/(l-i),f=2/(u-o),p=0;p<a;p++)r=e[2*p]=e[2*p]*d,n=e[2*p+1]=e[2*p+1]*f,i=Math.min(i,r),l=Math.max(l,r),o=Math.min(o,n),u=Math.max(u,n);if(o<-1)for(var v=0;v<a;v++)n=e[2*v+1]=e[2*v+1]+(-1-o);return e},Zl=function(e,r){var n=1/e*2*Math.PI,a=e%2===0?Math.PI/2+n/2:Math.PI/2;a+=r;for(var i=new Array(e*2),o,l=0;l<e;l++)o=l*n+a,i[2*l]=Math.cos(o),i[2*l+1]=Math.sin(-o);return i},Vn=function(e,r){return Math.min(e/4,r/4,8)},Xh=function(e,r){return Math.min(e/10,r/10,8)},Ql=function(){return 8},n5=function(e,r,n){return[e-2*r+n,2*(r-e),e]},Jl=function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},a5=wt({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),i5={pageRank:function(e){for(var r=a5(e),n=r.dampingFactor,a=r.precision,i=r.iterations,o=r.weight,l=this._private.cy,u=this.byGroup(),c=u.nodes,d=u.edges,f=c.length,p=f*f,v=d.length,h=new Array(p),g=new Array(f),y=(1-n)/f,m=0;m<f;m++){for(var b=0;b<f;b++){var w=m*f+b;h[w]=0}g[m]=0}for(var C=0;C<v;C++){var x=d[C],E=x.data("source"),k=x.data("target");if(E!==k){var B=c.indexOfId(E),S=c.indexOfId(k),N=o(x),D=S*f+B;h[D]+=N,g[B]+=N}}for(var P=1/f+y,F=0;F<f;F++)if(g[F]===0)for(var O=0;O<f;O++){var I=O*f+F;h[I]=P}else for(var _=0;_<f;_++){var M=_*f+F;h[M]=h[M]/g[F]+y}for(var L=new Array(f),R=new Array(f),H,$=0;$<f;$++)L[$]=1;for(var z=0;z<i;z++){for(var j=0;j<f;j++)R[j]=0;for(var ee=0;ee<f;ee++)for(var J=0;J<f;J++){var Z=ee*f+J;R[ee]+=h[Z]*L[J]}zB(R),H=L,L=R,R=H;for(var re=0,Y=0;Y<f;Y++){var A=H[Y]-L[Y];re+=A*A}if(re<a)break}var K={rank:function(oe){return oe=l.collection(oe)[0],L[c.indexOf(oe)]}};return K}},Zh=wt({root:null,weight:function(e){return 1},directed:!1,alpha:0}),wa={degreeCentralityNormalized:function(e){e=Zh(e);var r=this.cy(),n=this.nodes(),a=n.length;if(e.directed){for(var d={},f={},p=0,v=0,h=0;h<a;h++){var g=n[h],y=g.id();e.root=g;var m=this.degreeCentrality(e);p<m.indegree&&(p=m.indegree),v<m.outdegree&&(v=m.outdegree),d[y]=m.indegree,f[y]=m.outdegree}return{indegree:function(w){return p==0?0:(be(w)&&(w=r.filter(w)),d[w.id()]/p)},outdegree:function(w){return v===0?0:(be(w)&&(w=r.filter(w)),f[w.id()]/v)}}}else{for(var i={},o=0,l=0;l<a;l++){var u=n[l];e.root=u;var c=this.degreeCentrality(e);o<c.degree&&(o=c.degree),i[u.id()]=c.degree}return{degree:function(w){return o===0?0:(be(w)&&(w=r.filter(w)),i[w.id()]/o)}}}},degreeCentrality:function(e){e=Zh(e);var r=this.cy(),n=this,a=e,i=a.root,o=a.weight,l=a.directed,u=a.alpha;if(i=r.collection(i)[0],l){for(var v=i.connectedEdges(),h=v.filter(function(E){return E.target().same(i)&&n.has(E)}),g=v.filter(function(E){return E.source().same(i)&&n.has(E)}),y=h.length,m=g.length,b=0,w=0,C=0;C<h.length;C++)b+=o(h[C]);for(var x=0;x<g.length;x++)w+=o(g[x]);return{indegree:Math.pow(y,1-u)*Math.pow(b,u),outdegree:Math.pow(m,1-u)*Math.pow(w,u)}}else{for(var c=i.connectedEdges().intersection(n),d=c.length,f=0,p=0;p<c.length;p++)f+=o(c[p]);return{degree:Math.pow(d,1-u)*Math.pow(f,u)}}}};wa.dc=wa.degreeCentrality,wa.dcn=wa.degreeCentralityNormalised=wa.degreeCentralityNormalized;var Qh=wt({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Ca={closenessCentralityNormalized:function(e){for(var r=Qh(e),n=r.harmonic,a=r.weight,i=r.directed,o=this.cy(),l={},u=0,c=this.nodes(),d=this.floydWarshall({weight:a,directed:i}),f=0;f<c.length;f++){for(var p=0,v=c[f],h=0;h<c.length;h++)if(f!==h){var g=d.distance(v,c[h]);n?p+=1/g:p+=g}n||(p=1/p),u<p&&(u=p),l[v.id()]=p}return{closeness:function(m){return u==0?0:(be(m)?m=o.filter(m)[0].id():m=m.id(),l[m]/u)}}},closenessCentrality:function(e){var r=Qh(e),n=r.root,a=r.weight,i=r.directed,o=r.harmonic;n=this.filter(n)[0];for(var l=this.dijkstra({root:n,weight:a,directed:i}),u=0,c=this.nodes(),d=0;d<c.length;d++){var f=c[d];if(!f.same(n)){var p=l.distanceTo(f);o?u+=1/p:u+=p}}return o?u:1/u}};Ca.cc=Ca.closenessCentrality,Ca.ccn=Ca.closenessCentralityNormalised=Ca.closenessCentralityNormalized;var o5=wt({weight:null,directed:!1}),ec={betweennessCentrality:function(e){for(var r=o5(e),n=r.directed,a=r.weight,i=a!=null,o=this.cy(),l=this.nodes(),u={},c={},d=0,f={set:function(w,C){c[w]=C,C>d&&(d=C)},get:function(w){return c[w]}},p=0;p<l.length;p++){var v=l[p],h=v.id();n?u[h]=v.outgoers().nodes():u[h]=v.openNeighborhood().nodes(),f.set(h,0)}for(var g=function(w){for(var C=l[w].id(),x=[],E={},k={},B={},S=new Ei(function(J,Z){return B[J]-B[Z]}),N=0;N<l.length;N++){var D=l[N].id();E[D]=[],k[D]=0,B[D]=1/0}for(k[C]=1,B[C]=0,S.push(C);!S.empty();){var P=S.pop();if(x.push(P),i)for(var F=0;F<u[P].length;F++){var O=u[P][F],I=o.getElementById(P),_=void 0;I.edgesTo(O).length>0?_=I.edgesTo(O)[0]:_=O.edgesTo(I)[0];var M=a(_);O=O.id(),B[O]>B[P]+M&&(B[O]=B[P]+M,S.nodes.indexOf(O)<0?S.push(O):S.updateItem(O),k[O]=0,E[O]=[]),B[O]==B[P]+M&&(k[O]=k[O]+k[P],E[O].push(P))}else for(var L=0;L<u[P].length;L++){var R=u[P][L].id();B[R]==1/0&&(S.push(R),B[R]=B[P]+1),B[R]==B[P]+1&&(k[R]=k[R]+k[P],E[R].push(P))}}for(var H={},$=0;$<l.length;$++)H[l[$].id()]=0;for(;x.length>0;){for(var z=x.pop(),j=0;j<E[z].length;j++){var ee=E[z][j];H[ee]=H[ee]+k[ee]/k[z]*(1+H[z])}z!=l[w].id()&&f.set(z,f.get(z)+H[z])}},y=0;y<l.length;y++)g(y);var m={betweenness:function(w){var C=o.collection(w).id();return f.get(C)},betweennessNormalized:function(w){if(d==0)return 0;var C=o.collection(w).id();return f.get(C)/d}};return m.betweennessNormalised=m.betweennessNormalized,m}};ec.bc=ec.betweennessCentrality;var s5=wt({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),l5=function(e){return s5(e)},c5=function(e,r){for(var n=0,a=0;a<r.length;a++)n+=r[a](e);return n},u5=function(e,r,n){for(var a=0;a<r;a++)e[a*r+a]=n},Jh=function(e,r){for(var n,a=0;a<r;a++){n=0;for(var i=0;i<r;i++)n+=e[i*r+a];for(var o=0;o<r;o++)e[o*r+a]=e[o*r+a]/n}},d5=function(e,r,n){for(var a=new Array(n*n),i=0;i<n;i++){for(var o=0;o<n;o++)a[i*n+o]=0;for(var l=0;l<n;l++)for(var u=0;u<n;u++)a[i*n+u]+=e[i*n+l]*r[l*n+u]}return a},f5=function(e,r,n){for(var a=e.slice(0),i=1;i<n;i++)e=d5(e,a,r);return e},h5=function(e,r,n){for(var a=new Array(r*r),i=0;i<r*r;i++)a[i]=Math.pow(e[i],n);return Jh(a,r),a},p5=function(e,r,n,a){for(var i=0;i<n;i++){var o=Math.round(e[i]*Math.pow(10,a))/Math.pow(10,a),l=Math.round(r[i]*Math.pow(10,a))/Math.pow(10,a);if(o!==l)return!1}return!0},v5=function(e,r,n,a){for(var i=[],o=0;o<r;o++){for(var l=[],u=0;u<r;u++)Math.round(e[o*r+u]*1e3)/1e3>0&&l.push(n[u]);l.length!==0&&i.push(a.collection(l))}return i},g5=function(e,r){for(var n=0;n<e.length;n++)if(!r[n]||e[n].id()!==r[n].id())return!1;return!0},m5=function(e){for(var r=0;r<e.length;r++)for(var n=0;n<e.length;n++)r!=n&&g5(e[r],e[n])&&e.splice(n,1);return e},ep=function(e){for(var r=this.nodes(),n=this.edges(),a=this.cy(),i=l5(e),o={},l=0;l<r.length;l++)o[r[l].id()]=l;for(var u=r.length,c=u*u,d=new Array(c),f,p=0;p<c;p++)d[p]=0;for(var v=0;v<n.length;v++){var h=n[v],g=o[h.source().id()],y=o[h.target().id()],m=c5(h,i.attributes);d[g*u+y]+=m,d[y*u+g]+=m}u5(d,u,i.multFactor),Jh(d,u);for(var b=!0,w=0;b&&w<i.maxIterations;)b=!1,f=f5(d,u,i.expandFactor),d=h5(f,u,i.inflateFactor),p5(d,f,c,4)||(b=!0),w++;var C=v5(d,u,r,a);return C=m5(C),C},y5={markovClustering:ep,mcl:ep},b5=function(e){return e},tp=function(e,r){return Math.abs(r-e)},rp=function(e,r,n){return e+tp(r,n)},np=function(e,r,n){return e+Math.pow(n-r,2)},w5=function(e){return Math.sqrt(e)},C5=function(e,r,n){return Math.max(e,tp(r,n))},Ni=function(e,r,n,a,i){for(var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:b5,l=a,u,c,d=0;d<e;d++)u=r(d),c=n(d),l=i(l,u,c);return o(l)},ka={euclidean:function(e,r,n){return e>=2?Ni(e,r,n,0,np,w5):Ni(e,r,n,0,rp)},squaredEuclidean:function(e,r,n){return Ni(e,r,n,0,np)},manhattan:function(e,r,n){return Ni(e,r,n,0,rp)},max:function(e,r,n){return Ni(e,r,n,-1/0,C5)}};ka["squared-euclidean"]=ka.squaredEuclidean,ka.squaredeuclidean=ka.squaredEuclidean;function qo(t,e,r,n,a,i){var o;return Ye(t)?o=t:o=ka[t]||ka.euclidean,e===0&&Ye(t)?o(a,i):o(e,r,n,a,i)}var k5=wt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),tc=function(e){return k5(e)},Uo=function(e,r,n,a,i){var o=i!=="kMedoids",l=o?function(f){return n[f]}:function(f){return a[f](n)},u=function(p){return a[p](r)},c=n,d=r;return qo(e,a.length,l,u,c,d)},rc=function(e,r,n){for(var a=n.length,i=new Array(a),o=new Array(a),l=new Array(r),u=null,c=0;c<a;c++)i[c]=e.min(n[c]).value,o[c]=e.max(n[c]).value;for(var d=0;d<r;d++){u=[];for(var f=0;f<a;f++)u[f]=Math.random()*(o[f]-i[f])+i[f];l[d]=u}return l},ap=function(e,r,n,a,i){for(var o=1/0,l=0,u=0;u<r.length;u++){var c=Uo(n,e,r[u],a,i);c<o&&(o=c,l=u)}return l},ip=function(e,r,n){for(var a=[],i=null,o=0;o<r.length;o++)i=r[o],n[i.id()]===e&&a.push(i);return a},x5=function(e,r,n){return Math.abs(r-e)<=n},E5=function(e,r,n){for(var a=0;a<e.length;a++)for(var i=0;i<e[a].length;i++){var o=Math.abs(e[a][i]-r[a][i]);if(o>n)return!1}return!0},S5=function(e,r,n){for(var a=0;a<n;a++)if(e===r[a])return!0;return!1},op=function(e,r){var n=new Array(r);if(e.length<50)for(var a=0;a<r;a++){for(var i=e[Math.floor(Math.random()*e.length)];S5(i,n,a);)i=e[Math.floor(Math.random()*e.length)];n[a]=i}else for(var o=0;o<r;o++)n[o]=e[Math.floor(Math.random()*e.length)];return n},sp=function(e,r,n){for(var a=0,i=0;i<r.length;i++)a+=Uo("manhattan",r[i],e,n,"kMedoids");return a},T5=function(e){var r=this.cy(),n=this.nodes(),a=null,i=tc(e),o=new Array(i.k),l={},u;i.testMode?typeof i.testCentroids=="number"?(i.testCentroids,u=rc(n,i.k,i.attributes)):ot(i.testCentroids)==="object"?u=i.testCentroids:u=rc(n,i.k,i.attributes):u=rc(n,i.k,i.attributes);for(var c=!0,d=0;c&&d<i.maxIterations;){for(var f=0;f<n.length;f++)a=n[f],l[a.id()]=ap(a,u,i.distance,i.attributes,"kMeans");c=!1;for(var p=0;p<i.k;p++){var v=ip(p,n,l);if(v.length!==0){for(var h=i.attributes.length,g=u[p],y=new Array(h),m=new Array(h),b=0;b<h;b++){m[b]=0;for(var w=0;w<v.length;w++)a=v[w],m[b]+=i.attributes[b](a);y[b]=m[b]/v.length,x5(y[b],g[b],i.sensitivityThreshold)||(c=!0)}u[p]=y,o[p]=r.collection(v)}}d++}return o},B5=function(e){var r=this.cy(),n=this.nodes(),a=null,i=tc(e),o=new Array(i.k),l,u={},c,d=new Array(i.k);i.testMode?typeof i.testCentroids=="number"||(ot(i.testCentroids)==="object"?l=i.testCentroids:l=op(n,i.k)):l=op(n,i.k);for(var f=!0,p=0;f&&p<i.maxIterations;){for(var v=0;v<n.length;v++)a=n[v],u[a.id()]=ap(a,l,i.distance,i.attributes,"kMedoids");f=!1;for(var h=0;h<l.length;h++){var g=ip(h,n,u);if(g.length!==0){d[h]=sp(l[h],g,i.attributes);for(var y=0;y<g.length;y++)c=sp(g[y],g,i.attributes),c<d[h]&&(d[h]=c,l[h]=g[y],f=!0);o[h]=r.collection(g)}}p++}return o},N5=function(e,r,n,a,i){for(var o,l,u=0;u<r.length;u++)for(var c=0;c<e.length;c++)a[u][c]=Math.pow(n[u][c],i.m);for(var d=0;d<e.length;d++)for(var f=0;f<i.attributes.length;f++){o=0,l=0;for(var p=0;p<r.length;p++)o+=a[p][d]*i.attributes[f](r[p]),l+=a[p][d];e[d][f]=o/l}},D5=function(e,r,n,a,i){for(var o=0;o<e.length;o++)r[o]=e[o].slice();for(var l,u,c,d=2/(i.m-1),f=0;f<n.length;f++)for(var p=0;p<a.length;p++){l=0;for(var v=0;v<n.length;v++)u=Uo(i.distance,a[p],n[f],i.attributes,"cmeans"),c=Uo(i.distance,a[p],n[v],i.attributes,"cmeans"),l+=Math.pow(u/c,d);e[p][f]=1/l}},P5=function(e,r,n,a){for(var i=new Array(n.k),o=0;o<i.length;o++)i[o]=[];for(var l,u,c=0;c<r.length;c++){l=-1/0,u=-1;for(var d=0;d<r[0].length;d++)r[c][d]>l&&(l=r[c][d],u=d);i[u].push(e[c])}for(var f=0;f<i.length;f++)i[f]=a.collection(i[f]);return i},lp=function(e){var r=this.cy(),n=this.nodes(),a=tc(e),i,o,l,u,c;u=new Array(n.length);for(var d=0;d<n.length;d++)u[d]=new Array(a.k);l=new Array(n.length);for(var f=0;f<n.length;f++)l[f]=new Array(a.k);for(var p=0;p<n.length;p++){for(var v=0,h=0;h<a.k;h++)l[p][h]=Math.random(),v+=l[p][h];for(var g=0;g<a.k;g++)l[p][g]=l[p][g]/v}o=new Array(a.k);for(var y=0;y<a.k;y++)o[y]=new Array(a.attributes.length);c=new Array(n.length);for(var m=0;m<n.length;m++)c[m]=new Array(a.k);for(var b=!0,w=0;b&&w<a.maxIterations;)b=!1,N5(o,n,l,c,a),D5(l,u,o,n,a),E5(l,u,a.sensitivityThreshold)||(b=!0),w++;return i=P5(n,l,a,r),{clusters:i,degreeOfMembership:l}},O5={kMeans:T5,kMedoids:B5,fuzzyCMeans:lp,fcm:lp},_5=wt({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),F5={single:"min",complete:"max"},L5=function(e){var r=_5(e),n=F5[r.linkage];return n!=null&&(r.linkage=n),r},cp=function(e,r,n,a,i){for(var o=0,l=1/0,u,c=i.attributes,d=function(S,N){return qo(i.distance,c.length,function(D){return c[D](S)},function(D){return c[D](N)},S,N)},f=0;f<e.length;f++){var p=e[f].key,v=n[p][a[p]];v<l&&(o=p,l=v)}if(i.mode==="threshold"&&l>=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var h=r[o],g=r[a[o]],y;i.mode==="dendrogram"?y={left:h,right:g,key:h.key}:y={value:h.value.concat(g.value),key:h.key},e[h.index]=y,e.splice(g.index,1),r[h.key]=y;for(var m=0;m<e.length;m++){var b=e[m];h.key===b.key?u=1/0:i.linkage==="min"?(u=n[h.key][b.key],n[h.key][b.key]>n[g.key][b.key]&&(u=n[g.key][b.key])):i.linkage==="max"?(u=n[h.key][b.key],n[h.key][b.key]<n[g.key][b.key]&&(u=n[g.key][b.key])):i.linkage==="mean"?u=(n[h.key][b.key]*h.size+n[g.key][b.key]*g.size)/(h.size+g.size):i.mode==="dendrogram"?u=d(b.value,h.value):u=d(b.value[0],h.value[0]),n[h.key][b.key]=n[b.key][h.key]=u}for(var w=0;w<e.length;w++){var C=e[w].key;if(a[C]===h.key||a[C]===g.key){for(var x=C,E=0;E<e.length;E++){var k=e[E].key;n[C][k]<n[C][x]&&(x=k)}a[C]=x}e[w].index=w}return h.key=g.key=h.index=g.index=null,!0},Go=function t(e,r,n){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},M5=function t(e,r){if(!e)return"";if(e.left&&e.right){var n=t(e.left,r),a=t(e.right,r),i=r.add({group:"nodes",data:{id:n+","+a}});return r.add({group:"edges",data:{source:n,target:i.id()}}),r.add({group:"edges",data:{source:a,target:i.id()}}),i.id()}else if(e.value)return e.value.id()},I5=function t(e,r,n){if(!e)return[];var a=[],i=[],o=[];return r===0?(e.left&&Go(e.left,a),e.right&&Go(e.right,i),o=a.concat(i),[n.collection(o)]):r===1?e.value?[n.collection(e.value)]:(e.left&&Go(e.left,a),e.right&&Go(e.right,i),[n.collection(a),n.collection(i)]):e.value?[n.collection(e.value)]:(e.left&&(a=t(e.left,r-1,n)),e.right&&(i=t(e.right,r-1,n)),a.concat(i))},up=function(e){for(var r=this.cy(),n=this.nodes(),a=L5(e),i=a.attributes,o=function(w,C){return qo(a.distance,i.length,function(x){return i[x](w)},function(x){return i[x](C)},w,C)},l=[],u=[],c=[],d=[],f=0;f<n.length;f++){var p={value:a.mode==="dendrogram"?n[f]:[n[f]],key:f,index:f};l[f]=p,d[f]=p,u[f]=[],c[f]=0}for(var v=0;v<l.length;v++)for(var h=0;h<=v;h++){var g=void 0;a.mode==="dendrogram"?g=v===h?1/0:o(l[v].value,l[h].value):g=v===h?1/0:o(l[v].value[0],l[h].value[0]),u[v][h]=g,u[h][v]=g,g<u[v][c[v]]&&(c[v]=h)}for(var y=cp(l,d,u,c,a);y;)y=cp(l,d,u,c,a);var m;return a.mode==="dendrogram"?(m=I5(l[0],a.dendrogramDepth,r),a.addDendrogram&&M5(l[0],r)):(m=new Array(l.length),l.forEach(function(b,w){b.key=b.index=null,m[w]=r.collection(b.value)})),m},A5={hierarchicalClustering:up,hca:up},R5=wt({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),V5=function(e){var r=e.damping,n=e.preference;.5<=r&&r<1||Xe("Damping must range on [0.5, 1). Got: ".concat(r));var a=["median","mean","min","max"];return a.some(function(i){return i===n})||le(n)||Xe("Preference must be one of [".concat(a.map(function(i){return"'".concat(i,"'")}).join(", "),"] or a number. Got: ").concat(n)),R5(e)},$5=function(e,r,n,a){var i=function(l,u){return a[u](l)};return-qo(e,a.length,function(o){return i(r,o)},function(o){return i(n,o)},r,n)},z5=function(e,r){var n=null;return r==="median"?n=VB(e):r==="mean"?n=RB(e):r==="min"?n=IB(e):r==="max"?n=AB(e):n=r,n},H5=function(e,r,n){for(var a=[],i=0;i<e;i++)r[i*e+i]+n[i*e+i]>0&&a.push(i);return a},dp=function(e,r,n){for(var a=[],i=0;i<e;i++){for(var o=-1,l=-1/0,u=0;u<n.length;u++){var c=n[u];r[i*e+c]>l&&(o=c,l=r[i*e+c])}o>0&&a.push(o)}for(var d=0;d<n.length;d++)a[n[d]]=n[d];return a},K5=function(e,r,n){for(var a=dp(e,r,n),i=0;i<n.length;i++){for(var o=[],l=0;l<a.length;l++)a[l]===n[i]&&o.push(l);for(var u=-1,c=-1/0,d=0;d<o.length;d++){for(var f=0,p=0;p<o.length;p++)f+=r[o[p]*e+o[d]];f>c&&(u=d,c=f)}n[i]=o[u]}return a=dp(e,r,n),a},fp=function(e){for(var r=this.cy(),n=this.nodes(),a=V5(e),i={},o=0;o<n.length;o++)i[n[o].id()]=o;var l,u,c,d,f,p;l=n.length,u=l*l,c=new Array(u);for(var v=0;v<u;v++)c[v]=-1/0;for(var h=0;h<l;h++)for(var g=0;g<l;g++)h!==g&&(c[h*l+g]=$5(a.distance,n[h],n[g],a.attributes));d=z5(c,a.preference);for(var y=0;y<l;y++)c[y*l+y]=d;f=new Array(u);for(var m=0;m<u;m++)f[m]=0;p=new Array(u);for(var b=0;b<u;b++)p[b]=0;for(var w=new Array(l),C=new Array(l),x=new Array(l),E=0;E<l;E++)w[E]=0,C[E]=0,x[E]=0;for(var k=new Array(l*a.minIterations),B=0;B<k.length;B++)k[B]=0;var S;for(S=0;S<a.maxIterations;S++){for(var N=0;N<l;N++){for(var D=-1/0,P=-1/0,F=-1,O=0,I=0;I<l;I++)w[I]=f[N*l+I],O=p[N*l+I]+c[N*l+I],O>=D?(P=D,D=O,F=I):O>P&&(P=O);for(var _=0;_<l;_++)f[N*l+_]=(1-a.damping)*(c[N*l+_]-D)+a.damping*w[_];f[N*l+F]=(1-a.damping)*(c[N*l+F]-P)+a.damping*w[F]}for(var M=0;M<l;M++){for(var L=0,R=0;R<l;R++)w[R]=p[R*l+M],C[R]=Math.max(0,f[R*l+M]),L+=C[R];L-=C[M],C[M]=f[M*l+M],L+=C[M];for(var H=0;H<l;H++)p[H*l+M]=(1-a.damping)*Math.min(0,L-C[H])+a.damping*w[H];p[M*l+M]=(1-a.damping)*(L-C[M])+a.damping*w[M]}for(var $=0,z=0;z<l;z++){var j=p[z*l+z]+f[z*l+z]>0?1:0;k[S%a.minIterations*l+z]=j,$+=j}if($>0&&(S>=a.minIterations-1||S==a.maxIterations-1)){for(var ee=0,J=0;J<l;J++){x[J]=0;for(var Z=0;Z<a.minIterations;Z++)x[J]+=k[Z*l+J];(x[J]===0||x[J]===a.minIterations)&&ee++}if(ee===l)break}}for(var re=H5(l,f,p),Y=K5(l,c,re),A={},K=0;K<re.length;K++)A[re[K]]=[];for(var W=0;W<n.length;W++){var oe=i[n[W].id()],he=Y[oe];he!=null&&A[he].push(n[W])}for(var ne=new Array(re.length),se=0;se<re.length;se++)ne[se]=r.collection(A[re[se]]);return ne},q5={affinityPropagation:fp,ap:fp},U5=wt({root:void 0,directed:!1}),G5={hierholzer:function(e){if(!_e(e)){var r=arguments;e={root:r[0],directed:r[1]}}var n=U5(e),a=n.root,i=n.directed,o=this,l=!1,u,c,d;a&&(d=be(a)?this.filter(a)[0].id():a[0].id());var f={},p={};i?o.forEach(function(b){var w=b.id();if(b.isNode()){var C=b.indegree(!0),x=b.outdegree(!0),E=C-x,k=x-C;E==1?u?l=!0:u=w:k==1?c?l=!0:c=w:(k>1||E>1)&&(l=!0),f[w]=[],b.outgoers().forEach(function(B){B.isEdge()&&f[w].push(B.id())})}else p[w]=[void 0,b.target().id()]}):o.forEach(function(b){var w=b.id();if(b.isNode()){var C=b.degree(!0);C%2&&(u?c?l=!0:c=w:u=w),f[w]=[],b.connectedEdges().forEach(function(x){return f[w].push(x.id())})}else p[w]=[b.source().id(),b.target().id()]});var v={found:!1,trail:void 0};if(l)return v;if(c&&u)if(i){if(d&&c!=d)return v;d=c}else{if(d&&c!=d&&u!=d)return v;d||(d=c)}else d||(d=o[0].id());var h=function(w){for(var C=w,x=[w],E,k,B;f[C].length;)E=f[C].shift(),k=p[E][0],B=p[E][1],C!=B?(f[B]=f[B].filter(function(S){return S!=E}),C=B):!i&&C!=k&&(f[k]=f[k].filter(function(S){return S!=E}),C=k),x.unshift(E),x.unshift(C);return x},g=[],y=[];for(y=h(d);y.length!=1;)f[y[0]].length==0?(g.unshift(o.getElementById(y.shift())),g.unshift(o.getElementById(y.shift()))):y=h(y.shift()).concat(y);g.unshift(o.getElementById(y.shift()));for(var m in f)if(f[m].length)return v;return v.found=!0,v.trail=this.spawn(g,!0),v}},Wo=function(){var e=this,r={},n=0,a=0,i=[],o=[],l={},u=function(p,v){for(var h=o.length-1,g=[],y=e.spawn();o[h].x!=p||o[h].y!=v;)g.push(o.pop().edge),h--;g.push(o.pop().edge),g.forEach(function(m){var b=m.connectedNodes().intersection(e);y.merge(m),b.forEach(function(w){var C=w.id(),x=w.connectedEdges().intersection(e);y.merge(w),r[C].cutVertex?y.merge(x.filter(function(E){return E.isLoop()})):y.merge(x)})}),i.push(y)},c=function f(p,v,h){p===h&&(a+=1),r[v]={id:n,low:n++,cutVertex:!1};var g=e.getElementById(v).connectedEdges().intersection(e);if(g.size()===0)i.push(e.spawn(e.getElementById(v)));else{var y,m,b,w;g.forEach(function(C){y=C.source().id(),m=C.target().id(),b=y===v?m:y,b!==h&&(w=C.id(),l[w]||(l[w]=!0,o.push({x:v,y:b,edge:C})),b in r?r[v].low=Math.min(r[v].low,r[b].id):(f(p,b,v),r[v].low=Math.min(r[v].low,r[b].low),r[v].id<=r[b].low&&(r[v].cutVertex=!0,u(v,b))))})}};e.forEach(function(f){if(f.isNode()){var p=f.id();p in r||(a=0,c(p,p),r[p].cutVertex=a>1)}});var d=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(d),components:i}},W5={hopcroftTarjanBiconnected:Wo,htbc:Wo,htb:Wo,hopcroftTarjanBiconnectedComponents:Wo},jo=function(){var e=this,r={},n=0,a=[],i=[],o=e.spawn(e),l=function u(c){i.push(c),r[c]={index:n,low:n++,explored:!1};var d=e.getElementById(c).connectedEdges().intersection(e);if(d.forEach(function(g){var y=g.target().id();y!==c&&(y in r||u(y),r[y].explored||(r[c].low=Math.min(r[c].low,r[y].low)))}),r[c].index===r[c].low){for(var f=e.spawn();;){var p=i.pop();if(f.merge(e.getElementById(p)),r[p].low=r[c].index,r[p].explored=!0,p===c)break}var v=f.edgesWith(f),h=f.merge(v);a.push(h),o=o.difference(h)}};return e.forEach(function(u){if(u.isNode()){var c=u.id();c in r||l(c)}}),{cut:o,components:a}},j5={tarjanStronglyConnected:jo,tsc:jo,tscc:jo,tarjanStronglyConnectedComponents:jo},hp={};[xi,EB,SB,BB,DB,OB,LB,i5,wa,Ca,ec,y5,O5,A5,q5,G5,W5,j5].forEach(function(t){xe(hp,t)});/*!
434
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,l;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,l=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw l}}}}var st=typeof window>"u"?null:window,yh=st?st.navigator:null;st&&st.document;var rT=ot(""),bh=ot({}),nT=ot(function(){}),aT=typeof HTMLElement>"u"?"undefined":ot(HTMLElement),pi=function(e){return e&&e.instanceString&&Ye(e.instanceString)?e.instanceString():null},be=function(e){return e!=null&&ot(e)==rT},Ye=function(e){return e!=null&&ot(e)===nT},He=function(e){return!Ut(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},_e=function(e){return e!=null&&ot(e)===bh&&!He(e)&&e.constructor===Object},iT=function(e){return e!=null&&ot(e)===bh},le=function(e){return e!=null&&ot(e)===ot(1)&&!isNaN(e)},oT=function(e){return le(e)&&Math.floor(e)===e},Do=function(e){if(aT!=="undefined")return e!=null&&e instanceof HTMLElement},Ut=function(e){return vi(e)||wh(e)},vi=function(e){return pi(e)==="collection"&&e._private.single},wh=function(e){return pi(e)==="collection"&&!e._private.single},zl=function(e){return pi(e)==="core"},Ch=function(e){return pi(e)==="stylesheet"},sT=function(e){return pi(e)==="event"},nn=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},lT=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},cT=function(e){return _e(e)&&le(e.x1)&&le(e.x2)&&le(e.y1)&&le(e.y2)},uT=function(e){return iT(e)&&Ye(e.then)},dT=function(){return yh&&yh.userAgent.match(/msie|trident|edge/i)},gi=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);return i.join("$")});var n=function a(){var i=this,o=arguments,l,u=r.apply(i,o),c=a.cache;return(l=c[u])||(l=c[u]=e.apply(i,o)),l};return n.cache={},n},Hl=gi(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Po=gi(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),kh=gi(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),xh=function(e){return nn(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},lt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",fT="rgb[a]?\\(("+lt+"[%]?)\\s*,\\s*("+lt+"[%]?)\\s*,\\s*("+lt+"[%]?)(?:\\s*,\\s*("+lt+"))?\\)",hT="rgb[a]?\\((?:"+lt+"[%]?)\\s*,\\s*(?:"+lt+"[%]?)\\s*,\\s*(?:"+lt+"[%]?)(?:\\s*,\\s*(?:"+lt+"))?\\)",pT="hsl[a]?\\(("+lt+")\\s*,\\s*("+lt+"[%])\\s*,\\s*("+lt+"[%])(?:\\s*,\\s*("+lt+"))?\\)",vT="hsl[a]?\\((?:"+lt+")\\s*,\\s*(?:"+lt+"[%])\\s*,\\s*(?:"+lt+"[%])(?:\\s*,\\s*(?:"+lt+"))?\\)",gT="\\#[0-9a-fA-F]{3}",mT="\\#[0-9a-fA-F]{6}",Eh=function(e,r){return e<r?-1:e>r?1:0},yT=function(e,r){return-1*Eh(e,r)},xe=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(n!=null)for(var a=Object.keys(n),i=0;i<a.length;i++){var o=a[i];t[o]=n[o]}}return t},bT=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,n,a,i,o=16;return r?(n=parseInt(e[1]+e[1],o),a=parseInt(e[2]+e[2],o),i=parseInt(e[3]+e[3],o)):(n=parseInt(e[1]+e[2],o),a=parseInt(e[3]+e[4],o),i=parseInt(e[5]+e[6],o)),[n,a,i]}},wT=function(e){var r,n,a,i,o,l,u,c;function d(h,g,y){return y<0&&(y+=1),y>1&&(y-=1),y<1/6?h+(g-h)*6*y:y<1/2?g:y<2/3?h+(g-h)*(2/3-y)*6:h}var f=new RegExp("^"+pT+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,a=parseFloat(f[2]),a<0||a>100||(a=a/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,o=f[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(a===0)l=u=c=Math.round(i*255);else{var p=i<.5?i*(1+a):i+a-i*a,v=2*i-p;l=Math.round(255*d(v,p,n+1/3)),u=Math.round(255*d(v,p,n)),c=Math.round(255*d(v,p,n-1/3))}r=[l,u,c,o]}return r},CT=function(e){var r,n=new RegExp("^"+fT+"$").exec(e);if(n){r=[];for(var a=[],i=1;i<=3;i++){var o=n[i];if(o[o.length-1]==="%"&&(a[i]=!0),o=parseFloat(o),a[i]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var l=a[1]||a[2]||a[3],u=a[1]&&a[2]&&a[3];if(l&&!u)return;var c=n[4];if(c!==void 0){if(c=parseFloat(c),c<0||c>1)return;r.push(c)}}return r},kT=function(e){return ET[e.toLowerCase()]},xT=function(e){return(He(e)?e:null)||kT(e)||bT(e)||CT(e)||wT(e)},ET={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Sh=function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i<a;i++){var o=n[i];if(_e(o))throw Error("Tried to set map with object key");i<n.length-1?(r[o]==null&&(r[o]={}),r=r[o]):r[o]=e.value}},Th=function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i<a;i++){var o=n[i];if(_e(o))throw Error("Tried to get map with object key");if(r=r[o],r==null)return r}return r};function ST(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Fn=ST,mi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function TT(t,e){return e={exports:{}},t(e,e.exports),e.exports}var BT=typeof mi=="object"&&mi&&mi.Object===Object&&mi,NT=BT,DT=typeof self=="object"&&self&&self.Object===Object&&self,PT=NT||DT||Function("return this")(),Oo=PT,OT=function(){return Oo.Date.now()},Kl=OT,_T=/\s/;function LT(t){for(var e=t.length;e--&&_T.test(t.charAt(e)););return e}var FT=LT,MT=/^\s+/;function IT(t){return t&&t.slice(0,FT(t)+1).replace(MT,"")}var AT=IT,VT=Oo.Symbol,pa=VT,Bh=Object.prototype,RT=Bh.hasOwnProperty,$T=Bh.toString,yi=pa?pa.toStringTag:void 0;function zT(t){var e=RT.call(t,yi),r=t[yi];try{t[yi]=void 0;var n=!0}catch{}var a=$T.call(t);return n&&(e?t[yi]=r:delete t[yi]),a}var HT=zT,KT=Object.prototype,qT=KT.toString;function UT(t){return qT.call(t)}var GT=UT,WT="[object Null]",jT="[object Undefined]",Nh=pa?pa.toStringTag:void 0;function YT(t){return t==null?t===void 0?jT:WT:Nh&&Nh in Object(t)?HT(t):GT(t)}var Dh=YT;function XT(t){return t!=null&&typeof t=="object"}var ZT=XT,QT="[object Symbol]";function JT(t){return typeof t=="symbol"||ZT(t)&&Dh(t)==QT}var bi=JT,Ph=NaN,eB=/^[-+]0x[0-9a-f]+$/i,tB=/^0b[01]+$/i,rB=/^0o[0-7]+$/i,nB=parseInt;function aB(t){if(typeof t=="number")return t;if(bi(t))return Ph;if(Fn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Fn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=AT(t);var r=tB.test(t);return r||rB.test(t)?nB(t.slice(2),r?2:8):eB.test(t)?Ph:+t}var Oh=aB,iB="Expected a function",oB=Math.max,sB=Math.min;function lB(t,e,r){var n,a,i,o,l,u,c=0,d=!1,f=!1,p=!0;if(typeof t!="function")throw new TypeError(iB);e=Oh(e)||0,Fn(r)&&(d=!!r.leading,f="maxWait"in r,i=f?oB(Oh(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p);function v(E){var k=n,B=a;return n=a=void 0,c=E,o=t.apply(B,k),o}function h(E){return c=E,l=setTimeout(m,e),d?v(E):o}function g(E){var k=E-u,B=E-c,S=e-k;return f?sB(S,i-B):S}function y(E){var k=E-u,B=E-c;return u===void 0||k>=e||k<0||f&&B>=i}function m(){var E=Kl();if(y(E))return b(E);l=setTimeout(m,g(E))}function b(E){return l=void 0,p&&n?v(E):(n=a=void 0,o)}function w(){l!==void 0&&clearTimeout(l),c=0,n=u=a=l=void 0}function C(){return l===void 0?o:b(Kl())}function x(){var E=Kl(),k=y(E);if(n=arguments,a=this,u=E,k){if(l===void 0)return h(u);if(f)return clearTimeout(l),l=setTimeout(m,e),v(u)}return l===void 0&&(l=setTimeout(m,e)),o}return x.cancel=w,x.flush=C,x}var _o=lB,ql=st?st.performance:null,_h=ql&&ql.now?function(){return ql.now()}:function(){return Date.now()},cB=function(){if(st){if(st.requestAnimationFrame)return function(t){st.requestAnimationFrame(t)};if(st.mozRequestAnimationFrame)return function(t){st.mozRequestAnimationFrame(t)};if(st.webkitRequestAnimationFrame)return function(t){st.webkitRequestAnimationFrame(t)};if(st.msRequestAnimationFrame)return function(t){st.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(_h())},1e3/60)}}(),Lo=function(e){return cB(e)},Vr=_h,va=9261,Lh=65599,wi=5381,Fh=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:va,n=r,a;a=e.next(),!a.done;)n=n*Lh+a.value|0;return n},Ci=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:va;return r*Lh+e|0},ki=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wi;return(r<<5)+r+e|0},uB=function(e,r){return e*2097152+r},an=function(e){return e[0]*2097152+e[1]},Fo=function(e,r){return[Ci(e[0],r[0]),ki(e[1],r[1])]},dB=function(e,r){var n={value:0,done:!1},a=0,i=e.length,o={next:function(){return a<i?n.value=e[a++]:n.done=!0,n}};return Fh(o,r)},Mn=function(e,r){var n={value:0,done:!1},a=0,i=e.length,o={next:function(){return a<i?n.value=e.charCodeAt(a++):n.done=!0,n}};return Fh(o,r)},Mh=function(){return fB(arguments)},fB=function(e){for(var r,n=0;n<e.length;n++){var a=e[n];n===0?r=Mn(a):r=Mn(a,r)}return r},Ih=!0,hB=console.warn!=null,pB=console.trace!=null,Ul=Number.MAX_SAFE_INTEGER||9007199254740991,Ah=function(){return!0},Mo=function(){return!1},Vh=function(){return 0},Gl=function(){},Xe=function(e){throw new Error(e)},Rh=function(e){if(e!==void 0)Ih=!!e;else return Ih},Ae=function(e){Rh()&&(hB?console.warn(e):(console.log(e),pB&&console.trace()))},vB=function(e){return xe({},e)},br=function(e){return e==null?e:He(e)?e.slice():_e(e)?vB(e):e},gB=function(e){return e.slice()},$h=function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},mB={},zh=function(){return mB},wt=function(e){var r=Object.keys(e);return function(n){for(var a={},i=0;i<r.length;i++){var o=r[i],l=n==null?void 0:n[o];a[o]=l===void 0?e[o]:l}return a}},on=function(e,r,n){for(var a=e.length-1;a>=0;a--)e[a]===r&&e.splice(a,1)},Wl=function(e){e.splice(0,e.length)},yB=function(e,r){for(var n=0;n<r.length;n++){var a=r[n];e.push(a)}},lr=function(e,r,n){return n&&(r=kh(n,r)),e[r]},sn=function(e,r,n,a){n&&(r=kh(n,r)),e[r]=a},bB=function(){function t(){Rl(this,t),this._obj={}}return $l(t,[{key:"set",value:function(r,n){return this._obj[r]=n,this}},{key:"delete",value:function(r){return this._obj[r]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(r){return this._obj[r]!==void 0}},{key:"get",value:function(r){return this._obj[r]}}]),t}(),wr=typeof Map<"u"?Map:bB,wB="undefined",CB=function(){function t(e){if(Rl(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var n=0;n<r.length;n++)this.add(r[n])}}return $l(t,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(r){var n=this._obj;n[r]!==1&&(n[r]=1,this.size++)}},{key:"delete",value:function(r){var n=this._obj;n[r]===1&&(n[r]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(r){return this._obj[r]===1}},{key:"toArray",value:function(){var r=this;return Object.keys(this._obj).filter(function(n){return r.has(n)})}},{key:"forEach",value:function(r,n){return this.toArray().forEach(r,n)}}]),t}(),ga=(typeof Set>"u"?"undefined":ot(Set))!==wB?Set:CB,Io=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!zl(e)){Xe("An element must have a core reference and parameters set");return}var a=r.group;if(a==null&&(r.data&&r.data.source!=null&&r.data.target!=null?a="edges":a="nodes"),a!=="nodes"&&a!=="edges"){Xe("An element must be of type `nodes` or `edges`; you specified `"+a+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:a,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?a==="edges":!!r.pannable,active:!1,classes:new ga,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var o=r.renderedPosition,l=e.pan(),u=e.zoom();i.position={x:(o.x-l.x)/u,y:(o.y-l.y)/u}}var c=[];He(r.classes)?c=r.classes:be(r.classes)&&(c=r.classes.split(/\s+/));for(var d=0,f=c.length;d<f;d++){var p=c[d];!p||p===""||i.classes.add(p)}this.createEmitter();var v=r.style||r.css;v&&(Ae("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(v)),(n===void 0||n)&&this.restore()},Hh=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(n,a,i){var o;_e(n)&&!Ut(n)&&(o=n,n=o.roots||o.root,a=o.visit,i=o.directed),i=arguments.length===2&&!Ye(a)?a:i,a=Ye(a)?a:function(){};for(var l=this._private.cy,u=n=be(n)?this.filter(n):n,c=[],d=[],f={},p={},v={},h=0,g,y=this.byGroup(),m=y.nodes,b=y.edges,w=0;w<u.length;w++){var C=u[w],x=C.id();C.isNode()&&(c.unshift(C),e.bfs&&(v[x]=!0,d.push(C)),p[x]=0)}for(var E=function(){var L=e.bfs?c.shift():c.pop(),O=L.id();if(e.dfs){if(v[O])return"continue";v[O]=!0,d.push(L)}var I=p[O],_=f[O],M=_!=null?_.source():null,F=_!=null?_.target():null,V=_==null?void 0:L.same(M)?F[0]:M[0],H=void 0;if(H=a(L,_,V,h++,I),H===!0)return g=L,"break";if(H===!1)return"break";for(var $=L.connectedEdges().filter(function(Z){return(!i||Z.source().same(L))&&b.has(Z)}),z=0;z<$.length;z++){var j=$[z],ee=j.connectedNodes().filter(function(Z){return!Z.same(L)&&m.has(Z)}),J=ee.id();ee.length!==0&&!v[J]&&(ee=ee[0],c.push(ee),e.bfs&&(v[J]=!0,d.push(ee)),f[J]=j,p[J]=p[O]+1)}};c.length!==0;){var k=E();if(k!=="continue"&&k==="break")break}for(var B=l.collection(),S=0;S<d.length;S++){var N=d[S],D=f[N.id()];D!=null&&B.push(D),B.push(N)}return{path:l.collection(B),found:l.collection(g)}}},xi={breadthFirstSearch:Hh({bfs:!0}),depthFirstSearch:Hh({dfs:!0})};xi.bfs=xi.breadthFirstSearch,xi.dfs=xi.depthFirstSearch;var kB=TT(function(t,e){(function(){var r,n,a,i,o,l,u,c,d,f,p,v,h,g,y;a=Math.floor,f=Math.min,n=function(m,b){return m<b?-1:m>b?1:0},d=function(m,b,w,C,x){var E;if(w==null&&(w=0),x==null&&(x=n),w<0)throw new Error("lo must be non-negative");for(C==null&&(C=m.length);w<C;)E=a((w+C)/2),x(b,m[E])<0?C=E:w=E+1;return[].splice.apply(m,[w,w-w].concat(b)),b},l=function(m,b,w){return w==null&&(w=n),m.push(b),g(m,0,m.length-1,w)},o=function(m,b){var w,C;return b==null&&(b=n),w=m.pop(),m.length?(C=m[0],m[0]=w,y(m,0,b)):C=w,C},c=function(m,b,w){var C;return w==null&&(w=n),C=m[0],m[0]=b,y(m,0,w),C},u=function(m,b,w){var C;return w==null&&(w=n),m.length&&w(m[0],b)<0&&(C=[m[0],b],b=C[0],m[0]=C[1],y(m,0,w)),b},i=function(m,b){var w,C,x,E,k,B;for(b==null&&(b=n),E=(function(){B=[];for(var S=0,N=a(m.length/2);0<=N?S<N:S>N;0<=N?S++:S--)B.push(S);return B}).apply(this).reverse(),k=[],C=0,x=E.length;C<x;C++)w=E[C],k.push(y(m,w,b));return k},h=function(m,b,w){var C;if(w==null&&(w=n),C=m.indexOf(b),C!==-1)return g(m,0,C,w),y(m,C,w)},p=function(m,b,w){var C,x,E,k,B;if(w==null&&(w=n),x=m.slice(0,b),!x.length)return x;for(i(x,w),B=m.slice(b),E=0,k=B.length;E<k;E++)C=B[E],u(x,C,w);return x.sort(w).reverse()},v=function(m,b,w){var C,x,E,k,B,S,N,D,P;if(w==null&&(w=n),b*10<=m.length){if(E=m.slice(0,b).sort(w),!E.length)return E;for(x=E[E.length-1],N=m.slice(b),k=0,S=N.length;k<S;k++)C=N[k],w(C,x)<0&&(d(E,C,0,null,w),E.pop(),x=E[E.length-1]);return E}for(i(m,w),P=[],B=0,D=f(b,m.length);0<=D?B<D:B>D;0<=D?++B:--B)P.push(o(m,w));return P},g=function(m,b,w,C){var x,E,k;for(C==null&&(C=n),x=m[w];w>b;){if(k=w-1>>1,E=m[k],C(x,E)<0){m[w]=E,w=k;continue}break}return m[w]=x},y=function(m,b,w){var C,x,E,k,B;for(w==null&&(w=n),x=m.length,B=b,E=m[b],C=2*b+1;C<x;)k=C+1,k<x&&!(w(m[C],m[k])<0)&&(C=k),m[b]=m[C],b=C,C=2*b+1;return m[b]=E,g(m,B,b,w)},r=function(){m.push=l,m.pop=o,m.replace=c,m.pushpop=u,m.heapify=i,m.updateItem=h,m.nlargest=p,m.nsmallest=v;function m(b){this.cmp=b??n,this.nodes=[]}return m.prototype.push=function(b){return l(this.nodes,b,this.cmp)},m.prototype.pop=function(){return o(this.nodes,this.cmp)},m.prototype.peek=function(){return this.nodes[0]},m.prototype.contains=function(b){return this.nodes.indexOf(b)!==-1},m.prototype.replace=function(b){return c(this.nodes,b,this.cmp)},m.prototype.pushpop=function(b){return u(this.nodes,b,this.cmp)},m.prototype.heapify=function(){return i(this.nodes,this.cmp)},m.prototype.updateItem=function(b){return h(this.nodes,b,this.cmp)},m.prototype.clear=function(){return this.nodes=[]},m.prototype.empty=function(){return this.nodes.length===0},m.prototype.size=function(){return this.nodes.length},m.prototype.clone=function(){var b;return b=new m,b.nodes=this.nodes.slice(0),b},m.prototype.toArray=function(){return this.nodes.slice(0)},m.prototype.insert=m.prototype.push,m.prototype.top=m.prototype.peek,m.prototype.front=m.prototype.peek,m.prototype.has=m.prototype.contains,m.prototype.copy=m.prototype.clone,m}(),function(m,b){return t.exports=b()}(this,function(){return r})}).call(mi)}),Ei=kB,xB=wt({root:null,weight:function(e){return 1},directed:!1}),EB={dijkstra:function(e){if(!_e(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var n=xB(e),a=n.root,i=n.weight,o=n.directed,l=this,u=i,c=be(a)?this.filter(a)[0]:a[0],d={},f={},p={},v=this.byGroup(),h=v.nodes,g=v.edges;g.unmergeBy(function(I){return I.isLoop()});for(var y=function(_){return d[_.id()]},m=function(_,M){d[_.id()]=M,b.updateItem(_)},b=new Ei(function(I,_){return y(I)-y(_)}),w=0;w<h.length;w++){var C=h[w];d[C.id()]=C.same(c)?0:1/0,b.push(C)}for(var x=function(_,M){for(var F=(o?_.edgesTo(M):_.edgesWith(M)).intersect(g),V=1/0,H,$=0;$<F.length;$++){var z=F[$],j=u(z);(j<V||!H)&&(V=j,H=z)}return{edge:H,dist:V}};b.size()>0;){var E=b.pop(),k=y(E),B=E.id();if(p[B]=k,k!==1/0)for(var S=E.neighborhood().intersect(h),N=0;N<S.length;N++){var D=S[N],P=D.id(),L=x(E,D),O=k+L.dist;O<y(D)&&(m(D,O),f[P]={node:E,edge:L.edge})}}return{distanceTo:function(_){var M=be(_)?h.filter(_)[0]:_[0];return p[M.id()]},pathTo:function(_){var M=be(_)?h.filter(_)[0]:_[0],F=[],V=M,H=V.id();if(M.length>0)for(F.unshift(M);f[H];){var $=f[H];F.unshift($.edge),F.unshift($.node),V=$.node,H=V.id()}return l.spawn(F)}}}},SB={kruskal:function(e){e=e||function(w){return 1};for(var r=this.byGroup(),n=r.nodes,a=r.edges,i=n.length,o=new Array(i),l=n,u=function(C){for(var x=0;x<o.length;x++){var E=o[x];if(E.has(C))return x}},c=0;c<i;c++)o[c]=this.spawn(n[c]);for(var d=a.sort(function(w,C){return e(w)-e(C)}),f=0;f<d.length;f++){var p=d[f],v=p.source()[0],h=p.target()[0],g=u(v),y=u(h),m=o[g],b=o[y];g!==y&&(l.merge(p),m.merge(b),o.splice(y,1))}return l}},TB=wt({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),BB={aStar:function(e){var r=this.cy(),n=TB(e),a=n.root,i=n.goal,o=n.heuristic,l=n.directed,u=n.weight;a=r.collection(a)[0],i=r.collection(i)[0];var c=a.id(),d=i.id(),f={},p={},v={},h=new Ei(function(H,$){return p[H.id()]-p[$.id()]}),g=new ga,y={},m={},b=function($,z){h.push($),g.add(z)},w,C,x=function(){w=h.pop(),C=w.id(),g.delete(C)},E=function($){return g.has($)};b(a,c),f[c]=0,p[c]=o(a);for(var k=0;h.size()>0;){if(x(),k++,C===d){for(var B=[],S=i,N=d,D=m[N];B.unshift(S),D!=null&&B.unshift(D),S=y[N],S!=null;)N=S.id(),D=m[N];return{found:!0,distance:f[C],path:this.spawn(B),steps:k}}v[C]=!0;for(var P=w._private.edges,L=0;L<P.length;L++){var O=P[L];if(this.hasElementWithId(O.id())&&!(l&&O.data("source")!==C)){var I=O.source(),_=O.target(),M=I.id()!==C?I:_,F=M.id();if(this.hasElementWithId(F)&&!v[F]){var V=f[C]+u(O);if(!E(F)){f[F]=V,p[F]=V+o(M),b(M,F),y[F]=w,m[F]=O;continue}V<f[F]&&(f[F]=V,p[F]=V+o(M),y[F]=w,m[F]=O)}}}}return{found:!1,distance:void 0,path:void 0,steps:k}}},NB=wt({weight:function(e){return 1},directed:!1}),DB={floydWarshall:function(e){for(var r=this.cy(),n=NB(e),a=n.weight,i=n.directed,o=a,l=this.byGroup(),u=l.nodes,c=l.edges,d=u.length,f=d*d,p=function(j){return u.indexOf(j)},v=function(j){return u[j]},h=new Array(f),g=0;g<f;g++){var y=g%d,m=(g-y)/d;m===y?h[g]=0:h[g]=1/0}for(var b=new Array(f),w=new Array(f),C=0;C<c.length;C++){var x=c[C],E=x.source()[0],k=x.target()[0];if(E!==k){var B=p(E),S=p(k),N=B*d+S,D=o(x);if(h[N]>D&&(h[N]=D,b[N]=S,w[N]=x),!i){var P=S*d+B;!i&&h[P]>D&&(h[P]=D,b[P]=B,w[P]=x)}}}for(var L=0;L<d;L++)for(var O=0;O<d;O++)for(var I=O*d+L,_=0;_<d;_++){var M=O*d+_,F=L*d+_;h[I]+h[F]<h[M]&&(h[M]=h[I]+h[F],b[M]=b[I])}var V=function(j){return(be(j)?r.filter(j):j)[0]},H=function(j){return p(V(j))},$={distance:function(j,ee){var J=H(j),Z=H(ee);return h[J*d+Z]},path:function(j,ee){var J=H(j),Z=H(ee),re=v(J);if(J===Z)return re.collection();if(b[J*d+Z]==null)return r.collection();var Y=r.collection(),A=J,K;for(Y.merge(re);J!==Z;)A=J,J=b[J*d+Z],K=w[A*d+J],Y.merge(K),Y.merge(v(J));return Y}};return $}},PB=wt({weight:function(e){return 1},directed:!1,root:null}),OB={bellmanFord:function(e){var r=this,n=PB(e),a=n.weight,i=n.directed,o=n.root,l=a,u=this,c=this.cy(),d=this.byGroup(),f=d.edges,p=d.nodes,v=p.length,h=new wr,g=!1,y=[];o=c.collection(o)[0],f.unmergeBy(function(pe){return pe.isLoop()});for(var m=f.length,b=function(de){var me=h.get(de.id());return me||(me={},h.set(de.id(),me)),me},w=function(de){return(be(de)?c.$(de):de)[0]},C=function(de){return b(w(de)).dist},x=function(de){for(var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o,Ne=w(de),De=[],Ee=Ne;;){if(Ee==null)return r.spawn();var Pe=b(Ee),te=Pe.edge,T=Pe.pred;if(De.unshift(Ee[0]),Ee.same(me)&&De.length>0)break;te!=null&&De.unshift(te),Ee=T}return u.spawn(De)},E=0;E<v;E++){var k=p[E],B=b(k);k.same(o)?B.dist=0:B.dist=1/0,B.pred=null,B.edge=null}for(var S=!1,N=function(de,me,Ne,De,Ee,Pe){var te=De.dist+Pe;te<Ee.dist&&!Ne.same(De.edge)&&(Ee.dist=te,Ee.pred=de,Ee.edge=Ne,S=!0)},D=1;D<v;D++){S=!1;for(var P=0;P<m;P++){var L=f[P],O=L.source(),I=L.target(),_=l(L),M=b(O),F=b(I);N(O,I,L,M,F,_),i||N(I,O,L,F,M,_)}if(!S)break}if(S)for(var V=[],H=0;H<m;H++){var $=f[H],z=$.source(),j=$.target(),ee=l($),J=b(z).dist,Z=b(j).dist;if(J+ee<Z||!i&&Z+ee<J)if(g||(Ae("Graph contains a negative weight cycle for Bellman-Ford"),g=!0),e.findNegativeWeightCycles!==!1){var re=[];J+ee<Z&&re.push(z),!i&&Z+ee<J&&re.push(j);for(var Y=re.length,A=0;A<Y;A++){var K=re[A],W=[K];W.push(b(K).edge);for(var oe=b(K).pred;W.indexOf(oe)===-1;)W.push(oe),W.push(b(oe).edge),oe=b(oe).pred;W=W.slice(W.indexOf(oe));for(var he=W[0].id(),ne=0,se=2;se<W.length;se+=2)W[se].id()<he&&(he=W[se].id(),ne=se);W=W.slice(ne).concat(W.slice(0,ne)),W.push(W[0]);var ue=W.map(function(pe){return pe.id()}).join(",");V.indexOf(ue)===-1&&(y.push(u.spawn(W)),V.push(ue))}}else break}return{distanceTo:C,pathTo:x,hasNegativeWeightCycle:g,negativeWeightCycles:y}}},_B=Math.sqrt(2),LB=function(e,r,n){n.length===0&&Xe("Karger-Stein must be run on a connected (sub)graph");for(var a=n[e],i=a[1],o=a[2],l=r[i],u=r[o],c=n,d=c.length-1;d>=0;d--){var f=c[d],p=f[1],v=f[2];(r[p]===l&&r[v]===u||r[p]===u&&r[v]===l)&&c.splice(d,1)}for(var h=0;h<c.length;h++){var g=c[h];g[1]===u?(c[h]=g.slice(),c[h][1]=l):g[2]===u&&(c[h]=g.slice(),c[h][2]=l)}for(var y=0;y<r.length;y++)r[y]===u&&(r[y]=l);return c},jl=function(e,r,n,a){for(;n>a;){var i=Math.floor(Math.random()*r.length);r=LB(i,e,r),n--}return r},FB={kargerStein:function(){var e=this,r=this.byGroup(),n=r.nodes,a=r.edges;a.unmergeBy(function(F){return F.isLoop()});var i=n.length,o=a.length,l=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),u=Math.floor(i/_B);if(i<2){Xe("At least 2 nodes are required for Karger-Stein algorithm");return}for(var c=[],d=0;d<o;d++){var f=a[d];c.push([d,n.indexOf(f.source()),n.indexOf(f.target())])}for(var p=1/0,v=[],h=new Array(i),g=new Array(i),y=new Array(i),m=function(V,H){for(var $=0;$<i;$++)H[$]=V[$]},b=0;b<=l;b++){for(var w=0;w<i;w++)g[w]=w;var C=jl(g,c.slice(),i,u),x=C.slice();m(g,y);var E=jl(g,C,u,2),k=jl(y,x,u,2);E.length<=k.length&&E.length<p?(p=E.length,v=E,m(g,h)):k.length<=E.length&&k.length<p&&(p=k.length,v=k,m(y,h))}for(var B=this.spawn(v.map(function(F){return a[F[0]]})),S=this.spawn(),N=this.spawn(),D=h[0],P=0;P<h.length;P++){var L=h[P],O=n[P];L===D?S.merge(O):N.merge(O)}var I=function(V){var H=e.spawn();return V.forEach(function($){H.merge($),$.connectedEdges().forEach(function(z){e.contains(z)&&!B.contains(z)&&H.merge(z)})}),H},_=[I(S),I(N)],M={cut:B,components:_,partition1:S,partition2:N};return M}},MB=function(e){return{x:e.x,y:e.y}},Ao=function(e,r,n){return{x:e.x*r+n.x,y:e.y*r+n.y}},Kh=function(e,r,n){return{x:(e.x-n.x)/r,y:(e.y-n.y)/r}},ma=function(e){return{x:e[0],y:e[1]}},IB=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=1/0,i=r;i<n;i++){var o=e[i];isFinite(o)&&(a=Math.min(o,a))}return a},AB=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=-1/0,i=r;i<n;i++){var o=e[i];isFinite(o)&&(a=Math.max(o,a))}return a},VB=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=0,i=0,o=r;o<n;o++){var l=e[o];isFinite(l)&&(a+=l,i++)}return a/i},RB=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;a?e=e.slice(r,n):(n<e.length&&e.splice(n,e.length-n),r>0&&e.splice(0,r));for(var l=0,u=e.length-1;u>=0;u--){var c=e[u];o?isFinite(c)||(e[u]=-1/0,l++):e.splice(u,1)}i&&e.sort(function(p,v){return p-v});var d=e.length,f=Math.floor(d/2);return d%2!==0?e[f+1+l]:(e[f-1+l]+e[f+l])/2},$B=function(e){return Math.PI*e/180},Vo=function(e,r){return Math.atan2(r,e)-Math.PI/2},Yl=Math.log2||function(t){return Math.log(t)/Math.log(2)},qh=function(e){return e>0?1:e<0?-1:0},In=function(e,r){return Math.sqrt(An(e,r))},An=function(e,r){var n=r.x-e.x,a=r.y-e.y;return n*n+a*a},zB=function(e){for(var r=e.length,n=0,a=0;a<r;a++)n+=e[a];for(var i=0;i<r;i++)e[i]=e[i]/n;return e},ft=function(e,r,n,a){return(1-a)*(1-a)*e+2*(1-a)*a*r+a*a*n},ya=function(e,r,n,a){return{x:ft(e.x,r.x,n.x,a),y:ft(e.y,r.y,n.y,a)}},HB=function(e,r,n,a){var i={x:r.x-e.x,y:r.y-e.y},o=In(e,r),l={x:i.x/o,y:i.y/o};return n=n??0,a=a??n*o,{x:e.x+l.x*a,y:e.y+l.y*a}},Si=function(e,r,n){return Math.max(e,Math.min(n,r))},zt=function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},KB=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},qB=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},UB=function(e,r,n){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+n,y2:e.y2+n,w:e.w,h:e.h}},Uh=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},GB=function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Ro=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},$o=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,a,i,o;if(r.length===1)n=a=i=o=r[0];else if(r.length===2)n=i=r[0],o=a=r[1];else if(r.length===4){var l=sr(r,4);n=l[0],a=l[1],i=l[2],o=l[3]}return e.x1-=o,e.x2+=a,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Gh=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Xl=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},ba=function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},WB=function(e,r){return ba(e,r.x,r.y)},Wh=function(e,r){return ba(e,r.x1,r.y1)&&ba(e,r.x2,r.y2)},jh=function(e,r,n,a,i,o,l){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",c=u==="auto"?Rn(i,o):u,d=i/2,f=o/2;c=Math.min(c,d,f);var p=c!==d,v=c!==f,h;if(p){var g=n-d+c-l,y=a-f-l,m=n+d-c+l,b=y;if(h=ln(e,r,n,a,g,y,m,b,!1),h.length>0)return h}if(v){var w=n+d+l,C=a-f+c-l,x=w,E=a+f-c+l;if(h=ln(e,r,n,a,w,C,x,E,!1),h.length>0)return h}if(p){var k=n-d+c-l,B=a+f+l,S=n+d-c+l,N=B;if(h=ln(e,r,n,a,k,B,S,N,!1),h.length>0)return h}if(v){var D=n-d-l,P=a-f+c-l,L=D,O=a+f-c+l;if(h=ln(e,r,n,a,D,P,L,O,!1),h.length>0)return h}var I;{var _=n-d+c,M=a-f+c;if(I=Ti(e,r,n,a,_,M,c+l),I.length>0&&I[0]<=_&&I[1]<=M)return[I[0],I[1]]}{var F=n+d-c,V=a-f+c;if(I=Ti(e,r,n,a,F,V,c+l),I.length>0&&I[0]>=F&&I[1]<=V)return[I[0],I[1]]}{var H=n+d-c,$=a+f-c;if(I=Ti(e,r,n,a,H,$,c+l),I.length>0&&I[0]>=H&&I[1]>=$)return[I[0],I[1]]}{var z=n-d+c,j=a+f-c;if(I=Ti(e,r,n,a,z,j,c+l),I.length>0&&I[0]<=z&&I[1]>=j)return[I[0],I[1]]}return[]},jB=function(e,r,n,a,i,o,l){var u=l,c=Math.min(n,i),d=Math.max(n,i),f=Math.min(a,o),p=Math.max(a,o);return c-u<=e&&e<=d+u&&f-u<=r&&r<=p+u},YB=function(e,r,n,a,i,o,l,u,c){var d={x1:Math.min(n,l,i)-c,x2:Math.max(n,l,i)+c,y1:Math.min(a,u,o)-c,y2:Math.max(a,u,o)+c};return!(e<d.x1||e>d.x2||r<d.y1||r>d.y2)},XB=function(e,r,n,a){n-=a;var i=r*r-4*e*n;if(i<0)return[];var o=Math.sqrt(i),l=2*e,u=(-r+o)/l,c=(-r-o)/l;return[u,c]},ZB=function(e,r,n,a,i){var o=1e-5;e===0&&(e=o),r/=e,n/=e,a/=e;var l,u,c,d,f,p,v,h;if(u=(3*n-r*r)/9,c=-(27*a)+r*(9*n-2*(r*r)),c/=54,l=u*u*u+c*c,i[1]=0,v=r/3,l>0){f=c+Math.sqrt(l),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),p=c-Math.sqrt(l),p=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),i[0]=-v+f+p,v+=(f+p)/2,i[4]=i[2]=-v,v=Math.sqrt(3)*(-p+f)/2,i[3]=v,i[5]=-v;return}if(i[5]=i[3]=0,l===0){h=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-v+2*h,i[4]=i[2]=-(h+v);return}u=-u,d=u*u*u,d=Math.acos(c/Math.sqrt(d)),h=2*Math.sqrt(u),i[0]=-v+h*Math.cos(d/3),i[2]=-v+h*Math.cos((d+2*Math.PI)/3),i[4]=-v+h*Math.cos((d+4*Math.PI)/3)},QB=function(e,r,n,a,i,o,l,u){var c=1*n*n-4*n*i+2*n*l+4*i*i-4*i*l+l*l+a*a-4*a*o+2*a*u+4*o*o-4*o*u+u*u,d=1*9*n*i-3*n*n-3*n*l-6*i*i+3*i*l+9*a*o-3*a*a-3*a*u-6*o*o+3*o*u,f=1*3*n*n-6*n*i+n*l-n*e+2*i*i+2*i*e-l*e+3*a*a-6*a*o+a*u-a*r+2*o*o+2*o*r-u*r,p=1*n*i-n*n+n*e-i*e+a*o-a*a+a*r-o*r,v=[];ZB(c,d,f,p,v);for(var h=1e-7,g=[],y=0;y<6;y+=2)Math.abs(v[y+1])<h&&v[y]>=0&&v[y]<=1&&g.push(v[y]);g.push(1),g.push(0);for(var m=-1,b,w,C,x=0;x<g.length;x++)b=Math.pow(1-g[x],2)*n+2*(1-g[x])*g[x]*i+g[x]*g[x]*l,w=Math.pow(1-g[x],2)*a+2*(1-g[x])*g[x]*o+g[x]*g[x]*u,C=Math.pow(b-e,2)+Math.pow(w-r,2),m>=0?C<m&&(m=C):m=C;return m},JB=function(e,r,n,a,i,o){var l=[e-n,r-a],u=[i-n,o-a],c=u[0]*u[0]+u[1]*u[1],d=l[0]*l[0]+l[1]*l[1],f=l[0]*u[0]+l[1]*u[1],p=f*f/c;return f<0?d:p>c?(e-i)*(e-i)+(r-o)*(r-o):d-p},Ht=function(e,r,n){for(var a,i,o,l,u,c=0,d=0;d<n.length/2;d++)if(a=n[d*2],i=n[d*2+1],d+1<n.length/2?(o=n[(d+1)*2],l=n[(d+1)*2+1]):(o=n[(d+1-n.length/2)*2],l=n[(d+1-n.length/2)*2+1]),!(a==e&&o==e))if(a>=e&&e>=o||a<=e&&e<=o)u=(e-a)/(o-a)*(l-i)+i,u>r&&c++;else continue;return c%2!==0},Rr=function(e,r,n,a,i,o,l,u,c){var d=new Array(n.length),f;u[0]!=null?(f=Math.atan(u[1]/u[0]),u[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=u;for(var p=Math.cos(-f),v=Math.sin(-f),h=0;h<d.length/2;h++)d[h*2]=o/2*(n[h*2]*p-n[h*2+1]*v),d[h*2+1]=l/2*(n[h*2+1]*p+n[h*2]*v),d[h*2]+=a,d[h*2+1]+=i;var g;if(c>0){var y=Ho(d,-c);g=zo(y)}else g=d;return Ht(e,r,g)},e5=function(e,r,n,a,i,o,l,u){for(var c=new Array(n.length*2),d=0;d<u.length;d++){var f=u[d];c[d*4+0]=f.startX,c[d*4+1]=f.startY,c[d*4+2]=f.stopX,c[d*4+3]=f.stopY;var p=Math.pow(f.cx-e,2)+Math.pow(f.cy-r,2);if(p<=Math.pow(f.radius,2))return!0}return Ht(e,r,c)},zo=function(e){for(var r=new Array(e.length/2),n,a,i,o,l,u,c,d,f=0;f<e.length/4;f++){n=e[f*4],a=e[f*4+1],i=e[f*4+2],o=e[f*4+3],f<e.length/4-1?(l=e[(f+1)*4],u=e[(f+1)*4+1],c=e[(f+1)*4+2],d=e[(f+1)*4+3]):(l=e[0],u=e[1],c=e[2],d=e[3]);var p=ln(n,a,i,o,l,u,c,d,!0);r[f*2]=p[0],r[f*2+1]=p[1]}return r},Ho=function(e,r){for(var n=new Array(e.length*2),a,i,o,l,u=0;u<e.length/2;u++){a=e[u*2],i=e[u*2+1],u<e.length/2-1?(o=e[(u+1)*2],l=e[(u+1)*2+1]):(o=e[0],l=e[1]);var c=l-i,d=-(o-a),f=Math.sqrt(c*c+d*d),p=c/f,v=d/f;n[u*4]=a+p*r,n[u*4+1]=i+v*r,n[u*4+2]=o+p*r,n[u*4+3]=l+v*r}return n},t5=function(e,r,n,a,i,o){var l=n-e,u=a-r;l/=i,u/=o;var c=Math.sqrt(l*l+u*u),d=c-1;if(d<0)return[];var f=d/c;return[(n-e)*f+e,(a-r)*f+r]},Vn=function(e,r,n,a,i,o,l){return e-=i,r-=o,e/=n/2+l,r/=a/2+l,e*e+r*r<=1},Ti=function(e,r,n,a,i,o,l){var u=[n-e,a-r],c=[e-i,r-o],d=u[0]*u[0]+u[1]*u[1],f=2*(c[0]*u[0]+c[1]*u[1]),p=c[0]*c[0]+c[1]*c[1]-l*l,v=f*f-4*d*p;if(v<0)return[];var h=(-f+Math.sqrt(v))/(2*d),g=(-f-Math.sqrt(v))/(2*d),y=Math.min(h,g),m=Math.max(h,g),b=[];if(y>=0&&y<=1&&b.push(y),m>=0&&m<=1&&b.push(m),b.length===0)return[];var w=b[0]*u[0]+e,C=b[0]*u[1]+r;if(b.length>1){if(b[0]==b[1])return[w,C];var x=b[1]*u[0]+e,E=b[1]*u[1]+r;return[w,C,x,E]}else return[w,C]},Zl=function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},ln=function(e,r,n,a,i,o,l,u,c){var d=e-i,f=n-e,p=l-i,v=r-o,h=a-r,g=u-o,y=p*v-g*d,m=f*v-h*d,b=g*f-p*h;if(b!==0){var w=y/b,C=m/b,x=.001,E=0-x,k=1+x;return E<=w&&w<=k&&E<=C&&C<=k?[e+w*f,r+w*h]:c?[e+w*f,r+w*h]:[]}else return y===0||m===0?Zl(e,n,l)===l?[l,u]:Zl(e,n,i)===i?[i,o]:Zl(i,l,n)===n?[n,a]:[]:[]},Bi=function(e,r,n,a,i,o,l,u){var c=[],d,f=new Array(n.length),p=!0;o==null&&(p=!1);var v;if(p){for(var h=0;h<f.length/2;h++)f[h*2]=n[h*2]*o+a,f[h*2+1]=n[h*2+1]*l+i;if(u>0){var g=Ho(f,-u);v=zo(g)}else v=f}else v=n;for(var y,m,b,w,C=0;C<v.length/2;C++)y=v[C*2],m=v[C*2+1],C<v.length/2-1?(b=v[(C+1)*2],w=v[(C+1)*2+1]):(b=v[0],w=v[1]),d=ln(e,r,a,i,y,m,b,w),d.length!==0&&c.push(d[0],d[1]);return c},r5=function(e,r,n,a,i,o,l,u,c){var d=[],f,p=new Array(n.length*2);c.forEach(function(b,w){w===0?(p[p.length-2]=b.startX,p[p.length-1]=b.startY):(p[w*4-2]=b.startX,p[w*4-1]=b.startY),p[w*4]=b.stopX,p[w*4+1]=b.stopY,f=Ti(e,r,a,i,b.cx,b.cy,b.radius),f.length!==0&&d.push(f[0],f[1])});for(var v=0;v<p.length/4;v++)f=ln(e,r,a,i,p[v*4],p[v*4+1],p[v*4+2],p[v*4+3],!1),f.length!==0&&d.push(f[0],f[1]);if(d.length>2){for(var h=[d[0],d[1]],g=Math.pow(h[0]-e,2)+Math.pow(h[1]-r,2),y=1;y<d.length/2;y++){var m=Math.pow(d[y*2]-e,2)+Math.pow(d[y*2+1]-r,2);m<=g&&(h[0]=d[y*2],h[1]=d[y*2+1],g=m)}return h}return d},Ko=function(e,r,n){var a=[e[0]-r[0],e[1]-r[1]],i=Math.sqrt(a[0]*a[0]+a[1]*a[1]),o=(i-n)/i;return o<0&&(o=1e-5),[r[0]+o*a[0],r[1]+o*a[1]]},Mt=function(e,r){var n=Ql(e,r);return n=Yh(n),n},Yh=function(e){for(var r,n,a=e.length/2,i=1/0,o=1/0,l=-1/0,u=-1/0,c=0;c<a;c++)r=e[2*c],n=e[2*c+1],i=Math.min(i,r),l=Math.max(l,r),o=Math.min(o,n),u=Math.max(u,n);for(var d=2/(l-i),f=2/(u-o),p=0;p<a;p++)r=e[2*p]=e[2*p]*d,n=e[2*p+1]=e[2*p+1]*f,i=Math.min(i,r),l=Math.max(l,r),o=Math.min(o,n),u=Math.max(u,n);if(o<-1)for(var v=0;v<a;v++)n=e[2*v+1]=e[2*v+1]+(-1-o);return e},Ql=function(e,r){var n=1/e*2*Math.PI,a=e%2===0?Math.PI/2+n/2:Math.PI/2;a+=r;for(var i=new Array(e*2),o,l=0;l<e;l++)o=l*n+a,i[2*l]=Math.cos(o),i[2*l+1]=Math.sin(-o);return i},Rn=function(e,r){return Math.min(e/4,r/4,8)},Xh=function(e,r){return Math.min(e/10,r/10,8)},Jl=function(){return 8},n5=function(e,r,n){return[e-2*r+n,2*(r-e),e]},ec=function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},a5=wt({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),i5={pageRank:function(e){for(var r=a5(e),n=r.dampingFactor,a=r.precision,i=r.iterations,o=r.weight,l=this._private.cy,u=this.byGroup(),c=u.nodes,d=u.edges,f=c.length,p=f*f,v=d.length,h=new Array(p),g=new Array(f),y=(1-n)/f,m=0;m<f;m++){for(var b=0;b<f;b++){var w=m*f+b;h[w]=0}g[m]=0}for(var C=0;C<v;C++){var x=d[C],E=x.data("source"),k=x.data("target");if(E!==k){var B=c.indexOfId(E),S=c.indexOfId(k),N=o(x),D=S*f+B;h[D]+=N,g[B]+=N}}for(var P=1/f+y,L=0;L<f;L++)if(g[L]===0)for(var O=0;O<f;O++){var I=O*f+L;h[I]=P}else for(var _=0;_<f;_++){var M=_*f+L;h[M]=h[M]/g[L]+y}for(var F=new Array(f),V=new Array(f),H,$=0;$<f;$++)F[$]=1;for(var z=0;z<i;z++){for(var j=0;j<f;j++)V[j]=0;for(var ee=0;ee<f;ee++)for(var J=0;J<f;J++){var Z=ee*f+J;V[ee]+=h[Z]*F[J]}zB(V),H=F,F=V,V=H;for(var re=0,Y=0;Y<f;Y++){var A=H[Y]-F[Y];re+=A*A}if(re<a)break}var K={rank:function(oe){return oe=l.collection(oe)[0],F[c.indexOf(oe)]}};return K}},Zh=wt({root:null,weight:function(e){return 1},directed:!1,alpha:0}),wa={degreeCentralityNormalized:function(e){e=Zh(e);var r=this.cy(),n=this.nodes(),a=n.length;if(e.directed){for(var d={},f={},p=0,v=0,h=0;h<a;h++){var g=n[h],y=g.id();e.root=g;var m=this.degreeCentrality(e);p<m.indegree&&(p=m.indegree),v<m.outdegree&&(v=m.outdegree),d[y]=m.indegree,f[y]=m.outdegree}return{indegree:function(w){return p==0?0:(be(w)&&(w=r.filter(w)),d[w.id()]/p)},outdegree:function(w){return v===0?0:(be(w)&&(w=r.filter(w)),f[w.id()]/v)}}}else{for(var i={},o=0,l=0;l<a;l++){var u=n[l];e.root=u;var c=this.degreeCentrality(e);o<c.degree&&(o=c.degree),i[u.id()]=c.degree}return{degree:function(w){return o===0?0:(be(w)&&(w=r.filter(w)),i[w.id()]/o)}}}},degreeCentrality:function(e){e=Zh(e);var r=this.cy(),n=this,a=e,i=a.root,o=a.weight,l=a.directed,u=a.alpha;if(i=r.collection(i)[0],l){for(var v=i.connectedEdges(),h=v.filter(function(E){return E.target().same(i)&&n.has(E)}),g=v.filter(function(E){return E.source().same(i)&&n.has(E)}),y=h.length,m=g.length,b=0,w=0,C=0;C<h.length;C++)b+=o(h[C]);for(var x=0;x<g.length;x++)w+=o(g[x]);return{indegree:Math.pow(y,1-u)*Math.pow(b,u),outdegree:Math.pow(m,1-u)*Math.pow(w,u)}}else{for(var c=i.connectedEdges().intersection(n),d=c.length,f=0,p=0;p<c.length;p++)f+=o(c[p]);return{degree:Math.pow(d,1-u)*Math.pow(f,u)}}}};wa.dc=wa.degreeCentrality,wa.dcn=wa.degreeCentralityNormalised=wa.degreeCentralityNormalized;var Qh=wt({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Ca={closenessCentralityNormalized:function(e){for(var r=Qh(e),n=r.harmonic,a=r.weight,i=r.directed,o=this.cy(),l={},u=0,c=this.nodes(),d=this.floydWarshall({weight:a,directed:i}),f=0;f<c.length;f++){for(var p=0,v=c[f],h=0;h<c.length;h++)if(f!==h){var g=d.distance(v,c[h]);n?p+=1/g:p+=g}n||(p=1/p),u<p&&(u=p),l[v.id()]=p}return{closeness:function(m){return u==0?0:(be(m)?m=o.filter(m)[0].id():m=m.id(),l[m]/u)}}},closenessCentrality:function(e){var r=Qh(e),n=r.root,a=r.weight,i=r.directed,o=r.harmonic;n=this.filter(n)[0];for(var l=this.dijkstra({root:n,weight:a,directed:i}),u=0,c=this.nodes(),d=0;d<c.length;d++){var f=c[d];if(!f.same(n)){var p=l.distanceTo(f);o?u+=1/p:u+=p}}return o?u:1/u}};Ca.cc=Ca.closenessCentrality,Ca.ccn=Ca.closenessCentralityNormalised=Ca.closenessCentralityNormalized;var o5=wt({weight:null,directed:!1}),tc={betweennessCentrality:function(e){for(var r=o5(e),n=r.directed,a=r.weight,i=a!=null,o=this.cy(),l=this.nodes(),u={},c={},d=0,f={set:function(w,C){c[w]=C,C>d&&(d=C)},get:function(w){return c[w]}},p=0;p<l.length;p++){var v=l[p],h=v.id();n?u[h]=v.outgoers().nodes():u[h]=v.openNeighborhood().nodes(),f.set(h,0)}for(var g=function(w){for(var C=l[w].id(),x=[],E={},k={},B={},S=new Ei(function(J,Z){return B[J]-B[Z]}),N=0;N<l.length;N++){var D=l[N].id();E[D]=[],k[D]=0,B[D]=1/0}for(k[C]=1,B[C]=0,S.push(C);!S.empty();){var P=S.pop();if(x.push(P),i)for(var L=0;L<u[P].length;L++){var O=u[P][L],I=o.getElementById(P),_=void 0;I.edgesTo(O).length>0?_=I.edgesTo(O)[0]:_=O.edgesTo(I)[0];var M=a(_);O=O.id(),B[O]>B[P]+M&&(B[O]=B[P]+M,S.nodes.indexOf(O)<0?S.push(O):S.updateItem(O),k[O]=0,E[O]=[]),B[O]==B[P]+M&&(k[O]=k[O]+k[P],E[O].push(P))}else for(var F=0;F<u[P].length;F++){var V=u[P][F].id();B[V]==1/0&&(S.push(V),B[V]=B[P]+1),B[V]==B[P]+1&&(k[V]=k[V]+k[P],E[V].push(P))}}for(var H={},$=0;$<l.length;$++)H[l[$].id()]=0;for(;x.length>0;){for(var z=x.pop(),j=0;j<E[z].length;j++){var ee=E[z][j];H[ee]=H[ee]+k[ee]/k[z]*(1+H[z])}z!=l[w].id()&&f.set(z,f.get(z)+H[z])}},y=0;y<l.length;y++)g(y);var m={betweenness:function(w){var C=o.collection(w).id();return f.get(C)},betweennessNormalized:function(w){if(d==0)return 0;var C=o.collection(w).id();return f.get(C)/d}};return m.betweennessNormalised=m.betweennessNormalized,m}};tc.bc=tc.betweennessCentrality;var s5=wt({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),l5=function(e){return s5(e)},c5=function(e,r){for(var n=0,a=0;a<r.length;a++)n+=r[a](e);return n},u5=function(e,r,n){for(var a=0;a<r;a++)e[a*r+a]=n},Jh=function(e,r){for(var n,a=0;a<r;a++){n=0;for(var i=0;i<r;i++)n+=e[i*r+a];for(var o=0;o<r;o++)e[o*r+a]=e[o*r+a]/n}},d5=function(e,r,n){for(var a=new Array(n*n),i=0;i<n;i++){for(var o=0;o<n;o++)a[i*n+o]=0;for(var l=0;l<n;l++)for(var u=0;u<n;u++)a[i*n+u]+=e[i*n+l]*r[l*n+u]}return a},f5=function(e,r,n){for(var a=e.slice(0),i=1;i<n;i++)e=d5(e,a,r);return e},h5=function(e,r,n){for(var a=new Array(r*r),i=0;i<r*r;i++)a[i]=Math.pow(e[i],n);return Jh(a,r),a},p5=function(e,r,n,a){for(var i=0;i<n;i++){var o=Math.round(e[i]*Math.pow(10,a))/Math.pow(10,a),l=Math.round(r[i]*Math.pow(10,a))/Math.pow(10,a);if(o!==l)return!1}return!0},v5=function(e,r,n,a){for(var i=[],o=0;o<r;o++){for(var l=[],u=0;u<r;u++)Math.round(e[o*r+u]*1e3)/1e3>0&&l.push(n[u]);l.length!==0&&i.push(a.collection(l))}return i},g5=function(e,r){for(var n=0;n<e.length;n++)if(!r[n]||e[n].id()!==r[n].id())return!1;return!0},m5=function(e){for(var r=0;r<e.length;r++)for(var n=0;n<e.length;n++)r!=n&&g5(e[r],e[n])&&e.splice(n,1);return e},ep=function(e){for(var r=this.nodes(),n=this.edges(),a=this.cy(),i=l5(e),o={},l=0;l<r.length;l++)o[r[l].id()]=l;for(var u=r.length,c=u*u,d=new Array(c),f,p=0;p<c;p++)d[p]=0;for(var v=0;v<n.length;v++){var h=n[v],g=o[h.source().id()],y=o[h.target().id()],m=c5(h,i.attributes);d[g*u+y]+=m,d[y*u+g]+=m}u5(d,u,i.multFactor),Jh(d,u);for(var b=!0,w=0;b&&w<i.maxIterations;)b=!1,f=f5(d,u,i.expandFactor),d=h5(f,u,i.inflateFactor),p5(d,f,c,4)||(b=!0),w++;var C=v5(d,u,r,a);return C=m5(C),C},y5={markovClustering:ep,mcl:ep},b5=function(e){return e},tp=function(e,r){return Math.abs(r-e)},rp=function(e,r,n){return e+tp(r,n)},np=function(e,r,n){return e+Math.pow(n-r,2)},w5=function(e){return Math.sqrt(e)},C5=function(e,r,n){return Math.max(e,tp(r,n))},Ni=function(e,r,n,a,i){for(var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:b5,l=a,u,c,d=0;d<e;d++)u=r(d),c=n(d),l=i(l,u,c);return o(l)},ka={euclidean:function(e,r,n){return e>=2?Ni(e,r,n,0,np,w5):Ni(e,r,n,0,rp)},squaredEuclidean:function(e,r,n){return Ni(e,r,n,0,np)},manhattan:function(e,r,n){return Ni(e,r,n,0,rp)},max:function(e,r,n){return Ni(e,r,n,-1/0,C5)}};ka["squared-euclidean"]=ka.squaredEuclidean,ka.squaredeuclidean=ka.squaredEuclidean;function qo(t,e,r,n,a,i){var o;return Ye(t)?o=t:o=ka[t]||ka.euclidean,e===0&&Ye(t)?o(a,i):o(e,r,n,a,i)}var k5=wt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),rc=function(e){return k5(e)},Uo=function(e,r,n,a,i){var o=i!=="kMedoids",l=o?function(f){return n[f]}:function(f){return a[f](n)},u=function(p){return a[p](r)},c=n,d=r;return qo(e,a.length,l,u,c,d)},nc=function(e,r,n){for(var a=n.length,i=new Array(a),o=new Array(a),l=new Array(r),u=null,c=0;c<a;c++)i[c]=e.min(n[c]).value,o[c]=e.max(n[c]).value;for(var d=0;d<r;d++){u=[];for(var f=0;f<a;f++)u[f]=Math.random()*(o[f]-i[f])+i[f];l[d]=u}return l},ap=function(e,r,n,a,i){for(var o=1/0,l=0,u=0;u<r.length;u++){var c=Uo(n,e,r[u],a,i);c<o&&(o=c,l=u)}return l},ip=function(e,r,n){for(var a=[],i=null,o=0;o<r.length;o++)i=r[o],n[i.id()]===e&&a.push(i);return a},x5=function(e,r,n){return Math.abs(r-e)<=n},E5=function(e,r,n){for(var a=0;a<e.length;a++)for(var i=0;i<e[a].length;i++){var o=Math.abs(e[a][i]-r[a][i]);if(o>n)return!1}return!0},S5=function(e,r,n){for(var a=0;a<n;a++)if(e===r[a])return!0;return!1},op=function(e,r){var n=new Array(r);if(e.length<50)for(var a=0;a<r;a++){for(var i=e[Math.floor(Math.random()*e.length)];S5(i,n,a);)i=e[Math.floor(Math.random()*e.length)];n[a]=i}else for(var o=0;o<r;o++)n[o]=e[Math.floor(Math.random()*e.length)];return n},sp=function(e,r,n){for(var a=0,i=0;i<r.length;i++)a+=Uo("manhattan",r[i],e,n,"kMedoids");return a},T5=function(e){var r=this.cy(),n=this.nodes(),a=null,i=rc(e),o=new Array(i.k),l={},u;i.testMode?typeof i.testCentroids=="number"?(i.testCentroids,u=nc(n,i.k,i.attributes)):ot(i.testCentroids)==="object"?u=i.testCentroids:u=nc(n,i.k,i.attributes):u=nc(n,i.k,i.attributes);for(var c=!0,d=0;c&&d<i.maxIterations;){for(var f=0;f<n.length;f++)a=n[f],l[a.id()]=ap(a,u,i.distance,i.attributes,"kMeans");c=!1;for(var p=0;p<i.k;p++){var v=ip(p,n,l);if(v.length!==0){for(var h=i.attributes.length,g=u[p],y=new Array(h),m=new Array(h),b=0;b<h;b++){m[b]=0;for(var w=0;w<v.length;w++)a=v[w],m[b]+=i.attributes[b](a);y[b]=m[b]/v.length,x5(y[b],g[b],i.sensitivityThreshold)||(c=!0)}u[p]=y,o[p]=r.collection(v)}}d++}return o},B5=function(e){var r=this.cy(),n=this.nodes(),a=null,i=rc(e),o=new Array(i.k),l,u={},c,d=new Array(i.k);i.testMode?typeof i.testCentroids=="number"||(ot(i.testCentroids)==="object"?l=i.testCentroids:l=op(n,i.k)):l=op(n,i.k);for(var f=!0,p=0;f&&p<i.maxIterations;){for(var v=0;v<n.length;v++)a=n[v],u[a.id()]=ap(a,l,i.distance,i.attributes,"kMedoids");f=!1;for(var h=0;h<l.length;h++){var g=ip(h,n,u);if(g.length!==0){d[h]=sp(l[h],g,i.attributes);for(var y=0;y<g.length;y++)c=sp(g[y],g,i.attributes),c<d[h]&&(d[h]=c,l[h]=g[y],f=!0);o[h]=r.collection(g)}}p++}return o},N5=function(e,r,n,a,i){for(var o,l,u=0;u<r.length;u++)for(var c=0;c<e.length;c++)a[u][c]=Math.pow(n[u][c],i.m);for(var d=0;d<e.length;d++)for(var f=0;f<i.attributes.length;f++){o=0,l=0;for(var p=0;p<r.length;p++)o+=a[p][d]*i.attributes[f](r[p]),l+=a[p][d];e[d][f]=o/l}},D5=function(e,r,n,a,i){for(var o=0;o<e.length;o++)r[o]=e[o].slice();for(var l,u,c,d=2/(i.m-1),f=0;f<n.length;f++)for(var p=0;p<a.length;p++){l=0;for(var v=0;v<n.length;v++)u=Uo(i.distance,a[p],n[f],i.attributes,"cmeans"),c=Uo(i.distance,a[p],n[v],i.attributes,"cmeans"),l+=Math.pow(u/c,d);e[p][f]=1/l}},P5=function(e,r,n,a){for(var i=new Array(n.k),o=0;o<i.length;o++)i[o]=[];for(var l,u,c=0;c<r.length;c++){l=-1/0,u=-1;for(var d=0;d<r[0].length;d++)r[c][d]>l&&(l=r[c][d],u=d);i[u].push(e[c])}for(var f=0;f<i.length;f++)i[f]=a.collection(i[f]);return i},lp=function(e){var r=this.cy(),n=this.nodes(),a=rc(e),i,o,l,u,c;u=new Array(n.length);for(var d=0;d<n.length;d++)u[d]=new Array(a.k);l=new Array(n.length);for(var f=0;f<n.length;f++)l[f]=new Array(a.k);for(var p=0;p<n.length;p++){for(var v=0,h=0;h<a.k;h++)l[p][h]=Math.random(),v+=l[p][h];for(var g=0;g<a.k;g++)l[p][g]=l[p][g]/v}o=new Array(a.k);for(var y=0;y<a.k;y++)o[y]=new Array(a.attributes.length);c=new Array(n.length);for(var m=0;m<n.length;m++)c[m]=new Array(a.k);for(var b=!0,w=0;b&&w<a.maxIterations;)b=!1,N5(o,n,l,c,a),D5(l,u,o,n,a),E5(l,u,a.sensitivityThreshold)||(b=!0),w++;return i=P5(n,l,a,r),{clusters:i,degreeOfMembership:l}},O5={kMeans:T5,kMedoids:B5,fuzzyCMeans:lp,fcm:lp},_5=wt({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),L5={single:"min",complete:"max"},F5=function(e){var r=_5(e),n=L5[r.linkage];return n!=null&&(r.linkage=n),r},cp=function(e,r,n,a,i){for(var o=0,l=1/0,u,c=i.attributes,d=function(S,N){return qo(i.distance,c.length,function(D){return c[D](S)},function(D){return c[D](N)},S,N)},f=0;f<e.length;f++){var p=e[f].key,v=n[p][a[p]];v<l&&(o=p,l=v)}if(i.mode==="threshold"&&l>=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var h=r[o],g=r[a[o]],y;i.mode==="dendrogram"?y={left:h,right:g,key:h.key}:y={value:h.value.concat(g.value),key:h.key},e[h.index]=y,e.splice(g.index,1),r[h.key]=y;for(var m=0;m<e.length;m++){var b=e[m];h.key===b.key?u=1/0:i.linkage==="min"?(u=n[h.key][b.key],n[h.key][b.key]>n[g.key][b.key]&&(u=n[g.key][b.key])):i.linkage==="max"?(u=n[h.key][b.key],n[h.key][b.key]<n[g.key][b.key]&&(u=n[g.key][b.key])):i.linkage==="mean"?u=(n[h.key][b.key]*h.size+n[g.key][b.key]*g.size)/(h.size+g.size):i.mode==="dendrogram"?u=d(b.value,h.value):u=d(b.value[0],h.value[0]),n[h.key][b.key]=n[b.key][h.key]=u}for(var w=0;w<e.length;w++){var C=e[w].key;if(a[C]===h.key||a[C]===g.key){for(var x=C,E=0;E<e.length;E++){var k=e[E].key;n[C][k]<n[C][x]&&(x=k)}a[C]=x}e[w].index=w}return h.key=g.key=h.index=g.index=null,!0},Go=function t(e,r,n){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},M5=function t(e,r){if(!e)return"";if(e.left&&e.right){var n=t(e.left,r),a=t(e.right,r),i=r.add({group:"nodes",data:{id:n+","+a}});return r.add({group:"edges",data:{source:n,target:i.id()}}),r.add({group:"edges",data:{source:a,target:i.id()}}),i.id()}else if(e.value)return e.value.id()},I5=function t(e,r,n){if(!e)return[];var a=[],i=[],o=[];return r===0?(e.left&&Go(e.left,a),e.right&&Go(e.right,i),o=a.concat(i),[n.collection(o)]):r===1?e.value?[n.collection(e.value)]:(e.left&&Go(e.left,a),e.right&&Go(e.right,i),[n.collection(a),n.collection(i)]):e.value?[n.collection(e.value)]:(e.left&&(a=t(e.left,r-1,n)),e.right&&(i=t(e.right,r-1,n)),a.concat(i))},up=function(e){for(var r=this.cy(),n=this.nodes(),a=F5(e),i=a.attributes,o=function(w,C){return qo(a.distance,i.length,function(x){return i[x](w)},function(x){return i[x](C)},w,C)},l=[],u=[],c=[],d=[],f=0;f<n.length;f++){var p={value:a.mode==="dendrogram"?n[f]:[n[f]],key:f,index:f};l[f]=p,d[f]=p,u[f]=[],c[f]=0}for(var v=0;v<l.length;v++)for(var h=0;h<=v;h++){var g=void 0;a.mode==="dendrogram"?g=v===h?1/0:o(l[v].value,l[h].value):g=v===h?1/0:o(l[v].value[0],l[h].value[0]),u[v][h]=g,u[h][v]=g,g<u[v][c[v]]&&(c[v]=h)}for(var y=cp(l,d,u,c,a);y;)y=cp(l,d,u,c,a);var m;return a.mode==="dendrogram"?(m=I5(l[0],a.dendrogramDepth,r),a.addDendrogram&&M5(l[0],r)):(m=new Array(l.length),l.forEach(function(b,w){b.key=b.index=null,m[w]=r.collection(b.value)})),m},A5={hierarchicalClustering:up,hca:up},V5=wt({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),R5=function(e){var r=e.damping,n=e.preference;.5<=r&&r<1||Xe("Damping must range on [0.5, 1). Got: ".concat(r));var a=["median","mean","min","max"];return a.some(function(i){return i===n})||le(n)||Xe("Preference must be one of [".concat(a.map(function(i){return"'".concat(i,"'")}).join(", "),"] or a number. Got: ").concat(n)),V5(e)},$5=function(e,r,n,a){var i=function(l,u){return a[u](l)};return-qo(e,a.length,function(o){return i(r,o)},function(o){return i(n,o)},r,n)},z5=function(e,r){var n=null;return r==="median"?n=RB(e):r==="mean"?n=VB(e):r==="min"?n=IB(e):r==="max"?n=AB(e):n=r,n},H5=function(e,r,n){for(var a=[],i=0;i<e;i++)r[i*e+i]+n[i*e+i]>0&&a.push(i);return a},dp=function(e,r,n){for(var a=[],i=0;i<e;i++){for(var o=-1,l=-1/0,u=0;u<n.length;u++){var c=n[u];r[i*e+c]>l&&(o=c,l=r[i*e+c])}o>0&&a.push(o)}for(var d=0;d<n.length;d++)a[n[d]]=n[d];return a},K5=function(e,r,n){for(var a=dp(e,r,n),i=0;i<n.length;i++){for(var o=[],l=0;l<a.length;l++)a[l]===n[i]&&o.push(l);for(var u=-1,c=-1/0,d=0;d<o.length;d++){for(var f=0,p=0;p<o.length;p++)f+=r[o[p]*e+o[d]];f>c&&(u=d,c=f)}n[i]=o[u]}return a=dp(e,r,n),a},fp=function(e){for(var r=this.cy(),n=this.nodes(),a=R5(e),i={},o=0;o<n.length;o++)i[n[o].id()]=o;var l,u,c,d,f,p;l=n.length,u=l*l,c=new Array(u);for(var v=0;v<u;v++)c[v]=-1/0;for(var h=0;h<l;h++)for(var g=0;g<l;g++)h!==g&&(c[h*l+g]=$5(a.distance,n[h],n[g],a.attributes));d=z5(c,a.preference);for(var y=0;y<l;y++)c[y*l+y]=d;f=new Array(u);for(var m=0;m<u;m++)f[m]=0;p=new Array(u);for(var b=0;b<u;b++)p[b]=0;for(var w=new Array(l),C=new Array(l),x=new Array(l),E=0;E<l;E++)w[E]=0,C[E]=0,x[E]=0;for(var k=new Array(l*a.minIterations),B=0;B<k.length;B++)k[B]=0;var S;for(S=0;S<a.maxIterations;S++){for(var N=0;N<l;N++){for(var D=-1/0,P=-1/0,L=-1,O=0,I=0;I<l;I++)w[I]=f[N*l+I],O=p[N*l+I]+c[N*l+I],O>=D?(P=D,D=O,L=I):O>P&&(P=O);for(var _=0;_<l;_++)f[N*l+_]=(1-a.damping)*(c[N*l+_]-D)+a.damping*w[_];f[N*l+L]=(1-a.damping)*(c[N*l+L]-P)+a.damping*w[L]}for(var M=0;M<l;M++){for(var F=0,V=0;V<l;V++)w[V]=p[V*l+M],C[V]=Math.max(0,f[V*l+M]),F+=C[V];F-=C[M],C[M]=f[M*l+M],F+=C[M];for(var H=0;H<l;H++)p[H*l+M]=(1-a.damping)*Math.min(0,F-C[H])+a.damping*w[H];p[M*l+M]=(1-a.damping)*(F-C[M])+a.damping*w[M]}for(var $=0,z=0;z<l;z++){var j=p[z*l+z]+f[z*l+z]>0?1:0;k[S%a.minIterations*l+z]=j,$+=j}if($>0&&(S>=a.minIterations-1||S==a.maxIterations-1)){for(var ee=0,J=0;J<l;J++){x[J]=0;for(var Z=0;Z<a.minIterations;Z++)x[J]+=k[Z*l+J];(x[J]===0||x[J]===a.minIterations)&&ee++}if(ee===l)break}}for(var re=H5(l,f,p),Y=K5(l,c,re),A={},K=0;K<re.length;K++)A[re[K]]=[];for(var W=0;W<n.length;W++){var oe=i[n[W].id()],he=Y[oe];he!=null&&A[he].push(n[W])}for(var ne=new Array(re.length),se=0;se<re.length;se++)ne[se]=r.collection(A[re[se]]);return ne},q5={affinityPropagation:fp,ap:fp},U5=wt({root:void 0,directed:!1}),G5={hierholzer:function(e){if(!_e(e)){var r=arguments;e={root:r[0],directed:r[1]}}var n=U5(e),a=n.root,i=n.directed,o=this,l=!1,u,c,d;a&&(d=be(a)?this.filter(a)[0].id():a[0].id());var f={},p={};i?o.forEach(function(b){var w=b.id();if(b.isNode()){var C=b.indegree(!0),x=b.outdegree(!0),E=C-x,k=x-C;E==1?u?l=!0:u=w:k==1?c?l=!0:c=w:(k>1||E>1)&&(l=!0),f[w]=[],b.outgoers().forEach(function(B){B.isEdge()&&f[w].push(B.id())})}else p[w]=[void 0,b.target().id()]}):o.forEach(function(b){var w=b.id();if(b.isNode()){var C=b.degree(!0);C%2&&(u?c?l=!0:c=w:u=w),f[w]=[],b.connectedEdges().forEach(function(x){return f[w].push(x.id())})}else p[w]=[b.source().id(),b.target().id()]});var v={found:!1,trail:void 0};if(l)return v;if(c&&u)if(i){if(d&&c!=d)return v;d=c}else{if(d&&c!=d&&u!=d)return v;d||(d=c)}else d||(d=o[0].id());var h=function(w){for(var C=w,x=[w],E,k,B;f[C].length;)E=f[C].shift(),k=p[E][0],B=p[E][1],C!=B?(f[B]=f[B].filter(function(S){return S!=E}),C=B):!i&&C!=k&&(f[k]=f[k].filter(function(S){return S!=E}),C=k),x.unshift(E),x.unshift(C);return x},g=[],y=[];for(y=h(d);y.length!=1;)f[y[0]].length==0?(g.unshift(o.getElementById(y.shift())),g.unshift(o.getElementById(y.shift()))):y=h(y.shift()).concat(y);g.unshift(o.getElementById(y.shift()));for(var m in f)if(f[m].length)return v;return v.found=!0,v.trail=this.spawn(g,!0),v}},Wo=function(){var e=this,r={},n=0,a=0,i=[],o=[],l={},u=function(p,v){for(var h=o.length-1,g=[],y=e.spawn();o[h].x!=p||o[h].y!=v;)g.push(o.pop().edge),h--;g.push(o.pop().edge),g.forEach(function(m){var b=m.connectedNodes().intersection(e);y.merge(m),b.forEach(function(w){var C=w.id(),x=w.connectedEdges().intersection(e);y.merge(w),r[C].cutVertex?y.merge(x.filter(function(E){return E.isLoop()})):y.merge(x)})}),i.push(y)},c=function f(p,v,h){p===h&&(a+=1),r[v]={id:n,low:n++,cutVertex:!1};var g=e.getElementById(v).connectedEdges().intersection(e);if(g.size()===0)i.push(e.spawn(e.getElementById(v)));else{var y,m,b,w;g.forEach(function(C){y=C.source().id(),m=C.target().id(),b=y===v?m:y,b!==h&&(w=C.id(),l[w]||(l[w]=!0,o.push({x:v,y:b,edge:C})),b in r?r[v].low=Math.min(r[v].low,r[b].id):(f(p,b,v),r[v].low=Math.min(r[v].low,r[b].low),r[v].id<=r[b].low&&(r[v].cutVertex=!0,u(v,b))))})}};e.forEach(function(f){if(f.isNode()){var p=f.id();p in r||(a=0,c(p,p),r[p].cutVertex=a>1)}});var d=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(d),components:i}},W5={hopcroftTarjanBiconnected:Wo,htbc:Wo,htb:Wo,hopcroftTarjanBiconnectedComponents:Wo},jo=function(){var e=this,r={},n=0,a=[],i=[],o=e.spawn(e),l=function u(c){i.push(c),r[c]={index:n,low:n++,explored:!1};var d=e.getElementById(c).connectedEdges().intersection(e);if(d.forEach(function(g){var y=g.target().id();y!==c&&(y in r||u(y),r[y].explored||(r[c].low=Math.min(r[c].low,r[y].low)))}),r[c].index===r[c].low){for(var f=e.spawn();;){var p=i.pop();if(f.merge(e.getElementById(p)),r[p].low=r[c].index,r[p].explored=!0,p===c)break}var v=f.edgesWith(f),h=f.merge(v);a.push(h),o=o.difference(h)}};return e.forEach(function(u){if(u.isNode()){var c=u.id();c in r||l(c)}}),{cut:o,components:a}},j5={tarjanStronglyConnected:jo,tsc:jo,tscc:jo,tarjanStronglyConnectedComponents:jo},hp={};[xi,EB,SB,BB,DB,OB,FB,i5,wa,Ca,tc,y5,O5,A5,q5,G5,W5,j5].forEach(function(t){xe(hp,t)});/*!
435
435
  Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
436
436
  Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
437
437
  Licensed under The MIT License (http://opensource.org/licenses/MIT)
438
- */var pp=0,vp=1,gp=2,$r=function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=pp,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};$r.prototype={fulfill:function(e){return mp(this,vp,"fulfillValue",e)},reject:function(e){return mp(this,gp,"rejectReason",e)},then:function(e,r){var n=this,a=new $r;return n.onFulfilled.push(wp(e,a,"fulfill")),n.onRejected.push(wp(r,a,"reject")),yp(n),a.proxy}};var mp=function(e,r,n,a){return e.state===pp&&(e.state=r,e[n]=a,yp(e)),e},yp=function(e){e.state===vp?bp(e,"onFulfilled",e.fulfillValue):e.state===gp&&bp(e,"onRejected",e.rejectReason)},bp=function(e,r,n){if(e[r].length!==0){var a=e[r];e[r]=[];var i=function(){for(var l=0;l<a.length;l++)a[l](n)};typeof setImmediate=="function"?setImmediate(i):setTimeout(i,0)}},wp=function(e,r,n){return function(a){if(typeof e!="function")r[n].call(r,a);else{var i;try{i=e(a)}catch(o){r.reject(o);return}Y5(r,i)}}},Y5=function t(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return}var n;if(ot(r)==="object"&&r!==null||typeof r=="function")try{n=r.then}catch(i){e.reject(i);return}if(typeof n=="function"){var a=!1;try{n.call(r,function(i){a||(a=!0,i===r?e.reject(new TypeError("circular thenable chain")):t(e,i))},function(i){a||(a=!0,e.reject(i))})}catch(i){a||e.reject(i)}return}e.fulfill(r)};$r.all=function(t){return new $r(function(e,r){for(var n=new Array(t.length),a=0,i=function(u,c){n[u]=c,a++,a===t.length&&e(n)},o=0;o<t.length;o++)(function(l){var u=t[l],c=u!=null&&u.then!=null;if(c)u.then(function(f){i(l,f)},function(f){r(f)});else{var d=u;i(l,d)}})(o)})},$r.resolve=function(t){return new $r(function(e,r){e(t)})},$r.reject=function(t){return new $r(function(e,r){r(t)})};var xa=typeof Promise<"u"?Promise:$r,nc=function(e,r,n){var a=$l(e),i=!a,o=this._private=xe({duration:1e3},r,n);if(o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&Ye(o.complete)&&o.completes.push(o.complete),i){var l=e.position();o.startPosition=o.startPosition||{x:l.x,y:l.y},o.startStyle=o.startStyle||e.cy().style().getAnimationStartStyle(e,o.style)}if(a){var u=e.pan();o.startPan={x:u.x,y:u.y},o.startZoom=e.zoom()}this.length=1,this[0]=this},$n=nc.prototype;xe($n,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var r,n=e.target._private.animation;e.queue?r=n.queue:r=n.current,r.push(this),Ut(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration)},progress:function(e){var r=this._private,n=r.playing;return e===void 0?r.progress:(n&&this.pause(),r.progress=e,r.started=!1,n&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(c,d){var f=e[c];f!=null&&(e[c]=e[d],e[d]=f)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var a=0;a<e.style.length;a++){var i=e.style[a],o=i.name,l=e.startStyle[o];e.startStyle[o]=i,e.style[a]=l}return r&&this.play(),this},promise:function(e){var r=this._private,n;switch(e){case"frame":n=r.frames;break;default:case"complete":case"completed":n=r.completes}return new xa(function(a,i){n.push(function(){a()})})}}),$n.complete=$n.completed,$n.run=$n.play,$n.running=$n.playing;var X5={animated:function(){return function(){var r=this,n=r.length!==void 0,a=n?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return!1;var o=a[0];if(o)return o._private.animation.current.length>0}},clearQueue:function(){return function(){var r=this,n=r.length!==void 0,a=n?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o<a.length;o++){var l=a[o];l._private.animation.queue=[]}return this}},delay:function(){return function(r,n){var a=this._private.cy||this;return a.styleEnabled()?this.animate({delay:r,duration:r,complete:n}):this}},delayAnimation:function(){return function(r,n){var a=this._private.cy||this;return a.styleEnabled()?this.animation({delay:r,duration:r,complete:n}):this}},animation:function(){return function(r,n){var a=this,i=a.length!==void 0,o=i?a:[a],l=this._private.cy||this,u=!i,c=!u;if(!l.styleEnabled())return this;var d=l.style();r=xe({},r,n);var f=Object.keys(r).length===0;if(f)return new nc(o[0],r);switch(r.duration===void 0&&(r.duration=400),r.duration){case"slow":r.duration=600;break;case"fast":r.duration=200;break}if(c&&(r.style=d.getPropsList(r.style||r.css),r.css=void 0),c&&r.renderedPosition!=null){var p=r.renderedPosition,v=l.pan(),h=l.zoom();r.position=Kh(p,h,v)}if(u&&r.panBy!=null){var g=r.panBy,y=l.pan();r.pan={x:y.x+g.x,y:y.y+g.y}}var m=r.center||r.centre;if(u&&m!=null){var b=l.getCenterPan(m.eles,r.zoom);b!=null&&(r.pan=b)}if(u&&r.fit!=null){var w=r.fit,C=l.getFitViewport(w.eles||w.boundingBox,w.padding);C!=null&&(r.pan=C.pan,r.zoom=C.zoom)}if(u&&_e(r.zoom)){var x=l.getZoomedViewport(r.zoom);x!=null?(x.zoomed&&(r.zoom=x.zoom),x.panned&&(r.pan=x.pan)):r.zoom=null}return new nc(o[0],r)}},animate:function(){return function(r,n){var a=this,i=a.length!==void 0,o=i?a:[a],l=this._private.cy||this;if(!l.styleEnabled())return this;n&&(r=xe({},r,n));for(var u=0;u<o.length;u++){var c=o[u],d=c.animated()&&(r.queue===void 0||r.queue),f=c.animation(r,d?{queue:!0}:void 0);f.play()}return this}},stop:function(){return function(r,n){var a=this,i=a.length!==void 0,o=i?a:[a],l=this._private.cy||this;if(!l.styleEnabled())return this;for(var u=0;u<o.length;u++){for(var c=o[u],d=c._private,f=d.animation.current,p=0;p<f.length;p++){var v=f[p],h=v._private;n&&(h.duration=0)}r&&(d.animation.queue=[]),n||(d.animation.current=[])}return l.notify("draw"),this}}},Z5=Array.isArray,Yo=Z5,Q5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J5=/^\w*$/;function eN(t,e){if(Yo(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||bi(t)?!0:J5.test(t)||!Q5.test(t)||e!=null&&t in Object(e)}var tN=eN,rN="[object AsyncFunction]",nN="[object Function]",aN="[object GeneratorFunction]",iN="[object Proxy]";function oN(t){if(!Ln(t))return!1;var e=Dh(t);return e==nN||e==aN||e==rN||e==iN}var sN=oN,lN=Oo["__core-js_shared__"],ac=lN,Cp=function(){var t=/[^.]+$/.exec(ac&&ac.keys&&ac.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function cN(t){return!!Cp&&Cp in t}var uN=cN,dN=Function.prototype,fN=dN.toString;function hN(t){if(t!=null){try{return fN.call(t)}catch{}try{return t+""}catch{}}return""}var pN=hN,vN=/[\\^$.*+?()[\]{}|]/g,gN=/^\[object .+?Constructor\]$/,mN=Function.prototype,yN=Object.prototype,bN=mN.toString,wN=yN.hasOwnProperty,CN=RegExp("^"+bN.call(wN).replace(vN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kN(t){if(!Ln(t)||uN(t))return!1;var e=sN(t)?CN:gN;return e.test(pN(t))}var xN=kN;function EN(t,e){return t==null?void 0:t[e]}var SN=EN;function TN(t,e){var r=SN(t,e);return xN(r)?r:void 0}var ic=TN,BN=ic(Object,"create"),Di=BN;function NN(){this.__data__=Di?Di(null):{},this.size=0}var DN=NN;function PN(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ON=PN,_N="__lodash_hash_undefined__",FN=Object.prototype,LN=FN.hasOwnProperty;function MN(t){var e=this.__data__;if(Di){var r=e[t];return r===_N?void 0:r}return LN.call(e,t)?e[t]:void 0}var IN=MN,AN=Object.prototype,RN=AN.hasOwnProperty;function VN(t){var e=this.__data__;return Di?e[t]!==void 0:RN.call(e,t)}var $N=VN,zN="__lodash_hash_undefined__";function HN(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Di&&e===void 0?zN:e,this}var KN=HN;function Ea(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ea.prototype.clear=DN,Ea.prototype.delete=ON,Ea.prototype.get=IN,Ea.prototype.has=$N,Ea.prototype.set=KN;var kp=Ea;function qN(){this.__data__=[],this.size=0}var UN=qN;function GN(t,e){return t===e||t!==t&&e!==e}var xp=GN;function WN(t,e){for(var r=t.length;r--;)if(xp(t[r][0],e))return r;return-1}var Xo=WN,jN=Array.prototype,YN=jN.splice;function XN(t){var e=this.__data__,r=Xo(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():YN.call(e,r,1),--this.size,!0}var ZN=XN;function QN(t){var e=this.__data__,r=Xo(e,t);return r<0?void 0:e[r][1]}var JN=QN;function e4(t){return Xo(this.__data__,t)>-1}var t4=e4;function r4(t,e){var r=this.__data__,n=Xo(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var n4=r4;function Sa(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Sa.prototype.clear=UN,Sa.prototype.delete=ZN,Sa.prototype.get=JN,Sa.prototype.has=t4,Sa.prototype.set=n4;var a4=Sa,i4=ic(Oo,"Map"),o4=i4;function s4(){this.size=0,this.__data__={hash:new kp,map:new(o4||a4),string:new kp}}var l4=s4;function c4(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var u4=c4;function d4(t,e){var r=t.__data__;return u4(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Zo=d4;function f4(t){var e=Zo(this,t).delete(t);return this.size-=e?1:0,e}var h4=f4;function p4(t){return Zo(this,t).get(t)}var v4=p4;function g4(t){return Zo(this,t).has(t)}var m4=g4;function y4(t,e){var r=Zo(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var b4=y4;function Ta(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ta.prototype.clear=l4,Ta.prototype.delete=h4,Ta.prototype.get=v4,Ta.prototype.has=m4,Ta.prototype.set=b4;var Ep=Ta,w4="Expected a function";function oc(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(w4);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(oc.Cache||Ep),r}oc.Cache=Ep;var C4=oc,k4=500;function x4(t){var e=C4(t,function(n){return r.size===k4&&r.clear(),n}),r=e.cache;return e}var E4=x4,S4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,T4=/\\(\\)?/g,B4=E4(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(S4,function(r,n,a,i){e.push(a?i.replace(T4,"$1"):n||r)}),e}),Sp=B4;function N4(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var Tp=N4,D4=1/0,Bp=pa?pa.prototype:void 0,Np=Bp?Bp.toString:void 0;function Dp(t){if(typeof t=="string")return t;if(Yo(t))return Tp(t,Dp)+"";if(bi(t))return Np?Np.call(t):"";var e=t+"";return e=="0"&&1/t==-D4?"-0":e}var P4=Dp;function O4(t){return t==null?"":P4(t)}var Pp=O4;function _4(t,e){return Yo(t)?t:tN(t,e)?[t]:Sp(Pp(t))}var Op=_4,F4=1/0;function L4(t){if(typeof t=="string"||bi(t))return t;var e=t+"";return e=="0"&&1/t==-F4?"-0":e}var sc=L4;function M4(t,e){e=Op(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[sc(e[r++])];return r&&r==n?t:void 0}var I4=M4;function A4(t,e,r){var n=t==null?void 0:I4(t,e);return n===void 0?r:n}var R4=A4,V4=function(){try{var t=ic(Object,"defineProperty");return t({},"",{}),t}catch{}}(),_p=V4;function $4(t,e,r){e=="__proto__"&&_p?_p(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var z4=$4,H4=Object.prototype,K4=H4.hasOwnProperty;function q4(t,e,r){var n=t[e];(!(K4.call(t,e)&&xp(n,r))||r===void 0&&!(e in t))&&z4(t,e,r)}var U4=q4,G4=9007199254740991,W4=/^(?:0|[1-9]\d*)$/;function j4(t,e){var r=typeof t;return e=e??G4,!!e&&(r=="number"||r!="symbol"&&W4.test(t))&&t>-1&&t%1==0&&t<e}var Y4=j4;function X4(t,e,r,n){if(!Ln(t))return t;e=Op(e,t);for(var a=-1,i=e.length,o=i-1,l=t;l!=null&&++a<i;){var u=sc(e[a]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(a!=o){var d=l[u];c=n?n(d,u,l):void 0,c===void 0&&(c=Ln(d)?d:Y4(e[a+1])?[]:{})}U4(l,u,c),l=l[u]}return t}var Z4=X4;function Q4(t,e,r){return t==null?t:Z4(t,e,r)}var J4=Q4;function e3(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var t3=e3;function r3(t){return Yo(t)?Tp(t,sc):bi(t)?[t]:t3(Sp(Pp(t)))}var n3=r3,a3={data:function(e){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(a){},beforeSet:function(a,i){},onSet:function(a){},canSet:function(a){return!0}};return e=xe({},r,e),function(a,i){var o=e,l=this,u=l.length!==void 0,c=u?l:[l],d=u?l[0]:l;if(be(a)){var f=a.indexOf(".")!==-1,p=f&&n3(a);if(o.allowGetting&&i===void 0){var v;return d&&(o.beforeGet(d),p&&d._private[o.field][a]===void 0?v=R4(d._private[o.field],p):v=d._private[o.field][a]),v}else if(o.allowSetting&&i!==void 0){var h=!o.immutableKeys[a];if(h){var g=ph({},a,i);o.beforeSet(l,g);for(var y=0,m=c.length;y<m;y++){var b=c[y];o.canSet(b)&&(p&&d._private[o.field][a]===void 0?J4(b._private[o.field],p,i):b._private[o.field][a]=i)}o.updateStyle&&l.updateStyle(),o.onSet(l),o.settingTriggersEvent&&l[o.triggerFnName](o.settingEvent)}}}else if(o.allowSetting&&_e(a)){var w=a,C,x,E=Object.keys(w);o.beforeSet(l,w);for(var k=0;k<E.length;k++){C=E[k],x=w[C];var B=!o.immutableKeys[C];if(B)for(var S=0;S<c.length;S++){var N=c[S];o.canSet(N)&&(N._private[o.field][C]=x)}}o.updateStyle&&l.updateStyle(),o.onSet(l),o.settingTriggersEvent&&l[o.triggerFnName](o.settingEvent)}else if(o.allowBinding&&Ye(a)){var D=a;l.on(o.bindingEvent,D)}else if(o.allowGetting&&a===void 0){var P;return d&&(o.beforeGet(d),P=d._private[o.field]),P}return l}},removeData:function(e){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=xe({},r,e),function(a){var i=e,o=this,l=o.length!==void 0,u=l?o:[o];if(be(a)){for(var c=a.split(/\s+/),d=c.length,f=0;f<d;f++){var p=c[f];if(!nn(p)){var v=!i.immutableKeys[p];if(v)for(var h=0,g=u.length;h<g;h++)u[h]._private[i.field][p]=void 0}}i.triggerEvent&&o[i.triggerFnName](i.event)}else if(a===void 0){for(var y=0,m=u.length;y<m;y++)for(var b=u[y]._private[i.field],w=Object.keys(b),C=0;C<w.length;C++){var x=w[C],E=!i.immutableKeys[x];E&&(b[x]=void 0)}i.triggerEvent&&o[i.triggerFnName](i.event)}return o}}},i3={eventAliasesOn:function(e){var r=e;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(n,a){var i=this,o=Array.prototype.slice.call(arguments,0);return new xa(function(l,u){var c=function(v){i.off.apply(i,f),l(v)},d=o.concat([c]),f=d.concat([]);i.on.apply(i,d)})}}},Re={};[X5,a3,i3].forEach(function(t){xe(Re,t)});var o3={animate:Re.animate(),animation:Re.animation(),animated:Re.animated(),clearQueue:Re.clearQueue(),delay:Re.delay(),delayAnimation:Re.delayAnimation(),stop:Re.stop()},Qo={classes:function(e){var r=this;if(e===void 0){var n=[];return r[0]._private.classes.forEach(function(h){return n.push(h)}),n}else He(e)||(e=(e||"").match(/\S+/g)||[]);for(var a=[],i=new ga(e),o=0;o<r.length;o++){for(var l=r[o],u=l._private,c=u.classes,d=!1,f=0;f<e.length;f++){var p=e[f],v=c.has(p);if(!v){d=!0;break}}d||(d=c.size!==e.length),d&&(u.classes=i,a.push(l))}return a.length>0&&this.spawn(a).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){He(e)||(e=e.match(/\S+/g)||[]);for(var n=this,a=r===void 0,i=[],o=0,l=n.length;o<l;o++)for(var u=n[o],c=u._private.classes,d=!1,f=0;f<e.length;f++){var p=e[f],v=c.has(p),h=!1;r||a&&!v?(c.add(p),h=!0):(!r||a&&v)&&(c.delete(p),h=!0),!d&&h&&(i.push(u),d=!0)}return i.length>0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n}};Qo.className=Qo.classNames=Qo.classes;var Fe={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:lt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Fe.variable="(?:[\\w-.]|(?:\\\\"+Fe.metaChar+"))+",Fe.className="(?:[\\w-]|(?:\\\\"+Fe.metaChar+"))+",Fe.value=Fe.string+"|"+Fe.number,Fe.id=Fe.variable,function(){var t,e,r;for(t=Fe.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],Fe.comparatorOp+="|@"+e;for(t=Fe.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],!(e.indexOf("!")>=0)&&e!=="="&&(Fe.comparatorOp+="|\\!"+e)}();var $e=function(){return{checks:[]}},fe={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},lc=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return yT(t.selector,e.selector)}),s3=function(){for(var t={},e,r=0;r<lc.length;r++)e=lc[r],t[e.selector]=e.matches;return t}(),l3=function(e,r){return s3[e](r)},c3="("+lc.map(function(t){return t.selector}).join("|")+")",Ba=function(e){return e.replace(new RegExp("\\\\("+Fe.metaChar+")","g"),function(r,n){return n})},cn=function(e,r,n){e[e.length-1]=n},cc=[{name:"group",query:!0,regex:"("+Fe.group+")",populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.GROUP,value:i==="*"?i:i+"s"})}},{name:"state",query:!0,regex:c3,populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.STATE,value:i})}},{name:"id",query:!0,regex:"\\#("+Fe.id+")",populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.ID,value:Ba(i)})}},{name:"className",query:!0,regex:"\\.("+Fe.className+")",populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.CLASS,value:Ba(i)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+Fe.variable+")\\s*\\]",populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.DATA_EXIST,field:Ba(i)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Fe.variable+")\\s*("+Fe.comparatorOp+")\\s*("+Fe.value+")\\s*\\]",populate:function(e,r,n){var a=sr(n,3),i=a[0],o=a[1],l=a[2],u=new RegExp("^"+Fe.string+"$").exec(l)!=null;u?l=l.substring(1,l.length-1):l=parseFloat(l),r.checks.push({type:fe.DATA_COMPARE,field:Ba(i),operator:o,value:l})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+Fe.boolOp+")\\s*("+Fe.variable+")\\s*\\]",populate:function(e,r,n){var a=sr(n,2),i=a[0],o=a[1];r.checks.push({type:fe.DATA_BOOL,field:Ba(o),operator:i})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Fe.meta+")\\s*("+Fe.comparatorOp+")\\s*("+Fe.number+")\\s*\\]\\]",populate:function(e,r,n){var a=sr(n,3),i=a[0],o=a[1],l=a[2];r.checks.push({type:fe.META_COMPARE,field:Ba(i),operator:o,value:parseFloat(l)})}},{name:"nextQuery",separator:!0,regex:Fe.separator,populate:function(e,r){var n=e.currentSubject,a=e.edgeCount,i=e.compoundCount,o=e[e.length-1];n!=null&&(o.subject=n,e.currentSubject=null),o.edgeCount=a,o.compoundCount=i,e.edgeCount=0,e.compoundCount=0;var l=e[e.length++]=$e();return l}},{name:"directedEdge",separator:!0,regex:Fe.directedEdge,populate:function(e,r){if(e.currentSubject==null){var n=$e(),a=r,i=$e();return n.checks.push({type:fe.DIRECTED_EDGE,source:a,target:i}),cn(e,r,n),e.edgeCount++,i}else{var o=$e(),l=r,u=$e();return o.checks.push({type:fe.NODE_SOURCE,source:l,target:u}),cn(e,r,o),e.edgeCount++,u}}},{name:"undirectedEdge",separator:!0,regex:Fe.undirectedEdge,populate:function(e,r){if(e.currentSubject==null){var n=$e(),a=r,i=$e();return n.checks.push({type:fe.UNDIRECTED_EDGE,nodes:[a,i]}),cn(e,r,n),e.edgeCount++,i}else{var o=$e(),l=r,u=$e();return o.checks.push({type:fe.NODE_NEIGHBOR,node:l,neighbor:u}),cn(e,r,o),u}}},{name:"child",separator:!0,regex:Fe.child,populate:function(e,r){if(e.currentSubject==null){var n=$e(),a=$e(),i=e[e.length-1];return n.checks.push({type:fe.CHILD,parent:i,child:a}),cn(e,r,n),e.compoundCount++,a}else if(e.currentSubject===r){var o=$e(),l=e[e.length-1],u=$e(),c=$e(),d=$e(),f=$e();return o.checks.push({type:fe.COMPOUND_SPLIT,left:l,right:u,subject:c}),c.checks=r.checks,r.checks=[{type:fe.TRUE}],f.checks.push({type:fe.TRUE}),u.checks.push({type:fe.PARENT,parent:f,child:d}),cn(e,l,o),e.currentSubject=c,e.compoundCount++,d}else{var p=$e(),v=$e(),h=[{type:fe.PARENT,parent:p,child:v}];return p.checks=r.checks,r.checks=h,e.compoundCount++,v}}},{name:"descendant",separator:!0,regex:Fe.descendant,populate:function(e,r){if(e.currentSubject==null){var n=$e(),a=$e(),i=e[e.length-1];return n.checks.push({type:fe.DESCENDANT,ancestor:i,descendant:a}),cn(e,r,n),e.compoundCount++,a}else if(e.currentSubject===r){var o=$e(),l=e[e.length-1],u=$e(),c=$e(),d=$e(),f=$e();return o.checks.push({type:fe.COMPOUND_SPLIT,left:l,right:u,subject:c}),c.checks=r.checks,r.checks=[{type:fe.TRUE}],f.checks.push({type:fe.TRUE}),u.checks.push({type:fe.ANCESTOR,ancestor:f,descendant:d}),cn(e,l,o),e.currentSubject=c,e.compoundCount++,d}else{var p=$e(),v=$e(),h=[{type:fe.ANCESTOR,ancestor:p,descendant:v}];return p.checks=r.checks,r.checks=h,e.compoundCount++,v}}},{name:"subject",modifier:!0,regex:Fe.subject,populate:function(e,r){if(e.currentSubject!=null&&e.currentSubject!==r)return Ae("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=r;var n=e[e.length-1],a=n.checks[0],i=a==null?null:a.type;i===fe.DIRECTED_EDGE?a.type=fe.NODE_TARGET:i===fe.UNDIRECTED_EDGE&&(a.type=fe.NODE_NEIGHBOR,a.node=a.nodes[1],a.neighbor=a.nodes[0],a.nodes=null)}}];cc.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var u3=function(e){for(var r,n,a,i=0;i<cc.length;i++){var o=cc[i],l=o.name,u=e.match(o.regexObj);if(u!=null){n=u,r=o,a=l;var c=u[0];e=e.substring(c.length);break}}return{expr:r,match:n,name:a,remaining:e}},d3=function(e){var r=e.match(/^\s+/);if(r){var n=r[0];e=e.substring(n.length)}return e},f3=function(e){var r=this,n=r.inputText=e,a=r[0]=$e();for(r.length=1,n=d3(n);;){var i=u3(n);if(i.expr==null)return Ae("The selector `"+e+"`is invalid"),!1;var o=i.match.slice(1),l=i.expr.populate(r,a,o);if(l===!1)return!1;if(l!=null&&(a=l),n=i.remaining,n.match(/^\s*$/))break}var u=r[r.length-1];r.currentSubject!=null&&(u.subject=r.currentSubject),u.edgeCount=r.edgeCount,u.compoundCount=r.compoundCount;for(var c=0;c<r.length;c++){var d=r[c];if(d.compoundCount>0&&d.edgeCount>0)return Ae("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(d.edgeCount>1)return Ae("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;d.edgeCount===1&&Ae("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},h3=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(d){return d??""},r=function(d){return be(d)?'"'+d+'"':e(d)},n=function(d){return" "+d+" "},a=function(d,f){var p=d.type,v=d.value;switch(p){case fe.GROUP:{var h=e(v);return h.substring(0,h.length-1)}case fe.DATA_COMPARE:{var g=d.field,y=d.operator;return"["+g+n(e(y))+r(v)+"]"}case fe.DATA_BOOL:{var m=d.operator,b=d.field;return"["+e(m)+b+"]"}case fe.DATA_EXIST:{var w=d.field;return"["+w+"]"}case fe.META_COMPARE:{var C=d.operator,x=d.field;return"[["+x+n(e(C))+r(v)+"]]"}case fe.STATE:return v;case fe.ID:return"#"+v;case fe.CLASS:return"."+v;case fe.PARENT:case fe.CHILD:return i(d.parent,f)+n(">")+i(d.child,f);case fe.ANCESTOR:case fe.DESCENDANT:return i(d.ancestor,f)+" "+i(d.descendant,f);case fe.COMPOUND_SPLIT:{var E=i(d.left,f),k=i(d.subject,f),B=i(d.right,f);return E+(E.length>0?" ":"")+k+B}case fe.TRUE:return""}},i=function(d,f){return d.checks.reduce(function(p,v,h){return p+(f===d&&h===0?"$":"")+a(v,f)},"")},o="",l=0;l<this.length;l++){var u=this[l];o+=i(u,u.subject),this.length>1&&l<this.length-1&&(o+=", ")}return this.toStringCache=o,o},p3={parse:f3,toString:h3},Fp=function(e,r,n){var a,i=be(e),o=le(e),l=be(n),u,c,d=!1,f=!1,p=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),d=!0),(i||l||d)&&(u=!i&&!o?"":""+e,c=""+n),d&&(e=u=u.toLowerCase(),n=c=c.toLowerCase()),r){case"*=":a=u.indexOf(c)>=0;break;case"$=":a=u.indexOf(c,u.length-c.length)>=0;break;case"^=":a=u.indexOf(c)===0;break;case"=":a=e===n;break;case">":p=!0,a=e>n;break;case">=":p=!0,a=e>=n;break;case"<":p=!0,a=e<n;break;case"<=":p=!0,a=e<=n;break;default:a=!1;break}return f&&(e!=null||!p)&&(a=!a),a},v3=function(e,r){switch(r){case"?":return!!e;case"!":return!e;case"^":return e===void 0}},g3=function(e){return e!==void 0},uc=function(e,r){return e.data(r)},m3=function(e,r){return e[r]()},Ze=[],je=function(e,r){return e.checks.every(function(n){return Ze[n.type](n,r)})};Ze[fe.GROUP]=function(t,e){var r=t.value;return r==="*"||r===e.group()},Ze[fe.STATE]=function(t,e){var r=t.value;return l3(r,e)},Ze[fe.ID]=function(t,e){var r=t.value;return e.id()===r},Ze[fe.CLASS]=function(t,e){var r=t.value;return e.hasClass(r)},Ze[fe.META_COMPARE]=function(t,e){var r=t.field,n=t.operator,a=t.value;return Fp(m3(e,r),n,a)},Ze[fe.DATA_COMPARE]=function(t,e){var r=t.field,n=t.operator,a=t.value;return Fp(uc(e,r),n,a)},Ze[fe.DATA_BOOL]=function(t,e){var r=t.field,n=t.operator;return v3(uc(e,r),n)},Ze[fe.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,g3(uc(e,r))},Ze[fe.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],n=t.nodes[1],a=e.source(),i=e.target();return je(r,a)&&je(n,i)||je(n,a)&&je(r,i)},Ze[fe.NODE_NEIGHBOR]=function(t,e){return je(t.node,e)&&e.neighborhood().some(function(r){return r.isNode()&&je(t.neighbor,r)})},Ze[fe.DIRECTED_EDGE]=function(t,e){return je(t.source,e.source())&&je(t.target,e.target())},Ze[fe.NODE_SOURCE]=function(t,e){return je(t.source,e)&&e.outgoers().some(function(r){return r.isNode()&&je(t.target,r)})},Ze[fe.NODE_TARGET]=function(t,e){return je(t.target,e)&&e.incomers().some(function(r){return r.isNode()&&je(t.source,r)})},Ze[fe.CHILD]=function(t,e){return je(t.child,e)&&je(t.parent,e.parent())},Ze[fe.PARENT]=function(t,e){return je(t.parent,e)&&e.children().some(function(r){return je(t.child,r)})},Ze[fe.DESCENDANT]=function(t,e){return je(t.descendant,e)&&e.ancestors().some(function(r){return je(t.ancestor,r)})},Ze[fe.ANCESTOR]=function(t,e){return je(t.ancestor,e)&&e.descendants().some(function(r){return je(t.descendant,r)})},Ze[fe.COMPOUND_SPLIT]=function(t,e){return je(t.subject,e)&&je(t.left,e)&&je(t.right,e)},Ze[fe.TRUE]=function(){return!0},Ze[fe.COLLECTION]=function(t,e){var r=t.value;return r.has(e)},Ze[fe.FILTER]=function(t,e){var r=t.value;return r(e)};var y3=function(e){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===fe.ID)return e.getElementById(r[0].checks[0].value).collection();var n=function(i){for(var o=0;o<r.length;o++){var l=r[o];if(je(l,i))return!0}return!1};return r.text()==null&&(n=function(){return!0}),e.filter(n)},b3=function(e){for(var r=this,n=0;n<r.length;n++){var a=r[n];if(je(a,e))return!0}return!1},w3={matches:b3,filter:y3},un=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,e==null||be(e)&&e.match(/^\s*$/)||(Ut(e)?this.addQuery({checks:[{type:fe.COLLECTION,value:e.collection()}]}):Ye(e)?this.addQuery({checks:[{type:fe.FILTER,value:e}]}):be(e)?this.parse(e)||(this.invalid=!0):Xe("A selector must be created from a string; found "))},dn=un.prototype;[p3,w3].forEach(function(t){return xe(dn,t)}),dn.text=function(){return this.inputText},dn.size=function(){return this.length},dn.eq=function(t){return this[t]},dn.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},dn.addQuery=function(t){this[this.length++]=t},dn.selector=dn.toString;var fn={allAre:function(e){var r=new un(e);return this.every(function(n){return r.matches(n)})},is:function(e){var r=new un(e);return this.some(function(n){return r.matches(n)})},some:function(e,r){for(var n=0;n<this.length;n++){var a=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(a)return!0}return!1},every:function(e,r){for(var n=0;n<this.length;n++){var a=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(!a)return!1}return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var r=this.length,n=e.length;return r!==n?!1:r===1?this[0]===e[0]:this.every(function(a){return e.hasElementWithId(a.id())})},anySame:function(e){return e=this.cy().collection(e),this.some(function(r){return e.hasElementWithId(r.id())})},allAreNeighbors:function(e){e=this.cy().collection(e);var r=this.neighborhood();return e.every(function(n){return r.hasElementWithId(n.id())})},contains:function(e){e=this.cy().collection(e);var r=this;return e.every(function(n){return r.hasElementWithId(n.id())})}};fn.allAreNeighbours=fn.allAreNeighbors,fn.has=fn.contains,fn.equal=fn.equals=fn.same;var Qt=function(e,r){return function(a,i,o,l){var u=a,c=this,d;if(u==null?d="":Ut(u)&&u.length===1&&(d=u.id()),c.length===1&&d){var f=c[0]._private,p=f.traversalCache=f.traversalCache||{},v=p[r]=p[r]||[],h=Mn(d),g=v[h];return g||(v[h]=e.call(c,a,i,o,l))}else return e.call(c,a,i,o,l)}},Na={parent:function(e){var r=[];if(this.length===1){var n=this[0]._private.parent;if(n)return n}for(var a=0;a<this.length;a++){var i=this[a],o=i._private.parent;o&&r.push(o)}return this.spawn(r,!0).filter(e)},parents:function(e){for(var r=[],n=this.parent();n.nonempty();){for(var a=0;a<n.length;a++){var i=n[a];r.push(i)}n=n.parent()}return this.spawn(r,!0).filter(e)},commonAncestors:function(e){for(var r,n=0;n<this.length;n++){var a=this[n],i=a.parents();r=r||i,r=r.intersect(i)}return r.filter(e)},orphans:function(e){return this.stdFilter(function(r){return r.isOrphan()}).filter(e)},nonorphans:function(e){return this.stdFilter(function(r){return r.isChild()}).filter(e)},children:Qt(function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r],a=n._private.children,i=0;i<a.length;i++)e.push(a[i]);return this.spawn(e,!0).filter(t)},"children"),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length!==0},isChildless:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length===0},isChild:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent!=null},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent==null},descendants:function(e){var r=[];function n(a){for(var i=0;i<a.length;i++){var o=a[i];r.push(o),o.children().nonempty()&&n(o.children())}}return n(this.children()),this.spawn(r,!0).filter(e)}};function dc(t,e,r,n){for(var a=[],i=new ga,o=t.cy(),l=o.hasCompoundNodes(),u=0;u<t.length;u++){var c=t[u];r?a.push(c):l&&n(a,i,c)}for(;a.length>0;){var d=a.shift();e(d),i.add(d.id()),l&&n(a,i,d)}return t}function Lp(t,e,r){if(r.isParent())for(var n=r._private.children,a=0;a<n.length;a++){var i=n[a];e.has(i.id())||t.push(i)}}Na.forEachDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return dc(this,t,e,Lp)};function Mp(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n)}}Na.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return dc(this,t,e,Mp)};function C3(t,e,r){Mp(t,e,r),Lp(t,e,r)}Na.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return dc(this,t,e,C3)},Na.ancestors=Na.parents;var Pi,Ip;Pi=Ip={data:Re.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Re.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Re.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Re.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Re.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Re.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},Pi.attr=Pi.data,Pi.removeAttr=Pi.removeData;var k3=Ip,Jo={};function fc(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var n=0,a=r[0],i=a._private.edges,o=0;o<i.length;o++){var l=i[o];!e&&l.isLoop()||(n+=t(a,l))}return n}else return}}xe(Jo,{degree:fc(function(t,e){return e.source().same(e.target())?2:1}),indegree:fc(function(t,e){return e.target().same(t)?1:0}),outdegree:fc(function(t,e){return e.source().same(t)?1:0})});function Da(t,e){return function(r){for(var n,a=this.nodes(),i=0;i<a.length;i++){var o=a[i],l=o[t](r);l!==void 0&&(n===void 0||e(l,n))&&(n=l)}return n}}xe(Jo,{minDegree:Da("degree",function(t,e){return t<e}),maxDegree:Da("degree",function(t,e){return t>e}),minIndegree:Da("indegree",function(t,e){return t<e}),maxIndegree:Da("indegree",function(t,e){return t>e}),minOutdegree:Da("outdegree",function(t,e){return t<e}),maxOutdegree:Da("outdegree",function(t,e){return t>e})}),xe(Jo,{totalDegree:function(e){for(var r=0,n=this.nodes(),a=0;a<n.length;a++)r+=n[a].degree(e);return r}});var cr,Ap,Rp=function(e,r,n){for(var a=0;a<e.length;a++){var i=e[a];if(!i.locked()){var o=i._private.position,l={x:r.x!=null?r.x-o.x:0,y:r.y!=null?r.y-o.y:0};i.isParent()&&!(l.x===0&&l.y===0)&&i.children().shift(l,n),i.dirtyBoundingBoxCache()}}},Vp={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,r){Rp(e,r,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};cr=Ap={position:Re.data(Vp),silentPosition:Re.data(xe({},Vp,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,r){Rp(e,r,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,r){if(_e(e))r?this.silentPosition(e):this.position(e);else if(Ye(e)){var n=e,a=this.cy();a.startBatch();for(var i=0;i<this.length;i++){var o=this[i],l=void 0;(l=n(o,i))&&(r?o.silentPosition(l):o.position(l))}a.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,r,n){var a;if(_e(e)?(a={x:le(e.x)?e.x:0,y:le(e.y)?e.y:0},n=r):be(e)&&le(r)&&(a={x:0,y:0},a[e]=r),a!=null){var i=this.cy();i.startBatch();for(var o=0;o<this.length;o++){var l=this[o];if(!(i.hasCompoundNodes()&&l.isChild()&&l.ancestors().anySame(this))){var u=l.position(),c={x:u.x+a.x,y:u.y+a.y};n?l.silentPosition(c):l.position(c)}}i.endBatch()}return this},silentShift:function(e,r){return _e(e)?this.shift(e,!0):be(e)&&le(r)&&this.shift(e,r,!0),this},renderedPosition:function(e,r){var n=this[0],a=this.cy(),i=a.zoom(),o=a.pan(),l=_e(e)?e:void 0,u=l!==void 0||r!==void 0&&be(e);if(n&&n.isNode())if(u)for(var c=0;c<this.length;c++){var d=this[c];r!==void 0?d.position(e,(r-o[e])/i):l!==void 0&&d.position(Kh(l,i,o))}else{var f=n.position();return l=Ao(f,i,o),e===void 0?l:l[e]}else if(!u)return;return this},relativePosition:function(e,r){var n=this[0],a=this.cy(),i=_e(e)?e:void 0,o=i!==void 0||r!==void 0&&be(e),l=a.hasCompoundNodes();if(n&&n.isNode())if(o)for(var u=0;u<this.length;u++){var c=this[u],d=l?c.parent():null,f=d&&d.length>0,p=f;f&&(d=d[0]);var v=p?d.position():{x:0,y:0};r!==void 0?c.position(e,r+v[e]):i!==void 0&&c.position({x:i.x+v.x,y:i.y+v.y})}else{var h=n.position(),g=l?n.parent():null,y=g&&g.length>0,m=y;y&&(g=g[0]);var b=m?g.position():{x:0,y:0};return i={x:h.x-b.x,y:h.y-b.y},e===void 0?i:i[e]}else if(!o)return;return this}},cr.modelPosition=cr.point=cr.position,cr.modelPositions=cr.points=cr.positions,cr.renderedPoint=cr.renderedPosition,cr.relativePoint=cr.relativePosition;var x3=Ap,Pa,hn;Pa=hn={},hn.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),a=r.pan(),i=e.x1*n+a.x,o=e.x2*n+a.x,l=e.y1*n+a.y,u=e.y2*n+a.y;return{x1:i,x2:o,y1:l,y2:u,w:o-i,h:u-l}},hn.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)},hn.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(o){if(!o.isParent())return;var l=o._private,u=o.children(),c=o.pstyle("compound-sizing-wrt-labels").value==="include",d={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},f=u.boundingBox({includeLabels:c,includeOverlays:!1,useCache:!1}),p=l.position;(f.w===0||f.h===0)&&(f={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},f.x1=p.x-f.w/2,f.x2=p.x+f.w/2,f.y1=p.y-f.h/2,f.y2=p.y+f.h/2);function v(S,N,D){var P=0,F=0,O=N+D;return S>0&&O>0&&(P=N/O*S,F=D/O*S),{biasDiff:P,biasComplementDiff:F}}function h(S,N,D,P){if(D.units==="%")switch(P){case"width":return S>0?D.pfValue*S:0;case"height":return N>0?D.pfValue*N:0;case"average":return S>0&&N>0?D.pfValue*(S+N)/2:0;case"min":return S>0&&N>0?S>N?D.pfValue*N:D.pfValue*S:0;case"max":return S>0&&N>0?S>N?D.pfValue*S:D.pfValue*N:0;default:return 0}else return D.units==="px"?D.pfValue:0}var g=d.width.left.value;d.width.left.units==="px"&&d.width.val>0&&(g=g*100/d.width.val);var y=d.width.right.value;d.width.right.units==="px"&&d.width.val>0&&(y=y*100/d.width.val);var m=d.height.top.value;d.height.top.units==="px"&&d.height.val>0&&(m=m*100/d.height.val);var b=d.height.bottom.value;d.height.bottom.units==="px"&&d.height.val>0&&(b=b*100/d.height.val);var w=v(d.width.val-f.w,g,y),C=w.biasDiff,x=w.biasComplementDiff,E=v(d.height.val-f.h,m,b),k=E.biasDiff,B=E.biasComplementDiff;l.autoPadding=h(f.w,f.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),l.autoWidth=Math.max(f.w,d.width.val),p.x=(-C+f.x1+f.x2+x)/2,l.autoHeight=Math.max(f.h,d.height.val),p.y=(-k+f.y1+f.y2+B)/2}for(var n=0;n<this.length;n++){var a=this[n],i=a._private;(!i.compoundBoundsClean||t)&&(r(a),e.batching()||(i.compoundBoundsClean=!0))}return this};var Jt=function(e){return e===1/0||e===-1/0?0:e},ur=function(e,r,n,a,i){a-r===0||i-n===0||r==null||n==null||a==null||i==null||(e.x1=r<e.x1?r:e.x1,e.x2=a>e.x2?a:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},zn=function(e,r){return r==null?e:ur(e,r.x1,r.y1,r.x2,r.y2)},Oi=function(e,r,n){return lr(e,r,n)},es=function(e,r,n){if(!r.cy().headless()){var a=r._private,i=a.rstyle,o=i.arrowWidth/2,l=r.pstyle(n+"-arrow-shape").value,u,c;if(l!=="none"){n==="source"?(u=i.srcX,c=i.srcY):n==="target"?(u=i.tgtX,c=i.tgtY):(u=i.midX,c=i.midY);var d=a.arrowBounds=a.arrowBounds||{},f=d[n]=d[n]||{};f.x1=u-o,f.y1=c-o,f.x2=u+o,f.y2=c+o,f.w=f.x2-f.x1,f.h=f.y2-f.y1,Vo(f,1),ur(e,f.x1,f.y1,f.x2,f.y2)}}},hc=function(e,r,n){if(!r.cy().headless()){var a;n?a=n+"-":a="";var i=r._private,o=i.rstyle,l=r.pstyle(a+"label").strValue;if(l){var u=r.pstyle("text-halign"),c=r.pstyle("text-valign"),d=Oi(o,"labelWidth",n),f=Oi(o,"labelHeight",n),p=Oi(o,"labelX",n),v=Oi(o,"labelY",n),h=r.pstyle(a+"text-margin-x").pfValue,g=r.pstyle(a+"text-margin-y").pfValue,y=r.isEdge(),m=r.pstyle(a+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,w=r.pstyle("text-border-width").pfValue,C=w/2,x=r.pstyle("text-background-padding").pfValue,E=2,k=f,B=d,S=B/2,N=k/2,D,P,F,O;if(y)D=p-S,P=p+S,F=v-N,O=v+N;else{switch(u.value){case"left":D=p-B,P=p;break;case"center":D=p-S,P=p+S;break;case"right":D=p,P=p+B;break}switch(c.value){case"top":F=v-k,O=v;break;case"center":F=v-N,O=v+N;break;case"bottom":F=v,O=v+k;break}}D+=h-Math.max(b,C)-x-E,P+=h+Math.max(b,C)+x+E,F+=g-Math.max(b,C)-x-E,O+=g+Math.max(b,C)+x+E;var I=n||"main",_=i.labelBounds,M=_[I]=_[I]||{};M.x1=D,M.y1=F,M.x2=P,M.y2=O,M.w=P-D,M.h=O-F;var L=y&&m.strValue==="autorotate",R=m.pfValue!=null&&m.pfValue!==0;if(L||R){var H=L?Oi(i.rstyle,"labelAngle",n):m.pfValue,$=Math.cos(H),z=Math.sin(H),j=(D+P)/2,ee=(F+O)/2;if(!y){switch(u.value){case"left":j=P;break;case"right":j=D;break}switch(c.value){case"top":ee=O;break;case"bottom":ee=F;break}}var J=function(he,ne){return he=he-j,ne=ne-ee,{x:he*$-ne*z+j,y:he*z+ne*$+ee}},Z=J(D,F),re=J(D,O),Y=J(P,F),A=J(P,O);D=Math.min(Z.x,re.x,Y.x,A.x),P=Math.max(Z.x,re.x,Y.x,A.x),F=Math.min(Z.y,re.y,Y.y,A.y),O=Math.max(Z.y,re.y,Y.y,A.y)}var K=I+"Rot",W=_[K]=_[K]||{};W.x1=D,W.y1=F,W.x2=P,W.y2=O,W.w=P-D,W.h=O-F,ur(e,D,F,P,O),ur(i.labelBounds.all,D,F,P,O)}return e}},E3=function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,a=r.pstyle("outline-width").value;if(n>0&&a>0){var i=r.pstyle("outline-offset").value,o=r.pstyle("shape").value,l=a+i,u=(e.w+l*2)/e.w,c=(e.h+l*2)/e.h,d=0,f=0;["diamond","pentagon","round-triangle"].includes(o)?(u=(e.w+l*2.4)/e.w,f=-l/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(o)?u=(e.w+l*2.4)/e.w:o==="star"?(u=(e.w+l*2.8)/e.w,c=(e.h+l*2.6)/e.h,f=-l/3.8):o==="triangle"?(u=(e.w+l*2.8)/e.w,c=(e.h+l*2.4)/e.h,f=-l/1.4):o==="vee"&&(u=(e.w+l*4.4)/e.w,c=(e.h+l*3.8)/e.h,f=-l*.5);var p=e.h*c-e.h,v=e.w*u-e.w;if($o(e,[Math.ceil(p/2),Math.ceil(v/2)]),d!=0||f!==0){var h=UB(e,d,f);Uh(e,h)}}}},S3=function(e,r){var n=e._private.cy,a=n.styleEnabled(),i=n.headless(),o=zt(),l=e._private,u=e.isNode(),c=e.isEdge(),d,f,p,v,h,g,y=l.rstyle,m=u&&a?e.pstyle("bounds-expansion").pfValue:[0],b=function(ue){return ue.pstyle("display").value!=="none"},w=!a||b(e)&&(!c||b(e.source())&&b(e.target()));if(w){var C=0,x=0;a&&r.includeOverlays&&(C=e.pstyle("overlay-opacity").value,C!==0&&(x=e.pstyle("overlay-padding").value));var E=0,k=0;a&&r.includeUnderlays&&(E=e.pstyle("underlay-opacity").value,E!==0&&(k=e.pstyle("underlay-padding").value));var B=Math.max(x,k),S=0,N=0;if(a&&(S=e.pstyle("width").pfValue,N=S/2),u&&r.includeNodes){var D=e.position();h=D.x,g=D.y;var P=e.outerWidth(),F=P/2,O=e.outerHeight(),I=O/2;d=h-F,f=h+F,p=g-I,v=g+I,ur(o,d,p,f,v),a&&r.includeOutlines&&E3(o,e)}else if(c&&r.includeEdges)if(a&&!i){var _=e.pstyle("curve-style").strValue;if(d=Math.min(y.srcX,y.midX,y.tgtX),f=Math.max(y.srcX,y.midX,y.tgtX),p=Math.min(y.srcY,y.midY,y.tgtY),v=Math.max(y.srcY,y.midY,y.tgtY),d-=N,f+=N,p-=N,v+=N,ur(o,d,p,f,v),_==="haystack"){var M=y.haystackPts;if(M&&M.length===2){if(d=M[0].x,p=M[0].y,f=M[1].x,v=M[1].y,d>f){var L=d;d=f,f=L}if(p>v){var R=p;p=v,v=R}ur(o,d-N,p-N,f+N,v+N)}}else if(_==="bezier"||_==="unbundled-bezier"||_.endsWith("segments")||_.endsWith("taxi")){var H;switch(_){case"bezier":case"unbundled-bezier":H=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":H=y.linePts;break}if(H!=null)for(var $=0;$<H.length;$++){var z=H[$];d=z.x-N,f=z.x+N,p=z.y-N,v=z.y+N,ur(o,d,p,f,v)}}}else{var j=e.source(),ee=j.position(),J=e.target(),Z=J.position();if(d=ee.x,f=Z.x,p=ee.y,v=Z.y,d>f){var re=d;d=f,f=re}if(p>v){var Y=p;p=v,v=Y}d-=N,f+=N,p-=N,v+=N,ur(o,d,p,f,v)}if(a&&r.includeEdges&&c&&(es(o,e,"mid-source"),es(o,e,"mid-target"),es(o,e,"source"),es(o,e,"target")),a){var A=e.pstyle("ghost").value==="yes";if(A){var K=e.pstyle("ghost-offset-x").pfValue,W=e.pstyle("ghost-offset-y").pfValue;ur(o,o.x1+K,o.y1+W,o.x2+K,o.y2+W)}}var oe=l.bodyBounds=l.bodyBounds||{};Gh(oe,o),$o(oe,m),Vo(oe,1),a&&(d=o.x1,f=o.x2,p=o.y1,v=o.y2,ur(o,d-B,p-B,f+B,v+B));var he=l.overlayBounds=l.overlayBounds||{};Gh(he,o),$o(he,m),Vo(he,1);var ne=l.labelBounds=l.labelBounds||{};ne.all!=null?qB(ne.all):ne.all=zt(),a&&r.includeLabels&&(r.includeMainLabels&&hc(o,e,null),c&&(r.includeSourceLabels&&hc(o,e,"source"),r.includeTargetLabels&&hc(o,e,"target")))}return o.x1=Jt(o.x1),o.y1=Jt(o.y1),o.x2=Jt(o.x2),o.y2=Jt(o.y2),o.w=Jt(o.x2-o.x1),o.h=Jt(o.y2-o.y1),o.w>0&&o.h>0&&w&&($o(o,m),Vo(o,1)),o},$p=function(e){var r=0,n=function(o){return(o?1:0)<<r++},a=0;return a+=n(e.incudeNodes),a+=n(e.includeEdges),a+=n(e.includeLabels),a+=n(e.includeMainLabels),a+=n(e.includeSourceLabels),a+=n(e.includeTargetLabels),a+=n(e.includeOverlays),a+=n(e.includeOutlines),a},zp=function(e){if(e.isEdge()){var r=e.source().position(),n=e.target().position(),a=function(o){return Math.round(o)};return dB([a(r.x),a(r.y),a(n.x),a(n.y)])}else return 0},Hp=function(e,r){var n=e._private,a,i=e.isEdge(),o=r==null?Kp:$p(r),l=o===Kp,u=zp(e),c=n.bbCachePosKey===u,d=r.useCache&&c,f=function(g){return g._private.bbCache==null||g._private.styleDirty},p=!d||f(e)||i&&f(e.source())||f(e.target());if(p?(c||e.recalculateRenderedStyle(d),a=S3(e,_i),n.bbCache=a,n.bbCachePosKey=u):a=n.bbCache,!l){var v=e.isNode();a=zt(),(r.includeNodes&&v||r.includeEdges&&!v)&&(r.includeOverlays?zn(a,n.overlayBounds):zn(a,n.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!i||r.includeSourceLabels&&r.includeTargetLabels)?zn(a,n.labelBounds.all):(r.includeMainLabels&&zn(a,n.labelBounds.mainRot),r.includeSourceLabels&&zn(a,n.labelBounds.sourceRot),r.includeTargetLabels&&zn(a,n.labelBounds.targetRot))),a.w=a.x2-a.x1,a.h=a.y2-a.y1}return a},_i={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},Kp=$p(_i),qp=wt(_i);hn.boundingBox=function(t){var e;if(this.length===1&&this[0]._private.bbCache!=null&&!this[0]._private.styleDirty&&(t===void 0||t.useCache===void 0||t.useCache===!0))t===void 0?t=_i:t=qp(t),e=Hp(this[0],t);else{e=zt(),t=t||_i;var r=qp(t),n=this,a=n.cy(),i=a.styleEnabled();if(i)for(var o=0;o<n.length;o++){var l=n[o],u=l._private,c=zp(l),d=u.bbCachePosKey===c,f=r.useCache&&d&&!u.styleDirty;l.recalculateRenderedStyle(f)}this.updateCompoundBounds(!t.useCache);for(var p=0;p<n.length;p++){var v=n[p];zn(e,Hp(v,r))}}return e.x1=Jt(e.x1),e.y1=Jt(e.y1),e.x2=Jt(e.x2),e.y2=Jt(e.y2),e.w=Jt(e.x2-e.x1),e.h=Jt(e.y2-e.y1),e},hn.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},hn.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),n=r.hasCompoundNodes(),a=r.collection();if(n&&(a=e.filter(function(c){return c.isParent()}),e=e.not(a)),_e(t)){var i=t;t=function(){return i}}var o=function(d,f){return d._private.bbAtOldPos=t(d,f)},l=function(d){return d._private.bbAtOldPos};r.startBatch(),e.forEach(o).silentPositions(t),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0));var u=KB(this.boundingBox({useCache:!1}));return e.silentPositions(l),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),r.endBatch(),u},Pa.boundingbox=Pa.bb=Pa.boundingBox,Pa.renderedBoundingbox=Pa.renderedBoundingBox;var T3=hn,Fi,Li;Fi=Li={};var Up=function(e){e.uppercaseName=xh(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=xh(e.outerName),Fi[e.name]=function(){var n=this[0],a=n._private,i=a.cy,o=i._private.styleEnabled;if(n)if(o){if(n.isParent())return n.updateCompoundBounds(),a[e.autoName]||0;var l=n.pstyle(e.name);switch(l.strValue){case"label":return n.recalculateRenderedStyle(),a.rstyle[e.labelName]||0;default:return l.pfValue}}else return 1},Fi["outer"+e.uppercaseName]=function(){var n=this[0],a=n._private,i=a.cy,o=i._private.styleEnabled;if(n)if(o){var l=n[e.name](),u=n.pstyle("border-width").pfValue,c=2*n.padding();return l+u+c}else return 1},Fi["rendered"+e.uppercaseName]=function(){var n=this[0];if(n){var a=n[e.name]();return a*this.cy().zoom()}},Fi["rendered"+e.uppercaseOuterName]=function(){var n=this[0];if(n){var a=n[e.outerName]();return a*this.cy().zoom()}}};Up({name:"width"}),Up({name:"height"}),Li.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),e.autoPadding!==void 0?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue},Li.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},Li.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var B3=Li,N3=function(e,r){if(e.isEdge())return r(e)},D3=function(e,r){if(e.isEdge()){var n=e.cy();return Ao(r(e),n.zoom(),n.pan())}},P3=function(e,r){if(e.isEdge()){var n=e.cy(),a=n.pan(),i=n.zoom();return r(e).map(function(o){return Ao(o,i,a)})}},O3=function(e){return e.renderer().getControlPoints(e)},_3=function(e){return e.renderer().getSegmentPoints(e)},F3=function(e){return e.renderer().getSourceEndpoint(e)},L3=function(e){return e.renderer().getTargetEndpoint(e)},M3=function(e){return e.renderer().getEdgeMidpoint(e)},Gp={controlPoints:{get:O3,mult:!0},segmentPoints:{get:_3,mult:!0},sourceEndpoint:{get:F3},targetEndpoint:{get:L3},midpoint:{get:M3}},I3=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},A3=Object.keys(Gp).reduce(function(t,e){var r=Gp[e],n=I3(e);return t[e]=function(){return N3(this,r.get)},r.mult?t[n]=function(){return P3(this,r.get)}:t[n]=function(){return D3(this,r.get)},t},{}),R3=xe({},x3,T3,B3,A3);/*!
438
+ */var pp=0,vp=1,gp=2,$r=function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=pp,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};$r.prototype={fulfill:function(e){return mp(this,vp,"fulfillValue",e)},reject:function(e){return mp(this,gp,"rejectReason",e)},then:function(e,r){var n=this,a=new $r;return n.onFulfilled.push(wp(e,a,"fulfill")),n.onRejected.push(wp(r,a,"reject")),yp(n),a.proxy}};var mp=function(e,r,n,a){return e.state===pp&&(e.state=r,e[n]=a,yp(e)),e},yp=function(e){e.state===vp?bp(e,"onFulfilled",e.fulfillValue):e.state===gp&&bp(e,"onRejected",e.rejectReason)},bp=function(e,r,n){if(e[r].length!==0){var a=e[r];e[r]=[];var i=function(){for(var l=0;l<a.length;l++)a[l](n)};typeof setImmediate=="function"?setImmediate(i):setTimeout(i,0)}},wp=function(e,r,n){return function(a){if(typeof e!="function")r[n].call(r,a);else{var i;try{i=e(a)}catch(o){r.reject(o);return}Y5(r,i)}}},Y5=function t(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return}var n;if(ot(r)==="object"&&r!==null||typeof r=="function")try{n=r.then}catch(i){e.reject(i);return}if(typeof n=="function"){var a=!1;try{n.call(r,function(i){a||(a=!0,i===r?e.reject(new TypeError("circular thenable chain")):t(e,i))},function(i){a||(a=!0,e.reject(i))})}catch(i){a||e.reject(i)}return}e.fulfill(r)};$r.all=function(t){return new $r(function(e,r){for(var n=new Array(t.length),a=0,i=function(u,c){n[u]=c,a++,a===t.length&&e(n)},o=0;o<t.length;o++)(function(l){var u=t[l],c=u!=null&&u.then!=null;if(c)u.then(function(f){i(l,f)},function(f){r(f)});else{var d=u;i(l,d)}})(o)})},$r.resolve=function(t){return new $r(function(e,r){e(t)})},$r.reject=function(t){return new $r(function(e,r){r(t)})};var xa=typeof Promise<"u"?Promise:$r,ac=function(e,r,n){var a=zl(e),i=!a,o=this._private=xe({duration:1e3},r,n);if(o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&Ye(o.complete)&&o.completes.push(o.complete),i){var l=e.position();o.startPosition=o.startPosition||{x:l.x,y:l.y},o.startStyle=o.startStyle||e.cy().style().getAnimationStartStyle(e,o.style)}if(a){var u=e.pan();o.startPan={x:u.x,y:u.y},o.startZoom=e.zoom()}this.length=1,this[0]=this},$n=ac.prototype;xe($n,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var r,n=e.target._private.animation;e.queue?r=n.queue:r=n.current,r.push(this),Ut(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration)},progress:function(e){var r=this._private,n=r.playing;return e===void 0?r.progress:(n&&this.pause(),r.progress=e,r.started=!1,n&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(c,d){var f=e[c];f!=null&&(e[c]=e[d],e[d]=f)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var a=0;a<e.style.length;a++){var i=e.style[a],o=i.name,l=e.startStyle[o];e.startStyle[o]=i,e.style[a]=l}return r&&this.play(),this},promise:function(e){var r=this._private,n;switch(e){case"frame":n=r.frames;break;default:case"complete":case"completed":n=r.completes}return new xa(function(a,i){n.push(function(){a()})})}}),$n.complete=$n.completed,$n.run=$n.play,$n.running=$n.playing;var X5={animated:function(){return function(){var r=this,n=r.length!==void 0,a=n?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return!1;var o=a[0];if(o)return o._private.animation.current.length>0}},clearQueue:function(){return function(){var r=this,n=r.length!==void 0,a=n?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o<a.length;o++){var l=a[o];l._private.animation.queue=[]}return this}},delay:function(){return function(r,n){var a=this._private.cy||this;return a.styleEnabled()?this.animate({delay:r,duration:r,complete:n}):this}},delayAnimation:function(){return function(r,n){var a=this._private.cy||this;return a.styleEnabled()?this.animation({delay:r,duration:r,complete:n}):this}},animation:function(){return function(r,n){var a=this,i=a.length!==void 0,o=i?a:[a],l=this._private.cy||this,u=!i,c=!u;if(!l.styleEnabled())return this;var d=l.style();r=xe({},r,n);var f=Object.keys(r).length===0;if(f)return new ac(o[0],r);switch(r.duration===void 0&&(r.duration=400),r.duration){case"slow":r.duration=600;break;case"fast":r.duration=200;break}if(c&&(r.style=d.getPropsList(r.style||r.css),r.css=void 0),c&&r.renderedPosition!=null){var p=r.renderedPosition,v=l.pan(),h=l.zoom();r.position=Kh(p,h,v)}if(u&&r.panBy!=null){var g=r.panBy,y=l.pan();r.pan={x:y.x+g.x,y:y.y+g.y}}var m=r.center||r.centre;if(u&&m!=null){var b=l.getCenterPan(m.eles,r.zoom);b!=null&&(r.pan=b)}if(u&&r.fit!=null){var w=r.fit,C=l.getFitViewport(w.eles||w.boundingBox,w.padding);C!=null&&(r.pan=C.pan,r.zoom=C.zoom)}if(u&&_e(r.zoom)){var x=l.getZoomedViewport(r.zoom);x!=null?(x.zoomed&&(r.zoom=x.zoom),x.panned&&(r.pan=x.pan)):r.zoom=null}return new ac(o[0],r)}},animate:function(){return function(r,n){var a=this,i=a.length!==void 0,o=i?a:[a],l=this._private.cy||this;if(!l.styleEnabled())return this;n&&(r=xe({},r,n));for(var u=0;u<o.length;u++){var c=o[u],d=c.animated()&&(r.queue===void 0||r.queue),f=c.animation(r,d?{queue:!0}:void 0);f.play()}return this}},stop:function(){return function(r,n){var a=this,i=a.length!==void 0,o=i?a:[a],l=this._private.cy||this;if(!l.styleEnabled())return this;for(var u=0;u<o.length;u++){for(var c=o[u],d=c._private,f=d.animation.current,p=0;p<f.length;p++){var v=f[p],h=v._private;n&&(h.duration=0)}r&&(d.animation.queue=[]),n||(d.animation.current=[])}return l.notify("draw"),this}}},Z5=Array.isArray,Yo=Z5,Q5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J5=/^\w*$/;function eN(t,e){if(Yo(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||bi(t)?!0:J5.test(t)||!Q5.test(t)||e!=null&&t in Object(e)}var tN=eN,rN="[object AsyncFunction]",nN="[object Function]",aN="[object GeneratorFunction]",iN="[object Proxy]";function oN(t){if(!Fn(t))return!1;var e=Dh(t);return e==nN||e==aN||e==rN||e==iN}var sN=oN,lN=Oo["__core-js_shared__"],ic=lN,Cp=function(){var t=/[^.]+$/.exec(ic&&ic.keys&&ic.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function cN(t){return!!Cp&&Cp in t}var uN=cN,dN=Function.prototype,fN=dN.toString;function hN(t){if(t!=null){try{return fN.call(t)}catch{}try{return t+""}catch{}}return""}var pN=hN,vN=/[\\^$.*+?()[\]{}|]/g,gN=/^\[object .+?Constructor\]$/,mN=Function.prototype,yN=Object.prototype,bN=mN.toString,wN=yN.hasOwnProperty,CN=RegExp("^"+bN.call(wN).replace(vN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kN(t){if(!Fn(t)||uN(t))return!1;var e=sN(t)?CN:gN;return e.test(pN(t))}var xN=kN;function EN(t,e){return t==null?void 0:t[e]}var SN=EN;function TN(t,e){var r=SN(t,e);return xN(r)?r:void 0}var oc=TN,BN=oc(Object,"create"),Di=BN;function NN(){this.__data__=Di?Di(null):{},this.size=0}var DN=NN;function PN(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ON=PN,_N="__lodash_hash_undefined__",LN=Object.prototype,FN=LN.hasOwnProperty;function MN(t){var e=this.__data__;if(Di){var r=e[t];return r===_N?void 0:r}return FN.call(e,t)?e[t]:void 0}var IN=MN,AN=Object.prototype,VN=AN.hasOwnProperty;function RN(t){var e=this.__data__;return Di?e[t]!==void 0:VN.call(e,t)}var $N=RN,zN="__lodash_hash_undefined__";function HN(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Di&&e===void 0?zN:e,this}var KN=HN;function Ea(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ea.prototype.clear=DN,Ea.prototype.delete=ON,Ea.prototype.get=IN,Ea.prototype.has=$N,Ea.prototype.set=KN;var kp=Ea;function qN(){this.__data__=[],this.size=0}var UN=qN;function GN(t,e){return t===e||t!==t&&e!==e}var xp=GN;function WN(t,e){for(var r=t.length;r--;)if(xp(t[r][0],e))return r;return-1}var Xo=WN,jN=Array.prototype,YN=jN.splice;function XN(t){var e=this.__data__,r=Xo(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():YN.call(e,r,1),--this.size,!0}var ZN=XN;function QN(t){var e=this.__data__,r=Xo(e,t);return r<0?void 0:e[r][1]}var JN=QN;function e4(t){return Xo(this.__data__,t)>-1}var t4=e4;function r4(t,e){var r=this.__data__,n=Xo(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var n4=r4;function Sa(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Sa.prototype.clear=UN,Sa.prototype.delete=ZN,Sa.prototype.get=JN,Sa.prototype.has=t4,Sa.prototype.set=n4;var a4=Sa,i4=oc(Oo,"Map"),o4=i4;function s4(){this.size=0,this.__data__={hash:new kp,map:new(o4||a4),string:new kp}}var l4=s4;function c4(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var u4=c4;function d4(t,e){var r=t.__data__;return u4(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Zo=d4;function f4(t){var e=Zo(this,t).delete(t);return this.size-=e?1:0,e}var h4=f4;function p4(t){return Zo(this,t).get(t)}var v4=p4;function g4(t){return Zo(this,t).has(t)}var m4=g4;function y4(t,e){var r=Zo(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var b4=y4;function Ta(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ta.prototype.clear=l4,Ta.prototype.delete=h4,Ta.prototype.get=v4,Ta.prototype.has=m4,Ta.prototype.set=b4;var Ep=Ta,w4="Expected a function";function sc(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(w4);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(sc.Cache||Ep),r}sc.Cache=Ep;var C4=sc,k4=500;function x4(t){var e=C4(t,function(n){return r.size===k4&&r.clear(),n}),r=e.cache;return e}var E4=x4,S4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,T4=/\\(\\)?/g,B4=E4(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(S4,function(r,n,a,i){e.push(a?i.replace(T4,"$1"):n||r)}),e}),Sp=B4;function N4(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var Tp=N4,D4=1/0,Bp=pa?pa.prototype:void 0,Np=Bp?Bp.toString:void 0;function Dp(t){if(typeof t=="string")return t;if(Yo(t))return Tp(t,Dp)+"";if(bi(t))return Np?Np.call(t):"";var e=t+"";return e=="0"&&1/t==-D4?"-0":e}var P4=Dp;function O4(t){return t==null?"":P4(t)}var Pp=O4;function _4(t,e){return Yo(t)?t:tN(t,e)?[t]:Sp(Pp(t))}var Op=_4,L4=1/0;function F4(t){if(typeof t=="string"||bi(t))return t;var e=t+"";return e=="0"&&1/t==-L4?"-0":e}var lc=F4;function M4(t,e){e=Op(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[lc(e[r++])];return r&&r==n?t:void 0}var I4=M4;function A4(t,e,r){var n=t==null?void 0:I4(t,e);return n===void 0?r:n}var V4=A4,R4=function(){try{var t=oc(Object,"defineProperty");return t({},"",{}),t}catch{}}(),_p=R4;function $4(t,e,r){e=="__proto__"&&_p?_p(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var z4=$4,H4=Object.prototype,K4=H4.hasOwnProperty;function q4(t,e,r){var n=t[e];(!(K4.call(t,e)&&xp(n,r))||r===void 0&&!(e in t))&&z4(t,e,r)}var U4=q4,G4=9007199254740991,W4=/^(?:0|[1-9]\d*)$/;function j4(t,e){var r=typeof t;return e=e??G4,!!e&&(r=="number"||r!="symbol"&&W4.test(t))&&t>-1&&t%1==0&&t<e}var Y4=j4;function X4(t,e,r,n){if(!Fn(t))return t;e=Op(e,t);for(var a=-1,i=e.length,o=i-1,l=t;l!=null&&++a<i;){var u=lc(e[a]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(a!=o){var d=l[u];c=n?n(d,u,l):void 0,c===void 0&&(c=Fn(d)?d:Y4(e[a+1])?[]:{})}U4(l,u,c),l=l[u]}return t}var Z4=X4;function Q4(t,e,r){return t==null?t:Z4(t,e,r)}var J4=Q4;function eD(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var tD=eD;function rD(t){return Yo(t)?Tp(t,lc):bi(t)?[t]:tD(Sp(Pp(t)))}var nD=rD,aD={data:function(e){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(a){},beforeSet:function(a,i){},onSet:function(a){},canSet:function(a){return!0}};return e=xe({},r,e),function(a,i){var o=e,l=this,u=l.length!==void 0,c=u?l:[l],d=u?l[0]:l;if(be(a)){var f=a.indexOf(".")!==-1,p=f&&nD(a);if(o.allowGetting&&i===void 0){var v;return d&&(o.beforeGet(d),p&&d._private[o.field][a]===void 0?v=V4(d._private[o.field],p):v=d._private[o.field][a]),v}else if(o.allowSetting&&i!==void 0){var h=!o.immutableKeys[a];if(h){var g=ph({},a,i);o.beforeSet(l,g);for(var y=0,m=c.length;y<m;y++){var b=c[y];o.canSet(b)&&(p&&d._private[o.field][a]===void 0?J4(b._private[o.field],p,i):b._private[o.field][a]=i)}o.updateStyle&&l.updateStyle(),o.onSet(l),o.settingTriggersEvent&&l[o.triggerFnName](o.settingEvent)}}}else if(o.allowSetting&&_e(a)){var w=a,C,x,E=Object.keys(w);o.beforeSet(l,w);for(var k=0;k<E.length;k++){C=E[k],x=w[C];var B=!o.immutableKeys[C];if(B)for(var S=0;S<c.length;S++){var N=c[S];o.canSet(N)&&(N._private[o.field][C]=x)}}o.updateStyle&&l.updateStyle(),o.onSet(l),o.settingTriggersEvent&&l[o.triggerFnName](o.settingEvent)}else if(o.allowBinding&&Ye(a)){var D=a;l.on(o.bindingEvent,D)}else if(o.allowGetting&&a===void 0){var P;return d&&(o.beforeGet(d),P=d._private[o.field]),P}return l}},removeData:function(e){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=xe({},r,e),function(a){var i=e,o=this,l=o.length!==void 0,u=l?o:[o];if(be(a)){for(var c=a.split(/\s+/),d=c.length,f=0;f<d;f++){var p=c[f];if(!nn(p)){var v=!i.immutableKeys[p];if(v)for(var h=0,g=u.length;h<g;h++)u[h]._private[i.field][p]=void 0}}i.triggerEvent&&o[i.triggerFnName](i.event)}else if(a===void 0){for(var y=0,m=u.length;y<m;y++)for(var b=u[y]._private[i.field],w=Object.keys(b),C=0;C<w.length;C++){var x=w[C],E=!i.immutableKeys[x];E&&(b[x]=void 0)}i.triggerEvent&&o[i.triggerFnName](i.event)}return o}}},iD={eventAliasesOn:function(e){var r=e;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(n,a){var i=this,o=Array.prototype.slice.call(arguments,0);return new xa(function(l,u){var c=function(v){i.off.apply(i,f),l(v)},d=o.concat([c]),f=d.concat([]);i.on.apply(i,d)})}}},Ve={};[X5,aD,iD].forEach(function(t){xe(Ve,t)});var oD={animate:Ve.animate(),animation:Ve.animation(),animated:Ve.animated(),clearQueue:Ve.clearQueue(),delay:Ve.delay(),delayAnimation:Ve.delayAnimation(),stop:Ve.stop()},Qo={classes:function(e){var r=this;if(e===void 0){var n=[];return r[0]._private.classes.forEach(function(h){return n.push(h)}),n}else He(e)||(e=(e||"").match(/\S+/g)||[]);for(var a=[],i=new ga(e),o=0;o<r.length;o++){for(var l=r[o],u=l._private,c=u.classes,d=!1,f=0;f<e.length;f++){var p=e[f],v=c.has(p);if(!v){d=!0;break}}d||(d=c.size!==e.length),d&&(u.classes=i,a.push(l))}return a.length>0&&this.spawn(a).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){He(e)||(e=e.match(/\S+/g)||[]);for(var n=this,a=r===void 0,i=[],o=0,l=n.length;o<l;o++)for(var u=n[o],c=u._private.classes,d=!1,f=0;f<e.length;f++){var p=e[f],v=c.has(p),h=!1;r||a&&!v?(c.add(p),h=!0):(!r||a&&v)&&(c.delete(p),h=!0),!d&&h&&(i.push(u),d=!0)}return i.length>0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n}};Qo.className=Qo.classNames=Qo.classes;var Le={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:lt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Le.variable="(?:[\\w-.]|(?:\\\\"+Le.metaChar+"))+",Le.className="(?:[\\w-]|(?:\\\\"+Le.metaChar+"))+",Le.value=Le.string+"|"+Le.number,Le.id=Le.variable,function(){var t,e,r;for(t=Le.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],Le.comparatorOp+="|@"+e;for(t=Le.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],!(e.indexOf("!")>=0)&&e!=="="&&(Le.comparatorOp+="|\\!"+e)}();var $e=function(){return{checks:[]}},fe={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},cc=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return yT(t.selector,e.selector)}),sD=function(){for(var t={},e,r=0;r<cc.length;r++)e=cc[r],t[e.selector]=e.matches;return t}(),lD=function(e,r){return sD[e](r)},cD="("+cc.map(function(t){return t.selector}).join("|")+")",Ba=function(e){return e.replace(new RegExp("\\\\("+Le.metaChar+")","g"),function(r,n){return n})},cn=function(e,r,n){e[e.length-1]=n},uc=[{name:"group",query:!0,regex:"("+Le.group+")",populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.GROUP,value:i==="*"?i:i+"s"})}},{name:"state",query:!0,regex:cD,populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.STATE,value:i})}},{name:"id",query:!0,regex:"\\#("+Le.id+")",populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.ID,value:Ba(i)})}},{name:"className",query:!0,regex:"\\.("+Le.className+")",populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.CLASS,value:Ba(i)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+Le.variable+")\\s*\\]",populate:function(e,r,n){var a=sr(n,1),i=a[0];r.checks.push({type:fe.DATA_EXIST,field:Ba(i)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Le.variable+")\\s*("+Le.comparatorOp+")\\s*("+Le.value+")\\s*\\]",populate:function(e,r,n){var a=sr(n,3),i=a[0],o=a[1],l=a[2],u=new RegExp("^"+Le.string+"$").exec(l)!=null;u?l=l.substring(1,l.length-1):l=parseFloat(l),r.checks.push({type:fe.DATA_COMPARE,field:Ba(i),operator:o,value:l})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+Le.boolOp+")\\s*("+Le.variable+")\\s*\\]",populate:function(e,r,n){var a=sr(n,2),i=a[0],o=a[1];r.checks.push({type:fe.DATA_BOOL,field:Ba(o),operator:i})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Le.meta+")\\s*("+Le.comparatorOp+")\\s*("+Le.number+")\\s*\\]\\]",populate:function(e,r,n){var a=sr(n,3),i=a[0],o=a[1],l=a[2];r.checks.push({type:fe.META_COMPARE,field:Ba(i),operator:o,value:parseFloat(l)})}},{name:"nextQuery",separator:!0,regex:Le.separator,populate:function(e,r){var n=e.currentSubject,a=e.edgeCount,i=e.compoundCount,o=e[e.length-1];n!=null&&(o.subject=n,e.currentSubject=null),o.edgeCount=a,o.compoundCount=i,e.edgeCount=0,e.compoundCount=0;var l=e[e.length++]=$e();return l}},{name:"directedEdge",separator:!0,regex:Le.directedEdge,populate:function(e,r){if(e.currentSubject==null){var n=$e(),a=r,i=$e();return n.checks.push({type:fe.DIRECTED_EDGE,source:a,target:i}),cn(e,r,n),e.edgeCount++,i}else{var o=$e(),l=r,u=$e();return o.checks.push({type:fe.NODE_SOURCE,source:l,target:u}),cn(e,r,o),e.edgeCount++,u}}},{name:"undirectedEdge",separator:!0,regex:Le.undirectedEdge,populate:function(e,r){if(e.currentSubject==null){var n=$e(),a=r,i=$e();return n.checks.push({type:fe.UNDIRECTED_EDGE,nodes:[a,i]}),cn(e,r,n),e.edgeCount++,i}else{var o=$e(),l=r,u=$e();return o.checks.push({type:fe.NODE_NEIGHBOR,node:l,neighbor:u}),cn(e,r,o),u}}},{name:"child",separator:!0,regex:Le.child,populate:function(e,r){if(e.currentSubject==null){var n=$e(),a=$e(),i=e[e.length-1];return n.checks.push({type:fe.CHILD,parent:i,child:a}),cn(e,r,n),e.compoundCount++,a}else if(e.currentSubject===r){var o=$e(),l=e[e.length-1],u=$e(),c=$e(),d=$e(),f=$e();return o.checks.push({type:fe.COMPOUND_SPLIT,left:l,right:u,subject:c}),c.checks=r.checks,r.checks=[{type:fe.TRUE}],f.checks.push({type:fe.TRUE}),u.checks.push({type:fe.PARENT,parent:f,child:d}),cn(e,l,o),e.currentSubject=c,e.compoundCount++,d}else{var p=$e(),v=$e(),h=[{type:fe.PARENT,parent:p,child:v}];return p.checks=r.checks,r.checks=h,e.compoundCount++,v}}},{name:"descendant",separator:!0,regex:Le.descendant,populate:function(e,r){if(e.currentSubject==null){var n=$e(),a=$e(),i=e[e.length-1];return n.checks.push({type:fe.DESCENDANT,ancestor:i,descendant:a}),cn(e,r,n),e.compoundCount++,a}else if(e.currentSubject===r){var o=$e(),l=e[e.length-1],u=$e(),c=$e(),d=$e(),f=$e();return o.checks.push({type:fe.COMPOUND_SPLIT,left:l,right:u,subject:c}),c.checks=r.checks,r.checks=[{type:fe.TRUE}],f.checks.push({type:fe.TRUE}),u.checks.push({type:fe.ANCESTOR,ancestor:f,descendant:d}),cn(e,l,o),e.currentSubject=c,e.compoundCount++,d}else{var p=$e(),v=$e(),h=[{type:fe.ANCESTOR,ancestor:p,descendant:v}];return p.checks=r.checks,r.checks=h,e.compoundCount++,v}}},{name:"subject",modifier:!0,regex:Le.subject,populate:function(e,r){if(e.currentSubject!=null&&e.currentSubject!==r)return Ae("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=r;var n=e[e.length-1],a=n.checks[0],i=a==null?null:a.type;i===fe.DIRECTED_EDGE?a.type=fe.NODE_TARGET:i===fe.UNDIRECTED_EDGE&&(a.type=fe.NODE_NEIGHBOR,a.node=a.nodes[1],a.neighbor=a.nodes[0],a.nodes=null)}}];uc.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var uD=function(e){for(var r,n,a,i=0;i<uc.length;i++){var o=uc[i],l=o.name,u=e.match(o.regexObj);if(u!=null){n=u,r=o,a=l;var c=u[0];e=e.substring(c.length);break}}return{expr:r,match:n,name:a,remaining:e}},dD=function(e){var r=e.match(/^\s+/);if(r){var n=r[0];e=e.substring(n.length)}return e},fD=function(e){var r=this,n=r.inputText=e,a=r[0]=$e();for(r.length=1,n=dD(n);;){var i=uD(n);if(i.expr==null)return Ae("The selector `"+e+"`is invalid"),!1;var o=i.match.slice(1),l=i.expr.populate(r,a,o);if(l===!1)return!1;if(l!=null&&(a=l),n=i.remaining,n.match(/^\s*$/))break}var u=r[r.length-1];r.currentSubject!=null&&(u.subject=r.currentSubject),u.edgeCount=r.edgeCount,u.compoundCount=r.compoundCount;for(var c=0;c<r.length;c++){var d=r[c];if(d.compoundCount>0&&d.edgeCount>0)return Ae("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(d.edgeCount>1)return Ae("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;d.edgeCount===1&&Ae("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},hD=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(d){return d??""},r=function(d){return be(d)?'"'+d+'"':e(d)},n=function(d){return" "+d+" "},a=function(d,f){var p=d.type,v=d.value;switch(p){case fe.GROUP:{var h=e(v);return h.substring(0,h.length-1)}case fe.DATA_COMPARE:{var g=d.field,y=d.operator;return"["+g+n(e(y))+r(v)+"]"}case fe.DATA_BOOL:{var m=d.operator,b=d.field;return"["+e(m)+b+"]"}case fe.DATA_EXIST:{var w=d.field;return"["+w+"]"}case fe.META_COMPARE:{var C=d.operator,x=d.field;return"[["+x+n(e(C))+r(v)+"]]"}case fe.STATE:return v;case fe.ID:return"#"+v;case fe.CLASS:return"."+v;case fe.PARENT:case fe.CHILD:return i(d.parent,f)+n(">")+i(d.child,f);case fe.ANCESTOR:case fe.DESCENDANT:return i(d.ancestor,f)+" "+i(d.descendant,f);case fe.COMPOUND_SPLIT:{var E=i(d.left,f),k=i(d.subject,f),B=i(d.right,f);return E+(E.length>0?" ":"")+k+B}case fe.TRUE:return""}},i=function(d,f){return d.checks.reduce(function(p,v,h){return p+(f===d&&h===0?"$":"")+a(v,f)},"")},o="",l=0;l<this.length;l++){var u=this[l];o+=i(u,u.subject),this.length>1&&l<this.length-1&&(o+=", ")}return this.toStringCache=o,o},pD={parse:fD,toString:hD},Lp=function(e,r,n){var a,i=be(e),o=le(e),l=be(n),u,c,d=!1,f=!1,p=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),d=!0),(i||l||d)&&(u=!i&&!o?"":""+e,c=""+n),d&&(e=u=u.toLowerCase(),n=c=c.toLowerCase()),r){case"*=":a=u.indexOf(c)>=0;break;case"$=":a=u.indexOf(c,u.length-c.length)>=0;break;case"^=":a=u.indexOf(c)===0;break;case"=":a=e===n;break;case">":p=!0,a=e>n;break;case">=":p=!0,a=e>=n;break;case"<":p=!0,a=e<n;break;case"<=":p=!0,a=e<=n;break;default:a=!1;break}return f&&(e!=null||!p)&&(a=!a),a},vD=function(e,r){switch(r){case"?":return!!e;case"!":return!e;case"^":return e===void 0}},gD=function(e){return e!==void 0},dc=function(e,r){return e.data(r)},mD=function(e,r){return e[r]()},Ze=[],je=function(e,r){return e.checks.every(function(n){return Ze[n.type](n,r)})};Ze[fe.GROUP]=function(t,e){var r=t.value;return r==="*"||r===e.group()},Ze[fe.STATE]=function(t,e){var r=t.value;return lD(r,e)},Ze[fe.ID]=function(t,e){var r=t.value;return e.id()===r},Ze[fe.CLASS]=function(t,e){var r=t.value;return e.hasClass(r)},Ze[fe.META_COMPARE]=function(t,e){var r=t.field,n=t.operator,a=t.value;return Lp(mD(e,r),n,a)},Ze[fe.DATA_COMPARE]=function(t,e){var r=t.field,n=t.operator,a=t.value;return Lp(dc(e,r),n,a)},Ze[fe.DATA_BOOL]=function(t,e){var r=t.field,n=t.operator;return vD(dc(e,r),n)},Ze[fe.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,gD(dc(e,r))},Ze[fe.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],n=t.nodes[1],a=e.source(),i=e.target();return je(r,a)&&je(n,i)||je(n,a)&&je(r,i)},Ze[fe.NODE_NEIGHBOR]=function(t,e){return je(t.node,e)&&e.neighborhood().some(function(r){return r.isNode()&&je(t.neighbor,r)})},Ze[fe.DIRECTED_EDGE]=function(t,e){return je(t.source,e.source())&&je(t.target,e.target())},Ze[fe.NODE_SOURCE]=function(t,e){return je(t.source,e)&&e.outgoers().some(function(r){return r.isNode()&&je(t.target,r)})},Ze[fe.NODE_TARGET]=function(t,e){return je(t.target,e)&&e.incomers().some(function(r){return r.isNode()&&je(t.source,r)})},Ze[fe.CHILD]=function(t,e){return je(t.child,e)&&je(t.parent,e.parent())},Ze[fe.PARENT]=function(t,e){return je(t.parent,e)&&e.children().some(function(r){return je(t.child,r)})},Ze[fe.DESCENDANT]=function(t,e){return je(t.descendant,e)&&e.ancestors().some(function(r){return je(t.ancestor,r)})},Ze[fe.ANCESTOR]=function(t,e){return je(t.ancestor,e)&&e.descendants().some(function(r){return je(t.descendant,r)})},Ze[fe.COMPOUND_SPLIT]=function(t,e){return je(t.subject,e)&&je(t.left,e)&&je(t.right,e)},Ze[fe.TRUE]=function(){return!0},Ze[fe.COLLECTION]=function(t,e){var r=t.value;return r.has(e)},Ze[fe.FILTER]=function(t,e){var r=t.value;return r(e)};var yD=function(e){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===fe.ID)return e.getElementById(r[0].checks[0].value).collection();var n=function(i){for(var o=0;o<r.length;o++){var l=r[o];if(je(l,i))return!0}return!1};return r.text()==null&&(n=function(){return!0}),e.filter(n)},bD=function(e){for(var r=this,n=0;n<r.length;n++){var a=r[n];if(je(a,e))return!0}return!1},wD={matches:bD,filter:yD},un=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,e==null||be(e)&&e.match(/^\s*$/)||(Ut(e)?this.addQuery({checks:[{type:fe.COLLECTION,value:e.collection()}]}):Ye(e)?this.addQuery({checks:[{type:fe.FILTER,value:e}]}):be(e)?this.parse(e)||(this.invalid=!0):Xe("A selector must be created from a string; found "))},dn=un.prototype;[pD,wD].forEach(function(t){return xe(dn,t)}),dn.text=function(){return this.inputText},dn.size=function(){return this.length},dn.eq=function(t){return this[t]},dn.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},dn.addQuery=function(t){this[this.length++]=t},dn.selector=dn.toString;var fn={allAre:function(e){var r=new un(e);return this.every(function(n){return r.matches(n)})},is:function(e){var r=new un(e);return this.some(function(n){return r.matches(n)})},some:function(e,r){for(var n=0;n<this.length;n++){var a=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(a)return!0}return!1},every:function(e,r){for(var n=0;n<this.length;n++){var a=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(!a)return!1}return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var r=this.length,n=e.length;return r!==n?!1:r===1?this[0]===e[0]:this.every(function(a){return e.hasElementWithId(a.id())})},anySame:function(e){return e=this.cy().collection(e),this.some(function(r){return e.hasElementWithId(r.id())})},allAreNeighbors:function(e){e=this.cy().collection(e);var r=this.neighborhood();return e.every(function(n){return r.hasElementWithId(n.id())})},contains:function(e){e=this.cy().collection(e);var r=this;return e.every(function(n){return r.hasElementWithId(n.id())})}};fn.allAreNeighbours=fn.allAreNeighbors,fn.has=fn.contains,fn.equal=fn.equals=fn.same;var Qt=function(e,r){return function(a,i,o,l){var u=a,c=this,d;if(u==null?d="":Ut(u)&&u.length===1&&(d=u.id()),c.length===1&&d){var f=c[0]._private,p=f.traversalCache=f.traversalCache||{},v=p[r]=p[r]||[],h=Mn(d),g=v[h];return g||(v[h]=e.call(c,a,i,o,l))}else return e.call(c,a,i,o,l)}},Na={parent:function(e){var r=[];if(this.length===1){var n=this[0]._private.parent;if(n)return n}for(var a=0;a<this.length;a++){var i=this[a],o=i._private.parent;o&&r.push(o)}return this.spawn(r,!0).filter(e)},parents:function(e){for(var r=[],n=this.parent();n.nonempty();){for(var a=0;a<n.length;a++){var i=n[a];r.push(i)}n=n.parent()}return this.spawn(r,!0).filter(e)},commonAncestors:function(e){for(var r,n=0;n<this.length;n++){var a=this[n],i=a.parents();r=r||i,r=r.intersect(i)}return r.filter(e)},orphans:function(e){return this.stdFilter(function(r){return r.isOrphan()}).filter(e)},nonorphans:function(e){return this.stdFilter(function(r){return r.isChild()}).filter(e)},children:Qt(function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r],a=n._private.children,i=0;i<a.length;i++)e.push(a[i]);return this.spawn(e,!0).filter(t)},"children"),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length!==0},isChildless:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length===0},isChild:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent!=null},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent==null},descendants:function(e){var r=[];function n(a){for(var i=0;i<a.length;i++){var o=a[i];r.push(o),o.children().nonempty()&&n(o.children())}}return n(this.children()),this.spawn(r,!0).filter(e)}};function fc(t,e,r,n){for(var a=[],i=new ga,o=t.cy(),l=o.hasCompoundNodes(),u=0;u<t.length;u++){var c=t[u];r?a.push(c):l&&n(a,i,c)}for(;a.length>0;){var d=a.shift();e(d),i.add(d.id()),l&&n(a,i,d)}return t}function Fp(t,e,r){if(r.isParent())for(var n=r._private.children,a=0;a<n.length;a++){var i=n[a];e.has(i.id())||t.push(i)}}Na.forEachDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return fc(this,t,e,Fp)};function Mp(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n)}}Na.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return fc(this,t,e,Mp)};function CD(t,e,r){Mp(t,e,r),Fp(t,e,r)}Na.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return fc(this,t,e,CD)},Na.ancestors=Na.parents;var Pi,Ip;Pi=Ip={data:Ve.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Ve.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ve.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ve.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ve.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ve.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},Pi.attr=Pi.data,Pi.removeAttr=Pi.removeData;var kD=Ip,Jo={};function hc(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var n=0,a=r[0],i=a._private.edges,o=0;o<i.length;o++){var l=i[o];!e&&l.isLoop()||(n+=t(a,l))}return n}else return}}xe(Jo,{degree:hc(function(t,e){return e.source().same(e.target())?2:1}),indegree:hc(function(t,e){return e.target().same(t)?1:0}),outdegree:hc(function(t,e){return e.source().same(t)?1:0})});function Da(t,e){return function(r){for(var n,a=this.nodes(),i=0;i<a.length;i++){var o=a[i],l=o[t](r);l!==void 0&&(n===void 0||e(l,n))&&(n=l)}return n}}xe(Jo,{minDegree:Da("degree",function(t,e){return t<e}),maxDegree:Da("degree",function(t,e){return t>e}),minIndegree:Da("indegree",function(t,e){return t<e}),maxIndegree:Da("indegree",function(t,e){return t>e}),minOutdegree:Da("outdegree",function(t,e){return t<e}),maxOutdegree:Da("outdegree",function(t,e){return t>e})}),xe(Jo,{totalDegree:function(e){for(var r=0,n=this.nodes(),a=0;a<n.length;a++)r+=n[a].degree(e);return r}});var cr,Ap,Vp=function(e,r,n){for(var a=0;a<e.length;a++){var i=e[a];if(!i.locked()){var o=i._private.position,l={x:r.x!=null?r.x-o.x:0,y:r.y!=null?r.y-o.y:0};i.isParent()&&!(l.x===0&&l.y===0)&&i.children().shift(l,n),i.dirtyBoundingBoxCache()}}},Rp={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,r){Vp(e,r,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};cr=Ap={position:Ve.data(Rp),silentPosition:Ve.data(xe({},Rp,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,r){Vp(e,r,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,r){if(_e(e))r?this.silentPosition(e):this.position(e);else if(Ye(e)){var n=e,a=this.cy();a.startBatch();for(var i=0;i<this.length;i++){var o=this[i],l=void 0;(l=n(o,i))&&(r?o.silentPosition(l):o.position(l))}a.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,r,n){var a;if(_e(e)?(a={x:le(e.x)?e.x:0,y:le(e.y)?e.y:0},n=r):be(e)&&le(r)&&(a={x:0,y:0},a[e]=r),a!=null){var i=this.cy();i.startBatch();for(var o=0;o<this.length;o++){var l=this[o];if(!(i.hasCompoundNodes()&&l.isChild()&&l.ancestors().anySame(this))){var u=l.position(),c={x:u.x+a.x,y:u.y+a.y};n?l.silentPosition(c):l.position(c)}}i.endBatch()}return this},silentShift:function(e,r){return _e(e)?this.shift(e,!0):be(e)&&le(r)&&this.shift(e,r,!0),this},renderedPosition:function(e,r){var n=this[0],a=this.cy(),i=a.zoom(),o=a.pan(),l=_e(e)?e:void 0,u=l!==void 0||r!==void 0&&be(e);if(n&&n.isNode())if(u)for(var c=0;c<this.length;c++){var d=this[c];r!==void 0?d.position(e,(r-o[e])/i):l!==void 0&&d.position(Kh(l,i,o))}else{var f=n.position();return l=Ao(f,i,o),e===void 0?l:l[e]}else if(!u)return;return this},relativePosition:function(e,r){var n=this[0],a=this.cy(),i=_e(e)?e:void 0,o=i!==void 0||r!==void 0&&be(e),l=a.hasCompoundNodes();if(n&&n.isNode())if(o)for(var u=0;u<this.length;u++){var c=this[u],d=l?c.parent():null,f=d&&d.length>0,p=f;f&&(d=d[0]);var v=p?d.position():{x:0,y:0};r!==void 0?c.position(e,r+v[e]):i!==void 0&&c.position({x:i.x+v.x,y:i.y+v.y})}else{var h=n.position(),g=l?n.parent():null,y=g&&g.length>0,m=y;y&&(g=g[0]);var b=m?g.position():{x:0,y:0};return i={x:h.x-b.x,y:h.y-b.y},e===void 0?i:i[e]}else if(!o)return;return this}},cr.modelPosition=cr.point=cr.position,cr.modelPositions=cr.points=cr.positions,cr.renderedPoint=cr.renderedPosition,cr.relativePoint=cr.relativePosition;var xD=Ap,Pa,hn;Pa=hn={},hn.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),a=r.pan(),i=e.x1*n+a.x,o=e.x2*n+a.x,l=e.y1*n+a.y,u=e.y2*n+a.y;return{x1:i,x2:o,y1:l,y2:u,w:o-i,h:u-l}},hn.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)},hn.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(o){if(!o.isParent())return;var l=o._private,u=o.children(),c=o.pstyle("compound-sizing-wrt-labels").value==="include",d={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},f=u.boundingBox({includeLabels:c,includeOverlays:!1,useCache:!1}),p=l.position;(f.w===0||f.h===0)&&(f={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},f.x1=p.x-f.w/2,f.x2=p.x+f.w/2,f.y1=p.y-f.h/2,f.y2=p.y+f.h/2);function v(S,N,D){var P=0,L=0,O=N+D;return S>0&&O>0&&(P=N/O*S,L=D/O*S),{biasDiff:P,biasComplementDiff:L}}function h(S,N,D,P){if(D.units==="%")switch(P){case"width":return S>0?D.pfValue*S:0;case"height":return N>0?D.pfValue*N:0;case"average":return S>0&&N>0?D.pfValue*(S+N)/2:0;case"min":return S>0&&N>0?S>N?D.pfValue*N:D.pfValue*S:0;case"max":return S>0&&N>0?S>N?D.pfValue*S:D.pfValue*N:0;default:return 0}else return D.units==="px"?D.pfValue:0}var g=d.width.left.value;d.width.left.units==="px"&&d.width.val>0&&(g=g*100/d.width.val);var y=d.width.right.value;d.width.right.units==="px"&&d.width.val>0&&(y=y*100/d.width.val);var m=d.height.top.value;d.height.top.units==="px"&&d.height.val>0&&(m=m*100/d.height.val);var b=d.height.bottom.value;d.height.bottom.units==="px"&&d.height.val>0&&(b=b*100/d.height.val);var w=v(d.width.val-f.w,g,y),C=w.biasDiff,x=w.biasComplementDiff,E=v(d.height.val-f.h,m,b),k=E.biasDiff,B=E.biasComplementDiff;l.autoPadding=h(f.w,f.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),l.autoWidth=Math.max(f.w,d.width.val),p.x=(-C+f.x1+f.x2+x)/2,l.autoHeight=Math.max(f.h,d.height.val),p.y=(-k+f.y1+f.y2+B)/2}for(var n=0;n<this.length;n++){var a=this[n],i=a._private;(!i.compoundBoundsClean||t)&&(r(a),e.batching()||(i.compoundBoundsClean=!0))}return this};var Jt=function(e){return e===1/0||e===-1/0?0:e},ur=function(e,r,n,a,i){a-r===0||i-n===0||r==null||n==null||a==null||i==null||(e.x1=r<e.x1?r:e.x1,e.x2=a>e.x2?a:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},zn=function(e,r){return r==null?e:ur(e,r.x1,r.y1,r.x2,r.y2)},Oi=function(e,r,n){return lr(e,r,n)},es=function(e,r,n){if(!r.cy().headless()){var a=r._private,i=a.rstyle,o=i.arrowWidth/2,l=r.pstyle(n+"-arrow-shape").value,u,c;if(l!=="none"){n==="source"?(u=i.srcX,c=i.srcY):n==="target"?(u=i.tgtX,c=i.tgtY):(u=i.midX,c=i.midY);var d=a.arrowBounds=a.arrowBounds||{},f=d[n]=d[n]||{};f.x1=u-o,f.y1=c-o,f.x2=u+o,f.y2=c+o,f.w=f.x2-f.x1,f.h=f.y2-f.y1,Ro(f,1),ur(e,f.x1,f.y1,f.x2,f.y2)}}},pc=function(e,r,n){if(!r.cy().headless()){var a;n?a=n+"-":a="";var i=r._private,o=i.rstyle,l=r.pstyle(a+"label").strValue;if(l){var u=r.pstyle("text-halign"),c=r.pstyle("text-valign"),d=Oi(o,"labelWidth",n),f=Oi(o,"labelHeight",n),p=Oi(o,"labelX",n),v=Oi(o,"labelY",n),h=r.pstyle(a+"text-margin-x").pfValue,g=r.pstyle(a+"text-margin-y").pfValue,y=r.isEdge(),m=r.pstyle(a+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,w=r.pstyle("text-border-width").pfValue,C=w/2,x=r.pstyle("text-background-padding").pfValue,E=2,k=f,B=d,S=B/2,N=k/2,D,P,L,O;if(y)D=p-S,P=p+S,L=v-N,O=v+N;else{switch(u.value){case"left":D=p-B,P=p;break;case"center":D=p-S,P=p+S;break;case"right":D=p,P=p+B;break}switch(c.value){case"top":L=v-k,O=v;break;case"center":L=v-N,O=v+N;break;case"bottom":L=v,O=v+k;break}}D+=h-Math.max(b,C)-x-E,P+=h+Math.max(b,C)+x+E,L+=g-Math.max(b,C)-x-E,O+=g+Math.max(b,C)+x+E;var I=n||"main",_=i.labelBounds,M=_[I]=_[I]||{};M.x1=D,M.y1=L,M.x2=P,M.y2=O,M.w=P-D,M.h=O-L;var F=y&&m.strValue==="autorotate",V=m.pfValue!=null&&m.pfValue!==0;if(F||V){var H=F?Oi(i.rstyle,"labelAngle",n):m.pfValue,$=Math.cos(H),z=Math.sin(H),j=(D+P)/2,ee=(L+O)/2;if(!y){switch(u.value){case"left":j=P;break;case"right":j=D;break}switch(c.value){case"top":ee=O;break;case"bottom":ee=L;break}}var J=function(he,ne){return he=he-j,ne=ne-ee,{x:he*$-ne*z+j,y:he*z+ne*$+ee}},Z=J(D,L),re=J(D,O),Y=J(P,L),A=J(P,O);D=Math.min(Z.x,re.x,Y.x,A.x),P=Math.max(Z.x,re.x,Y.x,A.x),L=Math.min(Z.y,re.y,Y.y,A.y),O=Math.max(Z.y,re.y,Y.y,A.y)}var K=I+"Rot",W=_[K]=_[K]||{};W.x1=D,W.y1=L,W.x2=P,W.y2=O,W.w=P-D,W.h=O-L,ur(e,D,L,P,O),ur(i.labelBounds.all,D,L,P,O)}return e}},ED=function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,a=r.pstyle("outline-width").value;if(n>0&&a>0){var i=r.pstyle("outline-offset").value,o=r.pstyle("shape").value,l=a+i,u=(e.w+l*2)/e.w,c=(e.h+l*2)/e.h,d=0,f=0;["diamond","pentagon","round-triangle"].includes(o)?(u=(e.w+l*2.4)/e.w,f=-l/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(o)?u=(e.w+l*2.4)/e.w:o==="star"?(u=(e.w+l*2.8)/e.w,c=(e.h+l*2.6)/e.h,f=-l/3.8):o==="triangle"?(u=(e.w+l*2.8)/e.w,c=(e.h+l*2.4)/e.h,f=-l/1.4):o==="vee"&&(u=(e.w+l*4.4)/e.w,c=(e.h+l*3.8)/e.h,f=-l*.5);var p=e.h*c-e.h,v=e.w*u-e.w;if($o(e,[Math.ceil(p/2),Math.ceil(v/2)]),d!=0||f!==0){var h=UB(e,d,f);Uh(e,h)}}}},SD=function(e,r){var n=e._private.cy,a=n.styleEnabled(),i=n.headless(),o=zt(),l=e._private,u=e.isNode(),c=e.isEdge(),d,f,p,v,h,g,y=l.rstyle,m=u&&a?e.pstyle("bounds-expansion").pfValue:[0],b=function(ue){return ue.pstyle("display").value!=="none"},w=!a||b(e)&&(!c||b(e.source())&&b(e.target()));if(w){var C=0,x=0;a&&r.includeOverlays&&(C=e.pstyle("overlay-opacity").value,C!==0&&(x=e.pstyle("overlay-padding").value));var E=0,k=0;a&&r.includeUnderlays&&(E=e.pstyle("underlay-opacity").value,E!==0&&(k=e.pstyle("underlay-padding").value));var B=Math.max(x,k),S=0,N=0;if(a&&(S=e.pstyle("width").pfValue,N=S/2),u&&r.includeNodes){var D=e.position();h=D.x,g=D.y;var P=e.outerWidth(),L=P/2,O=e.outerHeight(),I=O/2;d=h-L,f=h+L,p=g-I,v=g+I,ur(o,d,p,f,v),a&&r.includeOutlines&&ED(o,e)}else if(c&&r.includeEdges)if(a&&!i){var _=e.pstyle("curve-style").strValue;if(d=Math.min(y.srcX,y.midX,y.tgtX),f=Math.max(y.srcX,y.midX,y.tgtX),p=Math.min(y.srcY,y.midY,y.tgtY),v=Math.max(y.srcY,y.midY,y.tgtY),d-=N,f+=N,p-=N,v+=N,ur(o,d,p,f,v),_==="haystack"){var M=y.haystackPts;if(M&&M.length===2){if(d=M[0].x,p=M[0].y,f=M[1].x,v=M[1].y,d>f){var F=d;d=f,f=F}if(p>v){var V=p;p=v,v=V}ur(o,d-N,p-N,f+N,v+N)}}else if(_==="bezier"||_==="unbundled-bezier"||_.endsWith("segments")||_.endsWith("taxi")){var H;switch(_){case"bezier":case"unbundled-bezier":H=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":H=y.linePts;break}if(H!=null)for(var $=0;$<H.length;$++){var z=H[$];d=z.x-N,f=z.x+N,p=z.y-N,v=z.y+N,ur(o,d,p,f,v)}}}else{var j=e.source(),ee=j.position(),J=e.target(),Z=J.position();if(d=ee.x,f=Z.x,p=ee.y,v=Z.y,d>f){var re=d;d=f,f=re}if(p>v){var Y=p;p=v,v=Y}d-=N,f+=N,p-=N,v+=N,ur(o,d,p,f,v)}if(a&&r.includeEdges&&c&&(es(o,e,"mid-source"),es(o,e,"mid-target"),es(o,e,"source"),es(o,e,"target")),a){var A=e.pstyle("ghost").value==="yes";if(A){var K=e.pstyle("ghost-offset-x").pfValue,W=e.pstyle("ghost-offset-y").pfValue;ur(o,o.x1+K,o.y1+W,o.x2+K,o.y2+W)}}var oe=l.bodyBounds=l.bodyBounds||{};Gh(oe,o),$o(oe,m),Ro(oe,1),a&&(d=o.x1,f=o.x2,p=o.y1,v=o.y2,ur(o,d-B,p-B,f+B,v+B));var he=l.overlayBounds=l.overlayBounds||{};Gh(he,o),$o(he,m),Ro(he,1);var ne=l.labelBounds=l.labelBounds||{};ne.all!=null?qB(ne.all):ne.all=zt(),a&&r.includeLabels&&(r.includeMainLabels&&pc(o,e,null),c&&(r.includeSourceLabels&&pc(o,e,"source"),r.includeTargetLabels&&pc(o,e,"target")))}return o.x1=Jt(o.x1),o.y1=Jt(o.y1),o.x2=Jt(o.x2),o.y2=Jt(o.y2),o.w=Jt(o.x2-o.x1),o.h=Jt(o.y2-o.y1),o.w>0&&o.h>0&&w&&($o(o,m),Ro(o,1)),o},$p=function(e){var r=0,n=function(o){return(o?1:0)<<r++},a=0;return a+=n(e.incudeNodes),a+=n(e.includeEdges),a+=n(e.includeLabels),a+=n(e.includeMainLabels),a+=n(e.includeSourceLabels),a+=n(e.includeTargetLabels),a+=n(e.includeOverlays),a+=n(e.includeOutlines),a},zp=function(e){if(e.isEdge()){var r=e.source().position(),n=e.target().position(),a=function(o){return Math.round(o)};return dB([a(r.x),a(r.y),a(n.x),a(n.y)])}else return 0},Hp=function(e,r){var n=e._private,a,i=e.isEdge(),o=r==null?Kp:$p(r),l=o===Kp,u=zp(e),c=n.bbCachePosKey===u,d=r.useCache&&c,f=function(g){return g._private.bbCache==null||g._private.styleDirty},p=!d||f(e)||i&&f(e.source())||f(e.target());if(p?(c||e.recalculateRenderedStyle(d),a=SD(e,_i),n.bbCache=a,n.bbCachePosKey=u):a=n.bbCache,!l){var v=e.isNode();a=zt(),(r.includeNodes&&v||r.includeEdges&&!v)&&(r.includeOverlays?zn(a,n.overlayBounds):zn(a,n.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!i||r.includeSourceLabels&&r.includeTargetLabels)?zn(a,n.labelBounds.all):(r.includeMainLabels&&zn(a,n.labelBounds.mainRot),r.includeSourceLabels&&zn(a,n.labelBounds.sourceRot),r.includeTargetLabels&&zn(a,n.labelBounds.targetRot))),a.w=a.x2-a.x1,a.h=a.y2-a.y1}return a},_i={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},Kp=$p(_i),qp=wt(_i);hn.boundingBox=function(t){var e;if(this.length===1&&this[0]._private.bbCache!=null&&!this[0]._private.styleDirty&&(t===void 0||t.useCache===void 0||t.useCache===!0))t===void 0?t=_i:t=qp(t),e=Hp(this[0],t);else{e=zt(),t=t||_i;var r=qp(t),n=this,a=n.cy(),i=a.styleEnabled();if(i)for(var o=0;o<n.length;o++){var l=n[o],u=l._private,c=zp(l),d=u.bbCachePosKey===c,f=r.useCache&&d&&!u.styleDirty;l.recalculateRenderedStyle(f)}this.updateCompoundBounds(!t.useCache);for(var p=0;p<n.length;p++){var v=n[p];zn(e,Hp(v,r))}}return e.x1=Jt(e.x1),e.y1=Jt(e.y1),e.x2=Jt(e.x2),e.y2=Jt(e.y2),e.w=Jt(e.x2-e.x1),e.h=Jt(e.y2-e.y1),e},hn.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},hn.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),n=r.hasCompoundNodes(),a=r.collection();if(n&&(a=e.filter(function(c){return c.isParent()}),e=e.not(a)),_e(t)){var i=t;t=function(){return i}}var o=function(d,f){return d._private.bbAtOldPos=t(d,f)},l=function(d){return d._private.bbAtOldPos};r.startBatch(),e.forEach(o).silentPositions(t),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0));var u=KB(this.boundingBox({useCache:!1}));return e.silentPositions(l),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),r.endBatch(),u},Pa.boundingbox=Pa.bb=Pa.boundingBox,Pa.renderedBoundingbox=Pa.renderedBoundingBox;var TD=hn,Li,Fi;Li=Fi={};var Up=function(e){e.uppercaseName=xh(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=xh(e.outerName),Li[e.name]=function(){var n=this[0],a=n._private,i=a.cy,o=i._private.styleEnabled;if(n)if(o){if(n.isParent())return n.updateCompoundBounds(),a[e.autoName]||0;var l=n.pstyle(e.name);switch(l.strValue){case"label":return n.recalculateRenderedStyle(),a.rstyle[e.labelName]||0;default:return l.pfValue}}else return 1},Li["outer"+e.uppercaseName]=function(){var n=this[0],a=n._private,i=a.cy,o=i._private.styleEnabled;if(n)if(o){var l=n[e.name](),u=n.pstyle("border-width").pfValue,c=2*n.padding();return l+u+c}else return 1},Li["rendered"+e.uppercaseName]=function(){var n=this[0];if(n){var a=n[e.name]();return a*this.cy().zoom()}},Li["rendered"+e.uppercaseOuterName]=function(){var n=this[0];if(n){var a=n[e.outerName]();return a*this.cy().zoom()}}};Up({name:"width"}),Up({name:"height"}),Fi.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),e.autoPadding!==void 0?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue},Fi.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},Fi.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var BD=Fi,ND=function(e,r){if(e.isEdge())return r(e)},DD=function(e,r){if(e.isEdge()){var n=e.cy();return Ao(r(e),n.zoom(),n.pan())}},PD=function(e,r){if(e.isEdge()){var n=e.cy(),a=n.pan(),i=n.zoom();return r(e).map(function(o){return Ao(o,i,a)})}},OD=function(e){return e.renderer().getControlPoints(e)},_D=function(e){return e.renderer().getSegmentPoints(e)},LD=function(e){return e.renderer().getSourceEndpoint(e)},FD=function(e){return e.renderer().getTargetEndpoint(e)},MD=function(e){return e.renderer().getEdgeMidpoint(e)},Gp={controlPoints:{get:OD,mult:!0},segmentPoints:{get:_D,mult:!0},sourceEndpoint:{get:LD},targetEndpoint:{get:FD},midpoint:{get:MD}},ID=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},AD=Object.keys(Gp).reduce(function(t,e){var r=Gp[e],n=ID(e);return t[e]=function(){return ND(this,r.get)},r.mult?t[n]=function(){return PD(this,r.get)}:t[n]=function(){return DD(this,r.get)},t},{}),VD=xe({},xD,TD,BD,AD);/*!
439
439
  Event object based on jQuery events, MIT license
440
440
 
441
441
  https://jquery.org/license/
442
442
  https://tldrlegal.com/license/mit-license
443
443
  https://github.com/jquery/jquery/blob/master/src/event.js
444
- */var Wp=function(e,r){this.recycle(e,r)};function Mi(){return!1}function ts(){return!0}Wp.prototype={instanceString:function(){return"event"},recycle:function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=Mi,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?ts:Mi):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var n=this.position,a=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:n.x*a+i.x,y:n.y*a+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=ts;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=ts;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ts,this.stopPropagation()},isDefaultPrevented:Mi,isPropagationStopped:Mi,isImmediatePropagationStopped:Mi};var jp=/^([^.]+)(\.(?:[^.]+))?$/,V3=".*",Yp={qualifierCompare:function(e,r){return e===r},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},Xp=Object.keys(Yp),$3={};function rs(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$3,e=arguments.length>1?arguments[1]:void 0,r=0;r<Xp.length;r++){var n=Xp[r];this[n]=t[n]||Yp[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}var pn=rs.prototype,Zp=function(e,r,n,a,i,o,l){Ye(a)&&(i=a,a=null),l&&(o==null?o=l:o=xe({},o,l));for(var u=He(n)?n:n.split(/\s+/),c=0;c<u.length;c++){var d=u[c];if(!nn(d)){var f=d.match(jp);if(f){var p=f[1],v=f[2]?f[2]:null,h=r(e,d,p,v,a,i,o);if(h===!1)break}}}},Qp=function(e,r){return e.addEventFields(e.context,r),new Wp(r.type,r)},z3=function(e,r,n){if(sT(n)){r(e,n);return}else if(_e(n)){r(e,Qp(e,n));return}for(var a=He(n)?n:n.split(/\s+/),i=0;i<a.length;i++){var o=a[i];if(!nn(o)){var l=o.match(jp);if(l){var u=l[1],c=l[2]?l[2]:null,d=Qp(e,{type:u,namespace:c,target:e.context});r(e,d)}}}};pn.on=pn.addListener=function(t,e,r,n,a){return Zp(this,function(i,o,l,u,c,d,f){Ye(d)&&i.listeners.push({event:o,callback:d,type:l,namespace:u,qualifier:c,conf:f})},t,e,r,n,a),this},pn.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0})},pn.removeListener=pn.off=function(t,e,r,n){var a=this;this.emitting!==0&&(this.listeners=gB(this.listeners));for(var i=this.listeners,o=function(c){var d=i[c];Zp(a,function(f,p,v,h,g,y){if((d.type===v||t==="*")&&(!h&&d.namespace!==".*"||d.namespace===h)&&(!g||f.qualifierCompare(d.qualifier,g))&&(!y||d.callback===y))return i.splice(c,1),!1},t,e,r,n)},l=i.length-1;l>=0;l--)o(l);return this},pn.removeAllListeners=function(){return this.removeListener("*")},pn.emit=pn.trigger=function(t,e,r){var n=this.listeners,a=n.length;return this.emitting++,He(e)||(e=[e]),z3(this,function(i,o){r!=null&&(n=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],a=n.length);for(var l=function(d){var f=n[d];if(f.type===o.type&&(!f.namespace||f.namespace===o.namespace||f.namespace===V3)&&i.eventMatches(i.context,f,o)){var p=[o];e!=null&&yB(p,e),i.beforeEmit(i.context,f,o),f.conf&&f.conf.one&&(i.listeners=i.listeners.filter(function(g){return g!==f}));var v=i.callbackContext(i.context,f,o),h=f.callback.apply(v,p);i.afterEmit(i.context,f,o),h===!1&&(o.stopPropagation(),o.preventDefault())}},u=0;u<a;u++)l(u);i.bubble(i.context)&&!o.isPropagationStopped()&&i.parent(i.context).emit(o,e)},t),this.emitting--,this};var H3={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var a=r.qualifier;return a!=null?e!==n.target&&vi(n.target)&&a.matches(n.target):!0},addEventFields:function(e,r){r.cy=e.cy(),r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e},beforeEmit:function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},ns=function(e){return be(e)?new un(e):e},Jp={createEmitter:function(){for(var e=0;e<this.length;e++){var r=this[e],n=r._private;n.emitter||(n.emitter=new rs(H3,r))}return this},emitter:function(){return this._private.emitter},on:function(e,r,n){for(var a=ns(r),i=0;i<this.length;i++){var o=this[i];o.emitter().on(e,a,n)}return this},removeListener:function(e,r,n){for(var a=ns(r),i=0;i<this.length;i++){var o=this[i];o.emitter().removeListener(e,a,n)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners()}return this},one:function(e,r,n){for(var a=ns(r),i=0;i<this.length;i++){var o=this[i];o.emitter().one(e,a,n)}return this},once:function(e,r,n){for(var a=ns(r),i=0;i<this.length;i++){var o=this[i];o.emitter().on(e,a,n,{once:!0,onceCollection:this})}},emit:function(e,r){for(var n=0;n<this.length;n++){var a=this[n];a.emitter().emit(e,r)}return this},emitAndNotify:function(e,r){if(this.length!==0)return this.cy().notify(e,this),this.emit(e,r),this}};Re.eventAliasesOn(Jp);var ev={nodes:function(e){return this.filter(function(r){return r.isNode()}).filter(e)},edges:function(e){return this.filter(function(r){return r.isEdge()}).filter(e)},byGroup:function(){for(var e=this.spawn(),r=this.spawn(),n=0;n<this.length;n++){var a=this[n];a.isNode()?e.push(a):r.push(a)}return{nodes:e,edges:r}},filter:function(e,r){if(e===void 0)return this;if(be(e)||Ut(e))return new un(e).filter(this);if(Ye(e)){for(var n=this.spawn(),a=this,i=0;i<a.length;i++){var o=a[i],l=r?e.apply(r,[o,i,a]):e(o,i,a);l&&n.push(o)}return n}return this.spawn()},not:function(e){if(e){be(e)&&(e=this.filter(e));for(var r=this.spawn(),n=0;n<this.length;n++){var a=this[n],i=e.has(a);i||r.push(a)}return r}else return this},absoluteComplement:function(){var e=this.cy();return e.mutableElements().not(this)},intersect:function(e){if(be(e)){var r=e;return this.filter(r)}for(var n=this.spawn(),a=this,i=e,o=this.length<e.length,l=o?a:i,u=o?i:a,c=0;c<l.length;c++){var d=l[c];u.has(d)&&n.push(d)}return n},xor:function(e){var r=this._private.cy;be(e)&&(e=r.$(e));var n=this.spawn(),a=this,i=e,o=function(u,c){for(var d=0;d<u.length;d++){var f=u[d],p=f._private.data.id,v=c.hasElementWithId(p);v||n.push(f)}};return o(a,i),o(i,a),n},diff:function(e){var r=this._private.cy;be(e)&&(e=r.$(e));var n=this.spawn(),a=this.spawn(),i=this.spawn(),o=this,l=e,u=function(d,f,p){for(var v=0;v<d.length;v++){var h=d[v],g=h._private.data.id,y=f.hasElementWithId(g);y?i.merge(h):p.push(h)}};return u(o,l,n),u(l,o,a),{left:n,right:a,both:i}},add:function(e){var r=this._private.cy;if(!e)return this;if(be(e)){var n=e;e=r.mutableElements().filter(n)}for(var a=this.spawnSelf(),i=0;i<e.length;i++){var o=e[i],l=!this.has(o);l&&a.push(o)}return a},merge:function(e){var r=this._private,n=r.cy;if(!e)return this;if(e&&be(e)){var a=e;e=n.mutableElements().filter(a)}for(var i=r.map,o=0;o<e.length;o++){var l=e[o],u=l._private.data.id,c=!i.has(u);if(c){var d=this.length++;this[d]=l,i.set(u,{ele:l,index:d})}}return this},unmergeAt:function(e){var r=this[e],n=r.id(),a=this._private,i=a.map;this[e]=void 0,i.delete(n);var o=e===this.length-1;if(this.length>1&&!o){var l=this.length-1,u=this[l],c=u._private.data.id;this[l]=void 0,this[e]=u,i.set(c,{ele:u,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,n=e._private.data.id,a=r.map,i=a.get(n);if(!i)return this;var o=i.index;return this.unmergeAt(o),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&be(e)){var n=e;e=r.mutableElements().filter(n)}for(var a=0;a<e.length;a++)this.unmergeOne(e[a]);return this},unmergeBy:function(e){for(var r=this.length-1;r>=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},map:function(e,r){for(var n=[],a=this,i=0;i<a.length;i++){var o=a[i],l=r?e.apply(r,[o,i,a]):e(o,i,a);n.push(l)}return n},reduce:function(e,r){for(var n=r,a=this,i=0;i<a.length;i++)n=e(n,a[i],i,a);return n},max:function(e,r){for(var n=-1/0,a,i=this,o=0;o<i.length;o++){var l=i[o],u=r?e.apply(r,[l,o,i]):e(l,o,i);u>n&&(n=u,a=l)}return{value:n,ele:a}},min:function(e,r){for(var n=1/0,a,i=this,o=0;o<i.length;o++){var l=i[o],u=r?e.apply(r,[l,o,i]):e(l,o,i);u<n&&(n=u,a=l)}return{value:n,ele:a}}},Le=ev;Le.u=Le["|"]=Le["+"]=Le.union=Le.or=Le.add,Le["\\"]=Le["!"]=Le["-"]=Le.difference=Le.relativeComplement=Le.subtract=Le.not,Le.n=Le["&"]=Le["."]=Le.and=Le.intersection=Le.intersect,Le["^"]=Le["(+)"]=Le["(-)"]=Le.symmetricDifference=Le.symdiff=Le.xor,Le.fnFilter=Le.filterFn=Le.stdFilter=Le.filter,Le.complement=Le.abscomp=Le.absoluteComplement;var K3={isNode:function(){return this.group()==="nodes"},isEdge:function(){return this.group()==="edges"},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},tv=function(e,r){var n=e.cy(),a=n.hasCompoundNodes();function i(d){var f=d.pstyle("z-compound-depth");return f.value==="auto"?a?d.zDepth():0:f.value==="bottom"?-1:f.value==="top"?ql:0}var o=i(e)-i(r);if(o!==0)return o;function l(d){var f=d.pstyle("z-index-compare");return f.value==="auto"&&d.isNode()?1:0}var u=l(e)-l(r);if(u!==0)return u;var c=e.pstyle("z-index").value-r.pstyle("z-index").value;return c!==0?c:e.poolIndex()-r.poolIndex()},as={forEach:function(e,r){if(Ye(e))for(var n=this.length,a=0;a<n;a++){var i=this[a],o=r?e.apply(r,[i,a,this]):e(i,a,this);if(o===!1)break}return this},toArray:function(){for(var e=[],r=0;r<this.length;r++)e.push(this[r]);return e},slice:function(e,r){var n=[],a=this.length;r==null&&(r=a),e==null&&(e=0),e<0&&(e=a+e),r<0&&(r=a+r);for(var i=e;i>=0&&i<r&&i<a;i++)n.push(this[i]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return this.length===0},nonempty:function(){return!this.empty()},sort:function(e){if(!Ye(e))return this;var r=this.toArray().sort(e);return this.spawn(r)},sortByZIndex:function(){return this.sort(tv)},zDepth:function(){var e=this[0];if(e){var r=e._private,n=r.group;if(n==="nodes"){var a=r.data.parent?e.parents().size():0;return e.isParent()?a:ql-1}else{var i=r.source,o=r.target,l=i.zDepth(),u=o.zDepth();return Math.max(l,u,0)}}}};as.each=as.forEach;var q3=function(){var e="undefined",r=(typeof Symbol>"u"?"undefined":ot(Symbol))!=e&&ot(Symbol.iterator)!=e;r&&(as[Symbol.iterator]=function(){var n=this,a={value:void 0,done:!1},i=0,o=this.length;return ph({next:function(){return i<o?a.value=n[i++]:(a.value=void 0,a.done=!0),a}},Symbol.iterator,function(){return this})})};q3();var U3=wt({nodeDimensionsIncludeLabels:!1}),is={layoutDimensions:function(e){e=U3(e);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();r={w:n.w,h:n.h}}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r},layoutPositions:function(e,r,n){var a=this.nodes().filter(function(x){return!x.isParent()}),i=this.cy(),o=r.eles,l=function(E){return E.id()},u=gi(n,l);e.emit({type:"layoutstart",layout:e}),e.animations=[];var c=function(E,k,B){var S={x:k.x1+k.w/2,y:k.y1+k.h/2},N={x:(B.x-S.x)*E,y:(B.y-S.y)*E};return{x:S.x+N.x,y:S.y+N.y}},d=r.spacingFactor&&r.spacingFactor!==1,f=function(){if(!d)return null;for(var E=zt(),k=0;k<a.length;k++){var B=a[k],S=u(B,k);GB(E,S.x,S.y)}return E},p=f(),v=gi(function(x,E){var k=u(x,E);if(d){var B=Math.abs(r.spacingFactor);k=c(B,p,k)}return r.transform!=null&&(k=r.transform(x,k)),k},l);if(r.animate){for(var h=0;h<a.length;h++){var g=a[h],y=v(g,h),m=r.animateFilter==null||r.animateFilter(g,h);if(m){var b=g.animation({position:y,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(b)}else g.position(y)}if(r.fit){var w=i.animation({fit:{boundingBox:o.boundingBoxAt(v),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});e.animations.push(w)}else if(r.zoom!==void 0&&r.pan!==void 0){var C=i.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(C)}e.animations.forEach(function(x){return x.play()}),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),xa.all(e.animations.map(function(x){return x.promise()})).then(function(){e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e})})}else a.positions(v),r.fit&&i.fit(r.eles,r.padding),r.zoom!=null&&i.zoom(r.zoom),r.pan&&i.pan(r.pan),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e});return this},layout:function(e){var r=this.cy();return r.makeLayout(xe({},e,{eles:this}))}};is.createLayout=is.makeLayout=is.layout;function rv(t,e,r){var n=r._private,a=n.styleCache=n.styleCache||[],i;return(i=a[t])!=null||(i=a[t]=e(r)),i}function os(t,e){return t=Mn(t),function(n){return rv(t,e,n)}}function ss(t,e){t=Mn(t);var r=function(a){return e.call(a)};return function(){var a=this[0];if(a)return rv(t,r,a)}}var Ct={recalculateRenderedStyle:function(e){var r=this.cy(),n=r.renderer(),a=r.styleEnabled();return n&&a&&n.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var e=this.cy(),r=function(i){return i._private.styleCache=null};if(e.hasCompoundNodes()){var n;n=this.spawnSelf().merge(this.descendants()).merge(this.parents()),n.merge(n.connectedEdges()),n.forEach(r)}else this.forEach(function(a){r(a),a.connectedEdges().forEach(r)});return this},updateStyle:function(e){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var n=r._private.batchStyleEles;return n.merge(this),this}var a=r.hasCompoundNodes(),i=this;e=!!(e||e===void 0),a&&(i=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var o=i;return e?o.emitAndNotify("style"):o.emit("style"),i.forEach(function(l){return l._private.styleDirty=!0}),this},cleanStyle:function(){var e=this.cy();if(e.styleEnabled())for(var r=0;r<this.length;r++){var n=this[r];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},parsedStyle:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],a=n.cy();if(a.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[e];return i??(r?a.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},style:function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var a=!1,i=n.style();if(_e(e)){var o=e;i.applyBypass(this,o,a),this.emitAndNotify("style")}else if(be(e))if(r===void 0){var l=this[0];return l?i.getStylePropertyValue(l,e):void 0}else i.applyBypass(this,e,r,a),this.emitAndNotify("style");else if(e===void 0){var u=this[0];return u?i.getRawStyle(u):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,a=r.style(),i=this;if(e===void 0)for(var o=0;o<i.length;o++){var l=i[o];a.removeAllBypasses(l,n)}else{e=e.split(/\s+/);for(var u=0;u<i.length;u++){var c=i[u];a.removeBypasses(c,e,n)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var r=e.hasCompoundNodes(),n=this[0];if(n){var a=n._private,i=n.pstyle("opacity").value;if(!r)return i;var o=a.data.parent?n.parents():null;if(o)for(var l=0;l<o.length;l++){var u=o[l],c=u.pstyle("opacity").value;i=c*i}return i}},transparent:function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0],n=r.cy().hasCompoundNodes();if(r)return n?r.effectiveOpacity()===0:r.pstyle("opacity").value===0},backgrounding:function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding}};function pc(t,e){var r=t._private,n=r.data.parent?t.parents():null;if(n)for(var a=0;a<n.length;a++){var i=n[a];if(!e(i))return!1}return!0}function vc(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,n=t.parentOk||t.ok;return function(){var a=this.cy();if(!a.styleEnabled())return!0;var i=this[0],o=a.hasCompoundNodes();if(i){var l=i._private;if(!e(i))return!1;if(i.isNode())return!o||pc(i,n);var u=l.source,c=l.target;return r(u)&&(!o||pc(u,r))&&(u===c||r(c)&&(!o||pc(c,r)))}}}var Oa=os("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});Ct.takesUpSpace=ss("takesUpSpace",vc({ok:Oa}));var G3=os("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&Oa(t)}),W3=os("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&Oa(t)});Ct.interactive=ss("interactive",vc({ok:G3,parentOk:W3,edgeOkViaNode:Oa})),Ct.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var j3=os("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&Oa(t)}),Y3=Oa;Ct.visible=ss("visible",vc({ok:j3,edgeOkViaNode:Y3})),Ct.hidden=function(){var t=this[0];if(t)return!t.visible()},Ct.isBundledBezier=ss("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1}),Ct.bypass=Ct.css=Ct.style,Ct.renderedCss=Ct.renderedStyle,Ct.removeBypass=Ct.removeCss=Ct.removeStyle,Ct.pstyle=Ct.parsedStyle;var vn={};function nv(t){return function(){var e=arguments,r=[];if(e.length===2){var n=e[0],a=e[1];this.on(t.event,n,a)}else if(e.length===1&&Ye(e[0])){var i=e[0];this.on(t.event,i)}else if(e.length===0||e.length===1&&He(e[0])){for(var o=e.length===1?e[0]:null,l=0;l<this.length;l++){var u=this[l],c=!t.ableField||u._private[t.ableField],d=u._private[t.field]!=t.value;if(t.overrideAble){var f=t.overrideAble(u);if(f!==void 0&&(c=f,!f))return this}c&&(u._private[t.field]=t.value,d&&r.push(u))}var p=this.spawn(r);p.updateStyle(),p.emit(t.event),o&&p.emit(o)}return this}}function _a(t){vn[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(r!==void 0)return r}return e._private[t.field]}},vn[t.on]=nv({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),vn[t.off]=nv({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}_a({field:"locked",overrideField:function(e){return e.cy().autolock()?!0:void 0},on:"lock",off:"unlock"}),_a({field:"grabbable",overrideField:function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0},on:"grabify",off:"ungrabify"}),_a({field:"selected",ableField:"selectable",overrideAble:function(e){return e.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"}),_a({field:"selectable",overrideField:function(e){return e.cy().autounselectify()?!1:void 0},on:"selectify",off:"unselectify"}),vn.deselect=vn.unselect,vn.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},_a({field:"active",on:"activate",off:"unactivate"}),_a({field:"pannable",on:"panify",off:"unpanify"}),vn.inactive=function(){var t=this[0];if(t)return!t._private.active};var Tt={},av=function(e){return function(n){for(var a=this,i=[],o=0;o<a.length;o++){var l=a[o];if(l.isNode()){for(var u=!1,c=l.connectedEdges(),d=0;d<c.length;d++){var f=c[d],p=f.source(),v=f.target();if(e.noIncomingEdges&&v===l&&p!==l||e.noOutgoingEdges&&p===l&&v!==l){u=!0;break}}u||i.push(l)}}return this.spawn(i,!0).filter(n)}},iv=function(e){return function(r){for(var n=this,a=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode())for(var l=o.connectedEdges(),u=0;u<l.length;u++){var c=l[u],d=c.source(),f=c.target();e.outgoing&&d===o?(a.push(c),a.push(f)):e.incoming&&f===o&&(a.push(c),a.push(d))}}return this.spawn(a,!0).filter(r)}},ov=function(e){return function(r){for(var n=this,a=[],i={};;){var o=e.outgoing?n.outgoers():n.incomers();if(o.length===0)break;for(var l=!1,u=0;u<o.length;u++){var c=o[u],d=c.id();i[d]||(i[d]=!0,a.push(c),l=!0)}if(!l)break;n=o}return this.spawn(a,!0).filter(r)}};Tt.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},xe(Tt,{roots:av({noIncomingEdges:!0}),leaves:av({noOutgoingEdges:!0}),outgoers:Qt(iv({outgoing:!0}),"outgoers"),successors:ov({outgoing:!0}),incomers:Qt(iv({incoming:!0}),"incomers"),predecessors:ov({incoming:!0})}),xe(Tt,{neighborhood:Qt(function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var a=r[n],i=a.connectedEdges(),o=0;o<i.length;o++){var l=i[o],u=l.source(),c=l.target(),d=a===u?c:u;d.length>0&&e.push(d[0]),e.push(l[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),Tt.neighbourhood=Tt.neighborhood,Tt.closedNeighbourhood=Tt.closedNeighborhood,Tt.openNeighbourhood=Tt.openNeighborhood,xe(Tt,{source:Qt(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"source"),target:Qt(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"target"),sources:sv({attr:"source"}),targets:sv({attr:"target"})});function sv(t){return function(r){for(var n=[],a=0;a<this.length;a++){var i=this[a],o=i._private[t.attr];o&&n.push(o)}return this.spawn(n,!0).filter(r)}}xe(Tt,{edgesWith:Qt(lv(),"edgesWith"),edgesTo:Qt(lv({thisIsSrc:!0}),"edgesTo")});function lv(t){return function(r){var n=[],a=this._private.cy,i=t||{};be(r)&&(r=a.$(r));for(var o=0;o<r.length;o++)for(var l=r[o]._private.edges,u=0;u<l.length;u++){var c=l[u],d=c._private.data,f=this.hasElementWithId(d.source)&&r.hasElementWithId(d.target),p=r.hasElementWithId(d.source)&&this.hasElementWithId(d.target),v=f||p;v&&((i.thisIsSrc||i.thisIsTgt)&&(i.thisIsSrc&&!f||i.thisIsTgt&&!p)||n.push(c))}return this.spawn(n,!0)}}xe(Tt,{connectedEdges:Qt(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var a=r[n];if(a.isNode())for(var i=a._private.edges,o=0;o<i.length;o++){var l=i[o];e.push(l)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:Qt(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var a=r[n];a.isEdge()&&(e.push(a.source()[0]),e.push(a.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:Qt(cv(),"parallelEdges"),codirectedEdges:Qt(cv({codirected:!0}),"codirectedEdges")});function cv(t){var e={codirected:!1};return t=xe({},e,t),function(n){for(var a=[],i=this.edges(),o=t,l=0;l<i.length;l++)for(var u=i[l],c=u._private,d=c.source,f=d._private.data.id,p=c.data.target,v=d._private.edges,h=0;h<v.length;h++){var g=v[h],y=g._private.data,m=y.target,b=y.source,w=m===p&&b===f,C=f===m&&p===b;(o.codirected&&w||!o.codirected&&(w||C))&&a.push(g)}return this.spawn(a,!0).filter(n)}}xe(Tt,{components:function(e){var r=this,n=r.cy(),a=n.collection(),i=e==null?r.nodes():e.nodes(),o=[];e!=null&&i.empty()&&(i=e.sources());var l=function(d,f){a.merge(d),i.unmerge(d),f.merge(d)};if(i.empty())return r.spawn();var u=function(){var d=n.collection();o.push(d);var f=i[0];l(f,d),r.bfs({directed:!1,roots:f,visit:function(v){return l(v,d)}}),d.forEach(function(p){p.connectedEdges().forEach(function(v){r.has(v)&&d.has(v.source())&&d.has(v.target())&&d.merge(v)})})};do u();while(i.length>0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),Tt.componentsOf=Tt.components;var kt=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Xe("A collection must have a reference to the core");return}var i=new wr,o=!1;if(!r)r=[];else if(r.length>0&&_e(r[0])&&!vi(r[0])){o=!0;for(var l=[],u=new ga,c=0,d=r.length;c<d;c++){var f=r[c];f.data==null&&(f.data={});var p=f.data;if(p.id==null)p.id=$h();else if(e.hasElementWithId(p.id)||u.has(p.id))continue;var v=new Io(e,f,!1);l.push(v),u.add(p.id)}r=l}this.length=0;for(var h=0,g=r.length;h<g;h++){var y=r[h][0];if(y!=null){var m=y._private.data.id;(!n||!i.has(m))&&(n&&i.set(m,{index:this.length,ele:y}),this[this.length]=y,this.length++)}}this._private={eles:this,cy:e,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(b){this.lazyMap=b},rebuildMap:function(){for(var w=this.lazyMap=new wr,C=this.eles,x=0;x<C.length;x++){var E=C[x];w.set(E.id(),{index:x,ele:E})}}},n&&(this._private.map=i),o&&!a&&this.restore()},qe=Io.prototype=kt.prototype=Object.create(Array.prototype);qe.instanceString=function(){return"collection"},qe.spawn=function(t,e){return new kt(this.cy(),t,e)},qe.spawnSelf=function(){return this.spawn(this)},qe.cy=function(){return this._private.cy},qe.renderer=function(){return this._private.cy.renderer()},qe.element=function(){return this[0]},qe.collection=function(){return wh(this)?this:new kt(this._private.cy,[this])},qe.unique=function(){return new kt(this._private.cy,this,!0)},qe.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)},qe.getElementById=function(t){t=""+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new kt(e)},qe.$id=qe.getElementById,qe.poolIndex=function(){var t=this._private.cy,e=t._private.elements,r=this[0]._private.data.id;return e._private.map.get(r).index},qe.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index},qe.indexOfId=function(t){return t=""+t,this._private.map.get(t).index},qe.json=function(t){var e=this.element(),r=this.cy();if(e==null&&t)return this;if(e!=null){var n=e._private;if(_e(t)){if(r.startBatch(),t.data){e.data(t.data);var a=n.data;if(e.isEdge()){var i=!1,o={},l=t.data.source,u=t.data.target;l!=null&&l!=a.source&&(o.source=""+l,i=!0),u!=null&&u!=a.target&&(o.target=""+u,i=!0),i&&(e=e.move(o))}else{var c="parent"in t.data,d=t.data.parent;c&&(d!=null||a.parent!=null)&&d!=a.parent&&(d===void 0&&(d=null),d!=null&&(d=""+d),e=e.move({parent:d}))}}t.position&&e.position(t.position);var f=function(g,y,m){var b=t[g];b!=null&&b!==n[g]&&(b?e[y]():e[m]())};return f("removed","remove","restore"),f("selected","select","unselect"),f("selectable","selectify","unselectify"),f("locked","lock","unlock"),f("grabbable","grabify","ungrabify"),f("pannable","panify","unpanify"),t.classes!=null&&e.classes(t.classes),r.endBatch(),this}else if(t===void 0){var p={data:br(n.data),position:br(n.position),group:n.group,removed:n.removed,selected:n.selected,selectable:n.selectable,locked:n.locked,grabbable:n.grabbable,pannable:n.pannable,classes:null};p.classes="";var v=0;return n.classes.forEach(function(h){return p.classes+=v++===0?h:" "+h}),p}}},qe.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e],n=r.json();t.push(n)}return t},qe.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r],a=n.json(),i=new Io(t,a,!1);e.push(i)}return new kt(t,e)},qe.copy=qe.clone,qe.restore=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),a=n._private,i=[],o=[],l,u=0,c=r.length;u<c;u++){var d=r[u];e&&!d.removed()||(d.isNode()?i.push(d):o.push(d))}l=i.concat(o);var f,p=function(){l.splice(f,1),f--};for(f=0;f<l.length;f++){var v=l[f],h=v._private,g=h.data;if(v.clearTraversalCache(),!(!e&&!h.removed)){if(g.id===void 0)g.id=$h();else if(le(g.id))g.id=""+g.id;else if(nn(g.id)||!be(g.id)){Xe("Can not create element with invalid string ID `"+g.id+"`"),p();continue}else if(n.hasElementWithId(g.id)){Xe("Can not create second element with ID `"+g.id+"`"),p();continue}}var y=g.id;if(v.isNode()){var m=h.position;m.x==null&&(m.x=0),m.y==null&&(m.y=0)}if(v.isEdge()){for(var b=v,w=["source","target"],C=w.length,x=!1,E=0;E<C;E++){var k=w[E],B=g[k];le(B)&&(B=g[k]=""+g[k]),B==null||B===""?(Xe("Can not create edge `"+y+"` with unspecified "+k),x=!0):n.hasElementWithId(B)||(Xe("Can not create edge `"+y+"` with nonexistant "+k+" `"+B+"`"),x=!0)}if(x){p();continue}var S=n.getElementById(g.source),N=n.getElementById(g.target);S.same(N)?S._private.edges.push(b):(S._private.edges.push(b),N._private.edges.push(b)),b._private.source=S,b._private.target=N}h.map=new wr,h.map.set(y,{ele:v,index:0}),h.removed=!1,e&&n.addToPool(v)}for(var D=0;D<i.length;D++){var P=i[D],F=P._private.data;le(F.parent)&&(F.parent=""+F.parent);var O=F.parent,I=O!=null;if(I||P._private.parent){var _=P._private.parent?n.collection().merge(P._private.parent):n.getElementById(O);if(_.empty())F.parent=void 0;else if(_[0].removed())Ae("Node added with missing parent, reference to parent removed"),F.parent=void 0,P._private.parent=null;else{for(var M=!1,L=_;!L.empty();){if(P.same(L)){M=!0,F.parent=void 0;break}L=L.parent()}M||(_[0]._private.children.push(P),P._private.parent=_[0],a.hasCompoundNodes=!0)}}}if(l.length>0){for(var R=l.length===r.length?r:new kt(n,l),H=0;H<R.length;H++){var $=R[H];$.isNode()||($.parallelEdges().clearTraversalCache(),$.source().clearTraversalCache(),$.target().clearTraversalCache())}var z;a.hasCompoundNodes?z=n.collection().merge(R).merge(R.connectedNodes()).merge(R.parent()):z=R,z.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?R.emitAndNotify("add"):e&&R.emit("add")}return r},qe.removed=function(){var t=this[0];return t&&t._private.removed},qe.inside=function(){var t=this[0];return t&&!t._private.removed},qe.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],a={},i=r._private.cy;function o(O){for(var I=O._private.edges,_=0;_<I.length;_++)u(I[_])}function l(O){for(var I=O._private.children,_=0;_<I.length;_++)u(I[_])}function u(O){var I=a[O.id()];e&&O.removed()||I||(a[O.id()]=!0,O.isNode()?(n.push(O),o(O),l(O)):n.unshift(O))}for(var c=0,d=r.length;c<d;c++){var f=r[c];u(f)}function p(O,I){var _=O._private.edges;on(_,I),O.clearTraversalCache()}function v(O){O.clearTraversalCache()}var h=[];h.ids={};function g(O,I){I=I[0],O=O[0];var _=O._private.children,M=O.id();on(_,I),I._private.parent=null,h.ids[M]||(h.ids[M]=!0,h.push(O))}r.dirtyCompoundBoundsCache(),e&&i.removeFromPool(n);for(var y=0;y<n.length;y++){var m=n[y];if(m.isEdge()){var b=m.source()[0],w=m.target()[0];p(b,m),p(w,m);for(var C=m.parallelEdges(),x=0;x<C.length;x++){var E=C[x];v(E),E.isBundledBezier()&&E.dirtyBoundingBoxCache()}}else{var k=m.parent();k.length!==0&&g(k,m)}e&&(m._private.removed=!0)}var B=i._private.elements;i._private.hasCompoundNodes=!1;for(var S=0;S<B.length;S++){var N=B[S];if(N.isParent()){i._private.hasCompoundNodes=!0;break}}var D=new kt(this.cy(),n);D.size()>0&&(t?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var P=0;P<h.length;P++){var F=h[P];(!e||!F.removed())&&F.updateStyle()}return D},qe.move=function(t){var e=this._private.cy,r=this,n=!1,a=!1,i=function(h){return h==null?h:""+h};if(t.source!==void 0||t.target!==void 0){var o=i(t.source),l=i(t.target),u=o!=null&&e.hasElementWithId(o),c=l!=null&&e.hasElementWithId(l);(u||c)&&(e.batch(function(){r.remove(n,a),r.emitAndNotify("moveout");for(var v=0;v<r.length;v++){var h=r[v],g=h._private.data;h.isEdge()&&(u&&(g.source=o),c&&(g.target=l))}r.restore(n,a)}),r.emitAndNotify("move"))}else if(t.parent!==void 0){var d=i(t.parent),f=d===null||e.hasElementWithId(d);if(f){var p=d===null?void 0:d;e.batch(function(){var v=r.remove(n,a);v.emitAndNotify("moveout");for(var h=0;h<r.length;h++){var g=r[h],y=g._private.data;g.isNode()&&(y.parent=p)}v.restore(n,a)}),r.emitAndNotify("move")}}return this},[hp,o3,Qo,fn,Na,k3,Jo,R3,Jp,ev,K3,as,is,Ct,vn,Tt].forEach(function(t){xe(qe,t)});var X3={add:function(e){var r,n=this;if(Ut(e)){var a=e;if(a._private.cy===n)r=a.restore();else{for(var i=[],o=0;o<a.length;o++){var l=a[o];i.push(l.json())}r=new kt(n,i)}}else if(He(e)){var u=e;r=new kt(n,u)}else if(_e(e)&&(He(e.nodes)||He(e.edges))){for(var c=e,d=[],f=["nodes","edges"],p=0,v=f.length;p<v;p++){var h=f[p],g=c[h];if(He(g))for(var y=0,m=g.length;y<m;y++){var b=xe({group:h},g[y]);d.push(b)}}r=new kt(n,d)}else{var w=e;r=new Io(n,w).collection()}return r},remove:function(e){if(!Ut(e)){if(be(e)){var r=e;e=this.$(r)}}return e.remove()}};/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */function Z3(t,e,r,n){var a=4,i=.001,o=1e-7,l=10,u=11,c=1/(u-1),d=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var f=0;f<4;++f)if(typeof arguments[f]!="number"||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var p=d?new Float32Array(u):new Array(u);function v(N,D){return 1-3*D+3*N}function h(N,D){return 3*D-6*N}function g(N){return 3*N}function y(N,D,P){return((v(D,P)*N+h(D,P))*N+g(D))*N}function m(N,D,P){return 3*v(D,P)*N*N+2*h(D,P)*N+g(D)}function b(N,D){for(var P=0;P<a;++P){var F=m(D,t,r);if(F===0)return D;var O=y(D,t,r)-N;D-=O/F}return D}function w(){for(var N=0;N<u;++N)p[N]=y(N*c,t,r)}function C(N,D,P){var F,O,I=0;do O=D+(P-D)/2,F=y(O,t,r)-N,F>0?P=O:D=O;while(Math.abs(F)>o&&++I<l);return O}function x(N){for(var D=0,P=1,F=u-1;P!==F&&p[P]<=N;++P)D+=c;--P;var O=(N-p[P])/(p[P+1]-p[P]),I=D+O*c,_=m(I,t,r);return _>=i?b(N,I):_===0?I:C(N,D,D+c)}var E=!1;function k(){E=!0,(t!==e||r!==n)&&w()}var B=function(D){return E||k(),t===e&&r===n?D:D===0?0:D===1?1:y(x(D),e,n)};B.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var S="generateBezier("+[t,e,r,n]+")";return B.toString=function(){return S},B}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var Q3=function(){function t(n){return-n.tension*n.x-n.friction*n.v}function e(n,a,i){var o={x:n.x+i.dx*a,v:n.v+i.dv*a,tension:n.tension,friction:n.friction};return{dx:o.v,dv:t(o)}}function r(n,a){var i={dx:n.v,dv:t(n)},o=e(n,a*.5,i),l=e(n,a*.5,o),u=e(n,a,l),c=1/6*(i.dx+2*(o.dx+l.dx)+u.dx),d=1/6*(i.dv+2*(o.dv+l.dv)+u.dv);return n.x=n.x+c*a,n.v=n.v+d*a,n}return function n(a,i,o){var l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1/1e4,f=16/1e3,p,v,h;for(a=parseFloat(a)||500,i=parseFloat(i)||20,o=o||null,l.tension=a,l.friction=i,p=o!==null,p?(c=n(a,i),v=c/o*f):v=f;h=r(h||l,v),u.push(1+h.x),c+=16,Math.abs(h.x)>d&&Math.abs(h.v)>d;);return p?function(g){return u[g*(u.length-1)|0]}:c}}(),Ue=function(e,r,n,a){var i=Z3(e,r,n,a);return function(o,l,u){return o+(l-o)*i(u)}},ls={linear:function(e,r,n){return e+(r-e)*n},ease:Ue(.25,.1,.25,1),"ease-in":Ue(.42,0,1,1),"ease-out":Ue(0,0,.58,1),"ease-in-out":Ue(.42,0,.58,1),"ease-in-sine":Ue(.47,0,.745,.715),"ease-out-sine":Ue(.39,.575,.565,1),"ease-in-out-sine":Ue(.445,.05,.55,.95),"ease-in-quad":Ue(.55,.085,.68,.53),"ease-out-quad":Ue(.25,.46,.45,.94),"ease-in-out-quad":Ue(.455,.03,.515,.955),"ease-in-cubic":Ue(.55,.055,.675,.19),"ease-out-cubic":Ue(.215,.61,.355,1),"ease-in-out-cubic":Ue(.645,.045,.355,1),"ease-in-quart":Ue(.895,.03,.685,.22),"ease-out-quart":Ue(.165,.84,.44,1),"ease-in-out-quart":Ue(.77,0,.175,1),"ease-in-quint":Ue(.755,.05,.855,.06),"ease-out-quint":Ue(.23,1,.32,1),"ease-in-out-quint":Ue(.86,0,.07,1),"ease-in-expo":Ue(.95,.05,.795,.035),"ease-out-expo":Ue(.19,1,.22,1),"ease-in-out-expo":Ue(1,0,0,1),"ease-in-circ":Ue(.6,.04,.98,.335),"ease-out-circ":Ue(.075,.82,.165,1),"ease-in-out-circ":Ue(.785,.135,.15,.86),spring:function(e,r,n){if(n===0)return ls.linear;var a=Q3(e,r,n);return function(i,o,l){return i+(o-i)*a(l)}},"cubic-bezier":Ue};function uv(t,e,r,n,a){if(n===1||e===r)return r;var i=a(e,r,n);return t==null||((t.roundValue||t.color)&&(i=Math.round(i)),t.min!==void 0&&(i=Math.max(i,t.min)),t.max!==void 0&&(i=Math.min(i,t.max))),i}function dv(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Fa(t,e,r,n,a){var i=a!=null?a.type:null;r<0?r=0:r>1&&(r=1);var o=dv(t,a),l=dv(e,a);if(le(o)&&le(l))return uv(i,o,l,r,n);if(He(o)&&He(l)){for(var u=[],c=0;c<l.length;c++){var d=o[c],f=l[c];if(d!=null&&f!=null){var p=uv(i,d,f,r,n);u.push(p)}else u.push(f)}return u}}function J3(t,e,r,n){var a=!n,i=t._private,o=e._private,l=o.easing,u=o.startTime,c=n?t:t.cy(),d=c.style();if(!o.easingImpl)if(l==null)o.easingImpl=ls.linear;else{var f;if(be(l)){var p=d.parse("transition-timing-function",l);f=p.value}else f=l;var v,h;be(f)?(v=f,h=[]):(v=f[1],h=f.slice(2).map(function(R){return+R})),h.length>0?(v==="spring"&&h.push(o.duration),o.easingImpl=ls[v].apply(null,h)):o.easingImpl=ls[v]}var g=o.easingImpl,y;if(o.duration===0?y=1:y=(r-u)/o.duration,o.applying&&(y=o.progress),y<0?y=0:y>1&&(y=1),o.delay==null){var m=o.startPosition,b=o.position;if(b&&a&&!t.locked()){var w={};Ii(m.x,b.x)&&(w.x=Fa(m.x,b.x,y,g)),Ii(m.y,b.y)&&(w.y=Fa(m.y,b.y,y,g)),t.position(w)}var C=o.startPan,x=o.pan,E=i.pan,k=x!=null&&n;k&&(Ii(C.x,x.x)&&(E.x=Fa(C.x,x.x,y,g)),Ii(C.y,x.y)&&(E.y=Fa(C.y,x.y,y,g)),t.emit("pan"));var B=o.startZoom,S=o.zoom,N=S!=null&&n;N&&(Ii(B,S)&&(i.zoom=Si(i.minZoom,Fa(B,S,y,g),i.maxZoom)),t.emit("zoom")),(k||N)&&t.emit("viewport");var D=o.style;if(D&&D.length>0&&a){for(var P=0;P<D.length;P++){var F=D[P],O=F.name,I=F,_=o.startStyle[O],M=d.properties[_.name],L=Fa(_,I,y,g,M);d.overrideBypass(t,O,L)}t.emit("style")}}return o.progress=y,y}function Ii(t,e){return t==null||e==null?!1:le(t)&&le(e)?!0:!!(t&&e)}function eD(t,e,r,n){var a=e._private;a.started=!0,a.startTime=r-a.progress*a.duration}function fv(t,e){var r=e._private.aniEles,n=[];function a(d,f){var p=d._private,v=p.animation.current,h=p.animation.queue,g=!1;if(v.length===0){var y=h.shift();y&&v.push(y)}for(var m=function(E){for(var k=E.length-1;k>=0;k--){var B=E[k];B()}E.splice(0,E.length)},b=v.length-1;b>=0;b--){var w=v[b],C=w._private;if(C.stopped){v.splice(b,1),C.hooked=!1,C.playing=!1,C.started=!1,m(C.frames);continue}!C.playing&&!C.applying||(C.playing&&C.applying&&(C.applying=!1),C.started||eD(d,w,t),J3(d,w,t,f),C.applying&&(C.applying=!1),m(C.frames),C.step!=null&&C.step(t),w.completed()&&(v.splice(b,1),C.hooked=!1,C.playing=!1,C.started=!1,m(C.completes)),g=!0)}return!f&&v.length===0&&h.length===0&&n.push(d),g}for(var i=!1,o=0;o<r.length;o++){var l=r[o],u=a(l);i=i||u}var c=a(e,!0);(i||c)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}var tD={animate:Re.animate(),animation:Re.animation(),animated:Re.animated(),clearQueue:Re.clearQueue(),delay:Re.delay(),delayAnimation:Re.delayAnimation(),stop:Re.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&Fo(function(i){fv(i,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(i,o){fv(o,e)},n.beforeRenderPriorities.animations):r()}},rD={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var a=r.qualifier;return a!=null?e!==n.target&&vi(n.target)&&a.matches(n.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e}},cs=function(e){return be(e)?new un(e):e},hv={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new rs(rD,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,n){return this.emitter().on(e,cs(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,cs(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,cs(r),n),this},once:function(e,r,n){return this.emitter().one(e,cs(r),n),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};Re.eventAliasesOn(hv);var gc={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};gc.jpeg=gc.jpg;var us={layout:function(e){var r=this;if(e==null){Xe("Layout options must be specified to make a layout");return}if(e.name==null){Xe("A `name` must be specified to make a layout");return}var n=e.name,a=r.extension("layout",n);if(a==null){Xe("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;be(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var o=new a(xe({},e,{cy:r,eles:i}));return o}};us.createLayout=us.makeLayout=us.layout;var nD={notify:function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var a=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&a.merge(r);return}if(n.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var a=e.batchNotifications[n];a.empty()?r.notify(n):r.notify(n,a)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),a=0;a<n.length;a++){var i=n[a],o=e[i],l=r.getElementById(i);l.data(o)}})}},aD=wt({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),mc={renderTo:function(e,r,n,a){var i=this._private.renderer;return i.renderTo(e,r,n,a),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(e){var r=this,n=r.extension("renderer",e.name);if(n==null){Xe("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}e.wheelSensitivity!==void 0&&Ae("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var a=aD(e);a.cy=r,r._private.renderer=new n(a),this.notify("init")},destroyRenderer:function(){var e=this;e.notify("destroy");var r=e.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var a=n._private;a.rscratch={},a.rstyle={},a.animation.current=[],a.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};mc.invalidateDimensions=mc.resize;var ds={collection:function(e,r){return be(e)?this.$(e):Ut(e)?e.collection():He(e)?(r||(r={}),new kt(this,e,r.unique,r.removed)):new kt(this)},nodes:function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};ds.elements=ds.filter=ds.$;var Bt={},Ai="t",iD="f";Bt.apply=function(t){for(var e=this,r=e._private,n=r.cy,a=n.collection(),i=0;i<t.length;i++){var o=t[i],l=e.getContextMeta(o);if(!l.empty){var u=e.getContextStyle(l),c=e.applyContextStyle(l,u,o);o._private.appliedInitStyle?e.updateTransitions(o,c.diffProps):o._private.appliedInitStyle=!0;var d=e.updateStyleHints(o);d&&a.push(o)}}return a},Bt.getPropertiesDiff=function(t,e){var r=this,n=r._private.propDiffs=r._private.propDiffs||{},a=t+"-"+e,i=n[a];if(i)return i;for(var o=[],l={},u=0;u<r.length;u++){var c=r[u],d=t[u]===Ai,f=e[u]===Ai,p=d!==f,v=c.mappedProperties.length>0;if(p||f&&v){var h=void 0;p&&v||p?h=c.properties:v&&(h=c.mappedProperties);for(var g=0;g<h.length;g++){for(var y=h[g],m=y.name,b=!1,w=u+1;w<r.length;w++){var C=r[w],x=e[w]===Ai;if(x&&(b=C.properties[y.name]!=null,b))break}!l[m]&&!b&&(l[m]=!0,o.push(m))}}}return n[a]=o,o},Bt.getContextMeta=function(t){for(var e=this,r="",n,a=t._private.styleCxtKey||"",i=0;i<e.length;i++){var o=e[i],l=o.selector&&o.selector.matches(t);l?r+=Ai:r+=iD}return n=e.getPropertiesDiff(a,r),t._private.styleCxtKey=r,{key:r,diffPropNames:n,empty:n.length===0}},Bt.getContextStyle=function(t){var e=t.key,r=this,n=this._private.contextStyles=this._private.contextStyles||{};if(n[e])return n[e];for(var a={_private:{key:e}},i=0;i<r.length;i++){var o=r[i],l=e[i]===Ai;if(l)for(var u=0;u<o.properties.length;u++){var c=o.properties[u];a[c.name]=c}}return n[e]=a,a},Bt.applyContextStyle=function(t,e,r){for(var n=this,a=t.diffPropNames,i={},o=n.types,l=0;l<a.length;l++){var u=a[l],c=e[u],d=r.pstyle(u);if(!c)if(d)d.bypass?c={name:u,deleteBypassed:!0}:c={name:u,delete:!0};else continue;if(d!==c){if(c.mapped===o.fn&&d!=null&&d.mapping!=null&&d.mapping.value===c.value){var f=d.mapping,p=f.fnValue=c.value(r);if(p===f.prevFnValue)continue}var v=i[u]={prev:d};n.applyParsedProperty(r,c),v.next=r.pstyle(u),v.next&&v.next.bypass&&(v.next=v.next.bypassed)}}return{diffProps:i}},Bt.updateStyleHints=function(t){var e=t._private,r=this,n=r.propertyGroupNames,a=r.propertyGroupKeys,i=function(W,oe,he){return r.getPropertiesHash(W,oe,he)},o=e.styleKey;if(t.removed())return!1;var l=e.group==="nodes",u=t._private.style;n=Object.keys(u);for(var c=0;c<a.length;c++){var d=a[c];e.styleKeys[d]=[va,wi]}for(var f=function(W,oe){return e.styleKeys[oe][0]=Ci(W,e.styleKeys[oe][0])},p=function(W,oe){return e.styleKeys[oe][1]=ki(W,e.styleKeys[oe][1])},v=function(W,oe){f(W,oe),p(W,oe)},h=function(W,oe){for(var he=0;he<W.length;he++){var ne=W.charCodeAt(he);f(ne,oe),p(ne,oe)}},g=2e9,y=function(W){return-128<W&&W<128&&Math.floor(W)!==W?g-(W*1024|0):W},m=0;m<n.length;m++){var b=n[m],w=u[b];if(w!=null){var C=this.properties[b],x=C.type,E=C.groupKey,k=void 0;C.hashOverride!=null?k=C.hashOverride(t,w):w.pfValue!=null&&(k=w.pfValue);var B=C.enums==null?w.value:null,S=k!=null,N=B!=null,D=S||N,P=w.units;if(x.number&&D&&!x.multiple){var F=S?k:B;v(y(F),E),!S&&P!=null&&h(P,E)}else h(w.strValue,E)}}for(var O=[va,wi],I=0;I<a.length;I++){var _=a[I],M=e.styleKeys[_];O[0]=Ci(M[0],O[0]),O[1]=ki(M[1],O[1])}e.styleKey=uB(O[0],O[1]);var L=e.styleKeys;e.labelDimsKey=an(L.labelDimensions);var R=i(t,["label"],L.labelDimensions);if(e.labelKey=an(R),e.labelStyleKey=an(Lo(L.commonLabel,R)),!l){var H=i(t,["source-label"],L.labelDimensions);e.sourceLabelKey=an(H),e.sourceLabelStyleKey=an(Lo(L.commonLabel,H));var $=i(t,["target-label"],L.labelDimensions);e.targetLabelKey=an($),e.targetLabelStyleKey=an(Lo(L.commonLabel,$))}if(l){var z=e.styleKeys,j=z.nodeBody,ee=z.nodeBorder,J=z.nodeOutline,Z=z.backgroundImage,re=z.compound,Y=z.pie,A=[j,ee,J,Z,re,Y].filter(function(K){return K!=null}).reduce(Lo,[va,wi]);e.nodeKey=an(A),e.hasPie=Y!=null&&Y[0]!==va&&Y[1]!==wi}return o!==e.styleKey},Bt.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null},Bt.applyParsedProperty=function(t,e){var r=this,n=e,a=t._private.style,i,o=r.types,l=r.properties[n.name].type,u=n.bypass,c=a[n.name],d=c&&c.bypass,f=t._private,p="mapping",v=function(j){return j==null?null:j.pfValue!=null?j.pfValue:j.value},h=function(){var j=v(c),ee=v(n);r.checkTriggers(t,n.name,j,ee)};if(e.name==="curve-style"&&t.isEdge()&&(e.value!=="bezier"&&t.isLoop()||e.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(n=e=this.parse(e.name,"bezier",u)),n.delete)return a[n.name]=void 0,h(),!0;if(n.deleteBypassed)return c?c.bypass?(c.bypassed=void 0,h(),!0):!1:(h(),!0);if(n.deleteBypass)return c?c.bypass?(a[n.name]=c.bypassed,h(),!0):!1:(h(),!0);var g=function(){Ae("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+n.name+"` with data field `"+n.field+"`); try a `["+n.field+"]` selector to limit scope to elements with `"+n.field+"` defined")};switch(n.mapped){case o.mapData:{for(var y=n.field.split("."),m=f.data,b=0;b<y.length&&m;b++){var w=y[b];m=m[w]}if(m==null)return g(),!1;var C;if(le(m)){var x=n.fieldMax-n.fieldMin;x===0?C=0:C=(m-n.fieldMin)/x}else return Ae("Do not use continuous mappers without specifying numeric data (i.e. `"+n.field+": "+m+"` for `"+t.id()+"` is non-numeric)"),!1;if(C<0?C=0:C>1&&(C=1),l.color){var E=n.valueMin[0],k=n.valueMax[0],B=n.valueMin[1],S=n.valueMax[1],N=n.valueMin[2],D=n.valueMax[2],P=n.valueMin[3]==null?1:n.valueMin[3],F=n.valueMax[3]==null?1:n.valueMax[3],O=[Math.round(E+(k-E)*C),Math.round(B+(S-B)*C),Math.round(N+(D-N)*C),Math.round(P+(F-P)*C)];i={bypass:n.bypass,name:n.name,value:O,strValue:"rgb("+O[0]+", "+O[1]+", "+O[2]+")"}}else if(l.number){var I=n.valueMin+(n.valueMax-n.valueMin)*C;i=this.parse(n.name,I,n.bypass,p)}else return!1;if(!i)return g(),!1;i.mapping=n,n=i;break}case o.data:{for(var _=n.field.split("."),M=f.data,L=0;L<_.length&&M;L++){var R=_[L];M=M[R]}if(M!=null&&(i=this.parse(n.name,M,n.bypass,p)),!i)return g(),!1;i.mapping=n,n=i;break}case o.fn:{var H=n.value,$=n.fnValue!=null?n.fnValue:H(t);if(n.prevFnValue=$,$==null)return Ae("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+t.id()+"` is null)"),!1;if(i=this.parse(n.name,$,n.bypass,p),!i)return Ae("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+t.id()+"` is invalid)"),!1;i.mapping=br(n),n=i;break}case void 0:break;default:return!1}return u?(d?n.bypassed=c.bypassed:n.bypassed=c,a[n.name]=n):d?c.bypassed=n:a[n.name]=n,h(),!0},Bt.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),!e)n._private.style={};else for(var a=n._private.style,i=Object.keys(a),o=0;o<i.length;o++){var l=i[o],u=a[l];u!=null&&(u.bypass?u.bypassed=null:a[l]=null)}}},Bt.update=function(){var t=this._private.cy,e=t.mutableElements();e.updateStyle()},Bt.updateTransitions=function(t,e){var r=this,n=t._private,a=t.pstyle("transition-property").value,i=t.pstyle("transition-duration").pfValue,o=t.pstyle("transition-delay").pfValue;if(a.length>0&&i>0){for(var l={},u=!1,c=0;c<a.length;c++){var d=a[c],f=t.pstyle(d),p=e[d];if(p){var v=p.prev,h=v,g=p.next!=null?p.next:f,y=!1,m=void 0,b=1e-6;h&&(le(h.pfValue)&&le(g.pfValue)?(y=g.pfValue-h.pfValue,m=h.pfValue+b*y):le(h.value)&&le(g.value)?(y=g.value-h.value,m=h.value+b*y):He(h.value)&&He(g.value)&&(y=h.value[0]!==g.value[0]||h.value[1]!==g.value[1]||h.value[2]!==g.value[2],m=h.strValue),y&&(l[d]=g.strValue,this.applyBypass(t,d,m),u=!0))}}if(!u)return;n.transitioning=!0,new xa(function(w){o>0?t.delayAnimation(o).play().promise().then(w):w()}).then(function(){return t.animation({style:l,duration:i,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1)},Bt.checkTrigger=function(t,e,r,n,a,i){var o=this.properties[e],l=a(o);l!=null&&l(r,n)&&i(o)},Bt.checkZOrderTrigger=function(t,e,r,n){var a=this;this.checkTrigger(t,e,r,n,function(i){return i.triggersZOrder},function(){a._private.cy.notify("zorder",t)})},Bt.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBounds},function(a){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),a.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(r==="bezier"||n==="bezier")&&t.parallelEdges().forEach(function(i){i.isBundledBezier()&&i.dirtyBoundingBoxCache()}),a.triggersBoundsOfConnectedEdges&&e==="display"&&(r==="none"||n==="none")&&t.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})},Bt.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n)};var Ri={};Ri.applyBypass=function(t,e,r,n){var a=this,i=[],o=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var l=0;l<a.properties.length;l++){var u=a.properties[l],c=u.name,d=this.parse(c,r,!0);d&&i.push(d)}}else if(be(e)){var f=this.parse(e,r,!0);f&&i.push(f)}else if(_e(e)){var p=e;n=r;for(var v=Object.keys(p),h=0;h<v.length;h++){var g=v[h],y=p[g];if(y===void 0&&(y=p[Po(g)]),y!==void 0){var m=this.parse(g,y,!0);m&&i.push(m)}}}else return!1;if(i.length===0)return!1;for(var b=!1,w=0;w<t.length;w++){for(var C=t[w],x={},E=void 0,k=0;k<i.length;k++){var B=i[k];if(n){var S=C.pstyle(B.name);E=x[B.name]={prev:S}}b=this.applyParsedProperty(C,br(B))||b,n&&(E.next=C.pstyle(B.name))}b&&this.updateStyleHints(C),n&&this.updateTransitions(C,x,o)}return b},Ri.overrideBypass=function(t,e,r){e=zl(e);for(var n=0;n<t.length;n++){var a=t[n],i=a._private.style[e],o=this.properties[e].type,l=o.color,u=o.mutiple,c=i?i.pfValue!=null?i.pfValue:i.value:null;!i||!i.bypass?this.applyBypass(a,e,r):(i.value=r,i.pfValue!=null&&(i.pfValue=r),l?i.strValue="rgb("+r.join(",")+")":u?i.strValue=r.join(" "):i.strValue=""+r,this.updateStyleHints(a)),this.checkTriggers(a,e,c,r)}},Ri.removeAllBypasses=function(t,e){return this.removeBypasses(t,this.propertyNames,e)},Ri.removeBypasses=function(t,e,r){for(var n=!0,a=0;a<t.length;a++){for(var i=t[a],o={},l=0;l<e.length;l++){var u=e[l],c=this.properties[u],d=i.pstyle(c.name);if(!(!d||!d.bypass)){var f="",p=this.parse(u,f,!0),v=o[c.name]={prev:d};this.applyParsedProperty(i,p),v.next=i.pstyle(c.name)}}this.updateStyleHints(i),r&&this.updateTransitions(i,o,n)}};var yc={};yc.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1},yc.containerCss=function(t){var e=this._private.cy,r=e.container(),n=e.window();if(n&&r&&n.getComputedStyle)return n.getComputedStyle(r).getPropertyValue(t)};var Cr={};Cr.getRenderedStyle=function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)},Cr.getRawStyle=function(t,e){var r=this;if(t=t[0],t){for(var n={},a=0;a<r.properties.length;a++){var i=r.properties[a],o=r.getStylePropertyValue(t,i.name,e);o!=null&&(n[i.name]=o,n[Po(i.name)]=o)}return n}},Cr.getIndexedStyle=function(t,e,r,n){var a=t.pstyle(e)[r][n];return a??t.cy().style().getDefaultProperty(e)[r][0]},Cr.getStylePropertyValue=function(t,e,r){var n=this;if(t=t[0],t){var a=n.properties[e];a.alias&&(a=a.pointsTo);var i=a.type,o=t.pstyle(a.name);if(o){var l=o.value,u=o.units,c=o.strValue;if(r&&i.number&&l!=null&&le(l)){var d=t.cy().zoom(),f=function(y){return y*d},p=function(y,m){return f(y)+m},v=He(l),h=v?u.every(function(g){return g!=null}):u!=null;return h?v?l.map(function(g,y){return p(g,u[y])}).join(" "):p(l,u):v?l.map(function(g){return be(g)?g:""+f(g)}).join(" "):""+f(l)}else if(c!=null)return c}return null}},Cr.getAnimationStartStyle=function(t,e){for(var r={},n=0;n<e.length;n++){var a=e[n],i=a.name,o=t.pstyle(i);o!==void 0&&(_e(o)?o=this.parse(i,o.strValue):o=this.parse(i,o)),o&&(r[i]=o)}return r},Cr.getPropsList=function(t){var e=this,r=[],n=t,a=e.properties;if(n)for(var i=Object.keys(n),o=0;o<i.length;o++){var l=i[o],u=n[l],c=a[l]||a[zl(l)],d=this.parse(c.name,u);d&&r.push(d)}return r},Cr.getNonDefaultPropertiesHash=function(t,e,r){var n=r.slice(),a,i,o,l,u,c;for(u=0;u<e.length;u++)if(a=e[u],i=t.pstyle(a,!1),i!=null)if(i.pfValue!=null)n[0]=Ci(l,n[0]),n[1]=ki(l,n[1]);else for(o=i.strValue,c=0;c<o.length;c++)l=o.charCodeAt(c),n[0]=Ci(l,n[0]),n[1]=ki(l,n[1]);return n},Cr.getPropertiesHash=Cr.getNonDefaultPropertiesHash;var fs={};fs.appendFromJson=function(t){for(var e=this,r=0;r<t.length;r++){var n=t[r],a=n.selector,i=n.style||n.css,o=Object.keys(i);e.selector(a);for(var l=0;l<o.length;l++){var u=o[l],c=i[u];e.css(u,c)}}return e},fs.fromJson=function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e},fs.json=function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],n=r.selector,a=r.properties,i={},o=0;o<a.length;o++){var l=a[o];i[l.name]=l.strValue}t.push({selector:n?n.toString():"core",style:i})}return t};var bc={};bc.appendFromString=function(t){var e=this,r=this,n=""+t,a,i,o;n=n.replace(/[/][*](\s|.)+?[*][/]/g,"");function l(){n.length>a.length?n=n.substr(a.length):n=""}function u(){i.length>o.length?i=i.substr(o.length):i=""}for(;;){var c=n.match(/^\s*$/);if(c)break;var d=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){Ae("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}a=d[0];var f=d[1];if(f!=="core"){var p=new un(f);if(p.invalid){Ae("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),l();continue}}var v=d[2],h=!1;i=v;for(var g=[];;){var y=i.match(/^\s*$/);if(y)break;var m=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!m){Ae("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+v),h=!0;break}o=m[0];var b=m[1],w=m[2],C=e.properties[b];if(!C){Ae("Skipping property: Invalid property name in: "+o),u();continue}var x=r.parse(b,w);if(!x){Ae("Skipping property: Invalid property definition in: "+o),u();continue}g.push({name:b,val:w}),u()}if(h){l();break}r.selector(f);for(var E=0;E<g.length;E++){var k=g[E];r.css(k.name,k.val)}l()}return r},bc.fromString=function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e};var xt={};(function(){var t=lt,e=hT,r=vT,n=gT,a=mT,i=function(A){return"^"+A+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},o=function(A){var K=t+"|\\w+|"+e+"|"+r+"|"+n+"|"+a;return"^"+A+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+K+")\\s*\\,\\s*("+K+")\\)$"},l=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];xt.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:i("data")},layoutData:{mapping:!0,regex:i("layoutData")},scratch:{mapping:!0,regex:i("scratch")},mapData:{mapping:!0,regex:o("mapData")},mapLayoutData:{mapping:!0,regex:o("mapLayoutData")},mapScratch:{mapping:!0,regex:o("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:l,singleRegexMatchValue:!0},urls:{regexes:l,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(A,K){switch(A.length){case 2:return K[0]!=="deg"&&K[0]!=="rad"&&K[1]!=="deg"&&K[1]!=="rad";case 1:return be(A[0])||K[0]==="deg"||K[0]==="rad";default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(A){var K=A.length;return K===1||K===2||K===4}}};var u={zeroNonZero:function(A,K){return(A==null||K==null)&&A!==K||A==0&&K!=0?!0:A!=0&&K==0},any:function(A,K){return A!=K},emptyNonEmpty:function(A,K){var W=nn(A),oe=nn(K);return W&&!oe||!W&&oe}},c=xt.types,d=[{name:"label",type:c.text,triggersBounds:u.any,triggersZOrder:u.emptyNonEmpty},{name:"text-rotation",type:c.textRotation,triggersBounds:u.any},{name:"text-margin-x",type:c.bidirectionalSize,triggersBounds:u.any},{name:"text-margin-y",type:c.bidirectionalSize,triggersBounds:u.any}],f=[{name:"source-label",type:c.text,triggersBounds:u.any},{name:"source-text-rotation",type:c.textRotation,triggersBounds:u.any},{name:"source-text-margin-x",type:c.bidirectionalSize,triggersBounds:u.any},{name:"source-text-margin-y",type:c.bidirectionalSize,triggersBounds:u.any},{name:"source-text-offset",type:c.size,triggersBounds:u.any}],p=[{name:"target-label",type:c.text,triggersBounds:u.any},{name:"target-text-rotation",type:c.textRotation,triggersBounds:u.any},{name:"target-text-margin-x",type:c.bidirectionalSize,triggersBounds:u.any},{name:"target-text-margin-y",type:c.bidirectionalSize,triggersBounds:u.any},{name:"target-text-offset",type:c.size,triggersBounds:u.any}],v=[{name:"font-family",type:c.fontFamily,triggersBounds:u.any},{name:"font-style",type:c.fontStyle,triggersBounds:u.any},{name:"font-weight",type:c.fontWeight,triggersBounds:u.any},{name:"font-size",type:c.size,triggersBounds:u.any},{name:"text-transform",type:c.textTransform,triggersBounds:u.any},{name:"text-wrap",type:c.textWrap,triggersBounds:u.any},{name:"text-overflow-wrap",type:c.textOverflowWrap,triggersBounds:u.any},{name:"text-max-width",type:c.size,triggersBounds:u.any},{name:"text-outline-width",type:c.size,triggersBounds:u.any},{name:"line-height",type:c.positiveNumber,triggersBounds:u.any}],h=[{name:"text-valign",type:c.valign,triggersBounds:u.any},{name:"text-halign",type:c.halign,triggersBounds:u.any},{name:"color",type:c.color},{name:"text-outline-color",type:c.color},{name:"text-outline-opacity",type:c.zeroOneNumber},{name:"text-background-color",type:c.color},{name:"text-background-opacity",type:c.zeroOneNumber},{name:"text-background-padding",type:c.size,triggersBounds:u.any},{name:"text-border-opacity",type:c.zeroOneNumber},{name:"text-border-color",type:c.color},{name:"text-border-width",type:c.size,triggersBounds:u.any},{name:"text-border-style",type:c.borderStyle,triggersBounds:u.any},{name:"text-background-shape",type:c.textBackgroundShape,triggersBounds:u.any},{name:"text-justification",type:c.justification}],g=[{name:"events",type:c.bool,triggersZOrder:u.any},{name:"text-events",type:c.bool,triggersZOrder:u.any}],y=[{name:"display",type:c.display,triggersZOrder:u.any,triggersBounds:u.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:c.visibility,triggersZOrder:u.any},{name:"opacity",type:c.zeroOneNumber,triggersZOrder:u.zeroNonZero},{name:"text-opacity",type:c.zeroOneNumber},{name:"min-zoomed-font-size",type:c.size},{name:"z-compound-depth",type:c.zCompoundDepth,triggersZOrder:u.any},{name:"z-index-compare",type:c.zIndexCompare,triggersZOrder:u.any},{name:"z-index",type:c.number,triggersZOrder:u.any}],m=[{name:"overlay-padding",type:c.size,triggersBounds:u.any},{name:"overlay-color",type:c.color},{name:"overlay-opacity",type:c.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"overlay-shape",type:c.overlayShape,triggersBounds:u.any},{name:"overlay-corner-radius",type:c.cornerRadius}],b=[{name:"underlay-padding",type:c.size,triggersBounds:u.any},{name:"underlay-color",type:c.color},{name:"underlay-opacity",type:c.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"underlay-shape",type:c.overlayShape,triggersBounds:u.any},{name:"underlay-corner-radius",type:c.cornerRadius}],w=[{name:"transition-property",type:c.propList},{name:"transition-duration",type:c.time},{name:"transition-delay",type:c.time},{name:"transition-timing-function",type:c.easing}],C=function(A,K){return K.value==="label"?-A.poolIndex():K.pfValue},x=[{name:"height",type:c.nodeSize,triggersBounds:u.any,hashOverride:C},{name:"width",type:c.nodeSize,triggersBounds:u.any,hashOverride:C},{name:"shape",type:c.nodeShape,triggersBounds:u.any},{name:"shape-polygon-points",type:c.polygonPointList,triggersBounds:u.any},{name:"corner-radius",type:c.cornerRadius},{name:"background-color",type:c.color},{name:"background-fill",type:c.fill},{name:"background-opacity",type:c.zeroOneNumber},{name:"background-blacken",type:c.nOneOneNumber},{name:"background-gradient-stop-colors",type:c.colors},{name:"background-gradient-stop-positions",type:c.percentages},{name:"background-gradient-direction",type:c.gradientDirection},{name:"padding",type:c.sizeMaybePercent,triggersBounds:u.any},{name:"padding-relative-to",type:c.paddingRelativeTo,triggersBounds:u.any},{name:"bounds-expansion",type:c.boundsExpansion,triggersBounds:u.any}],E=[{name:"border-color",type:c.color},{name:"border-opacity",type:c.zeroOneNumber},{name:"border-width",type:c.size,triggersBounds:u.any},{name:"border-style",type:c.borderStyle},{name:"border-cap",type:c.lineCap},{name:"border-join",type:c.lineJoin},{name:"border-dash-pattern",type:c.numbers},{name:"border-dash-offset",type:c.number},{name:"border-position",type:c.linePosition}],k=[{name:"outline-color",type:c.color},{name:"outline-opacity",type:c.zeroOneNumber},{name:"outline-width",type:c.size,triggersBounds:u.any},{name:"outline-style",type:c.borderStyle},{name:"outline-offset",type:c.size,triggersBounds:u.any}],B=[{name:"background-image",type:c.urls},{name:"background-image-crossorigin",type:c.bgCrossOrigin},{name:"background-image-opacity",type:c.zeroOneNumbers},{name:"background-image-containment",type:c.bgContainment},{name:"background-image-smoothing",type:c.bools},{name:"background-position-x",type:c.bgPos},{name:"background-position-y",type:c.bgPos},{name:"background-width-relative-to",type:c.bgRelativeTo},{name:"background-height-relative-to",type:c.bgRelativeTo},{name:"background-repeat",type:c.bgRepeat},{name:"background-fit",type:c.bgFit},{name:"background-clip",type:c.bgClip},{name:"background-width",type:c.bgWH},{name:"background-height",type:c.bgWH},{name:"background-offset-x",type:c.bgPos},{name:"background-offset-y",type:c.bgPos}],S=[{name:"position",type:c.position,triggersBounds:u.any},{name:"compound-sizing-wrt-labels",type:c.compoundIncludeLabels,triggersBounds:u.any},{name:"min-width",type:c.size,triggersBounds:u.any},{name:"min-width-bias-left",type:c.sizeMaybePercent,triggersBounds:u.any},{name:"min-width-bias-right",type:c.sizeMaybePercent,triggersBounds:u.any},{name:"min-height",type:c.size,triggersBounds:u.any},{name:"min-height-bias-top",type:c.sizeMaybePercent,triggersBounds:u.any},{name:"min-height-bias-bottom",type:c.sizeMaybePercent,triggersBounds:u.any}],N=[{name:"line-style",type:c.lineStyle},{name:"line-color",type:c.color},{name:"line-fill",type:c.fill},{name:"line-cap",type:c.lineCap},{name:"line-opacity",type:c.zeroOneNumber},{name:"line-dash-pattern",type:c.numbers},{name:"line-dash-offset",type:c.number},{name:"line-outline-width",type:c.size},{name:"line-outline-color",type:c.color},{name:"line-gradient-stop-colors",type:c.colors},{name:"line-gradient-stop-positions",type:c.percentages},{name:"curve-style",type:c.curveStyle,triggersBounds:u.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:c.zeroOneNumber,triggersBounds:u.any},{name:"source-endpoint",type:c.edgeEndpoint,triggersBounds:u.any},{name:"target-endpoint",type:c.edgeEndpoint,triggersBounds:u.any},{name:"control-point-step-size",type:c.size,triggersBounds:u.any},{name:"control-point-distances",type:c.bidirectionalSizes,triggersBounds:u.any},{name:"control-point-weights",type:c.numbers,triggersBounds:u.any},{name:"segment-distances",type:c.bidirectionalSizes,triggersBounds:u.any},{name:"segment-weights",type:c.numbers,triggersBounds:u.any},{name:"segment-radii",type:c.numbers,triggersBounds:u.any},{name:"radius-type",type:c.radiusType,triggersBounds:u.any},{name:"taxi-turn",type:c.bidirectionalSizeMaybePercent,triggersBounds:u.any},{name:"taxi-turn-min-distance",type:c.size,triggersBounds:u.any},{name:"taxi-direction",type:c.axisDirection,triggersBounds:u.any},{name:"taxi-radius",type:c.number,triggersBounds:u.any},{name:"edge-distances",type:c.edgeDistances,triggersBounds:u.any},{name:"arrow-scale",type:c.positiveNumber,triggersBounds:u.any},{name:"loop-direction",type:c.angle,triggersBounds:u.any},{name:"loop-sweep",type:c.angle,triggersBounds:u.any},{name:"source-distance-from-node",type:c.size,triggersBounds:u.any},{name:"target-distance-from-node",type:c.size,triggersBounds:u.any}],D=[{name:"ghost",type:c.bool,triggersBounds:u.any},{name:"ghost-offset-x",type:c.bidirectionalSize,triggersBounds:u.any},{name:"ghost-offset-y",type:c.bidirectionalSize,triggersBounds:u.any},{name:"ghost-opacity",type:c.zeroOneNumber}],P=[{name:"selection-box-color",type:c.color},{name:"selection-box-opacity",type:c.zeroOneNumber},{name:"selection-box-border-color",type:c.color},{name:"selection-box-border-width",type:c.size},{name:"active-bg-color",type:c.color},{name:"active-bg-opacity",type:c.zeroOneNumber},{name:"active-bg-size",type:c.size},{name:"outside-texture-bg-color",type:c.color},{name:"outside-texture-bg-opacity",type:c.zeroOneNumber}],F=[];xt.pieBackgroundN=16,F.push({name:"pie-size",type:c.sizeMaybePercent});for(var O=1;O<=xt.pieBackgroundN;O++)F.push({name:"pie-"+O+"-background-color",type:c.color}),F.push({name:"pie-"+O+"-background-size",type:c.percent}),F.push({name:"pie-"+O+"-background-opacity",type:c.zeroOneNumber});var I=[],_=xt.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:c.arrowShape,triggersBounds:u.any},{name:"arrow-color",type:c.color},{name:"arrow-fill",type:c.arrowFill},{name:"arrow-width",type:c.arrowWidth}].forEach(function(Y){_.forEach(function(A){var K=A+"-"+Y.name,W=Y.type,oe=Y.triggersBounds;I.push({name:K,type:W,triggersBounds:oe})})},{});var M=xt.properties=[].concat(g,w,y,m,b,D,h,v,d,f,p,x,E,k,B,F,S,N,I,P),L=xt.propertyGroups={behavior:g,transition:w,visibility:y,overlay:m,underlay:b,ghost:D,commonLabel:h,labelDimensions:v,mainLabel:d,sourceLabel:f,targetLabel:p,nodeBody:x,nodeBorder:E,nodeOutline:k,backgroundImage:B,pie:F,compound:S,edgeLine:N,edgeArrow:I,core:P},R=xt.propertyGroupNames={},H=xt.propertyGroupKeys=Object.keys(L);H.forEach(function(Y){R[Y]=L[Y].map(function(A){return A.name}),L[Y].forEach(function(A){return A.groupKey=Y})});var $=xt.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];xt.propertyNames=M.map(function(Y){return Y.name});for(var z=0;z<M.length;z++){var j=M[z];M[j.name]=j}for(var ee=0;ee<$.length;ee++){var J=$[ee],Z=M[J.pointsTo],re={name:J.name,alias:!0,pointsTo:Z};M.push(re),M[J.name]=re}})(),xt.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},xt.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var e=xe({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(u,c){for(var d=1;d<=xt.pieBackgroundN;d++){var f=c.name.replace("{{i}}",d),p=c.value;u[f]=p}return u},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(u,c){return xt.arrowPrefixes.forEach(function(d){var f=d+"-"+c.name,p=c.value;u[f]=p}),u},{})),r={},n=0;n<this.properties.length;n++){var a=this.properties[n];if(!a.pointsTo){var i=a.name,o=e[i],l=this.parse(i,o);r[i]=l}}return t.defaultProperties=r,t.defaultProperties},xt.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var hs={};hs.parse=function(t,e,r,n){var a=this;if(Ye(e))return a.parseImplWarn(t,e,r,n);var i=n==="mapping"||n===!0||n===!1||n==null?"dontcare":n,o=r?"t":"f",l=""+e,u=Mh(t,l,o,i),c=a.propCache=a.propCache||[],d;return(d=c[u])||(d=c[u]=a.parseImplWarn(t,e,r,n)),(r||n==="mapping")&&(d=br(d),d&&(d.value=br(d.value))),d},hs.parseImplWarn=function(t,e,r,n){var a=this.parseImpl(t,e,r,n);return!a&&e!=null&&Ae("The style property `".concat(t,": ").concat(e,"` is invalid")),a&&(a.name==="width"||a.name==="height")&&e==="label"&&Ae("The style value of `label` is deprecated for `"+a.name+"`"),a},hs.parseImpl=function(t,e,r,n){var a=this;t=zl(t);var i=a.properties[t],o=e,l=a.types;if(!i||e===void 0)return null;i.alias&&(i=i.pointsTo,t=i.name);var u=be(e);u&&(e=e.trim());var c=i.type;if(!c)return null;if(r&&(e===""||e===null))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(Ye(e))return{name:t,value:e,strValue:"fn",mapped:l.fn,bypass:r};var d,f;if(!(!u||n||e.length<7||e[1]!=="a")){if(e.length>=7&&e[0]==="d"&&(d=new RegExp(l.data.regex).exec(e))){if(r)return!1;var p=l.data;return{name:t,value:d,strValue:""+e,mapped:p,field:d[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(l.mapData.regex).exec(e))){if(r||c.multiple)return!1;var v=l.mapData;if(!(c.color||c.number))return!1;var h=this.parse(t,f[4]);if(!h||h.mapped)return!1;var g=this.parse(t,f[5]);if(!g||g.mapped)return!1;if(h.pfValue===g.pfValue||h.strValue===g.strValue)return Ae("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+h.strValue+"`"),this.parse(t,h.strValue);if(c.color){var y=h.value,m=g.value,b=y[0]===m[0]&&y[1]===m[1]&&y[2]===m[2]&&(y[3]===m[3]||(y[3]==null||y[3]===1)&&(m[3]==null||m[3]===1));if(b)return!1}return{name:t,value:f,strValue:""+e,mapped:v,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:h.value,valueMax:g.value,bypass:r}}}if(c.multiple&&n!=="multiple"){var w;if(u?w=e.split(/\s+/):He(e)?w=e:w=[e],c.evenMultiple&&w.length%2!==0)return null;for(var C=[],x=[],E=[],k="",B=!1,S=0;S<w.length;S++){var N=a.parse(t,w[S],r,"multiple");B=B||be(N.value),C.push(N.value),E.push(N.pfValue!=null?N.pfValue:N.value),x.push(N.units),k+=(S>0?" ":"")+N.strValue}return c.validate&&!c.validate(C,x)?null:c.singleEnum&&B?C.length===1&&be(C[0])?{name:t,value:C[0],strValue:C[0],bypass:r}:null:{name:t,value:C,pfValue:E,strValue:k,bypass:r,units:x}}var D=function(){for(var A=0;A<c.enums.length;A++){var K=c.enums[A];if(K===e)return{name:t,value:e,strValue:""+e,bypass:r}}return null};if(c.number){var P,F="px";if(c.units&&(P=c.units),c.implicitUnits&&(F=c.implicitUnits),!c.unitless)if(u){var O="px|em"+(c.allowPercent?"|\\%":"");P&&(O=P);var I=e.match("^("+lt+")("+O+")?$");I&&(e=I[1],P=I[2]||F)}else(!P||c.implicitUnits)&&(P=F);if(e=parseFloat(e),isNaN(e)&&c.enums===void 0)return null;if(isNaN(e)&&c.enums!==void 0)return e=o,D();if(c.integer&&!oT(e)||c.min!==void 0&&(e<c.min||c.strictMin&&e===c.min)||c.max!==void 0&&(e>c.max||c.strictMax&&e===c.max))return null;var _={name:t,value:e,strValue:""+e+(P||""),units:P,bypass:r};return c.unitless||P!=="px"&&P!=="em"?_.pfValue=e:_.pfValue=P==="px"||!P?e:this.getEmSizeInPixels()*e,(P==="ms"||P==="s")&&(_.pfValue=P==="ms"?e:1e3*e),(P==="deg"||P==="rad")&&(_.pfValue=P==="rad"?e:$B(e)),P==="%"&&(_.pfValue=e/100),_}else if(c.propList){var M=[],L=""+e;if(L!=="none"){for(var R=L.split(/\s*,\s*|\s+/),H=0;H<R.length;H++){var $=R[H].trim();a.properties[$]?M.push($):Ae("`"+$+"` is not a valid property name")}if(M.length===0)return null}return{name:t,value:M,strValue:M.length===0?"none":M.join(" "),bypass:r}}else if(c.color){var z=xT(e);return z?{name:t,value:z,pfValue:z,strValue:"rgb("+z[0]+","+z[1]+","+z[2]+")",bypass:r}:null}else if(c.regex||c.regexes){if(c.enums){var j=D();if(j)return j}for(var ee=c.regexes?c.regexes:[c.regex],J=0;J<ee.length;J++){var Z=new RegExp(ee[J]),re=Z.exec(e);if(re)return{name:t,value:c.singleRegexMatchValue?re[1]:re,strValue:""+e,bypass:r}}return null}else return c.string?{name:t,value:""+e,strValue:""+e,bypass:r}:c.enums?D():null};var Nt=function t(e){if(!(this instanceof t))return new t(e);if(!$l(e)){Xe("A style must have a core reference");return}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()},Dt=Nt.prototype;Dt.instanceString=function(){return"style"},Dt.clear=function(){for(var t=this._private,e=t.cy,r=e.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(r,!0),r.forEach(function(a){var i=a[0]._private;i.styleDirty=!0,i.appliedInitStyle=!1}),this},Dt.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Dt.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},Dt.selector=function(t){var e=t==="core"?null:new un(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this},Dt.css=function(){var t=this,e=arguments;if(e.length===1)for(var r=e[0],n=0;n<t.properties.length;n++){var a=t.properties[n],i=r[a.name];i===void 0&&(i=r[Po(a.name)]),i!==void 0&&this.cssRule(a.name,i)}else e.length===2&&this.cssRule(e[0],e[1]);return this},Dt.style=Dt.css,Dt.cssRule=function(t,e){var r=this.parse(t,e);if(r){var n=this.length-1;this[n].properties.push(r),this[n].properties[r.name]=r,r.name.match(/pie-(\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.mapped&&this[n].mappedProperties.push(r);var a=!this[n].selector;a&&(this._private.coreStyle[r.name]=r)}return this},Dt.append=function(t){return Ch(t)?t.appendToStyle(this):He(t)?this.appendFromJson(t):be(t)&&this.appendFromString(t),this},Nt.fromJson=function(t,e){var r=new Nt(t);return r.fromJson(e),r},Nt.fromString=function(t,e){return new Nt(t).fromString(e)},[Bt,Ri,yc,Cr,fs,bc,xt,hs].forEach(function(t){xe(Dt,t)}),Nt.types=Dt.types,Nt.properties=Dt.properties,Nt.propertyGroups=Dt.propertyGroups,Nt.propertyGroupNames=Dt.propertyGroupNames,Nt.propertyGroupKeys=Dt.propertyGroupKeys;var oD={style:function(e){if(e){var r=this.setStyle(e);r.update()}return this._private.style},setStyle:function(e){var r=this._private;return Ch(e)?r.style=e.generateStyle(this):He(e)?r.style=Nt.fromJson(this,e):be(e)?r.style=Nt.fromString(this,e):r.style=Nt(this),r.style},updateStyle:function(){this.mutableElements().updateStyle()}},sD="single",Hn={autolock:function(e){if(e!==void 0)this._private.autolock=!!e;else return this._private.autolock;return this},autoungrabify:function(e){if(e!==void 0)this._private.autoungrabify=!!e;else return this._private.autoungrabify;return this},autounselectify:function(e){if(e!==void 0)this._private.autounselectify=!!e;else return this._private.autounselectify;return this},selectionType:function(e){var r=this._private;if(r.selectionType==null&&(r.selectionType=sD),e!==void 0)(e==="additive"||e==="single")&&(r.selectionType=e);else return r.selectionType;return this},panningEnabled:function(e){if(e!==void 0)this._private.panningEnabled=!!e;else return this._private.panningEnabled;return this},userPanningEnabled:function(e){if(e!==void 0)this._private.userPanningEnabled=!!e;else return this._private.userPanningEnabled;return this},zoomingEnabled:function(e){if(e!==void 0)this._private.zoomingEnabled=!!e;else return this._private.zoomingEnabled;return this},userZoomingEnabled:function(e){if(e!==void 0)this._private.userZoomingEnabled=!!e;else return this._private.userZoomingEnabled;return this},boxSelectionEnabled:function(e){if(e!==void 0)this._private.boxSelectionEnabled=!!e;else return this._private.boxSelectionEnabled;return this},pan:function(){var e=arguments,r=this._private.pan,n,a,i,o,l;switch(e.length){case 0:return r;case 1:if(be(e[0]))return n=e[0],r[n];if(_e(e[0])){if(!this._private.panningEnabled)return this;i=e[0],o=i.x,l=i.y,le(o)&&(r.x=o),le(l)&&(r.y=l),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;n=e[0],a=e[1],(n==="x"||n==="y")&&le(a)&&(r[n]=a),this.emit("pan viewport");break}return this.notify("viewport"),this},panBy:function(e,r){var n=arguments,a=this._private.pan,i,o,l,u,c;if(!this._private.panningEnabled)return this;switch(n.length){case 1:_e(e)&&(l=n[0],u=l.x,c=l.y,le(u)&&(a.x+=u),le(c)&&(a.y+=c),this.emit("pan viewport"));break;case 2:i=e,o=r,(i==="x"||i==="y")&&le(o)&&(a[i]+=o),this.emit("pan viewport");break}return this.notify("viewport"),this},fit:function(e,r){var n=this.getFitViewport(e,r);if(n){var a=this._private;a.zoom=n.zoom,a.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(e,r){if(le(e)&&r===void 0&&(r=e,e=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var n;if(be(e)){var a=e;e=this.$(a)}else if(cT(e)){var i=e;n={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},n.w=n.x2-n.x1,n.h=n.y2-n.y1}else Ut(e)||(e=this.mutableElements());if(!(Ut(e)&&e.empty())){n=n||e.boundingBox();var o=this.width(),l=this.height(),u;if(r=le(r)?r:0,!isNaN(o)&&!isNaN(l)&&o>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((o-2*r)/n.w,(l-2*r)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u<this._private.minZoom?this._private.minZoom:u;var c={x:(o-u*(n.x1+n.x2))/2,y:(l-u*(n.y1+n.y2))/2};return{zoom:u,pan:c}}}}},zoomRange:function(e,r){var n=this._private;if(r==null){var a=e;e=a.min,r=a.max}return le(e)&&le(r)&&e<=r?(n.minZoom=e,n.maxZoom=r):le(e)&&r===void 0&&e<=n.maxZoom?n.minZoom=e:le(r)&&e===void 0&&r>=n.minZoom&&(n.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,n=r.pan,a=r.zoom,i,o,l=!1;if(r.zoomingEnabled||(l=!0),le(e)?o=e:_e(e)&&(o=e.level,e.position!=null?i=Ao(e.position,a,n):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(l=!0)),o=o>r.maxZoom?r.maxZoom:o,o=o<r.minZoom?r.minZoom:o,l||!le(o)||o===a||i!=null&&(!le(i.x)||!le(i.y)))return null;if(i!=null){var u=n,c=a,d=o,f={x:-d/c*(i.x-u.x)+i.x,y:-d/c*(i.y-u.y)+i.y};return{zoomed:!0,panned:!0,zoom:d,pan:f}}else return{zoomed:!0,panned:!1,zoom:o,pan:n}},zoom:function(e){if(e===void 0)return this._private.zoom;var r=this.getZoomedViewport(e),n=this._private;return r==null||!r.zoomed?this:(n.zoom=r.zoom,r.panned&&(n.pan.x=r.pan.x,n.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},viewport:function(e){var r=this._private,n=!0,a=!0,i=[],o=!1,l=!1;if(!e)return this;if(le(e.zoom)||(n=!1),_e(e.pan)||(a=!1),!n&&!a)return this;if(n){var u=e.zoom;u<r.minZoom||u>r.maxZoom||!r.zoomingEnabled?o=!0:(r.zoom=u,i.push("zoom"))}if(a&&(!o||!e.cancelOnFailedZoom)&&r.panningEnabled){var c=e.pan;le(c.x)&&(r.pan.x=c.x,l=!1),le(c.y)&&(r.pan.y=c.y,l=!1),l||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(be(e)){var n=e;e=this.mutableElements().filter(n)}else Ut(e)||(e=this.mutableElements());if(e.length!==0){var a=e.boundingBox(),i=this.width(),o=this.height();r=r===void 0?this._private.zoom:r;var l={x:(i-r*(a.x1+a.x2))/2,y:(o-r*(a.y1+a.y2))/2};return l}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var a=n.window().getComputedStyle(r),i=function(l){return parseFloat(a.getPropertyValue(l))};return{width:r.clientWidth-i("padding-left")-i("padding-right"),height:r.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),a={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return a.w=a.x2-a.x1,a.h=a.y2-a.y1,a},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};Hn.centre=Hn.center,Hn.autolockNodes=Hn.autolock,Hn.autoungrabifyNodes=Hn.autoungrabify;var Vi={data:Re.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Re.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Re.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Re.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Vi.attr=Vi.data,Vi.removeAttr=Vi.removeData;var $i=function(e){var r=this;e=xe({},e);var n=e.container;n&&!Do(n)&&Do(n[0])&&(n=n[0]);var a=n?n._cyreg:null;a=a||{},a&&a.cy&&(a.cy.destroy(),a={});var i=a.readies=a.readies||[];n&&(n._cyreg=a),a.cy=r;var o=st!==void 0&&n!==void 0&&!e.headless,l=e;l.layout=xe({name:o?"grid":"null"},l.layout),l.renderer=xe({name:o?"canvas":"null"},l.renderer);var u=function(h,g,y){return g!==void 0?g:y!==void 0?y:h},c=this._private={container:n,ready:!1,options:l,elements:new kt(this),listeners:[],aniEles:new kt(this),data:l.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,l.zoomingEnabled),userZoomingEnabled:u(!0,l.userZoomingEnabled),panningEnabled:u(!0,l.panningEnabled),userPanningEnabled:u(!0,l.userPanningEnabled),boxSelectionEnabled:u(!0,l.boxSelectionEnabled),autolock:u(!1,l.autolock,l.autolockNodes),autoungrabify:u(!1,l.autoungrabify,l.autoungrabifyNodes),autounselectify:u(!1,l.autounselectify),styleEnabled:l.styleEnabled===void 0?o:l.styleEnabled,zoom:le(l.zoom)?l.zoom:1,pan:{x:_e(l.pan)&&le(l.pan.x)?l.pan.x:0,y:_e(l.pan)&&le(l.pan.y)?l.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,l.multiClickDebounceTime)};this.createEmitter(),this.selectionType(l.selectionType),this.zoomRange({min:l.minZoom,max:l.maxZoom});var d=function(h,g){var y=h.some(uT);if(y)return xa.all(h).then(g);g(h)};c.styleEnabled&&r.setStyle([]);var f=xe({},l,l.renderer);r.initRenderer(f);var p=function(h,g,y){r.notifications(!1);var m=r.mutableElements();m.length>0&&m.remove(),h!=null&&(_e(h)||He(h))&&r.add(h),r.one("layoutready",function(w){r.notifications(!0),r.emit(w),r.one("load",g),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",y),r.emit("done")});var b=xe({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()};d([l.style,l.elements],function(v){var h=v[0],g=v[1];c.styleEnabled&&r.style().append(h),p(g,function(){r.startAnimationLoop(),c.ready=!0,Ye(l.ready)&&r.on("ready",l.ready);for(var y=0;y<i.length;y++){var m=i[y];r.on("ready",m)}a&&(a.readies=[]),r.emit("ready")},l.done)})},ps=$i.prototype;xe(ps,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},window:function(){var e=this._private.container;if(e==null)return st;var r=this._private.container.ownerDocument;return r===void 0||r==null?st:r.defaultView||st},mount:function(e){if(e!=null){var r=this,n=r._private,a=n.options;return!Do(e)&&Do(e[0])&&(e=e[0]),r.stopAnimationLoop(),r.destroyRenderer(),n.container=e,n.styleEnabled=!0,r.invalidateSize(),r.initRenderer(xe({},a,a.renderer,{name:a.renderer.name==="null"?"canvas":a.renderer.name})),r.startAnimationLoop(),r.style(a.style),r.emit("mount"),r}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},options:function(){return br(this._private.options)},json:function(e){var r=this,n=r._private,a=r.mutableElements(),i=function(C){return r.getElementById(C.id())};if(_e(e)){if(r.startBatch(),e.elements){var o={},l=function(C,x){for(var E=[],k=[],B=0;B<C.length;B++){var S=C[B];if(!S.data.id){Ae("cy.json() cannot handle elements without an ID attribute");continue}var N=""+S.data.id,D=r.getElementById(N);o[N]=!0,D.length!==0?k.push({ele:D,json:S}):(x&&(S.group=x),E.push(S))}r.add(E);for(var P=0;P<k.length;P++){var F=k[P],O=F.ele,I=F.json;O.json(I)}};if(He(e.elements))l(e.elements);else for(var u=["nodes","edges"],c=0;c<u.length;c++){var d=u[c],f=e.elements[d];He(f)&&l(f,d)}var p=r.collection();a.filter(function(w){return!o[w.id()]}).forEach(function(w){w.isParent()?p.merge(w):w.remove()}),p.forEach(function(w){return w.children().move({parent:null})}),p.forEach(function(w){return i(w).remove()})}e.style&&r.style(e.style),e.zoom!=null&&e.zoom!==n.zoom&&r.zoom(e.zoom),e.pan&&(e.pan.x!==n.pan.x||e.pan.y!==n.pan.y)&&r.pan(e.pan),e.data&&r.data(e.data);for(var v=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],h=0;h<v.length;h++){var g=v[h];e[g]!=null&&r[g](e[g])}return r.endBatch(),this}else{var y=!!e,m={};y?m.elements=this.elements().map(function(w){return w.json()}):(m.elements={},a.forEach(function(w){var C=w.group();m.elements[C]||(m.elements[C]=[]),m.elements[C].push(w.json())})),this._private.styleEnabled&&(m.style=r.style().json()),m.data=br(r.data());var b=n.options;return m.zoomingEnabled=n.zoomingEnabled,m.userZoomingEnabled=n.userZoomingEnabled,m.zoom=n.zoom,m.minZoom=n.minZoom,m.maxZoom=n.maxZoom,m.panningEnabled=n.panningEnabled,m.userPanningEnabled=n.userPanningEnabled,m.pan=br(n.pan),m.boxSelectionEnabled=n.boxSelectionEnabled,m.renderer=br(b.renderer),m.hideEdgesOnViewport=b.hideEdgesOnViewport,m.textureOnViewport=b.textureOnViewport,m.wheelSensitivity=b.wheelSensitivity,m.motionBlur=b.motionBlur,m.multiClickDebounceTime=b.multiClickDebounceTime,m}}}),ps.$id=ps.getElementById,[X3,tD,hv,gc,us,nD,mc,ds,oD,Hn,Vi].forEach(function(t){xe(ps,t)});var lD={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}},cD={maximal:!1,acyclic:!1},La=function(e){return e.scratch("breadthfirst")},pv=function(e,r){return e.scratch("breadthfirst",r)};function vv(t){this.options=xe({},lD,cD,t)}vv.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=n.nodes().filter(function(ne){return!ne.isParent()}),i=n,o=e.directed,l=e.acyclic||e.maximal||e.maximalAdjustments>0,u=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),c;if(Ut(e.roots))c=e.roots;else if(He(e.roots)){for(var d=[],f=0;f<e.roots.length;f++){var p=e.roots[f],v=r.getElementById(p);d.push(v)}c=r.collection(d)}else if(be(e.roots))c=r.$(e.roots);else if(o)c=a.roots();else{var h=n.components();c=r.collection();for(var g=function(se){var ue=h[se],pe=ue.maxDegree(!1),de=ue.filter(function(me){return me.degree(!1)===pe});c=c.add(de)},y=0;y<h.length;y++)g(y)}var m=[],b={},w=function(se,ue){m[ue]==null&&(m[ue]=[]);var pe=m[ue].length;m[ue].push(se),pv(se,{index:pe,depth:ue})},C=function(se,ue){var pe=La(se),de=pe.depth,me=pe.index;m[de][me]=null,w(se,ue)};i.bfs({roots:c,directed:e.directed,visit:function(se,ue,pe,de,me){var Ne=se[0],De=Ne.id();w(Ne,me),b[De]=!0}});for(var x=[],E=0;E<a.length;E++){var k=a[E];b[k.id()]||x.push(k)}var B=function(se){for(var ue=m[se],pe=0;pe<ue.length;pe++){var de=ue[pe];if(de==null){ue.splice(pe,1),pe--;continue}pv(de,{depth:se,index:pe})}},S=function(){for(var se=0;se<m.length;se++)B(se)},N=function(se,ue){for(var pe=La(se),de=se.incomers().filter(function(T){return T.isNode()&&n.has(T)}),me=-1,Ne=se.id(),De=0;De<de.length;De++){var Ee=de[De],Pe=La(Ee);me=Math.max(me,Pe.depth)}if(pe.depth<=me){if(!e.acyclic&&ue[Ne])return null;var te=me+1;return C(se,te),ue[Ne]=te,!0}return!1};if(o&&l){var D=[],P={},F=function(se){return D.push(se)},O=function(){return D.shift()};for(a.forEach(function(ne){return D.push(ne)});D.length>0;){var I=O(),_=N(I,P);if(_)I.outgoers().filter(function(ne){return ne.isNode()&&n.has(ne)}).forEach(F);else if(_===null){Ae("Detected double maximal shift for node `"+I.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}S();var M=0;if(e.avoidOverlap)for(var L=0;L<a.length;L++){var R=a[L],H=R.layoutDimensions(e),$=H.w,z=H.h;M=Math.max(M,$,z)}var j={},ee=function(se){if(j[se.id()])return j[se.id()];for(var ue=La(se).depth,pe=se.neighborhood(),de=0,me=0,Ne=0;Ne<pe.length;Ne++){var De=pe[Ne];if(!(De.isEdge()||De.isParent()||!a.has(De))){var Ee=La(De);if(Ee!=null){var Pe=Ee.index,te=Ee.depth;if(!(Pe==null||te==null)){var T=m[te].length;te<ue&&(de+=Pe/T,me++)}}}}return me=Math.max(1,me),de=de/me,me===0&&(de=0),j[se.id()]=de,de},J=function(se,ue){var pe=ee(se),de=ee(ue),me=pe-de;return me===0?Eh(se.id(),ue.id()):me};e.depthSort!==void 0&&(J=e.depthSort);for(var Z=0;Z<m.length;Z++)m[Z].sort(J),B(Z);for(var re=[],Y=0;Y<x.length;Y++)re.push(x[Y]);m.unshift(re),S();for(var A=0,K=0;K<m.length;K++)A=Math.max(m[K].length,A);var W={x:u.x1+u.w/2,y:u.x1+u.h/2},oe=m.reduce(function(ne,se){return Math.max(ne,se.length)},0),he=function(se){var ue=La(se),pe=ue.depth,de=ue.index,me=m[pe].length,Ne=Math.max(u.w/((e.grid?oe:me)+1),M),De=Math.max(u.h/(m.length+1),M),Ee=Math.min(u.w/2/m.length,u.h/2/m.length);if(Ee=Math.max(Ee,M),e.circle){var te=Ee*pe+Ee-(m.length>0&&m[0].length<=3?Ee/2:0),T=2*Math.PI/m[pe].length*de;return pe===0&&m[0].length===1&&(te=1),{x:W.x+te*Math.cos(T),y:W.y+te*Math.sin(T)}}else{var Pe={x:W.x+(de+1-(me+1)/2)*Ne,y:(pe+1)*De};return Pe}};return n.nodes().layoutPositions(this,e,he),this};var uD={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function gv(t){this.options=xe({},uD,t)}gv.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var o=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,c=u/Math.max(1,i.length-1),d,f=0,p=0;p<i.length;p++){var v=i[p],h=v.layoutDimensions(e),g=h.w,y=h.h;f=Math.max(f,g,y)}if(le(e.radius)?d=e.radius:i.length<=1?d=0:d=Math.min(o.h,o.w)/2-f,i.length>1&&e.avoidOverlap){f*=1.75;var m=Math.cos(c)-Math.cos(0),b=Math.sin(c)-Math.sin(0),w=Math.sqrt(f*f/(m*m+b*b));d=Math.max(w,d)}var C=function(E,k){var B=e.startAngle+k*c*(a?1:-1),S=d*Math.cos(B),N=d*Math.sin(B),D={x:l.x+S,y:l.y+N};return D};return n.nodes().layoutPositions(this,e,C),this};var dD={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function mv(t){this.options=xe({},dD,t)}mv.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,a=e.eles,i=a.nodes().not(":parent"),o=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=[],c=0,d=0;d<i.length;d++){var f=i[d],p=void 0;p=e.concentric(f),u.push({value:p,node:f}),f._private.scratch.concentric=p}i.updateStyle();for(var v=0;v<i.length;v++){var h=i[v],g=h.layoutDimensions(e);c=Math.max(c,g.w,g.h)}u.sort(function(ne,se){return se.value-ne.value});for(var y=e.levelWidth(i),m=[[]],b=m[0],w=0;w<u.length;w++){var C=u[w];if(b.length>0){var x=Math.abs(b[0].value-C.value);x>=y&&(b=[],m.push(b))}b.push(C)}var E=c+e.minNodeSpacing;if(!e.avoidOverlap){var k=m.length>0&&m[0].length>1,B=Math.min(o.w,o.h)/2-E,S=B/(m.length+k?1:0);E=Math.min(E,S)}for(var N=0,D=0;D<m.length;D++){var P=m[D],F=e.sweep===void 0?2*Math.PI-2*Math.PI/P.length:e.sweep,O=P.dTheta=F/Math.max(1,P.length-1);if(P.length>1&&e.avoidOverlap){var I=Math.cos(O)-Math.cos(0),_=Math.sin(O)-Math.sin(0),M=Math.sqrt(E*E/(I*I+_*_));N=Math.max(M,N)}P.r=N,N+=E}if(e.equidistant){for(var L=0,R=0,H=0;H<m.length;H++){var $=m[H],z=$.r-R;L=Math.max(L,z)}R=0;for(var j=0;j<m.length;j++){var ee=m[j];j===0&&(R=ee.r),ee.r=R,R+=L}}for(var J={},Z=0;Z<m.length;Z++)for(var re=m[Z],Y=re.dTheta,A=re.r,K=0;K<re.length;K++){var W=re[K],oe=e.startAngle+(r?1:-1)*Y*K,he={x:l.x+A*Math.cos(oe),y:l.y+A*Math.sin(oe)};J[W.node.id()]=he}return a.nodes().layoutPositions(this,e,function(ne){var se=ne.id();return J[se]}),this};var wc,fD={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,r){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function vs(t){this.options=xe({},fD,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(a){var i=a.source().data("id"),o=a.target().data("id"),l=e.some(function(c){return c.data("id")===i}),u=e.some(function(c){return c.data("id")===o});return!l||!u});this.options.eles=this.options.eles.not(n)}vs.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,(t.animate===!0||t.animate===!1)&&r.emit({type:"layoutstart",layout:r}),t.debug===!0?wc=!0:wc=!1;var n=hD(e,r,t);wc&&gD(n),t.randomize&&mD(n);var a=Rr(),i=function(){yD(n,e,t),t.fit===!0&&e.fit(t.padding)},o=function(p){return!(r.stopped||p>=t.numIter||(bD(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature<t.minTemp))},l=function(){if(t.animate===!0||t.animate===!1)i(),r.one("layoutstop",t.stop),r.emit({type:"layoutstop",layout:r});else{var p=t.eles.nodes(),v=yv(n,t,p);p.layoutPositions(r,t,v)}},u=0,c=!0;if(t.animate===!0){var d=function f(){for(var p=0;c&&p<t.refresh;)c=o(u),u++,p++;if(!c)wv(n,t),l();else{var v=Rr();v-a>=t.animationThreshold&&i(),Fo(f)}};d()}else{for(;c;)c=o(u),u++;wv(n,t),l()}return this},vs.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},vs.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var hD=function(e,r,n){for(var a=n.eles.edges(),i=n.eles.nodes(),o=zt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),l={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:a.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},u=n.eles.components(),c={},d=0;d<u.length;d++)for(var f=u[d],p=0;p<f.length;p++){var v=f[p];c[v.id()]=d}for(var d=0;d<l.nodeSize;d++){var h=i[d],g=h.layoutDimensions(n),y={};y.isLocked=h.locked(),y.id=h.data("id"),y.parentId=h.data("parent"),y.cmptId=c[h.id()],y.children=[],y.positionX=h.position("x"),y.positionY=h.position("y"),y.offsetX=0,y.offsetY=0,y.height=g.w,y.width=g.h,y.maxX=y.positionX+y.width/2,y.minX=y.positionX-y.width/2,y.maxY=y.positionY+y.height/2,y.minY=y.positionY-y.height/2,y.padLeft=parseFloat(h.style("padding")),y.padRight=parseFloat(h.style("padding")),y.padTop=parseFloat(h.style("padding")),y.padBottom=parseFloat(h.style("padding")),y.nodeRepulsion=Ye(n.nodeRepulsion)?n.nodeRepulsion(h):n.nodeRepulsion,l.layoutNodes.push(y),l.idToIndex[y.id]=d}for(var m=[],b=0,w=-1,C=[],d=0;d<l.nodeSize;d++){var h=l.layoutNodes[d],x=h.parentId;x!=null?l.layoutNodes[l.idToIndex[x]].children.push(h.id):(m[++w]=h.id,C.push(h.id))}for(l.graphSet.push(C);b<=w;){var E=m[b++],k=l.idToIndex[E],v=l.layoutNodes[k],B=v.children;if(B.length>0){l.graphSet.push(B);for(var d=0;d<B.length;d++)m[++w]=B[d]}}for(var d=0;d<l.graphSet.length;d++)for(var S=l.graphSet[d],p=0;p<S.length;p++){var N=l.idToIndex[S[p]];l.indexToGraph[N]=d}for(var d=0;d<l.edgeSize;d++){var D=a[d],P={};P.id=D.data("id"),P.sourceId=D.data("source"),P.targetId=D.data("target");var F=Ye(n.idealEdgeLength)?n.idealEdgeLength(D):n.idealEdgeLength,O=Ye(n.edgeElasticity)?n.edgeElasticity(D):n.edgeElasticity,I=l.idToIndex[P.sourceId],_=l.idToIndex[P.targetId],M=l.indexToGraph[I],L=l.indexToGraph[_];if(M!=L){for(var R=pD(P.sourceId,P.targetId,l),H=l.graphSet[R],$=0,y=l.layoutNodes[I];H.indexOf(y.id)===-1;)y=l.layoutNodes[l.idToIndex[y.parentId]],$++;for(y=l.layoutNodes[_];H.indexOf(y.id)===-1;)y=l.layoutNodes[l.idToIndex[y.parentId]],$++;F*=$*n.nestingFactor}P.idealLength=F,P.elasticity=O,l.layoutEdges.push(P)}return l},pD=function(e,r,n){var a=vD(e,r,0,n);return 2>a.count?0:a.graph},vD=function t(e,r,n,a){var i=a.graphSet[n];if(-1<i.indexOf(e)&&-1<i.indexOf(r))return{count:2,graph:n};for(var o=0,l=0;l<i.length;l++){var u=i[l],c=a.idToIndex[u],d=a.layoutNodes[c].children;if(d.length!==0){var f=a.indexToGraph[a.idToIndex[d[0]]],p=t(e,r,f,a);if(p.count!==0)if(p.count===1){if(o++,o===2)break}else return p}}return{count:o,graph:n}},gD,mD=function(e,r){for(var n=e.clientWidth,a=e.clientHeight,i=0;i<e.nodeSize;i++){var o=e.layoutNodes[i];o.children.length===0&&!o.isLocked&&(o.positionX=Math.random()*n,o.positionY=Math.random()*a)}},yv=function(e,r,n){var a=e.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(n.forEach(function(o){var l=e.layoutNodes[e.idToIndex[o.data("id")]];i.x1=Math.min(i.x1,l.positionX),i.x2=Math.max(i.x2,l.positionX),i.y1=Math.min(i.y1,l.positionY),i.y2=Math.max(i.y2,l.positionY)}),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(o,l){var u=e.layoutNodes[e.idToIndex[o.data("id")]];if(r.boundingBox){var c=(u.positionX-i.x1)/i.w,d=(u.positionY-i.y1)/i.h;return{x:a.x1+c*a.w,y:a.y1+d*a.h}}else return{x:u.positionX,y:u.positionY}}},yD=function(e,r,n){var a=n.layout,i=n.eles.nodes(),o=yv(e,n,i);i.positions(o),e.ready!==!0&&(e.ready=!0,a.one("layoutready",n.ready),a.emit({type:"layoutready",layout:this}))},bD=function(e,r,n){wD(e,r),xD(e),ED(e,r),SD(e),TD(e)},wD=function(e,r){for(var n=0;n<e.graphSet.length;n++)for(var a=e.graphSet[n],i=a.length,o=0;o<i;o++)for(var l=e.layoutNodes[e.idToIndex[a[o]]],u=o+1;u<i;u++){var c=e.layoutNodes[e.idToIndex[a[u]]];CD(l,c,e,r)}},bv=function(e){return-e+2*e*Math.random()},CD=function(e,r,n,a){var i=e.cmptId,o=r.cmptId;if(!(i!==o&&!n.isCompound)){var l=r.positionX-e.positionX,u=r.positionY-e.positionY,c=1;l===0&&u===0&&(l=bv(c),u=bv(c));var d=kD(e,r,l,u);if(d>0)var f=a.nodeOverlap*d,p=Math.sqrt(l*l+u*u),v=f*l/p,h=f*u/p;else var g=gs(e,l,u),y=gs(r,-1*l,-1*u),m=y.x-g.x,b=y.y-g.y,w=m*m+b*b,p=Math.sqrt(w),f=(e.nodeRepulsion+r.nodeRepulsion)/w,v=f*m/p,h=f*b/p;e.isLocked||(e.offsetX-=v,e.offsetY-=h),r.isLocked||(r.offsetX+=v,r.offsetY+=h)}},kD=function(e,r,n,a){if(n>0)var i=e.maxX-r.minX;else var i=r.maxX-e.minX;if(a>0)var o=e.maxY-r.minY;else var o=r.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},gs=function(e,r,n){var a=e.positionX,i=e.positionY,o=e.height||1,l=e.width||1,u=n/r,c=o/l,d={};return r===0&&0<n||r===0&&0>n?(d.x=a,d.y=i+o/2,d):0<r&&-1*c<=u&&u<=c?(d.x=a+l/2,d.y=i+l*n/2/r,d):0>r&&-1*c<=u&&u<=c?(d.x=a-l/2,d.y=i-l*n/2/r,d):0<n&&(u<=-1*c||u>=c)?(d.x=a+o*r/2/n,d.y=i+o/2,d):(0>n&&(u<=-1*c||u>=c)&&(d.x=a-o*r/2/n,d.y=i-o/2),d)},xD=function(e,r){for(var n=0;n<e.edgeSize;n++){var a=e.layoutEdges[n],i=e.idToIndex[a.sourceId],o=e.layoutNodes[i],l=e.idToIndex[a.targetId],u=e.layoutNodes[l],c=u.positionX-o.positionX,d=u.positionY-o.positionY;if(!(c===0&&d===0)){var f=gs(o,c,d),p=gs(u,-1*c,-1*d),v=p.x-f.x,h=p.y-f.y,g=Math.sqrt(v*v+h*h),y=Math.pow(a.idealLength-g,2)/a.elasticity;if(g!==0)var m=y*v/g,b=y*h/g;else var m=0,b=0;o.isLocked||(o.offsetX+=m,o.offsetY+=b),u.isLocked||(u.offsetX-=m,u.offsetY-=b)}}},ED=function(e,r){if(r.gravity!==0)for(var n=1,a=0;a<e.graphSet.length;a++){var i=e.graphSet[a],o=i.length;if(a===0)var l=e.clientHeight/2,u=e.clientWidth/2;else var c=e.layoutNodes[e.idToIndex[i[0]]],d=e.layoutNodes[e.idToIndex[c.parentId]],l=d.positionX,u=d.positionY;for(var f=0;f<o;f++){var p=e.layoutNodes[e.idToIndex[i[f]]];if(!p.isLocked){var v=l-p.positionX,h=u-p.positionY,g=Math.sqrt(v*v+h*h);if(g>n){var y=r.gravity*v/g,m=r.gravity*h/g;p.offsetX+=y,p.offsetY+=m}}}}},SD=function(e,r){var n=[],a=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;a<=i;){var o=n[a++],l=e.idToIndex[o],u=e.layoutNodes[l],c=u.children;if(0<c.length&&!u.isLocked){for(var d=u.offsetX,f=u.offsetY,p=0;p<c.length;p++){var v=e.layoutNodes[e.idToIndex[c[p]]];v.offsetX+=d,v.offsetY+=f,n[++i]=c[p]}u.offsetX=0,u.offsetY=0}}},TD=function(e,r){for(var n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];0<a.children.length&&(a.maxX=void 0,a.minX=void 0,a.maxY=void 0,a.minY=void 0)}for(var n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];if(!(0<a.children.length||a.isLocked)){var i=BD(a.offsetX,a.offsetY,e.temperature);a.positionX+=i.x,a.positionY+=i.y,a.offsetX=0,a.offsetY=0,a.minX=a.positionX-a.width,a.maxX=a.positionX+a.width,a.minY=a.positionY-a.height,a.maxY=a.positionY+a.height,ND(a,e)}}for(var n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];0<a.children.length&&!a.isLocked&&(a.positionX=(a.maxX+a.minX)/2,a.positionY=(a.maxY+a.minY)/2,a.width=a.maxX-a.minX,a.height=a.maxY-a.minY)}},BD=function(e,r,n){var a=Math.sqrt(e*e+r*r);if(a>n)var i={x:n*e/a,y:n*r/a};else var i={x:e,y:r};return i},ND=function t(e,r){var n=e.parentId;if(n!=null){var a=r.layoutNodes[r.idToIndex[n]],i=!1;if((a.maxX==null||e.maxX+a.padRight>a.maxX)&&(a.maxX=e.maxX+a.padRight,i=!0),(a.minX==null||e.minX-a.padLeft<a.minX)&&(a.minX=e.minX-a.padLeft,i=!0),(a.maxY==null||e.maxY+a.padBottom>a.maxY)&&(a.maxY=e.maxY+a.padBottom,i=!0),(a.minY==null||e.minY-a.padTop<a.minY)&&(a.minY=e.minY-a.padTop,i=!0),i)return t(a,r)}},wv=function(e,r){for(var n=e.layoutNodes,a=[],i=0;i<n.length;i++){var o=n[i],l=o.cmptId,u=a[l]=a[l]||[];u.push(o)}for(var c=0,i=0;i<a.length;i++){var d=a[i];if(d){d.x1=1/0,d.x2=-1/0,d.y1=1/0,d.y2=-1/0;for(var f=0;f<d.length;f++){var p=d[f];d.x1=Math.min(d.x1,p.positionX-p.width/2),d.x2=Math.max(d.x2,p.positionX+p.width/2),d.y1=Math.min(d.y1,p.positionY-p.height/2),d.y2=Math.max(d.y2,p.positionY+p.height/2)}d.w=d.x2-d.x1,d.h=d.y2-d.y1,c+=d.w*d.h}}a.sort(function(b,w){return w.w*w.h-b.w*b.h});for(var v=0,h=0,g=0,y=0,m=Math.sqrt(c)*e.clientWidth/e.clientHeight,i=0;i<a.length;i++){var d=a[i];if(d){for(var f=0;f<d.length;f++){var p=d[f];p.isLocked||(p.positionX+=v-d.x1,p.positionY+=h-d.y1)}v+=d.w+r.componentSpacing,g+=d.w+r.componentSpacing,y=Math.max(y,d.h),g>m&&(h+=y+r.componentSpacing,v=0,g=0,y=0)}}},DD={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function Cv(t){this.options=xe({},DD,t)}Cv.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));var i=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(i.h===0||i.w===0)n.nodes().layoutPositions(this,e,function(j){return{x:i.x1,y:i.y1}});else{var o=a.size(),l=Math.sqrt(o*i.h/i.w),u=Math.round(l),c=Math.round(i.w/i.h*l),d=function(ee){if(ee==null)return Math.min(u,c);var J=Math.min(u,c);J==u?u=ee:c=ee},f=function(ee){if(ee==null)return Math.max(u,c);var J=Math.max(u,c);J==u?u=ee:c=ee},p=e.rows,v=e.cols!=null?e.cols:e.columns;if(p!=null&&v!=null)u=p,c=v;else if(p!=null&&v==null)u=p,c=Math.ceil(o/u);else if(p==null&&v!=null)c=v,u=Math.ceil(o/c);else if(c*u>o){var h=d(),g=f();(h-1)*g>=o?d(h-1):(g-1)*h>=o&&f(g-1)}else for(;c*u<o;){var y=d(),m=f();(m+1)*y>=o?f(m+1):d(y+1)}var b=i.w/c,w=i.h/u;if(e.condense&&(b=0,w=0),e.avoidOverlap)for(var C=0;C<a.length;C++){var x=a[C],E=x._private.position;(E.x==null||E.y==null)&&(E.x=0,E.y=0);var k=x.layoutDimensions(e),B=e.avoidOverlapPadding,S=k.w+B,N=k.h+B;b=Math.max(b,S),w=Math.max(w,N)}for(var D={},P=function(ee,J){return!!D["c-"+ee+"-"+J]},F=function(ee,J){D["c-"+ee+"-"+J]=!0},O=0,I=0,_=function(){I++,I>=c&&(I=0,O++)},M={},L=0;L<a.length;L++){var R=a[L],H=e.position(R);if(H&&(H.row!==void 0||H.col!==void 0)){var $={row:H.row,col:H.col};if($.col===void 0)for($.col=0;P($.row,$.col);)$.col++;else if($.row===void 0)for($.row=0;P($.row,$.col);)$.row++;M[R.id()]=$,F($.row,$.col)}}var z=function(ee,J){var Z,re;if(ee.locked()||ee.isParent())return!1;var Y=M[ee.id()];if(Y)Z=Y.col*b+b/2+i.x1,re=Y.row*w+w/2+i.y1;else{for(;P(O,I);)_();Z=I*b+b/2+i.x1,re=O*w+w/2+i.y1,F(O,I),_()}return{x:Z,y:re}};a.layoutPositions(this,e,z)}return this};var PD={ready:function(){},stop:function(){}};function Cc(t){this.options=xe({},PD,t)}Cc.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),r.one("layoutready",t.ready),r.emit("layoutready"),r.one("layoutstop",t.stop),r.emit("layoutstop"),this},Cc.prototype.stop=function(){return this};var OD={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function kv(t){this.options=xe({},OD,t)}kv.prototype.run=function(){var t=this.options,e=t.eles,r=e.nodes(),n=Ye(t.positions);function a(i){if(t.positions==null)return MB(i.position());if(n)return t.positions(i);var o=t.positions[i._private.data.id];return o??null}return r.layoutPositions(this,t,function(i,o){var l=a(i);return i.locked()||l==null?!1:l}),this};var _D={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function xv(t){this.options=xe({},_D,t)}xv.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=zt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),a=function(o,l){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}};return r.nodes().layoutPositions(this,t,a),this};var FD=[{name:"breadthfirst",impl:vv},{name:"circle",impl:gv},{name:"concentric",impl:mv},{name:"cose",impl:vs},{name:"grid",impl:Cv},{name:"null",impl:Cc},{name:"preset",impl:kv},{name:"random",impl:xv}];function Ev(t){this.options=t,this.notifications=0}var Sv=function(){},Tv=function(){throw new Error("A headless instance can not render images")};Ev.prototype={recalculateRenderedStyle:Sv,notify:function(){this.notifications++},init:Sv,isHeadless:function(){return!0},png:Tv,jpg:Tv};var kc={};kc.arrowShapeWidth=.3,kc.registerArrowShapes=function(){var t=this.arrowShapes={},e=this,r=function(c,d,f,p,v,h,g){var y=v.x-f/2-g,m=v.x+f/2+g,b=v.y-f/2-g,w=v.y+f/2+g,C=y<=c&&c<=m&&b<=d&&d<=w;return C},n=function(c,d,f,p,v){var h=c*Math.cos(p)-d*Math.sin(p),g=c*Math.sin(p)+d*Math.cos(p),y=h*f,m=g*f,b=y+v.x,w=m+v.y;return{x:b,y:w}},a=function(c,d,f,p){for(var v=[],h=0;h<c.length;h+=2){var g=c[h],y=c[h+1];v.push(n(g,y,d,f,p))}return v},i=function(c){for(var d=[],f=0;f<c.length;f++){var p=c[f];d.push(p.x,p.y)}return d},o=function(c){return c.pstyle("width").pfValue*c.pstyle("arrow-scale").pfValue*2},l=function(c,d){be(d)&&(d=t[d]),t[c]=xe({name:c,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(p,v,h,g,y,m){var b=i(a(this.points,h+2*m,g,y)),w=Ht(p,v,b);return w},roughCollide:r,draw:function(p,v,h,g){var y=a(this.points,v,h,g);e.arrowShapeImpl("polygon")(p,y)},spacing:function(p){return 0},gap:o},d)};l("none",{collide:Mo,roughCollide:Mo,draw:Ul,spacing:Rh,gap:Rh}),l("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),l("arrow","triangle"),l("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:function(c,d,f,p,v){var h=a(this.points,d,f,p),g=this.controlPoint,y=n(g[0],g[1],d,f,p);e.arrowShapeImpl(this.name)(c,h,y)},gap:function(c){return o(c)*.8}}),l("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(c,d,f,p,v,h,g){var y=i(a(this.points,f+2*g,p,v)),m=i(a(this.pointsTee,f+2*g,p,v)),b=Ht(c,d,y)||Ht(c,d,m);return b},draw:function(c,d,f,p,v){var h=a(this.points,d,f,p),g=a(this.pointsTee,d,f,p);e.arrowShapeImpl(this.name)(c,h,g)}}),l("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(c,d,f,p,v,h,g){var y=v,m=Math.pow(y.x-c,2)+Math.pow(y.y-d,2)<=Math.pow((f+2*g)*this.radius,2),b=i(a(this.points,f+2*g,p,v));return Ht(c,d,b)||m},draw:function(c,d,f,p,v){var h=a(this.pointsTr,d,f,p);e.arrowShapeImpl(this.name)(c,h,p.x,p.y,this.radius*d)},spacing:function(c){return e.getArrowWidth(c.pstyle("width").pfValue,c.pstyle("arrow-scale").value)*this.radius}}),l("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(c,d){var f=this.baseCrossLinePts.slice(),p=d/c,v=3,h=5;return f[v]=f[v]-p,f[h]=f[h]-p,f},collide:function(c,d,f,p,v,h,g){var y=i(a(this.points,f+2*g,p,v)),m=i(a(this.crossLinePts(f,h),f+2*g,p,v)),b=Ht(c,d,y)||Ht(c,d,m);return b},draw:function(c,d,f,p,v){var h=a(this.points,d,f,p),g=a(this.crossLinePts(d,v),d,f,p);e.arrowShapeImpl(this.name)(c,h,g)}}),l("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(c){return o(c)*.525}}),l("circle",{radius:.15,collide:function(c,d,f,p,v,h,g){var y=v,m=Math.pow(y.x-c,2)+Math.pow(y.y-d,2)<=Math.pow((f+2*g)*this.radius,2);return m},draw:function(c,d,f,p,v){e.arrowShapeImpl(this.name)(c,p.x,p.y,this.radius*d)},spacing:function(c){return e.getArrowWidth(c.pstyle("width").pfValue,c.pstyle("arrow-scale").value)*this.radius}}),l("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(c){return 1},gap:function(c){return 1}}),l("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),l("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(c){return c.pstyle("width").pfValue*c.pstyle("arrow-scale").value}}),l("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(c){return .95*c.pstyle("width").pfValue*c.pstyle("arrow-scale").value}})};var Kn={};Kn.projectIntoViewport=function(t,e){var r=this.cy,n=this.findContainerClientCoords(),a=n[0],i=n[1],o=n[4],l=r.pan(),u=r.zoom(),c=((t-a)/o-l.x)/u,d=((e-i)/o-l.y)/u;return[c,d]},Kn.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=this.cy.window().getComputedStyle(t),n=function(m){return parseFloat(r.getPropertyValue(m))},a={left:n("padding-left"),right:n("padding-right"),top:n("padding-top"),bottom:n("padding-bottom")},i={left:n("border-left-width"),right:n("border-right-width"),top:n("border-top-width"),bottom:n("border-bottom-width")},o=t.clientWidth,l=t.clientHeight,u=a.left+a.right,c=a.top+a.bottom,d=i.left+i.right,f=e.width/(o+d),p=o-u,v=l-c,h=e.left+a.left+i.left,g=e.top+a.top+i.top;return this.containerBB=[h,g,p,v,f]},Kn.invalidateContainerClientCoordsCache=function(){this.containerBB=null},Kn.findNearestElement=function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0]},Kn.findNearestElements=function(t,e,r,n){var a=this,i=this,o=i.getCachedZSortedEles(),l=[],u=i.cy.zoom(),c=i.cy.hasCompoundNodes(),d=(n?24:8)/u,f=(n?8:2)/u,p=(n?8:2)/u,v=1/0,h,g;r&&(o=o.interactive);function y(k,B){if(k.isNode()){if(g)return;g=k,l.push(k)}if(k.isEdge()&&(B==null||B<v))if(h){if(h.pstyle("z-compound-depth").value===k.pstyle("z-compound-depth").value&&h.pstyle("z-compound-depth").value===k.pstyle("z-compound-depth").value){for(var S=0;S<l.length;S++)if(l[S].isEdge()){l[S]=k,h=k,v=B??v;break}}}else l.push(k),h=k,v=B??v}function m(k){var B=k.outerWidth()+2*f,S=k.outerHeight()+2*f,N=B/2,D=S/2,P=k.position(),F=k.pstyle("corner-radius").value==="auto"?"auto":k.pstyle("corner-radius").pfValue,O=k._private.rscratch;if(P.x-N<=t&&t<=P.x+N&&P.y-D<=e&&e<=P.y+D){var I=i.nodeShapes[a.getNodeShape(k)];if(I.checkPoint(t,e,0,B,S,P.x,P.y,F,O))return y(k,0),!0}}function b(k){var B=k._private,S=B.rscratch,N=k.pstyle("width").pfValue,D=k.pstyle("arrow-scale").value,P=N/2+d,F=P*P,O=P*2,L=B.source,R=B.target,I;if(S.edgeType==="segments"||S.edgeType==="straight"||S.edgeType==="haystack"){for(var _=S.allpts,M=0;M+3<_.length;M+=2)if(jB(t,e,_[M],_[M+1],_[M+2],_[M+3],O)&&F>(I=JB(t,e,_[M],_[M+1],_[M+2],_[M+3])))return y(k,I),!0}else if(S.edgeType==="bezier"||S.edgeType==="multibezier"||S.edgeType==="self"||S.edgeType==="compound"){for(var _=S.allpts,M=0;M+5<S.allpts.length;M+=4)if(YB(t,e,_[M],_[M+1],_[M+2],_[M+3],_[M+4],_[M+5],O)&&F>(I=QB(t,e,_[M],_[M+1],_[M+2],_[M+3],_[M+4],_[M+5])))return y(k,I),!0}for(var L=L||B.source,R=R||B.target,H=a.getArrowWidth(N,D),$=[{name:"source",x:S.arrowStartX,y:S.arrowStartY,angle:S.srcArrowAngle},{name:"target",x:S.arrowEndX,y:S.arrowEndY,angle:S.tgtArrowAngle},{name:"mid-source",x:S.midX,y:S.midY,angle:S.midsrcArrowAngle},{name:"mid-target",x:S.midX,y:S.midY,angle:S.midtgtArrowAngle}],M=0;M<$.length;M++){var z=$[M],j=i.arrowShapes[k.pstyle(z.name+"-arrow-shape").value],ee=k.pstyle("width").pfValue;if(j.roughCollide(t,e,H,z.angle,{x:z.x,y:z.y},ee,d)&&j.collide(t,e,H,z.angle,{x:z.x,y:z.y},ee,d))return y(k),!0}c&&l.length>0&&(m(L),m(R))}function w(k,B,S){return lr(k,B,S)}function C(k,B){var S=k._private,N=p,D;B?D=B+"-":D="",k.boundingBox();var P=S.labelBounds[B||"main"],F=k.pstyle(D+"label").value,O=k.pstyle("text-events").strValue==="yes";if(!(!O||!F)){var I=w(S.rscratch,"labelX",B),_=w(S.rscratch,"labelY",B),M=w(S.rscratch,"labelAngle",B),L=k.pstyle(D+"text-margin-x").pfValue,R=k.pstyle(D+"text-margin-y").pfValue,H=P.x1-N-L,$=P.x2+N-L,z=P.y1-N-R,j=P.y2+N-R;if(M){var ee=Math.cos(M),J=Math.sin(M),Z=function(he,ne){return he=he-I,ne=ne-_,{x:he*ee-ne*J+I,y:he*J+ne*ee+_}},re=Z(H,z),Y=Z(H,j),A=Z($,z),K=Z($,j),W=[re.x+L,re.y+R,A.x+L,A.y+R,K.x+L,K.y+R,Y.x+L,Y.y+R];if(Ht(t,e,W))return y(k),!0}else if(ba(P,t,e))return y(k),!0}}for(var x=o.length-1;x>=0;x--){var E=o[x];E.isNode()?m(E)||C(E):b(E)||C(E)||C(E,"source")||C(E,"target")}return l},Kn.getAllInBox=function(t,e,r,n){var a=this.getCachedZSortedEles().interactive,i=[],o=Math.min(t,r),l=Math.max(t,r),u=Math.min(e,n),c=Math.max(e,n);t=o,r=l,e=u,n=c;for(var d=zt({x1:t,y1:e,x2:r,y2:n}),f=0;f<a.length;f++){var p=a[f];if(p.isNode()){var v=p,h=v.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});Yl(d,h)&&!Wh(h,d)&&i.push(v)}else{var g=p,y=g._private,m=y.rscratch;if(m.startX!=null&&m.startY!=null&&!ba(d,m.startX,m.startY)||m.endX!=null&&m.endY!=null&&!ba(d,m.endX,m.endY))continue;if(m.edgeType==="bezier"||m.edgeType==="multibezier"||m.edgeType==="self"||m.edgeType==="compound"||m.edgeType==="segments"||m.edgeType==="haystack"){for(var b=y.rstyle.bezierPts||y.rstyle.linePts||y.rstyle.haystackPts,w=!0,C=0;C<b.length;C++)if(!WB(d,b[C])){w=!1;break}w&&i.push(g)}else(m.edgeType==="haystack"||m.edgeType==="straight")&&i.push(g)}}return i};var ms={};ms.calculateArrowAngles=function(t){var e=t._private.rscratch,r=e.edgeType==="haystack",n=e.edgeType==="bezier",a=e.edgeType==="multibezier",i=e.edgeType==="segments",o=e.edgeType==="compound",l=e.edgeType==="self",u,c,d,f,p,v,m,b;if(r?(d=e.haystackPts[0],f=e.haystackPts[1],p=e.haystackPts[2],v=e.haystackPts[3]):(d=e.arrowStartX,f=e.arrowStartY,p=e.arrowEndX,v=e.arrowEndY),m=e.midX,b=e.midY,i)u=d-e.segpts[0],c=f-e.segpts[1];else if(a||o||l||n){var h=e.allpts,g=ft(h[0],h[2],h[4],.1),y=ft(h[1],h[3],h[5],.1);u=d-g,c=f-y}else u=d-m,c=f-b;e.srcArrowAngle=Ro(u,c);var m=e.midX,b=e.midY;if(r&&(m=(d+p)/2,b=(f+v)/2),u=p-d,c=v-f,i){var h=e.allpts;if(h.length/2%2===0){var w=h.length/2,C=w-2;u=h[w]-h[C],c=h[w+1]-h[C+1]}else if(e.isRound)u=e.midVector[1],c=-e.midVector[0];else{var w=h.length/2-1,C=w-2;u=h[w]-h[C],c=h[w+1]-h[C+1]}}else if(a||o||l){var h=e.allpts,x=e.ctrlpts,E,k,B,S;if(x.length/2%2===0){var N=h.length/2-1,D=N+2,P=D+2;E=ft(h[N],h[D],h[P],0),k=ft(h[N+1],h[D+1],h[P+1],0),B=ft(h[N],h[D],h[P],1e-4),S=ft(h[N+1],h[D+1],h[P+1],1e-4)}else{var D=h.length/2-1,N=D-2,P=D+2;E=ft(h[N],h[D],h[P],.4999),k=ft(h[N+1],h[D+1],h[P+1],.4999),B=ft(h[N],h[D],h[P],.5),S=ft(h[N+1],h[D+1],h[P+1],.5)}u=B-E,c=S-k}if(e.midtgtArrowAngle=Ro(u,c),e.midDispX=u,e.midDispY=c,u*=-1,c*=-1,i){var h=e.allpts;if(h.length/2%2!==0){if(!e.isRound){var w=h.length/2-1,F=w+2;u=-(h[F]-h[w]),c=-(h[F+1]-h[w+1])}}}if(e.midsrcArrowAngle=Ro(u,c),i)u=p-e.segpts[e.segpts.length-2],c=v-e.segpts[e.segpts.length-1];else if(a||o||l||n){var h=e.allpts,O=h.length,g=ft(h[O-6],h[O-4],h[O-2],.9),y=ft(h[O-5],h[O-3],h[O-1],.9);u=p-g,c=v-y}else u=p-m,c=v-b;e.tgtArrowAngle=Ro(u,c)},ms.getArrowWidth=ms.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},n=r[t+", "+e];return n||(n=Math.max(Math.pow(t*13.37,.9),29)*e,r[t+", "+e]=n,n)};var xc,Ec,kr={},er={},Bv,Nv,qn,ys,zr,Un,Gn,xr,Ma,bs,Dv,Pv,Sc,Tc,Ov,_v=function(e,r,n){n.x=r.x-e.x,n.y=r.y-e.y,n.len=Math.sqrt(n.x*n.x+n.y*n.y),n.nx=n.x/n.len,n.ny=n.y/n.len,n.ang=Math.atan2(n.ny,n.nx)},LD=function(e,r){r.x=e.x*-1,r.y=e.y*-1,r.nx=e.nx*-1,r.ny=e.ny*-1,r.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang},MD=function(e,r,n,a,i){if(e!==Ov?_v(r,e,kr):LD(er,kr),_v(r,n,er),Bv=kr.nx*er.ny-kr.ny*er.nx,Nv=kr.nx*er.nx-kr.ny*-er.ny,zr=Math.asin(Math.max(-1,Math.min(1,Bv))),Math.abs(zr)<1e-6){xc=r.x,Ec=r.y,Gn=Ma=0;return}qn=1,ys=!1,Nv<0?zr<0?zr=Math.PI+zr:(zr=Math.PI-zr,qn=-1,ys=!0):zr>0&&(qn=-1,ys=!0),r.radius!==void 0?Ma=r.radius:Ma=a,Un=zr/2,bs=Math.min(kr.len/2,er.len/2),i?(xr=Math.abs(Math.cos(Un)*Ma/Math.sin(Un)),xr>bs?(xr=bs,Gn=Math.abs(xr*Math.sin(Un)/Math.cos(Un))):Gn=Ma):(xr=Math.min(bs,Ma),Gn=Math.abs(xr*Math.sin(Un)/Math.cos(Un))),Sc=r.x+er.nx*xr,Tc=r.y+er.ny*xr,xc=Sc-er.ny*Gn*qn,Ec=Tc+er.nx*Gn*qn,Dv=r.x+kr.nx*xr,Pv=r.y+kr.ny*xr,Ov=r};function Fv(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function Bc(t,e,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(MD(t,e,r,n,a),{cx:xc,cy:Ec,radius:Gn,startX:Dv,startY:Pv,stopX:Sc,stopY:Tc,startAngle:kr.ang+Math.PI/2*qn,endAngle:er.ang-Math.PI/2*qn,counterClockwise:ys})}var Pt={};Pt.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,a=e.vectorNormInverse,i,o=t.pstyle("source-endpoint"),l=t.pstyle("target-endpoint"),u=o.units!=null&&l.units!=null,c=function(x,E,k,B){var S=B-E,N=k-x,D=Math.sqrt(N*N+S*S);return{x:-S/D,y:N/D}},d=t.pstyle("edge-distances").value;switch(d){case"node-position":i=r;break;case"intersection":i=n;break;case"endpoints":{if(u){var f=this.manualEndptToPx(t.source()[0],o),p=sr(f,2),v=p[0],h=p[1],g=this.manualEndptToPx(t.target()[0],l),y=sr(g,2),m=y[0],b=y[1],w={x1:v,y1:h,x2:m,y2:b};a=c(v,h,m,b),i=w}else Ae("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=n;break}}return{midptPts:i,vectorNormInverse:a}},Pt.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r._private,a=n.rscratch;if(!a.haystack){var i=Math.random()*2*Math.PI;a.source={x:Math.cos(i),y:Math.sin(i)},i=Math.random()*2*Math.PI,a.target={x:Math.cos(i),y:Math.sin(i)}}var o=n.source,l=n.target,u=o.position(),c=l.position(),d=o.width(),f=l.width(),p=o.height(),v=l.height(),h=r.pstyle("haystack-radius").value,g=h/2;a.haystackPts=a.allpts=[a.source.x*d*g+u.x,a.source.y*p*g+u.y,a.target.x*f*g+c.x,a.target.y*v*g+c.y],a.midX=(a.allpts[0]+a.allpts[2])/2,a.midY=(a.allpts[1]+a.allpts[3])/2,a.edgeType="haystack",a.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},Pt.findSegmentsPoints=function(t,e){var r=t._private.rscratch,n=t.pstyle("segment-weights"),a=t.pstyle("segment-distances"),i=t.pstyle("segment-radii"),o=t.pstyle("radius-type"),l=Math.min(n.pfValue.length,a.pfValue.length),u=i.pfValue[i.pfValue.length-1],c=o.pfValue[o.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var d=0;d<l;d++){var f=n.pfValue[d],p=a.pfValue[d],v=1-f,h=f,g=this.findMidptPtsEtc(t,e),y=g.midptPts,m=g.vectorNormInverse,b={x:y.x1*v+y.x2*h,y:y.y1*v+y.y2*h};r.segpts.push(b.x+m.x*p,b.y+m.y*p),r.radii.push(i.pfValue[d]!==void 0?i.pfValue[d]:u),r.isArcRadius.push((o.pfValue[d]!==void 0?o.pfValue[d]:c)==="arc-radius")}},Pt.findLoopPoints=function(t,e,r,n){var a=t._private.rscratch,i=e.dirCounts,o=e.srcPos,l=t.pstyle("control-point-distances"),u=l?l.pfValue[0]:void 0,c=t.pstyle("loop-direction").pfValue,d=t.pstyle("loop-sweep").pfValue,f=t.pstyle("control-point-step-size").pfValue;a.edgeType="self";var p=r,v=f;n&&(p=0,v=u);var h=c-Math.PI/2,g=h-d/2,y=h+d/2,m=c+"_"+d;p=i[m]===void 0?i[m]=0:++i[m],a.ctrlpts=[o.x+Math.cos(g)*1.4*v*(p/3+1),o.y+Math.sin(g)*1.4*v*(p/3+1),o.x+Math.cos(y)*1.4*v*(p/3+1),o.y+Math.sin(y)*1.4*v*(p/3+1)]},Pt.findCompoundLoopPoints=function(t,e,r,n){var a=t._private.rscratch;a.edgeType="compound";var i=e.srcPos,o=e.tgtPos,l=e.srcW,u=e.srcH,c=e.tgtW,d=e.tgtH,f=t.pstyle("control-point-step-size").pfValue,p=t.pstyle("control-point-distances"),v=p?p.pfValue[0]:void 0,h=r,g=f;n&&(h=0,g=v);var y=50,m={x:i.x-l/2,y:i.y-u/2},b={x:o.x-c/2,y:o.y-d/2},w={x:Math.min(m.x,b.x),y:Math.min(m.y,b.y)},C=.5,x=Math.max(C,Math.log(l*.01)),E=Math.max(C,Math.log(c*.01));a.ctrlpts=[w.x,w.y-(1+Math.pow(y,1.12)/100)*g*(h/3+1)*x,w.x-(1+Math.pow(y,1.12)/100)*g*(h/3+1)*E,w.y]},Pt.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"},Pt.findBezierPoints=function(t,e,r,n,a){var i=t._private.rscratch,o=t.pstyle("control-point-step-size").pfValue,l=t.pstyle("control-point-distances"),u=t.pstyle("control-point-weights"),c=l&&u?Math.min(l.value.length,u.value.length):1,d=l?l.pfValue[0]:void 0,f=u.value[0],p=n;i.edgeType=p?"multibezier":"bezier",i.ctrlpts=[];for(var v=0;v<c;v++){var h=(.5-e.eles.length/2+r)*o*(a?-1:1),g=void 0,y=qh(h);p&&(d=l?l.pfValue[v]:o,f=u.value[v]),n?g=d:g=d!==void 0?y*d:void 0;var m=g!==void 0?g:h,b=1-f,w=f,C=this.findMidptPtsEtc(t,e),x=C.midptPts,E=C.vectorNormInverse,k={x:x.x1*b+x.x2*w,y:x.y1*b+x.y2*w};i.ctrlpts.push(k.x+E.x*m,k.y+E.y*m)}},Pt.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType="segments";var n="vertical",a="horizontal",i="leftward",o="rightward",l="downward",u="upward",c="auto",d=e.posPts,f=e.srcW,p=e.srcH,v=e.tgtW,h=e.tgtH,g=t.pstyle("edge-distances").value,y=g!=="node-position",m=t.pstyle("taxi-direction").value,b=m,w=t.pstyle("taxi-turn"),C=w.units==="%",x=w.pfValue,E=x<0,k=t.pstyle("taxi-turn-min-distance").pfValue,B=y?(f+v)/2:0,S=y?(p+h)/2:0,N=d.x2-d.x1,D=d.y2-d.y1,P=function(we,Ce){return we>0?Math.max(we-Ce,0):Math.min(we+Ce,0)},F=P(N,B),O=P(D,S),I=!1;b===c?m=Math.abs(F)>Math.abs(O)?a:n:b===u||b===l?(m=n,I=!0):(b===i||b===o)&&(m=a,I=!0);var _=m===n,M=_?O:F,L=_?D:N,R=qh(L),H=!1;!(I&&(C||E))&&(b===l&&L<0||b===u&&L>0||b===i&&L>0||b===o&&L<0)&&(R*=-1,M=R*Math.abs(M),H=!0);var $;if(C){var z=x<0?1+x:x;$=z*M}else{var j=x<0?M:0;$=j+x*R}var ee=function(we){return Math.abs(we)<k||Math.abs(we)>=Math.abs(M)},J=ee($),Z=ee(Math.abs(M)-Math.abs($)),re=J||Z;if(re&&!H)if(_){var Y=Math.abs(L)<=p/2,A=Math.abs(N)<=v/2;if(Y){var K=(d.x1+d.x2)/2,W=d.y1,oe=d.y2;r.segpts=[K,W,K,oe]}else if(A){var he=(d.y1+d.y2)/2,ne=d.x1,se=d.x2;r.segpts=[ne,he,se,he]}else r.segpts=[d.x1,d.y2]}else{var ue=Math.abs(L)<=f/2,pe=Math.abs(D)<=h/2;if(ue){var de=(d.y1+d.y2)/2,me=d.x1,Ne=d.x2;r.segpts=[me,de,Ne,de]}else if(pe){var De=(d.x1+d.x2)/2,Ee=d.y1,Pe=d.y2;r.segpts=[De,Ee,De,Pe]}else r.segpts=[d.x2,d.y1]}else if(_){var te=d.y1+$+(y?p/2*R:0),T=d.x1,V=d.x2;r.segpts=[T,te,V,te]}else{var Q=d.x1+$+(y?f/2*R:0),G=d.y1,U=d.y2;r.segpts=[Q,G,Q,U]}if(r.isRound){var ie=t.pstyle("taxi-radius").value,X=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(ie),r.isArcRadius=new Array(r.segpts.length/2).fill(X)}},Pt.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,a=e.tgtPos,i=e.srcW,o=e.srcH,l=e.tgtW,u=e.tgtH,c=e.srcShape,d=e.tgtShape,f=e.srcCornerRadius,p=e.tgtCornerRadius,v=e.srcRs,h=e.tgtRs,g=!le(r.startX)||!le(r.startY),y=!le(r.arrowStartX)||!le(r.arrowStartY),m=!le(r.endX)||!le(r.endY),b=!le(r.arrowEndX)||!le(r.arrowEndY),w=3,C=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,x=w*C,E=In({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),k=E<x,B=In({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),S=B<x,N=!1;if(g||y||k){N=!0;var D={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},P=Math.sqrt(D.x*D.x+D.y*D.y),F={x:D.x/P,y:D.y/P},O=Math.max(i,o),I={x:r.ctrlpts[0]+F.x*2*O,y:r.ctrlpts[1]+F.y*2*O},_=c.intersectLine(n.x,n.y,i,o,I.x,I.y,0,f,v);k?(r.ctrlpts[0]=r.ctrlpts[0]+F.x*(x-E),r.ctrlpts[1]=r.ctrlpts[1]+F.y*(x-E)):(r.ctrlpts[0]=_[0]+F.x*x,r.ctrlpts[1]=_[1]+F.y*x)}if(m||b||S){N=!0;var M={x:r.ctrlpts[0]-a.x,y:r.ctrlpts[1]-a.y},L=Math.sqrt(M.x*M.x+M.y*M.y),R={x:M.x/L,y:M.y/L},H=Math.max(i,o),$={x:r.ctrlpts[0]+R.x*2*H,y:r.ctrlpts[1]+R.y*2*H},z=d.intersectLine(a.x,a.y,l,u,$.x,$.y,0,p,h);S?(r.ctrlpts[0]=r.ctrlpts[0]+R.x*(x-B),r.ctrlpts[1]=r.ctrlpts[1]+R.y*(x-B)):(r.ctrlpts[0]=z[0]+R.x*x,r.ctrlpts[1]=z[1]+R.y*x)}N&&this.findEndpoints(t)}},Pt.storeAllpts=function(t){var e=t._private.rscratch;if(e.edgeType==="multibezier"||e.edgeType==="bezier"||e.edgeType==="self"||e.edgeType==="compound"){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);e.allpts.push(e.endX,e.endY);var n,a;e.ctrlpts.length/2%2===0?(n=e.allpts.length/2-1,e.midX=e.allpts[n],e.midY=e.allpts[n+1]):(n=e.allpts.length/2-3,a=.5,e.midX=ft(e.allpts[n],e.allpts[n+2],e.allpts[n+4],a),e.midY=ft(e.allpts[n+1],e.allpts[n+3],e.allpts[n+5],a))}else if(e.edgeType==="straight")e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if(e.edgeType==="segments"){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var i=2;i+3<e.allpts.length;i+=2){var o=e.radii[i/2-1],l=e.isArcRadius[i/2-1];e.roundCorners.push(Bc({x:e.allpts[i-2],y:e.allpts[i-1]},{x:e.allpts[i],y:e.allpts[i+1],radius:o},{x:e.allpts[i+2],y:e.allpts[i+3]},o,l))}}if(e.segpts.length%4===0){var u=e.segpts.length/2,c=u-2;e.midX=(e.segpts[c]+e.segpts[u])/2,e.midY=(e.segpts[c+1]+e.segpts[u+1])/2}else{var d=e.segpts.length/2-1;if(!e.isRound)e.midX=e.segpts[d],e.midY=e.segpts[d+1];else{var f={x:e.segpts[d],y:e.segpts[d+1]},p=e.roundCorners[d/2],v=[f.x-p.cx,f.y-p.cy],h=p.radius/Math.sqrt(Math.pow(v[0],2)+Math.pow(v[1],2));v=v.map(function(g){return g*h}),e.midX=p.cx+v[0],e.midY=p.cy+v[1],e.midVector=v}}}},Pt.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||le(e.startX)&&le(e.startY)&&le(e.endX)&&le(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,Ae("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},Pt.findEdgeControlPoints=function(t){var e=this;if(!(!t||t.length===0)){for(var r=this,n=r.cy,a=n.hasCompoundNodes(),i={map:new wr,get:function(k){var B=this.map.get(k[0]);return B!=null?B.get(k[1]):null},set:function(k,B){var S=this.map.get(k[0]);S==null&&(S=new wr,this.map.set(k[0],S)),S.set(k[1],B)}},o=[],l=[],u=0;u<t.length;u++){var c=t[u],d=c._private,f=c.pstyle("curve-style").value;if(!(c.removed()||!c.takesUpSpace())){if(f==="haystack"){l.push(c);continue}var p=f==="unbundled-bezier"||f.endsWith("segments")||f==="straight"||f==="straight-triangle"||f.endsWith("taxi"),v=f==="unbundled-bezier"||f==="bezier",h=d.source,g=d.target,y=h.poolIndex(),m=g.poolIndex(),b=[y,m].sort(),w=i.get(b);w==null&&(w={eles:[]},i.set(b,w),o.push(b)),w.eles.push(c),p&&(w.hasUnbundled=!0),v&&(w.hasBezier=!0)}}for(var C=function(k){var B=o[k],S=i.get(B),N=void 0;if(!S.hasUnbundled){var D=S.eles[0].parallelEdges().filter(function(Q){return Q.isBundledBezier()});Gl(S.eles),D.forEach(function(Q){return S.eles.push(Q)}),S.eles.sort(function(Q,G){return Q.poolIndex()-G.poolIndex()})}var P=S.eles[0],F=P.source(),O=P.target();if(F.poolIndex()>O.poolIndex()){var I=F;F=O,O=I}var _=S.srcPos=F.position(),M=S.tgtPos=O.position(),L=S.srcW=F.outerWidth(),R=S.srcH=F.outerHeight(),H=S.tgtW=O.outerWidth(),$=S.tgtH=O.outerHeight(),z=S.srcShape=r.nodeShapes[e.getNodeShape(F)],j=S.tgtShape=r.nodeShapes[e.getNodeShape(O)],ee=S.srcCornerRadius=F.pstyle("corner-radius").value==="auto"?"auto":F.pstyle("corner-radius").pfValue,J=S.tgtCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,Z=S.tgtRs=O._private.rscratch,re=S.srcRs=F._private.rscratch;S.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var Y=0;Y<S.eles.length;Y++){var A=S.eles[Y],K=A[0]._private.rscratch,W=A.pstyle("curve-style").value,oe=W==="unbundled-bezier"||W.endsWith("segments")||W.endsWith("taxi"),he=!F.same(A.source());if(!S.calculatedIntersection&&F!==O&&(S.hasBezier||S.hasUnbundled)){S.calculatedIntersection=!0;var ne=z.intersectLine(_.x,_.y,L,R,M.x,M.y,0,ee,re),se=S.srcIntn=ne,ue=j.intersectLine(M.x,M.y,H,$,_.x,_.y,0,J,Z),pe=S.tgtIntn=ue,de=S.intersectionPts={x1:ne[0],x2:ue[0],y1:ne[1],y2:ue[1]},me=S.posPts={x1:_.x,x2:M.x,y1:_.y,y2:M.y},Ne=ue[1]-ne[1],De=ue[0]-ne[0],Ee=Math.sqrt(De*De+Ne*Ne),Pe=S.vector={x:De,y:Ne},te=S.vectorNorm={x:Pe.x/Ee,y:Pe.y/Ee},T={x:-te.y,y:te.x};S.nodesOverlap=!le(Ee)||j.checkPoint(ne[0],ne[1],0,H,$,M.x,M.y,J,Z)||z.checkPoint(ue[0],ue[1],0,L,R,_.x,_.y,ee,re),S.vectorNormInverse=T,N={nodesOverlap:S.nodesOverlap,dirCounts:S.dirCounts,calculatedIntersection:!0,hasBezier:S.hasBezier,hasUnbundled:S.hasUnbundled,eles:S.eles,srcPos:M,tgtPos:_,srcW:H,srcH:$,tgtW:L,tgtH:R,srcIntn:pe,tgtIntn:se,srcShape:j,tgtShape:z,posPts:{x1:me.x2,y1:me.y2,x2:me.x1,y2:me.y1},intersectionPts:{x1:de.x2,y1:de.y2,x2:de.x1,y2:de.y1},vector:{x:-Pe.x,y:-Pe.y},vectorNorm:{x:-te.x,y:-te.y},vectorNormInverse:{x:-T.x,y:-T.y}}}var V=he?N:S;K.nodesOverlap=V.nodesOverlap,K.srcIntn=V.srcIntn,K.tgtIntn=V.tgtIntn,K.isRound=W.startsWith("round"),a&&(F.isParent()||F.isChild()||O.isParent()||O.isChild())&&(F.parents().anySame(O)||O.parents().anySame(F)||F.same(O)&&F.isParent())?e.findCompoundLoopPoints(A,V,Y,oe):F===O?e.findLoopPoints(A,V,Y,oe):W.endsWith("segments")?e.findSegmentsPoints(A,V):W.endsWith("taxi")?e.findTaxiPoints(A,V):W==="straight"||!oe&&S.eles.length%2===1&&Y===Math.floor(S.eles.length/2)?e.findStraightEdgePoints(A):e.findBezierPoints(A,V,Y,oe,he),e.findEndpoints(A),e.tryToCorrectInvalidPoints(A,V),e.checkForInvalidEdgeWarning(A),e.storeAllpts(A),e.storeEdgeProjections(A),e.calculateArrowAngles(A),e.recalculateEdgeLabelProjections(A),e.calculateLabelAngles(A)}},x=0;x<o.length;x++)C(x);this.findHaystackPoints(l)}};function Lv(t){var e=[];if(t!=null){for(var r=0;r<t.length;r+=2){var n=t[r],a=t[r+1];e.push({x:n,y:a})}return e}}Pt.getSegmentPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if(r==="segments")return this.recalculateRenderedStyle(t),Lv(e.segpts)},Pt.getControlPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if(r==="bezier"||r==="multibezier"||r==="self"||r==="compound")return this.recalculateRenderedStyle(t),Lv(e.ctrlpts)},Pt.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};var zi={};zi.manualEndptToPx=function(t,e){var r=this,n=t.position(),a=t.outerWidth(),i=t.outerHeight(),o=t._private.rscratch;if(e.value.length===2){var l=[e.pfValue[0],e.pfValue[1]];return e.units[0]==="%"&&(l[0]=l[0]*a),e.units[1]==="%"&&(l[1]=l[1]*i),l[0]+=n.x,l[1]+=n.y,l}else{var u=e.pfValue[0];u=-Math.PI/2+u;var c=2*Math.max(a,i),d=[n.x+Math.cos(u)*c,n.y+Math.sin(u)*c];return r.nodeShapes[this.getNodeShape(t)].intersectLine(n.x,n.y,a,i,d[0],d[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,o)}},zi.findEndpoints=function(t){var e=this,r,n=t.source()[0],a=t.target()[0],i=n.position(),o=a.position(),l=t.pstyle("target-arrow-shape").value,u=t.pstyle("source-arrow-shape").value,c=t.pstyle("target-distance-from-node").pfValue,d=t.pstyle("source-distance-from-node").pfValue,f=n._private.rscratch,p=a._private.rscratch,v=t.pstyle("curve-style").value,h=t._private.rscratch,g=h.edgeType,y=v==="taxi",m=g==="self"||g==="compound",b=g==="bezier"||g==="multibezier"||m,w=g!=="bezier",C=g==="straight"||g==="segments",x=g==="segments",E=b||w||C,k=m||y,B=t.pstyle("source-endpoint"),S=k?"outside-to-node":B.value,N=n.pstyle("corner-radius").value==="auto"?"auto":n.pstyle("corner-radius").pfValue,D=t.pstyle("target-endpoint"),P=k?"outside-to-node":D.value,F=a.pstyle("corner-radius").value==="auto"?"auto":a.pstyle("corner-radius").pfValue;h.srcManEndpt=B,h.tgtManEndpt=D;var O,I,_,M;if(b){var L=[h.ctrlpts[0],h.ctrlpts[1]],R=w?[h.ctrlpts[h.ctrlpts.length-2],h.ctrlpts[h.ctrlpts.length-1]]:L;O=R,I=L}else if(C){var H=x?h.segpts.slice(0,2):[o.x,o.y],$=x?h.segpts.slice(h.segpts.length-2):[i.x,i.y];O=$,I=H}if(P==="inside-to-node")r=[o.x,o.y];else if(D.units)r=this.manualEndptToPx(a,D);else if(P==="outside-to-line")r=h.tgtIntn;else if(P==="outside-to-node"||P==="outside-to-node-or-label"?_=O:(P==="outside-to-line"||P==="outside-to-line-or-label")&&(_=[i.x,i.y]),r=e.nodeShapes[this.getNodeShape(a)].intersectLine(o.x,o.y,a.outerWidth(),a.outerHeight(),_[0],_[1],0,F,p),P==="outside-to-node-or-label"||P==="outside-to-line-or-label"){var z=a._private.rscratch,j=z.labelWidth,ee=z.labelHeight,J=z.labelX,Z=z.labelY,re=j/2,Y=ee/2,A=a.pstyle("text-valign").value;A==="top"?Z-=Y:A==="bottom"&&(Z+=Y);var K=a.pstyle("text-halign").value;K==="left"?J-=re:K==="right"&&(J+=re);var W=Bi(_[0],_[1],[J-re,Z-Y,J+re,Z-Y,J+re,Z+Y,J-re,Z+Y],o.x,o.y);if(W.length>0){var oe=i,he=An(oe,ma(r)),ne=An(oe,ma(W)),se=he;if(ne<he&&(r=W,se=ne),W.length>2){var ue=An(oe,{x:W[2],y:W[3]});ue<se&&(r=[W[2],W[3]])}}}var pe=Ko(r,O,e.arrowShapes[l].spacing(t)+c),de=Ko(r,O,e.arrowShapes[l].gap(t)+c);if(h.endX=de[0],h.endY=de[1],h.arrowEndX=pe[0],h.arrowEndY=pe[1],S==="inside-to-node")r=[i.x,i.y];else if(B.units)r=this.manualEndptToPx(n,B);else if(S==="outside-to-line")r=h.srcIntn;else if(S==="outside-to-node"||S==="outside-to-node-or-label"?M=I:(S==="outside-to-line"||S==="outside-to-line-or-label")&&(M=[o.x,o.y]),r=e.nodeShapes[this.getNodeShape(n)].intersectLine(i.x,i.y,n.outerWidth(),n.outerHeight(),M[0],M[1],0,N,f),S==="outside-to-node-or-label"||S==="outside-to-line-or-label"){var me=n._private.rscratch,Ne=me.labelWidth,De=me.labelHeight,Ee=me.labelX,Pe=me.labelY,te=Ne/2,T=De/2,V=n.pstyle("text-valign").value;V==="top"?Pe-=T:V==="bottom"&&(Pe+=T);var Q=n.pstyle("text-halign").value;Q==="left"?Ee-=te:Q==="right"&&(Ee+=te);var G=Bi(M[0],M[1],[Ee-te,Pe-T,Ee+te,Pe-T,Ee+te,Pe+T,Ee-te,Pe+T],i.x,i.y);if(G.length>0){var U=o,ie=An(U,ma(r)),X=An(U,ma(G)),ae=ie;if(X<ie&&(r=[G[0],G[1]],ae=X),G.length>2){var we=An(U,{x:G[2],y:G[3]});we<ae&&(r=[G[2],G[3]])}}}var Ce=Ko(r,I,e.arrowShapes[u].spacing(t)+d),ge=Ko(r,I,e.arrowShapes[u].gap(t)+d);h.startX=ge[0],h.startY=ge[1],h.arrowStartX=Ce[0],h.arrowStartY=Ce[1],E&&(!le(h.startX)||!le(h.startY)||!le(h.endX)||!le(h.endY)?h.badLine=!0:h.badLine=!1)},zi.getSourceEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[0],y:e.haystackPts[1]};default:return{x:e.arrowStartX,y:e.arrowStartY}}},zi.getTargetEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[2],y:e.haystackPts[3]};default:return{x:e.arrowEndX,y:e.arrowEndY}}};var Nc={};function ID(t,e,r){for(var n=function(c,d,f,p){return ft(c,d,f,p)},a=e._private,i=a.rstyle.bezierPts,o=0;o<t.bezierProjPcts.length;o++){var l=t.bezierProjPcts[o];i.push({x:n(r[0],r[2],r[4],l),y:n(r[1],r[3],r[5],l)})}}Nc.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,n==="multibezier"||n==="bezier"||n==="self"||n==="compound"){e.rstyle.bezierPts=[];for(var a=0;a+5<r.allpts.length;a+=4)ID(this,t,r.allpts.slice(a,a+6))}else if(n==="segments")for(var i=e.rstyle.linePts=[],a=0;a+1<r.allpts.length;a+=2)i.push({x:r.allpts[a],y:r.allpts[a+1]});else if(n==="haystack"){var o=r.haystackPts;e.rstyle.haystackPts=[{x:o[0],y:o[1]},{x:o[2],y:o[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},Nc.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var Er={};Er.recalculateNodeLabelProjection=function(t){var e=t.pstyle("label").strValue;if(!nn(e)){var r,n,a=t._private,i=t.width(),o=t.height(),l=t.padding(),u=t.position(),c=t.pstyle("text-halign").strValue,d=t.pstyle("text-valign").strValue,f=a.rscratch,p=a.rstyle;switch(c){case"left":r=u.x-i/2-l;break;case"right":r=u.x+i/2+l;break;default:r=u.x}switch(d){case"top":n=u.y-o/2-l;break;case"bottom":n=u.y+o/2+l;break;default:n=u.y}f.labelX=r,f.labelY=n,p.labelX=r,p.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}};var Mv=function(e,r){var n=Math.atan(r/e);return e===0&&n<0&&(n=n*-1),n},Iv=function(e,r){var n=r.x-e.x,a=r.y-e.y;return Mv(n,a)},AD=function(e,r,n,a){var i=Si(0,a-.001,1),o=Si(0,a+.001,1),l=ya(e,r,n,i),u=ya(e,r,n,o);return Iv(l,u)};Er.recalculateEdgeLabelProjections=function(t){var e,r=t._private,n=r.rscratch,a=this,i={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(i.mid||i.source||i.target){e={x:n.midX,y:n.midY};var o=function(f,p,v){sn(r.rscratch,f,p,v),sn(r.rstyle,f,p,v)};o("labelX",null,e.x),o("labelY",null,e.y);var l=Mv(n.midDispX,n.midDispY);o("labelAutoAngle",null,l);var u=function d(){if(d.cache)return d.cache;for(var f=[],p=0;p+5<n.allpts.length;p+=4){var v={x:n.allpts[p],y:n.allpts[p+1]},h={x:n.allpts[p+2],y:n.allpts[p+3]},g={x:n.allpts[p+4],y:n.allpts[p+5]};f.push({p0:v,p1:h,p2:g,startDist:0,length:0,segments:[]})}var y=r.rstyle.bezierPts,m=a.bezierProjPcts.length;function b(k,B,S,N,D){var P=In(B,S),F=k.segments[k.segments.length-1],O={p0:B,p1:S,t0:N,t1:D,startDist:F?F.startDist+F.length:0,length:P};k.segments.push(O),k.length+=P}for(var w=0;w<f.length;w++){var C=f[w],x=f[w-1];x&&(C.startDist=x.startDist+x.length),b(C,C.p0,y[w*m],0,a.bezierProjPcts[0]);for(var E=0;E<m-1;E++)b(C,y[w*m+E],y[w*m+E+1],a.bezierProjPcts[E],a.bezierProjPcts[E+1]);b(C,y[w*m+m-1],C.p2,a.bezierProjPcts[m-1],1)}return d.cache=f},c=function(f){var p,v=f==="source";if(i[f]){var h=t.pstyle(f+"-text-offset").pfValue;switch(n.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var g=u(),y,m=0,b=0,w=0;w<g.length;w++){for(var C=g[v?w:g.length-1-w],x=0;x<C.segments.length;x++){var E=C.segments[v?x:C.segments.length-1-x],k=w===g.length-1&&x===C.segments.length-1;if(m=b,b+=E.length,b>=h||k){y={cp:C,segment:E};break}}if(y)break}var B=y.cp,S=y.segment,N=(h-m)/S.length,D=S.t1-S.t0,P=v?S.t0+D*N:S.t1-D*N;P=Si(0,P,1),e=ya(B.p0,B.p1,B.p2,P),p=AD(B.p0,B.p1,B.p2,P);break}case"straight":case"segments":case"haystack":{for(var F=0,O,I,_,M,L=n.allpts.length,R=0;R+3<L&&(v?(_={x:n.allpts[R],y:n.allpts[R+1]},M={x:n.allpts[R+2],y:n.allpts[R+3]}):(_={x:n.allpts[L-2-R],y:n.allpts[L-1-R]},M={x:n.allpts[L-4-R],y:n.allpts[L-3-R]}),O=In(_,M),I=F,F+=O,!(F>=h));R+=2);var H=h-I,$=H/O;$=Si(0,$,1),e=HB(_,M,$),p=Iv(_,M);break}}o("labelX",f,e.x),o("labelY",f,e.y),o("labelAutoAngle",f,p)}};c("source"),c("target"),this.applyLabelDimensions(t)}},Er.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Er.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),a=this.calculateLabelDimensions(t,n),i=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,l=lr(r.rscratch,"labelWrapCachedLines",e)||[],u=o!=="wrap"?1:Math.max(l.length,1),c=a.height/u,d=c*i,f=a.width,p=a.height+(u-1)*(i-1)*c;sn(r.rstyle,"labelWidth",e,f),sn(r.rscratch,"labelWidth",e,f),sn(r.rstyle,"labelHeight",e,p),sn(r.rscratch,"labelHeight",e,p),sn(r.rscratch,"labelLineHeight",e,d)},Er.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",a=t.pstyle(n+"label").strValue,i=t.pstyle("text-transform").value,o=function(j,ee){return ee?(sn(r.rscratch,j,e,ee),ee):lr(r.rscratch,j,e)};if(!a)return"";i=="none"||(i=="uppercase"?a=a.toUpperCase():i=="lowercase"&&(a=a.toLowerCase()));var l=t.pstyle("text-wrap").value;if(l==="wrap"){var u=o("labelKey");if(u!=null&&o("labelWrapKey")===u)return o("labelWrapCachedText");for(var c="​",d=a.split(`
445
- `),f=t.pstyle("text-max-width").pfValue,p=t.pstyle("text-overflow-wrap").value,v=p==="anywhere",h=[],g=/[\s\u200b]+|$/g,y=0;y<d.length;y++){var m=d[y],b=this.calculateLabelDimensions(t,m),w=b.width;if(v){var C=m.split("").join(c);m=C}if(w>f){var x=m.matchAll(g),E="",k=0,B=mh(x),S;try{for(B.s();!(S=B.n()).done;){var N=S.value,D=N[0],P=m.substring(k,N.index);k=N.index+D.length;var F=E.length===0?P:E+P+D,O=this.calculateLabelDimensions(t,F),I=O.width;I<=f?E+=P+D:(E&&h.push(E),E=P+D)}}catch(z){B.e(z)}finally{B.f()}E.match(/^[\s\u200b]+$/)||h.push(E)}else h.push(m)}o("labelWrapCachedLines",h),a=o("labelWrapCachedText",h.join(`
446
- `)),o("labelWrapKey",u)}else if(l==="ellipsis"){var _=t.pstyle("text-max-width").pfValue,M="",L="…",R=!1;if(this.calculateLabelDimensions(t,a).width<_)return a;for(var H=0;H<a.length;H++){var $=this.calculateLabelDimensions(t,M+a[H]+L).width;if($>_)break;M+=a[H],H===a.length-1&&(R=!0)}return R||(M+=L),M}return a},Er.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e},Er.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),a=n.document,i=Mn(e,t._private.labelDimsKey),o=r.labelDimCache||(r.labelDimCache=[]),l=o[i];if(l!=null)return l;var u=0,c=t.pstyle("font-style").strValue,d=t.pstyle("font-size").pfValue,f=t.pstyle("font-family").strValue,p=t.pstyle("font-weight").strValue,v=this.labelCalcCanvas,h=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=a.createElement("canvas"),h=this.labelCalcCanvasContext=v.getContext("2d");var g=v.style;g.position="absolute",g.left="-9999px",g.top="-9999px",g.zIndex="-1",g.visibility="hidden",g.pointerEvents="none"}h.font="".concat(c," ").concat(p," ").concat(d,"px ").concat(f);for(var y=0,m=0,b=e.split(`
447
- `),w=0;w<b.length;w++){var C=b[w],x=h.measureText(C),E=Math.ceil(x.width),k=d;y=Math.max(E,y),m+=k}return y+=u,m+=u,o[i]={width:y,height:m}},Er.calculateLabelAngle=function(t,e){var r=t._private,n=r.rscratch,a=t.isEdge(),i=e?e+"-":"",o=t.pstyle(i+"text-rotation"),l=o.strValue;return l==="none"?0:a&&l==="autorotate"?n.labelAutoAngle:l==="autorotate"?0:o.pfValue},Er.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),n=t._private,a=n.rscratch;a.labelAngle=e.calculateLabelAngle(t),r&&(a.sourceLabelAngle=e.calculateLabelAngle(t,"source"),a.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var Av={},Rv=28,Vv=!1;Av.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<Rv||t.height()<Rv))return Vv||(Ae("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Vv=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var n=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(n).name}return r};var ws={};ws.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,n=function(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),l)for(var u=0;u<o.length;u++){var c=o[u],d=c._private,f=d.rstyle;f.clean=!1,f.cleanConnected=!1}};r.binder(t).on("bounds.* dirty.*",function(o){var l=o.target;n(l)}).on("style.* background.*",function(o){var l=o.target;n(l,!1)});var a=function(o){if(o){var l=r.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var c=e[u],d=c._private.rstyle;c.isNode()&&!d.cleanConnected&&(n(c.connectedEdges()),d.cleanConnected=!0)}if(l)for(var f=0;f<l.length;f++){var p=l[f];p(o,e)}r.recalculateRenderedStyle(e),e=t.collection()}};r.flushRenderedStyleQueue=function(){a(!0)},r.beforeRender(a,r.beforeRenderPriorities.eleCalcs)},ws.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)},ws.recalculateRenderedStyle=function(t,e){var r=function(C){return C._private.rstyle.cleanConnected},n=[],a=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<t.length;i++){var o=t[i],l=o._private,u=l.rstyle;o.isEdge()&&(!r(o.source())||!r(o.target()))&&(u.clean=!1),!(e&&u.clean||o.removed())&&o.pstyle("display").value!=="none"&&(l.group==="nodes"?a.push(o):n.push(o),u.clean=!0)}for(var c=0;c<a.length;c++){var d=a[c],f=d._private,p=f.rstyle,v=d.position();this.recalculateNodeLabelProjection(d),p.nodeX=v.x,p.nodeY=v.y,p.nodeW=d.pstyle("width").pfValue,p.nodeH=d.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var h=0;h<n.length;h++){var g=n[h],y=g._private,m=y.rstyle,b=y.rscratch;m.srcX=b.arrowStartX,m.srcY=b.arrowStartY,m.tgtX=b.arrowEndX,m.tgtY=b.arrowEndY,m.midX=b.midX,m.midY=b.midY,m.labelAngle=b.labelAngle,m.sourceLabelAngle=b.sourceLabelAngle,m.targetLabelAngle=b.targetLabelAngle}}};var Cs={};Cs.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=t[r],a=n._private.rscratch;n.grabbed()&&!n.isParent()?e.push(n):a.inDragLayer?t.drag.push(n):t.nondrag.push(n)}for(var r=0;r<e.length;r++){var n=e[r];t.drag.push(n)}}},Cs.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},Cs.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(tv),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var $v={};[Kn,ms,Pt,zi,Nc,Er,Av,ws,Cs].forEach(function(t){xe($v,t)});var zv={};zv.getCachedImage=function(t,e,r){var n=this,a=n.imageCache=n.imageCache||{},i=a[t];if(i)return i.image.complete||i.image.addEventListener("load",r),i.image;i=a[t]=a[t]||{};var o=i.image=new Image;o.addEventListener("load",r),o.addEventListener("error",function(){o.error=!0});var l="data:",u=t.substring(0,l.length).toLowerCase()===l;return u||(e=e==="null"?null:e,o.crossOrigin=e),o.src=t,o};var Ia={};Ia.registerBinding=function(t,e,r,n){var a=Array.prototype.slice.apply(arguments,[1]),i=this.binder(t);return i.on.apply(i,a)},Ia.binder=function(t){var e=this,r=e.cy.window(),n=t===r||t===r.document||t===r.document.body||lT(t);if(e.supportsPassiveEvents==null){var a=!1;try{var i=Object.defineProperty({},"passive",{get:function(){return a=!0,!0}});r.addEventListener("test",null,i)}catch{}e.supportsPassiveEvents=a}var o=function(u,c,d){var f=Array.prototype.slice.call(arguments);return n&&e.supportsPassiveEvents&&(f[2]={capture:d??!1,passive:!1,once:!1}),e.bindings.push({target:t,args:f}),(t.addEventListener||t.on).apply(t,f),this};return{on:o,addEventListener:o,addListener:o,bind:o}},Ia.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},Ia.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()},Ia.load=function(){var t=this,e=t.cy.window(),r=function(T){return T.selected()},n=function(T,V,Q,G){T==null&&(T=t.cy);for(var U=0;U<V.length;U++){var ie=V[U];T.emit({originalEvent:Q,type:ie,position:G})}},a=function(T){return T.shiftKey||T.metaKey||T.ctrlKey},i=function(T,V){var Q=!0;if(t.cy.hasCompoundNodes()&&T&&T.pannable())for(var G=0;V&&G<V.length;G++){var T=V[G];if(T.isNode()&&T.isParent()&&!T.pannable()){Q=!1;break}}else Q=!0;return Q},o=function(T){T[0]._private.grabbed=!0},l=function(T){T[0]._private.grabbed=!1},u=function(T){T[0]._private.rscratch.inDragLayer=!0},c=function(T){T[0]._private.rscratch.inDragLayer=!1},d=function(T){T[0]._private.rscratch.isGrabTarget=!0},f=function(T){T[0]._private.rscratch.isGrabTarget=!1},p=function(T,V){var Q=V.addToList,G=Q.has(T);!G&&T.grabbable()&&!T.locked()&&(Q.merge(T),o(T))},v=function(T,V){if(T.cy().hasCompoundNodes()&&!(V.inDragLayer==null&&V.addToList==null)){var Q=T.descendants();V.inDragLayer&&(Q.forEach(u),Q.connectedEdges().forEach(u)),V.addToList&&p(Q,V)}},h=function(T,V){V=V||{};var Q=T.cy().hasCompoundNodes();V.inDragLayer&&(T.forEach(u),T.neighborhood().stdFilter(function(G){return!Q||G.isEdge()}).forEach(u)),V.addToList&&T.forEach(function(G){p(G,V)}),v(T,V),m(T,{inDragLayer:V.inDragLayer}),t.updateCachedGrabbedEles()},g=h,y=function(T){T&&(t.getCachedZSortedEles().forEach(function(V){l(V),c(V),f(V)}),t.updateCachedGrabbedEles())},m=function(T,V){if(!(V.inDragLayer==null&&V.addToList==null)&&T.cy().hasCompoundNodes()){var Q=T.ancestors().orphans();if(!Q.same(T)){var G=Q.descendants().spawnSelf().merge(Q).unmerge(T).unmerge(T.descendants()),U=G.connectedEdges();V.inDragLayer&&(U.forEach(u),G.forEach(u)),V.addToList&&G.forEach(function(ie){p(ie,V)})}}},b=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},w=typeof MutationObserver<"u",C=typeof ResizeObserver<"u";w?(t.removeObserver=new MutationObserver(function(te){for(var T=0;T<te.length;T++){var V=te[T],Q=V.removedNodes;if(Q)for(var G=0;G<Q.length;G++){var U=Q[G];if(U===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(te){t.destroy()});var x=_o(function(){t.cy.resize()},100);w&&(t.styleObserver=new MutationObserver(x),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",x),C&&(t.resizeObserver=new ResizeObserver(x),t.resizeObserver.observe(t.container));var E=function(T,V){for(;T!=null;)V(T),T=T.parentNode},k=function(){t.invalidateContainerClientCoordsCache()};E(t.container,function(te){t.registerBinding(te,"transitionend",k),t.registerBinding(te,"animationend",k),t.registerBinding(te,"scroll",k)}),t.registerBinding(t.container,"contextmenu",function(te){te.preventDefault()});var B=function(){return t.selection[4]!==0},S=function(T){for(var V=t.findContainerClientCoords(),Q=V[0],G=V[1],U=V[2],ie=V[3],X=T.touches?T.touches:[T],ae=!1,we=0;we<X.length;we++){var Ce=X[we];if(Q<=Ce.clientX&&Ce.clientX<=Q+U&&G<=Ce.clientY&&Ce.clientY<=G+ie){ae=!0;break}}if(!ae)return!1;for(var ge=t.container,Se=T.target,ve=Se.parentNode,ye=!1;ve;){if(ve===ge){ye=!0;break}ve=ve.parentNode}return!!ye};t.registerBinding(t.container,"mousedown",function(T){if(S(T)&&!(t.hoverData.which===1&&T.which!==1)){T.preventDefault(),b(),t.hoverData.capture=!0,t.hoverData.which=T.which;var V=t.cy,Q=[T.clientX,T.clientY],G=t.projectIntoViewport(Q[0],Q[1]),U=t.selection,ie=t.findNearestElements(G[0],G[1],!0,!1),X=ie[0],ae=t.dragData.possibleDragElements;t.hoverData.mdownPos=G,t.hoverData.mdownGPos=Q;var we=function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var Ge=t.hoverData.down;Ge?Ge.emit({originalEvent:T,type:"taphold",position:{x:G[0],y:G[1]}}):V.emit({originalEvent:T,type:"taphold",position:{x:G[0],y:G[1]}})}},t.tapholdDuration)};if(T.which==3){t.hoverData.cxtStarted=!0;var Ce={originalEvent:T,type:"cxttapstart",position:{x:G[0],y:G[1]}};X?(X.activate(),X.emit(Ce),t.hoverData.down=X):V.emit(Ce),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1}else if(T.which==1){X&&X.activate();{if(X!=null&&t.nodeIsGrabbable(X)){var ge=function(Ge){return{originalEvent:T,type:Ge,position:{x:G[0],y:G[1]}}},Se=function(Ge){Ge.emit(ge("grab"))};if(d(X),!X.selected())ae=t.dragData.possibleDragElements=V.collection(),g(X,{addToList:ae}),X.emit(ge("grabon")).emit(ge("grab"));else{ae=t.dragData.possibleDragElements=V.collection();var ve=V.$(function(ye){return ye.isNode()&&ye.selected()&&t.nodeIsGrabbable(ye)});h(ve,{addToList:ae}),X.emit(ge("grabon")),ve.forEach(Se)}t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=X,t.hoverData.downs=ie,t.hoverData.downTime=new Date().getTime()}n(X,["mousedown","tapstart","vmousedown"],T,{x:G[0],y:G[1]}),X==null?(U[4]=1,t.data.bgActivePosistion={x:G[0],y:G[1]},t.redrawHint("select",!0),t.redraw()):X.pannable()&&(U[4]=1),we()}U[0]=U[2]=G[0],U[1]=U[3]=G[1]}},!1),t.registerBinding(e,"mousemove",function(T){var V=t.hoverData.capture;if(!(!V&&!S(T))){var Q=!1,G=t.cy,U=G.zoom(),ie=[T.clientX,T.clientY],X=t.projectIntoViewport(ie[0],ie[1]),ae=t.hoverData.mdownPos,we=t.hoverData.mdownGPos,Ce=t.selection,ge=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(ge=t.findNearestElement(X[0],X[1],!0,!1));var Se=t.hoverData.last,ve=t.hoverData.down,ye=[X[0]-Ce[2],X[1]-Ce[3]],Ge=t.dragData.possibleDragElements,Ve;if(we){var rt=ie[0]-we[0],nt=rt*rt,Qe=ie[1]-we[1],Ot=Qe*Qe,ut=nt+Ot;t.hoverData.isOverThresholdDrag=Ve=ut>=t.desktopTapThreshold2}var ht=a(T);Ve&&(t.hoverData.tapholdCancelled=!0);var Wt=function(){var q=t.hoverData.dragDelta=t.hoverData.dragDelta||[];q.length===0?(q.push(ye[0]),q.push(ye[1])):(q[0]+=ye[0],q[1]+=ye[1])};Q=!0,n(ge,["mousemove","vmousemove","tapdrag"],T,{x:X[0],y:X[1]});var _t=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||G.emit({originalEvent:T,type:"boxstart",position:{x:X[0],y:X[1]}}),Ce[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(Ve){var Ft={originalEvent:T,type:"cxtdrag",position:{x:X[0],y:X[1]}};ve?ve.emit(Ft):G.emit(Ft),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ge!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:X[0],y:X[1]}}),t.hoverData.cxtOver=ge,ge&&ge.emit({originalEvent:T,type:"cxtdragover",position:{x:X[0],y:X[1]}}))}}else if(t.hoverData.dragging){if(Q=!0,G.panningEnabled()&&G.userPanningEnabled()){var tr;if(t.hoverData.justStartedPan){var dr=t.hoverData.mdownPos;tr={x:(X[0]-dr[0])*U,y:(X[1]-dr[1])*U},t.hoverData.justStartedPan=!1}else tr={x:ye[0]*U,y:ye[1]*U};G.panBy(tr),G.emit("dragpan"),t.hoverData.dragged=!0}X=t.projectIntoViewport(T.clientX,T.clientY)}else if(Ce[4]==1&&(ve==null||ve.pannable())){if(Ve){if(!t.hoverData.dragging&&G.boxSelectionEnabled()&&(ht||!G.panningEnabled()||!G.userPanningEnabled()))_t();else if(!t.hoverData.selecting&&G.panningEnabled()&&G.userPanningEnabled()){var Kt=i(ve,t.hoverData.downs);Kt&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Ce[4]=0,t.data.bgActivePosistion=ma(ae),t.redrawHint("select",!0),t.redraw())}ve&&ve.pannable()&&ve.active()&&ve.unactivate()}}else{if(ve&&ve.pannable()&&ve.active()&&ve.unactivate(),(!ve||!ve.grabbed())&&ge!=Se&&(Se&&n(Se,["mouseout","tapdragout"],T,{x:X[0],y:X[1]}),ge&&n(ge,["mouseover","tapdragover"],T,{x:X[0],y:X[1]}),t.hoverData.last=ge),ve)if(Ve){if(G.boxSelectionEnabled()&&ht)ve&&ve.grabbed()&&(y(Ge),ve.emit("freeon"),Ge.emit("free"),t.dragData.didDrag&&(ve.emit("dragfreeon"),Ge.emit("dragfree"))),_t();else if(ve&&ve.grabbed()&&t.nodeIsDraggable(ve)){var Je=!t.dragData.didDrag;Je&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||h(Ge,{inDragLayer:!0});var at={x:0,y:0};if(le(ye[0])&&le(ye[1])&&(at.x+=ye[0],at.y+=ye[1],Je)){var pt=t.hoverData.dragDelta;pt&&le(pt[0])&&le(pt[1])&&(at.x+=pt[0],at.y+=pt[1])}t.hoverData.draggingEles=!0,Ge.silentShift(at).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else Wt();Q=!0}if(Ce[2]=X[0],Ce[3]=X[1],Q)return T.stopPropagation&&T.stopPropagation(),T.preventDefault&&T.preventDefault(),!1}},!1);var N,D,P;t.registerBinding(e,"mouseup",function(T){if(!(t.hoverData.which===1&&T.which!==1&&t.hoverData.capture)){var V=t.hoverData.capture;if(V){t.hoverData.capture=!1;var Q=t.cy,G=t.projectIntoViewport(T.clientX,T.clientY),U=t.selection,ie=t.findNearestElement(G[0],G[1],!0,!1),X=t.dragData.possibleDragElements,ae=t.hoverData.down,we=a(T);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,ae&&ae.unactivate(),t.hoverData.which===3){var Ce={originalEvent:T,type:"cxttapend",position:{x:G[0],y:G[1]}};if(ae?ae.emit(Ce):Q.emit(Ce),!t.hoverData.cxtDragged){var ge={originalEvent:T,type:"cxttap",position:{x:G[0],y:G[1]}};ae?ae.emit(ge):Q.emit(ge)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(n(ie,["mouseup","tapend","vmouseup"],T,{x:G[0],y:G[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(n(ae,["click","tap","vclick"],T,{x:G[0],y:G[1]}),D=!1,T.timeStamp-P<=Q.multiClickDebounceTime()?(N&&clearTimeout(N),D=!0,P=null,n(ae,["dblclick","dbltap","vdblclick"],T,{x:G[0],y:G[1]})):(N=setTimeout(function(){D||n(ae,["oneclick","onetap","voneclick"],T,{x:G[0],y:G[1]})},Q.multiClickDebounceTime()),P=T.timeStamp)),ae==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(T)&&(Q.$(r).unselect(["tapunselect"]),X.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=X=Q.collection()),ie==ae&&!t.dragData.didDrag&&!t.hoverData.selecting&&ie!=null&&ie._private.selectable&&(t.hoverData.dragging||(Q.selectionType()==="additive"||we?ie.selected()?ie.unselect(["tapunselect"]):ie.select(["tapselect"]):we||(Q.$(r).unmerge(ie).unselect(["tapunselect"]),ie.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Se=Q.collection(t.getAllInBox(U[0],U[1],U[2],U[3]));t.redrawHint("select",!0),Se.length>0&&t.redrawHint("eles",!0),Q.emit({type:"boxend",originalEvent:T,position:{x:G[0],y:G[1]}});var ve=function(Ve){return Ve.selectable()&&!Ve.selected()};Q.selectionType()==="additive"||we||Q.$(r).unmerge(Se).unselect(),Se.emit("box").stdFilter(ve).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!U[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var ye=ae&&ae.grabbed();y(X),ye&&(ae.emit("freeon"),X.emit("free"),t.dragData.didDrag&&(ae.emit("dragfreeon"),X.emit("dragfree")))}}U[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var F=function(T){if(!t.scrollingPage){var V=t.cy,Q=V.zoom(),G=V.pan(),U=t.projectIntoViewport(T.clientX,T.clientY),ie=[U[0]*Q+G.x,U[1]*Q+G.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||B()){T.preventDefault();return}if(V.panningEnabled()&&V.userPanningEnabled()&&V.zoomingEnabled()&&V.userZoomingEnabled()){T.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var X;T.deltaY!=null?X=T.deltaY/-250:T.wheelDeltaY!=null?X=T.wheelDeltaY/1e3:X=T.wheelDelta/1e3,X=X*t.wheelSensitivity;var ae=T.deltaMode===1;ae&&(X*=33);var we=V.zoom()*Math.pow(10,X);T.type==="gesturechange"&&(we=t.gestureStartZoom*T.scale),V.zoom({level:we,renderedPosition:{x:ie[0],y:ie[1]}}),V.emit(T.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",F,!0),t.registerBinding(e,"scroll",function(T){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(T){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||T.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(te){t.hasTouchStarted||F(te)},!0),t.registerBinding(t.container,"mouseout",function(T){var V=t.projectIntoViewport(T.clientX,T.clientY);t.cy.emit({originalEvent:T,type:"mouseout",position:{x:V[0],y:V[1]}})},!1),t.registerBinding(t.container,"mouseover",function(T){var V=t.projectIntoViewport(T.clientX,T.clientY);t.cy.emit({originalEvent:T,type:"mouseover",position:{x:V[0],y:V[1]}})},!1);var O,I,_,M,L,R,H,$,z,j,ee,J,Z,re=function(T,V,Q,G){return Math.sqrt((Q-T)*(Q-T)+(G-V)*(G-V))},Y=function(T,V,Q,G){return(Q-T)*(Q-T)+(G-V)*(G-V)},A;t.registerBinding(t.container,"touchstart",A=function(T){if(t.hasTouchStarted=!0,!!S(T)){b(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var V=t.cy,Q=t.touchData.now,G=t.touchData.earlier;if(T.touches[0]){var U=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);Q[0]=U[0],Q[1]=U[1]}if(T.touches[1]){var U=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);Q[2]=U[0],Q[3]=U[1]}if(T.touches[2]){var U=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);Q[4]=U[0],Q[5]=U[1]}if(T.touches[1]){t.touchData.singleTouchMoved=!0,y(t.dragData.touchDragEles);var ie=t.findContainerClientCoords();z=ie[0],j=ie[1],ee=ie[2],J=ie[3],O=T.touches[0].clientX-z,I=T.touches[0].clientY-j,_=T.touches[1].clientX-z,M=T.touches[1].clientY-j,Z=0<=O&&O<=ee&&0<=_&&_<=ee&&0<=I&&I<=J&&0<=M&&M<=J;var X=V.pan(),ae=V.zoom();L=re(O,I,_,M),R=Y(O,I,_,M),H=[(O+_)/2,(I+M)/2],$=[(H[0]-X.x)/ae,(H[1]-X.y)/ae];var we=200,Ce=we*we;if(R<Ce&&!T.touches[2]){var ge=t.findNearestElement(Q[0],Q[1],!0,!0),Se=t.findNearestElement(Q[2],Q[3],!0,!0);ge&&ge.isNode()?(ge.activate().emit({originalEvent:T,type:"cxttapstart",position:{x:Q[0],y:Q[1]}}),t.touchData.start=ge):Se&&Se.isNode()?(Se.activate().emit({originalEvent:T,type:"cxttapstart",position:{x:Q[0],y:Q[1]}}),t.touchData.start=Se):V.emit({originalEvent:T,type:"cxttapstart",position:{x:Q[0],y:Q[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(T.touches[2])V.boxSelectionEnabled()&&T.preventDefault();else if(!T.touches[1]){if(T.touches[0]){var ve=t.findNearestElements(Q[0],Q[1],!0,!0),ye=ve[0];if(ye!=null&&(ye.activate(),t.touchData.start=ye,t.touchData.starts=ve,t.nodeIsGrabbable(ye))){var Ge=t.dragData.touchDragEles=V.collection(),Ve=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),ye.selected()?(Ve=V.$(function(ut){return ut.selected()&&t.nodeIsGrabbable(ut)}),h(Ve,{addToList:Ge})):g(ye,{addToList:Ge}),d(ye);var rt=function(ht){return{originalEvent:T,type:ht,position:{x:Q[0],y:Q[1]}}};ye.emit(rt("grabon")),Ve?Ve.forEach(function(ut){ut.emit(rt("grab"))}):ye.emit(rt("grab"))}n(ye,["touchstart","tapstart","vmousedown"],T,{x:Q[0],y:Q[1]}),ye==null&&(t.data.bgActivePosistion={x:U[0],y:U[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&n(t.touchData.start,["taphold"],T,{x:Q[0],y:Q[1]})},t.tapholdDuration)}}if(T.touches.length>=1){for(var nt=t.touchData.startPosition=[null,null,null,null,null,null],Qe=0;Qe<Q.length;Qe++)nt[Qe]=G[Qe]=Q[Qe];var Ot=T.touches[0];t.touchData.startGPosition=[Ot.clientX,Ot.clientY]}}},!1);var K;t.registerBinding(e,"touchmove",K=function(T){var V=t.touchData.capture;if(!(!V&&!S(T))){var Q=t.selection,G=t.cy,U=t.touchData.now,ie=t.touchData.earlier,X=G.zoom();if(T.touches[0]){var ae=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);U[0]=ae[0],U[1]=ae[1]}if(T.touches[1]){var ae=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);U[2]=ae[0],U[3]=ae[1]}if(T.touches[2]){var ae=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);U[4]=ae[0],U[5]=ae[1]}var we=t.touchData.startGPosition,Ce;if(V&&T.touches[0]&&we){for(var ge=[],Se=0;Se<U.length;Se++)ge[Se]=U[Se]-ie[Se];var ve=T.touches[0].clientX-we[0],ye=ve*ve,Ge=T.touches[0].clientY-we[1],Ve=Ge*Ge,rt=ye+Ve;Ce=rt>=t.touchTapThreshold2}if(V&&t.touchData.cxt){T.preventDefault();var nt=T.touches[0].clientX-z,Qe=T.touches[0].clientY-j,Ot=T.touches[1].clientX-z,ut=T.touches[1].clientY-j,ht=Y(nt,Qe,Ot,ut),Wt=ht/R,_t=150,Ft=_t*_t,tr=1.5,dr=tr*tr;if(Wt>=dr||ht>=Ft){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Kt={originalEvent:T,type:"cxttapend",position:{x:U[0],y:U[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(Kt),t.touchData.start=null):G.emit(Kt)}}if(V&&t.touchData.cxt){var Kt={originalEvent:T,type:"cxtdrag",position:{x:U[0],y:U[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(Kt):G.emit(Kt),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var Je=t.findNearestElement(U[0],U[1],!0,!0);(!t.touchData.cxtOver||Je!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:U[0],y:U[1]}}),t.touchData.cxtOver=Je,Je&&Je.emit({originalEvent:T,type:"cxtdragover",position:{x:U[0],y:U[1]}}))}else if(V&&T.touches[2]&&G.boxSelectionEnabled())T.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||G.emit({originalEvent:T,type:"boxstart",position:{x:U[0],y:U[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,Q[4]=1,!Q||Q.length===0||Q[0]===void 0?(Q[0]=(U[0]+U[2]+U[4])/3,Q[1]=(U[1]+U[3]+U[5])/3,Q[2]=(U[0]+U[2]+U[4])/3+1,Q[3]=(U[1]+U[3]+U[5])/3+1):(Q[2]=(U[0]+U[2]+U[4])/3,Q[3]=(U[1]+U[3]+U[5])/3),t.redrawHint("select",!0),t.redraw();else if(V&&T.touches[1]&&!t.touchData.didSelect&&G.zoomingEnabled()&&G.panningEnabled()&&G.userZoomingEnabled()&&G.userPanningEnabled()){T.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var at=t.dragData.touchDragEles;if(at){t.redrawHint("drag",!0);for(var pt=0;pt<at.length;pt++){var mn=at[pt]._private;mn.grabbed=!1,mn.rscratch.inDragLayer=!1}}var q=t.touchData.start,nt=T.touches[0].clientX-z,Qe=T.touches[0].clientY-j,Ot=T.touches[1].clientX-z,ut=T.touches[1].clientY-j,ce=re(nt,Qe,Ot,ut),Oe=ce/L;if(Z){var ze=nt-O,Tr=Qe-I,yn=Ot-_,za=ut-M,qr=(ze+yn)/2,rr=(Tr+za)/2,bn=G.zoom(),Ac=bn*Oe,Ss=G.pan(),hg=$[0]*bn+Ss.x,pg=$[1]*bn+Ss.y,jP={x:-Ac/bn*(hg-Ss.x-qr)+hg,y:-Ac/bn*(pg-Ss.y-rr)+pg};if(q&&q.active()){var at=t.dragData.touchDragEles;y(at),t.redrawHint("drag",!0),t.redrawHint("eles",!0),q.unactivate().emit("freeon"),at.emit("free"),t.dragData.didDrag&&(q.emit("dragfreeon"),at.emit("dragfree"))}G.viewport({zoom:Ac,pan:jP,cancelOnFailedZoom:!0}),G.emit("pinchzoom"),L=ce,O=nt,I=Qe,_=Ot,M=ut,t.pinching=!0}if(T.touches[0]){var ae=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);U[0]=ae[0],U[1]=ae[1]}if(T.touches[1]){var ae=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);U[2]=ae[0],U[3]=ae[1]}if(T.touches[2]){var ae=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);U[4]=ae[0],U[5]=ae[1]}}else if(T.touches[0]&&!t.touchData.didSelect){var fr=t.touchData.start,Rc=t.touchData.last,Je;if(!t.hoverData.draggingEles&&!t.swipePanning&&(Je=t.findNearestElement(U[0],U[1],!0,!0)),V&&fr!=null&&T.preventDefault(),V&&fr!=null&&t.nodeIsDraggable(fr))if(Ce){var at=t.dragData.touchDragEles,vg=!t.dragData.didDrag;vg&&h(at,{inDragLayer:!0}),t.dragData.didDrag=!0;var Gi={x:0,y:0};if(le(ge[0])&&le(ge[1])&&(Gi.x+=ge[0],Gi.y+=ge[1],vg)){t.redrawHint("eles",!0);var hr=t.touchData.dragDelta;hr&&le(hr[0])&&le(hr[1])&&(Gi.x+=hr[0],Gi.y+=hr[1])}t.hoverData.draggingEles=!0,at.silentShift(Gi).emit("position drag"),t.redrawHint("drag",!0),t.touchData.startPosition[0]==ie[0]&&t.touchData.startPosition[1]==ie[1]&&t.redrawHint("eles",!0),t.redraw()}else{var hr=t.touchData.dragDelta=t.touchData.dragDelta||[];hr.length===0?(hr.push(ge[0]),hr.push(ge[1])):(hr[0]+=ge[0],hr[1]+=ge[1])}if(n(fr||Je,["touchmove","tapdrag","vmousemove"],T,{x:U[0],y:U[1]}),(!fr||!fr.grabbed())&&Je!=Rc&&(Rc&&Rc.emit({originalEvent:T,type:"tapdragout",position:{x:U[0],y:U[1]}}),Je&&Je.emit({originalEvent:T,type:"tapdragover",position:{x:U[0],y:U[1]}})),t.touchData.last=Je,V)for(var pt=0;pt<U.length;pt++)U[pt]&&t.touchData.startPosition[pt]&&Ce&&(t.touchData.singleTouchMoved=!0);if(V&&(fr==null||fr.pannable())&&G.panningEnabled()&&G.userPanningEnabled()){var YP=i(fr,t.touchData.starts);YP&&(T.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=ma(t.touchData.startPosition)),t.swipePanning?(G.panBy({x:ge[0]*X,y:ge[1]*X}),G.emit("dragpan")):Ce&&(t.swipePanning=!0,G.panBy({x:ve*X,y:Ge*X}),G.emit("dragpan"),fr&&(fr.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var ae=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);U[0]=ae[0],U[1]=ae[1]}}for(var Se=0;Se<U.length;Se++)ie[Se]=U[Se];V&&T.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var W;t.registerBinding(e,"touchcancel",W=function(T){var V=t.touchData.start;t.touchData.capture=!1,V&&V.unactivate()});var oe,he,ne,se;if(t.registerBinding(e,"touchend",oe=function(T){var V=t.touchData.start,Q=t.touchData.capture;if(Q)T.touches.length===0&&(t.touchData.capture=!1),T.preventDefault();else return;var G=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var U=t.cy,ie=U.zoom(),X=t.touchData.now,ae=t.touchData.earlier;if(T.touches[0]){var we=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);X[0]=we[0],X[1]=we[1]}if(T.touches[1]){var we=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);X[2]=we[0],X[3]=we[1]}if(T.touches[2]){var we=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);X[4]=we[0],X[5]=we[1]}V&&V.unactivate();var Ce;if(t.touchData.cxt){if(Ce={originalEvent:T,type:"cxttapend",position:{x:X[0],y:X[1]}},V?V.emit(Ce):U.emit(Ce),!t.touchData.cxtDragged){var ge={originalEvent:T,type:"cxttap",position:{x:X[0],y:X[1]}};V?V.emit(ge):U.emit(ge)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!T.touches[2]&&U.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Se=U.collection(t.getAllInBox(G[0],G[1],G[2],G[3]));G[0]=void 0,G[1]=void 0,G[2]=void 0,G[3]=void 0,G[4]=0,t.redrawHint("select",!0),U.emit({type:"boxend",originalEvent:T,position:{x:X[0],y:X[1]}});var ve=function(Ft){return Ft.selectable()&&!Ft.selected()};Se.emit("box").stdFilter(ve).select().emit("boxselect"),Se.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(V!=null&&V.unactivate(),T.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!T.touches[1]){if(!T.touches[0]){if(!T.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var ye=t.dragData.touchDragEles;if(V!=null){var Ge=V._private.grabbed;y(ye),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Ge&&(V.emit("freeon"),ye.emit("free"),t.dragData.didDrag&&(V.emit("dragfreeon"),ye.emit("dragfree"))),n(V,["touchend","tapend","vmouseup","tapdragout"],T,{x:X[0],y:X[1]}),V.unactivate(),t.touchData.start=null}else{var Ve=t.findNearestElement(X[0],X[1],!0,!0);n(Ve,["touchend","tapend","vmouseup","tapdragout"],T,{x:X[0],y:X[1]})}var rt=t.touchData.startPosition[0]-X[0],nt=rt*rt,Qe=t.touchData.startPosition[1]-X[1],Ot=Qe*Qe,ut=nt+Ot,ht=ut*ie*ie;t.touchData.singleTouchMoved||(V||U.$(":selected").unselect(["tapunselect"]),n(V,["tap","vclick"],T,{x:X[0],y:X[1]}),he=!1,T.timeStamp-se<=U.multiClickDebounceTime()?(ne&&clearTimeout(ne),he=!0,se=null,n(V,["dbltap","vdblclick"],T,{x:X[0],y:X[1]})):(ne=setTimeout(function(){he||n(V,["onetap","voneclick"],T,{x:X[0],y:X[1]})},U.multiClickDebounceTime()),se=T.timeStamp)),V!=null&&!t.dragData.didDrag&&V._private.selectable&&ht<t.touchTapThreshold2&&!t.pinching&&(U.selectionType()==="single"?(U.$(r).unmerge(V).unselect(["tapunselect"]),V.select(["tapselect"])):V.selected()?V.unselect(["tapunselect"]):V.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}}}for(var Wt=0;Wt<X.length;Wt++)ae[Wt]=X[Wt];t.dragData.didDrag=!1,T.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),T.touches.length<2&&(T.touches.length===1&&(t.touchData.startGPosition=[T.touches[0].clientX,T.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())},!1),typeof TouchEvent>"u"){var ue=[],pe=function(T){return{clientX:T.clientX,clientY:T.clientY,force:1,identifier:T.pointerId,pageX:T.pageX,pageY:T.pageY,radiusX:T.width/2,radiusY:T.height/2,screenX:T.screenX,screenY:T.screenY,target:T.target}},de=function(T){return{event:T,touch:pe(T)}},me=function(T){ue.push(de(T))},Ne=function(T){for(var V=0;V<ue.length;V++){var Q=ue[V];if(Q.event.pointerId===T.pointerId){ue.splice(V,1);return}}},De=function(T){var V=ue.filter(function(Q){return Q.event.pointerId===T.pointerId})[0];V.event=T,V.touch=pe(T)},Ee=function(T){T.touches=ue.map(function(V){return V.touch})},Pe=function(T){return T.pointerType==="mouse"||T.pointerType===4};t.registerBinding(t.container,"pointerdown",function(te){Pe(te)||(te.preventDefault(),me(te),Ee(te),A(te))}),t.registerBinding(t.container,"pointerup",function(te){Pe(te)||(Ne(te),Ee(te),oe(te))}),t.registerBinding(t.container,"pointercancel",function(te){Pe(te)||(Ne(te),Ee(te),W(te))}),t.registerBinding(t.container,"pointermove",function(te){Pe(te)||(te.preventDefault(),De(te),Ee(te),K(te))})}};var Hr={};Hr.generatePolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:function(n,a,i,o,l,u){this.renderer.nodeShapeImpl("polygon",n,a,i,o,l,this.points)},intersectLine:function(n,a,i,o,l,u,c,d){return Bi(l,u,this.points,n,a,i/2,o/2,c)},checkPoint:function(n,a,i,o,l,u,c,d){return Vr(n,a,this.points,u,c,o,l,[0,-1],i)}}},Hr.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i)},intersectLine:function(e,r,n,a,i,o,l,u){return t5(i,o,e,r,n/2+l,a/2+l)},checkPoint:function(e,r,n,a,i,o,l,u){return Rn(e,r,a,i,o,l,n)}}},Hr.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:function(n,a,i,o,l,u,c){if(u[c]!==void 0&&u[c+"-cx"]===n&&u[c+"-cy"]===a)return u[c];u[c]=new Array(e.length/2),u[c+"-cx"]=n,u[c+"-cy"]=a;var d=i/2,f=o/2;l=l==="auto"?Xh(i,o):l;for(var p=new Array(e.length/2),v=0;v<e.length/2;v++)p[v]={x:n+d*e[v*2],y:a+f*e[v*2+1]};var h,g,y,m,b=p.length;for(g=p[b-1],h=0;h<b;h++)y=p[h%b],m=p[(h+1)%b],u[c][h]=Bc(g,y,m,l),g=y,y=m;return u[c]},draw:function(n,a,i,o,l,u,c){this.renderer.nodeShapeImpl("round-polygon",n,a,i,o,l,this.points,this.getOrCreateCorners(a,i,o,l,u,c,"drawCorners"))},intersectLine:function(n,a,i,o,l,u,c,d,f){return r5(l,u,this.points,n,a,i,o,c,this.getOrCreateCorners(n,a,i,o,d,f,"corners"))},checkPoint:function(n,a,i,o,l,u,c,d,f){return e5(n,a,this.points,u,c,o,l,this.getOrCreateCorners(u,c,o,l,d,f,"corners"))}}},Hr.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Mt(4,0),draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i,this.points,o)},intersectLine:function(e,r,n,a,i,o,l,u){return jh(i,o,e,r,n,a,l,u)},checkPoint:function(e,r,n,a,i,o,l,u){var c=a/2,d=i/2;u=u==="auto"?Vn(a,i):u,u=Math.min(c,d,u);var f=u*2;return!!(Vr(e,r,this.points,o,l,a,i-f,[0,-1],n)||Vr(e,r,this.points,o,l,a-f,i,[0,-1],n)||Rn(e,r,f,f,o-c+u,l-d+u,n)||Rn(e,r,f,f,o+c-u,l-d+u,n)||Rn(e,r,f,f,o+c-u,l+d-u,n)||Rn(e,r,f,f,o-c+u,l+d-u,n))}}},Hr.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:Ql(),points:Mt(4,0),draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i,null,o)},generateCutTrianglePts:function(e,r,n,a,i){var o=i==="auto"?this.cornerLength:i,l=r/2,u=e/2,c=n-u,d=n+u,f=a-l,p=a+l;return{topLeft:[c,f+o,c+o,f,c+o,f+o],topRight:[d-o,f,d,f+o,d-o,f+o],bottomRight:[d,p-o,d-o,p,d-o,p-o],bottomLeft:[c+o,p,c,p-o,c+o,p-o]}},intersectLine:function(e,r,n,a,i,o,l,u){var c=this.generateCutTrianglePts(n+2*l,a+2*l,e,r,u),d=[].concat.apply([],[c.topLeft.splice(0,4),c.topRight.splice(0,4),c.bottomRight.splice(0,4),c.bottomLeft.splice(0,4)]);return Bi(i,o,d,e,r)},checkPoint:function(e,r,n,a,i,o,l,u){var c=u==="auto"?this.cornerLength:u;if(Vr(e,r,this.points,o,l,a,i-2*c,[0,-1],n)||Vr(e,r,this.points,o,l,a-2*c,i,[0,-1],n))return!0;var d=this.generateCutTrianglePts(a,i,o,l);return Ht(e,r,d.topLeft)||Ht(e,r,d.topRight)||Ht(e,r,d.bottomRight)||Ht(e,r,d.bottomLeft)}}},Hr.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Mt(4,0),draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i)},intersectLine:function(e,r,n,a,i,o,l,u){var c=.15,d=.5,f=.85,p=this.generateBarrelBezierPts(n+2*l,a+2*l,e,r),v=function(y){var m=ya({x:y[0],y:y[1]},{x:y[2],y:y[3]},{x:y[4],y:y[5]},c),b=ya({x:y[0],y:y[1]},{x:y[2],y:y[3]},{x:y[4],y:y[5]},d),w=ya({x:y[0],y:y[1]},{x:y[2],y:y[3]},{x:y[4],y:y[5]},f);return[y[0],y[1],m.x,m.y,b.x,b.y,w.x,w.y,y[4],y[5]]},h=[].concat(v(p.topLeft),v(p.topRight),v(p.bottomRight),v(p.bottomLeft));return Bi(i,o,h,e,r)},generateBarrelBezierPts:function(e,r,n,a){var i=r/2,o=e/2,l=n-o,u=n+o,c=a-i,d=a+i,f=Jl(e,r),p=f.heightOffset,v=f.widthOffset,h=f.ctrlPtOffsetPct*e,g={topLeft:[l,c+p,l+h,c,l+v,c],topRight:[u-v,c,u-h,c,u,c+p],bottomRight:[u,d-p,u-h,d,u-v,d],bottomLeft:[l+v,d,l+h,d,l,d-p]};return g.topLeft.isTop=!0,g.topRight.isTop=!0,g.bottomLeft.isBottom=!0,g.bottomRight.isBottom=!0,g},checkPoint:function(e,r,n,a,i,o,l,u){var c=Jl(a,i),d=c.heightOffset,f=c.widthOffset;if(Vr(e,r,this.points,o,l,a,i-2*d,[0,-1],n)||Vr(e,r,this.points,o,l,a-2*f,i,[0,-1],n))return!0;for(var p=this.generateBarrelBezierPts(a,i,o,l),v=function(B,S,N){var D=N[4],P=N[2],F=N[0],O=N[5],I=N[1],_=Math.min(D,F),M=Math.max(D,F),L=Math.min(O,I),R=Math.max(O,I);if(_<=B&&B<=M&&L<=S&&S<=R){var H=n5(D,P,F),$=XB(H[0],H[1],H[2],B),z=$.filter(function(j){return 0<=j&&j<=1});if(z.length>0)return z[0]}return null},h=Object.keys(p),g=0;g<h.length;g++){var y=h[g],m=p[y],b=v(e,r,m);if(b!=null){var w=m[5],C=m[3],x=m[1],E=ft(w,C,x,b);if(m.isTop&&E<=r||m.isBottom&&r<=E)return!0}}return!1}}},Hr.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Mt(4,0),draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i,this.points,o)},intersectLine:function(e,r,n,a,i,o,l,u){var c=e-(n/2+l),d=r-(a/2+l),f=d,p=e+(n/2+l),v=ln(i,o,e,r,c,d,p,f,!1);return v.length>0?v:jh(i,o,e,r,n,a,l,u)},checkPoint:function(e,r,n,a,i,o,l,u){u=u==="auto"?Vn(a,i):u;var c=2*u;if(Vr(e,r,this.points,o,l,a,i-c,[0,-1],n)||Vr(e,r,this.points,o,l,a-c,i,[0,-1],n))return!0;var d=a/2+2*n,f=i/2+2*n,p=[o-d,l-f,o-d,l,o+d,l,o+d,l-f];return!!(Ht(e,r,p)||Rn(e,r,c,c,o+a/2-u,l+i/2-u,n)||Rn(e,r,c,c,o-a/2+u,l+i/2-u,n))}}},Hr.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Mt(3,0)),this.generateRoundPolygon("round-triangle",Mt(3,0)),this.generatePolygon("rectangle",Mt(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",Mt(5,0)),this.generateRoundPolygon("round-pentagon",Mt(5,0)),this.generatePolygon("hexagon",Mt(6,0)),this.generateRoundPolygon("round-hexagon",Mt(6,0)),this.generatePolygon("heptagon",Mt(7,0)),this.generateRoundPolygon("round-heptagon",Mt(7,0)),this.generatePolygon("octagon",Mt(8,0)),this.generateRoundPolygon("round-octagon",Mt(8,0));var n=new Array(20);{var a=Zl(5,0),i=Zl(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var l=0;l<i.length/2;l++)i[l*2]*=o,i[l*2+1]*=o;for(var l=0;l<20/4;l++)n[l*4]=a[l*2],n[l*4+1]=a[l*2+1],n[l*4+2]=i[l*2],n[l*4+3]=i[l*2+1]}n=Yh(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);{var u=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",u),this.generateRoundPolygon("round-tag",u)}t.makePolygon=function(c){var d=c.join("$"),f="polygon-"+d,p;return(p=this[f])?p:e.generatePolygon(f,c)}};var Hi={};Hi.timeToRender=function(){return this.redrawTotalTime/this.redrawCount},Hi.redraw=function(t){t=t||zh();var e=this;e.averageRedrawTime===void 0&&(e.averageRedrawTime=0),e.lastRedrawTime===void 0&&(e.lastRedrawTime=0),e.lastDrawTime===void 0&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t},Hi.beforeRender=function(t,e){if(!this.destroyed){e==null&&Xe("Priority is not optional for beforeRender");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort(function(n,a){return a.priority-n.priority})}};var Hv=function(e,r,n){for(var a=e.beforeRenderCallbacks,i=0;i<a.length;i++)a[i].fn(r,n)};Hi.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var r=function n(a){if(!t.destroyed){if(!e.batching())if(t.requestedFrame&&!t.skipFrame){Hv(t,!0,a);var i=Rr();t.render(t.renderOptions);var o=t.lastDrawTime=Rr();t.averageRedrawTime===void 0&&(t.averageRedrawTime=o-i),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var l=o-i;t.redrawTotalTime+=l,t.lastRedrawTime=l,t.averageRedrawTime=t.averageRedrawTime/2+l/2,t.requestedFrame=!1}else Hv(t,!1,a);t.skipFrame=!1,Fo(n)}};Fo(r)}};var RD=function(e){this.init(e)},Kv=RD,Aa=Kv.prototype;Aa.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],Aa.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container(),n=e.cy.window();if(n){var a=n.document,i=a.head,o="__________cytoscape_stylesheet",l="__________cytoscape_container",u=a.getElementById(o)!=null;if(r.className.indexOf(l)<0&&(r.className=(r.className||"")+" "+l),!u){var c=a.createElement("style");c.id=o,c.textContent="."+l+" { position: relative; }",i.insertBefore(c,i.children[0])}var d=n.getComputedStyle(r),f=d.getPropertyValue("position");f==="static"&&Ae("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=le(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()},Aa.notify=function(t,e){var r=this,n=r.cy;if(!this.destroyed){if(t==="init"){r.load();return}if(t==="destroy"){r.destroy();return}(t==="add"||t==="remove"||t==="move"&&n.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&r.invalidateCachedZSortedEles(),t==="viewport"&&r.redrawHint("select",!0),(t==="load"||t==="resize"||t==="mount")&&(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},Aa.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],n=r,a=n.target;(a.off||a.removeEventListener).apply(a,n.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}},Aa.isHeadless=function(){return!1},[kc,$v,zv,Ia,Hr,Hi].forEach(function(t){xe(Aa,t)});var Dc=1e3/60,qv={setupDequeueing:function(e){return function(){var n=this,a=this.renderer;if(!n.dequeueingSetup){n.dequeueingSetup=!0;var i=_o(function(){a.redrawHint("eles",!0),a.redrawHint("drag",!0),a.redraw()},e.deqRedrawThreshold),o=function(c,d){var f=Rr(),p=a.averageRedrawTime,v=a.lastRedrawTime,h=[],g=a.cy.extent(),y=a.getPixelRatio();for(c||a.flushRenderedStyleQueue();;){var m=Rr(),b=m-f,w=m-d;if(v<Dc){var C=Dc-(c?p:0);if(w>=e.deqFastCost*C)break}else if(c){if(b>=e.deqCost*v||b>=e.deqAvgCost*p)break}else if(w>=e.deqNoDrawCost*Dc)break;var x=e.deq(n,y,g);if(x.length>0)for(var E=0;E<x.length;E++)h.push(x[E]);else break}h.length>0&&(e.onDeqd(n,h),!c&&e.shouldRedraw(n,h,y,g)&&i())},l=e.priority||Ul;a.beforeRender(o,l(n))}}}},VD=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mo;Rl(this,t),this.idsByKey=new wr,this.keyForId=new wr,this.cachesByLvl=new wr,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return Vl(t,[{key:"getIdsFor",value:function(r){r==null&&Xe("Can not get id list for null key");var n=this.idsByKey,a=this.idsByKey.get(r);return a||(a=new ga,n.set(r,a)),a}},{key:"addIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).add(n)}},{key:"deleteIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).delete(n)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);this.deleteIdForKey(a,n),this.addIdForKey(i,n),this.keyForId.set(n,i)}},{key:"deleteKeyMappingFor",value:function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteIdForKey(a,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);return a!==i}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var n=this.cachesByLvl,a=this.lvls,i=n.get(r);return i||(i=new wr,n.set(r,i),a.push(r)),i}},{key:"getCache",value:function(r,n){return this.getCachesAt(n).get(r)}},{key:"get",value:function(r,n){var a=this.getKey(r),i=this.getCache(a,n);return i!=null&&this.updateKeyMappingFor(r),i}},{key:"getForCachedKey",value:function(r,n){var a=this.keyForId.get(r.id()),i=this.getCache(a,n);return i}},{key:"hasCache",value:function(r,n){return this.getCachesAt(n).has(r)}},{key:"has",value:function(r,n){var a=this.getKey(r);return this.hasCache(a,n)}},{key:"setCache",value:function(r,n,a){a.key=r,this.getCachesAt(n).set(r,a)}},{key:"set",value:function(r,n,a){var i=this.getKey(r);this.setCache(i,n,a),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,n){this.getCachesAt(n).delete(r)}},{key:"delete",value:function(r,n){var a=this.getKey(r);this.deleteCache(a,n)}},{key:"invalidateKey",value:function(r){var n=this;this.lvls.forEach(function(a){return n.deleteCache(r,a)})}},{key:"invalidate",value:function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteKeyMappingFor(r);var i=this.doesEleInvalidateKey(r);return i&&this.invalidateKey(a),i||this.getNumberOfIdsForKey(a)===0}}]),t}(),Uv=25,ks=50,xs=-4,Pc=3,$D=7.99,zD=8,HD=1024,KD=1024,qD=1024,UD=.2,GD=.8,WD=10,jD=.15,YD=.1,XD=.9,ZD=.9,QD=100,JD=1,Ra={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},eP=wt({getKey:null,doesEleInvalidateKey:Mo,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Ah,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Ki=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var a=eP(r);xe(n,a),n.lookup=new VD(a.getKey,a.doesEleInvalidateKey),n.setupDequeueing()},ct=Ki.prototype;ct.reasons=Ra,ct.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},ct.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n},ct.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Ei(function(r,n){return n.reqs-r.reqs});return e},ct.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e},ct.getElement=function(t,e,r,n,a){var i=this,o=this.renderer,l=o.cy.zoom(),u=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!i.allowEdgeTxrCaching&&t.isEdge()||!i.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(jl(l*r))),n<xs)n=xs;else if(l>=$D||n>Pc)return null;var c=Math.pow(2,n),d=e.h*c,f=e.w*c,p=o.eleTextBiggerThanMin(t,c);if(!this.isVisible(t,p))return null;var v=u.get(t,n);if(v&&v.invalidated&&(v.invalidated=!1,v.texture.invalidatedWidth-=v.width),v)return v;var h;if(d<=Uv?h=Uv:d<=ks?h=ks:h=Math.ceil(d/ks)*ks,d>qD||f>KD)return null;var g=i.getTextureQueue(h),y=g[g.length-2],m=function(){return i.recycleTexture(h,f)||i.addTexture(h,f)};y||(y=g[g.length-1]),y||(y=m()),y.width-y.usedWidth<f&&(y=m());for(var b=function(_){return _&&_.scaledLabelShown===p},w=a&&a===Ra.dequeue,C=a&&a===Ra.highQuality,x=a&&a===Ra.downscale,E,k=n+1;k<=Pc;k++){var B=u.get(t,k);if(B){E=B;break}}var S=E&&E.level===n+1?E:null,N=function(){y.context.drawImage(S.texture.canvas,S.x,0,S.width,S.height,y.usedWidth,0,f,d)};if(y.context.setTransform(1,0,0,1,0,0),y.context.clearRect(y.usedWidth,0,f,h),b(S))N();else if(b(E))if(C){for(var D=E.level;D>n;D--)S=i.getElement(t,e,r,D,Ra.downscale);N()}else return i.queueElement(t,E.level-1),E;else{var P;if(!w&&!C&&!x)for(var F=n-1;F>=xs;F--){var O=u.get(t,F);if(O){P=O;break}}if(b(P))return i.queueElement(t,n),P;y.context.translate(y.usedWidth,0),y.context.scale(c,c),this.drawElement(y.context,t,e,p,!1),y.context.scale(1/c,1/c),y.context.translate(-y.usedWidth,0)}return v={x:y.usedWidth,texture:y,level:n,scale:c,width:f,height:d,scaledLabelShown:p},y.usedWidth+=Math.ceil(f+zD),y.eleCaches.push(v),u.set(t,n,v),i.checkTextureFullness(y),v},ct.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])},ct.invalidateElement=function(t){var e=this,r=e.lookup,n=[],a=r.isInvalid(t);if(a){for(var i=xs;i<=Pc;i++){var o=r.getForCachedKey(t,i);o&&n.push(o)}var l=r.invalidate(t);if(l)for(var u=0;u<n.length;u++){var c=n[u],d=c.texture;d.invalidatedWidth+=c.width,c.invalidated=!0,e.checkTextureUtility(d)}e.removeFromQueue(t)}},ct.checkTextureUtility=function(t){t.invalidatedWidth>=UD*t.width&&this.retireTexture(t)},ct.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>GD&&t.fullnessChecks>=WD?on(r,t):t.fullnessChecks++},ct.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),a=this.lookup;on(n,t),t.retired=!0;for(var i=t.eleCaches,o=0;o<i.length;o++){var l=i[o];a.deleteCache(l.key,l.level)}Gl(i);var u=e.getRetiredTextureQueue(r);u.push(t)},ct.addTexture=function(t,e){var r=this,n=r.getTextureQueue(t),a={};return n.push(a),a.eleCaches=[],a.height=t,a.width=Math.max(HD,e),a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,a.canvas=r.renderer.makeOffscreenCanvas(a.width,a.height),a.context=a.canvas.getContext("2d"),a},ct.recycleTexture=function(t,e){for(var r=this,n=r.getTextureQueue(t),a=r.getRetiredTextureQueue(t),i=0;i<a.length;i++){var o=a[i];if(o.width>=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Gl(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),on(a,o),n.push(o),o}},ct.queueElement=function(t,e){var r=this,n=r.getElementQueue(),a=r.getElementKeyToQueue(),i=this.getKey(t),o=a[i];if(o)o.level=Math.max(o.level,e),o.eles.merge(t),o.reqs++,n.updateItem(o);else{var l={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(l),a[i]=l}},ct.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=[],i=e.lookup,o=0;o<JD&&r.size()>0;o++){var l=r.pop(),u=l.key,c=l.eles[0],d=i.hasCache(c,l.level);if(n[u]=null,d)continue;a.push(l);var f=e.getBoundingBox(c);e.getElement(c,f,t,l.level,Ra.dequeue)}return a},ct.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=this.getKey(t),i=n[a];i!=null&&(i.eles.length===1?(i.reqs=ql,r.updateItem(i),r.pop(),n[a]=null):i.eles.unmerge(t))},ct.onDequeue=function(t){this.onDequeues.push(t)},ct.offDequeue=function(t){on(this.onDequeues,t)},ct.setupDequeueing=qv.setupDequeueing({deqRedrawThreshold:QD,deqCost:jD,deqAvgCost:YD,deqNoDrawCost:XD,deqFastCost:ZD,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n<e.onDequeues.length;n++){var a=e.onDequeues[n];a(r)}},shouldRedraw:function(e,r,n,a){for(var i=0;i<r.length;i++)for(var o=r[i].eles,l=0;l<o.length;l++){var u=o[l].boundingBox();if(Yl(u,a))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});var tP=1,qi=-4,Es=2,rP=3.99,nP=50,aP=50,iP=.15,oP=.1,sP=.9,lP=.9,cP=1,Gv=250,uP=4e3*4e3,dP=!0,Wv=function(e){var r=this,n=r.renderer=e,a=n.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=Rr()-2*Gv,r.skipping=!1,r.eleTxrDeqs=a.collection(),r.scheduleElementRefinement=_o(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},aP),n.beforeRender(function(o,l){l-r.lastInvalidationTime<=Gv?r.skipping=!0:r.skipping=!1},n.beforeRenderPriorities.lyrTxrSkip);var i=function(l,u){return u.reqs-l.reqs};r.layersQueue=new Ei(i),r.setupDequeueing()},Et=Wv.prototype,jv=0,fP=Math.pow(2,53)-1;Et.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),a=Math.ceil(t.h*r),i=this.renderer.makeOffscreenCanvas(n,a),o={id:jv=++jv%fP,bb:t,level:e,width:n,height:a,canvas:i,context:i.getContext("2d"),eles:[],elesQueue:[],reqs:0},l=o.context,u=-o.bb.x1,c=-o.bb.y1;return l.scale(r,r),l.translate(u,c),o},Et.getLayers=function(t,e,r){var n=this,a=n.renderer,i=a.cy,o=i.zoom(),l=n.firstGet;if(n.firstGet=!1,r==null){if(r=Math.ceil(jl(o*e)),r<qi)r=qi;else if(o>=rP||r>Es)return null}n.validateLayersElesOrdering(r,t);var u=n.layersByLevel,c=Math.pow(2,r),d=u[r]=u[r]||[],f,p=n.levelIsComplete(r,t),v,h=function(){var N=function(I){if(n.validateLayersElesOrdering(I,t),n.levelIsComplete(I,t))return v=u[I],!0},D=function(I){if(!v)for(var _=r+I;qi<=_&&_<=Es&&!N(_);_+=I);};D(1),D(-1);for(var P=d.length-1;P>=0;P--){var F=d[P];F.invalid&&on(d,F)}};if(!p)h();else return d;var g=function(){if(!f){f=zt();for(var N=0;N<t.length;N++)Uh(f,t[N].boundingBox())}return f},y=function(N){N=N||{};var D=N.after;g();var P=f.w*c*(f.h*c);if(P>uP)return null;var F=n.makeLayer(f,r);if(D!=null){var O=d.indexOf(D)+1;d.splice(O,0,F)}else(N.insert===void 0||N.insert)&&d.unshift(F);return F};if(n.skipping&&!l)return null;for(var m=null,b=t.length/tP,w=!l,C=0;C<t.length;C++){var x=t[C],E=x._private.rscratch,k=E.imgLayerCaches=E.imgLayerCaches||{},B=k[r];if(B){m=B;continue}if((!m||m.eles.length>=b||!Wh(m.bb,x.boundingBox()))&&(m=y({insert:!0,after:m}),!m))return null;v||w?n.queueLayer(m,x):n.drawEleInLayer(m,x,r,e),m.eles.push(x),k[r]=m}return v||(w?null:d)},Et.getEleLevelForLayerLevel=function(t,e){return t},Et.drawEleInLayer=function(t,e,r,n){var a=this,i=this.renderer,o=t.context,l=e.boundingBox();l.w===0||l.h===0||!e.visible()||(r=a.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(o,!1),i.drawCachedElement(o,e,null,null,r,dP),i.setImgSmoothing(o,!0))},Et.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var a=0,i=0;i<n.length;i++){var o=n[i];if(o.reqs>0||o.invalid)return!1;a+=o.eles.length}return a===e.length},Et.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var a=r[n],i=-1,o=0;o<e.length;o++)if(a.eles[0]===e[o]){i=o;break}if(i<0){this.invalidateLayer(a);continue}for(var l=i,o=0;o<a.eles.length;o++)if(a.eles[o]!==e[l+o]){this.invalidateLayer(a);break}}},Et.updateElementsInLayers=function(t,e){for(var r=this,n=vi(t[0]),a=0;a<t.length;a++)for(var i=n?null:t[a],o=n?t[a]:t[a].ele,l=o._private.rscratch,u=l.imgLayerCaches=l.imgLayerCaches||{},c=qi;c<=Es;c++){var d=u[c];d&&(i&&r.getEleLevelForLayerLevel(d.level)!==i.level||e(d,o,i))}},Et.haveLayers=function(){for(var t=this,e=!1,r=qi;r<=Es;r++){var n=t.layersByLevel[r];if(n&&n.length>0){e=!0;break}}return e},Et.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=Rr(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(n,a,i){e.invalidateLayer(n)}))},Et.invalidateLayer=function(t){if(this.lastInvalidationTime=Rr(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];on(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var a=0;a<r.length;a++){var i=r[a]._private.rscratch.imgLayerCaches;i&&(i[e]=null)}}},Et.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,function(n,a,i){var o=n.replacement;if(o||(o=n.replacement=e.makeLayer(n.bb,n.level),o.replaces=n,o.eles=n.eles),!o.reqs)for(var l=0;l<o.eles.length;l++)e.queueLayer(o,o.eles[l])})},Et.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},Et.queueLayer=function(t,e){var r=this,n=r.layersQueue,a=t.elesQueue,i=a.hasId=a.hasId||{};if(!t.replacement){if(e){if(i[e.id()])return;a.push(e),i[e.id()]=!0}t.reqs?(t.reqs++,n.updateItem(t)):(t.reqs=1,n.push(t))}},Et.dequeue=function(t){for(var e=this,r=e.layersQueue,n=[],a=0;a<cP&&r.size()!==0;){var i=r.peek();if(i.replacement){r.pop();continue}if(i.replaces&&i!==i.replaces.replacement){r.pop();continue}if(i.invalid){r.pop();continue}var o=i.elesQueue.shift();o&&(e.drawEleInLayer(i,o,i.level,t),a++),n.length===0&&n.push(!0),i.elesQueue.length===0&&(r.pop(),i.reqs=0,i.replaces&&e.applyLayerReplacement(i),e.requestRedraw())}return n},Et.applyLayerReplacement=function(t){var e=this,r=e.layersByLevel[t.level],n=t.replaces,a=r.indexOf(n);if(!(a<0||n.invalid)){r[a]=t;for(var i=0;i<t.eles.length;i++){var o=t.eles[i]._private,l=o.imgLayerCaches=o.imgLayerCaches||{};l&&(l[t.level]=t)}e.requestRedraw()}},Et.requestRedraw=_o(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),Et.setupDequeueing=qv.setupDequeueing({deqRedrawThreshold:nP,deqCost:iP,deqAvgCost:oP,deqNoDrawCost:sP,deqFastCost:lP,deq:function(e,r){return e.dequeue(r)},onDeqd:Ul,shouldRedraw:Ah,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});var Yv={},Xv;function hP(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y)}}function pP(t,e,r){for(var n,a=0;a<e.length;a++){var i=e[a];a===0&&(n=i),t.lineTo(i.x,i.y)}t.quadraticCurveTo(r.x,r.y,n.x,n.y)}function Zv(t,e,r){t.beginPath&&t.beginPath();for(var n=e,a=0;a<n.length;a++){var i=n[a];t.lineTo(i.x,i.y)}var o=r,l=r[0];t.moveTo(l.x,l.y);for(var a=1;a<o.length;a++){var i=o[a];t.lineTo(i.x,i.y)}t.closePath&&t.closePath()}function vP(t,e,r,n,a){t.beginPath&&t.beginPath(),t.arc(r,n,a,0,Math.PI*2,!1);var i=e,o=i[0];t.moveTo(o.x,o.y);for(var l=0;l<i.length;l++){var u=i[l];t.lineTo(u.x,u.y)}t.closePath&&t.closePath()}function gP(t,e,r,n){t.arc(e,r,n,0,Math.PI*2,!1)}Yv.arrowShapeImpl=function(t){return(Xv||(Xv={polygon:hP,"triangle-backcurve":pP,"triangle-tee":Zv,"circle-triangle":vP,"triangle-cross":Zv,circle:gP}))[t]};var Sr={};Sr.drawElement=function(t,e,r,n,a,i){var o=this;e.isNode()?o.drawNode(t,e,r,n,a,i):o.drawEdge(t,e,r,n,a,i)},Sr.drawElementOverlay=function(t,e){var r=this;e.isNode()?r.drawNodeOverlay(t,e):r.drawEdgeOverlay(t,e)},Sr.drawElementUnderlay=function(t,e){var r=this;e.isNode()?r.drawNodeUnderlay(t,e):r.drawEdgeUnderlay(t,e)},Sr.drawCachedElementPortion=function(t,e,r,n,a,i,o,l){var u=this,c=r.getBoundingBox(e);if(!(c.w===0||c.h===0)){var d=r.getElement(e,c,n,a,i);if(d!=null){var f=l(u,e);if(f===0)return;var p=o(u,e),v=c.x1,h=c.y1,g=c.w,y=c.h,m,b,w,C,x;if(p!==0){var E=r.getRotationPoint(e);w=E.x,C=E.y,t.translate(w,C),t.rotate(p),x=u.getImgSmoothing(t),x||u.setImgSmoothing(t,!0);var k=r.getRotationOffset(e);m=k.x,b=k.y}else m=v,b=h;var B;f!==1&&(B=t.globalAlpha,t.globalAlpha=B*f),t.drawImage(d.texture.canvas,d.x,0,d.width,d.height,m,b,g,y),f!==1&&(t.globalAlpha=B),p!==0&&(t.rotate(-p),t.translate(-w,-C),x||u.setImgSmoothing(t,!1))}else r.drawElement(t,e)}};var mP=function(){return 0},yP=function(e,r){return e.getTextAngle(r,null)},bP=function(e,r){return e.getTextAngle(r,"source")},wP=function(e,r){return e.getTextAngle(r,"target")},CP=function(e,r){return r.effectiveOpacity()},Oc=function(e,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity()};Sr.drawCachedElement=function(t,e,r,n,a,i){var o=this,l=o.data,u=l.eleTxrCache,c=l.lblTxrCache,d=l.slbTxrCache,f=l.tlbTxrCache,p=e.boundingBox(),v=i===!0?u.reasons.highQuality:null;if(!(p.w===0||p.h===0||!e.visible())&&(!n||Yl(p,n))){var h=e.isEdge(),g=e.element()._private.rscratch.badLine;o.drawElementUnderlay(t,e),o.drawCachedElementPortion(t,e,u,r,a,v,mP,CP),(!h||!g)&&o.drawCachedElementPortion(t,e,c,r,a,v,yP,Oc),h&&!g&&(o.drawCachedElementPortion(t,e,d,r,a,v,bP,Oc),o.drawCachedElementPortion(t,e,f,r,a,v,wP,Oc)),o.drawElementOverlay(t,e)}},Sr.drawElements=function(t,e){for(var r=this,n=0;n<e.length;n++){var a=e[n];r.drawElement(t,a)}},Sr.drawCachedElements=function(t,e,r,n){for(var a=this,i=0;i<e.length;i++){var o=e[i];a.drawCachedElement(t,o,r,n)}},Sr.drawCachedNodes=function(t,e,r,n){for(var a=this,i=0;i<e.length;i++){var o=e[i];o.isNode()&&a.drawCachedElement(t,o,r,n)}},Sr.drawLayeredElements=function(t,e,r,n){var a=this,i=a.data.lyrTxrCache.getLayers(e,r);if(i)for(var o=0;o<i.length;o++){var l=i[o],u=l.bb;u.w===0||u.h===0||t.drawImage(l.canvas,u.x1,u.y1,u.w,u.h)}else a.drawCachedElements(t,e,r,n)};var Kr={};Kr.drawEdge=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,l=e._private.rscratch;if(!(i&&!e.visible())&&!(l.badLine||l.allpts==null||isNaN(l.allpts[0]))){var u;r&&(u=r,t.translate(-u.x1,-u.y1));var c=i?e.pstyle("opacity").value:1,d=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,p=e.pstyle("line-style").value,v=e.pstyle("width").pfValue,h=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,y=e.pstyle("line-outline-color").value,m=c*d,b=c*d,w=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;f==="straight-triangle"?(o.eleStrokeStyle(t,e,I),o.drawEdgeTrianglePath(e,t,l.allpts)):(t.lineWidth=v,t.lineCap=h,o.eleStrokeStyle(t,e,I),o.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},C=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;if(t.lineWidth=v+g,t.lineCap=h,g>0)o.colorStrokeStyle(t,y[0],y[1],y[2],I);else{t.lineCap="butt";return}f==="straight-triangle"?o.drawEdgeTrianglePath(e,t,l.allpts):(o.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},x=function(){a&&o.drawEdgeOverlay(t,e)},E=function(){a&&o.drawEdgeUnderlay(t,e)},k=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;o.drawArrowheads(t,e,I)},B=function(){o.drawElementText(t,e,null,n)};t.lineJoin="round";var S=e.pstyle("ghost").value==="yes";if(S){var N=e.pstyle("ghost-offset-x").pfValue,D=e.pstyle("ghost-offset-y").pfValue,P=e.pstyle("ghost-opacity").value,F=m*P;t.translate(N,D),w(F),k(F),t.translate(-N,-D)}else C();E(),w(),k(),x(),B(),r&&t.translate(u.x1,u.y1)}};var Qv=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var a=n.pstyle("".concat(e,"-opacity")).value;if(a!==0){var i=this,o=i.usePaths(),l=n._private.rscratch,u=n.pstyle("".concat(e,"-padding")).pfValue,c=2*u,d=n.pstyle("".concat(e,"-color")).value;r.lineWidth=c,l.edgeType==="self"&&!o?r.lineCap="butt":r.lineCap="round",i.colorStrokeStyle(r,d[0],d[1],d[2],a),i.drawEdgePath(n,r,l.allpts,"solid")}}}};Kr.drawEdgeOverlay=Qv("overlay"),Kr.drawEdgeUnderlay=Qv("underlay"),Kr.drawEdgePath=function(t,e,r,n){var a=t._private.rscratch,i=e,o,l=!1,u=this.usePaths(),c=t.pstyle("line-dash-pattern").pfValue,d=t.pstyle("line-dash-offset").pfValue;if(u){var f=r.join("$"),p=a.pathCacheKey&&a.pathCacheKey===f;p?(o=e=a.pathCache,l=!0):(o=e=new Path2D,a.pathCacheKey=f,a.pathCache=o)}if(i.setLineDash)switch(n){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(c),i.lineDashOffset=d;break;case"solid":i.setLineDash([]);break}if(!l&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var v=2;v+3<r.length;v+=4)e.quadraticCurveTo(r[v],r[v+1],r[v+2],r[v+3]);break;case"straight":case"haystack":for(var h=2;h+1<r.length;h+=2)e.lineTo(r[h],r[h+1]);break;case"segments":if(a.isRound){var g=mh(a.roundCorners),y;try{for(g.s();!(y=g.n()).done;){var m=y.value;Fv(e,m)}}catch(w){g.e(w)}finally{g.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var b=2;b+1<r.length;b+=2)e.lineTo(r[b],r[b+1]);break}e=i,u?e.stroke(o):e.stroke(),e.setLineDash&&e.setLineDash([])},Kr.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle("width").pfValue,a=0;a+1<r.length;a+=2){var i=[r[a+2]-r[a],r[a+3]-r[a+1]],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]),l=[i[1]/o,-i[0]/o],u=[l[0]*n/2,l[1]*n/2];e.beginPath(),e.moveTo(r[a]-u[0],r[a+1]-u[1]),e.lineTo(r[a]+u[0],r[a+1]+u[1]),e.lineTo(r[a+2],r[a+3]),e.closePath(),e.fill()}},Kr.drawArrowheads=function(t,e,r){var n=e._private.rscratch,a=n.edgeType==="haystack";a||this.drawArrowhead(t,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),a||this.drawArrowhead(t,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)},Kr.drawArrowhead=function(t,e,r,n,a,i,o){if(!(isNaN(n)||n==null||isNaN(a)||a==null||isNaN(i)||i==null)){var l=this,u=e.pstyle(r+"-arrow-shape").value;if(u!=="none"){var c=e.pstyle(r+"-arrow-fill").value==="hollow"?"both":"filled",d=e.pstyle(r+"-arrow-fill").value,f=e.pstyle("width").pfValue,p=e.pstyle(r+"-arrow-width"),v=p.value==="match-line"?f:p.pfValue;p.units==="%"&&(v*=f);var h=e.pstyle("opacity").value;o===void 0&&(o=h);var g=t.globalCompositeOperation;(o!==1||d==="hollow")&&(t.globalCompositeOperation="destination-out",l.colorFillStyle(t,255,255,255,1),l.colorStrokeStyle(t,255,255,255,1),l.drawArrowShape(e,t,c,f,u,v,n,a,i),t.globalCompositeOperation=g);var y=e.pstyle(r+"-arrow-color").value;l.colorFillStyle(t,y[0],y[1],y[2],o),l.colorStrokeStyle(t,y[0],y[1],y[2],o),l.drawArrowShape(e,t,d,f,u,v,n,a,i)}}},Kr.drawArrowShape=function(t,e,r,n,a,i,o,l,u){var c=this,d=this.usePaths()&&a!=="triangle-cross",f=!1,p,v=e,h={x:o,y:l},g=t.pstyle("arrow-scale").value,y=this.getArrowWidth(n,g),m=c.arrowShapes[a];if(d){var b=c.arrowPathCache=c.arrowPathCache||[],w=Mn(a),C=b[w];C!=null?(p=e=C,f=!0):(p=e=new Path2D,b[w]=p)}f||(e.beginPath&&e.beginPath(),d?m.draw(e,1,0,{x:0,y:0},1):m.draw(e,y,u,h,n),e.closePath&&e.closePath()),e=v,d&&(e.translate(o,l),e.rotate(u),e.scale(y,y)),(r==="filled"||r==="both")&&(d?e.fill(p):e.fill()),(r==="hollow"||r==="both")&&(e.lineWidth=i/(d?y:1),e.lineJoin="miter",d?e.stroke(p):e.stroke()),d&&(e.scale(1/y,1/y),e.rotate(-u),e.translate(-o,-l))};var _c={};_c.safeDrawImage=function(t,e,r,n,a,i,o,l,u,c){if(!(a<=0||i<=0||u<=0||c<=0))try{t.drawImage(e,r,n,a,i,o,l,u,c)}catch(d){Ae(d)}},_c.drawInscribedImage=function(t,e,r,n,a){var i=this,o=r.position(),l=o.x,u=o.y,c=r.cy().style(),d=c.getIndexedStyle.bind(c),f=d(r,"background-fit","value",n),p=d(r,"background-repeat","value",n),v=r.width(),h=r.height(),g=r.padding()*2,y=v+(d(r,"background-width-relative-to","value",n)==="inner"?0:g),m=h+(d(r,"background-height-relative-to","value",n)==="inner"?0:g),b=r._private.rscratch,w=d(r,"background-clip","value",n),C=w==="node",x=d(r,"background-image-opacity","value",n)*a,E=d(r,"background-image-smoothing","value",n),k=r.pstyle("corner-radius").value;k!=="auto"&&(k=r.pstyle("corner-radius").pfValue);var B=e.width||e.cachedW,S=e.height||e.cachedH;(B==null||S==null)&&(document.body.appendChild(e),B=e.cachedW=e.width||e.offsetWidth,S=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var N=B,D=S;if(d(r,"background-width","value",n)!=="auto"&&(d(r,"background-width","units",n)==="%"?N=d(r,"background-width","pfValue",n)*y:N=d(r,"background-width","pfValue",n)),d(r,"background-height","value",n)!=="auto"&&(d(r,"background-height","units",n)==="%"?D=d(r,"background-height","pfValue",n)*m:D=d(r,"background-height","pfValue",n)),!(N===0||D===0)){if(f==="contain"){var P=Math.min(y/N,m/D);N*=P,D*=P}else if(f==="cover"){var P=Math.max(y/N,m/D);N*=P,D*=P}var F=l-y/2,O=d(r,"background-position-x","units",n),I=d(r,"background-position-x","pfValue",n);O==="%"?F+=(y-N)*I:F+=I;var _=d(r,"background-offset-x","units",n),M=d(r,"background-offset-x","pfValue",n);_==="%"?F+=(y-N)*M:F+=M;var L=u-m/2,R=d(r,"background-position-y","units",n),H=d(r,"background-position-y","pfValue",n);R==="%"?L+=(m-D)*H:L+=H;var $=d(r,"background-offset-y","units",n),z=d(r,"background-offset-y","pfValue",n);$==="%"?L+=(m-D)*z:L+=z,b.pathCache&&(F-=l,L-=u,l=0,u=0);var j=t.globalAlpha;t.globalAlpha=x;var ee=i.getImgSmoothing(t),J=!1;if(E==="no"&&ee?(i.setImgSmoothing(t,!1),J=!0):E==="yes"&&!ee&&(i.setImgSmoothing(t,!0),J=!0),p==="no-repeat")C&&(t.save(),b.pathCache?t.clip(b.pathCache):(i.nodeShapes[i.getNodeShape(r)].draw(t,l,u,y,m,k,b),t.clip())),i.safeDrawImage(t,e,0,0,B,S,F,L,N,D),C&&t.restore();else{var Z=t.createPattern(e,p);t.fillStyle=Z,i.nodeShapes[i.getNodeShape(r)].draw(t,l,u,y,m,k,b),t.translate(F,L),t.fill(),t.translate(-F,-L)}t.globalAlpha=j,J&&i.setImgSmoothing(t,ee)}};var Wn={};Wn.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),n=this.getPixelRatio(),a=Math.ceil(jl(r*n));e=Math.pow(2,a)}var i=t.pstyle("font-size").pfValue*e,o=t.pstyle("min-zoomed-font-size").pfValue;return!(i<o)},Wn.drawElementText=function(t,e,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(n==null){if(i&&!o.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var l=e.pstyle("label");if(!l||!l.value)return;var u=o.getLabelJustification(e);t.textAlign=u,t.textBaseline="bottom"}else{var c=e.element()._private.rscratch.badLine,d=e.pstyle("label"),f=e.pstyle("source-label"),p=e.pstyle("target-label");if(c||(!d||!d.value)&&(!f||!f.value)&&(!p||!p.value))return;t.textAlign="center",t.textBaseline="bottom"}var v=!r,h;r&&(h=r,t.translate(-h.x1,-h.y1)),a==null?(o.drawText(t,e,null,v,i),e.isEdge()&&(o.drawText(t,e,"source",v,i),o.drawText(t,e,"target",v,i))):o.drawText(t,e,a,v,i),r&&t.translate(h.x1,h.y1)},Wn.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if(e=this.fontCaches[r],e.context===t)return e;return e={context:t},this.fontCaches.push(e),e},Wn.setupTextStyle=function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,l=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*l,c=e.pstyle("color").value,d=e.pstyle("text-outline-color").value;t.font=n+" "+o+" "+a+" "+i,t.lineJoin="round",this.colorFillStyle(t,c[0],c[1],c[2],l),this.colorStrokeStyle(t,d[0],d[1],d[2],u)};function Fc(t,e,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+i,r),t.lineTo(e+n-i,r),t.quadraticCurveTo(e+n,r,e+n,r+i),t.lineTo(e+n,r+a-i),t.quadraticCurveTo(e+n,r+a,e+n-i,r+a),t.lineTo(e+i,r+a),t.quadraticCurveTo(e,r+a,e,r+a-i),t.lineTo(e,r+i),t.quadraticCurveTo(e,r,e+i,r),t.closePath(),o?t.stroke():t.fill()}Wn.getTextAngle=function(t,e){var r,n=t._private,a=n.rscratch,i=e?e+"-":"",o=t.pstyle(i+"text-rotation"),l=lr(a,"labelAngle",e);return o.strValue==="autorotate"?r=t.isEdge()?l:0:o.strValue==="none"?r=0:r=o.pfValue,r},Wn.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,o=i.rscratch,l=a?e.effectiveOpacity():1;if(!(a&&(l===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var u=lr(o,"labelX",r),c=lr(o,"labelY",r),d,f,p=this.getLabelText(e,r);if(p!=null&&p!==""&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(t,e,a);var v=r?r+"-":"",h=lr(o,"labelWidth",r),g=lr(o,"labelHeight",r),y=e.pstyle(v+"text-margin-x").pfValue,m=e.pstyle(v+"text-margin-y").pfValue,b=e.isEdge(),w=e.pstyle("text-halign").value,C=e.pstyle("text-valign").value;b&&(w="center",C="center"),u+=y,c+=m;var x;switch(n?x=this.getTextAngle(e,r):x=0,x!==0&&(d=u,f=c,t.translate(d,f),t.rotate(x),u=0,c=0),C){case"top":break;case"center":c+=g/2;break;case"bottom":c+=g;break}var E=e.pstyle("text-background-opacity").value,k=e.pstyle("text-border-opacity").value,B=e.pstyle("text-border-width").pfValue,S=e.pstyle("text-background-padding").pfValue,N=e.pstyle("text-background-shape").strValue,D=N.indexOf("round")===0,P=2;if(E>0||B>0&&k>0){var F=u-S;switch(w){case"left":F-=h;break;case"center":F-=h/2;break}var O=c-g-S,I=h+2*S,_=g+2*S;if(E>0){var M=t.fillStyle,L=e.pstyle("text-background-color").value;t.fillStyle="rgba("+L[0]+","+L[1]+","+L[2]+","+E*l+")",D?Fc(t,F,O,I,_,P):t.fillRect(F,O,I,_),t.fillStyle=M}if(B>0&&k>0){var R=t.strokeStyle,H=t.lineWidth,$=e.pstyle("text-border-color").value,z=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+$[0]+","+$[1]+","+$[2]+","+k*l+")",t.lineWidth=B,t.setLineDash)switch(z){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=B/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(D?Fc(t,F,O,I,_,P,"stroke"):t.strokeRect(F,O,I,_),z==="double"){var j=B/2;D?Fc(t,F+j,O+j,I-j*2,_-j*2,P,"stroke"):t.strokeRect(F+j,O+j,I-j*2,_-j*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=H,t.strokeStyle=R}}var ee=2*e.pstyle("text-outline-width").pfValue;if(ee>0&&(t.lineWidth=ee),e.pstyle("text-wrap").value==="wrap"){var J=lr(o,"labelWrapCachedLines",r),Z=lr(o,"labelLineHeight",r),re=h/2,Y=this.getLabelJustification(e);switch(Y==="auto"||(w==="left"?Y==="left"?u+=-h:Y==="center"&&(u+=-re):w==="center"?Y==="left"?u+=-re:Y==="right"&&(u+=re):w==="right"&&(Y==="center"?u+=re:Y==="right"&&(u+=h))),C){case"top":c-=(J.length-1)*Z;break;case"center":case"bottom":c-=(J.length-1)*Z;break}for(var A=0;A<J.length;A++)ee>0&&t.strokeText(J[A],u,c),t.fillText(J[A],u,c),c+=Z}else ee>0&&t.strokeText(p,u,c),t.fillText(p,u,c);x!==0&&(t.rotate(-x),t.translate(-d,-f))}}};var Va={};Va.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,l,u,c=e._private,d=c.rscratch,f=e.position();if(!(!le(f.x)||!le(f.y))&&!(i&&!e.visible())){var p=i?e.effectiveOpacity():1,v=o.usePaths(),h,g=!1,y=e.padding();l=e.width()+2*y,u=e.height()+2*y;var m;r&&(m=r,t.translate(-m.x1,-m.y1));for(var b=e.pstyle("background-image"),w=b.value,C=new Array(w.length),x=new Array(w.length),E=0,k=0;k<w.length;k++){var B=w[k],S=C[k]=B!=null&&B!=="none";if(S){var N=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",k);E++,x[k]=o.getCachedImage(B,N,function(){c.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var D=e.pstyle("background-blacken").value,P=e.pstyle("border-width").pfValue,F=e.pstyle("background-opacity").value*p,O=e.pstyle("border-color").value,I=e.pstyle("border-style").value,_=e.pstyle("border-join").value,M=e.pstyle("border-cap").value,L=e.pstyle("border-position").value,R=e.pstyle("border-dash-pattern").pfValue,H=e.pstyle("border-dash-offset").pfValue,$=e.pstyle("border-opacity").value*p,z=e.pstyle("outline-width").pfValue,j=e.pstyle("outline-color").value,ee=e.pstyle("outline-style").value,J=e.pstyle("outline-opacity").value*p,Z=e.pstyle("outline-offset").value,re=e.pstyle("corner-radius").value;re!=="auto"&&(re=e.pstyle("corner-radius").pfValue);var Y=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F;o.eleFillStyle(t,e,ie)},A=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$;o.colorStrokeStyle(t,O[0],O[1],O[2],ie)},K=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J;o.colorStrokeStyle(t,j[0],j[1],j[2],ie)},W=function(ie,X,ae,we){var Ce=o.nodePathCache=o.nodePathCache||[],ge=Mh(ae==="polygon"?ae+","+we.join(","):ae,""+X,""+ie,""+re),Se=Ce[ge],ve,ye=!1;return Se!=null?(ve=Se,ye=!0,d.pathCache=ve):(ve=new Path2D,Ce[ge]=d.pathCache=ve),{path:ve,cacheHit:ye}},oe=e.pstyle("shape").strValue,he=e.pstyle("shape-polygon-points").pfValue;if(v){t.translate(f.x,f.y);var ne=W(l,u,oe,he);h=ne.path,g=ne.cacheHit}var se=function(){if(!g){var ie=f;v&&(ie={x:0,y:0}),o.nodeShapes[o.getNodeShape(e)].draw(h||t,ie.x,ie.y,l,u,re,d)}v?t.fill(h):t.fill()},ue=function(){for(var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ae=c.backgrounding,we=0,Ce=0;Ce<x.length;Ce++){var ge=e.cy().style().getIndexedStyle(e,"background-image-containment","value",Ce);if(X&&ge==="over"||!X&&ge==="inside"){we++;continue}C[Ce]&&x[Ce].complete&&!x[Ce].error&&(we++,o.drawInscribedImage(t,x[Ce],e,Ce,ie))}c.backgrounding=we!==E,ae!==c.backgrounding&&e.updateStyle(!1)},pe=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasPie(e)&&(o.drawPie(t,e,X),ie&&(v||o.nodeShapes[o.getNodeShape(e)].draw(t,f.x,f.y,l,u,re,d)))},de=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,X=(D>0?D:-D)*ie,ae=D>0?0:255;D!==0&&(o.colorFillStyle(t,ae,ae,ae,X),v?t.fill(h):t.fill())},me=function(){if(P>0){if(t.lineWidth=P,t.lineCap=M,t.lineJoin=_,t.setLineDash)switch(I){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(R),t.lineDashOffset=H;break;case"solid":case"double":t.setLineDash([]);break}if(L!=="center"){if(t.save(),t.lineWidth*=2,L==="inside")v?t.clip(h):t.clip();else{var ie=new Path2D;ie.rect(-l/2-P,-u/2-P,l+2*P,u+2*P),ie.addPath(h),t.clip(ie,"evenodd")}v?t.stroke(h):t.stroke(),t.restore()}else v?t.stroke(h):t.stroke();if(I==="double"){t.lineWidth=P/3;var X=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",v?t.stroke(h):t.stroke(),t.globalCompositeOperation=X}t.setLineDash&&t.setLineDash([])}},Ne=function(){if(z>0){if(t.lineWidth=z,t.lineCap="butt",t.setLineDash)switch(ee){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var ie=f;v&&(ie={x:0,y:0});var X=o.getNodeShape(e),ae=P;L==="inside"&&(ae=0),L==="outside"&&(ae*=2);var we=(l+ae+(z+Z))/l,Ce=(u+ae+(z+Z))/u,ge=l*we,Se=u*Ce,ve=o.nodeShapes[X].points,ye;if(v){var Ge=W(ge,Se,X,ve);ye=Ge.path}if(X==="ellipse")o.drawEllipsePath(ye||t,ie.x,ie.y,ge,Se);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(X)){var Ve=0,rt=0,nt=0;X==="round-diamond"?Ve=(ae+Z+z)*1.4:X==="round-heptagon"?(Ve=(ae+Z+z)*1.075,nt=-(ae/2+Z+z)/35):X==="round-hexagon"?Ve=(ae+Z+z)*1.12:X==="round-pentagon"?(Ve=(ae+Z+z)*1.13,nt=-(ae/2+Z+z)/15):X==="round-tag"?(Ve=(ae+Z+z)*1.12,rt=(ae/2+z+Z)*.07):X==="round-triangle"&&(Ve=(ae+Z+z)*(Math.PI/2),nt=-(ae+Z/2+z)/Math.PI),Ve!==0&&(we=(l+Ve)/l,ge=l*we,["round-hexagon","round-tag"].includes(X)||(Ce=(u+Ve)/u,Se=u*Ce)),re=re==="auto"?Xh(ge,Se):re;for(var Qe=ge/2,Ot=Se/2,ut=re+(ae+z+Z)/2,ht=new Array(ve.length/2),Wt=new Array(ve.length/2),_t=0;_t<ve.length/2;_t++)ht[_t]={x:ie.x+rt+Qe*ve[_t*2],y:ie.y+nt+Ot*ve[_t*2+1]};var Ft,tr,dr,Kt,Je=ht.length;for(tr=ht[Je-1],Ft=0;Ft<Je;Ft++)dr=ht[Ft%Je],Kt=ht[(Ft+1)%Je],Wt[Ft]=Bc(tr,dr,Kt,ut),tr=dr,dr=Kt;o.drawRoundPolygonPath(ye||t,ie.x+rt,ie.y+nt,l*we,u*Ce,ve,Wt)}else if(["roundrectangle","round-rectangle"].includes(X))re=re==="auto"?Vn(ge,Se):re,o.drawRoundRectanglePath(ye||t,ie.x,ie.y,ge,Se,re+(ae+z+Z)/2);else if(["cutrectangle","cut-rectangle"].includes(X))re=re==="auto"?Ql():re,o.drawCutRectanglePath(ye||t,ie.x,ie.y,ge,Se,null,re+(ae+z+Z)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(X))re=re==="auto"?Vn(ge,Se):re,o.drawBottomRoundRectanglePath(ye||t,ie.x,ie.y,ge,Se,re+(ae+z+Z)/2);else if(X==="barrel")o.drawBarrelPath(ye||t,ie.x,ie.y,ge,Se);else if(X.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(X)){var at=(ae+z+Z)/l;ve=zo(Ho(ve,at)),o.drawPolygonPath(ye||t,ie.x,ie.y,l,u,ve)}else{var pt=(ae+z+Z)/l;ve=zo(Ho(ve,-pt)),o.drawPolygonPath(ye||t,ie.x,ie.y,l,u,ve)}if(v?t.stroke(ye):t.stroke(),ee==="double"){t.lineWidth=ae/3;var mn=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",v?t.stroke(ye):t.stroke(),t.globalCompositeOperation=mn}t.setLineDash&&t.setLineDash([])}},De=function(){a&&o.drawNodeOverlay(t,e,f,l,u)},Ee=function(){a&&o.drawNodeUnderlay(t,e,f,l,u)},Pe=function(){o.drawElementText(t,e,null,n)},te=e.pstyle("ghost").value==="yes";if(te){var T=e.pstyle("ghost-offset-x").pfValue,V=e.pstyle("ghost-offset-y").pfValue,Q=e.pstyle("ghost-opacity").value,G=Q*p;t.translate(T,V),K(),Ne(),Y(Q*F),se(),ue(G,!0),A(Q*$),me(),pe(D!==0||P!==0),ue(G,!1),de(G),t.translate(-T,-V)}v&&t.translate(-f.x,-f.y),Ee(),v&&t.translate(f.x,f.y),K(),Ne(),Y(),se(),ue(p,!0),A(),me(),pe(D!==0||P!==0),ue(p,!1),de(),v&&t.translate(-f.x,-f.y),Pe(),De(),r&&t.translate(m.x1,m.y1)}};var Jv=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n,a,i,o){var l=this;if(n.visible()){var u=n.pstyle("".concat(e,"-padding")).pfValue,c=n.pstyle("".concat(e,"-opacity")).value,d=n.pstyle("".concat(e,"-color")).value,f=n.pstyle("".concat(e,"-shape")).value,p=n.pstyle("".concat(e,"-corner-radius")).value;if(c>0){if(a=a||n.position(),i==null||o==null){var v=n.padding();i=n.width()+2*v,o=n.height()+2*v}l.colorFillStyle(r,d[0],d[1],d[2],c),l.nodeShapes[f].draw(r,a.x,a.y,i+u*2,o+u*2,p),r.fill()}}}};Va.drawNodeOverlay=Jv("overlay"),Va.drawNodeUnderlay=Jv("underlay"),Va.hasPie=function(t){return t=t[0],t._private.hasPie},Va.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var a=e.cy().style(),i=e.pstyle("pie-size"),o=n.x,l=n.y,u=e.width(),c=e.height(),d=Math.min(u,c)/2,f=0,p=this.usePaths();p&&(o=0,l=0),i.units==="%"?d=d*i.pfValue:i.pfValue!==void 0&&(d=i.pfValue/2);for(var v=1;v<=a.pieBackgroundN;v++){var h=e.pstyle("pie-"+v+"-background-size").value,g=e.pstyle("pie-"+v+"-background-color").value,y=e.pstyle("pie-"+v+"-background-opacity").value*r,m=h/100;m+f>1&&(m=1-f);var b=1.5*Math.PI+2*Math.PI*f,w=2*Math.PI*m,C=b+w;h===0||f>=1||f+m>1||(t.beginPath(),t.moveTo(o,l),t.arc(o,l,d,b,C),t.closePath(),this.colorFillStyle(t,g[0],g[1],g[2],y),t.fill(),f+=m)}};var Gt={},kP=100;Gt.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r},Gt.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,a=0;a<e.length;a++)if(n=e[a],n.context===t){r=!1;break}return r&&(n={context:t},e.push(n)),n},Gt.createGradientStyleFor=function(t,e,r,n,a){var i,o=this.usePaths(),l=r.pstyle(e+"-gradient-stop-colors").value,u=r.pstyle(e+"-gradient-stop-positions").pfValue;if(n==="radial-gradient")if(r.isEdge()){var c=r.sourceEndpoint(),d=r.targetEndpoint(),f=r.midpoint(),p=In(c,f),v=In(d,f);i=t.createRadialGradient(f.x,f.y,0,f.x,f.y,Math.max(p,v))}else{var h=o?{x:0,y:0}:r.position(),g=r.paddedWidth(),y=r.paddedHeight();i=t.createRadialGradient(h.x,h.y,0,h.x,h.y,Math.max(g,y))}else if(r.isEdge()){var m=r.sourceEndpoint(),b=r.targetEndpoint();i=t.createLinearGradient(m.x,m.y,b.x,b.y)}else{var w=o?{x:0,y:0}:r.position(),C=r.paddedWidth(),x=r.paddedHeight(),E=C/2,k=x/2,B=r.pstyle("background-gradient-direction").value;switch(B){case"to-bottom":i=t.createLinearGradient(w.x,w.y-k,w.x,w.y+k);break;case"to-top":i=t.createLinearGradient(w.x,w.y+k,w.x,w.y-k);break;case"to-left":i=t.createLinearGradient(w.x+E,w.y,w.x-E,w.y);break;case"to-right":i=t.createLinearGradient(w.x-E,w.y,w.x+E,w.y);break;case"to-bottom-right":case"to-right-bottom":i=t.createLinearGradient(w.x-E,w.y-k,w.x+E,w.y+k);break;case"to-top-right":case"to-right-top":i=t.createLinearGradient(w.x-E,w.y+k,w.x+E,w.y-k);break;case"to-bottom-left":case"to-left-bottom":i=t.createLinearGradient(w.x+E,w.y-k,w.x-E,w.y+k);break;case"to-top-left":case"to-left-top":i=t.createLinearGradient(w.x+E,w.y+k,w.x-E,w.y-k);break}}if(!i)return null;for(var S=u.length===l.length,N=l.length,D=0;D<N;D++)i.addColorStop(S?u[D]:D/(N-1),"rgba("+l[D][0]+","+l[D][1]+","+l[D][2]+","+a+")");return i},Gt.gradientFillStyle=function(t,e,r,n){var a=this.createGradientStyleFor(t,"background",e,r,n);if(!a)return null;t.fillStyle=a},Gt.colorFillStyle=function(t,e,r,n,a){t.fillStyle="rgba("+e+","+r+","+n+","+a+")"},Gt.eleFillStyle=function(t,e,r){var n=e.pstyle("background-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientFillStyle(t,e,n,r);else{var a=e.pstyle("background-color").value;this.colorFillStyle(t,a[0],a[1],a[2],r)}},Gt.gradientStrokeStyle=function(t,e,r,n){var a=this.createGradientStyleFor(t,"line",e,r,n);if(!a)return null;t.strokeStyle=a},Gt.colorStrokeStyle=function(t,e,r,n,a){t.strokeStyle="rgba("+e+","+r+","+n+","+a+")"},Gt.eleStrokeStyle=function(t,e,r){var n=e.pstyle("line-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientStrokeStyle(t,e,n,r);else{var a=e.pstyle("line-color").value;this.colorStrokeStyle(t,a[0],a[1],a[2],r)}},Gt.matchCanvasSize=function(t){var e=this,r=e.data,n=e.findContainerClientCoords(),a=n[2],i=n[3],o=e.getPixelRatio(),l=e.motionBlurPxRatio;(t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]||t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG])&&(o=l);var u=a*o,c=i*o,d;if(!(u===e.canvasWidth&&c===e.canvasHeight)){e.fontCaches=null;var f=r.canvasContainer;f.style.width=a+"px",f.style.height=i+"px";for(var p=0;p<e.CANVAS_LAYERS;p++)d=r.canvases[p],d.width=u,d.height=c,d.style.width=a+"px",d.style.height=i+"px";for(var p=0;p<e.BUFFER_COUNT;p++)d=r.bufferCanvases[p],d.width=u,d.height=c,d.style.width=a+"px",d.style.height=i+"px";e.textureMult=1,o<=1&&(d=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,d.width=u*e.textureMult,d.height=c*e.textureMult),e.canvasWidth=u,e.canvasHeight=c}},Gt.renderTo=function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})},Gt.render=function(t){t=t||zh();var e=t.forcedContext,r=t.drawAllLayers,n=t.drawOnlyNodeLayer,a=t.forcedZoom,i=t.forcedPan,o=this,l=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,u=o.cy,c=o.data,d=c.canvasNeedsRedraw,f=o.textureOnViewport&&!e&&(o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming),p=t.motionBlur!==void 0?t.motionBlur:o.motionBlur,v=o.motionBlurPxRatio,h=u.hasCompoundNodes(),g=o.hoverData.draggingEles,y=!!(o.hoverData.selecting||o.touchData.selecting);p=p&&!e&&o.motionBlurEnabled&&!y;var m=p;e||(o.prevPxRatio!==l&&(o.invalidateContainerClientCoordsCache(),o.matchCanvasSize(o.container),o.redrawHint("eles",!0),o.redrawHint("drag",!0)),o.prevPxRatio=l),!e&&o.motionBlurTimeout&&clearTimeout(o.motionBlurTimeout),p&&(o.mbFrames==null&&(o.mbFrames=0),o.mbFrames++,o.mbFrames<3&&(m=!1),o.mbFrames>o.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!f&&(d[o.NODE]=!0,d[o.SELECT_BOX]=!0);var b=u.style(),w=u.zoom(),C=a!==void 0?a:w,x=u.pan(),E={x:x.x,y:x.y},k={zoom:w,pan:{x:x.x,y:x.y}},B=o.prevViewport,S=B===void 0||k.zoom!==B.zoom||k.pan.x!==B.pan.x||k.pan.y!==B.pan.y;!S&&!(g&&!h)&&(o.motionBlurPxRatio=1),i&&(E=i),C*=l,E.x*=l,E.y*=l;var N=o.getCachedZSortedEles();function D(ne,se,ue,pe,de){var me=ne.globalCompositeOperation;ne.globalCompositeOperation="destination-out",o.colorFillStyle(ne,255,255,255,o.motionBlurTransparency),ne.fillRect(se,ue,pe,de),ne.globalCompositeOperation=me}function P(ne,se){var ue,pe,de,me;!o.clearingMotionBlur&&(ne===c.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]||ne===c.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG])?(ue={x:x.x*v,y:x.y*v},pe=w*v,de=o.canvasWidth*v,me=o.canvasHeight*v):(ue=E,pe=C,de=o.canvasWidth,me=o.canvasHeight),ne.setTransform(1,0,0,1,0,0),se==="motionBlur"?D(ne,0,0,de,me):!e&&(se===void 0||se)&&ne.clearRect(0,0,de,me),r||(ne.translate(ue.x,ue.y),ne.scale(pe,pe)),i&&ne.translate(i.x,i.y),a&&ne.scale(a,a)}if(f||(o.textureDrawLastFrame=!1),f){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=u.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var F=o.data.bufferContexts[o.TEXTURE_BUFFER];F.setTransform(1,0,0,1,0,0),F.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:F,drawOnlyNodeLayer:!0,forcedPxRatio:l*o.textureMult});var k=o.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:o.canvasWidth,height:o.canvasHeight};k.mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}d[o.DRAG]=!1,d[o.NODE]=!1;var O=c.contexts[o.NODE],I=o.textureCache.texture,k=o.textureCache.viewport;O.setTransform(1,0,0,1,0,0),p?D(O,0,0,k.width,k.height):O.clearRect(0,0,k.width,k.height);var _=b.core("outside-texture-bg-color").value,M=b.core("outside-texture-bg-opacity").value;o.colorFillStyle(O,_[0],_[1],_[2],M),O.fillRect(0,0,k.width,k.height);var w=u.zoom();P(O,!1),O.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l),O.drawImage(I,k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l)}else o.textureOnViewport&&!e&&(o.textureCache=null);var L=u.extent(),R=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),H=o.hideEdgesOnViewport&&R,$=[];if($[o.NODE]=!d[o.NODE]&&p&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,$[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),$[o.DRAG]=!d[o.DRAG]&&p&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,$[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),d[o.NODE]||r||n||$[o.NODE]){var z=p&&!$[o.NODE]&&v!==1,O=e||(z?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:c.contexts[o.NODE]),j=p&&!z?"motionBlur":void 0;P(O,j),H?o.drawCachedNodes(O,N.nondrag,l,L):o.drawLayeredElements(O,N.nondrag,l,L),o.debug&&o.drawDebugPoints(O,N.nondrag),!r&&!p&&(d[o.NODE]=!1)}if(!n&&(d[o.DRAG]||r||$[o.DRAG])){var z=p&&!$[o.DRAG]&&v!==1,O=e||(z?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:c.contexts[o.DRAG]);P(O,p&&!z?"motionBlur":void 0),H?o.drawCachedNodes(O,N.drag,l,L):o.drawCachedElements(O,N.drag,l,L),o.debug&&o.drawDebugPoints(O,N.drag),!r&&!p&&(d[o.DRAG]=!1)}if(o.showFps||!n&&d[o.SELECT_BOX]&&!r){var O=e||c.contexts[o.SELECT_BOX];if(P(O),o.selection[4]==1&&(o.hoverData.selecting||o.touchData.selecting)){var w=o.cy.zoom(),ee=b.core("selection-box-border-width").value/w;O.lineWidth=ee,O.fillStyle="rgba("+b.core("selection-box-color").value[0]+","+b.core("selection-box-color").value[1]+","+b.core("selection-box-color").value[2]+","+b.core("selection-box-opacity").value+")",O.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),ee>0&&(O.strokeStyle="rgba("+b.core("selection-box-border-color").value[0]+","+b.core("selection-box-border-color").value[1]+","+b.core("selection-box-border-color").value[2]+","+b.core("selection-box-opacity").value+")",O.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(c.bgActivePosistion&&!o.hoverData.selecting){var w=o.cy.zoom(),J=c.bgActivePosistion;O.fillStyle="rgba("+b.core("active-bg-color").value[0]+","+b.core("active-bg-color").value[1]+","+b.core("active-bg-color").value[2]+","+b.core("active-bg-opacity").value+")",O.beginPath(),O.arc(J.x,J.y,b.core("active-bg-size").pfValue/w,0,2*Math.PI),O.fill()}var Z=o.lastRedrawTime;if(o.showFps&&Z){Z=Math.round(Z);var re=Math.round(1e3/Z);O.setTransform(1,0,0,1,0,0),O.fillStyle="rgba(255, 0, 0, 0.75)",O.strokeStyle="rgba(255, 0, 0, 0.75)",O.lineWidth=1,O.fillText("1 frame = "+Z+" ms = "+re+" fps",0,20);var Y=60;O.strokeRect(0,30,250,20),O.fillRect(0,30,250*Math.min(re/Y,1),20)}r||(d[o.SELECT_BOX]=!1)}if(p&&v!==1){var A=c.contexts[o.NODE],K=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],W=c.contexts[o.DRAG],oe=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],he=function(se,ue,pe){se.setTransform(1,0,0,1,0,0),pe||!m?se.clearRect(0,0,o.canvasWidth,o.canvasHeight):D(se,0,0,o.canvasWidth,o.canvasHeight);var de=v;se.drawImage(ue,0,0,o.canvasWidth*de,o.canvasHeight*de,0,0,o.canvasWidth,o.canvasHeight)};(d[o.NODE]||$[o.NODE])&&(he(A,K,$[o.NODE]),d[o.NODE]=!1),(d[o.DRAG]||$[o.DRAG])&&(he(W,oe,$[o.DRAG]),d[o.DRAG]=!1)}o.prevViewport=k,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),p&&(o.motionBlurTimeout=setTimeout(function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!f,o.mbFrames=0,d[o.NODE]=!0,d[o.DRAG]=!0,o.redraw()},kP)),e||u.emit("render")};var gn={};gn.drawPolygonPath=function(t,e,r,n,a,i){var o=n/2,l=a/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*i[0],r+l*i[1]);for(var u=1;u<i.length/2;u++)t.lineTo(e+o*i[u*2],r+l*i[u*2+1]);t.closePath()},gn.drawRoundPolygonPath=function(t,e,r,n,a,i,o){o.forEach(function(l){return Fv(t,l)}),t.closePath()},gn.drawRoundRectanglePath=function(t,e,r,n,a,i){var o=n/2,l=a/2,u=i==="auto"?Vn(n,a):Math.min(i,l,o);t.beginPath&&t.beginPath(),t.moveTo(e,r-l),t.arcTo(e+o,r-l,e+o,r,u),t.arcTo(e+o,r+l,e,r+l,u),t.arcTo(e-o,r+l,e-o,r,u),t.arcTo(e-o,r-l,e,r-l,u),t.lineTo(e,r-l),t.closePath()},gn.drawBottomRoundRectanglePath=function(t,e,r,n,a,i){var o=n/2,l=a/2,u=i==="auto"?Vn(n,a):i;t.beginPath&&t.beginPath(),t.moveTo(e,r-l),t.lineTo(e+o,r-l),t.lineTo(e+o,r),t.arcTo(e+o,r+l,e,r+l,u),t.arcTo(e-o,r+l,e-o,r,u),t.lineTo(e-o,r-l),t.lineTo(e,r-l),t.closePath()},gn.drawCutRectanglePath=function(t,e,r,n,a,i,o){var l=n/2,u=a/2,c=o==="auto"?Ql():o;t.beginPath&&t.beginPath(),t.moveTo(e-l+c,r-u),t.lineTo(e+l-c,r-u),t.lineTo(e+l,r-u+c),t.lineTo(e+l,r+u-c),t.lineTo(e+l-c,r+u),t.lineTo(e-l+c,r+u),t.lineTo(e-l,r+u-c),t.lineTo(e-l,r-u+c),t.closePath()},gn.drawBarrelPath=function(t,e,r,n,a){var i=n/2,o=a/2,l=e-i,u=e+i,c=r-o,d=r+o,f=Jl(n,a),p=f.widthOffset,v=f.heightOffset,h=f.ctrlPtOffsetPct*p;t.beginPath&&t.beginPath(),t.moveTo(l,c+v),t.lineTo(l,d-v),t.quadraticCurveTo(l+h,d,l+p,d),t.lineTo(u-p,d),t.quadraticCurveTo(u-h,d,u,d-v),t.lineTo(u,c+v),t.quadraticCurveTo(u-h,c,u-p,c),t.lineTo(l+p,c),t.quadraticCurveTo(l+h,c,l,c+v),t.closePath()};for(var eg=Math.sin(0),tg=Math.cos(0),Lc={},Mc={},rg=Math.PI/40,$a=0*Math.PI;$a<2*Math.PI;$a+=rg)Lc[$a]=Math.sin($a),Mc[$a]=Math.cos($a);gn.drawEllipsePath=function(t,e,r,n,a){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,a/2,0,0,2*Math.PI);else for(var i,o,l=n/2,u=a/2,c=0*Math.PI;c<2*Math.PI;c+=rg)i=e-l*Lc[c]*eg+l*Mc[c]*tg,o=r+u*Mc[c]*eg+u*Lc[c]*tg,c===0?t.moveTo(i,o):t.lineTo(i,o);t.closePath()};var Ui={};Ui.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]},Ui.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),n=r.boundingBox(),a=this.findContainerClientCoords(),i=t.full?Math.ceil(n.w):a[2],o=t.full?Math.ceil(n.h):a[3],l=le(t.maxWidth)||le(t.maxHeight),u=this.getPixelRatio(),c=1;if(t.scale!==void 0)i*=t.scale,o*=t.scale,c=t.scale;else if(l){var d=1/0,f=1/0;le(t.maxWidth)&&(d=c*t.maxWidth/i),le(t.maxHeight)&&(f=c*t.maxHeight/o),c=Math.min(d,f),i*=c,o*=c}l||(i*=u,o*=u,c*=u);var p=document.createElement("canvas");p.width=i,p.height=o,p.style.width=i+"px",p.style.height=o+"px";var v=p.getContext("2d");if(i>0&&o>0){v.clearRect(0,0,i,o),v.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(t.full)v.translate(-n.x1*c,-n.y1*c),v.scale(c,c),this.drawElements(v,h),v.scale(1/c,1/c),v.translate(n.x1*c,n.y1*c);else{var g=e.pan(),y={x:g.x*c,y:g.y*c};c*=e.zoom(),v.translate(y.x,y.y),v.scale(c,c),this.drawElements(v,h),v.scale(1/c,1/c),v.translate(-y.x,-y.y)}t.bg&&(v.globalCompositeOperation="destination-over",v.fillStyle=t.bg,v.rect(0,0,i,o),v.fill())}return p};function xP(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),a=new Uint8Array(n),i=0;i<r.length;i++)a[i]=r.charCodeAt(i);return new Blob([n],{type:e})}function ng(t){var e=t.indexOf(",");return t.substr(e+1)}function ag(t,e,r){var n=function(){return e.toDataURL(r,t.quality)};switch(t.output){case"blob-promise":return new xa(function(a,i){try{e.toBlob(function(o){o!=null?a(o):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(o){i(o)}});case"blob":return xP(ng(n()),r);case"base64":return ng(n());case"base64uri":default:return n()}}Ui.png=function(t){return ag(t,this.bufferCanvasImage(t),"image/png")},Ui.jpg=function(t){return ag(t,this.bufferCanvasImage(t),"image/jpeg")};var ig={};ig.nodeShapeImpl=function(t,e,r,n,a,i,o,l){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,a,i);case"polygon":return this.drawPolygonPath(e,r,n,a,i,o);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,a,i,o,l);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,a,i,l);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,a,i,o,l);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,a,i,l);case"barrel":return this.drawBarrelPath(e,r,n,a,i)}};var EP=og,Me=og.prototype;Me.CANVAS_LAYERS=3,Me.SELECT_BOX=0,Me.DRAG=1,Me.NODE=2,Me.BUFFER_COUNT=3,Me.TEXTURE_BUFFER=0,Me.MOTIONBLUR_BUFFER_NODE=1,Me.MOTIONBLUR_BUFFER_DRAG=2;function og(t){var e=this,r=e.cy.window(),n=r.document;e.data={canvases:new Array(Me.CANVAS_LAYERS),contexts:new Array(Me.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Me.CANVAS_LAYERS),bufferCanvases:new Array(Me.BUFFER_COUNT),bufferContexts:new Array(Me.CANVAS_LAYERS)};var a="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var o=e.data.canvasContainer.style;e.data.canvasContainer.style[a]=i,o.position="relative",o.zIndex="0",o.overflow="hidden";var l=t.cy.container();l.appendChild(e.data.canvasContainer),l.style[a]=i;var u={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};dT()&&(u["-ms-touch-action"]="none",u["touch-action"]="none");for(var c=0;c<Me.CANVAS_LAYERS;c++){var d=e.data.canvases[c]=n.createElement("canvas");e.data.contexts[c]=d.getContext("2d"),Object.keys(u).forEach(function(Y){d.style[Y]=u[Y]}),d.style.position="absolute",d.setAttribute("data-id","layer"+c),d.style.zIndex=String(Me.CANVAS_LAYERS-c),e.data.canvasContainer.appendChild(d),e.data.canvasNeedsRedraw[c]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[Me.NODE].setAttribute("data-id","layer"+Me.NODE+"-node"),e.data.canvases[Me.SELECT_BOX].setAttribute("data-id","layer"+Me.SELECT_BOX+"-selectbox"),e.data.canvases[Me.DRAG].setAttribute("data-id","layer"+Me.DRAG+"-drag");for(var c=0;c<Me.BUFFER_COUNT;c++)e.data.bufferCanvases[c]=n.createElement("canvas"),e.data.bufferContexts[c]=e.data.bufferCanvases[c].getContext("2d"),e.data.bufferCanvases[c].style.position="absolute",e.data.bufferCanvases[c].setAttribute("data-id","buffer"+c),e.data.bufferCanvases[c].style.zIndex=String(-c-1),e.data.bufferCanvases[c].style.visibility="hidden";e.pathsEnabled=!0;var f=zt(),p=function(A){return{x:(A.x1+A.x2)/2,y:(A.y1+A.y2)/2}},v=function(A){return{x:-A.w/2,y:-A.h/2}},h=function(A){var K=A[0]._private,W=K.oldBackgroundTimestamp===K.backgroundTimestamp;return!W},g=function(A){return A[0]._private.nodeKey},y=function(A){return A[0]._private.labelStyleKey},m=function(A){return A[0]._private.sourceLabelStyleKey},b=function(A){return A[0]._private.targetLabelStyleKey},w=function(A,K,W,oe,he){return e.drawElement(A,K,W,!1,!1,he)},C=function(A,K,W,oe,he){return e.drawElementText(A,K,W,oe,"main",he)},x=function(A,K,W,oe,he){return e.drawElementText(A,K,W,oe,"source",he)},E=function(A,K,W,oe,he){return e.drawElementText(A,K,W,oe,"target",he)},k=function(A){return A.boundingBox(),A[0]._private.bodyBounds},B=function(A){return A.boundingBox(),A[0]._private.labelBounds.main||f},S=function(A){return A.boundingBox(),A[0]._private.labelBounds.source||f},N=function(A){return A.boundingBox(),A[0]._private.labelBounds.target||f},D=function(A,K){return K},P=function(A){return p(k(A))},F=function(A,K,W){var oe=A?A+"-":"";return{x:K.x+W.pstyle(oe+"text-margin-x").pfValue,y:K.y+W.pstyle(oe+"text-margin-y").pfValue}},O=function(A,K,W){var oe=A[0]._private.rscratch;return{x:oe[K],y:oe[W]}},I=function(A){return F("",O(A,"labelX","labelY"),A)},_=function(A){return F("source",O(A,"sourceLabelX","sourceLabelY"),A)},M=function(A){return F("target",O(A,"targetLabelX","targetLabelY"),A)},L=function(A){return v(k(A))},R=function(A){return v(S(A))},H=function(A){return v(N(A))},$=function(A){var K=B(A),W=v(B(A));if(A.isNode()){switch(A.pstyle("text-halign").value){case"left":W.x=-K.w;break;case"right":W.x=0;break}switch(A.pstyle("text-valign").value){case"top":W.y=-K.h;break;case"bottom":W.y=0;break}}return W},z=e.data.eleTxrCache=new Ki(e,{getKey:g,doesEleInvalidateKey:h,drawElement:w,getBoundingBox:k,getRotationPoint:P,getRotationOffset:L,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),j=e.data.lblTxrCache=new Ki(e,{getKey:y,drawElement:C,getBoundingBox:B,getRotationPoint:I,getRotationOffset:$,isVisible:D}),ee=e.data.slbTxrCache=new Ki(e,{getKey:m,drawElement:x,getBoundingBox:S,getRotationPoint:_,getRotationOffset:R,isVisible:D}),J=e.data.tlbTxrCache=new Ki(e,{getKey:b,drawElement:E,getBoundingBox:N,getRotationPoint:M,getRotationOffset:H,isVisible:D}),Z=e.data.lyrTxrCache=new Wv(e);e.onUpdateEleCalcs(function(A,K){z.invalidateElements(K),j.invalidateElements(K),ee.invalidateElements(K),J.invalidateElements(K),Z.invalidateElements(K);for(var W=0;W<K.length;W++){var oe=K[W]._private;oe.oldBackgroundTimestamp=oe.backgroundTimestamp}});var re=function(A){for(var K=0;K<A.length;K++)Z.enqueueElementRefinement(A[K].ele)};z.onDequeue(re),j.onDequeue(re),ee.onDequeue(re),J.onDequeue(re)}Me.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Me.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Me.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Me.SELECT_BOX]=e;break}};var SP=typeof Path2D<"u";Me.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t},Me.usePaths=function(){return SP&&this.pathsEnabled},Me.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)},Me.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},Me.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":ot(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),a=n.document;r=a.createElement("canvas"),r.width=t,r.height=e}return r},[Yv,Sr,Kr,_c,Wn,Va,Gt,gn,Ui,ig].forEach(function(t){xe(Me,t)});var TP=[{name:"null",impl:Ev},{name:"base",impl:Kv},{name:"canvas",impl:EP}],BP=[{type:"layout",extensions:FD},{type:"renderer",extensions:TP}],sg={},lg={};function cg(t,e,r){var n=r,a=function(B){Ae("Can not register `"+e+"` for `"+t+"` since `"+B+"` already exists in the prototype and can not be overridden")};if(t==="core"){if($i.prototype[e])return a(e);$i.prototype[e]=r}else if(t==="collection"){if(kt.prototype[e])return a(e);kt.prototype[e]=r}else if(t==="layout"){for(var i=function(B){this.options=B,r.call(this,B),_e(this._private)||(this._private={}),this._private.cy=B.cy,this._private.listeners=[],this.createEmitter()},o=i.prototype=Object.create(r.prototype),l=[],u=0;u<l.length;u++){var c=l[u];o[c]=o[c]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var d=r.prototype.stop;o.stop=function(){var k=this.options;if(k&&k.animate){var B=this.animations;if(B)for(var S=0;S<B.length;S++)B[S].stop()}return d?d.call(this):this.emit("layoutstop"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var f=function(B){return B._private.cy},p={addEventFields:function(B,S){S.layout=B,S.cy=f(B),S.target=B},bubble:function(){return!0},parent:function(B){return f(B)}};xe(o,{createEmitter:function(){return this._private.emitter=new rs(p,this),this},emitter:function(){return this._private.emitter},on:function(B,S){return this.emitter().on(B,S),this},one:function(B,S){return this.emitter().one(B,S),this},once:function(B,S){return this.emitter().one(B,S),this},removeListener:function(B,S){return this.emitter().removeListener(B,S),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(B,S){return this.emitter().emit(B,S),this}}),Re.eventAliasesOn(o),n=i}else if(t==="renderer"&&e!=="null"&&e!=="base"){var v=ug("renderer","base"),h=v.prototype,g=r,y=r.prototype,m=function(){v.apply(this,arguments),g.apply(this,arguments)},b=m.prototype;for(var w in h){var C=h[w],x=y[w]!=null;if(x)return a(w);b[w]=C}for(var E in y)b[E]=y[E];h.clientFunctions.forEach(function(k){b[k]=b[k]||function(){Xe("Renderer does not implement `renderer."+k+"()` on its prototype")}}),n=m}else if(t==="__proto__"||t==="constructor"||t==="prototype")return Xe(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return Sh({map:sg,keys:[t,e],value:n})}function ug(t,e){return Th({map:sg,keys:[t,e]})}function NP(t,e,r,n,a){return Sh({map:lg,keys:[t,e,r,n],value:a})}function DP(t,e,r,n){return Th({map:lg,keys:[t,e,r,n]})}var Ic=function(){if(arguments.length===2)return ug.apply(null,arguments);if(arguments.length===3)return cg.apply(null,arguments);if(arguments.length===4)return DP.apply(null,arguments);if(arguments.length===5)return NP.apply(null,arguments);Xe("Invalid extension access syntax")};$i.prototype.extension=Ic,BP.forEach(function(t){t.extensions.forEach(function(e){cg(t.type,e.name,e.impl)})});var dg=function t(){if(!(this instanceof t))return new t;this.length=0},jn=dg.prototype;jn.instanceString=function(){return"stylesheet"},jn.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this},jn.css=function(t,e){var r=this.length-1;if(be(t))this[r].properties.push({name:t,value:e});else if(_e(t))for(var n=t,a=Object.keys(n),i=0;i<a.length;i++){var o=a[i],l=n[o];if(l!=null){var u=Nt.properties[o]||Nt.properties[Po(o)];if(u!=null){var c=u.name,d=l;this[r].properties.push({name:c,value:d})}}}return this},jn.style=jn.css,jn.generateStyle=function(t){var e=new Nt(t);return this.appendToStyle(e)},jn.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,a=r.properties;t.selector(n);for(var i=0;i<a.length;i++){var o=a[i];t.css(o.name,o.value)}}return t};var PP="3.30.2",Yn=function(e){if(e===void 0&&(e={}),_e(e))return new $i(e);if(be(e))return Ic.apply(Ic,arguments)};Yn.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Yn),t.apply(null,e),this},Yn.warnings=function(t){return Vh(t)},Yn.version=PP,Yn.stylesheet=Yn.Stylesheet=dg;let OP=class{constructor(e,r){Br(this,"cy",null);Br(this,"nodes",[]);Br(this,"edges",[]);Br(this,"axons",[]);Br(this,"dendrites",[]);Br(this,"labelCache",new Map);Br(this,"graphCanvas",null);this.labelCache=e,this.graphCanvas=r}async addConnectivity(e){if(this.axons=e.axons.map(r=>JSON.stringify(r)),this.dendrites=e.dendrites.map(r=>JSON.stringify(r)),e.connectivity.length)for(const r of e.connectivity){const n=await this.graphNode(r[0]),a=await this.graphNode(r[1]);this.nodes.push(n),this.nodes.push(a),this.edges.push({id:`${n.id}_${a.id}`,source:n.id,target:a.id})}else this.nodes.push({id:"MISSING",label:"NO PATHS"})}showConnectivity(e){this.cy=new FP(this,e)}clearConnectivity(){this.cy&&(this.cy.remove(),this.cy=null)}reset(){var e;(e=this.cy)!=null&&e.cy&&this.cy.cy.reset()}enableZoom(e){var r;(r=this.cy)!=null&&r.cy&&this.cy.cy.userZoomingEnabled(e)}get elements(){return[...this.nodes.map(e=>({data:e})),...this.edges.map(e=>({data:e}))]}get roots(){return this.dendrites}async graphNode(e){const r=JSON.stringify(e),n=[e[0],...e[1]],a=[];for(const o of n){const l=this.labelCache.has(o)?this.labelCache.get(o):"";a.push(l)}n.push(...a);const i={id:r,label:n.join(`
448
- `)};return this.axons.includes(r)?this.dendrites.includes(r)?i["both-a-d"]=!0:i.axon=!0:this.dendrites.includes(r)&&(i.dendrite=!0),i}};const _P=[{selector:"node",style:{label:"data(label)","background-color":"#80F0F0","text-valign":"center","text-wrap":"wrap","text-max-width":"80px","font-size":"6px"}},{selector:"node[axon]",style:{"background-color":"green"}},{selector:"node[dendrite]",style:{"background-color":"red"}},{selector:"node[both-a-d]",style:{"background-color":"gray"}},{selector:"edge",style:{width:2,"line-color":"#9dbaea","target-arrow-color":"#9dbaea","target-arrow-shape":"triangle","curve-style":"bezier"}}];class FP{constructor(e,r){Br(this,"cy");Br(this,"tooltip");var n,a;this.cy=Yn({container:r,elements:e.elements,layout:{name:"breadthfirst",circle:!1,roots:e.roots},directed:!0,style:_P,minZoom:.5,maxZoom:10,wheelSensitivity:.4}).on("mouseover","node",this.overNode.bind(this)).on("mouseout","node",this.exitNode.bind(this)).on("position","node",this.moveNode.bind(this)),this.tooltip=document.createElement("div"),this.tooltip.id="tooltip",this.tooltip.hidden=!0,(a=(n=this.graphCanvas)==null?void 0:n.lastChild)==null||a.appendChild(this.tooltip)}remove(){this.cy&&this.cy.destroy()}checkRightBoundary(e){var r;e+this.tooltip.offsetWidth>=((r=this.tooltip.parentElement)==null?void 0:r.offsetWidth)&&(this.tooltip.style.left=`${e-this.tooltip.offsetWidth}px`)}overNode(e){const r=e.target;this.tooltip.innerText=r.data().label,this.tooltip.style.left=`${e.renderedPosition.x}px`,this.tooltip.style.top=`${e.renderedPosition.y}px`,this.tooltip.hidden=!1,this.checkRightBoundary(e.renderedPosition.x)}moveNode(e){const r=e.target;this.tooltip.style.left=`${r.renderedPosition().x}px`,this.tooltip.style.top=`${r.renderedPosition().y}px`,this.checkRightBoundary(r.renderedPosition().x)}exitNode(e){this.tooltip.hidden=!0}}const LP=1.3,MP="Reset position",fg="Lock zoom (to scroll)",IP="Unlock zoom",AP="#8300bf",RP={name:"ConnectivityGraph",props:{entry:{type:String,default:""},mapServer:{type:String,default:""}},data:function(){return{cy:null,connectivityGraph:null,knowledgeByPath:new Map,labelledTerms:new Set,labelCache:new Map,resetLabel:MP,zoomLockLabel:fg,iconColor:AP,zoomEnabled:!1}},mounted(){this.run().then(t=>{this.showGraph(this.entry)})},methods:{run:async function(){if(await this.getSchemaVersion()<LP){console.warn("No Server!");return}this.showSpinner();const e=await this.setSourceList();await this.setPathList(e),this.hideSpinner()},showGraph:async function(t){const e=this.$refs.graphCanvas;this.showSpinner(),this.connectivityGraph=new OP(this.labelCache,e),await this.connectivityGraph.addConnectivity(this.knowledgeByPath.get(t)),this.hideSpinner(),this.connectivityGraph.showConnectivity(e),this.currentPath=t},query:async function(t,e){const r=`${this.mapServer}knowledge/query/`,n={sql:t,params:e};try{const a=await fetch(r,{method:"POST",headers:{Accept:"application/json; charset=utf-8","Cache-Control":"no-store","Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok)throw new Error(`Cannot access ${r}`);return await a.json()}catch{return{values:[]}}},setSourceList:async function(){const t=await this.getJsonData(`${this.mapServer}knowledge/sources`),e=t?t.sources||[]:[];let r="";for(const n of e)n&&r===""&&(r=n);return r},setPathList:async function(t){const e=await this.query(`select entity, knowledge from knowledge
444
+ */var Wp=function(e,r){this.recycle(e,r)};function Mi(){return!1}function ts(){return!0}Wp.prototype={instanceString:function(){return"event"},recycle:function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=Mi,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?ts:Mi):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var n=this.position,a=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:n.x*a+i.x,y:n.y*a+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=ts;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=ts;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ts,this.stopPropagation()},isDefaultPrevented:Mi,isPropagationStopped:Mi,isImmediatePropagationStopped:Mi};var jp=/^([^.]+)(\.(?:[^.]+))?$/,RD=".*",Yp={qualifierCompare:function(e,r){return e===r},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},Xp=Object.keys(Yp),$D={};function rs(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$D,e=arguments.length>1?arguments[1]:void 0,r=0;r<Xp.length;r++){var n=Xp[r];this[n]=t[n]||Yp[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}var pn=rs.prototype,Zp=function(e,r,n,a,i,o,l){Ye(a)&&(i=a,a=null),l&&(o==null?o=l:o=xe({},o,l));for(var u=He(n)?n:n.split(/\s+/),c=0;c<u.length;c++){var d=u[c];if(!nn(d)){var f=d.match(jp);if(f){var p=f[1],v=f[2]?f[2]:null,h=r(e,d,p,v,a,i,o);if(h===!1)break}}}},Qp=function(e,r){return e.addEventFields(e.context,r),new Wp(r.type,r)},zD=function(e,r,n){if(sT(n)){r(e,n);return}else if(_e(n)){r(e,Qp(e,n));return}for(var a=He(n)?n:n.split(/\s+/),i=0;i<a.length;i++){var o=a[i];if(!nn(o)){var l=o.match(jp);if(l){var u=l[1],c=l[2]?l[2]:null,d=Qp(e,{type:u,namespace:c,target:e.context});r(e,d)}}}};pn.on=pn.addListener=function(t,e,r,n,a){return Zp(this,function(i,o,l,u,c,d,f){Ye(d)&&i.listeners.push({event:o,callback:d,type:l,namespace:u,qualifier:c,conf:f})},t,e,r,n,a),this},pn.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0})},pn.removeListener=pn.off=function(t,e,r,n){var a=this;this.emitting!==0&&(this.listeners=gB(this.listeners));for(var i=this.listeners,o=function(c){var d=i[c];Zp(a,function(f,p,v,h,g,y){if((d.type===v||t==="*")&&(!h&&d.namespace!==".*"||d.namespace===h)&&(!g||f.qualifierCompare(d.qualifier,g))&&(!y||d.callback===y))return i.splice(c,1),!1},t,e,r,n)},l=i.length-1;l>=0;l--)o(l);return this},pn.removeAllListeners=function(){return this.removeListener("*")},pn.emit=pn.trigger=function(t,e,r){var n=this.listeners,a=n.length;return this.emitting++,He(e)||(e=[e]),zD(this,function(i,o){r!=null&&(n=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],a=n.length);for(var l=function(d){var f=n[d];if(f.type===o.type&&(!f.namespace||f.namespace===o.namespace||f.namespace===RD)&&i.eventMatches(i.context,f,o)){var p=[o];e!=null&&yB(p,e),i.beforeEmit(i.context,f,o),f.conf&&f.conf.one&&(i.listeners=i.listeners.filter(function(g){return g!==f}));var v=i.callbackContext(i.context,f,o),h=f.callback.apply(v,p);i.afterEmit(i.context,f,o),h===!1&&(o.stopPropagation(),o.preventDefault())}},u=0;u<a;u++)l(u);i.bubble(i.context)&&!o.isPropagationStopped()&&i.parent(i.context).emit(o,e)},t),this.emitting--,this};var HD={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var a=r.qualifier;return a!=null?e!==n.target&&vi(n.target)&&a.matches(n.target):!0},addEventFields:function(e,r){r.cy=e.cy(),r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e},beforeEmit:function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},ns=function(e){return be(e)?new un(e):e},Jp={createEmitter:function(){for(var e=0;e<this.length;e++){var r=this[e],n=r._private;n.emitter||(n.emitter=new rs(HD,r))}return this},emitter:function(){return this._private.emitter},on:function(e,r,n){for(var a=ns(r),i=0;i<this.length;i++){var o=this[i];o.emitter().on(e,a,n)}return this},removeListener:function(e,r,n){for(var a=ns(r),i=0;i<this.length;i++){var o=this[i];o.emitter().removeListener(e,a,n)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners()}return this},one:function(e,r,n){for(var a=ns(r),i=0;i<this.length;i++){var o=this[i];o.emitter().one(e,a,n)}return this},once:function(e,r,n){for(var a=ns(r),i=0;i<this.length;i++){var o=this[i];o.emitter().on(e,a,n,{once:!0,onceCollection:this})}},emit:function(e,r){for(var n=0;n<this.length;n++){var a=this[n];a.emitter().emit(e,r)}return this},emitAndNotify:function(e,r){if(this.length!==0)return this.cy().notify(e,this),this.emit(e,r),this}};Ve.eventAliasesOn(Jp);var ev={nodes:function(e){return this.filter(function(r){return r.isNode()}).filter(e)},edges:function(e){return this.filter(function(r){return r.isEdge()}).filter(e)},byGroup:function(){for(var e=this.spawn(),r=this.spawn(),n=0;n<this.length;n++){var a=this[n];a.isNode()?e.push(a):r.push(a)}return{nodes:e,edges:r}},filter:function(e,r){if(e===void 0)return this;if(be(e)||Ut(e))return new un(e).filter(this);if(Ye(e)){for(var n=this.spawn(),a=this,i=0;i<a.length;i++){var o=a[i],l=r?e.apply(r,[o,i,a]):e(o,i,a);l&&n.push(o)}return n}return this.spawn()},not:function(e){if(e){be(e)&&(e=this.filter(e));for(var r=this.spawn(),n=0;n<this.length;n++){var a=this[n],i=e.has(a);i||r.push(a)}return r}else return this},absoluteComplement:function(){var e=this.cy();return e.mutableElements().not(this)},intersect:function(e){if(be(e)){var r=e;return this.filter(r)}for(var n=this.spawn(),a=this,i=e,o=this.length<e.length,l=o?a:i,u=o?i:a,c=0;c<l.length;c++){var d=l[c];u.has(d)&&n.push(d)}return n},xor:function(e){var r=this._private.cy;be(e)&&(e=r.$(e));var n=this.spawn(),a=this,i=e,o=function(u,c){for(var d=0;d<u.length;d++){var f=u[d],p=f._private.data.id,v=c.hasElementWithId(p);v||n.push(f)}};return o(a,i),o(i,a),n},diff:function(e){var r=this._private.cy;be(e)&&(e=r.$(e));var n=this.spawn(),a=this.spawn(),i=this.spawn(),o=this,l=e,u=function(d,f,p){for(var v=0;v<d.length;v++){var h=d[v],g=h._private.data.id,y=f.hasElementWithId(g);y?i.merge(h):p.push(h)}};return u(o,l,n),u(l,o,a),{left:n,right:a,both:i}},add:function(e){var r=this._private.cy;if(!e)return this;if(be(e)){var n=e;e=r.mutableElements().filter(n)}for(var a=this.spawnSelf(),i=0;i<e.length;i++){var o=e[i],l=!this.has(o);l&&a.push(o)}return a},merge:function(e){var r=this._private,n=r.cy;if(!e)return this;if(e&&be(e)){var a=e;e=n.mutableElements().filter(a)}for(var i=r.map,o=0;o<e.length;o++){var l=e[o],u=l._private.data.id,c=!i.has(u);if(c){var d=this.length++;this[d]=l,i.set(u,{ele:l,index:d})}}return this},unmergeAt:function(e){var r=this[e],n=r.id(),a=this._private,i=a.map;this[e]=void 0,i.delete(n);var o=e===this.length-1;if(this.length>1&&!o){var l=this.length-1,u=this[l],c=u._private.data.id;this[l]=void 0,this[e]=u,i.set(c,{ele:u,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,n=e._private.data.id,a=r.map,i=a.get(n);if(!i)return this;var o=i.index;return this.unmergeAt(o),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&be(e)){var n=e;e=r.mutableElements().filter(n)}for(var a=0;a<e.length;a++)this.unmergeOne(e[a]);return this},unmergeBy:function(e){for(var r=this.length-1;r>=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},map:function(e,r){for(var n=[],a=this,i=0;i<a.length;i++){var o=a[i],l=r?e.apply(r,[o,i,a]):e(o,i,a);n.push(l)}return n},reduce:function(e,r){for(var n=r,a=this,i=0;i<a.length;i++)n=e(n,a[i],i,a);return n},max:function(e,r){for(var n=-1/0,a,i=this,o=0;o<i.length;o++){var l=i[o],u=r?e.apply(r,[l,o,i]):e(l,o,i);u>n&&(n=u,a=l)}return{value:n,ele:a}},min:function(e,r){for(var n=1/0,a,i=this,o=0;o<i.length;o++){var l=i[o],u=r?e.apply(r,[l,o,i]):e(l,o,i);u<n&&(n=u,a=l)}return{value:n,ele:a}}},Fe=ev;Fe.u=Fe["|"]=Fe["+"]=Fe.union=Fe.or=Fe.add,Fe["\\"]=Fe["!"]=Fe["-"]=Fe.difference=Fe.relativeComplement=Fe.subtract=Fe.not,Fe.n=Fe["&"]=Fe["."]=Fe.and=Fe.intersection=Fe.intersect,Fe["^"]=Fe["(+)"]=Fe["(-)"]=Fe.symmetricDifference=Fe.symdiff=Fe.xor,Fe.fnFilter=Fe.filterFn=Fe.stdFilter=Fe.filter,Fe.complement=Fe.abscomp=Fe.absoluteComplement;var KD={isNode:function(){return this.group()==="nodes"},isEdge:function(){return this.group()==="edges"},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},tv=function(e,r){var n=e.cy(),a=n.hasCompoundNodes();function i(d){var f=d.pstyle("z-compound-depth");return f.value==="auto"?a?d.zDepth():0:f.value==="bottom"?-1:f.value==="top"?Ul:0}var o=i(e)-i(r);if(o!==0)return o;function l(d){var f=d.pstyle("z-index-compare");return f.value==="auto"&&d.isNode()?1:0}var u=l(e)-l(r);if(u!==0)return u;var c=e.pstyle("z-index").value-r.pstyle("z-index").value;return c!==0?c:e.poolIndex()-r.poolIndex()},as={forEach:function(e,r){if(Ye(e))for(var n=this.length,a=0;a<n;a++){var i=this[a],o=r?e.apply(r,[i,a,this]):e(i,a,this);if(o===!1)break}return this},toArray:function(){for(var e=[],r=0;r<this.length;r++)e.push(this[r]);return e},slice:function(e,r){var n=[],a=this.length;r==null&&(r=a),e==null&&(e=0),e<0&&(e=a+e),r<0&&(r=a+r);for(var i=e;i>=0&&i<r&&i<a;i++)n.push(this[i]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return this.length===0},nonempty:function(){return!this.empty()},sort:function(e){if(!Ye(e))return this;var r=this.toArray().sort(e);return this.spawn(r)},sortByZIndex:function(){return this.sort(tv)},zDepth:function(){var e=this[0];if(e){var r=e._private,n=r.group;if(n==="nodes"){var a=r.data.parent?e.parents().size():0;return e.isParent()?a:Ul-1}else{var i=r.source,o=r.target,l=i.zDepth(),u=o.zDepth();return Math.max(l,u,0)}}}};as.each=as.forEach;var qD=function(){var e="undefined",r=(typeof Symbol>"u"?"undefined":ot(Symbol))!=e&&ot(Symbol.iterator)!=e;r&&(as[Symbol.iterator]=function(){var n=this,a={value:void 0,done:!1},i=0,o=this.length;return ph({next:function(){return i<o?a.value=n[i++]:(a.value=void 0,a.done=!0),a}},Symbol.iterator,function(){return this})})};qD();var UD=wt({nodeDimensionsIncludeLabels:!1}),is={layoutDimensions:function(e){e=UD(e);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();r={w:n.w,h:n.h}}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r},layoutPositions:function(e,r,n){var a=this.nodes().filter(function(x){return!x.isParent()}),i=this.cy(),o=r.eles,l=function(E){return E.id()},u=gi(n,l);e.emit({type:"layoutstart",layout:e}),e.animations=[];var c=function(E,k,B){var S={x:k.x1+k.w/2,y:k.y1+k.h/2},N={x:(B.x-S.x)*E,y:(B.y-S.y)*E};return{x:S.x+N.x,y:S.y+N.y}},d=r.spacingFactor&&r.spacingFactor!==1,f=function(){if(!d)return null;for(var E=zt(),k=0;k<a.length;k++){var B=a[k],S=u(B,k);GB(E,S.x,S.y)}return E},p=f(),v=gi(function(x,E){var k=u(x,E);if(d){var B=Math.abs(r.spacingFactor);k=c(B,p,k)}return r.transform!=null&&(k=r.transform(x,k)),k},l);if(r.animate){for(var h=0;h<a.length;h++){var g=a[h],y=v(g,h),m=r.animateFilter==null||r.animateFilter(g,h);if(m){var b=g.animation({position:y,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(b)}else g.position(y)}if(r.fit){var w=i.animation({fit:{boundingBox:o.boundingBoxAt(v),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});e.animations.push(w)}else if(r.zoom!==void 0&&r.pan!==void 0){var C=i.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(C)}e.animations.forEach(function(x){return x.play()}),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),xa.all(e.animations.map(function(x){return x.promise()})).then(function(){e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e})})}else a.positions(v),r.fit&&i.fit(r.eles,r.padding),r.zoom!=null&&i.zoom(r.zoom),r.pan&&i.pan(r.pan),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e});return this},layout:function(e){var r=this.cy();return r.makeLayout(xe({},e,{eles:this}))}};is.createLayout=is.makeLayout=is.layout;function rv(t,e,r){var n=r._private,a=n.styleCache=n.styleCache||[],i;return(i=a[t])!=null||(i=a[t]=e(r)),i}function os(t,e){return t=Mn(t),function(n){return rv(t,e,n)}}function ss(t,e){t=Mn(t);var r=function(a){return e.call(a)};return function(){var a=this[0];if(a)return rv(t,r,a)}}var Ct={recalculateRenderedStyle:function(e){var r=this.cy(),n=r.renderer(),a=r.styleEnabled();return n&&a&&n.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var e=this.cy(),r=function(i){return i._private.styleCache=null};if(e.hasCompoundNodes()){var n;n=this.spawnSelf().merge(this.descendants()).merge(this.parents()),n.merge(n.connectedEdges()),n.forEach(r)}else this.forEach(function(a){r(a),a.connectedEdges().forEach(r)});return this},updateStyle:function(e){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var n=r._private.batchStyleEles;return n.merge(this),this}var a=r.hasCompoundNodes(),i=this;e=!!(e||e===void 0),a&&(i=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var o=i;return e?o.emitAndNotify("style"):o.emit("style"),i.forEach(function(l){return l._private.styleDirty=!0}),this},cleanStyle:function(){var e=this.cy();if(e.styleEnabled())for(var r=0;r<this.length;r++){var n=this[r];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},parsedStyle:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],a=n.cy();if(a.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[e];return i??(r?a.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},style:function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var a=!1,i=n.style();if(_e(e)){var o=e;i.applyBypass(this,o,a),this.emitAndNotify("style")}else if(be(e))if(r===void 0){var l=this[0];return l?i.getStylePropertyValue(l,e):void 0}else i.applyBypass(this,e,r,a),this.emitAndNotify("style");else if(e===void 0){var u=this[0];return u?i.getRawStyle(u):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,a=r.style(),i=this;if(e===void 0)for(var o=0;o<i.length;o++){var l=i[o];a.removeAllBypasses(l,n)}else{e=e.split(/\s+/);for(var u=0;u<i.length;u++){var c=i[u];a.removeBypasses(c,e,n)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var r=e.hasCompoundNodes(),n=this[0];if(n){var a=n._private,i=n.pstyle("opacity").value;if(!r)return i;var o=a.data.parent?n.parents():null;if(o)for(var l=0;l<o.length;l++){var u=o[l],c=u.pstyle("opacity").value;i=c*i}return i}},transparent:function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0],n=r.cy().hasCompoundNodes();if(r)return n?r.effectiveOpacity()===0:r.pstyle("opacity").value===0},backgrounding:function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding}};function vc(t,e){var r=t._private,n=r.data.parent?t.parents():null;if(n)for(var a=0;a<n.length;a++){var i=n[a];if(!e(i))return!1}return!0}function gc(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,n=t.parentOk||t.ok;return function(){var a=this.cy();if(!a.styleEnabled())return!0;var i=this[0],o=a.hasCompoundNodes();if(i){var l=i._private;if(!e(i))return!1;if(i.isNode())return!o||vc(i,n);var u=l.source,c=l.target;return r(u)&&(!o||vc(u,r))&&(u===c||r(c)&&(!o||vc(c,r)))}}}var Oa=os("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});Ct.takesUpSpace=ss("takesUpSpace",gc({ok:Oa}));var GD=os("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&Oa(t)}),WD=os("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&Oa(t)});Ct.interactive=ss("interactive",gc({ok:GD,parentOk:WD,edgeOkViaNode:Oa})),Ct.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var jD=os("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&Oa(t)}),YD=Oa;Ct.visible=ss("visible",gc({ok:jD,edgeOkViaNode:YD})),Ct.hidden=function(){var t=this[0];if(t)return!t.visible()},Ct.isBundledBezier=ss("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1}),Ct.bypass=Ct.css=Ct.style,Ct.renderedCss=Ct.renderedStyle,Ct.removeBypass=Ct.removeCss=Ct.removeStyle,Ct.pstyle=Ct.parsedStyle;var vn={};function nv(t){return function(){var e=arguments,r=[];if(e.length===2){var n=e[0],a=e[1];this.on(t.event,n,a)}else if(e.length===1&&Ye(e[0])){var i=e[0];this.on(t.event,i)}else if(e.length===0||e.length===1&&He(e[0])){for(var o=e.length===1?e[0]:null,l=0;l<this.length;l++){var u=this[l],c=!t.ableField||u._private[t.ableField],d=u._private[t.field]!=t.value;if(t.overrideAble){var f=t.overrideAble(u);if(f!==void 0&&(c=f,!f))return this}c&&(u._private[t.field]=t.value,d&&r.push(u))}var p=this.spawn(r);p.updateStyle(),p.emit(t.event),o&&p.emit(o)}return this}}function _a(t){vn[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(r!==void 0)return r}return e._private[t.field]}},vn[t.on]=nv({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),vn[t.off]=nv({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}_a({field:"locked",overrideField:function(e){return e.cy().autolock()?!0:void 0},on:"lock",off:"unlock"}),_a({field:"grabbable",overrideField:function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0},on:"grabify",off:"ungrabify"}),_a({field:"selected",ableField:"selectable",overrideAble:function(e){return e.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"}),_a({field:"selectable",overrideField:function(e){return e.cy().autounselectify()?!1:void 0},on:"selectify",off:"unselectify"}),vn.deselect=vn.unselect,vn.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},_a({field:"active",on:"activate",off:"unactivate"}),_a({field:"pannable",on:"panify",off:"unpanify"}),vn.inactive=function(){var t=this[0];if(t)return!t._private.active};var Tt={},av=function(e){return function(n){for(var a=this,i=[],o=0;o<a.length;o++){var l=a[o];if(l.isNode()){for(var u=!1,c=l.connectedEdges(),d=0;d<c.length;d++){var f=c[d],p=f.source(),v=f.target();if(e.noIncomingEdges&&v===l&&p!==l||e.noOutgoingEdges&&p===l&&v!==l){u=!0;break}}u||i.push(l)}}return this.spawn(i,!0).filter(n)}},iv=function(e){return function(r){for(var n=this,a=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode())for(var l=o.connectedEdges(),u=0;u<l.length;u++){var c=l[u],d=c.source(),f=c.target();e.outgoing&&d===o?(a.push(c),a.push(f)):e.incoming&&f===o&&(a.push(c),a.push(d))}}return this.spawn(a,!0).filter(r)}},ov=function(e){return function(r){for(var n=this,a=[],i={};;){var o=e.outgoing?n.outgoers():n.incomers();if(o.length===0)break;for(var l=!1,u=0;u<o.length;u++){var c=o[u],d=c.id();i[d]||(i[d]=!0,a.push(c),l=!0)}if(!l)break;n=o}return this.spawn(a,!0).filter(r)}};Tt.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},xe(Tt,{roots:av({noIncomingEdges:!0}),leaves:av({noOutgoingEdges:!0}),outgoers:Qt(iv({outgoing:!0}),"outgoers"),successors:ov({outgoing:!0}),incomers:Qt(iv({incoming:!0}),"incomers"),predecessors:ov({incoming:!0})}),xe(Tt,{neighborhood:Qt(function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var a=r[n],i=a.connectedEdges(),o=0;o<i.length;o++){var l=i[o],u=l.source(),c=l.target(),d=a===u?c:u;d.length>0&&e.push(d[0]),e.push(l[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),Tt.neighbourhood=Tt.neighborhood,Tt.closedNeighbourhood=Tt.closedNeighborhood,Tt.openNeighbourhood=Tt.openNeighborhood,xe(Tt,{source:Qt(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"source"),target:Qt(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"target"),sources:sv({attr:"source"}),targets:sv({attr:"target"})});function sv(t){return function(r){for(var n=[],a=0;a<this.length;a++){var i=this[a],o=i._private[t.attr];o&&n.push(o)}return this.spawn(n,!0).filter(r)}}xe(Tt,{edgesWith:Qt(lv(),"edgesWith"),edgesTo:Qt(lv({thisIsSrc:!0}),"edgesTo")});function lv(t){return function(r){var n=[],a=this._private.cy,i=t||{};be(r)&&(r=a.$(r));for(var o=0;o<r.length;o++)for(var l=r[o]._private.edges,u=0;u<l.length;u++){var c=l[u],d=c._private.data,f=this.hasElementWithId(d.source)&&r.hasElementWithId(d.target),p=r.hasElementWithId(d.source)&&this.hasElementWithId(d.target),v=f||p;v&&((i.thisIsSrc||i.thisIsTgt)&&(i.thisIsSrc&&!f||i.thisIsTgt&&!p)||n.push(c))}return this.spawn(n,!0)}}xe(Tt,{connectedEdges:Qt(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var a=r[n];if(a.isNode())for(var i=a._private.edges,o=0;o<i.length;o++){var l=i[o];e.push(l)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:Qt(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var a=r[n];a.isEdge()&&(e.push(a.source()[0]),e.push(a.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:Qt(cv(),"parallelEdges"),codirectedEdges:Qt(cv({codirected:!0}),"codirectedEdges")});function cv(t){var e={codirected:!1};return t=xe({},e,t),function(n){for(var a=[],i=this.edges(),o=t,l=0;l<i.length;l++)for(var u=i[l],c=u._private,d=c.source,f=d._private.data.id,p=c.data.target,v=d._private.edges,h=0;h<v.length;h++){var g=v[h],y=g._private.data,m=y.target,b=y.source,w=m===p&&b===f,C=f===m&&p===b;(o.codirected&&w||!o.codirected&&(w||C))&&a.push(g)}return this.spawn(a,!0).filter(n)}}xe(Tt,{components:function(e){var r=this,n=r.cy(),a=n.collection(),i=e==null?r.nodes():e.nodes(),o=[];e!=null&&i.empty()&&(i=e.sources());var l=function(d,f){a.merge(d),i.unmerge(d),f.merge(d)};if(i.empty())return r.spawn();var u=function(){var d=n.collection();o.push(d);var f=i[0];l(f,d),r.bfs({directed:!1,roots:f,visit:function(v){return l(v,d)}}),d.forEach(function(p){p.connectedEdges().forEach(function(v){r.has(v)&&d.has(v.source())&&d.has(v.target())&&d.merge(v)})})};do u();while(i.length>0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),Tt.componentsOf=Tt.components;var kt=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Xe("A collection must have a reference to the core");return}var i=new wr,o=!1;if(!r)r=[];else if(r.length>0&&_e(r[0])&&!vi(r[0])){o=!0;for(var l=[],u=new ga,c=0,d=r.length;c<d;c++){var f=r[c];f.data==null&&(f.data={});var p=f.data;if(p.id==null)p.id=$h();else if(e.hasElementWithId(p.id)||u.has(p.id))continue;var v=new Io(e,f,!1);l.push(v),u.add(p.id)}r=l}this.length=0;for(var h=0,g=r.length;h<g;h++){var y=r[h][0];if(y!=null){var m=y._private.data.id;(!n||!i.has(m))&&(n&&i.set(m,{index:this.length,ele:y}),this[this.length]=y,this.length++)}}this._private={eles:this,cy:e,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(b){this.lazyMap=b},rebuildMap:function(){for(var w=this.lazyMap=new wr,C=this.eles,x=0;x<C.length;x++){var E=C[x];w.set(E.id(),{index:x,ele:E})}}},n&&(this._private.map=i),o&&!a&&this.restore()},qe=Io.prototype=kt.prototype=Object.create(Array.prototype);qe.instanceString=function(){return"collection"},qe.spawn=function(t,e){return new kt(this.cy(),t,e)},qe.spawnSelf=function(){return this.spawn(this)},qe.cy=function(){return this._private.cy},qe.renderer=function(){return this._private.cy.renderer()},qe.element=function(){return this[0]},qe.collection=function(){return wh(this)?this:new kt(this._private.cy,[this])},qe.unique=function(){return new kt(this._private.cy,this,!0)},qe.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)},qe.getElementById=function(t){t=""+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new kt(e)},qe.$id=qe.getElementById,qe.poolIndex=function(){var t=this._private.cy,e=t._private.elements,r=this[0]._private.data.id;return e._private.map.get(r).index},qe.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index},qe.indexOfId=function(t){return t=""+t,this._private.map.get(t).index},qe.json=function(t){var e=this.element(),r=this.cy();if(e==null&&t)return this;if(e!=null){var n=e._private;if(_e(t)){if(r.startBatch(),t.data){e.data(t.data);var a=n.data;if(e.isEdge()){var i=!1,o={},l=t.data.source,u=t.data.target;l!=null&&l!=a.source&&(o.source=""+l,i=!0),u!=null&&u!=a.target&&(o.target=""+u,i=!0),i&&(e=e.move(o))}else{var c="parent"in t.data,d=t.data.parent;c&&(d!=null||a.parent!=null)&&d!=a.parent&&(d===void 0&&(d=null),d!=null&&(d=""+d),e=e.move({parent:d}))}}t.position&&e.position(t.position);var f=function(g,y,m){var b=t[g];b!=null&&b!==n[g]&&(b?e[y]():e[m]())};return f("removed","remove","restore"),f("selected","select","unselect"),f("selectable","selectify","unselectify"),f("locked","lock","unlock"),f("grabbable","grabify","ungrabify"),f("pannable","panify","unpanify"),t.classes!=null&&e.classes(t.classes),r.endBatch(),this}else if(t===void 0){var p={data:br(n.data),position:br(n.position),group:n.group,removed:n.removed,selected:n.selected,selectable:n.selectable,locked:n.locked,grabbable:n.grabbable,pannable:n.pannable,classes:null};p.classes="";var v=0;return n.classes.forEach(function(h){return p.classes+=v++===0?h:" "+h}),p}}},qe.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e],n=r.json();t.push(n)}return t},qe.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r],a=n.json(),i=new Io(t,a,!1);e.push(i)}return new kt(t,e)},qe.copy=qe.clone,qe.restore=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),a=n._private,i=[],o=[],l,u=0,c=r.length;u<c;u++){var d=r[u];e&&!d.removed()||(d.isNode()?i.push(d):o.push(d))}l=i.concat(o);var f,p=function(){l.splice(f,1),f--};for(f=0;f<l.length;f++){var v=l[f],h=v._private,g=h.data;if(v.clearTraversalCache(),!(!e&&!h.removed)){if(g.id===void 0)g.id=$h();else if(le(g.id))g.id=""+g.id;else if(nn(g.id)||!be(g.id)){Xe("Can not create element with invalid string ID `"+g.id+"`"),p();continue}else if(n.hasElementWithId(g.id)){Xe("Can not create second element with ID `"+g.id+"`"),p();continue}}var y=g.id;if(v.isNode()){var m=h.position;m.x==null&&(m.x=0),m.y==null&&(m.y=0)}if(v.isEdge()){for(var b=v,w=["source","target"],C=w.length,x=!1,E=0;E<C;E++){var k=w[E],B=g[k];le(B)&&(B=g[k]=""+g[k]),B==null||B===""?(Xe("Can not create edge `"+y+"` with unspecified "+k),x=!0):n.hasElementWithId(B)||(Xe("Can not create edge `"+y+"` with nonexistant "+k+" `"+B+"`"),x=!0)}if(x){p();continue}var S=n.getElementById(g.source),N=n.getElementById(g.target);S.same(N)?S._private.edges.push(b):(S._private.edges.push(b),N._private.edges.push(b)),b._private.source=S,b._private.target=N}h.map=new wr,h.map.set(y,{ele:v,index:0}),h.removed=!1,e&&n.addToPool(v)}for(var D=0;D<i.length;D++){var P=i[D],L=P._private.data;le(L.parent)&&(L.parent=""+L.parent);var O=L.parent,I=O!=null;if(I||P._private.parent){var _=P._private.parent?n.collection().merge(P._private.parent):n.getElementById(O);if(_.empty())L.parent=void 0;else if(_[0].removed())Ae("Node added with missing parent, reference to parent removed"),L.parent=void 0,P._private.parent=null;else{for(var M=!1,F=_;!F.empty();){if(P.same(F)){M=!0,L.parent=void 0;break}F=F.parent()}M||(_[0]._private.children.push(P),P._private.parent=_[0],a.hasCompoundNodes=!0)}}}if(l.length>0){for(var V=l.length===r.length?r:new kt(n,l),H=0;H<V.length;H++){var $=V[H];$.isNode()||($.parallelEdges().clearTraversalCache(),$.source().clearTraversalCache(),$.target().clearTraversalCache())}var z;a.hasCompoundNodes?z=n.collection().merge(V).merge(V.connectedNodes()).merge(V.parent()):z=V,z.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?V.emitAndNotify("add"):e&&V.emit("add")}return r},qe.removed=function(){var t=this[0];return t&&t._private.removed},qe.inside=function(){var t=this[0];return t&&!t._private.removed},qe.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],a={},i=r._private.cy;function o(O){for(var I=O._private.edges,_=0;_<I.length;_++)u(I[_])}function l(O){for(var I=O._private.children,_=0;_<I.length;_++)u(I[_])}function u(O){var I=a[O.id()];e&&O.removed()||I||(a[O.id()]=!0,O.isNode()?(n.push(O),o(O),l(O)):n.unshift(O))}for(var c=0,d=r.length;c<d;c++){var f=r[c];u(f)}function p(O,I){var _=O._private.edges;on(_,I),O.clearTraversalCache()}function v(O){O.clearTraversalCache()}var h=[];h.ids={};function g(O,I){I=I[0],O=O[0];var _=O._private.children,M=O.id();on(_,I),I._private.parent=null,h.ids[M]||(h.ids[M]=!0,h.push(O))}r.dirtyCompoundBoundsCache(),e&&i.removeFromPool(n);for(var y=0;y<n.length;y++){var m=n[y];if(m.isEdge()){var b=m.source()[0],w=m.target()[0];p(b,m),p(w,m);for(var C=m.parallelEdges(),x=0;x<C.length;x++){var E=C[x];v(E),E.isBundledBezier()&&E.dirtyBoundingBoxCache()}}else{var k=m.parent();k.length!==0&&g(k,m)}e&&(m._private.removed=!0)}var B=i._private.elements;i._private.hasCompoundNodes=!1;for(var S=0;S<B.length;S++){var N=B[S];if(N.isParent()){i._private.hasCompoundNodes=!0;break}}var D=new kt(this.cy(),n);D.size()>0&&(t?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var P=0;P<h.length;P++){var L=h[P];(!e||!L.removed())&&L.updateStyle()}return D},qe.move=function(t){var e=this._private.cy,r=this,n=!1,a=!1,i=function(h){return h==null?h:""+h};if(t.source!==void 0||t.target!==void 0){var o=i(t.source),l=i(t.target),u=o!=null&&e.hasElementWithId(o),c=l!=null&&e.hasElementWithId(l);(u||c)&&(e.batch(function(){r.remove(n,a),r.emitAndNotify("moveout");for(var v=0;v<r.length;v++){var h=r[v],g=h._private.data;h.isEdge()&&(u&&(g.source=o),c&&(g.target=l))}r.restore(n,a)}),r.emitAndNotify("move"))}else if(t.parent!==void 0){var d=i(t.parent),f=d===null||e.hasElementWithId(d);if(f){var p=d===null?void 0:d;e.batch(function(){var v=r.remove(n,a);v.emitAndNotify("moveout");for(var h=0;h<r.length;h++){var g=r[h],y=g._private.data;g.isNode()&&(y.parent=p)}v.restore(n,a)}),r.emitAndNotify("move")}}return this},[hp,oD,Qo,fn,Na,kD,Jo,VD,Jp,ev,KD,as,is,Ct,vn,Tt].forEach(function(t){xe(qe,t)});var XD={add:function(e){var r,n=this;if(Ut(e)){var a=e;if(a._private.cy===n)r=a.restore();else{for(var i=[],o=0;o<a.length;o++){var l=a[o];i.push(l.json())}r=new kt(n,i)}}else if(He(e)){var u=e;r=new kt(n,u)}else if(_e(e)&&(He(e.nodes)||He(e.edges))){for(var c=e,d=[],f=["nodes","edges"],p=0,v=f.length;p<v;p++){var h=f[p],g=c[h];if(He(g))for(var y=0,m=g.length;y<m;y++){var b=xe({group:h},g[y]);d.push(b)}}r=new kt(n,d)}else{var w=e;r=new Io(n,w).collection()}return r},remove:function(e){if(!Ut(e)){if(be(e)){var r=e;e=this.$(r)}}return e.remove()}};/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */function ZD(t,e,r,n){var a=4,i=.001,o=1e-7,l=10,u=11,c=1/(u-1),d=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var f=0;f<4;++f)if(typeof arguments[f]!="number"||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var p=d?new Float32Array(u):new Array(u);function v(N,D){return 1-3*D+3*N}function h(N,D){return 3*D-6*N}function g(N){return 3*N}function y(N,D,P){return((v(D,P)*N+h(D,P))*N+g(D))*N}function m(N,D,P){return 3*v(D,P)*N*N+2*h(D,P)*N+g(D)}function b(N,D){for(var P=0;P<a;++P){var L=m(D,t,r);if(L===0)return D;var O=y(D,t,r)-N;D-=O/L}return D}function w(){for(var N=0;N<u;++N)p[N]=y(N*c,t,r)}function C(N,D,P){var L,O,I=0;do O=D+(P-D)/2,L=y(O,t,r)-N,L>0?P=O:D=O;while(Math.abs(L)>o&&++I<l);return O}function x(N){for(var D=0,P=1,L=u-1;P!==L&&p[P]<=N;++P)D+=c;--P;var O=(N-p[P])/(p[P+1]-p[P]),I=D+O*c,_=m(I,t,r);return _>=i?b(N,I):_===0?I:C(N,D,D+c)}var E=!1;function k(){E=!0,(t!==e||r!==n)&&w()}var B=function(D){return E||k(),t===e&&r===n?D:D===0?0:D===1?1:y(x(D),e,n)};B.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var S="generateBezier("+[t,e,r,n]+")";return B.toString=function(){return S},B}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var QD=function(){function t(n){return-n.tension*n.x-n.friction*n.v}function e(n,a,i){var o={x:n.x+i.dx*a,v:n.v+i.dv*a,tension:n.tension,friction:n.friction};return{dx:o.v,dv:t(o)}}function r(n,a){var i={dx:n.v,dv:t(n)},o=e(n,a*.5,i),l=e(n,a*.5,o),u=e(n,a,l),c=1/6*(i.dx+2*(o.dx+l.dx)+u.dx),d=1/6*(i.dv+2*(o.dv+l.dv)+u.dv);return n.x=n.x+c*a,n.v=n.v+d*a,n}return function n(a,i,o){var l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1/1e4,f=16/1e3,p,v,h;for(a=parseFloat(a)||500,i=parseFloat(i)||20,o=o||null,l.tension=a,l.friction=i,p=o!==null,p?(c=n(a,i),v=c/o*f):v=f;h=r(h||l,v),u.push(1+h.x),c+=16,Math.abs(h.x)>d&&Math.abs(h.v)>d;);return p?function(g){return u[g*(u.length-1)|0]}:c}}(),Ue=function(e,r,n,a){var i=ZD(e,r,n,a);return function(o,l,u){return o+(l-o)*i(u)}},ls={linear:function(e,r,n){return e+(r-e)*n},ease:Ue(.25,.1,.25,1),"ease-in":Ue(.42,0,1,1),"ease-out":Ue(0,0,.58,1),"ease-in-out":Ue(.42,0,.58,1),"ease-in-sine":Ue(.47,0,.745,.715),"ease-out-sine":Ue(.39,.575,.565,1),"ease-in-out-sine":Ue(.445,.05,.55,.95),"ease-in-quad":Ue(.55,.085,.68,.53),"ease-out-quad":Ue(.25,.46,.45,.94),"ease-in-out-quad":Ue(.455,.03,.515,.955),"ease-in-cubic":Ue(.55,.055,.675,.19),"ease-out-cubic":Ue(.215,.61,.355,1),"ease-in-out-cubic":Ue(.645,.045,.355,1),"ease-in-quart":Ue(.895,.03,.685,.22),"ease-out-quart":Ue(.165,.84,.44,1),"ease-in-out-quart":Ue(.77,0,.175,1),"ease-in-quint":Ue(.755,.05,.855,.06),"ease-out-quint":Ue(.23,1,.32,1),"ease-in-out-quint":Ue(.86,0,.07,1),"ease-in-expo":Ue(.95,.05,.795,.035),"ease-out-expo":Ue(.19,1,.22,1),"ease-in-out-expo":Ue(1,0,0,1),"ease-in-circ":Ue(.6,.04,.98,.335),"ease-out-circ":Ue(.075,.82,.165,1),"ease-in-out-circ":Ue(.785,.135,.15,.86),spring:function(e,r,n){if(n===0)return ls.linear;var a=QD(e,r,n);return function(i,o,l){return i+(o-i)*a(l)}},"cubic-bezier":Ue};function uv(t,e,r,n,a){if(n===1||e===r)return r;var i=a(e,r,n);return t==null||((t.roundValue||t.color)&&(i=Math.round(i)),t.min!==void 0&&(i=Math.max(i,t.min)),t.max!==void 0&&(i=Math.min(i,t.max))),i}function dv(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function La(t,e,r,n,a){var i=a!=null?a.type:null;r<0?r=0:r>1&&(r=1);var o=dv(t,a),l=dv(e,a);if(le(o)&&le(l))return uv(i,o,l,r,n);if(He(o)&&He(l)){for(var u=[],c=0;c<l.length;c++){var d=o[c],f=l[c];if(d!=null&&f!=null){var p=uv(i,d,f,r,n);u.push(p)}else u.push(f)}return u}}function JD(t,e,r,n){var a=!n,i=t._private,o=e._private,l=o.easing,u=o.startTime,c=n?t:t.cy(),d=c.style();if(!o.easingImpl)if(l==null)o.easingImpl=ls.linear;else{var f;if(be(l)){var p=d.parse("transition-timing-function",l);f=p.value}else f=l;var v,h;be(f)?(v=f,h=[]):(v=f[1],h=f.slice(2).map(function(V){return+V})),h.length>0?(v==="spring"&&h.push(o.duration),o.easingImpl=ls[v].apply(null,h)):o.easingImpl=ls[v]}var g=o.easingImpl,y;if(o.duration===0?y=1:y=(r-u)/o.duration,o.applying&&(y=o.progress),y<0?y=0:y>1&&(y=1),o.delay==null){var m=o.startPosition,b=o.position;if(b&&a&&!t.locked()){var w={};Ii(m.x,b.x)&&(w.x=La(m.x,b.x,y,g)),Ii(m.y,b.y)&&(w.y=La(m.y,b.y,y,g)),t.position(w)}var C=o.startPan,x=o.pan,E=i.pan,k=x!=null&&n;k&&(Ii(C.x,x.x)&&(E.x=La(C.x,x.x,y,g)),Ii(C.y,x.y)&&(E.y=La(C.y,x.y,y,g)),t.emit("pan"));var B=o.startZoom,S=o.zoom,N=S!=null&&n;N&&(Ii(B,S)&&(i.zoom=Si(i.minZoom,La(B,S,y,g),i.maxZoom)),t.emit("zoom")),(k||N)&&t.emit("viewport");var D=o.style;if(D&&D.length>0&&a){for(var P=0;P<D.length;P++){var L=D[P],O=L.name,I=L,_=o.startStyle[O],M=d.properties[_.name],F=La(_,I,y,g,M);d.overrideBypass(t,O,F)}t.emit("style")}}return o.progress=y,y}function Ii(t,e){return t==null||e==null?!1:le(t)&&le(e)?!0:!!(t&&e)}function e3(t,e,r,n){var a=e._private;a.started=!0,a.startTime=r-a.progress*a.duration}function fv(t,e){var r=e._private.aniEles,n=[];function a(d,f){var p=d._private,v=p.animation.current,h=p.animation.queue,g=!1;if(v.length===0){var y=h.shift();y&&v.push(y)}for(var m=function(E){for(var k=E.length-1;k>=0;k--){var B=E[k];B()}E.splice(0,E.length)},b=v.length-1;b>=0;b--){var w=v[b],C=w._private;if(C.stopped){v.splice(b,1),C.hooked=!1,C.playing=!1,C.started=!1,m(C.frames);continue}!C.playing&&!C.applying||(C.playing&&C.applying&&(C.applying=!1),C.started||e3(d,w,t),JD(d,w,t,f),C.applying&&(C.applying=!1),m(C.frames),C.step!=null&&C.step(t),w.completed()&&(v.splice(b,1),C.hooked=!1,C.playing=!1,C.started=!1,m(C.completes)),g=!0)}return!f&&v.length===0&&h.length===0&&n.push(d),g}for(var i=!1,o=0;o<r.length;o++){var l=r[o],u=a(l);i=i||u}var c=a(e,!0);(i||c)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}var t3={animate:Ve.animate(),animation:Ve.animation(),animated:Ve.animated(),clearQueue:Ve.clearQueue(),delay:Ve.delay(),delayAnimation:Ve.delayAnimation(),stop:Ve.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&Lo(function(i){fv(i,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(i,o){fv(o,e)},n.beforeRenderPriorities.animations):r()}},r3={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var a=r.qualifier;return a!=null?e!==n.target&&vi(n.target)&&a.matches(n.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e}},cs=function(e){return be(e)?new un(e):e},hv={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new rs(r3,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,n){return this.emitter().on(e,cs(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,cs(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,cs(r),n),this},once:function(e,r,n){return this.emitter().one(e,cs(r),n),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};Ve.eventAliasesOn(hv);var mc={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};mc.jpeg=mc.jpg;var us={layout:function(e){var r=this;if(e==null){Xe("Layout options must be specified to make a layout");return}if(e.name==null){Xe("A `name` must be specified to make a layout");return}var n=e.name,a=r.extension("layout",n);if(a==null){Xe("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;be(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var o=new a(xe({},e,{cy:r,eles:i}));return o}};us.createLayout=us.makeLayout=us.layout;var n3={notify:function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var a=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&a.merge(r);return}if(n.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var a=e.batchNotifications[n];a.empty()?r.notify(n):r.notify(n,a)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),a=0;a<n.length;a++){var i=n[a],o=e[i],l=r.getElementById(i);l.data(o)}})}},a3=wt({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),yc={renderTo:function(e,r,n,a){var i=this._private.renderer;return i.renderTo(e,r,n,a),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(e){var r=this,n=r.extension("renderer",e.name);if(n==null){Xe("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}e.wheelSensitivity!==void 0&&Ae("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var a=a3(e);a.cy=r,r._private.renderer=new n(a),this.notify("init")},destroyRenderer:function(){var e=this;e.notify("destroy");var r=e.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var a=n._private;a.rscratch={},a.rstyle={},a.animation.current=[],a.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};yc.invalidateDimensions=yc.resize;var ds={collection:function(e,r){return be(e)?this.$(e):Ut(e)?e.collection():He(e)?(r||(r={}),new kt(this,e,r.unique,r.removed)):new kt(this)},nodes:function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};ds.elements=ds.filter=ds.$;var Bt={},Ai="t",i3="f";Bt.apply=function(t){for(var e=this,r=e._private,n=r.cy,a=n.collection(),i=0;i<t.length;i++){var o=t[i],l=e.getContextMeta(o);if(!l.empty){var u=e.getContextStyle(l),c=e.applyContextStyle(l,u,o);o._private.appliedInitStyle?e.updateTransitions(o,c.diffProps):o._private.appliedInitStyle=!0;var d=e.updateStyleHints(o);d&&a.push(o)}}return a},Bt.getPropertiesDiff=function(t,e){var r=this,n=r._private.propDiffs=r._private.propDiffs||{},a=t+"-"+e,i=n[a];if(i)return i;for(var o=[],l={},u=0;u<r.length;u++){var c=r[u],d=t[u]===Ai,f=e[u]===Ai,p=d!==f,v=c.mappedProperties.length>0;if(p||f&&v){var h=void 0;p&&v||p?h=c.properties:v&&(h=c.mappedProperties);for(var g=0;g<h.length;g++){for(var y=h[g],m=y.name,b=!1,w=u+1;w<r.length;w++){var C=r[w],x=e[w]===Ai;if(x&&(b=C.properties[y.name]!=null,b))break}!l[m]&&!b&&(l[m]=!0,o.push(m))}}}return n[a]=o,o},Bt.getContextMeta=function(t){for(var e=this,r="",n,a=t._private.styleCxtKey||"",i=0;i<e.length;i++){var o=e[i],l=o.selector&&o.selector.matches(t);l?r+=Ai:r+=i3}return n=e.getPropertiesDiff(a,r),t._private.styleCxtKey=r,{key:r,diffPropNames:n,empty:n.length===0}},Bt.getContextStyle=function(t){var e=t.key,r=this,n=this._private.contextStyles=this._private.contextStyles||{};if(n[e])return n[e];for(var a={_private:{key:e}},i=0;i<r.length;i++){var o=r[i],l=e[i]===Ai;if(l)for(var u=0;u<o.properties.length;u++){var c=o.properties[u];a[c.name]=c}}return n[e]=a,a},Bt.applyContextStyle=function(t,e,r){for(var n=this,a=t.diffPropNames,i={},o=n.types,l=0;l<a.length;l++){var u=a[l],c=e[u],d=r.pstyle(u);if(!c)if(d)d.bypass?c={name:u,deleteBypassed:!0}:c={name:u,delete:!0};else continue;if(d!==c){if(c.mapped===o.fn&&d!=null&&d.mapping!=null&&d.mapping.value===c.value){var f=d.mapping,p=f.fnValue=c.value(r);if(p===f.prevFnValue)continue}var v=i[u]={prev:d};n.applyParsedProperty(r,c),v.next=r.pstyle(u),v.next&&v.next.bypass&&(v.next=v.next.bypassed)}}return{diffProps:i}},Bt.updateStyleHints=function(t){var e=t._private,r=this,n=r.propertyGroupNames,a=r.propertyGroupKeys,i=function(W,oe,he){return r.getPropertiesHash(W,oe,he)},o=e.styleKey;if(t.removed())return!1;var l=e.group==="nodes",u=t._private.style;n=Object.keys(u);for(var c=0;c<a.length;c++){var d=a[c];e.styleKeys[d]=[va,wi]}for(var f=function(W,oe){return e.styleKeys[oe][0]=Ci(W,e.styleKeys[oe][0])},p=function(W,oe){return e.styleKeys[oe][1]=ki(W,e.styleKeys[oe][1])},v=function(W,oe){f(W,oe),p(W,oe)},h=function(W,oe){for(var he=0;he<W.length;he++){var ne=W.charCodeAt(he);f(ne,oe),p(ne,oe)}},g=2e9,y=function(W){return-128<W&&W<128&&Math.floor(W)!==W?g-(W*1024|0):W},m=0;m<n.length;m++){var b=n[m],w=u[b];if(w!=null){var C=this.properties[b],x=C.type,E=C.groupKey,k=void 0;C.hashOverride!=null?k=C.hashOverride(t,w):w.pfValue!=null&&(k=w.pfValue);var B=C.enums==null?w.value:null,S=k!=null,N=B!=null,D=S||N,P=w.units;if(x.number&&D&&!x.multiple){var L=S?k:B;v(y(L),E),!S&&P!=null&&h(P,E)}else h(w.strValue,E)}}for(var O=[va,wi],I=0;I<a.length;I++){var _=a[I],M=e.styleKeys[_];O[0]=Ci(M[0],O[0]),O[1]=ki(M[1],O[1])}e.styleKey=uB(O[0],O[1]);var F=e.styleKeys;e.labelDimsKey=an(F.labelDimensions);var V=i(t,["label"],F.labelDimensions);if(e.labelKey=an(V),e.labelStyleKey=an(Fo(F.commonLabel,V)),!l){var H=i(t,["source-label"],F.labelDimensions);e.sourceLabelKey=an(H),e.sourceLabelStyleKey=an(Fo(F.commonLabel,H));var $=i(t,["target-label"],F.labelDimensions);e.targetLabelKey=an($),e.targetLabelStyleKey=an(Fo(F.commonLabel,$))}if(l){var z=e.styleKeys,j=z.nodeBody,ee=z.nodeBorder,J=z.nodeOutline,Z=z.backgroundImage,re=z.compound,Y=z.pie,A=[j,ee,J,Z,re,Y].filter(function(K){return K!=null}).reduce(Fo,[va,wi]);e.nodeKey=an(A),e.hasPie=Y!=null&&Y[0]!==va&&Y[1]!==wi}return o!==e.styleKey},Bt.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null},Bt.applyParsedProperty=function(t,e){var r=this,n=e,a=t._private.style,i,o=r.types,l=r.properties[n.name].type,u=n.bypass,c=a[n.name],d=c&&c.bypass,f=t._private,p="mapping",v=function(j){return j==null?null:j.pfValue!=null?j.pfValue:j.value},h=function(){var j=v(c),ee=v(n);r.checkTriggers(t,n.name,j,ee)};if(e.name==="curve-style"&&t.isEdge()&&(e.value!=="bezier"&&t.isLoop()||e.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(n=e=this.parse(e.name,"bezier",u)),n.delete)return a[n.name]=void 0,h(),!0;if(n.deleteBypassed)return c?c.bypass?(c.bypassed=void 0,h(),!0):!1:(h(),!0);if(n.deleteBypass)return c?c.bypass?(a[n.name]=c.bypassed,h(),!0):!1:(h(),!0);var g=function(){Ae("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+n.name+"` with data field `"+n.field+"`); try a `["+n.field+"]` selector to limit scope to elements with `"+n.field+"` defined")};switch(n.mapped){case o.mapData:{for(var y=n.field.split("."),m=f.data,b=0;b<y.length&&m;b++){var w=y[b];m=m[w]}if(m==null)return g(),!1;var C;if(le(m)){var x=n.fieldMax-n.fieldMin;x===0?C=0:C=(m-n.fieldMin)/x}else return Ae("Do not use continuous mappers without specifying numeric data (i.e. `"+n.field+": "+m+"` for `"+t.id()+"` is non-numeric)"),!1;if(C<0?C=0:C>1&&(C=1),l.color){var E=n.valueMin[0],k=n.valueMax[0],B=n.valueMin[1],S=n.valueMax[1],N=n.valueMin[2],D=n.valueMax[2],P=n.valueMin[3]==null?1:n.valueMin[3],L=n.valueMax[3]==null?1:n.valueMax[3],O=[Math.round(E+(k-E)*C),Math.round(B+(S-B)*C),Math.round(N+(D-N)*C),Math.round(P+(L-P)*C)];i={bypass:n.bypass,name:n.name,value:O,strValue:"rgb("+O[0]+", "+O[1]+", "+O[2]+")"}}else if(l.number){var I=n.valueMin+(n.valueMax-n.valueMin)*C;i=this.parse(n.name,I,n.bypass,p)}else return!1;if(!i)return g(),!1;i.mapping=n,n=i;break}case o.data:{for(var _=n.field.split("."),M=f.data,F=0;F<_.length&&M;F++){var V=_[F];M=M[V]}if(M!=null&&(i=this.parse(n.name,M,n.bypass,p)),!i)return g(),!1;i.mapping=n,n=i;break}case o.fn:{var H=n.value,$=n.fnValue!=null?n.fnValue:H(t);if(n.prevFnValue=$,$==null)return Ae("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+t.id()+"` is null)"),!1;if(i=this.parse(n.name,$,n.bypass,p),!i)return Ae("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+t.id()+"` is invalid)"),!1;i.mapping=br(n),n=i;break}case void 0:break;default:return!1}return u?(d?n.bypassed=c.bypassed:n.bypassed=c,a[n.name]=n):d?c.bypassed=n:a[n.name]=n,h(),!0},Bt.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),!e)n._private.style={};else for(var a=n._private.style,i=Object.keys(a),o=0;o<i.length;o++){var l=i[o],u=a[l];u!=null&&(u.bypass?u.bypassed=null:a[l]=null)}}},Bt.update=function(){var t=this._private.cy,e=t.mutableElements();e.updateStyle()},Bt.updateTransitions=function(t,e){var r=this,n=t._private,a=t.pstyle("transition-property").value,i=t.pstyle("transition-duration").pfValue,o=t.pstyle("transition-delay").pfValue;if(a.length>0&&i>0){for(var l={},u=!1,c=0;c<a.length;c++){var d=a[c],f=t.pstyle(d),p=e[d];if(p){var v=p.prev,h=v,g=p.next!=null?p.next:f,y=!1,m=void 0,b=1e-6;h&&(le(h.pfValue)&&le(g.pfValue)?(y=g.pfValue-h.pfValue,m=h.pfValue+b*y):le(h.value)&&le(g.value)?(y=g.value-h.value,m=h.value+b*y):He(h.value)&&He(g.value)&&(y=h.value[0]!==g.value[0]||h.value[1]!==g.value[1]||h.value[2]!==g.value[2],m=h.strValue),y&&(l[d]=g.strValue,this.applyBypass(t,d,m),u=!0))}}if(!u)return;n.transitioning=!0,new xa(function(w){o>0?t.delayAnimation(o).play().promise().then(w):w()}).then(function(){return t.animation({style:l,duration:i,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1)},Bt.checkTrigger=function(t,e,r,n,a,i){var o=this.properties[e],l=a(o);l!=null&&l(r,n)&&i(o)},Bt.checkZOrderTrigger=function(t,e,r,n){var a=this;this.checkTrigger(t,e,r,n,function(i){return i.triggersZOrder},function(){a._private.cy.notify("zorder",t)})},Bt.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBounds},function(a){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),a.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(r==="bezier"||n==="bezier")&&t.parallelEdges().forEach(function(i){i.isBundledBezier()&&i.dirtyBoundingBoxCache()}),a.triggersBoundsOfConnectedEdges&&e==="display"&&(r==="none"||n==="none")&&t.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})},Bt.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n)};var Vi={};Vi.applyBypass=function(t,e,r,n){var a=this,i=[],o=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var l=0;l<a.properties.length;l++){var u=a.properties[l],c=u.name,d=this.parse(c,r,!0);d&&i.push(d)}}else if(be(e)){var f=this.parse(e,r,!0);f&&i.push(f)}else if(_e(e)){var p=e;n=r;for(var v=Object.keys(p),h=0;h<v.length;h++){var g=v[h],y=p[g];if(y===void 0&&(y=p[Po(g)]),y!==void 0){var m=this.parse(g,y,!0);m&&i.push(m)}}}else return!1;if(i.length===0)return!1;for(var b=!1,w=0;w<t.length;w++){for(var C=t[w],x={},E=void 0,k=0;k<i.length;k++){var B=i[k];if(n){var S=C.pstyle(B.name);E=x[B.name]={prev:S}}b=this.applyParsedProperty(C,br(B))||b,n&&(E.next=C.pstyle(B.name))}b&&this.updateStyleHints(C),n&&this.updateTransitions(C,x,o)}return b},Vi.overrideBypass=function(t,e,r){e=Hl(e);for(var n=0;n<t.length;n++){var a=t[n],i=a._private.style[e],o=this.properties[e].type,l=o.color,u=o.mutiple,c=i?i.pfValue!=null?i.pfValue:i.value:null;!i||!i.bypass?this.applyBypass(a,e,r):(i.value=r,i.pfValue!=null&&(i.pfValue=r),l?i.strValue="rgb("+r.join(",")+")":u?i.strValue=r.join(" "):i.strValue=""+r,this.updateStyleHints(a)),this.checkTriggers(a,e,c,r)}},Vi.removeAllBypasses=function(t,e){return this.removeBypasses(t,this.propertyNames,e)},Vi.removeBypasses=function(t,e,r){for(var n=!0,a=0;a<t.length;a++){for(var i=t[a],o={},l=0;l<e.length;l++){var u=e[l],c=this.properties[u],d=i.pstyle(c.name);if(!(!d||!d.bypass)){var f="",p=this.parse(u,f,!0),v=o[c.name]={prev:d};this.applyParsedProperty(i,p),v.next=i.pstyle(c.name)}}this.updateStyleHints(i),r&&this.updateTransitions(i,o,n)}};var bc={};bc.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1},bc.containerCss=function(t){var e=this._private.cy,r=e.container(),n=e.window();if(n&&r&&n.getComputedStyle)return n.getComputedStyle(r).getPropertyValue(t)};var Cr={};Cr.getRenderedStyle=function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)},Cr.getRawStyle=function(t,e){var r=this;if(t=t[0],t){for(var n={},a=0;a<r.properties.length;a++){var i=r.properties[a],o=r.getStylePropertyValue(t,i.name,e);o!=null&&(n[i.name]=o,n[Po(i.name)]=o)}return n}},Cr.getIndexedStyle=function(t,e,r,n){var a=t.pstyle(e)[r][n];return a??t.cy().style().getDefaultProperty(e)[r][0]},Cr.getStylePropertyValue=function(t,e,r){var n=this;if(t=t[0],t){var a=n.properties[e];a.alias&&(a=a.pointsTo);var i=a.type,o=t.pstyle(a.name);if(o){var l=o.value,u=o.units,c=o.strValue;if(r&&i.number&&l!=null&&le(l)){var d=t.cy().zoom(),f=function(y){return y*d},p=function(y,m){return f(y)+m},v=He(l),h=v?u.every(function(g){return g!=null}):u!=null;return h?v?l.map(function(g,y){return p(g,u[y])}).join(" "):p(l,u):v?l.map(function(g){return be(g)?g:""+f(g)}).join(" "):""+f(l)}else if(c!=null)return c}return null}},Cr.getAnimationStartStyle=function(t,e){for(var r={},n=0;n<e.length;n++){var a=e[n],i=a.name,o=t.pstyle(i);o!==void 0&&(_e(o)?o=this.parse(i,o.strValue):o=this.parse(i,o)),o&&(r[i]=o)}return r},Cr.getPropsList=function(t){var e=this,r=[],n=t,a=e.properties;if(n)for(var i=Object.keys(n),o=0;o<i.length;o++){var l=i[o],u=n[l],c=a[l]||a[Hl(l)],d=this.parse(c.name,u);d&&r.push(d)}return r},Cr.getNonDefaultPropertiesHash=function(t,e,r){var n=r.slice(),a,i,o,l,u,c;for(u=0;u<e.length;u++)if(a=e[u],i=t.pstyle(a,!1),i!=null)if(i.pfValue!=null)n[0]=Ci(l,n[0]),n[1]=ki(l,n[1]);else for(o=i.strValue,c=0;c<o.length;c++)l=o.charCodeAt(c),n[0]=Ci(l,n[0]),n[1]=ki(l,n[1]);return n},Cr.getPropertiesHash=Cr.getNonDefaultPropertiesHash;var fs={};fs.appendFromJson=function(t){for(var e=this,r=0;r<t.length;r++){var n=t[r],a=n.selector,i=n.style||n.css,o=Object.keys(i);e.selector(a);for(var l=0;l<o.length;l++){var u=o[l],c=i[u];e.css(u,c)}}return e},fs.fromJson=function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e},fs.json=function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],n=r.selector,a=r.properties,i={},o=0;o<a.length;o++){var l=a[o];i[l.name]=l.strValue}t.push({selector:n?n.toString():"core",style:i})}return t};var wc={};wc.appendFromString=function(t){var e=this,r=this,n=""+t,a,i,o;n=n.replace(/[/][*](\s|.)+?[*][/]/g,"");function l(){n.length>a.length?n=n.substr(a.length):n=""}function u(){i.length>o.length?i=i.substr(o.length):i=""}for(;;){var c=n.match(/^\s*$/);if(c)break;var d=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){Ae("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}a=d[0];var f=d[1];if(f!=="core"){var p=new un(f);if(p.invalid){Ae("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),l();continue}}var v=d[2],h=!1;i=v;for(var g=[];;){var y=i.match(/^\s*$/);if(y)break;var m=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!m){Ae("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+v),h=!0;break}o=m[0];var b=m[1],w=m[2],C=e.properties[b];if(!C){Ae("Skipping property: Invalid property name in: "+o),u();continue}var x=r.parse(b,w);if(!x){Ae("Skipping property: Invalid property definition in: "+o),u();continue}g.push({name:b,val:w}),u()}if(h){l();break}r.selector(f);for(var E=0;E<g.length;E++){var k=g[E];r.css(k.name,k.val)}l()}return r},wc.fromString=function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e};var xt={};(function(){var t=lt,e=hT,r=vT,n=gT,a=mT,i=function(A){return"^"+A+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},o=function(A){var K=t+"|\\w+|"+e+"|"+r+"|"+n+"|"+a;return"^"+A+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+K+")\\s*\\,\\s*("+K+")\\)$"},l=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];xt.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:i("data")},layoutData:{mapping:!0,regex:i("layoutData")},scratch:{mapping:!0,regex:i("scratch")},mapData:{mapping:!0,regex:o("mapData")},mapLayoutData:{mapping:!0,regex:o("mapLayoutData")},mapScratch:{mapping:!0,regex:o("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:l,singleRegexMatchValue:!0},urls:{regexes:l,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(A,K){switch(A.length){case 2:return K[0]!=="deg"&&K[0]!=="rad"&&K[1]!=="deg"&&K[1]!=="rad";case 1:return be(A[0])||K[0]==="deg"||K[0]==="rad";default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(A){var K=A.length;return K===1||K===2||K===4}}};var u={zeroNonZero:function(A,K){return(A==null||K==null)&&A!==K||A==0&&K!=0?!0:A!=0&&K==0},any:function(A,K){return A!=K},emptyNonEmpty:function(A,K){var W=nn(A),oe=nn(K);return W&&!oe||!W&&oe}},c=xt.types,d=[{name:"label",type:c.text,triggersBounds:u.any,triggersZOrder:u.emptyNonEmpty},{name:"text-rotation",type:c.textRotation,triggersBounds:u.any},{name:"text-margin-x",type:c.bidirectionalSize,triggersBounds:u.any},{name:"text-margin-y",type:c.bidirectionalSize,triggersBounds:u.any}],f=[{name:"source-label",type:c.text,triggersBounds:u.any},{name:"source-text-rotation",type:c.textRotation,triggersBounds:u.any},{name:"source-text-margin-x",type:c.bidirectionalSize,triggersBounds:u.any},{name:"source-text-margin-y",type:c.bidirectionalSize,triggersBounds:u.any},{name:"source-text-offset",type:c.size,triggersBounds:u.any}],p=[{name:"target-label",type:c.text,triggersBounds:u.any},{name:"target-text-rotation",type:c.textRotation,triggersBounds:u.any},{name:"target-text-margin-x",type:c.bidirectionalSize,triggersBounds:u.any},{name:"target-text-margin-y",type:c.bidirectionalSize,triggersBounds:u.any},{name:"target-text-offset",type:c.size,triggersBounds:u.any}],v=[{name:"font-family",type:c.fontFamily,triggersBounds:u.any},{name:"font-style",type:c.fontStyle,triggersBounds:u.any},{name:"font-weight",type:c.fontWeight,triggersBounds:u.any},{name:"font-size",type:c.size,triggersBounds:u.any},{name:"text-transform",type:c.textTransform,triggersBounds:u.any},{name:"text-wrap",type:c.textWrap,triggersBounds:u.any},{name:"text-overflow-wrap",type:c.textOverflowWrap,triggersBounds:u.any},{name:"text-max-width",type:c.size,triggersBounds:u.any},{name:"text-outline-width",type:c.size,triggersBounds:u.any},{name:"line-height",type:c.positiveNumber,triggersBounds:u.any}],h=[{name:"text-valign",type:c.valign,triggersBounds:u.any},{name:"text-halign",type:c.halign,triggersBounds:u.any},{name:"color",type:c.color},{name:"text-outline-color",type:c.color},{name:"text-outline-opacity",type:c.zeroOneNumber},{name:"text-background-color",type:c.color},{name:"text-background-opacity",type:c.zeroOneNumber},{name:"text-background-padding",type:c.size,triggersBounds:u.any},{name:"text-border-opacity",type:c.zeroOneNumber},{name:"text-border-color",type:c.color},{name:"text-border-width",type:c.size,triggersBounds:u.any},{name:"text-border-style",type:c.borderStyle,triggersBounds:u.any},{name:"text-background-shape",type:c.textBackgroundShape,triggersBounds:u.any},{name:"text-justification",type:c.justification}],g=[{name:"events",type:c.bool,triggersZOrder:u.any},{name:"text-events",type:c.bool,triggersZOrder:u.any}],y=[{name:"display",type:c.display,triggersZOrder:u.any,triggersBounds:u.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:c.visibility,triggersZOrder:u.any},{name:"opacity",type:c.zeroOneNumber,triggersZOrder:u.zeroNonZero},{name:"text-opacity",type:c.zeroOneNumber},{name:"min-zoomed-font-size",type:c.size},{name:"z-compound-depth",type:c.zCompoundDepth,triggersZOrder:u.any},{name:"z-index-compare",type:c.zIndexCompare,triggersZOrder:u.any},{name:"z-index",type:c.number,triggersZOrder:u.any}],m=[{name:"overlay-padding",type:c.size,triggersBounds:u.any},{name:"overlay-color",type:c.color},{name:"overlay-opacity",type:c.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"overlay-shape",type:c.overlayShape,triggersBounds:u.any},{name:"overlay-corner-radius",type:c.cornerRadius}],b=[{name:"underlay-padding",type:c.size,triggersBounds:u.any},{name:"underlay-color",type:c.color},{name:"underlay-opacity",type:c.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"underlay-shape",type:c.overlayShape,triggersBounds:u.any},{name:"underlay-corner-radius",type:c.cornerRadius}],w=[{name:"transition-property",type:c.propList},{name:"transition-duration",type:c.time},{name:"transition-delay",type:c.time},{name:"transition-timing-function",type:c.easing}],C=function(A,K){return K.value==="label"?-A.poolIndex():K.pfValue},x=[{name:"height",type:c.nodeSize,triggersBounds:u.any,hashOverride:C},{name:"width",type:c.nodeSize,triggersBounds:u.any,hashOverride:C},{name:"shape",type:c.nodeShape,triggersBounds:u.any},{name:"shape-polygon-points",type:c.polygonPointList,triggersBounds:u.any},{name:"corner-radius",type:c.cornerRadius},{name:"background-color",type:c.color},{name:"background-fill",type:c.fill},{name:"background-opacity",type:c.zeroOneNumber},{name:"background-blacken",type:c.nOneOneNumber},{name:"background-gradient-stop-colors",type:c.colors},{name:"background-gradient-stop-positions",type:c.percentages},{name:"background-gradient-direction",type:c.gradientDirection},{name:"padding",type:c.sizeMaybePercent,triggersBounds:u.any},{name:"padding-relative-to",type:c.paddingRelativeTo,triggersBounds:u.any},{name:"bounds-expansion",type:c.boundsExpansion,triggersBounds:u.any}],E=[{name:"border-color",type:c.color},{name:"border-opacity",type:c.zeroOneNumber},{name:"border-width",type:c.size,triggersBounds:u.any},{name:"border-style",type:c.borderStyle},{name:"border-cap",type:c.lineCap},{name:"border-join",type:c.lineJoin},{name:"border-dash-pattern",type:c.numbers},{name:"border-dash-offset",type:c.number},{name:"border-position",type:c.linePosition}],k=[{name:"outline-color",type:c.color},{name:"outline-opacity",type:c.zeroOneNumber},{name:"outline-width",type:c.size,triggersBounds:u.any},{name:"outline-style",type:c.borderStyle},{name:"outline-offset",type:c.size,triggersBounds:u.any}],B=[{name:"background-image",type:c.urls},{name:"background-image-crossorigin",type:c.bgCrossOrigin},{name:"background-image-opacity",type:c.zeroOneNumbers},{name:"background-image-containment",type:c.bgContainment},{name:"background-image-smoothing",type:c.bools},{name:"background-position-x",type:c.bgPos},{name:"background-position-y",type:c.bgPos},{name:"background-width-relative-to",type:c.bgRelativeTo},{name:"background-height-relative-to",type:c.bgRelativeTo},{name:"background-repeat",type:c.bgRepeat},{name:"background-fit",type:c.bgFit},{name:"background-clip",type:c.bgClip},{name:"background-width",type:c.bgWH},{name:"background-height",type:c.bgWH},{name:"background-offset-x",type:c.bgPos},{name:"background-offset-y",type:c.bgPos}],S=[{name:"position",type:c.position,triggersBounds:u.any},{name:"compound-sizing-wrt-labels",type:c.compoundIncludeLabels,triggersBounds:u.any},{name:"min-width",type:c.size,triggersBounds:u.any},{name:"min-width-bias-left",type:c.sizeMaybePercent,triggersBounds:u.any},{name:"min-width-bias-right",type:c.sizeMaybePercent,triggersBounds:u.any},{name:"min-height",type:c.size,triggersBounds:u.any},{name:"min-height-bias-top",type:c.sizeMaybePercent,triggersBounds:u.any},{name:"min-height-bias-bottom",type:c.sizeMaybePercent,triggersBounds:u.any}],N=[{name:"line-style",type:c.lineStyle},{name:"line-color",type:c.color},{name:"line-fill",type:c.fill},{name:"line-cap",type:c.lineCap},{name:"line-opacity",type:c.zeroOneNumber},{name:"line-dash-pattern",type:c.numbers},{name:"line-dash-offset",type:c.number},{name:"line-outline-width",type:c.size},{name:"line-outline-color",type:c.color},{name:"line-gradient-stop-colors",type:c.colors},{name:"line-gradient-stop-positions",type:c.percentages},{name:"curve-style",type:c.curveStyle,triggersBounds:u.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:c.zeroOneNumber,triggersBounds:u.any},{name:"source-endpoint",type:c.edgeEndpoint,triggersBounds:u.any},{name:"target-endpoint",type:c.edgeEndpoint,triggersBounds:u.any},{name:"control-point-step-size",type:c.size,triggersBounds:u.any},{name:"control-point-distances",type:c.bidirectionalSizes,triggersBounds:u.any},{name:"control-point-weights",type:c.numbers,triggersBounds:u.any},{name:"segment-distances",type:c.bidirectionalSizes,triggersBounds:u.any},{name:"segment-weights",type:c.numbers,triggersBounds:u.any},{name:"segment-radii",type:c.numbers,triggersBounds:u.any},{name:"radius-type",type:c.radiusType,triggersBounds:u.any},{name:"taxi-turn",type:c.bidirectionalSizeMaybePercent,triggersBounds:u.any},{name:"taxi-turn-min-distance",type:c.size,triggersBounds:u.any},{name:"taxi-direction",type:c.axisDirection,triggersBounds:u.any},{name:"taxi-radius",type:c.number,triggersBounds:u.any},{name:"edge-distances",type:c.edgeDistances,triggersBounds:u.any},{name:"arrow-scale",type:c.positiveNumber,triggersBounds:u.any},{name:"loop-direction",type:c.angle,triggersBounds:u.any},{name:"loop-sweep",type:c.angle,triggersBounds:u.any},{name:"source-distance-from-node",type:c.size,triggersBounds:u.any},{name:"target-distance-from-node",type:c.size,triggersBounds:u.any}],D=[{name:"ghost",type:c.bool,triggersBounds:u.any},{name:"ghost-offset-x",type:c.bidirectionalSize,triggersBounds:u.any},{name:"ghost-offset-y",type:c.bidirectionalSize,triggersBounds:u.any},{name:"ghost-opacity",type:c.zeroOneNumber}],P=[{name:"selection-box-color",type:c.color},{name:"selection-box-opacity",type:c.zeroOneNumber},{name:"selection-box-border-color",type:c.color},{name:"selection-box-border-width",type:c.size},{name:"active-bg-color",type:c.color},{name:"active-bg-opacity",type:c.zeroOneNumber},{name:"active-bg-size",type:c.size},{name:"outside-texture-bg-color",type:c.color},{name:"outside-texture-bg-opacity",type:c.zeroOneNumber}],L=[];xt.pieBackgroundN=16,L.push({name:"pie-size",type:c.sizeMaybePercent});for(var O=1;O<=xt.pieBackgroundN;O++)L.push({name:"pie-"+O+"-background-color",type:c.color}),L.push({name:"pie-"+O+"-background-size",type:c.percent}),L.push({name:"pie-"+O+"-background-opacity",type:c.zeroOneNumber});var I=[],_=xt.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:c.arrowShape,triggersBounds:u.any},{name:"arrow-color",type:c.color},{name:"arrow-fill",type:c.arrowFill},{name:"arrow-width",type:c.arrowWidth}].forEach(function(Y){_.forEach(function(A){var K=A+"-"+Y.name,W=Y.type,oe=Y.triggersBounds;I.push({name:K,type:W,triggersBounds:oe})})},{});var M=xt.properties=[].concat(g,w,y,m,b,D,h,v,d,f,p,x,E,k,B,L,S,N,I,P),F=xt.propertyGroups={behavior:g,transition:w,visibility:y,overlay:m,underlay:b,ghost:D,commonLabel:h,labelDimensions:v,mainLabel:d,sourceLabel:f,targetLabel:p,nodeBody:x,nodeBorder:E,nodeOutline:k,backgroundImage:B,pie:L,compound:S,edgeLine:N,edgeArrow:I,core:P},V=xt.propertyGroupNames={},H=xt.propertyGroupKeys=Object.keys(F);H.forEach(function(Y){V[Y]=F[Y].map(function(A){return A.name}),F[Y].forEach(function(A){return A.groupKey=Y})});var $=xt.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];xt.propertyNames=M.map(function(Y){return Y.name});for(var z=0;z<M.length;z++){var j=M[z];M[j.name]=j}for(var ee=0;ee<$.length;ee++){var J=$[ee],Z=M[J.pointsTo],re={name:J.name,alias:!0,pointsTo:Z};M.push(re),M[J.name]=re}})(),xt.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},xt.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var e=xe({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(u,c){for(var d=1;d<=xt.pieBackgroundN;d++){var f=c.name.replace("{{i}}",d),p=c.value;u[f]=p}return u},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(u,c){return xt.arrowPrefixes.forEach(function(d){var f=d+"-"+c.name,p=c.value;u[f]=p}),u},{})),r={},n=0;n<this.properties.length;n++){var a=this.properties[n];if(!a.pointsTo){var i=a.name,o=e[i],l=this.parse(i,o);r[i]=l}}return t.defaultProperties=r,t.defaultProperties},xt.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var hs={};hs.parse=function(t,e,r,n){var a=this;if(Ye(e))return a.parseImplWarn(t,e,r,n);var i=n==="mapping"||n===!0||n===!1||n==null?"dontcare":n,o=r?"t":"f",l=""+e,u=Mh(t,l,o,i),c=a.propCache=a.propCache||[],d;return(d=c[u])||(d=c[u]=a.parseImplWarn(t,e,r,n)),(r||n==="mapping")&&(d=br(d),d&&(d.value=br(d.value))),d},hs.parseImplWarn=function(t,e,r,n){var a=this.parseImpl(t,e,r,n);return!a&&e!=null&&Ae("The style property `".concat(t,": ").concat(e,"` is invalid")),a&&(a.name==="width"||a.name==="height")&&e==="label"&&Ae("The style value of `label` is deprecated for `"+a.name+"`"),a},hs.parseImpl=function(t,e,r,n){var a=this;t=Hl(t);var i=a.properties[t],o=e,l=a.types;if(!i||e===void 0)return null;i.alias&&(i=i.pointsTo,t=i.name);var u=be(e);u&&(e=e.trim());var c=i.type;if(!c)return null;if(r&&(e===""||e===null))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(Ye(e))return{name:t,value:e,strValue:"fn",mapped:l.fn,bypass:r};var d,f;if(!(!u||n||e.length<7||e[1]!=="a")){if(e.length>=7&&e[0]==="d"&&(d=new RegExp(l.data.regex).exec(e))){if(r)return!1;var p=l.data;return{name:t,value:d,strValue:""+e,mapped:p,field:d[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(l.mapData.regex).exec(e))){if(r||c.multiple)return!1;var v=l.mapData;if(!(c.color||c.number))return!1;var h=this.parse(t,f[4]);if(!h||h.mapped)return!1;var g=this.parse(t,f[5]);if(!g||g.mapped)return!1;if(h.pfValue===g.pfValue||h.strValue===g.strValue)return Ae("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+h.strValue+"`"),this.parse(t,h.strValue);if(c.color){var y=h.value,m=g.value,b=y[0]===m[0]&&y[1]===m[1]&&y[2]===m[2]&&(y[3]===m[3]||(y[3]==null||y[3]===1)&&(m[3]==null||m[3]===1));if(b)return!1}return{name:t,value:f,strValue:""+e,mapped:v,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:h.value,valueMax:g.value,bypass:r}}}if(c.multiple&&n!=="multiple"){var w;if(u?w=e.split(/\s+/):He(e)?w=e:w=[e],c.evenMultiple&&w.length%2!==0)return null;for(var C=[],x=[],E=[],k="",B=!1,S=0;S<w.length;S++){var N=a.parse(t,w[S],r,"multiple");B=B||be(N.value),C.push(N.value),E.push(N.pfValue!=null?N.pfValue:N.value),x.push(N.units),k+=(S>0?" ":"")+N.strValue}return c.validate&&!c.validate(C,x)?null:c.singleEnum&&B?C.length===1&&be(C[0])?{name:t,value:C[0],strValue:C[0],bypass:r}:null:{name:t,value:C,pfValue:E,strValue:k,bypass:r,units:x}}var D=function(){for(var A=0;A<c.enums.length;A++){var K=c.enums[A];if(K===e)return{name:t,value:e,strValue:""+e,bypass:r}}return null};if(c.number){var P,L="px";if(c.units&&(P=c.units),c.implicitUnits&&(L=c.implicitUnits),!c.unitless)if(u){var O="px|em"+(c.allowPercent?"|\\%":"");P&&(O=P);var I=e.match("^("+lt+")("+O+")?$");I&&(e=I[1],P=I[2]||L)}else(!P||c.implicitUnits)&&(P=L);if(e=parseFloat(e),isNaN(e)&&c.enums===void 0)return null;if(isNaN(e)&&c.enums!==void 0)return e=o,D();if(c.integer&&!oT(e)||c.min!==void 0&&(e<c.min||c.strictMin&&e===c.min)||c.max!==void 0&&(e>c.max||c.strictMax&&e===c.max))return null;var _={name:t,value:e,strValue:""+e+(P||""),units:P,bypass:r};return c.unitless||P!=="px"&&P!=="em"?_.pfValue=e:_.pfValue=P==="px"||!P?e:this.getEmSizeInPixels()*e,(P==="ms"||P==="s")&&(_.pfValue=P==="ms"?e:1e3*e),(P==="deg"||P==="rad")&&(_.pfValue=P==="rad"?e:$B(e)),P==="%"&&(_.pfValue=e/100),_}else if(c.propList){var M=[],F=""+e;if(F!=="none"){for(var V=F.split(/\s*,\s*|\s+/),H=0;H<V.length;H++){var $=V[H].trim();a.properties[$]?M.push($):Ae("`"+$+"` is not a valid property name")}if(M.length===0)return null}return{name:t,value:M,strValue:M.length===0?"none":M.join(" "),bypass:r}}else if(c.color){var z=xT(e);return z?{name:t,value:z,pfValue:z,strValue:"rgb("+z[0]+","+z[1]+","+z[2]+")",bypass:r}:null}else if(c.regex||c.regexes){if(c.enums){var j=D();if(j)return j}for(var ee=c.regexes?c.regexes:[c.regex],J=0;J<ee.length;J++){var Z=new RegExp(ee[J]),re=Z.exec(e);if(re)return{name:t,value:c.singleRegexMatchValue?re[1]:re,strValue:""+e,bypass:r}}return null}else return c.string?{name:t,value:""+e,strValue:""+e,bypass:r}:c.enums?D():null};var Nt=function t(e){if(!(this instanceof t))return new t(e);if(!zl(e)){Xe("A style must have a core reference");return}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()},Dt=Nt.prototype;Dt.instanceString=function(){return"style"},Dt.clear=function(){for(var t=this._private,e=t.cy,r=e.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(r,!0),r.forEach(function(a){var i=a[0]._private;i.styleDirty=!0,i.appliedInitStyle=!1}),this},Dt.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Dt.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},Dt.selector=function(t){var e=t==="core"?null:new un(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this},Dt.css=function(){var t=this,e=arguments;if(e.length===1)for(var r=e[0],n=0;n<t.properties.length;n++){var a=t.properties[n],i=r[a.name];i===void 0&&(i=r[Po(a.name)]),i!==void 0&&this.cssRule(a.name,i)}else e.length===2&&this.cssRule(e[0],e[1]);return this},Dt.style=Dt.css,Dt.cssRule=function(t,e){var r=this.parse(t,e);if(r){var n=this.length-1;this[n].properties.push(r),this[n].properties[r.name]=r,r.name.match(/pie-(\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.mapped&&this[n].mappedProperties.push(r);var a=!this[n].selector;a&&(this._private.coreStyle[r.name]=r)}return this},Dt.append=function(t){return Ch(t)?t.appendToStyle(this):He(t)?this.appendFromJson(t):be(t)&&this.appendFromString(t),this},Nt.fromJson=function(t,e){var r=new Nt(t);return r.fromJson(e),r},Nt.fromString=function(t,e){return new Nt(t).fromString(e)},[Bt,Vi,bc,Cr,fs,wc,xt,hs].forEach(function(t){xe(Dt,t)}),Nt.types=Dt.types,Nt.properties=Dt.properties,Nt.propertyGroups=Dt.propertyGroups,Nt.propertyGroupNames=Dt.propertyGroupNames,Nt.propertyGroupKeys=Dt.propertyGroupKeys;var o3={style:function(e){if(e){var r=this.setStyle(e);r.update()}return this._private.style},setStyle:function(e){var r=this._private;return Ch(e)?r.style=e.generateStyle(this):He(e)?r.style=Nt.fromJson(this,e):be(e)?r.style=Nt.fromString(this,e):r.style=Nt(this),r.style},updateStyle:function(){this.mutableElements().updateStyle()}},s3="single",Hn={autolock:function(e){if(e!==void 0)this._private.autolock=!!e;else return this._private.autolock;return this},autoungrabify:function(e){if(e!==void 0)this._private.autoungrabify=!!e;else return this._private.autoungrabify;return this},autounselectify:function(e){if(e!==void 0)this._private.autounselectify=!!e;else return this._private.autounselectify;return this},selectionType:function(e){var r=this._private;if(r.selectionType==null&&(r.selectionType=s3),e!==void 0)(e==="additive"||e==="single")&&(r.selectionType=e);else return r.selectionType;return this},panningEnabled:function(e){if(e!==void 0)this._private.panningEnabled=!!e;else return this._private.panningEnabled;return this},userPanningEnabled:function(e){if(e!==void 0)this._private.userPanningEnabled=!!e;else return this._private.userPanningEnabled;return this},zoomingEnabled:function(e){if(e!==void 0)this._private.zoomingEnabled=!!e;else return this._private.zoomingEnabled;return this},userZoomingEnabled:function(e){if(e!==void 0)this._private.userZoomingEnabled=!!e;else return this._private.userZoomingEnabled;return this},boxSelectionEnabled:function(e){if(e!==void 0)this._private.boxSelectionEnabled=!!e;else return this._private.boxSelectionEnabled;return this},pan:function(){var e=arguments,r=this._private.pan,n,a,i,o,l;switch(e.length){case 0:return r;case 1:if(be(e[0]))return n=e[0],r[n];if(_e(e[0])){if(!this._private.panningEnabled)return this;i=e[0],o=i.x,l=i.y,le(o)&&(r.x=o),le(l)&&(r.y=l),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;n=e[0],a=e[1],(n==="x"||n==="y")&&le(a)&&(r[n]=a),this.emit("pan viewport");break}return this.notify("viewport"),this},panBy:function(e,r){var n=arguments,a=this._private.pan,i,o,l,u,c;if(!this._private.panningEnabled)return this;switch(n.length){case 1:_e(e)&&(l=n[0],u=l.x,c=l.y,le(u)&&(a.x+=u),le(c)&&(a.y+=c),this.emit("pan viewport"));break;case 2:i=e,o=r,(i==="x"||i==="y")&&le(o)&&(a[i]+=o),this.emit("pan viewport");break}return this.notify("viewport"),this},fit:function(e,r){var n=this.getFitViewport(e,r);if(n){var a=this._private;a.zoom=n.zoom,a.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(e,r){if(le(e)&&r===void 0&&(r=e,e=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var n;if(be(e)){var a=e;e=this.$(a)}else if(cT(e)){var i=e;n={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},n.w=n.x2-n.x1,n.h=n.y2-n.y1}else Ut(e)||(e=this.mutableElements());if(!(Ut(e)&&e.empty())){n=n||e.boundingBox();var o=this.width(),l=this.height(),u;if(r=le(r)?r:0,!isNaN(o)&&!isNaN(l)&&o>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((o-2*r)/n.w,(l-2*r)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u<this._private.minZoom?this._private.minZoom:u;var c={x:(o-u*(n.x1+n.x2))/2,y:(l-u*(n.y1+n.y2))/2};return{zoom:u,pan:c}}}}},zoomRange:function(e,r){var n=this._private;if(r==null){var a=e;e=a.min,r=a.max}return le(e)&&le(r)&&e<=r?(n.minZoom=e,n.maxZoom=r):le(e)&&r===void 0&&e<=n.maxZoom?n.minZoom=e:le(r)&&e===void 0&&r>=n.minZoom&&(n.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,n=r.pan,a=r.zoom,i,o,l=!1;if(r.zoomingEnabled||(l=!0),le(e)?o=e:_e(e)&&(o=e.level,e.position!=null?i=Ao(e.position,a,n):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(l=!0)),o=o>r.maxZoom?r.maxZoom:o,o=o<r.minZoom?r.minZoom:o,l||!le(o)||o===a||i!=null&&(!le(i.x)||!le(i.y)))return null;if(i!=null){var u=n,c=a,d=o,f={x:-d/c*(i.x-u.x)+i.x,y:-d/c*(i.y-u.y)+i.y};return{zoomed:!0,panned:!0,zoom:d,pan:f}}else return{zoomed:!0,panned:!1,zoom:o,pan:n}},zoom:function(e){if(e===void 0)return this._private.zoom;var r=this.getZoomedViewport(e),n=this._private;return r==null||!r.zoomed?this:(n.zoom=r.zoom,r.panned&&(n.pan.x=r.pan.x,n.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},viewport:function(e){var r=this._private,n=!0,a=!0,i=[],o=!1,l=!1;if(!e)return this;if(le(e.zoom)||(n=!1),_e(e.pan)||(a=!1),!n&&!a)return this;if(n){var u=e.zoom;u<r.minZoom||u>r.maxZoom||!r.zoomingEnabled?o=!0:(r.zoom=u,i.push("zoom"))}if(a&&(!o||!e.cancelOnFailedZoom)&&r.panningEnabled){var c=e.pan;le(c.x)&&(r.pan.x=c.x,l=!1),le(c.y)&&(r.pan.y=c.y,l=!1),l||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(be(e)){var n=e;e=this.mutableElements().filter(n)}else Ut(e)||(e=this.mutableElements());if(e.length!==0){var a=e.boundingBox(),i=this.width(),o=this.height();r=r===void 0?this._private.zoom:r;var l={x:(i-r*(a.x1+a.x2))/2,y:(o-r*(a.y1+a.y2))/2};return l}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var a=n.window().getComputedStyle(r),i=function(l){return parseFloat(a.getPropertyValue(l))};return{width:r.clientWidth-i("padding-left")-i("padding-right"),height:r.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),a={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return a.w=a.x2-a.x1,a.h=a.y2-a.y1,a},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};Hn.centre=Hn.center,Hn.autolockNodes=Hn.autolock,Hn.autoungrabifyNodes=Hn.autoungrabify;var Ri={data:Ve.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ve.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ve.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ve.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Ri.attr=Ri.data,Ri.removeAttr=Ri.removeData;var $i=function(e){var r=this;e=xe({},e);var n=e.container;n&&!Do(n)&&Do(n[0])&&(n=n[0]);var a=n?n._cyreg:null;a=a||{},a&&a.cy&&(a.cy.destroy(),a={});var i=a.readies=a.readies||[];n&&(n._cyreg=a),a.cy=r;var o=st!==void 0&&n!==void 0&&!e.headless,l=e;l.layout=xe({name:o?"grid":"null"},l.layout),l.renderer=xe({name:o?"canvas":"null"},l.renderer);var u=function(h,g,y){return g!==void 0?g:y!==void 0?y:h},c=this._private={container:n,ready:!1,options:l,elements:new kt(this),listeners:[],aniEles:new kt(this),data:l.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,l.zoomingEnabled),userZoomingEnabled:u(!0,l.userZoomingEnabled),panningEnabled:u(!0,l.panningEnabled),userPanningEnabled:u(!0,l.userPanningEnabled),boxSelectionEnabled:u(!0,l.boxSelectionEnabled),autolock:u(!1,l.autolock,l.autolockNodes),autoungrabify:u(!1,l.autoungrabify,l.autoungrabifyNodes),autounselectify:u(!1,l.autounselectify),styleEnabled:l.styleEnabled===void 0?o:l.styleEnabled,zoom:le(l.zoom)?l.zoom:1,pan:{x:_e(l.pan)&&le(l.pan.x)?l.pan.x:0,y:_e(l.pan)&&le(l.pan.y)?l.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,l.multiClickDebounceTime)};this.createEmitter(),this.selectionType(l.selectionType),this.zoomRange({min:l.minZoom,max:l.maxZoom});var d=function(h,g){var y=h.some(uT);if(y)return xa.all(h).then(g);g(h)};c.styleEnabled&&r.setStyle([]);var f=xe({},l,l.renderer);r.initRenderer(f);var p=function(h,g,y){r.notifications(!1);var m=r.mutableElements();m.length>0&&m.remove(),h!=null&&(_e(h)||He(h))&&r.add(h),r.one("layoutready",function(w){r.notifications(!0),r.emit(w),r.one("load",g),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",y),r.emit("done")});var b=xe({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()};d([l.style,l.elements],function(v){var h=v[0],g=v[1];c.styleEnabled&&r.style().append(h),p(g,function(){r.startAnimationLoop(),c.ready=!0,Ye(l.ready)&&r.on("ready",l.ready);for(var y=0;y<i.length;y++){var m=i[y];r.on("ready",m)}a&&(a.readies=[]),r.emit("ready")},l.done)})},ps=$i.prototype;xe(ps,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},window:function(){var e=this._private.container;if(e==null)return st;var r=this._private.container.ownerDocument;return r===void 0||r==null?st:r.defaultView||st},mount:function(e){if(e!=null){var r=this,n=r._private,a=n.options;return!Do(e)&&Do(e[0])&&(e=e[0]),r.stopAnimationLoop(),r.destroyRenderer(),n.container=e,n.styleEnabled=!0,r.invalidateSize(),r.initRenderer(xe({},a,a.renderer,{name:a.renderer.name==="null"?"canvas":a.renderer.name})),r.startAnimationLoop(),r.style(a.style),r.emit("mount"),r}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},options:function(){return br(this._private.options)},json:function(e){var r=this,n=r._private,a=r.mutableElements(),i=function(C){return r.getElementById(C.id())};if(_e(e)){if(r.startBatch(),e.elements){var o={},l=function(C,x){for(var E=[],k=[],B=0;B<C.length;B++){var S=C[B];if(!S.data.id){Ae("cy.json() cannot handle elements without an ID attribute");continue}var N=""+S.data.id,D=r.getElementById(N);o[N]=!0,D.length!==0?k.push({ele:D,json:S}):(x&&(S.group=x),E.push(S))}r.add(E);for(var P=0;P<k.length;P++){var L=k[P],O=L.ele,I=L.json;O.json(I)}};if(He(e.elements))l(e.elements);else for(var u=["nodes","edges"],c=0;c<u.length;c++){var d=u[c],f=e.elements[d];He(f)&&l(f,d)}var p=r.collection();a.filter(function(w){return!o[w.id()]}).forEach(function(w){w.isParent()?p.merge(w):w.remove()}),p.forEach(function(w){return w.children().move({parent:null})}),p.forEach(function(w){return i(w).remove()})}e.style&&r.style(e.style),e.zoom!=null&&e.zoom!==n.zoom&&r.zoom(e.zoom),e.pan&&(e.pan.x!==n.pan.x||e.pan.y!==n.pan.y)&&r.pan(e.pan),e.data&&r.data(e.data);for(var v=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],h=0;h<v.length;h++){var g=v[h];e[g]!=null&&r[g](e[g])}return r.endBatch(),this}else{var y=!!e,m={};y?m.elements=this.elements().map(function(w){return w.json()}):(m.elements={},a.forEach(function(w){var C=w.group();m.elements[C]||(m.elements[C]=[]),m.elements[C].push(w.json())})),this._private.styleEnabled&&(m.style=r.style().json()),m.data=br(r.data());var b=n.options;return m.zoomingEnabled=n.zoomingEnabled,m.userZoomingEnabled=n.userZoomingEnabled,m.zoom=n.zoom,m.minZoom=n.minZoom,m.maxZoom=n.maxZoom,m.panningEnabled=n.panningEnabled,m.userPanningEnabled=n.userPanningEnabled,m.pan=br(n.pan),m.boxSelectionEnabled=n.boxSelectionEnabled,m.renderer=br(b.renderer),m.hideEdgesOnViewport=b.hideEdgesOnViewport,m.textureOnViewport=b.textureOnViewport,m.wheelSensitivity=b.wheelSensitivity,m.motionBlur=b.motionBlur,m.multiClickDebounceTime=b.multiClickDebounceTime,m}}}),ps.$id=ps.getElementById,[XD,t3,hv,mc,us,n3,yc,ds,o3,Hn,Ri].forEach(function(t){xe(ps,t)});var l3={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}},c3={maximal:!1,acyclic:!1},Fa=function(e){return e.scratch("breadthfirst")},pv=function(e,r){return e.scratch("breadthfirst",r)};function vv(t){this.options=xe({},l3,c3,t)}vv.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=n.nodes().filter(function(ne){return!ne.isParent()}),i=n,o=e.directed,l=e.acyclic||e.maximal||e.maximalAdjustments>0,u=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),c;if(Ut(e.roots))c=e.roots;else if(He(e.roots)){for(var d=[],f=0;f<e.roots.length;f++){var p=e.roots[f],v=r.getElementById(p);d.push(v)}c=r.collection(d)}else if(be(e.roots))c=r.$(e.roots);else if(o)c=a.roots();else{var h=n.components();c=r.collection();for(var g=function(se){var ue=h[se],pe=ue.maxDegree(!1),de=ue.filter(function(me){return me.degree(!1)===pe});c=c.add(de)},y=0;y<h.length;y++)g(y)}var m=[],b={},w=function(se,ue){m[ue]==null&&(m[ue]=[]);var pe=m[ue].length;m[ue].push(se),pv(se,{index:pe,depth:ue})},C=function(se,ue){var pe=Fa(se),de=pe.depth,me=pe.index;m[de][me]=null,w(se,ue)};i.bfs({roots:c,directed:e.directed,visit:function(se,ue,pe,de,me){var Ne=se[0],De=Ne.id();w(Ne,me),b[De]=!0}});for(var x=[],E=0;E<a.length;E++){var k=a[E];b[k.id()]||x.push(k)}var B=function(se){for(var ue=m[se],pe=0;pe<ue.length;pe++){var de=ue[pe];if(de==null){ue.splice(pe,1),pe--;continue}pv(de,{depth:se,index:pe})}},S=function(){for(var se=0;se<m.length;se++)B(se)},N=function(se,ue){for(var pe=Fa(se),de=se.incomers().filter(function(T){return T.isNode()&&n.has(T)}),me=-1,Ne=se.id(),De=0;De<de.length;De++){var Ee=de[De],Pe=Fa(Ee);me=Math.max(me,Pe.depth)}if(pe.depth<=me){if(!e.acyclic&&ue[Ne])return null;var te=me+1;return C(se,te),ue[Ne]=te,!0}return!1};if(o&&l){var D=[],P={},L=function(se){return D.push(se)},O=function(){return D.shift()};for(a.forEach(function(ne){return D.push(ne)});D.length>0;){var I=O(),_=N(I,P);if(_)I.outgoers().filter(function(ne){return ne.isNode()&&n.has(ne)}).forEach(L);else if(_===null){Ae("Detected double maximal shift for node `"+I.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}S();var M=0;if(e.avoidOverlap)for(var F=0;F<a.length;F++){var V=a[F],H=V.layoutDimensions(e),$=H.w,z=H.h;M=Math.max(M,$,z)}var j={},ee=function(se){if(j[se.id()])return j[se.id()];for(var ue=Fa(se).depth,pe=se.neighborhood(),de=0,me=0,Ne=0;Ne<pe.length;Ne++){var De=pe[Ne];if(!(De.isEdge()||De.isParent()||!a.has(De))){var Ee=Fa(De);if(Ee!=null){var Pe=Ee.index,te=Ee.depth;if(!(Pe==null||te==null)){var T=m[te].length;te<ue&&(de+=Pe/T,me++)}}}}return me=Math.max(1,me),de=de/me,me===0&&(de=0),j[se.id()]=de,de},J=function(se,ue){var pe=ee(se),de=ee(ue),me=pe-de;return me===0?Eh(se.id(),ue.id()):me};e.depthSort!==void 0&&(J=e.depthSort);for(var Z=0;Z<m.length;Z++)m[Z].sort(J),B(Z);for(var re=[],Y=0;Y<x.length;Y++)re.push(x[Y]);m.unshift(re),S();for(var A=0,K=0;K<m.length;K++)A=Math.max(m[K].length,A);var W={x:u.x1+u.w/2,y:u.x1+u.h/2},oe=m.reduce(function(ne,se){return Math.max(ne,se.length)},0),he=function(se){var ue=Fa(se),pe=ue.depth,de=ue.index,me=m[pe].length,Ne=Math.max(u.w/((e.grid?oe:me)+1),M),De=Math.max(u.h/(m.length+1),M),Ee=Math.min(u.w/2/m.length,u.h/2/m.length);if(Ee=Math.max(Ee,M),e.circle){var te=Ee*pe+Ee-(m.length>0&&m[0].length<=3?Ee/2:0),T=2*Math.PI/m[pe].length*de;return pe===0&&m[0].length===1&&(te=1),{x:W.x+te*Math.cos(T),y:W.y+te*Math.sin(T)}}else{var Pe={x:W.x+(de+1-(me+1)/2)*Ne,y:(pe+1)*De};return Pe}};return n.nodes().layoutPositions(this,e,he),this};var u3={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function gv(t){this.options=xe({},u3,t)}gv.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var o=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,c=u/Math.max(1,i.length-1),d,f=0,p=0;p<i.length;p++){var v=i[p],h=v.layoutDimensions(e),g=h.w,y=h.h;f=Math.max(f,g,y)}if(le(e.radius)?d=e.radius:i.length<=1?d=0:d=Math.min(o.h,o.w)/2-f,i.length>1&&e.avoidOverlap){f*=1.75;var m=Math.cos(c)-Math.cos(0),b=Math.sin(c)-Math.sin(0),w=Math.sqrt(f*f/(m*m+b*b));d=Math.max(w,d)}var C=function(E,k){var B=e.startAngle+k*c*(a?1:-1),S=d*Math.cos(B),N=d*Math.sin(B),D={x:l.x+S,y:l.y+N};return D};return n.nodes().layoutPositions(this,e,C),this};var d3={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function mv(t){this.options=xe({},d3,t)}mv.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,a=e.eles,i=a.nodes().not(":parent"),o=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=[],c=0,d=0;d<i.length;d++){var f=i[d],p=void 0;p=e.concentric(f),u.push({value:p,node:f}),f._private.scratch.concentric=p}i.updateStyle();for(var v=0;v<i.length;v++){var h=i[v],g=h.layoutDimensions(e);c=Math.max(c,g.w,g.h)}u.sort(function(ne,se){return se.value-ne.value});for(var y=e.levelWidth(i),m=[[]],b=m[0],w=0;w<u.length;w++){var C=u[w];if(b.length>0){var x=Math.abs(b[0].value-C.value);x>=y&&(b=[],m.push(b))}b.push(C)}var E=c+e.minNodeSpacing;if(!e.avoidOverlap){var k=m.length>0&&m[0].length>1,B=Math.min(o.w,o.h)/2-E,S=B/(m.length+k?1:0);E=Math.min(E,S)}for(var N=0,D=0;D<m.length;D++){var P=m[D],L=e.sweep===void 0?2*Math.PI-2*Math.PI/P.length:e.sweep,O=P.dTheta=L/Math.max(1,P.length-1);if(P.length>1&&e.avoidOverlap){var I=Math.cos(O)-Math.cos(0),_=Math.sin(O)-Math.sin(0),M=Math.sqrt(E*E/(I*I+_*_));N=Math.max(M,N)}P.r=N,N+=E}if(e.equidistant){for(var F=0,V=0,H=0;H<m.length;H++){var $=m[H],z=$.r-V;F=Math.max(F,z)}V=0;for(var j=0;j<m.length;j++){var ee=m[j];j===0&&(V=ee.r),ee.r=V,V+=F}}for(var J={},Z=0;Z<m.length;Z++)for(var re=m[Z],Y=re.dTheta,A=re.r,K=0;K<re.length;K++){var W=re[K],oe=e.startAngle+(r?1:-1)*Y*K,he={x:l.x+A*Math.cos(oe),y:l.y+A*Math.sin(oe)};J[W.node.id()]=he}return a.nodes().layoutPositions(this,e,function(ne){var se=ne.id();return J[se]}),this};var Cc,f3={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,r){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function vs(t){this.options=xe({},f3,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(a){var i=a.source().data("id"),o=a.target().data("id"),l=e.some(function(c){return c.data("id")===i}),u=e.some(function(c){return c.data("id")===o});return!l||!u});this.options.eles=this.options.eles.not(n)}vs.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,(t.animate===!0||t.animate===!1)&&r.emit({type:"layoutstart",layout:r}),t.debug===!0?Cc=!0:Cc=!1;var n=h3(e,r,t);Cc&&g3(n),t.randomize&&m3(n);var a=Vr(),i=function(){y3(n,e,t),t.fit===!0&&e.fit(t.padding)},o=function(p){return!(r.stopped||p>=t.numIter||(b3(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature<t.minTemp))},l=function(){if(t.animate===!0||t.animate===!1)i(),r.one("layoutstop",t.stop),r.emit({type:"layoutstop",layout:r});else{var p=t.eles.nodes(),v=yv(n,t,p);p.layoutPositions(r,t,v)}},u=0,c=!0;if(t.animate===!0){var d=function f(){for(var p=0;c&&p<t.refresh;)c=o(u),u++,p++;if(!c)wv(n,t),l();else{var v=Vr();v-a>=t.animationThreshold&&i(),Lo(f)}};d()}else{for(;c;)c=o(u),u++;wv(n,t),l()}return this},vs.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},vs.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var h3=function(e,r,n){for(var a=n.eles.edges(),i=n.eles.nodes(),o=zt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),l={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:a.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},u=n.eles.components(),c={},d=0;d<u.length;d++)for(var f=u[d],p=0;p<f.length;p++){var v=f[p];c[v.id()]=d}for(var d=0;d<l.nodeSize;d++){var h=i[d],g=h.layoutDimensions(n),y={};y.isLocked=h.locked(),y.id=h.data("id"),y.parentId=h.data("parent"),y.cmptId=c[h.id()],y.children=[],y.positionX=h.position("x"),y.positionY=h.position("y"),y.offsetX=0,y.offsetY=0,y.height=g.w,y.width=g.h,y.maxX=y.positionX+y.width/2,y.minX=y.positionX-y.width/2,y.maxY=y.positionY+y.height/2,y.minY=y.positionY-y.height/2,y.padLeft=parseFloat(h.style("padding")),y.padRight=parseFloat(h.style("padding")),y.padTop=parseFloat(h.style("padding")),y.padBottom=parseFloat(h.style("padding")),y.nodeRepulsion=Ye(n.nodeRepulsion)?n.nodeRepulsion(h):n.nodeRepulsion,l.layoutNodes.push(y),l.idToIndex[y.id]=d}for(var m=[],b=0,w=-1,C=[],d=0;d<l.nodeSize;d++){var h=l.layoutNodes[d],x=h.parentId;x!=null?l.layoutNodes[l.idToIndex[x]].children.push(h.id):(m[++w]=h.id,C.push(h.id))}for(l.graphSet.push(C);b<=w;){var E=m[b++],k=l.idToIndex[E],v=l.layoutNodes[k],B=v.children;if(B.length>0){l.graphSet.push(B);for(var d=0;d<B.length;d++)m[++w]=B[d]}}for(var d=0;d<l.graphSet.length;d++)for(var S=l.graphSet[d],p=0;p<S.length;p++){var N=l.idToIndex[S[p]];l.indexToGraph[N]=d}for(var d=0;d<l.edgeSize;d++){var D=a[d],P={};P.id=D.data("id"),P.sourceId=D.data("source"),P.targetId=D.data("target");var L=Ye(n.idealEdgeLength)?n.idealEdgeLength(D):n.idealEdgeLength,O=Ye(n.edgeElasticity)?n.edgeElasticity(D):n.edgeElasticity,I=l.idToIndex[P.sourceId],_=l.idToIndex[P.targetId],M=l.indexToGraph[I],F=l.indexToGraph[_];if(M!=F){for(var V=p3(P.sourceId,P.targetId,l),H=l.graphSet[V],$=0,y=l.layoutNodes[I];H.indexOf(y.id)===-1;)y=l.layoutNodes[l.idToIndex[y.parentId]],$++;for(y=l.layoutNodes[_];H.indexOf(y.id)===-1;)y=l.layoutNodes[l.idToIndex[y.parentId]],$++;L*=$*n.nestingFactor}P.idealLength=L,P.elasticity=O,l.layoutEdges.push(P)}return l},p3=function(e,r,n){var a=v3(e,r,0,n);return 2>a.count?0:a.graph},v3=function t(e,r,n,a){var i=a.graphSet[n];if(-1<i.indexOf(e)&&-1<i.indexOf(r))return{count:2,graph:n};for(var o=0,l=0;l<i.length;l++){var u=i[l],c=a.idToIndex[u],d=a.layoutNodes[c].children;if(d.length!==0){var f=a.indexToGraph[a.idToIndex[d[0]]],p=t(e,r,f,a);if(p.count!==0)if(p.count===1){if(o++,o===2)break}else return p}}return{count:o,graph:n}},g3,m3=function(e,r){for(var n=e.clientWidth,a=e.clientHeight,i=0;i<e.nodeSize;i++){var o=e.layoutNodes[i];o.children.length===0&&!o.isLocked&&(o.positionX=Math.random()*n,o.positionY=Math.random()*a)}},yv=function(e,r,n){var a=e.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(n.forEach(function(o){var l=e.layoutNodes[e.idToIndex[o.data("id")]];i.x1=Math.min(i.x1,l.positionX),i.x2=Math.max(i.x2,l.positionX),i.y1=Math.min(i.y1,l.positionY),i.y2=Math.max(i.y2,l.positionY)}),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(o,l){var u=e.layoutNodes[e.idToIndex[o.data("id")]];if(r.boundingBox){var c=(u.positionX-i.x1)/i.w,d=(u.positionY-i.y1)/i.h;return{x:a.x1+c*a.w,y:a.y1+d*a.h}}else return{x:u.positionX,y:u.positionY}}},y3=function(e,r,n){var a=n.layout,i=n.eles.nodes(),o=yv(e,n,i);i.positions(o),e.ready!==!0&&(e.ready=!0,a.one("layoutready",n.ready),a.emit({type:"layoutready",layout:this}))},b3=function(e,r,n){w3(e,r),x3(e),E3(e,r),S3(e),T3(e)},w3=function(e,r){for(var n=0;n<e.graphSet.length;n++)for(var a=e.graphSet[n],i=a.length,o=0;o<i;o++)for(var l=e.layoutNodes[e.idToIndex[a[o]]],u=o+1;u<i;u++){var c=e.layoutNodes[e.idToIndex[a[u]]];C3(l,c,e,r)}},bv=function(e){return-e+2*e*Math.random()},C3=function(e,r,n,a){var i=e.cmptId,o=r.cmptId;if(!(i!==o&&!n.isCompound)){var l=r.positionX-e.positionX,u=r.positionY-e.positionY,c=1;l===0&&u===0&&(l=bv(c),u=bv(c));var d=k3(e,r,l,u);if(d>0)var f=a.nodeOverlap*d,p=Math.sqrt(l*l+u*u),v=f*l/p,h=f*u/p;else var g=gs(e,l,u),y=gs(r,-1*l,-1*u),m=y.x-g.x,b=y.y-g.y,w=m*m+b*b,p=Math.sqrt(w),f=(e.nodeRepulsion+r.nodeRepulsion)/w,v=f*m/p,h=f*b/p;e.isLocked||(e.offsetX-=v,e.offsetY-=h),r.isLocked||(r.offsetX+=v,r.offsetY+=h)}},k3=function(e,r,n,a){if(n>0)var i=e.maxX-r.minX;else var i=r.maxX-e.minX;if(a>0)var o=e.maxY-r.minY;else var o=r.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},gs=function(e,r,n){var a=e.positionX,i=e.positionY,o=e.height||1,l=e.width||1,u=n/r,c=o/l,d={};return r===0&&0<n||r===0&&0>n?(d.x=a,d.y=i+o/2,d):0<r&&-1*c<=u&&u<=c?(d.x=a+l/2,d.y=i+l*n/2/r,d):0>r&&-1*c<=u&&u<=c?(d.x=a-l/2,d.y=i-l*n/2/r,d):0<n&&(u<=-1*c||u>=c)?(d.x=a+o*r/2/n,d.y=i+o/2,d):(0>n&&(u<=-1*c||u>=c)&&(d.x=a-o*r/2/n,d.y=i-o/2),d)},x3=function(e,r){for(var n=0;n<e.edgeSize;n++){var a=e.layoutEdges[n],i=e.idToIndex[a.sourceId],o=e.layoutNodes[i],l=e.idToIndex[a.targetId],u=e.layoutNodes[l],c=u.positionX-o.positionX,d=u.positionY-o.positionY;if(!(c===0&&d===0)){var f=gs(o,c,d),p=gs(u,-1*c,-1*d),v=p.x-f.x,h=p.y-f.y,g=Math.sqrt(v*v+h*h),y=Math.pow(a.idealLength-g,2)/a.elasticity;if(g!==0)var m=y*v/g,b=y*h/g;else var m=0,b=0;o.isLocked||(o.offsetX+=m,o.offsetY+=b),u.isLocked||(u.offsetX-=m,u.offsetY-=b)}}},E3=function(e,r){if(r.gravity!==0)for(var n=1,a=0;a<e.graphSet.length;a++){var i=e.graphSet[a],o=i.length;if(a===0)var l=e.clientHeight/2,u=e.clientWidth/2;else var c=e.layoutNodes[e.idToIndex[i[0]]],d=e.layoutNodes[e.idToIndex[c.parentId]],l=d.positionX,u=d.positionY;for(var f=0;f<o;f++){var p=e.layoutNodes[e.idToIndex[i[f]]];if(!p.isLocked){var v=l-p.positionX,h=u-p.positionY,g=Math.sqrt(v*v+h*h);if(g>n){var y=r.gravity*v/g,m=r.gravity*h/g;p.offsetX+=y,p.offsetY+=m}}}}},S3=function(e,r){var n=[],a=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;a<=i;){var o=n[a++],l=e.idToIndex[o],u=e.layoutNodes[l],c=u.children;if(0<c.length&&!u.isLocked){for(var d=u.offsetX,f=u.offsetY,p=0;p<c.length;p++){var v=e.layoutNodes[e.idToIndex[c[p]]];v.offsetX+=d,v.offsetY+=f,n[++i]=c[p]}u.offsetX=0,u.offsetY=0}}},T3=function(e,r){for(var n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];0<a.children.length&&(a.maxX=void 0,a.minX=void 0,a.maxY=void 0,a.minY=void 0)}for(var n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];if(!(0<a.children.length||a.isLocked)){var i=B3(a.offsetX,a.offsetY,e.temperature);a.positionX+=i.x,a.positionY+=i.y,a.offsetX=0,a.offsetY=0,a.minX=a.positionX-a.width,a.maxX=a.positionX+a.width,a.minY=a.positionY-a.height,a.maxY=a.positionY+a.height,N3(a,e)}}for(var n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];0<a.children.length&&!a.isLocked&&(a.positionX=(a.maxX+a.minX)/2,a.positionY=(a.maxY+a.minY)/2,a.width=a.maxX-a.minX,a.height=a.maxY-a.minY)}},B3=function(e,r,n){var a=Math.sqrt(e*e+r*r);if(a>n)var i={x:n*e/a,y:n*r/a};else var i={x:e,y:r};return i},N3=function t(e,r){var n=e.parentId;if(n!=null){var a=r.layoutNodes[r.idToIndex[n]],i=!1;if((a.maxX==null||e.maxX+a.padRight>a.maxX)&&(a.maxX=e.maxX+a.padRight,i=!0),(a.minX==null||e.minX-a.padLeft<a.minX)&&(a.minX=e.minX-a.padLeft,i=!0),(a.maxY==null||e.maxY+a.padBottom>a.maxY)&&(a.maxY=e.maxY+a.padBottom,i=!0),(a.minY==null||e.minY-a.padTop<a.minY)&&(a.minY=e.minY-a.padTop,i=!0),i)return t(a,r)}},wv=function(e,r){for(var n=e.layoutNodes,a=[],i=0;i<n.length;i++){var o=n[i],l=o.cmptId,u=a[l]=a[l]||[];u.push(o)}for(var c=0,i=0;i<a.length;i++){var d=a[i];if(d){d.x1=1/0,d.x2=-1/0,d.y1=1/0,d.y2=-1/0;for(var f=0;f<d.length;f++){var p=d[f];d.x1=Math.min(d.x1,p.positionX-p.width/2),d.x2=Math.max(d.x2,p.positionX+p.width/2),d.y1=Math.min(d.y1,p.positionY-p.height/2),d.y2=Math.max(d.y2,p.positionY+p.height/2)}d.w=d.x2-d.x1,d.h=d.y2-d.y1,c+=d.w*d.h}}a.sort(function(b,w){return w.w*w.h-b.w*b.h});for(var v=0,h=0,g=0,y=0,m=Math.sqrt(c)*e.clientWidth/e.clientHeight,i=0;i<a.length;i++){var d=a[i];if(d){for(var f=0;f<d.length;f++){var p=d[f];p.isLocked||(p.positionX+=v-d.x1,p.positionY+=h-d.y1)}v+=d.w+r.componentSpacing,g+=d.w+r.componentSpacing,y=Math.max(y,d.h),g>m&&(h+=y+r.componentSpacing,v=0,g=0,y=0)}}},D3={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function Cv(t){this.options=xe({},D3,t)}Cv.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));var i=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(i.h===0||i.w===0)n.nodes().layoutPositions(this,e,function(j){return{x:i.x1,y:i.y1}});else{var o=a.size(),l=Math.sqrt(o*i.h/i.w),u=Math.round(l),c=Math.round(i.w/i.h*l),d=function(ee){if(ee==null)return Math.min(u,c);var J=Math.min(u,c);J==u?u=ee:c=ee},f=function(ee){if(ee==null)return Math.max(u,c);var J=Math.max(u,c);J==u?u=ee:c=ee},p=e.rows,v=e.cols!=null?e.cols:e.columns;if(p!=null&&v!=null)u=p,c=v;else if(p!=null&&v==null)u=p,c=Math.ceil(o/u);else if(p==null&&v!=null)c=v,u=Math.ceil(o/c);else if(c*u>o){var h=d(),g=f();(h-1)*g>=o?d(h-1):(g-1)*h>=o&&f(g-1)}else for(;c*u<o;){var y=d(),m=f();(m+1)*y>=o?f(m+1):d(y+1)}var b=i.w/c,w=i.h/u;if(e.condense&&(b=0,w=0),e.avoidOverlap)for(var C=0;C<a.length;C++){var x=a[C],E=x._private.position;(E.x==null||E.y==null)&&(E.x=0,E.y=0);var k=x.layoutDimensions(e),B=e.avoidOverlapPadding,S=k.w+B,N=k.h+B;b=Math.max(b,S),w=Math.max(w,N)}for(var D={},P=function(ee,J){return!!D["c-"+ee+"-"+J]},L=function(ee,J){D["c-"+ee+"-"+J]=!0},O=0,I=0,_=function(){I++,I>=c&&(I=0,O++)},M={},F=0;F<a.length;F++){var V=a[F],H=e.position(V);if(H&&(H.row!==void 0||H.col!==void 0)){var $={row:H.row,col:H.col};if($.col===void 0)for($.col=0;P($.row,$.col);)$.col++;else if($.row===void 0)for($.row=0;P($.row,$.col);)$.row++;M[V.id()]=$,L($.row,$.col)}}var z=function(ee,J){var Z,re;if(ee.locked()||ee.isParent())return!1;var Y=M[ee.id()];if(Y)Z=Y.col*b+b/2+i.x1,re=Y.row*w+w/2+i.y1;else{for(;P(O,I);)_();Z=I*b+b/2+i.x1,re=O*w+w/2+i.y1,L(O,I),_()}return{x:Z,y:re}};a.layoutPositions(this,e,z)}return this};var P3={ready:function(){},stop:function(){}};function kc(t){this.options=xe({},P3,t)}kc.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),r.one("layoutready",t.ready),r.emit("layoutready"),r.one("layoutstop",t.stop),r.emit("layoutstop"),this},kc.prototype.stop=function(){return this};var O3={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function kv(t){this.options=xe({},O3,t)}kv.prototype.run=function(){var t=this.options,e=t.eles,r=e.nodes(),n=Ye(t.positions);function a(i){if(t.positions==null)return MB(i.position());if(n)return t.positions(i);var o=t.positions[i._private.data.id];return o??null}return r.layoutPositions(this,t,function(i,o){var l=a(i);return i.locked()||l==null?!1:l}),this};var _3={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function xv(t){this.options=xe({},_3,t)}xv.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=zt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),a=function(o,l){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}};return r.nodes().layoutPositions(this,t,a),this};var L3=[{name:"breadthfirst",impl:vv},{name:"circle",impl:gv},{name:"concentric",impl:mv},{name:"cose",impl:vs},{name:"grid",impl:Cv},{name:"null",impl:kc},{name:"preset",impl:kv},{name:"random",impl:xv}];function Ev(t){this.options=t,this.notifications=0}var Sv=function(){},Tv=function(){throw new Error("A headless instance can not render images")};Ev.prototype={recalculateRenderedStyle:Sv,notify:function(){this.notifications++},init:Sv,isHeadless:function(){return!0},png:Tv,jpg:Tv};var xc={};xc.arrowShapeWidth=.3,xc.registerArrowShapes=function(){var t=this.arrowShapes={},e=this,r=function(c,d,f,p,v,h,g){var y=v.x-f/2-g,m=v.x+f/2+g,b=v.y-f/2-g,w=v.y+f/2+g,C=y<=c&&c<=m&&b<=d&&d<=w;return C},n=function(c,d,f,p,v){var h=c*Math.cos(p)-d*Math.sin(p),g=c*Math.sin(p)+d*Math.cos(p),y=h*f,m=g*f,b=y+v.x,w=m+v.y;return{x:b,y:w}},a=function(c,d,f,p){for(var v=[],h=0;h<c.length;h+=2){var g=c[h],y=c[h+1];v.push(n(g,y,d,f,p))}return v},i=function(c){for(var d=[],f=0;f<c.length;f++){var p=c[f];d.push(p.x,p.y)}return d},o=function(c){return c.pstyle("width").pfValue*c.pstyle("arrow-scale").pfValue*2},l=function(c,d){be(d)&&(d=t[d]),t[c]=xe({name:c,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(p,v,h,g,y,m){var b=i(a(this.points,h+2*m,g,y)),w=Ht(p,v,b);return w},roughCollide:r,draw:function(p,v,h,g){var y=a(this.points,v,h,g);e.arrowShapeImpl("polygon")(p,y)},spacing:function(p){return 0},gap:o},d)};l("none",{collide:Mo,roughCollide:Mo,draw:Gl,spacing:Vh,gap:Vh}),l("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),l("arrow","triangle"),l("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:function(c,d,f,p,v){var h=a(this.points,d,f,p),g=this.controlPoint,y=n(g[0],g[1],d,f,p);e.arrowShapeImpl(this.name)(c,h,y)},gap:function(c){return o(c)*.8}}),l("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(c,d,f,p,v,h,g){var y=i(a(this.points,f+2*g,p,v)),m=i(a(this.pointsTee,f+2*g,p,v)),b=Ht(c,d,y)||Ht(c,d,m);return b},draw:function(c,d,f,p,v){var h=a(this.points,d,f,p),g=a(this.pointsTee,d,f,p);e.arrowShapeImpl(this.name)(c,h,g)}}),l("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(c,d,f,p,v,h,g){var y=v,m=Math.pow(y.x-c,2)+Math.pow(y.y-d,2)<=Math.pow((f+2*g)*this.radius,2),b=i(a(this.points,f+2*g,p,v));return Ht(c,d,b)||m},draw:function(c,d,f,p,v){var h=a(this.pointsTr,d,f,p);e.arrowShapeImpl(this.name)(c,h,p.x,p.y,this.radius*d)},spacing:function(c){return e.getArrowWidth(c.pstyle("width").pfValue,c.pstyle("arrow-scale").value)*this.radius}}),l("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(c,d){var f=this.baseCrossLinePts.slice(),p=d/c,v=3,h=5;return f[v]=f[v]-p,f[h]=f[h]-p,f},collide:function(c,d,f,p,v,h,g){var y=i(a(this.points,f+2*g,p,v)),m=i(a(this.crossLinePts(f,h),f+2*g,p,v)),b=Ht(c,d,y)||Ht(c,d,m);return b},draw:function(c,d,f,p,v){var h=a(this.points,d,f,p),g=a(this.crossLinePts(d,v),d,f,p);e.arrowShapeImpl(this.name)(c,h,g)}}),l("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(c){return o(c)*.525}}),l("circle",{radius:.15,collide:function(c,d,f,p,v,h,g){var y=v,m=Math.pow(y.x-c,2)+Math.pow(y.y-d,2)<=Math.pow((f+2*g)*this.radius,2);return m},draw:function(c,d,f,p,v){e.arrowShapeImpl(this.name)(c,p.x,p.y,this.radius*d)},spacing:function(c){return e.getArrowWidth(c.pstyle("width").pfValue,c.pstyle("arrow-scale").value)*this.radius}}),l("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(c){return 1},gap:function(c){return 1}}),l("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),l("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(c){return c.pstyle("width").pfValue*c.pstyle("arrow-scale").value}}),l("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(c){return .95*c.pstyle("width").pfValue*c.pstyle("arrow-scale").value}})};var Kn={};Kn.projectIntoViewport=function(t,e){var r=this.cy,n=this.findContainerClientCoords(),a=n[0],i=n[1],o=n[4],l=r.pan(),u=r.zoom(),c=((t-a)/o-l.x)/u,d=((e-i)/o-l.y)/u;return[c,d]},Kn.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=this.cy.window().getComputedStyle(t),n=function(m){return parseFloat(r.getPropertyValue(m))},a={left:n("padding-left"),right:n("padding-right"),top:n("padding-top"),bottom:n("padding-bottom")},i={left:n("border-left-width"),right:n("border-right-width"),top:n("border-top-width"),bottom:n("border-bottom-width")},o=t.clientWidth,l=t.clientHeight,u=a.left+a.right,c=a.top+a.bottom,d=i.left+i.right,f=e.width/(o+d),p=o-u,v=l-c,h=e.left+a.left+i.left,g=e.top+a.top+i.top;return this.containerBB=[h,g,p,v,f]},Kn.invalidateContainerClientCoordsCache=function(){this.containerBB=null},Kn.findNearestElement=function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0]},Kn.findNearestElements=function(t,e,r,n){var a=this,i=this,o=i.getCachedZSortedEles(),l=[],u=i.cy.zoom(),c=i.cy.hasCompoundNodes(),d=(n?24:8)/u,f=(n?8:2)/u,p=(n?8:2)/u,v=1/0,h,g;r&&(o=o.interactive);function y(k,B){if(k.isNode()){if(g)return;g=k,l.push(k)}if(k.isEdge()&&(B==null||B<v))if(h){if(h.pstyle("z-compound-depth").value===k.pstyle("z-compound-depth").value&&h.pstyle("z-compound-depth").value===k.pstyle("z-compound-depth").value){for(var S=0;S<l.length;S++)if(l[S].isEdge()){l[S]=k,h=k,v=B??v;break}}}else l.push(k),h=k,v=B??v}function m(k){var B=k.outerWidth()+2*f,S=k.outerHeight()+2*f,N=B/2,D=S/2,P=k.position(),L=k.pstyle("corner-radius").value==="auto"?"auto":k.pstyle("corner-radius").pfValue,O=k._private.rscratch;if(P.x-N<=t&&t<=P.x+N&&P.y-D<=e&&e<=P.y+D){var I=i.nodeShapes[a.getNodeShape(k)];if(I.checkPoint(t,e,0,B,S,P.x,P.y,L,O))return y(k,0),!0}}function b(k){var B=k._private,S=B.rscratch,N=k.pstyle("width").pfValue,D=k.pstyle("arrow-scale").value,P=N/2+d,L=P*P,O=P*2,F=B.source,V=B.target,I;if(S.edgeType==="segments"||S.edgeType==="straight"||S.edgeType==="haystack"){for(var _=S.allpts,M=0;M+3<_.length;M+=2)if(jB(t,e,_[M],_[M+1],_[M+2],_[M+3],O)&&L>(I=JB(t,e,_[M],_[M+1],_[M+2],_[M+3])))return y(k,I),!0}else if(S.edgeType==="bezier"||S.edgeType==="multibezier"||S.edgeType==="self"||S.edgeType==="compound"){for(var _=S.allpts,M=0;M+5<S.allpts.length;M+=4)if(YB(t,e,_[M],_[M+1],_[M+2],_[M+3],_[M+4],_[M+5],O)&&L>(I=QB(t,e,_[M],_[M+1],_[M+2],_[M+3],_[M+4],_[M+5])))return y(k,I),!0}for(var F=F||B.source,V=V||B.target,H=a.getArrowWidth(N,D),$=[{name:"source",x:S.arrowStartX,y:S.arrowStartY,angle:S.srcArrowAngle},{name:"target",x:S.arrowEndX,y:S.arrowEndY,angle:S.tgtArrowAngle},{name:"mid-source",x:S.midX,y:S.midY,angle:S.midsrcArrowAngle},{name:"mid-target",x:S.midX,y:S.midY,angle:S.midtgtArrowAngle}],M=0;M<$.length;M++){var z=$[M],j=i.arrowShapes[k.pstyle(z.name+"-arrow-shape").value],ee=k.pstyle("width").pfValue;if(j.roughCollide(t,e,H,z.angle,{x:z.x,y:z.y},ee,d)&&j.collide(t,e,H,z.angle,{x:z.x,y:z.y},ee,d))return y(k),!0}c&&l.length>0&&(m(F),m(V))}function w(k,B,S){return lr(k,B,S)}function C(k,B){var S=k._private,N=p,D;B?D=B+"-":D="",k.boundingBox();var P=S.labelBounds[B||"main"],L=k.pstyle(D+"label").value,O=k.pstyle("text-events").strValue==="yes";if(!(!O||!L)){var I=w(S.rscratch,"labelX",B),_=w(S.rscratch,"labelY",B),M=w(S.rscratch,"labelAngle",B),F=k.pstyle(D+"text-margin-x").pfValue,V=k.pstyle(D+"text-margin-y").pfValue,H=P.x1-N-F,$=P.x2+N-F,z=P.y1-N-V,j=P.y2+N-V;if(M){var ee=Math.cos(M),J=Math.sin(M),Z=function(he,ne){return he=he-I,ne=ne-_,{x:he*ee-ne*J+I,y:he*J+ne*ee+_}},re=Z(H,z),Y=Z(H,j),A=Z($,z),K=Z($,j),W=[re.x+F,re.y+V,A.x+F,A.y+V,K.x+F,K.y+V,Y.x+F,Y.y+V];if(Ht(t,e,W))return y(k),!0}else if(ba(P,t,e))return y(k),!0}}for(var x=o.length-1;x>=0;x--){var E=o[x];E.isNode()?m(E)||C(E):b(E)||C(E)||C(E,"source")||C(E,"target")}return l},Kn.getAllInBox=function(t,e,r,n){var a=this.getCachedZSortedEles().interactive,i=[],o=Math.min(t,r),l=Math.max(t,r),u=Math.min(e,n),c=Math.max(e,n);t=o,r=l,e=u,n=c;for(var d=zt({x1:t,y1:e,x2:r,y2:n}),f=0;f<a.length;f++){var p=a[f];if(p.isNode()){var v=p,h=v.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});Xl(d,h)&&!Wh(h,d)&&i.push(v)}else{var g=p,y=g._private,m=y.rscratch;if(m.startX!=null&&m.startY!=null&&!ba(d,m.startX,m.startY)||m.endX!=null&&m.endY!=null&&!ba(d,m.endX,m.endY))continue;if(m.edgeType==="bezier"||m.edgeType==="multibezier"||m.edgeType==="self"||m.edgeType==="compound"||m.edgeType==="segments"||m.edgeType==="haystack"){for(var b=y.rstyle.bezierPts||y.rstyle.linePts||y.rstyle.haystackPts,w=!0,C=0;C<b.length;C++)if(!WB(d,b[C])){w=!1;break}w&&i.push(g)}else(m.edgeType==="haystack"||m.edgeType==="straight")&&i.push(g)}}return i};var ms={};ms.calculateArrowAngles=function(t){var e=t._private.rscratch,r=e.edgeType==="haystack",n=e.edgeType==="bezier",a=e.edgeType==="multibezier",i=e.edgeType==="segments",o=e.edgeType==="compound",l=e.edgeType==="self",u,c,d,f,p,v,m,b;if(r?(d=e.haystackPts[0],f=e.haystackPts[1],p=e.haystackPts[2],v=e.haystackPts[3]):(d=e.arrowStartX,f=e.arrowStartY,p=e.arrowEndX,v=e.arrowEndY),m=e.midX,b=e.midY,i)u=d-e.segpts[0],c=f-e.segpts[1];else if(a||o||l||n){var h=e.allpts,g=ft(h[0],h[2],h[4],.1),y=ft(h[1],h[3],h[5],.1);u=d-g,c=f-y}else u=d-m,c=f-b;e.srcArrowAngle=Vo(u,c);var m=e.midX,b=e.midY;if(r&&(m=(d+p)/2,b=(f+v)/2),u=p-d,c=v-f,i){var h=e.allpts;if(h.length/2%2===0){var w=h.length/2,C=w-2;u=h[w]-h[C],c=h[w+1]-h[C+1]}else if(e.isRound)u=e.midVector[1],c=-e.midVector[0];else{var w=h.length/2-1,C=w-2;u=h[w]-h[C],c=h[w+1]-h[C+1]}}else if(a||o||l){var h=e.allpts,x=e.ctrlpts,E,k,B,S;if(x.length/2%2===0){var N=h.length/2-1,D=N+2,P=D+2;E=ft(h[N],h[D],h[P],0),k=ft(h[N+1],h[D+1],h[P+1],0),B=ft(h[N],h[D],h[P],1e-4),S=ft(h[N+1],h[D+1],h[P+1],1e-4)}else{var D=h.length/2-1,N=D-2,P=D+2;E=ft(h[N],h[D],h[P],.4999),k=ft(h[N+1],h[D+1],h[P+1],.4999),B=ft(h[N],h[D],h[P],.5),S=ft(h[N+1],h[D+1],h[P+1],.5)}u=B-E,c=S-k}if(e.midtgtArrowAngle=Vo(u,c),e.midDispX=u,e.midDispY=c,u*=-1,c*=-1,i){var h=e.allpts;if(h.length/2%2!==0){if(!e.isRound){var w=h.length/2-1,L=w+2;u=-(h[L]-h[w]),c=-(h[L+1]-h[w+1])}}}if(e.midsrcArrowAngle=Vo(u,c),i)u=p-e.segpts[e.segpts.length-2],c=v-e.segpts[e.segpts.length-1];else if(a||o||l||n){var h=e.allpts,O=h.length,g=ft(h[O-6],h[O-4],h[O-2],.9),y=ft(h[O-5],h[O-3],h[O-1],.9);u=p-g,c=v-y}else u=p-m,c=v-b;e.tgtArrowAngle=Vo(u,c)},ms.getArrowWidth=ms.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},n=r[t+", "+e];return n||(n=Math.max(Math.pow(t*13.37,.9),29)*e,r[t+", "+e]=n,n)};var Ec,Sc,kr={},er={},Bv,Nv,qn,ys,zr,Un,Gn,xr,Ma,bs,Dv,Pv,Tc,Bc,Ov,_v=function(e,r,n){n.x=r.x-e.x,n.y=r.y-e.y,n.len=Math.sqrt(n.x*n.x+n.y*n.y),n.nx=n.x/n.len,n.ny=n.y/n.len,n.ang=Math.atan2(n.ny,n.nx)},F3=function(e,r){r.x=e.x*-1,r.y=e.y*-1,r.nx=e.nx*-1,r.ny=e.ny*-1,r.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang},M3=function(e,r,n,a,i){if(e!==Ov?_v(r,e,kr):F3(er,kr),_v(r,n,er),Bv=kr.nx*er.ny-kr.ny*er.nx,Nv=kr.nx*er.nx-kr.ny*-er.ny,zr=Math.asin(Math.max(-1,Math.min(1,Bv))),Math.abs(zr)<1e-6){Ec=r.x,Sc=r.y,Gn=Ma=0;return}qn=1,ys=!1,Nv<0?zr<0?zr=Math.PI+zr:(zr=Math.PI-zr,qn=-1,ys=!0):zr>0&&(qn=-1,ys=!0),r.radius!==void 0?Ma=r.radius:Ma=a,Un=zr/2,bs=Math.min(kr.len/2,er.len/2),i?(xr=Math.abs(Math.cos(Un)*Ma/Math.sin(Un)),xr>bs?(xr=bs,Gn=Math.abs(xr*Math.sin(Un)/Math.cos(Un))):Gn=Ma):(xr=Math.min(bs,Ma),Gn=Math.abs(xr*Math.sin(Un)/Math.cos(Un))),Tc=r.x+er.nx*xr,Bc=r.y+er.ny*xr,Ec=Tc-er.ny*Gn*qn,Sc=Bc+er.nx*Gn*qn,Dv=r.x+kr.nx*xr,Pv=r.y+kr.ny*xr,Ov=r};function Lv(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function Nc(t,e,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(M3(t,e,r,n,a),{cx:Ec,cy:Sc,radius:Gn,startX:Dv,startY:Pv,stopX:Tc,stopY:Bc,startAngle:kr.ang+Math.PI/2*qn,endAngle:er.ang-Math.PI/2*qn,counterClockwise:ys})}var Pt={};Pt.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,a=e.vectorNormInverse,i,o=t.pstyle("source-endpoint"),l=t.pstyle("target-endpoint"),u=o.units!=null&&l.units!=null,c=function(x,E,k,B){var S=B-E,N=k-x,D=Math.sqrt(N*N+S*S);return{x:-S/D,y:N/D}},d=t.pstyle("edge-distances").value;switch(d){case"node-position":i=r;break;case"intersection":i=n;break;case"endpoints":{if(u){var f=this.manualEndptToPx(t.source()[0],o),p=sr(f,2),v=p[0],h=p[1],g=this.manualEndptToPx(t.target()[0],l),y=sr(g,2),m=y[0],b=y[1],w={x1:v,y1:h,x2:m,y2:b};a=c(v,h,m,b),i=w}else Ae("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=n;break}}return{midptPts:i,vectorNormInverse:a}},Pt.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r._private,a=n.rscratch;if(!a.haystack){var i=Math.random()*2*Math.PI;a.source={x:Math.cos(i),y:Math.sin(i)},i=Math.random()*2*Math.PI,a.target={x:Math.cos(i),y:Math.sin(i)}}var o=n.source,l=n.target,u=o.position(),c=l.position(),d=o.width(),f=l.width(),p=o.height(),v=l.height(),h=r.pstyle("haystack-radius").value,g=h/2;a.haystackPts=a.allpts=[a.source.x*d*g+u.x,a.source.y*p*g+u.y,a.target.x*f*g+c.x,a.target.y*v*g+c.y],a.midX=(a.allpts[0]+a.allpts[2])/2,a.midY=(a.allpts[1]+a.allpts[3])/2,a.edgeType="haystack",a.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},Pt.findSegmentsPoints=function(t,e){var r=t._private.rscratch,n=t.pstyle("segment-weights"),a=t.pstyle("segment-distances"),i=t.pstyle("segment-radii"),o=t.pstyle("radius-type"),l=Math.min(n.pfValue.length,a.pfValue.length),u=i.pfValue[i.pfValue.length-1],c=o.pfValue[o.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var d=0;d<l;d++){var f=n.pfValue[d],p=a.pfValue[d],v=1-f,h=f,g=this.findMidptPtsEtc(t,e),y=g.midptPts,m=g.vectorNormInverse,b={x:y.x1*v+y.x2*h,y:y.y1*v+y.y2*h};r.segpts.push(b.x+m.x*p,b.y+m.y*p),r.radii.push(i.pfValue[d]!==void 0?i.pfValue[d]:u),r.isArcRadius.push((o.pfValue[d]!==void 0?o.pfValue[d]:c)==="arc-radius")}},Pt.findLoopPoints=function(t,e,r,n){var a=t._private.rscratch,i=e.dirCounts,o=e.srcPos,l=t.pstyle("control-point-distances"),u=l?l.pfValue[0]:void 0,c=t.pstyle("loop-direction").pfValue,d=t.pstyle("loop-sweep").pfValue,f=t.pstyle("control-point-step-size").pfValue;a.edgeType="self";var p=r,v=f;n&&(p=0,v=u);var h=c-Math.PI/2,g=h-d/2,y=h+d/2,m=c+"_"+d;p=i[m]===void 0?i[m]=0:++i[m],a.ctrlpts=[o.x+Math.cos(g)*1.4*v*(p/3+1),o.y+Math.sin(g)*1.4*v*(p/3+1),o.x+Math.cos(y)*1.4*v*(p/3+1),o.y+Math.sin(y)*1.4*v*(p/3+1)]},Pt.findCompoundLoopPoints=function(t,e,r,n){var a=t._private.rscratch;a.edgeType="compound";var i=e.srcPos,o=e.tgtPos,l=e.srcW,u=e.srcH,c=e.tgtW,d=e.tgtH,f=t.pstyle("control-point-step-size").pfValue,p=t.pstyle("control-point-distances"),v=p?p.pfValue[0]:void 0,h=r,g=f;n&&(h=0,g=v);var y=50,m={x:i.x-l/2,y:i.y-u/2},b={x:o.x-c/2,y:o.y-d/2},w={x:Math.min(m.x,b.x),y:Math.min(m.y,b.y)},C=.5,x=Math.max(C,Math.log(l*.01)),E=Math.max(C,Math.log(c*.01));a.ctrlpts=[w.x,w.y-(1+Math.pow(y,1.12)/100)*g*(h/3+1)*x,w.x-(1+Math.pow(y,1.12)/100)*g*(h/3+1)*E,w.y]},Pt.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"},Pt.findBezierPoints=function(t,e,r,n,a){var i=t._private.rscratch,o=t.pstyle("control-point-step-size").pfValue,l=t.pstyle("control-point-distances"),u=t.pstyle("control-point-weights"),c=l&&u?Math.min(l.value.length,u.value.length):1,d=l?l.pfValue[0]:void 0,f=u.value[0],p=n;i.edgeType=p?"multibezier":"bezier",i.ctrlpts=[];for(var v=0;v<c;v++){var h=(.5-e.eles.length/2+r)*o*(a?-1:1),g=void 0,y=qh(h);p&&(d=l?l.pfValue[v]:o,f=u.value[v]),n?g=d:g=d!==void 0?y*d:void 0;var m=g!==void 0?g:h,b=1-f,w=f,C=this.findMidptPtsEtc(t,e),x=C.midptPts,E=C.vectorNormInverse,k={x:x.x1*b+x.x2*w,y:x.y1*b+x.y2*w};i.ctrlpts.push(k.x+E.x*m,k.y+E.y*m)}},Pt.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType="segments";var n="vertical",a="horizontal",i="leftward",o="rightward",l="downward",u="upward",c="auto",d=e.posPts,f=e.srcW,p=e.srcH,v=e.tgtW,h=e.tgtH,g=t.pstyle("edge-distances").value,y=g!=="node-position",m=t.pstyle("taxi-direction").value,b=m,w=t.pstyle("taxi-turn"),C=w.units==="%",x=w.pfValue,E=x<0,k=t.pstyle("taxi-turn-min-distance").pfValue,B=y?(f+v)/2:0,S=y?(p+h)/2:0,N=d.x2-d.x1,D=d.y2-d.y1,P=function(we,Ce){return we>0?Math.max(we-Ce,0):Math.min(we+Ce,0)},L=P(N,B),O=P(D,S),I=!1;b===c?m=Math.abs(L)>Math.abs(O)?a:n:b===u||b===l?(m=n,I=!0):(b===i||b===o)&&(m=a,I=!0);var _=m===n,M=_?O:L,F=_?D:N,V=qh(F),H=!1;!(I&&(C||E))&&(b===l&&F<0||b===u&&F>0||b===i&&F>0||b===o&&F<0)&&(V*=-1,M=V*Math.abs(M),H=!0);var $;if(C){var z=x<0?1+x:x;$=z*M}else{var j=x<0?M:0;$=j+x*V}var ee=function(we){return Math.abs(we)<k||Math.abs(we)>=Math.abs(M)},J=ee($),Z=ee(Math.abs(M)-Math.abs($)),re=J||Z;if(re&&!H)if(_){var Y=Math.abs(F)<=p/2,A=Math.abs(N)<=v/2;if(Y){var K=(d.x1+d.x2)/2,W=d.y1,oe=d.y2;r.segpts=[K,W,K,oe]}else if(A){var he=(d.y1+d.y2)/2,ne=d.x1,se=d.x2;r.segpts=[ne,he,se,he]}else r.segpts=[d.x1,d.y2]}else{var ue=Math.abs(F)<=f/2,pe=Math.abs(D)<=h/2;if(ue){var de=(d.y1+d.y2)/2,me=d.x1,Ne=d.x2;r.segpts=[me,de,Ne,de]}else if(pe){var De=(d.x1+d.x2)/2,Ee=d.y1,Pe=d.y2;r.segpts=[De,Ee,De,Pe]}else r.segpts=[d.x2,d.y1]}else if(_){var te=d.y1+$+(y?p/2*V:0),T=d.x1,R=d.x2;r.segpts=[T,te,R,te]}else{var Q=d.x1+$+(y?f/2*V:0),G=d.y1,U=d.y2;r.segpts=[Q,G,Q,U]}if(r.isRound){var ie=t.pstyle("taxi-radius").value,X=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(ie),r.isArcRadius=new Array(r.segpts.length/2).fill(X)}},Pt.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,a=e.tgtPos,i=e.srcW,o=e.srcH,l=e.tgtW,u=e.tgtH,c=e.srcShape,d=e.tgtShape,f=e.srcCornerRadius,p=e.tgtCornerRadius,v=e.srcRs,h=e.tgtRs,g=!le(r.startX)||!le(r.startY),y=!le(r.arrowStartX)||!le(r.arrowStartY),m=!le(r.endX)||!le(r.endY),b=!le(r.arrowEndX)||!le(r.arrowEndY),w=3,C=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,x=w*C,E=In({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),k=E<x,B=In({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),S=B<x,N=!1;if(g||y||k){N=!0;var D={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},P=Math.sqrt(D.x*D.x+D.y*D.y),L={x:D.x/P,y:D.y/P},O=Math.max(i,o),I={x:r.ctrlpts[0]+L.x*2*O,y:r.ctrlpts[1]+L.y*2*O},_=c.intersectLine(n.x,n.y,i,o,I.x,I.y,0,f,v);k?(r.ctrlpts[0]=r.ctrlpts[0]+L.x*(x-E),r.ctrlpts[1]=r.ctrlpts[1]+L.y*(x-E)):(r.ctrlpts[0]=_[0]+L.x*x,r.ctrlpts[1]=_[1]+L.y*x)}if(m||b||S){N=!0;var M={x:r.ctrlpts[0]-a.x,y:r.ctrlpts[1]-a.y},F=Math.sqrt(M.x*M.x+M.y*M.y),V={x:M.x/F,y:M.y/F},H=Math.max(i,o),$={x:r.ctrlpts[0]+V.x*2*H,y:r.ctrlpts[1]+V.y*2*H},z=d.intersectLine(a.x,a.y,l,u,$.x,$.y,0,p,h);S?(r.ctrlpts[0]=r.ctrlpts[0]+V.x*(x-B),r.ctrlpts[1]=r.ctrlpts[1]+V.y*(x-B)):(r.ctrlpts[0]=z[0]+V.x*x,r.ctrlpts[1]=z[1]+V.y*x)}N&&this.findEndpoints(t)}},Pt.storeAllpts=function(t){var e=t._private.rscratch;if(e.edgeType==="multibezier"||e.edgeType==="bezier"||e.edgeType==="self"||e.edgeType==="compound"){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);e.allpts.push(e.endX,e.endY);var n,a;e.ctrlpts.length/2%2===0?(n=e.allpts.length/2-1,e.midX=e.allpts[n],e.midY=e.allpts[n+1]):(n=e.allpts.length/2-3,a=.5,e.midX=ft(e.allpts[n],e.allpts[n+2],e.allpts[n+4],a),e.midY=ft(e.allpts[n+1],e.allpts[n+3],e.allpts[n+5],a))}else if(e.edgeType==="straight")e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if(e.edgeType==="segments"){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var i=2;i+3<e.allpts.length;i+=2){var o=e.radii[i/2-1],l=e.isArcRadius[i/2-1];e.roundCorners.push(Nc({x:e.allpts[i-2],y:e.allpts[i-1]},{x:e.allpts[i],y:e.allpts[i+1],radius:o},{x:e.allpts[i+2],y:e.allpts[i+3]},o,l))}}if(e.segpts.length%4===0){var u=e.segpts.length/2,c=u-2;e.midX=(e.segpts[c]+e.segpts[u])/2,e.midY=(e.segpts[c+1]+e.segpts[u+1])/2}else{var d=e.segpts.length/2-1;if(!e.isRound)e.midX=e.segpts[d],e.midY=e.segpts[d+1];else{var f={x:e.segpts[d],y:e.segpts[d+1]},p=e.roundCorners[d/2],v=[f.x-p.cx,f.y-p.cy],h=p.radius/Math.sqrt(Math.pow(v[0],2)+Math.pow(v[1],2));v=v.map(function(g){return g*h}),e.midX=p.cx+v[0],e.midY=p.cy+v[1],e.midVector=v}}}},Pt.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||le(e.startX)&&le(e.startY)&&le(e.endX)&&le(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,Ae("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},Pt.findEdgeControlPoints=function(t){var e=this;if(!(!t||t.length===0)){for(var r=this,n=r.cy,a=n.hasCompoundNodes(),i={map:new wr,get:function(k){var B=this.map.get(k[0]);return B!=null?B.get(k[1]):null},set:function(k,B){var S=this.map.get(k[0]);S==null&&(S=new wr,this.map.set(k[0],S)),S.set(k[1],B)}},o=[],l=[],u=0;u<t.length;u++){var c=t[u],d=c._private,f=c.pstyle("curve-style").value;if(!(c.removed()||!c.takesUpSpace())){if(f==="haystack"){l.push(c);continue}var p=f==="unbundled-bezier"||f.endsWith("segments")||f==="straight"||f==="straight-triangle"||f.endsWith("taxi"),v=f==="unbundled-bezier"||f==="bezier",h=d.source,g=d.target,y=h.poolIndex(),m=g.poolIndex(),b=[y,m].sort(),w=i.get(b);w==null&&(w={eles:[]},i.set(b,w),o.push(b)),w.eles.push(c),p&&(w.hasUnbundled=!0),v&&(w.hasBezier=!0)}}for(var C=function(k){var B=o[k],S=i.get(B),N=void 0;if(!S.hasUnbundled){var D=S.eles[0].parallelEdges().filter(function(Q){return Q.isBundledBezier()});Wl(S.eles),D.forEach(function(Q){return S.eles.push(Q)}),S.eles.sort(function(Q,G){return Q.poolIndex()-G.poolIndex()})}var P=S.eles[0],L=P.source(),O=P.target();if(L.poolIndex()>O.poolIndex()){var I=L;L=O,O=I}var _=S.srcPos=L.position(),M=S.tgtPos=O.position(),F=S.srcW=L.outerWidth(),V=S.srcH=L.outerHeight(),H=S.tgtW=O.outerWidth(),$=S.tgtH=O.outerHeight(),z=S.srcShape=r.nodeShapes[e.getNodeShape(L)],j=S.tgtShape=r.nodeShapes[e.getNodeShape(O)],ee=S.srcCornerRadius=L.pstyle("corner-radius").value==="auto"?"auto":L.pstyle("corner-radius").pfValue,J=S.tgtCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,Z=S.tgtRs=O._private.rscratch,re=S.srcRs=L._private.rscratch;S.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var Y=0;Y<S.eles.length;Y++){var A=S.eles[Y],K=A[0]._private.rscratch,W=A.pstyle("curve-style").value,oe=W==="unbundled-bezier"||W.endsWith("segments")||W.endsWith("taxi"),he=!L.same(A.source());if(!S.calculatedIntersection&&L!==O&&(S.hasBezier||S.hasUnbundled)){S.calculatedIntersection=!0;var ne=z.intersectLine(_.x,_.y,F,V,M.x,M.y,0,ee,re),se=S.srcIntn=ne,ue=j.intersectLine(M.x,M.y,H,$,_.x,_.y,0,J,Z),pe=S.tgtIntn=ue,de=S.intersectionPts={x1:ne[0],x2:ue[0],y1:ne[1],y2:ue[1]},me=S.posPts={x1:_.x,x2:M.x,y1:_.y,y2:M.y},Ne=ue[1]-ne[1],De=ue[0]-ne[0],Ee=Math.sqrt(De*De+Ne*Ne),Pe=S.vector={x:De,y:Ne},te=S.vectorNorm={x:Pe.x/Ee,y:Pe.y/Ee},T={x:-te.y,y:te.x};S.nodesOverlap=!le(Ee)||j.checkPoint(ne[0],ne[1],0,H,$,M.x,M.y,J,Z)||z.checkPoint(ue[0],ue[1],0,F,V,_.x,_.y,ee,re),S.vectorNormInverse=T,N={nodesOverlap:S.nodesOverlap,dirCounts:S.dirCounts,calculatedIntersection:!0,hasBezier:S.hasBezier,hasUnbundled:S.hasUnbundled,eles:S.eles,srcPos:M,tgtPos:_,srcW:H,srcH:$,tgtW:F,tgtH:V,srcIntn:pe,tgtIntn:se,srcShape:j,tgtShape:z,posPts:{x1:me.x2,y1:me.y2,x2:me.x1,y2:me.y1},intersectionPts:{x1:de.x2,y1:de.y2,x2:de.x1,y2:de.y1},vector:{x:-Pe.x,y:-Pe.y},vectorNorm:{x:-te.x,y:-te.y},vectorNormInverse:{x:-T.x,y:-T.y}}}var R=he?N:S;K.nodesOverlap=R.nodesOverlap,K.srcIntn=R.srcIntn,K.tgtIntn=R.tgtIntn,K.isRound=W.startsWith("round"),a&&(L.isParent()||L.isChild()||O.isParent()||O.isChild())&&(L.parents().anySame(O)||O.parents().anySame(L)||L.same(O)&&L.isParent())?e.findCompoundLoopPoints(A,R,Y,oe):L===O?e.findLoopPoints(A,R,Y,oe):W.endsWith("segments")?e.findSegmentsPoints(A,R):W.endsWith("taxi")?e.findTaxiPoints(A,R):W==="straight"||!oe&&S.eles.length%2===1&&Y===Math.floor(S.eles.length/2)?e.findStraightEdgePoints(A):e.findBezierPoints(A,R,Y,oe,he),e.findEndpoints(A),e.tryToCorrectInvalidPoints(A,R),e.checkForInvalidEdgeWarning(A),e.storeAllpts(A),e.storeEdgeProjections(A),e.calculateArrowAngles(A),e.recalculateEdgeLabelProjections(A),e.calculateLabelAngles(A)}},x=0;x<o.length;x++)C(x);this.findHaystackPoints(l)}};function Fv(t){var e=[];if(t!=null){for(var r=0;r<t.length;r+=2){var n=t[r],a=t[r+1];e.push({x:n,y:a})}return e}}Pt.getSegmentPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if(r==="segments")return this.recalculateRenderedStyle(t),Fv(e.segpts)},Pt.getControlPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if(r==="bezier"||r==="multibezier"||r==="self"||r==="compound")return this.recalculateRenderedStyle(t),Fv(e.ctrlpts)},Pt.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};var zi={};zi.manualEndptToPx=function(t,e){var r=this,n=t.position(),a=t.outerWidth(),i=t.outerHeight(),o=t._private.rscratch;if(e.value.length===2){var l=[e.pfValue[0],e.pfValue[1]];return e.units[0]==="%"&&(l[0]=l[0]*a),e.units[1]==="%"&&(l[1]=l[1]*i),l[0]+=n.x,l[1]+=n.y,l}else{var u=e.pfValue[0];u=-Math.PI/2+u;var c=2*Math.max(a,i),d=[n.x+Math.cos(u)*c,n.y+Math.sin(u)*c];return r.nodeShapes[this.getNodeShape(t)].intersectLine(n.x,n.y,a,i,d[0],d[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,o)}},zi.findEndpoints=function(t){var e=this,r,n=t.source()[0],a=t.target()[0],i=n.position(),o=a.position(),l=t.pstyle("target-arrow-shape").value,u=t.pstyle("source-arrow-shape").value,c=t.pstyle("target-distance-from-node").pfValue,d=t.pstyle("source-distance-from-node").pfValue,f=n._private.rscratch,p=a._private.rscratch,v=t.pstyle("curve-style").value,h=t._private.rscratch,g=h.edgeType,y=v==="taxi",m=g==="self"||g==="compound",b=g==="bezier"||g==="multibezier"||m,w=g!=="bezier",C=g==="straight"||g==="segments",x=g==="segments",E=b||w||C,k=m||y,B=t.pstyle("source-endpoint"),S=k?"outside-to-node":B.value,N=n.pstyle("corner-radius").value==="auto"?"auto":n.pstyle("corner-radius").pfValue,D=t.pstyle("target-endpoint"),P=k?"outside-to-node":D.value,L=a.pstyle("corner-radius").value==="auto"?"auto":a.pstyle("corner-radius").pfValue;h.srcManEndpt=B,h.tgtManEndpt=D;var O,I,_,M;if(b){var F=[h.ctrlpts[0],h.ctrlpts[1]],V=w?[h.ctrlpts[h.ctrlpts.length-2],h.ctrlpts[h.ctrlpts.length-1]]:F;O=V,I=F}else if(C){var H=x?h.segpts.slice(0,2):[o.x,o.y],$=x?h.segpts.slice(h.segpts.length-2):[i.x,i.y];O=$,I=H}if(P==="inside-to-node")r=[o.x,o.y];else if(D.units)r=this.manualEndptToPx(a,D);else if(P==="outside-to-line")r=h.tgtIntn;else if(P==="outside-to-node"||P==="outside-to-node-or-label"?_=O:(P==="outside-to-line"||P==="outside-to-line-or-label")&&(_=[i.x,i.y]),r=e.nodeShapes[this.getNodeShape(a)].intersectLine(o.x,o.y,a.outerWidth(),a.outerHeight(),_[0],_[1],0,L,p),P==="outside-to-node-or-label"||P==="outside-to-line-or-label"){var z=a._private.rscratch,j=z.labelWidth,ee=z.labelHeight,J=z.labelX,Z=z.labelY,re=j/2,Y=ee/2,A=a.pstyle("text-valign").value;A==="top"?Z-=Y:A==="bottom"&&(Z+=Y);var K=a.pstyle("text-halign").value;K==="left"?J-=re:K==="right"&&(J+=re);var W=Bi(_[0],_[1],[J-re,Z-Y,J+re,Z-Y,J+re,Z+Y,J-re,Z+Y],o.x,o.y);if(W.length>0){var oe=i,he=An(oe,ma(r)),ne=An(oe,ma(W)),se=he;if(ne<he&&(r=W,se=ne),W.length>2){var ue=An(oe,{x:W[2],y:W[3]});ue<se&&(r=[W[2],W[3]])}}}var pe=Ko(r,O,e.arrowShapes[l].spacing(t)+c),de=Ko(r,O,e.arrowShapes[l].gap(t)+c);if(h.endX=de[0],h.endY=de[1],h.arrowEndX=pe[0],h.arrowEndY=pe[1],S==="inside-to-node")r=[i.x,i.y];else if(B.units)r=this.manualEndptToPx(n,B);else if(S==="outside-to-line")r=h.srcIntn;else if(S==="outside-to-node"||S==="outside-to-node-or-label"?M=I:(S==="outside-to-line"||S==="outside-to-line-or-label")&&(M=[o.x,o.y]),r=e.nodeShapes[this.getNodeShape(n)].intersectLine(i.x,i.y,n.outerWidth(),n.outerHeight(),M[0],M[1],0,N,f),S==="outside-to-node-or-label"||S==="outside-to-line-or-label"){var me=n._private.rscratch,Ne=me.labelWidth,De=me.labelHeight,Ee=me.labelX,Pe=me.labelY,te=Ne/2,T=De/2,R=n.pstyle("text-valign").value;R==="top"?Pe-=T:R==="bottom"&&(Pe+=T);var Q=n.pstyle("text-halign").value;Q==="left"?Ee-=te:Q==="right"&&(Ee+=te);var G=Bi(M[0],M[1],[Ee-te,Pe-T,Ee+te,Pe-T,Ee+te,Pe+T,Ee-te,Pe+T],i.x,i.y);if(G.length>0){var U=o,ie=An(U,ma(r)),X=An(U,ma(G)),ae=ie;if(X<ie&&(r=[G[0],G[1]],ae=X),G.length>2){var we=An(U,{x:G[2],y:G[3]});we<ae&&(r=[G[2],G[3]])}}}var Ce=Ko(r,I,e.arrowShapes[u].spacing(t)+d),ge=Ko(r,I,e.arrowShapes[u].gap(t)+d);h.startX=ge[0],h.startY=ge[1],h.arrowStartX=Ce[0],h.arrowStartY=Ce[1],E&&(!le(h.startX)||!le(h.startY)||!le(h.endX)||!le(h.endY)?h.badLine=!0:h.badLine=!1)},zi.getSourceEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[0],y:e.haystackPts[1]};default:return{x:e.arrowStartX,y:e.arrowStartY}}},zi.getTargetEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[2],y:e.haystackPts[3]};default:return{x:e.arrowEndX,y:e.arrowEndY}}};var Dc={};function I3(t,e,r){for(var n=function(c,d,f,p){return ft(c,d,f,p)},a=e._private,i=a.rstyle.bezierPts,o=0;o<t.bezierProjPcts.length;o++){var l=t.bezierProjPcts[o];i.push({x:n(r[0],r[2],r[4],l),y:n(r[1],r[3],r[5],l)})}}Dc.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,n==="multibezier"||n==="bezier"||n==="self"||n==="compound"){e.rstyle.bezierPts=[];for(var a=0;a+5<r.allpts.length;a+=4)I3(this,t,r.allpts.slice(a,a+6))}else if(n==="segments")for(var i=e.rstyle.linePts=[],a=0;a+1<r.allpts.length;a+=2)i.push({x:r.allpts[a],y:r.allpts[a+1]});else if(n==="haystack"){var o=r.haystackPts;e.rstyle.haystackPts=[{x:o[0],y:o[1]},{x:o[2],y:o[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},Dc.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var Er={};Er.recalculateNodeLabelProjection=function(t){var e=t.pstyle("label").strValue;if(!nn(e)){var r,n,a=t._private,i=t.width(),o=t.height(),l=t.padding(),u=t.position(),c=t.pstyle("text-halign").strValue,d=t.pstyle("text-valign").strValue,f=a.rscratch,p=a.rstyle;switch(c){case"left":r=u.x-i/2-l;break;case"right":r=u.x+i/2+l;break;default:r=u.x}switch(d){case"top":n=u.y-o/2-l;break;case"bottom":n=u.y+o/2+l;break;default:n=u.y}f.labelX=r,f.labelY=n,p.labelX=r,p.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}};var Mv=function(e,r){var n=Math.atan(r/e);return e===0&&n<0&&(n=n*-1),n},Iv=function(e,r){var n=r.x-e.x,a=r.y-e.y;return Mv(n,a)},A3=function(e,r,n,a){var i=Si(0,a-.001,1),o=Si(0,a+.001,1),l=ya(e,r,n,i),u=ya(e,r,n,o);return Iv(l,u)};Er.recalculateEdgeLabelProjections=function(t){var e,r=t._private,n=r.rscratch,a=this,i={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(i.mid||i.source||i.target){e={x:n.midX,y:n.midY};var o=function(f,p,v){sn(r.rscratch,f,p,v),sn(r.rstyle,f,p,v)};o("labelX",null,e.x),o("labelY",null,e.y);var l=Mv(n.midDispX,n.midDispY);o("labelAutoAngle",null,l);var u=function d(){if(d.cache)return d.cache;for(var f=[],p=0;p+5<n.allpts.length;p+=4){var v={x:n.allpts[p],y:n.allpts[p+1]},h={x:n.allpts[p+2],y:n.allpts[p+3]},g={x:n.allpts[p+4],y:n.allpts[p+5]};f.push({p0:v,p1:h,p2:g,startDist:0,length:0,segments:[]})}var y=r.rstyle.bezierPts,m=a.bezierProjPcts.length;function b(k,B,S,N,D){var P=In(B,S),L=k.segments[k.segments.length-1],O={p0:B,p1:S,t0:N,t1:D,startDist:L?L.startDist+L.length:0,length:P};k.segments.push(O),k.length+=P}for(var w=0;w<f.length;w++){var C=f[w],x=f[w-1];x&&(C.startDist=x.startDist+x.length),b(C,C.p0,y[w*m],0,a.bezierProjPcts[0]);for(var E=0;E<m-1;E++)b(C,y[w*m+E],y[w*m+E+1],a.bezierProjPcts[E],a.bezierProjPcts[E+1]);b(C,y[w*m+m-1],C.p2,a.bezierProjPcts[m-1],1)}return d.cache=f},c=function(f){var p,v=f==="source";if(i[f]){var h=t.pstyle(f+"-text-offset").pfValue;switch(n.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var g=u(),y,m=0,b=0,w=0;w<g.length;w++){for(var C=g[v?w:g.length-1-w],x=0;x<C.segments.length;x++){var E=C.segments[v?x:C.segments.length-1-x],k=w===g.length-1&&x===C.segments.length-1;if(m=b,b+=E.length,b>=h||k){y={cp:C,segment:E};break}}if(y)break}var B=y.cp,S=y.segment,N=(h-m)/S.length,D=S.t1-S.t0,P=v?S.t0+D*N:S.t1-D*N;P=Si(0,P,1),e=ya(B.p0,B.p1,B.p2,P),p=A3(B.p0,B.p1,B.p2,P);break}case"straight":case"segments":case"haystack":{for(var L=0,O,I,_,M,F=n.allpts.length,V=0;V+3<F&&(v?(_={x:n.allpts[V],y:n.allpts[V+1]},M={x:n.allpts[V+2],y:n.allpts[V+3]}):(_={x:n.allpts[F-2-V],y:n.allpts[F-1-V]},M={x:n.allpts[F-4-V],y:n.allpts[F-3-V]}),O=In(_,M),I=L,L+=O,!(L>=h));V+=2);var H=h-I,$=H/O;$=Si(0,$,1),e=HB(_,M,$),p=Iv(_,M);break}}o("labelX",f,e.x),o("labelY",f,e.y),o("labelAutoAngle",f,p)}};c("source"),c("target"),this.applyLabelDimensions(t)}},Er.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Er.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),a=this.calculateLabelDimensions(t,n),i=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,l=lr(r.rscratch,"labelWrapCachedLines",e)||[],u=o!=="wrap"?1:Math.max(l.length,1),c=a.height/u,d=c*i,f=a.width,p=a.height+(u-1)*(i-1)*c;sn(r.rstyle,"labelWidth",e,f),sn(r.rscratch,"labelWidth",e,f),sn(r.rstyle,"labelHeight",e,p),sn(r.rscratch,"labelHeight",e,p),sn(r.rscratch,"labelLineHeight",e,d)},Er.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",a=t.pstyle(n+"label").strValue,i=t.pstyle("text-transform").value,o=function(j,ee){return ee?(sn(r.rscratch,j,e,ee),ee):lr(r.rscratch,j,e)};if(!a)return"";i=="none"||(i=="uppercase"?a=a.toUpperCase():i=="lowercase"&&(a=a.toLowerCase()));var l=t.pstyle("text-wrap").value;if(l==="wrap"){var u=o("labelKey");if(u!=null&&o("labelWrapKey")===u)return o("labelWrapCachedText");for(var c="​",d=a.split(`
445
+ `),f=t.pstyle("text-max-width").pfValue,p=t.pstyle("text-overflow-wrap").value,v=p==="anywhere",h=[],g=/[\s\u200b]+|$/g,y=0;y<d.length;y++){var m=d[y],b=this.calculateLabelDimensions(t,m),w=b.width;if(v){var C=m.split("").join(c);m=C}if(w>f){var x=m.matchAll(g),E="",k=0,B=mh(x),S;try{for(B.s();!(S=B.n()).done;){var N=S.value,D=N[0],P=m.substring(k,N.index);k=N.index+D.length;var L=E.length===0?P:E+P+D,O=this.calculateLabelDimensions(t,L),I=O.width;I<=f?E+=P+D:(E&&h.push(E),E=P+D)}}catch(z){B.e(z)}finally{B.f()}E.match(/^[\s\u200b]+$/)||h.push(E)}else h.push(m)}o("labelWrapCachedLines",h),a=o("labelWrapCachedText",h.join(`
446
+ `)),o("labelWrapKey",u)}else if(l==="ellipsis"){var _=t.pstyle("text-max-width").pfValue,M="",F="…",V=!1;if(this.calculateLabelDimensions(t,a).width<_)return a;for(var H=0;H<a.length;H++){var $=this.calculateLabelDimensions(t,M+a[H]+F).width;if($>_)break;M+=a[H],H===a.length-1&&(V=!0)}return V||(M+=F),M}return a},Er.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e},Er.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),a=n.document,i=Mn(e,t._private.labelDimsKey),o=r.labelDimCache||(r.labelDimCache=[]),l=o[i];if(l!=null)return l;var u=0,c=t.pstyle("font-style").strValue,d=t.pstyle("font-size").pfValue,f=t.pstyle("font-family").strValue,p=t.pstyle("font-weight").strValue,v=this.labelCalcCanvas,h=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=a.createElement("canvas"),h=this.labelCalcCanvasContext=v.getContext("2d");var g=v.style;g.position="absolute",g.left="-9999px",g.top="-9999px",g.zIndex="-1",g.visibility="hidden",g.pointerEvents="none"}h.font="".concat(c," ").concat(p," ").concat(d,"px ").concat(f);for(var y=0,m=0,b=e.split(`
447
+ `),w=0;w<b.length;w++){var C=b[w],x=h.measureText(C),E=Math.ceil(x.width),k=d;y=Math.max(E,y),m+=k}return y+=u,m+=u,o[i]={width:y,height:m}},Er.calculateLabelAngle=function(t,e){var r=t._private,n=r.rscratch,a=t.isEdge(),i=e?e+"-":"",o=t.pstyle(i+"text-rotation"),l=o.strValue;return l==="none"?0:a&&l==="autorotate"?n.labelAutoAngle:l==="autorotate"?0:o.pfValue},Er.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),n=t._private,a=n.rscratch;a.labelAngle=e.calculateLabelAngle(t),r&&(a.sourceLabelAngle=e.calculateLabelAngle(t,"source"),a.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var Av={},Vv=28,Rv=!1;Av.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<Vv||t.height()<Vv))return Rv||(Ae("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Rv=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var n=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(n).name}return r};var ws={};ws.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,n=function(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),l)for(var u=0;u<o.length;u++){var c=o[u],d=c._private,f=d.rstyle;f.clean=!1,f.cleanConnected=!1}};r.binder(t).on("bounds.* dirty.*",function(o){var l=o.target;n(l)}).on("style.* background.*",function(o){var l=o.target;n(l,!1)});var a=function(o){if(o){var l=r.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var c=e[u],d=c._private.rstyle;c.isNode()&&!d.cleanConnected&&(n(c.connectedEdges()),d.cleanConnected=!0)}if(l)for(var f=0;f<l.length;f++){var p=l[f];p(o,e)}r.recalculateRenderedStyle(e),e=t.collection()}};r.flushRenderedStyleQueue=function(){a(!0)},r.beforeRender(a,r.beforeRenderPriorities.eleCalcs)},ws.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)},ws.recalculateRenderedStyle=function(t,e){var r=function(C){return C._private.rstyle.cleanConnected},n=[],a=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<t.length;i++){var o=t[i],l=o._private,u=l.rstyle;o.isEdge()&&(!r(o.source())||!r(o.target()))&&(u.clean=!1),!(e&&u.clean||o.removed())&&o.pstyle("display").value!=="none"&&(l.group==="nodes"?a.push(o):n.push(o),u.clean=!0)}for(var c=0;c<a.length;c++){var d=a[c],f=d._private,p=f.rstyle,v=d.position();this.recalculateNodeLabelProjection(d),p.nodeX=v.x,p.nodeY=v.y,p.nodeW=d.pstyle("width").pfValue,p.nodeH=d.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var h=0;h<n.length;h++){var g=n[h],y=g._private,m=y.rstyle,b=y.rscratch;m.srcX=b.arrowStartX,m.srcY=b.arrowStartY,m.tgtX=b.arrowEndX,m.tgtY=b.arrowEndY,m.midX=b.midX,m.midY=b.midY,m.labelAngle=b.labelAngle,m.sourceLabelAngle=b.sourceLabelAngle,m.targetLabelAngle=b.targetLabelAngle}}};var Cs={};Cs.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=t[r],a=n._private.rscratch;n.grabbed()&&!n.isParent()?e.push(n):a.inDragLayer?t.drag.push(n):t.nondrag.push(n)}for(var r=0;r<e.length;r++){var n=e[r];t.drag.push(n)}}},Cs.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},Cs.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(tv),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var $v={};[Kn,ms,Pt,zi,Dc,Er,Av,ws,Cs].forEach(function(t){xe($v,t)});var zv={};zv.getCachedImage=function(t,e,r){var n=this,a=n.imageCache=n.imageCache||{},i=a[t];if(i)return i.image.complete||i.image.addEventListener("load",r),i.image;i=a[t]=a[t]||{};var o=i.image=new Image;o.addEventListener("load",r),o.addEventListener("error",function(){o.error=!0});var l="data:",u=t.substring(0,l.length).toLowerCase()===l;return u||(e=e==="null"?null:e,o.crossOrigin=e),o.src=t,o};var Ia={};Ia.registerBinding=function(t,e,r,n){var a=Array.prototype.slice.apply(arguments,[1]),i=this.binder(t);return i.on.apply(i,a)},Ia.binder=function(t){var e=this,r=e.cy.window(),n=t===r||t===r.document||t===r.document.body||lT(t);if(e.supportsPassiveEvents==null){var a=!1;try{var i=Object.defineProperty({},"passive",{get:function(){return a=!0,!0}});r.addEventListener("test",null,i)}catch{}e.supportsPassiveEvents=a}var o=function(u,c,d){var f=Array.prototype.slice.call(arguments);return n&&e.supportsPassiveEvents&&(f[2]={capture:d??!1,passive:!1,once:!1}),e.bindings.push({target:t,args:f}),(t.addEventListener||t.on).apply(t,f),this};return{on:o,addEventListener:o,addListener:o,bind:o}},Ia.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},Ia.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()},Ia.load=function(){var t=this,e=t.cy.window(),r=function(T){return T.selected()},n=function(T,R,Q,G){T==null&&(T=t.cy);for(var U=0;U<R.length;U++){var ie=R[U];T.emit({originalEvent:Q,type:ie,position:G})}},a=function(T){return T.shiftKey||T.metaKey||T.ctrlKey},i=function(T,R){var Q=!0;if(t.cy.hasCompoundNodes()&&T&&T.pannable())for(var G=0;R&&G<R.length;G++){var T=R[G];if(T.isNode()&&T.isParent()&&!T.pannable()){Q=!1;break}}else Q=!0;return Q},o=function(T){T[0]._private.grabbed=!0},l=function(T){T[0]._private.grabbed=!1},u=function(T){T[0]._private.rscratch.inDragLayer=!0},c=function(T){T[0]._private.rscratch.inDragLayer=!1},d=function(T){T[0]._private.rscratch.isGrabTarget=!0},f=function(T){T[0]._private.rscratch.isGrabTarget=!1},p=function(T,R){var Q=R.addToList,G=Q.has(T);!G&&T.grabbable()&&!T.locked()&&(Q.merge(T),o(T))},v=function(T,R){if(T.cy().hasCompoundNodes()&&!(R.inDragLayer==null&&R.addToList==null)){var Q=T.descendants();R.inDragLayer&&(Q.forEach(u),Q.connectedEdges().forEach(u)),R.addToList&&p(Q,R)}},h=function(T,R){R=R||{};var Q=T.cy().hasCompoundNodes();R.inDragLayer&&(T.forEach(u),T.neighborhood().stdFilter(function(G){return!Q||G.isEdge()}).forEach(u)),R.addToList&&T.forEach(function(G){p(G,R)}),v(T,R),m(T,{inDragLayer:R.inDragLayer}),t.updateCachedGrabbedEles()},g=h,y=function(T){T&&(t.getCachedZSortedEles().forEach(function(R){l(R),c(R),f(R)}),t.updateCachedGrabbedEles())},m=function(T,R){if(!(R.inDragLayer==null&&R.addToList==null)&&T.cy().hasCompoundNodes()){var Q=T.ancestors().orphans();if(!Q.same(T)){var G=Q.descendants().spawnSelf().merge(Q).unmerge(T).unmerge(T.descendants()),U=G.connectedEdges();R.inDragLayer&&(U.forEach(u),G.forEach(u)),R.addToList&&G.forEach(function(ie){p(ie,R)})}}},b=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},w=typeof MutationObserver<"u",C=typeof ResizeObserver<"u";w?(t.removeObserver=new MutationObserver(function(te){for(var T=0;T<te.length;T++){var R=te[T],Q=R.removedNodes;if(Q)for(var G=0;G<Q.length;G++){var U=Q[G];if(U===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(te){t.destroy()});var x=_o(function(){t.cy.resize()},100);w&&(t.styleObserver=new MutationObserver(x),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",x),C&&(t.resizeObserver=new ResizeObserver(x),t.resizeObserver.observe(t.container));var E=function(T,R){for(;T!=null;)R(T),T=T.parentNode},k=function(){t.invalidateContainerClientCoordsCache()};E(t.container,function(te){t.registerBinding(te,"transitionend",k),t.registerBinding(te,"animationend",k),t.registerBinding(te,"scroll",k)}),t.registerBinding(t.container,"contextmenu",function(te){te.preventDefault()});var B=function(){return t.selection[4]!==0},S=function(T){for(var R=t.findContainerClientCoords(),Q=R[0],G=R[1],U=R[2],ie=R[3],X=T.touches?T.touches:[T],ae=!1,we=0;we<X.length;we++){var Ce=X[we];if(Q<=Ce.clientX&&Ce.clientX<=Q+U&&G<=Ce.clientY&&Ce.clientY<=G+ie){ae=!0;break}}if(!ae)return!1;for(var ge=t.container,Se=T.target,ve=Se.parentNode,ye=!1;ve;){if(ve===ge){ye=!0;break}ve=ve.parentNode}return!!ye};t.registerBinding(t.container,"mousedown",function(T){if(S(T)&&!(t.hoverData.which===1&&T.which!==1)){T.preventDefault(),b(),t.hoverData.capture=!0,t.hoverData.which=T.which;var R=t.cy,Q=[T.clientX,T.clientY],G=t.projectIntoViewport(Q[0],Q[1]),U=t.selection,ie=t.findNearestElements(G[0],G[1],!0,!1),X=ie[0],ae=t.dragData.possibleDragElements;t.hoverData.mdownPos=G,t.hoverData.mdownGPos=Q;var we=function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var Ge=t.hoverData.down;Ge?Ge.emit({originalEvent:T,type:"taphold",position:{x:G[0],y:G[1]}}):R.emit({originalEvent:T,type:"taphold",position:{x:G[0],y:G[1]}})}},t.tapholdDuration)};if(T.which==3){t.hoverData.cxtStarted=!0;var Ce={originalEvent:T,type:"cxttapstart",position:{x:G[0],y:G[1]}};X?(X.activate(),X.emit(Ce),t.hoverData.down=X):R.emit(Ce),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1}else if(T.which==1){X&&X.activate();{if(X!=null&&t.nodeIsGrabbable(X)){var ge=function(Ge){return{originalEvent:T,type:Ge,position:{x:G[0],y:G[1]}}},Se=function(Ge){Ge.emit(ge("grab"))};if(d(X),!X.selected())ae=t.dragData.possibleDragElements=R.collection(),g(X,{addToList:ae}),X.emit(ge("grabon")).emit(ge("grab"));else{ae=t.dragData.possibleDragElements=R.collection();var ve=R.$(function(ye){return ye.isNode()&&ye.selected()&&t.nodeIsGrabbable(ye)});h(ve,{addToList:ae}),X.emit(ge("grabon")),ve.forEach(Se)}t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=X,t.hoverData.downs=ie,t.hoverData.downTime=new Date().getTime()}n(X,["mousedown","tapstart","vmousedown"],T,{x:G[0],y:G[1]}),X==null?(U[4]=1,t.data.bgActivePosistion={x:G[0],y:G[1]},t.redrawHint("select",!0),t.redraw()):X.pannable()&&(U[4]=1),we()}U[0]=U[2]=G[0],U[1]=U[3]=G[1]}},!1),t.registerBinding(e,"mousemove",function(T){var R=t.hoverData.capture;if(!(!R&&!S(T))){var Q=!1,G=t.cy,U=G.zoom(),ie=[T.clientX,T.clientY],X=t.projectIntoViewport(ie[0],ie[1]),ae=t.hoverData.mdownPos,we=t.hoverData.mdownGPos,Ce=t.selection,ge=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(ge=t.findNearestElement(X[0],X[1],!0,!1));var Se=t.hoverData.last,ve=t.hoverData.down,ye=[X[0]-Ce[2],X[1]-Ce[3]],Ge=t.dragData.possibleDragElements,Re;if(we){var rt=ie[0]-we[0],nt=rt*rt,Qe=ie[1]-we[1],Ot=Qe*Qe,ut=nt+Ot;t.hoverData.isOverThresholdDrag=Re=ut>=t.desktopTapThreshold2}var ht=a(T);Re&&(t.hoverData.tapholdCancelled=!0);var Wt=function(){var q=t.hoverData.dragDelta=t.hoverData.dragDelta||[];q.length===0?(q.push(ye[0]),q.push(ye[1])):(q[0]+=ye[0],q[1]+=ye[1])};Q=!0,n(ge,["mousemove","vmousemove","tapdrag"],T,{x:X[0],y:X[1]});var _t=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||G.emit({originalEvent:T,type:"boxstart",position:{x:X[0],y:X[1]}}),Ce[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(Re){var Lt={originalEvent:T,type:"cxtdrag",position:{x:X[0],y:X[1]}};ve?ve.emit(Lt):G.emit(Lt),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ge!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:X[0],y:X[1]}}),t.hoverData.cxtOver=ge,ge&&ge.emit({originalEvent:T,type:"cxtdragover",position:{x:X[0],y:X[1]}}))}}else if(t.hoverData.dragging){if(Q=!0,G.panningEnabled()&&G.userPanningEnabled()){var tr;if(t.hoverData.justStartedPan){var dr=t.hoverData.mdownPos;tr={x:(X[0]-dr[0])*U,y:(X[1]-dr[1])*U},t.hoverData.justStartedPan=!1}else tr={x:ye[0]*U,y:ye[1]*U};G.panBy(tr),G.emit("dragpan"),t.hoverData.dragged=!0}X=t.projectIntoViewport(T.clientX,T.clientY)}else if(Ce[4]==1&&(ve==null||ve.pannable())){if(Re){if(!t.hoverData.dragging&&G.boxSelectionEnabled()&&(ht||!G.panningEnabled()||!G.userPanningEnabled()))_t();else if(!t.hoverData.selecting&&G.panningEnabled()&&G.userPanningEnabled()){var Kt=i(ve,t.hoverData.downs);Kt&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Ce[4]=0,t.data.bgActivePosistion=ma(ae),t.redrawHint("select",!0),t.redraw())}ve&&ve.pannable()&&ve.active()&&ve.unactivate()}}else{if(ve&&ve.pannable()&&ve.active()&&ve.unactivate(),(!ve||!ve.grabbed())&&ge!=Se&&(Se&&n(Se,["mouseout","tapdragout"],T,{x:X[0],y:X[1]}),ge&&n(ge,["mouseover","tapdragover"],T,{x:X[0],y:X[1]}),t.hoverData.last=ge),ve)if(Re){if(G.boxSelectionEnabled()&&ht)ve&&ve.grabbed()&&(y(Ge),ve.emit("freeon"),Ge.emit("free"),t.dragData.didDrag&&(ve.emit("dragfreeon"),Ge.emit("dragfree"))),_t();else if(ve&&ve.grabbed()&&t.nodeIsDraggable(ve)){var Je=!t.dragData.didDrag;Je&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||h(Ge,{inDragLayer:!0});var at={x:0,y:0};if(le(ye[0])&&le(ye[1])&&(at.x+=ye[0],at.y+=ye[1],Je)){var pt=t.hoverData.dragDelta;pt&&le(pt[0])&&le(pt[1])&&(at.x+=pt[0],at.y+=pt[1])}t.hoverData.draggingEles=!0,Ge.silentShift(at).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else Wt();Q=!0}if(Ce[2]=X[0],Ce[3]=X[1],Q)return T.stopPropagation&&T.stopPropagation(),T.preventDefault&&T.preventDefault(),!1}},!1);var N,D,P;t.registerBinding(e,"mouseup",function(T){if(!(t.hoverData.which===1&&T.which!==1&&t.hoverData.capture)){var R=t.hoverData.capture;if(R){t.hoverData.capture=!1;var Q=t.cy,G=t.projectIntoViewport(T.clientX,T.clientY),U=t.selection,ie=t.findNearestElement(G[0],G[1],!0,!1),X=t.dragData.possibleDragElements,ae=t.hoverData.down,we=a(T);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,ae&&ae.unactivate(),t.hoverData.which===3){var Ce={originalEvent:T,type:"cxttapend",position:{x:G[0],y:G[1]}};if(ae?ae.emit(Ce):Q.emit(Ce),!t.hoverData.cxtDragged){var ge={originalEvent:T,type:"cxttap",position:{x:G[0],y:G[1]}};ae?ae.emit(ge):Q.emit(ge)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(n(ie,["mouseup","tapend","vmouseup"],T,{x:G[0],y:G[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(n(ae,["click","tap","vclick"],T,{x:G[0],y:G[1]}),D=!1,T.timeStamp-P<=Q.multiClickDebounceTime()?(N&&clearTimeout(N),D=!0,P=null,n(ae,["dblclick","dbltap","vdblclick"],T,{x:G[0],y:G[1]})):(N=setTimeout(function(){D||n(ae,["oneclick","onetap","voneclick"],T,{x:G[0],y:G[1]})},Q.multiClickDebounceTime()),P=T.timeStamp)),ae==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(T)&&(Q.$(r).unselect(["tapunselect"]),X.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=X=Q.collection()),ie==ae&&!t.dragData.didDrag&&!t.hoverData.selecting&&ie!=null&&ie._private.selectable&&(t.hoverData.dragging||(Q.selectionType()==="additive"||we?ie.selected()?ie.unselect(["tapunselect"]):ie.select(["tapselect"]):we||(Q.$(r).unmerge(ie).unselect(["tapunselect"]),ie.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Se=Q.collection(t.getAllInBox(U[0],U[1],U[2],U[3]));t.redrawHint("select",!0),Se.length>0&&t.redrawHint("eles",!0),Q.emit({type:"boxend",originalEvent:T,position:{x:G[0],y:G[1]}});var ve=function(Re){return Re.selectable()&&!Re.selected()};Q.selectionType()==="additive"||we||Q.$(r).unmerge(Se).unselect(),Se.emit("box").stdFilter(ve).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!U[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var ye=ae&&ae.grabbed();y(X),ye&&(ae.emit("freeon"),X.emit("free"),t.dragData.didDrag&&(ae.emit("dragfreeon"),X.emit("dragfree")))}}U[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var L=function(T){if(!t.scrollingPage){var R=t.cy,Q=R.zoom(),G=R.pan(),U=t.projectIntoViewport(T.clientX,T.clientY),ie=[U[0]*Q+G.x,U[1]*Q+G.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||B()){T.preventDefault();return}if(R.panningEnabled()&&R.userPanningEnabled()&&R.zoomingEnabled()&&R.userZoomingEnabled()){T.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var X;T.deltaY!=null?X=T.deltaY/-250:T.wheelDeltaY!=null?X=T.wheelDeltaY/1e3:X=T.wheelDelta/1e3,X=X*t.wheelSensitivity;var ae=T.deltaMode===1;ae&&(X*=33);var we=R.zoom()*Math.pow(10,X);T.type==="gesturechange"&&(we=t.gestureStartZoom*T.scale),R.zoom({level:we,renderedPosition:{x:ie[0],y:ie[1]}}),R.emit(T.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",L,!0),t.registerBinding(e,"scroll",function(T){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(T){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||T.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(te){t.hasTouchStarted||L(te)},!0),t.registerBinding(t.container,"mouseout",function(T){var R=t.projectIntoViewport(T.clientX,T.clientY);t.cy.emit({originalEvent:T,type:"mouseout",position:{x:R[0],y:R[1]}})},!1),t.registerBinding(t.container,"mouseover",function(T){var R=t.projectIntoViewport(T.clientX,T.clientY);t.cy.emit({originalEvent:T,type:"mouseover",position:{x:R[0],y:R[1]}})},!1);var O,I,_,M,F,V,H,$,z,j,ee,J,Z,re=function(T,R,Q,G){return Math.sqrt((Q-T)*(Q-T)+(G-R)*(G-R))},Y=function(T,R,Q,G){return(Q-T)*(Q-T)+(G-R)*(G-R)},A;t.registerBinding(t.container,"touchstart",A=function(T){if(t.hasTouchStarted=!0,!!S(T)){b(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var R=t.cy,Q=t.touchData.now,G=t.touchData.earlier;if(T.touches[0]){var U=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);Q[0]=U[0],Q[1]=U[1]}if(T.touches[1]){var U=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);Q[2]=U[0],Q[3]=U[1]}if(T.touches[2]){var U=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);Q[4]=U[0],Q[5]=U[1]}if(T.touches[1]){t.touchData.singleTouchMoved=!0,y(t.dragData.touchDragEles);var ie=t.findContainerClientCoords();z=ie[0],j=ie[1],ee=ie[2],J=ie[3],O=T.touches[0].clientX-z,I=T.touches[0].clientY-j,_=T.touches[1].clientX-z,M=T.touches[1].clientY-j,Z=0<=O&&O<=ee&&0<=_&&_<=ee&&0<=I&&I<=J&&0<=M&&M<=J;var X=R.pan(),ae=R.zoom();F=re(O,I,_,M),V=Y(O,I,_,M),H=[(O+_)/2,(I+M)/2],$=[(H[0]-X.x)/ae,(H[1]-X.y)/ae];var we=200,Ce=we*we;if(V<Ce&&!T.touches[2]){var ge=t.findNearestElement(Q[0],Q[1],!0,!0),Se=t.findNearestElement(Q[2],Q[3],!0,!0);ge&&ge.isNode()?(ge.activate().emit({originalEvent:T,type:"cxttapstart",position:{x:Q[0],y:Q[1]}}),t.touchData.start=ge):Se&&Se.isNode()?(Se.activate().emit({originalEvent:T,type:"cxttapstart",position:{x:Q[0],y:Q[1]}}),t.touchData.start=Se):R.emit({originalEvent:T,type:"cxttapstart",position:{x:Q[0],y:Q[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(T.touches[2])R.boxSelectionEnabled()&&T.preventDefault();else if(!T.touches[1]){if(T.touches[0]){var ve=t.findNearestElements(Q[0],Q[1],!0,!0),ye=ve[0];if(ye!=null&&(ye.activate(),t.touchData.start=ye,t.touchData.starts=ve,t.nodeIsGrabbable(ye))){var Ge=t.dragData.touchDragEles=R.collection(),Re=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),ye.selected()?(Re=R.$(function(ut){return ut.selected()&&t.nodeIsGrabbable(ut)}),h(Re,{addToList:Ge})):g(ye,{addToList:Ge}),d(ye);var rt=function(ht){return{originalEvent:T,type:ht,position:{x:Q[0],y:Q[1]}}};ye.emit(rt("grabon")),Re?Re.forEach(function(ut){ut.emit(rt("grab"))}):ye.emit(rt("grab"))}n(ye,["touchstart","tapstart","vmousedown"],T,{x:Q[0],y:Q[1]}),ye==null&&(t.data.bgActivePosistion={x:U[0],y:U[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&n(t.touchData.start,["taphold"],T,{x:Q[0],y:Q[1]})},t.tapholdDuration)}}if(T.touches.length>=1){for(var nt=t.touchData.startPosition=[null,null,null,null,null,null],Qe=0;Qe<Q.length;Qe++)nt[Qe]=G[Qe]=Q[Qe];var Ot=T.touches[0];t.touchData.startGPosition=[Ot.clientX,Ot.clientY]}}},!1);var K;t.registerBinding(e,"touchmove",K=function(T){var R=t.touchData.capture;if(!(!R&&!S(T))){var Q=t.selection,G=t.cy,U=t.touchData.now,ie=t.touchData.earlier,X=G.zoom();if(T.touches[0]){var ae=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);U[0]=ae[0],U[1]=ae[1]}if(T.touches[1]){var ae=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);U[2]=ae[0],U[3]=ae[1]}if(T.touches[2]){var ae=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);U[4]=ae[0],U[5]=ae[1]}var we=t.touchData.startGPosition,Ce;if(R&&T.touches[0]&&we){for(var ge=[],Se=0;Se<U.length;Se++)ge[Se]=U[Se]-ie[Se];var ve=T.touches[0].clientX-we[0],ye=ve*ve,Ge=T.touches[0].clientY-we[1],Re=Ge*Ge,rt=ye+Re;Ce=rt>=t.touchTapThreshold2}if(R&&t.touchData.cxt){T.preventDefault();var nt=T.touches[0].clientX-z,Qe=T.touches[0].clientY-j,Ot=T.touches[1].clientX-z,ut=T.touches[1].clientY-j,ht=Y(nt,Qe,Ot,ut),Wt=ht/V,_t=150,Lt=_t*_t,tr=1.5,dr=tr*tr;if(Wt>=dr||ht>=Lt){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Kt={originalEvent:T,type:"cxttapend",position:{x:U[0],y:U[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(Kt),t.touchData.start=null):G.emit(Kt)}}if(R&&t.touchData.cxt){var Kt={originalEvent:T,type:"cxtdrag",position:{x:U[0],y:U[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(Kt):G.emit(Kt),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var Je=t.findNearestElement(U[0],U[1],!0,!0);(!t.touchData.cxtOver||Je!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:U[0],y:U[1]}}),t.touchData.cxtOver=Je,Je&&Je.emit({originalEvent:T,type:"cxtdragover",position:{x:U[0],y:U[1]}}))}else if(R&&T.touches[2]&&G.boxSelectionEnabled())T.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||G.emit({originalEvent:T,type:"boxstart",position:{x:U[0],y:U[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,Q[4]=1,!Q||Q.length===0||Q[0]===void 0?(Q[0]=(U[0]+U[2]+U[4])/3,Q[1]=(U[1]+U[3]+U[5])/3,Q[2]=(U[0]+U[2]+U[4])/3+1,Q[3]=(U[1]+U[3]+U[5])/3+1):(Q[2]=(U[0]+U[2]+U[4])/3,Q[3]=(U[1]+U[3]+U[5])/3),t.redrawHint("select",!0),t.redraw();else if(R&&T.touches[1]&&!t.touchData.didSelect&&G.zoomingEnabled()&&G.panningEnabled()&&G.userZoomingEnabled()&&G.userPanningEnabled()){T.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var at=t.dragData.touchDragEles;if(at){t.redrawHint("drag",!0);for(var pt=0;pt<at.length;pt++){var mn=at[pt]._private;mn.grabbed=!1,mn.rscratch.inDragLayer=!1}}var q=t.touchData.start,nt=T.touches[0].clientX-z,Qe=T.touches[0].clientY-j,Ot=T.touches[1].clientX-z,ut=T.touches[1].clientY-j,ce=re(nt,Qe,Ot,ut),Oe=ce/F;if(Z){var ze=nt-O,Tr=Qe-I,yn=Ot-_,za=ut-M,qr=(ze+yn)/2,rr=(Tr+za)/2,bn=G.zoom(),Vc=bn*Oe,Ss=G.pan(),hg=$[0]*bn+Ss.x,pg=$[1]*bn+Ss.y,YP={x:-Vc/bn*(hg-Ss.x-qr)+hg,y:-Vc/bn*(pg-Ss.y-rr)+pg};if(q&&q.active()){var at=t.dragData.touchDragEles;y(at),t.redrawHint("drag",!0),t.redrawHint("eles",!0),q.unactivate().emit("freeon"),at.emit("free"),t.dragData.didDrag&&(q.emit("dragfreeon"),at.emit("dragfree"))}G.viewport({zoom:Vc,pan:YP,cancelOnFailedZoom:!0}),G.emit("pinchzoom"),F=ce,O=nt,I=Qe,_=Ot,M=ut,t.pinching=!0}if(T.touches[0]){var ae=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);U[0]=ae[0],U[1]=ae[1]}if(T.touches[1]){var ae=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);U[2]=ae[0],U[3]=ae[1]}if(T.touches[2]){var ae=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);U[4]=ae[0],U[5]=ae[1]}}else if(T.touches[0]&&!t.touchData.didSelect){var fr=t.touchData.start,Rc=t.touchData.last,Je;if(!t.hoverData.draggingEles&&!t.swipePanning&&(Je=t.findNearestElement(U[0],U[1],!0,!0)),R&&fr!=null&&T.preventDefault(),R&&fr!=null&&t.nodeIsDraggable(fr))if(Ce){var at=t.dragData.touchDragEles,vg=!t.dragData.didDrag;vg&&h(at,{inDragLayer:!0}),t.dragData.didDrag=!0;var Gi={x:0,y:0};if(le(ge[0])&&le(ge[1])&&(Gi.x+=ge[0],Gi.y+=ge[1],vg)){t.redrawHint("eles",!0);var hr=t.touchData.dragDelta;hr&&le(hr[0])&&le(hr[1])&&(Gi.x+=hr[0],Gi.y+=hr[1])}t.hoverData.draggingEles=!0,at.silentShift(Gi).emit("position drag"),t.redrawHint("drag",!0),t.touchData.startPosition[0]==ie[0]&&t.touchData.startPosition[1]==ie[1]&&t.redrawHint("eles",!0),t.redraw()}else{var hr=t.touchData.dragDelta=t.touchData.dragDelta||[];hr.length===0?(hr.push(ge[0]),hr.push(ge[1])):(hr[0]+=ge[0],hr[1]+=ge[1])}if(n(fr||Je,["touchmove","tapdrag","vmousemove"],T,{x:U[0],y:U[1]}),(!fr||!fr.grabbed())&&Je!=Rc&&(Rc&&Rc.emit({originalEvent:T,type:"tapdragout",position:{x:U[0],y:U[1]}}),Je&&Je.emit({originalEvent:T,type:"tapdragover",position:{x:U[0],y:U[1]}})),t.touchData.last=Je,R)for(var pt=0;pt<U.length;pt++)U[pt]&&t.touchData.startPosition[pt]&&Ce&&(t.touchData.singleTouchMoved=!0);if(R&&(fr==null||fr.pannable())&&G.panningEnabled()&&G.userPanningEnabled()){var XP=i(fr,t.touchData.starts);XP&&(T.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=ma(t.touchData.startPosition)),t.swipePanning?(G.panBy({x:ge[0]*X,y:ge[1]*X}),G.emit("dragpan")):Ce&&(t.swipePanning=!0,G.panBy({x:ve*X,y:Ge*X}),G.emit("dragpan"),fr&&(fr.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var ae=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);U[0]=ae[0],U[1]=ae[1]}}for(var Se=0;Se<U.length;Se++)ie[Se]=U[Se];R&&T.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var W;t.registerBinding(e,"touchcancel",W=function(T){var R=t.touchData.start;t.touchData.capture=!1,R&&R.unactivate()});var oe,he,ne,se;if(t.registerBinding(e,"touchend",oe=function(T){var R=t.touchData.start,Q=t.touchData.capture;if(Q)T.touches.length===0&&(t.touchData.capture=!1),T.preventDefault();else return;var G=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var U=t.cy,ie=U.zoom(),X=t.touchData.now,ae=t.touchData.earlier;if(T.touches[0]){var we=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);X[0]=we[0],X[1]=we[1]}if(T.touches[1]){var we=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);X[2]=we[0],X[3]=we[1]}if(T.touches[2]){var we=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);X[4]=we[0],X[5]=we[1]}R&&R.unactivate();var Ce;if(t.touchData.cxt){if(Ce={originalEvent:T,type:"cxttapend",position:{x:X[0],y:X[1]}},R?R.emit(Ce):U.emit(Ce),!t.touchData.cxtDragged){var ge={originalEvent:T,type:"cxttap",position:{x:X[0],y:X[1]}};R?R.emit(ge):U.emit(ge)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!T.touches[2]&&U.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Se=U.collection(t.getAllInBox(G[0],G[1],G[2],G[3]));G[0]=void 0,G[1]=void 0,G[2]=void 0,G[3]=void 0,G[4]=0,t.redrawHint("select",!0),U.emit({type:"boxend",originalEvent:T,position:{x:X[0],y:X[1]}});var ve=function(Lt){return Lt.selectable()&&!Lt.selected()};Se.emit("box").stdFilter(ve).select().emit("boxselect"),Se.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(R!=null&&R.unactivate(),T.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!T.touches[1]){if(!T.touches[0]){if(!T.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var ye=t.dragData.touchDragEles;if(R!=null){var Ge=R._private.grabbed;y(ye),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Ge&&(R.emit("freeon"),ye.emit("free"),t.dragData.didDrag&&(R.emit("dragfreeon"),ye.emit("dragfree"))),n(R,["touchend","tapend","vmouseup","tapdragout"],T,{x:X[0],y:X[1]}),R.unactivate(),t.touchData.start=null}else{var Re=t.findNearestElement(X[0],X[1],!0,!0);n(Re,["touchend","tapend","vmouseup","tapdragout"],T,{x:X[0],y:X[1]})}var rt=t.touchData.startPosition[0]-X[0],nt=rt*rt,Qe=t.touchData.startPosition[1]-X[1],Ot=Qe*Qe,ut=nt+Ot,ht=ut*ie*ie;t.touchData.singleTouchMoved||(R||U.$(":selected").unselect(["tapunselect"]),n(R,["tap","vclick"],T,{x:X[0],y:X[1]}),he=!1,T.timeStamp-se<=U.multiClickDebounceTime()?(ne&&clearTimeout(ne),he=!0,se=null,n(R,["dbltap","vdblclick"],T,{x:X[0],y:X[1]})):(ne=setTimeout(function(){he||n(R,["onetap","voneclick"],T,{x:X[0],y:X[1]})},U.multiClickDebounceTime()),se=T.timeStamp)),R!=null&&!t.dragData.didDrag&&R._private.selectable&&ht<t.touchTapThreshold2&&!t.pinching&&(U.selectionType()==="single"?(U.$(r).unmerge(R).unselect(["tapunselect"]),R.select(["tapselect"])):R.selected()?R.unselect(["tapunselect"]):R.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}}}for(var Wt=0;Wt<X.length;Wt++)ae[Wt]=X[Wt];t.dragData.didDrag=!1,T.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),T.touches.length<2&&(T.touches.length===1&&(t.touchData.startGPosition=[T.touches[0].clientX,T.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())},!1),typeof TouchEvent>"u"){var ue=[],pe=function(T){return{clientX:T.clientX,clientY:T.clientY,force:1,identifier:T.pointerId,pageX:T.pageX,pageY:T.pageY,radiusX:T.width/2,radiusY:T.height/2,screenX:T.screenX,screenY:T.screenY,target:T.target}},de=function(T){return{event:T,touch:pe(T)}},me=function(T){ue.push(de(T))},Ne=function(T){for(var R=0;R<ue.length;R++){var Q=ue[R];if(Q.event.pointerId===T.pointerId){ue.splice(R,1);return}}},De=function(T){var R=ue.filter(function(Q){return Q.event.pointerId===T.pointerId})[0];R.event=T,R.touch=pe(T)},Ee=function(T){T.touches=ue.map(function(R){return R.touch})},Pe=function(T){return T.pointerType==="mouse"||T.pointerType===4};t.registerBinding(t.container,"pointerdown",function(te){Pe(te)||(te.preventDefault(),me(te),Ee(te),A(te))}),t.registerBinding(t.container,"pointerup",function(te){Pe(te)||(Ne(te),Ee(te),oe(te))}),t.registerBinding(t.container,"pointercancel",function(te){Pe(te)||(Ne(te),Ee(te),W(te))}),t.registerBinding(t.container,"pointermove",function(te){Pe(te)||(te.preventDefault(),De(te),Ee(te),K(te))})}};var Hr={};Hr.generatePolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:function(n,a,i,o,l,u){this.renderer.nodeShapeImpl("polygon",n,a,i,o,l,this.points)},intersectLine:function(n,a,i,o,l,u,c,d){return Bi(l,u,this.points,n,a,i/2,o/2,c)},checkPoint:function(n,a,i,o,l,u,c,d){return Rr(n,a,this.points,u,c,o,l,[0,-1],i)}}},Hr.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i)},intersectLine:function(e,r,n,a,i,o,l,u){return t5(i,o,e,r,n/2+l,a/2+l)},checkPoint:function(e,r,n,a,i,o,l,u){return Vn(e,r,a,i,o,l,n)}}},Hr.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:function(n,a,i,o,l,u,c){if(u[c]!==void 0&&u[c+"-cx"]===n&&u[c+"-cy"]===a)return u[c];u[c]=new Array(e.length/2),u[c+"-cx"]=n,u[c+"-cy"]=a;var d=i/2,f=o/2;l=l==="auto"?Xh(i,o):l;for(var p=new Array(e.length/2),v=0;v<e.length/2;v++)p[v]={x:n+d*e[v*2],y:a+f*e[v*2+1]};var h,g,y,m,b=p.length;for(g=p[b-1],h=0;h<b;h++)y=p[h%b],m=p[(h+1)%b],u[c][h]=Nc(g,y,m,l),g=y,y=m;return u[c]},draw:function(n,a,i,o,l,u,c){this.renderer.nodeShapeImpl("round-polygon",n,a,i,o,l,this.points,this.getOrCreateCorners(a,i,o,l,u,c,"drawCorners"))},intersectLine:function(n,a,i,o,l,u,c,d,f){return r5(l,u,this.points,n,a,i,o,c,this.getOrCreateCorners(n,a,i,o,d,f,"corners"))},checkPoint:function(n,a,i,o,l,u,c,d,f){return e5(n,a,this.points,u,c,o,l,this.getOrCreateCorners(u,c,o,l,d,f,"corners"))}}},Hr.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Mt(4,0),draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i,this.points,o)},intersectLine:function(e,r,n,a,i,o,l,u){return jh(i,o,e,r,n,a,l,u)},checkPoint:function(e,r,n,a,i,o,l,u){var c=a/2,d=i/2;u=u==="auto"?Rn(a,i):u,u=Math.min(c,d,u);var f=u*2;return!!(Rr(e,r,this.points,o,l,a,i-f,[0,-1],n)||Rr(e,r,this.points,o,l,a-f,i,[0,-1],n)||Vn(e,r,f,f,o-c+u,l-d+u,n)||Vn(e,r,f,f,o+c-u,l-d+u,n)||Vn(e,r,f,f,o+c-u,l+d-u,n)||Vn(e,r,f,f,o-c+u,l+d-u,n))}}},Hr.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:Jl(),points:Mt(4,0),draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i,null,o)},generateCutTrianglePts:function(e,r,n,a,i){var o=i==="auto"?this.cornerLength:i,l=r/2,u=e/2,c=n-u,d=n+u,f=a-l,p=a+l;return{topLeft:[c,f+o,c+o,f,c+o,f+o],topRight:[d-o,f,d,f+o,d-o,f+o],bottomRight:[d,p-o,d-o,p,d-o,p-o],bottomLeft:[c+o,p,c,p-o,c+o,p-o]}},intersectLine:function(e,r,n,a,i,o,l,u){var c=this.generateCutTrianglePts(n+2*l,a+2*l,e,r,u),d=[].concat.apply([],[c.topLeft.splice(0,4),c.topRight.splice(0,4),c.bottomRight.splice(0,4),c.bottomLeft.splice(0,4)]);return Bi(i,o,d,e,r)},checkPoint:function(e,r,n,a,i,o,l,u){var c=u==="auto"?this.cornerLength:u;if(Rr(e,r,this.points,o,l,a,i-2*c,[0,-1],n)||Rr(e,r,this.points,o,l,a-2*c,i,[0,-1],n))return!0;var d=this.generateCutTrianglePts(a,i,o,l);return Ht(e,r,d.topLeft)||Ht(e,r,d.topRight)||Ht(e,r,d.bottomRight)||Ht(e,r,d.bottomLeft)}}},Hr.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Mt(4,0),draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i)},intersectLine:function(e,r,n,a,i,o,l,u){var c=.15,d=.5,f=.85,p=this.generateBarrelBezierPts(n+2*l,a+2*l,e,r),v=function(y){var m=ya({x:y[0],y:y[1]},{x:y[2],y:y[3]},{x:y[4],y:y[5]},c),b=ya({x:y[0],y:y[1]},{x:y[2],y:y[3]},{x:y[4],y:y[5]},d),w=ya({x:y[0],y:y[1]},{x:y[2],y:y[3]},{x:y[4],y:y[5]},f);return[y[0],y[1],m.x,m.y,b.x,b.y,w.x,w.y,y[4],y[5]]},h=[].concat(v(p.topLeft),v(p.topRight),v(p.bottomRight),v(p.bottomLeft));return Bi(i,o,h,e,r)},generateBarrelBezierPts:function(e,r,n,a){var i=r/2,o=e/2,l=n-o,u=n+o,c=a-i,d=a+i,f=ec(e,r),p=f.heightOffset,v=f.widthOffset,h=f.ctrlPtOffsetPct*e,g={topLeft:[l,c+p,l+h,c,l+v,c],topRight:[u-v,c,u-h,c,u,c+p],bottomRight:[u,d-p,u-h,d,u-v,d],bottomLeft:[l+v,d,l+h,d,l,d-p]};return g.topLeft.isTop=!0,g.topRight.isTop=!0,g.bottomLeft.isBottom=!0,g.bottomRight.isBottom=!0,g},checkPoint:function(e,r,n,a,i,o,l,u){var c=ec(a,i),d=c.heightOffset,f=c.widthOffset;if(Rr(e,r,this.points,o,l,a,i-2*d,[0,-1],n)||Rr(e,r,this.points,o,l,a-2*f,i,[0,-1],n))return!0;for(var p=this.generateBarrelBezierPts(a,i,o,l),v=function(B,S,N){var D=N[4],P=N[2],L=N[0],O=N[5],I=N[1],_=Math.min(D,L),M=Math.max(D,L),F=Math.min(O,I),V=Math.max(O,I);if(_<=B&&B<=M&&F<=S&&S<=V){var H=n5(D,P,L),$=XB(H[0],H[1],H[2],B),z=$.filter(function(j){return 0<=j&&j<=1});if(z.length>0)return z[0]}return null},h=Object.keys(p),g=0;g<h.length;g++){var y=h[g],m=p[y],b=v(e,r,m);if(b!=null){var w=m[5],C=m[3],x=m[1],E=ft(w,C,x,b);if(m.isTop&&E<=r||m.isBottom&&r<=E)return!0}}return!1}}},Hr.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Mt(4,0),draw:function(e,r,n,a,i,o){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i,this.points,o)},intersectLine:function(e,r,n,a,i,o,l,u){var c=e-(n/2+l),d=r-(a/2+l),f=d,p=e+(n/2+l),v=ln(i,o,e,r,c,d,p,f,!1);return v.length>0?v:jh(i,o,e,r,n,a,l,u)},checkPoint:function(e,r,n,a,i,o,l,u){u=u==="auto"?Rn(a,i):u;var c=2*u;if(Rr(e,r,this.points,o,l,a,i-c,[0,-1],n)||Rr(e,r,this.points,o,l,a-c,i,[0,-1],n))return!0;var d=a/2+2*n,f=i/2+2*n,p=[o-d,l-f,o-d,l,o+d,l,o+d,l-f];return!!(Ht(e,r,p)||Vn(e,r,c,c,o+a/2-u,l+i/2-u,n)||Vn(e,r,c,c,o-a/2+u,l+i/2-u,n))}}},Hr.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Mt(3,0)),this.generateRoundPolygon("round-triangle",Mt(3,0)),this.generatePolygon("rectangle",Mt(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",Mt(5,0)),this.generateRoundPolygon("round-pentagon",Mt(5,0)),this.generatePolygon("hexagon",Mt(6,0)),this.generateRoundPolygon("round-hexagon",Mt(6,0)),this.generatePolygon("heptagon",Mt(7,0)),this.generateRoundPolygon("round-heptagon",Mt(7,0)),this.generatePolygon("octagon",Mt(8,0)),this.generateRoundPolygon("round-octagon",Mt(8,0));var n=new Array(20);{var a=Ql(5,0),i=Ql(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var l=0;l<i.length/2;l++)i[l*2]*=o,i[l*2+1]*=o;for(var l=0;l<20/4;l++)n[l*4]=a[l*2],n[l*4+1]=a[l*2+1],n[l*4+2]=i[l*2],n[l*4+3]=i[l*2+1]}n=Yh(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);{var u=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",u),this.generateRoundPolygon("round-tag",u)}t.makePolygon=function(c){var d=c.join("$"),f="polygon-"+d,p;return(p=this[f])?p:e.generatePolygon(f,c)}};var Hi={};Hi.timeToRender=function(){return this.redrawTotalTime/this.redrawCount},Hi.redraw=function(t){t=t||zh();var e=this;e.averageRedrawTime===void 0&&(e.averageRedrawTime=0),e.lastRedrawTime===void 0&&(e.lastRedrawTime=0),e.lastDrawTime===void 0&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t},Hi.beforeRender=function(t,e){if(!this.destroyed){e==null&&Xe("Priority is not optional for beforeRender");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort(function(n,a){return a.priority-n.priority})}};var Hv=function(e,r,n){for(var a=e.beforeRenderCallbacks,i=0;i<a.length;i++)a[i].fn(r,n)};Hi.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var r=function n(a){if(!t.destroyed){if(!e.batching())if(t.requestedFrame&&!t.skipFrame){Hv(t,!0,a);var i=Vr();t.render(t.renderOptions);var o=t.lastDrawTime=Vr();t.averageRedrawTime===void 0&&(t.averageRedrawTime=o-i),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var l=o-i;t.redrawTotalTime+=l,t.lastRedrawTime=l,t.averageRedrawTime=t.averageRedrawTime/2+l/2,t.requestedFrame=!1}else Hv(t,!1,a);t.skipFrame=!1,Lo(n)}};Lo(r)}};var V3=function(e){this.init(e)},Kv=V3,Aa=Kv.prototype;Aa.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],Aa.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container(),n=e.cy.window();if(n){var a=n.document,i=a.head,o="__________cytoscape_stylesheet",l="__________cytoscape_container",u=a.getElementById(o)!=null;if(r.className.indexOf(l)<0&&(r.className=(r.className||"")+" "+l),!u){var c=a.createElement("style");c.id=o,c.textContent="."+l+" { position: relative; }",i.insertBefore(c,i.children[0])}var d=n.getComputedStyle(r),f=d.getPropertyValue("position");f==="static"&&Ae("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=le(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()},Aa.notify=function(t,e){var r=this,n=r.cy;if(!this.destroyed){if(t==="init"){r.load();return}if(t==="destroy"){r.destroy();return}(t==="add"||t==="remove"||t==="move"&&n.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&r.invalidateCachedZSortedEles(),t==="viewport"&&r.redrawHint("select",!0),(t==="load"||t==="resize"||t==="mount")&&(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},Aa.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],n=r,a=n.target;(a.off||a.removeEventListener).apply(a,n.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}},Aa.isHeadless=function(){return!1},[xc,$v,zv,Ia,Hr,Hi].forEach(function(t){xe(Aa,t)});var Pc=1e3/60,qv={setupDequeueing:function(e){return function(){var n=this,a=this.renderer;if(!n.dequeueingSetup){n.dequeueingSetup=!0;var i=_o(function(){a.redrawHint("eles",!0),a.redrawHint("drag",!0),a.redraw()},e.deqRedrawThreshold),o=function(c,d){var f=Vr(),p=a.averageRedrawTime,v=a.lastRedrawTime,h=[],g=a.cy.extent(),y=a.getPixelRatio();for(c||a.flushRenderedStyleQueue();;){var m=Vr(),b=m-f,w=m-d;if(v<Pc){var C=Pc-(c?p:0);if(w>=e.deqFastCost*C)break}else if(c){if(b>=e.deqCost*v||b>=e.deqAvgCost*p)break}else if(w>=e.deqNoDrawCost*Pc)break;var x=e.deq(n,y,g);if(x.length>0)for(var E=0;E<x.length;E++)h.push(x[E]);else break}h.length>0&&(e.onDeqd(n,h),!c&&e.shouldRedraw(n,h,y,g)&&i())},l=e.priority||Gl;a.beforeRender(o,l(n))}}}},R3=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mo;Rl(this,t),this.idsByKey=new wr,this.keyForId=new wr,this.cachesByLvl=new wr,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return $l(t,[{key:"getIdsFor",value:function(r){r==null&&Xe("Can not get id list for null key");var n=this.idsByKey,a=this.idsByKey.get(r);return a||(a=new ga,n.set(r,a)),a}},{key:"addIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).add(n)}},{key:"deleteIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).delete(n)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);this.deleteIdForKey(a,n),this.addIdForKey(i,n),this.keyForId.set(n,i)}},{key:"deleteKeyMappingFor",value:function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteIdForKey(a,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);return a!==i}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var n=this.cachesByLvl,a=this.lvls,i=n.get(r);return i||(i=new wr,n.set(r,i),a.push(r)),i}},{key:"getCache",value:function(r,n){return this.getCachesAt(n).get(r)}},{key:"get",value:function(r,n){var a=this.getKey(r),i=this.getCache(a,n);return i!=null&&this.updateKeyMappingFor(r),i}},{key:"getForCachedKey",value:function(r,n){var a=this.keyForId.get(r.id()),i=this.getCache(a,n);return i}},{key:"hasCache",value:function(r,n){return this.getCachesAt(n).has(r)}},{key:"has",value:function(r,n){var a=this.getKey(r);return this.hasCache(a,n)}},{key:"setCache",value:function(r,n,a){a.key=r,this.getCachesAt(n).set(r,a)}},{key:"set",value:function(r,n,a){var i=this.getKey(r);this.setCache(i,n,a),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,n){this.getCachesAt(n).delete(r)}},{key:"delete",value:function(r,n){var a=this.getKey(r);this.deleteCache(a,n)}},{key:"invalidateKey",value:function(r){var n=this;this.lvls.forEach(function(a){return n.deleteCache(r,a)})}},{key:"invalidate",value:function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteKeyMappingFor(r);var i=this.doesEleInvalidateKey(r);return i&&this.invalidateKey(a),i||this.getNumberOfIdsForKey(a)===0}}]),t}(),Uv=25,ks=50,xs=-4,Oc=3,$3=7.99,z3=8,H3=1024,K3=1024,q3=1024,U3=.2,G3=.8,W3=10,j3=.15,Y3=.1,X3=.9,Z3=.9,Q3=100,J3=1,Va={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},eP=wt({getKey:null,doesEleInvalidateKey:Mo,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Ah,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Ki=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var a=eP(r);xe(n,a),n.lookup=new R3(a.getKey,a.doesEleInvalidateKey),n.setupDequeueing()},ct=Ki.prototype;ct.reasons=Va,ct.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},ct.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n},ct.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Ei(function(r,n){return n.reqs-r.reqs});return e},ct.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e},ct.getElement=function(t,e,r,n,a){var i=this,o=this.renderer,l=o.cy.zoom(),u=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!i.allowEdgeTxrCaching&&t.isEdge()||!i.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(Yl(l*r))),n<xs)n=xs;else if(l>=$3||n>Oc)return null;var c=Math.pow(2,n),d=e.h*c,f=e.w*c,p=o.eleTextBiggerThanMin(t,c);if(!this.isVisible(t,p))return null;var v=u.get(t,n);if(v&&v.invalidated&&(v.invalidated=!1,v.texture.invalidatedWidth-=v.width),v)return v;var h;if(d<=Uv?h=Uv:d<=ks?h=ks:h=Math.ceil(d/ks)*ks,d>q3||f>K3)return null;var g=i.getTextureQueue(h),y=g[g.length-2],m=function(){return i.recycleTexture(h,f)||i.addTexture(h,f)};y||(y=g[g.length-1]),y||(y=m()),y.width-y.usedWidth<f&&(y=m());for(var b=function(_){return _&&_.scaledLabelShown===p},w=a&&a===Va.dequeue,C=a&&a===Va.highQuality,x=a&&a===Va.downscale,E,k=n+1;k<=Oc;k++){var B=u.get(t,k);if(B){E=B;break}}var S=E&&E.level===n+1?E:null,N=function(){y.context.drawImage(S.texture.canvas,S.x,0,S.width,S.height,y.usedWidth,0,f,d)};if(y.context.setTransform(1,0,0,1,0,0),y.context.clearRect(y.usedWidth,0,f,h),b(S))N();else if(b(E))if(C){for(var D=E.level;D>n;D--)S=i.getElement(t,e,r,D,Va.downscale);N()}else return i.queueElement(t,E.level-1),E;else{var P;if(!w&&!C&&!x)for(var L=n-1;L>=xs;L--){var O=u.get(t,L);if(O){P=O;break}}if(b(P))return i.queueElement(t,n),P;y.context.translate(y.usedWidth,0),y.context.scale(c,c),this.drawElement(y.context,t,e,p,!1),y.context.scale(1/c,1/c),y.context.translate(-y.usedWidth,0)}return v={x:y.usedWidth,texture:y,level:n,scale:c,width:f,height:d,scaledLabelShown:p},y.usedWidth+=Math.ceil(f+z3),y.eleCaches.push(v),u.set(t,n,v),i.checkTextureFullness(y),v},ct.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])},ct.invalidateElement=function(t){var e=this,r=e.lookup,n=[],a=r.isInvalid(t);if(a){for(var i=xs;i<=Oc;i++){var o=r.getForCachedKey(t,i);o&&n.push(o)}var l=r.invalidate(t);if(l)for(var u=0;u<n.length;u++){var c=n[u],d=c.texture;d.invalidatedWidth+=c.width,c.invalidated=!0,e.checkTextureUtility(d)}e.removeFromQueue(t)}},ct.checkTextureUtility=function(t){t.invalidatedWidth>=U3*t.width&&this.retireTexture(t)},ct.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>G3&&t.fullnessChecks>=W3?on(r,t):t.fullnessChecks++},ct.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),a=this.lookup;on(n,t),t.retired=!0;for(var i=t.eleCaches,o=0;o<i.length;o++){var l=i[o];a.deleteCache(l.key,l.level)}Wl(i);var u=e.getRetiredTextureQueue(r);u.push(t)},ct.addTexture=function(t,e){var r=this,n=r.getTextureQueue(t),a={};return n.push(a),a.eleCaches=[],a.height=t,a.width=Math.max(H3,e),a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,a.canvas=r.renderer.makeOffscreenCanvas(a.width,a.height),a.context=a.canvas.getContext("2d"),a},ct.recycleTexture=function(t,e){for(var r=this,n=r.getTextureQueue(t),a=r.getRetiredTextureQueue(t),i=0;i<a.length;i++){var o=a[i];if(o.width>=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Wl(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),on(a,o),n.push(o),o}},ct.queueElement=function(t,e){var r=this,n=r.getElementQueue(),a=r.getElementKeyToQueue(),i=this.getKey(t),o=a[i];if(o)o.level=Math.max(o.level,e),o.eles.merge(t),o.reqs++,n.updateItem(o);else{var l={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(l),a[i]=l}},ct.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=[],i=e.lookup,o=0;o<J3&&r.size()>0;o++){var l=r.pop(),u=l.key,c=l.eles[0],d=i.hasCache(c,l.level);if(n[u]=null,d)continue;a.push(l);var f=e.getBoundingBox(c);e.getElement(c,f,t,l.level,Va.dequeue)}return a},ct.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=this.getKey(t),i=n[a];i!=null&&(i.eles.length===1?(i.reqs=Ul,r.updateItem(i),r.pop(),n[a]=null):i.eles.unmerge(t))},ct.onDequeue=function(t){this.onDequeues.push(t)},ct.offDequeue=function(t){on(this.onDequeues,t)},ct.setupDequeueing=qv.setupDequeueing({deqRedrawThreshold:Q3,deqCost:j3,deqAvgCost:Y3,deqNoDrawCost:X3,deqFastCost:Z3,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n<e.onDequeues.length;n++){var a=e.onDequeues[n];a(r)}},shouldRedraw:function(e,r,n,a){for(var i=0;i<r.length;i++)for(var o=r[i].eles,l=0;l<o.length;l++){var u=o[l].boundingBox();if(Xl(u,a))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});var tP=1,qi=-4,Es=2,rP=3.99,nP=50,aP=50,iP=.15,oP=.1,sP=.9,lP=.9,cP=1,Gv=250,uP=4e3*4e3,dP=!0,Wv=function(e){var r=this,n=r.renderer=e,a=n.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=Vr()-2*Gv,r.skipping=!1,r.eleTxrDeqs=a.collection(),r.scheduleElementRefinement=_o(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},aP),n.beforeRender(function(o,l){l-r.lastInvalidationTime<=Gv?r.skipping=!0:r.skipping=!1},n.beforeRenderPriorities.lyrTxrSkip);var i=function(l,u){return u.reqs-l.reqs};r.layersQueue=new Ei(i),r.setupDequeueing()},Et=Wv.prototype,jv=0,fP=Math.pow(2,53)-1;Et.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),a=Math.ceil(t.h*r),i=this.renderer.makeOffscreenCanvas(n,a),o={id:jv=++jv%fP,bb:t,level:e,width:n,height:a,canvas:i,context:i.getContext("2d"),eles:[],elesQueue:[],reqs:0},l=o.context,u=-o.bb.x1,c=-o.bb.y1;return l.scale(r,r),l.translate(u,c),o},Et.getLayers=function(t,e,r){var n=this,a=n.renderer,i=a.cy,o=i.zoom(),l=n.firstGet;if(n.firstGet=!1,r==null){if(r=Math.ceil(Yl(o*e)),r<qi)r=qi;else if(o>=rP||r>Es)return null}n.validateLayersElesOrdering(r,t);var u=n.layersByLevel,c=Math.pow(2,r),d=u[r]=u[r]||[],f,p=n.levelIsComplete(r,t),v,h=function(){var N=function(I){if(n.validateLayersElesOrdering(I,t),n.levelIsComplete(I,t))return v=u[I],!0},D=function(I){if(!v)for(var _=r+I;qi<=_&&_<=Es&&!N(_);_+=I);};D(1),D(-1);for(var P=d.length-1;P>=0;P--){var L=d[P];L.invalid&&on(d,L)}};if(!p)h();else return d;var g=function(){if(!f){f=zt();for(var N=0;N<t.length;N++)Uh(f,t[N].boundingBox())}return f},y=function(N){N=N||{};var D=N.after;g();var P=f.w*c*(f.h*c);if(P>uP)return null;var L=n.makeLayer(f,r);if(D!=null){var O=d.indexOf(D)+1;d.splice(O,0,L)}else(N.insert===void 0||N.insert)&&d.unshift(L);return L};if(n.skipping&&!l)return null;for(var m=null,b=t.length/tP,w=!l,C=0;C<t.length;C++){var x=t[C],E=x._private.rscratch,k=E.imgLayerCaches=E.imgLayerCaches||{},B=k[r];if(B){m=B;continue}if((!m||m.eles.length>=b||!Wh(m.bb,x.boundingBox()))&&(m=y({insert:!0,after:m}),!m))return null;v||w?n.queueLayer(m,x):n.drawEleInLayer(m,x,r,e),m.eles.push(x),k[r]=m}return v||(w?null:d)},Et.getEleLevelForLayerLevel=function(t,e){return t},Et.drawEleInLayer=function(t,e,r,n){var a=this,i=this.renderer,o=t.context,l=e.boundingBox();l.w===0||l.h===0||!e.visible()||(r=a.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(o,!1),i.drawCachedElement(o,e,null,null,r,dP),i.setImgSmoothing(o,!0))},Et.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var a=0,i=0;i<n.length;i++){var o=n[i];if(o.reqs>0||o.invalid)return!1;a+=o.eles.length}return a===e.length},Et.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var a=r[n],i=-1,o=0;o<e.length;o++)if(a.eles[0]===e[o]){i=o;break}if(i<0){this.invalidateLayer(a);continue}for(var l=i,o=0;o<a.eles.length;o++)if(a.eles[o]!==e[l+o]){this.invalidateLayer(a);break}}},Et.updateElementsInLayers=function(t,e){for(var r=this,n=vi(t[0]),a=0;a<t.length;a++)for(var i=n?null:t[a],o=n?t[a]:t[a].ele,l=o._private.rscratch,u=l.imgLayerCaches=l.imgLayerCaches||{},c=qi;c<=Es;c++){var d=u[c];d&&(i&&r.getEleLevelForLayerLevel(d.level)!==i.level||e(d,o,i))}},Et.haveLayers=function(){for(var t=this,e=!1,r=qi;r<=Es;r++){var n=t.layersByLevel[r];if(n&&n.length>0){e=!0;break}}return e},Et.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=Vr(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(n,a,i){e.invalidateLayer(n)}))},Et.invalidateLayer=function(t){if(this.lastInvalidationTime=Vr(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];on(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var a=0;a<r.length;a++){var i=r[a]._private.rscratch.imgLayerCaches;i&&(i[e]=null)}}},Et.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,function(n,a,i){var o=n.replacement;if(o||(o=n.replacement=e.makeLayer(n.bb,n.level),o.replaces=n,o.eles=n.eles),!o.reqs)for(var l=0;l<o.eles.length;l++)e.queueLayer(o,o.eles[l])})},Et.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},Et.queueLayer=function(t,e){var r=this,n=r.layersQueue,a=t.elesQueue,i=a.hasId=a.hasId||{};if(!t.replacement){if(e){if(i[e.id()])return;a.push(e),i[e.id()]=!0}t.reqs?(t.reqs++,n.updateItem(t)):(t.reqs=1,n.push(t))}},Et.dequeue=function(t){for(var e=this,r=e.layersQueue,n=[],a=0;a<cP&&r.size()!==0;){var i=r.peek();if(i.replacement){r.pop();continue}if(i.replaces&&i!==i.replaces.replacement){r.pop();continue}if(i.invalid){r.pop();continue}var o=i.elesQueue.shift();o&&(e.drawEleInLayer(i,o,i.level,t),a++),n.length===0&&n.push(!0),i.elesQueue.length===0&&(r.pop(),i.reqs=0,i.replaces&&e.applyLayerReplacement(i),e.requestRedraw())}return n},Et.applyLayerReplacement=function(t){var e=this,r=e.layersByLevel[t.level],n=t.replaces,a=r.indexOf(n);if(!(a<0||n.invalid)){r[a]=t;for(var i=0;i<t.eles.length;i++){var o=t.eles[i]._private,l=o.imgLayerCaches=o.imgLayerCaches||{};l&&(l[t.level]=t)}e.requestRedraw()}},Et.requestRedraw=_o(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),Et.setupDequeueing=qv.setupDequeueing({deqRedrawThreshold:nP,deqCost:iP,deqAvgCost:oP,deqNoDrawCost:sP,deqFastCost:lP,deq:function(e,r){return e.dequeue(r)},onDeqd:Gl,shouldRedraw:Ah,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});var Yv={},Xv;function hP(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y)}}function pP(t,e,r){for(var n,a=0;a<e.length;a++){var i=e[a];a===0&&(n=i),t.lineTo(i.x,i.y)}t.quadraticCurveTo(r.x,r.y,n.x,n.y)}function Zv(t,e,r){t.beginPath&&t.beginPath();for(var n=e,a=0;a<n.length;a++){var i=n[a];t.lineTo(i.x,i.y)}var o=r,l=r[0];t.moveTo(l.x,l.y);for(var a=1;a<o.length;a++){var i=o[a];t.lineTo(i.x,i.y)}t.closePath&&t.closePath()}function vP(t,e,r,n,a){t.beginPath&&t.beginPath(),t.arc(r,n,a,0,Math.PI*2,!1);var i=e,o=i[0];t.moveTo(o.x,o.y);for(var l=0;l<i.length;l++){var u=i[l];t.lineTo(u.x,u.y)}t.closePath&&t.closePath()}function gP(t,e,r,n){t.arc(e,r,n,0,Math.PI*2,!1)}Yv.arrowShapeImpl=function(t){return(Xv||(Xv={polygon:hP,"triangle-backcurve":pP,"triangle-tee":Zv,"circle-triangle":vP,"triangle-cross":Zv,circle:gP}))[t]};var Sr={};Sr.drawElement=function(t,e,r,n,a,i){var o=this;e.isNode()?o.drawNode(t,e,r,n,a,i):o.drawEdge(t,e,r,n,a,i)},Sr.drawElementOverlay=function(t,e){var r=this;e.isNode()?r.drawNodeOverlay(t,e):r.drawEdgeOverlay(t,e)},Sr.drawElementUnderlay=function(t,e){var r=this;e.isNode()?r.drawNodeUnderlay(t,e):r.drawEdgeUnderlay(t,e)},Sr.drawCachedElementPortion=function(t,e,r,n,a,i,o,l){var u=this,c=r.getBoundingBox(e);if(!(c.w===0||c.h===0)){var d=r.getElement(e,c,n,a,i);if(d!=null){var f=l(u,e);if(f===0)return;var p=o(u,e),v=c.x1,h=c.y1,g=c.w,y=c.h,m,b,w,C,x;if(p!==0){var E=r.getRotationPoint(e);w=E.x,C=E.y,t.translate(w,C),t.rotate(p),x=u.getImgSmoothing(t),x||u.setImgSmoothing(t,!0);var k=r.getRotationOffset(e);m=k.x,b=k.y}else m=v,b=h;var B;f!==1&&(B=t.globalAlpha,t.globalAlpha=B*f),t.drawImage(d.texture.canvas,d.x,0,d.width,d.height,m,b,g,y),f!==1&&(t.globalAlpha=B),p!==0&&(t.rotate(-p),t.translate(-w,-C),x||u.setImgSmoothing(t,!1))}else r.drawElement(t,e)}};var mP=function(){return 0},yP=function(e,r){return e.getTextAngle(r,null)},bP=function(e,r){return e.getTextAngle(r,"source")},wP=function(e,r){return e.getTextAngle(r,"target")},CP=function(e,r){return r.effectiveOpacity()},_c=function(e,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity()};Sr.drawCachedElement=function(t,e,r,n,a,i){var o=this,l=o.data,u=l.eleTxrCache,c=l.lblTxrCache,d=l.slbTxrCache,f=l.tlbTxrCache,p=e.boundingBox(),v=i===!0?u.reasons.highQuality:null;if(!(p.w===0||p.h===0||!e.visible())&&(!n||Xl(p,n))){var h=e.isEdge(),g=e.element()._private.rscratch.badLine;o.drawElementUnderlay(t,e),o.drawCachedElementPortion(t,e,u,r,a,v,mP,CP),(!h||!g)&&o.drawCachedElementPortion(t,e,c,r,a,v,yP,_c),h&&!g&&(o.drawCachedElementPortion(t,e,d,r,a,v,bP,_c),o.drawCachedElementPortion(t,e,f,r,a,v,wP,_c)),o.drawElementOverlay(t,e)}},Sr.drawElements=function(t,e){for(var r=this,n=0;n<e.length;n++){var a=e[n];r.drawElement(t,a)}},Sr.drawCachedElements=function(t,e,r,n){for(var a=this,i=0;i<e.length;i++){var o=e[i];a.drawCachedElement(t,o,r,n)}},Sr.drawCachedNodes=function(t,e,r,n){for(var a=this,i=0;i<e.length;i++){var o=e[i];o.isNode()&&a.drawCachedElement(t,o,r,n)}},Sr.drawLayeredElements=function(t,e,r,n){var a=this,i=a.data.lyrTxrCache.getLayers(e,r);if(i)for(var o=0;o<i.length;o++){var l=i[o],u=l.bb;u.w===0||u.h===0||t.drawImage(l.canvas,u.x1,u.y1,u.w,u.h)}else a.drawCachedElements(t,e,r,n)};var Kr={};Kr.drawEdge=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,l=e._private.rscratch;if(!(i&&!e.visible())&&!(l.badLine||l.allpts==null||isNaN(l.allpts[0]))){var u;r&&(u=r,t.translate(-u.x1,-u.y1));var c=i?e.pstyle("opacity").value:1,d=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,p=e.pstyle("line-style").value,v=e.pstyle("width").pfValue,h=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,y=e.pstyle("line-outline-color").value,m=c*d,b=c*d,w=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;f==="straight-triangle"?(o.eleStrokeStyle(t,e,I),o.drawEdgeTrianglePath(e,t,l.allpts)):(t.lineWidth=v,t.lineCap=h,o.eleStrokeStyle(t,e,I),o.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},C=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;if(t.lineWidth=v+g,t.lineCap=h,g>0)o.colorStrokeStyle(t,y[0],y[1],y[2],I);else{t.lineCap="butt";return}f==="straight-triangle"?o.drawEdgeTrianglePath(e,t,l.allpts):(o.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},x=function(){a&&o.drawEdgeOverlay(t,e)},E=function(){a&&o.drawEdgeUnderlay(t,e)},k=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;o.drawArrowheads(t,e,I)},B=function(){o.drawElementText(t,e,null,n)};t.lineJoin="round";var S=e.pstyle("ghost").value==="yes";if(S){var N=e.pstyle("ghost-offset-x").pfValue,D=e.pstyle("ghost-offset-y").pfValue,P=e.pstyle("ghost-opacity").value,L=m*P;t.translate(N,D),w(L),k(L),t.translate(-N,-D)}else C();E(),w(),k(),x(),B(),r&&t.translate(u.x1,u.y1)}};var Qv=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var a=n.pstyle("".concat(e,"-opacity")).value;if(a!==0){var i=this,o=i.usePaths(),l=n._private.rscratch,u=n.pstyle("".concat(e,"-padding")).pfValue,c=2*u,d=n.pstyle("".concat(e,"-color")).value;r.lineWidth=c,l.edgeType==="self"&&!o?r.lineCap="butt":r.lineCap="round",i.colorStrokeStyle(r,d[0],d[1],d[2],a),i.drawEdgePath(n,r,l.allpts,"solid")}}}};Kr.drawEdgeOverlay=Qv("overlay"),Kr.drawEdgeUnderlay=Qv("underlay"),Kr.drawEdgePath=function(t,e,r,n){var a=t._private.rscratch,i=e,o,l=!1,u=this.usePaths(),c=t.pstyle("line-dash-pattern").pfValue,d=t.pstyle("line-dash-offset").pfValue;if(u){var f=r.join("$"),p=a.pathCacheKey&&a.pathCacheKey===f;p?(o=e=a.pathCache,l=!0):(o=e=new Path2D,a.pathCacheKey=f,a.pathCache=o)}if(i.setLineDash)switch(n){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(c),i.lineDashOffset=d;break;case"solid":i.setLineDash([]);break}if(!l&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var v=2;v+3<r.length;v+=4)e.quadraticCurveTo(r[v],r[v+1],r[v+2],r[v+3]);break;case"straight":case"haystack":for(var h=2;h+1<r.length;h+=2)e.lineTo(r[h],r[h+1]);break;case"segments":if(a.isRound){var g=mh(a.roundCorners),y;try{for(g.s();!(y=g.n()).done;){var m=y.value;Lv(e,m)}}catch(w){g.e(w)}finally{g.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var b=2;b+1<r.length;b+=2)e.lineTo(r[b],r[b+1]);break}e=i,u?e.stroke(o):e.stroke(),e.setLineDash&&e.setLineDash([])},Kr.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle("width").pfValue,a=0;a+1<r.length;a+=2){var i=[r[a+2]-r[a],r[a+3]-r[a+1]],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]),l=[i[1]/o,-i[0]/o],u=[l[0]*n/2,l[1]*n/2];e.beginPath(),e.moveTo(r[a]-u[0],r[a+1]-u[1]),e.lineTo(r[a]+u[0],r[a+1]+u[1]),e.lineTo(r[a+2],r[a+3]),e.closePath(),e.fill()}},Kr.drawArrowheads=function(t,e,r){var n=e._private.rscratch,a=n.edgeType==="haystack";a||this.drawArrowhead(t,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),a||this.drawArrowhead(t,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)},Kr.drawArrowhead=function(t,e,r,n,a,i,o){if(!(isNaN(n)||n==null||isNaN(a)||a==null||isNaN(i)||i==null)){var l=this,u=e.pstyle(r+"-arrow-shape").value;if(u!=="none"){var c=e.pstyle(r+"-arrow-fill").value==="hollow"?"both":"filled",d=e.pstyle(r+"-arrow-fill").value,f=e.pstyle("width").pfValue,p=e.pstyle(r+"-arrow-width"),v=p.value==="match-line"?f:p.pfValue;p.units==="%"&&(v*=f);var h=e.pstyle("opacity").value;o===void 0&&(o=h);var g=t.globalCompositeOperation;(o!==1||d==="hollow")&&(t.globalCompositeOperation="destination-out",l.colorFillStyle(t,255,255,255,1),l.colorStrokeStyle(t,255,255,255,1),l.drawArrowShape(e,t,c,f,u,v,n,a,i),t.globalCompositeOperation=g);var y=e.pstyle(r+"-arrow-color").value;l.colorFillStyle(t,y[0],y[1],y[2],o),l.colorStrokeStyle(t,y[0],y[1],y[2],o),l.drawArrowShape(e,t,d,f,u,v,n,a,i)}}},Kr.drawArrowShape=function(t,e,r,n,a,i,o,l,u){var c=this,d=this.usePaths()&&a!=="triangle-cross",f=!1,p,v=e,h={x:o,y:l},g=t.pstyle("arrow-scale").value,y=this.getArrowWidth(n,g),m=c.arrowShapes[a];if(d){var b=c.arrowPathCache=c.arrowPathCache||[],w=Mn(a),C=b[w];C!=null?(p=e=C,f=!0):(p=e=new Path2D,b[w]=p)}f||(e.beginPath&&e.beginPath(),d?m.draw(e,1,0,{x:0,y:0},1):m.draw(e,y,u,h,n),e.closePath&&e.closePath()),e=v,d&&(e.translate(o,l),e.rotate(u),e.scale(y,y)),(r==="filled"||r==="both")&&(d?e.fill(p):e.fill()),(r==="hollow"||r==="both")&&(e.lineWidth=i/(d?y:1),e.lineJoin="miter",d?e.stroke(p):e.stroke()),d&&(e.scale(1/y,1/y),e.rotate(-u),e.translate(-o,-l))};var Lc={};Lc.safeDrawImage=function(t,e,r,n,a,i,o,l,u,c){if(!(a<=0||i<=0||u<=0||c<=0))try{t.drawImage(e,r,n,a,i,o,l,u,c)}catch(d){Ae(d)}},Lc.drawInscribedImage=function(t,e,r,n,a){var i=this,o=r.position(),l=o.x,u=o.y,c=r.cy().style(),d=c.getIndexedStyle.bind(c),f=d(r,"background-fit","value",n),p=d(r,"background-repeat","value",n),v=r.width(),h=r.height(),g=r.padding()*2,y=v+(d(r,"background-width-relative-to","value",n)==="inner"?0:g),m=h+(d(r,"background-height-relative-to","value",n)==="inner"?0:g),b=r._private.rscratch,w=d(r,"background-clip","value",n),C=w==="node",x=d(r,"background-image-opacity","value",n)*a,E=d(r,"background-image-smoothing","value",n),k=r.pstyle("corner-radius").value;k!=="auto"&&(k=r.pstyle("corner-radius").pfValue);var B=e.width||e.cachedW,S=e.height||e.cachedH;(B==null||S==null)&&(document.body.appendChild(e),B=e.cachedW=e.width||e.offsetWidth,S=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var N=B,D=S;if(d(r,"background-width","value",n)!=="auto"&&(d(r,"background-width","units",n)==="%"?N=d(r,"background-width","pfValue",n)*y:N=d(r,"background-width","pfValue",n)),d(r,"background-height","value",n)!=="auto"&&(d(r,"background-height","units",n)==="%"?D=d(r,"background-height","pfValue",n)*m:D=d(r,"background-height","pfValue",n)),!(N===0||D===0)){if(f==="contain"){var P=Math.min(y/N,m/D);N*=P,D*=P}else if(f==="cover"){var P=Math.max(y/N,m/D);N*=P,D*=P}var L=l-y/2,O=d(r,"background-position-x","units",n),I=d(r,"background-position-x","pfValue",n);O==="%"?L+=(y-N)*I:L+=I;var _=d(r,"background-offset-x","units",n),M=d(r,"background-offset-x","pfValue",n);_==="%"?L+=(y-N)*M:L+=M;var F=u-m/2,V=d(r,"background-position-y","units",n),H=d(r,"background-position-y","pfValue",n);V==="%"?F+=(m-D)*H:F+=H;var $=d(r,"background-offset-y","units",n),z=d(r,"background-offset-y","pfValue",n);$==="%"?F+=(m-D)*z:F+=z,b.pathCache&&(L-=l,F-=u,l=0,u=0);var j=t.globalAlpha;t.globalAlpha=x;var ee=i.getImgSmoothing(t),J=!1;if(E==="no"&&ee?(i.setImgSmoothing(t,!1),J=!0):E==="yes"&&!ee&&(i.setImgSmoothing(t,!0),J=!0),p==="no-repeat")C&&(t.save(),b.pathCache?t.clip(b.pathCache):(i.nodeShapes[i.getNodeShape(r)].draw(t,l,u,y,m,k,b),t.clip())),i.safeDrawImage(t,e,0,0,B,S,L,F,N,D),C&&t.restore();else{var Z=t.createPattern(e,p);t.fillStyle=Z,i.nodeShapes[i.getNodeShape(r)].draw(t,l,u,y,m,k,b),t.translate(L,F),t.fill(),t.translate(-L,-F)}t.globalAlpha=j,J&&i.setImgSmoothing(t,ee)}};var Wn={};Wn.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),n=this.getPixelRatio(),a=Math.ceil(Yl(r*n));e=Math.pow(2,a)}var i=t.pstyle("font-size").pfValue*e,o=t.pstyle("min-zoomed-font-size").pfValue;return!(i<o)},Wn.drawElementText=function(t,e,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(n==null){if(i&&!o.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var l=e.pstyle("label");if(!l||!l.value)return;var u=o.getLabelJustification(e);t.textAlign=u,t.textBaseline="bottom"}else{var c=e.element()._private.rscratch.badLine,d=e.pstyle("label"),f=e.pstyle("source-label"),p=e.pstyle("target-label");if(c||(!d||!d.value)&&(!f||!f.value)&&(!p||!p.value))return;t.textAlign="center",t.textBaseline="bottom"}var v=!r,h;r&&(h=r,t.translate(-h.x1,-h.y1)),a==null?(o.drawText(t,e,null,v,i),e.isEdge()&&(o.drawText(t,e,"source",v,i),o.drawText(t,e,"target",v,i))):o.drawText(t,e,a,v,i),r&&t.translate(h.x1,h.y1)},Wn.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if(e=this.fontCaches[r],e.context===t)return e;return e={context:t},this.fontCaches.push(e),e},Wn.setupTextStyle=function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,l=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*l,c=e.pstyle("color").value,d=e.pstyle("text-outline-color").value;t.font=n+" "+o+" "+a+" "+i,t.lineJoin="round",this.colorFillStyle(t,c[0],c[1],c[2],l),this.colorStrokeStyle(t,d[0],d[1],d[2],u)};function Fc(t,e,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+i,r),t.lineTo(e+n-i,r),t.quadraticCurveTo(e+n,r,e+n,r+i),t.lineTo(e+n,r+a-i),t.quadraticCurveTo(e+n,r+a,e+n-i,r+a),t.lineTo(e+i,r+a),t.quadraticCurveTo(e,r+a,e,r+a-i),t.lineTo(e,r+i),t.quadraticCurveTo(e,r,e+i,r),t.closePath(),o?t.stroke():t.fill()}Wn.getTextAngle=function(t,e){var r,n=t._private,a=n.rscratch,i=e?e+"-":"",o=t.pstyle(i+"text-rotation"),l=lr(a,"labelAngle",e);return o.strValue==="autorotate"?r=t.isEdge()?l:0:o.strValue==="none"?r=0:r=o.pfValue,r},Wn.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,o=i.rscratch,l=a?e.effectiveOpacity():1;if(!(a&&(l===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var u=lr(o,"labelX",r),c=lr(o,"labelY",r),d,f,p=this.getLabelText(e,r);if(p!=null&&p!==""&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(t,e,a);var v=r?r+"-":"",h=lr(o,"labelWidth",r),g=lr(o,"labelHeight",r),y=e.pstyle(v+"text-margin-x").pfValue,m=e.pstyle(v+"text-margin-y").pfValue,b=e.isEdge(),w=e.pstyle("text-halign").value,C=e.pstyle("text-valign").value;b&&(w="center",C="center"),u+=y,c+=m;var x;switch(n?x=this.getTextAngle(e,r):x=0,x!==0&&(d=u,f=c,t.translate(d,f),t.rotate(x),u=0,c=0),C){case"top":break;case"center":c+=g/2;break;case"bottom":c+=g;break}var E=e.pstyle("text-background-opacity").value,k=e.pstyle("text-border-opacity").value,B=e.pstyle("text-border-width").pfValue,S=e.pstyle("text-background-padding").pfValue,N=e.pstyle("text-background-shape").strValue,D=N.indexOf("round")===0,P=2;if(E>0||B>0&&k>0){var L=u-S;switch(w){case"left":L-=h;break;case"center":L-=h/2;break}var O=c-g-S,I=h+2*S,_=g+2*S;if(E>0){var M=t.fillStyle,F=e.pstyle("text-background-color").value;t.fillStyle="rgba("+F[0]+","+F[1]+","+F[2]+","+E*l+")",D?Fc(t,L,O,I,_,P):t.fillRect(L,O,I,_),t.fillStyle=M}if(B>0&&k>0){var V=t.strokeStyle,H=t.lineWidth,$=e.pstyle("text-border-color").value,z=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+$[0]+","+$[1]+","+$[2]+","+k*l+")",t.lineWidth=B,t.setLineDash)switch(z){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=B/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(D?Fc(t,L,O,I,_,P,"stroke"):t.strokeRect(L,O,I,_),z==="double"){var j=B/2;D?Fc(t,L+j,O+j,I-j*2,_-j*2,P,"stroke"):t.strokeRect(L+j,O+j,I-j*2,_-j*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=H,t.strokeStyle=V}}var ee=2*e.pstyle("text-outline-width").pfValue;if(ee>0&&(t.lineWidth=ee),e.pstyle("text-wrap").value==="wrap"){var J=lr(o,"labelWrapCachedLines",r),Z=lr(o,"labelLineHeight",r),re=h/2,Y=this.getLabelJustification(e);switch(Y==="auto"||(w==="left"?Y==="left"?u+=-h:Y==="center"&&(u+=-re):w==="center"?Y==="left"?u+=-re:Y==="right"&&(u+=re):w==="right"&&(Y==="center"?u+=re:Y==="right"&&(u+=h))),C){case"top":c-=(J.length-1)*Z;break;case"center":case"bottom":c-=(J.length-1)*Z;break}for(var A=0;A<J.length;A++)ee>0&&t.strokeText(J[A],u,c),t.fillText(J[A],u,c),c+=Z}else ee>0&&t.strokeText(p,u,c),t.fillText(p,u,c);x!==0&&(t.rotate(-x),t.translate(-d,-f))}}};var Ra={};Ra.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,l,u,c=e._private,d=c.rscratch,f=e.position();if(!(!le(f.x)||!le(f.y))&&!(i&&!e.visible())){var p=i?e.effectiveOpacity():1,v=o.usePaths(),h,g=!1,y=e.padding();l=e.width()+2*y,u=e.height()+2*y;var m;r&&(m=r,t.translate(-m.x1,-m.y1));for(var b=e.pstyle("background-image"),w=b.value,C=new Array(w.length),x=new Array(w.length),E=0,k=0;k<w.length;k++){var B=w[k],S=C[k]=B!=null&&B!=="none";if(S){var N=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",k);E++,x[k]=o.getCachedImage(B,N,function(){c.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var D=e.pstyle("background-blacken").value,P=e.pstyle("border-width").pfValue,L=e.pstyle("background-opacity").value*p,O=e.pstyle("border-color").value,I=e.pstyle("border-style").value,_=e.pstyle("border-join").value,M=e.pstyle("border-cap").value,F=e.pstyle("border-position").value,V=e.pstyle("border-dash-pattern").pfValue,H=e.pstyle("border-dash-offset").pfValue,$=e.pstyle("border-opacity").value*p,z=e.pstyle("outline-width").pfValue,j=e.pstyle("outline-color").value,ee=e.pstyle("outline-style").value,J=e.pstyle("outline-opacity").value*p,Z=e.pstyle("outline-offset").value,re=e.pstyle("corner-radius").value;re!=="auto"&&(re=e.pstyle("corner-radius").pfValue);var Y=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:L;o.eleFillStyle(t,e,ie)},A=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$;o.colorStrokeStyle(t,O[0],O[1],O[2],ie)},K=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J;o.colorStrokeStyle(t,j[0],j[1],j[2],ie)},W=function(ie,X,ae,we){var Ce=o.nodePathCache=o.nodePathCache||[],ge=Mh(ae==="polygon"?ae+","+we.join(","):ae,""+X,""+ie,""+re),Se=Ce[ge],ve,ye=!1;return Se!=null?(ve=Se,ye=!0,d.pathCache=ve):(ve=new Path2D,Ce[ge]=d.pathCache=ve),{path:ve,cacheHit:ye}},oe=e.pstyle("shape").strValue,he=e.pstyle("shape-polygon-points").pfValue;if(v){t.translate(f.x,f.y);var ne=W(l,u,oe,he);h=ne.path,g=ne.cacheHit}var se=function(){if(!g){var ie=f;v&&(ie={x:0,y:0}),o.nodeShapes[o.getNodeShape(e)].draw(h||t,ie.x,ie.y,l,u,re,d)}v?t.fill(h):t.fill()},ue=function(){for(var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ae=c.backgrounding,we=0,Ce=0;Ce<x.length;Ce++){var ge=e.cy().style().getIndexedStyle(e,"background-image-containment","value",Ce);if(X&&ge==="over"||!X&&ge==="inside"){we++;continue}C[Ce]&&x[Ce].complete&&!x[Ce].error&&(we++,o.drawInscribedImage(t,x[Ce],e,Ce,ie))}c.backgrounding=we!==E,ae!==c.backgrounding&&e.updateStyle(!1)},pe=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasPie(e)&&(o.drawPie(t,e,X),ie&&(v||o.nodeShapes[o.getNodeShape(e)].draw(t,f.x,f.y,l,u,re,d)))},de=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,X=(D>0?D:-D)*ie,ae=D>0?0:255;D!==0&&(o.colorFillStyle(t,ae,ae,ae,X),v?t.fill(h):t.fill())},me=function(){if(P>0){if(t.lineWidth=P,t.lineCap=M,t.lineJoin=_,t.setLineDash)switch(I){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(V),t.lineDashOffset=H;break;case"solid":case"double":t.setLineDash([]);break}if(F!=="center"){if(t.save(),t.lineWidth*=2,F==="inside")v?t.clip(h):t.clip();else{var ie=new Path2D;ie.rect(-l/2-P,-u/2-P,l+2*P,u+2*P),ie.addPath(h),t.clip(ie,"evenodd")}v?t.stroke(h):t.stroke(),t.restore()}else v?t.stroke(h):t.stroke();if(I==="double"){t.lineWidth=P/3;var X=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",v?t.stroke(h):t.stroke(),t.globalCompositeOperation=X}t.setLineDash&&t.setLineDash([])}},Ne=function(){if(z>0){if(t.lineWidth=z,t.lineCap="butt",t.setLineDash)switch(ee){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var ie=f;v&&(ie={x:0,y:0});var X=o.getNodeShape(e),ae=P;F==="inside"&&(ae=0),F==="outside"&&(ae*=2);var we=(l+ae+(z+Z))/l,Ce=(u+ae+(z+Z))/u,ge=l*we,Se=u*Ce,ve=o.nodeShapes[X].points,ye;if(v){var Ge=W(ge,Se,X,ve);ye=Ge.path}if(X==="ellipse")o.drawEllipsePath(ye||t,ie.x,ie.y,ge,Se);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(X)){var Re=0,rt=0,nt=0;X==="round-diamond"?Re=(ae+Z+z)*1.4:X==="round-heptagon"?(Re=(ae+Z+z)*1.075,nt=-(ae/2+Z+z)/35):X==="round-hexagon"?Re=(ae+Z+z)*1.12:X==="round-pentagon"?(Re=(ae+Z+z)*1.13,nt=-(ae/2+Z+z)/15):X==="round-tag"?(Re=(ae+Z+z)*1.12,rt=(ae/2+z+Z)*.07):X==="round-triangle"&&(Re=(ae+Z+z)*(Math.PI/2),nt=-(ae+Z/2+z)/Math.PI),Re!==0&&(we=(l+Re)/l,ge=l*we,["round-hexagon","round-tag"].includes(X)||(Ce=(u+Re)/u,Se=u*Ce)),re=re==="auto"?Xh(ge,Se):re;for(var Qe=ge/2,Ot=Se/2,ut=re+(ae+z+Z)/2,ht=new Array(ve.length/2),Wt=new Array(ve.length/2),_t=0;_t<ve.length/2;_t++)ht[_t]={x:ie.x+rt+Qe*ve[_t*2],y:ie.y+nt+Ot*ve[_t*2+1]};var Lt,tr,dr,Kt,Je=ht.length;for(tr=ht[Je-1],Lt=0;Lt<Je;Lt++)dr=ht[Lt%Je],Kt=ht[(Lt+1)%Je],Wt[Lt]=Nc(tr,dr,Kt,ut),tr=dr,dr=Kt;o.drawRoundPolygonPath(ye||t,ie.x+rt,ie.y+nt,l*we,u*Ce,ve,Wt)}else if(["roundrectangle","round-rectangle"].includes(X))re=re==="auto"?Rn(ge,Se):re,o.drawRoundRectanglePath(ye||t,ie.x,ie.y,ge,Se,re+(ae+z+Z)/2);else if(["cutrectangle","cut-rectangle"].includes(X))re=re==="auto"?Jl():re,o.drawCutRectanglePath(ye||t,ie.x,ie.y,ge,Se,null,re+(ae+z+Z)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(X))re=re==="auto"?Rn(ge,Se):re,o.drawBottomRoundRectanglePath(ye||t,ie.x,ie.y,ge,Se,re+(ae+z+Z)/2);else if(X==="barrel")o.drawBarrelPath(ye||t,ie.x,ie.y,ge,Se);else if(X.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(X)){var at=(ae+z+Z)/l;ve=zo(Ho(ve,at)),o.drawPolygonPath(ye||t,ie.x,ie.y,l,u,ve)}else{var pt=(ae+z+Z)/l;ve=zo(Ho(ve,-pt)),o.drawPolygonPath(ye||t,ie.x,ie.y,l,u,ve)}if(v?t.stroke(ye):t.stroke(),ee==="double"){t.lineWidth=ae/3;var mn=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",v?t.stroke(ye):t.stroke(),t.globalCompositeOperation=mn}t.setLineDash&&t.setLineDash([])}},De=function(){a&&o.drawNodeOverlay(t,e,f,l,u)},Ee=function(){a&&o.drawNodeUnderlay(t,e,f,l,u)},Pe=function(){o.drawElementText(t,e,null,n)},te=e.pstyle("ghost").value==="yes";if(te){var T=e.pstyle("ghost-offset-x").pfValue,R=e.pstyle("ghost-offset-y").pfValue,Q=e.pstyle("ghost-opacity").value,G=Q*p;t.translate(T,R),K(),Ne(),Y(Q*L),se(),ue(G,!0),A(Q*$),me(),pe(D!==0||P!==0),ue(G,!1),de(G),t.translate(-T,-R)}v&&t.translate(-f.x,-f.y),Ee(),v&&t.translate(f.x,f.y),K(),Ne(),Y(),se(),ue(p,!0),A(),me(),pe(D!==0||P!==0),ue(p,!1),de(),v&&t.translate(-f.x,-f.y),Pe(),De(),r&&t.translate(m.x1,m.y1)}};var Jv=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n,a,i,o){var l=this;if(n.visible()){var u=n.pstyle("".concat(e,"-padding")).pfValue,c=n.pstyle("".concat(e,"-opacity")).value,d=n.pstyle("".concat(e,"-color")).value,f=n.pstyle("".concat(e,"-shape")).value,p=n.pstyle("".concat(e,"-corner-radius")).value;if(c>0){if(a=a||n.position(),i==null||o==null){var v=n.padding();i=n.width()+2*v,o=n.height()+2*v}l.colorFillStyle(r,d[0],d[1],d[2],c),l.nodeShapes[f].draw(r,a.x,a.y,i+u*2,o+u*2,p),r.fill()}}}};Ra.drawNodeOverlay=Jv("overlay"),Ra.drawNodeUnderlay=Jv("underlay"),Ra.hasPie=function(t){return t=t[0],t._private.hasPie},Ra.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var a=e.cy().style(),i=e.pstyle("pie-size"),o=n.x,l=n.y,u=e.width(),c=e.height(),d=Math.min(u,c)/2,f=0,p=this.usePaths();p&&(o=0,l=0),i.units==="%"?d=d*i.pfValue:i.pfValue!==void 0&&(d=i.pfValue/2);for(var v=1;v<=a.pieBackgroundN;v++){var h=e.pstyle("pie-"+v+"-background-size").value,g=e.pstyle("pie-"+v+"-background-color").value,y=e.pstyle("pie-"+v+"-background-opacity").value*r,m=h/100;m+f>1&&(m=1-f);var b=1.5*Math.PI+2*Math.PI*f,w=2*Math.PI*m,C=b+w;h===0||f>=1||f+m>1||(t.beginPath(),t.moveTo(o,l),t.arc(o,l,d,b,C),t.closePath(),this.colorFillStyle(t,g[0],g[1],g[2],y),t.fill(),f+=m)}};var Gt={},kP=100;Gt.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r},Gt.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,a=0;a<e.length;a++)if(n=e[a],n.context===t){r=!1;break}return r&&(n={context:t},e.push(n)),n},Gt.createGradientStyleFor=function(t,e,r,n,a){var i,o=this.usePaths(),l=r.pstyle(e+"-gradient-stop-colors").value,u=r.pstyle(e+"-gradient-stop-positions").pfValue;if(n==="radial-gradient")if(r.isEdge()){var c=r.sourceEndpoint(),d=r.targetEndpoint(),f=r.midpoint(),p=In(c,f),v=In(d,f);i=t.createRadialGradient(f.x,f.y,0,f.x,f.y,Math.max(p,v))}else{var h=o?{x:0,y:0}:r.position(),g=r.paddedWidth(),y=r.paddedHeight();i=t.createRadialGradient(h.x,h.y,0,h.x,h.y,Math.max(g,y))}else if(r.isEdge()){var m=r.sourceEndpoint(),b=r.targetEndpoint();i=t.createLinearGradient(m.x,m.y,b.x,b.y)}else{var w=o?{x:0,y:0}:r.position(),C=r.paddedWidth(),x=r.paddedHeight(),E=C/2,k=x/2,B=r.pstyle("background-gradient-direction").value;switch(B){case"to-bottom":i=t.createLinearGradient(w.x,w.y-k,w.x,w.y+k);break;case"to-top":i=t.createLinearGradient(w.x,w.y+k,w.x,w.y-k);break;case"to-left":i=t.createLinearGradient(w.x+E,w.y,w.x-E,w.y);break;case"to-right":i=t.createLinearGradient(w.x-E,w.y,w.x+E,w.y);break;case"to-bottom-right":case"to-right-bottom":i=t.createLinearGradient(w.x-E,w.y-k,w.x+E,w.y+k);break;case"to-top-right":case"to-right-top":i=t.createLinearGradient(w.x-E,w.y+k,w.x+E,w.y-k);break;case"to-bottom-left":case"to-left-bottom":i=t.createLinearGradient(w.x+E,w.y-k,w.x-E,w.y+k);break;case"to-top-left":case"to-left-top":i=t.createLinearGradient(w.x+E,w.y+k,w.x-E,w.y-k);break}}if(!i)return null;for(var S=u.length===l.length,N=l.length,D=0;D<N;D++)i.addColorStop(S?u[D]:D/(N-1),"rgba("+l[D][0]+","+l[D][1]+","+l[D][2]+","+a+")");return i},Gt.gradientFillStyle=function(t,e,r,n){var a=this.createGradientStyleFor(t,"background",e,r,n);if(!a)return null;t.fillStyle=a},Gt.colorFillStyle=function(t,e,r,n,a){t.fillStyle="rgba("+e+","+r+","+n+","+a+")"},Gt.eleFillStyle=function(t,e,r){var n=e.pstyle("background-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientFillStyle(t,e,n,r);else{var a=e.pstyle("background-color").value;this.colorFillStyle(t,a[0],a[1],a[2],r)}},Gt.gradientStrokeStyle=function(t,e,r,n){var a=this.createGradientStyleFor(t,"line",e,r,n);if(!a)return null;t.strokeStyle=a},Gt.colorStrokeStyle=function(t,e,r,n,a){t.strokeStyle="rgba("+e+","+r+","+n+","+a+")"},Gt.eleStrokeStyle=function(t,e,r){var n=e.pstyle("line-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientStrokeStyle(t,e,n,r);else{var a=e.pstyle("line-color").value;this.colorStrokeStyle(t,a[0],a[1],a[2],r)}},Gt.matchCanvasSize=function(t){var e=this,r=e.data,n=e.findContainerClientCoords(),a=n[2],i=n[3],o=e.getPixelRatio(),l=e.motionBlurPxRatio;(t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]||t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG])&&(o=l);var u=a*o,c=i*o,d;if(!(u===e.canvasWidth&&c===e.canvasHeight)){e.fontCaches=null;var f=r.canvasContainer;f.style.width=a+"px",f.style.height=i+"px";for(var p=0;p<e.CANVAS_LAYERS;p++)d=r.canvases[p],d.width=u,d.height=c,d.style.width=a+"px",d.style.height=i+"px";for(var p=0;p<e.BUFFER_COUNT;p++)d=r.bufferCanvases[p],d.width=u,d.height=c,d.style.width=a+"px",d.style.height=i+"px";e.textureMult=1,o<=1&&(d=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,d.width=u*e.textureMult,d.height=c*e.textureMult),e.canvasWidth=u,e.canvasHeight=c}},Gt.renderTo=function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})},Gt.render=function(t){t=t||zh();var e=t.forcedContext,r=t.drawAllLayers,n=t.drawOnlyNodeLayer,a=t.forcedZoom,i=t.forcedPan,o=this,l=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,u=o.cy,c=o.data,d=c.canvasNeedsRedraw,f=o.textureOnViewport&&!e&&(o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming),p=t.motionBlur!==void 0?t.motionBlur:o.motionBlur,v=o.motionBlurPxRatio,h=u.hasCompoundNodes(),g=o.hoverData.draggingEles,y=!!(o.hoverData.selecting||o.touchData.selecting);p=p&&!e&&o.motionBlurEnabled&&!y;var m=p;e||(o.prevPxRatio!==l&&(o.invalidateContainerClientCoordsCache(),o.matchCanvasSize(o.container),o.redrawHint("eles",!0),o.redrawHint("drag",!0)),o.prevPxRatio=l),!e&&o.motionBlurTimeout&&clearTimeout(o.motionBlurTimeout),p&&(o.mbFrames==null&&(o.mbFrames=0),o.mbFrames++,o.mbFrames<3&&(m=!1),o.mbFrames>o.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!f&&(d[o.NODE]=!0,d[o.SELECT_BOX]=!0);var b=u.style(),w=u.zoom(),C=a!==void 0?a:w,x=u.pan(),E={x:x.x,y:x.y},k={zoom:w,pan:{x:x.x,y:x.y}},B=o.prevViewport,S=B===void 0||k.zoom!==B.zoom||k.pan.x!==B.pan.x||k.pan.y!==B.pan.y;!S&&!(g&&!h)&&(o.motionBlurPxRatio=1),i&&(E=i),C*=l,E.x*=l,E.y*=l;var N=o.getCachedZSortedEles();function D(ne,se,ue,pe,de){var me=ne.globalCompositeOperation;ne.globalCompositeOperation="destination-out",o.colorFillStyle(ne,255,255,255,o.motionBlurTransparency),ne.fillRect(se,ue,pe,de),ne.globalCompositeOperation=me}function P(ne,se){var ue,pe,de,me;!o.clearingMotionBlur&&(ne===c.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]||ne===c.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG])?(ue={x:x.x*v,y:x.y*v},pe=w*v,de=o.canvasWidth*v,me=o.canvasHeight*v):(ue=E,pe=C,de=o.canvasWidth,me=o.canvasHeight),ne.setTransform(1,0,0,1,0,0),se==="motionBlur"?D(ne,0,0,de,me):!e&&(se===void 0||se)&&ne.clearRect(0,0,de,me),r||(ne.translate(ue.x,ue.y),ne.scale(pe,pe)),i&&ne.translate(i.x,i.y),a&&ne.scale(a,a)}if(f||(o.textureDrawLastFrame=!1),f){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=u.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var L=o.data.bufferContexts[o.TEXTURE_BUFFER];L.setTransform(1,0,0,1,0,0),L.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:L,drawOnlyNodeLayer:!0,forcedPxRatio:l*o.textureMult});var k=o.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:o.canvasWidth,height:o.canvasHeight};k.mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}d[o.DRAG]=!1,d[o.NODE]=!1;var O=c.contexts[o.NODE],I=o.textureCache.texture,k=o.textureCache.viewport;O.setTransform(1,0,0,1,0,0),p?D(O,0,0,k.width,k.height):O.clearRect(0,0,k.width,k.height);var _=b.core("outside-texture-bg-color").value,M=b.core("outside-texture-bg-opacity").value;o.colorFillStyle(O,_[0],_[1],_[2],M),O.fillRect(0,0,k.width,k.height);var w=u.zoom();P(O,!1),O.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l),O.drawImage(I,k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l)}else o.textureOnViewport&&!e&&(o.textureCache=null);var F=u.extent(),V=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),H=o.hideEdgesOnViewport&&V,$=[];if($[o.NODE]=!d[o.NODE]&&p&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,$[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),$[o.DRAG]=!d[o.DRAG]&&p&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,$[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),d[o.NODE]||r||n||$[o.NODE]){var z=p&&!$[o.NODE]&&v!==1,O=e||(z?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:c.contexts[o.NODE]),j=p&&!z?"motionBlur":void 0;P(O,j),H?o.drawCachedNodes(O,N.nondrag,l,F):o.drawLayeredElements(O,N.nondrag,l,F),o.debug&&o.drawDebugPoints(O,N.nondrag),!r&&!p&&(d[o.NODE]=!1)}if(!n&&(d[o.DRAG]||r||$[o.DRAG])){var z=p&&!$[o.DRAG]&&v!==1,O=e||(z?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:c.contexts[o.DRAG]);P(O,p&&!z?"motionBlur":void 0),H?o.drawCachedNodes(O,N.drag,l,F):o.drawCachedElements(O,N.drag,l,F),o.debug&&o.drawDebugPoints(O,N.drag),!r&&!p&&(d[o.DRAG]=!1)}if(o.showFps||!n&&d[o.SELECT_BOX]&&!r){var O=e||c.contexts[o.SELECT_BOX];if(P(O),o.selection[4]==1&&(o.hoverData.selecting||o.touchData.selecting)){var w=o.cy.zoom(),ee=b.core("selection-box-border-width").value/w;O.lineWidth=ee,O.fillStyle="rgba("+b.core("selection-box-color").value[0]+","+b.core("selection-box-color").value[1]+","+b.core("selection-box-color").value[2]+","+b.core("selection-box-opacity").value+")",O.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),ee>0&&(O.strokeStyle="rgba("+b.core("selection-box-border-color").value[0]+","+b.core("selection-box-border-color").value[1]+","+b.core("selection-box-border-color").value[2]+","+b.core("selection-box-opacity").value+")",O.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(c.bgActivePosistion&&!o.hoverData.selecting){var w=o.cy.zoom(),J=c.bgActivePosistion;O.fillStyle="rgba("+b.core("active-bg-color").value[0]+","+b.core("active-bg-color").value[1]+","+b.core("active-bg-color").value[2]+","+b.core("active-bg-opacity").value+")",O.beginPath(),O.arc(J.x,J.y,b.core("active-bg-size").pfValue/w,0,2*Math.PI),O.fill()}var Z=o.lastRedrawTime;if(o.showFps&&Z){Z=Math.round(Z);var re=Math.round(1e3/Z);O.setTransform(1,0,0,1,0,0),O.fillStyle="rgba(255, 0, 0, 0.75)",O.strokeStyle="rgba(255, 0, 0, 0.75)",O.lineWidth=1,O.fillText("1 frame = "+Z+" ms = "+re+" fps",0,20);var Y=60;O.strokeRect(0,30,250,20),O.fillRect(0,30,250*Math.min(re/Y,1),20)}r||(d[o.SELECT_BOX]=!1)}if(p&&v!==1){var A=c.contexts[o.NODE],K=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],W=c.contexts[o.DRAG],oe=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],he=function(se,ue,pe){se.setTransform(1,0,0,1,0,0),pe||!m?se.clearRect(0,0,o.canvasWidth,o.canvasHeight):D(se,0,0,o.canvasWidth,o.canvasHeight);var de=v;se.drawImage(ue,0,0,o.canvasWidth*de,o.canvasHeight*de,0,0,o.canvasWidth,o.canvasHeight)};(d[o.NODE]||$[o.NODE])&&(he(A,K,$[o.NODE]),d[o.NODE]=!1),(d[o.DRAG]||$[o.DRAG])&&(he(W,oe,$[o.DRAG]),d[o.DRAG]=!1)}o.prevViewport=k,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),p&&(o.motionBlurTimeout=setTimeout(function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!f,o.mbFrames=0,d[o.NODE]=!0,d[o.DRAG]=!0,o.redraw()},kP)),e||u.emit("render")};var gn={};gn.drawPolygonPath=function(t,e,r,n,a,i){var o=n/2,l=a/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*i[0],r+l*i[1]);for(var u=1;u<i.length/2;u++)t.lineTo(e+o*i[u*2],r+l*i[u*2+1]);t.closePath()},gn.drawRoundPolygonPath=function(t,e,r,n,a,i,o){o.forEach(function(l){return Lv(t,l)}),t.closePath()},gn.drawRoundRectanglePath=function(t,e,r,n,a,i){var o=n/2,l=a/2,u=i==="auto"?Rn(n,a):Math.min(i,l,o);t.beginPath&&t.beginPath(),t.moveTo(e,r-l),t.arcTo(e+o,r-l,e+o,r,u),t.arcTo(e+o,r+l,e,r+l,u),t.arcTo(e-o,r+l,e-o,r,u),t.arcTo(e-o,r-l,e,r-l,u),t.lineTo(e,r-l),t.closePath()},gn.drawBottomRoundRectanglePath=function(t,e,r,n,a,i){var o=n/2,l=a/2,u=i==="auto"?Rn(n,a):i;t.beginPath&&t.beginPath(),t.moveTo(e,r-l),t.lineTo(e+o,r-l),t.lineTo(e+o,r),t.arcTo(e+o,r+l,e,r+l,u),t.arcTo(e-o,r+l,e-o,r,u),t.lineTo(e-o,r-l),t.lineTo(e,r-l),t.closePath()},gn.drawCutRectanglePath=function(t,e,r,n,a,i,o){var l=n/2,u=a/2,c=o==="auto"?Jl():o;t.beginPath&&t.beginPath(),t.moveTo(e-l+c,r-u),t.lineTo(e+l-c,r-u),t.lineTo(e+l,r-u+c),t.lineTo(e+l,r+u-c),t.lineTo(e+l-c,r+u),t.lineTo(e-l+c,r+u),t.lineTo(e-l,r+u-c),t.lineTo(e-l,r-u+c),t.closePath()},gn.drawBarrelPath=function(t,e,r,n,a){var i=n/2,o=a/2,l=e-i,u=e+i,c=r-o,d=r+o,f=ec(n,a),p=f.widthOffset,v=f.heightOffset,h=f.ctrlPtOffsetPct*p;t.beginPath&&t.beginPath(),t.moveTo(l,c+v),t.lineTo(l,d-v),t.quadraticCurveTo(l+h,d,l+p,d),t.lineTo(u-p,d),t.quadraticCurveTo(u-h,d,u,d-v),t.lineTo(u,c+v),t.quadraticCurveTo(u-h,c,u-p,c),t.lineTo(l+p,c),t.quadraticCurveTo(l+h,c,l,c+v),t.closePath()};for(var eg=Math.sin(0),tg=Math.cos(0),Mc={},Ic={},rg=Math.PI/40,$a=0*Math.PI;$a<2*Math.PI;$a+=rg)Mc[$a]=Math.sin($a),Ic[$a]=Math.cos($a);gn.drawEllipsePath=function(t,e,r,n,a){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,a/2,0,0,2*Math.PI);else for(var i,o,l=n/2,u=a/2,c=0*Math.PI;c<2*Math.PI;c+=rg)i=e-l*Mc[c]*eg+l*Ic[c]*tg,o=r+u*Ic[c]*eg+u*Mc[c]*tg,c===0?t.moveTo(i,o):t.lineTo(i,o);t.closePath()};var Ui={};Ui.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]},Ui.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),n=r.boundingBox(),a=this.findContainerClientCoords(),i=t.full?Math.ceil(n.w):a[2],o=t.full?Math.ceil(n.h):a[3],l=le(t.maxWidth)||le(t.maxHeight),u=this.getPixelRatio(),c=1;if(t.scale!==void 0)i*=t.scale,o*=t.scale,c=t.scale;else if(l){var d=1/0,f=1/0;le(t.maxWidth)&&(d=c*t.maxWidth/i),le(t.maxHeight)&&(f=c*t.maxHeight/o),c=Math.min(d,f),i*=c,o*=c}l||(i*=u,o*=u,c*=u);var p=document.createElement("canvas");p.width=i,p.height=o,p.style.width=i+"px",p.style.height=o+"px";var v=p.getContext("2d");if(i>0&&o>0){v.clearRect(0,0,i,o),v.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(t.full)v.translate(-n.x1*c,-n.y1*c),v.scale(c,c),this.drawElements(v,h),v.scale(1/c,1/c),v.translate(n.x1*c,n.y1*c);else{var g=e.pan(),y={x:g.x*c,y:g.y*c};c*=e.zoom(),v.translate(y.x,y.y),v.scale(c,c),this.drawElements(v,h),v.scale(1/c,1/c),v.translate(-y.x,-y.y)}t.bg&&(v.globalCompositeOperation="destination-over",v.fillStyle=t.bg,v.rect(0,0,i,o),v.fill())}return p};function xP(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),a=new Uint8Array(n),i=0;i<r.length;i++)a[i]=r.charCodeAt(i);return new Blob([n],{type:e})}function ng(t){var e=t.indexOf(",");return t.substr(e+1)}function ag(t,e,r){var n=function(){return e.toDataURL(r,t.quality)};switch(t.output){case"blob-promise":return new xa(function(a,i){try{e.toBlob(function(o){o!=null?a(o):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(o){i(o)}});case"blob":return xP(ng(n()),r);case"base64":return ng(n());case"base64uri":default:return n()}}Ui.png=function(t){return ag(t,this.bufferCanvasImage(t),"image/png")},Ui.jpg=function(t){return ag(t,this.bufferCanvasImage(t),"image/jpeg")};var ig={};ig.nodeShapeImpl=function(t,e,r,n,a,i,o,l){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,a,i);case"polygon":return this.drawPolygonPath(e,r,n,a,i,o);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,a,i,o,l);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,a,i,l);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,a,i,o,l);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,a,i,l);case"barrel":return this.drawBarrelPath(e,r,n,a,i)}};var EP=og,Me=og.prototype;Me.CANVAS_LAYERS=3,Me.SELECT_BOX=0,Me.DRAG=1,Me.NODE=2,Me.BUFFER_COUNT=3,Me.TEXTURE_BUFFER=0,Me.MOTIONBLUR_BUFFER_NODE=1,Me.MOTIONBLUR_BUFFER_DRAG=2;function og(t){var e=this,r=e.cy.window(),n=r.document;e.data={canvases:new Array(Me.CANVAS_LAYERS),contexts:new Array(Me.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Me.CANVAS_LAYERS),bufferCanvases:new Array(Me.BUFFER_COUNT),bufferContexts:new Array(Me.CANVAS_LAYERS)};var a="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var o=e.data.canvasContainer.style;e.data.canvasContainer.style[a]=i,o.position="relative",o.zIndex="0",o.overflow="hidden";var l=t.cy.container();l.appendChild(e.data.canvasContainer),l.style[a]=i;var u={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};dT()&&(u["-ms-touch-action"]="none",u["touch-action"]="none");for(var c=0;c<Me.CANVAS_LAYERS;c++){var d=e.data.canvases[c]=n.createElement("canvas");e.data.contexts[c]=d.getContext("2d"),Object.keys(u).forEach(function(Y){d.style[Y]=u[Y]}),d.style.position="absolute",d.setAttribute("data-id","layer"+c),d.style.zIndex=String(Me.CANVAS_LAYERS-c),e.data.canvasContainer.appendChild(d),e.data.canvasNeedsRedraw[c]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[Me.NODE].setAttribute("data-id","layer"+Me.NODE+"-node"),e.data.canvases[Me.SELECT_BOX].setAttribute("data-id","layer"+Me.SELECT_BOX+"-selectbox"),e.data.canvases[Me.DRAG].setAttribute("data-id","layer"+Me.DRAG+"-drag");for(var c=0;c<Me.BUFFER_COUNT;c++)e.data.bufferCanvases[c]=n.createElement("canvas"),e.data.bufferContexts[c]=e.data.bufferCanvases[c].getContext("2d"),e.data.bufferCanvases[c].style.position="absolute",e.data.bufferCanvases[c].setAttribute("data-id","buffer"+c),e.data.bufferCanvases[c].style.zIndex=String(-c-1),e.data.bufferCanvases[c].style.visibility="hidden";e.pathsEnabled=!0;var f=zt(),p=function(A){return{x:(A.x1+A.x2)/2,y:(A.y1+A.y2)/2}},v=function(A){return{x:-A.w/2,y:-A.h/2}},h=function(A){var K=A[0]._private,W=K.oldBackgroundTimestamp===K.backgroundTimestamp;return!W},g=function(A){return A[0]._private.nodeKey},y=function(A){return A[0]._private.labelStyleKey},m=function(A){return A[0]._private.sourceLabelStyleKey},b=function(A){return A[0]._private.targetLabelStyleKey},w=function(A,K,W,oe,he){return e.drawElement(A,K,W,!1,!1,he)},C=function(A,K,W,oe,he){return e.drawElementText(A,K,W,oe,"main",he)},x=function(A,K,W,oe,he){return e.drawElementText(A,K,W,oe,"source",he)},E=function(A,K,W,oe,he){return e.drawElementText(A,K,W,oe,"target",he)},k=function(A){return A.boundingBox(),A[0]._private.bodyBounds},B=function(A){return A.boundingBox(),A[0]._private.labelBounds.main||f},S=function(A){return A.boundingBox(),A[0]._private.labelBounds.source||f},N=function(A){return A.boundingBox(),A[0]._private.labelBounds.target||f},D=function(A,K){return K},P=function(A){return p(k(A))},L=function(A,K,W){var oe=A?A+"-":"";return{x:K.x+W.pstyle(oe+"text-margin-x").pfValue,y:K.y+W.pstyle(oe+"text-margin-y").pfValue}},O=function(A,K,W){var oe=A[0]._private.rscratch;return{x:oe[K],y:oe[W]}},I=function(A){return L("",O(A,"labelX","labelY"),A)},_=function(A){return L("source",O(A,"sourceLabelX","sourceLabelY"),A)},M=function(A){return L("target",O(A,"targetLabelX","targetLabelY"),A)},F=function(A){return v(k(A))},V=function(A){return v(S(A))},H=function(A){return v(N(A))},$=function(A){var K=B(A),W=v(B(A));if(A.isNode()){switch(A.pstyle("text-halign").value){case"left":W.x=-K.w;break;case"right":W.x=0;break}switch(A.pstyle("text-valign").value){case"top":W.y=-K.h;break;case"bottom":W.y=0;break}}return W},z=e.data.eleTxrCache=new Ki(e,{getKey:g,doesEleInvalidateKey:h,drawElement:w,getBoundingBox:k,getRotationPoint:P,getRotationOffset:F,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),j=e.data.lblTxrCache=new Ki(e,{getKey:y,drawElement:C,getBoundingBox:B,getRotationPoint:I,getRotationOffset:$,isVisible:D}),ee=e.data.slbTxrCache=new Ki(e,{getKey:m,drawElement:x,getBoundingBox:S,getRotationPoint:_,getRotationOffset:V,isVisible:D}),J=e.data.tlbTxrCache=new Ki(e,{getKey:b,drawElement:E,getBoundingBox:N,getRotationPoint:M,getRotationOffset:H,isVisible:D}),Z=e.data.lyrTxrCache=new Wv(e);e.onUpdateEleCalcs(function(A,K){z.invalidateElements(K),j.invalidateElements(K),ee.invalidateElements(K),J.invalidateElements(K),Z.invalidateElements(K);for(var W=0;W<K.length;W++){var oe=K[W]._private;oe.oldBackgroundTimestamp=oe.backgroundTimestamp}});var re=function(A){for(var K=0;K<A.length;K++)Z.enqueueElementRefinement(A[K].ele)};z.onDequeue(re),j.onDequeue(re),ee.onDequeue(re),J.onDequeue(re)}Me.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Me.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Me.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Me.SELECT_BOX]=e;break}};var SP=typeof Path2D<"u";Me.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t},Me.usePaths=function(){return SP&&this.pathsEnabled},Me.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)},Me.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},Me.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":ot(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),a=n.document;r=a.createElement("canvas"),r.width=t,r.height=e}return r},[Yv,Sr,Kr,Lc,Wn,Ra,Gt,gn,Ui,ig].forEach(function(t){xe(Me,t)});var TP=[{name:"null",impl:Ev},{name:"base",impl:Kv},{name:"canvas",impl:EP}],BP=[{type:"layout",extensions:L3},{type:"renderer",extensions:TP}],sg={},lg={};function cg(t,e,r){var n=r,a=function(B){Ae("Can not register `"+e+"` for `"+t+"` since `"+B+"` already exists in the prototype and can not be overridden")};if(t==="core"){if($i.prototype[e])return a(e);$i.prototype[e]=r}else if(t==="collection"){if(kt.prototype[e])return a(e);kt.prototype[e]=r}else if(t==="layout"){for(var i=function(B){this.options=B,r.call(this,B),_e(this._private)||(this._private={}),this._private.cy=B.cy,this._private.listeners=[],this.createEmitter()},o=i.prototype=Object.create(r.prototype),l=[],u=0;u<l.length;u++){var c=l[u];o[c]=o[c]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var d=r.prototype.stop;o.stop=function(){var k=this.options;if(k&&k.animate){var B=this.animations;if(B)for(var S=0;S<B.length;S++)B[S].stop()}return d?d.call(this):this.emit("layoutstop"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var f=function(B){return B._private.cy},p={addEventFields:function(B,S){S.layout=B,S.cy=f(B),S.target=B},bubble:function(){return!0},parent:function(B){return f(B)}};xe(o,{createEmitter:function(){return this._private.emitter=new rs(p,this),this},emitter:function(){return this._private.emitter},on:function(B,S){return this.emitter().on(B,S),this},one:function(B,S){return this.emitter().one(B,S),this},once:function(B,S){return this.emitter().one(B,S),this},removeListener:function(B,S){return this.emitter().removeListener(B,S),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(B,S){return this.emitter().emit(B,S),this}}),Ve.eventAliasesOn(o),n=i}else if(t==="renderer"&&e!=="null"&&e!=="base"){var v=ug("renderer","base"),h=v.prototype,g=r,y=r.prototype,m=function(){v.apply(this,arguments),g.apply(this,arguments)},b=m.prototype;for(var w in h){var C=h[w],x=y[w]!=null;if(x)return a(w);b[w]=C}for(var E in y)b[E]=y[E];h.clientFunctions.forEach(function(k){b[k]=b[k]||function(){Xe("Renderer does not implement `renderer."+k+"()` on its prototype")}}),n=m}else if(t==="__proto__"||t==="constructor"||t==="prototype")return Xe(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return Sh({map:sg,keys:[t,e],value:n})}function ug(t,e){return Th({map:sg,keys:[t,e]})}function NP(t,e,r,n,a){return Sh({map:lg,keys:[t,e,r,n],value:a})}function DP(t,e,r,n){return Th({map:lg,keys:[t,e,r,n]})}var Ac=function(){if(arguments.length===2)return ug.apply(null,arguments);if(arguments.length===3)return cg.apply(null,arguments);if(arguments.length===4)return DP.apply(null,arguments);if(arguments.length===5)return NP.apply(null,arguments);Xe("Invalid extension access syntax")};$i.prototype.extension=Ac,BP.forEach(function(t){t.extensions.forEach(function(e){cg(t.type,e.name,e.impl)})});var dg=function t(){if(!(this instanceof t))return new t;this.length=0},jn=dg.prototype;jn.instanceString=function(){return"stylesheet"},jn.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this},jn.css=function(t,e){var r=this.length-1;if(be(t))this[r].properties.push({name:t,value:e});else if(_e(t))for(var n=t,a=Object.keys(n),i=0;i<a.length;i++){var o=a[i],l=n[o];if(l!=null){var u=Nt.properties[o]||Nt.properties[Po(o)];if(u!=null){var c=u.name,d=l;this[r].properties.push({name:c,value:d})}}}return this},jn.style=jn.css,jn.generateStyle=function(t){var e=new Nt(t);return this.appendToStyle(e)},jn.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,a=r.properties;t.selector(n);for(var i=0;i<a.length;i++){var o=a[i];t.css(o.name,o.value)}}return t};var PP="3.30.2",Yn=function(e){if(e===void 0&&(e={}),_e(e))return new $i(e);if(be(e))return Ac.apply(Ac,arguments)};Yn.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Yn),t.apply(null,e),this},Yn.warnings=function(t){return Rh(t)},Yn.version=PP,Yn.stylesheet=Yn.Stylesheet=dg;let OP=class{constructor(e,r){Br(this,"cyg",null);Br(this,"nodes",[]);Br(this,"edges",[]);Br(this,"axons",[]);Br(this,"dendrites",[]);Br(this,"labelCache",new Map);Br(this,"graphCanvas",null);this.labelCache=e,this.graphCanvas=r}async addConnectivity(e){if(this.axons=e.axons.map(r=>JSON.stringify(r)),this.dendrites=e.dendrites.map(r=>JSON.stringify(r)),e.connectivity.length)for(const r of e.connectivity){const n=await this.graphNode(r[0]),a=await this.graphNode(r[1]);this.nodes.push(n),this.nodes.push(a),this.edges.push({id:`${n.id}_${a.id}`,source:n.id,target:a.id})}else this.nodes.push({id:"MISSING",label:"NO PATHS"})}showConnectivity(e){this.cyg=new LP(this,e)}clearConnectivity(){var e;(e=this.cyg)!=null&&e.cy&&(this.cyg.cy.remove(),this.cyg.cy=null)}reset(){var e;(e=this.cyg)!=null&&e.cy&&this.cyg.cy.reset()}enableZoom(e){var r;(r=this.cyg)!=null&&r.cy&&this.cyg.cy.userZoomingEnabled(e)}get elements(){return[...this.nodes.map(e=>({data:e})),...this.edges.map(e=>({data:e}))]}get roots(){return this.dendrites}async graphNode(e){const r=JSON.stringify(e),n=[e[0],...e[1]],a=[];for(const o of n){const l=this.labelCache.has(o)?this.labelCache.get(o):"";a.push(l)}n.push(...a);const i={id:r,label:n.join(`
448
+ `)};return this.axons.includes(r)?this.dendrites.includes(r)?i["both-a-d"]=!0:i.axon=!0:this.dendrites.includes(r)&&(i.dendrite=!0),i}};const _P=[{selector:"node",style:{label:"data(label)","background-color":"#80F0F0","text-valign":"center","text-wrap":"wrap","text-max-width":"80px","font-size":"6px"}},{selector:"node[axon]",style:{"background-color":"green"}},{selector:"node[dendrite]",style:{"background-color":"red"}},{selector:"node[both-a-d]",style:{"background-color":"gray"}},{selector:"edge",style:{width:2,"line-color":"#9dbaea","target-arrow-color":"#9dbaea","target-arrow-shape":"triangle","curve-style":"bezier"}}];class LP{constructor(e,r){Br(this,"cy");Br(this,"tooltip");var n;this.cy=Yn({container:r,elements:e.elements,layout:{name:"breadthfirst",circle:!1,roots:e.roots},directed:!0,style:_P,minZoom:.5,maxZoom:10,wheelSensitivity:.4}).on("mouseover","node",this.overNode.bind(this)).on("mouseout","node",this.exitNode.bind(this)).on("position","node",this.moveNode.bind(this)),this.tooltip=document.createElement("div"),this.tooltip.className="cy-graph-tooltip",this.tooltip.hidden=!0,(n=r==null?void 0:r.lastChild)==null||n.appendChild(this.tooltip)}remove(){this.cy&&this.cy.destroy()}checkRightBoundary(e){var r;e+this.tooltip.offsetWidth>=((r=this.tooltip.parentElement)==null?void 0:r.offsetWidth)&&(this.tooltip.style.left=`${e-this.tooltip.offsetWidth}px`)}overNode(e){const r=e.target;this.tooltip.innerText=r.data().label,this.tooltip.style.left=`${e.renderedPosition.x}px`,this.tooltip.style.top=`${e.renderedPosition.y}px`,this.tooltip.hidden=!1,this.checkRightBoundary(e.renderedPosition.x)}moveNode(e){const r=e.target;this.tooltip.style.left=`${r.renderedPosition().x}px`,this.tooltip.style.top=`${r.renderedPosition().y}px`,this.checkRightBoundary(r.renderedPosition().x)}exitNode(e){this.tooltip.hidden=!0}}const FP=1.3,MP=24*60*60*1e3,IP="Reset position",fg="Lock zoom (to scroll)",AP="Unlock zoom",VP="#8300bf",RP={name:"ConnectivityGraph",props:{entry:{type:String,default:""},mapServer:{type:String,default:""}},data:function(){return{loading:!0,connectivityGraph:null,selectedSource:"",pathList:[],schemaVersion:"",knowledgeByPath:new Map,labelledTerms:new Set,labelCache:new Map,resetLabel:IP,zoomLockLabel:fg,iconColor:VP,zoomEnabled:!1}},mounted(){this.refreshCache(),this.loadCacheData(),this.run().then(t=>{this.showGraph(this.entry)})},methods:{loadCacheData:function(){const t=sessionStorage.getItem("connectivity-graph-source"),e=sessionStorage.getItem("connectivity-graph-labels"),r=sessionStorage.getItem("connectivity-graph-pathlist"),n=sessionStorage.getItem("connectivity-graph-schema-version");if(t&&(this.selectedSource=t),r&&(this.pathList=JSON.parse(r)),e){const a=JSON.parse(e);this.labelCache=new Map(Object.entries(a))}n&&(this.schemaVersion=n)},removeAllCacheData:function(){["connectivity-graph-expiry","connectivity-graph-source","connectivity-graph-labels","connectivity-graph-pathlist","connectivity-graph-schema-version"].forEach(e=>{sessionStorage.removeItem(e)})},refreshCache:function(){const t=sessionStorage.getItem("connectivity-graph-expiry");new Date().getTime()>t&&this.removeAllCacheData()},updateCacheExpiry:function(){const e=new Date().getTime()+MP;sessionStorage.setItem("connectivity-graph-expiry",e)},run:async function(){if(this.schemaVersion||(this.schemaVersion=await this.getSchemaVersion(),sessionStorage.setItem("connectivity-graph-schema-version",this.schemaVersion),this.updateCacheExpiry()),this.schemaVersion<FP){console.warn("No Server!");return}this.showSpinner(),this.selectedSource||(this.selectedSource=await this.setSourceList(),sessionStorage.setItem("connectivity-graph-source",this.selectedSource),this.updateCacheExpiry()),await this.setPathList(this.selectedSource),this.hideSpinner()},showGraph:async function(t){const e=this.$refs.graphCanvas;this.showSpinner(),this.connectivityGraph=new OP(this.labelCache,e),await this.connectivityGraph.addConnectivity(this.knowledgeByPath.get(t)),this.hideSpinner(),this.connectivityGraph.showConnectivity(e)},query:async function(t,e){const r=`${this.mapServer}knowledge/query/`,n={sql:t,params:e};try{const a=await fetch(r,{method:"POST",headers:{Accept:"application/json; charset=utf-8","Cache-Control":"no-store","Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok)throw new Error(`Cannot access ${r}`);return await a.json()}catch{return{values:[]}}},setSourceList:async function(){const t=await this.getJsonData(`${this.mapServer}knowledge/sources`),e=t?t.sources||[]:[];let r="";for(const n of e)n&&r===""&&(r=n);return r},loadPathData:async function(t){const e=await this.query(`select entity, knowledge from knowledge
449
449
  where entity like 'ilxtr:%' and source=?
450
- order by entity`,[t]);this.knowledgeByPath.clear(),this.labelledTerms=new Set;for(const[r,n]of e.values){const a=JSON.parse(n);if("connectivity"in a){const i=a.label||r;i===r.slice(6).replace("-prime","'").replaceAll("-"," ")||i.length<50||`${i.slice(0,50)}`,this.knowledgeByPath.set(r,a),this.cacheLabels(a)}}return await this.getCachedTermLabels(),""},getSchemaVersion:async function(){const t=await this.getJsonData(`${this.mapServer}knowledge/schema-version`);return t&&+t.version||0},getJsonData:async function(t){try{const e=await fetch(t,{method:"GET",headers:{Accept:"application/json; charset=utf-8","Cache-Control":"no-store","Content-Type":"application/json"}});return e.ok||console.error(`Cannot access ${t}`),await e.json()}catch{return null}},getCachedTermLabels:async function(){if(this.labelledTerms.size){const t=await this.query(`
450
+ order by entity`,[t]);return e?e.values:[]},setPathList:async function(t){this.pathList.length||(this.pathList=await this.loadPathData(t),sessionStorage.setItem("connectivity-graph-pathlist",JSON.stringify(this.pathList)),this.updateCacheExpiry()),this.knowledgeByPath.clear(),this.labelledTerms=new Set;for(const[e,r]of this.pathList){const n=JSON.parse(r);"connectivity"in n&&(this.knowledgeByPath.set(e,n),this.cacheLabels(n))}return this.labelCache.size||await this.getCachedTermLabels(),""},getSchemaVersion:async function(){const t=await this.getJsonData(`${this.mapServer}knowledge/schema-version`);return t&&+t.version||0},getJsonData:async function(t){try{const e=await fetch(t,{method:"GET",headers:{Accept:"application/json; charset=utf-8","Cache-Control":"no-store","Content-Type":"application/json"}});return e.ok||console.error(`Cannot access ${t}`),await e.json()}catch{return null}},getCachedTermLabels:async function(){if(this.labelledTerms.size){const t=await this.query(`
451
451
  select entity, label from labels
452
- where entity in (?${", ?".repeat(this.labelledTerms.size-1)})`,[...this.labelledTerms.values()]);for(const e of t.values)this.labelCache.set(e[0],e[1])}},cacheNodeLabels:function(t){for(const e of[t[0],...t[1]])this.labelledTerms.add(e)},cacheLabels:async function(t){for(const e of t.connectivity)this.cacheNodeLabels(e[0]),this.cacheNodeLabels(e[1])},showSpinner:function(){},hideSpinner:function(){},reset:function(){this.connectivityGraph.reset()},toggleZoom:function(){this.zoomEnabled=!this.zoomEnabled,this.zoomLockLabel=this.zoomEnabled?IP:fg,this.connectivityGraph.enableZoom(!this.zoomEnabled)}}},VP={class:"connectivity-graph"},$P={ref:"graphCanvas",class:"graph-canvas"},zP={class:"control-panel"},HP=s.createStaticVNode('<div class="node-key" data-v-b86f8029><div class="key-head" data-v-b86f8029>Node type:</div><div data-v-b86f8029><div data-v-b86f8029><span data-v-b86f8029>Node:</span><span class="key-box" style="background:#80F0F0;" data-v-b86f8029></span></div><div data-v-b86f8029><span data-v-b86f8029>Axon:</span><span class="key-box" style="background:green;" data-v-b86f8029></span></div><div data-v-b86f8029><span data-v-b86f8029>Dendrite:</span><span class="key-box" style="background:red;" data-v-b86f8029></span></div><div data-v-b86f8029><span data-v-b86f8029>Both:</span><span class="key-box" style="background:gray;" data-v-b86f8029></span></div></div></div>',1),KP={class:"tools"},qP={class:"visually-hidden"},UP={class:"visually-hidden"};function GP(t,e,r,n,a,i){const o=M1,l=yt,u=Ar,c=si,d=rb,f=ob;return s.openBlock(),s.createElementBlock("div",VP,[s.createElementVNode("div",$P,null,512),s.createElementVNode("div",zP,[HP,s.createElementVNode("div",KP,[s.createVNode(c,{content:t.resetLabel,placement:"bottom",effect:"control-tooltip"},{default:s.withCtx(()=>[s.createVNode(u,{class:s.normalizeClass(["control-button",t.theme]),size:"small",onClick:i.reset},{default:s.withCtx(()=>[s.createVNode(l,{color:"white"},{default:s.withCtx(()=>[s.createVNode(o)]),_:1}),s.createElementVNode("span",qP,s.toDisplayString(t.resetLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content"]),s.createVNode(c,{content:t.zoomLockLabel,placement:"bottom",effect:"control-tooltip"},{default:s.withCtx(()=>[s.createVNode(u,{class:s.normalizeClass(["control-button",t.theme]),size:"small",onClick:i.toggleZoom},{default:s.withCtx(()=>[s.createVNode(l,{color:"white"},{default:s.withCtx(()=>[t.zoomEnabled?(s.openBlock(),s.createBlock(d,{key:0})):(s.openBlock(),s.createBlock(f,{key:1}))]),_:1}),s.createElementVNode("span",UP,s.toDisplayString(t.zoomLockLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content"])])])])}const WP=yr(RP,[["render",GP],["__scopeId","data-v-b86f8029"]]);Ke.ConnectivityGraph=WP,Ke.CopyToClipboard=ZS,Ke.DrawToolbar=NE,Ke.HelpModeDialog=LE,Ke.Tooltip=LS,Ke.TreeControls=US,Object.defineProperty(Ke,Symbol.toStringTag,{value:"Module"})});
452
+ where entity in (?${", ?".repeat(this.labelledTerms.size-1)})`,[...this.labelledTerms.values()]);for(const r of t.values)this.labelCache.set(r[0],r[1]);const e=Object.fromEntries(this.labelCache);sessionStorage.setItem("connectivity-graph-labels",JSON.stringify(e)),this.updateCacheExpiry()}},cacheNodeLabels:function(t){for(const e of[t[0],...t[1]])this.labelledTerms.add(e)},cacheLabels:async function(t){for(const e of t.connectivity)this.cacheNodeLabels(e[0]),this.cacheNodeLabels(e[1])},showSpinner:function(){this.loading=!0},hideSpinner:function(){this.loading=!1},reset:function(){this.connectivityGraph.reset()},toggleZoom:function(){this.zoomEnabled=!this.zoomEnabled,this.zoomLockLabel=this.zoomEnabled?AP:fg,this.connectivityGraph.enableZoom(!this.zoomEnabled)}}},$P={class:"connectivity-graph"},zP={ref:"graphCanvas",class:"graph-canvas"},HP={class:"control-panel"},KP=s.createStaticVNode('<div class="node-key" data-v-ec98b14b><div class="key-head" data-v-ec98b14b>Node type:</div><div data-v-ec98b14b><div data-v-ec98b14b><span data-v-ec98b14b>Node:</span><span class="key-box" style="background:#80F0F0;" data-v-ec98b14b></span></div><div data-v-ec98b14b><span data-v-ec98b14b>Axon:</span><span class="key-box" style="background:green;" data-v-ec98b14b></span></div><div data-v-ec98b14b><span data-v-ec98b14b>Dendrite:</span><span class="key-box" style="background:red;" data-v-ec98b14b></span></div><div data-v-ec98b14b><span data-v-ec98b14b>Both:</span><span class="key-box" style="background:gray;" data-v-ec98b14b></span></div></div></div>',1),qP={class:"tools"},UP={class:"visually-hidden"},GP={class:"visually-hidden"};function WP(t,e,r,n,a,i){const o=M1,l=yt,u=Ar,c=si,d=rb,f=ob,p=Fl;return s.withDirectives((s.openBlock(),s.createElementBlock("div",$P,[s.createElementVNode("div",zP,null,512),s.createElementVNode("div",HP,[KP,s.createElementVNode("div",qP,[s.createVNode(c,{content:t.resetLabel,placement:"bottom",effect:"control-tooltip"},{default:s.withCtx(()=>[s.createVNode(u,{class:s.normalizeClass(["control-button",t.theme]),size:"small",onClick:i.reset},{default:s.withCtx(()=>[s.createVNode(l,{color:"white"},{default:s.withCtx(()=>[s.createVNode(o)]),_:1}),s.createElementVNode("span",UP,s.toDisplayString(t.resetLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content"]),s.createVNode(c,{content:t.zoomLockLabel,placement:"bottom",effect:"control-tooltip"},{default:s.withCtx(()=>[s.createVNode(u,{class:s.normalizeClass(["control-button",t.theme]),size:"small",onClick:i.toggleZoom},{default:s.withCtx(()=>[s.createVNode(l,{color:"white"},{default:s.withCtx(()=>[t.zoomEnabled?(s.openBlock(),s.createBlock(d,{key:0})):(s.openBlock(),s.createBlock(f,{key:1}))]),_:1}),s.createElementVNode("span",GP,s.toDisplayString(t.zoomLockLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content"])])])])),[[p,t.loading]])}const jP=yr(RP,[["render",WP],["__scopeId","data-v-ec98b14b"]]);Ke.ConnectivityGraph=jP,Ke.CopyToClipboard=ZS,Ke.DrawToolbar=NE,Ke.HelpModeDialog=FE,Ke.Tooltip=FS,Ke.TreeControls=US,Object.defineProperty(Ke,Symbol.toStringTag,{value:"Module"})});