(function($e,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):($e=typeof globalThis<"u"?globalThis:$e||self,o($e.MapUtilities={},$e.Vue))})(this,function($e,o){"use strict";var yP=Object.defineProperty;var bP=($e,o,Ft)=>o in $e?yP($e,o,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):$e[o]=Ft;var gr=($e,o,Ft)=>bP($e,typeof o!="symbol"?o+"":o,Ft);const Ft=(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 Kc;const et=typeof window<"u",xg=t=>typeof t=="string",qc=()=>{},Ds=et&&((Kc=window==null?void 0:window.navigator)==null?void 0:Kc.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Uc(t){return typeof t=="function"?t():o.unref(t)}function Eg(t){return t}function Yi(t){return o.getCurrentScope()?(o.onScopeDispose(t),!0):!1}function Sg(t,e=!0){o.getCurrentInstance()?o.onMounted(t):e?t():o.nextTick(t)}function Dr(t){var e;const r=Uc(t);return(e=r==null?void 0:r.$el)!=null?e:r}const Zi=et?window:void 0;function jt(...t){let e,r,n,a;if(xg(t[0])||Array.isArray(t[0])?([r,n,a]=t,e=Zi):[e,r,n,a]=t,!e)return qc;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const i=[],s=()=>{i.forEach(d=>d()),i.length=0},l=(d,f,p,v)=>(d.addEventListener(f,p,v),()=>d.removeEventListener(f,p,v)),u=o.watch(()=>[Dr(e),Uc(a)],([d,f])=>{s(),d&&i.push(...r.flatMap(p=>n.map(v=>l(d,p,v,f))))},{immediate:!0,flush:"post"}),c=()=>{u(),s()};return Yi(c),c}let Gc=!1;function Tg(t,e,r={}){const{window:n=Zi,ignore:a=[],capture:i=!0,detectIframe:s=!1}=r;if(!n)return;Ds&&!Gc&&(Gc=!0,Array.from(n.document.body.children).forEach(p=>p.addEventListener("click",qc)));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=Dr(v);return h&&(p.target===h||p.composedPath().includes(h))}}),d=[jt(n,"click",p=>{const v=Dr(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=Dr(t);v&&(l=!p.composedPath().includes(v)&&!u(p))},{passive:!0}),s&&jt(n,"blur",p=>{var v;const h=Dr(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 Wc(t,e=!1){const r=o.ref(),n=()=>r.value=!!t();return n(),Sg(n,e),r}const jc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yc="__vueuse_ssr_handlers__";jc[Yc]=jc[Yc]||{};var Zc=Object.getOwnPropertySymbols,Bg=Object.prototype.hasOwnProperty,Ng=Object.prototype.propertyIsEnumerable,Dg=(t,e)=>{var r={};for(var n in t)Bg.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Zc)for(var n of Zc(t))e.indexOf(n)<0&&Ng.call(t,n)&&(r[n]=t[n]);return r};function _r(t,e,r={}){const n=r,{window:a=Zi}=n,i=Dg(n,["window"]);let s;const l=Wc(()=>a&&"ResizeObserver"in a),u=()=>{s&&(s.disconnect(),s=void 0)},c=o.watch(()=>Dr(t),f=>{u(),l.value&&a&&f&&(s=new ResizeObserver(e),s.observe(f,i))},{immediate:!0,flush:"post"}),d=()=>{u(),c()};return Yi(d),{isSupported:l,stop:d}}var Xc=Object.getOwnPropertySymbols,_g=Object.prototype.hasOwnProperty,Pg=Object.prototype.propertyIsEnumerable,Og=(t,e)=>{var r={};for(var n in t)_g.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Xc)for(var n of Xc(t))e.indexOf(n)<0&&Pg.call(t,n)&&(r[n]=t[n]);return r};function Lg(t,e,r={}){const n=r,{window:a=Zi}=n,i=Og(n,["window"]);let s;const l=Wc(()=>a&&"MutationObserver"in a),u=()=>{s&&(s.disconnect(),s=void 0)},c=o.watch(()=>Dr(t),f=>{u(),l.value&&a&&f&&(s=new MutationObserver(e),s.observe(f,i))},{immediate:!0}),d=()=>{u(),c()};return Yi(d),{isSupported:l,stop:d}}var Qc;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(Qc||(Qc={}));var Ig=Object.defineProperty,Jc=Object.getOwnPropertySymbols,Mg=Object.prototype.hasOwnProperty,Fg=Object.prototype.propertyIsEnumerable,eu=(t,e,r)=>e in t?Ig(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ag=(t,e)=>{for(var r in e||(e={}))Mg.call(e,r)&&eu(t,r,e[r]);if(Jc)for(var r of Jc(e))Fg.call(e,r)&&eu(t,r,e[r]);return t};Ag({linear:Eg},{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 Vg=()=>et&&/firefox/i.test(window.navigator.userAgent),_s=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}};/** * @vue/shared v3.4.27 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Ha=()=>{},Rg=Object.prototype.hasOwnProperty,wn=(t,e)=>Rg.call(t,e),At=Array.isArray,It=t=>typeof t=="function",St=t=>typeof t=="string",vt=t=>t!==null&&typeof t=="object",$g=Object.prototype.toString,zg=t=>$g.call(t),Ps=t=>zg(t).slice(8,-1),tu=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},Hg=/-(\w)/g,Kg=tu(t=>t.replace(Hg,(e,r)=>r?r.toUpperCase():"")),qg=/\B([A-Z])/g,Ug=tu(t=>t.replace(qg,"-$1").toLowerCase());var ru=typeof global=="object"&&global&&global.Object===Object&&global,Gg=typeof self=="object"&&self&&self.Object===Object&&self,mr=ru||Gg||Function("return this")(),yr=mr.Symbol,nu=Object.prototype,Wg=nu.hasOwnProperty,jg=nu.toString,Ka=yr?yr.toStringTag:void 0;function Yg(t){var e=Wg.call(t,Ka),r=t[Ka];try{t[Ka]=void 0;var n=!0}catch{}var a=jg.call(t);return n&&(e?t[Ka]=r:delete t[Ka]),a}var Zg=Object.prototype,Xg=Zg.toString;function Qg(t){return Xg.call(t)}var Jg="[object Null]",em="[object Undefined]",au=yr?yr.toStringTag:void 0;function Zn(t){return t==null?t===void 0?em:Jg:au&&au in Object(t)?Yg(t):Qg(t)}function Xn(t){return t!=null&&typeof t=="object"}var tm="[object Symbol]";function Xi(t){return typeof t=="symbol"||Xn(t)&&Zn(t)==tm}function rm(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r0){if(++e>=Dm)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Lm(t){return function(){return t}}var Qi=function(){try{var t=kn(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Im=Qi?function(t,e){return Qi(t,"toString",{configurable:!0,enumerable:!1,value:Lm(e),writable:!0})}:uu,Mm=Om(Im);function Fm(t,e,r,n){t.length;for(var a=r+1;a--;)if(e(t[a],a,t))return a;return-1}var Am=9007199254740991,Vm=/^(?:0|[1-9]\d*)$/;function Is(t,e){var r=typeof t;return e=e??Am,!!e&&(r=="number"||r!="symbol"&&Vm.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=qm}function Um(t){return t!=null&&Fs(t.length)&&!du(t)}var Gm=Object.prototype;function Wm(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Gm;return t===r}function jm(t,e){for(var r=-1,n=Array(t);++r-1}function ty(t,e){var r=this.__data__,n=Ji(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();++el))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&qy?new ro:void 0;for(i.set(t,e),i.set(e,t);++f=e||k<0||f&&B>=i}function m(){var E=Ws();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,s)}function w(){l!==void 0&&clearTimeout(l),c=0,n=u=a=l=void 0}function C(){return l===void 0?s:b(Ws())}function x(){var E=Ws(),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)),s}return x.cancel=w,x.flush=C,x}function P1(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=n-1;return Fm(t,B1(e),a)}function io(t){for(var e=-1,r=t==null?0:t.length,n={};++et===void 0,Qn=t=>typeof t=="boolean",gt=t=>typeof t=="number",En=t=>typeof Element>"u"?!1:t instanceof Element,so=t=>jr(t),F1=t=>St(t)?!Number.isNaN(Number(t)):!1,A1=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),qu=t=>Object.keys(t);class Uu extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function V1(t,e){throw new Uu(`[${t}] ${e}`)}function tt(t,e){if(process.env.NODE_ENV!=="production"){const r=St(t)?new Uu(`[${t}] ${e}`):t;console.warn(r)}}const R1="utils/dom/style",Gu=(t="")=>t.split(" ").filter(e=>!!e.trim()),js=(t,e)=>{!t||!e.trim()||t.classList.add(...Gu(e))},Sn=(t,e)=>{!t||!e.trim()||t.classList.remove(...Gu(e))},ja=(t,e)=>{var r;if(!et||!t||!e)return"";let n=Kg(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)||F1(t))return`${t}${e}`;if(St(t))return t;tt(R1,"binding value must be a string or number")}function $1(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,s=t.scrollTop,l=s+t.clientHeight;al&&(t.scrollTop=i-t.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var z1=o.defineComponent({name:"Aim",__name:"aim",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"}),o.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"})]))}}),H1=z1,K1=o.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"})]))}}),lo=K1,q1=o.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"})]))}}),Wu=q1,U1=o.defineComponent({name:"CaretRight",__name:"caret-right",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),G1=U1,W1=o.defineComponent({name:"CircleCheck",__name:"circle-check",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"}),o.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"})]))}}),j1=W1,Y1=o.defineComponent({name:"CircleClose",__name:"circle-close",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"}),o.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"})]))}}),Ys=Y1,Z1=o.defineComponent({name:"Close",__name:"close",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"})]))}}),co=Z1,X1=o.defineComponent({name:"CopyDocument",__name:"copy-document",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"}),o.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"})]))}}),Q1=X1,J1=o.defineComponent({name:"Delete",__name:"delete",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"})]))}}),eb=J1,tb=o.defineComponent({name:"Edit",__name:"edit",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"}),o.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"})]))}}),rb=tb,nb=o.defineComponent({name:"Finished",__name:"finished",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"})]))}}),ab=nb,ib=o.defineComponent({name:"Hide",__name:"hide",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"}),o.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"})]))}}),ob=ib,sb=o.defineComponent({name:"Loading",__name:"loading",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"})]))}}),Zs=sb,lb=o.defineComponent({name:"Lock",__name:"lock",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"}),o.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"})]))}}),cb=lb,ub=o.defineComponent({name:"Notebook",__name:"notebook",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"}),o.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"})]))}}),db=ub,fb=o.defineComponent({name:"Unlock",__name:"unlock",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"}),o.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"})]))}}),hb=fb,pb=o.defineComponent({name:"View",__name:"view",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"})]))}}),vb=pb,gb=o.defineComponent({name:"Warning",__name:"warning",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.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"})]))}}),mb=gb,yb=o.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),bb=yb,wb=o.defineComponent({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),Cb=wb;const ju="__epPropKey",ke=t=>t,kb=t=>vt(t)&&!!t[ju],uo=(t,e)=>{if(!vt(t)||kb(t))return t;const{values:r,required:n,default:a,type:i,validator:s}=t,u={type:i,required:!!n,validator:r||s?c=>{let d=!1,f=[];if(r&&(f=Array.from(r),wn(t,"default")&&f.push(a),d||(d=f.includes(c))),s&&(d||(d=s(c))),!d&&f.length>0){const p=[...new Set(f)].map(v=>JSON.stringify(v)).join(", ");o.warn(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${p}], got value ${JSON.stringify(c)}.`)}return d}:void 0,[ju]:!0};return wn(t,"default")&&(u.default=a),u},Fe=t=>io(Object.entries(t).map(([e,r])=>[e,uo(r,e)])),Zr=ke([String,Object,Function]),Yu={validating:Zs,success:j1,error:Ys},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},xb=(t,e)=>(t.install=r=>{r.directive(e,t)},t),Mr=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",Xs="change",Zu=["","default","small","large"],Eb=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t),ea=t=>t,Sb=["class","style"],Tb=/^on[A-Z]/,Bb=(t={})=>{const{excludeListeners:e=!1,excludeKeys:r}=t,n=o.computed(()=>((r==null?void 0:r.value)||[]).concat(Sb)),a=o.getCurrentInstance();return a?o.computed(()=>{var i;return io(Object.entries((i=a.proxy)==null?void 0:i.$attrs).filter(([s])=>!n.value.includes(s)&&!(e&&Tb.test(s))))}):(tt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),o.computed(()=>({})))},fo=({from:t,replacement:e,scope:r,version:n,ref:a,type:i="API"},s)=>{o.watch(()=>o.unref(s),l=>{l&&tt(r,`[${i}] ${t} is about to be deprecated in version ${n}, please use ${e} instead. For more detail, please visit: ${a} `)},{immediate:!0})};var Nb={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 Db=t=>(e,r)=>_b(e,r,o.unref(t)),_b=(t,e,r)=>Lr(r,t,t).replace(/\{(\w+)\}/g,(n,a)=>{var i;return`${(i=e==null?void 0:e[a])!=null?i:`{${a}}`}`}),Pb=t=>{const e=o.computed(()=>o.unref(t).name),r=o.isRef(t)?t:o.ref(t);return{lang:e,locale:r,t:Db(t)}},Xu=Symbol("localeContextKey"),Ya=t=>{const e=t||o.inject(Xu,o.ref());return Pb(o.computed(()=>e.value||Nb))},ho="el",Ob="is-",Tn=(t,e,r,n,a)=>{let i=`${t}-${e}`;return r&&(i+=`-${r}`),n&&(i+=`__${n}`),a&&(i+=`--${a}`),i},Qu=Symbol("namespaceContextKey"),Qs=t=>{const e=t||(o.getCurrentInstance()?o.inject(Qu,o.ref(ho)):o.ref(ho));return o.computed(()=>o.unref(e)||ho)},Be=(t,e)=>{const r=Qs(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?`${Ob}${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}`}},Lb=uo({type:ke(Boolean),default:null}),Ib=uo({type:ke(Function)}),Mb=t=>{const e=`update:${t}`,r=`onUpdate:${t}`,n=[e],a={[t]:Lb,[r]:Ib};return{useModelToggle:({indicator:s,toggleReason:l,shouldHideWhenRouteChanges:u,shouldProceed:c,onShow:d,onHide:f})=>{const p=o.getCurrentInstance(),{emit:v}=p,h=p.props,g=o.computed(()=>It(h[r])),y=o.computed(()=>h[t]===null),m=k=>{s.value!==!0&&(s.value=!0,l&&(l.value=k),It(d)&&d(k))},b=k=>{s.value!==!1&&(s.value=!1,l&&(l.value=k),It(f)&&f(k))},w=k=>{if(h.disabled===!0||It(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):s.value!==k&&(k?m():b()))},E=()=>{s.value?C():w()};return o.watch(()=>h[t],x),u&&p.appContext.config.globalProperties.$route!==void 0&&o.watch(()=>({...p.proxy.$route}),()=>{u.value&&s.value&&C()}),o.onMounted(()=>{x(h[t])}),{hide:C,show:w,toggle:E,hasUpdateHandler:g}},useModelToggleProps:a,useModelToggleEmits:n}},Ju=t=>{const e=o.getCurrentInstance();return o.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",Zt="right",Rt="left",Js="auto",Za=[Vt,Yt,Zt,Rt],ta="start",Xa="end",Fb="clippingParents",ed="viewport",Qa="popper",Ab="reference",td=Za.reduce(function(t,e){return t.concat([e+"-"+ta,e+"-"+Xa])},[]),po=[].concat(Za,[Js]).reduce(function(t,e){return t.concat([e,e+"-"+ta,e+"-"+Xa])},[]),Vb="beforeRead",Rb="read",$b="afterRead",zb="beforeMain",Hb="main",Kb="afterMain",qb="beforeWrite",Ub="write",Gb="afterWrite",Wb=[Vb,Rb,$b,zb,Hb,Kb,qb,Ub,Gb];function br(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 Xt(t){var e=ar(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function el(t){if(typeof ShadowRoot>"u")return!1;var e=ar(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function jb(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];!Xt(i)||!br(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(s){var l=a[s];l===!1?i.removeAttribute(s):i.setAttribute(s,l===!0?"":l)}))})}function Yb(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]||{},s=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),l=s.reduce(function(u,c){return u[c]="",u},{});!Xt(a)||!br(a)||(Object.assign(a.style,l),Object.keys(i).forEach(function(u){a.removeAttribute(u)}))})}}var rd={name:"applyStyles",enabled:!0,phase:"write",fn:jb,effect:Yb,requires:["computeStyles"]};function wr(t){return t.split("-")[0]}var Bn=Math.max,vo=Math.min,na=Math.round;function aa(t,e){e===void 0&&(e=!1);var r=t.getBoundingClientRect(),n=1,a=1;if(Xt(t)&&e){var i=t.offsetHeight,s=t.offsetWidth;s>0&&(n=na(r.width)/s||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 tl(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 nd(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&el(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Fr(t){return ar(t).getComputedStyle(t)}function Zb(t){return["table","td","th"].indexOf(br(t))>=0}function Xr(t){return((ra(t)?t.ownerDocument:t.document)||window.document).documentElement}function go(t){return br(t)==="html"?t:t.assignedSlot||t.parentNode||(el(t)?t.host:null)||Xr(t)}function ad(t){return!Xt(t)||Fr(t).position==="fixed"?null:t.offsetParent}function Xb(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&Xt(t)){var n=Fr(t);if(n.position==="fixed")return null}var a=go(t);for(el(a)&&(a=a.host);Xt(a)&&["html","body"].indexOf(br(a))<0;){var i=Fr(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=ad(t);r&&Zb(r)&&Fr(r).position==="static";)r=ad(r);return r&&(br(r)==="html"||br(r)==="body"&&Fr(r).position==="static")?e:r||Xb(t)||e}function rl(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ei(t,e,r){return Bn(t,vo(e,r))}function Qb(t,e,r){var n=ei(t,e,r);return n>r?r:n}function id(){return{top:0,right:0,bottom:0,left:0}}function od(t){return Object.assign({},id(),t)}function sd(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var Jb=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,od(typeof t!="number"?t:sd(t,Za))};function ew(t){var e,r=t.state,n=t.name,a=t.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,l=wr(r.placement),u=rl(l),c=[Rt,Zt].indexOf(l)>=0,d=c?"height":"width";if(!(!i||!s)){var f=Jb(a.padding,r),p=tl(i),v=u==="y"?Vt:Rt,h=u==="y"?Yt:Zt,g=r.rects.reference[d]+r.rects.reference[u]-s[u]-r.rects.popper[d],y=s[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 tw(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)||!nd(e.elements.popper,a)||(e.elements.arrow=a))}var rw={name:"arrow",enabled:!0,phase:"main",fn:ew,effect:tw,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ia(t){return t.split("-")[1]}var nw={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aw(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 ld(t){var e,r=t.popper,n=t.popperRect,a=t.placement,i=t.variation,s=t.offsets,l=t.position,u=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,f=t.isFixed,p=s.x,v=p===void 0?0:p,h=s.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=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),w=Rt,C=Vt,x=window;if(c){var E=Ja(r),k="clientHeight",B="clientWidth";if(E===ar(r)&&(E=Xr(r),Fr(E).position!=="static"&&l==="absolute"&&(k="scrollHeight",B="scrollWidth")),E=E,a===Vt||(a===Rt||a===Zt)&&i===Xa){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===Xa){w=Zt;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&&nw),_=d===!0?aw({x:v,y:g}):{x:v,y:g};if(v=_.x,g=_.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 iw(t){var e=t.state,r=t.options,n=r.gpuAcceleration,a=n===void 0?!0:n,i=r.adaptive,s=i===void 0?!0:i,l=r.roundOffsets,u=l===void 0?!0:l,c={placement:wr(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,ld(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ld(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 cd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:iw,data:{}},mo={passive:!0};function ow(t){var e=t.state,r=t.instance,n=t.options,a=n.scroll,i=a===void 0?!0:a,s=n.resize,l=s===void 0?!0:s,u=ar(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(d){d.addEventListener("scroll",r.update,mo)}),l&&u.addEventListener("resize",r.update,mo),function(){i&&c.forEach(function(d){d.removeEventListener("scroll",r.update,mo)}),l&&u.removeEventListener("resize",r.update,mo)}}var ud={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ow,data:{}},sw={left:"right",right:"left",bottom:"top",top:"bottom"};function yo(t){return t.replace(/left|right|bottom|top/g,function(e){return sw[e]})}var lw={start:"end",end:"start"};function dd(t){return t.replace(/start|end/g,function(e){return lw[e]})}function nl(t){var e=ar(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function al(t){return aa(Xr(t)).left+nl(t).scrollLeft}function cw(t){var e=ar(t),r=Xr(t),n=e.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;return n&&(a=n.width,i=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=n.offsetLeft,l=n.offsetTop)),{width:a,height:i,x:s+al(t),y:l}}function uw(t){var e,r=Xr(t),n=nl(t),a=(e=t.ownerDocument)==null?void 0:e.body,i=Bn(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),s=Bn(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-n.scrollLeft+al(t),u=-n.scrollTop;return Fr(a||r).direction==="rtl"&&(l+=Bn(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:s,x:l,y:u}}function il(t){var e=Fr(t),r=e.overflow,n=e.overflowX,a=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function fd(t){return["html","body","#document"].indexOf(br(t))>=0?t.ownerDocument.body:Xt(t)&&il(t)?t:fd(go(t))}function ti(t,e){var r;e===void 0&&(e=[]);var n=fd(t),a=n===((r=t.ownerDocument)==null?void 0:r.body),i=ar(n),s=a?[i].concat(i.visualViewport||[],il(n)?n:[]):n,l=e.concat(s);return a?l:l.concat(ti(go(s)))}function ol(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function dw(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 hd(t,e){return e===ed?ol(cw(t)):ra(e)?dw(e):ol(uw(Xr(t)))}function fw(t){var e=ti(go(t)),r=["absolute","fixed"].indexOf(Fr(t).position)>=0,n=r&&Xt(t)?Ja(t):t;return ra(n)?e.filter(function(a){return ra(a)&&nd(a,n)&&br(a)!=="body"}):[]}function hw(t,e,r){var n=e==="clippingParents"?fw(t):[].concat(e),a=[].concat(n,[r]),i=a[0],s=a.reduce(function(l,u){var c=hd(t,u);return l.top=Bn(c.top,l.top),l.right=vo(c.right,l.right),l.bottom=vo(c.bottom,l.bottom),l.left=Bn(c.left,l.left),l},hd(t,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function pd(t){var e=t.reference,r=t.element,n=t.placement,a=n?wr(n):null,i=n?ia(n):null,s=e.x+e.width/2-r.width/2,l=e.y+e.height/2-r.height/2,u;switch(a){case Vt:u={x:s,y:e.y-r.height};break;case Yt:u={x:s,y:e.y+e.height};break;case Zt: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?rl(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 Xa: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,s=i===void 0?Fb:i,l=r.rootBoundary,u=l===void 0?ed: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=od(typeof h!="number"?h:sd(h,Za)),y=d===Qa?Ab:Qa,m=t.rects.popper,b=t.elements[p?y:d],w=hw(ra(b)?b:b.contextElement||Xr(t.elements.popper),s,u),C=aa(t.elements.reference),x=pd({reference:C,element:m,strategy:"absolute",placement:a}),E=ol(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 _=[Zt,Yt].indexOf(D)>=0?1:-1,L=[Vt,Yt].indexOf(D)>=0?"y":"x";B[D]+=N[L]*_})}return B}function pw(t,e){e===void 0&&(e={});var r=e,n=r.placement,a=r.boundary,i=r.rootBoundary,s=r.padding,l=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?po:u,d=ia(n),f=d?l?td:td.filter(function(h){return ia(h)===d}):Za,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:s})[wr(g)],h},{});return Object.keys(v).sort(function(h,g){return v[h]-v[g]})}function vw(t){if(wr(t)===Js)return[];var e=yo(t);return[dd(t),e,dd(e)]}function gw(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,s=r.altAxis,l=s===void 0?!0:s,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=wr(y),b=m===y,w=u||(b||!h?[yo(y)]:vw(y)),C=[y].concat(w).reduce(function(ee,J){return ee.concat(wr(J)===Js?pw(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=0,F=P?"width":"height",O=ri(e,{placement:D,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),M=P?L?Zt:Rt:L?Yt:Vt;x[F]>E[F]&&(M=yo(M));var I=yo(M),V=[];if(i&&V.push(O[_]<=0),l&&V.push(O[M]<=0,O[I]<=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(X){var re=k.get(X);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 mw={name:"flip",enabled:!0,phase:"main",fn:gw,requiresIfExists:["offset"],data:{_skip:!1}};function vd(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 gd(t){return[Vt,Zt,Yt,Rt].some(function(e){return t[e]>=0})}function yw(t){var e=t.state,r=t.name,n=e.rects.reference,a=e.rects.popper,i=e.modifiersData.preventOverflow,s=ri(e,{elementContext:"reference"}),l=ri(e,{altBoundary:!0}),u=vd(s,n),c=vd(l,a,i),d=gd(u),f=gd(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 bw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yw};function ww(t,e,r){var n=wr(t),a=[Rt,Vt].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,s=i[0],l=i[1];return s=s||0,l=(l||0)*a,[Rt,Zt].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function Cw(t){var e=t.state,r=t.options,n=t.name,a=r.offset,i=a===void 0?[0,0]:a,s=po.reduce(function(d,f){return d[f]=ww(f,e.rects,i),d},{}),l=s[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]=s}var kw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Cw};function xw(t){var e=t.state,r=t.name;e.modifiersData[r]=pd({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var md={name:"popperOffsets",enabled:!0,phase:"read",fn:xw,data:{}};function Ew(t){return t==="x"?"y":"x"}function Sw(t){var e=t.state,r=t.options,n=t.name,a=r.mainAxis,i=a===void 0?!0:a,s=r.altAxis,l=s===void 0?!1:s,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=wr(e.placement),b=ia(e.placement),w=!b,C=rl(m),x=Ew(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,_={x:0,y:0};if(E){if(i){var L,P=C==="y"?Vt:Rt,F=C==="y"?Yt:Zt,O=C==="y"?"height":"width",M=E[C],I=M+y[P],V=M-y[F],H=v?-B[O]/2:0,$=b===ta?k[O]:B[O],z=b===ta?-B[O]:-k[O],j=e.elements.arrow,ee=v&&j?tl(j):{width:0,height:0},J=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:id(),X=J[P],re=J[F],Y=ei(0,k[O],ee[O]),A=w?k[O]/2-H-Y-X-N.mainAxis:$-Y-X-N.mainAxis,K=w?-k[O]/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?vo(I,ne):I,M,v?Bn(V,se):V);E[C]=ue,_[C]=ue-M}if(l){var pe,de=C==="x"?Vt:Rt,me=C==="x"?Yt:Zt,Ne=E[x],De=x==="y"?"height":"width",Ee=Ne+y[de],_e=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:_e,G=v&&te?Qb(R,Ne,Q):ei(v?R:Ee,Ne,v?Q:_e);E[x]=G,_[x]=G-Ne}e.modifiersData[n]=_}}var Tw={name:"preventOverflow",enabled:!0,phase:"main",fn:Sw,requiresIfExists:["offset"]};function Bw(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Nw(t){return t===ar(t)||!Xt(t)?nl(t):Bw(t)}function Dw(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 _w(t,e,r){r===void 0&&(r=!1);var n=Xt(e),a=Xt(e)&&Dw(e),i=Xr(e),s=aa(t,a),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&((br(e)!=="body"||il(i))&&(l=Nw(e)),Xt(e)?(u=aa(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):i&&(u.x=al(i))),{x:s.left+l.scrollLeft-u.x,y:s.top+l.scrollTop-u.y,width:s.width,height:s.height}}function Pw(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 s=[].concat(i.requires||[],i.requiresIfExists||[]);s.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 Ow(t){var e=Pw(t);return Wb.reduce(function(r,n){return r.concat(e.filter(function(a){return a.phase===n}))},[])}function Lw(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function Iw(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 yd={placement:"bottom",modifiers:[],strategy:"absolute"};function bd(){for(var t=arguments.length,e=new Array(t),r=0;r{const n={name:"updateState",enabled:!0,phase:"write",fn:({state:u})=>{const c=Rw(u);Object.assign(s.value,c)},requires:["computeStyles"]},a=o.computed(()=>{const{onFirstUpdate:u,placement:c,strategy:d,modifiers:f}=o.unref(r);return{onFirstUpdate:u,placement:c||"bottom",strategy:d||"absolute",modifiers:[...f||[],n,{name:"applyStyles",enabled:!1}]}}),i=o.shallowRef(),s=o.ref({styles:{popper:{position:o.unref(a).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{i.value&&(i.value.destroy(),i.value=void 0)};return o.watch(a,u=>{const c=o.unref(i);c&&c.setOptions(u)},{deep:!0}),o.watch([t,e],([u,c])=>{l(),!(!u||!c)&&(i.value=Aw(u,c,o.unref(a)))}),o.onBeforeUnmount(()=>{l()}),{state:o.computed(()=>{var u;return{...((u=o.unref(i))==null?void 0:u.state)||{}}}),styles:o.computed(()=>o.unref(s).styles),attributes:o.computed(()=>o.unref(s).attributes),update:()=>{var u;return(u=o.unref(i))==null?void 0:u.update()},forceUpdate:()=>{var u;return(u=o.unref(i))==null?void 0:u.forceUpdate()},instanceRef:o.computed(()=>o.unref(i))}};function Rw(t){const e=Object.keys(t.elements),r=io(e.map(a=>[a,t.styles[a]||{}])),n=io(e.map(a=>[a,t.attributes[a]]));return{styles:r,attributes:n}}function wd(){let t;const e=(n,a)=>{r(),t=window.setTimeout(n,a)},r=()=>window.clearTimeout(t);return Yi(()=>r()),{registerTimeout:e,cancelTimeout:r}}const ll={prefix:Math.floor(Math.random()*1e4),current:0},$w=Symbol("elIdInjection"),Cd=()=>o.getCurrentInstance()?o.inject($w,ll):ll,bo=t=>{const e=Cd();!et&&e===ll&&tt("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed usage: app.provide(ID_INJECTION_KEY, { prefix: number, current: number, })`);const r=Qs();return o.computed(()=>o.unref(t)||`${r.value}-id-${e.prefix}-${e.current++}`)};let oa=[];const kd=t=>{const e=t;e.key===it.esc&&oa.forEach(r=>r(e))},zw=t=>{o.onMounted(()=>{oa.length===0&&document.addEventListener("keydown",kd),et&&oa.push(t)}),o.onBeforeUnmount(()=>{oa=oa.filter(e=>e!==t),oa.length===0&&et&&document.removeEventListener("keydown",kd)})};let xd;const Ed=()=>{const t=Qs(),e=Cd(),r=o.computed(()=>`${t.value}-popper-container-${e.prefix}`),n=o.computed(()=>`#${r.value}`);return{id:r,selector:n}},Hw=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},Kw=()=>{const{id:t,selector:e}=Ed();return o.onBeforeMount(()=>{et&&(process.env.NODE_ENV==="test"||!xd||!document.body.querySelector(e.value))&&(xd=Hw(t.value))}),{id:t,selector:e}},qw=Fe({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),Uw=({showAfter:t,hideAfter:e,autoClose:r,open:n,close:a})=>{const{registerTimeout:i}=wd(),{registerTimeout:s,cancelTimeout:l}=wd();return{onOpen:d=>{i(()=>{n(d);const f=o.unref(r);gt(f)&&f>0&&s(()=>{a(d)},f)},o.unref(t))},onClose:d=>{l(),i(()=>{a(d)},o.unref(e))}}},Sd=Symbol("elForwardRef"),Gw=t=>{const e=r=>{t.value=r};o.provide(Sd,{setForwardRef:e})},Ww=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),Td={current:0},Bd=o.ref(0),Nd=2e3,Dd=Symbol("elZIndexContextKey"),_d=Symbol("zIndexContextKey"),Pd=t=>{const e=o.getCurrentInstance()?o.inject(Dd,Td):Td,r=t||(o.getCurrentInstance()?o.inject(_d,void 0):void 0),n=o.computed(()=>{const s=o.unref(r);return gt(s)?s:Nd}),a=o.computed(()=>n.value+Bd.value),i=()=>(e.current++,Bd.value=e.current,a.value);return!et&&!o.inject(Dd)&&tt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,currentZIndex:a,nextZIndex:i}};function jw(t){let e;function r(){if(t.value==null)return;const{selectionStart:a,selectionEnd:i,value:s}=t.value;if(a==null||i==null)return;const l=s.slice(0,Math.max(0,a)),u=s.slice(Math.max(0,i));e={selectionStart:a,selectionEnd:i,value:s,beforeTxt:l,afterTxt:u}}function n(){if(t.value==null||e==null)return;const{value:a}=t.value,{beforeTxt:i,afterTxt:s,selectionStart:l}=e;if(i==null||s==null||l==null)return;let u=a.length;if(a.endsWith(s))u=a.length-s.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=uo({type:String,values:Zu,required:!1}),Od=Symbol("size"),Yw=()=>{const t=o.inject(Od,{});return o.computed(()=>o.unref(t.size)||"")};function cl(t,{beforeFocus:e,afterFocus:r,beforeBlur:n,afterBlur:a}={}){const i=o.getCurrentInstance(),{emit:s}=i,l=o.shallowRef(),u=o.ref(!1),c=p=>{It(e)&&e(p)||u.value||(u.value=!0,s("focus",p),r==null||r())},d=p=>{var v;It(n)&&n(p)||p.relatedTarget&&((v=l.value)!=null&&v.contains(p.relatedTarget))||(u.value=!1,s("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 o.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"&&o.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 Ld({afterComposition:t,emit:e}){const r=o.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=!Eb(d)},i=l=>{e==null||e("compositionend",l),r.value&&(r.value=!1,o.nextTick(()=>t(l)))};return{isComposing:r,handleComposition:l=>{l.type==="compositionend"?i(l):a(l)},handleCompositionStart:n,handleCompositionUpdate:a,handleCompositionEnd:i}}const Id=Symbol("emptyValuesContextKey"),Zw="use-empty-values",Xw=["",void 0,null],Qw=void 0,Jw=Fe({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:t=>It(t)?!t():!t}}),e2=(t,e)=>{const r=o.getCurrentInstance()?o.inject(Id,o.ref({})):o.ref({}),n=o.computed(()=>t.emptyValues||r.value.emptyValues||Xw),a=o.computed(()=>It(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:It(r.value.valueOnClear)?r.value.valueOnClear():r.value.valueOnClear!==void 0?r.value.valueOnClear:Qw),i=s=>n.value.includes(s);return n.value.includes(a.value)||tt(Zw,"value-on-clear should be a value of empty-values"),{emptyValues:n,valueOnClear:a,isEmptyValue:i}},t2=Fe({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Qr=t=>Ku(t2,t),Md=Symbol(),wo=o.ref();function ul(t,e=void 0){const r=o.getCurrentInstance()?o.inject(Md,wo):wo;return t?o.computed(()=>{var n,a;return(a=(n=r.value)==null?void 0:n[t])!=null?a:e}):r}function r2(t,e){const r=ul(),n=Be(t,o.computed(()=>{var l;return((l=r.value)==null?void 0:l.namespace)||ho})),a=Ya(o.computed(()=>{var l;return(l=r.value)==null?void 0:l.locale})),i=Pd(o.computed(()=>{var l;return((l=r.value)==null?void 0:l.zIndex)||Nd})),s=o.computed(()=>{var l;return o.unref(e)||((l=r.value)==null?void 0:l.size)||""});return n2(o.computed(()=>o.unref(r)||{})),{ns:n,locale:a,zIndex:i,size:s}}const n2=(t,e,r=!1)=>{var n;const a=!!o.getCurrentInstance(),i=a?ul():void 0,s=(n=void 0)!=null?n:a?o.provide:void 0;if(!s){tt("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const l=o.computed(()=>{const u=o.unref(t);return i!=null&&i.value?a2(i.value,u):u});return s(Md,l),s(Xu,o.computed(()=>l.value.locale)),s(Qu,o.computed(()=>l.value.namespace)),s(_d,o.computed(()=>l.value.zIndex)),s(Od,{size:o.computed(()=>l.value.size||"")}),s(Id,o.computed(()=>({emptyValues:l.value.emptyValues,valueOnClear:l.value.valueOnClear}))),(r||!wo.value)&&(wo.value=l.value),l},a2=(t,e)=>{const r=[...new Set([...qu(t),...qu(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 i2=Fe({size:{type:ke([Number,String])},color:{type:String}}),o2=o.defineComponent({name:"ElIcon",inheritAttrs:!1}),s2=o.defineComponent({...o2,props:i2,setup(t){const e=t,r=Be("icon"),n=o.computed(()=>{const{size:a,color:i}=e;return!a&&!i?{}:{fontSize:Yr(a)?void 0:Jn(a),"--color":i}});return(a,i)=>(o.openBlock(),o.createElementBlock("i",o.mergeProps({class:o.unref(r).b(),style:o.unref(n)},a.$attrs),[o.renderSlot(a.$slots,"default")],16))}});var l2=Te(s2,[["__file","icon.vue"]]);const yt=dt(l2),dl=Symbol("formContextKey"),ni=Symbol("formItemContextKey"),Nn=(t,e={})=>{const r=o.ref(void 0),n=e.prop?r:Ju("size"),a=e.global?r:Yw(),i=e.form?{size:void 0}:o.inject(dl,void 0),s=e.formItem?{size:void 0}:o.inject(ni,void 0);return o.computed(()=>n.value||o.unref(t)||(s==null?void 0:s.size)||(i==null?void 0:i.size)||a.value||"")},ai=t=>{const e=Ju("disabled"),r=o.inject(dl,void 0);return o.computed(()=>e.value||o.unref(t)||(r==null?void 0:r.disabled)||!1)},Dn=()=>{const t=o.inject(dl,void 0),e=o.inject(ni,void 0);return{form:t,formItem:e}},ii=(t,{formItemContext:e,disableIdGeneration:r,disableIdManagement:n})=>{r||(r=o.ref(!1)),n||(n=o.ref(!1));const a=o.ref();let i;const s=o.computed(()=>{var l;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((l=e.inputIds)==null?void 0:l.length)<=1)});return o.onMounted(()=>{i=o.watch([o.toRef(t,"id"),r],([l,u])=>{const c=l??(u?void 0:bo().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})}),o.onUnmounted(()=>{i&&i(),e!=null&&e.removeInputId&&a.value&&e.removeInputId(a.value)}),{isLabeledByFormItem:s,inputId:a}};let ir;const c2=` height:0 !important; visibility:hidden !important; ${Vg()?"":"overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `,u2=["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 d2(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:u2.map(s=>`${s}:${e.getPropertyValue(s)}`).join(";"),paddingSize:n,borderSize:a,boxSizing:r}}function Fd(t,e=1,r){var n;ir||(ir=document.createElement("textarea"),document.body.appendChild(ir));const{paddingSize:a,borderSize:i,boxSizing:s,contextStyle:l}=d2(t);ir.setAttribute("style",`${l};${c2}`),ir.value=t.value||t.placeholder||"";let u=ir.scrollHeight;const c={};s==="border-box"?u=u+i:s==="content-box"&&(u=u-a),ir.value="";const d=ir.scrollHeight-a;if(gt(e)){let f=d*e;s==="border-box"&&(f=f+a+i),u=Math.max(f,u),c.minHeight=`${f}px`}if(gt(r)){let f=d*r;s==="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 f2=Fe({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:Zr},prefixIcon:{type:Zr},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"])}),h2={[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},p2=o.defineComponent({name:"ElInput",inheritAttrs:!1}),v2=o.defineComponent({...p2,props:f2,emits:h2,setup(t,{expose:e,emit:r}){const n=t,a=o.useAttrs(),i=o.useSlots(),s=o.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=o.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=o.computed(()=>[g.e("wrapper"),g.is("focus",S.value)]),c=Bb({excludeKeys:o.computed(()=>Object.keys(s.value))}),{form:d,formItem:f}=Dn(),{inputId:p}=ii(n,{formItemContext:f}),v=Nn(),h=ai(),g=Be("input"),y=Be("textarea"),m=o.shallowRef(),b=o.shallowRef(),w=o.ref(!1),C=o.ref(!1),x=o.ref(),E=o.shallowRef(n.inputStyle),k=o.computed(()=>m.value||b.value),{wrapperRef:B,isFocused:S,handleFocus:N,handleBlur:D}=cl(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)))}}),_=o.computed(()=>{var T;return(T=d==null?void 0:d.statusIcon)!=null?T:!1}),L=o.computed(()=>(f==null?void 0:f.validateState)||""),P=o.computed(()=>L.value&&Yu[L.value]),F=o.computed(()=>C.value?vb:ob),O=o.computed(()=>[a.style]),M=o.computed(()=>[n.inputStyle,E.value,{resize:n.resize}]),I=o.computed(()=>jr(n.modelValue)?"":String(n.modelValue)),V=o.computed(()=>n.clearable&&!h.value&&!n.readonly&&!!I.value&&(S.value||w.value)),H=o.computed(()=>n.showPassword&&!h.value&&!n.readonly&&!!I.value&&(!!I.value||S.value)),$=o.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!h.value&&!n.readonly&&!n.showPassword),z=o.computed(()=>I.value.length),j=o.computed(()=>!!$.value&&z.value>Number(n.maxlength)),ee=o.computed(()=>!!i.suffix||!!n.suffixIcon||V.value||n.showPassword||$.value||!!L.value&&_.value),[J,X]=jw(m);_r(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=Fd(b.value,Q,G);E.value={overflowY:"hidden",...U},o.nextTick(()=>{b.value.offsetHeight,E.value=U})}else E.value={minHeight:Fd(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(I.value):I.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===I.value){K();return}r(mt,R),r("input",R),await o.nextTick(),K(),X()}},oe=T=>{r("change",T.target.value)},{isComposing:he,handleCompositionStart:ne,handleCompositionUpdate:se,handleCompositionEnd:ue}=Ld({emit:r,afterComposition:W}),pe=()=>{C.value=!C.value,de()},de=async()=>{var T;await o.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)},_e=()=>{var T;(T=k.value)==null||T.select()},te=()=>{r(mt,""),r("change",""),r("clear"),r("input","")};return o.watch(()=>n.modelValue,()=>{var T;o.nextTick(()=>re()),n.validateEvent&&((T=f==null?void 0:f.validate)==null||T.call(f,"change").catch(R=>tt(R)))}),o.watch(I,()=>K()),o.watch(()=>n.type,async()=>{await o.nextTick(),K(),re()}),o.onMounted(()=>{!n.formatter&&n.parser&&tt("ElInput","If you set the parser, you also need to set the formatter."),K(),o.nextTick(re)}),e({input:m,textarea:b,ref:k,textareaStyle:M,autosize:o.toRef(n,"autosize"),isComposing:he,focus:de,blur:me,select:_e,clear:te,resizeTextarea:re}),(T,R)=>(o.openBlock(),o.createElementBlock("div",o.mergeProps(o.unref(s),{class:[o.unref(l),{[o.unref(g).bm("group","append")]:T.$slots.append,[o.unref(g).bm("group","prepend")]:T.$slots.prepend}],style:o.unref(O),role:T.containerRole,onMouseenter:De,onMouseleave:Ne}),[o.createCommentVNode(" input "),T.type!=="textarea"?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createCommentVNode(" prepend slot "),T.$slots.prepend?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(g).be("group","prepend"))},[o.renderSlot(T.$slots,"prepend")],2)):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{ref_key:"wrapperRef",ref:B,class:o.normalizeClass(o.unref(u))},[o.createCommentVNode(" prefix slot "),T.$slots.prefix||T.prefixIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(g).e("prefix"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(g).e("prefix-inner"))},[o.renderSlot(T.$slots,"prefix"),T.prefixIcon?(o.openBlock(),o.createBlock(o.unref(yt),{key:0,class:o.normalizeClass(o.unref(g).e("icon"))},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(T.prefixIcon)))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0)],2)],2)):o.createCommentVNode("v-if",!0),o.createElementVNode("input",o.mergeProps({id:o.unref(p),ref_key:"input",ref:m,class:o.unref(g).e("inner")},o.unref(c),{minlength:T.minlength,maxlength:T.maxlength,type:T.showPassword?C.value?"text":"password":T.type,disabled:o.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:o.unref(ne),onCompositionupdate:o.unref(se),onCompositionend:o.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"]),o.createCommentVNode(" suffix slot "),o.unref(ee)?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(g).e("suffix"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(g).e("suffix-inner"))},[!o.unref(V)||!o.unref(H)||!o.unref($)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(T.$slots,"suffix"),T.suffixIcon?(o.openBlock(),o.createBlock(o.unref(yt),{key:0,class:o.normalizeClass(o.unref(g).e("icon"))},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(T.suffixIcon)))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0)],64)):o.createCommentVNode("v-if",!0),o.unref(V)?(o.openBlock(),o.createBlock(o.unref(yt),{key:1,class:o.normalizeClass([o.unref(g).e("icon"),o.unref(g).e("clear")]),onMousedown:o.withModifiers(o.unref(Ha),["prevent"]),onClick:te},{default:o.withCtx(()=>[o.createVNode(o.unref(Ys))]),_:1},8,["class","onMousedown"])):o.createCommentVNode("v-if",!0),o.unref(H)?(o.openBlock(),o.createBlock(o.unref(yt),{key:2,class:o.normalizeClass([o.unref(g).e("icon"),o.unref(g).e("password")]),onClick:pe},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(F))))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0),o.unref($)?(o.openBlock(),o.createElementBlock("span",{key:3,class:o.normalizeClass(o.unref(g).e("count"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(g).e("count-inner"))},o.toDisplayString(o.unref(z))+" / "+o.toDisplayString(T.maxlength),3)],2)):o.createCommentVNode("v-if",!0),o.unref(L)&&o.unref(P)&&o.unref(_)?(o.openBlock(),o.createBlock(o.unref(yt),{key:4,class:o.normalizeClass([o.unref(g).e("icon"),o.unref(g).e("validateIcon"),o.unref(g).is("loading",o.unref(L)==="validating")])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(P))))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0)],2)],2)):o.createCommentVNode("v-if",!0)],2),o.createCommentVNode(" append slot "),T.$slots.append?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(g).be("group","append"))},[o.renderSlot(T.$slots,"append")],2)):o.createCommentVNode("v-if",!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createCommentVNode(" textarea "),o.createElementVNode("textarea",o.mergeProps({id:o.unref(p),ref_key:"textarea",ref:b,class:[o.unref(y).e("inner"),o.unref(g).is("focus",o.unref(S))]},o.unref(c),{minlength:T.minlength,maxlength:T.maxlength,tabindex:T.tabindex,disabled:o.unref(h),readonly:T.readonly,autocomplete:T.autocomplete,style:o.unref(M),"aria-label":T.ariaLabel,placeholder:T.placeholder,form:T.form,autofocus:T.autofocus,rows:T.rows,onCompositionstart:o.unref(ne),onCompositionupdate:o.unref(se),onCompositionend:o.unref(ue),onInput:W,onFocus:o.unref(N),onBlur:o.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"]),o.unref($)?(o.openBlock(),o.createElementBlock("span",{key:0,style:o.normalizeStyle(x.value),class:o.normalizeClass(o.unref(g).e("count"))},o.toDisplayString(o.unref(z))+" / "+o.toDisplayString(T.maxlength),7)):o.createCommentVNode("v-if",!0)],64))],16,["role"]))}});var g2=Te(v2,[["__file","input.vue"]]);const oi=dt(g2),la=4,m2={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"}},y2=({move:t,size:e,bar:r})=>({[r.size]:e,transform:`translate${r.axis}(${t}%)`}),fl=Symbol("scrollbarContextKey"),b2=Fe({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),w2="Thumb";var Ad=Te(o.defineComponent({__name:"thumb",props:b2,setup(t){const e=t,r=o.inject(fl),n=Be("scrollbar");r||V1(w2,"can not inject scrollbar context");const a=o.ref(),i=o.ref(),s=o.ref({}),l=o.ref(!1);let u=!1,c=!1,d=et?document.onselectstart:null;const f=o.computed(()=>m2[e.vertical?"vertical":"horizontal"]),p=o.computed(()=>y2({size:e.size,move:e.move,bar:f.value})),v=o.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&&(s.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=s.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,s.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};o.onBeforeUnmount(()=>{x(),document.removeEventListener("mouseup",b)});const x=()=>{document.onselectstart!==d&&(document.onselectstart=d)};return jt(o.toRef(r,"scrollbarElement"),"mousemove",w),jt(o.toRef(r,"scrollbarElement"),"mouseleave",C),(E,k)=>(o.openBlock(),o.createBlock(o.Transition,{name:o.unref(n).b("fade"),persisted:""},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{ref_key:"instance",ref:a,class:o.normalizeClass([o.unref(n).e("bar"),o.unref(n).is(o.unref(f).key)]),onMousedown:g},[o.createElementVNode("div",{ref_key:"thumb",ref:i,class:o.normalizeClass(o.unref(n).e("thumb")),style:o.normalizeStyle(o.unref(p)),onMousedown:h},null,38)],34),[[o.vShow,E.always||l.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const C2=Fe({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var k2=Te(o.defineComponent({__name:"bar",props:C2,setup(t,{expose:e}){const r=t,n=o.inject(fl),a=o.ref(0),i=o.ref(0),s=o.ref(""),l=o.ref(""),u=o.ref(1),c=o.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(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(Ad,{move:a.value,ratio:c.value,size:s.value,always:p.always},null,8,["move","ratio","size","always"]),o.createVNode(Ad,{move:i.value,ratio:u.value,size:l.value,vertical:"",always:p.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const x2=Fe({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"])}),E2={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(gt)},hl="ElScrollbar",S2=o.defineComponent({name:hl}),T2=o.defineComponent({...S2,props:x2,emits:E2,setup(t,{expose:e,emit:r}){const n=t,a=Be("scrollbar");let i,s,l=0,u=0;const c=o.ref(),d=o.ref(),f=o.ref(),p=o.ref(),v=o.computed(()=>{const x={};return n.height&&(x.height=Jn(n.height)),n.maxHeight&&(x.maxHeight=Jn(n.maxHeight)),[n.wrapStyle,x]}),h=o.computed(()=>[n.wrapClass,a.e("wrap"),{[a.em("wrap","hidden-default")]:!n.native}]),g=o.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)&>(E)&&d.value.scrollTo(x,E)}const b=x=>{if(!gt(x)){tt(hl,"value must be a number");return}d.value.scrollTop=x},w=x=>{if(!gt(x)){tt(hl,"value must be a number");return}d.value.scrollLeft=x},C=()=>{var x;(x=p.value)==null||x.update()};return o.watch(()=>n.noresize,x=>{x?(i==null||i(),s==null||s()):({stop:i}=_r(f,C),s=jt("resize",C))},{immediate:!0}),o.watch(()=>[n.maxHeight,n.height],()=>{n.native||o.nextTick(()=>{var x;C(),d.value&&((x=p.value)==null||x.handleScroll(d.value))})}),o.provide(fl,o.reactive({scrollbarElement:c,wrapElement:d})),o.onActivated(()=>{d.value&&(d.value.scrollTop=l,d.value.scrollLeft=u)}),o.onMounted(()=>{n.native||o.nextTick(()=>{C()})}),o.onUpdated(()=>C()),e({wrapRef:d,update:C,scrollTo:m,setScrollTop:b,setScrollLeft:w,handleScroll:y}),(x,E)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"scrollbarRef",ref:c,class:o.normalizeClass(o.unref(a).b())},[o.createElementVNode("div",{ref_key:"wrapRef",ref:d,class:o.normalizeClass(o.unref(h)),style:o.normalizeStyle(o.unref(v)),tabindex:x.tabindex,onScroll:y},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(x.tag),{id:x.id,ref_key:"resizeRef",ref:f,class:o.normalizeClass(o.unref(g)),style:o.normalizeStyle(x.viewStyle),role:x.role,"aria-label":x.ariaLabel,"aria-orientation":x.ariaOrientation},{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),x.native?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createBlock(k2,{key:0,ref_key:"barRef",ref:p,always:x.always,"min-size":x.minSize},null,8,["always","min-size"]))],2))}});var B2=Te(T2,[["__file","scrollbar.vue"]]);const N2=dt(B2),pl=Symbol("popper"),Vd=Symbol("popperContent"),Rd=Fe({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),D2=o.defineComponent({name:"ElPopper",inheritAttrs:!1}),_2=o.defineComponent({...D2,props:Rd,setup(t,{expose:e}){const r=t,n=o.ref(),a=o.ref(),i=o.ref(),s=o.ref(),l=o.computed(()=>r.role),u={triggerRef:n,popperInstanceRef:a,contentRef:i,referenceRef:s,role:l};return e(u),o.provide(pl,u),(c,d)=>o.renderSlot(c.$slots,"default")}});var P2=Te(_2,[["__file","popper.vue"]]);const $d=Fe({arrowOffset:{type:Number,default:5}}),O2=o.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),L2=o.defineComponent({...O2,props:$d,setup(t,{expose:e}){const r=t,n=Be("popper"),{arrowOffset:a,arrowRef:i,arrowStyle:s}=o.inject(Vd,void 0);return o.watch(()=>r.arrowOffset,l=>{a.value=l}),o.onBeforeUnmount(()=>{i.value=void 0}),e({arrowRef:i}),(l,u)=>(o.openBlock(),o.createElementBlock("span",{ref_key:"arrowRef",ref:i,class:o.normalizeClass(o.unref(n).e("arrow")),style:o.normalizeStyle(o.unref(s)),"data-popper-arrow":""},null,6))}});var I2=Te(L2,[["__file","arrow.vue"]]);const vl="ElOnlyChild",M2=o.defineComponent({name:vl,setup(t,{slots:e,attrs:r}){var n;const a=o.inject(Sd),i=Ww((n=a==null?void 0:a.setForwardRef)!=null?n:Ha);return()=>{var s;const l=(s=e.default)==null?void 0:s.call(e,r);if(!l)return null;if(l.length>1)return tt(vl,"requires exact only one valid child."),null;const u=zd(l);return u?o.withDirectives(o.cloneVNode(u,r),[[i]]):(tt(vl,"no valid child node found"),null)}}});function zd(t){if(!t)return null;const e=t;for(const r of e){if(vt(r))switch(r.type){case o.Comment:continue;case o.Text:case"svg":return Hd(r);case o.Fragment:return zd(r.children);default:return r}return Hd(r)}return null}function Hd(t){const e=Be("only-child");return o.createVNode("span",{class:e.e("content")},[t])}const Kd=Fe({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}),F2=o.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),A2=o.defineComponent({...F2,props:Kd,setup(t,{expose:e}){const r=t,{role:n,triggerRef:a}=o.inject(pl,void 0);Gw(a);const i=o.computed(()=>l.value?r.id:void 0),s=o.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),l=o.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),u=o.computed(()=>l.value?`${r.open}`:void 0);let c;const d=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return o.onMounted(()=>{o.watch(()=>r.virtualRef,f=>{f&&(a.value=Dr(f))},{immediate:!0}),o.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=o.watch([i,s,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})}),o.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?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createBlock(o.unref(M2),o.mergeProps({key:0},f.$attrs,{"aria-controls":o.unref(i),"aria-describedby":o.unref(s),"aria-expanded":o.unref(u),"aria-haspopup":o.unref(l)}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var V2=Te(A2,[["__file","trigger.vue"]]);const gl="focus-trap.focus-after-trapped",ml="focus-trap.focus-after-released",R2="focus-trap.focusout-prevented",qd={cancelable:!0,bubbles:!1},$2={cancelable:!0,bubbles:!1},Ud="focusAfterTrapped",Gd="focusAfterReleased",z2=Symbol("elFocusTrap"),yl=o.ref(),Co=o.ref(0),bl=o.ref(0);let ko=0;const Wd=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},jd=(t,e)=>{for(const r of t)if(!H2(r,e))return r},H2=(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},K2=t=>{const e=Wd(t),r=jd(e,t),n=jd(e.reverse(),t);return[r,n]},q2=t=>t instanceof HTMLInputElement&&"select"in t,Jr=(t,e)=>{if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),bl.value=window.performance.now(),t!==r&&q2(t)&&e&&t.select()}};function Yd(t,e){const r=[...t],n=t.indexOf(e);return n!==-1&&r.splice(n,1),r}const U2=()=>{let t=[];return{push:n=>{const a=t[0];a&&n!==a&&a.pause(),t=Yd(t,n),t.unshift(n)},remove:n=>{var a,i;t=Yd(t,n),(i=(a=t[0])==null?void 0:a.resume)==null||i.call(a)}}},G2=(t,e=!1)=>{const r=document.activeElement;for(const n of t)if(Jr(n,e),document.activeElement!==r)return},Zd=U2(),W2=()=>Co.value>bl.value,xo=()=>{yl.value="pointer",Co.value=window.performance.now()},Xd=()=>{yl.value="keyboard",Co.value=window.performance.now()},j2=()=>(o.onMounted(()=>{ko===0&&(document.addEventListener("mousedown",xo),document.addEventListener("touchstart",xo),document.addEventListener("keydown",Xd)),ko++}),o.onBeforeUnmount(()=>{ko--,ko<=0&&(document.removeEventListener("mousedown",xo),document.removeEventListener("touchstart",xo),document.removeEventListener("keydown",Xd))}),{focusReason:yl,lastUserFocusTimestamp:Co,lastAutomatedFocusTimestamp:bl}),Eo=t=>new CustomEvent(R2,{...$2,detail:t}),Y2=o.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Ud,Gd,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const r=o.ref();let n,a;const{focusReason:i}=j2();zw(h=>{t.trapped&&!s.paused&&e("release-requested",h)});const s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=h=>{if(!t.loop&&!t.trapped||s.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]=K2(B);if(S&&N){if(!C&&k===N){const _=Eo({focusReason:i.value});e("focusout-prevented",_),_.defaultPrevented||(h.preventDefault(),x&&Jr(S,!0))}else if(C&&[S,B].includes(k)){const _=Eo({focusReason:i.value});e("focusout-prevented",_),_.defaultPrevented||(h.preventDefault(),x&&Jr(N,!0))}}else if(k===B){const _=Eo({focusReason:i.value});e("focusout-prevented",_),_.defaultPrevented||h.preventDefault()}}};o.provide(z2,{focusTrapRef:r,onKeydown:l}),o.watch(()=>t.focusTrapEl,h=>{h&&(r.value=h)},{immediate:!0}),o.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(Ud,h)},c=h=>e(Gd,h),d=h=>{const g=o.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),!s.paused&&t.trapped&&(b?a=y:Jr(a,!0))},f=h=>{const g=o.unref(r);if(!(s.paused||!g))if(t.trapped){const y=h.relatedTarget;!jr(y)&&!g.contains(y)&&setTimeout(()=>{if(!s.paused&&t.trapped){const m=Eo({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 o.nextTick();const h=o.unref(r);if(h){Zd.push(s);const g=h.contains(document.activeElement)?n:document.activeElement;if(n=g,!h.contains(g)){const m=new Event(gl,qd);h.addEventListener(gl,u),h.dispatchEvent(m),m.defaultPrevented||o.nextTick(()=>{let b=t.focusStartEl;St(b)||(Jr(b),document.activeElement!==b&&(b="first")),b==="first"&&G2(Wd(h),!0),(document.activeElement===g||b==="container")&&Jr(h)})}}}function v(){const h=o.unref(r);if(h){h.removeEventListener(gl,u);const g=new CustomEvent(ml,{...qd,detail:{focusReason:i.value}});h.addEventListener(ml,c),h.dispatchEvent(g),!g.defaultPrevented&&(i.value=="keyboard"||!W2()||h.contains(document.activeElement))&&Jr(n??document.body),h.removeEventListener(ml,c),Zd.remove(s)}}return o.onMounted(()=>{t.trapped&&p(),o.watch(()=>t.trapped,h=>{h?p():v()})}),o.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 Z2(t,e,r,n,a,i){return o.renderSlot(t.$slots,"default",{handleKeydown:t.onKeydown})}var X2=Te(Y2,[["render",Z2],["__file","focus-trap.vue"]]);const Q2=["fixed","absolute"],J2=Fe({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:po,default:"bottom"},popperOptions:{type:ke(Object),default:()=>({})},strategy:{type:String,values:Q2,default:"absolute"}}),Qd=Fe({...J2,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"])}),eC={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},tC=(t,e=[])=>{const{placement:r,strategy:n,popperOptions:a}=t,i={placement:r,strategy:n,...a,modifiers:[...nC(t),...e]};return aC(i,a==null?void 0:a.modifiers),i},rC=t=>{if(et)return Dr(t)};function nC(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 aC(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const iC=0,oC=t=>{const{popperInstanceRef:e,contentRef:r,triggerRef:n,role:a}=o.inject(pl,void 0),i=o.ref(),s=o.ref(),l=o.computed(()=>({name:"eventListeners",enabled:!!t.visible})),u=o.computed(()=>{var m;const b=o.unref(i),w=(m=o.unref(s))!=null?m:iC;return{name:"arrow",enabled:!O1(b),options:{element:b,padding:w}}}),c=o.computed(()=>({onFirstUpdate:()=>{h()},...tC(t,[o.unref(u),o.unref(l)])})),d=o.computed(()=>rC(t.referenceEl)||o.unref(n)),{attributes:f,state:p,styles:v,update:h,forceUpdate:g,instanceRef:y}=Vw(d,r,c);return o.watch(y,m=>e.value=m),o.onMounted(()=>{o.watch(()=>{var m;return(m=o.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}},sC=(t,{attributes:e,styles:r,role:n})=>{const{nextZIndex:a}=Pd(),i=Be("popper"),s=o.computed(()=>o.unref(e).popper),l=o.ref(gt(t.zIndex)?t.zIndex:a()),u=o.computed(()=>[i.b(),i.is("pure",t.pure),i.is(t.effect),t.popperClass]),c=o.computed(()=>[{zIndex:o.unref(l)},o.unref(r).popper,t.popperStyle||{}]),d=o.computed(()=>n.value==="dialog"?"false":void 0),f=o.computed(()=>o.unref(r).arrow||{});return{ariaModal:d,arrowStyle:f,contentAttrs:s,contentClass:u,contentStyle:c,contentZIndex:l,updateZIndex:()=>{l.value=gt(t.zIndex)?t.zIndex:a()}}},lC=(t,e)=>{const r=o.ref(!1),n=o.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")}}},cC=o.defineComponent({name:"ElPopperContent"}),uC=o.defineComponent({...cC,props:Qd,emits:eC,setup(t,{expose:e,emit:r}){const n=t,{focusStartRef:a,trapped:i,onFocusAfterReleased:s,onFocusAfterTrapped:l,onFocusInTrap:u,onFocusoutPrevented:c,onReleaseRequested:d}=lC(n,r),{attributes:f,arrowRef:p,contentRef:v,styles:h,instanceRef:g,role:y,update:m}=oC(n),{ariaModal:b,arrowStyle:w,contentAttrs:C,contentClass:x,contentStyle:E,updateZIndex:k}=sC(n,{styles:h,attributes:f,role:y}),B=o.inject(ni,void 0),S=o.ref();o.provide(Vd,{arrowStyle:w,arrowRef:p,arrowOffset:S}),B&&o.provide(ni,{...B,addInputId:Ha,removeInputId:Ha});let N;const D=(L=!0)=>{m(),L&&k()},_=()=>{D(!1),n.visible&&n.focusOnShow?i.value=!0:n.visible===!1&&(i.value=!1)};return o.onMounted(()=>{o.watch(()=>n.triggerTargetEl,(L,P)=>{N==null||N(),N=void 0;const F=o.unref(L||v.value),O=o.unref(P||v.value);En(F)&&(N=o.watch([y,()=>n.ariaLabel,b,()=>n.id],M=>{["role","aria-label","aria-modal","id"].forEach((I,V)=>{jr(M[V])?F.removeAttribute(I):F.setAttribute(I,M[V])})},{immediate:!0})),O!==F&&En(O)&&["role","aria-label","aria-modal","id"].forEach(M=>{O.removeAttribute(M)})},{immediate:!0}),o.watch(()=>n.visible,_,{immediate:!0})}),o.onBeforeUnmount(()=>{N==null||N(),N=void 0}),e({popperContentRef:v,popperInstanceRef:g,updatePopper:D,contentStyle:E}),(L,P)=>(o.openBlock(),o.createElementBlock("div",o.mergeProps({ref_key:"contentRef",ref:v},o.unref(C),{style:o.unref(E),class:o.unref(x),tabindex:"-1",onMouseenter:F=>L.$emit("mouseenter",F),onMouseleave:F=>L.$emit("mouseleave",F)}),[o.createVNode(o.unref(X2),{trapped:o.unref(i),"trap-on-focus-in":!0,"focus-trap-el":o.unref(v),"focus-start-el":o.unref(a),onFocusAfterTrapped:o.unref(l),onFocusAfterReleased:o.unref(s),onFocusin:o.unref(u),onFocusoutPrevented:o.unref(c),onReleaseRequested:o.unref(d)},{default:o.withCtx(()=>[o.renderSlot(L.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var dC=Te(uC,[["__file","content.vue"]]);const fC=dt(P2),wl=Symbol("elTooltip"),$t=Fe({...qw,...Qd,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"])}),si=Fe({...Kd,disabled:Boolean,trigger:{type:ke([String,Array]),default:"hover"},triggerKeys:{type:ke(Array),default:()=>[it.enter,it.space]}}),{useModelToggleProps:hC,useModelToggleEmits:pC,useModelToggle:vC}=Mb("visible"),gC=Fe({...Rd,...hC,...$t,...si,...$d,showArrow:{type:Boolean,default:!0}}),mC=[...pC,"before-show","before-hide","show","hide","open","close"],yC=(t,e)=>At(t)?t.includes(e):t===e,ca=(t,e,r)=>n=>{yC(o.unref(t),e)&&r(n)},bC=o.defineComponent({name:"ElTooltipTrigger"}),wC=o.defineComponent({...bC,props:si,setup(t,{expose:e}){const r=t,n=Be("tooltip"),{controlled:a,id:i,open:s,onOpen:l,onClose:u,onToggle:c}=o.inject(wl,void 0),d=o.ref(null),f=()=>{if(o.unref(a)||r.disabled)return!0},p=o.toRef(r,"trigger"),v=Ft(f,ca(p,"hover",l)),h=Ft(f,ca(p,"hover",u)),g=Ft(f,ca(p,"click",C=>{C.button===0&&c(C)})),y=Ft(f,ca(p,"focus",l)),m=Ft(f,ca(p,"focus",u)),b=Ft(f,ca(p,"contextmenu",C=>{C.preventDefault(),c(C)})),w=Ft(f,C=>{const{code:x}=C;r.triggerKeys.includes(x)&&(C.preventDefault(),c(C))});return e({triggerRef:d}),(C,x)=>(o.openBlock(),o.createBlock(o.unref(V2),{id:o.unref(i),"virtual-ref":C.virtualRef,open:o.unref(s),"virtual-triggering":C.virtualTriggering,class:o.normalizeClass(o.unref(n).e("trigger")),onBlur:o.unref(m),onClick:o.unref(g),onContextmenu:o.unref(b),onFocus:o.unref(y),onMouseenter:o.unref(v),onMouseleave:o.unref(h),onKeydown:o.unref(w)},{default:o.withCtx(()=>[o.renderSlot(C.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var CC=Te(wC,[["__file","trigger.vue"]]);const kC=Fe({to:{type:ke([String,Object]),required:!0},disabled:Boolean});var xC=Te(o.defineComponent({__name:"teleport",props:kC,setup(t){return(e,r)=>e.disabled?o.renderSlot(e.$slots,"default",{key:0}):(o.openBlock(),o.createBlock(o.Teleport,{key:1,to:e.to},[o.renderSlot(e.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const EC=dt(xC),SC=o.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),TC=o.defineComponent({...SC,props:$t,setup(t,{expose:e}){const r=t,{selector:n}=Ed(),a=Be("tooltip"),i=o.ref(null);let s;const{controlled:l,id:u,open:c,trigger:d,onClose:f,onOpen:p,onShow:v,onHide:h,onBeforeShow:g,onBeforeHide:y}=o.inject(wl,void 0),m=o.computed(()=>r.transition||`${a.namespace.value}-fade-in-linear`),b=o.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);o.onBeforeUnmount(()=>{s==null||s()});const w=o.computed(()=>o.unref(b)?!0:o.unref(c)),C=o.computed(()=>r.disabled?!1:o.unref(c)),x=o.computed(()=>r.appendTo||n.value),E=o.computed(()=>{var O;return(O=r.style)!=null?O:{}}),k=o.ref(!0),B=()=>{h(),k.value=!0},S=()=>{if(o.unref(l))return!0},N=Ft(S,()=>{r.enterable&&o.unref(d)==="hover"&&p()}),D=Ft(S,()=>{o.unref(d)==="hover"&&f()}),_=()=>{var O,M;(M=(O=i.value)==null?void 0:O.updatePopper)==null||M.call(O),g==null||g()},L=()=>{y==null||y()},P=()=>{v(),s=Tg(o.computed(()=>{var O;return(O=i.value)==null?void 0:O.popperContentRef}),()=>{if(o.unref(l))return;o.unref(d)!=="hover"&&f()})},F=()=>{r.virtualTriggering||f()};return o.watch(()=>o.unref(c),O=>{O?k.value=!1:s==null||s()},{flush:"post"}),o.watch(()=>r.content,()=>{var O,M;(M=(O=i.value)==null?void 0:O.updatePopper)==null||M.call(O)}),e({contentRef:i}),(O,M)=>(o.openBlock(),o.createBlock(o.unref(EC),{disabled:!O.teleported,to:o.unref(x)},{default:o.withCtx(()=>[o.createVNode(o.Transition,{name:o.unref(m),onAfterLeave:B,onBeforeEnter:_,onAfterEnter:P,onBeforeLeave:L},{default:o.withCtx(()=>[o.unref(w)?o.withDirectives((o.openBlock(),o.createBlock(o.unref(dC),o.mergeProps({key:0,id:o.unref(u),ref_key:"contentRef",ref:i},O.$attrs,{"aria-label":O.ariaLabel,"aria-hidden":k.value,"boundaries-padding":O.boundariesPadding,"fallback-placements":O.fallbackPlacements,"gpu-acceleration":O.gpuAcceleration,offset:O.offset,placement:O.placement,"popper-options":O.popperOptions,strategy:O.strategy,effect:O.effect,enterable:O.enterable,pure:O.pure,"popper-class":O.popperClass,"popper-style":[O.popperStyle,o.unref(E)],"reference-el":O.referenceEl,"trigger-target-el":O.triggerTargetEl,visible:o.unref(C),"z-index":O.zIndex,onMouseenter:o.unref(N),onMouseleave:o.unref(D),onBlur:F,onClose:o.unref(f)}),{default:o.withCtx(()=>[o.renderSlot(O.$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"])),[[o.vShow,o.unref(C)]]):o.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var BC=Te(TC,[["__file","content.vue"]]);const NC=o.defineComponent({name:"ElTooltip"}),DC=o.defineComponent({...NC,props:gC,emits:mC,setup(t,{expose:e,emit:r}){const n=t;Kw();const a=bo(),i=o.ref(),s=o.ref(),l=()=>{var m;const b=o.unref(i);b&&((m=b.popperInstanceRef)==null||m.update())},u=o.ref(!1),c=o.ref(),{show:d,hide:f,hasUpdateHandler:p}=vC({indicator:u,toggleReason:c}),{onOpen:v,onClose:h}=Uw({showAfter:o.toRef(n,"showAfter"),hideAfter:o.toRef(n,"hideAfter"),autoClose:o.toRef(n,"autoClose"),open:d,close:f}),g=o.computed(()=>Qn(n.visible)&&!p.value);o.provide(wl,{controlled:g,id:a,open:o.readonly(u),trigger:o.toRef(n,"trigger"),onOpen:m=>{v(m)},onClose:m=>{h(m)},onToggle:m=>{o.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}),o.watch(()=>n.disabled,m=>{m&&u.value&&(u.value=!1)});const y=m=>{var b,w;const C=(w=(b=s.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 o.onDeactivated(()=>u.value&&f()),e({popperRef:i,contentRef:s,isFocusInsideContent:y,updatePopper:l,onOpen:v,onClose:h,hide:f}),(m,b)=>(o.openBlock(),o.createBlock(o.unref(fC),{ref_key:"popperRef",ref:i,role:m.role},{default:o.withCtx(()=>[o.createVNode(CC,{disabled:m.disabled,trigger:m.trigger,"trigger-keys":m.triggerKeys,"virtual-ref":m.virtualRef,"virtual-triggering":m.virtualTriggering},{default:o.withCtx(()=>[m.$slots.default?o.renderSlot(m.$slots,"default",{key:0}):o.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),o.createVNode(BC,{ref_key:"contentRef",ref:s,"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:o.withCtx(()=>[o.renderSlot(m.$slots,"content",{},()=>[m.rawContent?(o.openBlock(),o.createElementBlock("span",{key:0,innerHTML:m.content},null,8,["innerHTML"])):(o.openBlock(),o.createElementBlock("span",{key:1},o.toDisplayString(m.content),1))]),m.showArrow?(o.openBlock(),o.createBlock(o.unref(I2),{key:0,"arrow-offset":m.arrowOffset},null,8,["arrow-offset"])):o.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 _C=Te(DC,[["__file","tooltip.vue"]]);const li=dt(_C),Jd=Symbol("buttonGroupContextKey"),PC=(t,e)=>{fo({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},o.computed(()=>t.type==="text"));const r=o.inject(Jd,void 0),n=ul("button"),{form:a}=Dn(),i=Nn(o.computed(()=>r==null?void 0:r.size)),s=ai(),l=o.ref(),u=o.useSlots(),c=o.computed(()=>t.type||(r==null?void 0:r.type)||""),d=o.computed(()=>{var h,g,y;return(y=(g=t.autoInsertSpace)!=null?g:(h=n.value)==null?void 0:h.autoInsertSpace)!=null?y:!1}),f=o.computed(()=>t.tag==="button"?{ariaDisabled:s.value||t.loading,disabled:s.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),p=o.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)===o.Text){const m=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(m.trim())}}return!1});return{_disabled:s,_size:i,_type:c,_ref:l,_props:f,shouldAddSpace:p,handleClick:h=>{if(s.value||t.loading){h.stopPropagation();return}t.nativeType==="reset"&&(a==null||a.resetFields()),e("click",h)}}},Cl=Fe({size:sa,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:Zr},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:Zr,default:()=>Zs},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"}}),OC={click:t=>t instanceof MouseEvent};function bt(t,e){LC(t)&&(t="100%");var r=IC(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 So(t){return Math.min(1,Math.max(0,t))}function LC(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function IC(t){return typeof t=="string"&&t.indexOf("%")!==-1}function ef(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function To(t){return t<=1?"".concat(Number(t)*100,"%"):t}function _n(t){return t.length===1?"0"+t:String(t)}function MC(t,e,r){return{r:bt(t,255)*255,g:bt(e,255)*255,b:bt(r,255)*255}}function tf(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,s=0,l=(n+a)/2;if(n===a)s=0,i=0;else{var u=n-a;switch(s=l>.5?u/(2-n-a):u/(n+a),n){case t:i=(e-r)/u+(e1&&(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 FC(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 s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=kl(l,s,t+1/3),a=kl(l,s,t),i=kl(l,s,t-1/3)}return{r:n*255,g:a*255,b:i*255}}function rf(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,s=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>16,g:(t&65280)>>8,b:t&255}}var xl={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 zC(t){var e={r:0,g:0,b:0},r=1,n=null,a=null,i=null,s=!1,l=!1;return typeof t=="string"&&(t=qC(t)),typeof t=="object"&&(Ar(t.r)&&Ar(t.g)&&Ar(t.b)?(e=MC(t.r,t.g,t.b),s=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Ar(t.h)&&Ar(t.s)&&Ar(t.v)?(n=To(t.s),a=To(t.v),e=AC(t.h,n,a),s=!0,l="hsv"):Ar(t.h)&&Ar(t.s)&&Ar(t.l)&&(n=To(t.s),i=To(t.l),e=FC(t.h,n,i),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(r=t.a)),r=ef(r),{ok:s,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 HC="[-\\+]?\\d+%?",KC="[-\\+]?\\d*\\.\\d+%?",en="(?:".concat(KC,")|(?:").concat(HC,")"),El="[\\s|\\(]+(".concat(en,")[,|\\s]+(").concat(en,")[,|\\s]+(").concat(en,")\\s*\\)?"),Sl="[\\s|\\(]+(".concat(en,")[,|\\s]+(").concat(en,")[,|\\s]+(").concat(en,")[,|\\s]+(").concat(en,")\\s*\\)?"),or={CSS_UNIT:new RegExp(en),rgb:new RegExp("rgb"+El),rgba:new RegExp("rgba"+Sl),hsl:new RegExp("hsl"+El),hsla:new RegExp("hsla"+Sl),hsv:new RegExp("hsv"+El),hsva:new RegExp("hsva"+Sl),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 qC(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(xl[t])t=xl[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:af(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:af(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 Ar(t){return!!or.CSS_UNIT.exec(String(t))}var UC=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=$C(e)),this.originalInput=e;var a=zC(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,s=e.g/255,l=e.b/255;return i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),s<=.03928?n=s/12.92:n=Math.pow((s+.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=ef(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=rf(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=rf(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=tf(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=tf(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),nf(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),VC(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="#"+nf(this.r,this.g,this.b,!1),r=0,n=Object.entries(xl);r=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=So(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=So(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=So(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=So(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,s={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(s)},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,s=[],l=1/e;e--;)s.push(new t({h:n,s:a,v:i})),i=(i+l)%1;return s},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,s=1;s{let n={},a=t.color;if(a){const i=a.match(/var\((.*?)\)/);i&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));const s=new UC(a),l=t.dark?s.tint(20).toString():tn(s,20);if(t.plain)n=r.cssVarBlock({"bg-color":t.dark?tn(s,90):s.tint(90).toString(),"text-color":a,"border-color":t.dark?tn(s,50):s.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(s,90):s.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=t.dark?tn(s,50):s.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=t.dark?tn(s,80):s.tint(80).toString());else{const u=t.dark?tn(s,30):s.tint(30).toString(),c=s.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(s,50):s.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 WC=o.defineComponent({name:"ElButton"}),jC=o.defineComponent({...WC,props:Cl,emits:OC,setup(t,{expose:e,emit:r}){const n=t,a=GC(n),i=Be("button"),{_ref:s,_size:l,_type:u,_disabled:c,_props:d,shouldAddSpace:f,handleClick:p}=PC(n,r),v=o.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:s,size:l,type:u,disabled:c,shouldAddSpace:f}),(h,g)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(h.tag),o.mergeProps({ref_key:"_ref",ref:s},o.unref(d),{class:o.unref(v),style:o.unref(a),onClick:o.unref(p)}),{default:o.withCtx(()=>[h.loading?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[h.$slots.loading?o.renderSlot(h.$slots,"loading",{key:0}):(o.openBlock(),o.createBlock(o.unref(yt),{key:1,class:o.normalizeClass(o.unref(i).is("loading"))},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(h.loadingIcon)))]),_:1},8,["class"]))],64)):h.icon||h.$slots.icon?(o.openBlock(),o.createBlock(o.unref(yt),{key:1},{default:o.withCtx(()=>[h.icon?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(h.icon),{key:0})):o.renderSlot(h.$slots,"icon",{key:1})]),_:3})):o.createCommentVNode("v-if",!0),h.$slots.default?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass({[o.unref(i).em("text","expand")]:o.unref(f)})},[o.renderSlot(h.$slots,"default")],2)):o.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var YC=Te(jC,[["__file","button.vue"]]);const ZC={size:Cl.size,type:Cl.type},XC=o.defineComponent({name:"ElButtonGroup"}),QC=o.defineComponent({...XC,props:ZC,setup(t){const e=t;o.provide(Jd,o.reactive({size:o.toRef(e,"size"),type:o.toRef(e,"type")}));const r=Be("button");return(n,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(r).b("group"))},[o.renderSlot(n.$slots,"default")],2))}});var of=Te(QC,[["__file","button-group.vue"]]);const sr=dt(YC,{ButtonGroup:of}),JC=Mr(of),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 sf(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,s=n.target,l=a==null?void 0:a.target,u=!e||!e.instance,c=!s||!l,d=t.contains(s)||t.contains(l),f=t===s,p=r.length&&r.some(h=>h==null?void 0:h.contains(s))||r.length&&r.includes(l),v=i&&(i.contains(s)||i.contains(l));u||c||d||f||p||v||e.value(n,a)}}const lf={beforeMount(t,e){rn.has(t)||rn.set(t,[]),rn.get(t).push({documentHandler:sf(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:sf(t,e),bindingFn:e.value};n>=0?r.splice(n,1,a):r.push(a)},unmounted(t){rn.delete(t)}},ek=Fe({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"}}),tk=o.defineComponent({name:"ElCard"}),rk=o.defineComponent({...tk,props:ek,setup(t){const e=Be("card");return(r,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(e).b(),o.unref(e).is(`${r.shadow}-shadow`)])},[r.$slots.header||r.header?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(e).e("header"))},[o.renderSlot(r.$slots,"header",{},()=>[o.createTextVNode(o.toDisplayString(r.header),1)])],2)):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{class:o.normalizeClass([o.unref(e).e("body"),r.bodyClass]),style:o.normalizeStyle(r.bodyStyle)},[o.renderSlot(r.$slots,"default")],6),r.$slots.footer||r.footer?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(e).e("footer"))},[o.renderSlot(r.$slots,"footer",{},()=>[o.createTextVNode(o.toDisplayString(r.footer),1)])],2)):o.createCommentVNode("v-if",!0)],2))}});var nk=Te(rk,[["__file","card.vue"]]);const ak=dt(nk),cf={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"])},uf={[mt]:t=>St(t)||gt(t)||Qn(t),change:t=>St(t)||gt(t)||Qn(t)},ua=Symbol("checkboxGroupContextKey"),ik=({model:t,isChecked:e})=>{const r=o.inject(ua,void 0),n=o.computed(()=>{var i,s;const l=(i=r==null?void 0:r.max)==null?void 0:i.value,u=(s=r==null?void 0:r.min)==null?void 0:s.value;return!Yr(l)&&t.value.length>=l&&!e.value||!Yr(u)&&t.value.length<=u&&e.value});return{isDisabled:ai(o.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},ok=(t,{model:e,isLimitExceeded:r,hasOwnLabel:n,isDisabled:a,isLabeledByFormItem:i})=>{const s=o.inject(ua,void 0),{formItem:l}=Dn(),{emit:u}=o.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 o.nextTick(),d(e.value,h)))}const v=o.computed(()=>(s==null?void 0:s.validateEvent)||t.validateEvent);return o.watch(()=>t.modelValue,()=>{v.value&&(l==null||l.validate("change").catch(h=>tt(h)))}),{handleChange:f,onClickRoot:p}},sk=t=>{const e=o.ref(!1),{emit:r}=o.getCurrentInstance(),n=o.inject(ua,void 0),a=o.computed(()=>Yr(n)===!1),i=o.ref(!1),s=o.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>s.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:s,isGroup:a,isLimitExceeded:i}},lk=(t,e,{model:r})=>{const n=o.inject(ua,void 0),a=o.ref(!1),i=o.computed(()=>so(t.value)?t.label:t.value),s=o.computed(()=>{const d=r.value;return Qn(d)?d:At(d)?vt(i.value)?d.map(o.toRaw).some(f=>oo(f,i.value)):d.map(o.toRaw).includes(i.value):d!=null?d===t.trueValue||d===t.trueLabel:!!d}),l=Nn(o.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value}),{prop:!0}),u=Nn(o.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value})),c=o.computed(()=>!!e.default||!so(i.value));return{checkboxButtonSize:l,isChecked:s,isFocused:a,checkboxSize:u,hasOwnLabel:c,actualValue:i}},df=(t,e)=>{const{formItem:r}=Dn(),{model:n,isGroup:a,isLimitExceeded:i}=sk(t),{isFocused:s,isChecked:l,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,actualValue:f}=lk(t,e,{model:n}),{isDisabled:p}=ik({model:n,isChecked:l}),{inputId:v,isLabeledByFormItem:h}=ii(t,{formItemContext:r,disableIdGeneration:d,disableIdManagement:a}),{handleChange:g,onClickRoot:y}=ok(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()})(),fo({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},o.computed(()=>a.value&&so(t.value))),fo({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},o.computed(()=>!!t.trueLabel)),fo({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},o.computed(()=>!!t.falseLabel)),{inputId:v,isLabeledByFormItem:h,isChecked:l,isDisabled:p,isFocused:s,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,model:n,actualValue:f,handleChange:g,onClickRoot:y}},ck=o.defineComponent({name:"ElCheckbox"}),uk=o.defineComponent({...ck,props:cf,emits:uf,setup(t){const e=t,r=o.useSlots(),{inputId:n,isLabeledByFormItem:a,isChecked:i,isDisabled:s,isFocused:l,checkboxSize:u,hasOwnLabel:c,model:d,actualValue:f,handleChange:p,onClickRoot:v}=df(e,r),h=Be("checkbox"),g=o.computed(()=>[h.b(),h.m(u.value),h.is("disabled",s.value),h.is("bordered",e.border),h.is("checked",i.value)]),y=o.computed(()=>[h.e("input"),h.is("disabled",s.value),h.is("checked",i.value),h.is("indeterminate",e.indeterminate),h.is("focus",l.value)]);return(m,b)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(!o.unref(c)&&o.unref(a)?"span":"label"),{class:o.normalizeClass(o.unref(g)),"aria-controls":m.indeterminate?m.ariaControls:null,onClick:o.unref(v)},{default:o.withCtx(()=>{var w,C,x,E;return[o.createElementVNode("span",{class:o.normalizeClass(o.unref(y))},[m.trueValue||m.falseValue||m.trueLabel||m.falseLabel?o.withDirectives((o.openBlock(),o.createElementBlock("input",{key:0,id:o.unref(n),"onUpdate:modelValue":k=>o.isRef(d)?d.value=k:null,class:o.normalizeClass(o.unref(h).e("original")),type:"checkbox",indeterminate:m.indeterminate,name:m.name,tabindex:m.tabindex,disabled:o.unref(s),"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:o.unref(p),onFocus:k=>l.value=!0,onBlur:k=>l.value=!1,onClick:o.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[o.vModelCheckbox,o.unref(d)]]):o.withDirectives((o.openBlock(),o.createElementBlock("input",{key:1,id:o.unref(n),"onUpdate:modelValue":k=>o.isRef(d)?d.value=k:null,class:o.normalizeClass(o.unref(h).e("original")),type:"checkbox",indeterminate:m.indeterminate,disabled:o.unref(s),value:o.unref(f),name:m.name,tabindex:m.tabindex,onChange:o.unref(p),onFocus:k=>l.value=!0,onBlur:k=>l.value=!1,onClick:o.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[o.vModelCheckbox,o.unref(d)]]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(h).e("inner"))},null,2)],2),o.unref(c)?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(h).e("label"))},[o.renderSlot(m.$slots,"default"),m.$slots.default?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(o.toDisplayString(m.label),1)],64))],2)):o.createCommentVNode("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var dk=Te(uk,[["__file","checkbox.vue"]]);const fk=o.defineComponent({name:"ElCheckboxButton"}),hk=o.defineComponent({...fk,props:cf,emits:uf,setup(t){const e=t,r=o.useSlots(),{isFocused:n,isChecked:a,isDisabled:i,checkboxButtonSize:s,model:l,actualValue:u,handleChange:c}=df(e,r),d=o.inject(ua,void 0),f=Be("checkbox"),p=o.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=o.computed(()=>[f.b("button"),f.bm("button",s.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 o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(o.unref(v))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?o.withDirectives((o.openBlock(),o.createElementBlock("input",{key:0,"onUpdate:modelValue":C=>o.isRef(l)?l.value=C:null,class:o.normalizeClass(o.unref(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:o.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:o.unref(c),onFocus:C=>n.value=!0,onBlur:C=>n.value=!1,onClick:o.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[o.vModelCheckbox,o.unref(l)]]):o.withDirectives((o.openBlock(),o.createElementBlock("input",{key:1,"onUpdate:modelValue":C=>o.isRef(l)?l.value=C:null,class:o.normalizeClass(o.unref(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:o.unref(i),value:o.unref(u),onChange:o.unref(c),onFocus:C=>n.value=!0,onBlur:C=>n.value=!1,onClick:o.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[o.vModelCheckbox,o.unref(l)]]),h.$slots.default||h.label?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(o.unref(f).be("button","inner")),style:o.normalizeStyle(o.unref(a)?o.unref(p):void 0)},[o.renderSlot(h.$slots,"default",{},()=>[o.createTextVNode(o.toDisplayString(h.label),1)])],6)):o.createCommentVNode("v-if",!0)],2)}}});var ff=Te(hk,[["__file","checkbox-button.vue"]]);const pk=Fe({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"])}),vk={[mt]:t=>At(t),change:t=>At(t)},gk=o.defineComponent({name:"ElCheckboxGroup"}),mk=o.defineComponent({...gk,props:pk,emits:vk,setup(t,{emit:e}){const r=t,n=Be("checkbox"),{formItem:a}=Dn(),{inputId:i,isLabeledByFormItem:s}=ii(r,{formItemContext:a}),l=async c=>{e(mt,c),await o.nextTick(),e("change",c)},u=o.computed({get(){return r.modelValue},set(c){l(c)}});return o.provide(ua,{...Ku(o.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:u,changeEvent:l}),o.watch(()=>r.modelValue,()=>{r.validateEvent&&(a==null||a.validate("change").catch(c=>tt(c)))}),(c,d)=>{var f;return o.openBlock(),o.createBlock(o.resolveDynamicComponent(c.tag),{id:o.unref(i),class:o.normalizeClass(o.unref(n).b("group")),role:"group","aria-label":o.unref(s)?void 0:c.ariaLabel||"checkbox-group","aria-labelledby":o.unref(s)?(f=o.unref(a))==null?void 0:f.labelId:void 0},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var hf=Te(mk,[["__file","checkbox-group.vue"]]);const yk=dt(dk,{CheckboxButton:ff,CheckboxGroup:hf});Mr(ff),Mr(hf);const Tl=Fe({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Zu},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),bk={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},wk=o.defineComponent({name:"ElTag"}),Ck=o.defineComponent({...wk,props:Tl,emits:bk,setup(t,{emit:e}){const r=t,n=Nn(),a=Be("tag"),i=o.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)]}),s=c=>{e("close",c)},l=c=>{e("click",c)},u=c=>{c.component.subTree.component.bum=null};return(c,d)=>c.disableTransitions?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(i)),style:o.normalizeStyle({backgroundColor:c.color}),onClick:l},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(a).e("content"))},[o.renderSlot(c.$slots,"default")],2),c.closable?(o.openBlock(),o.createBlock(o.unref(yt),{key:0,class:o.normalizeClass(o.unref(a).e("close")),onClick:o.withModifiers(s,["stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(co))]),_:1},8,["class","onClick"])):o.createCommentVNode("v-if",!0)],6)):(o.openBlock(),o.createBlock(o.Transition,{key:1,name:`${o.unref(a).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:o.withCtx(()=>[o.createElementVNode("span",{class:o.normalizeClass(o.unref(i)),style:o.normalizeStyle({backgroundColor:c.color}),onClick:l},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(a).e("content"))},[o.renderSlot(c.$slots,"default")],2),c.closable?(o.openBlock(),o.createBlock(o.unref(yt),{key:0,class:o.normalizeClass(o.unref(a).e("close")),onClick:o.withModifiers(s,["stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(co))]),_:1},8,["class","onClick"])):o.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var kk=Te(Ck,[["__file","tag.vue"]]);const xk=dt(kk),pf=Symbol("rowContextKey"),Ek=Fe({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"]}}),Sk=o.defineComponent({name:"ElRow"}),Tk=o.defineComponent({...Sk,props:Ek,setup(t){const e=t,r=Be("row"),n=o.computed(()=>e.gutter);o.provide(pf,{gutter:n});const a=o.computed(()=>{const s={};return e.gutter&&(s.marginRight=s.marginLeft=`-${e.gutter/2}px`),s}),i=o.computed(()=>[r.b(),r.is(`justify-${e.justify}`,e.justify!=="start"),r.is(`align-${e.align}`,!!e.align)]);return(s,l)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(s.tag),{class:o.normalizeClass(o.unref(i)),style:o.normalizeStyle(o.unref(a))},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var Bk=Te(Tk,[["__file","row.vue"]]);const Bo=dt(Bk),Nk=Fe({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({})}}),Dk=o.defineComponent({name:"ElCol"}),_k=o.defineComponent({...Dk,props:Nk,setup(t){const e=t,{gutter:r}=o.inject(pf,{gutter:o.computed(()=>0)}),n=Be("col"),a=o.computed(()=>{const s={};return r.value&&(s.paddingLeft=s.paddingRight=`${r.value/2}px`),s}),i=o.computed(()=>{const s=[];return["span","offset","pull","push"].forEach(c=>{const d=e[c];gt(d)&&(c==="span"?s.push(n.b(`${e[c]}`)):d>0&&s.push(n.b(`${c}-${e[c]}`)))}),["xs","sm","md","lg","xl"].forEach(c=>{gt(e[c])?s.push(n.b(`${c}-${e[c]}`)):vt(e[c])&&Object.entries(e[c]).forEach(([d,f])=>{s.push(d!=="span"?n.b(`${c}-${d}-${f}`):n.b(`${c}-${f}`))})}),r.value&&s.push(n.is("guttered")),[n.b(),s]});return(s,l)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(s.tag),{class:o.normalizeClass(o.unref(i)),style:o.normalizeStyle(o.unref(a))},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var Pk=Te(_k,[["__file","col.vue"]]);const ci=dt(Pk),Ok=o.defineComponent({name:"ElCollapseTransition"}),Lk=o.defineComponent({...Ok,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)=>(o.openBlock(),o.createBlock(o.Transition,o.mergeProps({name:o.unref(e).b()},o.toHandlers(n)),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["name"]))}});var Ik=Te(Lk,[["__file","collapse-transition.vue"]]);const Mk=dt(Ik),Fk=Fe({color:{type:ke(Object),required:!0},vertical:{type:Boolean,default:!1}});let Bl=!1;function ui(t,e){if(!et)return;const r=function(i){var s;(s=e.drag)==null||s.call(e,i)},n=function(i){var s;document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,Bl=!1,(s=e.end)==null||s.call(e,i)},a=function(i){var s;Bl||(i.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),Bl=!0,(s=e.start)==null||s.call(e,i))};t.addEventListener("mousedown",a),t.addEventListener("touchstart",a,{passive:!1})}const Ak=t=>{const e=o.getCurrentInstance(),{t:r}=Ya(),n=o.shallowRef(),a=o.shallowRef(),i=o.computed(()=>t.color.get("alpha")),s=o.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}=_s(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:s,handleDrag:u,handleClick:l,handleKeydown:c}},Vk=(t,{bar:e,thumb:r,handleDrag:n})=>{const a=o.getCurrentInstance(),i=Be("color-alpha-slider"),s=o.ref(0),l=o.ref(0),u=o.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(){s.value=c(),l.value=d(),u.value=f()}o.onMounted(()=>{if(!e.value||!r.value)return;const b={drag:w=>{n(w)},end:w=>{n(w)}};ui(e.value,b),ui(r.value,b),p()}),o.watch(()=>t.color.get("alpha"),()=>p()),o.watch(()=>t.color.value,()=>p());const v=o.computed(()=>[i.b(),i.is("vertical",t.vertical)]),h=o.computed(()=>i.e("bar")),g=o.computed(()=>i.e("thumb")),y=o.computed(()=>({background:u.value})),m=o.computed(()=>({left:Jn(s.value),top:Jn(l.value)}));return{rootKls:v,barKls:h,barStyle:y,thumbKls:g,thumbStyle:m,update:p}},Rk=o.defineComponent({name:"ElColorAlphaSlider"}),$k=o.defineComponent({...Rk,props:Fk,setup(t,{expose:e}){const r=t,{alpha:n,alphaLabel:a,bar:i,thumb:s,handleDrag:l,handleClick:u,handleKeydown:c}=Ak(r),{rootKls:d,barKls:f,barStyle:p,thumbKls:v,thumbStyle:h,update:g}=Vk(r,{bar:i,thumb:s,handleDrag:l});return e({update:g,bar:i,thumb:s}),(y,m)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(d))},[o.createElementVNode("div",{ref_key:"bar",ref:i,class:o.normalizeClass(o.unref(f)),style:o.normalizeStyle(o.unref(p)),onClick:o.unref(u)},null,14,["onClick"]),o.createElementVNode("div",{ref_key:"thumb",ref:s,class:o.normalizeClass(o.unref(v)),style:o.normalizeStyle(o.unref(h)),"aria-label":o.unref(a),"aria-valuenow":o.unref(n),"aria-orientation":y.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:o.unref(c)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var zk=Te($k,[["__file","alpha-slider.vue"]]);const Hk=o.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=Be("color-hue-slider"),r=o.getCurrentInstance(),n=o.ref(),a=o.ref(),i=o.ref(0),s=o.ref(0),l=o.computed(()=>t.color.get("hue"));o.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}=_s(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(),s.value=f()}return o.onMounted(()=>{if(!a.value||!n.value)return;const v={drag:h=>{c(h)},end:h=>{c(h)}};ui(a.value,v),ui(n.value,v),p()}),{bar:a,thumb:n,thumbLeft:i,thumbTop:s,hueValue:l,handleClick:u,update:p,ns:e}}});function Kk(t,e,r,n,a,i){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([t.ns.b(),t.ns.is("vertical",t.vertical)])},[o.createElementVNode("div",{ref:"bar",class:o.normalizeClass(t.ns.e("bar")),onClick:t.handleClick},null,10,["onClick"]),o.createElementVNode("div",{ref:"thumb",class:o.normalizeClass(t.ns.e("thumb")),style:o.normalizeStyle({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var qk=Te(Hk,[["render",Kk],["__file","hue-slider.vue"]]);const Uk=Fe({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"])}),Gk={[mt]:t=>St(t)||jr(t),[Xs]:t=>St(t)||jr(t),activeChange:t=>St(t)||jr(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},vf=Symbol("colorPickerContextKey"),gf=function(t,e,r){return[t,e*r/((t=(2-e)*r)<1?t:2-t)||0,t/2]},Wk=function(t){return typeof t=="string"&&t.includes(".")&&Number.parseFloat(t)===1},jk=function(t){return typeof t=="string"&&t.includes("%")},da=function(t,e){Wk(t)&&(t="100%");const r=jk(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)},mf={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},No=t=>{t=Math.min(Math.round(t),255);const e=Math.floor(t/16),r=t%16;return`${mf[e]||e}${mf[r]||r}`},yf=function({r:t,g:e,b:r}){return Number.isNaN(+t)||Number.isNaN(+e)||Number.isNaN(+r)?"":`#${No(t)}${No(e)}${No(r)}`},Nl={A:10,B:11,C:12,D:13,E:14,F:15},Pn=function(t){return t.length===2?(Nl[t[0].toUpperCase()]||+t[0])*16+(Nl[t[1].toUpperCase()]||+t[1]):Nl[t[1].toUpperCase()]||+t[1]},Yk=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,s=r===0?2*n/(a+n):2*e/(r+e);return{h:t,s:s*100,v:i*100}},bf=(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 s=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{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:s}=Yk(n[0],n[1],n[2]);r(a,i,s)}}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:s}=bf(n[0],n[1],n[2]);r(a,i,s)}}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,s;n.length===3?(a=Pn(n[0]+n[0]),i=Pn(n[1]+n[1]),s=Pn(n[2]+n[2])):(n.length===6||n.length===8)&&(a=Pn(n.slice(0,2)),i=Pn(n.slice(2,4)),s=Pn(n.slice(4,6))),n.length===8?this._alpha=Pn(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:l,s:u,v:c}=bf(a,i,s);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 s=gf(e,r/100,n/100);this.value=`hsla(${e}, ${Math.round(s[1]*100)}%, ${Math.round(s[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=`${yf(di(e,r,n))}${No(a*255/100)}`;break}default:{const{r:s,g:l,b:u}=di(e,r,n);this.value=`rgba(${s}, ${l}, ${u}, ${this.get("alpha")/100})`}}else switch(i){case"hsl":{const s=gf(e,r/100,n/100);this.value=`hsl(${e}, ${Math.round(s[1]*100)}%, ${Math.round(s[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${e}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:s,g:l,b:u}=di(e,r,n);this.value=`rgb(${s}, ${l}, ${u})`;break}default:this.value=yf(di(e,r,n))}}}const Zk=o.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}=o.inject(vf),n=o.ref(i(t.colors,t.color));o.watch(()=>r.value,s=>{const l=new fi;l.fromString(s),n.value.forEach(u=>{u.selected=l.compare(u)})}),o.watchEffect(()=>{n.value=i(t.colors,t.color)});function a(s){t.color.fromString(t.colors[s])}function i(s,l){return s.map(u=>{const c=new fi;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 Xk(t,e,r,n,a,i){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.ns.b())},[o.createElementVNode("div",{class:o.normalizeClass(t.ns.e("colors"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.rgbaColors,(s,l)=>(o.openBlock(),o.createElementBlock("div",{key:t.colors[l],class:o.normalizeClass([t.ns.e("color-selector"),t.ns.is("alpha",s._alpha<100),{selected:s.selected}]),onClick:u=>t.handleSelect(l)},[o.createElementVNode("div",{style:o.normalizeStyle({backgroundColor:s.value})},null,4)],10,["onClick"]))),128))],2)],2)}var Qk=Te(Zk,[["render",Xk],["__file","predefine.vue"]]);const Jk=o.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=Be("color-svpanel"),r=o.getCurrentInstance(),n=o.ref(0),a=o.ref(0),i=o.ref("hsl(0, 100%, 50%)"),s=o.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}=_s(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 o.watch(()=>s.value,()=>{l()}),o.onMounted(()=>{ui(r.vnode.el,{drag:c=>{u(c)},end:c=>{u(c)}}),l()}),{cursorTop:n,cursorLeft:a,background:i,colorValue:s,handleDrag:u,update:l,ns:e}}});function ex(t,e,r,n,a,i){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(t.ns.b()),style:o.normalizeStyle({backgroundColor:t.background})},[o.createElementVNode("div",{class:o.normalizeClass(t.ns.e("white"))},null,2),o.createElementVNode("div",{class:o.normalizeClass(t.ns.e("black"))},null,2),o.createElementVNode("div",{class:o.normalizeClass(t.ns.e("cursor")),style:o.normalizeStyle({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},[o.createElementVNode("div")],6)],6)}var tx=Te(Jk,[["render",ex],["__file","sv-panel.vue"]]);const rx=o.defineComponent({name:"ElColorPicker"}),nx=o.defineComponent({...rx,props:Uk,emits:Gk,setup(t,{expose:e,emit:r}){const n=t,{t:a}=Ya(),i=Be("color"),{formItem:s}=Dn(),l=Nn(),u=ai(),{inputId:c,isLabeledByFormItem:d}=ii(n,{formItemContext:s}),f=o.ref(),p=o.ref(),v=o.ref(),h=o.ref(),g=o.ref(),y=o.ref(),{isFocused:m,handleFocus:b,handleBlur:w}=cl(g,{beforeFocus(){return u.value},beforeBlur(A){var K;return(K=h.value)==null?void 0:K.isFocusInsideContent(A)},afterBlur(){F(!1),V()}});let C=!0;const x=o.reactive(new fi({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),E=o.ref(!1),k=o.ref(!1),B=o.ref(""),S=o.computed(()=>!n.modelValue&&!k.value?"transparent":P(x,n.showAlpha)),N=o.computed(()=>!n.modelValue&&!k.value?"":x.value),D=o.computed(()=>d.value?void 0:n.ariaLabel||a("el.colorpicker.defaultLabel")),_=o.computed(()=>d.value?s==null?void 0:s.labelId:void 0),L=o.computed(()=>[i.b("picker"),i.is("disabled",u.value),i.bm("picker",l.value),i.is("focused",m.value)]);function P(A,K){if(!(A instanceof fi))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 F(A){E.value=A}const O=Hu(F,100,{leading:!0});function M(){u.value||F(!0)}function I(){O(!1),V()}function V(){o.nextTick(()=>{n.modelValue?x.fromString(n.modelValue):(x.value="",o.nextTick(()=>{k.value=!1}))})}function H(){u.value||O(!E.value)}function $(){x.fromString(B.value)}function z(){const A=x.value;r(mt,A),r("change",A),n.validateEvent&&(s==null||s.validate("change").catch(K=>tt(K))),O(!1),o.nextTick(()=>{const K=new fi({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});x.compare(K)||V()})}function j(){O(!1),r(mt,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(s==null||s.validate("change").catch(A=>tt(A))),V()}function ee(){E.value&&(I(),m.value&&re())}function J(A){A.preventDefault(),A.stopPropagation(),F(!1),V()}function X(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 o.onMounted(()=>{n.modelValue&&(B.value=N.value)}),o.watch(()=>n.modelValue,A=>{A?A&&A!==x.value&&(C=!1,x.fromString(A)):k.value=!1}),o.watch(()=>[n.colorFormat,n.showAlpha],()=>{x.enableAlpha=n.showAlpha,x.format=n.colorFormat||x.format,x.doOnChange(),r(mt,x.value)}),o.watch(()=>N.value,A=>{B.value=A,C&&r("activeChange",A),C=!0}),o.watch(()=>x.value,()=>{!n.modelValue&&!k.value&&(k.value=!0)}),o.watch(()=>E.value,()=>{o.nextTick(()=>{var A,K,W;(A=f.value)==null||A.update(),(K=p.value)==null||K.update(),(W=v.value)==null||W.update()})}),o.provide(vf,{currentColor:N}),e({color:x,show:M,hide:I,focus:re,blur:Y}),(A,K)=>(o.openBlock(),o.createBlock(o.unref(li),{ref_key:"popper",ref:h,visible:E.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[o.unref(i).be("picker","panel"),o.unref(i).b("dropdown"),A.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:A.teleported,transition:`${o.unref(i).namespace.value}-zoom-in-top`,persistent:"",onHide:W=>F(!1)},{content:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createElementBlock("div",{onKeydown:o.withKeys(J,["esc"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(i).be("dropdown","main-wrapper"))},[o.createVNode(qk,{ref_key:"hue",ref:f,class:"hue-slider",color:o.unref(x),vertical:""},null,8,["color"]),o.createVNode(tx,{ref_key:"sv",ref:p,color:o.unref(x)},null,8,["color"])],2),A.showAlpha?(o.openBlock(),o.createBlock(zk,{key:0,ref_key:"alpha",ref:v,color:o.unref(x)},null,8,["color"])):o.createCommentVNode("v-if",!0),A.predefine?(o.openBlock(),o.createBlock(Qk,{key:1,ref:"predefine","enable-alpha":A.showAlpha,color:o.unref(x),colors:A.predefine},null,8,["enable-alpha","color","colors"])):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(i).be("dropdown","btns"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(i).be("dropdown","value"))},[o.createVNode(o.unref(oi),{ref_key:"inputRef",ref:y,modelValue:B.value,"onUpdate:modelValue":W=>B.value=W,"validate-event":!1,size:"small",onKeyup:o.withKeys($,["enter"]),onBlur:$},null,8,["modelValue","onUpdate:modelValue","onKeyup"])],2),o.createVNode(o.unref(sr),{class:o.normalizeClass(o.unref(i).be("dropdown","link-btn")),text:"",size:"small",onClick:j},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("el.colorpicker.clear")),1)]),_:1},8,["class"]),o.createVNode(o.unref(sr),{plain:"",size:"small",class:o.normalizeClass(o.unref(i).be("dropdown","btn")),onClick:z},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,["onKeydown"])),[[o.unref(lf),ee]])]),default:o.withCtx(()=>[o.createElementVNode("div",o.mergeProps({id:o.unref(c),ref_key:"triggerRef",ref:g},A.$attrs,{class:o.unref(L),role:"button","aria-label":o.unref(D),"aria-labelledby":o.unref(_),"aria-description":o.unref(a)("el.colorpicker.description",{color:A.modelValue||""}),"aria-disabled":o.unref(u),tabindex:o.unref(u)?-1:A.tabindex,onKeydown:X,onFocus:o.unref(b),onBlur:o.unref(w)}),[o.unref(u)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(i).be("picker","mask"))},null,2)):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(i).be("picker","trigger")),onClick:H},[o.createElementVNode("span",{class:o.normalizeClass([o.unref(i).be("picker","color"),o.unref(i).is("alpha",A.showAlpha)])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(i).be("picker","color-inner")),style:o.normalizeStyle({backgroundColor:o.unref(S)})},[o.withDirectives(o.createVNode(o.unref(yt),{class:o.normalizeClass([o.unref(i).be("picker","icon"),o.unref(i).is("icon-arrow-down")])},{default:o.withCtx(()=>[o.createVNode(o.unref(lo))]),_:1},8,["class"]),[[o.vShow,A.modelValue||k.value]]),o.withDirectives(o.createVNode(o.unref(yt),{class:o.normalizeClass([o.unref(i).be("picker","empty"),o.unref(i).is("icon-close")])},{default:o.withCtx(()=>[o.createVNode(o.unref(co))]),_:1},8,["class"]),[[o.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 ax=Te(nx,[["__file","color-picker.vue"]]);const ix=dt(ax),ox=o.defineComponent({name:"ElContainer"}),sx=o.defineComponent({...ox,props:{direction:{type:String}},setup(t){const e=t,r=o.useSlots(),n=Be("container"),a=o.computed(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:r&&r.default?r.default().some(s=>{const l=s.type.name;return l==="ElHeader"||l==="ElFooter"}):!1);return(i,s)=>(o.openBlock(),o.createElementBlock("section",{class:o.normalizeClass([o.unref(n).b(),o.unref(n).is("vertical",o.unref(a))])},[o.renderSlot(i.$slots,"default")],2))}});var lx=Te(sx,[["__file","container.vue"]]);const cx=o.defineComponent({name:"ElAside"}),ux=o.defineComponent({...cx,props:{width:{type:String,default:null}},setup(t){const e=t,r=Be("aside"),n=o.computed(()=>e.width?r.cssVarBlock({width:e.width}):{});return(a,i)=>(o.openBlock(),o.createElementBlock("aside",{class:o.normalizeClass(o.unref(r).b()),style:o.normalizeStyle(o.unref(n))},[o.renderSlot(a.$slots,"default")],6))}});var wf=Te(ux,[["__file","aside.vue"]]);const dx=o.defineComponent({name:"ElFooter"}),fx=o.defineComponent({...dx,props:{height:{type:String,default:null}},setup(t){const e=t,r=Be("footer"),n=o.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(a,i)=>(o.openBlock(),o.createElementBlock("footer",{class:o.normalizeClass(o.unref(r).b()),style:o.normalizeStyle(o.unref(n))},[o.renderSlot(a.$slots,"default")],6))}});var Cf=Te(fx,[["__file","footer.vue"]]);const hx=o.defineComponent({name:"ElHeader"}),px=o.defineComponent({...hx,props:{height:{type:String,default:null}},setup(t){const e=t,r=Be("header"),n=o.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(a,i)=>(o.openBlock(),o.createElementBlock("header",{class:o.normalizeClass(o.unref(r).b()),style:o.normalizeStyle(o.unref(n))},[o.renderSlot(a.$slots,"default")],6))}});var kf=Te(px,[["__file","header.vue"]]);const vx=o.defineComponent({name:"ElMain"}),gx=o.defineComponent({...vx,setup(t){const e=Be("main");return(r,n)=>(o.openBlock(),o.createElementBlock("main",{class:o.normalizeClass(o.unref(e).b())},[o.renderSlot(r.$slots,"default")],2))}});var xf=Te(gx,[["__file","main.vue"]]);const Ef=dt(lx,{Aside:wf,Footer:Cf,Header:kf,Main:xf});Mr(wf),Mr(Cf);const Sf=Mr(kf),Dl=Mr(xf),mx=o.defineComponent({inheritAttrs:!1});function yx(t,e,r,n,a,i){return o.renderSlot(t.$slots,"default")}var bx=Te(mx,[["render",yx],["__file","collection.vue"]]);const wx=o.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function Cx(t,e,r,n,a,i){return o.renderSlot(t.$slots,"default")}var kx=Te(wx,[["render",Cx],["__file","collection-item.vue"]]);const xx="data-el-collection-item",Ex=t=>{const e=`El${t}Collection`,r=`${e}Item`,n=Symbol(e),a=Symbol(r),i={...bx,name:e,setup(){const l=o.ref(null),u=new Map,c=()=>{const d=o.unref(l);if(!d)return[];const f=Array.from(d.querySelectorAll(`[${xx}]`));return[...u.values()].sort((v,h)=>f.indexOf(v.ref)-f.indexOf(h.ref))};o.provide(n,{itemMap:u,getItems:c,collectionRef:l})}},s={...kx,name:r,setup(l,{attrs:u}){const c=o.ref(null),d=o.inject(n,void 0);o.provide(a,{collectionItemRef:c}),o.onMounted(()=>{const f=o.unref(c);f&&d.itemMap.set(f,{ref:f,...u})}),o.onBeforeUnmount(()=>{const f=o.unref(c);d.itemMap.delete(f)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:a,ElCollection:i,ElCollectionItem:s}},_l=Fe({trigger:si.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});Fe({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Zr}}),Fe({onKeydown:{type:ke(Function)}}),Ex("Dropdown");const Tf=Symbol("ElSelectGroup"),hi=Symbol("ElSelect");function Sx(t,e){const r=o.inject(hi),n=o.inject(Tf,{disabled:!1}),a=o.computed(()=>d(Gr(r.props.modelValue),t.value)),i=o.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}),s=o.computed(()=>t.label||(vt(t.value)?"":t.value)),l=o.computed(()=>t.value||t.label||""),u=o.computed(()=>t.disabled||e.groupDisabled||i.value),c=o.getCurrentInstance(),d=(v=[],h)=>{if(vt(t.value)){const g=r.props.valueKey;return v&&v.some(y=>o.toRaw(Lr(y,g))===Lr(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(A1(v),"i");e.visible=h.test(s.value)||t.created};return o.watch(()=>s.value,()=>{!t.created&&!r.props.remote&&r.setSelected()}),o.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()}}),o.watch(()=>n.disabled,()=>{e.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:s,currentValue:l,itemSelected:a,isDisabled:u,hoverItem:f,updateOption:p}}const Tx=o.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=bo(),n=o.computed(()=>[e.be("dropdown","item"),e.is("disabled",o.unref(l)),e.is("selected",o.unref(s)),e.is("hovering",o.unref(p))]),a=o.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:i,itemSelected:s,isDisabled:l,select:u,hoverItem:c,updateOption:d}=Sx(t,a),{visible:f,hover:p}=o.toRefs(a),v=o.getCurrentInstance().proxy;u.onOptionCreate(v),o.onBeforeUnmount(()=>{const g=v.value,{selected:y}=u.states,b=(u.props.multiple?y:[y]).some(w=>w.value===v.value);o.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:s,isDisabled:l,select:u,hoverItem:c,updateOption:d,visible:f,hover:p,selectOptionClick:h,states:a}}});function Bx(t,e,r,n,a,i){return o.withDirectives((o.openBlock(),o.createElementBlock("li",{id:t.id,class:o.normalizeClass(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMouseenter:t.hoverItem,onClick:o.withModifiers(t.selectOptionClick,["stop"])},[o.renderSlot(t.$slots,"default",{},()=>[o.createElementVNode("span",null,o.toDisplayString(t.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[o.vShow,t.visible]])}var Pl=Te(Tx,[["render",Bx],["__file","option.vue"]]);const Nx=o.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=o.inject(hi),e=Be("select"),r=o.computed(()=>t.props.popperClass),n=o.computed(()=>t.props.multiple),a=o.computed(()=>t.props.fitInputWidth),i=o.ref("");function s(){var l;i.value=`${(l=t.selectRef)==null?void 0:l.offsetWidth}px`}return o.onMounted(()=>{s(),_r(t.selectRef,s)}),{ns:e,minWidth:i,popperClass:r,isMultiple:n,isFitInputWidth:a}}});function Dx(t,e,r,n,a,i){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:o.normalizeStyle({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(t.ns.be("dropdown","header"))},[o.renderSlot(t.$slots,"header")],2)):o.createCommentVNode("v-if",!0),o.renderSlot(t.$slots,"default"),t.$slots.footer?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(t.ns.be("dropdown","footer"))},[o.renderSlot(t.$slots,"footer")],2)):o.createCommentVNode("v-if",!0)],6)}var _x=Te(Nx,[["render",Dx],["__file","select-dropdown.vue"]]);const Px=11,Ox=(t,e)=>{const{t:r}=Ya(),n=bo(),a=Be("select"),i=Be("input"),s=o.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=o.ref(null),u=o.ref(null),c=o.ref(null),d=o.ref(null),f=o.ref(null),p=o.ref(null),v=o.ref(null),h=o.ref(null),g=o.ref(null),y=o.ref(null),m=o.ref(null),b=o.ref(null),{isComposing:w,handleCompositionStart:C,handleCompositionUpdate:x,handleCompositionEnd:E}=Ld({afterComposition:q=>Q(q)}),{wrapperRef:k,isFocused:B}=cl(f,{beforeFocus(){return O.value},afterFocus(){t.automaticDropdown&&!S.value&&(S.value=!0,s.menuVisibleOnFocus=!0)},beforeBlur(q){var ce,Pe;return((ce=c.value)==null?void 0:ce.isFocusInsideContent(q))||((Pe=d.value)==null?void 0:Pe.isFocusInsideContent(q))},afterBlur(){S.value=!1,s.menuVisibleOnFocus=!1}}),S=o.ref(!1),N=o.ref(),{form:D,formItem:_}=Dn(),{inputId:L}=ii(t,{formItemContext:_}),{valueOnClear:P,isEmptyValue:F}=e2(t),O=o.computed(()=>t.disabled||(D==null?void 0:D.disabled)),M=o.computed(()=>At(t.modelValue)?t.modelValue.length>0:!F(t.modelValue)),I=o.computed(()=>t.clearable&&!O.value&&s.inputHovering&&M.value),V=o.computed(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),H=o.computed(()=>a.is("reverse",V.value&&S.value)),$=o.computed(()=>(_==null?void 0:_.validateState)||""),z=o.computed(()=>Yu[$.value]),j=o.computed(()=>t.remote?300:0),ee=o.computed(()=>t.loading?t.loadingText||r("el.select.loading"):t.remote&&!s.inputValue&&s.options.size===0?!1:t.filterable&&s.inputValue&&s.options.size>0&&J.value===0?t.noMatchText||r("el.select.noMatch"):s.options.size===0?t.noDataText||r("el.select.noData"):null),J=o.computed(()=>X.value.filter(q=>q.visible).length),X=o.computed(()=>{const q=Array.from(s.options.values()),ce=[];return s.optionValues.forEach(Pe=>{const He=q.findIndex(Nr=>Nr.value===Pe);He>-1&&ce.push(q[He])}),ce.length>=q.length?ce:q}),re=o.computed(()=>Array.from(s.cachedOptions.values())),Y=o.computed(()=>{const q=X.value.filter(ce=>!ce.created).some(ce=>ce.currentLabel===s.inputValue);return t.filterable&&t.allowCreate&&s.inputValue!==""&&!q}),A=()=>{t.filterable&&It(t.filterMethod)||t.filterable&&t.remote&&It(t.remoteMethod)||X.value.forEach(q=>{var ce;(ce=q.updateOption)==null||ce.call(q,s.inputValue)})},K=Nn(),W=o.computed(()=>["small"].includes(K.value)?"small":"default"),oe=o.computed({get(){return S.value&&ee.value!==!1},set(q){S.value=q}}),he=o.computed(()=>{if(t.multiple&&!Yr(t.modelValue))return Gr(t.modelValue).length===0&&!s.inputValue;const q=At(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||Yr(q)?!s.inputValue:!0}),ne=o.computed(()=>{var q;const ce=(q=t.placeholder)!=null?q:r("el.select.placeholder");return t.multiple||!M.value?ce:s.selectedLabel}),se=o.computed(()=>Ds?null:"mouseenter");o.watch(()=>t.modelValue,(q,ce)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(s.inputValue="",ue("")),de(),!oo(q,ce)&&t.validateEvent&&(_==null||_.validate("change").catch(Pe=>tt(Pe)))},{flush:"post",deep:!0}),o.watch(()=>S.value,q=>{q?ue(s.inputValue):(s.inputValue="",s.previousQuery=null,s.isBeforeHide=!0),e("visible-change",q)}),o.watch(()=>s.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"}),o.watch(()=>s.hoveringIndex,q=>{gt(q)&&q>-1?N.value=X.value[q]||{}:N.value={},X.value.forEach(ce=>{ce.hover=N.value===ce})}),o.watchEffect(()=>{s.isBeforeHide||A()});const ue=q=>{s.previousQuery===q||w.value||(s.previousQuery=q,t.filterable&&It(t.filterMethod)?t.filterMethod(q):t.filterable&&t.remote&&It(t.remoteMethod)&&t.remoteMethod(q),t.defaultFirstOption&&(t.filterable||t.remote)&&J.value?o.nextTick(pe):o.nextTick(Ne))},pe=()=>{const q=X.value.filter(He=>He.visible&&!He.disabled&&!He.states.groupDisabled),ce=q.find(He=>He.created),Pe=q[0];s.hoveringIndex=ge(X.value,ce||Pe)},de=()=>{if(t.multiple)s.selectedLabel="";else{const ce=At(t.modelValue)?t.modelValue[0]:t.modelValue,Pe=me(ce);s.selectedLabel=Pe.currentLabel,s.selected=[Pe];return}const q=[];Yr(t.modelValue)||Gr(t.modelValue).forEach(ce=>{q.push(me(ce))}),s.selected=q},me=q=>{let ce;const Pe=Ps(q).toLowerCase()==="object",He=Ps(q).toLowerCase()==="null",Nr=Ps(q).toLowerCase()==="undefined";for(let qr=s.cachedOptions.size-1;qr>=0;qr--){const rr=re.value[qr];if(Pe?Lr(rr.value,t.valueKey)===Lr(q,t.valueKey):rr.value===q){ce={value:q,currentLabel:rr.currentLabel,get isDisabled(){return rr.isDisabled}};break}}if(ce)return ce;const yn=Pe?q.label:!He&&!Nr?q:"";return{value:q,currentLabel:yn}},Ne=()=>{s.hoveringIndex=X.value.findIndex(q=>s.selected.some(ce=>Ot(ce)===Ot(q)))},De=()=>{s.selectionWidth=u.value.getBoundingClientRect().width},Ee=()=>{s.calculatorWidth=p.value.getBoundingClientRect().width},_e=()=>{s.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=()=>{s.inputValue.length>0&&!S.value&&(S.value=!0),ue(s.inputValue)},Q=q=>{if(s.inputValue=q.target.value,t.remote)G();else return R()},G=Hu(()=>{R()},j.value),U=q=>{oo(t.modelValue,q)||e(Xs,q)},ie=q=>P1(q,ce=>!s.disabledOptions.has(ce)),Z=q=>{if(t.multiple&&q.code!==it.delete&&q.target.value.length<=0){const ce=Gr(t.modelValue).slice(),Pe=ie(ce);if(Pe<0)return;const He=ce[Pe];ce.splice(Pe,1),e(mt,ce),U(ce),e("remove-tag",He)}},ae=(q,ce)=>{const Pe=s.selected.indexOf(ce);if(Pe>-1&&!O.value){const He=Gr(t.modelValue).slice();He.splice(Pe,1),e(mt,He),U(He),e("remove-tag",ce.value)}q.stopPropagation(),rt()},we=q=>{q.stopPropagation();const ce=t.multiple?[]:P.value;if(t.multiple)for(const Pe of s.selected)Pe.isDisabled&&ce.push(Pe.value);e(mt,ce),U(ce),s.hoveringIndex=-1,S.value=!1,e("clear"),rt()},Ce=q=>{var ce;if(t.multiple){const Pe=Gr((ce=t.modelValue)!=null?ce:[]).slice(),He=ge(Pe,q.value);He>-1?Pe.splice(He,1):(t.multipleLimit<=0||Pe.length{Se(q)})},ge=(q=[],ce)=>{if(!vt(ce))return q.indexOf(ce);const Pe=t.valueKey;let He=-1;return q.some((Nr,yn)=>o.toRaw(Lr(Nr,Pe))===Lr(ce,Pe)?(He=yn,!0):!1),He},Se=q=>{var ce,Pe,He,Nr,yn;const za=At(q)?q[0]:q;let qr=null;if(za!=null&&za.value){const rr=X.value.filter(bn=>bn.value===za.value);rr.length>0&&(qr=rr[0].$el)}if(c.value&&qr){const rr=(Nr=(He=(Pe=(ce=c.value)==null?void 0:ce.popperRef)==null?void 0:Pe.contentRef)==null?void 0:He.querySelector)==null?void 0:Nr.call(He,`.${a.be("dropdown","wrap")}`);rr&&$1(rr,qr)}(yn=b.value)==null||yn.handleScroll()},ve=q=>{s.options.set(q.value,q),s.cachedOptions.set(q.value,q),q.disabled&&s.disabledOptions.set(q.value,q)},ye=(q,ce)=>{s.options.get(q)===ce&&s.options.delete(q)},Ge=o.computed(()=>{var q,ce;return(ce=(q=c.value)==null?void 0:q.popperRef)==null?void 0:ce.contentRef}),Re=()=>{s.isBeforeHide=!1,o.nextTick(()=>Se(s.selected))},rt=()=>{var q;(q=f.value)==null||q.focus()},nt=()=>{var q;(q=f.value)==null||q.blur()},Qe=q=>{we(q)},Pt=()=>{S.value=!1,B.value&&nt()},ut=()=>{s.inputValue.length>0?s.inputValue="":S.value=!1},ht=()=>{O.value||(Ds&&(s.inputHovering=!0),s.menuVisibleOnFocus?s.menuVisibleOnFocus=!1:S.value=!S.value)},Wt=()=>{S.value?X.value[s.hoveringIndex]&&Ce(X.value[s.hoveringIndex]):ht()},Ot=q=>vt(q.value)?Lr(q.value,t.valueKey):q.value,Lt=o.computed(()=>X.value.filter(q=>q.visible).every(q=>q.disabled)),tr=o.computed(()=>t.multiple?t.collapseTags?s.selected.slice(0,t.maxCollapseTags):s.selected:[]),hr=o.computed(()=>t.multiple?t.collapseTags?s.selected.slice(t.maxCollapseTags):[]:[]),Kt=q=>{if(!S.value){S.value=!0;return}if(!(s.options.size===0||s.filteredOptionsCount===0||w.value)&&!Lt.value){q==="next"?(s.hoveringIndex++,s.hoveringIndex===s.options.size&&(s.hoveringIndex=0)):q==="prev"&&(s.hoveringIndex--,s.hoveringIndex<0&&(s.hoveringIndex=s.options.size-1));const ce=X.value[s.hoveringIndex];(ce.disabled===!0||ce.states.groupDisabled===!0||!ce.visible)&&Kt(q),o.nextTick(()=>Se(N.value))}},Je=()=>{if(!u.value)return 0;const q=window.getComputedStyle(u.value);return Number.parseFloat(q.gap||"6px")},at=o.computed(()=>{const q=Je();return{maxWidth:`${m.value&&t.maxCollapseTags===1?s.selectionWidth-s.collapseItemWidth-q:s.selectionWidth}px`}}),pt=o.computed(()=>({maxWidth:`${s.selectionWidth}px`})),mn=o.computed(()=>({width:`${Math.max(s.calculatorWidth,Px)}px`}));return _r(u,De),_r(p,Ee),_r(g,te),_r(k,te),_r(y,T),_r(m,_e),o.onMounted(()=>{de()}),{inputId:L,contentId:n,nsSelect:a,nsInput:i,states:s,isFocused:B,expanded:S,optionsArray:X,hoverOption:N,selectSize:K,filteredOptionsCount:J,resetCalculatorWidth:Ee,updateTooltip:te,updateTagTooltip:T,debouncedOnInputChange:G,onInput:Q,deletePrevTag:Z,deleteTag:ae,deleteSelected:we,handleOptionSelect:Ce,scrollToOption:Se,hasModelValue:M,shouldShowPlaceholder:he,currentPlaceholder:ne,mouseEnterEventName:se,showClose:I,iconComponent:V,iconReverse:H,validateState:$,validateIcon:z,showNewOption:Y,updateOptions:A,collapseTagSize:W,setSelected:de,selectDisabled:O,emptyText:ee,handleCompositionStart:C,handleCompositionUpdate:x,handleCompositionEnd:E,onOptionCreate:ve,onOptionDestroy:ye,handleMenuEnter:Re,focus:rt,blur:nt,handleClearClick:Qe,handleClickOutside:Pt,handleEsc:ut,toggleMenu:ht,selectOption:Wt,getValueKey:Ot,navigateOptions:Kt,dropdownMenuVisible:oe,showTagList:tr,collapseTagList:hr,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 Lx=o.defineComponent({name:"ElOptions",setup(t,{slots:e}){const r=o.inject(hi);let n=[];return()=>{var a,i;const s=(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)&&It((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 s.length&&u((i=s[0])==null?void 0:i.children),oo(l,n)||(n=l,r&&(r.states.optionValues=l)),s}}});const Ix=Fe({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:Zr,default:Ys},fitInputWidth:Boolean,suffixIcon:{type:Zr,default:lo},tagType:{...Tl.type,default:"info"},tagEffect:{...Tl.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:ke(String),values:po,default:"bottom-start"},fallbackPlacements:{type:ke(Array),default:["bottom-start","top-start","right","left"]},appendTo:String,...Jw,...Qr(["ariaLabel"])}),Bf="ElSelect",Mx=o.defineComponent({name:Bf,componentName:Bf,components:{ElSelectMenu:_x,ElOption:Pl,ElOptions:Lx,ElTag:xk,ElScrollbar:N2,ElTooltip:li,ElIcon:yt},directives:{ClickOutside:lf},props:Ix,emits:[mt,Xs,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const r=o.computed(()=>{const{modelValue:i,multiple:s}=t,l=s?[]:void 0;return At(i)?s?i:l:s?l:i}),n=o.reactive({...o.toRefs(t),modelValue:r}),a=Ox(n,e);return o.provide(hi,o.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 Fx(t,e,r,n,a,i){const s=o.resolveComponent("el-tag"),l=o.resolveComponent("el-tooltip"),u=o.resolveComponent("el-icon"),c=o.resolveComponent("el-option"),d=o.resolveComponent("el-options"),f=o.resolveComponent("el-scrollbar"),p=o.resolveComponent("el-select-menu"),v=o.resolveDirective("click-outside");return o.withDirectives((o.openBlock(),o.createElementBlock("div",{ref:"selectRef",class:o.normalizeClass([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),[o.toHandlerKey(t.mouseEnterEventName)]:h=>t.states.inputHovering=!0,onMouseleave:h=>t.states.inputHovering=!1},[o.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:o.withCtx(()=>{var h;return[o.createElementVNode("div",{ref:"wrapperRef",class:o.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:o.withModifiers(t.toggleMenu,["prevent"])},[t.$slots.prefix?(o.openBlock(),o.createElementBlock("div",{key:0,ref:"prefixRef",class:o.normalizeClass(t.nsSelect.e("prefix"))},[o.renderSlot(t.$slots,"prefix")],2)):o.createCommentVNode("v-if",!0),o.createElementVNode("div",{ref:"selectionRef",class:o.normalizeClass([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?o.renderSlot(t.$slots,"tag",{key:0},()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.showTagList,g=>(o.openBlock(),o.createElementBlock("div",{key:t.getValueKey(g),class:o.normalizeClass(t.nsSelect.e("selected-item"))},[o.createVNode(s,{closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:o.normalizeStyle(t.tagStyle),onClose:y=>t.deleteTag(y,g)},{default:o.withCtx(()=>[o.createElementVNode("span",{class:o.normalizeClass(t.nsSelect.e("tags-text"))},[o.renderSlot(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[o.createTextVNode(o.toDisplayString(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(o.openBlock(),o.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:o.withCtx(()=>[o.createElementVNode("div",{ref:"collapseItemRef",class:o.normalizeClass(t.nsSelect.e("selected-item"))},[o.createVNode(s,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:o.normalizeStyle(t.collapseTagStyle)},{default:o.withCtx(()=>[o.createElementVNode("span",{class:o.normalizeClass(t.nsSelect.e("tags-text"))}," + "+o.toDisplayString(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:o.withCtx(()=>[o.createElementVNode("div",{ref:"tagMenuRef",class:o.normalizeClass(t.nsSelect.e("selection"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.collapseTagList,g=>(o.openBlock(),o.createElementBlock("div",{key:t.getValueKey(g),class:o.normalizeClass(t.nsSelect.e("selected-item"))},[o.createVNode(s,{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:o.withCtx(()=>[o.createElementVNode("span",{class:o.normalizeClass(t.nsSelect.e("tags-text"))},[o.renderSlot(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[o.createTextVNode(o.toDisplayString(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):o.createCommentVNode("v-if",!0)]):o.createCommentVNode("v-if",!0),t.selectDisabled?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[o.withDirectives(o.createElementVNode("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":g=>t.states.inputValue=g,type:"text",name:t.name,class:o.normalizeClass([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:o.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:[o.withKeys(o.withModifiers(g=>t.navigateOptions("next"),["stop","prevent"]),["down"]),o.withKeys(o.withModifiers(g=>t.navigateOptions("prev"),["stop","prevent"]),["up"]),o.withKeys(o.withModifiers(t.handleEsc,["stop","prevent"]),["esc"]),o.withKeys(o.withModifiers(t.selectOption,["stop","prevent"]),["enter"]),o.withKeys(o.withModifiers(t.deletePrevTag,["stop"]),["delete"])],onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onInput:t.onInput,onClick:o.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"]),[[o.vModelText,t.states.inputValue]]),t.filterable?(o.openBlock(),o.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:o.normalizeClass(t.nsSelect.e("input-calculator")),textContent:o.toDisplayString(t.states.inputValue)},null,10,["textContent"])):o.createCommentVNode("v-if",!0)],2)),t.shouldShowPlaceholder?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?o.renderSlot(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[o.createElementVNode("span",null,o.toDisplayString(t.currentPlaceholder),1)]):(o.openBlock(),o.createElementBlock("span",{key:1},o.toDisplayString(t.currentPlaceholder),1))],2)):o.createCommentVNode("v-if",!0)],2),o.createElementVNode("div",{ref:"suffixRef",class:o.normalizeClass(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(o.openBlock(),o.createBlock(u,{key:0,class:o.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0),t.showClose&&t.clearIcon?(o.openBlock(),o.createBlock(u,{key:1,class:o.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onClick"])):o.createCommentVNode("v-if",!0),t.validateState&&t.validateIcon?(o.openBlock(),o.createBlock(u,{key:2,class:o.normalizeClass([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t.validateIcon)))]),_:1},8,["class"])):o.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:o.withCtx(()=>[o.createVNode(p,{ref:"menuRef"},{default:o.withCtx(()=>[t.$slots.header?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(t.nsSelect.be("dropdown","header")),onClick:o.withModifiers(()=>{},["stop"])},[o.renderSlot(t.$slots,"header")],10,["onClick"])):o.createCommentVNode("v-if",!0),o.withDirectives(o.createVNode(f,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:o.normalizeClass([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:o.withCtx(()=>[t.showNewOption?(o.openBlock(),o.createBlock(c,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):o.createCommentVNode("v-if",!0),o.createVNode(d,null,{default:o.withCtx(()=>[o.renderSlot(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[o.vShow,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(t.nsSelect.be("dropdown","loading"))},[o.renderSlot(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(t.nsSelect.be("dropdown","empty"))},[o.renderSlot(t.$slots,"empty",{},()=>[o.createElementVNode("span",null,o.toDisplayString(t.emptyText),1)])],2)):o.createCommentVNode("v-if",!0),t.$slots.footer?(o.openBlock(),o.createElementBlock("div",{key:3,class:o.normalizeClass(t.nsSelect.be("dropdown","footer")),onClick:o.withModifiers(()=>{},["stop"])},[o.renderSlot(t.$slots,"footer")],10,["onClick"])):o.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 Ax=Te(Mx,[["render",Fx],["__file","select.vue"]]);const Vx=o.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Be("select"),r=o.ref(null),n=o.getCurrentInstance(),a=o.ref([]);o.provide(Tf,o.reactive({...o.toRefs(t)}));const i=o.computed(()=>a.value.some(c=>c.visible===!0)),s=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;s(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 o.onMounted(()=>{u()}),Lg(r,u,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:i,ns:e}}});function Rx(t,e,r,n,a,i){return o.withDirectives((o.openBlock(),o.createElementBlock("ul",{ref:"groupRef",class:o.normalizeClass(t.ns.be("group","wrap"))},[o.createElementVNode("li",{class:o.normalizeClass(t.ns.be("group","title"))},o.toDisplayString(t.label),3),o.createElementVNode("li",null,[o.createElementVNode("ul",{class:o.normalizeClass(t.ns.b("group"))},[o.renderSlot(t.$slots,"default")],2)])],2)),[[o.vShow,t.visible]])}var Nf=Te(Vx,[["render",Rx],["__file","option-group.vue"]]);const $x=dt(Ax,{Option:Pl,OptionGroup:Nf}),zx=Mr(Pl);Mr(Nf);const Hx=Fe({trigger:si.trigger,placement:_l.placement,disabled:si.disabled,visible:$t.visible,transition:$t.transition,popperOptions:_l.popperOptions,tabindex:_l.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}}),Kx={"update:visible":t=>Qn(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},qx="onUpdate:visible",Ux=o.defineComponent({name:"ElPopover"}),Gx=o.defineComponent({...Ux,props:Hx,emits:Kx,setup(t,{expose:e,emit:r}){const n=t,a=o.computed(()=>n[qx]),i=Be("popover"),s=o.ref(),l=o.computed(()=>{var y;return(y=o.unref(s))==null?void 0:y.popperRef}),u=o.computed(()=>[{width:Jn(n.width)},n.popperStyle]),c=o.computed(()=>[i.b(),n.popperClass,{[i.m("plain")]:!!n.content}]),d=o.computed(()=>n.transition===`${i.namespace.value}-fade-in-linear`),f=()=>{var y;(y=s.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)=>(o.openBlock(),o.createBlock(o.unref(li),o.mergeProps({ref_key:"tooltipRef",ref:s},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":o.unref(c),"popper-style":o.unref(u),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":o.unref(d),"onUpdate:visible":o.unref(a),onBeforeShow:p,onBeforeHide:v,onShow:h,onHide:g}),{content:o.withCtx(()=>[y.title?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(i).e("title")),role:"title"},o.toDisplayString(y.title),3)):o.createCommentVNode("v-if",!0),o.renderSlot(y.$slots,"default",{},()=>[o.createTextVNode(o.toDisplayString(y.content),1)])]),default:o.withCtx(()=>[y.$slots.reference?o.renderSlot(y.$slots,"reference",{key:0}):o.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 Wx=Te(Gx,[["__file","popover.vue"]]);const Df=(t,e)=>{const r=e.arg||e.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=t)};var jx={mounted(t,e){Df(t,e)},updated(t,e){Df(t,e)}};const Yx=xb(jx,"popover"),Ol=dt(Wx,{directive:Yx}),fa="$treeNodeId",_f=function(t,e){!e||e[fa]||Object.defineProperty(e,fa,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},Ll=function(t,e){return t?e[t]:e[fa]},Il=(t,e,r)=>{const n=t.value.currentNode;r();const a=t.value.currentNode;n!==a&&e("current-change",a?a.data:null,a)},Ml=t=>{let e=!0,r=!0,n=!0;for(let a=0,i=t.length;a"u"){const i=n[e];return i===void 0?"":i}};let Zx=0;class On{constructor(e){this.id=Zx++,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=Do(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)||_f(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)||_f(this,e),this.data=e,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=Do(this,"children")||[];for(let n=0,a=r.length;n-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 On)){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=o.reactive(new On(e)),e instanceof On&&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{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||pi(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:s,allWithoutDisable:l}=Ml(this.childNodes);!this.isLeaf&&!s&&l&&(this.checked=!1,e=!1);const u=()=>{if(r){const c=this.childNodes;for(let p=0,v=c.length;p{u(),pi(this)},{checked:e!==!1});return}else u()}const i=this.parent;!i||i.level===0||n||pi(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,s)=>{const l=i[fa];!!l&&r.findIndex(c=>c[fa]===l)>=0?n[l]={index:s,data:i}:a.push({index:s,data:i})}),this.store.lazy||r.forEach(i=>{n[i[fa]]||this.removeChildByData(i)}),a.forEach(({index:i,data:s})=>{this.insertChild({data:s},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||pi(this)}}class Xx{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 On({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 s=i.root?i.root.childNodes:i.childNodes;if(s.forEach(l=>{l.visible=r.call(l,e,l.data,l),a(l)}),!i.visible&&s.length){let l=!0;l=!s.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 On)return e;const r=vt(e)?Ll(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=so(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 s=a[i];this.remove(s.data)}for(let i=0,s=r.length;iu.level-c.level),i=Object.create(null),s=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{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 Qx=o.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=Be("tree"),r=o.inject("NodeInstance"),n=o.inject("RootTree");return()=>{const a=t.node,{data:i,store:s}=a;return t.renderContent?t.renderContent(o.h,{_self:r,node:a,data:i,store:s}):o.renderSlot(n.ctx.slots,"default",{node:a,data:i},()=>[o.h("span",{class:e.be("node","label")},[a.label])])}}});var Jx=Te(Qx,[["__file","tree-node-content.vue"]]);function Pf(t){const e=o.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{t.node!==n&&t.node.collapse()},children:[]};return e&&e.children.push(r),o.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(t.accordion)for(const a of r.children)a.treeNodeExpand(n)}}}const Of=Symbol("dragEvents");function eE({props:t,ctx:e,el$:r,dropIndicator$:n,store:a}){const i=Be("tree"),s=o.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{}s.value.draggingNode=f,e.emit("node-drag-start",f.node,d)},u=({event:d,treeNode:f})=>{const p=f,v=s.value.dropNode;v&&v.node.id!==p.node.id&&Sn(v.$el,i.is("drop-inner"));const h=s.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?s.value.dropNode=p:s.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;Sw.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"?js(p.$el,i.is("drop-inner")):Sn(p.$el,i.is("drop-inner")),s.value.showDropIndicator=x==="before"||x==="after",s.value.allowDrop=s.value.showDropIndicator||b,s.value.dropType=x,e.emit("node-drag-over",h.node,p.node,d)},c=d=>{const{draggingNode:f,dropType:p,dropNode:v}=s.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),s.value.showDropIndicator=!1,s.value.draggingNode=null,s.value.dropNode=null,s.value.allowDrop=!0};return o.provide(Of,{treeNodeDragStart:l,treeNodeDragOver:u,treeNodeDragEnd:c}),{dragState:s}}const tE=o.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:Mk,ElCheckbox:yk,NodeContent:Jx,ElIcon:yt,Loading:Zs},props:{node:{type:On,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}=Pf(t),a=o.inject("RootTree"),i=o.ref(!1),s=o.ref(!1),l=o.ref(null),u=o.ref(null),c=o.ref(null),d=o.inject(Of),f=o.getCurrentInstance();o.provide("NodeInstance",f),a||tt("Tree","Can not find node's tree."),t.node.expanded&&(i.value=!0,s.value=!0);const p=a.props.props.children||"children";o.watch(()=>{const S=t.node.data[p];return S&&[...S]},()=>{t.node.updateChildren()}),o.watch(()=>t.node.indeterminate,S=>{g(t.node.checked,S)}),o.watch(()=>t.node.checked,S=>{g(S,t.node.indeterminate)}),o.watch(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),o.watch(()=>t.node.expanded,S=>{o.nextTick(()=>i.value=S),S&&(s.value=!0)});const v=S=>Ll(a.props.nodeKey,S.data),h=S=>{const N=t.props.class;if(!N)return{};let D;if(It(N)){const{data:_}=S;D=N(_,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=>{Il(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),o.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:s,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:G1}}});function rE(t,e,r,n,a,i){const s=o.resolveComponent("el-icon"),l=o.resolveComponent("el-checkbox"),u=o.resolveComponent("loading"),c=o.resolveComponent("node-content"),d=o.resolveComponent("el-tree-node"),f=o.resolveComponent("el-collapse-transition");return o.withDirectives((o.openBlock(),o.createElementBlock("div",{ref:"node$",class:o.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:o.withModifiers(t.handleClick,["stop"]),onContextmenu:t.handleContextMenu,onDragstart:o.withModifiers(t.handleDragStart,["stop"]),onDragover:o.withModifiers(t.handleDragOver,["stop"]),onDragend:o.withModifiers(t.handleDragEnd,["stop"]),onDrop:o.withModifiers(t.handleDrop,["stop"])},[o.createElementVNode("div",{class:o.normalizeClass(t.ns.be("node","content")),style:o.normalizeStyle({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(o.openBlock(),o.createBlock(s,{key:0,class:o.normalizeClass([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:o.withModifiers(t.handleExpandIconClick,["stop"])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):o.createCommentVNode("v-if",!0),t.showCheckbox?(o.openBlock(),o.createBlock(l,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:o.withModifiers(()=>{},["stop"]),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):o.createCommentVNode("v-if",!0),t.node.loading?(o.openBlock(),o.createBlock(s,{key:2,class:o.normalizeClass([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:o.withCtx(()=>[o.createVNode(u)]),_:1},8,["class"])):o.createCommentVNode("v-if",!0),o.createVNode(c,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),o.createVNode(f,null,{default:o.withCtx(()=>[!t.renderAfterExpand||t.childNodeRendered?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.node.childNodes,p=>(o.openBlock(),o.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"])),[[o.vShow,t.expanded]]):o.createCommentVNode("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[o.vShow,t.node.visible]])}var nE=Te(tE,[["render",rE],["__file","tree-node.vue"]]);function aE({el$:t},e){const r=Be("tree"),n=o.shallowRef([]),a=o.shallowRef([]);o.onMounted(()=>{s()}),o.onUpdated(()=>{n.value=Array.from(t.value.querySelectorAll("[role=treeitem]")),a.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"))}),o.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&&(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 s=()=>{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 iE=o.defineComponent({name:"ElTree",components:{ElTreeNode:nE},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:Zr}},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=o.inject(hi,null),i=o.ref(new Xx({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 s=o.ref(i.value.root),l=o.ref(null),u=o.ref(null),c=o.ref(null),{broadcastExpanded:d}=Pf(t),{dragState:f}=eE({props:t,ctx:e,el$:u,dropIndicator$:c,store:i});aE({el$:u},i);const p=o.computed(()=>{const{childNodes:I}=s.value,V=a?a.hasFilteredOptions!==0:!1;return(!I||I.length===0||I.every(({visible:H})=>!H))&&!V});o.watch(()=>t.currentNodeKey,I=>{i.value.setCurrentNodeKey(I)}),o.watch(()=>t.defaultCheckedKeys,I=>{i.value.setDefaultCheckedKey(I)}),o.watch(()=>t.defaultExpandedKeys,I=>{i.value.setDefaultExpandedKeys(I)}),o.watch(()=>t.data,I=>{i.value.setData(I)},{deep:!0}),o.watch(()=>t.checkStrictly,I=>{i.value.checkStrictly=I});const v=I=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(I)},h=I=>Ll(t.nodeKey,I.data),g=I=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const V=i.value.getNode(I);if(!V)return[];const H=[V.data];let $=V.parent;for(;$&&$!==s.value;)H.push($.data),$=$.parent;return H.reverse()},y=(I,V)=>i.value.getCheckedNodes(I,V),m=I=>i.value.getCheckedKeys(I),b=()=>{const I=i.value.getCurrentNode();return I?I.data:null},w=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const I=b();return I?I[t.nodeKey]:null},C=(I,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(I,V)},x=(I,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(I,V)},E=(I,V,H)=>{i.value.setChecked(I,V,H)},k=()=>i.value.getHalfCheckedNodes(),B=()=>i.value.getHalfCheckedKeys(),S=(I,V=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");Il(i,e.emit,()=>{d(I),i.value.setUserCurrentNode(I,V)})},N=(I,V=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");Il(i,e.emit,()=>{d(),i.value.setCurrentNodeKey(I,V)})},D=I=>i.value.getNode(I),_=I=>{i.value.remove(I)},L=(I,V)=>{i.value.append(I,V)},P=(I,V)=>{i.value.insertBefore(I,V)},F=(I,V)=>{i.value.insertAfter(I,V)},O=(I,V,H)=>{d(V),e.emit("node-expand",I,V,H)},M=(I,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(I,V)};return o.provide("RootTree",{ctx:e,props:t,store:i,root:s,currentNode:l,instance:o.getCurrentInstance()}),o.provide(ni,void 0),{ns:n,store:i,root:s,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:_,append:L,insertBefore:P,insertAfter:F,handleNodeExpand:O,updateKeyChildren:M}}});function oE(t,e,r,n,a,i){const s=o.resolveComponent("el-tree-node");return o.openBlock(),o.createElementBlock("div",{ref:"el$",class:o.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"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.root.childNodes,l=>(o.openBlock(),o.createBlock(s,{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?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(t.ns.e("empty-block"))},[o.renderSlot(t.$slots,"empty",{},()=>{var l;return[o.createElementVNode("span",{class:o.normalizeClass(t.ns.e("empty-text"))},o.toDisplayString((l=t.emptyText)!=null?l:t.t("el.tree.emptyText")),3)]})],2)):o.createCommentVNode("v-if",!0),o.withDirectives(o.createElementVNode("div",{ref:"dropIndicator$",class:o.normalizeClass(t.ns.e("drop-indicator"))},null,2),[[o.vShow,t.dragState.showDropIndicator]])],2)}var sE=Te(iE,[["render",oE],["__file","tree.vue"]]);const lE=dt(sE);function cE(t){let e;const r=o.ref(!1),n=o.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"))}s(),d.unmount()}function s(){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=o.defineComponent({name:"ElLoading",setup(p,{expose:v}){const{ns:h,zIndex:g}=r2("loading");return v({ns:h,zIndex:g}),()=>{const y=n.spinner||n.svg,m=o.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[o.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),b=n.text?o.h("p",{class:h.b("text")},[n.text]):void 0;return o.h(o.Transition,{name:h.b("fade"),onAfterLeave:u},{default:o.withCtx(()=>[o.withDirectives(o.createVNode("div",{style:{backgroundColor:n.background||""},class:[h.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[o.h("div",{class:h.b("spinner")},[m,b])]),[[o.vShow,n.visible]])])})}}}),d=o.createApp(c),f=d.mount(document.createElement("div"));return{...o.toRefs(n),setText:a,removeElLoadingChild:s,close:l,handleAfterLeave:u,vm:f,get $el(){return f.$el}}}let _o;const uE=function(t={}){if(!et)return;const e=dE(t);if(e.fullscreen&&_o)return _o;const r=cE({...e,closed:()=>{var a;(a=e.closed)==null||a.call(e),e.fullscreen&&(_o=void 0)}});fE(e,e.parent,r),Lf(e,e.parent,r),e.parent.vLoadingAddClassList=()=>Lf(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),o.nextTick(()=>r.visible.value=e.visible),e.fullscreen&&(_o=r),r},dE=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}},fE=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 o.nextTick();for(const i of["top","left"]){const s=i==="top"?"scrollTop":"scrollLeft";a[i]=`${t.target.getBoundingClientRect()[i]+document.body[s]+document.documentElement[s]-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,s]of Object.entries(a))r.$el.style[i]=s},Lf=(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")):js(e,n.bm("parent","relative")),t.fullscreen&&t.lock?js(e,n.bm("parent","hidden")):Sn(e,n.bm("parent","hidden"))},Po=Symbol("ElLoading"),If=(t,e)=>{var r,n,a,i;const s=e.instance,l=p=>vt(e.value)?e.value[p]:void 0,u=p=>{const v=St(p)&&(s==null?void 0:s[p])||p;return v&&o.ref(v)},c=p=>u(l(p)||t.getAttribute(`element-loading-${Ug(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[Po]={options:f,instance:uE(f)}},hE=(t,e)=>{for(const r of Object.keys(e))o.isRef(e[r])&&(e[r].value=t[r])},Fl={mounted(t,e){e.value&&If(t,e)},updated(t,e){const r=t[Po];e.oldValue!==e.value&&(e.value&&!e.oldValue?If(t,e):e.value&&e.oldValue?vt(e.value)&&hE(e.value,r.options):r==null||r.instance.close())},unmounted(t){var e;(e=t[Po])==null||e.instance.close(),t[Po]=null}},lr=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r},pE={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:"",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))}else e.push(n)});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=>(o.pushScopeId("data-v-9930ef40"),t=t(),o.popScopeId(),t),vE={class:"block"},gE=Ln(()=>o.createElementVNode("div",{class:"title"},"Feature Annotations",-1)),mE=Ln(()=>o.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),yE=Ln(()=>o.createElementVNode("strong",null,"Evidence: ",-1)),bE=["href"],wE=Ln(()=>o.createElementVNode("strong",null,"Comment: ",-1)),CE=Ln(()=>o.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),kE=Ln(()=>o.createElementVNode("strong",null,"Evidence:",-1)),xE=Ln(()=>o.createElementVNode("strong",null,"Comment:",-1)),EE={class:"sub-title"};function SE(t,e,r,n,a,i){const s=Bo,l=Wu,u=yt,c=lo,d=rb,f=eb,p=ab,v=ci,h=co,g=zx,y=$x,m=oi,b=sr,w=Dl;return o.openBlock(),o.createBlock(w,{class:"main"},{default:o.withCtx(()=>[o.createElementVNode("div",vE,[o.createVNode(s,{class:"info-field"},{default:o.withCtx(()=>[gE]),_:1}),r.annotationEntry?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.displayPair,(C,x)=>o.withDirectives((o.openBlock(),o.createBlock(s,{class:"dialog-text",key:C},{default:o.withCtx(()=>[o.createElementVNode("strong",null,o.toDisplayString(x)+": ",1),o.createTextVNode(" "+o.toDisplayString(r.annotationEntry[C]),1)]),_:2},1024)),[[o.vShow,r.annotationEntry[C]]])),128)),t.prevSubs.length>0?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.withDirectives(o.createElementVNode("div",{class:"hide",onClick:e[0]||(e[0]=C=>t.showSubmissions=!1)},[o.createTextVNode(" Hide previous submissions "),o.createVNode(u,null,{default:o.withCtx(()=>[o.createVNode(l)]),_:1})],512),[[o.vShow,t.showSubmissions]]),o.withDirectives(o.createElementVNode("div",{class:"hide",onClick:e[1]||(e[1]=C=>t.showSubmissions=!0)},[o.createTextVNode(" Show previous "+o.toDisplayString(t.prevSubs.length)+" submission(s) ",1),o.createVNode(u,null,{default:o.withCtx(()=>[o.createVNode(c)]),_:1})],512),[[o.vShow,!t.showSubmissions]]),t.showSubmissions?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(s,{class:"dialog-spacer"}),o.createVNode(s,{class:"dialog-text"},{default:o.withCtx(()=>[mE]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.prevSubs,(C,x)=>(o.openBlock(),o.createElementBlock("div",{class:"entry",key:x},[o.createVNode(s,{class:"dialog-text"},{default:o.withCtx(()=>[o.createElementVNode("strong",null,o.toDisplayString(i.formatTime(C.created)),1),o.createTextVNode(" "+o.toDisplayString(C.creator.name),1)]),_:2},1024),o.createVNode(s,{class:"dialog-text"},{default:o.withCtx(()=>[yE,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(C.body.evidence,E=>(o.openBlock(),o.createBlock(s,{key:E,class:"dialog-text"},{default:o.withCtx(()=>[o.createElementVNode("a",{href:E,target:"_blank"},o.toDisplayString(E),9,bE)]),_:2},1024))),128))]),_:2},1024),o.createVNode(s,{class:"dialog-text"},{default:o.withCtx(()=>[wE,o.createTextVNode(" "+o.toDisplayString(C.body.comment),1)]),_:2},1024)]))),128))],64)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),t.authenticated?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[i.isEditable?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(s,{class:"dialog-spacer"}),t.editing?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createVNode(s,{class:"dialog-text"},{default:o.withCtx(()=>[CE]),_:1}),i.isDeleted?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(s,{class:"dialog-text"},{default:o.withCtx(()=>[kE]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.evidence,(C,x)=>(o.openBlock(),o.createBlock(s,{key:C},{default:o.withCtx(()=>[o.createVNode(v,{span:20},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.evidence[x]),1)]),_:2},1024),o.createVNode(v,{span:4},{default:o.withCtx(()=>[o.createVNode(u,{class:"standard-icon"},{default:o.withCtx(()=>[o.createVNode(h,{onClick:E=>i.removeEvidence(x)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),o.createVNode(s,null,{default:o.withCtx(()=>[o.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:o.withCtx(()=>[o.createVNode(y,{teleported:!1,modelValue:t.evidencePrefix,"onUpdate:modelValue":e[3]||(e[3]=C=>t.evidencePrefix=C),placeholder:"No Prefix",class:"select-box","popper-class":"flatmap_dropdown"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.evidencePrefixes,C=>(o.openBlock(),o.createBlock(g,{key:C,label:C,value:C},{default:o.withCtx(()=>[o.createVNode(s,null,{default:o.withCtx(()=>[o.createVNode(v,{span:12},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})],64)),o.createVNode(s,null,{default:o.withCtx(()=>[xE]),_:1}),o.createVNode(s,{class:"dialog-text"},{default:o.withCtx(()=>[o.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}),o.createVNode(s,{class:"dialog-text"},{default:o.withCtx(()=>[o.createVNode(b,{class:"button",type:"primary",plain:"",onClick:i.submit},{default:o.withCtx(()=>[o.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(o.openBlock(),o.createBlock(s,{key:0},{default:o.withCtx(()=>[o.createVNode(u,{class:"standard-icon"},{default:o.withCtx(()=>[o.createVNode(d,{onClick:e[2]||(e[2]=C=>t.editing=!0)})]),_:1}),i.isDeleted?(o.openBlock(),o.createBlock(u,{key:0,class:"standard-icon"},{default:o.withCtx(()=>[o.createVNode(f,{onClick:i.submit},null,8,["onClick"])]),_:1})):i.isPositionUpdated?(o.openBlock(),o.createBlock(u,{key:1,class:"standard-icon"},{default:o.withCtx(()=>[o.createVNode(p,{onClick:i.submit},null,8,["onClick"])]),_:1})):o.createCommentVNode("",!0)]),_:1})),t.errorMessage?(o.openBlock(),o.createBlock(s,{key:2,class:"dialog-text"},{default:o.withCtx(()=>[o.createElementVNode("strong",EE,o.toDisplayString(t.errorMessage),1)]),_:1})):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)])]),_:1})}const Mf=lr(pE,[["render",SE],["__scopeId","data-v-9930ef40"]]),TE={name:"CreateTooltipContent",components:{Button:sr,Col:ci,Container:Ef,Header:Sf,Input:oi,Main:Dl},props:{createData:{type:Object}},watch:{"createData.shape":{handler:function(t,e){this.group=t,e!==void 0&&this.$emit("cancel-create")},immediate:!0}},computed:{confirmText:function(){return this.createData.editingIndex>-1?"Edit":"Confirm"}},data:function(){return{group:"default",region:"",showPoint:!1}},methods:{confirm:function(){this.$emit("confirm-create",{region:"__annotation/"+this.region,group:this.group,shape:this.createData.shape,editingIndex:this.createData.editingIndex}),this.group=this.createData.shape},cancel:function(){this.$emit("cancel-create")}}},BE=(t=>(o.pushScopeId("data-v-d61c5879"),t=t(),o.popScopeId(),t))(()=>o.createElementVNode("span",{class:"create-text"}," Primitives will be created in the __annotation region ",-1));function NE(t,e,r,n,a,i){const s=Sf,l=ci,u=Bo,c=oi,d=sr,f=Dl,p=Ef;return o.openBlock(),o.createBlock(p,{class:"create-container"},{default:o.withCtx(()=>[o.createVNode(s,{height:"30px",class:"header"},{default:o.withCtx(()=>[o.createElementVNode("div",null,"Create "+o.toDisplayString(r.createData.shape),1)]),_:1}),o.createVNode(f,{class:"slides-block"},{default:o.withCtx(()=>[BE,o.withDirectives(o.createVNode(u,{class:"row"},{default:o.withCtx(()=>[o.createVNode(l,{offset:0,span:8},{default:o.withCtx(()=>[o.createTextVNode(" Position: ")]),_:1}),o.createVNode(l,{offset:0,span:16},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.createData.points,({value:v,i:h})=>(o.openBlock(),o.createBlock(u,{key:h,class:"value"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(h),1)]),_:2},1024))),128))]),_:1})]),_:1},512),[[o.vShow,t.showPoint]]),o.createVNode(u,{class:"row"},{default:o.withCtx(()=>[o.createVNode(l,{offset:0,span:8},{default:o.withCtx(()=>[o.createTextVNode(" Region: ")]),_:1}),o.createVNode(l,{offset:0,span:16},{default:o.withCtx(()=>[o.createVNode(c,{modelValue:t.region,"onUpdate:modelValue":e[0]||(e[0]=v=>t.region=v),placeholder:"__annotation",size:"small"},null,8,["modelValue"])]),_:1})]),_:1}),o.createVNode(u,{class:"row"},{default:o.withCtx(()=>[o.createVNode(l,{offset:0,span:8},{default:o.withCtx(()=>[o.createTextVNode(" Group: ")]),_:1}),o.createVNode(l,{offset:0,span:16},{default:o.withCtx(()=>[o.createVNode(c,{modelValue:t.group,"onUpdate:modelValue":e[1]||(e[1]=v=>t.group=v),placeholder:r.createData.shape,size:"small"},null,8,["modelValue","placeholder"])]),_:1})]),_:1}),o.createVNode(u,null,{default:o.withCtx(()=>[o.createVNode(l,{offset:0,span:12},{default:o.withCtx(()=>[o.createVNode(d,{type:"primary",plain:"",onClick:i.confirm},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(i.confirmText),1)]),_:1},8,["onClick"])]),_:1}),o.createVNode(l,{offset:0,span:12},{default:o.withCtx(()=>[o.createVNode(d,{type:"primary",plain:"",onClick:i.cancel},{default:o.withCtx(()=>[o.createTextVNode(" Cancel ")]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1})]),_:1})}const DE=lr(TE,[["render",NE],["__scopeId","data-v-d61c5879"]]);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 Al(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _E(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=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. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,l;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){s=!0,l=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(s)throw l}}}}var st=typeof window>"u"?null:window,$f=st?st.navigator:null;st&&st.document;var IE=ot(""),zf=ot({}),ME=ot(function(){}),FE=typeof HTMLElement>"u"?"undefined":ot(HTMLElement),vi=function(e){return e&&e.instanceString&&Ye(e.instanceString)?e.instanceString():null},be=function(e){return e!=null&&ot(e)==IE},Ye=function(e){return e!=null&&ot(e)===ME},Ke=function(e){return!Ut(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Oe=function(e){return e!=null&&ot(e)===zf&&!Ke(e)&&e.constructor===Object},AE=function(e){return e!=null&&ot(e)===zf},le=function(e){return e!=null&&ot(e)===ot(1)&&!isNaN(e)},VE=function(e){return le(e)&&Math.floor(e)===e},Oo=function(e){if(FE!=="undefined")return e!=null&&e instanceof HTMLElement},Ut=function(e){return gi(e)||Hf(e)},gi=function(e){return vi(e)==="collection"&&e._private.single},Hf=function(e){return vi(e)==="collection"&&!e._private.single},Rl=function(e){return vi(e)==="core"},Kf=function(e){return vi(e)==="stylesheet"},RE=function(e){return vi(e)==="event"},nn=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},$E=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},zE=function(e){return Oe(e)&&le(e.x1)&&le(e.x2)&&le(e.y1)&&le(e.y2)},HE=function(e){return AE(e)&&Ye(e.then)},KE=function(){return $f&&$f.userAgent.match(/msie|trident|edge/i)},mi=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;sr?1:0},ZE=function(e,r){return-1*Gf(e,r)},xe=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(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("^"+GE+"$").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,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>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,s]}return r},JE=function(e){var r,n=new RegExp("^"+qE+"$").exec(e);if(n){r=[];for(var a=[],i=1;i<=3;i++){var s=n[i];if(s[s.length-1]==="%"&&(a[i]=!0),s=parseFloat(s),a[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}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},eS=function(e){return rS[e.toLowerCase()]},tS=function(e){return(Ke(e)?e:null)||eS(e)||XE(e)||JE(e)||QE(e)},rS={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]},Wf=function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i=e||k<0||f&&B>=i}function m(){var E=zl();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,s)}function w(){l!==void 0&&clearTimeout(l),c=0,n=u=a=l=void 0}function C(){return l===void 0?s:b(zl())}function x(){var E=zl(),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)),s}return x.cancel=w,x.flush=C,x}var Mo=$S,Hl=st?st.performance:null,eh=Hl&&Hl.now?function(){return Hl.now()}:function(){return Date.now()},zS=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(eh())},1e3/60)}}(),Fo=function(e){return zS(e)},Vr=eh,pa=9261,th=65599,Ci=5381,rh=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pa,n=r,a;a=e.next(),!a.done;)n=n*th+a.value|0;return n},ki=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pa;return r*th+e|0},xi=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci;return(r<<5)+r+e|0},HS=function(e,r){return e*2097152+r},an=function(e){return e[0]*2097152+e[1]},Ao=function(e,r){return[ki(e[0],r[0]),xi(e[1],r[1])]},KS=function(e,r){var n={value:0,done:!1},a=0,i=e.length,s={next:function(){return a=0;a--)e[a]===r&&e.splice(a,1)},Ul=function(e){e.splice(0,e.length)},ZS=function(e,r){for(var n=0;n"u"?"undefined":ot(Set))!==QS?Set:JS,Ro=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!Rl(e)){Ze("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"){Ze("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 va,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 s=r.renderedPosition,l=e.pan(),u=e.zoom();i.position={x:(s.x-l.x)/u,y:(s.y-l.y)/u}}var c=[];Ke(r.classes)?c=r.classes:be(r.classes)&&(c=r.classes.split(/\s+/));for(var d=0,f=c.length;db?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);wN;0<=N?S++:S--)B.push(S);return B}).apply(this).reverse(),k=[],C=0,x=E.length;CD;0<=D?++B:--B)_.push(s(m,w));return _},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;C0;){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;N0)for(I.unshift(M);f[H];){var $=f[H];I.unshift($.edge),I.unshift($.node),V=$.node,H=V.id()}return l.spawn(I)}}}},nT={kruskal:function(e){e=e||function(w){return 1};for(var r=this.byGroup(),n=r.nodes,a=r.edges,i=n.length,s=new Array(i),l=n,u=function(C){for(var x=0;x0;){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 _=w._private.edges,L=0;L<_.length;L++){var P=_[L];if(this.hasElementWithId(P.id())&&!(l&&P.data("source")!==C)){var F=P.source(),O=P.target(),M=F.id()!==C?F:O,I=M.id();if(this.hasElementWithId(I)&&!v[I]){var V=f[C]+u(P);if(!E(I)){f[I]=V,p[I]=V+s(M),b(M,I),y[I]=w,m[I]=P;continue}VD&&(h[N]=D,b[N]=S,w[N]=x),!i){var _=S*d+B;!i&&h[_]>D&&(h[_]=D,b[_]=B,w[_]=x)}}}for(var L=0;L1&&arguments[1]!==void 0?arguments[1]:s,Ne=w(de),De=[],Ee=Ne;;){if(Ee==null)return r.spawn();var _e=b(Ee),te=_e.edge,T=_e.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=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;ha;){var i=Math.floor(Math.random()*r.length);r=dT(i,e,r),n--}return r},fT={kargerStein:function(){var e=this,r=this.byGroup(),n=r.nodes,a=r.edges;a.unmergeBy(function(I){return I.isLoop()});var i=n.length,s=a.length,l=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),u=Math.floor(i/uT);if(i<2){Ze("At least 2 nodes are required for Karger-Stein algorithm");return}for(var c=[],d=0;d1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=-1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=0,i=0,s=r;s1&&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,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;a?e=e.slice(r,n):(n0&&e.splice(0,r));for(var l=0,u=e.length-1;u>=0;u--){var c=e[u];s?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},yT=function(e){return Math.PI*e/180},zo=function(e,r){return Math.atan2(r,e)-Math.PI/2},Wl=Math.log2||function(t){return Math.log(t)/Math.log(2)},fh=function(e){return e>0?1:e<0?-1:0},Fn=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},bT=function(e){for(var r=e.length,n=0,a=0;a=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}}},CT=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},kT=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},xT=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}},hh=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},ET=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},Ho=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},Ko=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,a,i,s;if(r.length===1)n=a=i=s=r[0];else if(r.length===2)n=i=r[0],s=a=r[1];else if(r.length===4){var l=cr(r,4);n=l[0],a=l[1],i=l[2],s=l[3]}return e.x1-=s,e.x2+=a,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ph=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},jl=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},ya=function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},ST=function(e,r){return ya(e,r.x,r.y)},vh=function(e,r){return ya(e,r.x1,r.y1)&&ya(e,r.x2,r.y2)},gh=function(e,r,n,a,i,s,l){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",c=u==="auto"?Rn(i,s):u,d=i/2,f=s/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,_=a-f+c-l,L=D,P=a+f-c+l;if(h=ln(e,r,n,a,D,_,L,P,!1),h.length>0)return h}var F;{var O=n-d+c,M=a-f+c;if(F=Bi(e,r,n,a,O,M,c+l),F.length>0&&F[0]<=O&&F[1]<=M)return[F[0],F[1]]}{var I=n+d-c,V=a-f+c;if(F=Bi(e,r,n,a,I,V,c+l),F.length>0&&F[0]>=I&&F[1]<=V)return[F[0],F[1]]}{var H=n+d-c,$=a+f-c;if(F=Bi(e,r,n,a,H,$,c+l),F.length>0&&F[0]>=H&&F[1]>=$)return[F[0],F[1]]}{var z=n-d+c,j=a+f-c;if(F=Bi(e,r,n,a,z,j,c+l),F.length>0&&F[0]<=z&&F[1]>=j)return[F[0],F[1]]}return[]},TT=function(e,r,n,a,i,s,l){var u=l,c=Math.min(n,i),d=Math.max(n,i),f=Math.min(a,s),p=Math.max(a,s);return c-u<=e&&e<=d+u&&f-u<=r&&r<=p+u},BT=function(e,r,n,a,i,s,l,u,c){var d={x1:Math.min(n,l,i)-c,x2:Math.max(n,l,i)+c,y1:Math.min(a,u,s)-c,y2:Math.max(a,u,s)+c};return!(ed.x2||rd.y2)},NT=function(e,r,n,a){n-=a;var i=r*r-4*e*n;if(i<0)return[];var s=Math.sqrt(i),l=2*e,u=(-r+s)/l,c=(-r-s)/l;return[u,c]},DT=function(e,r,n,a,i){var s=1e-5;e===0&&(e=s),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)},_T=function(e,r,n,a,i,s,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*s+2*a*u+4*s*s-4*s*u+u*u,d=1*9*n*i-3*n*n-3*n*l-6*i*i+3*i*l+9*a*s-3*a*a-3*a*u-6*s*s+3*s*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*s+a*u-a*r+2*s*s+2*s*r-u*r,p=1*n*i-n*n+n*e-i*e+a*s-a*a+a*r-s*r,v=[];DT(c,d,f,p,v);for(var h=1e-7,g=[],y=0;y<6;y+=2)Math.abs(v[y+1])=0&&v[y]<=1&&g.push(v[y]);g.push(1),g.push(0);for(var m=-1,b,w,C,x=0;x=0?Cc?(e-i)*(e-i)+(r-s)*(r-s):d-p},Ht=function(e,r,n){for(var a,i,s,l,u,c=0,d=0;d=e&&e>=s||a<=e&&e<=s)u=(e-a)/(s-a)*(l-i)+i,u>r&&c++;else continue;return c%2!==0},Rr=function(e,r,n,a,i,s,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;h0){var y=Uo(d,-c);g=qo(y)}else g=d;return Ht(e,r,g)},OT=function(e,r,n,a,i,s,l,u){for(var c=new Array(n.length*2),d=0;d=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]},Yl=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,s,l,u,c){var d=e-i,f=n-e,p=l-i,v=r-s,h=a-r,g=u-s,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?Yl(e,n,l)===l?[l,u]:Yl(e,n,i)===i?[i,s]:Yl(i,l,n)===n?[n,a]:[]:[]},Ni=function(e,r,n,a,i,s,l,u){var c=[],d,f=new Array(n.length),p=!0;s==null&&(p=!1);var v;if(p){for(var h=0;h0){var g=Uo(f,-u);v=qo(g)}else v=f}else v=n;for(var y,m,b,w,C=0;C2){for(var h=[d[0],d[1]],g=Math.pow(h[0]-e,2)+Math.pow(h[1]-r,2),y=1;yd&&(d=C)},get:function(w){return c[w]}},p=0;p0?O=F.edgesTo(P)[0]:O=P.edgesTo(F)[0];var M=a(O);P=P.id(),B[P]>B[_]+M&&(B[P]=B[_]+M,S.nodes.indexOf(P)<0?S.push(P):S.updateItem(P),k[P]=0,E[P]=[]),B[P]==B[_]+M&&(k[P]=k[P]+k[_],E[P].push(_))}else for(var I=0;I0;){for(var z=x.pop(),j=0;j0&&l.push(n[u]);l.length!==0&&i.push(a.collection(l))}return i},jT=function(e,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:XT,l=a,u,c,d=0;d=2?Di(e,r,n,0,Sh,QT):Di(e,r,n,0,Eh)},squaredEuclidean:function(e,r,n){return Di(e,r,n,0,Sh)},manhattan:function(e,r,n){return Di(e,r,n,0,Eh)},max:function(e,r,n){return Di(e,r,n,-1/0,JT)}};Ca["squared-euclidean"]=Ca.squaredEuclidean,Ca.squaredeuclidean=Ca.squaredEuclidean;function Wo(t,e,r,n,a,i){var s;return Ye(t)?s=t:s=Ca[t]||Ca.euclidean,e===0&&Ye(t)?s(a,i):s(e,r,n,a,i)}var eB=wt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),ec=function(e){return eB(e)},jo=function(e,r,n,a,i){var s=i!=="kMedoids",l=s?function(f){return n[f]}:function(f){return a[f](n)},u=function(p){return a[p](r)},c=n,d=r;return Wo(e,a.length,l,u,c,d)},tc=function(e,r,n){for(var a=n.length,i=new Array(a),s=new Array(a),l=new Array(r),u=null,c=0;cn)return!1}return!0},nB=function(e,r,n){for(var a=0;al&&(l=r[c][d],u=d);i[u].push(e[c])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var h=r[s],g=r[a[s]],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;mn[g.key][b.key]&&(u=n[g.key][b.key])):i.linkage==="max"?(u=n[h.key][b.key],n[h.key][b.key]0&&a.push(i);return a},Lh=function(e,r,n){for(var a=[],i=0;il&&(s=c,l=r[i*e+c])}s>0&&a.push(s)}for(var d=0;dc&&(u=d,c=f)}n[i]=s[u]}return a=Lh(e,r,n),a},Ih=function(e){for(var r=this.cy(),n=this.nodes(),a=mB(e),i={},s=0;s=D?(_=D,D=P,L=F):P>_&&(_=P);for(var O=0;O0?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;J1||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()]}):s.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=s[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(s.getElementById(y.shift())),g.unshift(s.getElementById(y.shift()))):y=h(y.shift()).concat(y);g.unshift(s.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}},Zo=function(){var e=this,r={},n=0,a=0,i=[],s=[],l={},u=function(p,v){for(var h=s.length-1,g=[],y=e.spawn();s[h].x!=p||s[h].y!=v;)g.push(s.pop().edge),h--;g.push(s.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,s.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}},SB={hopcroftTarjanBiconnected:Zo,htbc:Zo,htb:Zo,hopcroftTarjanBiconnectedComponents:Zo},Xo=function(){var e=this,r={},n=0,a=[],i=[],s=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),s=s.difference(h)}};return e.forEach(function(u){if(u.isNode()){var c=u.id();c in r||l(c)}}),{cut:s,components:a}},TB={tarjanStronglyConnected:Xo,tsc:Xo,tscc:Xo,tarjanStronglyConnectedComponents:Xo},Mh={};[Ei,rT,nT,iT,sT,cT,fT,AT,ba,wa,Jl,ZT,cB,vB,kB,EB,SB,TB].forEach(function(t){xe(Mh,t)});/*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) Licensed under The MIT License (http://opensource.org/licenses/MIT) */var Fh=0,Ah=1,Vh=2,$r=function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=Fh,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 Rh(this,Ah,"fulfillValue",e)},reject:function(e){return Rh(this,Vh,"rejectReason",e)},then:function(e,r){var n=this,a=new $r;return n.onFulfilled.push(Hh(e,a,"fulfill")),n.onRejected.push(Hh(r,a,"reject")),$h(n),a.proxy}};var Rh=function(e,r,n,a){return e.state===Fh&&(e.state=r,e[n]=a,$h(e)),e},$h=function(e){e.state===Ah?zh(e,"onFulfilled",e.fulfillValue):e.state===Vh&&zh(e,"onRejected",e.rejectReason)},zh=function(e,r,n){if(e[r].length!==0){var a=e[r];e[r]=[];var i=function(){for(var l=0;l0}},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 s=0;s-1}var L5=O5;function I5(t,e){var r=this.__data__,n=Jo(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var M5=I5;function Ea(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t0&&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){Ke(e)||(e=e.match(/\S+/g)||[]);for(var n=this,a=r===void 0,i=[],s=0,l=n.length;s0&&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}};ts.className=ts.classNames=ts.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=0)&&e!=="="&&(Le.comparatorOp+="|\\!"+e)}();var ze=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},sc=[{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 ZE(t.selector,e.selector)}),RN=function(){for(var t={},e,r=0;r0&&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},UN=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)},"")},s="",l=0;l1&&l=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),d=!0),(i||l||d)&&(u=!i&&!s?"":""+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=e0;){var d=a.shift();e(d),i.add(d.id()),l&&n(a,i,d)}return t}function rp(t,e,r){if(r.isParent())for(var n=r._private.children,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0;return uc(this,t,e,rp)};function np(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n)}}Ba.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return uc(this,t,e,np)};function JN(t,e,r){np(t,e,r),rp(t,e,r)}Ba.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return uc(this,t,e,JN)},Ba.ancestors=Ba.parents;var Pi,ap;Pi=ap={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 e4=ap,rs={};function dc(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,s=0;se}),minIndegree:Na("indegree",function(t,e){return te}),minOutdegree:Na("outdegree",function(t,e){return te})}),xe(rs,{totalDegree:function(e){for(var r=0,n=this.nodes(),a=0;a0,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(!s)return;return this}},dr.modelPosition=dr.point=dr.position,dr.modelPositions=dr.points=dr.positions,dr.renderedPoint=dr.renderedPosition,dr.relativePoint=dr.relativePosition;var t4=ip,Da,hn;Da=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,s=e.x2*n+a.x,l=e.y1*n+a.y,u=e.y2*n+a.y;return{x1:i,x2:s,y1:l,y2:u,w:s-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(s){if(!s.isParent())return;var l=s._private,u=s.children(),c=s.pstyle("compound-sizing-wrt-labels").value==="include",d={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.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:s.pstyle("width").pfValue,h:s.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 _=0,L=0,P=N+D;return S>0&&P>0&&(_=N/P*S,L=D/P*S),{biasDiff:_,biasComplementDiff:L}}function h(S,N,D,_){if(D.units==="%")switch(_){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,s.pstyle("padding"),s.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;ne.x2?a:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},zn=function(e,r){return r==null?e:fr(e,r.x1,r.y1,r.x2,r.y2)},Oi=function(e,r,n){return ur(e,r,n)},ns=function(e,r,n){if(!r.cy().headless()){var a=r._private,i=a.rstyle,s=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-s,f.y1=c-s,f.x2=u+s,f.y2=c+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,Ho(f,1),fr(e,f.x1,f.y1,f.x2,f.y2)}}},fc=function(e,r,n){if(!r.cy().headless()){var a;n?a=n+"-":a="";var i=r._private,s=i.rstyle,l=r.pstyle(a+"label").strValue;if(l){var u=r.pstyle("text-halign"),c=r.pstyle("text-valign"),d=Oi(s,"labelWidth",n),f=Oi(s,"labelHeight",n),p=Oi(s,"labelX",n),v=Oi(s,"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,_,L,P;if(y)D=p-S,_=p+S,L=v-N,P=v+N;else{switch(u.value){case"left":D=p-B,_=p;break;case"center":D=p-S,_=p+S;break;case"right":D=p,_=p+B;break}switch(c.value){case"top":L=v-k,P=v;break;case"center":L=v-N,P=v+N;break;case"bottom":L=v,P=v+k;break}}D+=h-Math.max(b,C)-x-E,_+=h+Math.max(b,C)+x+E,L+=g-Math.max(b,C)-x-E,P+=g+Math.max(b,C)+x+E;var F=n||"main",O=i.labelBounds,M=O[F]=O[F]||{};M.x1=D,M.y1=L,M.x2=_,M.y2=P,M.w=_-D,M.h=P-L;var I=y&&m.strValue==="autorotate",V=m.pfValue!=null&&m.pfValue!==0;if(I||V){var H=I?Oi(i.rstyle,"labelAngle",n):m.pfValue,$=Math.cos(H),z=Math.sin(H),j=(D+_)/2,ee=(L+P)/2;if(!y){switch(u.value){case"left":j=_;break;case"right":j=D;break}switch(c.value){case"top":ee=P;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}},X=J(D,L),re=J(D,P),Y=J(_,L),A=J(_,P);D=Math.min(X.x,re.x,Y.x,A.x),_=Math.max(X.x,re.x,Y.x,A.x),L=Math.min(X.y,re.y,Y.y,A.y),P=Math.max(X.y,re.y,Y.y,A.y)}var K=F+"Rot",W=O[K]=O[K]||{};W.x1=D,W.y1=L,W.x2=_,W.y2=P,W.w=_-D,W.h=P-L,fr(e,D,L,_,P),fr(i.labelBounds.all,D,L,_,P)}return e}},r4=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,s=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(s)?(u=(e.w+l*2.4)/e.w,f=-l/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?u=(e.w+l*2.4)/e.w:s==="star"?(u=(e.w+l*2.8)/e.w,c=(e.h+l*2.6)/e.h,f=-l/3.8):s==="triangle"?(u=(e.w+l*2.8)/e.w,c=(e.h+l*2.4)/e.h,f=-l/1.4):s==="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(Ko(e,[Math.ceil(p/2),Math.ceil(v/2)]),d!=0||f!==0){var h=xT(e,d,f);hh(e,h)}}}},n4=function(e,r){var n=e._private.cy,a=n.styleEnabled(),i=n.headless(),s=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 _=e.outerWidth(),L=_/2,P=e.outerHeight(),F=P/2;d=h-L,f=h+L,p=g-F,v=g+F,fr(s,d,p,f,v),a&&r.includeOutlines&&r4(s,e)}else if(c&&r.includeEdges)if(a&&!i){var O=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,fr(s,d,p,f,v),O==="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 I=d;d=f,f=I}if(p>v){var V=p;p=v,v=V}fr(s,d-N,p-N,f+N,v+N)}}else if(O==="bezier"||O==="unbundled-bezier"||O.endsWith("segments")||O.endsWith("taxi")){var H;switch(O){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;$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,fr(s,d,p,f,v)}if(a&&r.includeEdges&&c&&(ns(s,e,"mid-source"),ns(s,e,"mid-target"),ns(s,e,"source"),ns(s,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;fr(s,s.x1+K,s.y1+W,s.x2+K,s.y2+W)}}var oe=l.bodyBounds=l.bodyBounds||{};ph(oe,s),Ko(oe,m),Ho(oe,1),a&&(d=s.x1,f=s.x2,p=s.y1,v=s.y2,fr(s,d-B,p-B,f+B,v+B));var he=l.overlayBounds=l.overlayBounds||{};ph(he,s),Ko(he,m),Ho(he,1);var ne=l.labelBounds=l.labelBounds||{};ne.all!=null?kT(ne.all):ne.all=zt(),a&&r.includeLabels&&(r.includeMainLabels&&fc(s,e,null),c&&(r.includeSourceLabels&&fc(s,e,"source"),r.includeTargetLabels&&fc(s,e,"target")))}return s.x1=Jt(s.x1),s.y1=Jt(s.y1),s.x2=Jt(s.x2),s.y2=Jt(s.y2),s.w=Jt(s.x2-s.x1),s.h=Jt(s.y2-s.y1),s.w>0&&s.h>0&&w&&(Ko(s,m),Ho(s,1)),s},lp=function(e){var r=0,n=function(s){return(s?1:0)<0&&arguments[0]!==void 0?arguments[0]:y4,e=arguments.length>1?arguments[1]:void 0,r=0;r=0;l--)s(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++,Ke(e)||(e=[e]),b4(this,function(i,s){r!=null&&(n=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],a=n.length);for(var l=function(d){var f=n[d];if(f.type===s.type&&(!f.namespace||f.namespace===s.namespace||f.namespace===m4)&&i.eventMatches(i.context,f,s)){var p=[s];e!=null&&ZS(p,e),i.beforeEmit(i.context,f,s),f.conf&&f.conf.one&&(i.listeners=i.listeners.filter(function(g){return g!==f}));var v=i.callbackContext(i.context,f,s),h=f.callback.apply(v,p);i.afterEmit(i.context,f,s),h===!1&&(s.stopPropagation(),s.preventDefault())}},u=0;u1&&!s){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 s=i.index;return this.unmergeAt(s),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=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},map:function(e,r){for(var n=[],a=this,i=0;in&&(n=u,a=l)}return{value:n,ele:a}},min:function(e,r){for(var n=1/0,a,i=this,s=0;s=0&&i"u"?"undefined":ot(Symbol))!=e&&ot(Symbol.iterator)!=e;r&&(ss[Symbol.iterator]=function(){var n=this,a={value:void 0,done:!1},i=0,s=this.length;return Ff({next:function(){return i1&&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(Oe(e)){var s=e;i.applyBypass(this,s,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 s=0;s0&&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:Dp({attr:"source"}),targets:Dp({attr:"target"})});function Dp(t){return function(r){for(var n=[],a=0;a0);return s},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){Ze("A collection must have a reference to the core");return}var i=new kr,s=!1;if(!r)r=[];else if(r.length>0&&Oe(r[0])&&!gi(r[0])){s=!0;for(var l=[],u=new va,c=0,d=r.length;c0&&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=[],s=[],l,u=0,c=r.length;u0){for(var V=l.length===r.length?r:new kt(n,l),H=0;H0&&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 s(P){for(var F=P._private.edges,O=0;O0&&(t?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var _=0;_0?_=P:D=P;while(Math.abs(L)>s&&++F=i?b(N,F):O===0?F: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 _4=function(){function t(n){return-n.tension*n.x-n.friction*n.v}function e(n,a,i){var s={x:n.x+i.dx*a,v:n.v+i.dv*a,tension:n.tension,friction:n.friction};return{dx:s.v,dv:t(s)}}function r(n,a){var i={dx:n.v,dv:t(n)},s=e(n,a*.5,i),l=e(n,a*.5,s),u=e(n,a,l),c=1/6*(i.dx+2*(s.dx+l.dx)+u.dx),d=1/6*(i.dv+2*(s.dv+l.dv)+u.dv);return n.x=n.x+c*a,n.v=n.v+d*a,n}return function n(a,i,s){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,s=s||null,l.tension=a,l.friction=i,p=s!==null,p?(c=n(a,i),v=c/s*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=D4(e,r,n,a);return function(s,l,u){return s+(l-s)*i(u)}},ds={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 ds.linear;var a=_4(e,r,n);return function(i,s,l){return i+(s-i)*a(l)}},"cubic-bezier":Ue};function Op(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 Lp(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Oa(t,e,r,n,a){var i=a!=null?a.type:null;r<0?r=0:r>1&&(r=1);var s=Lp(t,a),l=Lp(e,a);if(le(s)&&le(l))return Op(i,s,l,r,n);if(Ke(s)&&Ke(l)){for(var u=[],c=0;c0?(v==="spring"&&h.push(s.duration),s.easingImpl=ds[v].apply(null,h)):s.easingImpl=ds[v]}var g=s.easingImpl,y;if(s.duration===0?y=1:y=(r-u)/s.duration,s.applying&&(y=s.progress),y<0?y=0:y>1&&(y=1),s.delay==null){var m=s.startPosition,b=s.position;if(b&&a&&!t.locked()){var w={};Ai(m.x,b.x)&&(w.x=Oa(m.x,b.x,y,g)),Ai(m.y,b.y)&&(w.y=Oa(m.y,b.y,y,g)),t.position(w)}var C=s.startPan,x=s.pan,E=i.pan,k=x!=null&&n;k&&(Ai(C.x,x.x)&&(E.x=Oa(C.x,x.x,y,g)),Ai(C.y,x.y)&&(E.y=Oa(C.y,x.y,y,g)),t.emit("pan"));var B=s.startZoom,S=s.zoom,N=S!=null&&n;N&&(Ai(B,S)&&(i.zoom=Ti(i.minZoom,Oa(B,S,y,g),i.maxZoom)),t.emit("zoom")),(k||N)&&t.emit("viewport");var D=s.style;if(D&&D.length>0&&a){for(var _=0;_=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||O4(d,w,t),P4(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,s=0;s0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}var L4={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&&Fo(function(i){Ip(i,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(i,s){Ip(s,e)},n.beforeRenderPriorities.animations):r()}},I4={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&&gi(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}},fs=function(e){return be(e)?new un(e):e},Mp={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new is(I4,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,n){return this.emitter().on(e,fs(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,fs(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,fs(r),n),this},once:function(e,r,n){return this.emitter().one(e,fs(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(Mp);var vc={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)}};vc.jpeg=vc.jpg;var hs={layout:function(e){var r=this;if(e==null){Ze("Layout options must be specified to make a layout");return}if(e.name==null){Ze("A `name` must be specified to make a layout");return}var n=e.name,a=r.extension("layout",n);if(a==null){Ze("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 s=new a(xe({},e,{cy:r,eles:i}));return s}};hs.createLayout=hs.makeLayout=hs.layout;var M4={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;a0;)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)}};gc.invalidateDimensions=gc.resize;var ps={collection:function(e,r){return be(e)?this.$(e):Ut(e)?e.collection():Ke(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}};ps.elements=ps.filter=ps.$;var Bt={},Vi="t",A4="f";Bt.apply=function(t){for(var e=this,r=e._private,n=r.cy,a=n.collection(),i=0;i0;if(p||f&&v){var h=void 0;p&&v||p?h=c.properties:v&&(h=c.mappedProperties);for(var g=0;g1&&(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],_=n.valueMin[3]==null?1:n.valueMin[3],L=n.valueMax[3]==null?1:n.valueMax[3],P=[Math.round(E+(k-E)*C),Math.round(B+(S-B)*C),Math.round(N+(D-N)*C),Math.round(_+(L-_)*C)];i={bypass:n.bypass,name:n.name,value:P,strValue:"rgb("+P[0]+", "+P[1]+", "+P[2]+")"}}else if(l.number){var F=n.valueMin+(n.valueMax-n.valueMin)*C;i=this.parse(n.name,F,n.bypass,p)}else return!1;if(!i)return g(),!1;i.mapping=n,n=i;break}case s.data:{for(var O=n.field.split("."),M=f.data,I=0;I0&&i>0){for(var l={},u=!1,c=0;c0?t.delayAnimation(s).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 s=this.properties[e],l=a(s);l!=null&&l(r,n)&&i(s)},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=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var l=0;la.length?n=n.substr(a.length):n=""}function u(){i.length>s.length?i=i.substr(s.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}s=m[0];var b=m[1],w=m[2],C=e.properties[b];if(!C){Ae("Skipping property: Invalid property name in: "+s),u();continue}var x=r.parse(b,w);if(!x){Ae("Skipping property: Invalid property definition in: "+s),u();continue}g.push({name:b,val:w}),u()}if(h){l();break}r.selector(f);for(var E=0;E=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+/):Ke(e)?w=e:w=[e],c.evenMultiple&&w.length%2!==0)return null;for(var C=[],x=[],E=[],k="",B=!1,S=0;S0?" ":"")+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;Ac.max||c.strictMax&&e===c.max))return null;var O={name:t,value:e,strValue:""+e+(_||""),units:_,bypass:r};return c.unitless||_!=="px"&&_!=="em"?O.pfValue=e:O.pfValue=_==="px"||!_?e:this.getEmSizeInPixels()*e,(_==="ms"||_==="s")&&(O.pfValue=_==="ms"?e:1e3*e),(_==="deg"||_==="rad")&&(O.pfValue=_==="rad"?e:yT(e)),_==="%"&&(O.pfValue=e/100),O}else if(c.propList){var M=[],I=""+e;if(I!=="none"){for(var V=I.split(/\s*,\s*|\s+/),H=0;H0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((s-2*r)/n.w,(l-2*r)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u=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,s,l=!1;if(r.zoomingEnabled||(l=!0),le(e)?s=e:Oe(e)&&(s=e.level,e.position!=null?i=$o(e.position,a,n):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(l=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=u,i.push("zoom"))}if(a&&(!s||!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(),s=this.height();r=r===void 0?this._private.zoom:r;var l={x:(i-r*(a.x1+a.x2))/2,y:(s-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 $i={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})};$i.attr=$i.data,$i.removeAttr=$i.removeData;var zi=function(e){var r=this;e=xe({},e);var n=e.container;n&&!Oo(n)&&Oo(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 s=st!==void 0&&n!==void 0&&!e.headless,l=e;l.layout=xe({name:s?"grid":"null"},l.layout),l.renderer=xe({name:s?"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?s:l.styleEnabled,zoom:le(l.zoom)?l.zoom:1,pan:{x:Oe(l.pan)&&le(l.pan.x)?l.pan.x:0,y:Oe(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(HE);if(y)return ka.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&&(Oe(h)||Ke(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;y0,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(Ke(e.roots)){for(var d=[],f=0;f0;){var F=P(),O=N(F,_);if(O)F.outgoers().filter(function(ne){return ne.isNode()&&n.has(ne)}).forEach(L);else if(O===null){Ae("Detected double maximal shift for node `"+F.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}S();var M=0;if(e.avoidOverlap)for(var I=0;I0&&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 _e={x:W.x+(de+1-(me+1)/2)*Ne,y:(pe+1)*De};return _e}};return n.nodes().layoutPositions(this,e,he),this};var H4={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 Vp(t){this.options=xe({},H4,t)}Vp.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 s=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l={x:s.x1+s.w/2,y:s.y1+s.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;p1&&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 K4={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 Rp(t){this.options=xe({},K4,t)}Rp.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"),s=zt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l={x:s.x1+s.w/2,y:s.y1+s.h/2},u=[],c=0,d=0;d0){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(s.w,s.h)/2-E,S=B/(m.length+k?1:0);E=Math.min(E,S)}for(var N=0,D=0;D1&&e.avoidOverlap){var F=Math.cos(P)-Math.cos(0),O=Math.sin(P)-Math.sin(0),M=Math.sqrt(E*E/(F*F+O*O));N=Math.max(M,N)}_.r=N,N+=E}if(e.equidistant){for(var I=0,V=0,H=0;H=t.numIter||(X4(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature=t.animationThreshold&&i(),Fo(f)}};d()}else{for(;c;)c=s(u),u++;Hp(n,t),l()}return this},ys.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},ys.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var U4=function(e,r,n){for(var a=n.eles.edges(),i=n.eles.nodes(),s=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:s.w,clientHeight:s.h,boundingBox:s},u=n.eles.components(),c={},d=0;d0){l.graphSet.push(B);for(var d=0;da.count?0:a.graph},W4=function t(e,r,n,a){var i=a.graphSet[n];if(-10)var f=a.nodeOverlap*d,p=Math.sqrt(l*l+u*u),v=f*l/p,h=f*u/p;else var g=bs(e,l,u),y=bs(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)}},e3=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 s=e.maxY-r.minY;else var s=r.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},bs=function(e,r,n){var a=e.positionX,i=e.positionY,s=e.height||1,l=e.width||1,u=n/r,c=s/l,d={};return r===0&&0n?(d.x=a,d.y=i+s/2,d):0r&&-1*c<=u&&u<=c?(d.x=a-l/2,d.y=i-l*n/2/r,d):0=c)?(d.x=a+s*r/2/n,d.y=i+s/2,d):(0>n&&(u<=-1*c||u>=c)&&(d.x=a-s*r/2/n,d.y=i-s/2),d)},t3=function(e,r){for(var n=0;nn){var y=r.gravity*v/g,m=r.gravity*h/g;p.offsetX+=y,p.offsetY+=m}}}}},n3=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 s=n[a++],l=e.idToIndex[s],u=e.layoutNodes[l],c=u.children;if(0n)var i={x:n*e/a,y:n*r/a};else var i={x:e,y:r};return i},o3=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.padLefta.maxY)&&(a.maxY=e.maxY+a.padBottom,i=!0),(a.minY==null||e.minY-a.padTopm&&(h+=y+r.componentSpacing,v=0,g=0,y=0)}}},s3={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 Kp(t){this.options=xe({},s3,t)}Kp.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 s=a.size(),l=Math.sqrt(s*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(s/u);else if(p==null&&v!=null)c=v,u=Math.ceil(s/c);else if(c*u>s){var h=d(),g=f();(h-1)*g>=s?d(h-1):(g-1)*h>=s&&f(g-1)}else for(;c*u=s?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=c&&(F=0,P++)},M={},I=0;I(F=PT(t,e,O[M],O[M+1],O[M+2],O[M+3])))return y(k,F),!0}else if(S.edgeType==="bezier"||S.edgeType==="multibezier"||S.edgeType==="self"||S.edgeType==="compound"){for(var O=S.allpts,M=0;M+5(F=_T(t,e,O[M],O[M+1],O[M+2],O[M+3],O[M+4],O[M+5])))return y(k,F),!0}for(var I=I||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(I),m(V))}function w(k,B,S){return ur(k,B,S)}function C(k,B){var S=k._private,N=p,D;B?D=B+"-":D="",k.boundingBox();var _=S.labelBounds[B||"main"],L=k.pstyle(D+"label").value,P=k.pstyle("text-events").strValue==="yes";if(!(!P||!L)){var F=w(S.rscratch,"labelX",B),O=w(S.rscratch,"labelY",B),M=w(S.rscratch,"labelAngle",B),I=k.pstyle(D+"text-margin-x").pfValue,V=k.pstyle(D+"text-margin-y").pfValue,H=_.x1-N-I,$=_.x2+N-I,z=_.y1-N-V,j=_.y2+N-V;if(M){var ee=Math.cos(M),J=Math.sin(M),X=function(he,ne){return he=he-F,ne=ne-O,{x:he*ee-ne*J+F,y:he*J+ne*ee+O}},re=X(H,z),Y=X(H,j),A=X($,z),K=X($,j),W=[re.x+I,re.y+V,A.x+I,A.y+V,K.x+I,K.y+V,Y.x+I,Y.y+V];if(Ht(t,e,W))return y(k),!0}else if(ya(_,t,e))return y(k),!0}}for(var x=s.length-1;x>=0;x--){var E=s[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=[],s=Math.min(t,r),l=Math.max(t,r),u=Math.min(e,n),c=Math.max(e,n);t=s,r=l,e=u,n=c;for(var d=zt({x1:t,y1:e,x2:r,y2:n}),f=0;f0?-(Math.PI-e.ang):Math.PI+e.ang},h3=function(e,r,n,a,i){if(e!==Jp?ev(r,e,Er):f3(er,Er),ev(r,n,er),Yp=Er.nx*er.ny-Er.ny*er.nx,Zp=Er.nx*er.nx-Er.ny*-er.ny,zr=Math.asin(Math.max(-1,Math.min(1,Yp))),Math.abs(zr)<1e-6){kc=r.x,xc=r.y,Gn=Ia=0;return}qn=1,Cs=!1,Zp<0?zr<0?zr=Math.PI+zr:(zr=Math.PI-zr,qn=-1,Cs=!0):zr>0&&(qn=-1,Cs=!0),r.radius!==void 0?Ia=r.radius:Ia=a,Un=zr/2,ks=Math.min(Er.len/2,er.len/2),i?(Sr=Math.abs(Math.cos(Un)*Ia/Math.sin(Un)),Sr>ks?(Sr=ks,Gn=Math.abs(Sr*Math.sin(Un)/Math.cos(Un))):Gn=Ia):(Sr=Math.min(ks,Ia),Gn=Math.abs(Sr*Math.sin(Un)/Math.cos(Un))),Ec=r.x+er.nx*Sr,Sc=r.y+er.ny*Sr,kc=Ec-er.ny*Gn*qn,xc=Sc+er.nx*Gn*qn,Xp=r.x+Er.nx*Sr,Qp=r.y+Er.ny*Sr,Jp=r};function tv(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 Tc(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}:(h3(t,e,r,n,a),{cx:kc,cy:xc,radius:Gn,startX:Xp,startY:Qp,stopX:Ec,stopY:Sc,startAngle:Er.ang+Math.PI/2*qn,endAngle:er.ang-Math.PI/2*qn,counterClockwise:Cs})}var _t={};_t.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,a=e.vectorNormInverse,i,s=t.pstyle("source-endpoint"),l=t.pstyle("target-endpoint"),u=s.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],s),p=cr(f,2),v=p[0],h=p[1],g=this.manualEndptToPx(t.target()[0],l),y=cr(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}},_t.findHaystackPoints=function(t){for(var e=0;e0?Math.max(we-Ce,0):Math.min(we+Ce,0)},L=_(N,B),P=_(D,S),F=!1;b===c?m=Math.abs(L)>Math.abs(P)?a:n:b===u||b===l?(m=n,F=!0):(b===i||b===s)&&(m=a,F=!0);var O=m===n,M=O?P:L,I=O?D:N,V=fh(I),H=!1;!(F&&(C||E))&&(b===l&&I<0||b===u&&I>0||b===i&&I>0||b===s&&I<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)=Math.abs(M)},J=ee($),X=ee(Math.abs(M)-Math.abs($)),re=J||X;if(re&&!H)if(O){var Y=Math.abs(I)<=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(I)<=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,_e=d.y2;r.segpts=[De,Ee,De,_e]}else r.segpts=[d.x2,d.y1]}else if(O){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,Z=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(Z)}},_t.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,a=e.tgtPos,i=e.srcW,s=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=Fn({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),k=EP.poolIndex()){var F=L;L=P,P=F}var O=S.srcPos=L.position(),M=S.tgtPos=P.position(),I=S.srcW=L.outerWidth(),V=S.srcH=L.outerHeight(),H=S.tgtW=P.outerWidth(),$=S.tgtH=P.outerHeight(),z=S.srcShape=r.nodeShapes[e.getNodeShape(L)],j=S.tgtShape=r.nodeShapes[e.getNodeShape(P)],ee=S.srcCornerRadius=L.pstyle("corner-radius").value==="auto"?"auto":L.pstyle("corner-radius").pfValue,J=S.tgtCornerRadius=P.pstyle("corner-radius").value==="auto"?"auto":P.pstyle("corner-radius").pfValue,X=S.tgtRs=P._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;Y0){var oe=i,he=An(oe,ga(r)),ne=An(oe,ga(W)),se=he;if(ne2){var ue=An(oe,{x:W[2],y:W[3]});ue0){var U=s,ie=An(U,ga(r)),Z=An(U,ga(G)),ae=ie;if(Z2){var we=An(U,{x:G[2],y:G[3]});we=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,_=v?S.t0+D*N:S.t1-D*N;_=Ti(0,_,1),e=ma(B.p0,B.p1,B.p2,_),p=v3(B.p0,B.p1,B.p2,_);break}case"straight":case"segments":case"haystack":{for(var L=0,P,F,O,M,I=n.allpts.length,V=0;V+3=h));V+=2);var H=h-F,$=H/P;$=Ti(0,$,1),e=wT(O,M,$),p=av(O,M);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,p)}};c("source"),c("target"),this.applyLabelDimensions(t)}},Tr.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Tr.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),a=this.calculateLabelDimensions(t,n),i=t.pstyle("line-height").pfValue,s=t.pstyle("text-wrap").strValue,l=ur(r.rscratch,"labelWrapCachedLines",e)||[],u=s!=="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)},Tr.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",a=t.pstyle(n+"label").strValue,i=t.pstyle("text-transform").value,s=function(j,ee){return ee?(sn(r.rscratch,j,e,ee),ee):ur(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=s("labelKey");if(u!=null&&s("labelWrapKey")===u)return s("labelWrapCachedText");for(var c="​",d=a.split(` `),f=t.pstyle("text-max-width").pfValue,p=t.pstyle("text-overflow-wrap").value,v=p==="anywhere",h=[],g=/[\s\u200b]+|$/g,y=0;yf){var x=m.matchAll(g),E="",k=0,B=Rf(x),S;try{for(B.s();!(S=B.n()).done;){var N=S.value,D=N[0],_=m.substring(k,N.index);k=N.index+D.length;var L=E.length===0?_:E+_+D,P=this.calculateLabelDimensions(t,L),F=P.width;F<=f?E+=_+D:(E&&h.push(E),E=_+D)}}catch(z){B.e(z)}finally{B.f()}E.match(/^[\s\u200b]+$/)||h.push(E)}else h.push(m)}s("labelWrapCachedLines",h),a=s("labelWrapCachedText",h.join(` `)),s("labelWrapKey",u)}else if(l==="ellipsis"){var O=t.pstyle("text-max-width").pfValue,M="",I="…",V=!1;if(this.calculateLabelDimensions(t,a).widthO)break;M+=a[H],H===a.length-1&&(V=!0)}return V||(M+=I),M}return a},Tr.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},Tr.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),a=n.document,i=Mn(e,t._private.labelDimsKey),s=r.labelDimCache||(r.labelDimCache=[]),l=s[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(` `),w=0;w1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),l)for(var u=0;u=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:Z[0],y:Z[1]});var Ot=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||G.emit({originalEvent:T,type:"boxstart",position:{x:Z[0],y:Z[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:Z[0],y:Z[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:Z[0],y:Z[1]}}),t.hoverData.cxtOver=ge,ge&&ge.emit({originalEvent:T,type:"cxtdragover",position:{x:Z[0],y:Z[1]}}))}}else if(t.hoverData.dragging){if(Q=!0,G.panningEnabled()&&G.userPanningEnabled()){var tr;if(t.hoverData.justStartedPan){var hr=t.hoverData.mdownPos;tr={x:(Z[0]-hr[0])*U,y:(Z[1]-hr[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}Z=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()))Ot();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=ga(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:Z[0],y:Z[1]}),ge&&n(ge,["mouseover","tapdragover"],T,{x:Z[0],y:Z[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"))),Ot();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]=Z[0],Ce[3]=Z[1],Q)return T.stopPropagation&&T.stopPropagation(),T.preventDefault&&T.preventDefault(),!1}},!1);var N,D,_;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),Z=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-_<=Q.multiClickDebounceTime()?(N&&clearTimeout(N),D=!0,_=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()),_=T.timeStamp)),ae==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(T)&&(Q.$(r).unselect(["tapunselect"]),Z.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=Z=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(Z),ye&&(ae.emit("freeon"),Z.emit("free"),t.dragData.didDrag&&(ae.emit("dragfreeon"),Z.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 Z;T.deltaY!=null?Z=T.deltaY/-250:T.wheelDeltaY!=null?Z=T.wheelDeltaY/1e3:Z=T.wheelDelta/1e3,Z=Z*t.wheelSensitivity;var ae=T.deltaMode===1;ae&&(Z*=33);var we=R.zoom()*Math.pow(10,Z);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 P,F,O,M,I,V,H,$,z,j,ee,J,X,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],P=T.touches[0].clientX-z,F=T.touches[0].clientY-j,O=T.touches[1].clientX-z,M=T.touches[1].clientY-j,X=0<=P&&P<=ee&&0<=O&&O<=ee&&0<=F&&F<=J&&0<=M&&M<=J;var Z=R.pan(),ae=R.zoom();I=re(P,F,O,M),V=Y(P,F,O,M),H=[(P+O)/2,(F+M)/2],$=[(H[0]-Z.x)/ae,(H[1]-Z.y)/ae];var we=200,Ce=we*we;if(V=1){for(var nt=t.touchData.startPosition=[null,null,null,null,null,null],Qe=0;Qe=t.touchTapThreshold2}if(R&&t.touchData.cxt){T.preventDefault();var nt=T.touches[0].clientX-z,Qe=T.touches[0].clientY-j,Pt=T.touches[1].clientX-z,ut=T.touches[1].clientY-j,ht=Y(nt,Qe,Pt,ut),Wt=ht/V,Ot=150,Lt=Ot*Ot,tr=1.5,hr=tr*tr;if(Wt>=hr||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;pt0&&!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(),Z=t.touchData.now,ae=t.touchData.earlier;if(T.touches[0]){var we=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);Z[0]=we[0],Z[1]=we[1]}if(T.touches[1]){var we=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);Z[2]=we[0],Z[3]=we[1]}if(T.touches[2]){var we=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);Z[4]=we[0],Z[5]=we[1]}R&&R.unactivate();var Ce;if(t.touchData.cxt){if(Ce={originalEvent:T,type:"cxttapend",position:{x:Z[0],y:Z[1]}},R?R.emit(Ce):U.emit(Ce),!t.touchData.cxtDragged){var ge={originalEvent:T,type:"cxttap",position:{x:Z[0],y:Z[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:Z[0],y:Z[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:Z[0],y:Z[1]}),R.unactivate(),t.touchData.start=null}else{var Re=t.findNearestElement(Z[0],Z[1],!0,!0);n(Re,["touchend","tapend","vmouseup","tapdragout"],T,{x:Z[0],y:Z[1]})}var rt=t.touchData.startPosition[0]-Z[0],nt=rt*rt,Qe=t.touchData.startPosition[1]-Z[1],Pt=Qe*Qe,ut=nt+Pt,ht=ut*ie*ie;t.touchData.singleTouchMoved||(R||U.$(":selected").unselect(["tapunselect"]),n(R,["tap","vclick"],T,{x:Z[0],y:Z[1]}),he=!1,T.timeStamp-se<=U.multiClickDebounceTime()?(ne&&clearTimeout(ne),he=!0,se=null,n(R,["dbltap","vdblclick"],T,{x:Z[0],y:Z[1]})):(ne=setTimeout(function(){he||n(R,["onetap","voneclick"],T,{x:Z[0],y:Z[1]})},U.multiClickDebounceTime()),se=T.timeStamp)),R!=null&&!t.dragData.didDrag&&R._private.selectable&&ht"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;R0)return z[0]}return null},h=Object.keys(p),g=0;g0?v:gh(i,s,e,r,n,a,l,u)},checkPoint:function(e,r,n,a,i,s,l,u){u=u==="auto"?Rn(a,i):u;var c=2*u;if(Rr(e,r,this.points,s,l,a,i-c,[0,-1],n)||Rr(e,r,this.points,s,l,a-c,i,[0,-1],n))return!0;var d=a/2+2*n,f=i/2+2*n,p=[s-d,l-f,s-d,l,s+d,l,s+d,l-f];return!!(Ht(e,r,p)||Vn(e,r,c,c,s+a/2-u,l+i/2-u,n)||Vn(e,r,c,c,s-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),s=.5*(3-Math.sqrt(5));s*=1.57;for(var l=0;l=e.deqFastCost*C)break}else if(c){if(b>=e.deqCost*v||b>=e.deqAvgCost*p)break}else if(w>=e.deqNoDrawCost*Nc)break;var x=e.deq(n,y,g);if(x.length>0)for(var E=0;E0&&(e.onDeqd(n,h),!c&&e.shouldRedraw(n,h,y,g)&&i())},l=e.priority||ql;a.beforeRender(s,l(n))}}}},m3=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vo;Al(this,t),this.idsByKey=new kr,this.keyForId=new kr,this.cachesByLvl=new kr,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return Vl(t,[{key:"getIdsFor",value:function(r){r==null&&Ze("Can not get id list for null key");var n=this.idsByKey,a=this.idsByKey.get(r);return a||(a=new va,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 kr,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}(),hv=25,Ss=50,Ts=-4,Dc=3,y3=7.99,b3=8,w3=1024,C3=1024,k3=1024,x3=.2,E3=.8,S3=10,T3=.15,B3=.1,N3=.9,D3=.9,_3=100,P3=1,Aa={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},O3=wt({getKey:null,doesEleInvalidateKey:Vo,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ih,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),qi=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var a=O3(r);xe(n,a),n.lookup=new m3(a.getKey,a.doesEleInvalidateKey),n.setupDequeueing()},ct=qi.prototype;ct.reasons=Aa,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 Si(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,s=this.renderer,l=s.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(Wl(l*r))),n=y3||n>Dc)return null;var c=Math.pow(2,n),d=e.h*c,f=e.w*c,p=s.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<=hv?h=hv:d<=Ss?h=Ss:h=Math.ceil(d/Ss)*Ss,d>k3||f>C3)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.usedWidthn;D--)S=i.getElement(t,e,r,D,Aa.downscale);N()}else return i.queueElement(t,E.level-1),E;else{var _;if(!w&&!C&&!x)for(var L=n-1;L>=Ts;L--){var P=u.get(t,L);if(P){_=P;break}}if(b(_))return i.queueElement(t,n),_;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+b3),y.eleCaches.push(v),u.set(t,n,v),i.checkTextureFullness(y),v},ct.invalidateElements=function(t){for(var e=0;e=x3*t.width&&this.retireTexture(t)},ct.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>E3&&t.fullnessChecks>=S3?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,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,Ul(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),on(a,s),n.push(s),s}},ct.queueElement=function(t,e){var r=this,n=r.getElementQueue(),a=r.getElementKeyToQueue(),i=this.getKey(t),s=a[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,n.updateItem(s);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,s=0;s0;s++){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,Aa.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=Kl,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=fv.setupDequeueing({deqRedrawThreshold:_3,deqCost:T3,deqAvgCost:B3,deqNoDrawCost:N3,deqFastCost:D3,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n=I3||r>Bs)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(F){if(n.validateLayersElesOrdering(F,t),n.levelIsComplete(F,t))return v=u[F],!0},D=function(F){if(!v)for(var O=r+F;Ui<=O&&O<=Bs&&!N(O);O+=F);};D(1),D(-1);for(var _=d.length-1;_>=0;_--){var L=d[_];L.invalid&&on(d,L)}};if(!p)h();else return d;var g=function(){if(!f){f=zt();for(var N=0;NH3)return null;var L=n.makeLayer(f,r);if(D!=null){var P=d.indexOf(D)+1;d.splice(P,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/L3,w=!l,C=0;C=b||!vh(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,s=t.context,l=e.boundingBox();l.w===0||l.h===0||!e.visible()||(r=a.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,r,K3),i.setImgSmoothing(s,!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;i0||s.invalid)return!1;a+=s.eles.length}return a===e.length},Et.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n0){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;a3&&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,s=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 F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;f==="straight-triangle"?(s.eleStrokeStyle(t,e,F),s.drawEdgeTrianglePath(e,t,l.allpts)):(t.lineWidth=v,t.lineCap=h,s.eleStrokeStyle(t,e,F),s.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},C=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;if(t.lineWidth=v+g,t.lineCap=h,g>0)s.colorStrokeStyle(t,y[0],y[1],y[2],F);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,l.allpts):(s.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},x=function(){a&&s.drawEdgeOverlay(t,e)},E=function(){a&&s.drawEdgeUnderlay(t,e)},k=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;s.drawArrowheads(t,e,F)},B=function(){s.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,_=e.pstyle("ghost-opacity").value,L=m*_;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 wv=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,s=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"&&!s?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=wv("overlay"),Kr.drawEdgeUnderlay=wv("underlay"),Kr.drawEdgePath=function(t,e,r,n){var a=t._private.rscratch,i=e,s,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?(s=e=a.pathCache,l=!0):(s=e=new Path2D,a.pathCacheKey=f,a.pathCache=s)}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+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(n==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var l=e.pstyle("label");if(!l||!l.value)return;var u=s.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?(s.drawText(t,e,null,v,i),e.isEdge()&&(s.drawText(t,e,"source",v,i),s.drawText(t,e,"target",v,i))):s.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;r2&&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,s=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+" "+s+" "+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 Oc(t,e,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=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(),s?t.stroke():t.fill()}Wn.getTextAngle=function(t,e){var r,n=t._private,a=n.rscratch,i=e?e+"-":"",s=t.pstyle(i+"text-rotation"),l=ur(a,"labelAngle",e);return s.strValue==="autorotate"?r=t.isEdge()?l:0:s.strValue==="none"?r=0:r=s.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,s=i.rscratch,l=a?e.effectiveOpacity():1;if(!(a&&(l===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var u=ur(s,"labelX",r),c=ur(s,"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=ur(s,"labelWidth",r),g=ur(s,"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,_=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 P=c-g-S,F=h+2*S,O=g+2*S;if(E>0){var M=t.fillStyle,I=e.pstyle("text-background-color").value;t.fillStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+E*l+")",D?Oc(t,L,P,F,O,_):t.fillRect(L,P,F,O),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?Oc(t,L,P,F,O,_,"stroke"):t.strokeRect(L,P,F,O),z==="double"){var j=B/2;D?Oc(t,L+j,P+j,F-j*2,O-j*2,_,"stroke"):t.strokeRect(L+j,P+j,F-j*2,O-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=ur(s,"labelWrapCachedLines",r),X=ur(s,"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)*X;break;case"center":case"bottom":c-=(J.length-1)*X;break}for(var A=0;A0&&t.strokeText(J[A],u,c),t.fillText(J[A],u,c),c+=X}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,s=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=s.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;k0&&arguments[0]!==void 0?arguments[0]:L;s.eleFillStyle(t,e,ie)},A=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$;s.colorStrokeStyle(t,P[0],P[1],P[2],ie)},K=function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J;s.colorStrokeStyle(t,j[0],j[1],j[2],ie)},W=function(ie,Z,ae,we){var Ce=s.nodePathCache=s.nodePathCache||[],ge=nh(ae==="polygon"?ae+","+we.join(","):ae,""+Z,""+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}),s.nodeShapes[s.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,Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ae=c.backgrounding,we=0,Ce=0;Ce0&&arguments[0]!==void 0?arguments[0]:!1,Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;s.hasPie(e)&&(s.drawPie(t,e,Z),ie&&(v||s.nodeShapes[s.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,Z=(D>0?D:-D)*ie,ae=D>0?0:255;D!==0&&(s.colorFillStyle(t,ae,ae,ae,Z),v?t.fill(h):t.fill())},me=function(){if(_>0){if(t.lineWidth=_,t.lineCap=M,t.lineJoin=O,t.setLineDash)switch(F){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(V),t.lineDashOffset=H;break;case"solid":case"double":t.setLineDash([]);break}if(I!=="center"){if(t.save(),t.lineWidth*=2,I==="inside")v?t.clip(h):t.clip();else{var ie=new Path2D;ie.rect(-l/2-_,-u/2-_,l+2*_,u+2*_),ie.addPath(h),t.clip(ie,"evenodd")}v?t.stroke(h):t.stroke(),t.restore()}else v?t.stroke(h):t.stroke();if(F==="double"){t.lineWidth=_/3;var Z=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",v?t.stroke(h):t.stroke(),t.globalCompositeOperation=Z}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 Z=s.getNodeShape(e),ae=_;I==="inside"&&(ae=0),I==="outside"&&(ae*=2);var we=(l+ae+(z+X))/l,Ce=(u+ae+(z+X))/u,ge=l*we,Se=u*Ce,ve=s.nodeShapes[Z].points,ye;if(v){var Ge=W(ge,Se,Z,ve);ye=Ge.path}if(Z==="ellipse")s.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(Z)){var Re=0,rt=0,nt=0;Z==="round-diamond"?Re=(ae+X+z)*1.4:Z==="round-heptagon"?(Re=(ae+X+z)*1.075,nt=-(ae/2+X+z)/35):Z==="round-hexagon"?Re=(ae+X+z)*1.12:Z==="round-pentagon"?(Re=(ae+X+z)*1.13,nt=-(ae/2+X+z)/15):Z==="round-tag"?(Re=(ae+X+z)*1.12,rt=(ae/2+z+X)*.07):Z==="round-triangle"&&(Re=(ae+X+z)*(Math.PI/2),nt=-(ae+X/2+z)/Math.PI),Re!==0&&(we=(l+Re)/l,ge=l*we,["round-hexagon","round-tag"].includes(Z)||(Ce=(u+Re)/u,Se=u*Ce)),re=re==="auto"?yh(ge,Se):re;for(var Qe=ge/2,Pt=Se/2,ut=re+(ae+z+X)/2,ht=new Array(ve.length/2),Wt=new Array(ve.length/2),Ot=0;Ot0){if(a=a||n.position(),i==null||s==null){var v=n.padding();i=n.width()+2*v,s=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,s+u*2,p),r.fill()}}}};Va.drawNodeOverlay=Cv("overlay"),Va.drawNodeUnderlay=Cv("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"),s=n.x,l=n.y,u=e.width(),c=e.height(),d=Math.min(u,c)/2,f=0,p=this.usePaths();p&&(s=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(s,l),t.arc(s,l,d,b,C),t.closePath(),this.colorFillStyle(t,g[0],g[1],g[2],y),t.fill(),f+=m)}};var Gt={},eD=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;as.minMbLowQualFrames&&(s.motionBlurPxRatio=s.mbPxRBlurry)),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!f&&(d[s.NODE]=!0,d[s.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=s.prevViewport,S=B===void 0||k.zoom!==B.zoom||k.pan.x!==B.pan.x||k.pan.y!==B.pan.y;!S&&!(g&&!h)&&(s.motionBlurPxRatio=1),i&&(E=i),C*=l,E.x*=l,E.y*=l;var N=s.getCachedZSortedEles();function D(ne,se,ue,pe,de){var me=ne.globalCompositeOperation;ne.globalCompositeOperation="destination-out",s.colorFillStyle(ne,255,255,255,s.motionBlurTransparency),ne.fillRect(se,ue,pe,de),ne.globalCompositeOperation=me}function _(ne,se){var ue,pe,de,me;!s.clearingMotionBlur&&(ne===c.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]||ne===c.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG])?(ue={x:x.x*v,y:x.y*v},pe=w*v,de=s.canvasWidth*v,me=s.canvasHeight*v):(ue=E,pe=C,de=s.canvasWidth,me=s.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||(s.textureDrawLastFrame=!1),f){if(s.textureDrawLastFrame=!0,!s.textureCache){s.textureCache={},s.textureCache.bb=u.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER];var L=s.data.bufferContexts[s.TEXTURE_BUFFER];L.setTransform(1,0,0,1,0,0),L.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:L,drawOnlyNodeLayer:!0,forcedPxRatio:l*s.textureMult});var k=s.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:s.canvasWidth,height:s.canvasHeight};k.mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}d[s.DRAG]=!1,d[s.NODE]=!1;var P=c.contexts[s.NODE],F=s.textureCache.texture,k=s.textureCache.viewport;P.setTransform(1,0,0,1,0,0),p?D(P,0,0,k.width,k.height):P.clearRect(0,0,k.width,k.height);var O=b.core("outside-texture-bg-color").value,M=b.core("outside-texture-bg-opacity").value;s.colorFillStyle(P,O[0],O[1],O[2],M),P.fillRect(0,0,k.width,k.height);var w=u.zoom();_(P,!1),P.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l),P.drawImage(F,k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l)}else s.textureOnViewport&&!e&&(s.textureCache=null);var I=u.extent(),V=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),H=s.hideEdgesOnViewport&&V,$=[];if($[s.NODE]=!d[s.NODE]&&p&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,$[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),$[s.DRAG]=!d[s.DRAG]&&p&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,$[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),d[s.NODE]||r||n||$[s.NODE]){var z=p&&!$[s.NODE]&&v!==1,P=e||(z?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:c.contexts[s.NODE]),j=p&&!z?"motionBlur":void 0;_(P,j),H?s.drawCachedNodes(P,N.nondrag,l,I):s.drawLayeredElements(P,N.nondrag,l,I),s.debug&&s.drawDebugPoints(P,N.nondrag),!r&&!p&&(d[s.NODE]=!1)}if(!n&&(d[s.DRAG]||r||$[s.DRAG])){var z=p&&!$[s.DRAG]&&v!==1,P=e||(z?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:c.contexts[s.DRAG]);_(P,p&&!z?"motionBlur":void 0),H?s.drawCachedNodes(P,N.drag,l,I):s.drawCachedElements(P,N.drag,l,I),s.debug&&s.drawDebugPoints(P,N.drag),!r&&!p&&(d[s.DRAG]=!1)}if(s.showFps||!n&&d[s.SELECT_BOX]&&!r){var P=e||c.contexts[s.SELECT_BOX];if(_(P),s.selection[4]==1&&(s.hoverData.selecting||s.touchData.selecting)){var w=s.cy.zoom(),ee=b.core("selection-box-border-width").value/w;P.lineWidth=ee,P.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+")",P.fillRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]),ee>0&&(P.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+")",P.strokeRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]))}if(c.bgActivePosistion&&!s.hoverData.selecting){var w=s.cy.zoom(),J=c.bgActivePosistion;P.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+")",P.beginPath(),P.arc(J.x,J.y,b.core("active-bg-size").pfValue/w,0,2*Math.PI),P.fill()}var X=s.lastRedrawTime;if(s.showFps&&X){X=Math.round(X);var re=Math.round(1e3/X);P.setTransform(1,0,0,1,0,0),P.fillStyle="rgba(255, 0, 0, 0.75)",P.strokeStyle="rgba(255, 0, 0, 0.75)",P.lineWidth=1,P.fillText("1 frame = "+X+" ms = "+re+" fps",0,20);var Y=60;P.strokeRect(0,30,250,20),P.fillRect(0,30,250*Math.min(re/Y,1),20)}r||(d[s.SELECT_BOX]=!1)}if(p&&v!==1){var A=c.contexts[s.NODE],K=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],W=c.contexts[s.DRAG],oe=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],he=function(se,ue,pe){se.setTransform(1,0,0,1,0,0),pe||!m?se.clearRect(0,0,s.canvasWidth,s.canvasHeight):D(se,0,0,s.canvasWidth,s.canvasHeight);var de=v;se.drawImage(ue,0,0,s.canvasWidth*de,s.canvasHeight*de,0,0,s.canvasWidth,s.canvasHeight)};(d[s.NODE]||$[s.NODE])&&(he(A,K,$[s.NODE]),d[s.NODE]=!1),(d[s.DRAG]||$[s.DRAG])&&(he(W,oe,$[s.DRAG]),d[s.DRAG]=!1)}s.prevViewport=k,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),p&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!f,s.mbFrames=0,d[s.NODE]=!0,d[s.DRAG]=!0,s.redraw()},eD)),e||u.emit("render")};var gn={};gn.drawPolygonPath=function(t,e,r,n,a,i){var s=n/2,l=a/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*i[0],r+l*i[1]);for(var u=1;u0&&s>0){v.clearRect(0,0,i,s),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,s),v.fill())}return p};function tD(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),a=new Uint8Array(n),i=0;i"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},[mv,Br,Kr,Pc,Wn,Va,Gt,gn,Gi,Bv].forEach(function(t){xe(Me,t)});var aD=[{name:"null",impl:Gp},{name:"base",impl:dv},{name:"canvas",impl:rD}],iD=[{type:"layout",extensions:d3},{type:"renderer",extensions:aD}],Dv={},_v={};function Pv(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(zi.prototype[e])return a(e);zi.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),Oe(this._private)||(this._private={}),this._private.cy=B.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(r.prototype),l=[],u=0;uJSON.stringify(a)),this.dendrites=r.dendrites.map(a=>JSON.stringify(a)),(n=r.somas)!=null&&n.length&&(this.somas=r.somas.map(a=>JSON.stringify(a))),r.connectivity.length)for(const a of r.connectivity){const i=await this.graphNode(a[0]),s=await this.graphNode(a[1]);this.nodes.push(i),this.nodes.push(s),this.edges.push({id:`${i.id}_${s.id}`,source:i.id,target:s.id})}else this.nodes.push({id:"MISSING",label:"NO PATHS"})}showConnectivity(r){this.cyg=new hD(this,r),this.cyg.on("tap-node",n=>{const a=new CustomEvent("tap-node",{detail:n.detail});this.dispatchEvent(a)})}selectConnectivity(r){var n;if((n=this.cyg)!=null&&n.cy){let a="";this.cyg.cy.elements().forEach(i=>{const s=i.data("label"),l=Fc(s);fD(r,l)&&(a=i.id())}),a&&this.cyg.cy.$id(a).select()}}clearConnectivity(){var r;(r=this.cyg)!=null&&r.cy&&(this.cyg.cy.remove(),this.cyg.cy=null)}reset(){var r;(r=this.cyg)!=null&&r.cy&&this.cyg.cy.reset()}zoom(r){var n;if((n=this.cyg)!=null&&n.cy){const a=this.cyg.cy.zoom(),i=this.cyg.cy.width(),s=this.cyg.cy.height(),l={x:i/2,y:s/2};this.cyg.cy.zoom({level:a+r,renderedPosition:l})}}enableZoom(r){var n;(n=this.cyg)!=null&&n.cy&&this.cyg.cy.userZoomingEnabled(r)}get elements(){return[...this.nodes.map(r=>({data:r})),...this.edges.map(r=>({data:r}))]}get roots(){return[...this.dendrites,...this.somas]}async graphNode(r){const n=JSON.stringify(r),a=[r[0],...r[1]],i=[];for(const l of a){const u=this.labelCache.has(l)?this.labelCache.get(l):"";i.push(u)}a.push(...i);const s={id:n,label:a.join(` `)};return this.axons.includes(n)?this.dendrites.includes(n)||this.somas.includes(n)?s["both-a-d"]=!0:s.axon=!0:(this.dendrites.includes(n)||this.somas.includes(n))&&(s.dendrite=!0),s}on(r,n){this.addEventListener(r,n)}};const uD=[{selector:"node",style:{label:function(t){return dD(t.data("label"))},"background-color":"transparent","background-opacity":"0","text-valign":"center","text-wrap":"wrap",width:"80px",height:"80px","text-max-width":"80px","font-size":"6px",shape:"round-rectangle","border-width":1,"border-style":"solid","border-color":"gray"}},{selector:"node[axon]",style:{shape:"round-diamond",width:"100px",height:"100px"}},{selector:"node[dendrite]",style:{shape:"ellipse"}},{selector:"node[both-a-d]",style:{shape:"round-rectangle"}},{selector:"edge",style:{width:1,"line-color":"dimgray","target-arrow-color":"dimgray","target-arrow-shape":"triangle","curve-style":"bezier"}},{selector:"node.active",style:{"border-color":"#8300bf","background-color":"#f3ecf6","background-opacity":.75}}];function dD(t){const e=t.split(` `),r=e.length/2,n=e.slice(r);return Iv(n.join(` `))}function Iv(t){return t.split(` `).map(e=>e&&e[0]>="a"&&e[0]<="z"?e.charAt(0).toUpperCase()+e.slice(1):e).join(` `)}function Fc(t){const e=t?t.split(` `):[],r=[];for(let n=0;nr.idn.id?1:0),e.sort((r,n)=>r.idn.id?1:0);for(let r=0;r=((n=this.tooltip.parentElement)==null?void 0:n.offsetWidth)&&(this.tooltip.style.left=`${r-this.tooltip.offsetWidth}px`)}overNode(r){const a=r.target.data(),{label:i}=a,l=Fc(i).map(u=>u.label+" ("+u.id+")");this.tooltip.innerText=Iv(l.join(` `)),this.tooltip.style.left=`${r.renderedPosition.x}px`,this.tooltip.style.top=`${r.renderedPosition.y}px`,this.tooltip.style.maxWidth="240px",this.tooltip.style.zIndex=2,this.tooltip.hidden=!1,this.checkRightBoundary(r.renderedPosition.x),this.tapNode(r,!0)}moveNode(r){const n=r.target;this.tooltip.style.left=`${n.renderedPosition().x}px`,this.tooltip.style.top=`${n.renderedPosition().y}px`,this.checkRightBoundary(n.renderedPosition().x)}exitNode(r){this.tooltip.hidden=!0,this.tapNode(r,!1)}tapNode(r,n){const a=r.target,i=a.data();let{label:s}=i;n?a.addClass("active"):(a.removeClass("active"),s="",setTimeout(()=>{a.unselect()}));const l=Fc(s),u=new CustomEvent("tap-node",{detail:l});this.dispatchEvent(u)}on(r,n){this.addEventListener(r,n)}}const pD=1.3,vD=24*60*60*1e3,gD="Reset position",Mv="Lock zoom",mD="Unlock zoom",yD="Zoom in",bD="Zoom out",Fv=.25,wD="#8300bf",CD=3e3,kD={name:"ConnectivityGraph",props:{entry:{type:String,default:""},mapServer:{type:String,default:""},selectedConnectivityData:{type:Array,default:[]}},data:function(){return{loading:!0,connectivityGraph:null,selectedSource:"",pathList:[],schemaVersion:"",knowledgeByPath:new Map,labelledTerms:new Set,labelCache:new Map,resetLabel:gD,zoomLockLabel:Mv,zoomInLabel:yD,zoomOutLabel:bD,iconColor:wD,zoomEnabled:!1,connectivityError:null,timeoutID:void 0}},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()+vD;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{const n=r.detail;this.$emit("tap-node",n)})},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 where entity like 'ilxtr:%' and source=? 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(`select entity, knowledge from knowledge where entity in (?${", ?".repeat(this.labelledTerms.size-1)}) order by source desc`,[...this.labelledTerms.values()]);let e=null;for(const[n,a]of t.values)if(n!==e){const i=JSON.parse(a);this.labelCache.set(n,i.label||n),e=n}const r=Object.fromEntries(this.labelCache);sessionStorage.setItem("connectivity-graph-labels",JSON.stringify(r)),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()},zoomIn:function(){this.connectivityGraph.zoom(Fv)},zoomOut:function(){this.connectivityGraph.zoom(-Fv)},toggleZoom:function(){this.zoomEnabled=!this.zoomEnabled,this.zoomLockLabel=this.zoomEnabled?mD:Mv,this.connectivityGraph.enableZoom(!this.zoomEnabled)},showErrorMessage:function(t){this.connectivityError={...t},this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=setTimeout(()=>{this.connectivityError=null},CD)}}},xD={class:"connectivity-graph"},ED={ref:"graphCanvas",class:"graph-canvas"},SD={class:"control-panel control-panel-tools"},TD={class:"visually-hidden"},BD={class:"visually-hidden"},ND={class:"visually-hidden"},DD={class:"visually-hidden"},_D=o.createStaticVNode('
Origin
Components
Destination
',1),PD={key:0,class:"connectivity-graph-error"},OD={key:0};function LD(t,e,r,n,a,i){const s=H1,l=yt,u=sr,c=li,d=cb,f=hb,p=bb,v=Cb,h=Fl;return o.withDirectives((o.openBlock(),o.createElementBlock("div",xD,[o.createElementVNode("div",ED,null,512),o.createElementVNode("div",SD,[o.createElementVNode("div",{class:o.normalizeClass(["tools",{"zoom-locked":t.zoomEnabled}])},[o.createVNode(c,{content:t.resetLabel,placement:"top",effect:"control-tooltip"},{default:o.withCtx(()=>[o.createVNode(u,{class:o.normalizeClass(["control-button",t.theme]),size:"small",onClick:i.reset},{default:o.withCtx(()=>[o.createVNode(l,{color:"white"},{default:o.withCtx(()=>[o.createVNode(s)]),_:1}),o.createElementVNode("span",TD,o.toDisplayString(t.resetLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content"]),o.createVNode(c,{content:t.zoomLockLabel,placement:"top",effect:"control-tooltip"},{default:o.withCtx(()=>[o.createVNode(u,{class:o.normalizeClass(["control-button",t.theme]),size:"small",onClick:i.toggleZoom},{default:o.withCtx(()=>[o.createVNode(l,{color:"white"},{default:o.withCtx(()=>[t.zoomEnabled?(o.openBlock(),o.createBlock(d,{key:0})):(o.openBlock(),o.createBlock(f,{key:1}))]),_:1}),o.createElementVNode("span",BD,o.toDisplayString(t.zoomLockLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content"]),o.createVNode(c,{content:t.zoomInLabel,placement:"left",effect:"control-tooltip"},{default:o.withCtx(()=>[o.createVNode(u,{class:o.normalizeClass(["control-button",t.theme]),size:"small",onClick:i.zoomIn},{default:o.withCtx(()=>[o.createVNode(l,{color:"white"},{default:o.withCtx(()=>[o.createVNode(p)]),_:1}),o.createElementVNode("span",ND,o.toDisplayString(t.zoomInLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content"]),o.createVNode(c,{content:t.zoomOutLabel,placement:"left",effect:"control-tooltip"},{default:o.withCtx(()=>[o.createVNode(u,{class:o.normalizeClass(["control-button",t.theme]),size:"small",onClick:i.zoomOut},{default:o.withCtx(()=>[o.createVNode(l,{color:"white"},{default:o.withCtx(()=>[o.createVNode(v)]),_:1}),o.createElementVNode("span",DD,o.toDisplayString(t.zoomOutLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content"])],2)]),_D,t.connectivityError?(o.openBlock(),o.createElementBlock("div",PD,[t.connectivityError.errorConnectivities?(o.openBlock(),o.createElementBlock("strong",OD,o.toDisplayString(t.connectivityError.errorConnectivities),1)):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(t.connectivityError.errorMessage),1)])):o.createCommentVNode("",!0)])),[[h,t.loading]])}const ID=lr(kD,[["render",LD],["__scopeId","data-v-2ea51769"]]),Av="Copy to clipboard",MD="Copied!",FD="#8300bf",AD={name:"CopyToClipboard",props:{content:{type:String,default:""},theme:{type:String,default:""}},data:function(){return{textLabel:Av,autoHideTimeout:0,iconColor:FD}},methods:{copyToClipboard:async function(){let t=!0;this.autoHideTimeout=600;try{const e=this.content.replaceAll(` `,""),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"}),s=new ClipboardItem({"text/html":a,"text/plain":i});await navigator.clipboard.write([s])}catch(e){console.error("Error when trying to use navigator.clipboard.write()",e),t=!1}t?this.textLabel=MD:this.textLabel="Error trying to copy to clipboard!"},resetSettings:function(){this.autoHideTimeout=0,this.textLabel=Av}}},VD={class:"visually-hidden"};function RD(t,e,r,n,a,i){const s=Q1,l=yt,u=sr,c=li;return o.openBlock(),o.createBlock(c,{content:t.textLabel,placement:"bottom","hide-after":t.autoHideTimeout,effect:"clipboard-tooltip",onHide:i.resetSettings},{default:o.withCtx(()=>[o.createVNode(u,{class:o.normalizeClass(["copy-clipboard-button",r.theme]),size:"small",onClick:i.copyToClipboard},{default:o.withCtx(()=>[o.createVNode(l,{color:t.iconColor},{default:o.withCtx(()=>[o.createVNode(s)]),_:1},8,["color"]),o.createElementVNode("span",VD,o.toDisplayString(t.textLabel),1)]),_:1},8,["class","onClick"])]),_:1},8,["content","hide-after","onHide"])}const $D=lr(AD,[["render",RD],["__scopeId","data-v-de3b5311"]]),zD=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""},HD={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 zD(t)},handleTooltip:function(t){this.tooltipId=this.tooltipId===t?void 0:t,this.$emit("featureTooltip",this.tooltipId)}}},Ac=t=>(o.pushScopeId("data-v-8168ee98"),t=t(),o.popScopeId(),t),KD={class:"dialog-container"},qD=Ac(()=>o.createElementVNode("span",{class:"dialog-title"},"Finalise drawing",-1)),UD=Ac(()=>o.createElementVNode("span",{class:"dialog-title"},"Visualise connection",-1)),GD=Ac(()=>o.createElementVNode("b",null,[o.createElementVNode("span",null,"Related Features")],-1));function WD(t,e,r,n,a,i){const s=sr,l=JC,u=Bo,c=ci,d=ak;return o.openBlock(),o.createElementBlock("div",KD,[o.createVNode(u,null,{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[r.inDrawing?(o.openBlock(),o.createBlock(u,{key:0},{default:o.withCtx(()=>[qD,o.createVNode(l,null,{default:o.withCtx(()=>[o.createVNode(s,{type:"primary",plain:"",onClick:e[0]||(e[0]=f=>t.$emit("confirmDrawn",!0))},{default:o.withCtx(()=>[o.createTextVNode(" Confirm ")]),_:1}),o.createVNode(s,{type:"primary",plain:"",onClick:e[1]||(e[1]=f=>t.$emit("cancelDrawn",!0))},{default:o.withCtx(()=>[o.createTextVNode(" Cancel ")]),_:1})]),_:1})]),_:1})):(o.openBlock(),o.createBlock(u,{key:1},{default:o.withCtx(()=>[UD,o.createVNode(s,{type:"primary",plain:"",onClick:e[2]||(e[2]=f=>t.$emit("dialogDisplay",!1))},{default:o.withCtx(()=>[o.createTextVNode(" Close ")]),_:1})]),_:1}))]),_:1})]),_:1}),r.connectionExist?(o.openBlock(),o.createBlock(u,{key:0},{default:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[GD,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.connectionEntry,(f,p)=>(o.openBlock(),o.createBlock(u,{key:p},{default:o.withCtx(()=>[o.createVNode(d,{shadow:i.shadowDisplay(p),onClick:v=>i.handleTooltip(p)},{default:o.withCtx(()=>[o.createElementVNode("span",null,o.toDisplayString(i.capitalise(f.label)),1)]),_:2},1032,["shadow","onClick"])]),_:2},1024))),128))]),_:1})]),_:1})):o.createCommentVNode("",!0)])}const jD=lr(HD,[["render",WD],["__scopeId","data-v-8168ee98"]]),Vv=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r},YD=["xlink:href"],ZD={__name:"SvgIcon",props:{icon:{type:String,required:!0},spin:{type:Boolean,default:!1}},setup(t){return(e,r)=>(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(["map-icon",{"map-icon-spin":t.spin}])},[o.createElementVNode("use",{"xlink:href":`#${t.icon}`},null,8,YD)],2))}},XD=Vv(ZD,[["__scopeId","data-v-e172d5ff"]]),Rv=` 2horpanel ? `,$v=` 2vertpanel ? `,zv=` 3panel ? `,Hv=` 4panel ? `,Kv=` 2horpanel ? `,qv=` 2horpanel ? `,Uv=` 4panel ? `,Gv=` changeBckgd `,Wv=` close no bk `,jv=` close `,Yv=` closeFullScreen `,Zv=` Comment `,Xv=` Connection `,Qv=` dock `,Jv=` drawLine `,eg=` drawPoint `,tg=` drawPolygon `,rg=` drawTrash `,ng=` fitWindow `,ag=` fullScreen `,ig='DataPortal-Icons',og=` magnifyingGlass `,sg=`Created by Wahyu Prihantorofrom the Noun Project`,lg=` openMap `,cg=` Artboard Copy 6 `,ug=` permalink `,dg=` play `,fg=` resetZoom `,hg=` singlepanel ? `,pg=` tooltips ? `,vg=` undock `,gg=` zoomIn `,mg=` zoomOut `,yg=(t,e,r,n)=>{const a=["title","desc","defs","style"],i=["width","height"],s=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&&s.map(c=>{Object.values(l.querySelectorAll(`[${c}]`)).map(d=>{d.removeAttribute(c)})});const u=l.innerHTML;return l=null,u},bg=t=>[[/<\?xml[\s\S]*?>/gi,""],[//gi,""],[//gi,""],[/\<([A-Za-z]+)([^\>]*)\/\>/g,"<$1$2>"],[/\s+/g," "],[/\> \<"]].reduce((e,r)=>"".replace.apply(e,r),t).trim(),QD=!0,JD=!0,e_=["fill"],Vc=Object.assign({"/assets/icons/2horpanel.svg":Rv,"/assets/icons/2vertpanel.svg":$v,"/assets/icons/3panel.svg":zv,"/assets/icons/4panel.svg":Hv,"/assets/icons/5panel.svg":Kv,"/assets/icons/6panel.svg":qv,"/assets/icons/6panelVertical.svg":Uv,"/assets/icons/changeBckgd.svg":Gv,"/assets/icons/close-no-bk.svg":Wv,"/assets/icons/close.svg":jv,"/assets/icons/closeFullScreen.svg":Yv,"/assets/icons/comment.svg":Zv,"/assets/icons/connection.svg":Xv,"/assets/icons/dock.svg":Qv,"/assets/icons/drawLine.svg":Jv,"/assets/icons/drawPoint.svg":eg,"/assets/icons/drawPolygon.svg":tg,"/assets/icons/drawTrash.svg":rg,"/assets/icons/fitWindow.svg":ng,"/assets/icons/fullScreen.svg":ag,"/assets/icons/help.svg":ig,"/assets/icons/magnifyingGlass.svg":og,"/assets/icons/noun-filter.svg":sg,"/assets/icons/openMap.svg":lg,"/assets/icons/pause.svg":cg,"/assets/icons/permalink.svg":ug,"/assets/icons/play.svg":dg,"/assets/icons/resetZoom.svg":fg,"/assets/icons/singlepanel.svg":hg,"/assets/icons/tooltips.svg":pg,"/assets/icons/undock.svg":vg,"/assets/icons/zoomIn.svg":gg,"/assets/icons/zoomOut.svg":mg});Object.keys(Vc).map(t=>{const e=yg(Vc[t],QD,JD,e_),r=t.replace(/^.+\/(\w+).svg$/,"$1");return bg(e).replace("","symbol>")}).join(` `);const Rc=Object.assign({"/assets/icons/2horpanel.svg":Rv,"/assets/icons/2vertpanel.svg":$v,"/assets/icons/3panel.svg":zv,"/assets/icons/4panel.svg":Hv,"/assets/icons/5panel.svg":Kv,"/assets/icons/6panel.svg":qv,"/assets/icons/6panelVertical.svg":Uv,"/assets/icons/changeBckgd.svg":Gv,"/assets/icons/close-no-bk.svg":Wv,"/assets/icons/close.svg":jv,"/assets/icons/closeFullScreen.svg":Yv,"/assets/icons/comment.svg":Zv,"/assets/icons/connection.svg":Xv,"/assets/icons/dock.svg":Qv,"/assets/icons/drawLine.svg":Jv,"/assets/icons/drawPoint.svg":eg,"/assets/icons/drawPolygon.svg":tg,"/assets/icons/drawTrash.svg":rg,"/assets/icons/fitWindow.svg":ng,"/assets/icons/fullScreen.svg":ag,"/assets/icons/help.svg":ig,"/assets/icons/magnifyingGlass.svg":og,"/assets/icons/noun-filter.svg":sg,"/assets/icons/openMap.svg":lg,"/assets/icons/pause.svg":cg,"/assets/icons/permalink.svg":ug,"/assets/icons/play.svg":dg,"/assets/icons/resetZoom.svg":fg,"/assets/icons/singlepanel.svg":hg,"/assets/icons/tooltips.svg":pg,"/assets/icons/undock.svg":vg,"/assets/icons/zoomIn.svg":gg,"/assets/icons/zoomOut.svg":mg}),t_=Object.keys(Rc).map(t=>{const e=yg(Rc[t]),r=t.replace(/^.+\/(\w+).svg$/,"$1");return bg(e).replace("","symbol>")}),r_={name:"MapSvgSpriteColor",svgContext:Rc,svgSprite:t_.join(` `)},n_=["innerHTML"];function a_(t,e,r,n,a,i){return o.openBlock(),o.createElementBlock("svg",{width:"0",height:"0",style:{display:"none"},innerHTML:t.$options.svgSprite},null,8,n_)}const i_=Vv(r_,[["render",a_]]),o_=(t,e)=>{let r,n,a,i,s,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(),s=r-(a-c.clientX),l=n-(i-c.clientY),e.style.left=`${s}px`,e.style.top=`${l}px`}},s_={name:"DrawToolbar",components:{MapSvgIcon:XD,MapSvgSpriteColor:i_},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");o_(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)}},l_={class:"toolbar-container"},c_={class:"toolbar-icons"};function u_(t,e,r,n,a,i){const s=o.resolveComponent("map-svg-sprite-color"),l=o.resolveComponent("map-svg-icon"),u=Ol,c=jD;return o.openBlock(),o.createElementBlock("div",l_,[o.createVNode(s),o.createElementVNode("div",c_,[i.showEditModeIcon?(o.openBlock(),o.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:o.withCtx(()=>[o.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"])):o.createCommentVNode("",!0),i.showDeleteModeIcon?(o.openBlock(),o.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:o.withCtx(()=>[o.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"])):o.createCommentVNode("",!0),i.showDrawPointIcon?(o.openBlock(),o.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:o.withCtx(()=>[o.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"])):o.createCommentVNode("",!0),i.showDrawLineStringIcon?(o.openBlock(),o.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:o.withCtx(()=>[o.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"])):o.createCommentVNode("",!0),i.showDrawPolygonIcon?(o.openBlock(),o.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:o.withCtx(()=>[o.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"])):o.createCommentVNode("",!0),i.showConnectionIcon?(o.openBlock(),o.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:o.withCtx(()=>[o.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"])):o.createCommentVNode("",!0)]),r.mapCanvas?o.withDirectives((o.openBlock(),o.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"])),[[o.vShow,t.connectionDisplay]]):o.createCommentVNode("",!0)])}const d_=lr(s_,[["render",u_],["__scopeId","data-v-6ac1a744"]]),f_={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(s=>{const l=s.style.transform;this.extractMarkerPosition(l)===a&&s.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):""}}},$c=t=>(o.pushScopeId("data-v-3efb89fb"),t=t(),o.popScopeId(),t),h_=$c(()=>o.createElementVNode("h4",null,"Help Mode",-1)),p_=$c(()=>o.createElementVNode("p",null,[o.createTextVNode(" All caught up! "),o.createElementVNode("br"),o.createTextVNode(" Click 'Help' to restart. ")],-1)),v_=$c(()=>o.createElementVNode("p",null,'Click "Next" to see the next item.',-1));function g_(t,e,r,n,a,i){const s=sr;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["help-mode-dialog",{finish:r.lastItem}])},[h_,r.lastItem?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[p_,o.createElementVNode("div",null,[o.createVNode(s,{class:"button",onClick:i.finishHelpMode},{default:o.withCtx(()=>[o.createTextVNode(" Finish ")]),_:1},8,["onClick"])])],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[v_,o.createElementVNode("div",null,[o.createVNode(s,{class:"button",onClick:i.showNext},{default:o.withCtx(()=>[o.createTextVNode(" Next ")]),_:1},8,["onClick"]),o.createVNode(s,{class:"button secondary",onClick:i.finishHelpMode},{default:o.withCtx(()=>[o.createTextVNode(" Exit Help Mode ")]),_:1},8,["onClick"])])],64))],2)}const m_=lr(f_,[["render",g_],["__scopeId","data-v-3efb89fb"]]);function y_(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 Wi=new y_,b_={name:"ExternalResourceCard",props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:o.shallowRef(db)}},methods:{capitalise:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},openUrl:function(t){Wi.emit("open-pubmed-url",t),window.open(t,"_blank")}}},w_={class:"resource-container"};function C_(t,e,r,n,a,i){const s=sr;return o.openBlock(),o.createElementBlock("div",w_,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.resources,l=>(o.openBlock(),o.createElementBlock("div",{key:l.id,class:"resource"},[l.id==="pubmed"?(o.openBlock(),o.createBlock(s,{key:0,class:"button",id:"open-pubmed-button",icon:t.ElIconNotebook,onClick:u=>i.openUrl(l.url)},{default:o.withCtx(()=>[o.createTextVNode(" Open publications in PubMed ")]),_:2},1032,["icon","onClick"])):o.createCommentVNode("",!0)]))),128))])}const k_=lr(b_,[["render",C_],["__scopeId","data-v-4f8d8b0f"]]),x_=t=>t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),E_=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""},S_={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 x_(t)},capitalise:function(t){return E_(t)},openUrl:function(t){window.open(t,"_blank")},openAll:function(){Wi.emit("onActionClick",{type:"Facets",labels:this.tooltipEntry.componentsWithDatasets.map(t=>t.name)})},openAxons:function(){Wi.emit("onActionClick",{type:"Facets",labels:this.tooltipEntry.destinationsWithDatasets.map(t=>t.name)})},openDendrites:function(){Wi.emit("onActionClick",{type:"Facets",labels:this.tooltipEntry.originsWithDatasets.map(t=>t.name)})},pubmedSearchUrlUpdate:function(t){this.pubmedSearchUrl=t}}},$a=t=>(o.pushScopeId("data-v-ef9a0f6d"),t=t(),o.popScopeId(),t),T_={key:0,class:"main"},B_={key:0,class:"block"},N_={class:"title"},D_={key:0,class:"subtitle"},__={key:1,class:"block"},P_={class:"title"},O_={key:2,class:"attribute-title-container"},L_=$a(()=>o.createElementVNode("span",{class:"attribute-title"},"Alert",-1)),I_={style:{"word-break":"keep-all"}},M_={class:"content-container scrollbar"},F_={key:0,class:"block"},A_={class:"attribute-title-container"},V_=$a(()=>o.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),R_={style:{"word-break":"keep-all"}},$_=$a(()=>o.createElementVNode("i",null,"Origin",-1)),z_=["origin-item-label"],H_={key:0,class:"separator"},K_={key:1,class:"block"},q_=$a(()=>o.createElementVNode("div",{class:"attribute-title-container"},[o.createElementVNode("div",{class:"attribute-title"},"Components")],-1)),U_=["component-item-label"],G_={key:0,class:"separator"},W_={key:2,class:"block"},j_={class:"attribute-title-container"},Y_=$a(()=>o.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),Z_=$a(()=>o.createElementVNode("span",{style:{"word-break":"keep-all"}},[o.createElementVNode("i",null,"Destination"),o.createTextVNode(" is where the axons terminate ")],-1)),X_=["destination-item-label"],Q_={key:0,class:"separator"};function J_(t,e,r,n,a,i){const s=mb,l=yt,u=Ol,c=Wu,d=lo,f=sr,p=k_,v=Fl;return r.tooltipEntry?o.withDirectives((o.openBlock(),o.createElementBlock("div",T_,[r.tooltipEntry.title?(o.openBlock(),o.createElementBlock("div",B_,[o.createElementVNode("div",N_,o.toDisplayString(i.capitalise(r.tooltipEntry.title)),1),r.tooltipEntry.provenanceTaxonomyLabel&&r.tooltipEntry.provenanceTaxonomyLabel.length>0?(o.openBlock(),o.createElementBlock("div",D_,o.toDisplayString(i.provSpeciesDescription),1)):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",__,[o.createElementVNode("div",P_,o.toDisplayString(r.tooltipEntry.featureId),1)])),i.featuresAlert?(o.openBlock(),o.createElementBlock("div",O_,[L_,o.createVNode(u,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:o.withCtx(()=>[o.createVNode(l,{class:"info"},{default:o.withCtx(()=>[o.createVNode(s)]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",I_,o.toDisplayString(i.featuresAlert),1)]),_:1})])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:e[0]||(e[0]=h=>t.showDetails=!1)},[o.createTextVNode(" Hide path information "),o.createVNode(l,null,{default:o.withCtx(()=>[o.createVNode(c)]),_:1})],512),[[o.vShow,t.showDetails]]),o.withDirectives(o.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:e[1]||(e[1]=h=>t.showDetails=!0)},[o.createTextVNode(" Show path information "),o.createVNode(l,null,{default:o.withCtx(()=>[o.createVNode(d)]),_:1})],512),[[o.vShow,!t.showDetails]]),o.createVNode(o.Transition,{name:"slide-fade"},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",M_,[o.createTextVNode(o.toDisplayString(r.tooltipEntry.paths)+" ",1),r.tooltipEntry.origins&&r.tooltipEntry.origins.length>0?(o.openBlock(),o.createElementBlock("div",F_,[o.createElementVNode("div",A_,[V_,o.createVNode(u,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:o.withCtx(()=>[o.createVNode(l,{class:"info"},{default:o.withCtx(()=>[o.createVNode(s)]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",R_,[$_,o.createTextVNode(" "+o.toDisplayString(i.originDescription),1)])]),_:1})]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.tooltipEntry.origins,(h,g)=>(o.openBlock(),o.createElementBlock("div",{class:"attribute-content","origin-item-label":h,key:h},[o.createTextVNode(o.toDisplayString(i.capitalise(h))+" ",1),g!=r.tooltipEntry.origins.length-1?(o.openBlock(),o.createElementBlock("div",H_)):o.createCommentVNode("",!0)],8,z_))),128)),o.withDirectives(o.createVNode(f,{class:"button",id:"open-dendrites-button",onClick:i.openDendrites},{default:o.withCtx(()=>[o.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[o.vShow,r.tooltipEntry.originsWithDatasets&&r.tooltipEntry.originsWithDatasets.length>0]])])):o.createCommentVNode("",!0),r.tooltipEntry.components&&r.tooltipEntry.components.length>0?(o.openBlock(),o.createElementBlock("div",K_,[q_,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.tooltipEntry.components,(h,g)=>(o.openBlock(),o.createElementBlock("div",{class:"attribute-content","component-item-label":h,key:h},[o.createTextVNode(o.toDisplayString(i.capitalise(h))+" ",1),g!=r.tooltipEntry.components.length-1?(o.openBlock(),o.createElementBlock("div",G_)):o.createCommentVNode("",!0)],8,U_))),128))])):o.createCommentVNode("",!0),r.tooltipEntry.destinations&&r.tooltipEntry.destinations.length>0?(o.openBlock(),o.createElementBlock("div",W_,[o.createElementVNode("div",j_,[Y_,o.createVNode(u,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:o.withCtx(()=>[o.createVNode(l,{class:"info"},{default:o.withCtx(()=>[o.createVNode(s)]),_:1})]),default:o.withCtx(()=>[Z_]),_:1})]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.tooltipEntry.destinations,(h,g)=>(o.openBlock(),o.createElementBlock("div",{class:"attribute-content","destination-item-label":h,key:h},[o.createTextVNode(o.toDisplayString(i.capitalise(h))+" ",1),g!=r.tooltipEntry.destinations.length-1?(o.openBlock(),o.createElementBlock("div",Q_)):o.createCommentVNode("",!0)],8,X_))),128)),o.withDirectives(o.createVNode(f,{class:"button",onClick:i.openAxons},{default:o.withCtx(()=>[o.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[o.vShow,r.tooltipEntry.destinationsWithDatasets&&r.tooltipEntry.destinationsWithDatasets.length>0]])])):o.createCommentVNode("",!0),o.withDirectives(o.createVNode(f,{class:"button",onClick:i.openAll},{default:o.withCtx(()=>[o.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[o.vShow,r.tooltipEntry.componentsWithDatasets&&r.tooltipEntry.componentsWithDatasets.length>0]]),o.createVNode(p,{resources:i.resources},null,8,["resources"])],512),[[o.vShow,t.showDetails]])]),_:1})])),[[v,t.loading]]):o.createCommentVNode("",!0)}const eP=lr(S_,[["render",J_],["__scopeId","data-v-ef9a0f6d"]]),tP={name:"Tooltip",props:{tooltipEntry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}},mounted:function(){Wi.on("onActionClick",t=>{this.$emit("onActionClick",t)})}},rP={class:"tooltip-container",id:"tooltip-container"};function nP(t,e,r,n,a,i){const s=Mf,l=eP;return o.openBlock(),o.createElementBlock("div",rP,[r.annotationDisplay?(o.openBlock(),o.createBlock(s,{key:0,annotationEntry:r.annotationEntry,onAnnotation:e[0]||(e[0]=u=>t.$emit("annotation",u))},null,8,["annotationEntry"])):(o.openBlock(),o.createBlock(l,{key:1,tooltipEntry:r.tooltipEntry},null,8,["tooltipEntry"]))])}const aP=lr(tP,[["render",nP],["__scopeId","data-v-229b3988"]]),iP={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},enableFilter:{type:Boolean,default:!0}},data:function(){return{defaultExpandedKeys:["All"],filterText:"",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"}},filterText:{handler:function(t){this.$refs.regionTree&&this.$refs.regionTree.filter(t)}}},methods:{filterNode:function(t,e){return t?e.label?e.label.toLowerCase().includes(t.toLowerCase()):!1:!0},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,s=a.getBoundingClientRect().x,l=a.querySelector(".lastChildInItem");let u=0;if(l){const d=l.getBoundingClientRect();u=d.x+d.width-s}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},mounted:function(){this.$refs.regionTree&&this.$refs.regionTree.filter(this.filterText)}},oP={class:"selections-container"},sP={class:"title-text"},lP={class:"tree-container",ref:"treeContainer"},cP={class:"tooltip-text"},uP=["onClick","onMouseover","onMouseenter"],dP=["onClick","onMouseover","onMouseenter"],fP={class:"lastChildInItem"},hP={key:0,class:"node-options"};function pP(t,e,r,n,a,i){const s=ci,l=oi,u=Bo,c=Ol,d=ix,f=lE,p=Fl;return o.openBlock(),o.createElementBlock("div",oP,[r.title?(o.openBlock(),o.createBlock(u,{key:0},{default:o.withCtx(()=>[o.createVNode(s,{span:12},{default:o.withCtx(()=>[o.createElementVNode("div",sP,o.toDisplayString(r.title),1)]),_:1}),r.enableFilter?(o.openBlock(),o.createBlock(s,{key:0,span:12},{default:o.withCtx(()=>[o.createElementVNode("div",null,[o.createVNode(l,{class:"tree-filter-input",modelValue:t.filterText,"onUpdate:modelValue":e[0]||(e[0]=v=>t.filterText=v),placeholder:"Filter "+r.title},null,8,["modelValue","placeholder"])])]),_:1})):o.createCommentVNode("",!0)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",lP,[o.createElementVNode("div",{class:o.normalizeClass(["tree-tooltip",t.tooltipAtBottom?"bottom":""])},[o.createVNode(c,{ref:"tooltip",visible:t.tooltipVisible&&t.tooltipLabel!=="",placement:"top","show-arrow":!1,teleported:!1,trigger:"manual","popper-class":"tree-tooltip-popper","virtual-triggering":"",width:260},{default:o.withCtx(()=>[o.createElementVNode("div",cP,o.toDisplayString(t.tooltipLabel),1)]),_:1},8,["visible"])],2),o.withDirectives((o.openBlock(),o.createBlock(f,{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,"filter-node-method":i.filterNode,class:o.normalizeClass([r.mapType==="flatmap"?"hide_grandchildren_checkbox":""])},{default:o.withCtx(({node:v,data:h})=>[r.mapType==="flatmap"?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(["region-tree-node",{activeItem:i.nodeIsActive(h),hoverItem:i.nodeIsHover(h)}]),onClick:g=>i.changeActiveByNode(h),onMouseover:g=>i.changeHoverByNode(h,!1),onMouseenter:g=>i.displayTooltip(v.label,!0,g),onMouseleave:e[1]||(e[1]=g=>i.displayTooltip("",!1,g))},[o.createElementVNode("div",{style:o.normalizeStyle(i.getBackgroundStyles(h)),class:"lastChildInItem"},o.toDisplayString(v.label),5)],42,uP)):r.mapType==="scaffold"?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["region-tree-node",{activeItem:r.active.includes(h.id),hoverItem:r.hover.includes(h.id)}]),onClick:g=>i.changeActiveByNode(h,!0),onMouseover:g=>i.changeHoverByNode(h,!0,g),onMouseenter:g=>i.displayTooltip(v.label,!0,g),onMouseleave:e[2]||(e[2]=g=>i.displayTooltip("",!1,g))},[h.isPrimitives?(o.openBlock(),o.createBlock(d,{key:0,class:o.normalizeClass({"show-picker":r.showColourPicker}),modelValue:h.activeColour,"onUpdate:modelValue":g=>h.activeColour=g,size:"small","popper-class":t.myPopperClass,onChange:g=>i.setColour(h,g)},null,8,["class","modelValue","onUpdate:modelValue","popper-class","onChange"])):o.createCommentVNode("",!0),o.createElementVNode("div",fP,[o.createElementVNode("span",null,o.toDisplayString(v.label),1),h.isTextureSlides?(o.openBlock(),o.createElementBlock("span",hP," (Texture) ")):o.createCommentVNode("",!0)])],42,dP)):o.createCommentVNode("",!0)]),_:1},8,["node-key","data","default-expanded-keys","onCheck","filter-node-method","class"])),[[p,!r.isReady]])],512)])}const vP=lr(iP,[["render",pP],["__scopeId","data-v-823a8388"]]);$e.AnnotationPopup=Mf,$e.ConnectivityGraph=ID,$e.CopyToClipboard=$D,$e.CreateTooltipContent=DE,$e.DrawToolbar=d_,$e.HelpModeDialog=m_,$e.Tooltip=aP,$e.TreeControls=vP,Object.defineProperty($e,Symbol.toStringTag,{value:"Module"})});