mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-04-19 08:55:12 +00:00
69 lines
763 KiB
JavaScript
69 lines
763 KiB
JavaScript
var vS=Object.defineProperty;var bS=(e,t,n)=>t in e?vS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var le=(e,t,n)=>(bS(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var _v=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wS(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),n}var xS={exports:{}},bn="top",Ln="bottom",Nn="right",yn="left",Uc="auto",Lr=[bn,Ln,Nn,yn],Co="start",hr="end",vv="clippingParents",Oh="viewport",tr="popper",bv="reference",Id=Lr.reduce(function(e,t){return e.concat([t+"-"+Co,t+"-"+hr])},[]),Ih=[].concat(Lr,[Uc]).reduce(function(e,t){return e.concat([t,t+"-"+Co,t+"-"+hr])},[]),yv="beforeRead",wv="read",xv="afterRead",kv="beforeMain",Sv="main",Av="afterMain",$v="beforeWrite",Cv="write",Ev="afterWrite",Pv=[yv,wv,xv,kv,Sv,Av,$v,Cv,Ev];function Ps(e){return e?(e.nodeName||"").toLowerCase():null}function Fn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Eo(e){var t=Fn(e).Element;return e instanceof t||e instanceof Element}function Jn(e){var t=Fn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Rh(e){if(typeof ShadowRoot>"u")return!1;var t=Fn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function kS(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Jn(o)||!Ps(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(r){var a=i[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function SS(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var i=t.elements[s],o=t.attributes[s]||{},r=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),a=r.reduce(function(l,c){return l[c]="",l},{});!Jn(i)||!Ps(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Lh={name:"applyStyles",enabled:!0,phase:"write",fn:kS,effect:SS,requires:["computeStyles"]};function $s(e){return e.split("-")[0]}var bo=Math.max,xc=Math.min,fr=Math.round;function Rd(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Tv(){return!/^((?!chrome|android).)*safari/i.test(Rd())}function pr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),i=1,o=1;t&&Jn(e)&&(i=e.offsetWidth>0&&fr(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&fr(s.height)/e.offsetHeight||1);var r=Eo(e)?Fn(e):window,a=r.visualViewport,l=!Tv()&&n,c=(s.left+(l&&a?a.offsetLeft:0))/i,u=(s.top+(l&&a?a.offsetTop:0))/o,d=s.width/i,f=s.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Nh(e){var t=pr(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}function Mv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Rh(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Qs(e){return Fn(e).getComputedStyle(e)}function AS(e){return["table","td","th"].indexOf(Ps(e))>=0}function Vi(e){return((Eo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Kc(e){return Ps(e)==="html"?e:e.assignedSlot||e.parentNode||(Rh(e)?e.host:null)||Vi(e)}function ng(e){return!Jn(e)||Qs(e).position==="fixed"?null:e.offsetParent}function $S(e){var t=/firefox/i.test(Rd()),n=/Trident/i.test(Rd());if(n&&Jn(e)){var s=Qs(e);if(s.position==="fixed")return null}var i=Kc(e);for(Rh(i)&&(i=i.host);Jn(i)&&["html","body"].indexOf(Ps(i))<0;){var o=Qs(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function tl(e){for(var t=Fn(e),n=ng(e);n&&AS(n)&&Qs(n).position==="static";)n=ng(n);return n&&(Ps(n)==="html"||Ps(n)==="body"&&Qs(n).position==="static")?t:n||$S(e)||t}function Fh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function pa(e,t,n){return bo(e,xc(t,n))}function CS(e,t,n){var s=pa(e,t,n);return s>n?n:s}function Dv(){return{top:0,right:0,bottom:0,left:0}}function Ov(e){return Object.assign({},Dv(),e)}function Iv(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}var ES=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Ov(typeof t!="number"?t:Iv(t,Lr))};function PS(e){var t,n=e.state,s=e.name,i=e.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=$s(n.placement),l=Fh(a),c=[yn,Nn].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=ES(i.padding,n),f=Nh(o),p=l==="y"?bn:yn,m=l==="y"?Ln:Nn,_=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],b=r[l]-n.rects.reference[l],w=tl(o),A=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,$=_/2-b/2,M=d[p],k=A-f[u]-d[m],y=A/2-f[u]/2+$,x=pa(M,y,k),C=l;n.modifiersData[s]=(t={},t[C]=x,t.centerOffset=x-y,t)}}function TS(e){var t=e.state,n=e.options,s=n.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Mv(t.elements.popper,i)&&(t.elements.arrow=i))}const Rv={name:"arrow",enabled:!0,phase:"main",fn:PS,effect:TS,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gr(e){return e.split("-")[1]}var MS={top:"auto",right:"auto",bottom:"auto",left:"auto"};function DS(e,t){var n=e.x,s=e.y,i=t.devicePixelRatio||1;return{x:fr(n*i)/i||0,y:fr(s*i)/i||0}}function sg(e){var t,n=e.popper,s=e.popperRect,i=e.placement,o=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=r.x,p=f===void 0?0:f,m=r.y,_=m===void 0?0:m,b=typeof u=="function"?u({x:p,y:_}):{x:p,y:_};p=b.x,_=b.y;var w=r.hasOwnProperty("x"),A=r.hasOwnProperty("y"),$=yn,M=bn,k=window;if(c){var y=tl(n),x="clientHeight",C="clientWidth";if(y===Fn(n)&&(y=Vi(n),Qs(y).position!=="static"&&a==="absolute"&&(x="scrollHeight",C="scrollWidth")),y=y,i===bn||(i===yn||i===Nn)&&o===hr){M=Ln;var P=d&&y===k&&k.visualViewport?k.visualViewport.height:y[x];_-=P-s.height,_*=l?1:-1}if(i===yn||(i===bn||i===Ln)&&o===hr){$=Nn;var E=d&&y===k&&k.visualViewport?k.visualViewport.width:y[C];p-=E-s.width,p*=l?1:-1}}var B=Object.assign({position:a},c&&MS),G=u===!0?DS({x:p,y:_},Fn(n)):{x:p,y:_};if(p=G.x,_=G.y,l){var re;return Object.assign({},B,(re={},re[M]=A?"0":"",re[$]=w?"0":"",re.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+_+"px)":"translate3d("+p+"px, "+_+"px, 0)",re))}return Object.assign({},B,(t={},t[M]=A?_+"px":"",t[$]=w?p+"px":"",t.transform="",t))}function OS(e){var t=e.state,n=e.options,s=n.gpuAcceleration,i=s===void 0?!0:s,o=n.adaptive,r=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:$s(t.placement),variation:gr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,sg(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,sg(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Bh={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:OS,data:{}};var El={passive:!0};function IS(e){var t=e.state,n=e.instance,s=e.options,i=s.scroll,o=i===void 0?!0:i,r=s.resize,a=r===void 0?!0:r,l=Fn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,El)}),a&&l.addEventListener("resize",n.update,El),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,El)}),a&&l.removeEventListener("resize",n.update,El)}}const Vh={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:IS,data:{}};var RS={left:"right",right:"left",bottom:"top",top:"bottom"};function ic(e){return e.replace(/left|right|bottom|top/g,function(t){return RS[t]})}var LS={start:"end",end:"start"};function ig(e){return e.replace(/start|end/g,function(t){return LS[t]})}function Hh(e){var t=Fn(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}function jh(e){return pr(Vi(e)).left+Hh(e).scrollLeft}function NS(e,t){var n=Fn(e),s=Vi(e),i=n.visualViewport,o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;var c=Tv();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:r,x:a+jh(e),y:l}}function FS(e){var t,n=Vi(e),s=Hh(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=bo(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=bo(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+jh(e),l=-s.scrollTop;return Qs(i||n).direction==="rtl"&&(a+=bo(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Wh(e){var t=Qs(e),n=t.overflow,s=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function Lv(e){return["html","body","#document"].indexOf(Ps(e))>=0?e.ownerDocument.body:Jn(e)&&Wh(e)?e:Lv(Kc(e))}function ga(e,t){var n;t===void 0&&(t=[]);var s=Lv(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=Fn(s),r=i?[o].concat(o.visualViewport||[],Wh(s)?s:[]):s,a=t.concat(r);return i?a:a.concat(ga(Kc(r)))}function Ld(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function BS(e,t){var n=pr(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function og(e,t,n){return t===Oh?Ld(NS(e,n)):Eo(t)?BS(t,n):Ld(FS(Vi(e)))}function VS(e){var t=ga(Kc(e)),n=["absolute","fixed"].indexOf(Qs(e).position)>=0,s=n&&Jn(e)?tl(e):e;return Eo(s)?t.filter(function(i){return Eo(i)&&Mv(i,s)&&Ps(i)!=="body"}):[]}function HS(e,t,n,s){var i=t==="clippingParents"?VS(e):[].concat(t),o=[].concat(i,[n]),r=o[0],a=o.reduce(function(l,c){var u=og(e,c,s);return l.top=bo(u.top,l.top),l.right=xc(u.right,l.right),l.bottom=xc(u.bottom,l.bottom),l.left=bo(u.left,l.left),l},og(e,r,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Nv(e){var t=e.reference,n=e.element,s=e.placement,i=s?$s(s):null,o=s?gr(s):null,r=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case bn:l={x:r,y:t.y-n.height};break;case Ln:l={x:r,y:t.y+t.height};break;case Nn:l={x:t.x+t.width,y:a};break;case yn:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?Fh(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Co:l[c]=l[c]-(t[u]/2-n[u]/2);break;case hr:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function mr(e,t){t===void 0&&(t={});var n=t,s=n.placement,i=s===void 0?e.placement:s,o=n.strategy,r=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?vv:a,c=n.rootBoundary,u=c===void 0?Oh:c,d=n.elementContext,f=d===void 0?tr:d,p=n.altBoundary,m=p===void 0?!1:p,_=n.padding,b=_===void 0?0:_,w=Ov(typeof b!="number"?b:Iv(b,Lr)),A=f===tr?bv:tr,$=e.rects.popper,M=e.elements[m?A:f],k=HS(Eo(M)?M:M.contextElement||Vi(e.elements.popper),l,u,r),y=pr(e.elements.reference),x=Nv({reference:y,element:$,strategy:"absolute",placement:i}),C=Ld(Object.assign({},$,x)),P=f===tr?C:y,E={top:k.top-P.top+w.top,bottom:P.bottom-k.bottom+w.bottom,left:k.left-P.left+w.left,right:P.right-k.right+w.right},B=e.modifiersData.offset;if(f===tr&&B){var G=B[i];Object.keys(E).forEach(function(re){var Y=[Nn,Ln].indexOf(re)>=0?1:-1,L=[bn,Ln].indexOf(re)>=0?"y":"x";E[re]+=G[L]*Y})}return E}function jS(e,t){t===void 0&&(t={});var n=t,s=n.placement,i=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Ih:l,u=gr(s),d=u?a?Id:Id.filter(function(m){return gr(m)===u}):Lr,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,_){return m[_]=mr(e,{placement:_,boundary:i,rootBoundary:o,padding:r})[$s(_)],m},{});return Object.keys(p).sort(function(m,_){return p[m]-p[_]})}function WS(e){if($s(e)===Uc)return[];var t=ic(e);return[ig(e),t,ig(t)]}function zS(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,_=n.allowedAutoPlacements,b=t.options.placement,w=$s(b),A=w===b,$=l||(A||!m?[ic(b)]:WS(b)),M=[b].concat($).reduce(function(R,ee){return R.concat($s(ee)===Uc?jS(t,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:_}):ee)},[]),k=t.rects.reference,y=t.rects.popper,x=new Map,C=!0,P=M[0],E=0;E<M.length;E++){var B=M[E],G=$s(B),re=gr(B)===Co,Y=[bn,Ln].indexOf(G)>=0,L=Y?"width":"height",I=mr(t,{placement:B,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),V=Y?re?Nn:yn:re?Ln:bn;k[L]>y[L]&&(V=ic(V));var Q=ic(V),Z=[];if(o&&Z.push(I[G]<=0),a&&Z.push(I[V]<=0,I[Q]<=0),Z.every(function(R){return R})){P=B,C=!1;break}x.set(B,Z)}if(C)for(var ce=m?3:1,we=function(ee){var oe=M.find(function(T){var se=x.get(T);if(se)return se.slice(0,ee).every(function(de){return de})});if(oe)return P=oe,"break"},U=ce;U>0;U--){var X=we(U);if(X==="break")break}t.placement!==P&&(t.modifiersData[s]._skip=!0,t.placement=P,t.reset=!0)}}const Fv={name:"flip",enabled:!0,phase:"main",fn:zS,requiresIfExists:["offset"],data:{_skip:!1}};function rg(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ag(e){return[bn,Nn,Ln,yn].some(function(t){return e[t]>=0})}function YS(e){var t=e.state,n=e.name,s=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,r=mr(t,{elementContext:"reference"}),a=mr(t,{altBoundary:!0}),l=rg(r,s),c=rg(a,i,o),u=ag(l),d=ag(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Bv={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:YS};function US(e,t,n){var s=$s(e),i=[yn,bn].indexOf(s)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*i,[yn,Nn].indexOf(s)>=0?{x:a,y:r}:{x:r,y:a}}function KS(e){var t=e.state,n=e.options,s=e.name,i=n.offset,o=i===void 0?[0,0]:i,r=Ih.reduce(function(u,d){return u[d]=US(d,t.rects,o),u},{}),a=r[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[s]=r}const Vv={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:KS};function qS(e){var t=e.state,n=e.name;t.modifiersData[n]=Nv({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const zh={name:"popperOffsets",enabled:!0,phase:"read",fn:qS,data:{}};function GS(e){return e==="x"?"y":"x"}function JS(e){var t=e.state,n=e.options,s=e.name,i=n.mainAxis,o=i===void 0?!0:i,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,_=m===void 0?0:m,b=mr(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),w=$s(t.placement),A=gr(t.placement),$=!A,M=Fh(w),k=GS(M),y=t.modifiersData.popperOffsets,x=t.rects.reference,C=t.rects.popper,P=typeof _=="function"?_(Object.assign({},t.rects,{placement:t.placement})):_,E=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,G={x:0,y:0};if(y){if(o){var re,Y=M==="y"?bn:yn,L=M==="y"?Ln:Nn,I=M==="y"?"height":"width",V=y[M],Q=V+b[Y],Z=V-b[L],ce=p?-C[I]/2:0,we=A===Co?x[I]:C[I],U=A===Co?-C[I]:-x[I],X=t.elements.arrow,R=p&&X?Nh(X):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Dv(),oe=ee[Y],T=ee[L],se=pa(0,x[I],R[I]),de=$?x[I]/2-ce-se-oe-E.mainAxis:we-se-oe-E.mainAxis,ke=$?-x[I]/2+ce+se+T+E.mainAxis:U+se+T+E.mainAxis,N=t.elements.arrow&&tl(t.elements.arrow),fe=N?M==="y"?N.clientTop||0:N.clientLeft||0:0,v=(re=B==null?void 0:B[M])!=null?re:0,D=V+de-v-fe,H=V+ke-v,W=pa(p?xc(Q,D):Q,V,p?bo(Z,H):Z);y[M]=W,G[M]=W-V}if(a){var ie,j=M==="x"?bn:yn,te=M==="x"?Ln:Nn,J=y[k],he=k==="y"?"height":"width",me=J+b[j],pe=J-b[te],Le=[bn,yn].indexOf(w)!==-1,Oe=(ie=B==null?void 0:B[k])!=null?ie:0,He=Le?me:J-x[he]-C[he]-Oe+E.altAxis,Ve=Le?J+x[he]+C[he]-Oe-E.altAxis:pe,tt=p&&Le?CS(He,J,Ve):pa(p?He:me,J,p?Ve:pe);y[k]=tt,G[k]=tt-J}t.modifiersData[s]=G}}const Hv={name:"preventOverflow",enabled:!0,phase:"main",fn:JS,requiresIfExists:["offset"]};function XS(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function QS(e){return e===Fn(e)||!Jn(e)?Hh(e):XS(e)}function ZS(e){var t=e.getBoundingClientRect(),n=fr(t.width)/e.offsetWidth||1,s=fr(t.height)/e.offsetHeight||1;return n!==1||s!==1}function eA(e,t,n){n===void 0&&(n=!1);var s=Jn(t),i=Jn(t)&&ZS(t),o=Vi(t),r=pr(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!n)&&((Ps(t)!=="body"||Wh(o))&&(a=QS(t)),Jn(t)?(l=pr(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=jh(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function tA(e){var t=new Map,n=new Set,s=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),s.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),s}function nA(e){var t=tA(e);return Pv.reduce(function(n,s){return n.concat(t.filter(function(i){return i.phase===s}))},[])}function sA(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function iA(e){var t=e.reduce(function(n,s){var i=n[s.name];return n[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,n},{});return Object.keys(t).map(function(n){return t[n]})}var lg={placement:"bottom",modifiers:[],strategy:"absolute"};function cg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function qc(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,s=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?lg:i;return function(a,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},lg,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(w){var A=typeof w=="function"?w(u.options):w;_(),u.options=Object.assign({},o,u.options,A),u.scrollParents={reference:Eo(a)?ga(a):a.contextElement?ga(a.contextElement):[],popper:ga(l)};var $=nA(iA([].concat(s,u.options.modifiers)));return u.orderedModifiers=$.filter(function(M){return M.enabled}),m(),p.update()},forceUpdate:function(){if(!f){var w=u.elements,A=w.reference,$=w.popper;if(cg(A,$)){u.rects={reference:eA(A,tl($),u.options.strategy==="fixed"),popper:Nh($)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(E){return u.modifiersData[E.name]=Object.assign({},E.data)});for(var M=0;M<u.orderedModifiers.length;M++){if(u.reset===!0){u.reset=!1,M=-1;continue}var k=u.orderedModifiers[M],y=k.fn,x=k.options,C=x===void 0?{}:x,P=k.name;typeof y=="function"&&(u=y({state:u,options:C,name:P,instance:p})||u)}}}},update:sA(function(){return new Promise(function(b){p.forceUpdate(),b(u)})}),destroy:function(){_(),f=!0}};if(!cg(a,l))return p;p.setOptions(c).then(function(b){!f&&c.onFirstUpdate&&c.onFirstUpdate(b)});function m(){u.orderedModifiers.forEach(function(b){var w=b.name,A=b.options,$=A===void 0?{}:A,M=b.effect;if(typeof M=="function"){var k=M({state:u,name:w,instance:p,options:$}),y=function(){};d.push(k||y)}})}function _(){d.forEach(function(b){return b()}),d=[]}return p}}var oA=qc(),rA=[Vh,zh,Bh,Lh],aA=qc({defaultModifiers:rA}),lA=[Vh,zh,Bh,Lh,Vv,Fv,Hv,Rv,Bv],cA=qc({defaultModifiers:lA});const uA=Object.freeze(Object.defineProperty({__proto__:null,afterMain:Av,afterRead:xv,afterWrite:Ev,applyStyles:Lh,arrow:Rv,auto:Uc,basePlacements:Lr,beforeMain:kv,beforeRead:yv,beforeWrite:$v,bottom:Ln,clippingParents:vv,computeStyles:Bh,createPopper:cA,createPopperBase:oA,createPopperLite:aA,detectOverflow:mr,end:hr,eventListeners:Vh,flip:Fv,hide:Bv,left:yn,main:Sv,modifierPhases:Pv,offset:Vv,placements:Ih,popper:tr,popperGenerator:qc,popperOffsets:zh,preventOverflow:Hv,read:wv,reference:bv,right:Nn,start:Co,top:bn,variationPlacements:Id,viewport:Oh,write:Cv},Symbol.toStringTag,{value:"Module"})),dA=wS(uA);/*!
|
|
* Bootstrap v5.3.2 (https://getbootstrap.com/)
|
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
*/(function(e,t){(function(n,s){e.exports=s(dA)})(_v,function(n){function s(z){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(z){for(const S in z)if(S!=="default"){const K=Object.getOwnPropertyDescriptor(z,S);Object.defineProperty(g,S,K.get?K:{enumerable:!0,get:()=>z[S]})}}return g.default=z,Object.freeze(g)}const i=s(n),o=new Map,r={set(z,g,S){o.has(z)||o.set(z,new Map);const K=o.get(z);if(!K.has(g)&&K.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(K.keys())[0]}.`);return}K.set(g,S)},get(z,g){return o.has(z)&&o.get(z).get(g)||null},remove(z,g){if(!o.has(z))return;const S=o.get(z);S.delete(g),S.size===0&&o.delete(z)}},a=1e6,l=1e3,c="transitionend",u=z=>(z&&window.CSS&&window.CSS.escape&&(z=z.replace(/#([^\s"#']+)/g,(g,S)=>`#${CSS.escape(S)}`)),z),d=z=>z==null?`${z}`:Object.prototype.toString.call(z).match(/\s([a-z]+)/i)[1].toLowerCase(),f=z=>{do z+=Math.floor(Math.random()*a);while(document.getElementById(z));return z},p=z=>{if(!z)return 0;let{transitionDuration:g,transitionDelay:S}=window.getComputedStyle(z);const K=Number.parseFloat(g),ge=Number.parseFloat(S);return!K&&!ge?0:(g=g.split(",")[0],S=S.split(",")[0],(Number.parseFloat(g)+Number.parseFloat(S))*l)},m=z=>{z.dispatchEvent(new Event(c))},_=z=>!z||typeof z!="object"?!1:(typeof z.jquery<"u"&&(z=z[0]),typeof z.nodeType<"u"),b=z=>_(z)?z.jquery?z[0]:z:typeof z=="string"&&z.length>0?document.querySelector(u(z)):null,w=z=>{if(!_(z)||z.getClientRects().length===0)return!1;const g=getComputedStyle(z).getPropertyValue("visibility")==="visible",S=z.closest("details:not([open])");if(!S)return g;if(S!==z){const K=z.closest("summary");if(K&&K.parentNode!==S||K===null)return!1}return g},A=z=>!z||z.nodeType!==Node.ELEMENT_NODE||z.classList.contains("disabled")?!0:typeof z.disabled<"u"?z.disabled:z.hasAttribute("disabled")&&z.getAttribute("disabled")!=="false",$=z=>{if(!document.documentElement.attachShadow)return null;if(typeof z.getRootNode=="function"){const g=z.getRootNode();return g instanceof ShadowRoot?g:null}return z instanceof ShadowRoot?z:z.parentNode?$(z.parentNode):null},M=()=>{},k=z=>{z.offsetHeight},y=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,x=[],C=z=>{document.readyState==="loading"?(x.length||document.addEventListener("DOMContentLoaded",()=>{for(const g of x)g()}),x.push(z)):z()},P=()=>document.documentElement.dir==="rtl",E=z=>{C(()=>{const g=y();if(g){const S=z.NAME,K=g.fn[S];g.fn[S]=z.jQueryInterface,g.fn[S].Constructor=z,g.fn[S].noConflict=()=>(g.fn[S]=K,z.jQueryInterface)}})},B=(z,g=[],S=z)=>typeof z=="function"?z(...g):S,G=(z,g,S=!0)=>{if(!S){B(z);return}const ge=p(g)+5;let Pe=!1;const Ce=({target:Xe})=>{Xe===g&&(Pe=!0,g.removeEventListener(c,Ce),B(z))};g.addEventListener(c,Ce),setTimeout(()=>{Pe||m(g)},ge)},re=(z,g,S,K)=>{const ge=z.length;let Pe=z.indexOf(g);return Pe===-1?!S&&K?z[ge-1]:z[0]:(Pe+=S?1:-1,K&&(Pe=(Pe+ge)%ge),z[Math.max(0,Math.min(Pe,ge-1))])},Y=/[^.]*(?=\..*)\.|.*/,L=/\..*/,I=/::\d+$/,V={};let Q=1;const Z={mouseenter:"mouseover",mouseleave:"mouseout"},ce=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function we(z,g){return g&&`${g}::${Q++}`||z.uidEvent||Q++}function U(z){const g=we(z);return z.uidEvent=g,V[g]=V[g]||{},V[g]}function X(z,g){return function S(K){return fe(K,{delegateTarget:z}),S.oneOff&&N.off(z,K.type,g),g.apply(z,[K])}}function R(z,g,S){return function K(ge){const Pe=z.querySelectorAll(g);for(let{target:Ce}=ge;Ce&&Ce!==this;Ce=Ce.parentNode)for(const Xe of Pe)if(Xe===Ce)return fe(ge,{delegateTarget:Ce}),K.oneOff&&N.off(z,ge.type,g,S),S.apply(Ce,[ge])}}function ee(z,g,S=null){return Object.values(z).find(K=>K.callable===g&&K.delegationSelector===S)}function oe(z,g,S){const K=typeof g=="string",ge=K?S:g||S;let Pe=ke(z);return ce.has(Pe)||(Pe=z),[K,ge,Pe]}function T(z,g,S,K,ge){if(typeof g!="string"||!z)return;let[Pe,Ce,Xe]=oe(g,S,K);g in Z&&(Ce=(_S=>function(qo){if(!qo.relatedTarget||qo.relatedTarget!==qo.delegateTarget&&!qo.delegateTarget.contains(qo.relatedTarget))return _S.call(this,qo)})(Ce));const kn=U(z),zn=kn[Xe]||(kn[Xe]={}),qt=ee(zn,Ce,Pe?S:null);if(qt){qt.oneOff=qt.oneOff&≥return}const ms=we(Ce,g.replace(Y,"")),ts=Pe?R(z,S,Ce):X(z,Ce);ts.delegationSelector=Pe?S:null,ts.callable=Ce,ts.oneOff=ge,ts.uidEvent=ms,zn[ms]=ts,z.addEventListener(Xe,ts,Pe)}function se(z,g,S,K,ge){const Pe=ee(g[S],K,ge);Pe&&(z.removeEventListener(S,Pe,!!ge),delete g[S][Pe.uidEvent])}function de(z,g,S,K){const ge=g[S]||{};for(const[Pe,Ce]of Object.entries(ge))Pe.includes(K)&&se(z,g,S,Ce.callable,Ce.delegationSelector)}function ke(z){return z=z.replace(L,""),Z[z]||z}const N={on(z,g,S,K){T(z,g,S,K,!1)},one(z,g,S,K){T(z,g,S,K,!0)},off(z,g,S,K){if(typeof g!="string"||!z)return;const[ge,Pe,Ce]=oe(g,S,K),Xe=Ce!==g,kn=U(z),zn=kn[Ce]||{},qt=g.startsWith(".");if(typeof Pe<"u"){if(!Object.keys(zn).length)return;se(z,kn,Ce,Pe,ge?S:null);return}if(qt)for(const ms of Object.keys(kn))de(z,kn,ms,g.slice(1));for(const[ms,ts]of Object.entries(zn)){const Cl=ms.replace(I,"");(!Xe||g.includes(Cl))&&se(z,kn,Ce,ts.callable,ts.delegationSelector)}},trigger(z,g,S){if(typeof g!="string"||!z)return null;const K=y(),ge=ke(g),Pe=g!==ge;let Ce=null,Xe=!0,kn=!0,zn=!1;Pe&&K&&(Ce=K.Event(g,S),K(z).trigger(Ce),Xe=!Ce.isPropagationStopped(),kn=!Ce.isImmediatePropagationStopped(),zn=Ce.isDefaultPrevented());const qt=fe(new Event(g,{bubbles:Xe,cancelable:!0}),S);return zn&&qt.preventDefault(),kn&&z.dispatchEvent(qt),qt.defaultPrevented&&Ce&&Ce.preventDefault(),qt}};function fe(z,g={}){for(const[S,K]of Object.entries(g))try{z[S]=K}catch{Object.defineProperty(z,S,{configurable:!0,get(){return K}})}return z}function v(z){if(z==="true")return!0;if(z==="false")return!1;if(z===Number(z).toString())return Number(z);if(z===""||z==="null")return null;if(typeof z!="string")return z;try{return JSON.parse(decodeURIComponent(z))}catch{return z}}function D(z){return z.replace(/[A-Z]/g,g=>`-${g.toLowerCase()}`)}const H={setDataAttribute(z,g,S){z.setAttribute(`data-bs-${D(g)}`,S)},removeDataAttribute(z,g){z.removeAttribute(`data-bs-${D(g)}`)},getDataAttributes(z){if(!z)return{};const g={},S=Object.keys(z.dataset).filter(K=>K.startsWith("bs")&&!K.startsWith("bsConfig"));for(const K of S){let ge=K.replace(/^bs/,"");ge=ge.charAt(0).toLowerCase()+ge.slice(1,ge.length),g[ge]=v(z.dataset[K])}return g},getDataAttribute(z,g){return v(z.getAttribute(`data-bs-${D(g)}`))}};class W{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(g){return g=this._mergeConfigObj(g),g=this._configAfterMerge(g),this._typeCheckConfig(g),g}_configAfterMerge(g){return g}_mergeConfigObj(g,S){const K=_(S)?H.getDataAttribute(S,"config"):{};return{...this.constructor.Default,...typeof K=="object"?K:{},..._(S)?H.getDataAttributes(S):{},...typeof g=="object"?g:{}}}_typeCheckConfig(g,S=this.constructor.DefaultType){for(const[K,ge]of Object.entries(S)){const Pe=g[K],Ce=_(Pe)?"element":d(Pe);if(!new RegExp(ge).test(Ce))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${K}" provided type "${Ce}" but expected type "${ge}".`)}}}const ie="5.3.2";class j extends W{constructor(g,S){super(),g=b(g),g&&(this._element=g,this._config=this._getConfig(S),r.set(this._element,this.constructor.DATA_KEY,this))}dispose(){r.remove(this._element,this.constructor.DATA_KEY),N.off(this._element,this.constructor.EVENT_KEY);for(const g of Object.getOwnPropertyNames(this))this[g]=null}_queueCallback(g,S,K=!0){G(g,S,K)}_getConfig(g){return g=this._mergeConfigObj(g,this._element),g=this._configAfterMerge(g),this._typeCheckConfig(g),g}static getInstance(g){return r.get(b(g),this.DATA_KEY)}static getOrCreateInstance(g,S={}){return this.getInstance(g)||new this(g,typeof S=="object"?S:null)}static get VERSION(){return ie}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(g){return`${g}${this.EVENT_KEY}`}}const te=z=>{let g=z.getAttribute("data-bs-target");if(!g||g==="#"){let S=z.getAttribute("href");if(!S||!S.includes("#")&&!S.startsWith("."))return null;S.includes("#")&&!S.startsWith("#")&&(S=`#${S.split("#")[1]}`),g=S&&S!=="#"?u(S.trim()):null}return g},J={find(z,g=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(g,z))},findOne(z,g=document.documentElement){return Element.prototype.querySelector.call(g,z)},children(z,g){return[].concat(...z.children).filter(S=>S.matches(g))},parents(z,g){const S=[];let K=z.parentNode.closest(g);for(;K;)S.push(K),K=K.parentNode.closest(g);return S},prev(z,g){let S=z.previousElementSibling;for(;S;){if(S.matches(g))return[S];S=S.previousElementSibling}return[]},next(z,g){let S=z.nextElementSibling;for(;S;){if(S.matches(g))return[S];S=S.nextElementSibling}return[]},focusableChildren(z){const g=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(S=>`${S}:not([tabindex^="-"])`).join(",");return this.find(g,z).filter(S=>!A(S)&&w(S))},getSelectorFromElement(z){const g=te(z);return g&&J.findOne(g)?g:null},getElementFromSelector(z){const g=te(z);return g?J.findOne(g):null},getMultipleElementsFromSelector(z){const g=te(z);return g?J.find(g):[]}},he=(z,g="hide")=>{const S=`click.dismiss${z.EVENT_KEY}`,K=z.NAME;N.on(document,S,`[data-bs-dismiss="${K}"]`,function(ge){if(["A","AREA"].includes(this.tagName)&&ge.preventDefault(),A(this))return;const Pe=J.getElementFromSelector(this)||this.closest(`.${K}`);z.getOrCreateInstance(Pe)[g]()})},me="alert",Le=".bs.alert",Oe=`close${Le}`,He=`closed${Le}`,Ve="fade",tt="show";class Je extends j{static get NAME(){return me}close(){if(N.trigger(this._element,Oe).defaultPrevented)return;this._element.classList.remove(tt);const S=this._element.classList.contains(Ve);this._queueCallback(()=>this._destroyElement(),this._element,S)}_destroyElement(){this._element.remove(),N.trigger(this._element,He),this.dispose()}static jQueryInterface(g){return this.each(function(){const S=Je.getOrCreateInstance(this);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g](this)}})}}he(Je,"close"),E(Je);const gt="button",jn=".bs.button",ri=".data-api",Zn="active",Is='[data-bs-toggle="button"]',Ht=`click${jn}${ri}`;class ne extends j{static get NAME(){return gt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Zn))}static jQueryInterface(g){return this.each(function(){const S=ne.getOrCreateInstance(this);g==="toggle"&&S[g]()})}}N.on(document,Ht,Is,z=>{z.preventDefault();const g=z.target.closest(Is);ne.getOrCreateInstance(g).toggle()}),E(ne);const Se="swipe",ue=".bs.swipe",Ae=`touchstart${ue}`,De=`touchmove${ue}`,sn=`touchend${ue}`,xn=`pointerdown${ue}`,Rs=`pointerup${ue}`,Vo="touch",Ji="pen",gs="pointer-event",Wr=40,Tu={endCallback:null,leftCallback:null,rightCallback:null},Q1={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ml extends W{constructor(g,S){super(),this._element=g,!(!g||!ml.isSupported())&&(this._config=this._getConfig(S),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Tu}static get DefaultType(){return Q1}static get NAME(){return Se}dispose(){N.off(this._element,ue)}_start(g){if(!this._supportPointerEvents){this._deltaX=g.touches[0].clientX;return}this._eventIsPointerPenTouch(g)&&(this._deltaX=g.clientX)}_end(g){this._eventIsPointerPenTouch(g)&&(this._deltaX=g.clientX-this._deltaX),this._handleSwipe(),B(this._config.endCallback)}_move(g){this._deltaX=g.touches&&g.touches.length>1?0:g.touches[0].clientX-this._deltaX}_handleSwipe(){const g=Math.abs(this._deltaX);if(g<=Wr)return;const S=g/this._deltaX;this._deltaX=0,S&&B(S>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(N.on(this._element,xn,g=>this._start(g)),N.on(this._element,Rs,g=>this._end(g)),this._element.classList.add(gs)):(N.on(this._element,Ae,g=>this._start(g)),N.on(this._element,De,g=>this._move(g)),N.on(this._element,sn,g=>this._end(g)))}_eventIsPointerPenTouch(g){return this._supportPointerEvents&&(g.pointerType===Ji||g.pointerType===Vo)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Z1="carousel",ai=".bs.carousel",gp=".data-api",ew="ArrowLeft",tw="ArrowRight",nw=500,zr="next",Ho="prev",jo="left",_l="right",sw=`slide${ai}`,Mu=`slid${ai}`,iw=`keydown${ai}`,ow=`mouseenter${ai}`,rw=`mouseleave${ai}`,aw=`dragstart${ai}`,lw=`load${ai}${gp}`,cw=`click${ai}${gp}`,mp="carousel",vl="active",uw="slide",dw="carousel-item-end",hw="carousel-item-start",fw="carousel-item-next",pw="carousel-item-prev",_p=".active",vp=".carousel-item",gw=_p+vp,mw=".carousel-item img",_w=".carousel-indicators",vw="[data-bs-slide], [data-bs-slide-to]",bw='[data-bs-ride="carousel"]',yw={[ew]:_l,[tw]:jo},ww={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},xw={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Wo extends j{constructor(g,S){super(g,S),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=J.findOne(_w,this._element),this._addEventListeners(),this._config.ride===mp&&this.cycle()}static get Default(){return ww}static get DefaultType(){return xw}static get NAME(){return Z1}next(){this._slide(zr)}nextWhenVisible(){!document.hidden&&w(this._element)&&this.next()}prev(){this._slide(Ho)}pause(){this._isSliding&&m(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){N.one(this._element,Mu,()=>this.cycle());return}this.cycle()}}to(g){const S=this._getItems();if(g>S.length-1||g<0)return;if(this._isSliding){N.one(this._element,Mu,()=>this.to(g));return}const K=this._getItemIndex(this._getActive());if(K===g)return;const ge=g>K?zr:Ho;this._slide(ge,S[g])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(g){return g.defaultInterval=g.interval,g}_addEventListeners(){this._config.keyboard&&N.on(this._element,iw,g=>this._keydown(g)),this._config.pause==="hover"&&(N.on(this._element,ow,()=>this.pause()),N.on(this._element,rw,()=>this._maybeEnableCycle())),this._config.touch&&ml.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const K of J.find(mw,this._element))N.on(K,aw,ge=>ge.preventDefault());const S={leftCallback:()=>this._slide(this._directionToOrder(jo)),rightCallback:()=>this._slide(this._directionToOrder(_l)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),nw+this._config.interval))}};this._swipeHelper=new ml(this._element,S)}_keydown(g){if(/input|textarea/i.test(g.target.tagName))return;const S=yw[g.key];S&&(g.preventDefault(),this._slide(this._directionToOrder(S)))}_getItemIndex(g){return this._getItems().indexOf(g)}_setActiveIndicatorElement(g){if(!this._indicatorsElement)return;const S=J.findOne(_p,this._indicatorsElement);S.classList.remove(vl),S.removeAttribute("aria-current");const K=J.findOne(`[data-bs-slide-to="${g}"]`,this._indicatorsElement);K&&(K.classList.add(vl),K.setAttribute("aria-current","true"))}_updateInterval(){const g=this._activeElement||this._getActive();if(!g)return;const S=Number.parseInt(g.getAttribute("data-bs-interval"),10);this._config.interval=S||this._config.defaultInterval}_slide(g,S=null){if(this._isSliding)return;const K=this._getActive(),ge=g===zr,Pe=S||re(this._getItems(),K,ge,this._config.wrap);if(Pe===K)return;const Ce=this._getItemIndex(Pe),Xe=Cl=>N.trigger(this._element,Cl,{relatedTarget:Pe,direction:this._orderToDirection(g),from:this._getItemIndex(K),to:Ce});if(Xe(sw).defaultPrevented||!K||!Pe)return;const zn=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Ce),this._activeElement=Pe;const qt=ge?hw:dw,ms=ge?fw:pw;Pe.classList.add(ms),k(Pe),K.classList.add(qt),Pe.classList.add(qt);const ts=()=>{Pe.classList.remove(qt,ms),Pe.classList.add(vl),K.classList.remove(vl,ms,qt),this._isSliding=!1,Xe(Mu)};this._queueCallback(ts,K,this._isAnimated()),zn&&this.cycle()}_isAnimated(){return this._element.classList.contains(uw)}_getActive(){return J.findOne(gw,this._element)}_getItems(){return J.find(vp,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(g){return P()?g===jo?Ho:zr:g===jo?zr:Ho}_orderToDirection(g){return P()?g===Ho?jo:_l:g===Ho?_l:jo}static jQueryInterface(g){return this.each(function(){const S=Wo.getOrCreateInstance(this,g);if(typeof g=="number"){S.to(g);return}if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g]()}})}}N.on(document,cw,vw,function(z){const g=J.getElementFromSelector(this);if(!g||!g.classList.contains(mp))return;z.preventDefault();const S=Wo.getOrCreateInstance(g),K=this.getAttribute("data-bs-slide-to");if(K){S.to(K),S._maybeEnableCycle();return}if(H.getDataAttribute(this,"slide")==="next"){S.next(),S._maybeEnableCycle();return}S.prev(),S._maybeEnableCycle()}),N.on(window,lw,()=>{const z=J.find(bw);for(const g of z)Wo.getOrCreateInstance(g)}),E(Wo);const kw="collapse",Yr=".bs.collapse",Sw=".data-api",Aw=`show${Yr}`,$w=`shown${Yr}`,Cw=`hide${Yr}`,Ew=`hidden${Yr}`,Pw=`click${Yr}${Sw}`,Du="show",zo="collapse",bl="collapsing",Tw="collapsed",Mw=`:scope .${zo} .${zo}`,Dw="collapse-horizontal",Ow="width",Iw="height",Rw=".collapse.show, .collapse.collapsing",Ou='[data-bs-toggle="collapse"]',Lw={parent:null,toggle:!0},Nw={parent:"(null|element)",toggle:"boolean"};class Yo extends j{constructor(g,S){super(g,S),this._isTransitioning=!1,this._triggerArray=[];const K=J.find(Ou);for(const ge of K){const Pe=J.getSelectorFromElement(ge),Ce=J.find(Pe).filter(Xe=>Xe===this._element);Pe!==null&&Ce.length&&this._triggerArray.push(ge)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Lw}static get DefaultType(){return Nw}static get NAME(){return kw}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let g=[];if(this._config.parent&&(g=this._getFirstLevelChildren(Rw).filter(Xe=>Xe!==this._element).map(Xe=>Yo.getOrCreateInstance(Xe,{toggle:!1}))),g.length&&g[0]._isTransitioning||N.trigger(this._element,Aw).defaultPrevented)return;for(const Xe of g)Xe.hide();const K=this._getDimension();this._element.classList.remove(zo),this._element.classList.add(bl),this._element.style[K]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const ge=()=>{this._isTransitioning=!1,this._element.classList.remove(bl),this._element.classList.add(zo,Du),this._element.style[K]="",N.trigger(this._element,$w)},Ce=`scroll${K[0].toUpperCase()+K.slice(1)}`;this._queueCallback(ge,this._element,!0),this._element.style[K]=`${this._element[Ce]}px`}hide(){if(this._isTransitioning||!this._isShown()||N.trigger(this._element,Cw).defaultPrevented)return;const S=this._getDimension();this._element.style[S]=`${this._element.getBoundingClientRect()[S]}px`,k(this._element),this._element.classList.add(bl),this._element.classList.remove(zo,Du);for(const ge of this._triggerArray){const Pe=J.getElementFromSelector(ge);Pe&&!this._isShown(Pe)&&this._addAriaAndCollapsedClass([ge],!1)}this._isTransitioning=!0;const K=()=>{this._isTransitioning=!1,this._element.classList.remove(bl),this._element.classList.add(zo),N.trigger(this._element,Ew)};this._element.style[S]="",this._queueCallback(K,this._element,!0)}_isShown(g=this._element){return g.classList.contains(Du)}_configAfterMerge(g){return g.toggle=!!g.toggle,g.parent=b(g.parent),g}_getDimension(){return this._element.classList.contains(Dw)?Ow:Iw}_initializeChildren(){if(!this._config.parent)return;const g=this._getFirstLevelChildren(Ou);for(const S of g){const K=J.getElementFromSelector(S);K&&this._addAriaAndCollapsedClass([S],this._isShown(K))}}_getFirstLevelChildren(g){const S=J.find(Mw,this._config.parent);return J.find(g,this._config.parent).filter(K=>!S.includes(K))}_addAriaAndCollapsedClass(g,S){if(g.length)for(const K of g)K.classList.toggle(Tw,!S),K.setAttribute("aria-expanded",S)}static jQueryInterface(g){const S={};return typeof g=="string"&&/show|hide/.test(g)&&(S.toggle=!1),this.each(function(){const K=Yo.getOrCreateInstance(this,S);if(typeof g=="string"){if(typeof K[g]>"u")throw new TypeError(`No method named "${g}"`);K[g]()}})}}N.on(document,Pw,Ou,function(z){(z.target.tagName==="A"||z.delegateTarget&&z.delegateTarget.tagName==="A")&&z.preventDefault();for(const g of J.getMultipleElementsFromSelector(this))Yo.getOrCreateInstance(g,{toggle:!1}).toggle()}),E(Yo);const bp="dropdown",Xi=".bs.dropdown",Iu=".data-api",Fw="Escape",yp="Tab",Bw="ArrowUp",wp="ArrowDown",Vw=2,Hw=`hide${Xi}`,jw=`hidden${Xi}`,Ww=`show${Xi}`,zw=`shown${Xi}`,xp=`click${Xi}${Iu}`,kp=`keydown${Xi}${Iu}`,Yw=`keyup${Xi}${Iu}`,Uo="show",Uw="dropup",Kw="dropend",qw="dropstart",Gw="dropup-center",Jw="dropdown-center",Qi='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Xw=`${Qi}.${Uo}`,yl=".dropdown-menu",Qw=".navbar",Zw=".navbar-nav",ex=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",tx=P()?"top-end":"top-start",nx=P()?"top-start":"top-end",sx=P()?"bottom-end":"bottom-start",ix=P()?"bottom-start":"bottom-end",ox=P()?"left-start":"right-start",rx=P()?"right-start":"left-start",ax="top",lx="bottom",cx={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ux={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class es extends j{constructor(g,S){super(g,S),this._popper=null,this._parent=this._element.parentNode,this._menu=J.next(this._element,yl)[0]||J.prev(this._element,yl)[0]||J.findOne(yl,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return cx}static get DefaultType(){return ux}static get NAME(){return bp}toggle(){return this._isShown()?this.hide():this.show()}show(){if(A(this._element)||this._isShown())return;const g={relatedTarget:this._element};if(!N.trigger(this._element,Ww,g).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Zw))for(const K of[].concat(...document.body.children))N.on(K,"mouseover",M);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Uo),this._element.classList.add(Uo),N.trigger(this._element,zw,g)}}hide(){if(A(this._element)||!this._isShown())return;const g={relatedTarget:this._element};this._completeHide(g)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(g){if(!N.trigger(this._element,Hw,g).defaultPrevented){if("ontouchstart"in document.documentElement)for(const K of[].concat(...document.body.children))N.off(K,"mouseover",M);this._popper&&this._popper.destroy(),this._menu.classList.remove(Uo),this._element.classList.remove(Uo),this._element.setAttribute("aria-expanded","false"),H.removeDataAttribute(this._menu,"popper"),N.trigger(this._element,jw,g)}}_getConfig(g){if(g=super._getConfig(g),typeof g.reference=="object"&&!_(g.reference)&&typeof g.reference.getBoundingClientRect!="function")throw new TypeError(`${bp.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return g}_createPopper(){if(typeof i>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let g=this._element;this._config.reference==="parent"?g=this._parent:_(this._config.reference)?g=b(this._config.reference):typeof this._config.reference=="object"&&(g=this._config.reference);const S=this._getPopperConfig();this._popper=i.createPopper(g,this._menu,S)}_isShown(){return this._menu.classList.contains(Uo)}_getPlacement(){const g=this._parent;if(g.classList.contains(Kw))return ox;if(g.classList.contains(qw))return rx;if(g.classList.contains(Gw))return ax;if(g.classList.contains(Jw))return lx;const S=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return g.classList.contains(Uw)?S?nx:tx:S?ix:sx}_detectNavbar(){return this._element.closest(Qw)!==null}_getOffset(){const{offset:g}=this._config;return typeof g=="string"?g.split(",").map(S=>Number.parseInt(S,10)):typeof g=="function"?S=>g(S,this._element):g}_getPopperConfig(){const g={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(H.setDataAttribute(this._menu,"popper","static"),g.modifiers=[{name:"applyStyles",enabled:!1}]),{...g,...B(this._config.popperConfig,[g])}}_selectMenuItem({key:g,target:S}){const K=J.find(ex,this._menu).filter(ge=>w(ge));K.length&&re(K,S,g===wp,!K.includes(S)).focus()}static jQueryInterface(g){return this.each(function(){const S=es.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g]()}})}static clearMenus(g){if(g.button===Vw||g.type==="keyup"&&g.key!==yp)return;const S=J.find(Xw);for(const K of S){const ge=es.getInstance(K);if(!ge||ge._config.autoClose===!1)continue;const Pe=g.composedPath(),Ce=Pe.includes(ge._menu);if(Pe.includes(ge._element)||ge._config.autoClose==="inside"&&!Ce||ge._config.autoClose==="outside"&&Ce||ge._menu.contains(g.target)&&(g.type==="keyup"&&g.key===yp||/input|select|option|textarea|form/i.test(g.target.tagName)))continue;const Xe={relatedTarget:ge._element};g.type==="click"&&(Xe.clickEvent=g),ge._completeHide(Xe)}}static dataApiKeydownHandler(g){const S=/input|textarea/i.test(g.target.tagName),K=g.key===Fw,ge=[Bw,wp].includes(g.key);if(!ge&&!K||S&&!K)return;g.preventDefault();const Pe=this.matches(Qi)?this:J.prev(this,Qi)[0]||J.next(this,Qi)[0]||J.findOne(Qi,g.delegateTarget.parentNode),Ce=es.getOrCreateInstance(Pe);if(ge){g.stopPropagation(),Ce.show(),Ce._selectMenuItem(g);return}Ce._isShown()&&(g.stopPropagation(),Ce.hide(),Pe.focus())}}N.on(document,kp,Qi,es.dataApiKeydownHandler),N.on(document,kp,yl,es.dataApiKeydownHandler),N.on(document,xp,es.clearMenus),N.on(document,Yw,es.clearMenus),N.on(document,xp,Qi,function(z){z.preventDefault(),es.getOrCreateInstance(this).toggle()}),E(es);const Sp="backdrop",dx="fade",Ap="show",$p=`mousedown.bs.${Sp}`,hx={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},fx={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Cp extends W{constructor(g){super(),this._config=this._getConfig(g),this._isAppended=!1,this._element=null}static get Default(){return hx}static get DefaultType(){return fx}static get NAME(){return Sp}show(g){if(!this._config.isVisible){B(g);return}this._append();const S=this._getElement();this._config.isAnimated&&k(S),S.classList.add(Ap),this._emulateAnimation(()=>{B(g)})}hide(g){if(!this._config.isVisible){B(g);return}this._getElement().classList.remove(Ap),this._emulateAnimation(()=>{this.dispose(),B(g)})}dispose(){this._isAppended&&(N.off(this._element,$p),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const g=document.createElement("div");g.className=this._config.className,this._config.isAnimated&&g.classList.add(dx),this._element=g}return this._element}_configAfterMerge(g){return g.rootElement=b(g.rootElement),g}_append(){if(this._isAppended)return;const g=this._getElement();this._config.rootElement.append(g),N.on(g,$p,()=>{B(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(g){G(g,this._getElement(),this._config.isAnimated)}}const px="focustrap",wl=".bs.focustrap",gx=`focusin${wl}`,mx=`keydown.tab${wl}`,_x="Tab",vx="forward",Ep="backward",bx={autofocus:!0,trapElement:null},yx={autofocus:"boolean",trapElement:"element"};class Pp extends W{constructor(g){super(),this._config=this._getConfig(g),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return bx}static get DefaultType(){return yx}static get NAME(){return px}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),N.off(document,wl),N.on(document,gx,g=>this._handleFocusin(g)),N.on(document,mx,g=>this._handleKeydown(g)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,N.off(document,wl))}_handleFocusin(g){const{trapElement:S}=this._config;if(g.target===document||g.target===S||S.contains(g.target))return;const K=J.focusableChildren(S);K.length===0?S.focus():this._lastTabNavDirection===Ep?K[K.length-1].focus():K[0].focus()}_handleKeydown(g){g.key===_x&&(this._lastTabNavDirection=g.shiftKey?Ep:vx)}}const Tp=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Mp=".sticky-top",xl="padding-right",Dp="margin-right";class Ru{constructor(){this._element=document.body}getWidth(){const g=document.documentElement.clientWidth;return Math.abs(window.innerWidth-g)}hide(){const g=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,xl,S=>S+g),this._setElementAttributes(Tp,xl,S=>S+g),this._setElementAttributes(Mp,Dp,S=>S-g)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,xl),this._resetElementAttributes(Tp,xl),this._resetElementAttributes(Mp,Dp)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(g,S,K){const ge=this.getWidth(),Pe=Ce=>{if(Ce!==this._element&&window.innerWidth>Ce.clientWidth+ge)return;this._saveInitialAttribute(Ce,S);const Xe=window.getComputedStyle(Ce).getPropertyValue(S);Ce.style.setProperty(S,`${K(Number.parseFloat(Xe))}px`)};this._applyManipulationCallback(g,Pe)}_saveInitialAttribute(g,S){const K=g.style.getPropertyValue(S);K&&H.setDataAttribute(g,S,K)}_resetElementAttributes(g,S){const K=ge=>{const Pe=H.getDataAttribute(ge,S);if(Pe===null){ge.style.removeProperty(S);return}H.removeDataAttribute(ge,S),ge.style.setProperty(S,Pe)};this._applyManipulationCallback(g,K)}_applyManipulationCallback(g,S){if(_(g)){S(g);return}for(const K of J.find(g,this._element))S(K)}}const wx="modal",Wn=".bs.modal",xx=".data-api",kx="Escape",Sx=`hide${Wn}`,Ax=`hidePrevented${Wn}`,Op=`hidden${Wn}`,Ip=`show${Wn}`,$x=`shown${Wn}`,Cx=`resize${Wn}`,Ex=`click.dismiss${Wn}`,Px=`mousedown.dismiss${Wn}`,Tx=`keydown.dismiss${Wn}`,Mx=`click${Wn}${xx}`,Rp="modal-open",Dx="fade",Lp="show",Lu="modal-static",Ox=".modal.show",Ix=".modal-dialog",Rx=".modal-body",Lx='[data-bs-toggle="modal"]',Nx={backdrop:!0,focus:!0,keyboard:!0},Fx={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Zi extends j{constructor(g,S){super(g,S),this._dialog=J.findOne(Ix,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Ru,this._addEventListeners()}static get Default(){return Nx}static get DefaultType(){return Fx}static get NAME(){return wx}toggle(g){return this._isShown?this.hide():this.show(g)}show(g){this._isShown||this._isTransitioning||N.trigger(this._element,Ip,{relatedTarget:g}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Rp),this._adjustDialog(),this._backdrop.show(()=>this._showElement(g)))}hide(){!this._isShown||this._isTransitioning||N.trigger(this._element,Sx).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Lp),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){N.off(window,Wn),N.off(this._dialog,Wn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Cp({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Pp({trapElement:this._element})}_showElement(g){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const S=J.findOne(Rx,this._dialog);S&&(S.scrollTop=0),k(this._element),this._element.classList.add(Lp);const K=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,N.trigger(this._element,$x,{relatedTarget:g})};this._queueCallback(K,this._dialog,this._isAnimated())}_addEventListeners(){N.on(this._element,Tx,g=>{if(g.key===kx){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),N.on(window,Cx,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),N.on(this._element,Px,g=>{N.one(this._element,Ex,S=>{if(!(this._element!==g.target||this._element!==S.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Rp),this._resetAdjustments(),this._scrollBar.reset(),N.trigger(this._element,Op)})}_isAnimated(){return this._element.classList.contains(Dx)}_triggerBackdropTransition(){if(N.trigger(this._element,Ax).defaultPrevented)return;const S=this._element.scrollHeight>document.documentElement.clientHeight,K=this._element.style.overflowY;K==="hidden"||this._element.classList.contains(Lu)||(S||(this._element.style.overflowY="hidden"),this._element.classList.add(Lu),this._queueCallback(()=>{this._element.classList.remove(Lu),this._queueCallback(()=>{this._element.style.overflowY=K},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const g=this._element.scrollHeight>document.documentElement.clientHeight,S=this._scrollBar.getWidth(),K=S>0;if(K&&!g){const ge=P()?"paddingLeft":"paddingRight";this._element.style[ge]=`${S}px`}if(!K&&g){const ge=P()?"paddingRight":"paddingLeft";this._element.style[ge]=`${S}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(g,S){return this.each(function(){const K=Zi.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof K[g]>"u")throw new TypeError(`No method named "${g}"`);K[g](S)}})}}N.on(document,Mx,Lx,function(z){const g=J.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&z.preventDefault(),N.one(g,Ip,ge=>{ge.defaultPrevented||N.one(g,Op,()=>{w(this)&&this.focus()})});const S=J.findOne(Ox);S&&Zi.getInstance(S).hide(),Zi.getOrCreateInstance(g).toggle(this)}),he(Zi),E(Zi);const Bx="offcanvas",Ls=".bs.offcanvas",Np=".data-api",Vx=`load${Ls}${Np}`,Hx="Escape",Fp="show",Bp="showing",Vp="hiding",jx="offcanvas-backdrop",Hp=".offcanvas.show",Wx=`show${Ls}`,zx=`shown${Ls}`,Yx=`hide${Ls}`,jp=`hidePrevented${Ls}`,Wp=`hidden${Ls}`,Ux=`resize${Ls}`,Kx=`click${Ls}${Np}`,qx=`keydown.dismiss${Ls}`,Gx='[data-bs-toggle="offcanvas"]',Jx={backdrop:!0,keyboard:!0,scroll:!1},Xx={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Ns extends j{constructor(g,S){super(g,S),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Jx}static get DefaultType(){return Xx}static get NAME(){return Bx}toggle(g){return this._isShown?this.hide():this.show(g)}show(g){if(this._isShown||N.trigger(this._element,Wx,{relatedTarget:g}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Ru().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Bp);const K=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Fp),this._element.classList.remove(Bp),N.trigger(this._element,zx,{relatedTarget:g})};this._queueCallback(K,this._element,!0)}hide(){if(!this._isShown||N.trigger(this._element,Yx).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Vp),this._backdrop.hide();const S=()=>{this._element.classList.remove(Fp,Vp),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Ru().reset(),N.trigger(this._element,Wp)};this._queueCallback(S,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const g=()=>{if(this._config.backdrop==="static"){N.trigger(this._element,jp);return}this.hide()},S=!!this._config.backdrop;return new Cp({className:jx,isVisible:S,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:S?g:null})}_initializeFocusTrap(){return new Pp({trapElement:this._element})}_addEventListeners(){N.on(this._element,qx,g=>{if(g.key===Hx){if(this._config.keyboard){this.hide();return}N.trigger(this._element,jp)}})}static jQueryInterface(g){return this.each(function(){const S=Ns.getOrCreateInstance(this,g);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g](this)}})}}N.on(document,Kx,Gx,function(z){const g=J.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&z.preventDefault(),A(this))return;N.one(g,Wp,()=>{w(this)&&this.focus()});const S=J.findOne(Hp);S&&S!==g&&Ns.getInstance(S).hide(),Ns.getOrCreateInstance(g).toggle(this)}),N.on(window,Vx,()=>{for(const z of J.find(Hp))Ns.getOrCreateInstance(z).show()}),N.on(window,Ux,()=>{for(const z of J.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(z).position!=="fixed"&&Ns.getOrCreateInstance(z).hide()}),he(Ns),E(Ns);const zp={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Qx=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Zx=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ek=(z,g)=>{const S=z.nodeName.toLowerCase();return g.includes(S)?Qx.has(S)?!!Zx.test(z.nodeValue):!0:g.filter(K=>K instanceof RegExp).some(K=>K.test(S))};function tk(z,g,S){if(!z.length)return z;if(S&&typeof S=="function")return S(z);const ge=new window.DOMParser().parseFromString(z,"text/html"),Pe=[].concat(...ge.body.querySelectorAll("*"));for(const Ce of Pe){const Xe=Ce.nodeName.toLowerCase();if(!Object.keys(g).includes(Xe)){Ce.remove();continue}const kn=[].concat(...Ce.attributes),zn=[].concat(g["*"]||[],g[Xe]||[]);for(const qt of kn)ek(qt,zn)||Ce.removeAttribute(qt.nodeName)}return ge.body.innerHTML}const nk="TemplateFactory",sk={allowList:zp,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},ik={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ok={entry:"(string|element|function|null)",selector:"(string|element)"};class rk extends W{constructor(g){super(),this._config=this._getConfig(g)}static get Default(){return sk}static get DefaultType(){return ik}static get NAME(){return nk}getContent(){return Object.values(this._config.content).map(g=>this._resolvePossibleFunction(g)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(g){return this._checkContent(g),this._config.content={...this._config.content,...g},this}toHtml(){const g=document.createElement("div");g.innerHTML=this._maybeSanitize(this._config.template);for(const[ge,Pe]of Object.entries(this._config.content))this._setContent(g,Pe,ge);const S=g.children[0],K=this._resolvePossibleFunction(this._config.extraClass);return K&&S.classList.add(...K.split(" ")),S}_typeCheckConfig(g){super._typeCheckConfig(g),this._checkContent(g.content)}_checkContent(g){for(const[S,K]of Object.entries(g))super._typeCheckConfig({selector:S,entry:K},ok)}_setContent(g,S,K){const ge=J.findOne(K,g);if(ge){if(S=this._resolvePossibleFunction(S),!S){ge.remove();return}if(_(S)){this._putElementInTemplate(b(S),ge);return}if(this._config.html){ge.innerHTML=this._maybeSanitize(S);return}ge.textContent=S}}_maybeSanitize(g){return this._config.sanitize?tk(g,this._config.allowList,this._config.sanitizeFn):g}_resolvePossibleFunction(g){return B(g,[this])}_putElementInTemplate(g,S){if(this._config.html){S.innerHTML="",S.append(g);return}S.textContent=g.textContent}}const ak="tooltip",lk=new Set(["sanitize","allowList","sanitizeFn"]),Nu="fade",ck="modal",kl="show",uk=".tooltip-inner",Yp=`.${ck}`,Up="hide.bs.modal",Ur="hover",Fu="focus",dk="click",hk="manual",fk="hide",pk="hidden",gk="show",mk="shown",_k="inserted",vk="click",bk="focusin",yk="focusout",wk="mouseenter",xk="mouseleave",kk={AUTO:"auto",TOP:"top",RIGHT:P()?"left":"right",BOTTOM:"bottom",LEFT:P()?"right":"left"},Sk={allowList:zp,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Ak={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class eo extends j{constructor(g,S){if(typeof i>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(g,S),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Sk}static get DefaultType(){return Ak}static get NAME(){return ak}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),N.off(this._element.closest(Yp),Up,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const g=N.trigger(this._element,this.constructor.eventName(gk)),K=($(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(g.defaultPrevented||!K)return;this._disposePopper();const ge=this._getTipElement();this._element.setAttribute("aria-describedby",ge.getAttribute("id"));const{container:Pe}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(Pe.append(ge),N.trigger(this._element,this.constructor.eventName(_k))),this._popper=this._createPopper(ge),ge.classList.add(kl),"ontouchstart"in document.documentElement)for(const Xe of[].concat(...document.body.children))N.on(Xe,"mouseover",M);const Ce=()=>{N.trigger(this._element,this.constructor.eventName(mk)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(Ce,this.tip,this._isAnimated())}hide(){if(!this._isShown()||N.trigger(this._element,this.constructor.eventName(fk)).defaultPrevented)return;if(this._getTipElement().classList.remove(kl),"ontouchstart"in document.documentElement)for(const ge of[].concat(...document.body.children))N.off(ge,"mouseover",M);this._activeTrigger[dk]=!1,this._activeTrigger[Fu]=!1,this._activeTrigger[Ur]=!1,this._isHovered=null;const K=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),N.trigger(this._element,this.constructor.eventName(pk)))};this._queueCallback(K,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(g){const S=this._getTemplateFactory(g).toHtml();if(!S)return null;S.classList.remove(Nu,kl),S.classList.add(`bs-${this.constructor.NAME}-auto`);const K=f(this.constructor.NAME).toString();return S.setAttribute("id",K),this._isAnimated()&&S.classList.add(Nu),S}setContent(g){this._newContent=g,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(g){return this._templateFactory?this._templateFactory.changeContent(g):this._templateFactory=new rk({...this._config,content:g,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[uk]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(g){return this.constructor.getOrCreateInstance(g.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Nu)}_isShown(){return this.tip&&this.tip.classList.contains(kl)}_createPopper(g){const S=B(this._config.placement,[this,g,this._element]),K=kk[S.toUpperCase()];return i.createPopper(this._element,g,this._getPopperConfig(K))}_getOffset(){const{offset:g}=this._config;return typeof g=="string"?g.split(",").map(S=>Number.parseInt(S,10)):typeof g=="function"?S=>g(S,this._element):g}_resolvePossibleFunction(g){return B(g,[this._element])}_getPopperConfig(g){const S={placement:g,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:K=>{this._getTipElement().setAttribute("data-popper-placement",K.state.placement)}}]};return{...S,...B(this._config.popperConfig,[S])}}_setListeners(){const g=this._config.trigger.split(" ");for(const S of g)if(S==="click")N.on(this._element,this.constructor.eventName(vk),this._config.selector,K=>{this._initializeOnDelegatedTarget(K).toggle()});else if(S!==hk){const K=S===Ur?this.constructor.eventName(wk):this.constructor.eventName(bk),ge=S===Ur?this.constructor.eventName(xk):this.constructor.eventName(yk);N.on(this._element,K,this._config.selector,Pe=>{const Ce=this._initializeOnDelegatedTarget(Pe);Ce._activeTrigger[Pe.type==="focusin"?Fu:Ur]=!0,Ce._enter()}),N.on(this._element,ge,this._config.selector,Pe=>{const Ce=this._initializeOnDelegatedTarget(Pe);Ce._activeTrigger[Pe.type==="focusout"?Fu:Ur]=Ce._element.contains(Pe.relatedTarget),Ce._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},N.on(this._element.closest(Yp),Up,this._hideModalHandler)}_fixTitle(){const g=this._element.getAttribute("title");g&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",g),this._element.setAttribute("data-bs-original-title",g),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(g,S){clearTimeout(this._timeout),this._timeout=setTimeout(g,S)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(g){const S=H.getDataAttributes(this._element);for(const K of Object.keys(S))lk.has(K)&&delete S[K];return g={...S,...typeof g=="object"&&g?g:{}},g=this._mergeConfigObj(g),g=this._configAfterMerge(g),this._typeCheckConfig(g),g}_configAfterMerge(g){return g.container=g.container===!1?document.body:b(g.container),typeof g.delay=="number"&&(g.delay={show:g.delay,hide:g.delay}),typeof g.title=="number"&&(g.title=g.title.toString()),typeof g.content=="number"&&(g.content=g.content.toString()),g}_getDelegateConfig(){const g={};for(const[S,K]of Object.entries(this._config))this.constructor.Default[S]!==K&&(g[S]=K);return g.selector=!1,g.trigger="manual",g}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(g){return this.each(function(){const S=eo.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g]()}})}}E(eo);const $k="popover",Ck=".popover-header",Ek=".popover-body",Pk={...eo.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Tk={...eo.DefaultType,content:"(null|string|element|function)"};class Sl extends eo{static get Default(){return Pk}static get DefaultType(){return Tk}static get NAME(){return $k}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Ck]:this._getTitle(),[Ek]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(g){return this.each(function(){const S=Sl.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g]()}})}}E(Sl);const Mk="scrollspy",Bu=".bs.scrollspy",Dk=".data-api",Ok=`activate${Bu}`,Kp=`click${Bu}`,Ik=`load${Bu}${Dk}`,Rk="dropdown-item",Ko="active",Lk='[data-bs-spy="scroll"]',Vu="[href]",Nk=".nav, .list-group",qp=".nav-link",Fk=`${qp}, .nav-item > ${qp}, .list-group-item`,Bk=".dropdown",Vk=".dropdown-toggle",Hk={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},jk={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Kr extends j{constructor(g,S){super(g,S),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Hk}static get DefaultType(){return jk}static get NAME(){return Mk}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const g of this._observableSections.values())this._observer.observe(g)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(g){return g.target=b(g.target)||document.body,g.rootMargin=g.offset?`${g.offset}px 0px -30%`:g.rootMargin,typeof g.threshold=="string"&&(g.threshold=g.threshold.split(",").map(S=>Number.parseFloat(S))),g}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(N.off(this._config.target,Kp),N.on(this._config.target,Kp,Vu,g=>{const S=this._observableSections.get(g.target.hash);if(S){g.preventDefault();const K=this._rootElement||window,ge=S.offsetTop-this._element.offsetTop;if(K.scrollTo){K.scrollTo({top:ge,behavior:"smooth"});return}K.scrollTop=ge}}))}_getNewObserver(){const g={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(S=>this._observerCallback(S),g)}_observerCallback(g){const S=Ce=>this._targetLinks.get(`#${Ce.target.id}`),K=Ce=>{this._previousScrollData.visibleEntryTop=Ce.target.offsetTop,this._process(S(Ce))},ge=(this._rootElement||document.documentElement).scrollTop,Pe=ge>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=ge;for(const Ce of g){if(!Ce.isIntersecting){this._activeTarget=null,this._clearActiveClass(S(Ce));continue}const Xe=Ce.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(Pe&&Xe){if(K(Ce),!ge)return;continue}!Pe&&!Xe&&K(Ce)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const g=J.find(Vu,this._config.target);for(const S of g){if(!S.hash||A(S))continue;const K=J.findOne(decodeURI(S.hash),this._element);w(K)&&(this._targetLinks.set(decodeURI(S.hash),S),this._observableSections.set(S.hash,K))}}_process(g){this._activeTarget!==g&&(this._clearActiveClass(this._config.target),this._activeTarget=g,g.classList.add(Ko),this._activateParents(g),N.trigger(this._element,Ok,{relatedTarget:g}))}_activateParents(g){if(g.classList.contains(Rk)){J.findOne(Vk,g.closest(Bk)).classList.add(Ko);return}for(const S of J.parents(g,Nk))for(const K of J.prev(S,Fk))K.classList.add(Ko)}_clearActiveClass(g){g.classList.remove(Ko);const S=J.find(`${Vu}.${Ko}`,g);for(const K of S)K.classList.remove(Ko)}static jQueryInterface(g){return this.each(function(){const S=Kr.getOrCreateInstance(this,g);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g]()}})}}N.on(window,Ik,()=>{for(const z of J.find(Lk))Kr.getOrCreateInstance(z)}),E(Kr);const Wk="tab",to=".bs.tab",zk=`hide${to}`,Yk=`hidden${to}`,Uk=`show${to}`,Kk=`shown${to}`,qk=`click${to}`,Gk=`keydown${to}`,Jk=`load${to}`,Xk="ArrowLeft",Gp="ArrowRight",Qk="ArrowUp",Jp="ArrowDown",Hu="Home",Xp="End",no="active",Qp="fade",ju="show",Zk="dropdown",Zp=".dropdown-toggle",eS=".dropdown-menu",Wu=`:not(${Zp})`,tS='.list-group, .nav, [role="tablist"]',nS=".nav-item, .list-group-item",sS=`.nav-link${Wu}, .list-group-item${Wu}, [role="tab"]${Wu}`,eg='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',zu=`${sS}, ${eg}`,iS=`.${no}[data-bs-toggle="tab"], .${no}[data-bs-toggle="pill"], .${no}[data-bs-toggle="list"]`;class so extends j{constructor(g){super(g),this._parent=this._element.closest(tS),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),N.on(this._element,Gk,S=>this._keydown(S)))}static get NAME(){return Wk}show(){const g=this._element;if(this._elemIsActive(g))return;const S=this._getActiveElem(),K=S?N.trigger(S,zk,{relatedTarget:g}):null;N.trigger(g,Uk,{relatedTarget:S}).defaultPrevented||K&&K.defaultPrevented||(this._deactivate(S,g),this._activate(g,S))}_activate(g,S){if(!g)return;g.classList.add(no),this._activate(J.getElementFromSelector(g));const K=()=>{if(g.getAttribute("role")!=="tab"){g.classList.add(ju);return}g.removeAttribute("tabindex"),g.setAttribute("aria-selected",!0),this._toggleDropDown(g,!0),N.trigger(g,Kk,{relatedTarget:S})};this._queueCallback(K,g,g.classList.contains(Qp))}_deactivate(g,S){if(!g)return;g.classList.remove(no),g.blur(),this._deactivate(J.getElementFromSelector(g));const K=()=>{if(g.getAttribute("role")!=="tab"){g.classList.remove(ju);return}g.setAttribute("aria-selected",!1),g.setAttribute("tabindex","-1"),this._toggleDropDown(g,!1),N.trigger(g,Yk,{relatedTarget:S})};this._queueCallback(K,g,g.classList.contains(Qp))}_keydown(g){if(![Xk,Gp,Qk,Jp,Hu,Xp].includes(g.key))return;g.stopPropagation(),g.preventDefault();const S=this._getChildren().filter(ge=>!A(ge));let K;if([Hu,Xp].includes(g.key))K=S[g.key===Hu?0:S.length-1];else{const ge=[Gp,Jp].includes(g.key);K=re(S,g.target,ge,!0)}K&&(K.focus({preventScroll:!0}),so.getOrCreateInstance(K).show())}_getChildren(){return J.find(zu,this._parent)}_getActiveElem(){return this._getChildren().find(g=>this._elemIsActive(g))||null}_setInitialAttributes(g,S){this._setAttributeIfNotExists(g,"role","tablist");for(const K of S)this._setInitialAttributesOnChild(K)}_setInitialAttributesOnChild(g){g=this._getInnerElement(g);const S=this._elemIsActive(g),K=this._getOuterElement(g);g.setAttribute("aria-selected",S),K!==g&&this._setAttributeIfNotExists(K,"role","presentation"),S||g.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(g,"role","tab"),this._setInitialAttributesOnTargetPanel(g)}_setInitialAttributesOnTargetPanel(g){const S=J.getElementFromSelector(g);S&&(this._setAttributeIfNotExists(S,"role","tabpanel"),g.id&&this._setAttributeIfNotExists(S,"aria-labelledby",`${g.id}`))}_toggleDropDown(g,S){const K=this._getOuterElement(g);if(!K.classList.contains(Zk))return;const ge=(Pe,Ce)=>{const Xe=J.findOne(Pe,K);Xe&&Xe.classList.toggle(Ce,S)};ge(Zp,no),ge(eS,ju),K.setAttribute("aria-expanded",S)}_setAttributeIfNotExists(g,S,K){g.hasAttribute(S)||g.setAttribute(S,K)}_elemIsActive(g){return g.classList.contains(no)}_getInnerElement(g){return g.matches(zu)?g:J.findOne(zu,g)}_getOuterElement(g){return g.closest(nS)||g}static jQueryInterface(g){return this.each(function(){const S=so.getOrCreateInstance(this);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g]()}})}}N.on(document,qk,eg,function(z){["A","AREA"].includes(this.tagName)&&z.preventDefault(),!A(this)&&so.getOrCreateInstance(this).show()}),N.on(window,Jk,()=>{for(const z of J.find(iS))so.getOrCreateInstance(z)}),E(so);const oS="toast",li=".bs.toast",rS=`mouseover${li}`,aS=`mouseout${li}`,lS=`focusin${li}`,cS=`focusout${li}`,uS=`hide${li}`,dS=`hidden${li}`,hS=`show${li}`,fS=`shown${li}`,pS="fade",tg="hide",Al="show",$l="showing",gS={animation:"boolean",autohide:"boolean",delay:"number"},mS={animation:!0,autohide:!0,delay:5e3};class qr extends j{constructor(g,S){super(g,S),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return mS}static get DefaultType(){return gS}static get NAME(){return oS}show(){if(N.trigger(this._element,hS).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(pS);const S=()=>{this._element.classList.remove($l),N.trigger(this._element,fS),this._maybeScheduleHide()};this._element.classList.remove(tg),k(this._element),this._element.classList.add(Al,$l),this._queueCallback(S,this._element,this._config.animation)}hide(){if(!this.isShown()||N.trigger(this._element,uS).defaultPrevented)return;const S=()=>{this._element.classList.add(tg),this._element.classList.remove($l,Al),N.trigger(this._element,dS)};this._element.classList.add($l),this._queueCallback(S,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Al),super.dispose()}isShown(){return this._element.classList.contains(Al)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(g,S){switch(g.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=S;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=S;break}}if(S){this._clearTimeout();return}const K=g.relatedTarget;this._element===K||this._element.contains(K)||this._maybeScheduleHide()}_setListeners(){N.on(this._element,rS,g=>this._onInteraction(g,!0)),N.on(this._element,aS,g=>this._onInteraction(g,!1)),N.on(this._element,lS,g=>this._onInteraction(g,!0)),N.on(this._element,cS,g=>this._onInteraction(g,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(g){return this.each(function(){const S=qr.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g](this)}})}}return he(qr),E(qr),{Alert:Je,Button:ne,Carousel:Wo,Collapse:Yo,Dropdown:es,Modal:Zi,Offcanvas:Ns,Popover:Sl,ScrollSpy:Kr,Tab:so,Toast:qr,Tooltip:eo}})})(xS);/**
|
|
* @vue/shared v3.4.29
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**//*! #__NO_SIDE_EFFECTS__ */function Yh(e,t){const n=new Set(e.split(","));return t?s=>n.has(s.toLowerCase()):s=>n.has(s)}const vt={},rr=[],Kn=()=>{},hA=()=>!1,Gc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Uh=e=>e.startsWith("onUpdate:"),Lt=Object.assign,Kh=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},fA=Object.prototype.hasOwnProperty,it=(e,t)=>fA.call(e,t),Be=Array.isArray,ar=e=>nl(e)==="[object Map]",Nr=e=>nl(e)==="[object Set]",ug=e=>nl(e)==="[object Date]",Ue=e=>typeof e=="function",St=e=>typeof e=="string",Zs=e=>typeof e=="symbol",ht=e=>e!==null&&typeof e=="object",jv=e=>(ht(e)||Ue(e))&&Ue(e.then)&&Ue(e.catch),Wv=Object.prototype.toString,nl=e=>Wv.call(e),pA=e=>nl(e).slice(8,-1),zv=e=>nl(e)==="[object Object]",qh=e=>St(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ma=Yh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Jc=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},gA=/-(\w)/g,Ts=Jc(e=>e.replace(gA,(t,n)=>n?n.toUpperCase():"")),mA=/\B([A-Z])/g,Oo=Jc(e=>e.replace(mA,"-$1").toLowerCase()),Xc=Jc(e=>e.charAt(0).toUpperCase()+e.slice(1)),Yu=Jc(e=>e?`on${Xc(e)}`:""),Ii=(e,t)=>!Object.is(e,t),oc=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Yv=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},kc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Uv=e=>{const t=St(e)?Number(e):NaN;return isNaN(t)?e:t};let dg;const Kv=()=>dg||(dg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Wt(e){if(Be(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=St(s)?yA(s):Wt(s);if(i)for(const o in i)t[o]=i[o]}return t}else if(St(e)||ht(e))return e}const _A=/;(?![^(]*\))/g,vA=/:([^]+)/,bA=/\/\*[^]*?\*\//g;function yA(e){const t={};return e.replace(bA,"").split(_A).forEach(n=>{if(n){const s=n.split(vA);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ee(e){let t="";if(St(e))t=e;else if(Be(e))for(let n=0;n<e.length;n++){const s=Ee(e[n]);s&&(t+=s+" ")}else if(ht(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Xt(e){if(!e)return null;let{class:t,style:n}=e;return t&&!St(t)&&(e.class=Ee(t)),n&&(e.style=Wt(n)),e}const wA="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",xA=Yh(wA);function qv(e){return!!e||e===""}function kA(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Po(e[s],t[s]);return n}function Po(e,t){if(e===t)return!0;let n=ug(e),s=ug(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Zs(e),s=Zs(t),n||s)return e===t;if(n=Be(e),s=Be(t),n||s)return n&&s?kA(e,t):!1;if(n=ht(e),s=ht(t),n||s){if(!n||!s)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const r in e){const a=e.hasOwnProperty(r),l=t.hasOwnProperty(r);if(a&&!l||!a&&l||!Po(e[r],t[r]))return!1}}return String(e)===String(t)}function Gh(e,t){return e.findIndex(n=>Po(n,t))}const ve=e=>St(e)?e:e==null?"":Be(e)||ht(e)&&(e.toString===Wv||!Ue(e.toString))?JSON.stringify(e,Gv,2):String(e),Gv=(e,t)=>t&&t.__v_isRef?Gv(e,t.value):ar(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],o)=>(n[Uu(s,o)+" =>"]=i,n),{})}:Nr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Uu(n))}:Zs(t)?Uu(t):ht(t)&&!Be(t)&&!zv(t)?String(t):t,Uu=(e,t="")=>{var n;return Zs(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
* @vue/reactivity v3.4.29
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let Mn;class Jv{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Mn,!t&&Mn&&(this.index=(Mn.scopes||(Mn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Mn;try{return Mn=this,t()}finally{Mn=n}}}on(){Mn=this}off(){Mn=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function Xv(e){return new Jv(e)}function SA(e,t=Mn){t&&t.active&&t.effects.push(e)}function Qc(){return Mn}function Jh(e){Mn&&Mn.cleanups.push(e)}let yo;class Xh{constructor(t,n,s,i){this.fn=t,this.trigger=n,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=5,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,SA(this,i)}get dirty(){if(this._dirtyLevel===2)return!1;if(this._dirtyLevel===3||this._dirtyLevel===4){this._dirtyLevel=1,Hi();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed){if(n.computed.effect._dirtyLevel===2)return!0;if(AA(n.computed),this._dirtyLevel>=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),ji()}return this._dirtyLevel>=5}set dirty(t){this._dirtyLevel=t?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Pi,n=yo;try{return Pi=!0,yo=this,this._runnings++,hg(this),this.fn()}finally{fg(this),this._runnings--,yo=n,Pi=t}}stop(){this.active&&(hg(this),fg(this),this.onStop&&this.onStop(),this.active=!1)}}function AA(e){return e.value}function hg(e){e._trackId++,e._depsLength=0}function fg(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Qv(e.deps[t],e);e.deps.length=e._depsLength}}function Qv(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Pi=!0,Nd=0;const Zv=[];function Hi(){Zv.push(Pi),Pi=!1}function ji(){const e=Zv.pop();Pi=e===void 0?!0:e}function Qh(){Nd++}function Zh(){for(Nd--;!Nd&&Fd.length;)Fd.shift()()}function eb(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const s=e.deps[e._depsLength];s!==t?(s&&Qv(s,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Fd=[];function tb(e,t,n){Qh();for(const s of e.keys()){if(!e.computed&&s.computed&&e.get(s)===s._trackId&&s._runnings>0){s._dirtyLevel=2;continue}let i;s._dirtyLevel<t&&(i??(i=e.get(s)===s._trackId))&&(s._shouldSchedule||(s._shouldSchedule=s._dirtyLevel===0),s.computed&&s._dirtyLevel===2&&(s._shouldSchedule=!0),s._dirtyLevel=t),s._shouldSchedule&&(i??(i=e.get(s)===s._trackId))&&(s.trigger(),(!s._runnings||s.allowRecurse)&&s._dirtyLevel!==3&&(s._shouldSchedule=!1,s.scheduler&&Fd.push(s.scheduler)))}Zh()}const nb=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Sc=new WeakMap,wo=Symbol(""),Bd=Symbol("");function Pn(e,t,n){if(Pi&&yo){let s=Sc.get(e);s||Sc.set(e,s=new Map);let i=s.get(n);i||s.set(n,i=nb(()=>s.delete(n))),eb(yo,i)}}function Xs(e,t,n,s,i,o){const r=Sc.get(e);if(!r)return;let a=[];if(t==="clear")a=[...r.values()];else if(n==="length"&&Be(e)){const l=Number(s);r.forEach((c,u)=>{(u==="length"||!Zs(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(r.get(n)),t){case"add":Be(e)?qh(n)&&a.push(r.get("length")):(a.push(r.get(wo)),ar(e)&&a.push(r.get(Bd)));break;case"delete":Be(e)||(a.push(r.get(wo)),ar(e)&&a.push(r.get(Bd)));break;case"set":ar(e)&&a.push(r.get(wo));break}Qh();for(const l of a)l&&tb(l,5);Zh()}function $A(e,t){const n=Sc.get(e);return n&&n.get(t)}const CA=Yh("__proto__,__v_isRef,__isVue"),sb=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Zs)),pg=EA();function EA(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=Ze(this);for(let o=0,r=this.length;o<r;o++)Pn(s,"get",o+"");const i=s[t](...n);return i===-1||i===!1?s[t](...n.map(Ze)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Hi(),Qh();const s=Ze(this)[t].apply(this,n);return Zh(),ji(),s}}),e}function PA(e){Zs(e)||(e=String(e));const t=Ze(this);return Pn(t,"has",e),t.hasOwnProperty(e)}class ib{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(i?o?jA:lb:o?ab:rb).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=Be(t);if(!i){if(r&&it(pg,n))return Reflect.get(pg,n,s);if(n==="hasOwnProperty")return PA}const a=Reflect.get(t,n,s);return(Zs(n)?sb.has(n):CA(n))||(i||Pn(t,"get",n),o)?a:Et(a)?r&&qh(n)?a:a.value:ht(a)?i?ub(a):Ds(a):a}}class ob extends ib{constructor(t=!1){super(!1,t)}set(t,n,s,i){let o=t[n];if(!this._isShallow){const l=Oa(o);if(!Ac(s)&&!Oa(s)&&(o=Ze(o),s=Ze(s)),!Be(t)&&Et(o)&&!Et(s))return l?!1:(o.value=s,!0)}const r=Be(t)&&qh(n)?Number(n)<t.length:it(t,n),a=Reflect.set(t,n,s,i);return t===Ze(i)&&(r?Ii(s,o)&&Xs(t,"set",n,s):Xs(t,"add",n,s)),a}deleteProperty(t,n){const s=it(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&s&&Xs(t,"delete",n,void 0),i}has(t,n){const s=Reflect.has(t,n);return(!Zs(n)||!sb.has(n))&&Pn(t,"has",n),s}ownKeys(t){return Pn(t,"iterate",Be(t)?"length":wo),Reflect.ownKeys(t)}}class TA extends ib{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const MA=new ob,DA=new TA,OA=new ob(!0);const ef=e=>e,Zc=e=>Reflect.getPrototypeOf(e);function Pl(e,t,n=!1,s=!1){e=e.__v_raw;const i=Ze(e),o=Ze(t);n||(Ii(t,o)&&Pn(i,"get",t),Pn(i,"get",o));const{has:r}=Zc(i),a=s?ef:n?sf:Ia;if(r.call(i,t))return a(e.get(t));if(r.call(i,o))return a(e.get(o));e!==i&&e.get(t)}function Tl(e,t=!1){const n=this.__v_raw,s=Ze(n),i=Ze(e);return t||(Ii(e,i)&&Pn(s,"has",e),Pn(s,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Ml(e,t=!1){return e=e.__v_raw,!t&&Pn(Ze(e),"iterate",wo),Reflect.get(e,"size",e)}function gg(e){e=Ze(e);const t=Ze(this);return Zc(t).has.call(t,e)||(t.add(e),Xs(t,"add",e,e)),this}function mg(e,t){t=Ze(t);const n=Ze(this),{has:s,get:i}=Zc(n);let o=s.call(n,e);o||(e=Ze(e),o=s.call(n,e));const r=i.call(n,e);return n.set(e,t),o?Ii(t,r)&&Xs(n,"set",e,t):Xs(n,"add",e,t),this}function _g(e){const t=Ze(this),{has:n,get:s}=Zc(t);let i=n.call(t,e);i||(e=Ze(e),i=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return i&&Xs(t,"delete",e,void 0),o}function vg(){const e=Ze(this),t=e.size!==0,n=e.clear();return t&&Xs(e,"clear",void 0,void 0),n}function Dl(e,t){return function(s,i){const o=this,r=o.__v_raw,a=Ze(r),l=t?ef:e?sf:Ia;return!e&&Pn(a,"iterate",wo),r.forEach((c,u)=>s.call(i,l(c),l(u),o))}}function Ol(e,t,n){return function(...s){const i=this.__v_raw,o=Ze(i),r=ar(o),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,c=i[e](...s),u=n?ef:t?sf:Ia;return!t&&Pn(o,"iterate",l?Bd:wo),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function ci(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function IA(){const e={get(o){return Pl(this,o)},get size(){return Ml(this)},has:Tl,add:gg,set:mg,delete:_g,clear:vg,forEach:Dl(!1,!1)},t={get(o){return Pl(this,o,!1,!0)},get size(){return Ml(this)},has:Tl,add:gg,set:mg,delete:_g,clear:vg,forEach:Dl(!1,!0)},n={get(o){return Pl(this,o,!0)},get size(){return Ml(this,!0)},has(o){return Tl.call(this,o,!0)},add:ci("add"),set:ci("set"),delete:ci("delete"),clear:ci("clear"),forEach:Dl(!0,!1)},s={get(o){return Pl(this,o,!0,!0)},get size(){return Ml(this,!0)},has(o){return Tl.call(this,o,!0)},add:ci("add"),set:ci("set"),delete:ci("delete"),clear:ci("clear"),forEach:Dl(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Ol(o,!1,!1),n[o]=Ol(o,!0,!1),t[o]=Ol(o,!1,!0),s[o]=Ol(o,!0,!0)}),[e,n,t,s]}const[RA,LA,NA,FA]=IA();function tf(e,t){const n=t?e?FA:NA:e?LA:RA;return(s,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?s:Reflect.get(it(n,i)&&i in s?n:s,i,o)}const BA={get:tf(!1,!1)},VA={get:tf(!1,!0)},HA={get:tf(!0,!1)};const rb=new WeakMap,ab=new WeakMap,lb=new WeakMap,jA=new WeakMap;function WA(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zA(e){return e.__v_skip||!Object.isExtensible(e)?0:WA(pA(e))}function Ds(e){return Oa(e)?e:nf(e,!1,MA,BA,rb)}function cb(e){return nf(e,!1,OA,VA,ab)}function ub(e){return nf(e,!0,DA,HA,lb)}function nf(e,t,n,s,i){if(!ht(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const r=zA(e);if(r===0)return e;const a=new Proxy(e,r===2?s:n);return i.set(e,a),a}function xo(e){return Oa(e)?xo(e.__v_raw):!!(e&&e.__v_isReactive)}function Oa(e){return!!(e&&e.__v_isReadonly)}function Ac(e){return!!(e&&e.__v_isShallow)}function eu(e){return e?!!e.__v_raw:!1}function Ze(e){const t=e&&e.__v_raw;return t?Ze(t):e}function tu(e){return Object.isExtensible(e)&&Yv(e,"__v_skip",!0),e}const Ia=e=>ht(e)?Ds(e):e,sf=e=>ht(e)?ub(e):e;class db{constructor(t,n,s,i){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Xh(()=>t(this._value),()=>rc(this,this.effect._dirtyLevel===3?3:4)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=s}get value(){const t=Ze(this);return(!t._cacheable||t.effect.dirty)&&Ii(t._value,t._value=t.effect.run())&&rc(t,5),hb(t),t.effect._dirtyLevel>=2&&rc(t,3),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function YA(e,t,n=!1){let s,i;const o=Ue(e);return o?(s=e,i=Kn):(s=e.get,i=e.set),new db(s,i,o||!i,n)}function hb(e){var t;Pi&&yo&&(e=Ze(e),eb(yo,(t=e.dep)!=null?t:e.dep=nb(()=>e.dep=void 0,e instanceof db?e:void 0)))}function rc(e,t=5,n,s){e=Ze(e);const i=e.dep;i&&tb(i,t)}function Et(e){return!!(e&&e.__v_isRef===!0)}function be(e){return fb(e,!1)}function of(e){return fb(e,!0)}function fb(e,t){return Et(e)?e:new UA(e,t)}class UA{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Ze(t),this._value=n?t:Ia(t)}get value(){return hb(this),this._value}set value(t){const n=this.__v_isShallow||Ac(t)||Oa(t);t=n?t:Ze(t),Ii(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:Ia(t),rc(this,5))}}function q(e){return Et(e)?e.value:e}const KA={get:(e,t,n)=>q(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return Et(i)&&!Et(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};function pb(e){return xo(e)?e:new Proxy(e,KA)}function qA(e){const t=Be(e)?new Array(e.length):{};for(const n in e)t[n]=gb(e,n);return t}class GA{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return $A(Ze(this._object),this._key)}}class JA{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ra(e,t,n){return Et(e)?e:Ue(e)?new JA(e):ht(e)&&arguments.length>1?gb(e,t,n):be(e)}function gb(e,t,n){const s=e[t];return Et(s)?s:new GA(e,t,n)}/**
|
|
* @vue/runtime-core v3.4.29
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Ti(e,t,n,s){try{return s?e(...s):e()}catch(i){sl(i,t,n)}}function Xn(e,t,n,s){if(Ue(e)){const i=Ti(e,t,n,s);return i&&jv(i)&&i.catch(o=>{sl(o,t,n)}),i}if(Be(e)){const i=[];for(let o=0;o<e.length;o++)i.push(Xn(e[o],t,n,s));return i}}function sl(e,t,n,s=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const r=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](e,r,a)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){Hi(),Ti(l,null,10,[e,r,a]),ji();return}}XA(e,n,i,s)}function XA(e,t,n,s=!0){console.error(e)}let La=!1,Vd=!1;const un=[];let ys=0;const lr=[];let _i=null,mo=0;const mb=Promise.resolve();let rf=null;function Zt(e){const t=rf||mb;return e?t.then(this?e.bind(this):e):t}function QA(e){let t=ys+1,n=un.length;for(;t<n;){const s=t+n>>>1,i=un[s],o=Na(i);o<e||o===e&&i.pre?t=s+1:n=s}return t}function af(e){(!un.length||!un.includes(e,La&&e.allowRecurse?ys+1:ys))&&(e.id==null?un.push(e):un.splice(QA(e.id),0,e),_b())}function _b(){!La&&!Vd&&(Vd=!0,rf=mb.then(bb))}function ZA(e){const t=un.indexOf(e);t>ys&&un.splice(t,1)}function Hd(e){Be(e)?lr.push(...e):(!_i||!_i.includes(e,e.allowRecurse?mo+1:mo))&&lr.push(e),_b()}function bg(e,t,n=La?ys+1:0){for(;n<un.length;n++){const s=un[n];if(s&&s.pre){if(e&&s.id!==e.uid)continue;un.splice(n,1),n--,s()}}}function vb(e){if(lr.length){const t=[...new Set(lr)].sort((n,s)=>Na(n)-Na(s));if(lr.length=0,_i){_i.push(...t);return}for(_i=t,mo=0;mo<_i.length;mo++){const n=_i[mo];n.active!==!1&&n()}_i=null,mo=0}}const Na=e=>e.id==null?1/0:e.id,e$=(e,t)=>{const n=Na(e)-Na(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function bb(e){Vd=!1,La=!0,un.sort(e$);try{for(ys=0;ys<un.length;ys++){const t=un[ys];t&&t.active!==!1&&Ti(t,null,14)}}finally{ys=0,un.length=0,vb(),La=!1,rf=null,(un.length||lr.length)&&bb()}}function t$(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||vt;let i=n;const o=t.startsWith("update:"),r=o&&t.slice(7);if(r&&r in s){const u=`${r==="modelValue"?"model":r}Modifiers`,{number:d,trim:f}=s[u]||vt;f&&(i=n.map(p=>St(p)?p.trim():p)),d&&(i=n.map(kc))}let a,l=s[a=Yu(t)]||s[a=Yu(Ts(t))];!l&&o&&(l=s[a=Yu(Oo(t))]),l&&Xn(l,e,6,i);const c=s[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Xn(c,e,6,i)}}function yb(e,t,n=!1){const s=t.emitsCache,i=s.get(e);if(i!==void 0)return i;const o=e.emits;let r={},a=!1;if(!Ue(e)){const l=c=>{const u=yb(c,t,!0);u&&(a=!0,Lt(r,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(ht(e)&&s.set(e,null),null):(Be(o)?o.forEach(l=>r[l]=null):Lt(r,o),ht(e)&&s.set(e,r),r)}function nu(e,t){return!e||!Gc(t)?!1:(t=t.slice(2).replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,Oo(t))||it(e,t))}let zt=null,su=null;function $c(e){const t=zt;return zt=e,su=e&&e.type.__scopeId||null,t}function en(e){su=e}function tn(){su=null}function Te(e,t=zt,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&Rg(-1);const o=$c(t);let r;try{r=e(...i)}finally{$c(o),s._d&&Rg(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Ku(e){const{type:t,vnode:n,proxy:s,withProxy:i,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:_}=e,b=$c(e);let w,A;try{if(n.shapeFlag&4){const M=i||s,k=M;w=is(c.call(k,M,u,d,p,f,m)),A=a}else{const M=t;w=is(M.length>1?M(d,{attrs:a,slots:r,emit:l}):M(d,null)),A=t.props?a:s$(a)}}catch(M){ya.length=0,sl(M,e,1),w=$e(dn)}let $=w;if(A&&_!==!1){const M=Object.keys(A),{shapeFlag:k}=$;M.length&&k&7&&(o&&M.some(Uh)&&(A=i$(A,o)),$=Ri($,A,!1,!0))}return n.dirs&&($=Ri($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(n.dirs):n.dirs),n.transition&&($.transition=n.transition),w=$,$c(b),w}function n$(e,t=!0){let n;for(let s=0;s<e.length;s++){const i=e[s];if(Va(i)){if(i.type!==dn||i.children==="v-if"){if(n)return;n=i}}else return}return n}const s$=e=>{let t;for(const n in e)(n==="class"||n==="style"||Gc(n))&&((t||(t={}))[n]=e[n]);return t},i$=(e,t)=>{const n={};for(const s in e)(!Uh(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function o$(e,t,n){const{props:s,children:i,component:o}=e,{props:r,children:a,patchFlag:l}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?yg(s,r,c):!!r;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(r[f]!==s[f]&&!nu(c,f))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:s===r?!1:s?r?yg(s,r,c):!0:!!r;return!1}function yg(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let i=0;i<s.length;i++){const o=s[i];if(t[o]!==e[o]&&!nu(n,o))return!0}return!1}function lf({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const cf="components";function je(e,t){return xb(cf,e,!0,t)||e}const wb=Symbol.for("v-ndc");function Io(e){return St(e)?xb(cf,e,!1)||e:e||wb}function xb(e,t,n=!0,s=!1){const i=zt||Jt;if(i){const o=i.type;if(e===cf){const a=iC(o,!1);if(a&&(a===t||a===Ts(t)||a===Xc(Ts(t))))return o}const r=wg(i[e]||o[e],t)||wg(i.appContext[e],t);return!r&&s?o:r}}function wg(e,t){return e&&(e[t]||e[Ts(t)]||e[Xc(Ts(t))])}const r$=e=>e.__isSuspense;let jd=0;const a$={name:"Suspense",__isSuspense:!0,process(e,t,n,s,i,o,r,a,l,c){if(e==null)l$(t,n,s,i,o,r,a,l,c);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}c$(e,t,n,s,i,r,a,l,c)}},hydrate:u$,create:df,normalize:d$},uf=a$;function Fa(e,t){const n=e.props&&e.props[t];Ue(n)&&n()}function l$(e,t,n,s,i,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),f=e.suspense=df(e,i,s,t,d,n,o,r,a,l);c(null,f.pendingBranch=e.ssContent,d,null,s,f,o,r),f.deps>0?(Fa(e,"onPending"),Fa(e,"onFallback"),c(null,e.ssFallback,t,n,s,null,o,r),cr(f,e.ssFallback)):f.resolve(!1,!0)}function c$(e,t,n,s,i,o,r,a,{p:l,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:_,isInFallback:b,isHydrating:w}=d;if(_)d.pendingBranch=f,ws(f,_)?(l(_,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():b&&(w||(l(m,p,n,s,i,null,o,r,a),cr(d,p)))):(d.pendingId=jd++,w?(d.isHydrating=!1,d.activeBranch=_):c(_,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),b?(l(null,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():(l(m,p,n,s,i,null,o,r,a),cr(d,p))):m&&ws(f,m)?(l(m,f,n,s,i,d,o,r,a),d.resolve(!0)):(l(null,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0&&d.resolve()));else if(m&&ws(f,m))l(m,f,n,s,i,d,o,r,a),cr(d,f);else if(Fa(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=jd++,l(null,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0)d.resolve();else{const{timeout:A,pendingId:$}=d;A>0?setTimeout(()=>{d.pendingId===$&&d.fallback(p)},A):A===0&&d.fallback(p)}}function df(e,t,n,s,i,o,r,a,l,c,u=!1){const{p:d,m:f,um:p,n:m,o:{parentNode:_,remove:b}}=c;let w;const A=f$(e);A&&t&&t.pendingBranch&&(w=t.pendingId,t.deps++);const $=e.props?Uv(e.props.timeout):void 0,M=o,k={vnode:e,parent:t,parentComponent:n,namespace:r,container:s,hiddenContainer:i,deps:0,pendingId:jd++,timeout:typeof $=="number"?$:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(y=!1,x=!1){const{vnode:C,activeBranch:P,pendingBranch:E,pendingId:B,effects:G,parentComponent:re,container:Y}=k;let L=!1;k.isHydrating?k.isHydrating=!1:y||(L=P&&E.transition&&E.transition.mode==="out-in",L&&(P.transition.afterLeave=()=>{B===k.pendingId&&(f(E,Y,o===M?m(P):o,0),Hd(G))}),P&&(_(P.el)!==k.hiddenContainer&&(o=m(P)),p(P,re,k,!0)),L||f(E,Y,o,0)),cr(k,E),k.pendingBranch=null,k.isInFallback=!1;let I=k.parent,V=!1;for(;I;){if(I.pendingBranch){I.effects.push(...G),V=!0;break}I=I.parent}!V&&!L&&Hd(G),k.effects=[],A&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!x&&t.resolve()),Fa(C,"onResolve")},fallback(y){if(!k.pendingBranch)return;const{vnode:x,activeBranch:C,parentComponent:P,container:E,namespace:B}=k;Fa(x,"onFallback");const G=m(C),re=()=>{k.isInFallback&&(d(null,y,E,G,P,null,B,a,l),cr(k,y))},Y=y.transition&&y.transition.mode==="out-in";Y&&(C.transition.afterLeave=re),k.isInFallback=!0,p(C,P,null,!0),Y||re()},move(y,x,C){k.activeBranch&&f(k.activeBranch,y,x,C),k.container=y},next(){return k.activeBranch&&m(k.activeBranch)},registerDep(y,x,C){const P=!!k.pendingBranch;P&&k.deps++;const E=y.vnode.el;y.asyncDep.catch(B=>{sl(B,y,0)}).then(B=>{if(y.isUnmounted||k.isUnmounted||k.pendingId!==y.suspenseId)return;y.asyncResolved=!0;const{vnode:G}=y;Jd(y,B,!1),E&&(G.el=E);const re=!E&&y.subTree.el;x(y,G,_(E||y.subTree.el),E?null:m(y.subTree),k,r,C),re&&b(re),lf(y,G.el),P&&--k.deps===0&&k.resolve()})},unmount(y,x){k.isUnmounted=!0,k.activeBranch&&p(k.activeBranch,n,y,x),k.pendingBranch&&p(k.pendingBranch,n,y,x)}};return k}function u$(e,t,n,s,i,o,r,a,l){const c=t.suspense=df(t,s,n,e.parentNode,document.createElement("div"),null,i,o,r,a,!0),u=l(e,c.pendingBranch=t.ssContent,n,c,o,r);return c.deps===0&&c.resolve(!1,!0),u}function d$(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=xg(s?n.default:n),e.ssFallback=s?xg(n.fallback):$e(dn)}function xg(e){let t;if(Ue(e)){const n=vr&&e._c;n&&(e._d=!1,O()),e=e(),n&&(e._d=!0,t=qn,Ub())}return Be(e)&&(e=n$(e)),e=is(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function h$(e,t){t&&t.pendingBranch?Be(e)?t.effects.push(...e):t.effects.push(e):Hd(e)}function cr(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,s&&s.subTree===n&&(s.vnode.el=i,lf(s,i))}function f$(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}function iu(e,t,n=Jt,s=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Hi();const a=il(n),l=Xn(t,n,e,r);return a(),ji(),l});return s?i.unshift(o):i.push(o),o}}const ni=e=>(t,n=Jt)=>{(!au||e==="sp")&&iu(e,(...s)=>t(...s),n)},p$=ni("bm"),Kt=ni("m"),kb=ni("bu"),Sb=ni("u"),hf=ni("bum"),Fr=ni("um"),g$=ni("sp"),m$=ni("rtg"),_$=ni("rtc");function v$(e,t=Jt){iu("ec",e,t)}function Re(e,t){if(zt===null)return e;const n=lu(zt),s=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,r,a,l=vt]=t[i];o&&(Ue(o)&&(o={mounted:o,updated:o}),o.deep&&wi(r),s.push({dir:o,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return e}function io(e,t,n,s){const i=e.dirs,o=t&&t.dirs;for(let r=0;r<i.length;r++){const a=i[r];o&&(a.oldValue=o[r].value);let l=a.dir[s];l&&(Hi(),Xn(l,n,8,[e.el,a,e,t]),ji())}}function Ke(e,t,n,s){let i;const o=n&&n[s];if(Be(e)||St(e)){i=new Array(e.length);for(let r=0,a=e.length;r<a;r++)i[r]=t(e[r],r,void 0,o&&o[r])}else if(typeof e=="number"){i=new Array(e);for(let r=0;r<e;r++)i[r]=t(r+1,r,void 0,o&&o[r])}else if(ht(e))if(e[Symbol.iterator])i=Array.from(e,(r,a)=>t(r,a,void 0,o&&o[a]));else{const r=Object.keys(e);i=new Array(r.length);for(let a=0,l=r.length;a<l;a++){const c=r[a];i[a]=t(e[c],c,a,o&&o[a])}}else i=[];return n&&(n[s]=i),i}function hn(e,t){for(let n=0;n<t.length;n++){const s=t[n];if(Be(s))for(let i=0;i<s.length;i++)e[s[i].name]=s[i].fn;else s&&(e[s.name]=s.key?(...i)=>{const o=s.fn(...i);return o&&(o.key=s.key),o}:s.fn)}return e}/*! #__NO_SIDE_EFFECTS__ */function Nt(e,t){return Ue(e)?Lt({name:e.name},t,{setup:e}):e}const _a=e=>!!e.type.__asyncLoader;function Ie(e,t,n={},s,i){if(zt.isCE||zt.parent&&_a(zt.parent)&&zt.parent.isCE)return t!=="default"&&(n.name=t),$e("slot",n,s&&s());let o=e[t];o&&o._c&&(o._d=!1),O();const r=o&&Ab(o(n)),a=Ne(Me,{key:n.key||r&&r.key||`_${t}`},r||(s?s():[]),r&&e._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function Ab(e){return e.some(t=>Va(t)?!(t.type===dn||t.type===Me&&!Ab(t.children)):!0)?e:null}const Wd=e=>e?Gb(e)?lu(e):Wd(e.parent):null,va=Lt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Wd(e.parent),$root:e=>Wd(e.root),$emit:e=>e.emit,$options:e=>ff(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,af(e.update)}),$nextTick:e=>e.n||(e.n=Zt.bind(e.proxy)),$watch:e=>V$.bind(e)}),qu=(e,t)=>e!==vt&&!e.__isScriptSetup&&it(e,t),b$={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:o,accessCache:r,type:a,appContext:l}=e;let c;if(t[0]!=="$"){const p=r[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(qu(s,t))return r[t]=1,s[t];if(i!==vt&&it(i,t))return r[t]=2,i[t];if((c=e.propsOptions[0])&&it(c,t))return r[t]=3,o[t];if(n!==vt&&it(n,t))return r[t]=4,n[t];zd&&(r[t]=0)}}const u=va[t];let d,f;if(u)return t==="$attrs"&&Pn(e.attrs,"get",""),u(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==vt&&it(n,t))return r[t]=4,n[t];if(f=l.config.globalProperties,it(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:i,ctx:o}=e;return qu(i,t)?(i[t]=n,!0):s!==vt&&it(s,t)?(s[t]=n,!0):it(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:i,propsOptions:o}},r){let a;return!!n[r]||e!==vt&&it(e,r)||qu(t,r)||(a=o[0])&&it(a,r)||it(s,r)||it(va,r)||it(i.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:it(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ro(){return $b().slots}function y$(){return $b().attrs}function $b(){const e=vf();return e.setupContext||(e.setupContext=Xb(e))}function kg(e){return Be(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let zd=!0;function w$(e){const t=ff(e),n=e.proxy,s=e.ctx;zd=!1,t.beforeCreate&&Sg(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:_,deactivated:b,beforeDestroy:w,beforeUnmount:A,destroyed:$,unmounted:M,render:k,renderTracked:y,renderTriggered:x,errorCaptured:C,serverPrefetch:P,expose:E,inheritAttrs:B,components:G,directives:re,filters:Y}=t;if(c&&x$(c,s,null),r)for(const V in r){const Q=r[V];Ue(Q)&&(s[V]=Q.bind(n))}if(i){const V=i.call(n,n);ht(V)&&(e.data=Ds(V))}if(zd=!0,o)for(const V in o){const Q=o[V],Z=Ue(Q)?Q.bind(n,n):Ue(Q.get)?Q.get.bind(n,n):Kn,ce=!Ue(Q)&&Ue(Q.set)?Q.set.bind(n):Kn,we=_e({get:Z,set:ce});Object.defineProperty(s,V,{enumerable:!0,configurable:!0,get:()=>we.value,set:U=>we.value=U})}if(a)for(const V in a)Cb(a[V],s,n,V);if(l){const V=Ue(l)?l.call(n):l;Reflect.ownKeys(V).forEach(Q=>{ac(Q,V[Q])})}u&&Sg(u,e,"c");function I(V,Q){Be(Q)?Q.forEach(Z=>V(Z.bind(n))):Q&&V(Q.bind(n))}if(I(p$,d),I(Kt,f),I(kb,p),I(Sb,m),I(H$,_),I(j$,b),I(v$,C),I(_$,y),I(m$,x),I(hf,A),I(Fr,M),I(g$,P),Be(E))if(E.length){const V=e.exposed||(e.exposed={});E.forEach(Q=>{Object.defineProperty(V,Q,{get:()=>n[Q],set:Z=>n[Q]=Z})})}else e.exposed||(e.exposed={});k&&e.render===Kn&&(e.render=k),B!=null&&(e.inheritAttrs=B),G&&(e.components=G),re&&(e.directives=re)}function x$(e,t,n=Kn){Be(e)&&(e=Yd(e));for(const s in e){const i=e[s];let o;ht(i)?"default"in i?o=ls(i.from||s,i.default,!0):o=ls(i.from||s):o=ls(i),Et(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[s]=o}}function Sg(e,t,n){Xn(Be(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Cb(e,t,n,s){const i=s.includes(".")?Bb(n,s):()=>n[s];if(St(e)){const o=t[e];Ue(o)&&Vt(i,o)}else if(Ue(e))Vt(i,e.bind(n));else if(ht(e))if(Be(e))e.forEach(o=>Cb(o,t,n,s));else{const o=Ue(e.handler)?e.handler.bind(n):t[e.handler];Ue(o)&&Vt(i,o,e)}}function ff(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,a=o.get(t);let l;return a?l=a:!i.length&&!n&&!s?l=t:(l={},i.length&&i.forEach(c=>Cc(l,c,r,!0)),Cc(l,t,r)),ht(t)&&o.set(t,l),l}function Cc(e,t,n,s=!1){const{mixins:i,extends:o}=t;o&&Cc(e,o,n,!0),i&&i.forEach(r=>Cc(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const a=k$[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const k$={data:Ag,props:$g,emits:$g,methods:ra,computed:ra,beforeCreate:gn,created:gn,beforeMount:gn,mounted:gn,beforeUpdate:gn,updated:gn,beforeDestroy:gn,beforeUnmount:gn,destroyed:gn,unmounted:gn,activated:gn,deactivated:gn,errorCaptured:gn,serverPrefetch:gn,components:ra,directives:ra,watch:A$,provide:Ag,inject:S$};function Ag(e,t){return t?e?function(){return Lt(Ue(e)?e.call(this,this):e,Ue(t)?t.call(this,this):t)}:t:e}function S$(e,t){return ra(Yd(e),Yd(t))}function Yd(e){if(Be(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function gn(e,t){return e?[...new Set([].concat(e,t))]:t}function ra(e,t){return e?Lt(Object.create(null),e,t):t}function $g(e,t){return e?Be(e)&&Be(t)?[...new Set([...e,...t])]:Lt(Object.create(null),kg(e),kg(t??{})):t}function A$(e,t){if(!e)return t;if(!t)return e;const n=Lt(Object.create(null),e);for(const s in t)n[s]=gn(e[s],t[s]);return n}function Eb(){return{app:null,config:{isNativeTag:hA,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let $$=0;function C$(e,t){return function(s,i=null){Ue(s)||(s=Lt({},s)),i!=null&&!ht(i)&&(i=null);const o=Eb(),r=new WeakSet;let a=!1;const l=o.app={_uid:$$++,_component:s,_props:i,_container:null,_context:o,_instance:null,version:Qb,get config(){return o.config},set config(c){},use(c,...u){return r.has(c)||(c&&Ue(c.install)?(r.add(c),c.install(l,...u)):Ue(c)&&(r.add(c),c(l,...u))),l},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),l},component(c,u){return u?(o.components[c]=u,l):o.components[c]},directive(c,u){return u?(o.directives[c]=u,l):o.directives[c]},mount(c,u,d){if(!a){const f=$e(s,i);return f.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),u&&t?t(f,c):e(f,c,d),a=!0,l._container=c,c.__vue_app__=l,lu(f.component)}},unmount(){a&&(e(null,l._container),delete l._container.__vue_app__)},provide(c,u){return o.provides[c]=u,l},runWithContext(c){const u=ur;ur=l;try{return c()}finally{ur=u}}};return l}}let ur=null;function ac(e,t){if(Jt){let n=Jt.provides;const s=Jt.parent&&Jt.parent.provides;s===n&&(n=Jt.provides=Object.create(s)),n[e]=t}}function ls(e,t,n=!1){const s=Jt||zt;if(s||ur){const i=s?s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:ur._context.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&Ue(t)?t.call(s&&s.proxy):t}}function E$(){return!!(Jt||zt||ur)}const Pb={},Tb=()=>Object.create(Pb),Mb=e=>Object.getPrototypeOf(e)===Pb;function P$(e,t,n,s=!1){const i={},o=Tb();e.propsDefaults=Object.create(null),Db(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=s?i:cb(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function T$(e,t,n,s){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,a=Ze(i),[l]=e.propsOptions;let c=!1;if((s||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(nu(e.emitsOptions,f))continue;const p=t[f];if(l)if(it(o,f))p!==o[f]&&(o[f]=p,c=!0);else{const m=Ts(f);i[m]=Ud(l,a,m,p,e,!1)}else p!==o[f]&&(o[f]=p,c=!0)}}}else{Db(e,t,i,o)&&(c=!0);let u;for(const d in a)(!t||!it(t,d)&&((u=Oo(d))===d||!it(t,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(i[d]=Ud(l,a,d,void 0,e,!0)):delete i[d]);if(o!==a)for(const d in o)(!t||!it(t,d))&&(delete o[d],c=!0)}c&&Xs(e.attrs,"set","")}function Db(e,t,n,s){const[i,o]=e.propsOptions;let r=!1,a;if(t)for(let l in t){if(ma(l))continue;const c=t[l];let u;i&&it(i,u=Ts(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:nu(e.emitsOptions,l)||(!(l in s)||c!==s[l])&&(s[l]=c,r=!0)}if(o){const l=Ze(n),c=a||vt;for(let u=0;u<o.length;u++){const d=o[u];n[d]=Ud(i,l,d,c[d],e,!it(c,d))}}return r}function Ud(e,t,n,s,i,o){const r=e[n];if(r!=null){const a=it(r,"default");if(a&&s===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&Ue(l)){const{propsDefaults:c}=i;if(n in c)s=c[n];else{const u=il(i);s=c[n]=l.call(null,t),u()}}else s=l}r[0]&&(o&&!a?s=!1:r[1]&&(s===""||s===Oo(n))&&(s=!0))}return s}function Ob(e,t,n=!1){const s=t.propsCache,i=s.get(e);if(i)return i;const o=e.props,r={},a=[];let l=!1;if(!Ue(e)){const u=d=>{l=!0;const[f,p]=Ob(d,t,!0);Lt(r,f),p&&a.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return ht(e)&&s.set(e,rr),rr;if(Be(o))for(let u=0;u<o.length;u++){const d=Ts(o[u]);Cg(d)&&(r[d]=vt)}else if(o)for(const u in o){const d=Ts(u);if(Cg(d)){const f=o[u],p=r[d]=Be(f)||Ue(f)?{type:f}:Lt({},f);if(p){const m=Tg(Boolean,p.type),_=Tg(String,p.type);p[0]=m>-1,p[1]=_<0||m<_,(m>-1||it(p,"default"))&&a.push(d)}}}const c=[r,a];return ht(e)&&s.set(e,c),c}function Cg(e){return e[0]!=="$"&&!ma(e)}function Eg(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Pg(e,t){return Eg(e)===Eg(t)}function Tg(e,t){return Be(t)?t.findIndex(n=>Pg(n,e)):Ue(t)&&Pg(t,e)?0:-1}const Ib=e=>e[0]==="_"||e==="$stable",pf=e=>Be(e)?e.map(is):[is(e)],M$=(e,t,n)=>{if(t._n)return t;const s=Te((...i)=>pf(t(...i)),n);return s._c=!1,s},Rb=(e,t,n)=>{const s=e._ctx;for(const i in e){if(Ib(i))continue;const o=e[i];if(Ue(o))t[i]=M$(i,o,s);else if(o!=null){const r=pf(o);t[i]=()=>r}}},Lb=(e,t)=>{const n=pf(t);e.slots.default=()=>n},D$=(e,t)=>{const n=e.slots=Tb();if(e.vnode.shapeFlag&32){const s=t._;s?(Lt(n,t),Yv(n,"_",s,!0)):Rb(t,n)}else t&&Lb(e,t)},O$=(e,t,n)=>{const{vnode:s,slots:i}=e;let o=!0,r=vt;if(s.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:(Lt(i,t),!n&&a===1&&delete i._):(o=!t.$stable,Rb(t,i)),r=t}else t&&(Lb(e,t),r={default:1});if(o)for(const a in i)!Ib(a)&&r[a]==null&&delete i[a]};function Kd(e,t,n,s,i=!1){if(Be(e)){e.forEach((f,p)=>Kd(f,t&&(Be(t)?t[p]:t),n,s,i));return}if(_a(s)&&!i)return;const o=s.shapeFlag&4?lu(s.component):s.el,r=i?null:o,{i:a,r:l}=e,c=t&&t.r,u=a.refs===vt?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==l&&(St(c)?(u[c]=null,it(d,c)&&(d[c]=null)):Et(c)&&(c.value=null)),Ue(l))Ti(l,a,12,[r,u]);else{const f=St(l),p=Et(l);if(f||p){const m=()=>{if(e.f){const _=f?it(d,l)?d[l]:u[l]:l.value;i?Be(_)&&Kh(_,o):Be(_)?_.includes(o)||_.push(o):f?(u[l]=[o],it(d,l)&&(d[l]=u[l])):(l.value=[o],e.k&&(u[e.k]=l.value))}else f?(u[l]=r,it(d,l)&&(d[l]=r)):p&&(l.value=r,e.k&&(u[e.k]=r))};r?(m.id=-1,An(m,n)):m()}}}const An=h$;function I$(e){return R$(e)}function R$(e,t){const n=Kv();n.__VUE__=!0;const{insert:s,remove:i,patchProp:o,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=Kn,insertStaticContent:m}=e,_=(v,D,H,W=null,ie=null,j=null,te=void 0,J=null,he=!!D.dynamicChildren)=>{if(v===D)return;v&&!ws(v,D)&&(W=T(v),U(v,ie,j,!0),v=null),D.patchFlag===-2&&(he=!1,D.dynamicChildren=null);const{type:me,ref:pe,shapeFlag:Le}=D;switch(me){case ru:b(v,D,H,W);break;case dn:w(v,D,H,W);break;case lc:v==null&&A(D,H,W,te);break;case Me:G(v,D,H,W,ie,j,te,J,he);break;default:Le&1?k(v,D,H,W,ie,j,te,J,he):Le&6?re(v,D,H,W,ie,j,te,J,he):(Le&64||Le&128)&&me.process(v,D,H,W,ie,j,te,J,he,ke)}pe!=null&&ie&&Kd(pe,v&&v.ref,j,D||v,!D)},b=(v,D,H,W)=>{if(v==null)s(D.el=a(D.children),H,W);else{const ie=D.el=v.el;D.children!==v.children&&c(ie,D.children)}},w=(v,D,H,W)=>{v==null?s(D.el=l(D.children||""),H,W):D.el=v.el},A=(v,D,H,W)=>{[v.el,v.anchor]=m(v.children,D,H,W,v.el,v.anchor)},$=({el:v,anchor:D},H,W)=>{let ie;for(;v&&v!==D;)ie=f(v),s(v,H,W),v=ie;s(D,H,W)},M=({el:v,anchor:D})=>{let H;for(;v&&v!==D;)H=f(v),i(v),v=H;i(D)},k=(v,D,H,W,ie,j,te,J,he)=>{D.type==="svg"?te="svg":D.type==="math"&&(te="mathml"),v==null?y(D,H,W,ie,j,te,J,he):P(v,D,ie,j,te,J,he)},y=(v,D,H,W,ie,j,te,J)=>{let he,me;const{props:pe,shapeFlag:Le,transition:Oe,dirs:He}=v;if(he=v.el=r(v.type,j,pe&&pe.is,pe),Le&8?u(he,v.children):Le&16&&C(v.children,he,null,W,ie,Gu(v,j),te,J),He&&io(v,null,W,"created"),x(he,v,v.scopeId,te,W),pe){for(const tt in pe)tt!=="value"&&!ma(tt)&&o(he,tt,null,pe[tt],j,v.children,W,ie,oe);"value"in pe&&o(he,"value",null,pe.value,j),(me=pe.onVnodeBeforeMount)&&_s(me,W,v)}He&&io(v,null,W,"beforeMount");const Ve=L$(ie,Oe);Ve&&Oe.beforeEnter(he),s(he,D,H),((me=pe&&pe.onVnodeMounted)||Ve||He)&&An(()=>{me&&_s(me,W,v),Ve&&Oe.enter(he),He&&io(v,null,W,"mounted")},ie)},x=(v,D,H,W,ie)=>{if(H&&p(v,H),W)for(let j=0;j<W.length;j++)p(v,W[j]);if(ie){let j=ie.subTree;if(D===j){const te=ie.vnode;x(v,te,te.scopeId,te.slotScopeIds,ie.parent)}}},C=(v,D,H,W,ie,j,te,J,he=0)=>{for(let me=he;me<v.length;me++){const pe=v[me]=J?bi(v[me]):is(v[me]);_(null,pe,D,H,W,ie,j,te,J)}},P=(v,D,H,W,ie,j,te)=>{const J=D.el=v.el;let{patchFlag:he,dynamicChildren:me,dirs:pe}=D;he|=v.patchFlag&16;const Le=v.props||vt,Oe=D.props||vt;let He;if(H&&oo(H,!1),(He=Oe.onVnodeBeforeUpdate)&&_s(He,H,D,v),pe&&io(D,v,H,"beforeUpdate"),H&&oo(H,!0),me?E(v.dynamicChildren,me,J,H,W,Gu(D,ie),j):te||Q(v,D,J,null,H,W,Gu(D,ie),j,!1),he>0){if(he&16)B(J,D,Le,Oe,H,W,ie);else if(he&2&&Le.class!==Oe.class&&o(J,"class",null,Oe.class,ie),he&4&&o(J,"style",Le.style,Oe.style,ie),he&8){const Ve=D.dynamicProps;for(let tt=0;tt<Ve.length;tt++){const Je=Ve[tt],gt=Le[Je],rn=Oe[Je];(rn!==gt||Je==="value")&&o(J,Je,gt,rn,ie,v.children,H,W,oe)}}he&1&&v.children!==D.children&&u(J,D.children)}else!te&&me==null&&B(J,D,Le,Oe,H,W,ie);((He=Oe.onVnodeUpdated)||pe)&&An(()=>{He&&_s(He,H,D,v),pe&&io(D,v,H,"updated")},W)},E=(v,D,H,W,ie,j,te)=>{for(let J=0;J<D.length;J++){const he=v[J],me=D[J],pe=he.el&&(he.type===Me||!ws(he,me)||he.shapeFlag&70)?d(he.el):H;_(he,me,pe,null,W,ie,j,te,!0)}},B=(v,D,H,W,ie,j,te)=>{if(H!==W){if(H!==vt)for(const J in H)!ma(J)&&!(J in W)&&o(v,J,H[J],null,te,D.children,ie,j,oe);for(const J in W){if(ma(J))continue;const he=W[J],me=H[J];he!==me&&J!=="value"&&o(v,J,me,he,te,D.children,ie,j,oe)}"value"in W&&o(v,"value",H.value,W.value,te)}},G=(v,D,H,W,ie,j,te,J,he)=>{const me=D.el=v?v.el:a(""),pe=D.anchor=v?v.anchor:a("");let{patchFlag:Le,dynamicChildren:Oe,slotScopeIds:He}=D;He&&(J=J?J.concat(He):He),v==null?(s(me,H,W),s(pe,H,W),C(D.children||[],H,pe,ie,j,te,J,he)):Le>0&&Le&64&&Oe&&v.dynamicChildren?(E(v.dynamicChildren,Oe,H,ie,j,te,J),(D.key!=null||ie&&D===ie.subTree)&&gf(v,D,!0)):Q(v,D,H,pe,ie,j,te,J,he)},re=(v,D,H,W,ie,j,te,J,he)=>{D.slotScopeIds=J,v==null?D.shapeFlag&512?ie.ctx.activate(D,H,W,te,he):Y(D,H,W,ie,j,te,he):L(v,D,he)},Y=(v,D,H,W,ie,j,te)=>{const J=v.component=eC(v,W,ie);if(ou(v)&&(J.ctx.renderer=ke),tC(J),J.asyncDep){if(ie&&ie.registerDep(J,I,te),!v.el){const he=J.subTree=$e(dn);w(null,he,D,H)}}else I(J,v,D,H,ie,j,te)},L=(v,D,H)=>{const W=D.component=v.component;if(o$(v,D,H))if(W.asyncDep&&!W.asyncResolved){V(W,D,H);return}else W.next=D,ZA(W.update),W.effect.dirty=!0,W.update();else D.el=v.el,W.vnode=D},I=(v,D,H,W,ie,j,te)=>{const J=()=>{if(v.isMounted){let{next:pe,bu:Le,u:Oe,parent:He,vnode:Ve}=v;{const jn=Nb(v);if(jn){pe&&(pe.el=Ve.el,V(v,pe,te)),jn.asyncDep.then(()=>{v.isUnmounted||J()});return}}let tt=pe,Je;oo(v,!1),pe?(pe.el=Ve.el,V(v,pe,te)):pe=Ve,Le&&oc(Le),(Je=pe.props&&pe.props.onVnodeBeforeUpdate)&&_s(Je,He,pe,Ve),oo(v,!0);const gt=Ku(v),rn=v.subTree;v.subTree=gt,_(rn,gt,d(rn.el),T(rn),v,ie,j),pe.el=gt.el,tt===null&&lf(v,gt.el),Oe&&An(Oe,ie),(Je=pe.props&&pe.props.onVnodeUpdated)&&An(()=>_s(Je,He,pe,Ve),ie)}else{let pe;const{el:Le,props:Oe}=D,{bm:He,m:Ve,parent:tt}=v,Je=_a(D);if(oo(v,!1),He&&oc(He),!Je&&(pe=Oe&&Oe.onVnodeBeforeMount)&&_s(pe,tt,D),oo(v,!0),Le&&fe){const gt=()=>{v.subTree=Ku(v),fe(Le,v.subTree,v,ie,null)};Je?D.type.__asyncLoader().then(()=>!v.isUnmounted&>()):gt()}else{const gt=v.subTree=Ku(v);_(null,gt,H,W,v,ie,j),D.el=gt.el}if(Ve&&An(Ve,ie),!Je&&(pe=Oe&&Oe.onVnodeMounted)){const gt=D;An(()=>_s(pe,tt,gt),ie)}(D.shapeFlag&256||tt&&_a(tt.vnode)&&tt.vnode.shapeFlag&256)&&v.a&&An(v.a,ie),v.isMounted=!0,D=H=W=null}},he=v.effect=new Xh(J,Kn,()=>af(me),v.scope),me=v.update=()=>{he.dirty&&he.run()};me.id=v.uid,oo(v,!0),me()},V=(v,D,H)=>{D.component=v;const W=v.vnode.props;v.vnode=D,v.next=null,T$(v,D.props,W,H),O$(v,D.children,H),Hi(),bg(v),ji()},Q=(v,D,H,W,ie,j,te,J,he=!1)=>{const me=v&&v.children,pe=v?v.shapeFlag:0,Le=D.children,{patchFlag:Oe,shapeFlag:He}=D;if(Oe>0){if(Oe&128){ce(me,Le,H,W,ie,j,te,J,he);return}else if(Oe&256){Z(me,Le,H,W,ie,j,te,J,he);return}}He&8?(pe&16&&oe(me,ie,j),Le!==me&&u(H,Le)):pe&16?He&16?ce(me,Le,H,W,ie,j,te,J,he):oe(me,ie,j,!0):(pe&8&&u(H,""),He&16&&C(Le,H,W,ie,j,te,J,he))},Z=(v,D,H,W,ie,j,te,J,he)=>{v=v||rr,D=D||rr;const me=v.length,pe=D.length,Le=Math.min(me,pe);let Oe;for(Oe=0;Oe<Le;Oe++){const He=D[Oe]=he?bi(D[Oe]):is(D[Oe]);_(v[Oe],He,H,null,ie,j,te,J,he)}me>pe?oe(v,ie,j,!0,!1,Le):C(D,H,W,ie,j,te,J,he,Le)},ce=(v,D,H,W,ie,j,te,J,he)=>{let me=0;const pe=D.length;let Le=v.length-1,Oe=pe-1;for(;me<=Le&&me<=Oe;){const He=v[me],Ve=D[me]=he?bi(D[me]):is(D[me]);if(ws(He,Ve))_(He,Ve,H,null,ie,j,te,J,he);else break;me++}for(;me<=Le&&me<=Oe;){const He=v[Le],Ve=D[Oe]=he?bi(D[Oe]):is(D[Oe]);if(ws(He,Ve))_(He,Ve,H,null,ie,j,te,J,he);else break;Le--,Oe--}if(me>Le){if(me<=Oe){const He=Oe+1,Ve=He<pe?D[He].el:W;for(;me<=Oe;)_(null,D[me]=he?bi(D[me]):is(D[me]),H,Ve,ie,j,te,J,he),me++}}else if(me>Oe)for(;me<=Le;)U(v[me],ie,j,!0),me++;else{const He=me,Ve=me,tt=new Map;for(me=Ve;me<=Oe;me++){const Ht=D[me]=he?bi(D[me]):is(D[me]);Ht.key!=null&&tt.set(Ht.key,me)}let Je,gt=0;const rn=Oe-Ve+1;let jn=!1,ri=0;const Zn=new Array(rn);for(me=0;me<rn;me++)Zn[me]=0;for(me=He;me<=Le;me++){const Ht=v[me];if(gt>=rn){U(Ht,ie,j,!0);continue}let ne;if(Ht.key!=null)ne=tt.get(Ht.key);else for(Je=Ve;Je<=Oe;Je++)if(Zn[Je-Ve]===0&&ws(Ht,D[Je])){ne=Je;break}ne===void 0?U(Ht,ie,j,!0):(Zn[ne-Ve]=me+1,ne>=ri?ri=ne:jn=!0,_(Ht,D[ne],H,null,ie,j,te,J,he),gt++)}const Is=jn?N$(Zn):rr;for(Je=Is.length-1,me=rn-1;me>=0;me--){const Ht=Ve+me,ne=D[Ht],Se=Ht+1<pe?D[Ht+1].el:W;Zn[me]===0?_(null,ne,H,Se,ie,j,te,J,he):jn&&(Je<0||me!==Is[Je]?we(ne,H,Se,2):Je--)}}},we=(v,D,H,W,ie=null)=>{const{el:j,type:te,transition:J,children:he,shapeFlag:me}=v;if(me&6){we(v.component.subTree,D,H,W);return}if(me&128){v.suspense.move(D,H,W);return}if(me&64){te.move(v,D,H,ke);return}if(te===Me){s(j,D,H);for(let Le=0;Le<he.length;Le++)we(he[Le],D,H,W);s(v.anchor,D,H);return}if(te===lc){$(v,D,H);return}if(W!==2&&me&1&&J)if(W===0)J.beforeEnter(j),s(j,D,H),An(()=>J.enter(j),ie);else{const{leave:Le,delayLeave:Oe,afterLeave:He}=J,Ve=()=>s(j,D,H),tt=()=>{Le(j,()=>{Ve(),He&&He()})};Oe?Oe(j,Ve,tt):tt()}else s(j,D,H)},U=(v,D,H,W=!1,ie=!1)=>{const{type:j,props:te,ref:J,children:he,dynamicChildren:me,shapeFlag:pe,patchFlag:Le,dirs:Oe,memoIndex:He}=v;if(J!=null&&Kd(J,null,H,v,!0),He!=null&&(D.renderCache[He]=void 0),pe&256){D.ctx.deactivate(v);return}const Ve=pe&1&&Oe,tt=!_a(v);let Je;if(tt&&(Je=te&&te.onVnodeBeforeUnmount)&&_s(Je,D,v),pe&6)ee(v.component,H,W);else{if(pe&128){v.suspense.unmount(H,W);return}Ve&&io(v,null,D,"beforeUnmount"),pe&64?v.type.remove(v,D,H,ie,ke,W):me&&(j!==Me||Le>0&&Le&64)?oe(me,D,H,!1,!0):(j===Me&&Le&384||!ie&&pe&16)&&oe(he,D,H),W&&X(v)}(tt&&(Je=te&&te.onVnodeUnmounted)||Ve)&&An(()=>{Je&&_s(Je,D,v),Ve&&io(v,null,D,"unmounted")},H)},X=v=>{const{type:D,el:H,anchor:W,transition:ie}=v;if(D===Me){R(H,W);return}if(D===lc){M(v);return}const j=()=>{i(H),ie&&!ie.persisted&&ie.afterLeave&&ie.afterLeave()};if(v.shapeFlag&1&&ie&&!ie.persisted){const{leave:te,delayLeave:J}=ie,he=()=>te(H,j);J?J(v.el,j,he):he()}else j()},R=(v,D)=>{let H;for(;v!==D;)H=f(v),i(v),v=H;i(D)},ee=(v,D,H)=>{const{bum:W,scope:ie,update:j,subTree:te,um:J,m:he,a:me}=v;Mg(he),Mg(me),W&&oc(W),ie.stop(),j&&(j.active=!1,U(te,v,D,H)),J&&An(J,D),An(()=>{v.isUnmounted=!0},D),D&&D.pendingBranch&&!D.isUnmounted&&v.asyncDep&&!v.asyncResolved&&v.suspenseId===D.pendingId&&(D.deps--,D.deps===0&&D.resolve())},oe=(v,D,H,W=!1,ie=!1,j=0)=>{for(let te=j;te<v.length;te++)U(v[te],D,H,W,ie)},T=v=>v.shapeFlag&6?T(v.component.subTree):v.shapeFlag&128?v.suspense.next():f(v.anchor||v.el);let se=!1;const de=(v,D,H)=>{v==null?D._vnode&&U(D._vnode,null,null,!0):_(D._vnode||null,v,D,null,null,null,H),se||(se=!0,bg(),vb(),se=!1),D._vnode=v},ke={p:_,um:U,m:we,r:X,mt:Y,mc:C,pc:Q,pbc:E,n:T,o:e};let N,fe;return t&&([N,fe]=t(ke)),{render:de,hydrate:N,createApp:C$(de,N)}}function Gu({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function oo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function L$(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function gf(e,t,n=!1){const s=e.children,i=t.children;if(Be(s)&&Be(i))for(let o=0;o<s.length;o++){const r=s[o];let a=i[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[o]=bi(i[o]),a.el=r.el),!n&&a.patchFlag!==-2&&gf(r,a)),a.type===ru&&(a.el=r.el)}}function N$(e){const t=e.slice(),n=[0];let s,i,o,r,a;const l=e.length;for(s=0;s<l;s++){const c=e[s];if(c!==0){if(i=n[n.length-1],e[i]<c){t[s]=i,n.push(s);continue}for(o=0,r=n.length-1;o<r;)a=o+r>>1,e[n[a]]<c?o=a+1:r=a;c<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=t[r];return n}function Nb(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Nb(t)}function Mg(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const F$=Symbol.for("v-scx"),B$=()=>ls(F$),Il={};function Vt(e,t,n){return Fb(e,t,n)}function Fb(e,t,{immediate:n,deep:s,flush:i,once:o,onTrack:r,onTrigger:a}=vt){if(t&&o){const y=t;t=(...x)=>{y(...x),k()}}const l=Jt,c=y=>s===!0?y:wi(y,s===!1?1:void 0);let u,d=!1,f=!1;if(Et(e)?(u=()=>e.value,d=Ac(e)):xo(e)?(u=()=>c(e),d=!0):Be(e)?(f=!0,d=e.some(y=>xo(y)||Ac(y)),u=()=>e.map(y=>{if(Et(y))return y.value;if(xo(y))return c(y);if(Ue(y))return Ti(y,l,2)})):Ue(e)?t?u=()=>Ti(e,l,2):u=()=>(p&&p(),Xn(e,l,3,[m])):u=Kn,t&&s){const y=u;u=()=>wi(y())}let p,m=y=>{p=$.onStop=()=>{Ti(y,l,4),p=$.onStop=void 0}},_;if(au)if(m=Kn,t?n&&Xn(t,l,3,[u(),f?[]:void 0,m]):u(),i==="sync"){const y=B$();_=y.__watcherHandles||(y.__watcherHandles=[])}else return Kn;let b=f?new Array(e.length).fill(Il):Il;const w=()=>{if(!(!$.active||!$.dirty))if(t){const y=$.run();(s||d||(f?y.some((x,C)=>Ii(x,b[C])):Ii(y,b)))&&(p&&p(),Xn(t,l,3,[y,b===Il?void 0:f&&b[0]===Il?[]:b,m]),b=y)}else $.run()};w.allowRecurse=!!t;let A;i==="sync"?A=w:i==="post"?A=()=>An(w,l&&l.suspense):(w.pre=!0,l&&(w.id=l.uid),A=()=>af(w));const $=new Xh(u,Kn,A),M=Qc(),k=()=>{$.stop(),M&&Kh(M.effects,$)};return t?n?w():b=$.run():i==="post"?An($.run.bind($),l&&l.suspense):$.run(),_&&_.push(k),k}function V$(e,t,n){const s=this.proxy,i=St(e)?e.includes(".")?Bb(s,e):()=>s[e]:e.bind(s,s);let o;Ue(t)?o=t:(o=t.handler,n=t);const r=il(this),a=Fb(i,o.bind(s),n);return r(),a}function Bb(e,t){const n=t.split(".");return()=>{let s=e;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}function wi(e,t=1/0,n){if(t<=0||!ht(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Et(e))wi(e.value,t,n);else if(Be(e))for(let s=0;s<e.length;s++)wi(e[s],t,n);else if(Nr(e)||ar(e))e.forEach(s=>{wi(s,t,n)});else if(zv(e)){for(const s in e)wi(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&wi(e[s],t,n)}return e}const ou=e=>e.type.__isKeepAlive;function H$(e,t){Vb(e,"a",t)}function j$(e,t){Vb(e,"da",t)}function Vb(e,t,n=Jt){const s=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(iu(t,s,n),n){let i=n.parent;for(;i&&i.parent;)ou(i.parent.vnode)&&W$(s,t,n,i),i=i.parent}}function W$(e,t,n,s){const i=iu(t,e,s,!0);Fr(()=>{Kh(s[t],i)},n)}const vi=Symbol("_leaveCb"),Rl=Symbol("_enterCb");function Hb(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Kt(()=>{e.isMounted=!0}),hf(()=>{e.isUnmounting=!0}),e}const Yn=[Function,Array],jb={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Yn,onEnter:Yn,onAfterEnter:Yn,onEnterCancelled:Yn,onBeforeLeave:Yn,onLeave:Yn,onAfterLeave:Yn,onLeaveCancelled:Yn,onBeforeAppear:Yn,onAppear:Yn,onAfterAppear:Yn,onAppearCancelled:Yn},Wb=e=>{const t=e.subTree;return t.component?Wb(t.component):t},z$={name:"BaseTransition",props:jb,setup(e,{slots:t}){const n=vf(),s=Hb();return()=>{const i=t.default&&mf(t.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const f of i)if(f.type!==dn){o=f;break}}const r=Ze(e),{mode:a}=r;if(s.isLeaving)return Ju(o);const l=Dg(o);if(!l)return Ju(o);let c=Ba(l,r,s,n,f=>c=f);_r(l,c);const u=n.subTree,d=u&&Dg(u);if(d&&d.type!==dn&&!ws(l,d)&&Wb(n).type!==dn){const f=Ba(d,r,s,n);if(_r(d,f),a==="out-in"&&l.type!==dn)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Ju(o);a==="in-out"&&l.type!==dn&&(f.delayLeave=(p,m,_)=>{const b=zb(s,d);b[String(d.key)]=d,p[vi]=()=>{m(),p[vi]=void 0,delete c.delayedLeave},c.delayedLeave=_})}return o}}},Y$=z$;function zb(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Ba(e,t,n,s,i){const{appear:o,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:_,onBeforeAppear:b,onAppear:w,onAfterAppear:A,onAppearCancelled:$}=t,M=String(e.key),k=zb(n,e),y=(P,E)=>{P&&Xn(P,s,9,E)},x=(P,E)=>{const B=E[1];y(P,E),Be(P)?P.every(G=>G.length<=1)&&B():P.length<=1&&B()},C={mode:r,persisted:a,beforeEnter(P){let E=l;if(!n.isMounted)if(o)E=b||l;else return;P[vi]&&P[vi](!0);const B=k[M];B&&ws(e,B)&&B.el[vi]&&B.el[vi](),y(E,[P])},enter(P){let E=c,B=u,G=d;if(!n.isMounted)if(o)E=w||c,B=A||u,G=$||d;else return;let re=!1;const Y=P[Rl]=L=>{re||(re=!0,L?y(G,[P]):y(B,[P]),C.delayedLeave&&C.delayedLeave(),P[Rl]=void 0)};E?x(E,[P,Y]):Y()},leave(P,E){const B=String(e.key);if(P[Rl]&&P[Rl](!0),n.isUnmounting)return E();y(f,[P]);let G=!1;const re=P[vi]=Y=>{G||(G=!0,E(),Y?y(_,[P]):y(m,[P]),P[vi]=void 0,k[B]===e&&delete k[B])};k[B]=e,p?x(p,[P,re]):re()},clone(P){const E=Ba(P,t,n,s,i);return i&&i(E),E}};return C}function Ju(e){if(ou(e))return e=Ri(e),e.children=null,e}function Dg(e){if(!ou(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ue(n.default))return n.default()}}function _r(e,t){e.shapeFlag&6&&e.component?_r(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function mf(e,t=!1,n){let s=[],i=0;for(let o=0;o<e.length;o++){let r=e[o];const a=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===Me?(r.patchFlag&128&&i++,s=s.concat(mf(r.children,t,a))):(t||r.type!==dn)&&s.push(a!=null?Ri(r,{key:a}):r)}if(i>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}const U$=e=>e.__isTeleport,ba=e=>e&&(e.disabled||e.disabled===""),Og=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ig=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,qd=(e,t)=>{const n=e&&e.to;return St(n)?t?t(n):null:n},K$={name:"Teleport",__isTeleport:!0,process(e,t,n,s,i,o,r,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:_,createComment:b}}=c,w=ba(t.props);let{shapeFlag:A,children:$,dynamicChildren:M}=t;if(e==null){const k=t.el=_(""),y=t.anchor=_("");p(k,n,s),p(y,n,s);const x=t.target=qd(t.props,m),C=t.targetAnchor=_("");x&&(p(C,x),r==="svg"||Og(x)?r="svg":(r==="mathml"||Ig(x))&&(r="mathml"));const P=(E,B)=>{A&16&&u($,E,B,i,o,r,a,l)};w?P(n,y):x&&P(x,C)}else{t.el=e.el;const k=t.anchor=e.anchor,y=t.target=e.target,x=t.targetAnchor=e.targetAnchor,C=ba(e.props),P=C?n:y,E=C?k:x;if(r==="svg"||Og(y)?r="svg":(r==="mathml"||Ig(y))&&(r="mathml"),M?(f(e.dynamicChildren,M,P,i,o,r,a),gf(e,t,!0)):l||d(e,t,P,E,i,o,r,a,!1),w)C?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ll(t,n,k,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const B=t.target=qd(t.props,m);B&&Ll(t,B,null,c,0)}else C&&Ll(t,y,x,c,1)}Yb(t)},remove(e,t,n,s,{um:i,o:{remove:o}},r){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:d,props:f}=e;if(d&&o(u),r&&o(c),a&16){const p=r||!ba(f);for(let m=0;m<l.length;m++){const _=l[m];i(_,t,n,p,!!_.dynamicChildren)}}},move:Ll,hydrate:q$};function Ll(e,t,n,{o:{insert:s},m:i},o=2){o===0&&s(e.targetAnchor,t,n);const{el:r,anchor:a,shapeFlag:l,children:c,props:u}=e,d=o===2;if(d&&s(r,t,n),(!d||ba(u))&&l&16)for(let f=0;f<c.length;f++)i(c[f],t,n,2);d&&s(a,t,n)}function q$(e,t,n,s,i,o,{o:{nextSibling:r,parentNode:a,querySelector:l}},c){const u=t.target=qd(t.props,l);if(u){const d=u._lpa||u.firstChild;if(t.shapeFlag&16)if(ba(t.props))t.anchor=c(r(e),t,a(e),n,s,i,o),t.targetAnchor=d;else{t.anchor=r(e);let f=d;for(;f;)if(f=r(f),f&&f.nodeType===8&&f.data==="teleport anchor"){t.targetAnchor=f,u._lpa=t.targetAnchor&&r(t.targetAnchor);break}c(d,t,u,n,s,i,o)}Yb(t)}return t.anchor&&r(t.anchor)}const G$=K$;function Yb(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const Me=Symbol.for("v-fgt"),ru=Symbol.for("v-txt"),dn=Symbol.for("v-cmt"),lc=Symbol.for("v-stc"),ya=[];let qn=null;function O(e=!1){ya.push(qn=e?null:[])}function Ub(){ya.pop(),qn=ya[ya.length-1]||null}let vr=1;function Rg(e){vr+=e}function Kb(e){return e.dynamicChildren=vr>0?qn||rr:null,Ub(),vr>0&&qn&&qn.push(e),e}function F(e,t,n,s,i,o){return Kb(h(e,t,n,s,i,o,!0))}function Ne(e,t,n,s,i){return Kb($e(e,t,n,s,i,!0))}function Va(e){return e?e.__v_isVNode===!0:!1}function ws(e,t){return e.type===t.type&&e.key===t.key}const qb=({key:e})=>e??null,cc=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?St(e)||Et(e)||Ue(e)?{i:zt,r:e,k:t,f:!!n}:e:null);function h(e,t=null,n=null,s=0,i=null,o=e===Me?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&qb(t),ref:t&&cc(t),scopeId:su,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:zt};return a?(_f(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=St(n)?8:16),vr>0&&!r&&qn&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&qn.push(l),l}const $e=J$;function J$(e,t=null,n=null,s=0,i=null,o=!1){if((!e||e===wb)&&(e=dn),Va(e)){const a=Ri(e,t,!0);return n&&_f(a,n),vr>0&&!o&&qn&&(a.shapeFlag&6?qn[qn.indexOf(e)]=a:qn.push(a)),a.patchFlag=-2,a}if(oC(e)&&(e=e.__vccOpts),t){t=_n(t);let{class:a,style:l}=t;a&&!St(a)&&(t.class=Ee(a)),ht(l)&&(eu(l)&&!Be(l)&&(l=Lt({},l)),t.style=Wt(l))}const r=St(e)?1:r$(e)?128:U$(e)?64:ht(e)?4:Ue(e)?2:0;return h(e,t,n,s,i,r,o,!0)}function _n(e){return e?eu(e)||Mb(e)?Lt({},e):e:null}function Ri(e,t,n=!1,s=!1){const{props:i,ref:o,patchFlag:r,children:a,transition:l}=e,c=t?Yt(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&qb(c),ref:t&&t.ref?n&&o?Be(o)?o.concat(cc(t)):[o,cc(t)]:cc(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Me?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ri(e.ssContent),ssFallback:e.ssFallback&&Ri(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&_r(u,l.clone(u)),u}function ye(e=" ",t=0){return $e(ru,null,e,t)}function X$(e,t){const n=$e(lc,null,e);return n.staticCount=t,n}function ae(e="",t=!1){return t?(O(),Ne(dn,null,e)):$e(dn,null,e)}function is(e){return e==null||typeof e=="boolean"?$e(dn):Be(e)?$e(Me,null,e.slice()):typeof e=="object"?bi(e):$e(ru,null,String(e))}function bi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ri(e)}function _f(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Be(t))n=16;else if(typeof t=="object")if(s&65){const i=t.default;i&&(i._c&&(i._d=!1),_f(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Mb(t)?t._ctx=zt:i===3&&zt&&(zt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ue(t)?(t={default:t,_ctx:zt},n=32):(t=String(t),s&64?(n=16,t=[ye(t)]):n=8);e.children=t,e.shapeFlag|=n}function Yt(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const i in s)if(i==="class")t.class!==s.class&&(t.class=Ee([t.class,s.class]));else if(i==="style")t.style=Wt([t.style,s.style]);else if(Gc(i)){const o=t[i],r=s[i];r&&o!==r&&!(Be(o)&&o.includes(r))&&(t[i]=o?[].concat(o,r):r)}else i!==""&&(t[i]=s[i])}return t}function _s(e,t,n,s=null){Xn(e,t,7,[n,s])}const Q$=Eb();let Z$=0;function eC(e,t,n){const s=e.type,i=(t?t.appContext:e.appContext)||Q$,o={uid:Z$++,vnode:e,type:s,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Jv(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ob(s,i),emitsOptions:yb(s,i),emit:null,emitted:null,propsDefaults:vt,inheritAttrs:s.inheritAttrs,ctx:vt,data:vt,props:vt,attrs:vt,slots:vt,refs:vt,setupState:vt,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=t$.bind(null,o),e.ce&&e.ce(o),o}let Jt=null;const vf=()=>Jt||zt;let Ec,Gd;{const e=Kv(),t=(n,s)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(s),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};Ec=t("__VUE_INSTANCE_SETTERS__",n=>Jt=n),Gd=t("__VUE_SSR_SETTERS__",n=>au=n)}const il=e=>{const t=Jt;return Ec(e),e.scope.on(),()=>{e.scope.off(),Ec(t)}},Lg=()=>{Jt&&Jt.scope.off(),Ec(null)};function Gb(e){return e.vnode.shapeFlag&4}let au=!1;function tC(e,t=!1){t&&Gd(t);const{props:n,children:s}=e.vnode,i=Gb(e);P$(e,n,i,t),D$(e,s);const o=i?nC(e,t):void 0;return t&&Gd(!1),o}function nC(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,b$);const{setup:s}=n;if(s){const i=e.setupContext=s.length>1?Xb(e):null,o=il(e);Hi();const r=Ti(s,e,0,[e.props,i]);if(ji(),o(),jv(r)){if(r.then(Lg,Lg),t)return r.then(a=>{Jd(e,a,t)}).catch(a=>{sl(a,e,0)});e.asyncDep=r}else Jd(e,r,t)}else Jb(e,t)}function Jd(e,t,n){Ue(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ht(t)&&(e.setupState=pb(t)),Jb(e,n)}let Ng;function Jb(e,t,n){const s=e.type;if(!e.render){if(!t&&Ng&&!s.render){const i=s.template||ff(e).template;if(i){const{isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:l}=s,c=Lt(Lt({isCustomElement:o,delimiters:a},r),l);s.render=Ng(i,c)}}e.render=s.render||Kn}{const i=il(e);Hi();try{w$(e)}finally{ji(),i()}}}const sC={get(e,t){return Pn(e,"get",""),e[t]}};function Xb(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,sC),slots:e.slots,emit:e.emit,expose:t}}function lu(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(pb(tu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in va)return va[n](e)},has(t,n){return n in t||n in va}})):e.proxy}function iC(e,t=!0){return Ue(e)?e.displayName||e.name:e.name||t&&e.__name}function oC(e){return Ue(e)&&"__vccOpts"in e}const _e=(e,t)=>YA(e,t,au);function To(e,t,n){const s=arguments.length;return s===2?ht(t)&&!Be(t)?Va(t)?$e(e,null,[t]):$e(e,t):$e(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Va(n)&&(n=[n]),$e(e,t,n))}const Qb="3.4.29";/**
|
|
* @vue/runtime-dom v3.4.29
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/const rC="http://www.w3.org/2000/svg",aC="http://www.w3.org/1998/Math/MathML",Ws=typeof document<"u"?document:null,Fg=Ws&&Ws.createElement("template"),lC={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t==="svg"?Ws.createElementNS(rC,e):t==="mathml"?Ws.createElementNS(aC,e):n?Ws.createElement(e,{is:n}):Ws.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>Ws.createTextNode(e),createComment:e=>Ws.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ws.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,o){const r=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Fg.innerHTML=s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e;const a=Fg.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ui="transition",Gr="animation",br=Symbol("_vtc"),Bt=(e,{slots:t})=>To(Y$,ey(e),t);Bt.displayName="Transition";const Zb={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},cC=Bt.props=Lt({},jb,Zb),ro=(e,t=[])=>{Be(e)?e.forEach(n=>n(...t)):e&&e(...t)},Bg=e=>e?Be(e)?e.some(t=>t.length>1):e.length>1:!1;function ey(e){const t={};for(const G in e)G in Zb||(t[G]=e[G]);if(e.css===!1)return t;const{name:n="v",type:s,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=uC(i),_=m&&m[0],b=m&&m[1],{onBeforeEnter:w,onEnter:A,onEnterCancelled:$,onLeave:M,onLeaveCancelled:k,onBeforeAppear:y=w,onAppear:x=A,onAppearCancelled:C=$}=t,P=(G,re,Y)=>{gi(G,re?u:a),gi(G,re?c:r),Y&&Y()},E=(G,re)=>{G._isLeaving=!1,gi(G,d),gi(G,p),gi(G,f),re&&re()},B=G=>(re,Y)=>{const L=G?x:A,I=()=>P(re,G,Y);ro(L,[re,I]),Vg(()=>{gi(re,G?l:o),Vs(re,G?u:a),Bg(L)||Hg(re,s,_,I)})};return Lt(t,{onBeforeEnter(G){ro(w,[G]),Vs(G,o),Vs(G,r)},onBeforeAppear(G){ro(y,[G]),Vs(G,l),Vs(G,c)},onEnter:B(!1),onAppear:B(!0),onLeave(G,re){G._isLeaving=!0;const Y=()=>E(G,re);Vs(G,d),Vs(G,f),ny(),Vg(()=>{G._isLeaving&&(gi(G,d),Vs(G,p),Bg(M)||Hg(G,s,b,Y))}),ro(M,[G,Y])},onEnterCancelled(G){P(G,!1),ro($,[G])},onAppearCancelled(G){P(G,!0),ro(C,[G])},onLeaveCancelled(G){E(G),ro(k,[G])}})}function uC(e){if(e==null)return null;if(ht(e))return[Xu(e.enter),Xu(e.leave)];{const t=Xu(e);return[t,t]}}function Xu(e){return Uv(e)}function Vs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[br]||(e[br]=new Set)).add(t)}function gi(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[br];n&&(n.delete(t),n.size||(e[br]=void 0))}function Vg(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let dC=0;function Hg(e,t,n,s){const i=e._endId=++dC,o=()=>{i===e._endId&&s()};if(n)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=ty(e,t);if(!r)return s();const c=r+"end";let u=0;const d=()=>{e.removeEventListener(c,f),o()},f=p=>{p.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),e.addEventListener(c,f)}function ty(e,t){const n=window.getComputedStyle(e),s=m=>(n[m]||"").split(", "),i=s(`${ui}Delay`),o=s(`${ui}Duration`),r=jg(i,o),a=s(`${Gr}Delay`),l=s(`${Gr}Duration`),c=jg(a,l);let u=null,d=0,f=0;t===ui?r>0&&(u=ui,d=r,f=o.length):t===Gr?c>0&&(u=Gr,d=c,f=l.length):(d=Math.max(r,c),u=d>0?r>c?ui:Gr:null,f=u?u===ui?o.length:l.length:0);const p=u===ui&&/\b(transform|all)(,|$)/.test(s(`${ui}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function jg(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>Wg(n)+Wg(e[s])))}function Wg(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ny(){return document.body.offsetHeight}function hC(e,t,n){const s=e[br];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Pc=Symbol("_vod"),sy=Symbol("_vsh"),uc={beforeMount(e,{value:t},{transition:n}){e[Pc]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Jr(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Jr(e,!0),s.enter(e)):s.leave(e,()=>{Jr(e,!1)}):Jr(e,t))},beforeUnmount(e,{value:t}){Jr(e,t)}};function Jr(e,t){e.style.display=t?e[Pc]:"none",e[sy]=!t}const fC=Symbol(""),pC=/(^|;)\s*display\s*:/;function gC(e,t,n){const s=e.style,i=St(n);let o=!1;if(n&&!i){if(t)if(St(t))for(const r of t.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&dc(s,a,"")}else for(const r in t)n[r]==null&&dc(s,r,"");for(const r in n)r==="display"&&(o=!0),dc(s,r,n[r])}else if(i){if(t!==n){const r=s[fC];r&&(n+=";"+r),s.cssText=n,o=pC.test(n)}}else t&&e.removeAttribute("style");Pc in e&&(e[Pc]=o?s.display:"",e[sy]&&(s.display="none"))}const zg=/\s*!important$/;function dc(e,t,n){if(Be(n))n.forEach(s=>dc(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=mC(e,t);zg.test(n)?e.setProperty(Oo(s),n.replace(zg,""),"important"):e[s]=n}}const Yg=["Webkit","Moz","ms"],Qu={};function mC(e,t){const n=Qu[t];if(n)return n;let s=Ts(t);if(s!=="filter"&&s in e)return Qu[t]=s;s=Xc(s);for(let i=0;i<Yg.length;i++){const o=Yg[i]+s;if(o in e)return Qu[t]=o}return t}const Ug="http://www.w3.org/1999/xlink";function Kg(e,t,n,s,i,o=xA(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ug,t.slice(6,t.length)):e.setAttributeNS(Ug,t,n):n==null||o&&!qv(n)?e.removeAttribute(t):e.setAttribute(t,o?"":String(n))}function _C(e,t,n,s,i,o,r){if(t==="innerHTML"||t==="textContent"){s&&r(s,i,o),e[t]=n??"";return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const c=a==="OPTION"?e.getAttribute("value")||"":e.value,u=n==null?"":String(n);(c!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let l=!1;if(n===""||n==null){const c=typeof e[t];c==="boolean"?n=qv(n):n==null&&c==="string"?(n="",l=!0):c==="number"&&(n=0,l=!0)}try{e[t]=n}catch{}l&&e.removeAttribute(t)}function Us(e,t,n,s){e.addEventListener(t,n,s)}function vC(e,t,n,s){e.removeEventListener(t,n,s)}const qg=Symbol("_vei");function bC(e,t,n,s,i=null){const o=e[qg]||(e[qg]={}),r=o[t];if(s&&r)r.value=s;else{const[a,l]=yC(t);if(s){const c=o[t]=kC(s,i);Us(e,a,c,l)}else r&&(vC(e,a,r,l),o[t]=void 0)}}const Gg=/(?:Once|Passive|Capture)$/;function yC(e){let t;if(Gg.test(e)){t={};let s;for(;s=e.match(Gg);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Oo(e.slice(2)),t]}let Zu=0;const wC=Promise.resolve(),xC=()=>Zu||(wC.then(()=>Zu=0),Zu=Date.now());function kC(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Xn(SC(s,n.value),t,5,[s])};return n.value=e,n.attached=xC(),n}function SC(e,t){if(Be(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>i=>!i._stopped&&s&&s(i))}else return t}const Jg=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,AC=(e,t,n,s,i,o,r,a,l)=>{const c=i==="svg";t==="class"?hC(e,s,c):t==="style"?gC(e,n,s):Gc(t)?Uh(t)||bC(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$C(e,t,s,c))?(_C(e,t,s,o,r,a,l),(t==="value"||t==="checked"||t==="selected")&&Kg(e,t,s,c,r,t!=="value")):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Kg(e,t,s,c))};function $C(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Jg(t)&&Ue(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Jg(t)&&St(n)?!1:t in e}const iy=new WeakMap,oy=new WeakMap,Tc=Symbol("_moveCb"),Xg=Symbol("_enterCb"),ry={name:"TransitionGroup",props:Lt({},cC,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=vf(),s=Hb();let i,o;return Sb(()=>{if(!i.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!MC(i[0].el,n.vnode.el,r))return;i.forEach(EC),i.forEach(PC);const a=i.filter(TC);ny(),a.forEach(l=>{const c=l.el,u=c.style;Vs(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Tc]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",d),c[Tc]=null,gi(c,r))};c.addEventListener("transitionend",d)})}),()=>{const r=Ze(e),a=ey(r);let l=r.tag||Me;if(i=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&(i.push(u),_r(u,Ba(u,a,s,n)),iy.set(u,u.el.getBoundingClientRect()))}o=t.default?mf(t.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&_r(u,Ba(u,a,s,n))}return $e(l,null,o)}}},CC=e=>delete e.mode;ry.props;const Wi=ry;function EC(e){const t=e.el;t[Tc]&&t[Tc](),t[Xg]&&t[Xg]()}function PC(e){oy.set(e,e.el.getBoundingClientRect())}function TC(e){const t=iy.get(e),n=oy.get(e),s=t.left-n.left,i=t.top-n.top;if(s||i){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${s}px,${i}px)`,o.transitionDuration="0s",e}}function MC(e,t,n){const s=e.cloneNode(),i=e[br];i&&i.forEach(a=>{a.split(/\s+/).forEach(l=>l&&s.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&s.classList.add(a)),s.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(s);const{hasTransform:r}=ty(s);return o.removeChild(s),r}const Li=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Be(t)?n=>oc(t,n):t};function DC(e){e.target.composing=!0}function Qg(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Qn=Symbol("_assign"),We={created(e,{modifiers:{lazy:t,trim:n,number:s}},i){e[Qn]=Li(i);const o=s||i.props&&i.props.type==="number";Us(e,t?"change":"input",r=>{if(r.target.composing)return;let a=e.value;n&&(a=a.trim()),o&&(a=kc(a)),e[Qn](a)}),n&&Us(e,"change",()=>{e.value=e.value.trim()}),t||(Us(e,"compositionstart",DC),Us(e,"compositionend",Qg),Us(e,"change",Qg))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:i,number:o}},r){if(e[Qn]=Li(r),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?kc(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||i&&e.value.trim()===l)||(e.value=l))}},In={deep:!0,created(e,t,n){e[Qn]=Li(n),Us(e,"change",()=>{const s=e._modelValue,i=yr(e),o=e.checked,r=e[Qn];if(Be(s)){const a=Gh(s,i),l=a!==-1;if(o&&!l)r(s.concat(i));else if(!o&&l){const c=[...s];c.splice(a,1),r(c)}}else if(Nr(s)){const a=new Set(s);o?a.add(i):a.delete(i),r(a)}else r(ay(e,o))})},mounted:Zg,beforeUpdate(e,t,n){e[Qn]=Li(n),Zg(e,t,n)}};function Zg(e,{value:t,oldValue:n},s){e._modelValue=t,Be(t)?e.checked=Gh(t,s.props.value)>-1:Nr(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=Po(t,ay(e,!0)))}const OC={created(e,{value:t},n){e.checked=Po(t,n.props.value),e[Qn]=Li(n),Us(e,"change",()=>{e[Qn](yr(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[Qn]=Li(s),t!==n&&(e.checked=Po(t,s.props.value))}},hc={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const i=Nr(t);Us(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?kc(yr(r)):yr(r));e[Qn](e.multiple?i?new Set(o):o:o[0]),e._assigning=!0,Zt(()=>{e._assigning=!1})}),e[Qn]=Li(s)},mounted(e,{value:t,modifiers:{number:n}}){em(e,t)},beforeUpdate(e,t,n){e[Qn]=Li(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||em(e,t)}};function em(e,t,n){const s=e.multiple,i=Be(t);if(!(s&&!i&&!Nr(t))){for(let o=0,r=e.options.length;o<r;o++){const a=e.options[o],l=yr(a);if(s)if(i){const c=typeof l;c==="string"||c==="number"?a.selected=t.some(u=>String(u)===String(l)):a.selected=Gh(t,l)>-1}else a.selected=t.has(l);else if(Po(yr(a),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function yr(e){return"_value"in e?e._value:e.value}function ay(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const IC={created(e,t,n){Nl(e,t,n,null,"created")},mounted(e,t,n){Nl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){Nl(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){Nl(e,t,n,s,"updated")}};function RC(e,t){switch(e){case"SELECT":return hc;case"TEXTAREA":return We;default:switch(t){case"checkbox":return In;case"radio":return OC;default:return We}}}function Nl(e,t,n,s,i){const r=RC(e.tagName,n.props&&n.props.type)[i];r&&r(e,t,n,s)}const LC=["ctrl","shift","alt","meta"],NC={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>LC.some(n=>e[`${n}Key`]&&!t.includes(n))},Ha=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(i,...o)=>{for(let r=0;r<t.length;r++){const a=NC[t[r]];if(a&&a(i,t))return}return e(i,...o)})},FC={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},BC=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=i=>{if(!("key"in i))return;const o=Oo(i.key);if(t.some(r=>r===o||FC[r]===o))return e(i)})},VC=Lt({patchProp:AC},lC);let tm;function ly(){return tm||(tm=I$(VC))}const nm=(...e)=>{ly().render(...e)},HC=(...e)=>{const t=ly().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=WC(s);if(!i)return;const o=t._component;!Ue(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const r=n(i,!1,jC(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t};function jC(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function WC(e){return St(e)?document.querySelector(e):e}var zC=!1;/*!
|
|
* pinia v2.1.7
|
|
* (c) 2023 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/let cy;const cu=e=>cy=e,uy=Symbol();function Xd(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var wa;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(wa||(wa={}));function YC(){const e=Xv(!0),t=e.run(()=>be({}));let n=[],s=[];const i=tu({install(o){cu(i),i._a=o,o.provide(uy,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!zC?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const dy=()=>{};function sm(e,t,n,s=dy){e.push(t);const i=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&Qc()&&Jh(i),i}function Go(e,...t){e.slice().forEach(n=>{n(...t)})}const UC=e=>e();function Qd(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,s)=>e.set(s,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],i=e[n];Xd(i)&&Xd(s)&&e.hasOwnProperty(n)&&!Et(s)&&!xo(s)?e[n]=Qd(i,s):e[n]=s}return e}const KC=Symbol();function qC(e){return!Xd(e)||!e.hasOwnProperty(KC)}const{assign:mi}=Object;function GC(e){return!!(Et(e)&&e.effect)}function JC(e,t,n,s){const{state:i,actions:o,getters:r}=t,a=n.state.value[e];let l;function c(){a||(n.state.value[e]=i?i():{});const u=qA(n.state.value[e]);return mi(u,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=tu(_e(()=>{cu(n);const p=n._s.get(e);return r[f].call(p,p)})),d),{}))}return l=hy(e,c,t,n,s,!0),l}function hy(e,t,n={},s,i,o){let r;const a=mi({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],p;const m=s.state.value[e];!o&&!m&&(s.state.value[e]={}),be({});let _;function b(C){let P;c=u=!1,typeof C=="function"?(C(s.state.value[e]),P={type:wa.patchFunction,storeId:e,events:p}):(Qd(s.state.value[e],C),P={type:wa.patchObject,payload:C,storeId:e,events:p});const E=_=Symbol();Zt().then(()=>{_===E&&(c=!0)}),u=!0,Go(d,P,s.state.value[e])}const w=o?function(){const{state:P}=n,E=P?P():{};this.$patch(B=>{mi(B,E)})}:dy;function A(){r.stop(),d=[],f=[],s._s.delete(e)}function $(C,P){return function(){cu(s);const E=Array.from(arguments),B=[],G=[];function re(I){B.push(I)}function Y(I){G.push(I)}Go(f,{args:E,name:C,store:k,after:re,onError:Y});let L;try{L=P.apply(this&&this.$id===e?this:k,E)}catch(I){throw Go(G,I),I}return L instanceof Promise?L.then(I=>(Go(B,I),I)).catch(I=>(Go(G,I),Promise.reject(I))):(Go(B,L),L)}}const M={_p:s,$id:e,$onAction:sm.bind(null,f),$patch:b,$reset:w,$subscribe(C,P={}){const E=sm(d,C,P.detached,()=>B()),B=r.run(()=>Vt(()=>s.state.value[e],G=>{(P.flush==="sync"?u:c)&&C({storeId:e,type:wa.direct,events:p},G)},mi({},l,P)));return E},$dispose:A},k=Ds(M);s._s.set(e,k);const x=(s._a&&s._a.runWithContext||UC)(()=>s._e.run(()=>(r=Xv()).run(t)));for(const C in x){const P=x[C];if(Et(P)&&!GC(P)||xo(P))o||(m&&qC(P)&&(Et(P)?P.value=m[C]:Qd(P,m[C])),s.state.value[e][C]=P);else if(typeof P=="function"){const E=$(C,P);x[C]=E,a.actions[C]=P}}return mi(k,x),mi(Ze(k),x),Object.defineProperty(k,"$state",{get:()=>s.state.value[e],set:C=>{b(P=>{mi(P,C)})}}),s._p.forEach(C=>{mi(k,r.run(()=>C({store:k,app:s._a,pinia:s,options:a})))}),m&&o&&n.hydrate&&n.hydrate(k.$state,m),c=!0,u=!0,k}function bf(e,t,n){let s,i;const o=typeof t=="function";typeof e=="string"?(s=e,i=o?n:t):(i=e,s=e.id);function r(a,l){const c=E$();return a=a||(c?ls(uy,null):null),a&&cu(a),a=cy,a._s.has(s)||(o?hy(s,t,i,a):JC(s,i,a)),a._s.get(s)}return r.$id=s,r}/*!
|
|
* vue-router v4.2.5
|
|
* (c) 2023 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/const nr=typeof window<"u";function XC(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ct=Object.assign;function ed(e,t){const n={};for(const s in t){const i=t[s];n[s]=ds(i)?i.map(e):e(i)}return n}const xa=()=>{},ds=Array.isArray,QC=/\/$/,ZC=e=>e.replace(QC,"");function td(e,t,n="/"){let s,i={},o="",r="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(s=t.slice(0,l),o=t.slice(l+1,a>-1?a:t.length),i=e(o)),a>-1&&(s=s||t.slice(0,a),r=t.slice(a,t.length)),s=sE(s??t,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:r}}function eE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function im(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function tE(e,t,n){const s=t.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&wr(t.matched[s],n.matched[i])&&fy(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function wr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function fy(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!nE(e[n],t[n]))return!1;return!0}function nE(e,t){return ds(e)?om(e,t):ds(t)?om(t,e):e===t}function om(e,t){return ds(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function sE(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let o=n.length-1,r,a;for(r=0;r<s.length;r++)if(a=s[r],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(r-(r===s.length?1:0)).join("/")}var ja;(function(e){e.pop="pop",e.push="push"})(ja||(ja={}));var ka;(function(e){e.back="back",e.forward="forward",e.unknown=""})(ka||(ka={}));function iE(e){if(!e)if(nr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),ZC(e)}const oE=/^[^#]+#/;function rE(e,t){return e.replace(oE,"#")+t}function aE(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const uu=()=>({left:window.pageXOffset,top:window.pageYOffset});function lE(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=aE(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function rm(e,t){return(history.state?history.state.position-t:-1)+e}const Zd=new Map;function cE(e,t){Zd.set(e,t)}function uE(e){const t=Zd.get(e);return Zd.delete(e),t}let dE=()=>location.protocol+"//"+location.host;function py(e,t){const{pathname:n,search:s,hash:i}=t,o=e.indexOf("#");if(o>-1){let a=i.includes(e.slice(o))?e.slice(o).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),im(l,"")}return im(n,e)+s+i}function hE(e,t,n,s){let i=[],o=[],r=null;const a=({state:f})=>{const p=py(e,location),m=n.value,_=t.value;let b=0;if(f){if(n.value=p,t.value=f,r&&r===m){r=null;return}b=_?f.position-_.position:0}else s(p);i.forEach(w=>{w(n.value,m,{delta:b,type:ja.pop,direction:b?b>0?ka.forward:ka.back:ka.unknown})})};function l(){r=n.value}function c(f){i.push(f);const p=()=>{const m=i.indexOf(f);m>-1&&i.splice(m,1)};return o.push(p),p}function u(){const{history:f}=window;f.state&&f.replaceState(ct({},f.state,{scroll:uu()}),"")}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function am(e,t,n,s=!1,i=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:i?uu():null}}function fE(e){const{history:t,location:n}=window,s={value:py(e,n)},i={value:t.state};i.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:dE()+e+l;try{t[u?"replaceState":"pushState"](c,"",f),i.value=c}catch(p){console.error(p),n[u?"replace":"assign"](f)}}function r(l,c){const u=ct({},t.state,am(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});o(l,u,!0),s.value=l}function a(l,c){const u=ct({},i.value,t.state,{forward:l,scroll:uu()});o(u.current,u,!0);const d=ct({},am(s.value,l,null),{position:u.position+1},c);o(l,d,!1),s.value=l}return{location:s,state:i,push:a,replace:r}}function pE(e){e=iE(e);const t=fE(e),n=hE(e,t.state,t.location,t.replace);function s(o,r=!0){r||n.pauseListeners(),history.go(o)}const i=ct({location:"",base:e,go:s,createHref:rE.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function gE(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),pE(e)}function mE(e){return typeof e=="string"||e&&typeof e=="object"}function gy(e){return typeof e=="string"||typeof e=="symbol"}const di={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},my=Symbol("");var lm;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(lm||(lm={}));function xr(e,t){return ct(new Error,{type:e,[my]:!0},t)}function Fs(e,t){return e instanceof Error&&my in e&&(t==null||!!(e.type&t))}const cm="[^/]+?",_E={sensitive:!1,strict:!1,start:!0,end:!0},vE=/[.+*?^${}()[\]/\\]/g;function bE(e,t){const n=ct({},_E,t),s=[];let i=n.start?"^":"";const o=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;d<c.length;d++){const f=c[d];let p=40+(n.sensitive?.25:0);if(f.type===0)d||(i+="/"),i+=f.value.replace(vE,"\\$&"),p+=40;else if(f.type===1){const{value:m,repeatable:_,optional:b,regexp:w}=f;o.push({name:m,repeatable:_,optional:b});const A=w||cm;if(A!==cm){p+=10;try{new RegExp(`(${A})`)}catch(M){throw new Error(`Invalid custom RegExp for param "${m}" (${A}): `+M.message)}}let $=_?`((?:${A})(?:/(?:${A}))*)`:`(${A})`;d||($=b&&c.length<2?`(?:/${$})`:"/"+$),b&&($+="?"),i+=$,p+=20,b&&(p+=-8),_&&(p+=-20),A===".*"&&(p+=-50)}u.push(p)}s.push(u)}if(n.strict&&n.end){const c=s.length-1;s[c][s[c].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&(i+="(?:/|$)");const r=new RegExp(i,n.sensitive?"":"i");function a(c){const u=c.match(r),d={};if(!u)return null;for(let f=1;f<u.length;f++){const p=u[f]||"",m=o[f-1];d[m.name]=p&&m.repeatable?p.split("/"):p}return d}function l(c){let u="",d=!1;for(const f of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const p of f)if(p.type===0)u+=p.value;else if(p.type===1){const{value:m,repeatable:_,optional:b}=p,w=m in c?c[m]:"";if(ds(w)&&!_)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const A=ds(w)?w.join("/"):w;if(!A)if(b)f.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);u+=A}}return u||"/"}return{re:r,score:s,keys:o,parse:a,stringify:l}}function yE(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function wE(e,t){let n=0;const s=e.score,i=t.score;for(;n<s.length&&n<i.length;){const o=yE(s[n],i[n]);if(o)return o;n++}if(Math.abs(i.length-s.length)===1){if(um(s))return 1;if(um(i))return-1}return i.length-s.length}function um(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const xE={type:0,value:""},kE=/[a-zA-Z0-9_]/;function SE(e){if(!e)return[[]];if(e==="/")return[[xE]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,s=n;const i=[];let o;function r(){o&&i.push(o),o=[]}let a=0,l,c="",u="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){s=n,n=4;continue}switch(n){case 0:l==="/"?(c&&d(),r()):l===":"?(d(),n=1):f();break;case 4:f(),n=s;break;case 1:l==="("?n=2:kE.test(l)?f():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${c}"`),d(),r(),i}function AE(e,t,n){const s=bE(SE(e.path),n),i=ct(s,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function $E(e,t){const n=[],s=new Map;t=fm({strict:!1,end:!0,sensitive:!1},t);function i(u){return s.get(u)}function o(u,d,f){const p=!f,m=CE(u);m.aliasOf=f&&f.record;const _=fm(t,u),b=[m];if("alias"in u){const $=typeof u.alias=="string"?[u.alias]:u.alias;for(const M of $)b.push(ct({},m,{components:f?f.record.components:m.components,path:M,aliasOf:f?f.record:m}))}let w,A;for(const $ of b){const{path:M}=$;if(d&&M[0]!=="/"){const k=d.record.path,y=k[k.length-1]==="/"?"":"/";$.path=d.record.path+(M&&y+M)}if(w=AE($,d,_),f?f.alias.push(w):(A=A||w,A!==w&&A.alias.push(w),p&&u.name&&!hm(w)&&r(u.name)),m.children){const k=m.children;for(let y=0;y<k.length;y++)o(k[y],w,f&&f.children[y])}f=f||w,(w.record.components&&Object.keys(w.record.components).length||w.record.name||w.record.redirect)&&l(w)}return A?()=>{r(A)}:xa}function r(u){if(gy(u)){const d=s.get(u);d&&(s.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(r),d.alias.forEach(r))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&s.delete(u.record.name),u.children.forEach(r),u.alias.forEach(r))}}function a(){return n}function l(u){let d=0;for(;d<n.length&&wE(u,n[d])>=0&&(u.record.path!==n[d].record.path||!_y(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!hm(u)&&s.set(u.record.name,u)}function c(u,d){let f,p={},m,_;if("name"in u&&u.name){if(f=s.get(u.name),!f)throw xr(1,{location:u});_=f.record.name,p=ct(dm(d.params,f.keys.filter(A=>!A.optional).map(A=>A.name)),u.params&&dm(u.params,f.keys.map(A=>A.name))),m=f.stringify(p)}else if("path"in u)m=u.path,f=n.find(A=>A.re.test(m)),f&&(p=f.parse(m),_=f.record.name);else{if(f=d.name?s.get(d.name):n.find(A=>A.re.test(d.path)),!f)throw xr(1,{location:u,currentLocation:d});_=f.record.name,p=ct({},d.params,u.params),m=f.stringify(p)}const b=[];let w=f;for(;w;)b.unshift(w.record),w=w.parent;return{name:_,path:m,params:p,matched:b,meta:PE(b)}}return e.forEach(u=>o(u)),{addRoute:o,resolve:c,removeRoute:r,getRoutes:a,getRecordMatcher:i}}function dm(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function CE(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:EE(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function EE(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function hm(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function PE(e){return e.reduce((t,n)=>ct(t,n.meta),{})}function fm(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function _y(e,t){return t.children.some(n=>n===e||_y(e,n))}const vy=/#/g,TE=/&/g,ME=/\//g,DE=/=/g,OE=/\?/g,by=/\+/g,IE=/%5B/g,RE=/%5D/g,yy=/%5E/g,LE=/%60/g,wy=/%7B/g,NE=/%7C/g,xy=/%7D/g,FE=/%20/g;function yf(e){return encodeURI(""+e).replace(NE,"|").replace(IE,"[").replace(RE,"]")}function BE(e){return yf(e).replace(wy,"{").replace(xy,"}").replace(yy,"^")}function eh(e){return yf(e).replace(by,"%2B").replace(FE,"+").replace(vy,"%23").replace(TE,"%26").replace(LE,"`").replace(wy,"{").replace(xy,"}").replace(yy,"^")}function VE(e){return eh(e).replace(DE,"%3D")}function HE(e){return yf(e).replace(vy,"%23").replace(OE,"%3F")}function jE(e){return e==null?"":HE(e).replace(ME,"%2F")}function Mc(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function WE(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<s.length;++i){const o=s[i].replace(by," "),r=o.indexOf("="),a=Mc(r<0?o:o.slice(0,r)),l=r<0?null:Mc(o.slice(r+1));if(a in t){let c=t[a];ds(c)||(c=t[a]=[c]),c.push(l)}else t[a]=l}return t}function pm(e){let t="";for(let n in e){const s=e[n];if(n=VE(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(ds(s)?s.map(o=>o&&eh(o)):[s&&eh(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function zE(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ds(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return t}const YE=Symbol(""),gm=Symbol(""),wf=Symbol(""),xf=Symbol(""),th=Symbol("");function Xr(){let e=[];function t(s){return e.push(s),()=>{const i=e.indexOf(s);i>-1&&e.splice(i,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function yi(e,t,n,s,i){const o=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((r,a)=>{const l=d=>{d===!1?a(xr(4,{from:n,to:t})):d instanceof Error?a(d):mE(d)?a(xr(2,{from:t,to:d})):(o&&s.enterCallbacks[i]===o&&typeof d=="function"&&o.push(d),r())},c=e.call(s&&s.instances[i],t,n,l);let u=Promise.resolve(c);e.length<3&&(u=u.then(l)),u.catch(d=>a(d))})}function nd(e,t,n,s){const i=[];for(const o of e)for(const r in o.components){let a=o.components[r];if(!(t!=="beforeRouteEnter"&&!o.instances[r]))if(UE(a)){const c=(a.__vccOpts||a)[t];c&&i.push(yi(c,n,s,o,r))}else{let l=a();i.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${r}" at "${o.path}"`));const u=XC(c)?c.default:c;o.components[r]=u;const f=(u.__vccOpts||u)[t];return f&&yi(f,n,s,o,r)()}))}}return i}function UE(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function mm(e){const t=ls(wf),n=ls(xf),s=_e(()=>t.resolve(q(e.to))),i=_e(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(wr.bind(null,u));if(f>-1)return f;const p=_m(l[c-2]);return c>1&&_m(u)===p&&d[d.length-1].path!==p?d.findIndex(wr.bind(null,l[c-2])):f}),o=_e(()=>i.value>-1&&JE(n.params,s.value.params)),r=_e(()=>i.value>-1&&i.value===n.matched.length-1&&fy(n.params,s.value.params));function a(l={}){return GE(l)?t[q(e.replace)?"replace":"push"](q(e.to)).catch(xa):Promise.resolve()}return{route:s,href:_e(()=>s.value.href),isActive:o,isExactActive:r,navigate:a}}const KE=Nt({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:mm,setup(e,{slots:t}){const n=Ds(mm(e)),{options:s}=ls(wf),i=_e(()=>({[vm(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[vm(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:To("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}}),qE=KE;function GE(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function JE(e,t){for(const n in t){const s=t[n],i=e[n];if(typeof s=="string"){if(s!==i)return!1}else if(!ds(i)||i.length!==s.length||s.some((o,r)=>o!==i[r]))return!1}return!0}function _m(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const vm=(e,t,n)=>e??t??n,XE=Nt({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=ls(th),i=_e(()=>e.route||s.value),o=ls(gm,0),r=_e(()=>{let c=q(o);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=_e(()=>i.value.matched[r.value]);ac(gm,_e(()=>r.value+1)),ac(YE,a),ac(th,i);const l=be();return Vt(()=>[l.value,a.value,e.name],([c,u,d],[f,p,m])=>{u&&(u.instances[d]=c,p&&p!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),c&&u&&(!p||!wr(u,p)||!f)&&(u.enterCallbacks[d]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=i.value,u=e.name,d=a.value,f=d&&d.components[u];if(!f)return bm(n.default,{Component:f,route:c});const p=d.props[u],m=p?p===!0?c.params:typeof p=="function"?p(c):p:null,b=To(f,ct({},m,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return bm(n.default,{Component:b,route:c})||b}}});function bm(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const ky=XE;function QE(e){const t=$E(e.routes,e),n=e.parseQuery||WE,s=e.stringifyQuery||pm,i=e.history,o=Xr(),r=Xr(),a=Xr(),l=of(di);let c=di;nr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ed.bind(null,T=>""+T),d=ed.bind(null,jE),f=ed.bind(null,Mc);function p(T,se){let de,ke;return gy(T)?(de=t.getRecordMatcher(T),ke=se):ke=T,t.addRoute(ke,de)}function m(T){const se=t.getRecordMatcher(T);se&&t.removeRoute(se)}function _(){return t.getRoutes().map(T=>T.record)}function b(T){return!!t.getRecordMatcher(T)}function w(T,se){if(se=ct({},se||l.value),typeof T=="string"){const D=td(n,T,se.path),H=t.resolve({path:D.path},se),W=i.createHref(D.fullPath);return ct(D,H,{params:f(H.params),hash:Mc(D.hash),redirectedFrom:void 0,href:W})}let de;if("path"in T)de=ct({},T,{path:td(n,T.path,se.path).path});else{const D=ct({},T.params);for(const H in D)D[H]==null&&delete D[H];de=ct({},T,{params:d(D)}),se.params=d(se.params)}const ke=t.resolve(de,se),N=T.hash||"";ke.params=u(f(ke.params));const fe=eE(s,ct({},T,{hash:BE(N),path:ke.path})),v=i.createHref(fe);return ct({fullPath:fe,hash:N,query:s===pm?zE(T.query):T.query||{}},ke,{redirectedFrom:void 0,href:v})}function A(T){return typeof T=="string"?td(n,T,l.value.path):ct({},T)}function $(T,se){if(c!==T)return xr(8,{from:se,to:T})}function M(T){return x(T)}function k(T){return M(ct(A(T),{replace:!0}))}function y(T){const se=T.matched[T.matched.length-1];if(se&&se.redirect){const{redirect:de}=se;let ke=typeof de=="function"?de(T):de;return typeof ke=="string"&&(ke=ke.includes("?")||ke.includes("#")?ke=A(ke):{path:ke},ke.params={}),ct({query:T.query,hash:T.hash,params:"path"in ke?{}:T.params},ke)}}function x(T,se){const de=c=w(T),ke=l.value,N=T.state,fe=T.force,v=T.replace===!0,D=y(de);if(D)return x(ct(A(D),{state:typeof D=="object"?ct({},N,D.state):N,force:fe,replace:v}),se||de);const H=de;H.redirectedFrom=se;let W;return!fe&&tE(s,ke,de)&&(W=xr(16,{to:H,from:ke}),we(ke,ke,!0,!1)),(W?Promise.resolve(W):E(H,ke)).catch(ie=>Fs(ie)?Fs(ie,2)?ie:ce(ie):Q(ie,H,ke)).then(ie=>{if(ie){if(Fs(ie,2))return x(ct({replace:v},A(ie.to),{state:typeof ie.to=="object"?ct({},N,ie.to.state):N,force:fe}),se||H)}else ie=G(H,ke,!0,v,N);return B(H,ke,ie),ie})}function C(T,se){const de=$(T,se);return de?Promise.reject(de):Promise.resolve()}function P(T){const se=R.values().next().value;return se&&typeof se.runWithContext=="function"?se.runWithContext(T):T()}function E(T,se){let de;const[ke,N,fe]=ZE(T,se);de=nd(ke.reverse(),"beforeRouteLeave",T,se);for(const D of ke)D.leaveGuards.forEach(H=>{de.push(yi(H,T,se))});const v=C.bind(null,T,se);return de.push(v),oe(de).then(()=>{de=[];for(const D of o.list())de.push(yi(D,T,se));return de.push(v),oe(de)}).then(()=>{de=nd(N,"beforeRouteUpdate",T,se);for(const D of N)D.updateGuards.forEach(H=>{de.push(yi(H,T,se))});return de.push(v),oe(de)}).then(()=>{de=[];for(const D of fe)if(D.beforeEnter)if(ds(D.beforeEnter))for(const H of D.beforeEnter)de.push(yi(H,T,se));else de.push(yi(D.beforeEnter,T,se));return de.push(v),oe(de)}).then(()=>(T.matched.forEach(D=>D.enterCallbacks={}),de=nd(fe,"beforeRouteEnter",T,se),de.push(v),oe(de))).then(()=>{de=[];for(const D of r.list())de.push(yi(D,T,se));return de.push(v),oe(de)}).catch(D=>Fs(D,8)?D:Promise.reject(D))}function B(T,se,de){a.list().forEach(ke=>P(()=>ke(T,se,de)))}function G(T,se,de,ke,N){const fe=$(T,se);if(fe)return fe;const v=se===di,D=nr?history.state:{};de&&(ke||v?i.replace(T.fullPath,ct({scroll:v&&D&&D.scroll},N)):i.push(T.fullPath,N)),l.value=T,we(T,se,de,v),ce()}let re;function Y(){re||(re=i.listen((T,se,de)=>{if(!ee.listening)return;const ke=w(T),N=y(ke);if(N){x(ct(N,{replace:!0}),ke).catch(xa);return}c=ke;const fe=l.value;nr&&cE(rm(fe.fullPath,de.delta),uu()),E(ke,fe).catch(v=>Fs(v,12)?v:Fs(v,2)?(x(v.to,ke).then(D=>{Fs(D,20)&&!de.delta&&de.type===ja.pop&&i.go(-1,!1)}).catch(xa),Promise.reject()):(de.delta&&i.go(-de.delta,!1),Q(v,ke,fe))).then(v=>{v=v||G(ke,fe,!1),v&&(de.delta&&!Fs(v,8)?i.go(-de.delta,!1):de.type===ja.pop&&Fs(v,20)&&i.go(-1,!1)),B(ke,fe,v)}).catch(xa)}))}let L=Xr(),I=Xr(),V;function Q(T,se,de){ce(T);const ke=I.list();return ke.length?ke.forEach(N=>N(T,se,de)):console.error(T),Promise.reject(T)}function Z(){return V&&l.value!==di?Promise.resolve():new Promise((T,se)=>{L.add([T,se])})}function ce(T){return V||(V=!T,Y(),L.list().forEach(([se,de])=>T?de(T):se()),L.reset()),T}function we(T,se,de,ke){const{scrollBehavior:N}=e;if(!nr||!N)return Promise.resolve();const fe=!de&&uE(rm(T.fullPath,0))||(ke||!de)&&history.state&&history.state.scroll||null;return Zt().then(()=>N(T,se,fe)).then(v=>v&&lE(v)).catch(v=>Q(v,T,se))}const U=T=>i.go(T);let X;const R=new Set,ee={currentRoute:l,listening:!0,addRoute:p,removeRoute:m,hasRoute:b,getRoutes:_,resolve:w,options:e,push:M,replace:k,go:U,back:()=>U(-1),forward:()=>U(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:I.add,isReady:Z,install(T){const se=this;T.component("RouterLink",qE),T.component("RouterView",ky),T.config.globalProperties.$router=se,Object.defineProperty(T.config.globalProperties,"$route",{enumerable:!0,get:()=>q(l)}),nr&&!X&&l.value===di&&(X=!0,M(i.location).catch(N=>{}));const de={};for(const N in di)Object.defineProperty(de,N,{get:()=>l.value[N],enumerable:!0});T.provide(wf,se),T.provide(xf,cb(de)),T.provide(th,l);const ke=T.unmount;R.add(T),T.unmount=function(){R.delete(T),R.size<1&&(c=di,re&&re(),re=null,l.value=di,X=!1,V=!1),ke()}}};function oe(T){return T.reduce((se,de)=>se.then(()=>P(de)),Promise.resolve())}return ee}function ZE(e,t){const n=[],s=[],i=[],o=Math.max(t.matched.length,e.matched.length);for(let r=0;r<o;r++){const a=t.matched[r];a&&(e.matched.find(c=>wr(c,a))?s.push(a):n.push(a));const l=e.matched[r];l&&(t.matched.find(c=>wr(c,l))||i.push(l))}return[n,s,i]}function eP(){return ls(xf)}const tP={getCookie(e){const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2)return n.pop().split(";").shift()}};bf("WGDashboardStore",{state:()=>({WireguardConfigurations:void 0,DashboardConfiguration:void 0}),actions:{async getDashboardConfiguration(){await Tt("/api/getDashboardConfiguration",{},e=>{console.log(e.status),e.status&&(this.DashboardConfiguration=e.data)})}}});const ym="[a-fA-F\\d:]",xi=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${ym})|(?<=${ym})(?=\\s|$))`:"",ss="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",Ft="[a-fA-F\\d]{1,4}",du=`
|
|
(?:
|
|
(?:${Ft}:){7}(?:${Ft}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
(?:${Ft}:){6}(?:${ss}|:${Ft}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
(?:${Ft}:){5}(?::${ss}|(?::${Ft}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
(?:${Ft}:){4}(?:(?::${Ft}){0,1}:${ss}|(?::${Ft}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
(?:${Ft}:){3}(?:(?::${Ft}){0,2}:${ss}|(?::${Ft}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
(?:${Ft}:){2}(?:(?::${Ft}){0,3}:${ss}|(?::${Ft}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
(?:${Ft}:){1}(?:(?::${Ft}){0,4}:${ss}|(?::${Ft}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
(?::(?:(?::${Ft}){0,5}:${ss}|(?::${Ft}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),nP=new RegExp(`(?:^${ss}$)|(?:^${du}$)`),sP=new RegExp(`^${ss}$`),iP=new RegExp(`^${du}$`),hu=e=>e&&e.exact?nP:new RegExp(`(?:${xi(e)}${ss}${xi(e)})|(?:${xi(e)}${du}${xi(e)})`,"g");hu.v4=e=>e&&e.exact?sP:new RegExp(`${xi(e)}${ss}${xi(e)}`,"g");hu.v6=e=>e&&e.exact?iP:new RegExp(`${xi(e)}${du}${xi(e)}`,"g");const Sy={exact:!1},Ay=`${hu.v4().source}\\/(3[0-2]|[12]?[0-9])`,$y=`${hu.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,oP=new RegExp(`^${Ay}$`),rP=new RegExp(`^${$y}$`),aP=({exact:e}=Sy)=>e?oP:new RegExp(Ay,"g"),lP=({exact:e}=Sy)=>e?rP:new RegExp($y,"g"),Cy=aP({exact:!0}),Ey=lP({exact:!0}),kf=e=>Cy.test(e)?4:Ey.test(e)?6:0;kf.v4=e=>Cy.test(e);kf.v6=e=>Ey.test(e);const Bn=bf("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:"Total Received",value:"total_receive",unit:"GB",type:"number"},{display:"Total Sent",value:"total_sent",unit:"GB",type:"number"},{display:"Total Data",value:"total_data",unit:"GB",type:"number"},{display:"Date",value:"date",type:"date"}],Operator:[{display:"equal",value:"eq"},{display:"not equal",value:"neq"},{display:"larger than",value:"lgt"},{display:"less than",value:"lst"}],Action:[{display:"Restrict Peer",value:"restrict"},{display:"Delete Peer",value:"delete"}]}}}),actions:{async getConfigurations(){await Tt("/api/getWireguardConfigurations",{},e=>{e.status&&(this.Configurations=e.data)})},regexCheckIP(e){return/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/.test(e)},checkCIDR(e){return kf(e)!==0}}}),ze=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n},cP={name:"navbar",setup(){const e=Bn(),t=et();return{wireguardConfigurationsStore:e,dashboardConfigurationStore:t}}},si=e=>(en("data-v-491aba3c"),e=e(),tn(),e),uP={class:"col-md-3 col-lg-2 d-md-block p-3 navbar-container bg-body",style:{height:"calc(-50px + 100vh)"}},dP={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},hP={class:"sidebar-sticky pt-3"},fP={class:"nav flex-column px-2"},pP={class:"nav-item"},gP=si(()=>h("i",{class:"bi bi-house me-2"},null,-1)),mP={class:"nav-item"},_P=si(()=>h("i",{class:"bi bi-gear me-2"},null,-1)),vP=si(()=>h("hr",{class:"text-body"},null,-1)),bP=si(()=>h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-body-text me-2"}),ye(" Configurations ")],-1)),yP={class:"nav flex-column px-2"},wP={class:"nav-item"},xP=si(()=>h("hr",{class:"text-body"},null,-1)),kP=si(()=>h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-tools me-2"}),ye(" Tools ")],-1)),SP={class:"nav flex-column px-2"},AP={class:"nav-item"},$P={class:"nav-item"},CP=si(()=>h("hr",{class:"text-body"},null,-1)),EP={class:"nav flex-column px-2"},PP={class:"nav-item"},TP=si(()=>h("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),MP=si(()=>h("ul",{class:"nav flex-column"},[h("li",{class:"nav-item"},[h("a",{href:"https://github.com/donaldzou/WGDashboard/releases/tag/"},[h("small",{class:"nav-link text-muted"})])])],-1));function DP(e,t,n,s,i,o){const r=je("RouterLink");return O(),F("div",uP,[h("nav",dP,[h("div",hP,[h("ul",fP,[h("li",pP,[$e(r,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:Te(()=>[gP,ye(" Home")]),_:1})]),h("li",mP,[$e(r,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:Te(()=>[_P,ye(" Settings")]),_:1})])]),vP,bP,h("ul",yP,[h("li",wP,[(O(!0),F(Me,null,Ke(this.wireguardConfigurationsStore.Configurations,a=>(O(),Ne(r,{to:"/configuration/"+a.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:Te(()=>[ye(ve(a.Name),1)]),_:2},1032,["to"]))),256))])]),xP,kP,h("ul",SP,[h("li",AP,[$e(r,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:Te(()=>[ye("Ping")]),_:1})]),h("li",$P,[$e(r,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:Te(()=>[ye("Traceroute")]),_:1})])]),CP,h("ul",EP,[h("li",PP,[h("a",{class:"nav-link text-danger rounded-3",onClick:t[0]||(t[0]=a=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[TP,ye(" Sign Out")])])]),MP])])])}const OP=ze(cP,[["render",DP],["__scopeId","data-v-491aba3c"]]),IP={name:"message",props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},RP=["id"],LP={class:"card-body"},NP={class:"fw-bold d-block",style:{"text-transform":"uppercase"}};function FP(e,t,n,s,i,o){return O(),F("div",{class:Ee(["card shadow rounded-3 position-relative mb-2",{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"}]),id:this.message.id,style:{width:"400px"}},[h("div",LP,[h("small",NP,"FROM "+ve(this.message.from),1),ye(" "+ve(this.message.content),1)])],10,RP)}const Py=ze(IP,[["render",FP]]),BP={name:"index",components:{Message:Py,Navbar:OP},async setup(){return{dashboardConfigurationStore:et()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(e=>e.show)}}},VP=["data-bs-theme"],HP={class:"row h-100"},jP={class:"col-md-9 ml-sm-auto col-lg-10 px-md-4 overflow-y-scroll mb-0",style:{height:"calc(100vh - 50px)"}},WP={class:"messageCentre text-body position-fixed"};function zP(e,t,n,s,i,o){const r=je("Navbar"),a=je("RouterView"),l=je("Message");return O(),F("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[h("div",HP,[$e(r),h("main",jP,[(O(),Ne(uf,null,{default:Te(()=>[$e(a,null,{default:Te(({Component:c})=>[$e(Bt,{name:"fade2",mode:"out-in"},{default:Te(()=>[(O(),Ne(Io(c)))]),_:2},1024)]),_:1})]),_:1})),h("div",WP,[$e(Wi,{name:"message",tag:"div",class:"position-relative"},{default:Te(()=>[(O(!0),F(Me,null,Ke(o.getMessages.slice().reverse(),c=>(O(),Ne(l,{message:c,key:c.id},null,8,["message"]))),128))]),_:1})])])])],8,VP)}const YP=ze(BP,[["render",zP],["__scopeId","data-v-54755a4a"]]);var Ty={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(_v,function(){var n=1e3,s=6e4,i=36e5,o="millisecond",r="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",p="year",m="date",_="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var L=["th","st","nd","rd"],I=Y%100;return"["+Y+(L[(I-20)%10]||L[I]||L[0])+"]"}},$=function(Y,L,I){var V=String(Y);return!V||V.length>=L?Y:""+Array(L+1-V.length).join(I)+Y},M={s:$,z:function(Y){var L=-Y.utcOffset(),I=Math.abs(L),V=Math.floor(I/60),Q=I%60;return(L<=0?"+":"-")+$(V,2,"0")+":"+$(Q,2,"0")},m:function Y(L,I){if(L.date()<I.date())return-Y(I,L);var V=12*(I.year()-L.year())+(I.month()-L.month()),Q=L.clone().add(V,d),Z=I-Q<0,ce=L.clone().add(V+(Z?-1:1),d);return+(-(V+(I-Q)/(Z?Q-ce:ce-Q))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:d,y:p,w:u,d:c,D:m,h:l,m:a,s:r,ms:o,Q:f}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},k="en",y={};y[k]=A;var x="$isDayjsObject",C=function(Y){return Y instanceof G||!(!Y||!Y[x])},P=function Y(L,I,V){var Q;if(!L)return k;if(typeof L=="string"){var Z=L.toLowerCase();y[Z]&&(Q=Z),I&&(y[Z]=I,Q=Z);var ce=L.split("-");if(!Q&&ce.length>1)return Y(ce[0])}else{var we=L.name;y[we]=L,Q=we}return!V&&Q&&(k=Q),Q||!V&&k},E=function(Y,L){if(C(Y))return Y.clone();var I=typeof L=="object"?L:{};return I.date=Y,I.args=arguments,new G(I)},B=M;B.l=P,B.i=C,B.w=function(Y,L){return E(Y,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var G=function(){function Y(I){this.$L=P(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[x]=!0}var L=Y.prototype;return L.parse=function(I){this.$d=function(V){var Q=V.date,Z=V.utc;if(Q===null)return new Date(NaN);if(B.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var ce=Q.match(b);if(ce){var we=ce[2]-1||0,U=(ce[7]||"0").substring(0,3);return Z?new Date(Date.UTC(ce[1],we,ce[3]||1,ce[4]||0,ce[5]||0,ce[6]||0,U)):new Date(ce[1],we,ce[3]||1,ce[4]||0,ce[5]||0,ce[6]||0,U)}}return new Date(Q)}(I),this.init()},L.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},L.$utils=function(){return B},L.isValid=function(){return this.$d.toString()!==_},L.isSame=function(I,V){var Q=E(I);return this.startOf(V)<=Q&&Q<=this.endOf(V)},L.isAfter=function(I,V){return E(I)<this.startOf(V)},L.isBefore=function(I,V){return this.endOf(V)<E(I)},L.$g=function(I,V,Q){return B.u(I)?this[V]:this.set(Q,I)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(I,V){var Q=this,Z=!!B.u(V)||V,ce=B.p(I),we=function(de,ke){var N=B.w(Q.$u?Date.UTC(Q.$y,ke,de):new Date(Q.$y,ke,de),Q);return Z?N:N.endOf(c)},U=function(de,ke){return B.w(Q.toDate()[de].apply(Q.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(ke)),Q)},X=this.$W,R=this.$M,ee=this.$D,oe="set"+(this.$u?"UTC":"");switch(ce){case p:return Z?we(1,0):we(31,11);case d:return Z?we(1,R):we(0,R+1);case u:var T=this.$locale().weekStart||0,se=(X<T?X+7:X)-T;return we(Z?ee-se:ee+(6-se),R);case c:case m:return U(oe+"Hours",0);case l:return U(oe+"Minutes",1);case a:return U(oe+"Seconds",2);case r:return U(oe+"Milliseconds",3);default:return this.clone()}},L.endOf=function(I){return this.startOf(I,!1)},L.$set=function(I,V){var Q,Z=B.p(I),ce="set"+(this.$u?"UTC":""),we=(Q={},Q[c]=ce+"Date",Q[m]=ce+"Date",Q[d]=ce+"Month",Q[p]=ce+"FullYear",Q[l]=ce+"Hours",Q[a]=ce+"Minutes",Q[r]=ce+"Seconds",Q[o]=ce+"Milliseconds",Q)[Z],U=Z===c?this.$D+(V-this.$W):V;if(Z===d||Z===p){var X=this.clone().set(m,1);X.$d[we](U),X.init(),this.$d=X.set(m,Math.min(this.$D,X.daysInMonth())).$d}else we&&this.$d[we](U);return this.init(),this},L.set=function(I,V){return this.clone().$set(I,V)},L.get=function(I){return this[B.p(I)]()},L.add=function(I,V){var Q,Z=this;I=Number(I);var ce=B.p(V),we=function(R){var ee=E(Z);return B.w(ee.date(ee.date()+Math.round(R*I)),Z)};if(ce===d)return this.set(d,this.$M+I);if(ce===p)return this.set(p,this.$y+I);if(ce===c)return we(1);if(ce===u)return we(7);var U=(Q={},Q[a]=s,Q[l]=i,Q[r]=n,Q)[ce]||1,X=this.$d.getTime()+I*U;return B.w(X,this)},L.subtract=function(I,V){return this.add(-1*I,V)},L.format=function(I){var V=this,Q=this.$locale();if(!this.isValid())return Q.invalidDate||_;var Z=I||"YYYY-MM-DDTHH:mm:ssZ",ce=B.z(this),we=this.$H,U=this.$m,X=this.$M,R=Q.weekdays,ee=Q.months,oe=Q.meridiem,T=function(ke,N,fe,v){return ke&&(ke[N]||ke(V,Z))||fe[N].slice(0,v)},se=function(ke){return B.s(we%12||12,ke,"0")},de=oe||function(ke,N,fe){var v=ke<12?"AM":"PM";return fe?v.toLowerCase():v};return Z.replace(w,function(ke,N){return N||function(fe){switch(fe){case"YY":return String(V.$y).slice(-2);case"YYYY":return B.s(V.$y,4,"0");case"M":return X+1;case"MM":return B.s(X+1,2,"0");case"MMM":return T(Q.monthsShort,X,ee,3);case"MMMM":return T(ee,X);case"D":return V.$D;case"DD":return B.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return T(Q.weekdaysMin,V.$W,R,2);case"ddd":return T(Q.weekdaysShort,V.$W,R,3);case"dddd":return R[V.$W];case"H":return String(we);case"HH":return B.s(we,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return de(we,U,!0);case"A":return de(we,U,!1);case"m":return String(U);case"mm":return B.s(U,2,"0");case"s":return String(V.$s);case"ss":return B.s(V.$s,2,"0");case"SSS":return B.s(V.$ms,3,"0");case"Z":return ce}return null}(ke)||ce.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(I,V,Q){var Z,ce=this,we=B.p(V),U=E(I),X=(U.utcOffset()-this.utcOffset())*s,R=this-U,ee=function(){return B.m(ce,U)};switch(we){case p:Z=ee()/12;break;case d:Z=ee();break;case f:Z=ee()/3;break;case u:Z=(R-X)/6048e5;break;case c:Z=(R-X)/864e5;break;case l:Z=R/i;break;case a:Z=R/s;break;case r:Z=R/n;break;default:Z=R}return Q?Z:B.a(Z)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return y[this.$L]},L.locale=function(I,V){if(!I)return this.$L;var Q=this.clone(),Z=P(I,V,!0);return Z&&(Q.$L=Z),Q},L.clone=function(){return B.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},Y}(),re=G.prototype;return E.prototype=re,[["$ms",o],["$s",r],["$m",a],["$H",l],["$W",c],["$M",d],["$y",p],["$D",m]].forEach(function(Y){re[Y[1]]=function(L){return this.$g(L,Y[0],Y[1])}}),E.extend=function(Y,L){return Y.$i||(Y(L,G,E),Y.$i=!0),E},E.locale=P,E.isDayjs=C,E.unix=function(Y){return E(1e3*Y)},E.en=y[k],E.Ls=y,E.p={},E})})(Ty);var UP=Ty.exports;const Cn=yS(UP),KP={name:"RemoteServer",props:{server:Object},data(){return{active:!1,startTime:void 0,endTime:void 0,errorMsg:"",refreshing:!1}},methods:{async handshake(){this.active=!1,this.refreshing=!0,this.server.host&&this.server.apiKey&&(this.startTime=void 0,this.endTime=void 0,this.startTime=Cn(),await fetch(`${this.server.host}/api/handshake`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},method:"GET",signal:AbortSignal.timeout(5e3)}).then(e=>{if(e.status===200)return e.json();throw new Error(e.statusText)}).then(()=>{this.endTime=Cn(),this.active=!0}).catch(e=>{this.active=!1,this.errorMsg=e}),this.refreshing=!1)},async connect(){await fetch(`${this.server.host}/api/authenticate`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},body:JSON.stringify({host:window.location.hostname}),method:"POST",signal:AbortSignal.timeout(5e3)}).then(e=>e.json()).then(e=>{this.$emit("setActiveServer"),this.$router.push("/")})}},mounted(){this.handshake()},computed:{getHandshakeTime(){return this.startTime&&this.endTime?`${Cn().subtract(this.startTime).millisecond()}ms`:this.refreshing?"Pinging...":this.errorMsg?this.errorMsg:"N/A"}}},Br=e=>(en("data-v-25ec6be3"),e=e(),tn(),e),qP={class:"card rounded-3"},GP={class:"card-body"},JP={class:"d-flex gap-3 w-100 remoteServerContainer"},XP={class:"d-flex gap-3 align-items-center flex-grow-1"},QP=Br(()=>h("i",{class:"bi bi-server"},null,-1)),ZP={class:"d-flex gap-3 align-items-center flex-grow-1"},eT=Br(()=>h("i",{class:"bi bi-key-fill"},null,-1)),tT={class:"d-flex gap-2 button-group"},nT=Br(()=>h("i",{class:"bi bi-trash"},null,-1)),sT=[nT],iT=Br(()=>h("i",{class:"bi bi-arrow-right-circle"},null,-1)),oT=[iT],rT={class:"card-footer gap-2 d-flex align-items-center"},aT={key:0,class:"spin ms-auto text-primary-emphasis"},lT=Br(()=>h("i",{class:"bi bi-arrow-clockwise"},null,-1)),cT=[lT],uT=Br(()=>h("i",{class:"bi bi-arrow-clockwise me"},null,-1)),dT=[uT];function hT(e,t,n,s,i,o){return O(),F("div",qP,[h("div",GP,[h("div",JP,[h("div",XP,[QP,Re(h("input",{class:"form-control form-control-sm",onBlur:t[0]||(t[0]=r=>this.handshake()),"onUpdate:modelValue":t[1]||(t[1]=r=>this.server.host=r),type:"url"},null,544),[[We,this.server.host]])]),h("div",ZP,[eT,Re(h("input",{class:"form-control form-control-sm",onBlur:t[2]||(t[2]=r=>this.handshake()),"onUpdate:modelValue":t[3]||(t[3]=r=>this.server.apiKey=r),type:"text"},null,544),[[We,this.server.apiKey]])]),h("div",tT,[h("button",{onClick:t[4]||(t[4]=r=>this.$emit("delete")),class:"ms-auto btn btn-sm bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle"},sT),h("button",{onClick:t[5]||(t[5]=r=>this.connect()),class:Ee([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},oT,2)])])]),h("div",rT,[h("span",{class:Ee(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),h("small",null,ve(this.getHandshakeTime),1),this.refreshing?(O(),F("div",aT,cT)):(O(),F("a",{key:1,role:"button",onClick:t[6]||(t[6]=r=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},dT))])])}const fT=ze(KP,[["render",hT],["__scopeId","data-v-25ec6be3"]]),pT={name:"RemoteServerList",setup(){return{store:et()}},components:{RemoteServer:fT}},gT={class:"w-100 mt-3"},mT={class:"d-flex align-items-center mb-3"},_T=h("h5",{class:"mb-0"},"Server List",-1),vT=h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1),bT={class:"w-100 d-flex gap-3 flex-column p-3 border border-1 border-secondary-subtle rounded-3",style:{height:"400px","overflow-y":"scroll"}},yT={key:0,class:"text-muted m-auto"},wT=h("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1);function xT(e,t,n,s,i,o){const r=je("RemoteServer");return O(),F("div",gT,[h("div",mT,[_T,h("button",{onClick:t[0]||(t[0]=a=>this.store.addCrossServerConfiguration()),class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle shadow-sm ms-auto"},[vT,ye("Server ")])]),h("div",bT,[(O(!0),F(Me,null,Ke(this.store.CrossServerConfiguration.ServerList,(a,l)=>(O(),Ne(r,{onSetActiveServer:c=>this.store.setActiveCrossServer(l),onDelete:c=>this.store.deleteCrossServerConfiguration(l),key:l,server:a},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(O(),F("h6",yT,[ye(" Click"),wT,ye("to add your server")])):ae("",!0)])])}const kT=ze(pT,[["render",xT]]),ST={name:"signin",components:{RemoteServerList:kT,Message:Py},async setup(){const e=et();let t="dark",n=!1;return e.IsElectronApp||(await Tt("/api/getDashboardTheme",{},s=>{t=s.data}),await Tt("/api/isTotpEnabled",{},s=>{n=s.data})),e.removeActiveCrossServer(),{store:e,theme:t,totpEnabled:n}},data(){return{username:"",password:"",totp:"",loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(e=>e.show)}},methods:{async auth(){this.username&&this.password&&(this.totpEnabled&&this.totp||!this.totpEnabled)?(this.loading=!0,await dt("/api/authenticate",{username:this.username,password:this.password,totp:this.totp},e=>{e.status?(this.loginError=!1,this.$refs.signInBtn.classList.add("signedIn"),e.message?this.$router.push("/welcome"):this.store.Redirect!==void 0?this.$router.push(this.store.Redirect):this.$router.push("/")):(this.loginError=!0,this.loginErrorMessage=e.message,document.querySelectorAll("input[required]").forEach(t=>{t.classList.remove("is-valid"),t.classList.add("is-invalid")}),this.loading=!1)})):document.querySelectorAll("input[required]").forEach(e=>{e.value.length===0?(e.classList.remove("is-valid"),e.classList.add("is-invalid")):(e.classList.remove("is-invalid"),e.classList.add("is-valid"))})}}},ii=e=>(en("data-v-b7f1c75e"),e=e(),tn(),e),AT=["data-bs-theme"],$T={class:"login-box m-auto"},CT={class:"m-auto",style:{width:"700px"}},ET=ii(()=>h("h4",{class:"mb-0 text-body"},"Welcome to",-1)),PT=ii(()=>h("span",{class:"dashboardLogo display-3"},[h("strong",null,"WGDashboard")],-1)),TT={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},MT={class:"form-group text-body"},DT=ii(()=>h("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-person-circle"})],-1)),OT={class:"form-group text-body"},IT=ii(()=>h("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-key-fill"})],-1)),RT={key:0,class:"form-group text-body"},LT=ii(()=>h("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-lock-fill"})],-1)),NT={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},FT={key:0,class:"d-flex w-100"},BT=ii(()=>h("i",{class:"ms-auto bi bi-chevron-right"},null,-1)),VT={key:1,class:"d-flex w-100 align-items-center"},HT=ii(()=>h("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1)),jT={key:3,class:"d-flex mt-3"},WT={class:"form-check form-switch ms-auto"},zT=ii(()=>h("label",{class:"form-check-label",for:"flexSwitchCheckChecked"},"Access Remote Server",-1)),YT=ii(()=>h("small",{class:"text-muted pb-3 d-block w-100 text-center mt-3"},[ye(" WGDashboard v4.0 | Developed with ❤️ by "),h("a",{href:"https://github.com/donaldzou",target:"_blank"},[h("strong",null,"Donald Zou")])],-1)),UT={class:"messageCentre text-body position-absolute end-0 m-3"};function KT(e,t,n,s,i,o){const r=je("RemoteServerList"),a=je("Message");return O(),F("div",{class:"container-fluid login-container-fluid d-flex main flex-column py-4 text-body",style:{"overflow-y":"scroll"},"data-bs-theme":this.theme},[h("div",$T,[h("div",CT,[ET,PT,i.loginError?(O(),F("div",TT,ve(this.loginErrorMessage),1)):ae("",!0),this.store.CrossServerConfiguration.Enable?(O(),Ne(r,{key:2})):(O(),F("form",{key:1,onSubmit:t[3]||(t[3]=l=>{l.preventDefault(),this.auth()})},[h("div",MT,[DT,Re(h("input",{type:"text","onUpdate:modelValue":t[0]||(t[0]=l=>i.username=l),class:"form-control",id:"username",name:"username",autocomplete:"on",placeholder:"Username",required:""},null,512),[[We,i.username]])]),h("div",OT,[IT,Re(h("input",{type:"password","onUpdate:modelValue":t[1]||(t[1]=l=>i.password=l),class:"form-control",id:"password",name:"password",autocomplete:"on",placeholder:"Password",required:""},null,512),[[We,i.password]])]),s.totpEnabled?(O(),F("div",RT,[LT,Re(h("input",{class:"form-control totp",required:"",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code",placeholder:"OTP from your authenticator","onUpdate:modelValue":t[2]||(t[2]=l=>this.totp=l)},null,512),[[We,this.totp]])])):ae("",!0),h("button",NT,[this.loading?(O(),F("span",VT,[ye(" Signing In... "),HT])):(O(),F("span",FT,[ye(" Sign In"),BT]))],512)],32)),this.store.IsElectronApp?ae("",!0):(O(),F("div",jT,[h("div",WT,[Re(h("input",{"onUpdate:modelValue":t[4]||(t[4]=l=>this.store.CrossServerConfiguration.Enable=l),class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,512),[[In,this.store.CrossServerConfiguration.Enable]]),zT])]))])]),YT,h("div",UT,[$e(Wi,{name:"message",tag:"div",class:"position-relative"},{default:Te(()=>[(O(!0),F(Me,null,Ke(o.getMessages.slice().reverse(),l=>(O(),Ne(a,{message:l,key:l.id},null,8,["message"]))),128))]),_:1})])],8,AT)}const qT=ze(ST,[["render",KT],["__scopeId","data-v-b7f1c75e"]]),GT={name:"configurationCard",props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String}},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:et()}},methods:{toggle(){this.configurationToggling=!0,Tt("/api/toggleWireguardConfiguration/",{configurationName:this.c.Name},e=>{e.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} is ${e.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.c.Status=e.data,this.configurationToggling=!1})}}},JT={class:"card conf_card rounded-3 shadow text-decoration-none"},XT={class:"mb-0"},QT={class:"card-title mb-0"},ZT=h("h6",{class:"mb-0 ms-auto"},[h("i",{class:"bi bi-chevron-right"})],-1),eM={class:"card-footer d-flex gap-2 flex-column"},tM={class:"d-flex gap-4"},nM=h("i",{class:"bi bi-arrow-down-up me-2"},null,-1),sM={class:"text-primary-emphasis"},iM=h("i",{class:"bi bi-arrow-down me-2"},null,-1),oM={class:"text-success-emphasis"},rM=h("i",{class:"bi bi-arrow-up me-2"},null,-1),aM={class:"ms-auto"},lM={class:"d-flex align-items-center"},cM=h("small",{class:"me-2 text-muted"},[h("strong",null,"Public Key")],-1),uM={class:"mb-0 d-block d-lg-inline-block"},dM={style:{"line-break":"anywhere"}},hM={class:"form-check form-switch ms-auto"},fM=["for"],pM={key:0,class:"spinner-border spinner-border-sm","aria-hidden":"true"},gM=["disabled","id"];function mM(e,t,n,s,i,o){const r=je("RouterLink");return O(),F("div",JT,[$e(r,{to:"/configuration/"+n.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:Te(()=>[h("h6",XT,[h("span",{class:Ee(["dot",{active:n.c.Status}])},null,2)]),h("h6",QT,[h("samp",null,ve(n.c.Name),1)]),ZT]),_:1},8,["to"]),h("div",eM,[h("div",tM,[h("small",null,[nM,ye(ve(n.c.DataUsage.Total>0?n.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),h("small",sM,[iM,ye(ve(n.c.DataUsage.Receive>0?n.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),h("small",oM,[rM,ye(ve(n.c.DataUsage.Sent>0?n.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),h("small",aM,[h("span",{class:Ee(["dot me-2",{active:n.c.ConnectedPeers>0}])},null,2),ye(ve(n.c.ConnectedPeers)+" Peers ",1)])]),h("div",lM,[cM,h("small",uM,[h("samp",dM,ve(n.c.PublicKey),1)]),h("div",hM,[h("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+n.c.PrivateKey},[ye(ve(this.configurationToggling?"Turning ":"")+" "+ve(n.c.Status?"On":"Off")+" ",1),this.configurationToggling?(O(),F("span",pM)):ae("",!0)],8,fM),Re(h("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+n.c.PrivateKey,onChange:t[0]||(t[0]=a=>this.toggle()),"onUpdate:modelValue":t[1]||(t[1]=a=>n.c.Status=a)},null,40,gM),[[In,n.c.Status]])])])])])}const _M=ze(GT,[["render",mM]]),vM={name:"configurationList",components:{ConfigurationCard:_M},async setup(){return{wireguardConfigurationsStore:Bn()}},data(){return{configurationLoaded:!1}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)}},bM={class:"mt-5"},yM={class:"container"},wM={class:"d-flex mb-4"},xM=h("h3",{class:"text-body"},[h("i",{class:"bi bi-body-text me-2"}),ye(" WireGuard Configurations")],-1),kM=h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1),SM={key:0},AM={key:0,class:"text-muted"},$M={key:1,class:"d-flex gap-3 flex-column mb-3"};function CM(e,t,n,s,i,o){const r=je("RouterLink"),a=je("ConfigurationCard");return O(),F("div",bM,[h("div",yM,[h("div",wM,[xM,$e(r,{to:"/new_configuration",class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto rounded-3"},{default:Te(()=>[kM,ye(" Configuration ")]),_:1})]),$e(Bt,{name:"fade",mode:"out-in"},{default:Te(()=>[this.configurationLoaded?(O(),F("div",SM,[this.wireguardConfigurationsStore.Configurations.length===0?(O(),F("p",AM,` You don't have any WireGuard configurations yet. Please check the configuration folder or change it in "Settings". By default the folder is "/etc/wireguard". `)):(O(),F("div",$M,[(O(!0),F(Me,null,Ke(this.wireguardConfigurationsStore.Configurations,l=>(O(),Ne(a,{key:l.Name,c:l},null,8,["c"]))),128))]))])):ae("",!0)]),_:1})])])}const EM=ze(vM,[["render",CM]]);let Fl;const PM=new Uint8Array(16);function TM(){if(!Fl&&(Fl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fl(PM)}const on=[];for(let e=0;e<256;++e)on.push((e+256).toString(16).slice(1));function MM(e,t=0){return on[e[t+0]]+on[e[t+1]]+on[e[t+2]]+on[e[t+3]]+"-"+on[e[t+4]]+on[e[t+5]]+"-"+on[e[t+6]]+on[e[t+7]]+"-"+on[e[t+8]]+on[e[t+9]]+"-"+on[e[t+10]]+on[e[t+11]]+on[e[t+12]]+on[e[t+13]]+on[e[t+14]]+on[e[t+15]]}const DM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),wm={randomUUID:DM};function Ms(e,t,n){if(wm.randomUUID&&!t&&!e)return wm.randomUUID();e=e||{};const s=e.random||(e.rng||TM)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=s[i];return t}return MM(s)}const OM={props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const e=et(),t=`input_${Ms()}`;return{store:e,uuid:t}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Peers[this.targetData]},methods:{async useValidation(){this.changed&&await dt("/api/updateDashboardConfigurationItem",{section:"Peers",key:this.targetData,value:this.value},e=>{e.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Peers[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=e.message),this.changed=!1,this.updating=!1})}}},IM={class:"form-group mb-2"},RM=["for"],LM=["id","disabled"],NM={class:"invalid-feedback"},FM={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"},BM=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1),VM=["innerHTML"];function HM(e,t,n,s,i,o){return O(),F("div",IM,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,ve(this.title),1)])],8,RM),Re(h("input",{type:"text",class:Ee(["form-control",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),id:this.uuid,"onUpdate:modelValue":t[0]||(t[0]=r=>this.value=r),onKeydown:t[1]||(t[1]=r=>this.changed=!0),onBlur:t[2]||(t[2]=r=>o.useValidation()),disabled:this.updating},null,42,LM),[[We,this.value]]),h("div",NM,ve(this.invalidFeedback),1),n.warning?(O(),F("div",FM,[h("small",null,[BM,h("span",{innerHTML:n.warningText},null,8,VM)])])):ae("",!0)])}const jM=ze(OM,[["render",HM]]),WM=e=>{},zM={name:"accountSettingsInputUsername",props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const e=et(),t=`input_${Ms()}`;return{store:e,uuid:t}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await dt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},e=>{e.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=e.message),this.changed=!1,this.updating=!1}))}}},YM={class:"form-group mb-2"},UM=["for"],KM=["id","disabled"],qM={class:"invalid-feedback"},GM={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"},JM=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1),XM=["innerHTML"];function QM(e,t,n,s,i,o){return O(),F("div",YM,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,ve(this.title),1)])],8,UM),Re(h("input",{type:"text",class:Ee(["form-control",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),id:this.uuid,"onUpdate:modelValue":t[0]||(t[0]=r=>this.value=r),onKeydown:t[1]||(t[1]=r=>this.changed=!0),onBlur:t[2]||(t[2]=r=>o.useValidation()),disabled:this.updating},null,42,KM),[[We,this.value]]),h("div",qM,ve(this.invalidFeedback),1),n.warning?(O(),F("div",GM,[h("small",null,[JM,h("span",{innerHTML:n.warningText},null,8,XM)])])):ae("",!0)])}const ZM=ze(zM,[["render",QM]]),eD={name:"accountSettingsInputPassword",props:{targetData:String,warning:!1,warningText:""},setup(){const e=et(),t=`input_${Ms()}`;return{store:e,uuid:t}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(e=>e.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await dt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},e=>{e.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=e.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}}},tD={class:"d-flex flex-column"},nD={class:"row"},sD={class:"col-sm"},iD={class:"form-group mb-2"},oD=["for"],rD=h("strong",null,[h("small",null,"Current Password")],-1),aD=[rD],lD=["id"],cD={key:0,class:"invalid-feedback d-block"},uD={class:"col-sm"},dD={class:"form-group mb-2"},hD=["for"],fD=h("strong",null,[h("small",null,"New Password")],-1),pD=[fD],gD=["id"],mD={class:"col-sm"},_D={class:"form-group mb-2"},vD=["for"],bD=h("strong",null,[h("small",null,"Repeat New Password")],-1),yD=[bD],wD=["id"],xD=h("i",{class:"bi bi-save2-fill me-2"},null,-1);function kD(e,t,n,s,i,o){return O(),F("div",tD,[h("div",nD,[h("div",sD,[h("div",iD,[h("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},aD,8,oD),Re(h("input",{type:"password",class:Ee(["form-control mb-2",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),"onUpdate:modelValue":t[0]||(t[0]=r=>this.value.currentPassword=r),id:"currentPassword_"+this.uuid},null,10,lD),[[We,this.value.currentPassword]]),i.showInvalidFeedback?(O(),F("div",cD,ve(this.invalidFeedback),1)):ae("",!0)])]),h("div",uD,[h("div",dD,[h("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},pD,8,hD),Re(h("input",{type:"password",class:Ee(["form-control mb-2",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),"onUpdate:modelValue":t[1]||(t[1]=r=>this.value.newPassword=r),id:"newPassword_"+this.uuid},null,10,gD),[[We,this.value.newPassword]])])]),h("div",mD,[h("div",_D,[h("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},yD,8,vD),Re(h("input",{type:"password",class:Ee(["form-control mb-2",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),"onUpdate:modelValue":t[2]||(t[2]=r=>this.value.repeatNewPassword=r),id:"repeatNewPassword_"+this.uuid},null,10,wD),[[We,this.value.repeatNewPassword]])])])]),h("button",{class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:t[3]||(t[3]=r=>this.useValidation())},[xD,ye("Update Password ")])])}const SD=ze(eD,[["render",kD]]),AD={name:"dashboardSettingsInputWireguardConfigurationPath",props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const e=et(),t=`input_${Ms()}`;return{store:e,uuid:t}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&await dt("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},e=>{e.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=e.message),this.changed=!1,this.updating=!1})}}},$D={class:"form-group mb-2"},CD=["for"],ED=["id","disabled"],PD={class:"invalid-feedback"},TD={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"},MD=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1),DD=["innerHTML"];function OD(e,t,n,s,i,o){return O(),F("div",$D,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,ve(this.title),1)])],8,CD),Re(h("input",{type:"text",class:Ee(["form-control",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":t[0]||(t[0]=r=>this.value=r),onKeydown:t[1]||(t[1]=r=>this.changed=!0),onBlur:t[2]||(t[2]=r=>this.useValidation()),disabled:this.updating},null,42,ED),[[We,this.value]]),h("div",PD,ve(this.invalidFeedback),1),n.warning?(O(),F("div",TD,[h("small",null,[MD,h("span",{innerHTML:n.warningText},null,8,DD)])])):ae("",!0)])}const ID=ze(AD,[["render",OD]]),RD={name:"dashboardTheme",setup(){return{dashboardConfigurationStore:et()}},methods:{async switchTheme(e){await dt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:e},t=>{t.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=e)})}}},LD={class:"card mb-4 shadow rounded-3"},ND=h("p",{class:"card-header"},"Dashboard Theme",-1),FD={class:"card-body d-flex gap-2"},BD=h("i",{class:"bi bi-sun-fill"},null,-1),VD=h("i",{class:"bi bi-moon-fill"},null,-1);function HD(e,t,n,s,i,o){return O(),F("div",LD,[ND,h("div",FD,[h("button",{class:Ee(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:t[0]||(t[0]=r=>this.switchTheme("light"))},[BD,ye(" Light ")],2),h("button",{class:Ee(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:t[1]||(t[1]=r=>this.switchTheme("dark"))},[VD,ye(" Dark ")],2)])])}const jD=ze(RD,[["render",HD]]),WD={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const e=et(),t=`input_${Ms()}`;return{store:e,uuid:t}},data(){return{app_ip:"",app_port:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.app_ip=this.store.Configuration.Server.app_ip,this.app_port=this.store.Configuration.Server.app_port},methods:{async useValidation(){this.changed&&await dt("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},e=>{e.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=e.message)})}}},zD={class:"invalid-feedback d-block mt-0"},YD={class:"row"},UD={class:"form-group mb-2 col-sm"},KD=["for"],qD=h("strong",null,[h("small",null,"Dashboard IP Address")],-1),GD=[qD],JD=["id"],XD=h("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[h("small",null,[h("i",{class:"bi bi-exclamation-triangle-fill me-2"}),h("code",null,"0.0.0.0"),ye(" means it can be access by anyone with your server IP Address.")])],-1),QD={class:"form-group col-sm"},ZD=["for"],e2=h("strong",null,[h("small",null,"Dashboard Port")],-1),t2=[e2],n2=["id"],s2=h("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[h("i",{class:"bi bi-floppy-fill me-2"}),ye("Update Dashboard Settings & Restart ")],-1);function i2(e,t,n,s,i,o){return O(),F("div",null,[h("div",zD,ve(this.invalidFeedback),1),h("div",YD,[h("div",UD,[h("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},GD,8,KD),Re(h("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":t[0]||(t[0]=r=>this.app_ip=r)},null,8,JD),[[We,this.app_ip]]),XD]),h("div",QD,[h("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},t2,8,ZD),Re(h("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":t[1]||(t[1]=r=>this.app_port=r)},null,8,n2),[[We,this.app_port]])])]),s2])}const o2=ze(WD,[["render",i2]]);function Fe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function rt(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function os(e,t){const n=Fe(e);return isNaN(t)?rt(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function cs(e,t){const n=Fe(e);if(isNaN(t))return rt(e,NaN);if(!t)return n;const s=n.getDate(),i=rt(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const o=i.getDate();return s>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),s),n)}function My(e,t){const{years:n=0,months:s=0,weeks:i=0,days:o=0,hours:r=0,minutes:a=0,seconds:l=0}=t,c=Fe(e),u=s||n?cs(c,s+n*12):c,d=o||i?os(u,o+i*7):u,f=a+r*60,m=(l+f*60)*1e3;return rt(e,d.getTime()+m)}function r2(e,t){const n=+Fe(e);return rt(e,n+t)}const Dy=6048e5,a2=864e5,l2=6e4,Oy=36e5,c2=1e3;function u2(e,t){return r2(e,t*Oy)}let d2={};function Lo(){return d2}function hs(e,t){var a,l,c,u;const n=Lo(),s=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=Fe(e),o=i.getDay(),r=(o<s?7:0)+o-s;return i.setDate(i.getDate()-r),i.setHours(0,0,0,0),i}function kr(e){return hs(e,{weekStartsOn:1})}function Iy(e){const t=Fe(e),n=t.getFullYear(),s=rt(e,0);s.setFullYear(n+1,0,4),s.setHours(0,0,0,0);const i=kr(s),o=rt(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const r=kr(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=r.getTime()?n:n-1}function xm(e){const t=Fe(e);return t.setHours(0,0,0,0),t}function Dc(e){const t=Fe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ry(e,t){const n=xm(e),s=xm(t),i=+n-Dc(n),o=+s-Dc(s);return Math.round((i-o)/a2)}function h2(e){const t=Iy(e),n=rt(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),kr(n)}function f2(e,t){const n=t*3;return cs(e,n)}function Sf(e,t){return cs(e,t*12)}function km(e,t){const n=Fe(e),s=Fe(t),i=n.getTime()-s.getTime();return i<0?-1:i>0?1:i}function Ly(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Sa(e){if(!Ly(e)&&typeof e!="number")return!1;const t=Fe(e);return!isNaN(Number(t))}function Sm(e){const t=Fe(e);return Math.trunc(t.getMonth()/3)+1}function p2(e,t){const n=Fe(e),s=Fe(t);return n.getFullYear()-s.getFullYear()}function g2(e,t){const n=Fe(e),s=Fe(t),i=km(n,s),o=Math.abs(p2(n,s));n.setFullYear(1584),s.setFullYear(1584);const r=km(n,s)===-i,a=i*(o-+r);return a===0?0:a}function Ny(e,t){const n=Fe(e.start),s=Fe(e.end);let i=+n>+s;const o=i?+n:+s,r=i?s:n;r.setHours(0,0,0,0);let a=(t==null?void 0:t.step)??1;if(!a)return[];a<0&&(a=-a,i=!i);const l=[];for(;+r<=o;)l.push(Fe(r)),r.setDate(r.getDate()+a),r.setHours(0,0,0,0);return i?l.reverse():l}function vo(e){const t=Fe(e),n=t.getMonth(),s=n-n%3;return t.setMonth(s,1),t.setHours(0,0,0,0),t}function m2(e,t){const n=Fe(e.start),s=Fe(e.end);let i=+n>+s;const o=i?+vo(n):+vo(s);let r=vo(i?s:n),a=(t==null?void 0:t.step)??1;if(!a)return[];a<0&&(a=-a,i=!i);const l=[];for(;+r<=o;)l.push(Fe(r)),r=f2(r,a);return i?l.reverse():l}function _2(e){const t=Fe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Fy(e){const t=Fe(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function Wa(e){const t=Fe(e),n=rt(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function By(e,t){var a,l,c,u;const n=Lo(),s=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=Fe(e),o=i.getDay(),r=(o<s?-7:0)+6-(o-s);return i.setDate(i.getDate()+r),i.setHours(23,59,59,999),i}function Am(e){const t=Fe(e),n=t.getMonth(),s=n-n%3+3;return t.setMonth(s,0),t.setHours(23,59,59,999),t}const v2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},b2=(e,t,n)=>{let s;const i=v2[e];return typeof i=="string"?s=i:t===1?s=i.one:s=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s};function sd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const y2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},w2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},x2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},k2={date:sd({formats:y2,defaultWidth:"full"}),time:sd({formats:w2,defaultWidth:"full"}),dateTime:sd({formats:x2,defaultWidth:"full"})},S2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},A2=(e,t,n,s)=>S2[e];function Qr(e){return(t,n)=>{const s=n!=null&&n.context?String(n.context):"standalone";let i;if(s==="formatting"&&e.formattingValues){const r=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):r;i=e.formattingValues[a]||e.formattingValues[r]}else{const r=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[r]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const $2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},C2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},E2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},P2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},T2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},M2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},D2=(e,t)=>{const n=Number(e),s=n%100;if(s>20||s<10)switch(s%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},O2={ordinalNumber:D2,era:Qr({values:$2,defaultWidth:"wide"}),quarter:Qr({values:C2,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qr({values:E2,defaultWidth:"wide"}),day:Qr({values:P2,defaultWidth:"wide"}),dayPeriod:Qr({values:T2,defaultWidth:"wide",formattingValues:M2,defaultFormattingWidth:"wide"})};function Zr(e){return(t,n={})=>{const s=n.width,i=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const r=o[0],a=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?R2(a,d=>d.test(r)):I2(a,d=>d.test(r));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(r.length);return{value:c,rest:u}}}function I2(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function R2(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function L2(e){return(t,n={})=>{const s=t.match(e.matchPattern);if(!s)return null;const i=s[0],o=t.match(e.parsePattern);if(!o)return null;let r=e.valueCallback?e.valueCallback(o[0]):o[0];r=n.valueCallback?n.valueCallback(r):r;const a=t.slice(i.length);return{value:r,rest:a}}}const N2=/^(\d+)(th|st|nd|rd)?/i,F2=/\d+/i,B2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},V2={any:[/^b/i,/^(a|c)/i]},H2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},j2={any:[/1/i,/2/i,/3/i,/4/i]},W2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},z2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Y2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},U2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},K2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},q2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},G2={ordinalNumber:L2({matchPattern:N2,parsePattern:F2,valueCallback:e=>parseInt(e,10)}),era:Zr({matchPatterns:B2,defaultMatchWidth:"wide",parsePatterns:V2,defaultParseWidth:"any"}),quarter:Zr({matchPatterns:H2,defaultMatchWidth:"wide",parsePatterns:j2,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Zr({matchPatterns:W2,defaultMatchWidth:"wide",parsePatterns:z2,defaultParseWidth:"any"}),day:Zr({matchPatterns:Y2,defaultMatchWidth:"wide",parsePatterns:U2,defaultParseWidth:"any"}),dayPeriod:Zr({matchPatterns:K2,defaultMatchWidth:"any",parsePatterns:q2,defaultParseWidth:"any"})},Vy={code:"en-US",formatDistance:b2,formatLong:k2,formatRelative:A2,localize:O2,match:G2,options:{weekStartsOn:0,firstWeekContainsDate:1}};function J2(e){const t=Fe(e);return Ry(t,Wa(t))+1}function Af(e){const t=Fe(e),n=+kr(t)-+h2(t);return Math.round(n/Dy)+1}function $f(e,t){var u,d,f,p;const n=Fe(e),s=n.getFullYear(),i=Lo(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((p=(f=i.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,r=rt(e,0);r.setFullYear(s+1,0,o),r.setHours(0,0,0,0);const a=hs(r,t),l=rt(e,0);l.setFullYear(s,0,o),l.setHours(0,0,0,0);const c=hs(l,t);return n.getTime()>=a.getTime()?s+1:n.getTime()>=c.getTime()?s:s-1}function X2(e,t){var a,l,c,u;const n=Lo(),s=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=$f(e,t),o=rt(e,0);return o.setFullYear(i,0,s),o.setHours(0,0,0,0),hs(o,t)}function Cf(e,t){const n=Fe(e),s=+hs(n,t)-+X2(n,t);return Math.round(s/Dy)+1}function lt(e,t){const n=e<0?"-":"",s=Math.abs(e).toString().padStart(t,"0");return n+s}const hi={y(e,t){const n=e.getFullYear(),s=n>0?n:1-n;return lt(t==="yy"?s%100:s,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):lt(n+1,2)},d(e,t){return lt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return lt(e.getHours()%12||12,t.length)},H(e,t){return lt(e.getHours(),t.length)},m(e,t){return lt(e.getMinutes(),t.length)},s(e,t){return lt(e.getSeconds(),t.length)},S(e,t){const n=t.length,s=e.getMilliseconds(),i=Math.trunc(s*Math.pow(10,n-3));return lt(i,t.length)}},Jo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$m={G:function(e,t,n){const s=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(s,{width:"abbreviated"});case"GGGGG":return n.era(s,{width:"narrow"});case"GGGG":default:return n.era(s,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const s=e.getFullYear(),i=s>0?s:1-s;return n.ordinalNumber(i,{unit:"year"})}return hi.y(e,t)},Y:function(e,t,n,s){const i=$f(e,s),o=i>0?i:1-i;if(t==="YY"){const r=o%100;return lt(r,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):lt(o,t.length)},R:function(e,t){const n=Iy(e);return lt(n,t.length)},u:function(e,t){const n=e.getFullYear();return lt(n,t.length)},Q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return lt(s,2);case"Qo":return n.ordinalNumber(s,{unit:"quarter"});case"QQQ":return n.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return lt(s,2);case"qo":return n.ordinalNumber(s,{unit:"quarter"});case"qqq":return n.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,n){const s=e.getMonth();switch(t){case"M":case"MM":return hi.M(e,t);case"Mo":return n.ordinalNumber(s+1,{unit:"month"});case"MMM":return n.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,n){const s=e.getMonth();switch(t){case"L":return String(s+1);case"LL":return lt(s+1,2);case"Lo":return n.ordinalNumber(s+1,{unit:"month"});case"LLL":return n.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,n,s){const i=Cf(e,s);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):lt(i,t.length)},I:function(e,t,n){const s=Af(e);return t==="Io"?n.ordinalNumber(s,{unit:"week"}):lt(s,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):hi.d(e,t)},D:function(e,t,n){const s=J2(e);return t==="Do"?n.ordinalNumber(s,{unit:"dayOfYear"}):lt(s,t.length)},E:function(e,t,n){const s=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(s,{width:"short",context:"formatting"});case"EEEE":default:return n.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,n,s){const i=e.getDay(),o=(i-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return lt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,s){const i=e.getDay(),o=(i-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return lt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const s=e.getDay(),i=s===0?7:s;switch(t){case"i":return String(i);case"ii":return lt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(s,{width:"short",context:"formatting"});case"iiii":default:return n.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const s=e.getHours();let i;switch(s===12?i=Jo.noon:s===0?i=Jo.midnight:i=s/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const s=e.getHours();let i;switch(s>=17?i=Jo.evening:s>=12?i=Jo.afternoon:s>=4?i=Jo.morning:i=Jo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let s=e.getHours()%12;return s===0&&(s=12),n.ordinalNumber(s,{unit:"hour"})}return hi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):hi.H(e,t)},K:function(e,t,n){const s=e.getHours()%12;return t==="Ko"?n.ordinalNumber(s,{unit:"hour"}):lt(s,t.length)},k:function(e,t,n){let s=e.getHours();return s===0&&(s=24),t==="ko"?n.ordinalNumber(s,{unit:"hour"}):lt(s,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):hi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):hi.s(e,t)},S:function(e,t){return hi.S(e,t)},X:function(e,t,n){const s=e.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return Em(s);case"XXXX":case"XX":return ho(s);case"XXXXX":case"XXX":default:return ho(s,":")}},x:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"x":return Em(s);case"xxxx":case"xx":return ho(s);case"xxxxx":case"xxx":default:return ho(s,":")}},O:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Cm(s,":");case"OOOO":default:return"GMT"+ho(s,":")}},z:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Cm(s,":");case"zzzz":default:return"GMT"+ho(s,":")}},t:function(e,t,n){const s=Math.trunc(e.getTime()/1e3);return lt(s,t.length)},T:function(e,t,n){const s=e.getTime();return lt(s,t.length)}};function Cm(e,t=""){const n=e>0?"-":"+",s=Math.abs(e),i=Math.trunc(s/60),o=s%60;return o===0?n+String(i):n+String(i)+t+lt(o,2)}function Em(e,t){return e%60===0?(e>0?"-":"+")+lt(Math.abs(e)/60,2):ho(e,t)}function ho(e,t=""){const n=e>0?"-":"+",s=Math.abs(e),i=lt(Math.trunc(s/60),2),o=lt(s%60,2);return n+i+t+o}const Pm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Hy=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Q2=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],s=n[1],i=n[2];if(!i)return Pm(e,t);let o;switch(s){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Pm(s,t)).replace("{{time}}",Hy(i,t))},nh={p:Hy,P:Q2},Z2=/^D+$/,eO=/^Y+$/,tO=["D","DD","YY","YYYY"];function jy(e){return Z2.test(e)}function Wy(e){return eO.test(e)}function sh(e,t,n){const s=nO(e,t,n);if(console.warn(s),tO.includes(e))throw new RangeError(s)}function nO(e,t,n){const s=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${s} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const sO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,iO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oO=/^'([^]*?)'?$/,rO=/''/g,aO=/[a-zA-Z]/;function Cs(e,t,n){var u,d,f,p,m,_,b,w;const s=Lo(),i=(n==null?void 0:n.locale)??s.locale??Vy,o=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(f=s.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,r=(n==null?void 0:n.weekStartsOn)??((_=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:_.weekStartsOn)??s.weekStartsOn??((w=(b=s.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)??0,a=Fe(e);if(!Sa(a))throw new RangeError("Invalid time value");let l=t.match(iO).map(A=>{const $=A[0];if($==="p"||$==="P"){const M=nh[$];return M(A,i.formatLong)}return A}).join("").match(sO).map(A=>{if(A==="''")return{isToken:!1,value:"'"};const $=A[0];if($==="'")return{isToken:!1,value:lO(A)};if($m[$])return{isToken:!0,value:A};if($.match(aO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+$+"`");return{isToken:!1,value:A}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:r,locale:i};return l.map(A=>{if(!A.isToken)return A.value;const $=A.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Wy($)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&jy($))&&sh($,t,String(e));const M=$m[$[0]];return M(a,$,i.localize,c)}).join("")}function lO(e){const t=e.match(oO);return t?t[1].replace(rO,"'"):e}function cO(e){return Fe(e).getDay()}function uO(e){const t=Fe(e),n=t.getFullYear(),s=t.getMonth(),i=rt(e,0);return i.setFullYear(n,s+1,0),i.setHours(0,0,0,0),i.getDate()}function dO(){return Object.assign({},Lo())}function ei(e){return Fe(e).getHours()}function hO(e){let n=Fe(e).getDay();return n===0&&(n=7),n}function Ni(e){return Fe(e).getMinutes()}function Qe(e){return Fe(e).getMonth()}function Sr(e){return Fe(e).getSeconds()}function Ye(e){return Fe(e).getFullYear()}function Ar(e,t){const n=Fe(e),s=Fe(t);return n.getTime()>s.getTime()}function za(e,t){const n=Fe(e),s=Fe(t);return+n<+s}function ir(e,t){const n=Fe(e),s=Fe(t);return+n==+s}function fO(e,t){const n=t instanceof Date?rt(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const pO=10;class zy{constructor(){le(this,"subPriority",0)}validate(t,n){return!0}}class gO extends zy{constructor(t,n,s,i,o){super(),this.value=t,this.validateValue=n,this.setValue=s,this.priority=i,o&&(this.subPriority=o)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,s){return this.setValue(t,n,this.value,s)}}class mO extends zy{constructor(){super(...arguments);le(this,"priority",pO);le(this,"subPriority",-1)}set(n,s){return s.timestampIsSet?n:rt(n,fO(n,Date))}}class at{run(t,n,s,i){const o=this.parse(t,n,s,i);return o?{setter:new gO(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,n,s){return!0}}class _O extends at{constructor(){super(...arguments);le(this,"priority",140);le(this,"incompatibleTokens",["R","u","t","T"])}parse(n,s,i){switch(s){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"})||i.era(n,{width:"narrow"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})||i.era(n,{width:"abbreviated"})||i.era(n,{width:"narrow"})}}set(n,s,i){return s.era=i,n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}const Ot={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},xs={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function It(e,t){return e&&{value:t(e.value),rest:e.rest}}function kt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ks(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const s=n[1]==="+"?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,r=n[5]?parseInt(n[5],10):0;return{value:s*(i*Oy+o*l2+r*c2),rest:t.slice(n[0].length)}}function Yy(e){return kt(Ot.anyDigitsSigned,e)}function Pt(e,t){switch(e){case 1:return kt(Ot.singleDigit,t);case 2:return kt(Ot.twoDigits,t);case 3:return kt(Ot.threeDigits,t);case 4:return kt(Ot.fourDigits,t);default:return kt(new RegExp("^\\d{1,"+e+"}"),t)}}function Oc(e,t){switch(e){case 1:return kt(Ot.singleDigitSigned,t);case 2:return kt(Ot.twoDigitsSigned,t);case 3:return kt(Ot.threeDigitsSigned,t);case 4:return kt(Ot.fourDigitsSigned,t);default:return kt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Ef(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Uy(e,t){const n=t>0,s=n?t:1-t;let i;if(s<=50)i=e||100;else{const o=s+50,r=Math.trunc(o/100)*100,a=e>=o%100;i=e+r-(a?100:0)}return n?i:1-i}function Ky(e){return e%400===0||e%4===0&&e%100!==0}class vO extends at{constructor(){super(...arguments);le(this,"priority",130);le(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,s,i){const o=r=>({year:r,isTwoDigitYear:s==="yy"});switch(s){case"y":return It(Pt(4,n),o);case"yo":return It(i.ordinalNumber(n,{unit:"year"}),o);default:return It(Pt(s.length,n),o)}}validate(n,s){return s.isTwoDigitYear||s.year>0}set(n,s,i){const o=n.getFullYear();if(i.isTwoDigitYear){const a=Uy(i.year,o);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const r=!("era"in s)||s.era===1?i.year:1-i.year;return n.setFullYear(r,0,1),n.setHours(0,0,0,0),n}}class bO extends at{constructor(){super(...arguments);le(this,"priority",130);le(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,s,i){const o=r=>({year:r,isTwoDigitYear:s==="YY"});switch(s){case"Y":return It(Pt(4,n),o);case"Yo":return It(i.ordinalNumber(n,{unit:"year"}),o);default:return It(Pt(s.length,n),o)}}validate(n,s){return s.isTwoDigitYear||s.year>0}set(n,s,i,o){const r=$f(n,o);if(i.isTwoDigitYear){const l=Uy(i.year,r);return n.setFullYear(l,0,o.firstWeekContainsDate),n.setHours(0,0,0,0),hs(n,o)}const a=!("era"in s)||s.era===1?i.year:1-i.year;return n.setFullYear(a,0,o.firstWeekContainsDate),n.setHours(0,0,0,0),hs(n,o)}}class yO extends at{constructor(){super(...arguments);le(this,"priority",130);le(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,s){return Oc(s==="R"?4:s.length,n)}set(n,s,i){const o=rt(n,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),kr(o)}}class wO extends at{constructor(){super(...arguments);le(this,"priority",130);le(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,s){return Oc(s==="u"?4:s.length,n)}set(n,s,i){return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class xO extends at{constructor(){super(...arguments);le(this,"priority",120);le(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,s,i){switch(s){case"Q":case"QQ":return Pt(s.length,n);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"})||i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})||i.quarter(n,{width:"abbreviated",context:"formatting"})||i.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,s){return s>=1&&s<=4}set(n,s,i){return n.setMonth((i-1)*3,1),n.setHours(0,0,0,0),n}}class kO extends at{constructor(){super(...arguments);le(this,"priority",120);le(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,s,i){switch(s){case"q":case"qq":return Pt(s.length,n);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"})||i.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})||i.quarter(n,{width:"abbreviated",context:"standalone"})||i.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,s){return s>=1&&s<=4}set(n,s,i){return n.setMonth((i-1)*3,1),n.setHours(0,0,0,0),n}}class SO extends at{constructor(){super(...arguments);le(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);le(this,"priority",110)}parse(n,s,i){const o=r=>r-1;switch(s){case"M":return It(kt(Ot.month,n),o);case"MM":return It(Pt(2,n),o);case"Mo":return It(i.ordinalNumber(n,{unit:"month"}),o);case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"})||i.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})||i.month(n,{width:"abbreviated",context:"formatting"})||i.month(n,{width:"narrow",context:"formatting"})}}validate(n,s){return s>=0&&s<=11}set(n,s,i){return n.setMonth(i,1),n.setHours(0,0,0,0),n}}class AO extends at{constructor(){super(...arguments);le(this,"priority",110);le(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,s,i){const o=r=>r-1;switch(s){case"L":return It(kt(Ot.month,n),o);case"LL":return It(Pt(2,n),o);case"Lo":return It(i.ordinalNumber(n,{unit:"month"}),o);case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"})||i.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})||i.month(n,{width:"abbreviated",context:"standalone"})||i.month(n,{width:"narrow",context:"standalone"})}}validate(n,s){return s>=0&&s<=11}set(n,s,i){return n.setMonth(i,1),n.setHours(0,0,0,0),n}}function $O(e,t,n){const s=Fe(e),i=Cf(s,n)-t;return s.setDate(s.getDate()-i*7),s}class CO extends at{constructor(){super(...arguments);le(this,"priority",100);le(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,s,i){switch(s){case"w":return kt(Ot.week,n);case"wo":return i.ordinalNumber(n,{unit:"week"});default:return Pt(s.length,n)}}validate(n,s){return s>=1&&s<=53}set(n,s,i,o){return hs($O(n,i,o),o)}}function EO(e,t){const n=Fe(e),s=Af(n)-t;return n.setDate(n.getDate()-s*7),n}class PO extends at{constructor(){super(...arguments);le(this,"priority",100);le(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,s,i){switch(s){case"I":return kt(Ot.week,n);case"Io":return i.ordinalNumber(n,{unit:"week"});default:return Pt(s.length,n)}}validate(n,s){return s>=1&&s<=53}set(n,s,i){return kr(EO(n,i))}}const TO=[31,28,31,30,31,30,31,31,30,31,30,31],MO=[31,29,31,30,31,30,31,31,30,31,30,31];class DO extends at{constructor(){super(...arguments);le(this,"priority",90);le(this,"subPriority",1);le(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,s,i){switch(s){case"d":return kt(Ot.date,n);case"do":return i.ordinalNumber(n,{unit:"date"});default:return Pt(s.length,n)}}validate(n,s){const i=n.getFullYear(),o=Ky(i),r=n.getMonth();return o?s>=1&&s<=MO[r]:s>=1&&s<=TO[r]}set(n,s,i){return n.setDate(i),n.setHours(0,0,0,0),n}}class OO extends at{constructor(){super(...arguments);le(this,"priority",90);le(this,"subpriority",1);le(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,s,i){switch(s){case"D":case"DD":return kt(Ot.dayOfYear,n);case"Do":return i.ordinalNumber(n,{unit:"date"});default:return Pt(s.length,n)}}validate(n,s){const i=n.getFullYear();return Ky(i)?s>=1&&s<=366:s>=1&&s<=365}set(n,s,i){return n.setMonth(0,i),n.setHours(0,0,0,0),n}}function Pf(e,t,n){var d,f,p,m;const s=Lo(),i=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??s.weekStartsOn??((m=(p=s.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,o=Fe(e),r=o.getDay(),l=(t%7+7)%7,c=7-i,u=t<0||t>6?t-(r+c)%7:(l+c)%7-(r+c)%7;return os(o,u)}class IO extends at{constructor(){super(...arguments);le(this,"priority",90);le(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,s,i){switch(s){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})||i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"})}}validate(n,s){return s>=0&&s<=6}set(n,s,i,o){return n=Pf(n,i,o),n.setHours(0,0,0,0),n}}class RO extends at{constructor(){super(...arguments);le(this,"priority",90);le(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,s,i,o){const r=a=>{const l=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+l};switch(s){case"e":case"ee":return It(Pt(s.length,n),r);case"eo":return It(i.ordinalNumber(n,{unit:"day"}),r);case"eee":return i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(n,{width:"wide",context:"formatting"})||i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"})}}validate(n,s){return s>=0&&s<=6}set(n,s,i,o){return n=Pf(n,i,o),n.setHours(0,0,0,0),n}}class LO extends at{constructor(){super(...arguments);le(this,"priority",90);le(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,s,i,o){const r=a=>{const l=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+l};switch(s){case"c":case"cc":return It(Pt(s.length,n),r);case"co":return It(i.ordinalNumber(n,{unit:"day"}),r);case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"})||i.day(n,{width:"short",context:"standalone"})||i.day(n,{width:"narrow",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"})||i.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(n,{width:"wide",context:"standalone"})||i.day(n,{width:"abbreviated",context:"standalone"})||i.day(n,{width:"short",context:"standalone"})||i.day(n,{width:"narrow",context:"standalone"})}}validate(n,s){return s>=0&&s<=6}set(n,s,i,o){return n=Pf(n,i,o),n.setHours(0,0,0,0),n}}function NO(e,t){const n=Fe(e),s=hO(n),i=t-s;return os(n,i)}class FO extends at{constructor(){super(...arguments);le(this,"priority",90);le(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,s,i){const o=r=>r===0?7:r;switch(s){case"i":case"ii":return Pt(s.length,n);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return It(i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"}),o);case"iiiii":return It(i.day(n,{width:"narrow",context:"formatting"}),o);case"iiiiii":return It(i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"}),o);case"iiii":default:return It(i.day(n,{width:"wide",context:"formatting"})||i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"}),o)}}validate(n,s){return s>=1&&s<=7}set(n,s,i){return n=NO(n,i),n.setHours(0,0,0,0),n}}class BO extends at{constructor(){super(...arguments);le(this,"priority",80);le(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,s,i){switch(s){case"a":case"aa":case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})||i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,s,i){return n.setHours(Ef(i),0,0,0),n}}class VO extends at{constructor(){super(...arguments);le(this,"priority",80);le(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,s,i){switch(s){case"b":case"bb":case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})||i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,s,i){return n.setHours(Ef(i),0,0,0),n}}class HO extends at{constructor(){super(...arguments);le(this,"priority",80);le(this,"incompatibleTokens",["a","b","t","T"])}parse(n,s,i){switch(s){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})||i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,s,i){return n.setHours(Ef(i),0,0,0),n}}class jO extends at{constructor(){super(...arguments);le(this,"priority",70);le(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,s,i){switch(s){case"h":return kt(Ot.hour12h,n);case"ho":return i.ordinalNumber(n,{unit:"hour"});default:return Pt(s.length,n)}}validate(n,s){return s>=1&&s<=12}set(n,s,i){const o=n.getHours()>=12;return o&&i<12?n.setHours(i+12,0,0,0):!o&&i===12?n.setHours(0,0,0,0):n.setHours(i,0,0,0),n}}class WO extends at{constructor(){super(...arguments);le(this,"priority",70);le(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,s,i){switch(s){case"H":return kt(Ot.hour23h,n);case"Ho":return i.ordinalNumber(n,{unit:"hour"});default:return Pt(s.length,n)}}validate(n,s){return s>=0&&s<=23}set(n,s,i){return n.setHours(i,0,0,0),n}}class zO extends at{constructor(){super(...arguments);le(this,"priority",70);le(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,s,i){switch(s){case"K":return kt(Ot.hour11h,n);case"Ko":return i.ordinalNumber(n,{unit:"hour"});default:return Pt(s.length,n)}}validate(n,s){return s>=0&&s<=11}set(n,s,i){return n.getHours()>=12&&i<12?n.setHours(i+12,0,0,0):n.setHours(i,0,0,0),n}}class YO extends at{constructor(){super(...arguments);le(this,"priority",70);le(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,s,i){switch(s){case"k":return kt(Ot.hour24h,n);case"ko":return i.ordinalNumber(n,{unit:"hour"});default:return Pt(s.length,n)}}validate(n,s){return s>=1&&s<=24}set(n,s,i){const o=i<=24?i%24:i;return n.setHours(o,0,0,0),n}}class UO extends at{constructor(){super(...arguments);le(this,"priority",60);le(this,"incompatibleTokens",["t","T"])}parse(n,s,i){switch(s){case"m":return kt(Ot.minute,n);case"mo":return i.ordinalNumber(n,{unit:"minute"});default:return Pt(s.length,n)}}validate(n,s){return s>=0&&s<=59}set(n,s,i){return n.setMinutes(i,0,0),n}}class KO extends at{constructor(){super(...arguments);le(this,"priority",50);le(this,"incompatibleTokens",["t","T"])}parse(n,s,i){switch(s){case"s":return kt(Ot.second,n);case"so":return i.ordinalNumber(n,{unit:"second"});default:return Pt(s.length,n)}}validate(n,s){return s>=0&&s<=59}set(n,s,i){return n.setSeconds(i,0),n}}class qO extends at{constructor(){super(...arguments);le(this,"priority",30);le(this,"incompatibleTokens",["t","T"])}parse(n,s){const i=o=>Math.trunc(o*Math.pow(10,-s.length+3));return It(Pt(s.length,n),i)}set(n,s,i){return n.setMilliseconds(i),n}}class GO extends at{constructor(){super(...arguments);le(this,"priority",10);le(this,"incompatibleTokens",["t","T","x"])}parse(n,s){switch(s){case"X":return ks(xs.basicOptionalMinutes,n);case"XX":return ks(xs.basic,n);case"XXXX":return ks(xs.basicOptionalSeconds,n);case"XXXXX":return ks(xs.extendedOptionalSeconds,n);case"XXX":default:return ks(xs.extended,n)}}set(n,s,i){return s.timestampIsSet?n:rt(n,n.getTime()-Dc(n)-i)}}class JO extends at{constructor(){super(...arguments);le(this,"priority",10);le(this,"incompatibleTokens",["t","T","X"])}parse(n,s){switch(s){case"x":return ks(xs.basicOptionalMinutes,n);case"xx":return ks(xs.basic,n);case"xxxx":return ks(xs.basicOptionalSeconds,n);case"xxxxx":return ks(xs.extendedOptionalSeconds,n);case"xxx":default:return ks(xs.extended,n)}}set(n,s,i){return s.timestampIsSet?n:rt(n,n.getTime()-Dc(n)-i)}}class XO extends at{constructor(){super(...arguments);le(this,"priority",40);le(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,s,i){return[rt(n,i*1e3),{timestampIsSet:!0}]}}class QO extends at{constructor(){super(...arguments);le(this,"priority",20);le(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,s,i){return[rt(n,i),{timestampIsSet:!0}]}}const ZO={G:new _O,y:new vO,Y:new bO,R:new yO,u:new wO,Q:new xO,q:new kO,M:new SO,L:new AO,w:new CO,I:new PO,d:new DO,D:new OO,E:new IO,e:new RO,c:new LO,i:new FO,a:new BO,b:new VO,B:new HO,h:new jO,H:new WO,K:new zO,k:new YO,m:new UO,s:new KO,S:new qO,X:new GO,x:new JO,t:new XO,T:new QO},eI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nI=/^'([^]*?)'?$/,sI=/''/g,iI=/\S/,oI=/[a-zA-Z]/;function ih(e,t,n,s){var _,b,w,A,$,M,k,y;const i=dO(),o=(s==null?void 0:s.locale)??i.locale??Vy,r=(s==null?void 0:s.firstWeekContainsDate)??((b=(_=s==null?void 0:s.locale)==null?void 0:_.options)==null?void 0:b.firstWeekContainsDate)??i.firstWeekContainsDate??((A=(w=i.locale)==null?void 0:w.options)==null?void 0:A.firstWeekContainsDate)??1,a=(s==null?void 0:s.weekStartsOn)??((M=($=s==null?void 0:s.locale)==null?void 0:$.options)==null?void 0:M.weekStartsOn)??i.weekStartsOn??((y=(k=i.locale)==null?void 0:k.options)==null?void 0:y.weekStartsOn)??0;if(t==="")return e===""?Fe(n):rt(n,NaN);const l={firstWeekContainsDate:r,weekStartsOn:a,locale:o},c=[new mO],u=t.match(tI).map(x=>{const C=x[0];if(C in nh){const P=nh[C];return P(x,o.formatLong)}return x}).join("").match(eI),d=[];for(let x of u){!(s!=null&&s.useAdditionalWeekYearTokens)&&Wy(x)&&sh(x,t,e),!(s!=null&&s.useAdditionalDayOfYearTokens)&&jy(x)&&sh(x,t,e);const C=x[0],P=ZO[C];if(P){const{incompatibleTokens:E}=P;if(Array.isArray(E)){const G=d.find(re=>E.includes(re.token)||re.token===C);if(G)throw new RangeError(`The format string mustn't contain \`${G.fullToken}\` and \`${x}\` at the same time`)}else if(P.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${x}\` and any other token at the same time`);d.push({token:C,fullToken:x});const B=P.run(e,x,o.match,l);if(!B)return rt(n,NaN);c.push(B.setter),e=B.rest}else{if(C.match(oI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");if(x==="''"?x="'":C==="'"&&(x=rI(x)),e.indexOf(x)===0)e=e.slice(x.length);else return rt(n,NaN)}}if(e.length>0&&iI.test(e))return rt(n,NaN);const f=c.map(x=>x.priority).sort((x,C)=>C-x).filter((x,C,P)=>P.indexOf(x)===C).map(x=>c.filter(C=>C.priority===x).sort((C,P)=>P.subPriority-C.subPriority)).map(x=>x[0]);let p=Fe(n);if(isNaN(p.getTime()))return rt(n,NaN);const m={};for(const x of f){if(!x.validate(p,l))return rt(n,NaN);const C=x.set(p,m,l);Array.isArray(C)?(p=C[0],Object.assign(m,C[1])):p=C}return rt(n,p)}function rI(e){return e.match(nI)[1].replace(sI,"'")}function Tm(e,t){const n=vo(e),s=vo(t);return+n==+s}function aI(e,t){return os(e,-t)}function qy(e,t){const n=Fe(e),s=n.getFullYear(),i=n.getDate(),o=rt(e,0);o.setFullYear(s,t,15),o.setHours(0,0,0,0);const r=uO(o);return n.setMonth(t,Math.min(i,r)),n}function ft(e,t){let n=Fe(e);return isNaN(+n)?rt(e,NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=qy(n,t.month)),t.date!=null&&n.setDate(t.date),t.hours!=null&&n.setHours(t.hours),t.minutes!=null&&n.setMinutes(t.minutes),t.seconds!=null&&n.setSeconds(t.seconds),t.milliseconds!=null&&n.setMilliseconds(t.milliseconds),n)}function lI(e,t){const n=Fe(e);return n.setHours(t),n}function Gy(e,t){const n=Fe(e);return n.setMilliseconds(t),n}function cI(e,t){const n=Fe(e);return n.setMinutes(t),n}function Jy(e,t){const n=Fe(e);return n.setSeconds(t),n}function Ss(e,t){const n=Fe(e);return isNaN(+n)?rt(e,NaN):(n.setFullYear(t),n)}function $r(e,t){return cs(e,-t)}function uI(e,t){const{years:n=0,months:s=0,weeks:i=0,days:o=0,hours:r=0,minutes:a=0,seconds:l=0}=t,c=$r(e,s+n*12),u=aI(c,o+i*7),d=a+r*60,p=(l+d*60)*1e3;return rt(e,u.getTime()-p)}function Xy(e,t){return Sf(e,-t)}function Vr(){const e=y$();return O(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...e},[h("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),h("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),h("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),h("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}Vr.compatConfig={MODE:3};function Qy(){return O(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),h("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Qy.compatConfig={MODE:3};function Tf(){return O(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Tf.compatConfig={MODE:3};function Mf(){return O(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}Mf.compatConfig={MODE:3};function Df(){return O(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),h("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}Df.compatConfig={MODE:3};function Of(){return O(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Of.compatConfig={MODE:3};function If(){return O(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}If.compatConfig={MODE:3};const En=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),Rf=(e,t,n)=>oh(e,t,n)||xe(),dI=(e,t,n)=>{const s=t.dateInTz?En(new Date(e),t.dateInTz):xe(e);return n?wn(s,!0):s},oh=(e,t,n)=>{if(!e)return null;const s=n?wn(xe(e),!0):xe(e);return t?t.exactMatch?dI(e,t,n):En(s,t.timezone):s},hI=e=>{if(!e)return 0;const t=new Date,n=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),s=new Date(t.toLocaleString("en-US",{timeZone:e})),i=s.getTimezoneOffset()/60;return(+n-+s)/(1e3*60*60)-i};var ns=(e=>(e.month="month",e.year="year",e))(ns||{}),fo=(e=>(e.top="top",e.bottom="bottom",e))(fo||{}),ko=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(ko||{}),cn=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(cn||{});const fI=["timestamp","date","iso"];var mn=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(mn||{}),_t=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))(_t||{});function Mm(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function pI(e){return t=>Cs(En(new Date(`2017-01-0${t}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:e})}const gI=(e,t,n)=>{const s=[1,2,3,4,5,6,7];let i;if(e!==null)try{i=s.map(pI(e))}catch{i=s.map(Mm(t))}else i=s.map(Mm(t));const o=i.slice(0,n),r=i.slice(n+1,i.length);return[i[n]].concat(...r).concat(...o)},Lf=(e,t,n)=>{const s=[];for(let i=+e[0];i<=+e[1];i++)s.push({value:+i,text:n0(i,t)});return n?s.reverse():s},Zy=(e,t,n)=>{const s=[1,2,3,4,5,6,7,8,9,10,11,12].map(o=>{const r=o<10?`0${o}`:o;return new Date(`2017-${r}-01T00:00:00+00:00`)});if(e!==null)try{const o=n==="long"?"LLLL":"LLL";return s.map((r,a)=>{const l=Cs(En(r,"UTC"),o,{locale:e});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:a}})}catch{}const i=new Intl.DateTimeFormat(t,{month:n,timeZone:"UTC"});return s.map((o,r)=>{const a=i.format(o);return{text:a.charAt(0).toUpperCase()+a.substring(1),value:r}})},mI=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],jt=e=>{const t=q(e);return t!=null&&t.$el?t==null?void 0:t.$el:t},_I=e=>({type:"dot",...e??{}}),e0=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,Nf={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},Gt=e=>e,Dm=e=>e===0?e:!e||isNaN(+e)?null:+e,Om=e=>e===null,t0=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},vI=e=>{const t=[],n=s=>s.filter(i=>i);for(let s=0;s<e.length;s+=3){const i=[e[s],e[s+1],e[s+2]];t.push(n(i))}return t},Ya=(e,t,n)=>{const s=n!=null,i=t!=null;if(!s&&!i)return!1;const o=+n,r=+t;return s&&i?+e>o||+e<r:s?+e>o:i?+e<r:!1},Cr=(e,t)=>vI(e).map(n=>n.map(s=>{const{active:i,disabled:o,isBetween:r,highlighted:a}=t(s);return{...s,active:i,disabled:o,className:{dp__overlay_cell_active:i,dp__overlay_cell:!i,dp__overlay_cell_disabled:o,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:o&&i,dp__cell_in_between:r,"dp--highlighted":a}}})),Mi=(e,t,n=!1)=>{e&&t.allowStopPropagation&&(n&&e.stopImmediatePropagation(),e.stopPropagation())},bI=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function yI(e,t){let n=[...document.querySelectorAll(bI())];n=n.filter(i=>!e.contains(i)||i.hasAttribute("data-datepicker-instance"));const s=n.indexOf(e);if(s>=0&&(t?s-1>=0:s+1<=n.length))return n[s+(t?-1:1)]}const rh=(e,t)=>e==null?void 0:e.querySelector(`[data-dp-element="${t}"]`),n0=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),Ff=e=>Cs(e,"dd-MM-yyyy"),id=e=>Array.isArray(e),Ic=(e,t)=>t.get(Ff(e)),wI=(e,t)=>e?t?t instanceof Map?!!Ic(e,t):t(xe(e)):!1:!0,vn=(e,t,n=!1,s)=>{if(e.key===_t.enter||e.key===_t.space)return n&&e.preventDefault(),t();if(s)return s(e)},xI=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(e=>navigator.userAgent.includes(e))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Im=(e,t,n,s,i,o)=>{const r=ih(e,t.slice(0,e.length),new Date,{locale:o});return Sa(r)&&Ly(r)?s||i?r:ft(r,{hours:+n.hours,minutes:+(n==null?void 0:n.minutes),seconds:+(n==null?void 0:n.seconds),milliseconds:0}):null},kI=(e,t,n,s,i,o)=>{const r=Array.isArray(n)?n[0]:n;if(typeof t=="string")return Im(e,t,r,s,i,o);if(Array.isArray(t)){let a=null;for(const l of t)if(a=Im(e,l,r,s,i,o),a)break;return a}return typeof t=="function"?t(e):null},xe=e=>e?new Date(e):new Date,SI=(e,t,n)=>{if(t){const i=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),a=e.getMinutes().toString().padStart(2,"0"),l=n?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${i}-${o}T${r}:${a}:${l}.000Z`}const s=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(s).toISOString()},wn=(e,t)=>{const n=xe(JSON.parse(JSON.stringify(e))),s=ft(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return t?_2(s):s},Di=(e,t,n,s)=>{let i=e?xe(e):xe();return(t||t===0)&&(i=lI(i,+t)),(n||n===0)&&(i=cI(i,+n)),(s||s===0)&&(i=Jy(i,+s)),Gy(i,0)},At=(e,t)=>!e||!t?!1:za(wn(e),wn(t)),nt=(e,t)=>!e||!t?!1:ir(wn(e),wn(t)),Dt=(e,t)=>!e||!t?!1:Ar(wn(e),wn(t)),fu=(e,t,n)=>e!=null&&e[0]&&e!=null&&e[1]?Dt(n,e[0])&&At(n,e[1]):e!=null&&e[0]&&t?Dt(n,e[0])&&At(n,t)||At(n,e[0])&&Dt(n,t):!1,rs=e=>{const t=ft(new Date(e),{date:1});return wn(t)},od=(e,t,n)=>t&&(n||n===0)?Object.fromEntries(["hours","minutes","seconds"].map(s=>s===t?[s,n]:[s,isNaN(+e[s])?void 0:+e[s]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},So=e=>({hours:ei(e),minutes:Ni(e),seconds:Sr(e)}),s0=(e,t)=>{if(t){const n=Ye(xe(t));if(n>e)return 12;if(n===e)return Qe(xe(t))}},i0=(e,t)=>{if(t){const n=Ye(xe(t));return n<e?-1:n===e?Qe(xe(t)):void 0}},Er=e=>{if(e)return Ye(xe(e))},o0=(e,t)=>{const n=Dt(e,t)?t:e,s=Dt(t,e)?t:e;return Ny({start:n,end:s})},AI=e=>{const t=cs(e,1);return{month:Qe(t),year:Ye(t)}},zs=(e,t)=>{const n=hs(e,{weekStartsOn:+t}),s=By(e,{weekStartsOn:+t});return[n,s]},r0=(e,t)=>{const n={hours:ei(xe()),minutes:Ni(xe()),seconds:t?Sr(xe()):0};return Object.assign(n,e)},ki=(e,t,n)=>[ft(xe(e),{date:1}),ft(xe(),{month:t,year:n,date:1})],Ks=(e,t,n)=>{let s=e?xe(e):xe();return(t||t===0)&&(s=qy(s,t)),n&&(s=Ss(s,n)),s},a0=(e,t,n,s,i)=>{if(!s||i&&!t||!i&&!n)return!1;const o=i?cs(e,1):$r(e,1),r=[Qe(o),Ye(o)];return i?!CI(...r,t):!$I(...r,n)},$I=(e,t,n)=>At(...ki(n,e,t))||nt(...ki(n,e,t)),CI=(e,t,n)=>Dt(...ki(n,e,t))||nt(...ki(n,e,t)),l0=(e,t,n,s,i,o,r)=>{if(typeof t=="function"&&!r)return t(e);const a=n?{locale:n}:void 0;return Array.isArray(e)?`${Cs(e[0],o,a)}${i&&!e[1]?"":s}${e[1]?Cs(e[1],o,a):""}`:Cs(e,o,a)},Xo=e=>{if(e)return null;throw new Error(Nf.prop("partial-range"))},Bl=(e,t)=>{if(t)return e();throw new Error(Nf.prop("range"))},ah=e=>Array.isArray(e)?Sa(e[0])&&(e[1]?Sa(e[1]):!0):e?Sa(e):!1,EI=(e,t)=>ft(t??xe(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),rd=(e,t,n,s)=>{if(!e)return!0;if(s){const i=n==="max"?za(e,t):Ar(e,t),o={seconds:0,milliseconds:0};return i||ir(ft(e,o),ft(t,o))}return n==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},ad=(e,t,n)=>e?EI(e,t):xe(n??t),Rm=(e,t,n,s,i)=>{if(Array.isArray(s)){const r=ad(e,s[0],t),a=ad(e,s[1],t);return rd(s[0],r,n,!!t)&&rd(s[1],a,n,!!t)&&i}const o=ad(e,s,t);return rd(s,o,n,!!t)&&i},ld=e=>ft(xe(),So(e)),PI=(e,t)=>e instanceof Map?Array.from(e.values()).filter(n=>Ye(xe(n))===t).map(n=>Qe(n)):[],c0=(e,t,n)=>typeof e=="function"?e({month:t,year:n}):!!e.months.find(s=>s.month===t&&s.year===n),Bf=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),u0=e=>Cs(e,"yyyy-MM-dd"),ea=Ds({menuFocused:!1,shiftKeyInMenu:!1}),d0=()=>{const e=n=>{ea.menuFocused=n},t=n=>{ea.shiftKeyInMenu!==n&&(ea.shiftKeyInMenu=n)};return{control:_e(()=>({shiftKeyInMenu:ea.shiftKeyInMenu,menuFocused:ea.menuFocused})),setMenuFocused:e,setShiftKey:t}},mt=Ds({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),cd=be(null),Vl=be(!1),ud=be(!1),dd=be(!1),hd=be(!1),an=be(0),Mt=be(0),zi=()=>{const e=_e(()=>Vl.value?[...mt.selectionGrid,mt.actionRow].filter(d=>d.length):ud.value?[...mt.timePicker[0],...mt.timePicker[1],hd.value?[]:[cd.value],mt.actionRow].filter(d=>d.length):dd.value?[...mt.monthPicker,mt.actionRow]:[mt.monthYear,...mt.calendar,mt.time,mt.actionRow].filter(d=>d.length)),t=d=>{an.value=d?an.value+1:an.value-1;let f=null;e.value[Mt.value]&&(f=e.value[Mt.value][an.value]),!f&&e.value[Mt.value+(d?1:-1)]?(Mt.value=Mt.value+(d?1:-1),an.value=d?0:e.value[Mt.value].length-1):f||(an.value=d?an.value-1:an.value+1)},n=d=>{Mt.value===0&&!d||Mt.value===e.value.length&&d||(Mt.value=d?Mt.value+1:Mt.value-1,e.value[Mt.value]?e.value[Mt.value]&&!e.value[Mt.value][an.value]&&an.value!==0&&(an.value=e.value[Mt.value].length-1):Mt.value=d?Mt.value-1:Mt.value+1)},s=d=>{let f=null;e.value[Mt.value]&&(f=e.value[Mt.value][an.value]),f?f.focus({preventScroll:!Vl.value}):an.value=d?an.value-1:an.value+1},i=()=>{t(!0),s(!0)},o=()=>{t(!1),s(!1)},r=()=>{n(!1),s(!0)},a=()=>{n(!0),s(!0)},l=(d,f)=>{mt[f]=d},c=(d,f)=>{mt[f]=d},u=()=>{an.value=0,Mt.value=0};return{buildMatrix:l,buildMultiLevelMatrix:c,setTimePickerBackRef:d=>{cd.value=d},setSelectionGrid:d=>{Vl.value=d,u(),d||(mt.selectionGrid=[])},setTimePicker:(d,f=!1)=>{ud.value=d,hd.value=f,u(),d||(mt.timePicker[0]=[],mt.timePicker[1]=[])},setTimePickerElements:(d,f=0)=>{mt.timePicker[f]=d},arrowRight:i,arrowLeft:o,arrowUp:r,arrowDown:a,clearArrowNav:()=>{mt.monthYear=[],mt.calendar=[],mt.time=[],mt.actionRow=[],mt.selectionGrid=[],mt.timePicker[0]=[],mt.timePicker[1]=[],Vl.value=!1,ud.value=!1,hd.value=!1,dd.value=!1,u(),cd.value=null},setMonthPicker:d=>{dd.value=d,u()},refSets:mt}},Lm=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),TI=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:t=>`Month picker${t?" overlay":""}`,yearPicker:t=>`Year picker${t?" overlay":""}`,timeOverlay:t=>`${t} overlay`,...e??{}}),Nm=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,MI=e=>{const t=typeof e=="object"&&e,n={static:!0,solo:!1};if(!e)return{...n,count:Nm(!1)};const s=t?e:{},i=t?s.count??!0:e,o=Nm(i);return Object.assign(n,s,{count:o})},DI=(e,t,n)=>e||(typeof n=="string"?n:t),OI=e=>typeof e=="boolean"?e?Lm({}):!1:Lm(e),II=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},RI=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),LI=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),NI=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},FI=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,...e??{}}),BI=e=>{const t={dates:Array.isArray(e)?e.map(n=>xe(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},VI=e=>typeof e=="object"?{type:(e==null?void 0:e.type)??"local",hideOnOffsetDates:(e==null?void 0:e.hideOnOffsetDates)??!1}:{type:e,hideOnOffsetDates:!1},HI=e=>{const t={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof e=="object"?{enabled:!0,...t,...e}:{enabled:e,...t}},jI=e=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:e.emitTimezone??void 0,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},fd=(e,t,n)=>new Map(e.map(s=>{const i=Rf(s,t,n);return[Ff(i),i]})),WI=(e,t)=>e.length?new Map(e.map(n=>{const s=Rf(n.date,t);return[Ff(s),n]})):null,zI=e=>{var t;return{minDate:oh(e.minDate,e.timezone,e.isSpecific),maxDate:oh(e.maxDate,e.timezone,e.isSpecific),disabledDates:id(e.disabledDates)?fd(e.disabledDates,e.timezone,e.isSpecific):e.disabledDates,allowedDates:id(e.allowedDates)?fd(e.allowedDates,e.timezone,e.isSpecific):null,highlight:typeof e.highlight=="object"&&id((t=e.highlight)==null?void 0:t.dates)?fd(e.highlight.dates,e.timezone):e.highlight,markers:WI(e.markers,e.timezone)}},YI=e=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:null}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},UI=e=>({...Object.fromEntries(Object.keys(e).map(t=>{const n=t,s=e[n],i=typeof e[n]=="string"?{[s]:!0}:Object.fromEntries(s.map(o=>[o,!0]));return[t,i]}))}),xt=e=>{const t=()=>{const y=e.enableSeconds?":ss":"",x=e.enableMinutes?":mm":"";return e.is24?`HH${x}${y}`:`hh${x}${y} aa`},n=()=>{var y;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((y=b.value)==null?void 0:y.type)==="iso"?"RR":"ww"}-yyyy`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},s=y=>r0(y,e.enableSeconds),i=()=>M.value.enabled?e.startTime&&Array.isArray(e.startTime)?[s(e.startTime[0]),s(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?s(e.startTime):null,o=_e(()=>MI(e.multiCalendars)),r=_e(()=>i()),a=_e(()=>TI(e.ariaLabels)),l=_e(()=>RI(e.filters)),c=_e(()=>OI(e.transitions)),u=_e(()=>LI(e.actionRow)),d=_e(()=>DI(e.previewFormat,e.format,n())),f=_e(()=>II(e.textInput)),p=_e(()=>NI(e.inline)),m=_e(()=>FI(e.config)),_=_e(()=>BI(e.highlight)),b=_e(()=>VI(e.weekNumbers)),w=_e(()=>jI(e.timezone)),A=_e(()=>YI(e.multiDates)),$=_e(()=>zI({minDate:e.minDate,maxDate:e.maxDate,disabledDates:e.disabledDates,allowedDates:e.allowedDates,highlight:_.value,markers:e.markers,timezone:w.value,isSpecific:e.monthPicker||e.yearPicker||e.quarterPicker})),M=_e(()=>HI(e.range)),k=_e(()=>UI(e.ui));return{defaultedTransitions:c,defaultedMultiCalendars:o,defaultedStartTime:r,defaultedAriaLabels:a,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:f,defaultedInline:p,defaultedConfig:m,defaultedHighlight:_,defaultedWeekNumbers:b,defaultedRange:M,propDates:$,defaultedTz:w,defaultedMultiDates:A,defaultedUI:k,getDefaultPattern:n,getDefaultStartTime:i}},KI=(e,t,n)=>{const s=be(),{defaultedTextInput:i,defaultedRange:o,defaultedTz:r,defaultedMultiDates:a,getDefaultPattern:l}=xt(t),c=be(""),u=Ra(t,"format"),d=Ra(t,"formatLocale");Vt(s,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",s.value,oe(!0))},{deep:!0}),Vt(o,(T,se)=>{T.enabled!==se.enabled&&(s.value=null)}),Vt(u,()=>{Q()});const f=T=>r.value.timezone&&r.value.convertModel?En(T,r.value.timezone):T,p=T=>{if(r.value.timezone&&r.value.convertModel){const se=hI(r.value.timezone);return u2(T,se)}return T},m=(T,se,de=!1)=>l0(T,t.format,t.formatLocale,i.value.rangeSeparator,t.modelAuto,se??l(),de),_=T=>T?t.modelType?ce(T):{hours:ei(T),minutes:Ni(T),seconds:t.enableSeconds?Sr(T):0}:null,b=T=>t.modelType?ce(T):{month:Qe(T),year:Ye(T)},w=T=>Array.isArray(T)?a.value.enabled?T.map(se=>A(se,Ss(xe(),se))):Bl(()=>[Ss(xe(),T[0]),T[1]?Ss(xe(),T[1]):Xo(o.value.partialRange)],o.value.enabled):Ss(xe(),+T),A=(T,se)=>(typeof T=="string"||typeof T=="number")&&t.modelType?Z(T):se,$=T=>Array.isArray(T)?[A(T[0],Di(null,+T[0].hours,+T[0].minutes,T[0].seconds)),A(T[1],Di(null,+T[1].hours,+T[1].minutes,T[1].seconds))]:A(T,Di(null,T.hours,T.minutes,T.seconds)),M=T=>{const se=ft(xe(),{date:1});return Array.isArray(T)?a.value.enabled?T.map(de=>A(de,Ks(se,+de.month,+de.year))):Bl(()=>[A(T[0],Ks(se,+T[0].month,+T[0].year)),A(T[1],T[1]?Ks(se,+T[1].month,+T[1].year):Xo(o.value.partialRange))],o.value.enabled):A(T,Ks(se,+T.month,+T.year))},k=T=>{if(Array.isArray(T))return T.map(se=>Z(se));throw new Error(Nf.dateArr("multi-dates"))},y=T=>{if(Array.isArray(T)&&o.value.enabled){const se=T[0],de=T[1];return[xe(Array.isArray(se)?se[0]:null),xe(Array.isArray(de)?de[0]:null)]}return xe(T[0])},x=T=>t.modelAuto?Array.isArray(T)?[Z(T[0]),Z(T[1])]:t.autoApply?[Z(T)]:[Z(T),null]:Array.isArray(T)?Bl(()=>T[1]?[Z(T[0]),T[1]?Z(T[1]):Xo(o.value.partialRange)]:[Z(T[0])],o.value.enabled):Z(T),C=()=>{Array.isArray(s.value)&&o.value.enabled&&s.value.length===1&&s.value.push(Xo(o.value.partialRange))},P=()=>{const T=s.value;return[ce(T[0]),T[1]?ce(T[1]):Xo(o.value.partialRange)]},E=()=>s.value[1]?P():ce(Gt(s.value[0])),B=()=>(s.value||[]).map(T=>ce(T)),G=(T=!1)=>(T||C(),t.modelAuto?E():a.value.enabled?B():Array.isArray(s.value)?Bl(()=>P(),o.value.enabled):ce(Gt(s.value))),re=T=>!T||Array.isArray(T)&&!T.length?null:t.timePicker?$(Gt(T)):t.monthPicker?M(Gt(T)):t.yearPicker?w(Gt(T)):a.value.enabled?k(Gt(T)):t.weekPicker?y(Gt(T)):x(Gt(T)),Y=T=>{const se=re(T);ah(Gt(se))?(s.value=Gt(se),Q()):(s.value=null,c.value="")},L=()=>{const T=se=>Cs(se,i.value.format);return`${T(s.value[0])} ${i.value.rangeSeparator} ${s.value[1]?T(s.value[1]):""}`},I=()=>n.value&&s.value?Array.isArray(s.value)?L():Cs(s.value,i.value.format):m(s.value),V=()=>s.value?a.value.enabled?s.value.map(T=>m(T)).join("; "):i.value.enabled&&typeof i.value.format=="string"?I():m(s.value):"",Q=()=>{!t.format||typeof t.format=="string"||i.value.enabled&&typeof i.value.format=="string"?c.value=V():c.value=t.format(s.value)},Z=T=>{if(t.utc){const se=new Date(T);return t.utc==="preserve"?new Date(se.getTime()+se.getTimezoneOffset()*6e4):se}return t.modelType?fI.includes(t.modelType)?f(new Date(T)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?f(ih(T,l(),new Date,{locale:d.value})):f(ih(T,t.modelType,new Date,{locale:d.value})):f(new Date(T))},ce=T=>T?t.utc?SI(T,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+p(T):t.modelType==="iso"?p(T).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?m(p(T)):m(p(T),t.modelType,!0):p(T):"",we=(T,se=!1,de=!1)=>{if(de)return T;if(e("update:model-value",T),r.value.emitTimezone&&se){const ke=Array.isArray(T)?T.map(N=>En(Gt(N),r.value.emitTimezone)):En(Gt(T),r.value.emitTimezone);e("update:model-timezone-value",ke)}},U=T=>Array.isArray(s.value)?a.value.enabled?s.value.map(se=>T(se)):[T(s.value[0]),s.value[1]?T(s.value[1]):Xo(o.value.partialRange)]:T(Gt(s.value)),X=()=>{if(Array.isArray(s.value)){const T=zs(s.value[0],t.weekStart),se=s.value[1]?zs(s.value[1],t.weekStart):[];return[T.map(de=>xe(de)),se.map(de=>xe(de))]}return zs(s.value,t.weekStart).map(T=>xe(T))},R=(T,se)=>we(Gt(U(T)),!1,se),ee=T=>{const se=X();return T?se:e("update:model-value",X())},oe=(T=!1)=>(T||Q(),t.monthPicker?R(b,T):t.timePicker?R(_,T):t.yearPicker?R(Ye,T):t.weekPicker?ee(T):we(G(T),!0,T));return{inputValue:c,internalModelValue:s,checkBeforeEmit:()=>s.value?o.value.enabled?o.value.partialRange?s.value.length>=1:s.value.length===2:!!s.value:!1,parseExternalModelValue:Y,formatInputValue:Q,emitModelValue:oe}},qI=(e,t)=>{const{defaultedFilters:n,propDates:s}=xt(e),{validateMonthYearInRange:i}=Yi(e),o=(u,d)=>{let f=u;return n.value.months.includes(Qe(f))?(f=d?cs(u,1):$r(u,1),o(f,d)):f},r=(u,d)=>{let f=u;return n.value.years.includes(Ye(f))?(f=d?Sf(u,1):Xy(u,1),r(f,d)):f},a=(u,d=!1)=>{const f=ft(xe(),{month:e.month,year:e.year});let p=u?cs(f,1):$r(f,1);e.disableYearSelect&&(p=Ss(p,e.year));let m=Qe(p),_=Ye(p);n.value.months.includes(m)&&(p=o(p,u),m=Qe(p),_=Ye(p)),n.value.years.includes(_)&&(p=r(p,u),_=Ye(p)),i(m,_,u,e.preventMinMaxNavigation)&&l(m,_,d)},l=(u,d,f)=>{t("update-month-year",{month:u,year:d,fromNav:f})},c=_e(()=>u=>a0(ft(xe(),{month:e.month,year:e.year}),s.value.maxDate,s.value.minDate,e.preventMinMaxNavigation,u));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}},pu={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},fs={...pu,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},GI=["title"],JI=["disabled"],XI=Nt({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...fs},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const n=t,s=e,{defaultedActionRow:i,defaultedPreviewFormat:o,defaultedMultiCalendars:r,defaultedTextInput:a,defaultedInline:l,defaultedRange:c,defaultedMultiDates:u,getDefaultPattern:d}=xt(s),{isTimeValid:f,isMonthValid:p}=Yi(s),{buildMatrix:m}=zi(),_=be(null),b=be(null),w=be(!1),A=be({}),$=be(null),M=be(null);Kt(()=>{s.arrowNavigation&&m([jt(_),jt(b)],"actionRow"),k(),window.addEventListener("resize",k)}),Fr(()=>{window.removeEventListener("resize",k)});const k=()=>{w.value=!1,setTimeout(()=>{var L,I;const V=(L=$.value)==null?void 0:L.getBoundingClientRect(),Q=(I=M.value)==null?void 0:I.getBoundingClientRect();V&&Q&&(A.value.maxWidth=`${Q.width-V.width-20}px`),w.value=!0},0)},y=_e(()=>c.value.enabled&&!c.value.partialRange&&s.internalModelValue?s.internalModelValue.length===2:!0),x=_e(()=>!f.value(s.internalModelValue)||!p.value(s.internalModelValue)||!y.value),C=()=>{const L=o.value;return s.timePicker||s.monthPicker,L(Gt(s.internalModelValue))},P=()=>{const L=s.internalModelValue;return r.value.count>0?`${E(L[0])} - ${E(L[1])}`:[E(L[0]),E(L[1])]},E=L=>l0(L,o.value,s.formatLocale,a.value.rangeSeparator,s.modelAuto,d()),B=_e(()=>!s.internalModelValue||!s.menuMount?"":typeof o.value=="string"?Array.isArray(s.internalModelValue)?s.internalModelValue.length===2&&s.internalModelValue[1]?P():u.value.enabled?s.internalModelValue.map(L=>`${E(L)}`):s.modelAuto?`${E(s.internalModelValue[0])}`:`${E(s.internalModelValue[0])} -`:E(s.internalModelValue):C()),G=()=>u.value.enabled?"; ":" - ",re=_e(()=>Array.isArray(B.value)?B.value.join(G()):B.value),Y=()=>{f.value(s.internalModelValue)&&p.value(s.internalModelValue)&&y.value?n("select-date"):n("invalid-select")};return(L,I)=>(O(),F("div",{ref_key:"actionRowRef",ref:M,class:"dp__action_row"},[L.$slots["action-row"]?Ie(L.$slots,"action-row",Xt(Yt({key:0},{internalModelValue:L.internalModelValue,disabled:x.value,selectDate:()=>L.$emit("select-date"),closePicker:()=>L.$emit("close-picker")}))):(O(),F(Me,{key:1},[q(i).showPreview?(O(),F("div",{key:0,class:"dp__selection_preview",title:re.value,style:Wt(A.value)},[L.$slots["action-preview"]&&w.value?Ie(L.$slots,"action-preview",{key:0,value:L.internalModelValue}):ae("",!0),!L.$slots["action-preview"]&&w.value?(O(),F(Me,{key:1},[ye(ve(re.value),1)],64)):ae("",!0)],12,GI)):ae("",!0),h("div",{ref_key:"actionBtnContainer",ref:$,class:"dp__action_buttons","data-dp-element":"action-row"},[L.$slots["action-buttons"]?Ie(L.$slots,"action-buttons",{key:0,value:L.internalModelValue}):ae("",!0),L.$slots["action-buttons"]?ae("",!0):(O(),F(Me,{key:1},[!q(l).enabled&&q(i).showCancel?(O(),F("button",{key:0,ref_key:"cancelButtonRef",ref:_,type:"button",class:"dp__action_button dp__action_cancel",onClick:I[0]||(I[0]=V=>L.$emit("close-picker")),onKeydown:I[1]||(I[1]=V=>q(vn)(V,()=>L.$emit("close-picker")))},ve(L.cancelText),545)):ae("",!0),q(i).showNow?(O(),F("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:I[2]||(I[2]=V=>L.$emit("select-now")),onKeydown:I[3]||(I[3]=V=>q(vn)(V,()=>L.$emit("select-now")))},ve(L.nowButtonLabel),33)):ae("",!0),q(i).showSelect?(O(),F("button",{key:2,ref_key:"selectButtonRef",ref:b,type:"button",class:"dp__action_button dp__action_select",disabled:x.value,"data-test":"select-button",onKeydown:I[4]||(I[4]=V=>q(vn)(V,()=>Y())),onClick:Y},ve(L.selectText),41,JI)):ae("",!0)],64))],512)],64))],512))}}),QI=["role","aria-label","tabindex"],ZI={class:"dp__selection_grid_header"},eR=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],tR=["aria-label"],ol=Nt({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:n}){const{setSelectionGrid:s,buildMultiLevelMatrix:i,setMonthPicker:o}=zi(),r=n,a=e,{defaultedAriaLabels:l,defaultedTextInput:c,defaultedConfig:u}=xt(a),{hideNavigationButtons:d}=_u(),f=be(!1),p=be(null),m=be(null),_=be([]),b=be(),w=be(null),A=be(0),$=be(null);kb(()=>{p.value=null}),Kt(()=>{Zt().then(()=>B()),a.noOverlayFocus||k(),M(!0)}),Fr(()=>M(!1));const M=U=>{var X;a.arrowNavigation&&((X=a.headerRefs)!=null&&X.length?o(U):s(U))},k=()=>{var U;const X=jt(m);X&&(c.value.enabled||(p.value?(U=p.value)==null||U.focus({preventScroll:!0}):X.focus({preventScroll:!0})),f.value=X.clientHeight<X.scrollHeight)},y=_e(()=>({dp__overlay:!0,"dp--overlay-absolute":!a.useRelative,"dp--overlay-relative":a.useRelative})),x=_e(()=>a.useRelative?{height:`${a.height}px`,width:"260px"}:void 0),C=_e(()=>({dp__overlay_col:!0})),P=_e(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:f.value,dp__button_bottom:a.isLast})),E=_e(()=>{var U,X;return{dp__overlay_container:!0,dp__container_flex:((U=a.items)==null?void 0:U.length)<=6,dp__container_block:((X=a.items)==null?void 0:X.length)>6}});Vt(()=>a.items,()=>B(!1),{deep:!0});const B=(U=!0)=>{Zt().then(()=>{const X=jt(p),R=jt(m),ee=jt(w),oe=jt($),T=ee?ee.getBoundingClientRect().height:0;R&&(R.getBoundingClientRect().height?A.value=R.getBoundingClientRect().height-T:A.value=u.value.modeHeight-T),X&&oe&&U&&(oe.scrollTop=X.offsetTop-oe.offsetTop-(A.value/2-X.getBoundingClientRect().height)-T)})},G=U=>{U.disabled||r("selected",U.value)},re=()=>{r("toggle"),r("reset-flow")},Y=()=>{a.escClose&&re()},L=(U,X,R,ee)=>{U&&((X.active||X.value===a.focusValue)&&(p.value=U),a.arrowNavigation&&(Array.isArray(_.value[R])?_.value[R][ee]=U:_.value[R]=[U],I()))},I=()=>{var U,X;const R=(U=a.headerRefs)!=null&&U.length?[a.headerRefs].concat(_.value):_.value.concat([a.skipButtonRef?[]:[w.value]]);i(Gt(R),(X=a.headerRefs)!=null&&X.length?"monthPicker":"selectionGrid")},V=U=>{a.arrowNavigation||Mi(U,u.value,!0)},Q=U=>{b.value=U,r("hover-value",U)},Z=()=>{if(re(),!a.isLast){const U=rh(a.menuWrapRef??null,"action-row");if(U){const X=t0(U);X==null||X.focus()}}},ce=U=>{switch(U.key){case _t.esc:return Y();case _t.arrowLeft:return V(U);case _t.arrowRight:return V(U);case _t.arrowUp:return V(U);case _t.arrowDown:return V(U);default:return}},we=U=>{if(U.key===_t.enter)return re();if(U.key===_t.tab)return Z()};return t({focusGrid:k}),(U,X)=>{var R;return O(),F("div",{ref_key:"gridWrapRef",ref:m,class:Ee(y.value),style:Wt(x.value),role:U.useRelative?void 0:"dialog","aria-label":U.overlayLabel,tabindex:U.useRelative?void 0:"0",onKeydown:ce,onClick:X[0]||(X[0]=Ha(()=>{},["prevent"]))},[h("div",{ref_key:"containerRef",ref:$,class:Ee(E.value),style:Wt({"--dp-overlay-height":`${A.value}px`}),role:"grid"},[h("div",ZI,[Ie(U.$slots,"header")]),U.$slots.overlay?Ie(U.$slots,"overlay",{key:0}):(O(!0),F(Me,{key:1},Ke(U.items,(ee,oe)=>(O(),F("div",{key:oe,class:Ee(["dp__overlay_row",{dp__flex_row:U.items.length>=3}]),role:"row"},[(O(!0),F(Me,null,Ke(ee,(T,se)=>(O(),F("div",{key:T.value,ref_for:!0,ref:de=>L(de,T,oe,se),role:"gridcell",class:Ee(C.value),"aria-selected":T.active||void 0,"aria-disabled":T.disabled||void 0,tabindex:"0","data-test":T.text,onClick:Ha(de=>G(T),["prevent"]),onKeydown:de=>q(vn)(de,()=>G(T),!0),onMouseover:de=>Q(T.value)},[h("div",{class:Ee(T.className)},[U.$slots.item?Ie(U.$slots,"item",{key:0,item:T}):ae("",!0),U.$slots.item?ae("",!0):(O(),F(Me,{key:1},[ye(ve(T.text),1)],64))],2)],42,eR))),128))],2))),128))],6),U.$slots["button-icon"]?Re((O(),F("button",{key:0,ref_key:"toggleButton",ref:w,type:"button","aria-label":(R=q(l))==null?void 0:R.toggleOverlay,class:Ee(P.value),tabindex:"0",onClick:re,onKeydown:we},[Ie(U.$slots,"button-icon")],42,tR)),[[uc,!q(d)(U.hideNavigation,U.type)]]):ae("",!0)],46,QI)}}}),gu=Nt({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(e){const t=e,n=_e(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),s=_e(()=>({dp__instance_calendar:t.multiCalendars>0}));return(i,o)=>(O(),F("div",{class:Ee({dp__menu_inner:!i.stretch,"dp--menu--inner-stretched":i.stretch,dp__flex_display:i.multiCalendars>0,"dp--flex-display-collapsed":i.collapse})},[(O(!0),F(Me,null,Ke(n.value,(r,a)=>(O(),F("div",{key:r,class:Ee(s.value)},[Ie(i.$slots,"default",{instance:r,index:a})],2))),128))],2))}}),nR=["data-dp-element","aria-label","aria-disabled"],Aa=Nt({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const n=t,s=be(null);return Kt(()=>n("set-ref",s)),(i,o)=>(O(),F("button",{ref_key:"elRef",ref:s,type:"button","data-dp-element":i.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":i.ariaLabel,"aria-disabled":i.disabled||void 0,onClick:o[0]||(o[0]=r=>i.$emit("activate")),onKeydown:o[1]||(o[1]=r=>q(vn)(r,()=>i.$emit("activate"),!0))},[h("span",{class:Ee(["dp__inner_nav",{dp__inner_nav_disabled:i.disabled}])},[Ie(i.$slots,"default")],2)],40,nR))}}),sR=["aria-label","data-test"],h0=Nt({__name:"YearModePicker",props:{...fs,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const n=t,s=e,{showRightIcon:i,showLeftIcon:o}=_u(),{defaultedConfig:r,defaultedMultiCalendars:a,defaultedAriaLabels:l,defaultedTransitions:c,defaultedUI:u}=xt(s),{showTransition:d,transitionName:f}=rl(c),p=be(!1),m=(w=!1,A)=>{p.value=!p.value,n("toggle-year-picker",{flow:w,show:A})},_=w=>{p.value=!1,n("year-select",w)},b=(w=!1)=>{n("handle-year",w)};return(w,A)=>{var $,M,k,y,x;return O(),F(Me,null,[h("div",{class:Ee(["dp--year-mode-picker",{"dp--hidden-el":p.value}])},[q(o)(q(a),e.instance)?(O(),Ne(Aa,{key:0,ref:"mpPrevIconRef","aria-label":($=q(l))==null?void 0:$.prevYear,disabled:e.isDisabled(!1),class:Ee((M=q(u))==null?void 0:M.navBtnPrev),onActivate:A[0]||(A[0]=C=>b(!1))},{default:Te(()=>[w.$slots["arrow-left"]?Ie(w.$slots,"arrow-left",{key:0}):ae("",!0),w.$slots["arrow-left"]?ae("",!0):(O(),Ne(q(Tf),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ae("",!0),h("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${e.year}-${(k=q(l))==null?void 0:k.openYearsOverlay}`,"data-test":`year-mode-btn-${e.instance}`,onClick:A[1]||(A[1]=()=>m(!1)),onKeydown:A[2]||(A[2]=BC(()=>m(!1),["enter"]))},[w.$slots.year?Ie(w.$slots,"year",{key:0,year:e.year}):ae("",!0),w.$slots.year?ae("",!0):(O(),F(Me,{key:1},[ye(ve(e.year),1)],64))],40,sR),q(i)(q(a),e.instance)?(O(),Ne(Aa,{key:1,ref:"mpNextIconRef","aria-label":(y=q(l))==null?void 0:y.nextYear,disabled:e.isDisabled(!0),class:Ee((x=q(u))==null?void 0:x.navBtnNext),onActivate:A[3]||(A[3]=C=>b(!0))},{default:Te(()=>[w.$slots["arrow-right"]?Ie(w.$slots,"arrow-right",{key:0}):ae("",!0),w.$slots["arrow-right"]?ae("",!0):(O(),Ne(q(Mf),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ae("",!0)],2),$e(Bt,{name:q(f)(e.showYearPicker),css:q(d)},{default:Te(()=>{var C,P;return[e.showYearPicker?(O(),Ne(ol,{key:0,items:e.items,"text-input":w.textInput,"esc-close":w.escClose,config:w.config,"is-last":w.autoApply&&!q(r).keepActionRow,"hide-navigation":w.hideNavigation,"aria-labels":w.ariaLabels,"overlay-label":(P=(C=q(l))==null?void 0:C.yearPicker)==null?void 0:P.call(C,!0),type:"year",onToggle:m,onSelected:A[4]||(A[4]=E=>_(E))},hn({"button-icon":Te(()=>[w.$slots["calendar-icon"]?Ie(w.$slots,"calendar-icon",{key:0}):ae("",!0),w.$slots["calendar-icon"]?ae("",!0):(O(),Ne(q(Vr),{key:1}))]),_:2},[w.$slots["year-overlay-value"]?{name:"item",fn:Te(({item:E})=>[Ie(w.$slots,"year-overlay-value",{text:E.text,value:E.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):ae("",!0)]}),_:3},8,["name","css"])],64)}}}),Vf=(e,t,n)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(s=>nt(e,s))){const s=t.value.filter(i=>!nt(i,e));t.value=s.length?s:null}else(n&&+n>t.value.length||!n)&&t.value.push(e);else t.value=[e]},Hf=(e,t,n)=>{let s=e.value?e.value.slice():[];return s.length===2&&s[1]!==null&&(s=[]),s.length?At(t,s[0])?(s.unshift(t),n("range-start",s[0]),n("range-start",s[1])):(s[1]=t,n("range-end",t)):(s=[t],n("range-start",t)),s},mu=(e,t,n,s)=>{e&&(e[0]&&e[1]&&n&&t("auto-apply"),e[0]&&!e[1]&&s&&n&&t("auto-apply"))},f0=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>En(xe(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=En(xe(e.value),e.timezone))},p0=(e,t,n,s)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&s.value.partialRange)?s.value.fixedStart&&(Dt(e,t.value[0])||nt(e,t.value[0]))?[t.value[0],e]:s.value.fixedEnd&&(At(e,t.value[1])||nt(e,t.value[1]))?[e,t.value[1]]:(n("invalid-fixed-range",e),t.value):[],g0=({multiCalendars:e,range:t,highlight:n,propDates:s,calendars:i,modelValue:o,props:r,filters:a,year:l,month:c,emit:u})=>{const d=_e(()=>Lf(r.yearRange,r.locale,r.reverseYears)),f=be([!1]),p=_e(()=>(E,B)=>{const G=ft(rs(new Date),{month:c.value(E),year:l.value(E)}),re=B?Fy(G):Wa(G);return a0(re,s.value.maxDate,s.value.minDate,r.preventMinMaxNavigation,B)}),m=()=>Array.isArray(o.value)&&e.value.solo&&o.value[1],_=()=>{for(let E=0;E<e.value.count;E++)if(E===0)i.value[E]=i.value[0];else if(E===e.value.count-1&&m())i.value[E]={month:Qe(o.value[1]),year:Ye(o.value[1])};else{const B=ft(xe(),i.value[E-1]);i.value[E]={month:Qe(B),year:Ye(Sf(B,1))}}},b=E=>{if(!E)return _();const B=ft(xe(),i.value[E]);return i.value[0].year=Ye(Xy(B,e.value.count-1)),_()},w=(E,B)=>{const G=g2(B,E);return t.value.showLastInRange&&G>1?B:E},A=E=>r.focusStartDate||e.value.solo?E[0]:E[1]?w(E[0],E[1]):E[0],$=()=>{if(o.value){const E=Array.isArray(o.value)?A(o.value):o.value;i.value[0]={month:Qe(E),year:Ye(E)}}},M=()=>{$(),e.value.count&&_()};Vt(o,(E,B)=>{r.isTextInputDate&&JSON.stringify(E??{})!==JSON.stringify(B??{})&&M()}),Kt(()=>{M()});const k=(E,B)=>{i.value[B].year=E,u("update-month-year",{instance:B,year:E,month:i.value[B].month}),e.value.count&&!e.value.solo&&b(B)},y=_e(()=>E=>Cr(d.value,B=>{var G;const re=l.value(E)===B.value,Y=Ya(B.value,Er(s.value.minDate),Er(s.value.maxDate))||((G=a.value.years)==null?void 0:G.includes(l.value(E))),L=Bf(n.value,B.value);return{active:re,disabled:Y,highlighted:L}})),x=(E,B)=>{k(E,B),P(B)},C=(E,B=!1)=>{if(!p.value(E,B)){const G=B?l.value(E)+1:l.value(E)-1;k(G,E)}},P=(E,B=!1,G)=>{B||u("reset-flow"),G!==void 0?f.value[E]=G:f.value[E]=!f.value[E],f.value[E]?u("overlay-toggle",{open:!0,overlay:cn.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:cn.year}))};return{isDisabled:p,groupedYears:y,showYearPicker:f,selectYear:k,toggleYearPicker:P,handleYearSelect:x,handleYear:C}},iR=(e,t)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:s,defaultedTransitions:i,defaultedConfig:o,defaultedRange:r,defaultedHighlight:a,propDates:l,defaultedTz:c,defaultedFilters:u,defaultedMultiDates:d}=xt(e),f=()=>{e.isTextInputDate&&M(Ye(xe(e.startDate)),0)},{modelValue:p,year:m,month:_,calendars:b}=al(e,t,f),w=_e(()=>Zy(e.formatLocale,e.locale,e.monthNameFormat)),A=be(null),{checkMinMaxRange:$}=Yi(e),{selectYear:M,groupedYears:k,showYearPicker:y,toggleYearPicker:x,handleYearSelect:C,handleYear:P,isDisabled:E}=g0({modelValue:p,multiCalendars:n,range:r,highlight:a,calendars:b,year:m,propDates:l,month:_,filters:u,props:e,emit:t});Kt(()=>{e.startDate&&(p.value&&e.focusStartDate||!p.value)&&M(Ye(xe(e.startDate)),0)});const B=R=>R?{month:Qe(R),year:Ye(R)}:{month:null,year:null},G=()=>p.value?Array.isArray(p.value)?p.value.map(R=>B(R)):B(p.value):B(),re=(R,ee)=>{const oe=b.value[R],T=G();return Array.isArray(T)?T.some(se=>se.year===(oe==null?void 0:oe.year)&&se.month===ee):(oe==null?void 0:oe.year)===T.year&&ee===T.month},Y=(R,ee,oe)=>{var T,se;const de=G();return Array.isArray(de)?m.value(ee)===((T=de[oe])==null?void 0:T.year)&&R===((se=de[oe])==null?void 0:se.month):!1},L=(R,ee)=>{if(r.value.enabled){const oe=G();if(Array.isArray(p.value)&&Array.isArray(oe)){const T=Y(R,ee,0)||Y(R,ee,1),se=Ks(rs(xe()),R,m.value(ee));return fu(p.value,A.value,se)&&!T}return!1}return!1},I=_e(()=>R=>Cr(w.value,ee=>{var oe;const T=re(R,ee.value),se=Ya(ee.value,s0(m.value(R),l.value.minDate),i0(m.value(R),l.value.maxDate))||PI(l.value.disabledDates,m.value(R)).includes(ee.value)||((oe=u.value.months)==null?void 0:oe.includes(ee.value)),de=L(ee.value,R),ke=c0(a.value,ee.value,m.value(R));return{active:T,disabled:se,isBetween:de,highlighted:ke}})),V=(R,ee)=>Ks(rs(xe()),R,m.value(ee)),Q=(R,ee)=>{const oe=p.value?p.value:rs(new Date);p.value=Ks(oe,R,m.value(ee)),t("auto-apply"),t("update-flow-step")},Z=(R,ee)=>{const oe=V(R,ee);r.value.fixedEnd||r.value.fixedStart?p.value=p0(oe,p,t,r):p.value?$(oe,p.value)&&(p.value=Hf(p,V(R,ee),t)):p.value=[V(R,ee)],Zt().then(()=>{mu(p.value,t,e.autoApply,e.modelAuto)})},ce=(R,ee)=>{Vf(V(R,ee),p,d.value.limit),t("auto-apply",!0)},we=(R,ee)=>(b.value[ee].month=R,X(ee,b.value[ee].year,R),d.value.enabled?ce(R,ee):r.value.enabled?Z(R,ee):Q(R,ee)),U=(R,ee)=>{M(R,ee),X(ee,R,null)},X=(R,ee,oe)=>{let T=oe;if(!T&&T!==0){const se=G();T=Array.isArray(se)?se[R].month:se.month}t("update-month-year",{instance:R,year:ee,month:T})};return{groupedMonths:I,groupedYears:k,year:m,isDisabled:E,defaultedMultiCalendars:n,defaultedAriaLabels:s,defaultedTransitions:i,defaultedConfig:o,showYearPicker:y,modelValue:p,presetDate:(R,ee)=>{f0({value:R,modelValue:p,range:r.value.enabled,timezone:ee?void 0:c.value.timezone}),t("auto-apply")},setHoverDate:(R,ee)=>{A.value=V(R,ee)},selectMonth:we,selectYear:U,toggleYearPicker:x,handleYearSelect:C,handleYear:P,getModelMonthYear:G}},oR=Nt({compatConfig:{MODE:3},__name:"MonthPicker",props:{...fs},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(e,{expose:t,emit:n}){const s=n,i=Ro(),o=Rn(i,"yearMode"),r=e;Kt(()=>{r.shadow||s("mount",null)});const{groupedMonths:a,groupedYears:l,year:c,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:f,showYearPicker:p,modelValue:m,presetDate:_,setHoverDate:b,selectMonth:w,selectYear:A,toggleYearPicker:$,handleYearSelect:M,handleYear:k,getModelMonthYear:y}=iR(r,s);return t({getSidebarProps:()=>({modelValue:m,year:c,getModelMonthYear:y,selectMonth:w,selectYear:A,handleYear:k}),presetDate:_,toggleYearPicker:x=>$(0,x)}),(x,C)=>(O(),Ne(gu,{"multi-calendars":q(d).count,collapse:x.collapse,stretch:""},{default:Te(({instance:P})=>[x.$slots["top-extra"]?Ie(x.$slots,"top-extra",{key:0,value:x.internalModelValue}):ae("",!0),x.$slots["month-year"]?Ie(x.$slots,"month-year",Xt(Yt({key:1},{year:q(c),months:q(a)(P),years:q(l)(P),selectMonth:q(w),selectYear:q(A),instance:P}))):(O(),Ne(ol,{key:2,items:q(a)(P),"arrow-navigation":x.arrowNavigation,"is-last":x.autoApply&&!q(f).keepActionRow,"esc-close":x.escClose,height:q(f).modeHeight,config:x.config,"no-overlay-focus":!!(x.noOverlayFocus||x.textInput),"use-relative":"",type:"month",onSelected:E=>q(w)(E,P),onHoverValue:E=>q(b)(E,P)},hn({header:Te(()=>[$e(h0,Yt(x.$props,{items:q(l)(P),instance:P,"show-year-picker":q(p)[P],year:q(c)(P),"is-disabled":E=>q(u)(P,E),onHandleYear:E=>q(k)(P,E),onYearSelect:E=>q(M)(E,P),onToggleYearPicker:E=>q($)(P,E==null?void 0:E.flow,E==null?void 0:E.show)}),hn({_:2},[Ke(q(o),(E,B)=>({name:E,fn:Te(G=>[Ie(x.$slots,E,Xt(_n(G)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[x.$slots["month-overlay-value"]?{name:"item",fn:Te(({item:E})=>[Ie(x.$slots,"month-overlay-value",{text:E.text,value:E.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),rR=(e,t)=>{const n=()=>{e.isTextInputDate&&(u.value=Ye(xe(e.startDate)))},{modelValue:s}=al(e,t,n),i=be(null),{defaultedHighlight:o,defaultedMultiDates:r,defaultedFilters:a,defaultedRange:l,propDates:c}=xt(e),u=be();Kt(()=>{e.startDate&&(s.value&&e.focusStartDate||!s.value)&&(u.value=Ye(xe(e.startDate)))});const d=_=>Array.isArray(s.value)?s.value.some(b=>Ye(b)===_):s.value?Ye(s.value)===_:!1,f=_=>l.value.enabled&&Array.isArray(s.value)?fu(s.value,i.value,m(_)):!1,p=_e(()=>Cr(Lf(e.yearRange,e.locale,e.reverseYears),_=>{const b=d(_.value),w=Ya(_.value,Er(c.value.minDate),Er(c.value.maxDate))||a.value.years.includes(_.value),A=f(_.value)&&!b,$=Bf(o.value,_.value);return{active:b,disabled:w,isBetween:A,highlighted:$}})),m=_=>Ss(rs(Wa(new Date)),_);return{groupedYears:p,modelValue:s,focusYear:u,setHoverValue:_=>{i.value=Ss(rs(new Date),_)},selectYear:_=>{var b;if(t("update-month-year",{instance:0,year:_}),r.value.enabled)return s.value?Array.isArray(s.value)&&(((b=s.value)==null?void 0:b.map(w=>Ye(w))).includes(_)?s.value=s.value.filter(w=>Ye(w)!==_):s.value.push(Ss(wn(xe()),_))):s.value=[Ss(wn(Wa(xe())),_)],t("auto-apply",!0);l.value.enabled?(s.value=Hf(s,m(_),t),Zt().then(()=>{mu(s.value,t,e.autoApply,e.modelAuto)})):(s.value=m(_),t("auto-apply"))}}},aR=Nt({compatConfig:{MODE:3},__name:"YearPicker",props:{...fs},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:n}){const s=n,i=e,{groupedYears:o,modelValue:r,focusYear:a,selectYear:l,setHoverValue:c}=rR(i,s),{defaultedConfig:u}=xt(i);return t({getSidebarProps:()=>({modelValue:r,selectYear:l})}),(d,f)=>(O(),F("div",null,[d.$slots["top-extra"]?Ie(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):ae("",!0),d.$slots["month-year"]?Ie(d.$slots,"month-year",Xt(Yt({key:1},{years:q(o),selectYear:q(l)}))):(O(),Ne(ol,{key:2,items:q(o),"is-last":d.autoApply&&!q(u).keepActionRow,height:q(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":q(a),type:"year","use-relative":"",onSelected:q(l),onHoverValue:q(c)},hn({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:Te(({item:p})=>[Ie(d.$slots,"year-overlay-value",{text:p.text,value:p.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),lR={key:0,class:"dp__time_input"},cR=["data-test","aria-label","onKeydown","onClick","onMousedown"],uR=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),dR=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),hR=["aria-label","disabled","data-test","onKeydown","onClick"],fR=["data-test","aria-label","onKeydown","onClick","onMousedown"],pR=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),gR=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),mR={key:0},_R=["aria-label"],vR=Nt({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...fs},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:n}){const s=n,i=e,{setTimePickerElements:o,setTimePickerBackRef:r}=zi(),{defaultedAriaLabels:a,defaultedTransitions:l,defaultedFilters:c,defaultedConfig:u,defaultedRange:d}=xt(i),{transitionName:f,showTransition:p}=rl(l),m=Ds({hours:!1,minutes:!1,seconds:!1}),_=be("AM"),b=be(null),w=be([]),A=be(),$=be(!1);Kt(()=>{s("mounted")});const M=v=>ft(new Date,{hours:v.hours,minutes:v.minutes,seconds:i.enableSeconds?v.seconds:0,milliseconds:0}),k=_e(()=>v=>V(v,i[v])||x(v,i[v])),y=_e(()=>({hours:i.hours,minutes:i.minutes,seconds:i.seconds})),x=(v,D)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!i.validateTime(v,D):!1,C=(v,D)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const H=D?+i[`${v}Increment`]:-+i[`${v}Increment`],W=i[v]+H;return!i.validateTime(v,W)}return!1},P=_e(()=>v=>!U(+i[v]+ +i[`${v}Increment`],v)||C(v,!0)),E=_e(()=>v=>!U(+i[v]-+i[`${v}Increment`],v)||C(v,!1)),B=(v,D)=>My(ft(xe(),v),D),G=(v,D)=>uI(ft(xe(),v),D),re=_e(()=>({dp__time_col:!0,dp__time_col_block:!i.timePickerInline,dp__time_col_reg_block:!i.enableSeconds&&i.is24&&!i.timePickerInline,dp__time_col_reg_inline:!i.enableSeconds&&i.is24&&i.timePickerInline,dp__time_col_reg_with_button:!i.enableSeconds&&!i.is24,dp__time_col_sec:i.enableSeconds&&i.is24,dp__time_col_sec_with_button:i.enableSeconds&&!i.is24})),Y=_e(()=>{const v=[{type:"hours"}];return i.enableMinutes&&v.push({type:"",separator:!0},{type:"minutes"}),i.enableSeconds&&v.push({type:"",separator:!0},{type:"seconds"}),v}),L=_e(()=>Y.value.filter(v=>!v.separator)),I=_e(()=>v=>{if(v==="hours"){const D=se(+i.hours);return{text:D<10?`0${D}`:`${D}`,value:D}}return{text:i[v]<10?`0${i[v]}`:`${i[v]}`,value:i[v]}}),V=(v,D)=>{var H;if(!i.disabledTimesConfig)return!1;const W=i.disabledTimesConfig(i.order,v==="hours"?D:void 0);return W[v]?!!((H=W[v])!=null&&H.includes(D)):!0},Q=(v,D)=>D!=="hours"||_.value==="AM"?v:v+12,Z=v=>{const D=i.is24?24:12,H=v==="hours"?D:60,W=+i[`${v}GridIncrement`],ie=v==="hours"&&!i.is24?W:0,j=[];for(let te=ie;te<H;te+=W)j.push({value:i.is24?te:Q(te,v),text:te<10?`0${te}`:`${te}`});return v==="hours"&&!i.is24&&j.unshift({value:_.value==="PM"?12:0,text:"12"}),Cr(j,te=>({active:!1,disabled:c.value.times[v].includes(te.value)||!U(te.value,v)||V(v,te.value)||x(v,te.value)}))},ce=v=>v>=0?v:59,we=v=>v>=0?v:23,U=(v,D)=>{const H=i.minTime?M(od(i.minTime)):null,W=i.maxTime?M(od(i.maxTime)):null,ie=M(od(y.value,D,D==="minutes"||D==="seconds"?ce(v):we(v)));return H&&W?(za(ie,W)||ir(ie,W))&&(Ar(ie,H)||ir(ie,H)):H?Ar(ie,H)||ir(ie,H):W?za(ie,W)||ir(ie,W):!0},X=v=>i[`no${v[0].toUpperCase()+v.slice(1)}Overlay`],R=v=>{X(v)||(m[v]=!m[v],m[v]?($.value=!0,s("overlay-opened",v)):($.value=!1,s("overlay-closed",v)))},ee=v=>v==="hours"?ei:v==="minutes"?Ni:Sr,oe=()=>{A.value&&clearTimeout(A.value)},T=(v,D=!0,H)=>{const W=D?B:G,ie=D?+i[`${v}Increment`]:-+i[`${v}Increment`];U(+i[v]+ie,v)&&s(`update:${v}`,ee(v)(W({[v]:+i[v]},{[v]:+i[`${v}Increment`]}))),!(H!=null&&H.keyboard)&&u.value.timeArrowHoldThreshold&&(A.value=setTimeout(()=>{T(v,D)},u.value.timeArrowHoldThreshold))},se=v=>i.is24?v:(v>=12?_.value="PM":_.value="AM",mI(v)),de=()=>{_.value==="PM"?(_.value="AM",s("update:hours",i.hours-12)):(_.value="PM",s("update:hours",i.hours+12)),s("am-pm-change",_.value)},ke=v=>{m[v]=!0},N=(v,D,H)=>{if(v&&i.arrowNavigation){Array.isArray(w.value[D])?w.value[D][H]=v:w.value[D]=[v];const W=w.value.reduce((ie,j)=>j.map((te,J)=>[...ie[J]||[],j[J]]),[]);r(i.closeTimePickerBtn),b.value&&(W[1]=W[1].concat(b.value)),o(W,i.order)}},fe=(v,D)=>(R(v),s(`update:${v}`,D));return t({openChildCmp:ke}),(v,D)=>{var H;return v.disabled?ae("",!0):(O(),F("div",lR,[(O(!0),F(Me,null,Ke(Y.value,(W,ie)=>{var j,te,J;return O(),F("div",{key:ie,class:Ee(re.value)},[W.separator?(O(),F(Me,{key:0},[$.value?ae("",!0):(O(),F(Me,{key:0},[ye(":")],64))],64)):(O(),F(Me,{key:1},[h("button",{ref_for:!0,ref:he=>N(he,ie,0),type:"button",class:Ee({dp__btn:!0,dp__inc_dec_button:!v.timePickerInline,dp__inc_dec_button_inline:v.timePickerInline,dp__tp_inline_btn_top:v.timePickerInline,dp__inc_dec_button_disabled:P.value(W.type),"dp--hidden-el":$.value}),"data-test":`${W.type}-time-inc-btn-${i.order}`,"aria-label":(j=q(a))==null?void 0:j.incrementValue(W.type),tabindex:"0",onKeydown:he=>q(vn)(he,()=>T(W.type,!0,{keyboard:!0}),!0),onClick:he=>q(u).timeArrowHoldThreshold?void 0:T(W.type,!0),onMousedown:he=>q(u).timeArrowHoldThreshold?T(W.type,!0):void 0,onMouseup:oe},[i.timePickerInline?(O(),F(Me,{key:1},[v.$slots["tp-inline-arrow-up"]?Ie(v.$slots,"tp-inline-arrow-up",{key:0}):(O(),F(Me,{key:1},[uR,dR],64))],64)):(O(),F(Me,{key:0},[v.$slots["arrow-up"]?Ie(v.$slots,"arrow-up",{key:0}):ae("",!0),v.$slots["arrow-up"]?ae("",!0):(O(),Ne(q(Of),{key:1}))],64))],42,cR),h("button",{ref_for:!0,ref:he=>N(he,ie,1),type:"button","aria-label":`${I.value(W.type).text}-${(te=q(a))==null?void 0:te.openTpOverlay(W.type)}`,class:Ee({dp__time_display:!0,dp__time_display_block:!v.timePickerInline,dp__time_display_inline:v.timePickerInline,"dp--time-invalid":k.value(W.type),"dp--time-overlay-btn":!k.value(W.type),"dp--hidden-el":$.value}),disabled:X(W.type),tabindex:"0","data-test":`${W.type}-toggle-overlay-btn-${i.order}`,onKeydown:he=>q(vn)(he,()=>R(W.type),!0),onClick:he=>R(W.type)},[v.$slots[W.type]?Ie(v.$slots,W.type,{key:0,text:I.value(W.type).text,value:I.value(W.type).value}):ae("",!0),v.$slots[W.type]?ae("",!0):(O(),F(Me,{key:1},[ye(ve(I.value(W.type).text),1)],64))],42,hR),h("button",{ref_for:!0,ref:he=>N(he,ie,2),type:"button",class:Ee({dp__btn:!0,dp__inc_dec_button:!v.timePickerInline,dp__inc_dec_button_inline:v.timePickerInline,dp__tp_inline_btn_bottom:v.timePickerInline,dp__inc_dec_button_disabled:E.value(W.type),"dp--hidden-el":$.value}),"data-test":`${W.type}-time-dec-btn-${i.order}`,"aria-label":(J=q(a))==null?void 0:J.decrementValue(W.type),tabindex:"0",onKeydown:he=>q(vn)(he,()=>T(W.type,!1,{keyboard:!0}),!0),onClick:he=>q(u).timeArrowHoldThreshold?void 0:T(W.type,!1),onMousedown:he=>q(u).timeArrowHoldThreshold?T(W.type,!1):void 0,onMouseup:oe},[i.timePickerInline?(O(),F(Me,{key:1},[v.$slots["tp-inline-arrow-down"]?Ie(v.$slots,"tp-inline-arrow-down",{key:0}):(O(),F(Me,{key:1},[pR,gR],64))],64)):(O(),F(Me,{key:0},[v.$slots["arrow-down"]?Ie(v.$slots,"arrow-down",{key:0}):ae("",!0),v.$slots["arrow-down"]?ae("",!0):(O(),Ne(q(If),{key:1}))],64))],42,fR)],64))],2)}),128)),v.is24?ae("",!0):(O(),F("div",mR,[v.$slots["am-pm-button"]?Ie(v.$slots,"am-pm-button",{key:0,toggle:de,value:_.value}):ae("",!0),v.$slots["am-pm-button"]?ae("",!0):(O(),F("button",{key:1,ref_key:"amPmButton",ref:b,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(H=q(a))==null?void 0:H.amPmButton,tabindex:"0",onClick:de,onKeydown:D[0]||(D[0]=W=>q(vn)(W,()=>de(),!0))},ve(_.value),41,_R))])),(O(!0),F(Me,null,Ke(L.value,(W,ie)=>(O(),Ne(Bt,{key:ie,name:q(f)(m[W.type]),css:q(p)},{default:Te(()=>{var j,te;return[m[W.type]?(O(),Ne(ol,{key:0,items:Z(W.type),"is-last":v.autoApply&&!q(u).keepActionRow,"esc-close":v.escClose,type:W.type,"text-input":v.textInput,config:v.config,"arrow-navigation":v.arrowNavigation,"aria-labels":v.ariaLabels,"overlay-label":(te=(j=q(a)).timeOverlay)==null?void 0:te.call(j,W.type),onSelected:J=>fe(W.type,J),onToggle:J=>R(W.type),onResetFlow:D[1]||(D[1]=J=>v.$emit("reset-flow"))},hn({"button-icon":Te(()=>[v.$slots["clock-icon"]?Ie(v.$slots,"clock-icon",{key:0}):ae("",!0),v.$slots["clock-icon"]?ae("",!0):(O(),Ne(Io(v.timePickerInline?q(Vr):q(Df)),{key:1}))]),_:2},[v.$slots[`${W.type}-overlay-value`]?{name:"item",fn:Te(({item:J})=>[Ie(v.$slots,`${W.type}-overlay-value`,{text:J.text,value:J.value})]),key:"0"}:void 0,v.$slots[`${W.type}-overlay-header`]?{name:"header",fn:Te(()=>[Ie(v.$slots,`${W.type}-overlay-header`,{toggle:()=>R(W.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):ae("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),bR={class:"dp--tp-wrap"},yR=["aria-label","tabindex"],wR=["role","aria-label","tabindex"],xR=["aria-label"],m0=Nt({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...fs},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:n}){const s=n,i=e,{buildMatrix:o,setTimePicker:r}=zi(),a=Ro(),{defaultedTransitions:l,defaultedAriaLabels:c,defaultedTextInput:u,defaultedConfig:d,defaultedRange:f}=xt(i),{transitionName:p,showTransition:m}=rl(l),{hideNavigationButtons:_}=_u(),b=be(null),w=be(null),A=be([]),$=be(null),M=be(!1);Kt(()=>{s("mount"),!i.timePicker&&i.arrowNavigation?o([jt(b.value)],"time"):r(!0,i.timePicker)});const k=_e(()=>f.value.enabled&&i.modelAuto?e0(i.internalModelValue):!0),y=be(!1),x=Z=>({hours:Array.isArray(i.hours)?i.hours[Z]:i.hours,minutes:Array.isArray(i.minutes)?i.minutes[Z]:i.minutes,seconds:Array.isArray(i.seconds)?i.seconds[Z]:i.seconds}),C=_e(()=>{const Z=[];if(f.value.enabled)for(let ce=0;ce<2;ce++)Z.push(x(ce));else Z.push(x(0));return Z}),P=(Z,ce=!1,we="")=>{ce||s("reset-flow"),y.value=Z,s(Z?"overlay-opened":"overlay-closed",cn.time),i.arrowNavigation&&r(Z),Zt(()=>{we!==""&&A.value[0]&&A.value[0].openChildCmp(we)})},E=_e(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:i.autoApply&&!d.value.keepActionRow})),B=Rn(a,"timePicker"),G=(Z,ce,we)=>f.value.enabled?ce===0?[Z,C.value[1][we]]:[C.value[0][we],Z]:Z,re=Z=>{s("update:hours",Z)},Y=Z=>{s("update:minutes",Z)},L=Z=>{s("update:seconds",Z)},I=()=>{if($.value&&!u.value.enabled&&!i.noOverlayFocus){const Z=t0($.value);Z&&Z.focus({preventScroll:!0})}},V=Z=>{M.value=!1,s("overlay-closed",Z)},Q=Z=>{M.value=!0,s("overlay-opened",Z)};return t({toggleTimePicker:P}),(Z,ce)=>{var we;return O(),F("div",bR,[!Z.timePicker&&!Z.timePickerInline?Re((O(),F("button",{key:0,ref_key:"openTimePickerBtn",ref:b,type:"button",class:Ee({...E.value,"dp--hidden-el":y.value}),"aria-label":(we=q(c))==null?void 0:we.openTimePicker,tabindex:Z.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:ce[0]||(ce[0]=U=>q(vn)(U,()=>P(!0))),onClick:ce[1]||(ce[1]=U=>P(!0))},[Z.$slots["clock-icon"]?Ie(Z.$slots,"clock-icon",{key:0}):ae("",!0),Z.$slots["clock-icon"]?ae("",!0):(O(),Ne(q(Df),{key:1}))],42,yR)),[[uc,!q(_)(Z.hideNavigation,"time")]]):ae("",!0),$e(Bt,{name:q(p)(y.value),css:q(m)&&!Z.timePickerInline},{default:Te(()=>{var U,X;return[y.value||Z.timePicker||Z.timePickerInline?(O(),F("div",{key:0,ref_key:"overlayRef",ref:$,role:Z.timePickerInline?void 0:"dialog",class:Ee({dp__overlay:!Z.timePickerInline,"dp--overlay-absolute":!i.timePicker&&!Z.timePickerInline,"dp--overlay-relative":i.timePicker}),style:Wt(Z.timePicker?{height:`${q(d).modeHeight}px`}:void 0),"aria-label":(U=q(c))==null?void 0:U.timePicker,tabindex:Z.timePickerInline?void 0:0},[h("div",{class:Ee(Z.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[Z.$slots["time-picker-overlay"]?Ie(Z.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:re,setMinutes:Y,setSeconds:L}):ae("",!0),Z.$slots["time-picker-overlay"]?ae("",!0):(O(),F("div",{key:1,class:Ee(Z.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(O(!0),F(Me,null,Ke(C.value,(R,ee)=>Re((O(),Ne(vR,Yt({key:ee,ref_for:!0},{...Z.$props,order:ee,hours:R.hours,minutes:R.minutes,seconds:R.seconds,closeTimePickerBtn:w.value,disabledTimesConfig:e.disabledTimesConfig,disabled:ee===0?q(f).fixedStart:q(f).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:A,"validate-time":(oe,T)=>e.validateTime(oe,G(T,ee,oe)),"onUpdate:hours":oe=>re(G(oe,ee,"hours")),"onUpdate:minutes":oe=>Y(G(oe,ee,"minutes")),"onUpdate:seconds":oe=>L(G(oe,ee,"seconds")),onMounted:I,onOverlayClosed:V,onOverlayOpened:Q,onAmPmChange:ce[2]||(ce[2]=oe=>Z.$emit("am-pm-change",oe))}),hn({_:2},[Ke(q(B),(oe,T)=>({name:oe,fn:Te(se=>[Ie(Z.$slots,oe,Yt({ref_for:!0},se))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[uc,ee===0?!0:k.value]])),128))],2)),!Z.timePicker&&!Z.timePickerInline?Re((O(),F("button",{key:2,ref_key:"closeTimePickerBtn",ref:w,type:"button",class:Ee({...E.value,"dp--hidden-el":M.value}),"aria-label":(X=q(c))==null?void 0:X.closeTimePicker,tabindex:"0",onKeydown:ce[3]||(ce[3]=R=>q(vn)(R,()=>P(!1))),onClick:ce[4]||(ce[4]=R=>P(!1))},[Z.$slots["calendar-icon"]?Ie(Z.$slots,"calendar-icon",{key:0}):ae("",!0),Z.$slots["calendar-icon"]?ae("",!0):(O(),Ne(q(Vr),{key:1}))],42,xR)),[[uc,!q(_)(Z.hideNavigation,"time")]]):ae("",!0)],2)],14,wR)):ae("",!0)]}),_:3},8,["name","css"])])}}}),_0=(e,t,n,s)=>{const{defaultedRange:i}=xt(e),o=($,M)=>Array.isArray(t[$])?t[$][M]:t[$],r=$=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[$]:t.seconds:0,a=($,M)=>$?M!==void 0?Di($,o("hours",M),o("minutes",M),r(M)):Di($,t.hours,t.minutes,r()):Jy(xe(),r(M)),l=($,M)=>{t[$]=M},c=_e(()=>e.modelAuto&&i.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:i.value.enabled),u=($,M)=>{const k=Object.fromEntries(Object.keys(t).map(y=>y===$?[y,M]:[y,t[y]].slice()));if(c.value&&!i.value.disableTimeRangeValidation){const y=C=>n.value?Di(n.value[C],k.hours[C],k.minutes[C],k.seconds[C]):null,x=C=>Gy(n.value[C],0);return!(nt(y(0),y(1))&&(Ar(y(0),x(1))||za(y(1),x(0))))}return!0},d=($,M)=>{u($,M)&&(l($,M),s&&s())},f=$=>{d("hours",$)},p=$=>{d("minutes",$)},m=$=>{d("seconds",$)},_=($,M,k,y)=>{M&&f($),!M&&!k&&p($),k&&m($),n.value&&y(n.value)},b=$=>{if($){const M=Array.isArray($),k=M?[+$[0].hours,+$[1].hours]:+$.hours,y=M?[+$[0].minutes,+$[1].minutes]:+$.minutes,x=M?[+$[0].seconds,+$[1].seconds]:+$.seconds;l("hours",k),l("minutes",y),e.enableSeconds&&l("seconds",x)}},w=($,M)=>{const k={hours:Array.isArray(t.hours)?t.hours[$]:t.hours,disabledArr:[]};return(M||M===0)&&(k.hours=M),Array.isArray(e.disabledTimes)&&(k.disabledArr=i.value.enabled&&Array.isArray(e.disabledTimes[$])?e.disabledTimes[$]:e.disabledTimes),k},A=_e(()=>($,M)=>{var k;if(Array.isArray(e.disabledTimes)){const{disabledArr:y,hours:x}=w($,M),C=y.filter(P=>+P.hours===x);return((k=C[0])==null?void 0:k.minutes)==="*"?{hours:[x],minutes:void 0,seconds:void 0}:{hours:[],minutes:(C==null?void 0:C.map(P=>+P.minutes))??[],seconds:(C==null?void 0:C.map(P=>P.seconds?+P.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:f,updateMinutes:p,updateSeconds:m,getSetDateTime:a,updateTimeValues:_,getSecondsValue:r,assignStartTime:b,validateTime:u,disabledTimesConfig:A}},kR=(e,t)=>{const n=()=>{e.isTextInputDate&&M()},{modelValue:s,time:i}=al(e,t,n),{defaultedStartTime:o,defaultedRange:r,defaultedTz:a}=xt(e),{updateTimeValues:l,getSetDateTime:c,setTime:u,assignStartTime:d,disabledTimesConfig:f,validateTime:p}=_0(e,i,s,m);function m(){t("update-flow-step")}const _=y=>{const{hours:x,minutes:C,seconds:P}=y;return{hours:+x,minutes:+C,seconds:P?+P:0}},b=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const x=_(e.startTime[0]),C=_(e.startTime[1]);return[ft(xe(),x),ft(xe(),C)]}const y=_(e.startTime);return ft(xe(),y)}return r.value.enabled?[null,null]:null},w=()=>{if(r.value.enabled){const[y,x]=b();s.value=[En(c(y,0),a.value.timezone),En(c(x,1),a.value.timezone)]}else s.value=En(c(b()),a.value.timezone)},A=y=>Array.isArray(y)?[So(xe(y[0])),So(xe(y[1]))]:[So(y??xe())],$=(y,x,C)=>{u("hours",y),u("minutes",x),u("seconds",e.enableSeconds?C:0)},M=()=>{const[y,x]=A(s.value);return r.value.enabled?$([y.hours,x.hours],[y.minutes,x.minutes],[y.seconds,x.seconds]):$(y.hours,y.minutes,y.seconds)};Kt(()=>{if(!e.shadow)return d(o.value),s.value?M():w()});const k=()=>{Array.isArray(s.value)?s.value=s.value.map((y,x)=>y&&c(y,x)):s.value=c(s.value),t("time-update")};return{modelValue:s,time:i,disabledTimesConfig:f,updateTime:(y,x=!0,C=!1)=>{l(y,x,C,k)},validateTime:p}},SR=Nt({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...fs},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:n}){const s=n,i=e,o=Ro(),r=Rn(o,"timePicker"),a=be(null),{time:l,modelValue:c,disabledTimesConfig:u,updateTime:d,validateTime:f}=kR(i,s);return Kt(()=>{i.shadow||s("mount",null)}),t({getSidebarProps:()=>({modelValue:c,time:l,updateTime:d}),toggleTimePicker:(p,m=!1,_="")=>{var b;(b=a.value)==null||b.toggleTimePicker(p,m,_)}}),(p,m)=>(O(),Ne(gu,{"multi-calendars":0,stretch:""},{default:Te(()=>[$e(m0,Yt({ref_key:"tpRef",ref:a},p.$props,{hours:q(l).hours,minutes:q(l).minutes,seconds:q(l).seconds,"internal-model-value":p.internalModelValue,"disabled-times-config":q(u),"validate-time":q(f),"onUpdate:hours":m[0]||(m[0]=_=>q(d)(_)),"onUpdate:minutes":m[1]||(m[1]=_=>q(d)(_,!1)),"onUpdate:seconds":m[2]||(m[2]=_=>q(d)(_,!1,!0)),onAmPmChange:m[3]||(m[3]=_=>p.$emit("am-pm-change",_)),onResetFlow:m[4]||(m[4]=_=>p.$emit("reset-flow")),onOverlayClosed:m[5]||(m[5]=_=>p.$emit("overlay-toggle",{open:!1,overlay:_})),onOverlayOpened:m[6]||(m[6]=_=>p.$emit("overlay-toggle",{open:!0,overlay:_}))}),hn({_:2},[Ke(q(r),(_,b)=>({name:_,fn:Te(w=>[Ie(p.$slots,_,Xt(_n(w)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),AR={class:"dp--header-wrap"},$R={key:0,class:"dp__month_year_wrap"},CR={key:0},ER={class:"dp__month_year_wrap"},PR=["data-dp-element","aria-label","data-test","onClick","onKeydown"],TR=Nt({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...fs},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:n}){const s=n,i=e,{defaultedTransitions:o,defaultedAriaLabels:r,defaultedMultiCalendars:a,defaultedFilters:l,defaultedConfig:c,defaultedHighlight:u,propDates:d,defaultedUI:f}=xt(i),{transitionName:p,showTransition:m}=rl(o),{buildMatrix:_}=zi(),{handleMonthYearChange:b,isDisabled:w,updateMonthYear:A}=qI(i,s),{showLeftIcon:$,showRightIcon:M}=_u(),k=be(!1),y=be(!1),x=be(!1),C=be([null,null,null,null]);Kt(()=>{s("mount")});const P=X=>({get:()=>i[X],set:R=>{const ee=X===ns.month?ns.year:ns.month;s("update-month-year",{[X]:R,[ee]:i[ee]}),X===ns.month?V(!0):Q(!0)}}),E=_e(P(ns.month)),B=_e(P(ns.year)),G=_e(()=>X=>({month:i.month,year:i.year,items:X===ns.month?i.months:i.years,instance:i.instance,updateMonthYear:A,toggle:X===ns.month?V:Q})),re=_e(()=>i.months.find(R=>R.value===i.month)||{text:"",value:0}),Y=_e(()=>Cr(i.months,X=>{const R=i.month===X.value,ee=Ya(X.value,s0(i.year,d.value.minDate),i0(i.year,d.value.maxDate))||l.value.months.includes(X.value),oe=c0(u.value,X.value,i.year);return{active:R,disabled:ee,highlighted:oe}})),L=_e(()=>Cr(i.years,X=>{const R=i.year===X.value,ee=Ya(X.value,Er(d.value.minDate),Er(d.value.maxDate))||l.value.years.includes(X.value),oe=Bf(u.value,X.value);return{active:R,disabled:ee,highlighted:oe}})),I=(X,R,ee)=>{ee!==void 0?X.value=ee:X.value=!X.value,X.value?(x.value=!0,s("overlay-opened",R)):(x.value=!1,s("overlay-closed",R))},V=(X=!1,R)=>{Z(X),I(k,cn.month,R)},Q=(X=!1,R)=>{Z(X),I(y,cn.year,R)},Z=X=>{X||s("reset-flow")},ce=(X,R)=>{i.arrowNavigation&&(C.value[R]=jt(X),_(C.value,"monthYear"))},we=_e(()=>{var X,R,ee,oe,T,se;return[{type:ns.month,index:1,toggle:V,modelValue:E.value,updateModelValue:de=>E.value=de,text:re.value.text,showSelectionGrid:k.value,items:Y.value,ariaLabel:(X=r.value)==null?void 0:X.openMonthsOverlay,overlayLabel:((ee=(R=r.value).monthPicker)==null?void 0:ee.call(R,!0))??void 0},{type:ns.year,index:2,toggle:Q,modelValue:B.value,updateModelValue:de=>B.value=de,text:n0(i.year,i.locale),showSelectionGrid:y.value,items:L.value,ariaLabel:(oe=r.value)==null?void 0:oe.openYearsOverlay,overlayLabel:((se=(T=r.value).yearPicker)==null?void 0:se.call(T,!0))??void 0}]}),U=_e(()=>i.disableYearSelect?[we.value[0]]:i.yearFirst?[...we.value].reverse():we.value);return t({toggleMonthPicker:V,toggleYearPicker:Q,handleMonthYearChange:b}),(X,R)=>{var ee,oe,T,se,de,ke;return O(),F("div",AR,[X.$slots["month-year"]?(O(),F("div",$R,[Ie(X.$slots,"month-year",Xt(_n({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:q(A),handleMonthYearChange:q(b),instance:e.instance})))])):(O(),F(Me,{key:1},[X.$slots["top-extra"]?(O(),F("div",CR,[Ie(X.$slots,"top-extra",{value:X.internalModelValue})])):ae("",!0),h("div",ER,[q($)(q(a),e.instance)&&!X.vertical?(O(),Ne(Aa,{key:0,"aria-label":(ee=q(r))==null?void 0:ee.prevMonth,disabled:q(w)(!1),class:Ee((oe=q(f))==null?void 0:oe.navBtnPrev),"el-name":"action-prev",onActivate:R[0]||(R[0]=N=>q(b)(!1,!0)),onSetRef:R[1]||(R[1]=N=>ce(N,0))},{default:Te(()=>[X.$slots["arrow-left"]?Ie(X.$slots,"arrow-left",{key:0}):ae("",!0),X.$slots["arrow-left"]?ae("",!0):(O(),Ne(q(Tf),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ae("",!0),h("div",{class:Ee(["dp__month_year_wrap",{dp__year_disable_select:X.disableYearSelect}])},[(O(!0),F(Me,null,Ke(U.value,(N,fe)=>(O(),F(Me,{key:N.type},[h("button",{ref_for:!0,ref:v=>ce(v,fe+1),type:"button","data-dp-element":`overlay-${N.type}`,class:Ee(["dp__btn dp__month_year_select",{"dp--hidden-el":x.value}]),"aria-label":`${N.text}-${N.ariaLabel}`,"data-test":`${N.type}-toggle-overlay-${e.instance}`,onClick:N.toggle,onKeydown:v=>q(vn)(v,()=>N.toggle(),!0)},[X.$slots[N.type]?Ie(X.$slots,N.type,{key:0,text:N.text,value:i[N.type]}):ae("",!0),X.$slots[N.type]?ae("",!0):(O(),F(Me,{key:1},[ye(ve(N.text),1)],64))],42,PR),$e(Bt,{name:q(p)(N.showSelectionGrid),css:q(m)},{default:Te(()=>[N.showSelectionGrid?(O(),Ne(ol,{key:0,items:N.items,"arrow-navigation":X.arrowNavigation,"hide-navigation":X.hideNavigation,"is-last":X.autoApply&&!q(c).keepActionRow,"skip-button-ref":!1,config:X.config,type:N.type,"header-refs":[],"esc-close":X.escClose,"menu-wrap-ref":X.menuWrapRef,"text-input":X.textInput,"aria-labels":X.ariaLabels,"overlay-label":N.overlayLabel,onSelected:N.updateModelValue,onToggle:N.toggle},hn({"button-icon":Te(()=>[X.$slots["calendar-icon"]?Ie(X.$slots,"calendar-icon",{key:0}):ae("",!0),X.$slots["calendar-icon"]?ae("",!0):(O(),Ne(q(Vr),{key:1}))]),_:2},[X.$slots[`${N.type}-overlay-value`]?{name:"item",fn:Te(({item:v})=>[Ie(X.$slots,`${N.type}-overlay-value`,{text:v.text,value:v.value})]),key:"0"}:void 0,X.$slots[`${N.type}-overlay`]?{name:"overlay",fn:Te(()=>[Ie(X.$slots,`${N.type}-overlay`,Yt({ref_for:!0},G.value(N.type)))]),key:"1"}:void 0,X.$slots[`${N.type}-overlay-header`]?{name:"header",fn:Te(()=>[Ie(X.$slots,`${N.type}-overlay-header`,{toggle:N.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):ae("",!0)]),_:2},1032,["name","css"])],64))),128))],2),q($)(q(a),e.instance)&&X.vertical?(O(),Ne(Aa,{key:1,"aria-label":(T=q(r))==null?void 0:T.prevMonth,"el-name":"action-prev",disabled:q(w)(!1),class:Ee((se=q(f))==null?void 0:se.navBtnPrev),onActivate:R[2]||(R[2]=N=>q(b)(!1,!0))},{default:Te(()=>[X.$slots["arrow-up"]?Ie(X.$slots,"arrow-up",{key:0}):ae("",!0),X.$slots["arrow-up"]?ae("",!0):(O(),Ne(q(Of),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ae("",!0),q(M)(q(a),e.instance)?(O(),Ne(Aa,{key:2,ref:"rightIcon","el-name":"action-next",disabled:q(w)(!0),"aria-label":(de=q(r))==null?void 0:de.nextMonth,class:Ee((ke=q(f))==null?void 0:ke.navBtnNext),onActivate:R[3]||(R[3]=N=>q(b)(!0,!0)),onSetRef:R[4]||(R[4]=N=>ce(N,X.disableYearSelect?2:3))},{default:Te(()=>[X.$slots[X.vertical?"arrow-down":"arrow-right"]?Ie(X.$slots,X.vertical?"arrow-down":"arrow-right",{key:0}):ae("",!0),X.$slots[X.vertical?"arrow-down":"arrow-right"]?ae("",!0):(O(),Ne(Io(X.vertical?q(If):q(Mf)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):ae("",!0)])],64))])}}}),MR={class:"dp__calendar_header",role:"row"},DR={key:0,class:"dp__calendar_header_item",role:"gridcell"},OR=["aria-label"],IR=h("div",{class:"dp__calendar_header_separator"},null,-1),RR={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},LR={class:"dp__cell_inner"},NR=["id","aria-pressed","aria-disabled","aria-label","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],FR=Nt({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...fs},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:n}){const s=n,i=e,{buildMultiLevelMatrix:o}=zi(),{defaultedTransitions:r,defaultedConfig:a,defaultedAriaLabels:l,defaultedMultiCalendars:c,defaultedWeekNumbers:u,defaultedMultiDates:d,defaultedUI:f}=xt(i),p=be(null),m=be({bottom:"",left:"",transform:""}),_=be([]),b=be(null),w=be(!0),A=be(""),$=be({startX:0,endX:0,startY:0,endY:0}),M=be([]),k=be({left:"50%"}),y=be(!1),x=_e(()=>i.calendar?i.calendar(i.mappedDates):i.mappedDates),C=_e(()=>i.dayNames?Array.isArray(i.dayNames)?i.dayNames:i.dayNames(i.locale,+i.weekStart):gI(i.formatLocale,i.locale,+i.weekStart));Kt(()=>{s("mount",{cmp:"calendar",refs:_}),a.value.noSwipe||b.value&&(b.value.addEventListener("touchstart",ce,{passive:!1}),b.value.addEventListener("touchend",we,{passive:!1}),b.value.addEventListener("touchmove",U,{passive:!1})),i.monthChangeOnScroll&&b.value&&b.value.addEventListener("wheel",ee,{passive:!1})});const P=N=>N?i.vertical?"vNext":"next":i.vertical?"vPrevious":"previous",E=(N,fe)=>{if(i.transitions){const v=wn(Ks(xe(),i.month,i.year));A.value=Dt(wn(Ks(xe(),N,fe)),v)?r.value[P(!0)]:r.value[P(!1)],w.value=!1,Zt(()=>{w.value=!0})}},B=_e(()=>({...f.value.calendar??{}})),G=_e(()=>N=>{const fe=_I(N);return{dp__marker_dot:fe.type==="dot",dp__marker_line:fe.type==="line"}}),re=_e(()=>N=>nt(N,p.value)),Y=_e(()=>({dp__calendar:!0,dp__calendar_next:c.value.count>0&&i.instance!==0})),L=_e(()=>N=>i.hideOffsetDates?N.current:!0),I=async(N,fe)=>{const{width:v,height:D}=N.getBoundingClientRect();p.value=fe.value;let H={left:`${v/2}px`},W=-50;if(await Zt(),M.value[0]){const{left:ie,width:j}=M.value[0].getBoundingClientRect();ie<0&&(H={left:"0"},W=0,k.value.left=`${v/2}px`),window.innerWidth<ie+j&&(H={right:"0"},W=0,k.value.left=`${j-v/2}px`)}m.value={bottom:`${D}px`,...H,transform:`translateX(${W}%)`}},V=async(N,fe,v)=>{var D,H,W;const ie=jt(_.value[fe][v]);ie&&((D=N.marker)!=null&&D.customPosition&&(W=(H=N.marker)==null?void 0:H.tooltip)!=null&&W.length?m.value=N.marker.customPosition(ie):await I(ie,N),s("tooltip-open",N.marker))},Q=async(N,fe,v)=>{var D,H;if(y.value&&d.value.enabled&&d.value.dragSelect)return s("select-date",N);s("set-hover-date",N),(H=(D=N.marker)==null?void 0:D.tooltip)!=null&&H.length&&await V(N,fe,v)},Z=N=>{p.value&&(p.value=null,m.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),s("tooltip-close",N.marker))},ce=N=>{$.value.startX=N.changedTouches[0].screenX,$.value.startY=N.changedTouches[0].screenY},we=N=>{$.value.endX=N.changedTouches[0].screenX,$.value.endY=N.changedTouches[0].screenY,X()},U=N=>{i.vertical&&!i.inline&&N.preventDefault()},X=()=>{const N=i.vertical?"Y":"X";Math.abs($.value[`start${N}`]-$.value[`end${N}`])>10&&s("handle-swipe",$.value[`start${N}`]>$.value[`end${N}`]?"right":"left")},R=(N,fe,v)=>{N&&(Array.isArray(_.value[fe])?_.value[fe][v]=N:_.value[fe]=[N]),i.arrowNavigation&&o(_.value,"calendar")},ee=N=>{i.monthChangeOnScroll&&(N.preventDefault(),s("handle-scroll",N))},oe=N=>u.value.type==="local"?Cf(N.value,{weekStartsOn:+i.weekStart}):u.value.type==="iso"?Af(N.value):typeof u.value.type=="function"?u.value.type(N.value):"",T=N=>{const fe=N[0];return u.value.hideOnOffsetDates?N.some(v=>v.current)?oe(fe):"":oe(fe)},se=(N,fe,v=!0)=>{v&&xI()||d.value.enabled||(Mi(N,a.value),s("select-date",fe))},de=N=>{Mi(N,a.value)},ke=N=>{d.value.enabled&&d.value.dragSelect?(y.value=!0,s("select-date",N)):d.value.enabled&&s("select-date",N)};return t({triggerTransition:E}),(N,fe)=>(O(),F("div",{class:Ee(Y.value)},[h("div",{ref_key:"calendarWrapRef",ref:b,class:Ee(B.value),role:"grid"},[h("div",MR,[N.weekNumbers?(O(),F("div",DR,ve(N.weekNumName),1)):ae("",!0),(O(!0),F(Me,null,Ke(C.value,(v,D)=>{var H,W;return O(),F("div",{key:D,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(W=(H=q(l))==null?void 0:H.weekDay)==null?void 0:W.call(H,D)},[N.$slots["calendar-header"]?Ie(N.$slots,"calendar-header",{key:0,day:v,index:D}):ae("",!0),N.$slots["calendar-header"]?ae("",!0):(O(),F(Me,{key:1},[ye(ve(v),1)],64))],8,OR)}),128))]),IR,$e(Bt,{name:A.value,css:!!N.transitions},{default:Te(()=>[w.value?(O(),F("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:fe[1]||(fe[1]=v=>y.value=!1)},[(O(!0),F(Me,null,Ke(x.value,(v,D)=>(O(),F("div",{key:D,class:"dp__calendar_row",role:"row"},[N.weekNumbers?(O(),F("div",RR,[h("div",LR,ve(T(v.days)),1)])):ae("",!0),(O(!0),F(Me,null,Ke(v.days,(H,W)=>{var ie,j,te;return O(),F("div",{id:q(u0)(H.value),ref_for:!0,ref:J=>R(J,D,W),key:W+D,role:"gridcell",class:"dp__calendar_item","aria-pressed":(H.classData.dp__active_date||H.classData.dp__range_start||H.classData.dp__range_start)??void 0,"aria-disabled":H.classData.dp__cell_disabled||void 0,"aria-label":(j=(ie=q(l))==null?void 0:ie.day)==null?void 0:j.call(ie,H),tabindex:"0","data-test":H.value,onClick:Ha(J=>se(J,H),["prevent"]),onTouchend:J=>se(J,H,!1),onKeydown:J=>q(vn)(J,()=>N.$emit("select-date",H)),onMouseenter:J=>Q(H,D,W),onMouseleave:J=>Z(H),onMousedown:J=>ke(H),onMouseup:fe[0]||(fe[0]=J=>y.value=!1)},[h("div",{class:Ee(["dp__cell_inner",H.classData])},[N.$slots.day&&L.value(H)?Ie(N.$slots,"day",{key:0,day:+H.text,date:H.value}):ae("",!0),N.$slots.day?ae("",!0):(O(),F(Me,{key:1},[ye(ve(H.text),1)],64)),H.marker&&L.value(H)?(O(),F(Me,{key:2},[N.$slots.marker?Ie(N.$slots,"marker",{key:0,marker:H.marker,day:+H.text,date:H.value}):(O(),F("div",{key:1,class:Ee(G.value(H.marker)),style:Wt(H.marker.color?{backgroundColor:H.marker.color}:{})},null,6))],64)):ae("",!0),re.value(H.value)?(O(),F("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:M,class:"dp__marker_tooltip",style:Wt(m.value)},[(te=H.marker)!=null&&te.tooltip?(O(),F("div",{key:0,class:"dp__tooltip_content",onClick:de},[(O(!0),F(Me,null,Ke(H.marker.tooltip,(J,he)=>(O(),F("div",{key:he,class:"dp__tooltip_text"},[N.$slots["marker-tooltip"]?Ie(N.$slots,"marker-tooltip",{key:0,tooltip:J,day:H.value}):ae("",!0),N.$slots["marker-tooltip"]?ae("",!0):(O(),F(Me,{key:1},[h("div",{class:"dp__tooltip_mark",style:Wt(J.color?{backgroundColor:J.color}:{})},null,4),h("div",null,ve(J.text),1)],64))]))),128)),h("div",{class:"dp__arrow_bottom_tp",style:Wt(k.value)},null,4)])):ae("",!0)],4)):ae("",!0)],2)],40,NR)}),128))]))),128))],32)):ae("",!0)]),_:3},8,["name","css"])],2)],2))}}),Fm=e=>Array.isArray(e),BR=(e,t,n,s)=>{const i=be([]),o=be(new Date),r=be(),a=()=>ce(e.isTextInputDate),{modelValue:l,calendars:c,time:u,today:d}=al(e,t,a),{defaultedMultiCalendars:f,defaultedStartTime:p,defaultedRange:m,defaultedConfig:_,defaultedTz:b,propDates:w,defaultedMultiDates:A}=xt(e),{validateMonthYearInRange:$,isDisabled:M,isDateRangeAllowed:k,checkMinMaxRange:y}=Yi(e),{updateTimeValues:x,getSetDateTime:C,setTime:P,assignStartTime:E,validateTime:B,disabledTimesConfig:G}=_0(e,u,l,s),re=_e(()=>ne=>c.value[ne]?c.value[ne].month:0),Y=_e(()=>ne=>c.value[ne]?c.value[ne].year:0),L=ne=>!_.value.keepViewOnOffsetClick||ne?!0:!r.value,I=(ne,Se,ue,Ae=!1)=>{var De,sn;L(Ae)&&(c.value[ne]||(c.value[ne]={month:0,year:0}),c.value[ne].month=Om(Se)?(De=c.value[ne])==null?void 0:De.month:Se,c.value[ne].year=Om(ue)?(sn=c.value[ne])==null?void 0:sn.year:ue)},V=()=>{e.autoApply&&t("select-date")};Kt(()=>{e.shadow||(l.value||(N(),p.value&&E(p.value)),ce(!0),e.focusStartDate&&e.startDate&&N())});const Q=_e(()=>{var ne;return(ne=e.flow)!=null&&ne.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),Z=()=>{e.autoApply&&Q.value&&t("auto-apply",e.partialFlow?e.flowStep!==e.flow.length:!1)},ce=(ne=!1)=>{if(l.value)return Array.isArray(l.value)?(i.value=l.value,T(ne)):X(l.value,ne);if(f.value.count&&ne&&!e.startDate)return U(xe(),ne)},we=()=>Array.isArray(l.value)&&m.value.enabled?Qe(l.value[0])===Qe(l.value[1]??l.value[0]):!1,U=(ne=new Date,Se=!1)=>{if((!f.value.count||!f.value.static||Se)&&I(0,Qe(ne),Ye(ne)),f.value.count&&(!f.value.solo||!l.value||we()))for(let ue=1;ue<f.value.count;ue++){const Ae=ft(xe(),{month:re.value(ue-1),year:Y.value(ue-1)}),De=My(Ae,{months:1});c.value[ue]={month:Qe(De),year:Ye(De)}}},X=(ne,Se)=>{U(ne),P("hours",ei(ne)),P("minutes",Ni(ne)),P("seconds",Sr(ne)),f.value.count&&Se&&ke()},R=ne=>{if(f.value.count){if(f.value.solo)return 0;const Se=Qe(ne[0]),ue=Qe(ne[1]);return Math.abs(ue-Se)<f.value.count?0:1}return 1},ee=(ne,Se)=>{ne[1]&&m.value.showLastInRange?U(ne[R(ne)],Se):U(ne[0],Se);const ue=(Ae,De)=>[Ae(ne[0]),ne[1]?Ae(ne[1]):u[De][1]];P("hours",ue(ei,"hours")),P("minutes",ue(Ni,"minutes")),P("seconds",ue(Sr,"seconds"))},oe=(ne,Se)=>{if((m.value.enabled||e.weekPicker)&&!A.value.enabled)return ee(ne,Se);if(A.value.enabled&&Se){const ue=ne[ne.length-1];return X(ue,Se)}},T=ne=>{const Se=l.value;oe(Se,ne),f.value.count&&f.value.solo&&ke()},se=(ne,Se)=>{const ue=ft(xe(),{month:re.value(Se),year:Y.value(Se)}),Ae=ne<0?cs(ue,1):$r(ue,1);$(Qe(Ae),Ye(Ae),ne<0,e.preventMinMaxNavigation)&&(I(Se,Qe(Ae),Ye(Ae)),t("update-month-year",{instance:Se,month:Qe(Ae),year:Ye(Ae)}),f.value.count&&!f.value.solo&&de(Se),n())},de=ne=>{for(let Se=ne-1;Se>=0;Se--){const ue=$r(ft(xe(),{month:re.value(Se+1),year:Y.value(Se+1)}),1);I(Se,Qe(ue),Ye(ue))}for(let Se=ne+1;Se<=f.value.count-1;Se++){const ue=cs(ft(xe(),{month:re.value(Se-1),year:Y.value(Se-1)}),1);I(Se,Qe(ue),Ye(ue))}},ke=()=>{if(Array.isArray(l.value)&&l.value.length===2){const ne=xe(xe(l.value[1]?l.value[1]:cs(l.value[0],1))),[Se,ue]=[Qe(l.value[0]),Ye(l.value[0])],[Ae,De]=[Qe(l.value[1]),Ye(l.value[1])];(Se!==Ae||Se===Ae&&ue!==De)&&f.value.solo&&I(1,Qe(ne),Ye(ne))}else l.value&&!Array.isArray(l.value)&&(I(0,Qe(l.value),Ye(l.value)),U(xe()))},N=()=>{e.startDate&&(I(0,Qe(xe(e.startDate)),Ye(xe(e.startDate))),f.value.count&&de(0))},fe=(ne,Se)=>{if(e.monthChangeOnScroll){const ue=new Date().getTime()-o.value.getTime(),Ae=Math.abs(ne.deltaY);let De=500;Ae>1&&(De=100),Ae>100&&(De=0),ue>De&&(o.value=new Date,se(e.monthChangeOnScroll!=="inverse"?-ne.deltaY:ne.deltaY,Se))}},v=(ne,Se,ue=!1)=>{e.monthChangeOnArrows&&e.vertical===ue&&D(ne,Se)},D=(ne,Se)=>{se(ne==="right"?-1:1,Se)},H=ne=>{if(w.value.markers)return Ic(ne.value,w.value.markers)},W=(ne,Se)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[ne==0,!0];case"fair":return[ne==0||Se>ne,!0];case"append":return[!1,!1];default:return[!1,!1]}},ie=(ne,Se,ue,Ae)=>{if(e.sixWeeks&&ne.length<6){const De=6-ne.length,sn=(Se.getDay()+7-Ae)%7,xn=6-(ue.getDay()+7-Ae)%7,[Rs,Vo]=W(sn,xn);for(let Ji=1;Ji<=De;Ji++)if(Vo?!!(Ji%2)==Rs:Rs){const gs=ne[0].days[0],Wr=j(os(gs.value,-7),Qe(Se));ne.unshift({days:Wr})}else{const gs=ne[ne.length-1],Wr=gs.days[gs.days.length-1],Tu=j(os(Wr.value,1),Qe(Se));ne.push({days:Tu})}}return ne},j=(ne,Se)=>{const ue=xe(ne),Ae=[];for(let De=0;De<7;De++){const sn=os(ue,De),xn=Qe(sn)!==Se;Ae.push({text:e.hideOffsetDates&&xn?"":sn.getDate(),value:sn,current:!xn,classData:{}})}return Ae},te=(ne,Se)=>{const ue=[],Ae=new Date(Se,ne),De=new Date(Se,ne+1,0),sn=e.weekStart,xn=hs(Ae,{weekStartsOn:sn}),Rs=Vo=>{const Ji=j(Vo,ne);if(ue.push({days:Ji}),!ue[ue.length-1].days.some(gs=>nt(wn(gs.value),wn(De)))){const gs=os(Vo,7);Rs(gs)}};return Rs(xn),ie(ue,Ae,De,sn)},J=ne=>{const Se=Di(xe(ne.value),u.hours,u.minutes,Ve());t("date-update",Se),A.value.enabled?Vf(Se,l,A.value.limit):l.value=Se,s(),Zt().then(()=>{Z()})},he=ne=>m.value.noDisabledRange?o0(i.value[0],ne).some(Se=>M(Se)):!1,me=()=>{i.value=l.value?l.value.slice():[],i.value.length===2&&!(m.value.fixedStart||m.value.fixedEnd)&&(i.value=[])},pe=(ne,Se)=>{const ue=[xe(ne.value),os(xe(ne.value),+m.value.autoRange)];k(ue)?(Se&&Le(ne.value),i.value=ue):t("invalid-date",ne.value)},Le=ne=>{const Se=Qe(xe(ne)),ue=Ye(xe(ne));if(I(0,Se,ue),f.value.count>0)for(let Ae=1;Ae<f.value.count;Ae++){const De=AI(ft(xe(ne),{year:Y.value(Ae-1),month:re.value(Ae-1)}));I(Ae,De.month,De.year)}},Oe=ne=>{if(he(ne.value)||!y(ne.value,l.value,m.value.fixedStart?0:1))return t("invalid-date",ne.value);i.value=p0(xe(ne.value),l,t,m)},He=(ne,Se)=>{if(me(),m.value.autoRange)return pe(ne,Se);if(m.value.fixedStart||m.value.fixedEnd)return Oe(ne);i.value[0]?y(xe(ne.value),l.value)&&!he(ne.value)?At(xe(ne.value),xe(i.value[0]))?(i.value.unshift(xe(ne.value)),t("range-end",i.value[0])):(i.value[1]=xe(ne.value),t("range-end",i.value[1])):(e.autoApply&&t("auto-apply-invalid",ne.value),t("invalid-date",ne.value)):(i.value[0]=xe(ne.value),t("range-start",i.value[0]))},Ve=(ne=!0)=>e.enableSeconds?Array.isArray(u.seconds)?ne?u.seconds[0]:u.seconds[1]:u.seconds:0,tt=ne=>{i.value[ne]=Di(i.value[ne],u.hours[ne],u.minutes[ne],Ve(ne!==1))},Je=()=>{var ne,Se;i.value[0]&&i.value[1]&&+((ne=i.value)==null?void 0:ne[0])>+((Se=i.value)==null?void 0:Se[1])&&(i.value.reverse(),t("range-start",i.value[0]),t("range-end",i.value[1]))},gt=()=>{i.value.length&&(i.value[0]&&!i.value[1]?tt(0):(tt(0),tt(1),s()),Je(),l.value=i.value.slice(),mu(i.value,t,e.autoApply,e.modelAuto))},rn=(ne,Se=!1)=>{if(M(ne.value)||!ne.current&&e.hideOffsetDates)return t("invalid-date",ne.value);if(r.value=JSON.parse(JSON.stringify(ne)),!m.value.enabled)return J(ne);Fm(u.hours)&&Fm(u.minutes)&&!A.value.enabled&&(He(ne,Se),gt())},jn=(ne,Se)=>{var ue;I(ne,Se.month,Se.year,!0),f.value.count&&!f.value.solo&&de(ne),t("update-month-year",{instance:ne,month:Se.month,year:Se.year}),n(f.value.solo?ne:void 0);const Ae=(ue=e.flow)!=null&&ue.length?e.flow[e.flowStep]:void 0;!Se.fromNav&&(Ae===cn.month||Ae===cn.year)&&s()},ri=(ne,Se)=>{f0({value:ne,modelValue:l,range:m.value.enabled,timezone:Se?void 0:b.value.timezone}),V(),e.multiCalendars&&Zt().then(()=>ce(!0))},Zn=()=>{const ne=Rf(xe(),b.value);m.value.enabled?l.value&&Array.isArray(l.value)&&l.value[0]?l.value=At(ne,l.value[0])?[ne,l.value[0]]:[l.value[0],ne]:l.value=[ne]:l.value=ne,V()},Is=()=>{if(Array.isArray(l.value))if(A.value.enabled){const ne=Ht();l.value[l.value.length-1]=C(ne)}else l.value=l.value.map((ne,Se)=>ne&&C(ne,Se));else l.value=C(l.value);t("time-update")},Ht=()=>Array.isArray(l.value)&&l.value.length?l.value[l.value.length-1]:null;return{calendars:c,modelValue:l,month:re,year:Y,time:u,disabledTimesConfig:G,today:d,validateTime:B,getCalendarDays:te,getMarker:H,handleScroll:fe,handleSwipe:D,handleArrow:v,selectDate:rn,updateMonthYear:jn,presetDate:ri,selectCurrentDate:Zn,updateTime:(ne,Se=!0,ue=!1)=>{x(ne,Se,ue,Is)},assignMonthAndYear:U}},VR={key:0},HR=Nt({__name:"DatePicker",props:{...fs},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:n}){const s=n,i=e,{calendars:o,month:r,year:a,modelValue:l,time:c,disabledTimesConfig:u,today:d,validateTime:f,getCalendarDays:p,getMarker:m,handleArrow:_,handleScroll:b,handleSwipe:w,selectDate:A,updateMonthYear:$,presetDate:M,selectCurrentDate:k,updateTime:y,assignMonthAndYear:x}=BR(i,s,we,U),C=Ro(),{setHoverDate:P,getDayClassData:E,clearHoverDate:B}=iL(l,i),{defaultedMultiCalendars:G}=xt(i),re=be([]),Y=be([]),L=be(null),I=Rn(C,"calendar"),V=Rn(C,"monthYear"),Q=Rn(C,"timePicker"),Z=fe=>{i.shadow||s("mount",fe)};Vt(o,()=>{i.shadow||setTimeout(()=>{s("recalculate-position")},0)},{deep:!0}),Vt(G,(fe,v)=>{fe.count-v.count>0&&x()},{deep:!0});const ce=_e(()=>fe=>p(r.value(fe),a.value(fe)).map(v=>({...v,days:v.days.map(D=>(D.marker=m(D),D.classData=E(D),D))})));function we(fe){var v;fe||fe===0?(v=Y.value[fe])==null||v.triggerTransition(r.value(fe),a.value(fe)):Y.value.forEach((D,H)=>D.triggerTransition(r.value(H),a.value(H)))}function U(){s("update-flow-step")}const X=(fe,v=!1)=>{A(fe,v),i.spaceConfirm&&s("select-date")},R=(fe,v,D=0)=>{var H;(H=re.value[D])==null||H.toggleMonthPicker(fe,v)},ee=(fe,v,D=0)=>{var H;(H=re.value[D])==null||H.toggleYearPicker(fe,v)},oe=(fe,v,D)=>{var H;(H=L.value)==null||H.toggleTimePicker(fe,v,D)},T=(fe,v)=>{var D;if(!i.range){const H=l.value?l.value:d,W=v?new Date(v):H,ie=fe?hs(W,{weekStartsOn:1}):By(W,{weekStartsOn:1});A({value:ie,current:Qe(W)===r.value(0),text:"",classData:{}}),(D=document.getElementById(u0(ie)))==null||D.focus()}},se=fe=>{var v;(v=re.value[0])==null||v.handleMonthYearChange(fe,!0)},de=fe=>{$(0,{month:r.value(0),year:a.value(0)+(fe?1:-1),fromNav:!0})},ke=(fe,v)=>{fe===cn.time&&s(`time-picker-${v?"open":"close"}`),s("overlay-toggle",{open:v,overlay:fe})},N=fe=>{s("overlay-toggle",{open:!1,overlay:fe}),s("focus-menu")};return t({clearHoverDate:B,presetDate:M,selectCurrentDate:k,toggleMonthPicker:R,toggleYearPicker:ee,toggleTimePicker:oe,handleArrow:_,updateMonthYear:$,getSidebarProps:()=>({modelValue:l,month:r,year:a,time:c,updateTime:y,updateMonthYear:$,selectDate:A,presetDate:M}),changeMonth:se,changeYear:de,selectWeekDate:T}),(fe,v)=>(O(),F(Me,null,[$e(gu,{"multi-calendars":q(G).count,collapse:fe.collapse},{default:Te(({instance:D,index:H})=>[fe.disableMonthYearSelect?ae("",!0):(O(),Ne(TR,Yt({key:0,ref:W=>{W&&(re.value[H]=W)},months:q(Zy)(fe.formatLocale,fe.locale,fe.monthNameFormat),years:q(Lf)(fe.yearRange,fe.locale,fe.reverseYears),month:q(r)(D),year:q(a)(D),instance:D},fe.$props,{onMount:v[0]||(v[0]=W=>Z(q(ko).header)),onResetFlow:v[1]||(v[1]=W=>fe.$emit("reset-flow")),onUpdateMonthYear:W=>q($)(D,W),onOverlayClosed:N,onOverlayOpened:v[2]||(v[2]=W=>fe.$emit("overlay-toggle",{open:!0,overlay:W}))}),hn({_:2},[Ke(q(V),(W,ie)=>({name:W,fn:Te(j=>[Ie(fe.$slots,W,Xt(_n(j)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),$e(FR,Yt({ref:W=>{W&&(Y.value[H]=W)},"mapped-dates":ce.value(D),month:q(r)(D),year:q(a)(D),instance:D},fe.$props,{onSelectDate:W=>q(A)(W,D!==1),onHandleSpace:W=>X(W,D!==1),onSetHoverDate:v[3]||(v[3]=W=>q(P)(W)),onHandleScroll:W=>q(b)(W,D),onHandleSwipe:W=>q(w)(W,D),onMount:v[4]||(v[4]=W=>Z(q(ko).calendar)),onResetFlow:v[5]||(v[5]=W=>fe.$emit("reset-flow")),onTooltipOpen:v[6]||(v[6]=W=>fe.$emit("tooltip-open",W)),onTooltipClose:v[7]||(v[7]=W=>fe.$emit("tooltip-close",W))}),hn({_:2},[Ke(q(I),(W,ie)=>({name:W,fn:Te(j=>[Ie(fe.$slots,W,Xt(_n({...j})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),fe.enableTimePicker?(O(),F("div",VR,[fe.$slots["time-picker"]?Ie(fe.$slots,"time-picker",Xt(Yt({key:0},{time:q(c),updateTime:q(y)}))):(O(),Ne(m0,Yt({key:1,ref_key:"timePickerRef",ref:L},fe.$props,{hours:q(c).hours,minutes:q(c).minutes,seconds:q(c).seconds,"internal-model-value":fe.internalModelValue,"disabled-times-config":q(u),"validate-time":q(f),onMount:v[8]||(v[8]=D=>Z(q(ko).timePicker)),"onUpdate:hours":v[9]||(v[9]=D=>q(y)(D)),"onUpdate:minutes":v[10]||(v[10]=D=>q(y)(D,!1)),"onUpdate:seconds":v[11]||(v[11]=D=>q(y)(D,!1,!0)),onResetFlow:v[12]||(v[12]=D=>fe.$emit("reset-flow")),onOverlayClosed:v[13]||(v[13]=D=>ke(D,!1)),onOverlayOpened:v[14]||(v[14]=D=>ke(D,!0)),onAmPmChange:v[15]||(v[15]=D=>fe.$emit("am-pm-change",D))}),hn({_:2},[Ke(q(Q),(D,H)=>({name:D,fn:Te(W=>[Ie(fe.$slots,D,Xt(_n(W)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):ae("",!0)],64))}}),jR=(e,t)=>{const n=be(),{defaultedMultiCalendars:s,defaultedConfig:i,defaultedHighlight:o,defaultedRange:r,propDates:a,defaultedFilters:l,defaultedMultiDates:c}=xt(e),{modelValue:u,year:d,month:f,calendars:p}=al(e,t),{isDisabled:m}=Yi(e),{selectYear:_,groupedYears:b,showYearPicker:w,isDisabled:A,toggleYearPicker:$,handleYearSelect:M,handleYear:k}=g0({modelValue:u,multiCalendars:s,range:r,highlight:o,calendars:p,propDates:a,month:f,year:d,filters:l,props:e,emit:t}),y=(L,I)=>[L,I].map(V=>Cs(V,"MMMM",{locale:e.formatLocale})).join("-"),x=_e(()=>L=>u.value?Array.isArray(u.value)?u.value.some(I=>Tm(L,I)):Tm(u.value,L):!1),C=L=>{if(r.value.enabled){if(Array.isArray(u.value)){const I=nt(L,u.value[0])||nt(L,u.value[1]);return fu(u.value,n.value,L)&&!I}return!1}return!1},P=(L,I)=>L.quarter===Sm(I)&&L.year===Ye(I),E=L=>typeof o.value=="function"?o.value({quarter:Sm(L),year:Ye(L)}):!!o.value.quarters.find(I=>P(I,L)),B=_e(()=>L=>{const I=ft(new Date,{year:d.value(L)});return m2({start:Wa(I),end:Fy(I)}).map(V=>{const Q=vo(V),Z=Am(V),ce=m(V),we=C(Q),U=E(Q);return{text:y(Q,Z),value:Q,active:x.value(Q),highlighted:U,disabled:ce,isBetween:we}})}),G=L=>{Vf(L,u,c.value.limit),t("auto-apply",!0)},re=L=>{u.value=Hf(u,L,t),mu(u.value,t,e.autoApply,e.modelAuto)},Y=L=>{u.value=L,t("auto-apply")};return{defaultedConfig:i,defaultedMultiCalendars:s,groupedYears:b,year:d,isDisabled:A,quarters:B,showYearPicker:w,modelValue:u,setHoverDate:L=>{n.value=L},selectYear:_,selectQuarter:(L,I,V)=>{if(!V)return p.value[I].month=Qe(Am(L)),c.value.enabled?G(L):r.value.enabled?re(L):Y(L)},toggleYearPicker:$,handleYearSelect:M,handleYear:k}},WR={class:"dp--quarter-items"},zR=["data-test","disabled","onClick","onMouseover"],YR=Nt({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...fs},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:n}){const s=n,i=e,o=Ro(),r=Rn(o,"yearMode"),{defaultedMultiCalendars:a,defaultedConfig:l,groupedYears:c,year:u,isDisabled:d,quarters:f,modelValue:p,showYearPicker:m,setHoverDate:_,selectQuarter:b,toggleYearPicker:w,handleYearSelect:A,handleYear:$}=jR(i,s);return t({getSidebarProps:()=>({modelValue:p,year:u,selectQuarter:b,handleYearSelect:A,handleYear:$})}),(M,k)=>(O(),Ne(gu,{"multi-calendars":q(a).count,collapse:M.collapse,stretch:""},{default:Te(({instance:y})=>[h("div",{class:"dp-quarter-picker-wrap",style:Wt({minHeight:`${q(l).modeHeight}px`})},[M.$slots["top-extra"]?Ie(M.$slots,"top-extra",{key:0,value:M.internalModelValue}):ae("",!0),h("div",null,[$e(h0,Yt(M.$props,{items:q(c)(y),instance:y,"show-year-picker":q(m)[y],year:q(u)(y),"is-disabled":x=>q(d)(y,x),onHandleYear:x=>q($)(y,x),onYearSelect:x=>q(A)(x,y),onToggleYearPicker:x=>q(w)(y,x==null?void 0:x.flow,x==null?void 0:x.show)}),hn({_:2},[Ke(q(r),(x,C)=>({name:x,fn:Te(P=>[Ie(M.$slots,x,Xt(_n(P)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),h("div",WR,[(O(!0),F(Me,null,Ke(q(f)(y),(x,C)=>(O(),F("div",{key:C},[h("button",{type:"button",class:Ee(["dp--qr-btn",{"dp--qr-btn-active":x.active,"dp--qr-btn-between":x.isBetween,"dp--qr-btn-disabled":x.disabled,"dp--highlighted":x.highlighted}]),"data-test":x.value,disabled:x.disabled,onClick:P=>q(b)(x.value,y,x.disabled),onMouseover:P=>q(_)(x.value)},[M.$slots.quarter?Ie(M.$slots,"quarter",{key:0,value:x.value,text:x.text}):(O(),F(Me,{key:1},[ye(ve(x.text),1)],64))],42,zR)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),UR=["id","tabindex","role","aria-label"],KR={key:0,class:"dp--menu-load-container"},qR=h("span",{class:"dp--menu-loader"},null,-1),GR=[qR],JR={key:1,class:"dp--menu-header"},XR={key:0,class:"dp__sidebar_left"},QR=["data-test","onClick","onKeydown"],ZR={key:2,class:"dp__sidebar_right"},eL={key:3,class:"dp__action_extra"},Bm=Nt({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...pu,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:n}){const s=n,i=e,o=be(null),r=_e(()=>{const{openOnTop:j,...te}=i;return{...te,flowStep:P.value,collapse:i.collapse,noOverlayFocus:i.noOverlayFocus,menuWrapRef:o.value}}),{setMenuFocused:a,setShiftKey:l,control:c}=d0(),u=Ro(),{defaultedTextInput:d,defaultedInline:f,defaultedConfig:p,defaultedUI:m}=xt(i),_=be(null),b=be(0),w=be(null),A=be(!1),$=be(null);Kt(()=>{if(!i.shadow){A.value=!0,M(),window.addEventListener("resize",M);const j=jt(o);if(j&&!d.value.enabled&&!f.value.enabled&&(a(!0),I()),j){const te=J=>{p.value.allowPreventDefault&&J.preventDefault(),Mi(J,p.value,!0)};j.addEventListener("pointerdown",te),j.addEventListener("mousedown",te)}}}),Fr(()=>{window.removeEventListener("resize",M)});const M=()=>{const j=jt(w);j&&(b.value=j.getBoundingClientRect().width)},{arrowRight:k,arrowLeft:y,arrowDown:x,arrowUp:C}=zi(),{flowStep:P,updateFlowStep:E,childMount:B,resetFlow:G,handleFlow:re}=oL(i,s,$),Y=_e(()=>i.monthPicker?oR:i.yearPicker?aR:i.timePicker?SR:i.quarterPicker?YR:HR),L=_e(()=>{var j;if(p.value.arrowLeft)return p.value.arrowLeft;const te=(j=o.value)==null?void 0:j.getBoundingClientRect(),J=i.getInputRect();return(J==null?void 0:J.width)<(b==null?void 0:b.value)&&(J==null?void 0:J.left)<=((te==null?void 0:te.left)??0)?`${(J==null?void 0:J.width)/2}px`:(J==null?void 0:J.right)>=((te==null?void 0:te.right)??0)&&(J==null?void 0:J.width)<(b==null?void 0:b.value)?`${(b==null?void 0:b.value)-(J==null?void 0:J.width)/2}px`:"50%"}),I=()=>{const j=jt(o);j&&j.focus({preventScroll:!0})},V=_e(()=>{var j;return((j=$.value)==null?void 0:j.getSidebarProps())||{}}),Q=()=>{i.openOnTop&&s("recalculate-position")},Z=Rn(u,"action"),ce=_e(()=>i.monthPicker||i.yearPicker?Rn(u,"monthYear"):i.timePicker?Rn(u,"timePicker"):Rn(u,"shared")),we=_e(()=>i.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),U=_e(()=>({dp__menu_disabled:i.disabled,dp__menu_readonly:i.readonly,"dp-menu-loading":i.loading})),X=_e(()=>({dp__menu:!0,dp__menu_index:!f.value.enabled,dp__relative:f.value.enabled,...m.value.menu??{}})),R=j=>{Mi(j,p.value,!0)},ee=()=>{i.escClose&&s("close-picker")},oe=j=>{if(i.arrowNavigation){if(j===mn.up)return C();if(j===mn.down)return x();if(j===mn.left)return y();if(j===mn.right)return k()}else j===mn.left||j===mn.up?N("handleArrow",mn.left,0,j===mn.up):N("handleArrow",mn.right,0,j===mn.down)},T=j=>{l(j.shiftKey),!i.disableMonthYearSelect&&j.code===_t.tab&&j.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(j.preventDefault(),Mi(j,p.value,!0),s("close-picker"))},se=()=>{I(),s("time-picker-close")},de=j=>{var te,J,he;(te=$.value)==null||te.toggleTimePicker(!1,!1),(J=$.value)==null||J.toggleMonthPicker(!1,!1,j),(he=$.value)==null||he.toggleYearPicker(!1,!1,j)},ke=(j,te=0)=>{var J,he,me;return j==="month"?(J=$.value)==null?void 0:J.toggleMonthPicker(!1,!0,te):j==="year"?(he=$.value)==null?void 0:he.toggleYearPicker(!1,!0,te):j==="time"?(me=$.value)==null?void 0:me.toggleTimePicker(!0,!1):de(te)},N=(j,...te)=>{var J,he;(J=$.value)!=null&&J[j]&&((he=$.value)==null||he[j](...te))},fe=()=>{N("selectCurrentDate")},v=(j,te)=>{N("presetDate",j,te)},D=()=>{N("clearHoverDate")},H=(j,te)=>{N("updateMonthYear",j,te)},W=(j,te)=>{j.preventDefault(),oe(te)},ie=j=>{var te,J,he;if(T(j),j.key===_t.home||j.key===_t.end)return N("selectWeekDate",j.key===_t.home,j.target.getAttribute("id"));switch((j.key===_t.pageUp||j.key===_t.pageDown)&&(j.shiftKey?(N("changeYear",j.key===_t.pageUp),(te=rh(o.value,"overlay-year"))==null||te.focus()):(N("changeMonth",j.key===_t.pageUp),(J=rh(o.value,j.key===_t.pageUp?"action-prev":"action-next"))==null||J.focus()),j.target.getAttribute("id")&&((he=o.value)==null||he.focus({preventScroll:!0}))),j.key){case _t.esc:return ee();case _t.arrowLeft:return W(j,mn.left);case _t.arrowRight:return W(j,mn.right);case _t.arrowUp:return W(j,mn.up);case _t.arrowDown:return W(j,mn.down);default:return}};return t({updateMonthYear:H,switchView:ke,handleFlow:re}),(j,te)=>{var J,he,me;return O(),F("div",{id:j.uid?`dp-menu-${j.uid}`:void 0,ref_key:"dpMenuRef",ref:o,tabindex:q(f).enabled?void 0:"0",role:q(f).enabled?void 0:"dialog","aria-label":(J=j.ariaLabels)==null?void 0:J.menu,class:Ee(X.value),style:Wt({"--dp-arrow-left":L.value}),onMouseleave:D,onClick:R,onKeydown:ie},[(j.disabled||j.readonly)&&q(f).enabled||j.loading?(O(),F("div",{key:0,class:Ee(U.value)},[j.loading?(O(),F("div",KR,GR)):ae("",!0)],2)):ae("",!0),j.$slots["menu-header"]?(O(),F("div",JR,[Ie(j.$slots,"menu-header")])):ae("",!0),!q(f).enabled&&!j.teleportCenter?(O(),F("div",{key:2,class:Ee(we.value)},null,2)):ae("",!0),h("div",{ref_key:"innerMenuRef",ref:w,class:Ee({dp__menu_content_wrapper:((he=j.presetDates)==null?void 0:he.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((me=j.presetDates)==null?void 0:me.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"])}),style:Wt({"--dp-menu-width":`${b.value}px`})},[j.$slots["left-sidebar"]?(O(),F("div",XR,[Ie(j.$slots,"left-sidebar",Xt(_n(V.value)))])):ae("",!0),j.presetDates.length?(O(),F("div",{key:1,class:Ee({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0})},[(O(!0),F(Me,null,Ke(j.presetDates,(pe,Le)=>(O(),F(Me,{key:Le},[pe.slot?Ie(j.$slots,pe.slot,{key:0,presetDate:v,label:pe.label,value:pe.value}):(O(),F("button",{key:1,type:"button",style:Wt(pe.style||{}),class:Ee(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test":pe.testId??void 0,onClick:Ha(Oe=>v(pe.value,pe.noTz),["prevent"]),onKeydown:Oe=>q(vn)(Oe,()=>v(pe.value,pe.noTz),!0)},ve(pe.label),47,QR))],64))),128))],2)):ae("",!0),h("div",{ref_key:"calendarWrapperRef",ref:_,class:"dp__instance_calendar",role:"document"},[(O(),Ne(Io(Y.value),Yt({ref_key:"dynCmpRef",ref:$},r.value,{"flow-step":q(P),onMount:q(B),onUpdateFlowStep:q(E),onResetFlow:q(G),onFocusMenu:I,onSelectDate:te[0]||(te[0]=pe=>j.$emit("select-date")),onDateUpdate:te[1]||(te[1]=pe=>j.$emit("date-update",pe)),onTooltipOpen:te[2]||(te[2]=pe=>j.$emit("tooltip-open",pe)),onTooltipClose:te[3]||(te[3]=pe=>j.$emit("tooltip-close",pe)),onAutoApply:te[4]||(te[4]=pe=>j.$emit("auto-apply",pe)),onRangeStart:te[5]||(te[5]=pe=>j.$emit("range-start",pe)),onRangeEnd:te[6]||(te[6]=pe=>j.$emit("range-end",pe)),onInvalidFixedRange:te[7]||(te[7]=pe=>j.$emit("invalid-fixed-range",pe)),onTimeUpdate:te[8]||(te[8]=pe=>j.$emit("time-update")),onAmPmChange:te[9]||(te[9]=pe=>j.$emit("am-pm-change",pe)),onTimePickerOpen:te[10]||(te[10]=pe=>j.$emit("time-picker-open",pe)),onTimePickerClose:se,onRecalculatePosition:Q,onUpdateMonthYear:te[11]||(te[11]=pe=>j.$emit("update-month-year",pe)),onAutoApplyInvalid:te[12]||(te[12]=pe=>j.$emit("auto-apply-invalid",pe)),onInvalidDate:te[13]||(te[13]=pe=>j.$emit("invalid-date",pe)),onOverlayToggle:te[14]||(te[14]=pe=>j.$emit("overlay-toggle",pe)),"onUpdate:internalModelValue":te[15]||(te[15]=pe=>j.$emit("update:internal-model-value",pe))}),hn({_:2},[Ke(ce.value,(pe,Le)=>({name:pe,fn:Te(Oe=>[Ie(j.$slots,pe,Xt(_n({...Oe})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),j.$slots["right-sidebar"]?(O(),F("div",ZR,[Ie(j.$slots,"right-sidebar",Xt(_n(V.value)))])):ae("",!0),j.$slots["action-extra"]?(O(),F("div",eL,[j.$slots["action-extra"]?Ie(j.$slots,"action-extra",{key:0,selectCurrentDate:fe}):ae("",!0)])):ae("",!0)],6),!j.autoApply||q(p).keepActionRow?(O(),Ne(XI,Yt({key:3,"menu-mount":A.value},r.value,{"calendar-width":b.value,onClosePicker:te[16]||(te[16]=pe=>j.$emit("close-picker")),onSelectDate:te[17]||(te[17]=pe=>j.$emit("select-date")),onInvalidSelect:te[18]||(te[18]=pe=>j.$emit("invalid-select")),onSelectNow:fe}),hn({_:2},[Ke(q(Z),(pe,Le)=>({name:pe,fn:Te(Oe=>[Ie(j.$slots,pe,Xt(_n({...Oe})))])}))]),1040,["menu-mount","calendar-width"])):ae("",!0)],46,UR)}}});var sr=(e=>(e.center="center",e.left="left",e.right="right",e))(sr||{});const tL=({menuRef:e,menuRefInner:t,inputRef:n,pickerWrapperRef:s,inline:i,emit:o,props:r,slots:a})=>{const{defaultedConfig:l}=xt(r),c=be({}),u=be(!1),d=be({top:"0",left:"0"}),f=be(!1),p=Ra(r,"teleportCenter");Vt(p,()=>{d.value=JSON.parse(JSON.stringify({})),k()});const m=I=>{if(r.teleport){const V=I.getBoundingClientRect();return{left:V.left+window.scrollX,top:V.top+window.scrollY}}return{top:0,left:0}},_=(I,V)=>{d.value.left=`${I+V-c.value.width}px`},b=I=>{d.value.left=`${I}px`},w=(I,V)=>{r.position===sr.left&&b(I),r.position===sr.right&&_(I,V),r.position===sr.center&&(d.value.left=`${I+V/2-c.value.width/2}px`)},A=I=>{const{width:V,height:Q}=I.getBoundingClientRect(),{top:Z,left:ce}=r.altPosition?r.altPosition(I):m(I);return{top:+Z,left:+ce,width:V,height:Q}},$=()=>{d.value.left="50%",d.value.top="50%",d.value.transform="translate(-50%, -50%)",d.value.position="fixed",delete d.value.opacity},M=()=>{const I=jt(n),{top:V,left:Q,transform:Z}=r.altPosition(I);d.value={top:`${V}px`,left:`${Q}px`,transform:Z??""}},k=(I=!0)=>{var V;if(!i.value.enabled){if(p.value)return $();if(r.altPosition!==null)return M();if(I){const Q=r.teleport?(V=t.value)==null?void 0:V.$el:e.value;Q&&(c.value=Q.getBoundingClientRect()),o("recalculate-position")}return G()}},y=({inputEl:I,left:V,width:Q})=>{window.screen.width>768&&!u.value&&w(V,Q),P(I)},x=I=>{const{top:V,left:Q,height:Z,width:ce}=A(I);d.value.top=`${Z+V+ +r.offset}px`,f.value=!1,u.value||(d.value.left=`${Q+ce/2-c.value.width/2}px`),y({inputEl:I,left:Q,width:ce})},C=I=>{const{top:V,left:Q,width:Z}=A(I);d.value.top=`${V-+r.offset-c.value.height}px`,f.value=!0,y({inputEl:I,left:Q,width:Z})},P=I=>{if(r.autoPosition){const{left:V,width:Q}=A(I),{left:Z,right:ce}=c.value;if(!u.value){if(Math.abs(Z)!==Math.abs(ce)){if(Z<=0)return u.value=!0,b(V);if(ce>=document.documentElement.clientWidth)return u.value=!0,_(V,Q)}return w(V,Q)}}},E=()=>{const I=jt(n);if(I){const{height:V}=c.value,{top:Q,height:Z}=I.getBoundingClientRect(),ce=window.innerHeight-Q-Z,we=Q;return V<=ce?fo.bottom:V>ce&&V<=we?fo.top:ce>=we?fo.bottom:fo.top}return fo.bottom},B=I=>E()===fo.bottom?x(I):C(I),G=()=>{const I=jt(n);if(I)return r.autoPosition?B(I):x(I)},re=function(I){if(I){const V=I.scrollHeight>I.clientHeight,Q=window.getComputedStyle(I).overflowY.indexOf("hidden")!==-1;return V&&!Q}return!0},Y=function(I){return!I||I===document.body||I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:re(I)?I:Y(I.assignedSlot&&l.value.shadowDom?I.assignedSlot.parentNode:I.parentNode)},L=I=>{if(I)switch(r.position){case sr.left:return{left:0,transform:"translateX(0)"};case sr.right:return{left:`${I.width}px`,transform:"translateX(-100%)"};default:return{left:`${I.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:f,menuStyle:d,xCorrect:u,setMenuPosition:k,getScrollableParent:Y,shadowRender:(I,V)=>{var Q,Z,ce;const we=document.createElement("div"),U=(Q=jt(n))==null?void 0:Q.getBoundingClientRect();we.setAttribute("id","dp--temp-container");const X=(Z=s.value)!=null&&Z.clientWidth?s.value:document.body;X.append(we);const R=L(U),ee=l.value.shadowDom?Object.keys(a).filter(T=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(T)):Object.keys(a),oe=To(I,{...V,shadow:!0,style:{opacity:0,position:"absolute",...R}},Object.fromEntries(ee.map(T=>[T,a[T]])));nm(oe,we),c.value=(ce=oe.el)==null?void 0:ce.getBoundingClientRect(),nm(null,we),X.removeChild(we)}}},fi=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],nL=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],sL={all:()=>fi,monthYear:()=>fi.filter(e=>e.use.includes("month-year")),input:()=>nL,timePicker:()=>fi.filter(e=>e.use.includes("time")),action:()=>fi.filter(e=>e.use.includes("action")),calendar:()=>fi.filter(e=>e.use.includes("calendar")),menu:()=>fi.filter(e=>e.use.includes("menu")),shared:()=>fi.filter(e=>e.use.includes("shared")),yearMode:()=>fi.filter(e=>e.use.includes("year-mode"))},Rn=(e,t,n)=>{const s=[];return sL[t]().forEach(i=>{e[i.name]&&s.push(i.name)}),n!=null&&n.length&&n.forEach(i=>{i.slot&&s.push(i.slot)}),s},rl=e=>{const t=_e(()=>s=>e.value?s?e.value.open:e.value.close:""),n=_e(()=>s=>e.value?s?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:n}},al=(e,t,n)=>{const{defaultedRange:s,defaultedTz:i}=xt(e),o=xe(En(xe(),i.value.timezone)),r=be([{month:Qe(o),year:Ye(o)}]),a=f=>{const p={hours:ei(o),minutes:Ni(o),seconds:0};return s.value.enabled?[p[f],p[f]]:p[f]},l=Ds({hours:a("hours"),minutes:a("minutes"),seconds:a("seconds")});Vt(s,(f,p)=>{f.enabled!==p.enabled&&(l.hours=a("hours"),l.minutes=a("minutes"),l.seconds=a("seconds"))},{deep:!0});const c=_e({get:()=>e.internalModelValue,set:f=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",f)}}),u=_e(()=>f=>r.value[f]?r.value[f].month:0),d=_e(()=>f=>r.value[f]?r.value[f].year:0);return Vt(c,(f,p)=>{n&&JSON.stringify(f??{})!==JSON.stringify(p??{})&&n()},{deep:!0}),{calendars:r,time:l,modelValue:c,month:u,year:d,today:o}},iL=(e,t)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:s,defaultedUI:i,defaultedHighlight:o,defaultedTz:r,propDates:a,defaultedRange:l}=xt(t),{isDisabled:c}=Yi(t),u=be(null),d=be(En(new Date,r.value.timezone)),f=R=>{!R.current&&t.hideOffsetDates||(u.value=R.value)},p=()=>{u.value=null},m=R=>Array.isArray(e.value)&&l.value.enabled&&e.value[0]&&u.value?R?Dt(u.value,e.value[0]):At(u.value,e.value[0]):!0,_=(R,ee)=>{const oe=()=>e.value?ee?e.value[0]||null:e.value[1]:null,T=e.value&&Array.isArray(e.value)?oe():null;return nt(xe(R.value),T)},b=R=>{const ee=Array.isArray(e.value)?e.value[0]:null;return R?!At(u.value??null,ee):!0},w=(R,ee=!0)=>(l.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!R.current?!1:nt(xe(R.value),e.value[ee?0:1]):l.value.enabled?_(R,ee)&&b(ee)||nt(R.value,Array.isArray(e.value)?e.value[0]:null)&&m(ee):!1,A=(R,ee)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const oe=nt(R.value,u.value);return ee?Dt(e.value[0],R.value)&&oe:At(e.value[0],R.value)&&oe}return!1},$=R=>!e.value||t.hideOffsetDates&&!R.current?!1:l.value.enabled?t.modelAuto&&Array.isArray(e.value)?nt(R.value,e.value[0]?e.value[0]:d.value):!1:s.value.enabled&&Array.isArray(e.value)?e.value.some(ee=>nt(ee,R.value)):nt(R.value,e.value?e.value:d.value),M=R=>{if(l.value.autoRange||t.weekPicker){if(u.value){if(t.hideOffsetDates&&!R.current)return!1;const ee=os(u.value,+l.value.autoRange),oe=zs(xe(u.value),t.weekStart);return t.weekPicker?nt(oe[1],xe(R.value)):nt(ee,xe(R.value))}return!1}return!1},k=R=>{if(l.value.autoRange||t.weekPicker){if(u.value){const ee=os(u.value,+l.value.autoRange);if(t.hideOffsetDates&&!R.current)return!1;const oe=zs(xe(u.value),t.weekStart);return t.weekPicker?Dt(R.value,oe[0])&&At(R.value,oe[1]):Dt(R.value,u.value)&&At(R.value,ee)}return!1}return!1},y=R=>{if(l.value.autoRange||t.weekPicker){if(u.value){if(t.hideOffsetDates&&!R.current)return!1;const ee=zs(xe(u.value),t.weekStart);return t.weekPicker?nt(ee[0],R.value):nt(u.value,R.value)}return!1}return!1},x=R=>fu(e.value,u.value,R.value),C=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,P=()=>t.modelAuto?e0(t.internalModelValue):!0,E=R=>{if(t.weekPicker)return!1;const ee=l.value.enabled?!w(R)&&!w(R,!1):!0;return!c(R.value)&&!$(R)&&!(!R.current&&t.hideOffsetDates)&&ee},B=R=>l.value.enabled?t.modelAuto?C()&&$(R):!1:$(R),G=R=>o.value?wI(R.value,a.value.highlight):!1,re=R=>{const ee=c(R.value);return ee&&(typeof o.value=="function"?!o.value(R.value,ee):!o.value.options.highlightDisabled)},Y=R=>{var ee;return typeof o.value=="function"?o.value(R.value):(ee=o.value.weekdays)==null?void 0:ee.includes(R.value.getDay())},L=R=>(l.value.enabled||t.weekPicker)&&(!(n.value.count>0)||R.current)&&P()&&!(!R.current&&t.hideOffsetDates)&&!$(R)?x(R):!1,I=R=>{const{isRangeStart:ee,isRangeEnd:oe}=ce(R),T=l.value.enabled?ee||oe:!1;return{dp__cell_offset:!R.current,dp__pointer:!t.disabled&&!(!R.current&&t.hideOffsetDates)&&!c(R.value),dp__cell_disabled:c(R.value),dp__cell_highlight:!re(R)&&(G(R)||Y(R))&&!B(R)&&!T&&!y(R)&&!(L(R)&&t.weekPicker)&&!oe,dp__cell_highlight_active:!re(R)&&(G(R)||Y(R))&&B(R),dp__today:!t.noToday&&nt(R.value,d.value)&&R.current,"dp--past":At(R.value,d.value),"dp--future":Dt(R.value,d.value)}},V=R=>({dp__active_date:B(R),dp__date_hover:E(R)}),Q=R=>{if(e.value&&!Array.isArray(e.value)){const ee=zs(e.value,t.weekStart);return{...U(R),dp__range_start:nt(ee[0],R.value),dp__range_end:nt(ee[1],R.value),dp__range_between_week:Dt(R.value,ee[0])&&At(R.value,ee[1])}}return{...U(R)}},Z=R=>{if(e.value&&Array.isArray(e.value)){const ee=zs(e.value[0],t.weekStart),oe=e.value[1]?zs(e.value[1],t.weekStart):[];return{...U(R),dp__range_start:nt(ee[0],R.value)||nt(oe[0],R.value),dp__range_end:nt(ee[1],R.value)||nt(oe[1],R.value),dp__range_between_week:Dt(R.value,ee[0])&&At(R.value,ee[1])||Dt(R.value,oe[0])&&At(R.value,oe[1]),dp__range_between:Dt(R.value,ee[1])&&At(R.value,oe[0])}}return{...U(R)}},ce=R=>{const ee=n.value.count>0?R.current&&w(R)&&P():w(R)&&P(),oe=n.value.count>0?R.current&&w(R,!1)&&P():w(R,!1)&&P();return{isRangeStart:ee,isRangeEnd:oe}},we=R=>{const{isRangeStart:ee,isRangeEnd:oe}=ce(R);return{dp__range_start:ee,dp__range_end:oe,dp__range_between:L(R),dp__date_hover:nt(R.value,u.value)&&!ee&&!oe&&!t.weekPicker,dp__date_hover_start:A(R,!0),dp__date_hover_end:A(R,!1)}},U=R=>({...we(R),dp__cell_auto_range:k(R),dp__cell_auto_range_start:y(R),dp__cell_auto_range_end:M(R)}),X=R=>l.value.enabled?l.value.autoRange?U(R):t.modelAuto?{...V(R),...we(R)}:t.weekPicker?Z(R):we(R):t.weekPicker?Q(R):V(R);return{setHoverDate:f,clearHoverDate:p,getDayClassData:R=>t.hideOffsetDates&&!R.current?{}:{...I(R),...X(R),[t.dayClass?t.dayClass(R.value,t.internalModelValue):""]:!0,...i.value.calendarCell??{}}}},Yi=e=>{const{defaultedFilters:t,defaultedRange:n,propDates:s,defaultedMultiDates:i}=xt(e),o=Y=>s.value.disabledDates?typeof s.value.disabledDates=="function"?s.value.disabledDates(xe(Y)):!!Ic(Y,s.value.disabledDates):!1,r=Y=>s.value.maxDate?e.yearPicker?Ye(Y)>Ye(s.value.maxDate):Dt(Y,s.value.maxDate):!1,a=Y=>s.value.minDate?e.yearPicker?Ye(Y)<Ye(s.value.minDate):At(Y,s.value.minDate):!1,l=Y=>{const L=r(Y),I=a(Y),V=o(Y),Q=t.value.months.map(X=>+X).includes(Qe(Y)),Z=e.disabledWeekDays.length?e.disabledWeekDays.some(X=>+X===cO(Y)):!1,ce=p(Y),we=Ye(Y),U=we<+e.yearRange[0]||we>+e.yearRange[1];return!(L||I||V||Q||U||Z||ce)},c=(Y,L)=>At(...ki(s.value.minDate,Y,L))||nt(...ki(s.value.minDate,Y,L)),u=(Y,L)=>Dt(...ki(s.value.maxDate,Y,L))||nt(...ki(s.value.maxDate,Y,L)),d=(Y,L,I)=>{let V=!1;return s.value.maxDate&&I&&u(Y,L)&&(V=!0),s.value.minDate&&!I&&c(Y,L)&&(V=!0),V},f=(Y,L,I,V)=>{let Q=!1;return V?s.value.minDate&&s.value.maxDate?Q=d(Y,L,I):(s.value.minDate&&c(Y,L)||s.value.maxDate&&u(Y,L))&&(Q=!0):Q=!0,Q},p=Y=>Array.isArray(s.value.allowedDates)&&!s.value.allowedDates.length?!0:s.value.allowedDates?!Ic(Y,s.value.allowedDates):!1,m=Y=>!l(Y),_=Y=>n.value.noDisabledRange?!Ny({start:Y[0],end:Y[1]}).some(L=>m(L)):!0,b=Y=>{if(Y){const L=Ye(Y);return L>=+e.yearRange[0]&&L<=e.yearRange[1]}return!0},w=(Y,L)=>!!(Array.isArray(Y)&&Y[L]&&(n.value.maxRange||n.value.minRange)&&b(Y[L])),A=(Y,L,I=0)=>{if(w(L,I)&&b(Y)){const V=Ry(Y,L[I]),Q=o0(L[I],Y),Z=Q.length===1?0:Q.filter(we=>m(we)).length,ce=Math.abs(V)-(n.value.minMaxRawRange?0:Z);if(n.value.minRange&&n.value.maxRange)return ce>=+n.value.minRange&&ce<=+n.value.maxRange;if(n.value.minRange)return ce>=+n.value.minRange;if(n.value.maxRange)return ce<=+n.value.maxRange}return!0},$=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,M=Y=>Array.isArray(Y)?[Y[0]?ld(Y[0]):null,Y[1]?ld(Y[1]):null]:ld(Y),k=(Y,L,I)=>Y.find(V=>+V.hours===ei(L)&&V.minutes==="*"?!0:+V.minutes===Ni(L)&&+V.hours===ei(L))&&I,y=(Y,L,I)=>{const[V,Q]=Y,[Z,ce]=L;return!k(V,Z,I)&&!k(Q,ce,I)&&I},x=(Y,L)=>{const I=Array.isArray(L)?L:[L];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?y(e.disabledTimes,I,Y):!I.some(V=>k(e.disabledTimes,V,Y)):Y},C=(Y,L)=>{const I=Array.isArray(L)?[So(L[0]),L[1]?So(L[1]):void 0]:So(L),V=!e.disabledTimes(I);return Y&&V},P=(Y,L)=>e.disabledTimes?Array.isArray(e.disabledTimes)?x(L,Y):C(L,Y):L,E=Y=>{let L=!0;if(!Y||$())return!0;const I=!s.value.minDate&&!s.value.maxDate?M(Y):Y;return(e.maxTime||s.value.maxDate)&&(L=Rm(e.maxTime,s.value.maxDate,"max",Gt(I),L)),(e.minTime||s.value.minDate)&&(L=Rm(e.minTime,s.value.minDate,"min",Gt(I),L)),P(Y,L)},B=Y=>{if(!e.monthPicker)return!0;let L=!0;const I=xe(rs(Y));if(s.value.minDate&&s.value.maxDate){const V=xe(rs(s.value.minDate)),Q=xe(rs(s.value.maxDate));return Dt(I,V)&&At(I,Q)||nt(I,V)||nt(I,Q)}if(s.value.minDate){const V=xe(rs(s.value.minDate));L=Dt(I,V)||nt(I,V)}if(s.value.maxDate){const V=xe(rs(s.value.maxDate));L=At(I,V)||nt(I,V)}return L},G=_e(()=>Y=>!e.enableTimePicker||e.ignoreTimeValidation?!0:E(Y)),re=_e(()=>Y=>e.monthPicker?Array.isArray(Y)&&(n.value.enabled||i.value.enabled)?!Y.filter(L=>!B(L)).length:B(Y):!0);return{isDisabled:m,validateDate:l,validateMonthYearInRange:f,isDateRangeAllowed:_,checkMinMaxRange:A,isValidTime:E,isTimeValid:G,isMonthValid:re}},_u=()=>{const e=_e(()=>(s,i)=>s==null?void 0:s.includes(i)),t=_e(()=>(s,i)=>s.count?s.solo?!0:i===0:!0),n=_e(()=>(s,i)=>s.count?s.solo?!0:i===s.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:n}},oL=(e,t,n)=>{const s=be(0),i=Ds({[ko.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[ko.calendar]:!1,[ko.header]:!1}),o=_e(()=>e.monthPicker||e.timePicker),r=d=>{var f;if((f=e.flow)!=null&&f.length){if(!d&&o.value)return u();i[d]=!0,Object.keys(i).filter(p=>!i[p]).length||u()}},a=()=>{var d,f;(d=e.flow)!=null&&d.length&&s.value!==-1&&(s.value+=1,t("flow-step",s.value),u()),((f=e.flow)==null?void 0:f.length)===s.value&&Zt().then(()=>l())},l=()=>{s.value=-1},c=(d,f,...p)=>{var m,_;e.flow[s.value]===d&&n.value&&((_=(m=n.value)[f])==null||_.call(m,...p))},u=(d=0)=>{d&&(s.value+=d),c(cn.month,"toggleMonthPicker",!0),c(cn.year,"toggleYearPicker",!0),c(cn.calendar,"toggleTimePicker",!1,!0),c(cn.time,"toggleTimePicker",!0,!0);const f=e.flow[s.value];(f===cn.hours||f===cn.minutes||f===cn.seconds)&&c(f,"toggleTimePicker",!0,!0,f)};return{childMount:r,updateFlowStep:a,resetFlow:l,handleFlow:u,flowStep:s}},rL={key:1,class:"dp__input_wrap"},aL=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-disabled","aria-invalid"],lL={key:2,class:"dp--clear-btn"},cL=["aria-label"],uL=Nt({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...pu},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(e,{expose:t,emit:n}){const s=n,i=e,{defaultedTextInput:o,defaultedAriaLabels:r,defaultedInline:a,defaultedConfig:l,defaultedRange:c,defaultedMultiDates:u,defaultedUI:d,getDefaultPattern:f,getDefaultStartTime:p}=xt(i),{checkMinMaxRange:m}=Yi(i),_=be(),b=be(null),w=be(!1),A=be(!1),$=be(!1),M=be(null),k=_e(()=>({dp__pointer:!i.disabled&&!i.readonly&&!o.value.enabled,dp__disabled:i.disabled,dp__input_readonly:!o.value.enabled,dp__input:!0,dp__input_icon_pad:!i.hideInputIcon,dp__input_valid:typeof i.state=="boolean"?i.state:!1,dp__input_invalid:typeof i.state=="boolean"?!i.state:!1,dp__input_focus:w.value||i.isMenuOpen,dp__input_reg:!o.value.enabled,...d.value.input??{}})),y=()=>{s("set-input-date",null),i.clearable&&i.autoApply&&(s("set-empty-date"),_.value=null)},x=U=>{const X=p();return kI(U,o.value.format??f(),X??r0({},i.enableSeconds),i.inputValue,$.value,i.formatLocale)},C=U=>{const{rangeSeparator:X}=o.value,[R,ee]=U.split(`${X}`);if(R){const oe=x(R.trim()),T=ee?x(ee.trim()):null;if(Ar(oe,T))return;const se=oe&&T?[oe,T]:[oe];m(T,se,0)&&(_.value=oe?se:null)}},P=()=>{$.value=!0},E=U=>{if(c.value.enabled)C(U);else if(u.value.enabled){const X=U.split(";");_.value=X.map(R=>x(R.trim())).filter(R=>R)}else _.value=x(U)},B=U=>{var X;const R=typeof U=="string"?U:(X=U.target)==null?void 0:X.value;R!==""?(o.value.openMenu&&!i.isMenuOpen&&s("open"),E(R),s("set-input-date",_.value)):y(),$.value=!1,s("update:input-value",R),s("text-input",U,_.value)},G=U=>{o.value.enabled?(E(U.target.value),o.value.enterSubmit&&ah(_.value)&&i.inputValue!==""?(s("set-input-date",_.value,!0),_.value=null):o.value.enterSubmit&&i.inputValue===""&&(_.value=null,s("clear"))):L(U)},re=(U,X)=>{var R;if(M.value&&X&&!A.value)return U.preventDefault(),A.value=!0,(R=M.value)==null?void 0:R.focus();o.value.enabled&&o.value.tabSubmit&&E(U.target.value),o.value.tabSubmit&&ah(_.value)&&i.inputValue!==""?(s("set-input-date",_.value,!0,!0),_.value=null):o.value.tabSubmit&&i.inputValue===""&&(_.value=null,s("clear",!0))},Y=()=>{w.value=!0,s("focus"),Zt().then(()=>{var U;o.value.enabled&&o.value.selectOnFocus&&((U=b.value)==null||U.select())})},L=U=>{if(U.preventDefault(),Mi(U,l.value,!0),o.value.enabled&&o.value.openMenu&&!a.value.input){if(o.value.openMenu==="open"&&!i.isMenuOpen)return s("open");if(o.value.openMenu==="toggle")return s("toggle")}else o.value.enabled||s("toggle")},I=()=>{s("real-blur"),w.value=!1,(!i.isMenuOpen||a.value.enabled&&a.value.input)&&s("blur"),i.autoApply&&o.value.enabled&&_.value&&!i.isMenuOpen&&(s("set-input-date",_.value),s("select-date"),_.value=null)},V=U=>{Mi(U,l.value,!0),s("clear")},Q=(U,X)=>{if(U.key==="Tab"&&re(U,X),U.key==="Enter"&&G(U),!o.value.enabled){if(U.code==="Tab")return;U.preventDefault()}},Z=()=>{var U;(U=b.value)==null||U.focus({preventScroll:!0})},ce=U=>{_.value=U},we=U=>{U.key===_t.tab&&(A.value=!1,re(U))};return t({focusInput:Z,setParsedDate:ce}),(U,X)=>{var R,ee;return O(),F("div",{onClick:L},[U.$slots.trigger&&!U.$slots["dp-input"]&&!q(a).enabled?Ie(U.$slots,"trigger",{key:0}):ae("",!0),!U.$slots.trigger&&(!q(a).enabled||q(a).input)?(O(),F("div",rL,[U.$slots["dp-input"]&&!U.$slots.trigger&&(!q(a).enabled||q(a).enabled&&q(a).input)?Ie(U.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:B,onEnter:G,onTab:re,onClear:V,onBlur:I,onKeypress:Q,onPaste:P,onFocus:Y,openMenu:()=>U.$emit("open"),closeMenu:()=>U.$emit("close"),toggleMenu:()=>U.$emit("toggle")}):ae("",!0),U.$slots["dp-input"]?ae("",!0):(O(),F("input",{key:1,id:U.uid?`dp-input-${U.uid}`:void 0,ref_key:"inputRef",ref:b,"data-test":"dp-input",name:U.name,class:Ee(k.value),inputmode:q(o).enabled?"text":"none",placeholder:U.placeholder,disabled:U.disabled,readonly:U.readonly,required:U.required,value:e.inputValue,autocomplete:U.autocomplete,"aria-disabled":U.disabled||void 0,"aria-invalid":U.state===!1?!0:void 0,onInput:B,onBlur:I,onFocus:Y,onKeypress:Q,onKeydown:X[0]||(X[0]=oe=>Q(oe,!0)),onPaste:P},null,42,aL)),h("div",{onClick:X[3]||(X[3]=oe=>s("toggle"))},[U.$slots["input-icon"]&&!U.hideInputIcon?(O(),F("span",{key:0,class:"dp__input_icon",onClick:X[1]||(X[1]=oe=>s("toggle"))},[Ie(U.$slots,"input-icon")])):ae("",!0),!U.$slots["input-icon"]&&!U.hideInputIcon&&!U.$slots["dp-input"]?(O(),Ne(q(Vr),{key:1,"aria-label":(R=q(r))==null?void 0:R.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:X[2]||(X[2]=oe=>s("toggle"))},null,8,["aria-label"])):ae("",!0)]),U.$slots["clear-icon"]&&e.inputValue&&U.clearable&&!U.disabled&&!U.readonly?(O(),F("span",lL,[Ie(U.$slots,"clear-icon",{clear:V})])):ae("",!0),U.clearable&&!U.$slots["clear-icon"]&&e.inputValue&&!U.disabled&&!U.readonly?(O(),F("button",{key:3,ref_key:"clearBtnRef",ref:M,"aria-label":(ee=q(r))==null?void 0:ee.clearInput,class:"dp--clear-btn",type:"button",onBlur:X[4]||(X[4]=oe=>A.value=!1),onKeydown:X[5]||(X[5]=oe=>q(vn)(oe,()=>V(oe),!0,we)),onClick:X[6]||(X[6]=Ha(oe=>V(oe),["prevent"]))},[$e(q(Qy),{class:"dp__input_icons","data-test":"clear-icon"})],40,cL)):ae("",!0)])):ae("",!0)])}}}),dL=typeof window<"u"?window:void 0,pd=()=>{},hL=e=>Qc()?(Jh(e),!0):!1,fL=(e,t,n,s)=>{if(!e)return pd;let i=pd;const o=Vt(()=>q(e),a=>{i(),a&&(a.addEventListener(t,n,s),i=()=>{a.removeEventListener(t,n,s),i=pd})},{immediate:!0,flush:"post"}),r=()=>{o(),i()};return hL(r),r},pL=(e,t,n,s={})=>{const{window:i=dL,event:o="pointerdown"}=s;return i?fL(i,o,r=>{const a=jt(e),l=jt(t);!a||!l||a===r.target||r.composedPath().includes(a)||r.composedPath().includes(l)||n(r)},{passive:!0}):void 0},gL=Nt({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...pu},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(e,{expose:t,emit:n}){const s=n,i=e,o=Ro(),r=be(!1),a=Ra(i,"modelValue"),l=Ra(i,"timezone"),c=be(null),u=be(null),d=be(null),f=be(!1),p=be(null),m=be(!1),_=be(!1),b=be(!1),w=be(!1),{setMenuFocused:A,setShiftKey:$}=d0(),{clearArrowNav:M}=zi(),{validateDate:k,isValidTime:y}=Yi(i),{defaultedTransitions:x,defaultedTextInput:C,defaultedInline:P,defaultedConfig:E,defaultedRange:B,defaultedMultiDates:G}=xt(i),{menuTransition:re,showTransition:Y}=rl(x);Kt(()=>{ee(i.modelValue),Zt().then(()=>{if(!P.value.enabled){const ue=we(p.value);ue==null||ue.addEventListener("scroll",H),window==null||window.addEventListener("resize",W)}}),P.value.enabled&&(r.value=!0),window==null||window.addEventListener("keyup",ie),window==null||window.addEventListener("keydown",j)}),Fr(()=>{if(!P.value.enabled){const ue=we(p.value);ue==null||ue.removeEventListener("scroll",H),window==null||window.removeEventListener("resize",W)}window==null||window.removeEventListener("keyup",ie),window==null||window.removeEventListener("keydown",j)});const L=Rn(o,"all",i.presetDates),I=Rn(o,"input");Vt([a,l],()=>{ee(a.value)},{deep:!0});const{openOnTop:V,menuStyle:Q,xCorrect:Z,setMenuPosition:ce,getScrollableParent:we,shadowRender:U}=tL({menuRef:c,menuRefInner:u,inputRef:d,pickerWrapperRef:p,inline:P,emit:s,props:i,slots:o}),{inputValue:X,internalModelValue:R,parseExternalModelValue:ee,emitModelValue:oe,formatInputValue:T,checkBeforeEmit:se}=KI(s,i,f),de=_e(()=>({dp__main:!0,dp__theme_dark:i.dark,dp__theme_light:!i.dark,dp__flex_display:P.value.enabled,"dp--flex-display-collapsed":b.value,dp__flex_display_with_input:P.value.input})),ke=_e(()=>i.dark?"dp__theme_dark":"dp__theme_light"),N=_e(()=>i.teleport?{to:typeof i.teleport=="boolean"?"body":i.teleport,disabled:!i.teleport||P.value.enabled}:{}),fe=_e(()=>({class:"dp__outer_menu_wrap"})),v=_e(()=>P.value.enabled&&(i.timePicker||i.monthPicker||i.yearPicker||i.quarterPicker)),D=()=>{var ue,Ae;return(Ae=(ue=d.value)==null?void 0:ue.$el)==null?void 0:Ae.getBoundingClientRect()},H=()=>{r.value&&(E.value.closeOnScroll?Ve():ce())},W=()=>{var ue;r.value&&ce();const Ae=(ue=u.value)==null?void 0:ue.$el.getBoundingClientRect().width;b.value=document.body.offsetWidth<=Ae},ie=ue=>{ue.key==="Tab"&&!P.value.enabled&&!i.teleport&&E.value.tabOutClosesMenu&&(p.value.contains(document.activeElement)||Ve()),_.value=ue.shiftKey},j=ue=>{_.value=ue.shiftKey},te=()=>{!i.disabled&&!i.readonly&&(U(Bm,i),ce(!1),r.value=!0,r.value&&s("open"),r.value||He(),ee(i.modelValue))},J=()=>{var ue;X.value="",He(),(ue=d.value)==null||ue.setParsedDate(null),s("update:model-value",null),s("update:model-timezone-value",null),s("cleared"),E.value.closeOnClearValue&&Ve()},he=()=>{const ue=R.value;return!ue||!Array.isArray(ue)&&k(ue)?!0:Array.isArray(ue)?G.value.enabled||ue.length===2&&k(ue[0])&&k(ue[1])?!0:B.value.partialRange&&!i.timePicker?k(ue[0]):!1:!1},me=()=>{se()&&he()?(oe(),Ve()):s("invalid-select",R.value)},pe=ue=>{Le(),oe(),E.value.closeOnAutoApply&&!ue&&Ve()},Le=()=>{d.value&&C.value.enabled&&d.value.setParsedDate(R.value)},Oe=(ue=!1)=>{i.autoApply&&y(R.value)&&he()&&(B.value.enabled&&Array.isArray(R.value)?(B.value.partialRange||R.value.length===2)&&pe(ue):pe(ue))},He=()=>{C.value.enabled||(R.value=null)},Ve=()=>{P.value.enabled||(r.value&&(r.value=!1,Z.value=!1,A(!1),$(!1),M(),s("closed"),X.value&&ee(a.value)),He(),s("blur"))},tt=(ue,Ae,De=!1)=>{if(!ue){R.value=null;return}const sn=Array.isArray(ue)?!ue.some(Rs=>!k(Rs)):k(ue),xn=y(ue);sn&&xn&&(w.value=!0,R.value=ue,Ae&&(m.value=De,me(),s("text-submit")),Zt().then(()=>{w.value=!1}))},Je=()=>{i.autoApply&&y(R.value)&&oe(),Le()},gt=()=>r.value?Ve():te(),rn=ue=>{R.value=ue},jn=()=>{C.value.enabled&&(f.value=!0,T()),s("focus")},ri=()=>{if(C.value.enabled&&(f.value=!1,ee(i.modelValue),m.value)){const ue=yI(p.value,_.value);ue==null||ue.focus()}s("blur")},Zn=ue=>{u.value&&u.value.updateMonthYear(0,{month:Dm(ue.month),year:Dm(ue.year)})},Is=ue=>{ee(ue??i.modelValue)},Ht=(ue,Ae)=>{var De;(De=u.value)==null||De.switchView(ue,Ae)},ne=ue=>E.value.onClickOutside?E.value.onClickOutside(ue):Ve(),Se=(ue=0)=>{var Ae;(Ae=u.value)==null||Ae.handleFlow(ue)};return pL(c,d,()=>ne(he)),t({closeMenu:Ve,selectDate:me,clearValue:J,openMenu:te,onScroll:H,formatInputValue:T,updateInternalModelValue:rn,setMonthYear:Zn,parseModel:Is,switchView:Ht,toggleMenu:gt,handleFlow:Se,dpWrapMenuRef:c}),(ue,Ae)=>(O(),F("div",{ref_key:"pickerWrapperRef",ref:p,class:Ee(de.value),"data-datepicker-instance":""},[$e(uL,Yt({ref_key:"inputRef",ref:d,"input-value":q(X),"onUpdate:inputValue":Ae[0]||(Ae[0]=De=>Et(X)?X.value=De:null),"is-menu-open":r.value},ue.$props,{onClear:J,onOpen:te,onSetInputDate:tt,onSetEmptyDate:q(oe),onSelectDate:me,onToggle:gt,onClose:Ve,onFocus:jn,onBlur:ri,onRealBlur:Ae[1]||(Ae[1]=De=>f.value=!1),onTextInput:Ae[2]||(Ae[2]=De=>ue.$emit("text-input",De))}),hn({_:2},[Ke(q(I),(De,sn)=>({name:De,fn:Te(xn=>[Ie(ue.$slots,De,Xt(_n(xn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(O(),Ne(Io(ue.teleport?G$:"div"),Xt(_n(N.value)),{default:Te(()=>[$e(Bt,{name:q(re)(q(V)),css:q(Y)&&!q(P).enabled},{default:Te(()=>[r.value?(O(),F("div",Yt({key:0,ref_key:"dpWrapMenuRef",ref:c},fe.value,{class:{"dp--menu-wrapper":!q(P).enabled},style:q(P).enabled?void 0:q(Q)}),[$e(Bm,Yt({ref_key:"dpMenuRef",ref:u},ue.$props,{"internal-model-value":q(R),"onUpdate:internalModelValue":Ae[3]||(Ae[3]=De=>Et(R)?R.value=De:null),class:{[ke.value]:!0,"dp--menu-wrapper":ue.teleport},"open-on-top":q(V),"no-overlay-focus":v.value,collapse:b.value,"get-input-rect":D,"is-text-input-date":w.value,onClosePicker:Ve,onSelectDate:me,onAutoApply:Oe,onTimeUpdate:Je,onFlowStep:Ae[4]||(Ae[4]=De=>ue.$emit("flow-step",De)),onUpdateMonthYear:Ae[5]||(Ae[5]=De=>ue.$emit("update-month-year",De)),onInvalidSelect:Ae[6]||(Ae[6]=De=>ue.$emit("invalid-select",q(R))),onAutoApplyInvalid:Ae[7]||(Ae[7]=De=>ue.$emit("invalid-select",De)),onInvalidFixedRange:Ae[8]||(Ae[8]=De=>ue.$emit("invalid-fixed-range",De)),onRecalculatePosition:q(ce),onTooltipOpen:Ae[9]||(Ae[9]=De=>ue.$emit("tooltip-open",De)),onTooltipClose:Ae[10]||(Ae[10]=De=>ue.$emit("tooltip-close",De)),onTimePickerOpen:Ae[11]||(Ae[11]=De=>ue.$emit("time-picker-open",De)),onTimePickerClose:Ae[12]||(Ae[12]=De=>ue.$emit("time-picker-close",De)),onAmPmChange:Ae[13]||(Ae[13]=De=>ue.$emit("am-pm-change",De)),onRangeStart:Ae[14]||(Ae[14]=De=>ue.$emit("range-start",De)),onRangeEnd:Ae[15]||(Ae[15]=De=>ue.$emit("range-end",De)),onDateUpdate:Ae[16]||(Ae[16]=De=>ue.$emit("date-update",De)),onInvalidDate:Ae[17]||(Ae[17]=De=>ue.$emit("invalid-date",De)),onOverlayToggle:Ae[18]||(Ae[18]=De=>ue.$emit("overlay-toggle",De))}),hn({_:2},[Ke(q(L),(De,sn)=>({name:De,fn:Te(xn=>[Ie(ue.$slots,De,Xt(_n({...xn})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):ae("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),ll=(()=>{const e=gL;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),mL=Object.freeze(Object.defineProperty({__proto__:null,default:ll},Symbol.toStringTag,{value:"Module"}));Object.entries(mL).forEach(([e,t])=>{e!=="default"&&(ll[e]=t)});const _L={name:"newDashboardAPIKey",components:{VueDatePicker:ll},data(){return{newKeyData:{ExpiredAt:Cn().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:et()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,dt("/api/newDashboardAPIKey",this.newKeyData,e=>{e.status?(this.$emit("created",e.data),this.store.newMessage("Server","New API Key created","success"),this.$emit("close")):this.store.newMessage("Server",e.message,"danger"),this.submitting=!1})},fixDate(e){return console.log(Cn(e).format("YYYY-MM-DDTHH:mm:ss")),Cn(e).format("YYYY-MM-DDTHH:mm:ss")},parseTime(e){e?this.newKeyData.ExpiredAt=Cn(e).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},vL={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)"}},bL={class:"card m-auto rounded-3 mt-5"},yL={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},wL=h("h6",{class:"mb-0"},"Create API Key",-1),xL={class:"card-body d-flex gap-2 p-4 flex-column"},kL=h("small",{class:"text-muted"},"When should this API Key expire?",-1),SL={class:"d-flex align-items-center gap-2"},AL={class:"form-check"},$L=["disabled"],CL=h("label",{class:"form-check-label",for:"neverExpire"},[ye(" Never Expire ("),h("i",{class:"bi bi-emoji-grimace-fill"}),ye(" Don't think that's a good idea) ")],-1),EL={key:0,class:"bi bi-check-lg me-2"};function PL(e,t,n,s,i,o){const r=je("VueDatePicker");return O(),F("div",vL,[h("div",bL,[h("div",yL,[wL,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=a=>this.$emit("close"))})]),h("div",xL,[kL,h("div",SL,[$e(r,{is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.neverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),h("div",AL,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[1]||(t[1]=a=>this.newKeyData.neverExpire=a),id:"neverExpire",disabled:this.submitting},null,8,$L),[[In,this.newKeyData.neverExpire]]),CL]),h("button",{class:Ee(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:t[2]||(t[2]=a=>this.submitNewAPIKey())},[this.submitting?ae("",!0):(O(),F("i",EL)),ye(" "+ve(this.submitting?"Creating...":"Done"),1)],2)])])])}const TL=ze(_L,[["render",PL]]),ML={name:"dashboardAPIKey",props:{apiKey:Object},setup(){return{store:et()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){dt("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},e=>{e.status?(this.$emit("deleted",e.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",e.message,"danger")})}}},cl=e=>(en("data-v-0cc2f367"),e=e(),tn(),e),DL={class:"card rounded-3 shadow-sm"},OL={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},IL={class:"d-flex align-items-center gap-2"},RL=cl(()=>h("small",{class:"text-muted"},"Key",-1)),LL={style:{"word-break":"break-all"}},NL={class:"d-flex align-items-center gap-2 ms-auto"},FL=cl(()=>h("small",{class:"text-muted"},"Expire At",-1)),BL=cl(()=>h("i",{class:"bi bi-trash-fill"},null,-1)),VL=[BL],HL={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"},jL=cl(()=>h("i",{class:"bi bi-check-lg"},null,-1)),WL=[jL],zL=cl(()=>h("i",{class:"bi bi-x-lg"},null,-1)),YL=[zL];function UL(e,t,n,s,i,o){return O(),F("div",DL,[this.confirmDelete?(O(),F(Me,{key:1},[this.store.getActiveCrossServer()?ae("",!0):(O(),F("div",HL,[ye(" Are you sure to delete this API key? "),h("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:t[1]||(t[1]=r=>this.deleteAPIKey())},WL),h("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:t[2]||(t[2]=r=>this.confirmDelete=!1)},YL)]))],64)):(O(),F("div",OL,[h("div",IL,[RL,h("span",LL,ve(this.apiKey.Key),1)]),h("div",NL,[FL,ye(" "+ve(this.apiKey.ExpiredAt?this.apiKey.ExpiredAt:"Never"),1)]),this.store.getActiveCrossServer()?ae("",!0):(O(),F("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:t[0]||(t[0]=r=>this.confirmDelete=!0)},VL))]))])}const KL=ze(ML,[["render",UL],["__scopeId","data-v-0cc2f367"]]),qL={name:"dashboardAPIKeys",components:{DashboardAPIKey:KL,NewDashboardAPIKey:TL},setup(){return{store:et()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await dt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},e=>{e.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(e){e?Tt("/api/getDashboardAPIKeys",{},t=>{console.log(t),t.status?this.apiKeys=t.data:(this.apiKeys=[],this.store.newMessage("Server",t.message,"danger"))}):this.apiKeys=[]}}}},v0=e=>(en("data-v-45b66fb8"),e=e(),tn(),e),GL={class:"card mb-4 shadow rounded-3"},JL={class:"card-header d-flex"},XL={key:0,class:"form-check form-switch ms-auto"},QL={class:"form-check-label",for:"allowAPIKeysSwitch"},ZL={key:0,class:"card-body position-relative d-flex flex-column gap-2"},eN=v0(()=>h("i",{class:"bi bi-key me-2"},null,-1)),tN={key:1,class:"card",style:{height:"300px"}},nN=v0(()=>h("div",{class:"card-body d-flex text-muted"},[h("span",{class:"m-auto"}," No Dashboard API Key ")],-1)),sN=[nN],iN={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function oN(e,t,n,s,i,o){const r=je("DashboardAPIKey"),a=je("NewDashboardAPIKey");return O(),F("div",GL,[h("div",JL,[ye(" API Keys "),this.store.getActiveCrossServer()?ae("",!0):(O(),F("div",XL,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[0]||(t[0]=l=>this.value=l),onChange:t[1]||(t[1]=l=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[In,this.value]]),h("label",QL,ve(this.value?"Enabled":"Disabled"),1)]))]),this.value?(O(),F("div",ZL,[this.store.getActiveCrossServer()?ae("",!0):(O(),F("button",{key:0,class:"ms-auto btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:t[2]||(t[2]=l=>this.newDashboardAPIKey=!0)},[eN,ye(" Create ")])),this.apiKeys.length===0?(O(),F("div",tN,sN)):(O(),F("div",iN,[$e(Wi,{name:"apiKey"},{default:Te(()=>[(O(!0),F(Me,null,Ke(this.apiKeys,l=>(O(),Ne(r,{apiKey:l,key:l.Key,onDeleted:t[3]||(t[3]=c=>this.apiKeys=c)},null,8,["apiKey"]))),128))]),_:1})])),$e(Bt,{name:"zoomReversed"},{default:Te(()=>[this.newDashboardAPIKey?(O(),Ne(a,{key:0,onCreated:t[4]||(t[4]=l=>this.apiKeys=l),onClose:t[5]||(t[5]=l=>this.newDashboardAPIKey=!1)})):ae("",!0)]),_:1})])):ae("",!0)])}const rN=ze(qL,[["render",oN],["__scopeId","data-v-45b66fb8"]]),aN={name:"accountSettingsMFA",setup(){const e=et(),t=`input_${Ms()}`;return{store:e,uuid:t}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await dt("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async e=>{await dt("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},t=>{t.status&&this.$router.push("/2FASetup")})})}}},lN={class:"d-flex align-items-center"},cN=h("strong",null,"Multi-Factor Authentication",-1),uN={class:"form-check form-switch ms-3"},dN=h("i",{class:"bi bi-shield-lock-fill me-2"},null,-1);function hN(e,t,n,s,i,o){return O(),F("div",null,[h("div",lN,[cN,h("div",uN,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[0]||(t[0]=r=>this.status=r),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[In,this.status]])]),this.status?(O(),F("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:t[1]||(t[1]=r=>this.resetMFA())},[dN,ye(" "+ve(this.store.Configuration.Account.totp_verified?"Reset":"Setup")+" MFA ",1)])):ae("",!0)])])}const fN=ze(aN,[["render",hN]]),pN={name:"settings",methods:{ipV46RegexCheck:WM},components:{AccountSettingsMFA:fN,DashboardAPIKeys:rN,DashboardSettingsInputIPAddressAndPort:o2,DashboardTheme:jD,DashboardSettingsInputWireguardConfigurationPath:ID,AccountSettingsInputPassword:SD,AccountSettingsInputUsername:ZM,PeersDefaultSettingsInput:jM},setup(){return{dashboardConfigurationStore:et()}},watch:{}},gN={class:"mt-5"},mN={class:"container"},_N=h("h3",{class:"mb-3 text-body"},"Settings",-1),vN={class:"card mb-4 shadow rounded-3"},bN=h("p",{class:"card-header"},"Peers Default Settings",-1),yN={class:"card-body"},wN={class:"card mb-4 shadow rounded-3"},xN=h("p",{class:"card-header"},"WireGuard Configurations Settings",-1),kN={class:"card-body"},SN={class:"card mb-4 shadow rounded-3"},AN=h("p",{class:"card-header"},"Account Settings",-1),$N={class:"card-body d-flex gap-4 flex-column"},CN=h("hr",{class:"m-0"},null,-1),EN={key:0,class:"m-0"};function PN(e,t,n,s,i,o){const r=je("DashboardTheme"),a=je("PeersDefaultSettingsInput"),l=je("DashboardSettingsInputWireguardConfigurationPath"),c=je("AccountSettingsInputUsername"),u=je("AccountSettingsInputPassword"),d=je("AccountSettingsMFA"),f=je("DashboardAPIKeys");return O(),F("div",gN,[h("div",mN,[_N,$e(r),h("div",vN,[bN,h("div",yN,[$e(a,{targetData:"peer_global_dns",title:"DNS"}),$e(a,{targetData:"peer_endpoint_allowed_ip",title:"Peer Endpoint Allowed IPs"}),$e(a,{targetData:"peer_mtu",title:"MTU (Max Transmission Unit)"}),$e(a,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),$e(a,{targetData:"remote_endpoint",title:"Peer Remote Endpoint",warning:!0,warningText:"This will be changed globally, and will be apply to all peer's QR code and configuration file."})])]),h("div",wN,[xN,h("div",kN,[$e(l,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove <code>/</code> at the end of your path. e.g <code>/etc/wireguard</code>"})])]),h("div",SN,[AN,h("div",$N,[$e(c,{targetData:"username",title:"Username"}),CN,$e(u,{targetData:"password"}),this.dashboardConfigurationStore.getActiveCrossServer()?ae("",!0):(O(),F("hr",EN)),this.dashboardConfigurationStore.getActiveCrossServer()?ae("",!0):(O(),Ne(d,{key:1}))])]),$e(f)])])}const TN=ze(pN,[["render",PN]]),MN={name:"setup",components:{},setup(){return{store:et()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!0},loading:!1,errorMessage:"",done:!1}},computed:{goodToSubmit(){return this.setup.username&&this.setup.newPassword.length>=8&&this.setup.repeatNewPassword.length>=8&&this.setup.newPassword===this.setup.repeatNewPassword}},methods:{submit(){this.loading=!0,dt("/api/Welcome_Finish",this.setup,e=>{e.status?(this.done=!0,this.$router.push("/2FASetup")):(document.querySelectorAll("#createAccount input").forEach(t=>t.classList.add("is-invalid")),this.errorMessage=e.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},DN=["data-bs-theme"],ON={class:"m-auto text-body",style:{width:"500px"}},IN=h("span",{class:"dashboardLogo display-4"},"Nice to meet you!",-1),RN=h("p",{class:"mb-5"},"Please fill in the following fields to finish setup 😊",-1),LN=h("h3",null,"Create an account",-1),NN={key:0,class:"alert alert-danger"},FN={class:"d-flex flex-column gap-3"},BN={id:"createAccount",class:"d-flex flex-column gap-2"},VN={class:"form-group text-body"},HN=h("label",{for:"username",class:"mb-1 text-muted"},[h("small",null,"Pick an username you like")],-1),jN={class:"form-group text-body"},WN=h("label",{for:"password",class:"mb-1 text-muted"},[h("small",null,"Create a password (at least 8 characters)")],-1),zN={class:"form-group text-body"},YN=h("label",{for:"confirmPassword",class:"mb-1 text-muted"},[h("small",null,"Confirm password")],-1),UN=["disabled"],KN={key:0,class:"d-flex align-items-center w-100"},qN=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1),GN={key:1,class:"d-flex align-items-center w-100"},JN=h("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1);function XN(e,t,n,s,i,o){return O(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[h("div",ON,[IN,RN,h("div",null,[LN,this.errorMessage?(O(),F("div",NN,ve(this.errorMessage),1)):ae("",!0),h("div",FN,[h("div",BN,[h("div",VN,[HN,Re(h("input",{type:"text","onUpdate:modelValue":t[0]||(t[0]=r=>this.setup.username=r),class:"form-control",id:"username",name:"username",placeholder:"Maybe something like 'wiredragon'?",required:""},null,512),[[We,this.setup.username]])]),h("div",jN,[WN,Re(h("input",{type:"password","onUpdate:modelValue":t[1]||(t[1]=r=>this.setup.newPassword=r),class:"form-control",id:"password",name:"password",placeholder:"Make sure is strong enough",required:""},null,512),[[We,this.setup.newPassword]])]),h("div",zN,[YN,Re(h("input",{type:"password","onUpdate:modelValue":t[2]||(t[2]=r=>this.setup.repeatNewPassword=r),class:"form-control",id:"confirmPassword",name:"confirmPassword",placeholder:"and you can remember it :)",required:""},null,512),[[We,this.setup.repeatNewPassword]])])]),h("button",{class:"btn btn-dark btn-lg mb-5 d-flex btn-brand shadow align-items-center",ref:"signInBtn",disabled:!this.goodToSubmit||this.loading||this.done,onClick:t[3]||(t[3]=r=>this.submit())},[!this.loading&&!this.done?(O(),F("span",KN,[ye(" Next"),qN])):(O(),F("span",GN,[ye(" Saving..."),JN]))],8,UN)])])])],8,DN)}const QN=ze(MN,[["render",XN]]);function jf(e){return e.includes(":")?6:e.includes(".")?4:0}function ZN(e){const t=jf(e);if(!t)throw new Error(`Invalid IP address: ${e}`);let n=0n,s=0n;const i=Object.create(null);if(t===4)for(const o of e.split(".").map(BigInt).reverse())n+=o*2n**s,s+=8n;else{if(e.includes(".")&&(i.ipv4mapped=!0,e=e.split(":").map(a=>{if(a.includes(".")){const[l,c,u,d]=a.split(".").map(f=>Number(f).toString(16).padStart(2,"0"));return`${l}${c}:${u}${d}`}else return a}).join(":")),e.includes("%")){let a;[,e,a]=/(.+)%(.+)/.exec(e),i.scopeid=a}const o=e.split(":"),r=o.indexOf("");if(r!==-1)for(;o.length<8;)o.splice(r,0,"");for(const a of o.map(l=>BigInt(parseInt(l||0,16))).reverse())n+=a*2n**s,s+=16n}return i.number=n,i.version=t,i}const Vm={4:32,6:128},e3=e=>e.includes("/")?jf(e):0;function t3(e){const t=e3(e),n=Object.create(null);if(n.single=!1,t)n.cidr=e,n.version=t;else{const d=jf(e);if(d)n.cidr=`${e}/${Vm[d]}`,n.version=d,n.single=!0;else throw new Error(`Network is not a CIDR or IP: ${e}`)}const[s,i]=n.cidr.split("/");n.prefix=i;const{number:o,version:r}=ZN(s),a=Vm[r],l=o.toString(2).padStart(a,"0"),c=Number(a-i),u=l.substring(0,a-c);return n.start=BigInt(`0b${u}${"0".repeat(c)}`),n.end=BigInt(`0b${u}${"1".repeat(c)}`),n}/*! SPDX-License-Identifier: GPL-2.0
|
|
*
|
|
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
|
*/(function(){function e(k){var y=new Float64Array(16);if(k)for(var x=0;x<k.length;++x)y[x]=k[x];return y}function t(k,y){for(var x,C=e(),P=e(),E=0;E<16;++E)P[E]=y[E];n(P),n(P),n(P);for(var B=0;B<2;++B){C[0]=P[0]-65517;for(var E=1;E<15;++E)C[E]=P[E]-65535-(C[E-1]>>16&1),C[E-1]&=65535;C[15]=P[15]-32767-(C[14]>>16&1),x=C[15]>>16&1,C[14]&=65535,s(P,C,1-x)}for(var E=0;E<16;++E)k[2*E]=P[E]&255,k[2*E+1]=P[E]>>8}function n(k){for(var y=0;y<16;++y)k[(y+1)%16]+=(y<15?1:38)*Math.floor(k[y]/65536),k[y]&=65535}function s(k,y,x){for(var C,P=~(x-1),E=0;E<16;++E)C=P&(k[E]^y[E]),k[E]^=C,y[E]^=C}function i(k,y,x){for(var C=0;C<16;++C)k[C]=y[C]+x[C]|0}function o(k,y,x){for(var C=0;C<16;++C)k[C]=y[C]-x[C]|0}function r(k,y,x){for(var C=new Float64Array(31),P=0;P<16;++P)for(var E=0;E<16;++E)C[P+E]+=y[P]*x[E];for(var P=0;P<15;++P)C[P]+=38*C[P+16];for(var P=0;P<16;++P)k[P]=C[P];n(k),n(k)}function a(k,y){for(var x=e(),C=0;C<16;++C)x[C]=y[C];for(var C=253;C>=0;--C)r(x,x,x),C!==2&&C!==4&&r(x,x,y);for(var C=0;C<16;++C)k[C]=x[C]}function l(k){k[31]=k[31]&127|64,k[0]&=248}function c(k){for(var y,x=new Uint8Array(32),C=e([1]),P=e([9]),E=e(),B=e([1]),G=e(),re=e(),Y=e([56129,1]),L=e([9]),I=0;I<32;++I)x[I]=k[I];l(x);for(var I=254;I>=0;--I)y=x[I>>>3]>>>(I&7)&1,s(C,P,y),s(E,B,y),i(G,C,E),o(C,C,E),i(E,P,B),o(P,P,B),r(B,G,G),r(re,C,C),r(C,E,C),r(E,P,G),i(G,C,E),o(C,C,E),r(P,C,C),o(E,B,re),r(C,E,Y),i(C,C,B),r(E,E,C),r(C,B,re),r(B,P,L),r(P,G,G),s(C,P,y),s(E,B,y);return a(E,E),r(C,C,E),t(x,C),x}function u(){var k=new Uint8Array(32);return window.crypto.getRandomValues(k),k}function d(){var k=u();return l(k),k}function f(k,y){for(var x=Uint8Array.from([y[0]>>2&63,(y[0]<<4|y[1]>>4)&63,(y[1]<<2|y[2]>>6)&63,y[2]&63]),C=0;C<4;++C)k[C]=x[C]+65+(25-x[C]>>8&6)-(51-x[C]>>8&75)-(61-x[C]>>8&15)+(62-x[C]>>8&3)}function p(k){var y,x=new Uint8Array(44);for(y=0;y<32/3;++y)f(x.subarray(y*4),k.subarray(y*3));return f(x.subarray(y*4),Uint8Array.from([k[y*3+0],k[y*3+1],0])),x[43]=61,String.fromCharCode.apply(null,x)}function m(k){let y=window.atob(k),x=y.length,C=new Uint8Array(x);for(let E=0;E<x;E++)C[E]=y.charCodeAt(E);return new Uint8Array(C.buffer)}function _(k,y){k.push(y&255,y>>>8&255,y>>>16&255,y>>>24&255)}function b(k,y){k.push(y&255,y>>>8&255)}function w(k,y){for(var x=0;x<y.length;++x)k.push(y[x]&255)}function A(k){for(var y=unescape(encodeURIComponent(k)),x=new Uint8Array(y.length),C=0;C<y.length;++C)x[C]=y.charCodeAt(C);return x}function $(k){if(!$.table){$.table=[];for(var y=0,x=0;x<256;y=++x){for(var C=0;C<8;++C)y=y&1?3988292384^y>>>1:y>>>1;$.table[x]=y}}for(var P=-1,E=0;E<k.length;++E)P=P>>>8^$.table[(P^k[E])&255];return(P^-1)>>>0}function M(k){for(var y=[],x=[],C=0,P=0;P<k.length;++P){var E=A(k[P].fileName),B=A(k[P].file),G=$(B);_(y,67324752),b(y,20),b(y,0),b(y,0),b(y,0),b(y,0),_(y,G),_(y,B.length),_(y,B.length),b(y,E.length),b(y,0),w(y,E),w(y,B),_(x,33639248),b(x,0),b(x,20),b(x,0),b(x,0),b(x,0),b(x,0),_(x,G),_(x,B.length),_(x,B.length),b(x,E.length),b(x,0),b(x,0),b(x,0),b(x,0),_(x,32),_(x,C),w(x,E),C+=30+B.length+E.length}return w(y,x),_(y,101010256),b(y,0),b(y,0),b(y,k.length),b(y,k.length),_(y,x.length),_(y,C),b(y,0),Uint8Array.from(y)}window.wireguard={generateKeypair:function(){var k=d(),y=c(k),x=u();return{publicKey:p(y),privateKey:p(k),presharedKey:p(x)}},generatePublicKey:function(k){return k=m(k),p(c(k))},generateZipFiles:function(k,y){var x=k.data,C=M(x),P=new Blob([C],{type:"application/zip"}),E=document.createElement("a");E.download=y,E.href=URL.createObjectURL(P),E.style.display="none",document.body.appendChild(E),E.click(),document.body.removeChild(E)}}})();const n3={name:"newConfiguration",setup(){return{store:Bn()}},data(){return{newConfiguration:{ConfigurationName:"",Address:"",ListenPort:"",PrivateKey:"",PublicKey:"",PresharedKey:"",PreUp:"",PreDown:"",PostUp:"",PostDown:""},numberOfAvailableIPs:"0",error:!1,errorMessage:"",success:!1,loading:!1}},created(){this.wireguardGenerateKeypair()},methods:{wireguardGenerateKeypair(){const e=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=e.privateKey,this.newConfiguration.PublicKey=e.publicKey,this.newConfiguration.PresharedKey=e.presharedKey},async saveNewConfiguration(){this.goodToSubmit&&(this.loading=!0,await dt("/api/addWireguardConfiguration",this.newConfiguration,async e=>{e.status?(this.success=!0,await this.store.getConfigurations(),setTimeout(()=>{this.$router.push("/")},1e3)):(this.error=!0,this.errorMessage=e.message,document.querySelector(`#${e.data}`).classList.remove("is-valid"),document.querySelector(`#${e.data}`).classList.add("is-invalid"),this.loading=!1)}))}},computed:{goodToSubmit(){let e=["ConfigurationName","Address","ListenPort","PrivateKey"],t=[...document.querySelectorAll("input[required]")];return e.find(n=>this.newConfiguration[n].length===0)===void 0&&t.find(n=>n.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(e){let t=document.querySelector("#Address");t.classList.remove("is-invalid","is-valid");try{if(e.trim().split("/").filter(i=>i.length>0).length!==2)throw Error();let n=t3(e),s=n.end-n.start;this.numberOfAvailableIPs=s.toLocaleString(),t.classList.add("is-valid")}catch{this.numberOfAvailableIPs="0",t.classList.add("is-invalid")}},"newConfiguration.ListenPort"(e){let t=document.querySelector("#ListenPort");t.classList.remove("is-invalid","is-valid"),e<0||e>65353||!Number.isInteger(e)?t.classList.add("is-invalid"):t.classList.add("is-valid")},"newConfiguration.ConfigurationName"(e){let t=document.querySelector("#ConfigurationName");t.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(e)||e.length===0||this.store.Configurations.find(n=>n.Name===e)?t.classList.add("is-invalid"):t.classList.add("is-valid")},"newConfiguration.PrivateKey"(e){let t=document.querySelector("#PrivateKey");t.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(e),t.classList.add("is-valid")}catch{t.classList.add("is-invalid")}}}},s3={class:"mt-5"},i3={class:"container mb-4"},o3={class:"mb-4 d-flex align-items-center gap-4"},r3=h("h3",{class:"mb-0 text-body"},[h("i",{class:"bi bi-chevron-left me-4"}),ye(" New Configuration ")],-1),a3={class:"card rounded-3 shadow"},l3=h("div",{class:"card-header"},"Configuration Name",-1),c3={class:"card-body"},u3=["disabled"],d3={class:"invalid-feedback"},h3={key:0},f3={key:1},p3=h("ul",{class:"mb-0"},[h("li",null,"Configuration name already exist."),h("li",null,'Configuration name can only contain 15 lower/uppercase alphabet, numbers, "_"(underscore), "="(equal), "+"(plus), "."(period/dot), "-"(dash/hyphen)')],-1),g3={class:"card rounded-3 shadow"},m3=h("div",{class:"card-header"},"Private Key / Public Key / Pre-Shared Key",-1),_3={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},v3={class:"mb-2"},b3=h("label",{class:"text-muted fw-bold mb-1"},[h("small",null,"PRIVATE KEY")],-1),y3={class:"input-group"},w3=["disabled"],x3=h("i",{class:"bi bi-arrow-repeat"},null,-1),k3=[x3],S3=h("label",{class:"text-muted fw-bold mb-1"},[h("small",null,"PUBLIC KEY")],-1),A3={class:"card rounded-3 shadow"},$3=h("div",{class:"card-header"},"Listen Port",-1),C3={class:"card-body"},E3=["disabled"],P3={class:"invalid-feedback"},T3={key:0},M3={key:1},D3={class:"card rounded-3 shadow"},O3={class:"card-header d-flex align-items-center"},I3={class:"badge rounded-pill text-bg-success ms-auto"},R3={class:"card-body"},L3=["disabled"],N3={class:"invalid-feedback"},F3={key:0},B3={key:1},V3=h("hr",null,null,-1),H3={class:"accordion",id:"newConfigurationOptionalAccordion"},j3={class:"accordion-item"},W3=h("h2",{class:"accordion-header"},[h("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"}," Optional Settings ")],-1),z3={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Y3={class:"accordion-body d-flex flex-column gap-3"},U3={class:"card rounded-3"},K3=h("div",{class:"card-header"},"PreUp",-1),q3={class:"card-body"},G3={class:"card rounded-3"},J3=h("div",{class:"card-header"},"PreDown",-1),X3={class:"card-body"},Q3={class:"card rounded-3"},Z3=h("div",{class:"card-header"},"PostUp",-1),e5={class:"card-body"},t5={class:"card rounded-3"},n5=h("div",{class:"card-header"},"PostDown",-1),s5={class:"card-body"},i5=["disabled"],o5={key:0,class:"d-flex w-100"},r5=h("i",{class:"bi bi-check-circle-fill ms-2"},null,-1),a5={key:1,class:"d-flex w-100"},l5=h("i",{class:"bi bi-save-fill ms-2"},null,-1),c5={key:2,class:"d-flex w-100 align-items-center"},u5=h("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1);function d5(e,t,n,s,i,o){const r=je("RouterLink");return O(),F("div",s3,[h("div",i3,[h("div",o3,[$e(r,{to:"/",class:"text-decoration-none"},{default:Te(()=>[r3]),_:1})]),h("form",{class:"text-body d-flex flex-column gap-3",onSubmit:t[10]||(t[10]=a=>{a.preventDefault(),this.saveNewConfiguration()})},[h("div",a3,[l3,h("div",c3,[Re(h("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":t[0]||(t[0]=a=>this.newConfiguration.ConfigurationName=a),disabled:this.loading,required:""},null,8,u3),[[We,this.newConfiguration.ConfigurationName]]),h("div",d3,[this.error?(O(),F("div",h3,ve(this.errorMessage),1)):(O(),F("div",f3,[ye(" Configuration name is invalid. Possible reasons: "),p3]))])])]),h("div",g3,[m3,h("div",_3,[h("div",v3,[b3,h("div",y3,[Re(h("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":t[1]||(t[1]=a=>this.newConfiguration.PrivateKey=a)},null,8,w3),[[We,this.newConfiguration.PrivateKey]]),h("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:t[2]||(t[2]=a=>o.wireguardGenerateKeypair())},k3)])]),h("div",null,[S3,Re(h("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":t[3]||(t[3]=a=>this.newConfiguration.PublicKey=a),disabled:""},null,512),[[We,this.newConfiguration.PublicKey]])])])]),h("div",A3,[$3,h("div",C3,[Re(h("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":t[4]||(t[4]=a=>this.newConfiguration.ListenPort=a),disabled:this.loading,required:""},null,8,E3),[[We,this.newConfiguration.ListenPort]]),h("div",P3,[this.error?(O(),F("div",T3,ve(this.errorMessage),1)):(O(),F("div",M3," Invalid port "))])])]),h("div",D3,[h("div",O3,[ye(" IP Address & Range "),h("span",I3,ve(i.numberOfAvailableIPs)+" Available IPs",1)]),h("div",R3,[Re(h("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":t[5]||(t[5]=a=>this.newConfiguration.Address=a),disabled:this.loading,required:""},null,8,L3),[[We,this.newConfiguration.Address]]),h("div",N3,[this.error?(O(),F("div",F3,ve(this.errorMessage),1)):(O(),F("div",B3," IP address & range is invalid. "))])])]),V3,h("div",H3,[h("div",j3,[W3,h("div",z3,[h("div",Y3,[h("div",U3,[K3,h("div",q3,[Re(h("input",{type:"text",class:"form-control",id:"preUp","onUpdate:modelValue":t[6]||(t[6]=a=>this.newConfiguration.PreUp=a)},null,512),[[We,this.newConfiguration.PreUp]])])]),h("div",G3,[J3,h("div",X3,[Re(h("input",{type:"text",class:"form-control",id:"preDown","onUpdate:modelValue":t[7]||(t[7]=a=>this.newConfiguration.PreDown=a)},null,512),[[We,this.newConfiguration.PreDown]])])]),h("div",Q3,[Z3,h("div",e5,[Re(h("input",{type:"text",class:"form-control",id:"postUp","onUpdate:modelValue":t[8]||(t[8]=a=>this.newConfiguration.PostUp=a)},null,512),[[We,this.newConfiguration.PostUp]])])]),h("div",t5,[n5,h("div",s5,[Re(h("input",{type:"text",class:"form-control",id:"postDown","onUpdate:modelValue":t[9]||(t[9]=a=>this.newConfiguration.PostDown=a)},null,512),[[We,this.newConfiguration.PostDown]])])])])])])]),h("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!this.goodToSubmit},[this.success?(O(),F("span",o5,[ye(" Success! "),r5])):this.loading?(O(),F("span",c5,[ye(" Saving... "),u5])):(O(),F("span",a5,[ye(" Save Configuration "),l5]))],8,i5)],32)])])}const h5=ze(n3,[["render",d5]]),f5={name:"configuration"},p5={class:"mt-5 text-body"};function g5(e,t,n,s,i,o){const r=je("RouterView");return O(),F("div",p5,[$e(r,null,{default:Te(({Component:a,route:l})=>[$e(Bt,{name:"fade2",mode:"out-in"},{default:Te(()=>[(O(),Ne(uf,null,{default:Te(()=>[(O(),Ne(Io(a),{key:l.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const m5=ze(f5,[["render",g5]]),_5={name:"peerSearch",setup(){const e=et(),t=Bn();return{store:e,wireguardConfigurationStore:t}},props:{configuration:Object},data(){return{sort:{status:"Status",name:"Name",allowed_ip:"Allowed IP",restricted:"Restricted"},interval:{5e3:"5 Seconds",1e4:"10 Seconds",3e4:"30 Seconds",6e4:"1 Minutes"},searchString:"",searchStringTimeout:void 0}},methods:{debounce(){this.searchStringTimeout?(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)):this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)},updateSort(e){dt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:e},t=>{t.status&&this.store.getConfiguration()})},updateRefreshInterval(e){dt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:e},t=>{t.status&&this.store.getConfiguration()})},downloadAllPeer(){Tt(`/api/downloadAllPeers/${this.configuration.Name}`,{},e=>{console.log(e),window.wireguard.generateZipFiles(e,this.configuration.Name)})}},mounted(){}},Ui=e=>(en("data-v-84cd1594"),e=e(),tn(),e),v5={class:"mb-3"},b5={class:"d-flex gap-2 z-3"},y5=Ui(()=>h("i",{class:"bi bi-plus-lg me-2"},null,-1)),w5=Ui(()=>h("i",{class:"bi bi-download me-2"},null,-1)),x5={class:"flex-grow-1"},k5={class:"dropdown dropup"},S5=Ui(()=>h("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[h("i",{class:"bi bi-filter-circle me-2"}),ye(" Display ")],-1)),A5={class:"dropdown-menu mt-2 shadow rounded-3 animate__animated animation__fadeInDropdown dropdown-menu-end"},$5=Ui(()=>h("li",null,[h("small",{class:"dropdown-header"},"Sort by")],-1)),C5=["onClick"],E5={class:"me-auto"},P5={key:0,class:"bi bi-check text-primary"},T5=Ui(()=>h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),M5=Ui(()=>h("li",null,[h("small",{class:"dropdown-header"},"Refresh Interval")],-1)),D5=["onClick"],O5={class:"me-auto"},I5={key:0,class:"bi bi-check text-primary"},R5={class:"dropdown dropup"},L5=Ui(()=>h("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[h("i",{class:"bi bi-three-dots"})],-1)),N5={class:"dropdown-menu shadow mt-2 rounded-3 animate__animated animation__fadeInDropdown"},F5=Ui(()=>h("li",null,[h("h6",{class:"dropdown-header"},"Peer Jobs")],-1));function B5(e,t,n,s,i,o){const r=je("RouterLink");return O(),F("div",v5,[h("div",b5,[$e(r,{to:"create",class:"text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm"},{default:Te(()=>[y5,ye("Peer ")]),_:1}),h("button",{class:"btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm",onClick:t[0]||(t[0]=a=>this.downloadAllPeer())},[w5,ye(" Download All ")]),h("div",x5,[Re(h("input",{class:"form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100",placeholder:"Search...",id:"searchPeers",onKeyup:t[1]||(t[1]=a=>this.debounce()),"onUpdate:modelValue":t[2]||(t[2]=a=>this.searchString=a)},null,544),[[We,this.searchString]])]),h("div",k5,[S5,h("ul",A5,[$5,(O(!0),F(Me,null,Ke(this.sort,(a,l)=>(O(),F("li",null,[h("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:c=>this.updateSort(l)},[h("small",E5,ve(a),1),s.store.Configuration.Server.dashboard_sort===l?(O(),F("i",P5)):ae("",!0)],8,C5)]))),256)),T5,M5,(O(!0),F(Me,null,Ke(this.interval,(a,l)=>(O(),F("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:c=>o.updateRefreshInterval(l)},[h("small",O5,ve(a),1),s.store.Configuration.Server.dashboard_refresh_interval===l?(O(),F("i",I5)):ae("",!0)],8,D5)]))),256))])]),h("div",R5,[L5,h("ul",N5,[F5,h("li",null,[h("a",{role:"button",class:"dropdown-item",onClick:t[3]||(t[3]=a=>this.$emit("jobsAll"))}," Active Jobs ")]),h("li",null,[h("a",{role:"button",class:"dropdown-item",onClick:t[4]||(t[4]=a=>this.$emit("jobLogs"))}," Logs ")])])])])])}const V5=ze(_5,[["render",B5],["__scopeId","data-v-84cd1594"]]);function H5(e){return Qc()?(Jh(e),!0):!1}function b0(e){return typeof e=="function"?e():q(e)}const y0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const j5=Object.prototype.toString,W5=e=>j5.call(e)==="[object Object]",fc=()=>{},z5=Y5();function Y5(){var e,t;return y0&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function aa(e){var t;const n=b0(e);return(t=n==null?void 0:n.$el)!=null?t:n}const w0=y0?window:void 0;function gd(...e){let t,n,s,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,s,i]=e,t=w0):[t,n,s,i]=e,!t)return fc;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,f,p)=>(u.addEventListener(d,f,p),()=>u.removeEventListener(d,f,p)),l=Vt(()=>[aa(t),b0(i)],([u,d])=>{if(r(),!u)return;const f=W5(d)?{...d}:d;o.push(...n.flatMap(p=>s.map(m=>a(u,p,m,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return H5(c),c}let Hm=!1;function U5(e,t,n={}){const{window:s=w0,ignore:i=[],capture:o=!0,detectIframe:r=!1}=n;if(!s)return fc;z5&&!Hm&&(Hm=!0,Array.from(s.document.body.children).forEach(f=>f.addEventListener("click",fc)),s.document.documentElement.addEventListener("click",fc));let a=!0;const l=f=>i.some(p=>{if(typeof p=="string")return Array.from(s.document.querySelectorAll(p)).some(m=>m===f.target||f.composedPath().includes(m));{const m=aa(p);return m&&(f.target===m||f.composedPath().includes(m))}}),u=[gd(s,"click",f=>{const p=aa(e);if(!(!p||p===f.target||f.composedPath().includes(p))){if(f.detail===0&&(a=!l(f)),!a){a=!0;return}t(f)}},{passive:!0,capture:o}),gd(s,"pointerdown",f=>{const p=aa(e);a=!l(f)&&!!(p&&!f.composedPath().includes(p))},{passive:!0}),r&&gd(s,"blur",f=>{setTimeout(()=>{var p;const m=aa(e);((p=s.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(m!=null&&m.contains(s.document.activeElement))&&t(f)},0)})].filter(Boolean);return()=>u.forEach(f=>f())}const K5={name:"peerSettingsDropdown",setup(){return{dashboardStore:et()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1}},methods:{downloadPeer(){Tt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},e=>{if(e.status){const t=new Blob([e.data.file],{type:"text/plain"}),n=URL.createObjectURL(t),s=`${e.data.fileName}.conf`,i=document.createElement("a");i.href=n,i.download=s,i.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",e.message,"danger")})},downloadQRCode(){Tt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},e=>{e.status?this.$emit("qrcode",e.data.file):this.dashboardStore.newMessage("Server",e.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,dt(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},e=>{this.dashboardStore.newMessage("Server",e.message,e.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,dt(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},e=>{this.dashboardStore.newMessage("Server",e.message,e.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,dt(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},e=>{this.dashboardStore.newMessage("Server",e.message,e.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},ps=e=>(en("data-v-772e5b77"),e=e(),tn(),e),q5={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},G5={key:0},J5=ps(()=>h("small",{class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},[ye("Download & QR Code is not available due to no "),h("code",null,"private key"),ye(" set for this peer ")],-1)),X5=[J5],Q5={key:1,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Z5=ps(()=>h("i",{class:"me-auto bi bi-download"},null,-1)),eF=[Z5],tF=ps(()=>h("i",{class:"me-auto bi bi-qr-code"},null,-1)),nF=[tF],sF=ps(()=>h("i",{class:"me-auto bi bi-share"},null,-1)),iF=[sF],oF=ps(()=>h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),rF=ps(()=>h("i",{class:"me-auto bi bi-pen"},null,-1)),aF=ps(()=>h("i",{class:"me-auto bi bi-app-indicator"},null,-1)),lF=ps(()=>h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),cF=ps(()=>h("i",{class:"me-auto bi bi-lock"},null,-1)),uF=ps(()=>h("i",{class:"me-auto bi bi-trash"},null,-1)),dF={key:1},hF=ps(()=>h("i",{class:"me-auto bi bi-unlock"},null,-1));function fF(e,t,n,s,i,o){return O(),F("ul",q5,[this.Peer.restricted?(O(),F("li",dF,[h("a",{class:Ee(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:t[7]||(t[7]=r=>this.allowAccessPeer()),role:"button"},[hF,ye(" "+ve(this.allowAccessBtnDisabled?"Allowing...":"Allow Access"),1)],2)])):(O(),F(Me,{key:0},[this.Peer.private_key?(O(),F("li",Q5,[h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[0]||(t[0]=r=>this.downloadPeer())},eF),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[1]||(t[1]=r=>this.downloadQRCode())},nF),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[2]||(t[2]=r=>this.$emit("share"))},iF)])):(O(),F("li",G5,X5)),oF,h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:t[3]||(t[3]=r=>this.$emit("setting"))},[rF,ye(" Edit ")])]),h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:t[4]||(t[4]=r=>this.$emit("jobs"))},[aF,ye(" Schedule Jobs ")])]),lF,h("li",null,[h("a",{class:Ee(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:t[5]||(t[5]=r=>this.restrictPeer()),role:"button"},[cF,ye(" "+ve(this.restrictBtnDisabled?"Restricting...":"Restrict Access"),1)],2)]),h("li",null,[h("a",{class:Ee(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:t[6]||(t[6]=r=>this.deletePeer()),role:"button"},[uF,ye(" "+ve(this.deleteBtnDisabled?"Deleting...":"Delete"),1)],2)])],64))])}const pF=ze(K5,[["render",fF],["__scopeId","data-v-772e5b77"]]),gF={name:"peer",components:{PeerSettingsDropdown:pF},props:{Peer:Object},data(){return{}},setup(){const e=be(null),t=be(!1);return U5(e,n=>{t.value=!1}),{target:e,subMenuOpened:t}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},No=e=>(en("data-v-f311ec95"),e=e(),tn(),e),mF={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},_F={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},vF={class:"text-primary"},bF=No(()=>h("i",{class:"bi bi-arrow-down"},null,-1)),yF={class:"text-success"},wF=No(()=>h("i",{class:"bi bi-arrow-up"},null,-1)),xF={key:0,class:"text-secondary"},kF=No(()=>h("i",{class:"bi bi-arrows-angle-contract"},null,-1)),SF={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},AF=No(()=>h("i",{class:"bi-lock-fill me-2"},null,-1)),$F={class:"card-body pt-1",style:{"font-size":"0.9rem"}},CF={class:"mb-2"},EF=No(()=>h("small",{class:"text-muted"},"Public Key",-1)),PF={class:"mb-0"},TF={class:"d-flex align-items-end"},MF=No(()=>h("small",{class:"text-muted"},"Allowed IP",-1)),DF={class:"mb-0"},OF=No(()=>h("h5",{class:"mb-0"},[h("i",{class:"bi bi-three-dots"})],-1)),IF=[OF];function RF(e,t,n,s,i,o){const r=je("PeerSettingsDropdown");return O(),F("div",{class:Ee(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":n.Peer.restricted}])},[h("div",null,[n.Peer.restricted?(O(),F("div",SF,[AF,ye(" Access Restricted ")])):(O(),F("div",mF,[h("div",{class:Ee(["dot ms-0",{active:n.Peer.status==="running"}])},null,2),h("div",_F,[h("span",vF,[bF,h("strong",null,ve((n.Peer.cumu_receive+n.Peer.total_receive).toFixed(4)),1),ye(" GB ")]),h("span",yF,[wF,h("strong",null,ve((n.Peer.cumu_sent+n.Peer.total_sent).toFixed(4)),1),ye(" GB ")]),n.Peer.latest_handshake!=="No Handshake"?(O(),F("span",xF,[kF,ye(" "+ve(o.getLatestHandshake)+" ago ",1)])):ae("",!0)])]))]),h("div",$F,[h("h6",null,ve(n.Peer.name?n.Peer.name:"Untitled Peer"),1),h("div",CF,[EF,h("p",PF,[h("samp",null,ve(n.Peer.id),1)])]),h("div",TF,[h("div",null,[MF,h("p",DF,[h("samp",null,ve(n.Peer.allowed_ip),1)])]),h("div",{class:Ee(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[h("a",{role:"button",class:"text-body",onClick:t[0]||(t[0]=a=>this.subMenuOpened=!0)},IF),$e(Bt,{name:"slide-fade"},{default:Te(()=>[this.subMenuOpened?(O(),Ne(r,{key:0,onQrcode:t[1]||(t[1]=a=>this.$emit("qrcode",a)),onSetting:t[2]||(t[2]=a=>this.$emit("setting")),onJobs:t[3]||(t[3]=a=>this.$emit("jobs")),onRefresh:t[4]||(t[4]=a=>this.$emit("refresh")),onShare:t[5]||(t[5]=a=>this.$emit("share")),Peer:n.Peer,ref:"target"},null,8,["Peer"])):ae("",!0)]),_:1})],2)])])],2)}const LF=ze(gF,[["render",RF],["__scopeId","data-v-f311ec95"]]);/*!
|
|
* @kurkle/color v0.3.2
|
|
* https://github.com/kurkle/color#readme
|
|
* (c) 2023 Jukka Kurkela
|
|
* Released under the MIT License
|
|
*/function ul(e){return e+.5|0}const Si=(e,t,n)=>Math.max(Math.min(e,n),t);function la(e){return Si(ul(e*2.55),0,255)}function Oi(e){return Si(ul(e*255),0,255)}function Ys(e){return Si(ul(e/2.55)/100,0,1)}function jm(e){return Si(ul(e*100),0,100)}const Un={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},lh=[..."0123456789ABCDEF"],NF=e=>lh[e&15],FF=e=>lh[(e&240)>>4]+lh[e&15],Hl=e=>(e&240)>>4===(e&15),BF=e=>Hl(e.r)&&Hl(e.g)&&Hl(e.b)&&Hl(e.a);function VF(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Un[e[1]]*17,g:255&Un[e[2]]*17,b:255&Un[e[3]]*17,a:t===5?Un[e[4]]*17:255}:(t===7||t===9)&&(n={r:Un[e[1]]<<4|Un[e[2]],g:Un[e[3]]<<4|Un[e[4]],b:Un[e[5]]<<4|Un[e[6]],a:t===9?Un[e[7]]<<4|Un[e[8]]:255})),n}const HF=(e,t)=>e<255?t(e):"";function jF(e){var t=BF(e)?NF:FF;return e?"#"+t(e.r)+t(e.g)+t(e.b)+HF(e.a,t):void 0}const WF=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function x0(e,t,n){const s=t*Math.min(n,1-n),i=(o,r=(o+e/30)%12)=>n-s*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function zF(e,t,n){const s=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function YF(e,t,n){const s=x0(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)s[i]*=1-t-n,s[i]+=t;return s}function UF(e,t,n,s,i){return e===i?(t-n)/s+(t<n?6:0):t===i?(n-e)/s+2:(e-t)/s+4}function Wf(e){const n=e.r/255,s=e.g/255,i=e.b/255,o=Math.max(n,s,i),r=Math.min(n,s,i),a=(o+r)/2;let l,c,u;return o!==r&&(u=o-r,c=a>.5?u/(2-o-r):u/(o+r),l=UF(n,s,i,u,o),l=l*60+.5),[l|0,c||0,a]}function zf(e,t,n,s){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,s)).map(Oi)}function Yf(e,t,n){return zf(x0,e,t,n)}function KF(e,t,n){return zf(YF,e,t,n)}function qF(e,t,n){return zf(zF,e,t,n)}function k0(e){return(e%360+360)%360}function GF(e){const t=WF.exec(e);let n=255,s;if(!t)return;t[5]!==s&&(n=t[6]?la(+t[5]):Oi(+t[5]));const i=k0(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=KF(i,o,r):t[1]==="hsv"?s=qF(i,o,r):s=Yf(i,o,r),{r:s[0],g:s[1],b:s[2],a:n}}function JF(e,t){var n=Wf(e);n[0]=k0(n[0]+t),n=Yf(n),e.r=n[0],e.g=n[1],e.b=n[2]}function XF(e){if(!e)return;const t=Wf(e),n=t[0],s=jm(t[1]),i=jm(t[2]);return e.a<255?`hsla(${n}, ${s}%, ${i}%, ${Ys(e.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const Wm={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},zm={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function QF(){const e={},t=Object.keys(zm),n=Object.keys(Wm);let s,i,o,r,a;for(s=0;s<t.length;s++){for(r=a=t[s],i=0;i<n.length;i++)o=n[i],a=a.replace(o,Wm[o]);o=parseInt(zm[r],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let jl;function ZF(e){jl||(jl=QF(),jl.transparent=[0,0,0,0]);const t=jl[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const eB=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function tB(e){const t=eB.exec(e);let n=255,s,i,o;if(t){if(t[7]!==s){const r=+t[7];n=t[8]?la(r):Si(r*255,0,255)}return s=+t[1],i=+t[3],o=+t[5],s=255&(t[2]?la(s):Si(s,0,255)),i=255&(t[4]?la(i):Si(i,0,255)),o=255&(t[6]?la(o):Si(o,0,255)),{r:s,g:i,b:o,a:n}}}function nB(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ys(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const md=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Qo=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function sB(e,t,n){const s=Qo(Ys(e.r)),i=Qo(Ys(e.g)),o=Qo(Ys(e.b));return{r:Oi(md(s+n*(Qo(Ys(t.r))-s))),g:Oi(md(i+n*(Qo(Ys(t.g))-i))),b:Oi(md(o+n*(Qo(Ys(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Wl(e,t,n){if(e){let s=Wf(e);s[t]=Math.max(0,Math.min(s[t]+s[t]*n,t===0?360:1)),s=Yf(s),e.r=s[0],e.g=s[1],e.b=s[2]}}function S0(e,t){return e&&Object.assign(t||{},e)}function Ym(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Oi(e[3]))):(t=S0(e,{r:0,g:0,b:0,a:1}),t.a=Oi(t.a)),t}function iB(e){return e.charAt(0)==="r"?tB(e):GF(e)}class Ua{constructor(t){if(t instanceof Ua)return t;const n=typeof t;let s;n==="object"?s=Ym(t):n==="string"&&(s=VF(t)||ZF(t)||iB(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=S0(this._rgb);return t&&(t.a=Ys(t.a)),t}set rgb(t){this._rgb=Ym(t)}rgbString(){return this._valid?nB(this._rgb):void 0}hexString(){return this._valid?jF(this._rgb):void 0}hslString(){return this._valid?XF(this._rgb):void 0}mix(t,n){if(t){const s=this.rgb,i=t.rgb;let o;const r=n===o?.5:n,a=2*r-1,l=s.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*i.r+.5,s.g=255&c*s.g+o*i.g+.5,s.b=255&c*s.b+o*i.b+.5,s.a=r*s.a+(1-r)*i.a,this.rgb=s}return this}interpolate(t,n){return t&&(this._rgb=sB(this._rgb,t._rgb,n)),this}clone(){return new Ua(this.rgb)}alpha(t){return this._rgb.a=Oi(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=ul(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Wl(this._rgb,2,t),this}darken(t){return Wl(this._rgb,2,-t),this}saturate(t){return Wl(this._rgb,1,t),this}desaturate(t){return Wl(this._rgb,1,-t),this}rotate(t){return JF(this._rgb,t),this}}/*!
|
|
* Chart.js v4.4.1
|
|
* https://www.chartjs.org
|
|
* (c) 2023 Chart.js Contributors
|
|
* Released under the MIT License
|
|
*/function Bs(){}const oB=(()=>{let e=0;return()=>e++})();function ot(e){return e===null||typeof e>"u"}function bt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function st(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function $t(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Tn(e,t){return $t(e)?e:t}function Ge(e,t){return typeof e>"u"?t:e}const rB=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,A0=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function pt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function ut(e,t,n,s){let i,o,r;if(bt(e))if(o=e.length,s)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<o;i++)t.call(n,e[i],i);else if(st(e))for(r=Object.keys(e),o=r.length,i=0;i<o;i++)t.call(n,e[r[i]],r[i])}function Rc(e,t){let n,s,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,s=e.length;n<s;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Lc(e){if(bt(e))return e.map(Lc);if(st(e)){const t=Object.create(null),n=Object.keys(e),s=n.length;let i=0;for(;i<s;++i)t[n[i]]=Lc(e[n[i]]);return t}return e}function $0(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function aB(e,t,n,s){if(!$0(e))return;const i=t[e],o=n[e];st(i)&&st(o)?Ka(i,o,s):t[e]=Lc(o)}function Ka(e,t,n){const s=bt(t)?t:[t],i=s.length;if(!st(e))return e;n=n||{};const o=n.merger||aB;let r;for(let a=0;a<i;++a){if(r=s[a],!st(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)o(l[c],e,r,n)}return e}function $a(e,t){return Ka(e,t,{merger:lB})}function lB(e,t,n){if(!$0(e))return;const s=t[e],i=n[e];st(s)&&st(i)?$a(s,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Lc(i))}const Um={"":e=>e,x:e=>e.x,y:e=>e.y};function cB(e){const t=e.split("."),n=[];let s="";for(const i of t)s+=i,s.endsWith("\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function uB(e){const t=cB(e);return n=>{for(const s of t){if(s==="")break;n=n&&n[s]}return n}}function Fi(e,t){return(Um[t]||(Um[t]=uB(t)))(e)}function Uf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const qa=e=>typeof e<"u",Bi=e=>typeof e=="function",Km=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function dB(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const wt=Math.PI,yt=2*wt,hB=yt+wt,Nc=Number.POSITIVE_INFINITY,fB=wt/180,Rt=wt/2,ao=wt/4,qm=wt*2/3,Ai=Math.log10,Es=Math.sign;function Ca(e,t,n){return Math.abs(e-t)<n}function Gm(e){const t=Math.round(e);e=Ca(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Ai(e))),s=e/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function pB(e){const t=[],n=Math.sqrt(e);let s;for(s=1;s<n;s++)e%s===0&&(t.push(s),t.push(e/s));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function Pr(e){return!isNaN(parseFloat(e))&&isFinite(e)}function gB(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function C0(e,t,n){let s,i,o;for(s=0,i=e.length;s<i;s++)o=e[s][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function as(e){return e*(wt/180)}function Kf(e){return e*(180/wt)}function Jm(e){if(!$t(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function E0(e,t){const n=t.x-e.x,s=t.y-e.y,i=Math.sqrt(n*n+s*s);let o=Math.atan2(s,n);return o<-.5*wt&&(o+=yt),{angle:o,distance:i}}function ch(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function mB(e,t){return(e-t+hB)%yt-wt}function Dn(e){return(e%yt+yt)%yt}function Ga(e,t,n,s){const i=Dn(e),o=Dn(t),r=Dn(n),a=Dn(o-i),l=Dn(r-i),c=Dn(i-o),u=Dn(i-r);return i===o||i===r||s&&o===r||a>l&&c<u}function Qt(e,t,n){return Math.max(t,Math.min(n,e))}function _B(e){return Qt(e,-32768,32767)}function qs(e,t,n,s=1e-6){return e>=Math.min(t,n)-s&&e<=Math.max(t,n)+s}function qf(e,t,n){n=n||(r=>e[r]<t);let s=e.length-1,i=0,o;for(;s-i>1;)o=i+s>>1,n(o)?i=o:s=o;return{lo:i,hi:s}}const Gs=(e,t,n,s)=>qf(e,n,s?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),vB=(e,t,n)=>qf(e,n,s=>e[s][t]>=n);function bB(e,t,n){let s=0,i=e.length;for(;s<i&&e[s]<t;)s++;for(;i>s&&e[i-1]>n;)i--;return s>0||i<e.length?e.slice(s,i):e}const P0=["push","pop","shift","splice","unshift"];function yB(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),P0.forEach(n=>{const s="_onData"+Uf(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const r=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Xm(e,t){const n=e._chartjs;if(!n)return;const s=n.listeners,i=s.indexOf(t);i!==-1&&s.splice(i,1),!(s.length>0)&&(P0.forEach(o=>{delete e[o]}),delete e._chartjs)}function T0(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const M0=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function D0(e,t){let n=[],s=!1;return function(...i){n=i,s||(s=!0,M0.call(window,()=>{s=!1,e.apply(t,n)}))}}function wB(e,t){let n;return function(...s){return t?(clearTimeout(n),n=setTimeout(e,t,s)):e.apply(this,s),t}}const Gf=e=>e==="start"?"left":e==="end"?"right":"center",ln=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,xB=(e,t,n,s)=>e===(s?"left":"right")?n:e==="center"?(t+n)/2:t;function O0(e,t,n){const s=t.length;let i=0,o=s;if(e._sorted){const{iScale:r,_parsed:a}=e,l=r.axis,{min:c,max:u,minDefined:d,maxDefined:f}=r.getUserBounds();d&&(i=Qt(Math.min(Gs(a,l,c).lo,n?s:Gs(t,l,r.getPixelForValue(c)).lo),0,s-1)),f?o=Qt(Math.max(Gs(a,r.axis,u,!0).hi+1,n?0:Gs(t,l,r.getPixelForValue(u),!0).hi+1),i,s)-i:o=s-i}return{start:i,count:o}}function I0(e){const{xScale:t,yScale:n,_scaleRanges:s}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!s)return e._scaleRanges=i,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==n.min||s.ymax!==n.max;return Object.assign(s,i),o}const zl=e=>e===0||e===1,Qm=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*yt/n)),Zm=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*yt/n)+1,Ea={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Rt)+1,easeOutSine:e=>Math.sin(e*Rt),easeInOutSine:e=>-.5*(Math.cos(wt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>zl(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>zl(e)?e:Qm(e,.075,.3),easeOutElastic:e=>zl(e)?e:Zm(e,.075,.3),easeInOutElastic(e){return zl(e)?e:e<.5?.5*Qm(e*2,.1125,.45):.5+.5*Zm(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Ea.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Ea.easeInBounce(e*2)*.5:Ea.easeOutBounce(e*2-1)*.5+.5};function Jf(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function e_(e){return Jf(e)?e:new Ua(e)}function _d(e){return Jf(e)?e:new Ua(e).saturate(.5).darken(.1).hexString()}const kB=["x","y","borderWidth","radius","tension"],SB=["color","borderColor","backgroundColor"];function AB(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:SB},numbers:{type:"number",properties:kB}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function $B(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const t_=new Map;function CB(e,t){t=t||{};const n=e+JSON.stringify(t);let s=t_.get(n);return s||(s=new Intl.NumberFormat(e,t),t_.set(n,s)),s}function dl(e,t,n){return CB(t,n).format(e)}const R0={values(e){return bt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const s=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=EB(e,n)}const r=Ai(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),dl(e,s,l)},logarithmic(e,t,n){if(e===0)return"0";const s=n[t].significand||e/Math.pow(10,Math.floor(Ai(e)));return[1,2,3,5,10,15].includes(s)||t>.8*n.length?R0.numeric.call(this,e,t,n):""}};function EB(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var vu={formatters:R0};function PB(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:vu.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Mo=Object.create(null),uh=Object.create(null);function Pa(e,t){if(!t)return e;const n=t.split(".");for(let s=0,i=n.length;s<i;++s){const o=n[s];e=e[o]||(e[o]=Object.create(null))}return e}function vd(e,t,n){return typeof t=="string"?Ka(Pa(e,t),n):Ka(Pa(e,""),t)}class TB{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,i)=>_d(i.backgroundColor),this.hoverBorderColor=(s,i)=>_d(i.borderColor),this.hoverColor=(s,i)=>_d(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return vd(this,t,n)}get(t){return Pa(this,t)}describe(t,n){return vd(uh,t,n)}override(t,n){return vd(Mo,t,n)}route(t,n,s,i){const o=Pa(this,t),r=Pa(this,s),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=r[i];return st(l)?Object.assign({},c,l):Ge(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var Ct=new TB({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[AB,$B,PB]);function MB(e){return!e||ot(e.size)||ot(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Fc(e,t,n,s,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>s&&(s=o),s}function DB(e,t,n,s){s=s||{};let i=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(i=s.data={},o=s.garbageCollect=[],s.font=t),e.save(),e.font=t;let r=0;const a=n.length;let l,c,u,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!bt(d))r=Fc(e,i,o,r,d);else if(bt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!bt(f)&&(r=Fc(e,i,o,r,f));e.restore();const p=o.length/2;if(p>n.length){for(l=0;l<p;l++)delete i[o[l]];o.splice(0,p)}return r}function lo(e,t,n){const s=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*s)/s+i}function n_(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function dh(e,t,n,s){L0(e,t,n,s,null)}function L0(e,t,n,s,i){let o,r,a,l,c,u,d,f;const p=t.pointStyle,m=t.rotation,_=t.radius;let b=(m||0)*fB;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,s),e.rotate(b),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(_)||_<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,s,i/2,_,0,0,yt):e.arc(n,s,_,0,yt),e.closePath();break;case"triangle":u=i?i/2:_,e.moveTo(n+Math.sin(b)*u,s-Math.cos(b)*_),b+=qm,e.lineTo(n+Math.sin(b)*u,s-Math.cos(b)*_),b+=qm,e.lineTo(n+Math.sin(b)*u,s-Math.cos(b)*_),e.closePath();break;case"rectRounded":c=_*.516,l=_-c,r=Math.cos(b+ao)*l,d=Math.cos(b+ao)*(i?i/2-c:l),a=Math.sin(b+ao)*l,f=Math.sin(b+ao)*(i?i/2-c:l),e.arc(n-d,s-a,c,b-wt,b-Rt),e.arc(n+f,s-r,c,b-Rt,b),e.arc(n+d,s+a,c,b,b+Rt),e.arc(n-f,s+r,c,b+Rt,b+wt),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*_,u=i?i/2:l,e.rect(n-u,s-l,2*u,2*l);break}b+=ao;case"rectRot":d=Math.cos(b)*(i?i/2:_),r=Math.cos(b)*_,a=Math.sin(b)*_,f=Math.sin(b)*(i?i/2:_),e.moveTo(n-d,s-a),e.lineTo(n+f,s-r),e.lineTo(n+d,s+a),e.lineTo(n-f,s+r),e.closePath();break;case"crossRot":b+=ao;case"cross":d=Math.cos(b)*(i?i/2:_),r=Math.cos(b)*_,a=Math.sin(b)*_,f=Math.sin(b)*(i?i/2:_),e.moveTo(n-d,s-a),e.lineTo(n+d,s+a),e.moveTo(n+f,s-r),e.lineTo(n-f,s+r);break;case"star":d=Math.cos(b)*(i?i/2:_),r=Math.cos(b)*_,a=Math.sin(b)*_,f=Math.sin(b)*(i?i/2:_),e.moveTo(n-d,s-a),e.lineTo(n+d,s+a),e.moveTo(n+f,s-r),e.lineTo(n-f,s+r),b+=ao,d=Math.cos(b)*(i?i/2:_),r=Math.cos(b)*_,a=Math.sin(b)*_,f=Math.sin(b)*(i?i/2:_),e.moveTo(n-d,s-a),e.lineTo(n+d,s+a),e.moveTo(n+f,s-r),e.lineTo(n-f,s+r);break;case"line":r=i?i/2:Math.cos(b)*_,a=Math.sin(b)*_,e.moveTo(n-r,s-a),e.lineTo(n+r,s+a);break;case"dash":e.moveTo(n,s),e.lineTo(n+Math.cos(b)*(i?i/2:_),s+Math.sin(b)*_);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Js(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function bu(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function yu(e){e.restore()}function OB(e,t,n,s,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else i==="after"!=!!s?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function IB(e,t,n,s){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?n.cp2x:n.cp1x,s?n.cp2y:n.cp1y,n.x,n.y)}function RB(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),ot(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function LB(e,t,n,s,i){if(i.strikethrough||i.underline){const o=e.measureText(s),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(r,u),e.lineTo(a,u),e.stroke()}}function NB(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Do(e,t,n,s,i,o={}){const r=bt(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,RB(e,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&NB(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),ot(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,s,o.maxWidth)),e.fillText(c,n,s,o.maxWidth),LB(e,n,s,c,o),s+=Number(i.lineHeight);e.restore()}function Ja(e,t){const{x:n,y:s,w:i,h:o,radius:r}=t;e.arc(n+r.topLeft,s+r.topLeft,r.topLeft,1.5*wt,wt,!0),e.lineTo(n,s+o-r.bottomLeft),e.arc(n+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,wt,Rt,!0),e.lineTo(n+i-r.bottomRight,s+o),e.arc(n+i-r.bottomRight,s+o-r.bottomRight,r.bottomRight,Rt,0,!0),e.lineTo(n+i,s+r.topRight),e.arc(n+i-r.topRight,s+r.topRight,r.topRight,0,-Rt,!0),e.lineTo(n+r.topLeft,s)}const FB=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,BB=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function VB(e,t){const n=(""+e).match(FB);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const HB=e=>+e||0;function Xf(e,t){const n={},s=st(t),i=s?Object.keys(t):t,o=st(e)?s?r=>Ge(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of i)n[r]=HB(o(r));return n}function N0(e){return Xf(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ao(e){return Xf(e,["topLeft","topRight","bottomLeft","bottomRight"])}function fn(e){const t=N0(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ut(e,t){e=e||{},t=t||Ct.font;let n=Ge(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let s=Ge(e.style,t.style);s&&!(""+s).match(BB)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const i={family:Ge(e.family,t.family),lineHeight:VB(Ge(e.lineHeight,t.lineHeight),n),size:n,style:s,weight:Ge(e.weight,t.weight),string:""};return i.string=MB(i),i}function ca(e,t,n,s){let i=!0,o,r,a;for(o=0,r=e.length;o<r;++o)if(a=e[o],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),i=!1),n!==void 0&&bt(a)&&(a=a[n%a.length],i=!1),a!==void 0))return s&&!i&&(s.cacheable=!1),a}function jB(e,t,n){const{min:s,max:i}=e,o=A0(t,(i-s)/2),r=(a,l)=>n&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(i,o)}}function Ki(e,t){return Object.assign(Object.create(e),t)}function Qf(e,t=[""],n,s,i=()=>e[0]){const o=n||e;typeof s>"u"&&(s=H0("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:s,_getTarget:i,override:a=>Qf([a,...e],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return B0(a,l,()=>JB(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return i_(a).includes(l)},ownKeys(a){return i_(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function Tr(e,t,n,s){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:F0(e,s),setContext:o=>Tr(e,o,n,s),override:o=>Tr(e.override(o),t,n,s)};return new Proxy(i,{deleteProperty(o,r){return delete o[r],delete e[r],!0},get(o,r,a){return B0(o,r,()=>zB(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(o,r,a){return e[r]=a,delete o[r],!0}})}function F0(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:s=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:s,isScriptable:Bi(n)?n:()=>n,isIndexable:Bi(s)?s:()=>s}}const WB=(e,t)=>e?e+Uf(t):t,Zf=(e,t)=>st(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function B0(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const s=n();return e[t]=s,s}function zB(e,t,n){const{_proxy:s,_context:i,_subProxy:o,_descriptors:r}=e;let a=s[t];return Bi(a)&&r.isScriptable(t)&&(a=YB(t,a,e,n)),bt(a)&&a.length&&(a=UB(t,a,e,r.isIndexable)),Zf(t,a)&&(a=Tr(a,i,o&&o[t],r)),a}function YB(e,t,n,s){const{_proxy:i,_context:o,_subProxy:r,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,r||s);return a.delete(e),Zf(e,l)&&(l=ep(i._scopes,i,e,l)),l}function UB(e,t,n,s){const{_proxy:i,_context:o,_subProxy:r,_descriptors:a}=n;if(typeof o.index<"u"&&s(e))return t[o.index%t.length];if(st(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=ep(c,i,e,u);t.push(Tr(d,o,r&&r[e],a))}}return t}function V0(e,t,n){return Bi(e)?e(t,n):e}const KB=(e,t)=>e===!0?t:typeof e=="string"?Fi(t,e):void 0;function qB(e,t,n,s,i){for(const o of t){const r=KB(n,o);if(r){e.add(r);const a=V0(r._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==s)return a}else if(r===!1&&typeof s<"u"&&n!==s)return null}return!1}function ep(e,t,n,s){const i=t._rootScopes,o=V0(t._fallback,n,s),r=[...e,...i],a=new Set;a.add(s);let l=s_(a,r,n,o||n,s);return l===null||typeof o<"u"&&o!==n&&(l=s_(a,r,o,l,s),l===null)?!1:Qf(Array.from(a),[""],i,o,()=>GB(t,n,s))}function s_(e,t,n,s,i){for(;n;)n=qB(e,t,n,s,i);return n}function GB(e,t,n){const s=e._getTarget();t in s||(s[t]={});const i=s[t];return bt(i)&&st(n)?n:i||{}}function JB(e,t,n,s){let i;for(const o of t)if(i=H0(WB(o,e),n),typeof i<"u")return Zf(e,i)?ep(n,s,e,i):i}function H0(e,t){for(const n of t){if(!n)continue;const s=n[e];if(typeof s<"u")return s}}function i_(e){let t=e._keys;return t||(t=e._keys=XB(e._scopes)),t}function XB(e){const t=new Set;for(const n of e)for(const s of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(s);return Array.from(t)}function j0(e,t,n,s){const{iScale:i}=e,{key:o="r"}=this._parsing,r=new Array(s);let a,l,c,u;for(a=0,l=s;a<l;++a)c=a+n,u=t[c],r[a]={r:i.parse(Fi(u,o),c)};return r}const QB=Number.EPSILON||1e-14,Mr=(e,t)=>t<e.length&&!e[t].skip&&e[t],W0=e=>e==="x"?"y":"x";function ZB(e,t,n,s){const i=e.skip?t:e,o=t,r=n.skip?t:n,a=ch(o,i),l=ch(r,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=s*c,f=s*u;return{previous:{x:o.x-d*(r.x-i.x),y:o.y-d*(r.y-i.y)},next:{x:o.x+f*(r.x-i.x),y:o.y+f*(r.y-i.y)}}}function e4(e,t,n){const s=e.length;let i,o,r,a,l,c=Mr(e,0);for(let u=0;u<s-1;++u)if(l=c,c=Mr(e,u+1),!(!l||!c)){if(Ca(t[u],0,QB)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],o=n[u+1]/t[u],a=Math.pow(i,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),n[u]=i*r*t[u],n[u+1]=o*r*t[u])}}function t4(e,t,n="x"){const s=W0(n),i=e.length;let o,r,a,l=Mr(e,0);for(let c=0;c<i;++c){if(r=a,a=l,l=Mr(e,c+1),!a)continue;const u=a[n],d=a[s];r&&(o=(u-r[n])/3,a[`cp1${n}`]=u-o,a[`cp1${s}`]=d-o*t[c]),l&&(o=(l[n]-u)/3,a[`cp2${n}`]=u+o,a[`cp2${s}`]=d+o*t[c])}}function n4(e,t="x"){const n=W0(t),s=e.length,i=Array(s).fill(0),o=Array(s);let r,a,l,c=Mr(e,0);for(r=0;r<s;++r)if(a=l,l=c,c=Mr(e,r+1),!!l){if(c){const u=c[t]-l[t];i[r]=u!==0?(c[n]-l[n])/u:0}o[r]=a?c?Es(i[r-1])!==Es(i[r])?0:(i[r-1]+i[r])/2:i[r-1]:i[r]}e4(e,i,o),t4(e,o,t)}function Yl(e,t,n){return Math.max(Math.min(e,n),t)}function s4(e,t){let n,s,i,o,r,a=Js(e[0],t);for(n=0,s=e.length;n<s;++n)r=o,o=a,a=n<s-1&&Js(e[n+1],t),o&&(i=e[n],r&&(i.cp1x=Yl(i.cp1x,t.left,t.right),i.cp1y=Yl(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=Yl(i.cp2x,t.left,t.right),i.cp2y=Yl(i.cp2y,t.top,t.bottom)))}function i4(e,t,n,s,i){let o,r,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")n4(e,i);else{let c=s?e[e.length-1]:e[0];for(o=0,r=e.length;o<r;++o)a=e[o],l=ZB(c,a,e[Math.min(o+1,r-(s?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&s4(e,n)}function tp(){return typeof window<"u"&&typeof document<"u"}function np(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Bc(e,t,n){let s;return typeof e=="string"?(s=parseInt(e,10),e.indexOf("%")!==-1&&(s=s/100*t.parentNode[n])):s=e,s}const wu=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function o4(e,t){return wu(e).getPropertyValue(t)}const r4=["top","right","bottom","left"];function $o(e,t,n){const s={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=r4[i];s[o]=parseFloat(e[t+"-"+o+n])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const a4=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function l4(e,t){const n=e.touches,s=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=s;let r=!1,a,l;if(a4(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function po(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:s}=t,i=wu(n),o=i.boxSizing==="border-box",r=$o(i,"padding"),a=$o(i,"border","width"),{x:l,y:c,box:u}=l4(e,n),d=r.left+(u&&a.left),f=r.top+(u&&a.top);let{width:p,height:m}=t;return o&&(p-=r.width+a.width,m-=r.height+a.height),{x:Math.round((l-d)/p*n.width/s),y:Math.round((c-f)/m*n.height/s)}}function c4(e,t,n){let s,i;if(t===void 0||n===void 0){const o=np(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const r=o.getBoundingClientRect(),a=wu(o),l=$o(a,"border","width"),c=$o(a,"padding");t=r.width-c.width-l.width,n=r.height-c.height-l.height,s=Bc(a.maxWidth,o,"clientWidth"),i=Bc(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:s||Nc,maxHeight:i||Nc}}const Ul=e=>Math.round(e*10)/10;function u4(e,t,n,s){const i=wu(e),o=$o(i,"margin"),r=Bc(i.maxWidth,e,"clientWidth")||Nc,a=Bc(i.maxHeight,e,"clientHeight")||Nc,l=c4(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=$o(i,"border","width"),p=$o(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,s?c/s:u-o.height),c=Ul(Math.min(c,r,l.maxWidth)),u=Ul(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Ul(c/2)),(t!==void 0||n!==void 0)&&s&&l.height&&u>l.height&&(u=l.height,c=Ul(Math.floor(u*s))),{width:c,height:u}}function o_(e,t,n){const s=t||1,i=Math.floor(e.height*s),o=Math.floor(e.width*s);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const r=e.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),e.currentDevicePixelRatio!==s||r.height!==i||r.width!==o?(e.currentDevicePixelRatio=s,r.height=i,r.width=o,e.ctx.setTransform(s,0,0,s,0,0),!0):!1}const d4=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};tp()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function r_(e,t){const n=o4(e,t),s=n&&n.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function go(e,t,n,s){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function h4(e,t,n,s){return{x:e.x+n*(t.x-e.x),y:s==="middle"?n<.5?e.y:t.y:s==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function f4(e,t,n,s){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},r=go(e,i,n),a=go(i,o,n),l=go(o,t,n),c=go(r,a,n),u=go(a,l,n);return go(c,u,n)}const p4=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,s){return n-s},leftForLtr(n,s){return n-s}}},g4=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function dr(e,t,n){return e?p4(t,n):g4()}function z0(e,t){let n,s;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,s=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=s)}function Y0(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function U0(e){return e==="angle"?{between:Ga,compare:mB,normalize:Dn}:{between:qs,compare:(t,n)=>t-n,normalize:t=>t}}function a_({start:e,end:t,count:n,loop:s,style:i}){return{start:e%n,end:t%n,loop:s&&(t-e+1)%n===0,style:i}}function m4(e,t,n){const{property:s,start:i,end:o}=n,{between:r,normalize:a}=U0(s),l=t.length;let{start:c,end:u,loop:d}=e,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&r(a(t[c%l][s]),i,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function K0(e,t,n){if(!n)return[e];const{property:s,start:i,end:o}=n,r=t.length,{compare:a,between:l,normalize:c}=U0(s),{start:u,end:d,loop:f,style:p}=m4(e,t,n),m=[];let _=!1,b=null,w,A,$;const M=()=>l(i,$,w)&&a(i,$)!==0,k=()=>a(o,w)===0||l(o,$,w),y=()=>_||M(),x=()=>!_||k();for(let C=u,P=u;C<=d;++C)A=t[C%r],!A.skip&&(w=c(A[s]),w!==$&&(_=l(w,i,o),b===null&&y()&&(b=a(w,i)===0?C:P),b!==null&&x()&&(m.push(a_({start:b,end:C,loop:f,count:r,style:p})),b=null),P=C,$=w));return b!==null&&m.push(a_({start:b,end:d,loop:f,count:r,style:p})),m}function q0(e,t){const n=[],s=e.segments;for(let i=0;i<s.length;i++){const o=K0(s[i],e.points,t);o.length&&n.push(...o)}return n}function _4(e,t,n,s){let i=0,o=t-1;if(n&&!s)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function v4(e,t,n,s){const i=e.length,o=[];let r=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%i,end:(l-1)%i,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%i,end:r%i,loop:s}),o}function b4(e,t){const n=e.points,s=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:r,end:a}=_4(n,i,o,s);if(s===!0)return l_(e,[{start:r,end:a,loop:o}],n,t);const l=a<r?a+i:a,c=!!e._fullLoop&&r===0&&a===i-1;return l_(e,v4(n,r,l,c),n,t)}function l_(e,t,n,s){return!s||!s.setContext||!n?t:y4(e,t,n,s)}function y4(e,t,n,s){const i=e._chart.getContext(),o=c_(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=n.length,c=[];let u=o,d=t[0].start,f=d;function p(m,_,b,w){const A=a?-1:1;if(m!==_){for(m+=l;n[m%l].skip;)m-=A;for(;n[_%l].skip;)_+=A;m%l!==_%l&&(c.push({start:m%l,end:_%l,loop:b,style:w}),u=w,d=_%l)}}for(const m of t){d=a?d:m.start;let _=n[d%l],b;for(f=d+1;f<=m.end;f++){const w=n[f%l];b=c_(s.setContext(Ki(i,{type:"segment",p0:_,p1:w,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:r}))),w4(b,u)&&p(d,f-1,m.loop,u),_=w,u=b}d<f-1&&p(d,f-1,m.loop,u)}return c}function c_(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function w4(e,t){if(!t)return!1;const n=[],s=function(i,o){return Jf(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,s)!==JSON.stringify(t,s)}/*!
|
|
* Chart.js v4.4.1
|
|
* https://www.chartjs.org
|
|
* (c) 2023 Chart.js Contributors
|
|
* Released under the MIT License
|
|
*/class x4{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,s,i){const o=n.listeners[i],r=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(s-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=M0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,s,t,"progress")),o.length||(s.running=!1,this._notify(i,s,t,"complete"),s.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let s=n.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,s)),s}listen(t,n,s){this._getAnims(t).listeners[n].push(s)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const s=n.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Hs=new x4;const u_="transparent",k4={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const s=e_(e||u_),i=s.valid&&e_(t||u_);return i&&i.valid?i.mix(s,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class S4{constructor(t,n,s,i){const o=n[s];i=ca([t.to,i,o,t.from]);const r=ca([t.from,o,i]);this._active=!0,this._fn=t.fn||k4[t.type||typeof r],this._easing=Ea[t.easing]||Ea.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=s,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,s){if(this._active){this._notify(!1);const i=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ca([t.to,n,i,t.from]),this._from=ca([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,s=this._duration,i=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||n<s),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,s)=>{t.push({res:n,rej:s})})}_notify(t){const n=t?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class G0{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!st(t))return;const n=Object.keys(Ct.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!st(o))return;const r={};for(const a of n)r[a]=o[a];(bt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,n){const s=n.options,i=$4(t,s);if(!i)return[];const o=this._createAnimations(i,s);return s.$shared&&A4(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,n){const s=this._properties,i=[],o=t.$animations||(t.$animations={}),r=Object.keys(n),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=s.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new S4(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const s=this._createAnimations(t,n);if(s.length)return Hs.add(this._chart,s),!0}}function A4(e,t){const n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){const o=e[s[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function $4(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function d_(e,t){const n=e&&e.options||{},s=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:s?o:i,end:s?i:o}}function C4(e,t,n){if(n===!1)return!1;const s=d_(e,n),i=d_(t,n);return{top:i.end,right:s.end,bottom:i.start,left:s.start}}function E4(e){let t,n,s,i;return st(e)?(t=e.top,n=e.right,s=e.bottom,i=e.left):t=n=s=i=e,{top:t,right:n,bottom:s,left:i,disabled:e===!1}}function J0(e,t){const n=[],s=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=s.length;i<o;++i)n.push(s[i].index);return n}function h_(e,t,n,s={}){const i=e.keys,o=s.mode==="single";let r,a,l,c;if(t!==null){for(r=0,a=i.length;r<a;++r){if(l=+i[r],l===n){if(s.all)continue;break}c=e.values[l],$t(c)&&(o||t===0||Es(t)===Es(c))&&(t+=c)}return t}}function P4(e){const t=Object.keys(e),n=new Array(t.length);let s,i,o;for(s=0,i=t.length;s<i;++s)o=t[s],n[s]={x:o,y:e[o]};return n}function f_(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function T4(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function M4(e){const{min:t,max:n,minDefined:s,maxDefined:i}=e.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function D4(e,t,n){const s=e[t]||(e[t]={});return s[n]||(s[n]={})}function p_(e,t,n,s){for(const i of t.getMatchingVisibleMetas(s).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function g_(e,t){const{chart:n,_cachedMeta:s}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,u=T4(o,r,s),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:_,[c]:b}=m,w=m._stacks||(m._stacks={});f=w[c]=D4(i,u,_),f[a]=b,f._top=p_(f,r,!0,s.type),f._bottom=p_(f,r,!1,s.type);const A=f._visualValues||(f._visualValues={});A[a]=b}}function bd(e,t){const n=e.scales;return Object.keys(n).filter(s=>n[s].axis===t).shift()}function O4(e,t){return Ki(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function I4(e,t,n){return Ki(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ta(e,t){const n=e.controller.index,s=e.vScale&&e.vScale.axis;if(s){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[s]===void 0||o[s][n]===void 0)return;delete o[s][n],o[s]._visualValues!==void 0&&o[s]._visualValues[n]!==void 0&&delete o[s]._visualValues[n]}}}const yd=e=>e==="reset"||e==="none",m_=(e,t)=>t?e:Object.assign({},e),R4=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:J0(n,!0),values:null};class us{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=f_(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ta(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,s=this.getDataset(),i=(d,f,p,m)=>d==="x"?f:d==="r"?m:p,o=n.xAxisID=Ge(s.xAxisID,bd(t,"x")),r=n.yAxisID=Ge(s.yAxisID,bd(t,"y")),a=n.rAxisID=Ge(s.rAxisID,bd(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,r,a),u=n.vAxisID=i(l,r,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Xm(this._data,this),t._stacked&&ta(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),s=this._data;if(st(n))this._data=P4(n);else if(s!==n){if(s){Xm(s,this);const i=this._cachedMeta;ta(i),i._parsed=[]}n&&Object.isExtensible(n)&&yB(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=f_(n.vScale,n),n.stack!==s.stack&&(i=!0,ta(n),n.stack=s.stack),this._resyncElements(t),(i||o!==n._stacked)&&g_(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:s,_data:i}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&n===i.length?!0:s._sorted,c=t>0&&s._parsed[t-1],u,d,f;if(this._parsing===!1)s._parsed=i,s._sorted=!0,f=i;else{bt(i[t])?f=this.parseArrayData(s,i,t,n):st(i[t])?f=this.parseObjectData(s,i,t,n):f=this.parsePrimitiveData(s,i,t,n);const p=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)s._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);s._sorted=l}r&&g_(this,f)}parsePrimitiveData(t,n,s,i){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),u=o===r,d=new Array(i);let f,p,m;for(f=0,p=i;f<p;++f)m=f+s,d[f]={[a]:u||o.parse(c[m],m),[l]:r.parse(n[m],m)};return d}parseArrayData(t,n,s,i){const{xScale:o,yScale:r}=t,a=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+s,d=n[u],a[l]={x:o.parse(d[0],u),y:r.parse(d[1],u)};return a}parseObjectData(t,n,s,i){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+s,p=n[f],c[u]={x:o.parse(Fi(p,a),f),y:r.parse(Fi(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,s){const i=this.chart,o=this._cachedMeta,r=n[t.axis],a={keys:J0(i,!0),values:n._stacks[t.axis]._visualValues};return h_(a,r,o.index,{mode:s})}updateRangeFromParsed(t,n,s,i){const o=s[n.axis];let r=o===null?NaN:o;const a=i&&s._stacks[n.axis];i&&a&&(i.values=a,r=h_(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){const s=this._cachedMeta,i=s._parsed,o=s._sorted&&t===s.iScale,r=i.length,a=this._getOtherScale(t),l=R4(n,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=M4(a);let f,p;function m(){p=i[f];const _=p[a.axis];return!$t(p[t.axis])||u>_||d<_}for(f=0;f<r&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=r-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,s=[];let i,o,r;for(i=0,o=n.length;i<o;++i)r=n[i][t.axis],$t(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,s=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=E4(Ge(this.options.clip,C4(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,s=this._cachedMeta,i=s.data||[],o=n.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(s.dataset&&s.dataset.draw(t,o,a,l),u=a;u<a+l;++u){const d=i[u];d.hidden||(d.active&&c?r.push(d):d.draw(t,o))}for(u=0;u<r.length;++u)r[u].draw(t,o)}getStyle(t,n){const s=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,n,s){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=I4(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=O4(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",s){const i=n==="active",o=this._cachedDataOpts,r=t+"-"+n,a=o[r],l=this.enableOptionSharing&&qa(s);if(a)return m_(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Ct.elements[t]),m=()=>this.getContext(s,i,n),_=c.resolveNamedOptions(f,p,m,d);return _.$shared&&(_.$shared=l,o[r]=Object.freeze(m_(_,l))),_}_resolveAnimations(t,n,s){const i=this.chart,o=this._cachedDataOpts,r=`animation-${n}`,a=o[r];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,s,n))}const c=new G0(i,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||yd(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const s=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,s),{sharedOptions:o,includeOptions:r}}updateElement(t,n,s,i){yd(i)?Object.assign(t,s):this._resolveAnimations(n,i).update(t,s)}updateSharedOptions(t,n,s){t&&!yd(n)&&this._resolveAnimations(void 0,n).update(t,s)}_setStyle(t,n,s,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,s,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,n,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=s.length,o=n.length,r=Math.min(o,i);r&&this.parse(0,r),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,s=!0){const i=this._cachedMeta,o=i.data,r=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=r;a--)c[a]=c[a-n]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),s&&this.updateElements(o,t,n,"reset")}updateElements(t,n,s,i){}_removeElements(t,n){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(t,n);s._stacked&&ta(s,i)}s.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,s,i]=t;this[n](s,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}le(us,"defaults",{}),le(us,"datasetElementType",null),le(us,"dataElementType",null);function L4(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let s=[];for(let i=0,o=n.length;i<o;i++)s=s.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=T0(s.sort((i,o)=>i-o))}return e._cache.$bar}function N4(e){const t=e.iScale,n=L4(t,e.type);let s=t._length,i,o,r,a;const l=()=>{r===32767||r===-32768||(qa(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(i=0,o=n.length;i<o;++i)r=t.getPixelForValue(n[i]),l();for(a=void 0,i=0,o=t.ticks.length;i<o;++i)r=t.getPixelForTick(i),l();return s}function F4(e,t,n,s){const i=n.barThickness;let o,r;return ot(i)?(o=t.min*n.categoryPercentage,r=n.barPercentage):(o=i*s,r=1),{chunk:o/s,ratio:r,start:t.pixels[e]-o/2}}function B4(e,t,n,s){const i=t.pixels,o=i[e];let r=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/s,ratio:n.barPercentage,start:c}}function V4(e,t,n,s){const i=n.parse(e[0],s),o=n.parse(e[1],s),r=Math.min(i,o),a=Math.max(i,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:r,max:a}}function X0(e,t,n,s){return bt(e)?V4(e,t,n,s):t[n.axis]=n.parse(e,s),t}function __(e,t,n,s){const i=e.iScale,o=e.vScale,r=i.getLabels(),a=i===o,l=[];let c,u,d,f;for(c=n,u=n+s;c<u;++c)f=t[c],d={},d[i.axis]=a||i.parse(r[c],c),l.push(X0(f,d,o,c));return l}function wd(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function H4(e,t,n){return e!==0?Es(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function j4(e){let t,n,s,i,o;return e.horizontal?(t=e.base>e.x,n="left",s="right"):(t=e.base<e.y,n="bottom",s="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:s,reverse:t,top:i,bottom:o}}function W4(e,t,n,s){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:u}=j4(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===s?i=c:(n._bottom||0)===s?i=u:(o[v_(u,r,a,l)]=!0,i=c)),o[v_(i,r,a,l)]=!0,e.borderSkipped=o}function v_(e,t,n,s){return s?(e=z4(e,t,n),e=b_(e,n,t)):e=b_(e,t,n),e}function z4(e,t,n){return e===t?n:e===n?t:e}function b_(e,t,n){return e==="start"?t:e==="end"?n:e}function Y4(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Ta extends us{parsePrimitiveData(t,n,s,i){return __(t,n,s,i)}parseArrayData(t,n,s,i){return __(t,n,s,i)}parseObjectData(t,n,s,i){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,u=r.axis==="x"?a:l,d=[];let f,p,m,_;for(f=s,p=s+i;f<p;++f)_=n[f],m={},m[o.axis]=o.parse(Fi(_,c),f),d.push(X0(Fi(_,u),m,r,f));return d}updateRangeFromParsed(t,n,s,i){super.updateRangeFromParsed(t,n,s,i);const o=s._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:s,vScale:i}=n,o=this.getParsed(t),r=o._custom,a=wd(r)?"["+r.start+", "+r.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,s,i){const o=i==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+s;p++){const m=this.getParsed(p),_=o||ot(m[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),b=this._calculateBarIndexPixels(p,u),w=(m._stacks||{})[a.axis],A={horizontal:c,base:_.base,enableBorderRadius:!w||wd(m._custom)||r===w._top||r===w._bottom,x:c?_.head:b.center,y:c?b.center:_.head,height:c?b.size:Math.abs(_.size),width:c?Math.abs(_.size):b.size};f&&(A.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const $=A.options||t[p].options;W4(A,$,w,r),Y4(A,$,u.ratio),this.updateElement(t[p],p,A,i)}}_getStacks(t,n){const{iScale:s}=this._cachedMeta,i=s.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=s.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(ot(u)||isNaN(u))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||r.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&r.push(l.stack),l.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,s){const i=this._getStacks(t,s),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,s=n.iScale,i=[];let o,r;for(o=0,r=n.data.length;o<r;++o)i.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const a=t.barThickness;return{min:a||N4(n),pixels:i,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:s,index:i},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,u=wd(c);let d=l[n.axis],f=0,p=s?this.applyStack(n,l,s):d,m,_;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Es(d)!==Es(c.barEnd)&&(f=0),f+=d);const b=!ot(o)&&!u?o:f;let w=n.getPixelForValue(b);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=w,_=m-w,Math.abs(_)<r){_=H4(_,n,a)*r,d===a&&(w-=_/2);const A=n.getPixelForDecimal(0),$=n.getPixelForDecimal(1),M=Math.min(A,$),k=Math.max(A,$);w=Math.max(Math.min(w,k),M),m=w+_,s&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(w))}if(w===n.getPixelForValue(a)){const A=Es(_)*n.getLineWidthForValue(a)/2;w+=A,_-=A}return{size:_,base:w,head:m,center:m+_/2}}_calculateBarIndexPixels(t,n){const s=n.scale,i=this.options,o=i.skipNull,r=Ge(i.maxBarThickness,1/0);let a,l;if(n.grouped){const c=o?this._getStackCount(t):n.stackCount,u=i.barThickness==="flex"?B4(t,n,i,c):F4(t,n,i,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(r,u.chunk*u.ratio)}else a=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(r,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,s=t.data,i=s.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&s[o].draw(this._ctx)}}le(Ta,"id","bar"),le(Ta,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),le(Ta,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class pc extends us{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,s,i){const o=super.parsePrimitiveData(t,n,s,i);for(let r=0;r<o.length;r++)o[r]._custom=this.resolveDataElementOptions(r+s).radius;return o}parseArrayData(t,n,s,i){const o=super.parseArrayData(t,n,s,i);for(let r=0;r<o.length;r++){const a=n[s+r];o[r]._custom=Ge(a[2],this.resolveDataElementOptions(r+s).radius)}return o}parseObjectData(t,n,s,i){const o=super.parseObjectData(t,n,s,i);for(let r=0;r<o.length;r++){const a=n[s+r];o[r]._custom=Ge(a&&a.r&&+a.r,this.resolveDataElementOptions(r+s).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let s=t.length-1;s>=0;--s)n=Math.max(n,t[s].size(this.resolveDataElementOptions(s))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:i,yScale:o}=n,r=this.getParsed(t),a=i.getLabelForValue(r.x),l=o.getLabelForValue(r.y),c=r._custom;return{label:s[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,s,i){const o=i==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),u=r.axis,d=a.axis;for(let f=n;f<n+s;f++){const p=t[f],m=!o&&this.getParsed(f),_={},b=_[u]=o?r.getPixelForDecimal(.5):r.getPixelForValue(m[u]),w=_[d]=o?a.getBasePixel():a.getPixelForValue(m[d]);_.skip=isNaN(b)||isNaN(w),c&&(_.options=l||this.resolveDataElementOptions(f,p.active?"active":i),o&&(_.options.radius=0)),this.updateElement(p,f,_,i)}}resolveDataElementOptions(t,n){const s=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const o=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Ge(s&&s._custom,o),i}}le(pc,"id","bubble"),le(pc,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),le(pc,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function U4(e,t,n){let s=1,i=1,o=0,r=0;if(t<yt){const a=e,l=a+t,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),p=($,M,k)=>Ga($,a,l,!0)?1:Math.max(M,M*n,k,k*n),m=($,M,k)=>Ga($,a,l,!0)?-1:Math.min(M,M*n,k,k*n),_=p(0,c,d),b=p(Rt,u,f),w=m(wt,c,d),A=m(wt+Rt,u,f);s=(_-w)/2,i=(b-A)/2,o=-(_+w)/2,r=-(b+A)/2}return{ratioX:s,ratioY:i,offsetX:o,offsetY:r}}class or extends us{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const s=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=s;else{let o=l=>+s[l];if(st(s[t])){const{key:l="value"}=this._parsing;o=c=>+Fi(s[c],l)}let r,a;for(r=t,a=t+n;r<a;++r)i._parsed[r]=o(r)}}_getRotation(){return as(this.options.rotation-90)}_getCircumference(){return as(this.options.circumference)}_getRotationExtents(){let t=yt,n=-yt;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const i=this.chart.getDatasetMeta(s).controller,o=i._getRotation(),r=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+r)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:s}=n,i=this._cachedMeta,o=i.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(s.width,s.height)-r)/2,0),l=Math.min(rB(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:_}=U4(d,u,l),b=(s.width-r)/f,w=(s.height-r)/p,A=Math.max(Math.min(b,w)/2,0),$=A0(this.options.radius,A),M=Math.max($*l,0),k=($-M)/this._getVisibleDatasetWeightTotal();this.offsetX=m*$,this.offsetY=_*$,i.total=this.calculateTotal(),this.outerRadius=$-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const s=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/yt)}updateElements(t,n,s,i){const o=i==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:_,includeOptions:b}=this._getSharedOptions(n,i);let w=this._getRotation(),A;for(A=0;A<n;++A)w+=this._circumference(A,o);for(A=n;A<n+s;++A){const $=this._circumference(A,o),M=t[A],k={x:u+this.offsetX,y:d+this.offsetY,startAngle:w,endAngle:w+$,circumference:$,outerRadius:m,innerRadius:p};b&&(k.options=_||this.resolveDataElementOptions(A,M.active?"active":i)),w+=$,this.updateElement(M,A,k,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let s=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?yt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],o=dl(n._parsed[t],s.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const s=this.chart;let i,o,r,a,l;if(!t){for(i=0,o=s.data.datasets.length;i<o;++i)if(s.isDatasetVisible(i)){r=s.getDatasetMeta(i),t=r.data,a=r.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let s=0,i=t.length;s<i;++s){const o=this.resolveDataElementOptions(s);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n}_getRingWeight(t){return Math.max(Ge(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}le(or,"id","doughnut"),le(or,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),le(or,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),le(or,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=t.legend.options;return n.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}});class Ma extends us{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:s,data:i=[],_dataset:o}=n,r=this.chart._animationsDisabled;let{start:a,count:l}=O0(n,i,r);this._drawStart=a,this._drawCount=l,I0(n)&&(a=0,l=i.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,s,i){const o=i==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=r.axis,p=a.axis,{spanGaps:m,segment:_}=this.options,b=Pr(m)?m:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||o||i==="none",A=n+s,$=t.length;let M=n>0&&this.getParsed(n-1);for(let k=0;k<$;++k){const y=t[k],x=w?y:{};if(k<n||k>=A){x.skip=!0;continue}const C=this.getParsed(k),P=ot(C[p]),E=x[f]=r.getPixelForValue(C[f],k),B=x[p]=o||P?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,C,l):C[p],k);x.skip=isNaN(E)||isNaN(B)||P,x.stop=k>0&&Math.abs(C[f]-M[f])>b,_&&(x.parsed=C,x.raw=c.data[k]),d&&(x.options=u||this.resolveDataElementOptions(k,y.active?"active":i)),w||this.updateElement(y,k,x,i),M=C}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,s=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return s;const o=i[0].size(this.resolveDataElementOptions(0)),r=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}le(Ma,"id","line"),le(Ma,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),le(Ma,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class gc extends us{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],o=dl(n._parsed[t].r,s.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,s,i){return j0.bind(this)(t,n,s,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,s=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),r=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),a=(o-r)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,s,i){const o=i==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*wt;let p=f,m;const _=360/this.countVisibleElements();for(m=0;m<n;++m)p+=this._computeAngle(m,i,_);for(m=n;m<n+s;m++){const b=t[m];let w=p,A=p+this._computeAngle(m,i,_),$=r.getDataVisibility(m)?c.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=A,o&&(l.animateScale&&($=0),l.animateRotate&&(w=A=f));const M={x:u,y:d,innerRadius:0,outerRadius:$,startAngle:w,endAngle:A,options:this.resolveDataElementOptions(m,b.active?"active":i)};this.updateElement(b,m,M,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((s,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,s){return this.chart.getDataVisibility(t)?as(this.resolveDataElementOptions(t,n).angle||s):0}}le(gc,"id","polarArea"),le(gc,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),le(gc,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=t.legend.options;return n.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class hh extends or{}le(hh,"id","pie"),le(hh,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class mc extends us{getLabelAndValue(t){const n=this._cachedMeta.vScale,s=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(s[n.axis])}}parseObjectData(t,n,s,i){return j0.bind(this)(t,n,s,i)}update(t){const n=this._cachedMeta,s=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(s.points=i,t!=="resize"){const r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:r};this.updateElement(s,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,s,i){const o=this._cachedMeta.rScale,r=i==="reset";for(let a=n;a<n+s;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=o.getPointPositionForValue(a,this.getParsed(a).r),d=r?o.xCenter:u.x,f=r?o.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,p,i)}}}le(mc,"id","radar"),le(mc,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),le(mc,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class _c extends us{getLabelAndValue(t){const n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:i,yScale:o}=n,r=this.getParsed(t),a=i.getLabelForValue(r.x),l=o.getLabelForValue(r.y);return{label:s[t]||"",value:"("+a+", "+l+")"}}update(t){const n=this._cachedMeta,{data:s=[]}=n,i=this.chart._animationsDisabled;let{start:o,count:r}=O0(n,s,i);if(this._drawStart=o,this._drawCount=r,I0(n)&&(o=0,r=s.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=s;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(s,o,r,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,s,i){const o=i==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),d=this.getSharedOptions(u),f=this.includeOptions(i,d),p=r.axis,m=a.axis,{spanGaps:_,segment:b}=this.options,w=Pr(_)?_:Number.POSITIVE_INFINITY,A=this.chart._animationsDisabled||o||i==="none";let $=n>0&&this.getParsed(n-1);for(let M=n;M<n+s;++M){const k=t[M],y=this.getParsed(M),x=A?k:{},C=ot(y[m]),P=x[p]=r.getPixelForValue(y[p],M),E=x[m]=o||C?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,y,l):y[m],M);x.skip=isNaN(P)||isNaN(E)||C,x.stop=M>0&&Math.abs(y[p]-$[p])>w,b&&(x.parsed=y,x.raw=c.data[M]),f&&(x.options=d||this.resolveDataElementOptions(M,k.active?"active":i)),A||this.updateElement(k,M,x,i),$=y}this.updateSharedOptions(d,i,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const s=t.dataset,i=s.options&&s.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,r)/2}}le(_c,"id","scatter"),le(_c,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),le(_c,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function co(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sp{constructor(t){le(this,"options");this.options=t||{}}static override(t){Object.assign(sp.prototype,t)}init(){}formats(){return co()}parse(){return co()}format(){return co()}add(){return co()}diff(){return co()}startOf(){return co()}endOf(){return co()}}var K4={_date:sp};function q4(e,t,n,s){const{controller:i,data:o,_sorted:r}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?vB:Gs;if(s){if(i._sharedOptions){const c=o[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(o,t,n-u),f=l(o,t,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function hl(e,t,n,s,i){const o=e.getSortedVisibleDatasetMetas(),r=n[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:d,hi:f}=q4(o[a],t,r,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||s(m,c,p)}}}function G4(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(s,i){const o=t?Math.abs(s.x-i.x):0,r=n?Math.abs(s.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function xd(e,t,n,s,i){const o=[];return!i&&!e.isPointInArea(t)||hl(e,n,t,function(a,l,c){!i&&!Js(a,e.chartArea,0)||a.inRange(t.x,t.y,s)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function J4(e,t,n,s){let i=[];function o(r,a,l){const{startAngle:c,endAngle:u}=r.getProps(["startAngle","endAngle"],s),{angle:d}=E0(r,{x:t.x,y:t.y});Ga(d,c,u)&&i.push({element:r,datasetIndex:a,index:l})}return hl(e,n,t,o),i}function X4(e,t,n,s,i,o){let r=[];const a=G4(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(s&&!p)return;const m=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(m))&&!p)return;const b=a(t,m);b<l?(r=[{element:u,datasetIndex:d,index:f}],l=b):b===l&&r.push({element:u,datasetIndex:d,index:f})}return hl(e,n,t,c),r}function kd(e,t,n,s,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!s?J4(e,t,n,i):X4(e,t,n,s,i,o)}function y_(e,t,n,s,i){const o=[],r=n==="x"?"inXRange":"inYRange";let a=!1;return hl(e,n,t,(l,c,u)=>{l[r](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),s&&!a?[]:o}var Q4={evaluateInteractionItems:hl,modes:{index(e,t,n,s){const i=po(t,e),o=n.axis||"x",r=n.includeInvisible||!1,a=n.intersect?xd(e,i,o,s,r):kd(e,i,o,!1,s,r),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,s){const i=po(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;let a=n.intersect?xd(e,i,o,s,r):kd(e,i,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,s){const i=po(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;return xd(e,i,o,s,r)},nearest(e,t,n,s){const i=po(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;return kd(e,i,o,n.intersect,s,r)},x(e,t,n,s){const i=po(t,e);return y_(e,i,"x",n.intersect,s)},y(e,t,n,s){const i=po(t,e);return y_(e,i,"y",n.intersect,s)}}};const Q0=["left","top","right","bottom"];function na(e,t){return e.filter(n=>n.pos===t)}function w_(e,t){return e.filter(n=>Q0.indexOf(n.pos)===-1&&n.box.axis===t)}function sa(e,t){return e.sort((n,s)=>{const i=t?s:n,o=t?n:s;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function Z4(e){const t=[];let n,s,i,o,r,a;for(n=0,s=(e||[]).length;n<s;++n)i=e[n],{position:o,options:{stack:r,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:r&&o+r,stackWeight:a});return t}function eV(e){const t={};for(const n of e){const{stack:s,pos:i,stackWeight:o}=n;if(!s||!Q0.includes(i))continue;const r=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function tV(e,t){const n=eV(e),{vBoxMaxWidth:s,hBoxMaxHeight:i}=t;let o,r,a;for(o=0,r=e.length;o<r;++o){a=e[o];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*s:l&&t.availableWidth,a.height=i):(a.width=s,a.height=u?u*i:l&&t.availableHeight)}return n}function nV(e){const t=Z4(e),n=sa(t.filter(c=>c.box.fullSize),!0),s=sa(na(t,"left"),!0),i=sa(na(t,"right")),o=sa(na(t,"top"),!0),r=sa(na(t,"bottom")),a=w_(t,"x"),l=w_(t,"y");return{fullSize:n,leftAndTop:s.concat(o),rightAndBottom:i.concat(l).concat(r).concat(a),chartArea:na(t,"chartArea"),vertical:s.concat(i).concat(l),horizontal:o.concat(r).concat(a)}}function x_(e,t,n,s){return Math.max(e[n],t[n])+Math.max(e[s],t[s])}function Z0(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function sV(e,t,n,s){const{pos:i,box:o}=n,r=e.maxPadding;if(!st(i)){n.size&&(e[i]-=n.size);const d=s[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&Z0(r,o.getPadding());const a=Math.max(0,t.outerWidth-x_(r,e,"left","right")),l=Math.max(0,t.outerHeight-x_(r,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function iV(e){const t=e.maxPadding;function n(s){const i=Math.max(t[s]-e[s],0);return e[s]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function oV(e,t){const n=t.maxPadding;function s(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(r=>{o[r]=Math.max(t[r],n[r])}),o}return s(e?["left","right"]:["top","bottom"])}function ua(e,t,n,s){const i=[];let o,r,a,l,c,u;for(o=0,r=e.length,c=0;o<r;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,oV(a.horizontal,t));const{same:d,other:f}=sV(t,n,a,s);c|=d&&i.length,u=u||f,l.fullSize||i.push(a)}return c&&ua(i,t,n,s)||u}function Kl(e,t,n,s,i){e.top=n,e.left=t,e.right=t+s,e.bottom=n+i,e.width=s,e.height=i}function k_(e,t,n,s){const i=n.padding;let{x:o,y:r}=t;for(const a of e){const l=a.box,c=s[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*u,f=c.size||l.height;qa(c.start)&&(r=c.start),l.fullSize?Kl(l,i.left,r,n.outerWidth-i.right-i.left,f):Kl(l,t.left+c.placed,r,d,f),c.start=r,c.placed+=d,r=l.bottom}else{const d=t.h*u,f=c.size||l.width;qa(c.start)&&(o=c.start),l.fullSize?Kl(l,o,i.top,f,n.outerHeight-i.bottom-i.top):Kl(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=r}var Gn={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,s){if(!e)return;const i=fn(e.options.layout.padding),o=Math.max(t-i.width,0),r=Math.max(n-i.height,0),a=nV(e.boxes),l=a.vertical,c=a.horizontal;ut(e.boxes,_=>{typeof _.beforeLayout=="function"&&_.beforeLayout()});const u=l.reduce((_,b)=>b.box.options&&b.box.options.display===!1?_:_+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),f=Object.assign({},i);Z0(f,fn(s));const p=Object.assign({maxPadding:f,w:o,h:r,x:i.left,y:i.top},i),m=tV(l.concat(c),d);ua(a.fullSize,p,d,m),ua(l,p,d,m),ua(c,p,d,m)&&ua(l,p,d,m),iV(p),k_(a.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,k_(a.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},ut(a.chartArea,_=>{const b=_.box;Object.assign(b,e.chartArea),b.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class e1{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,s){}removeEventListener(t,n,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,s,i){return n=Math.max(0,n||t.width),s=s||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):s)}}isAttached(t){return!0}updateConfig(t){}}class rV extends e1{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const vc="$chartjs",aV={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},S_=e=>e===null||e==="";function lV(e,t){const n=e.style,s=e.getAttribute("height"),i=e.getAttribute("width");if(e[vc]={initial:{height:s,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",S_(i)){const o=r_(e,"width");o!==void 0&&(e.width=o)}if(S_(s))if(e.style.height==="")e.height=e.width/(t||2);else{const o=r_(e,"height");o!==void 0&&(e.height=o)}return e}const t1=d4?{passive:!0}:!1;function cV(e,t,n){e.addEventListener(t,n,t1)}function uV(e,t,n){e.canvas.removeEventListener(t,n,t1)}function dV(e,t){const n=aV[e.type]||e.type,{x:s,y:i}=po(e,t);return{type:n,chart:t,native:e,x:s!==void 0?s:null,y:i!==void 0?i:null}}function Vc(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function hV(e,t,n){const s=e.canvas,i=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Vc(a.addedNodes,s),r=r&&!Vc(a.removedNodes,s);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function fV(e,t,n){const s=e.canvas,i=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Vc(a.removedNodes,s),r=r&&!Vc(a.addedNodes,s);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Xa=new Map;let A_=0;function n1(){const e=window.devicePixelRatio;e!==A_&&(A_=e,Xa.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function pV(e,t){Xa.size||window.addEventListener("resize",n1),Xa.set(e,t)}function gV(e){Xa.delete(e),Xa.size||window.removeEventListener("resize",n1)}function mV(e,t,n){const s=e.canvas,i=s&&np(s);if(!i)return;const o=D0((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return r.observe(i),pV(e,o),r}function Sd(e,t,n){n&&n.disconnect(),t==="resize"&&gV(e)}function _V(e,t,n){const s=e.canvas,i=D0(o=>{e.ctx!==null&&n(dV(o,e))},e);return cV(s,t,i),i}class vV extends e1{acquireContext(t,n){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(lV(t,n),s):null}releaseContext(t){const n=t.canvas;if(!n[vc])return!1;const s=n[vc].initial;["height","width"].forEach(o=>{const r=s[o];ot(r)?n.removeAttribute(o):n.setAttribute(o,r)});const i=s.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[vc],!0}addEventListener(t,n,s){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),r={attach:hV,detach:fV,resize:mV}[n]||_V;i[n]=r(t,n,s)}removeEventListener(t,n){const s=t.$proxies||(t.$proxies={}),i=s[n];if(!i)return;({attach:Sd,detach:Sd,resize:Sd}[n]||uV)(t,n,i),s[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,s,i){return u4(t,n,s,i)}isAttached(t){const n=np(t);return!!(n&&n.isConnected)}}function bV(e){return!tp()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?rV:vV}var sc;let oi=(sc=class{constructor(){le(this,"x");le(this,"y");le(this,"active",!1);le(this,"options");le(this,"$animations")}tooltipPosition(t){const{x:n,y:s}=this.getProps(["x","y"],t);return{x:n,y:s}}hasValue(){return Pr(this.x)&&Pr(this.y)}getProps(t,n){const s=this.$animations;if(!n||!s)return this;const i={};return t.forEach(o=>{i[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),i}},le(sc,"defaults",{}),le(sc,"defaultRoutes"),sc);function yV(e,t){const n=e.options.ticks,s=wV(e),i=Math.min(n.maxTicksLimit||s,s),o=n.major.enabled?kV(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>i)return SV(t,c,o,r/i),c;const u=xV(o,t,i);if(r>0){let d,f;const p=r>1?Math.round((l-a)/(r-1)):null;for(ql(t,c,u,ot(p)?0:a-p,a),d=0,f=r-1;d<f;d++)ql(t,c,u,o[d],o[d+1]);return ql(t,c,u,l,ot(p)?t.length:l+p),c}return ql(t,c,u),c}function wV(e){const t=e.options.offset,n=e._tickSize(),s=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(s,i))}function xV(e,t,n){const s=AV(e),i=t.length/n;if(!s)return Math.max(i,1);const o=pB(s);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>i)return l}return Math.max(i,1)}function kV(e){const t=[];let n,s;for(n=0,s=e.length;n<s;n++)e[n].major&&t.push(n);return t}function SV(e,t,n,s){let i=0,o=n[0],r;for(s=Math.ceil(s),r=0;r<e.length;r++)r===o&&(t.push(e[r]),i++,o=n[i*s])}function ql(e,t,n,s,i){const o=Ge(s,0),r=Math.min(Ge(i,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-s,n=l/Math.floor(l/n)),u=o;u<0;)a++,u=Math.round(o+a*n);for(c=Math.max(o,0);c<r;c++)c===u&&(t.push(e[c]),a++,u=Math.round(o+a*n))}function AV(e){const t=e.length;let n,s;if(t<2)return!1;for(s=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==s)return!1;return s}const $V=e=>e==="left"?"right":e==="right"?"left":e,$_=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,C_=(e,t)=>Math.min(t||e,e);function E_(e,t){const n=[],s=e.length/t,i=e.length;let o=0;for(;o<i;o+=s)n.push(e[Math.floor(o)]);return n}function CV(e,t,n){const s=e.ticks.length,i=Math.min(t,s-1),o=e._startPixel,r=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(s===1?c=Math.max(l-o,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-a||l>r+a)))return l}function EV(e,t){ut(e,n=>{const s=n.gc,i=s.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[s[o]];s.splice(0,i)}})}function ia(e){return e.drawTicks?e.tickLength:0}function P_(e,t){if(!e.display)return 0;const n=Ut(e.font,t),s=fn(e.padding);return(bt(e.text)?e.text.length:1)*n.lineHeight+s.height}function PV(e,t){return Ki(e,{scale:t,type:"scale"})}function TV(e,t,n){return Ki(e,{tick:n,index:t,type:"tick"})}function MV(e,t,n){let s=Gf(e);return(n&&t!=="right"||!n&&t==="right")&&(s=$V(s)),s}function DV(e,t,n,s){const{top:i,left:o,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,m;const _=r-i,b=a-o;if(e.isHorizontal()){if(p=ln(s,o,a),st(n)){const w=Object.keys(n)[0],A=n[w];m=u[w].getPixelForValue(A)+_-t}else n==="center"?m=(c.bottom+c.top)/2+_-t:m=$_(e,n,t);f=a-o}else{if(st(n)){const w=Object.keys(n)[0],A=n[w];p=u[w].getPixelForValue(A)-b+t}else n==="center"?p=(c.left+c.right)/2-b+t:p=$_(e,n,t);m=ln(s,r,i),d=n==="left"?-Rt:Rt}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class Fo extends oi{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:s,_suggestedMax:i}=this;return t=Tn(t,Number.POSITIVE_INFINITY),n=Tn(n,Number.NEGATIVE_INFINITY),s=Tn(s,Number.POSITIVE_INFINITY),i=Tn(i,Number.NEGATIVE_INFINITY),{min:Tn(t,s),max:Tn(n,i),minDefined:$t(t),maxDefined:$t(n)}}getMinMax(t){let{min:n,max:s,minDefined:i,maxDefined:o}=this.getUserBounds(),r;if(i&&o)return{min:n,max:s};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,r.min)),o||(s=Math.max(s,r.max));return n=o&&n>s?s:n,s=i&&n>s?n:s,{min:Tn(n,Tn(s,n)),max:Tn(s,Tn(n,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){pt(this.options.beforeUpdate,[this])}update(t,n,s){const{beginAtZero:i,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=jB(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?E_(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=yV(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,s;this.isHorizontal()?(n=this.left,s=this.right):(n=this.top,s=this.bottom,t=!t),this._startPixel=n,this._endPixel=s,this._reversePixels=t,this._length=s-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){pt(this.options.afterUpdate,[this])}beforeSetDimensions(){pt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){pt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),pt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){pt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let s,i,o;for(s=0,i=t.length;s<i;s++)o=t[s],o.label=pt(n.callback,[o.value,s,t],this)}afterTickToLabelConversion(){pt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){pt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,s=C_(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let r=i,a,l,c;if(!this._isVisible()||!n.display||i>=o||s<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=Qt(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/s:p/(s-1),d+6>a&&(a=p/(s-(t.offset?.5:1)),l=this.maxHeight-ia(t.grid)-n.padding-P_(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),r=Kf(Math.min(Math.asin(Qt((u.highest.height+6)/a,-1,1)),Math.asin(Qt(l/c,-1,1))-Math.asin(Qt(f/c,-1,1)))),r=Math.max(i,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){pt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:s,title:i,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=P_(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=ia(o)+l):(t.height=this.maxHeight,t.width=ia(o)+l),s.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=s.padding*2,m=as(this.labelRotation),_=Math.cos(m),b=Math.sin(m);if(a){const w=s.mirror?0:b*d.width+_*f.height;t.height=Math.min(this.maxHeight,t.height+w+p)}else{const w=s.mirror?0:_*d.width+b*f.height;t.width=Math.min(this.maxWidth,t.width+w+p)}this._calculatePadding(c,u,b,_)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,s,i){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=s*n.height):(f=s*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+r)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){pt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,s;for(n=0,s=t.length;n<s;n++)ot(t[n].label)&&(t.splice(n,1),s--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let s=this.ticks;n<s.length&&(s=E_(s,n)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,s){const{ctx:i,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(n/C_(n,s));let c=0,u=0,d,f,p,m,_,b,w,A,$,M,k;for(d=0;d<n;d+=l){if(m=t[d].label,_=this._resolveTickFontOptions(d),i.font=b=_.string,w=o[b]=o[b]||{data:{},gc:[]},A=_.lineHeight,$=M=0,!ot(m)&&!bt(m))$=Fc(i,w.data,w.gc,$,m),M=A;else if(bt(m))for(f=0,p=m.length;f<p;++f)k=m[f],!ot(k)&&!bt(k)&&($=Fc(i,w.data,w.gc,$,k),M+=A);r.push($),a.push(M),c=Math.max($,c),u=Math.max(M,u)}EV(o,n);const y=r.indexOf(c),x=a.indexOf(u),C=P=>({width:r[P]||0,height:a[P]||0});return{first:C(0),last:C(n-1),widest:C(y),highest:C(x),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return _B(this._alignToPixels?lo(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const s=n[t];return s.$context||(s.$context=TV(this.getContext(),t,s))}return this.$context||(this.$context=PV(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=as(this.labelRotation),s=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*s>a*i?a/s:l/i:l*i<a*s?l/s:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,s=this.chart,i=this.options,{grid:o,position:r,border:a}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=ia(o),p=[],m=a.setContext(this.getContext()),_=m.display?m.width:0,b=_/2,w=function(I){return lo(s,I,_)};let A,$,M,k,y,x,C,P,E,B,G,re;if(r==="top")A=w(this.bottom),x=this.bottom-f,P=A-b,B=w(t.top)+b,re=t.bottom;else if(r==="bottom")A=w(this.top),B=t.top,re=w(t.bottom)-b,x=A+b,P=this.top+f;else if(r==="left")A=w(this.right),y=this.right-f,C=A-b,E=w(t.left)+b,G=t.right;else if(r==="right")A=w(this.left),E=t.left,G=w(t.right)-b,y=A+b,C=this.left+f;else if(n==="x"){if(r==="center")A=w((t.top+t.bottom)/2+.5);else if(st(r)){const I=Object.keys(r)[0],V=r[I];A=w(this.chart.scales[I].getPixelForValue(V))}B=t.top,re=t.bottom,x=A+b,P=x+f}else if(n==="y"){if(r==="center")A=w((t.left+t.right)/2);else if(st(r)){const I=Object.keys(r)[0],V=r[I];A=w(this.chart.scales[I].getPixelForValue(V))}y=A-b,C=y-f,E=t.left,G=t.right}const Y=Ge(i.ticks.maxTicksLimit,d),L=Math.max(1,Math.ceil(d/Y));for($=0;$<d;$+=L){const I=this.getContext($),V=o.setContext(I),Q=a.setContext(I),Z=V.lineWidth,ce=V.color,we=Q.dash||[],U=Q.dashOffset,X=V.tickWidth,R=V.tickColor,ee=V.tickBorderDash||[],oe=V.tickBorderDashOffset;M=CV(this,$,l),M!==void 0&&(k=lo(s,M,Z),c?y=C=E=G=k:x=P=B=re=k,p.push({tx1:y,ty1:x,tx2:C,ty2:P,x1:E,y1:B,x2:G,y2:re,width:Z,color:ce,borderDash:we,borderDashOffset:U,tickWidth:X,tickColor:R,tickBorderDash:ee,tickBorderDashOffset:oe}))}return this._ticksLength=d,this._borderValue=A,p}_computeLabelItems(t){const n=this.axis,s=this.options,{position:i,ticks:o}=s,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=ia(s.grid),p=f+u,m=d?-u:p,_=-as(this.labelRotation),b=[];let w,A,$,M,k,y,x,C,P,E,B,G,re="middle";if(i==="top")y=this.bottom-m,x=this._getXAxisLabelAlignment();else if(i==="bottom")y=this.top+m,x=this._getXAxisLabelAlignment();else if(i==="left"){const L=this._getYAxisLabelAlignment(f);x=L.textAlign,k=L.x}else if(i==="right"){const L=this._getYAxisLabelAlignment(f);x=L.textAlign,k=L.x}else if(n==="x"){if(i==="center")y=(t.top+t.bottom)/2+p;else if(st(i)){const L=Object.keys(i)[0],I=i[L];y=this.chart.scales[L].getPixelForValue(I)+p}x=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")k=(t.left+t.right)/2-p;else if(st(i)){const L=Object.keys(i)[0],I=i[L];k=this.chart.scales[L].getPixelForValue(I)}x=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?re="top":l==="end"&&(re="bottom"));const Y=this._getLabelSizes();for(w=0,A=a.length;w<A;++w){$=a[w],M=$.label;const L=o.setContext(this.getContext(w));C=this.getPixelForTick(w)+o.labelOffset,P=this._resolveTickFontOptions(w),E=P.lineHeight,B=bt(M)?M.length:1;const I=B/2,V=L.color,Q=L.textStrokeColor,Z=L.textStrokeWidth;let ce=x;r?(k=C,x==="inner"&&(w===A-1?ce=this.options.reverse?"left":"right":w===0?ce=this.options.reverse?"right":"left":ce="center"),i==="top"?c==="near"||_!==0?G=-B*E+E/2:c==="center"?G=-Y.highest.height/2-I*E+E:G=-Y.highest.height+E/2:c==="near"||_!==0?G=E/2:c==="center"?G=Y.highest.height/2-I*E:G=Y.highest.height-B*E,d&&(G*=-1),_!==0&&!L.showLabelBackdrop&&(k+=E/2*Math.sin(_))):(y=C,G=(1-B)*E/2);let we;if(L.showLabelBackdrop){const U=fn(L.backdropPadding),X=Y.heights[w],R=Y.widths[w];let ee=G-U.top,oe=0-U.left;switch(re){case"middle":ee-=X/2;break;case"bottom":ee-=X;break}switch(x){case"center":oe-=R/2;break;case"right":oe-=R;break;case"inner":w===A-1?oe-=R:w>0&&(oe-=R/2);break}we={left:oe,top:ee,width:R+U.width,height:X+U.height,color:L.backdropColor}}b.push({label:M,font:P,textOffset:G,options:{rotation:_,color:V,strokeColor:Q,strokeWidth:Z,textAlign:ce,textBaseline:re,translation:[k,y],backdrop:we}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-as(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:s,mirror:i,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,u;return n==="left"?i?(u=this.right+o,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:s,top:i,width:o,height:r}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(s,i,o,r),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,u)=>{!u.width||!u.color||(s.save(),s.lineWidth=u.width,s.strokeStyle=u.color,s.setLineDash(u.borderDash||[]),s.lineDashOffset=u.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(n.display)for(o=0,r=i.length;o<r;++o){const l=i[o];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:s,grid:i}}=this,o=s.setContext(this.getContext()),r=s.display?o.width:0;if(!r)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=lo(t,this.left,r)-r/2,u=lo(t,this.right,a)+a/2,d=f=l):(d=lo(t,this.top,r)-r/2,f=lo(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const s=this.ctx,i=this._computeLabelArea();i&&bu(s,i);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,u=r.textOffset;Do(s,c,0,u,l,a)}i&&yu(s)}drawTitle(){const{ctx:t,options:{position:n,title:s,reverse:i}}=this;if(!s.display)return;const o=Ut(s.font),r=fn(s.padding),a=s.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||st(n)?(l+=r.bottom,bt(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=r.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=DV(this,l,n,a);Do(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:f,textAlign:MV(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,s=Ge(t.grid&&t.grid.z,-1),i=Ge(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Fo.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let o,r;for(o=0,r=n.length;o<r;++o){const a=n[o];a[s]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Ut(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Gl{constructor(t,n,s){this.type=t,this.scope=n,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let s;RV(n)&&(s=this.register(n));const i=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,OV(t,r,s),this.override&&Ct.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const n=this.items,s=t.id,i=this.scope;s in n&&delete n[s],i&&s in Ct[i]&&(delete Ct[i][s],this.override&&delete Mo[s])}}function OV(e,t,n){const s=Ka(Object.create(null),[n?Ct.get(n):{},Ct.get(t),e.defaults]);Ct.set(t,s),e.defaultRoutes&&IV(t,e.defaultRoutes),e.descriptors&&Ct.describe(t,e.descriptors)}function IV(e,t){Object.keys(t).forEach(n=>{const s=n.split("."),i=s.pop(),o=[e].concat(s).join("."),r=t[n].split("."),a=r.pop(),l=r.join(".");Ct.route(o,i,l,a)})}function RV(e){return"id"in e&&"defaults"in e}class LV{constructor(){this.controllers=new Gl(us,"datasets",!0),this.elements=new Gl(oi,"elements"),this.plugins=new Gl(Object,"plugins"),this.scales=new Gl(Fo,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,s){[...n].forEach(i=>{const o=s||this._getRegistryForType(i);s||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):ut(i,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,n,s){const i=Uf(t);pt(s["before"+i],[],s),n[t](s),pt(s["after"+i],[],s)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const s=this._typedRegistries[n];if(s.isForType(t))return s}return this.plugins}_get(t,n,s){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return i}}var bs=new LV;class NV{constructor(){this._init=[]}notify(t,n,s,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),r=this._notify(o,t,n,s);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,n,s,i){i=i||{};for(const o of t){const r=o.plugin,a=r[s],l=[n,i,o.options];if(pt(a,l,r)===!1&&i.cancelable)return!1}return!0}invalidate(){ot(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const s=t&&t.config,i=Ge(s.options&&s.options.plugins,{}),o=FV(s);return i===!1&&!n?[]:VV(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],s=this._cache,i=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,s),t,"stop"),this._notify(i(s,n),t,"start")}}function FV(e){const t={},n=[],s=Object.keys(bs.plugins.items);for(let o=0;o<s.length;o++)n.push(bs.getPlugin(s[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const r=i[o];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function BV(e,t){return!t&&e===!1?null:e===!0?{}:e}function VV(e,{plugins:t,localIds:n},s,i){const o=[],r=e.getContext();for(const a of t){const l=a.id,c=BV(s[l],i);c!==null&&o.push({plugin:a,options:HV(e.config,{plugin:a,local:n[l]},c,r)})}return o}function HV(e,{plugin:t,local:n},s,i){const o=e.pluginScopeKeys(t),r=e.getOptionScopes(s,o);return n&&t.defaults&&r.push(t.defaults),e.createResolver(r,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function fh(e,t){const n=Ct.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function jV(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function WV(e,t){return e===t?"_index_":"_value_"}function T_(e){if(e==="x"||e==="y"||e==="r")return e}function zV(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function ph(e,...t){if(T_(e))return e;for(const n of t){const s=n.axis||zV(n.position)||e.length>1&&T_(e[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function M_(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function YV(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(s=>s.xAxisID===e||s.yAxisID===e);if(n.length)return M_(e,"x",n[0])||M_(e,"y",n[0])}return{}}function UV(e,t){const n=Mo[e.type]||{scales:{}},s=t.scales||{},i=fh(e.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!st(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=ph(r,a,YV(r,e),Ct.scales[a.type]),c=WV(l,i),u=n.scales||{};o[r]=$a(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(r=>{const a=r.type||e.type,l=r.indexAxis||fh(a,t),u=(Mo[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=jV(d,l),p=r[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),$a(o[p],[{axis:f},s[p],u[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];$a(a,[Ct.scales[a.type],Ct.scale])}),o}function s1(e){const t=e.options||(e.options={});t.plugins=Ge(t.plugins,{}),t.scales=UV(e,t)}function i1(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function KV(e){return e=e||{},e.data=i1(e.data),s1(e),e}const D_=new Map,o1=new Set;function Jl(e,t){let n=D_.get(e);return n||(n=t(),D_.set(e,n),o1.add(n)),n}const oa=(e,t,n)=>{const s=Fi(t,n);s!==void 0&&e.add(s)};let qV=class{constructor(t){this._config=KV(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=i1(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),s1(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Jl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Jl(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Jl(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,s=this.type;return Jl(`${s}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const s=this._scopeCache;let i=s.get(t);return(!i||n)&&(i=new Map,s.set(t,i)),i}getOptionScopes(t,n,s){const{options:i,type:o}=this,r=this._cachedScopes(t,s),a=r.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>oa(l,t,d))),u.forEach(d=>oa(l,i,d)),u.forEach(d=>oa(l,Mo[o]||{},d)),u.forEach(d=>oa(l,Ct,d)),u.forEach(d=>oa(l,uh,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),o1.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Mo[n]||{},Ct.datasets[n]||{},{type:n},Ct,uh]}resolveNamedOptions(t,n,s,i=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=O_(this._resolverCache,t,i);let l=r;if(JV(r,n)){o.$shared=!1,s=Bi(s)?s():s;const c=this.createResolver(t,s,a);l=Tr(r,s,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,s=[""],i){const{resolver:o}=O_(this._resolverCache,t,s);return st(n)?Tr(o,n,void 0,i):o}};function O_(e,t,n){let s=e.get(t);s||(s=new Map,e.set(t,s));const i=n.join();let o=s.get(i);return o||(o={resolver:Qf(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},s.set(i,o)),o}const GV=e=>st(e)&&Object.getOwnPropertyNames(e).some(t=>Bi(e[t]));function JV(e,t){const{isScriptable:n,isIndexable:s}=F0(e);for(const i of t){const o=n(i),r=s(i),a=(r||o)&&e[i];if(o&&(Bi(a)||GV(a))||r&&bt(a))return!0}return!1}var XV="4.4.1";const QV=["top","bottom","left","right","chartArea"];function I_(e,t){return e==="top"||e==="bottom"||QV.indexOf(e)===-1&&t==="x"}function R_(e,t){return function(n,s){return n[e]===s[e]?n[t]-s[t]:n[e]-s[e]}}function L_(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),pt(n&&n.onComplete,[e],t)}function ZV(e){const t=e.chart,n=t.options.animation;pt(n&&n.onProgress,[e],t)}function r1(e){return tp()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const bc={},N_=e=>{const t=r1(e);return Object.values(bc).filter(n=>n.canvas===t).pop()};function e6(e,t,n){const s=Object.keys(e);for(const i of s){const o=+i;if(o>=t){const r=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=r)}}}function t6(e,t,n,s){return!n||e.type==="mouseout"?null:s?t:e}function Xl(e,t,n){return e.options.clip?e[n]:t[n]}function n6(e,t){const{xScale:n,yScale:s}=e;return n&&s?{left:Xl(n,t,"left"),right:Xl(n,t,"right"),top:Xl(s,t,"top"),bottom:Xl(s,t,"bottom")}:t}var pi;let xu=(pi=class{static register(...t){bs.add(...t),F_()}static unregister(...t){bs.remove(...t),F_()}constructor(t,n){const s=this.config=new qV(n),i=r1(t),o=N_(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||bV(i)),this.platform.updateConfig(s);const a=this.platform.acquireContext(i,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=oB(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new NV,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=wB(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],bc[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Hs.listen(this,"complete",L_),Hs.listen(this,"progress",ZV),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:s,height:i,_aspectRatio:o}=this;return ot(t)?n&&o?o:i?s/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return bs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():o_(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return n_(this.canvas,this.ctx),this}stop(){return Hs.stop(this),this}resize(t,n){Hs.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const s=this.options,i=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(i,t,n,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,o_(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),pt(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ut(n,(s,i)=>{s.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,s=this.scales,i=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];n&&(o=o.concat(Object.keys(n).map(r=>{const a=n[r],l=ph(r,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ut(o,r=>{const a=r.options,l=a.id,c=ph(l,a),u=Ge(a.type,r.dtype);(a.position===void 0||I_(a.position,c)!==I_(r.dposition))&&(a.position=r.dposition),i[l]=!0;let d=null;if(l in s&&s[l].type===u)d=s[l];else{const f=bs.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(a,t)}),ut(i,(r,a)=>{r||delete s[a]}),ut(s,r=>{Gn.configure(this,r,r.options),Gn.addBox(this,r)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,s=t.length;if(t.sort((i,o)=>i.index-o.index),s>n){for(let i=n;i<s;++i)this._destroyDatasetMeta(i);t.splice(n,s-n)}this._sortedMetasets=t.slice(0).sort(R_("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((s,i)=>{n.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=n.length;s<i;s++){const o=n[s];let r=this.getDatasetMeta(s);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=a,r.indexAxis=o.indexAxis||fh(a,this.options),r.order=o.order||0,r.index=s,r.label=""+o.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{const l=bs.getController(a),{datasetElementType:c,dataElementType:u}=Ct.datasets[a];Object.assign(l,{dataElementType:bs.getElement(u),datasetElementType:c&&bs.getElement(c)}),r.controller=new l(this,s),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){ut(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),i||ut(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(R_("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ut(this.scales,t=>{Gn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Km(n,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:o}of n){const r=s==="_removeElements"?-o:o;e6(t,i,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),i=s(0);for(let o=1;o<n;o++)if(!Km(i,s(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Gn.update(this,this.width,this.height,t);const n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],ut(this.boxes,i=>{s&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,Bi(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const s=this.getDatasetMeta(t),i={meta:s,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(s.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Hs.has(this)?this.attached&&!Hs.running(this)&&Hs.start(this):(this.draw(),L_({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:i}=this._resizeBeforeDraw;this._resize(s,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,s=[];let i,o;for(i=0,o=n.length;i<o;++i){const r=n[i];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,s=t._clip,i=!s.disabled,o=n6(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&bu(n,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),i&&yu(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Js(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,s,i){const o=Q4.modes[n];return typeof o=="function"?o(this,t,s,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],s=this._metasets;let i=s.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=Ki(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(t,n){const s=this.getDatasetMeta(t);s.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,s){const i=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,i);qa(n)?(o.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Hs.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),n_(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete bc[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,s=(o,r)=>{n.addEventListener(this,o,r),t[o]=r},i=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};ut(this.options.events,o=>s(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,s=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{i("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),s("attach",a)},n.isAttached(this.canvas)?a():r()}unbindEvents(){ut(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},ut(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,s){const i=s?"set":"remove";let o,r,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[i+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],s=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Rc(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(t,n,s){return this._plugins.notify(this,t,n,s)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,s){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),r=o(n,t),a=s?t:o(t,n);r.length&&this.updateHoverStyle(r,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const s={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,i)===!1)return;const o=this._handleEvent(t,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(o||s.changed)&&this.render(),this}_handleEvent(t,n,s){const{_active:i=[],options:o}=this,r=n,a=this._getActiveElements(t,i,s,r),l=dB(t),c=t6(t,this._lastEvent,s,l);s&&(this._lastEvent=null,pt(o.onHover,[t,a,this],this),l&&pt(o.onClick,[t,a,this],this));const u=!Rc(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,s,i){if(t.type==="mouseout")return[];if(!s)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},le(pi,"defaults",Ct),le(pi,"instances",bc),le(pi,"overrides",Mo),le(pi,"registry",bs),le(pi,"version",XV),le(pi,"getChart",N_),pi);function F_(){return ut(xu.instances,e=>e._plugins.invalidate())}function s6(e,t,n){const{startAngle:s,pixelMargin:i,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,r,a,s-c,n+c),l>i?(c=i/l,e.arc(o,r,l,n+c,s-c,!0)):e.arc(o,r,i,n+Rt,s-Rt),e.closePath(),e.clip()}function i6(e){return Xf(e,["outerStart","outerEnd","innerStart","innerEnd"])}function o6(e,t,n,s){const i=i6(e.options.borderRadius),o=(n-t)/2,r=Math.min(o,s*t/2),a=l=>{const c=(n-Math.min(o,l))*s/2;return Qt(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Qt(i.innerStart,0,r),innerEnd:Qt(i.innerEnd,0,r)}}function Zo(e,t,n,s){return{x:n+e*Math.cos(t),y:s+e*Math.sin(t)}}function Hc(e,t,n,s,i,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+s+n-c,0),f=u>0?u+s+n+c:0;let p=0;const m=i-l;if(s){const L=u>0?u-s:0,I=d>0?d-s:0,V=(L+I)/2,Q=V!==0?m*V/(V+s):m;p=(m-Q)/2}const _=Math.max(.001,m*d-n/wt)/d,b=(m-_)/2,w=l+b+p,A=i-b-p,{outerStart:$,outerEnd:M,innerStart:k,innerEnd:y}=o6(t,f,d,A-w),x=d-$,C=d-M,P=w+$/x,E=A-M/C,B=f+k,G=f+y,re=w+k/B,Y=A-y/G;if(e.beginPath(),o){const L=(P+E)/2;if(e.arc(r,a,d,P,L),e.arc(r,a,d,L,E),M>0){const Z=Zo(C,E,r,a);e.arc(Z.x,Z.y,M,E,A+Rt)}const I=Zo(G,A,r,a);if(e.lineTo(I.x,I.y),y>0){const Z=Zo(G,Y,r,a);e.arc(Z.x,Z.y,y,A+Rt,Y+Math.PI)}const V=(A-y/f+(w+k/f))/2;if(e.arc(r,a,f,A-y/f,V,!0),e.arc(r,a,f,V,w+k/f,!0),k>0){const Z=Zo(B,re,r,a);e.arc(Z.x,Z.y,k,re+Math.PI,w-Rt)}const Q=Zo(x,w,r,a);if(e.lineTo(Q.x,Q.y),$>0){const Z=Zo(x,P,r,a);e.arc(Z.x,Z.y,$,w-Rt,P)}}else{e.moveTo(r,a);const L=Math.cos(P)*d+r,I=Math.sin(P)*d+a;e.lineTo(L,I);const V=Math.cos(E)*d+r,Q=Math.sin(E)*d+a;e.lineTo(V,Q)}e.closePath()}function r6(e,t,n,s,i){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){Hc(e,t,n,s,l,i);for(let c=0;c<o;++c)e.fill();isNaN(a)||(l=r+(a%yt||yt))}return Hc(e,t,n,s,l,i),e.fill(),l}function a6(e,t,n,s,i){const{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,p=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,p?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let m=t.endAngle;if(o){Hc(e,t,n,s,m,i);for(let _=0;_<o;++_)e.stroke();isNaN(a)||(m=r+(a%yt||yt))}p&&s6(e,t,m),o||(Hc(e,t,n,s,m,i),e.stroke())}class da extends oi{constructor(n){super();le(this,"circumference");le(this,"endAngle");le(this,"fullCircles");le(this,"innerRadius");le(this,"outerRadius");le(this,"pixelMargin");le(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,s,i){const o=this.getProps(["x","y"],i),{angle:r,distance:a}=E0(o,{x:n,y:s}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,_=Ge(f,c-l)>=yt||Ga(r,l,c),b=qs(a,u+p,d+p);return _&&b}getCenterPoint(n){const{x:s,y:i,startAngle:o,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(o+r)/2,f=(a+l+u+c)/2;return{x:s+Math.cos(d)*f,y:i+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:s,circumference:i}=this,o=(s.offset||0)/4,r=(s.spacing||0)/2,a=s.circular;if(this.pixelMargin=s.borderAlign==="inner"?.33:0,this.fullCircles=i>yt?Math.floor(i/yt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(wt,i||0)),u=o*c;n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,r6(n,this,u,r,a),a6(n,this,u,r,a),n.restore()}}le(da,"id","arc"),le(da,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),le(da,"defaultRoutes",{backgroundColor:"backgroundColor"}),le(da,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function a1(e,t,n=t){e.lineCap=Ge(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ge(n.borderDash,t.borderDash)),e.lineDashOffset=Ge(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ge(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ge(n.borderWidth,t.borderWidth),e.strokeStyle=Ge(n.borderColor,t.borderColor)}function l6(e,t,n){e.lineTo(n.x,n.y)}function c6(e){return e.stepped?OB:e.tension||e.cubicInterpolationMode==="monotone"?IB:l6}function l1(e,t,n={}){const s=e.length,{start:i=0,end:o=s-1}=n,{start:r,end:a}=t,l=Math.max(i,r),c=Math.min(o,a),u=i<r&&o<r||i>a&&o>a;return{count:s,start:l,loop:t.loop,ilen:c<l&&!u?s+c-l:c-l}}function u6(e,t,n,s){const{points:i,options:o}=t,{count:r,start:a,loop:l,ilen:c}=l1(i,n,s),u=c6(o);let{move:d=!0,reverse:f}=s||{},p,m,_;for(p=0;p<=c;++p)m=i[(a+(f?c-p:p))%r],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,_,m,f,o.stepped),_=m);return l&&(m=i[(a+(f?c:0))%r],u(e,_,m,f,o.stepped)),!!l}function d6(e,t,n,s){const i=t.points,{count:o,start:r,ilen:a}=l1(i,n,s),{move:l=!0,reverse:c}=s||{};let u=0,d=0,f,p,m,_,b,w;const A=M=>(r+(c?a-M:M))%o,$=()=>{_!==b&&(e.lineTo(u,b),e.lineTo(u,_),e.lineTo(u,w))};for(l&&(p=i[A(0)],e.moveTo(p.x,p.y)),f=0;f<=a;++f){if(p=i[A(f)],p.skip)continue;const M=p.x,k=p.y,y=M|0;y===m?(k<_?_=k:k>b&&(b=k),u=(d*u+M)/++d):($(),e.lineTo(M,k),m=y,d=0,_=b=k),w=k}$()}function gh(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?d6:u6}function h6(e){return e.stepped?h4:e.tension||e.cubicInterpolationMode==="monotone"?f4:go}function f6(e,t,n,s){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,s)&&i.closePath()),a1(e,t.options),e.stroke(i)}function p6(e,t,n,s){const{segments:i,options:o}=t,r=gh(t);for(const a of i)a1(e,o,a.style),e.beginPath(),r(e,t,a,{start:n,end:n+s-1})&&e.closePath(),e.stroke()}const g6=typeof Path2D=="function";function m6(e,t,n,s){g6&&!t.options.segment?f6(e,t,n,s):p6(e,t,n,s)}class $i extends oi{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;i4(this._points,s,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=b4(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,s=t.length;return s&&n[t[s-1].end]}interpolate(t,n){const s=this.options,i=t[n],o=this.points,r=q0(this,{property:n,start:i,end:i});if(!r.length)return;const a=[],l=h6(s);let c,u;for(c=0,u=r.length;c<u;++c){const{start:d,end:f}=r[c],p=o[d],m=o[f];if(p===m){a.push(p);continue}const _=Math.abs((i-p[n])/(m[n]-p[n])),b=l(p,m,_,s.stepped);b[n]=t[n],a.push(b)}return a.length===1?a[0]:a}pathSegment(t,n,s){return gh(this)(t,this,n,s)}path(t,n,s){const i=this.segments,o=gh(this);let r=this._loop;n=n||0,s=s||this.points.length-n;for(const a of i)r&=o(t,this,a,{start:n,end:n+s-1});return!!r}draw(t,n,s,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),m6(t,this,s,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}le($i,"id","line"),le($i,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),le($i,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),le($i,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function B_(e,t,n,s){const i=e.options,{[n]:o}=e.getProps([n],s);return Math.abs(t-o)<i.radius+i.hitRadius}class yc extends oi{constructor(n){super();le(this,"parsed");le(this,"skip");le(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,s,i){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],i);return Math.pow(n-r,2)+Math.pow(s-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(n,s){return B_(this,n,"x",s)}inYRange(n,s){return B_(this,n,"y",s)}getCenterPoint(n){const{x:s,y:i}=this.getProps(["x","y"],n);return{x:s,y:i}}size(n){n=n||this.options||{};let s=n.radius||0;s=Math.max(s,s&&n.hoverRadius||0);const i=s&&n.borderWidth||0;return(s+i)*2}draw(n,s){const i=this.options;this.skip||i.radius<.1||!Js(this,s,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,dh(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}le(yc,"id","point"),le(yc,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),le(yc,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function c1(e,t){const{x:n,y:s,base:i,width:o,height:r}=e.getProps(["x","y","base","width","height"],t);let a,l,c,u,d;return e.horizontal?(d=r/2,a=Math.min(n,i),l=Math.max(n,i),c=s-d,u=s+d):(d=o/2,a=n-d,l=n+d,c=Math.min(s,i),u=Math.max(s,i)),{left:a,top:c,right:l,bottom:u}}function Ci(e,t,n,s){return e?0:Qt(t,n,s)}function _6(e,t,n){const s=e.options.borderWidth,i=e.borderSkipped,o=N0(s);return{t:Ci(i.top,o.top,0,n),r:Ci(i.right,o.right,0,t),b:Ci(i.bottom,o.bottom,0,n),l:Ci(i.left,o.left,0,t)}}function v6(e,t,n){const{enableBorderRadius:s}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=Ao(i),r=Math.min(t,n),a=e.borderSkipped,l=s||st(i);return{topLeft:Ci(!l||a.top||a.left,o.topLeft,0,r),topRight:Ci(!l||a.top||a.right,o.topRight,0,r),bottomLeft:Ci(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Ci(!l||a.bottom||a.right,o.bottomRight,0,r)}}function b6(e){const t=c1(e),n=t.right-t.left,s=t.bottom-t.top,i=_6(e,n/2,s/2),o=v6(e,n/2,s/2);return{outer:{x:t.left,y:t.top,w:n,h:s,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:s-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function Ad(e,t,n,s){const i=t===null,o=n===null,a=e&&!(i&&o)&&c1(e,s);return a&&(i||qs(t,a.left,a.right))&&(o||qs(n,a.top,a.bottom))}function y6(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function w6(e,t){e.rect(t.x,t.y,t.w,t.h)}function $d(e,t,n={}){const s=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-s,r=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+s,y:e.y+i,w:e.w+o,h:e.h+r,radius:e.radius}}class wc extends oi{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:s,backgroundColor:i}}=this,{inner:o,outer:r}=b6(this),a=y6(r.radius)?Ja:w6;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,$d(r,n,o)),t.clip(),a(t,$d(o,-n,r)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),a(t,$d(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,s){return Ad(this,t,n,s)}inXRange(t,n){return Ad(this,t,null,n)}inYRange(t,n){return Ad(this,null,t,n)}getCenterPoint(t){const{x:n,y:s,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?s:(s+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}le(wc,"id","bar"),le(wc,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),le(wc,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function x6(e,t,n,s,i){const o=i.samples||s;if(o>=n)return e.slice(t,t+n);const r=[],a=(n-2)/(o-2);let l=0;const c=t+n-1;let u=t,d,f,p,m,_;for(r[l++]=e[u],d=0;d<o-2;d++){let b=0,w=0,A;const $=Math.floor((d+1)*a)+1+t,M=Math.min(Math.floor((d+2)*a)+1,n)+t,k=M-$;for(A=$;A<M;A++)b+=e[A].x,w+=e[A].y;b/=k,w/=k;const y=Math.floor(d*a)+1+t,x=Math.min(Math.floor((d+1)*a)+1,n)+t,{x:C,y:P}=e[u];for(p=m=-1,A=y;A<x;A++)m=.5*Math.abs((C-b)*(e[A].y-P)-(C-e[A].x)*(w-P)),m>p&&(p=m,f=e[A],_=A);r[l++]=f,u=_}return r[l++]=e[c],r}function k6(e,t,n,s){let i=0,o=0,r,a,l,c,u,d,f,p,m,_;const b=[],w=t+n-1,A=e[t].x,M=e[w].x-A;for(r=t;r<t+n;++r){a=e[r],l=(a.x-A)/M*s,c=a.y;const k=l|0;if(k===u)c<m?(m=c,d=r):c>_&&(_=c,f=r),i=(o*i+a.x)/++o;else{const y=r-1;if(!ot(d)&&!ot(f)){const x=Math.min(d,f),C=Math.max(d,f);x!==p&&x!==y&&b.push({...e[x],x:i}),C!==p&&C!==y&&b.push({...e[C],x:i})}r>0&&y!==p&&b.push(e[y]),b.push(a),u=k,o=0,m=_=c,d=f=p=r}}return b}function u1(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function V_(e){e.data.datasets.forEach(t=>{u1(t)})}function S6(e,t){const n=t.length;let s=0,i;const{iScale:o}=e,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=Qt(Gs(t,o.axis,r).lo,0,n-1)),c?i=Qt(Gs(t,o.axis,a).hi+1,s,n)-s:i=n-s,{start:s,count:i}}var A6={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){V_(e);return}const s=e.width;e.data.datasets.forEach((i,o)=>{const{_data:r,indexAxis:a}=i,l=e.getDatasetMeta(o),c=r||i.data;if(ca([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:f}=S6(l,c);const p=n.threshold||4*s;if(f<=p){u1(i);return}ot(r)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(_){this._data=_}}));let m;switch(n.algorithm){case"lttb":m=x6(c,d,f,s,n);break;case"min-max":m=k6(c,d,f,s);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=m})},destroy(e){V_(e)}};function $6(e,t,n){const s=e.segments,i=e.points,o=t.points,r=[];for(const a of s){let{start:l,end:c}=a;c=ip(l,c,i);const u=mh(n,i[l],i[c],a.loop);if(!t.segments){r.push({source:a,target:u,start:i[l],end:i[c]});continue}const d=q0(t,u);for(const f of d){const p=mh(n,o[f.start],o[f.end],f.loop),m=K0(a,i,p);for(const _ of m)r.push({source:_,target:f,start:{[n]:H_(u,p,"start",Math.max)},end:{[n]:H_(u,p,"end",Math.min)}})}}return r}function mh(e,t,n,s){if(s)return;let i=t[e],o=n[e];return e==="angle"&&(i=Dn(i),o=Dn(o)),{property:e,start:i,end:o}}function C6(e,t){const{x:n=null,y:s=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:r,end:a})=>{a=ip(r,a,i);const l=i[r],c=i[a];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function ip(e,t,n){for(;t>e;t--){const s=n[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function H_(e,t,n,s){return e&&t?s(e[n],t[n]):e?e[n]:t?t[n]:0}function d1(e,t){let n=[],s=!1;return bt(e)?(s=!0,n=e):n=C6(e,t),n.length?new $i({points:n,options:{tension:0},_loop:s,_fullLoop:s}):null}function j_(e){return e&&e.fill!==!1}function E6(e,t,n){let i=e[t].fill;const o=[t];let r;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!$t(i))return i;if(r=e[i],!r)return!1;if(r.visible)return i;o.push(i),i=r.fill}return!1}function P6(e,t,n){const s=O6(e);if(st(s))return isNaN(s.value)?!1:s;let i=parseFloat(s);return $t(i)&&Math.floor(i)===i?T6(s[0],t,i,n):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function T6(e,t,n,s){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=s?!1:n}function M6(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:st(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function D6(e,t,n){let s;return e==="start"?s=n:e==="end"?s=t.options.reverse?t.min:t.max:st(e)?s=e.value:s=t.getBaseValue(),s}function O6(e){const t=e.options,n=t.fill;let s=Ge(n&&n.target,n);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function I6(e){const{scale:t,index:n,line:s}=e,i=[],o=s.segments,r=s.points,a=R6(t,n);a.push(d1({x:null,y:t.bottom},s));for(let l=0;l<o.length;l++){const c=o[l];for(let u=c.start;u<=c.end;u++)L6(i,r[u],a)}return new $i({points:i,options:{}})}function R6(e,t){const n=[],s=e.getMatchingVisibleMetas("line");for(let i=0;i<s.length;i++){const o=s[i];if(o.index===t)break;o.hidden||n.unshift(o.dataset)}return n}function L6(e,t,n){const s=[];for(let i=0;i<n.length;i++){const o=n[i],{first:r,last:a,point:l}=N6(o,t,"x");if(!(!l||r&&a)){if(r)s.unshift(l);else if(e.push(l),!a)break}}e.push(...s)}function N6(e,t,n){const s=e.interpolate(t,n);if(!s)return{};const i=s[n],o=e.segments,r=e.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const u=o[c],d=r[u.start][n],f=r[u.end][n];if(qs(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:s}}class h1{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,s){const{x:i,y:o,radius:r}=this;return n=n||{start:0,end:yt},t.arc(i,o,r,n.end,n.start,!0),!s.bounds}interpolate(t){const{x:n,y:s,radius:i}=this,o=t.angle;return{x:n+Math.cos(o)*i,y:s+Math.sin(o)*i,angle:o}}}function F6(e){const{chart:t,fill:n,line:s}=e;if($t(n))return B6(t,n);if(n==="stack")return I6(e);if(n==="shape")return!0;const i=V6(e);return i instanceof h1?i:d1(i,s)}function B6(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function V6(e){return(e.scale||{}).getPointPositionForValue?j6(e):H6(e)}function H6(e){const{scale:t={},fill:n}=e,s=M6(n,t);if($t(s)){const i=t.isHorizontal();return{x:i?s:null,y:i?null:s}}return null}function j6(e){const{scale:t,fill:n}=e,s=t.options,i=t.getLabels().length,o=s.reverse?t.max:t.min,r=D6(n,t,o),a=[];if(s.grid.circular){const l=t.getPointPositionForValue(0,o);return new h1({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(r)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,r));return a}function Cd(e,t,n){const s=F6(t),{line:i,scale:o,axis:r}=t,a=i.options,l=a.fill,c=a.backgroundColor,{above:u=c,below:d=c}=l||{};s&&i.points.length&&(bu(e,n),W6(e,{line:i,target:s,above:u,below:d,area:n,scale:o,axis:r}),yu(e))}function W6(e,t){const{line:n,target:s,above:i,below:o,area:r,scale:a}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&o!==i&&(W_(e,s,r.top),z_(e,{line:n,target:s,color:i,scale:a,property:l}),e.restore(),e.save(),W_(e,s,r.bottom)),z_(e,{line:n,target:s,color:o,scale:a,property:l}),e.restore()}function W_(e,t,n){const{segments:s,points:i}=t;let o=!0,r=!1;e.beginPath();for(const a of s){const{start:l,end:c}=a,u=i[l],d=i[ip(l,c,i)];o?(e.moveTo(u.x,u.y),o=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),r=!!t.pathSegment(e,a,{move:r}),r?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function z_(e,t){const{line:n,target:s,property:i,color:o,scale:r}=t,a=$6(n,s,i);for(const{source:l,target:c,start:u,end:d}of a){const{style:{backgroundColor:f=o}={}}=l,p=s!==!0;e.save(),e.fillStyle=f,z6(e,r,p&&mh(i,u,d)),e.beginPath();const m=!!n.pathSegment(e,l);let _;if(p){m?e.closePath():Y_(e,s,d,i);const b=!!s.pathSegment(e,c,{move:m,reverse:!0});_=m&&b,_||Y_(e,s,u,i)}e.closePath(),e.fill(_?"evenodd":"nonzero"),e.restore()}}function z6(e,t,n){const{top:s,bottom:i}=t.chart.chartArea,{property:o,start:r,end:a}=n||{};o==="x"&&(e.beginPath(),e.rect(r,s,a-r,i-s),e.clip())}function Y_(e,t,n,s){const i=t.interpolate(n,s);i&&e.lineTo(i.x,i.y)}var Y6={id:"filler",afterDatasetsUpdate(e,t,n){const s=(e.data.datasets||[]).length,i=[];let o,r,a,l;for(r=0;r<s;++r)o=e.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof $i&&(l={visible:e.isDatasetVisible(r),index:r,fill:P6(a,r,s),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,i.push(l);for(r=0;r<s;++r)l=i[r],!(!l||l.fill===!1)&&(l.fill=E6(i,r,n.propagate))},beforeDraw(e,t,n){const s=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),s&&a.fill&&Cd(e.ctx,a,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const s=e.getSortedVisibleDatasetMetas();for(let i=s.length-1;i>=0;--i){const o=s[i].$filler;j_(o)&&Cd(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const s=t.meta.$filler;!j_(s)||n.drawTime!=="beforeDatasetDraw"||Cd(e.ctx,s,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const U_=(e,t)=>{let{boxHeight:n=t,boxWidth:s=t}=e;return e.usePointStyle&&(n=Math.min(n,t),s=e.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:n,itemHeight:Math.max(t,n)}},U6=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class K_ extends oi{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,s){this.maxWidth=t,this.maxHeight=n,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=pt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(s=>t.filter(s,this.chart.data))),t.sort&&(n=n.sort((s,i)=>t.sort(s,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,i=Ut(s.font),o=i.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=U_(s,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(r,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,s,i){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((m,_)=>{const b=s+n/2+o.measureText(m.text).width;(_===0||c[c.length-1]+b+2*a>r)&&(d+=u,c[c.length-(_>0?0:1)]=0,p+=u,f++),l[_]={left:0,top:p,row:f,width:b,height:i},c[c.length-1]+=b+a}),d}_fitCols(t,n,s,i){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-t;let d=a,f=0,p=0,m=0,_=0;return this.legendItems.forEach((b,w)=>{const{itemWidth:A,itemHeight:$}=K6(s,n,o,b,i);w>0&&p+$+2*a>u&&(d+=f+a,c.push({width:f,height:p}),m+=f+a,_++,f=p=0),l[w]={left:m,top:p,col:_,width:A,height:$},f=Math.max(f,A),p+=$+a}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:s,labels:{padding:i},rtl:o}}=this,r=dr(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=ln(s,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=ln(s,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+i}else{let a=0,l=ln(s,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=ln(s,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;bu(t,this),this._draw(),yu(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:s,ctx:i}=this,{align:o,labels:r}=t,a=Ct.color,l=dr(t.rtl,this.left,this.width),c=Ut(r.font),{padding:u}=r,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:_,itemHeight:b}=U_(r,d),w=function(y,x,C){if(isNaN(m)||m<=0||isNaN(_)||_<0)return;i.save();const P=Ge(C.lineWidth,1);if(i.fillStyle=Ge(C.fillStyle,a),i.lineCap=Ge(C.lineCap,"butt"),i.lineDashOffset=Ge(C.lineDashOffset,0),i.lineJoin=Ge(C.lineJoin,"miter"),i.lineWidth=P,i.strokeStyle=Ge(C.strokeStyle,a),i.setLineDash(Ge(C.lineDash,[])),r.usePointStyle){const E={radius:_*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:P},B=l.xPlus(y,m/2),G=x+f;L0(i,E,B,G,r.pointStyleWidth&&m)}else{const E=x+Math.max((d-_)/2,0),B=l.leftForLtr(y,m),G=Ao(C.borderRadius);i.beginPath(),Object.values(G).some(re=>re!==0)?Ja(i,{x:B,y:E,w:m,h:_,radius:G}):i.rect(B,E,m,_),i.fill(),P!==0&&i.stroke()}i.restore()},A=function(y,x,C){Do(i,C.text,y,x+b/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},$=this.isHorizontal(),M=this._computeTitleHeight();$?p={x:ln(o,this.left+u,this.right-s[0]),y:this.top+u+M,line:0}:p={x:this.left+u,y:ln(o,this.top+M+u,this.bottom-n[0].height),line:0},z0(this.ctx,t.textDirection);const k=b+u;this.legendItems.forEach((y,x)=>{i.strokeStyle=y.fontColor,i.fillStyle=y.fontColor;const C=i.measureText(y.text).width,P=l.textAlign(y.textAlign||(y.textAlign=r.textAlign)),E=m+f+C;let B=p.x,G=p.y;l.setWidth(this.width),$?x>0&&B+E+u>this.right&&(G=p.y+=k,p.line++,B=p.x=ln(o,this.left+u,this.right-s[p.line])):x>0&&G+k>this.bottom&&(B=p.x=B+n[p.line].width+u,p.line++,G=p.y=ln(o,this.top+M+u,this.bottom-n[p.line].height));const re=l.x(B);if(w(re,G,y),B=xB(P,B+m+f,$?B+E:this.right,t.rtl),A(l.x(B),G,y),$)p.x+=E+u;else if(typeof y.text!="string"){const Y=c.lineHeight;p.y+=f1(y,Y)+u}else p.y+=k}),Y0(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,s=Ut(n.font),i=fn(n.padding);if(!n.display)return;const o=dr(t.rtl,this.left,this.width),r=this.ctx,a=n.position,l=s.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=ln(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((_,b)=>Math.max(_,b.height),0);u=c+ln(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=ln(a,d,d+f);r.textAlign=o.textAlign(Gf(a)),r.textBaseline="middle",r.strokeStyle=n.color,r.fillStyle=n.color,r.font=s.string,Do(r,n.text,p,u,s)}_computeTitleHeight(){const t=this.options.title,n=Ut(t.font),s=fn(t.padding);return t.display?n.lineHeight+s.height:0}_getLegendItemAt(t,n){let s,i,o;if(qs(t,this.left,this.right)&&qs(n,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(i=o[s],qs(t,i.left,i.left+i.width)&&qs(n,i.top,i.top+i.height))return this.legendItems[s]}return null}handleEvent(t){const n=this.options;if(!J6(t.type,n))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=U6(i,s);i&&!o&&pt(n.onLeave,[t,i,this],this),this._hoveredItem=s,s&&!o&&pt(n.onHover,[t,s,this],this)}else s&&pt(n.onClick,[t,s,this],this)}}function K6(e,t,n,s,i){const o=q6(s,e,t,n),r=G6(i,s,t.lineHeight);return{itemWidth:o,itemHeight:r}}function q6(e,t,n,s){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,r)=>o.length>r.length?o:r)),t+n.size/2+s.measureText(i).width}function G6(e,t,n){let s=e;return typeof t.text!="string"&&(s=f1(t,n)),s}function f1(e,t){const n=e.text?e.text.length:0;return t*n}function J6(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var X6={id:"legend",_element:K_,start(e,t,n){const s=e.legend=new K_({ctx:e.ctx,options:n,chart:e});Gn.configure(e,s,n),Gn.addBox(e,s)},stop(e){Gn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const s=e.legend;Gn.configure(e,s,n),s.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const s=t.datasetIndex,i=n.chart;i.isDatasetVisible(s)?(i.hide(s),t.hidden=!0):(i.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:s,textAlign:i,color:o,useBorderRadius:r,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=fn(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class p1 extends oi{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=bt(s.text)?s.text.length:1;this._padding=fn(s.padding);const o=i*Ut(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:s,bottom:i,right:o,options:r}=this,a=r.align;let l=0,c,u,d;return this.isHorizontal()?(u=ln(a,s,o),d=n+t,c=o-s):(r.position==="left"?(u=s+t,d=ln(a,i,n),l=wt*-.5):(u=o-t,d=ln(a,n,i),l=wt*.5),c=i-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const s=Ut(n.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Do(t,n.text,0,0,s,{color:n.color,maxWidth:l,rotation:c,textAlign:Gf(n.align),textBaseline:"middle",translation:[r,a]})}}function Q6(e,t){const n=new p1({ctx:e.ctx,options:t,chart:e});Gn.configure(e,n,t),Gn.addBox(e,n),e.titleBlock=n}var Z6={id:"title",_element:p1,start(e,t,n){Q6(e,n)},stop(e){const t=e.titleBlock;Gn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const s=e.titleBlock;Gn.configure(e,s,n),s.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ha={average(e){if(!e.length)return!1;let t,n,s=0,i=0,o=0;for(t=0,n=e.length;t<n;++t){const r=e[t].element;if(r&&r.hasValue()){const a=r.tooltipPosition();s+=a.x,i+=a.y,++o}}return{x:s/o,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,s=t.y,i=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=e.length;o<r;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=ch(t,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,s=l.y}return{x:n,y:s}}};function vs(e,t){return t&&(bt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function js(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
`)>-1?e.split(`
|
|
`):e}function eH(e,t){const{element:n,datasetIndex:s,index:i}=t,o=e.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:e,label:r,parsed:o.getParsed(i),raw:e.data.datasets[s].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function q_(e,t){const n=e.chart.ctx,{body:s,footer:i,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=Ut(t.bodyFont),c=Ut(t.titleFont),u=Ut(t.footerFont),d=o.length,f=i.length,p=s.length,m=fn(t.padding);let _=m.height,b=0,w=s.reduce((M,k)=>M+k.before.length+k.lines.length+k.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,d&&(_+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),w){const M=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;_+=p*M+(w-p)*l.lineHeight+(w-1)*t.bodySpacing}f&&(_+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let A=0;const $=function(M){b=Math.max(b,n.measureText(M).width+A)};return n.save(),n.font=c.string,ut(e.title,$),n.font=l.string,ut(e.beforeBody.concat(e.afterBody),$),A=t.displayColors?r+2+t.boxPadding:0,ut(s,M=>{ut(M.before,$),ut(M.lines,$),ut(M.after,$)}),A=0,n.font=u.string,ut(e.footer,$),n.restore(),b+=m.width,{width:b,height:_}}function tH(e,t){const{y:n,height:s}=t;return n<s/2?"top":n>e.height-s/2?"bottom":"center"}function nH(e,t,n,s){const{x:i,width:o}=s,r=n.caretSize+n.caretPadding;if(e==="left"&&i+o+r>t.width||e==="right"&&i-o-r<0)return!0}function sH(e,t,n,s){const{x:i,width:o}=n,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return s==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),nH(c,e,t,n)&&(c="center"),c}function G_(e,t,n){const s=n.yAlign||t.yAlign||tH(e,n);return{xAlign:n.xAlign||t.xAlign||sH(e,t,n,s),yAlign:s}}function iH(e,t){let{x:n,width:s}=e;return t==="right"?n-=s:t==="center"&&(n-=s/2),n}function oH(e,t,n){let{y:s,height:i}=e;return t==="top"?s+=n:t==="bottom"?s-=i+n:s-=i/2,s}function J_(e,t,n,s){const{caretSize:i,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Ao(r);let m=iH(t,a);const _=oH(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,f)+i:a==="right"&&(m+=Math.max(d,p)+i),{x:Qt(m,0,s.width-t.width),y:Qt(_,0,s.height-t.height)}}function Ql(e,t,n){const s=fn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-s.right:e.x+s.left}function X_(e){return vs([],js(e))}function rH(e,t,n){return Ki(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Q_(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const g1={beforeTitle:Bs,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return n[t.dataIndex]}return""},afterTitle:Bs,beforeBody:Bs,beforeLabel:Bs,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return ot(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Bs,afterBody:Bs,beforeFooter:Bs,footer:Bs,afterFooter:Bs};function Sn(e,t,n,s){const i=e[t].call(n,s);return typeof i>"u"?g1[t].call(n,s):i}class _h extends oi{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,s=this.options.setContext(this.getContext()),i=s.enabled&&n.options.animation&&s.animations,o=new G0(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=rH(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:s}=n,i=Sn(s,"beforeTitle",this,t),o=Sn(s,"title",this,t),r=Sn(s,"afterTitle",this,t);let a=[];return a=vs(a,js(i)),a=vs(a,js(o)),a=vs(a,js(r)),a}getBeforeBody(t,n){return X_(Sn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:s}=n,i=[];return ut(t,o=>{const r={before:[],lines:[],after:[]},a=Q_(s,o);vs(r.before,js(Sn(a,"beforeLabel",this,o))),vs(r.lines,Sn(a,"label",this,o)),vs(r.after,js(Sn(a,"afterLabel",this,o))),i.push(r)}),i}getAfterBody(t,n){return X_(Sn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:s}=n,i=Sn(s,"beforeFooter",this,t),o=Sn(s,"footer",this,t),r=Sn(s,"afterFooter",this,t);let a=[];return a=vs(a,js(i)),a=vs(a,js(o)),a=vs(a,js(r)),a}_createItems(t){const n=this._active,s=this.chart.data,i=[],o=[],r=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(eH(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,f)=>t.filter(u,d,f,s))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,s))),ut(a,u=>{const d=Q_(t.callbacks,u);i.push(Sn(d,"labelColor",this,u)),o.push(Sn(d,"labelPointStyle",this,u)),r.push(Sn(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,n){const s=this.options.setContext(this.getContext()),i=this._active;let o,r=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=ha[s.position].call(this,i,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const l=this._size=q_(this,s),c=Object.assign({},a,l),u=G_(this.chart,s,c),d=J_(s,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,s,i){const o=this.getCaretPosition(t,s,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,s){const{xAlign:i,yAlign:o}=this,{caretSize:r,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Ao(a),{x:f,y:p}=t,{width:m,height:_}=n;let b,w,A,$,M,k;return o==="center"?(M=p+_/2,i==="left"?(b=f,w=b-r,$=M+r,k=M-r):(b=f+m,w=b+r,$=M-r,k=M+r),A=b):(i==="left"?w=f+Math.max(l,u)+r:i==="right"?w=f+m-Math.max(c,d)-r:w=this.caretX,o==="top"?($=p,M=$-r,b=w-r,A=w+r):($=p+_,M=$+r,b=w+r,A=w-r),k=$),{x1:b,x2:w,x3:A,y1:$,y2:M,y3:k}}drawTitle(t,n,s){const i=this.title,o=i.length;let r,a,l;if(o){const c=dr(s.rtl,this.x,this.width);for(t.x=Ql(this,s.titleAlign,s),n.textAlign=c.textAlign(s.titleAlign),n.textBaseline="middle",r=Ut(s.titleFont),a=s.titleSpacing,n.fillStyle=s.titleColor,n.font=r.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=s.titleMarginBottom-a)}}_drawColorBox(t,n,s,i,o){const r=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,u=Ut(o.bodyFont),d=Ql(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const _={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},b=i.leftForLtr(f,c)+c/2,w=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,dh(t,_,b,w),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,dh(t,_,b,w)}else{t.lineWidth=st(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const _=i.leftForLtr(f,c),b=i.leftForLtr(i.xPlus(f,1),c-2),w=Ao(r.borderRadius);Object.values(w).some(A=>A!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Ja(t,{x:_,y:m,w:c,h:l,radius:w}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Ja(t,{x:b,y:m+1,w:c-2,h:l-2,radius:w}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(_,m,c,l),t.strokeRect(_,m,c,l),t.fillStyle=r.backgroundColor,t.fillRect(b,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,n,s){const{body:i}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=s,d=Ut(s.bodyFont);let f=d.lineHeight,p=0;const m=dr(s.rtl,this.x,this.width),_=function(C){n.fillText(C,m.x(t.x+p),t.y+f/2),t.y+=f+o},b=m.textAlign(r);let w,A,$,M,k,y,x;for(n.textAlign=r,n.textBaseline="middle",n.font=d.string,t.x=Ql(this,b,s),n.fillStyle=s.bodyColor,ut(this.beforeBody,_),p=a&&b!=="right"?r==="center"?c/2+u:c+2+u:0,M=0,y=i.length;M<y;++M){for(w=i[M],A=this.labelTextColors[M],n.fillStyle=A,ut(w.before,_),$=w.lines,a&&$.length&&(this._drawColorBox(n,t,M,m,s),f=Math.max(d.lineHeight,l)),k=0,x=$.length;k<x;++k)_($[k]),f=d.lineHeight;ut(w.after,_)}p=0,f=d.lineHeight,ut(this.afterBody,_),t.y-=o}drawFooter(t,n,s){const i=this.footer,o=i.length;let r,a;if(o){const l=dr(s.rtl,this.x,this.width);for(t.x=Ql(this,s.footerAlign,s),t.y+=s.footerMarginTop,n.textAlign=l.textAlign(s.footerAlign),n.textBaseline="middle",r=Ut(s.footerFont),n.fillStyle=s.footerColor,n.font=r.string,a=0;a<o;++a)n.fillText(i[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing}}drawBackground(t,n,s,i){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:u}=s,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=Ao(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),r==="top"&&this.drawCaret(t,n,s,i),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),r==="center"&&o==="right"&&this.drawCaret(t,n,s,i),n.lineTo(a+c,l+u-m),n.quadraticCurveTo(a+c,l+u,a+c-m,l+u),r==="bottom"&&this.drawCaret(t,n,s,i),n.lineTo(a+p,l+u),n.quadraticCurveTo(a,l+u,a,l+u-p),r==="center"&&o==="left"&&this.drawCaret(t,n,s,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,s=this.$animations,i=s&&s.x,o=s&&s.y;if(i||o){const r=ha[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=q_(this,t),l=Object.assign({},r,this._size),c=G_(n,t,l),u=J_(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=fn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,i,n),z0(t,n.textDirection),o.y+=r.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),Y0(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const s=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Rc(s,i),r=this._positionChanged(i,n);(o||r)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],r=this._getActiveElements(t,o,n,s),a=this._positionChanged(r,t),l=n||!Rc(r,o)||a;return l&&(this._active=r,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,s,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&r.reverse(),r}_positionChanged(t,n){const{caretX:s,caretY:i,options:o}=this,r=ha[o.position].call(this,t,n);return r!==!1&&(s!==r.x||i!==r.y)}}le(_h,"positioners",ha);var aH={id:"tooltip",_element:_h,positioners:ha,afterInit(e,t,n){n&&(e.tooltip=new _h({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:g1},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const lH=(e,t,n,s)=>(typeof t=="string"?(n=e.push(t)-1,s.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function cH(e,t,n,s){const i=e.indexOf(t);if(i===-1)return lH(e,t,n,s);const o=e.lastIndexOf(t);return i!==o?n:i}const uH=(e,t)=>e===null?null:Qt(Math.round(e),0,t);function Z_(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class vh extends Fo{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const s=this.getLabels();for(const{index:i,label:o}of n)s[i]===o&&s.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(ot(t))return null;const s=this.getLabels();return n=isFinite(n)&&s[n]===t?n:cH(s,t,Ge(n,t),this._addedLabels),uH(n,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),n||(i=this.getLabels().length-1)),this.min=s,this.max=i}buildTicks(){const t=this.min,n=this.max,s=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=n;r++)i.push({value:r});return i}getLabelForValue(t){return Z_.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}le(vh,"id","category"),le(vh,"defaults",{ticks:{callback:Z_}});function dH(e,t){const n=[],{bounds:i,step:o,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,m=u-1,{min:_,max:b}=t,w=!ot(r),A=!ot(a),$=!ot(c),M=(b-_)/(d+1);let k=Gm((b-_)/m/p)*p,y,x,C,P;if(k<1e-14&&!w&&!A)return[{value:_},{value:b}];P=Math.ceil(b/k)-Math.floor(_/k),P>m&&(k=Gm(P*k/m/p)*p),ot(l)||(y=Math.pow(10,l),k=Math.ceil(k*y)/y),i==="ticks"?(x=Math.floor(_/k)*k,C=Math.ceil(b/k)*k):(x=_,C=b),w&&A&&o&&gB((a-r)/o,k/1e3)?(P=Math.round(Math.min((a-r)/k,u)),k=(a-r)/P,x=r,C=a):$?(x=w?r:x,C=A?a:C,P=c-1,k=(C-x)/P):(P=(C-x)/k,Ca(P,Math.round(P),k/1e3)?P=Math.round(P):P=Math.ceil(P));const E=Math.max(Jm(k),Jm(x));y=Math.pow(10,ot(l)?E:l),x=Math.round(x*y)/y,C=Math.round(C*y)/y;let B=0;for(w&&(f&&x!==r?(n.push({value:r}),x<r&&B++,Ca(Math.round((x+B*k)*y)/y,r,ev(r,M,e))&&B++):x<r&&B++);B<P;++B){const G=Math.round((x+B*k)*y)/y;if(A&&G>a)break;n.push({value:G})}return A&&f&&C!==a?n.length&&Ca(n[n.length-1].value,a,ev(a,M,e))?n[n.length-1].value=a:n.push({value:a}):(!A||C===a)&&n.push({value:C}),n}function ev(e,t,{horizontal:n,minRotation:s}){const i=as(s),o=(n?Math.sin(i):Math.cos(i))||.001,r=.75*t*(""+e).length;return Math.min(t/o,r)}class jc extends Fo{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return ot(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:s}=this.getUserBounds();let{min:i,max:o}=this;const r=l=>i=n?i:l,a=l=>o=s?o:l;if(t){const l=Es(i),c=Es(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:s}=t,i;return s?(i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,r=dH(i,o);return t.bounds==="ticks"&&C0(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let n=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const i=(s-n)/Math.max(t.length-1,1)/2;n-=i,s+=i}this._startValue=n,this._endValue=s,this._valueRange=s-n}getLabelForValue(t){return dl(t,this.chart.options.locale,this.options.ticks.format)}}class bh extends jc{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=$t(t)?t:0,this.max=$t(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,s=as(this.options.ticks.minRotation),i=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}le(bh,"id","linear"),le(bh,"defaults",{ticks:{callback:vu.formatters.numeric}});const Qa=e=>Math.floor(Ai(e)),uo=(e,t)=>Math.pow(10,Qa(e)+t);function tv(e){return e/Math.pow(10,Qa(e))===1}function nv(e,t,n){const s=Math.pow(10,n),i=Math.floor(e/s);return Math.ceil(t/s)-i}function hH(e,t){const n=t-e;let s=Qa(n);for(;nv(e,t,s)>10;)s++;for(;nv(e,t,s)<10;)s--;return Math.min(s,Qa(e))}function fH(e,{min:t,max:n}){t=Tn(e.min,t);const s=[],i=Qa(t);let o=hH(t,n),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*r)/r,u=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,o)),f=Tn(e.min,Math.round((l+u+d*Math.pow(10,o))*r)/r);for(;f<n;)s.push({value:f,major:tv(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,r=o>=0?1:r),f=Math.round((l+u+d*Math.pow(10,o))*r)/r;const p=Tn(e.max,f);return s.push({value:p,major:tv(p),significand:d}),s}class yh extends Fo{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const s=jc.prototype.parse.apply(this,[t,n]);if(s===0){this._zero=!0;return}return $t(s)&&s>0?s:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=$t(t)?Math.max(0,t):null,this.max=$t(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!$t(this._userMin)&&(this.min=t===uo(this.min,0)?uo(this.min,-1):uo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let s=this.min,i=this.max;const o=a=>s=t?s:a,r=a=>i=n?i:a;s===i&&(s<=0?(o(1),r(10)):(o(uo(s,-1)),r(uo(i,1)))),s<=0&&o(uo(i,-1)),i<=0&&r(uo(s,1)),this.min=s,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},s=fH(n,this);return t.bounds==="ticks"&&C0(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":dl(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ai(t),this._valueRange=Ai(this.max)-Ai(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ai(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}le(yh,"id","logarithmic"),le(yh,"defaults",{ticks:{callback:vu.formatters.logarithmic,major:{enabled:!0}}});function wh(e){const t=e.ticks;if(t.display&&e.display){const n=fn(t.backdropPadding);return Ge(t.font&&t.font.size,Ct.font.size)+n.height}return 0}function pH(e,t,n){return n=bt(n)?n:[n],{w:DB(e,t.string,n),h:n.length*t.lineHeight}}function sv(e,t,n,s,i){return e===s||e===i?{start:t-n/2,end:t+n/2}:e<s||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function gH(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),s=[],i=[],o=e._pointLabels.length,r=e.options.pointLabels,a=r.centerPointLabels?wt/o:0;for(let l=0;l<o;l++){const c=r.setContext(e.getPointLabelContext(l));i[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+i[l],a),d=Ut(c.font),f=pH(e.ctx,d,e._pointLabels[l]);s[l]=f;const p=Dn(e.getIndexAngle(l)+a),m=Math.round(Kf(p)),_=sv(m,u.x,f.w,0,180),b=sv(m,u.y,f.h,90,270);mH(n,t,p,_,b)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=bH(e,s,i)}function mH(e,t,n,s,i){const o=Math.abs(Math.sin(n)),r=Math.abs(Math.cos(n));let a=0,l=0;s.start<t.l?(a=(t.l-s.start)/o,e.l=Math.min(e.l,t.l-a)):s.end>t.r&&(a=(s.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/r,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/r,e.b=Math.max(e.b,t.b+l))}function _H(e,t,n){const s=e.drawingArea,{extra:i,additionalAngle:o,padding:r,size:a}=n,l=e.getPointPosition(t,s+i+r,o),c=Math.round(Kf(Dn(l.angle+Rt))),u=xH(l.y,a.h,c),d=yH(c),f=wH(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function vH(e,t){if(!t)return!0;const{left:n,top:s,right:i,bottom:o}=e;return!(Js({x:n,y:s},t)||Js({x:n,y:o},t)||Js({x:i,y:s},t)||Js({x:i,y:o},t))}function bH(e,t,n){const s=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:wh(o)/2,additionalAngle:r?wt/i:0};let c;for(let u=0;u<i;u++){l.padding=n[u],l.size=t[u];const d=_H(e,u,l);s.push(d),a==="auto"&&(d.visible=vH(d,c),d.visible&&(c=d))}return s}function yH(e){return e===0||e===180?"center":e<180?"left":"right"}function wH(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function xH(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function kH(e,t,n){const{left:s,top:i,right:o,bottom:r}=n,{backdropColor:a}=t;if(!ot(a)){const l=Ao(t.borderRadius),c=fn(t.backdropPadding);e.fillStyle=a;const u=s-c.left,d=i-c.top,f=o-s+c.width,p=r-i+c.height;Object.values(l).some(m=>m!==0)?(e.beginPath(),Ja(e,{x:u,y:d,w:f,h:p,radius:l}),e.fill()):e.fillRect(u,d,f,p)}}function SH(e,t){const{ctx:n,options:{pointLabels:s}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const r=s.setContext(e.getPointLabelContext(i));kH(n,r,o);const a=Ut(r.font),{x:l,y:c,textAlign:u}=o;Do(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:r.color,textAlign:u,textBaseline:"middle"})}}function m1(e,t,n,s){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,yt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let r=1;r<s;r++)o=e.getPointPosition(r,t),i.lineTo(o.x,o.y)}}function AH(e,t,n,s,i){const o=e.ctx,r=t.circular,{color:a,lineWidth:l}=t;!r&&!s||!a||!l||n<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(i.dash),o.lineDashOffset=i.dashOffset,o.beginPath(),m1(e,n,r,s),o.closePath(),o.stroke(),o.restore())}function $H(e,t,n){return Ki(e,{label:n,index:t,type:"pointLabel"})}class fa extends jc{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=fn(wh(this.options)/2),n=this.width=this.maxWidth-t.width,s=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+s/2+t.top),this.drawingArea=Math.floor(Math.min(n,s)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=$t(t)&&!isNaN(t)?t:0,this.max=$t(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/wh(this.options))}generateTickLabels(t){jc.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,s)=>{const i=pt(this.options.pointLabels.callback,[n,s],this);return i||i===0?i:""}).filter((n,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?gH(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,s,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((s-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,s,i))}getIndexAngle(t){const n=yt/(this._pointLabels.length||1),s=this.options.startAngle||0;return Dn(t*n+as(s))}getDistanceFromCenterForValue(t){if(ot(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ot(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const s=n[t];return $H(this.getContext(),t,s)}}getPointPosition(t,n,s=0){const i=this.getIndexAngle(t)-Rt+s;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:s,right:i,bottom:o}=this._pointLabelItems[t];return{left:n,top:s,right:i,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const s=this.ctx;s.save(),s.beginPath(),m1(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),s.closePath(),s.fillStyle=t,s.fill(),s.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:s,grid:i,border:o}=n,r=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&SH(this,r),i.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),p=i.setContext(f),m=o.setContext(f);AH(this,p,l,r,m)}}),s.display){for(t.save(),a=r-1;a>=0;a--){const u=s.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,s=n.ticks;if(!s.display)return;const i=this.getIndexAngle(0);let o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=s.setContext(this.getContext(l)),u=Ut(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=fn(c.backdropPadding);t.fillRect(-r/2-d.left,-o-u.size/2-d.top,r+d.width,u.size+d.height)}Do(t,a.label,0,-o,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}le(fa,"id","radialLinear"),le(fa,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:vu.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),le(fa,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),le(fa,"descriptors",{angleLines:{_fallback:"grid"}});const ku={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},$n=Object.keys(ku);function iv(e,t){return e-t}function ov(e,t){if(ot(t))return null;const n=e._adapter,{parser:s,round:i,isoWeekday:o}=e._parseOpts;let r=t;return typeof s=="function"&&(r=s(r)),$t(r)||(r=typeof s=="string"?n.parse(r,s):n.parse(r)),r===null?null:(i&&(r=i==="week"&&(Pr(o)||o===!0)?n.startOf(r,"isoWeek",o):n.startOf(r,i)),+r)}function rv(e,t,n,s){const i=$n.length;for(let o=$n.indexOf(e);o<i-1;++o){const r=ku[$n[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-t)/(a*r.size))<=s)return $n[o]}return $n[i-1]}function CH(e,t,n,s,i){for(let o=$n.length-1;o>=$n.indexOf(n);o--){const r=$n[o];if(ku[r].common&&e._adapter.diff(i,s,r)>=t-1)return r}return $n[n?$n.indexOf(n):0]}function EH(e){for(let t=$n.indexOf(e)+1,n=$n.length;t<n;++t)if(ku[$n[t]].common)return $n[t]}function av(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:s,hi:i}=qf(n,t),o=n[s]>=t?n[s]:n[i];e[o]=!0}}function PH(e,t,n,s){const i=e._adapter,o=+i.startOf(t[0].value,s),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+i.add(a,1,s))l=n[a],l>=0&&(t[l].major=!0);return t}function lv(e,t,n){const s=[],i={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],i[a]=r,s.push({value:a,major:!1});return o===0||!n?s:PH(e,s,i,n)}class Za extends Fo{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const s=t.time||(t.time={}),i=this._adapter=new K4._date(t.adapters.date);i.init(n),$a(s.displayFormats,i.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ov(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,s=t.time.unit||"day";let{min:i,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=$t(i)&&!isNaN(i)?i:+n.startOf(Date.now(),s),o=$t(o)&&!isNaN(o)?o:+n.endOf(Date.now(),s)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],s=t[t.length-1]),{min:n,max:s}}buildTicks(){const t=this.options,n=t.time,s=t.ticks,i=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,r=this.max,a=bB(i,o,r);return this._unit=n.unit||(s.autoSkip?rv(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):CH(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:EH(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),lv(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,s=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=Qt(n,0,r),s=Qt(s,0,r),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const t=this._adapter,n=this.min,s=this.max,i=this.options,o=i.time,r=o.unit||rv(o.minUnit,n,s,this._getLabelCapacity(n)),a=Ge(i.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Pr(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(s,n,r)>1e5*a)throw new Error(n+" and "+s+" are too far apart with stepSize of "+a+" "+r);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<s;f=+t.add(f,a,r),p++)av(u,f,m);return(f===s||i.bounds==="ticks"||p===1)&&av(u,f,m),Object.keys(u).sort(iv).map(_=>+_)}getLabelForValue(t){const n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(t,s.tooltipFormat):n.format(t,s.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,r=n||i[o];return this._adapter.format(t,r)}_tickFormatFunction(t,n,s,i){const o=this.options,r=o.ticks.callback;if(r)return pt(r,[t,n,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=s[n],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let n,s,i;for(n=0,s=t.length;n<s;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(t){const n=this._offsets,s=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,s=this.ctx.measureText(t).width,i=as(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),r=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:s*o+a*r,h:s*r+a*o}}_getLabelCapacity(t){const n=this.options.time,s=n.displayFormats,i=s[n.unit]||s.millisecond,o=this._tickFormatFunction(t,0,lv(this,[t],this._majorUnit),i),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,s;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,s=i.length;n<s;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,s;if(t.length)return t;const i=this.getLabels();for(n=0,s=i.length;n<s;++n)t.push(ov(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return T0(t.sort(iv))}}le(Za,"id","time"),le(Za,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Zl(e,t,n){let s=0,i=e.length-1,o,r,a,l;n?(t>=e[s].pos&&t<=e[i].pos&&({lo:s,hi:i}=Gs(e,"pos",t)),{pos:o,time:a}=e[s],{pos:r,time:l}=e[i]):(t>=e[s].time&&t<=e[i].time&&({lo:s,hi:i}=Gs(e,"time",t)),{time:o,pos:a}=e[s],{time:r,pos:l}=e[i]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class xh extends Za{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Zl(n,this.min),this._tableRange=Zl(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:s}=this,i=[],o=[];let r,a,l,c,u;for(r=0,a=t.length;r<a;++r)c=t[r],c>=n&&c<=s&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:s,pos:1}];for(r=0,a=i.length;r<a;++r)u=i[r+1],l=i[r-1],c=i[r],Math.round((u+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,n=this.max;let s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(n)||s.length===1)&&s.push(n),s.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),s=this.getLabelTimestamps();return n.length&&s.length?t=this.normalize(n.concat(s)):t=n.length?n:s,t=this._cache.all=t,t}getDecimalForValue(t){return(Zl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,s=this.getDecimalForPixel(t)/n.factor-n.end;return Zl(this._table,s*this._tableRange+this._minPos,!0)}}le(xh,"id","timeseries"),le(xh,"defaults",Za.defaults);const _1={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},TH={ariaLabel:{type:String},ariaDescribedby:{type:String}},MH={type:{type:String,required:!0},..._1,...TH},DH=Qb[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function er(e){return eu(e)?Ze(e):e}function OH(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return eu(t)?new Proxy(e,{}):e}function IH(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function v1(e,t){e.labels=t}function b1(e,t,n){const s=[];e.datasets=t.map(i=>{const o=e.datasets.find(r=>r[n]===i[n]);return!o||!i.data||s.includes(o)?{...i}:(s.push(o),Object.assign(o,i),o)})}function RH(e,t){const n={labels:[],datasets:[]};return v1(n,e.labels),b1(n,e.datasets,t),n}const LH=Nt({props:MH,setup(e,t){let{expose:n,slots:s}=t;const i=be(null),o=of(null);n({chart:o});const r=()=>{if(!i.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:p}=e,m=RH(u,p),_=OH(m,u);o.value=new xu(i.value,{type:c,data:_,options:{...d},plugins:f})},a=()=>{const c=Ze(o.value);c&&(c.destroy(),o.value=null)},l=c=>{c.update(e.updateMode)};return Kt(r),hf(a),Vt([()=>e.options,()=>e.data],(c,u)=>{let[d,f]=c,[p,m]=u;const _=Ze(o.value);if(!_)return;let b=!1;if(d){const w=er(d),A=er(p);w&&w!==A&&(IH(_,w),b=!0)}if(f){const w=er(f.labels),A=er(m.labels),$=er(f.datasets),M=er(m.datasets);w!==A&&(v1(_.config.data,w),b=!0),$&&$!==M&&(b1(_.config.data,$,e.datasetIdKey),b=!0)}b&&Zt(()=>{l(_)})},{deep:!0}),()=>To("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:i},[To("p",{},[s.default?s.default():""])])}});function y1(e,t){return xu.register(t),Nt({props:_1,setup(n,s){let{expose:i}=s;const o=of(null),r=a=>{o.value=a==null?void 0:a.chart};return i({chart:o}),()=>To(LH,DH({ref:r},{type:e,...n}))}})}const NH=y1("bar",Ta),FH=y1("line",Ma);function ti(e){return Array.isArray?Array.isArray(e):k1(e)==="[object Array]"}const BH=1/0;function VH(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-BH?"-0":t}function HH(e){return e==null?"":VH(e)}function As(e){return typeof e=="string"}function w1(e){return typeof e=="number"}function jH(e){return e===!0||e===!1||WH(e)&&k1(e)=="[object Boolean]"}function x1(e){return typeof e=="object"}function WH(e){return x1(e)&&e!==null}function On(e){return e!=null}function Ed(e){return!e.trim().length}function k1(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zH="Incorrect 'index' type",YH=e=>`Invalid value for key ${e}`,UH=e=>`Pattern length exceeds max of ${e}.`,KH=e=>`Missing ${e} property in key`,qH=e=>`Property 'weight' in key '${e}' must be a positive integer`,cv=Object.prototype.hasOwnProperty;class GH{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(s=>{let i=S1(s);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(s=>{s.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function S1(e){let t=null,n=null,s=null,i=1,o=null;if(As(e)||ti(e))s=e,t=uv(e),n=kh(e);else{if(!cv.call(e,"name"))throw new Error(KH("name"));const r=e.name;if(s=r,cv.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(qH(r));t=uv(r),n=kh(r),o=e.getFn}return{path:t,id:n,weight:i,src:s,getFn:o}}function uv(e){return ti(e)?e:e.split(".")}function kh(e){return ti(e)?e.join("."):e}function JH(e,t){let n=[],s=!1;const i=(o,r,a)=>{if(On(o))if(!r[a])n.push(o);else{let l=r[a];const c=o[l];if(!On(c))return;if(a===r.length-1&&(As(c)||w1(c)||jH(c)))n.push(HH(c));else if(ti(c)){s=!0;for(let u=0,d=c.length;u<d;u+=1)i(c[u],r,a+1)}else r.length&&i(c,r,a+1)}};return i(e,As(t)?t.split("."):t,0),s?n:n[0]}const XH={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},QH={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ZH={location:0,threshold:.6,distance:100},e8={useExtendedSearch:!1,getFn:JH,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var qe={...QH,...XH,...ZH,...e8};const t8=/[^ ]+/g;function n8(e=1,t=3){const n=new Map,s=Math.pow(10,t);return{get(i){const o=i.match(t8).length;if(n.has(o))return n.get(o);const r=1/Math.pow(o,.5*e),a=parseFloat(Math.round(r*s)/s);return n.set(o,a),a},clear(){n.clear()}}}class op{constructor({getFn:t=qe.getFn,fieldNormWeight:n=qe.fieldNormWeight}={}){this.norm=n8(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,s)=>{this._keysMap[n.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,As(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();As(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,s=this.size();n<s;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!On(t)||Ed(t))return;let s={v:t,i:n,n:this.norm.get(t)};this.records.push(s)}_addObject(t,n){let s={i:n,$:{}};this.keys.forEach((i,o)=>{let r=i.getFn?i.getFn(t):this.getFn(t,i.path);if(On(r)){if(ti(r)){let a=[];const l=[{nestedArrIndex:-1,value:r}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(On(u))if(As(u)&&!Ed(u)){let d={v:u,i:c,n:this.norm.get(u)};a.push(d)}else ti(u)&&u.forEach((d,f)=>{l.push({nestedArrIndex:f,value:d})})}s.$[o]=a}else if(As(r)&&!Ed(r)){let a={v:r,n:this.norm.get(r)};s.$[o]=a}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function A1(e,t,{getFn:n=qe.getFn,fieldNormWeight:s=qe.fieldNormWeight}={}){const i=new op({getFn:n,fieldNormWeight:s});return i.setKeys(e.map(S1)),i.setSources(t),i.create(),i}function s8(e,{getFn:t=qe.getFn,fieldNormWeight:n=qe.fieldNormWeight}={}){const{keys:s,records:i}=e,o=new op({getFn:t,fieldNormWeight:n});return o.setKeys(s),o.setIndexRecords(i),o}function ec(e,{errors:t=0,currentLocation:n=0,expectedLocation:s=0,distance:i=qe.distance,ignoreLocation:o=qe.ignoreLocation}={}){const r=t/e.length;if(o)return r;const a=Math.abs(s-n);return i?r+a/i:a?1:r}function i8(e=[],t=qe.minMatchCharLength){let n=[],s=-1,i=-1,o=0;for(let r=e.length;o<r;o+=1){let a=e[o];a&&s===-1?s=o:!a&&s!==-1&&(i=o-1,i-s+1>=t&&n.push([s,i]),s=-1)}return e[o-1]&&o-s>=t&&n.push([s,o-1]),n}const _o=32;function o8(e,t,n,{location:s=qe.location,distance:i=qe.distance,threshold:o=qe.threshold,findAllMatches:r=qe.findAllMatches,minMatchCharLength:a=qe.minMatchCharLength,includeMatches:l=qe.includeMatches,ignoreLocation:c=qe.ignoreLocation}={}){if(t.length>_o)throw new Error(UH(_o));const u=t.length,d=e.length,f=Math.max(0,Math.min(s,d));let p=o,m=f;const _=a>1||l,b=_?Array(d):[];let w;for(;(w=e.indexOf(t,m))>-1;){let x=ec(t,{currentLocation:w,expectedLocation:f,distance:i,ignoreLocation:c});if(p=Math.min(x,p),m=w+u,_){let C=0;for(;C<u;)b[w+C]=1,C+=1}}m=-1;let A=[],$=1,M=u+d;const k=1<<u-1;for(let x=0;x<u;x+=1){let C=0,P=M;for(;C<P;)ec(t,{errors:x,currentLocation:f+P,expectedLocation:f,distance:i,ignoreLocation:c})<=p?C=P:M=P,P=Math.floor((M-C)/2+C);M=P;let E=Math.max(1,f-P+1),B=r?d:Math.min(f+P,d)+u,G=Array(B+2);G[B+1]=(1<<x)-1;for(let Y=B;Y>=E;Y-=1){let L=Y-1,I=n[e.charAt(L)];if(_&&(b[L]=+!!I),G[Y]=(G[Y+1]<<1|1)&I,x&&(G[Y]|=(A[Y+1]|A[Y])<<1|1|A[Y+1]),G[Y]&k&&($=ec(t,{errors:x,currentLocation:L,expectedLocation:f,distance:i,ignoreLocation:c}),$<=p)){if(p=$,m=L,m<=f)break;E=Math.max(1,2*f-m)}}if(ec(t,{errors:x+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:c})>p)break;A=G}const y={isMatch:m>=0,score:Math.max(.001,$)};if(_){const x=i8(b,a);x.length?l&&(y.indices=x):y.isMatch=!1}return y}function r8(e){let t={};for(let n=0,s=e.length;n<s;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<s-n-1}return t}class $1{constructor(t,{location:n=qe.location,threshold:s=qe.threshold,distance:i=qe.distance,includeMatches:o=qe.includeMatches,findAllMatches:r=qe.findAllMatches,minMatchCharLength:a=qe.minMatchCharLength,isCaseSensitive:l=qe.isCaseSensitive,ignoreLocation:c=qe.ignoreLocation}={}){if(this.options={location:n,threshold:s,distance:i,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const u=(f,p)=>{this.chunks.push({pattern:f,alphabet:r8(f),startIndex:p})},d=this.pattern.length;if(d>_o){let f=0;const p=d%_o,m=d-p;for(;f<m;)u(this.pattern.substr(f,_o),f),f+=_o;if(p){const _=d-_o;u(this.pattern.substr(_),_)}}else u(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:s}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let m={isMatch:!0,score:0};return s&&(m.indices=[[0,t.length-1]]),m}const{location:i,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,ignoreLocation:c}=this.options;let u=[],d=0,f=!1;this.chunks.forEach(({pattern:m,alphabet:_,startIndex:b})=>{const{isMatch:w,score:A,indices:$}=o8(t,m,_,{location:i+b,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:s,ignoreLocation:c});w&&(f=!0),d+=A,w&&$&&(u=[...u,...$])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&s&&(p.indices=u),p}}class qi{constructor(t){this.pattern=t}static isMultiMatch(t){return dv(t,this.multiRegex)}static isSingleMatch(t){return dv(t,this.singleRegex)}search(){}}function dv(e,t){const n=e.match(t);return n?n[1]:null}class a8 extends qi{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class l8 extends qi{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class c8 extends qi{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class u8 extends qi{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class d8 extends qi{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class h8 extends qi{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class C1 extends qi{constructor(t,{location:n=qe.location,threshold:s=qe.threshold,distance:i=qe.distance,includeMatches:o=qe.includeMatches,findAllMatches:r=qe.findAllMatches,minMatchCharLength:a=qe.minMatchCharLength,isCaseSensitive:l=qe.isCaseSensitive,ignoreLocation:c=qe.ignoreLocation}={}){super(t),this._bitapSearch=new $1(t,{location:n,threshold:s,distance:i,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class E1 extends qi{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,s;const i=[],o=this.pattern.length;for(;(s=t.indexOf(this.pattern,n))>-1;)n=s+o,i.push([s,n-1]);const r=!!i.length;return{isMatch:r,score:r?0:1,indices:i}}}const Sh=[a8,E1,c8,u8,h8,d8,l8,C1],hv=Sh.length,f8=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,p8="|";function g8(e,t={}){return e.split(p8).map(n=>{let s=n.trim().split(f8).filter(o=>o&&!!o.trim()),i=[];for(let o=0,r=s.length;o<r;o+=1){const a=s[o];let l=!1,c=-1;for(;!l&&++c<hv;){const u=Sh[c];let d=u.isMultiMatch(a);d&&(i.push(new u(d,t)),l=!0)}if(!l)for(c=-1;++c<hv;){const u=Sh[c];let d=u.isSingleMatch(a);if(d){i.push(new u(d,t));break}}}return i})}const m8=new Set([C1.type,E1.type]);class _8{constructor(t,{isCaseSensitive:n=qe.isCaseSensitive,includeMatches:s=qe.includeMatches,minMatchCharLength:i=qe.minMatchCharLength,ignoreLocation:o=qe.ignoreLocation,findAllMatches:r=qe.findAllMatches,location:a=qe.location,threshold:l=qe.threshold,distance:c=qe.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:i,findAllMatches:r,ignoreLocation:o,location:a,threshold:l,distance:c},this.pattern=n?t:t.toLowerCase(),this.query=g8(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let o=0,r=[],a=0;for(let l=0,c=n.length;l<c;l+=1){const u=n[l];r.length=0,o=0;for(let d=0,f=u.length;d<f;d+=1){const p=u[d],{isMatch:m,indices:_,score:b}=p.search(t);if(m){if(o+=1,a+=b,s){const w=p.constructor.type;m8.has(w)?r=[...r,..._]:r.push(_)}}else{a=0,o=0,r.length=0;break}}if(o){let d={isMatch:!0,score:a/o};return s&&(d.indices=r),d}}return{isMatch:!1,score:1}}}const Ah=[];function v8(...e){Ah.push(...e)}function $h(e,t){for(let n=0,s=Ah.length;n<s;n+=1){let i=Ah[n];if(i.condition(e,t))return new i(e,t)}return new $1(e,t)}const Wc={AND:"$and",OR:"$or"},Ch={PATH:"$path",PATTERN:"$val"},Eh=e=>!!(e[Wc.AND]||e[Wc.OR]),b8=e=>!!e[Ch.PATH],y8=e=>!ti(e)&&x1(e)&&!Eh(e),fv=e=>({[Wc.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function P1(e,t,{auto:n=!0}={}){const s=i=>{let o=Object.keys(i);const r=b8(i);if(!r&&o.length>1&&!Eh(i))return s(fv(i));if(y8(i)){const l=r?i[Ch.PATH]:o[0],c=r?i[Ch.PATTERN]:i[l];if(!As(c))throw new Error(YH(l));const u={keyId:kh(l),pattern:c};return n&&(u.searcher=$h(c,t)),u}let a={children:[],operator:o[0]};return o.forEach(l=>{const c=i[l];ti(c)&&c.forEach(u=>{a.children.push(s(u))})}),a};return Eh(e)||(e=fv(e)),s(e)}function w8(e,{ignoreFieldNorm:t=qe.ignoreFieldNorm}){e.forEach(n=>{let s=1;n.matches.forEach(({key:i,norm:o,score:r})=>{const a=i?i.weight:null;s*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(t?1:o))}),n.score=s})}function x8(e,t){const n=e.matches;t.matches=[],On(n)&&n.forEach(s=>{if(!On(s.indices)||!s.indices.length)return;const{indices:i,value:o}=s;let r={indices:i,value:o};s.key&&(r.key=s.key.src),s.idx>-1&&(r.refIndex=s.idx),t.matches.push(r)})}function k8(e,t){t.score=e.score}function S8(e,t,{includeMatches:n=qe.includeMatches,includeScore:s=qe.includeScore}={}){const i=[];return n&&i.push(x8),s&&i.push(k8),e.map(o=>{const{idx:r}=o,a={item:t[r],refIndex:r};return i.length&&i.forEach(l=>{l(o,a)}),a})}class Hr{constructor(t,n={},s){this.options={...qe,...n},this.options.useExtendedSearch,this._keyStore=new GH(this.options.keys),this.setCollection(t,s)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof op))throw new Error(zH);this._myIndex=n||A1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){On(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let s=0,i=this._docs.length;s<i;s+=1){const o=this._docs[s];t(o,s)&&(this.removeAt(s),s-=1,i-=1,n.push(o))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:s,includeScore:i,shouldSort:o,sortFn:r,ignoreFieldNorm:a}=this.options;let l=As(t)?As(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return w8(l,{ignoreFieldNorm:a}),o&&l.sort(r),w1(n)&&n>-1&&(l=l.slice(0,n)),S8(l,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(t){const n=$h(t,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:o,i:r,n:a})=>{if(!On(o))return;const{isMatch:l,score:c,indices:u}=n.searchIn(o);l&&i.push({item:o,idx:r,matches:[{score:c,value:o,norm:a,indices:u}]})}),i}_searchLogical(t){const n=P1(t,this.options),s=(a,l,c)=>{if(!a.children){const{keyId:d,searcher:f}=a,p=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:f});return p&&p.length?[{idx:c,item:l,matches:p}]:[]}const u=[];for(let d=0,f=a.children.length;d<f;d+=1){const p=a.children[d],m=s(p,l,c);if(m.length)u.push(...m);else if(a.operator===Wc.AND)return[]}return u},i=this._myIndex.records,o={},r=[];return i.forEach(({$:a,i:l})=>{if(On(a)){let c=s(n,a,l);c.length&&(o[l]||(o[l]={idx:l,item:a,matches:[]},r.push(o[l])),c.forEach(({matches:u})=>{o[l].matches.push(...u)}))}}),r}_searchObjectList(t){const n=$h(t,this.options),{keys:s,records:i}=this._myIndex,o=[];return i.forEach(({$:r,i:a})=>{if(!On(r))return;let l=[];s.forEach((c,u)=>{l.push(...this._findMatches({key:c,value:r[u],searcher:n}))}),l.length&&o.push({idx:a,item:r,matches:l})}),o}_findMatches({key:t,value:n,searcher:s}){if(!On(n))return[];let i=[];if(ti(n))n.forEach(({v:o,i:r,n:a})=>{if(!On(o))return;const{isMatch:l,score:c,indices:u}=s.searchIn(o);l&&i.push({score:c,key:t,value:o,idx:r,norm:a,indices:u})});else{const{v:o,n:r}=n,{isMatch:a,score:l,indices:c}=s.searchIn(o);a&&i.push({score:l,key:t,value:o,norm:r,indices:c})}return i}}Hr.version="7.0.0";Hr.createIndex=A1;Hr.parseIndex=s8;Hr.config=qe;Hr.parseQuery=P1;v8(_8);const A8={name:"peerSettings",props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:et()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,dt(`/api/updatePeerSettings/${this.$route.params.id}`,this.data,e=>{this.saving=!1,e.status?this.dashboardConfigurationStore.newMessage("Server","Peer Updated!","success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.$emit("refresh")})},resetPeerData(e){this.saving=!0,dt(`/api/resetPeerData/${this.$route.params.id}`,{id:this.data.id,type:e},t=>{this.saving=!1,t.status?this.dashboardConfigurationStore.newMessage("Server","Peer data usage reset successfully.","success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.$emit("refresh")})}},beforeMount(){this.reset()},mounted(){this.$el.querySelectorAll("input").forEach(e=>{e.addEventListener("keyup",()=>{this.dataChanged=!0})})}},nn=e=>(en("data-v-5c34b056"),e=e(),tn(),e),$8={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},C8={class:"container d-flex h-100 w-100"},E8={class:"m-auto modal-dialog-centered dashboardModal"},P8={class:"card rounded-3 shadow flex-grow-1"},T8={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},M8=nn(()=>h("h4",{class:"mb-0"},"Peer Settings",-1)),D8={key:0,class:"card-body px-4 pb-4"},O8={class:"d-flex flex-column gap-2 mb-4"},I8={class:"d-flex align-items-center"},R8=nn(()=>h("small",{class:"text-muted"},"Public Key",-1)),L8={class:"ms-auto"},N8=nn(()=>h("label",{for:"peer_name_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Name")],-1)),F8=["disabled"],B8={class:"d-flex position-relative"},V8=nn(()=>h("label",{for:"peer_private_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},[ye("Private Key "),h("code",null,"(Required for QR Code and Download)")])],-1)),H8=["type","disabled"],j8=nn(()=>h("label",{for:"peer_allowed_ip_textbox",class:"form-label"},[h("small",{class:"text-muted"},[ye("Allowed IPs "),h("code",null,"(Required)")])],-1)),W8=["disabled"],z8=nn(()=>h("label",{for:"peer_endpoint_allowed_ips",class:"form-label"},[h("small",{class:"text-muted"},[ye("Endpoint Allowed IPs "),h("code",null,"(Required)")])],-1)),Y8=["disabled"],U8=nn(()=>h("label",{for:"peer_DNS_textbox",class:"form-label"},[h("small",{class:"text-muted"},"DNS")],-1)),K8=["disabled"],q8={class:"accordion mt-3",id:"peerSettingsAccordion"},G8={class:"accordion-item"},J8=nn(()=>h("h2",{class:"accordion-header"},[h("button",{class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"}," Optional Settings ")],-1)),X8={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},Q8={class:"accordion-body d-flex flex-column gap-2 mb-2"},Z8=nn(()=>h("label",{for:"peer_preshared_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Pre-Shared Key")],-1)),ej=["disabled"],tj=nn(()=>h("label",{for:"peer_mtu",class:"form-label"},[h("small",{class:"text-muted"},"MTU")],-1)),nj=["disabled"],sj=nn(()=>h("label",{for:"peer_keep_alive",class:"form-label"},[h("small",{class:"text-muted"},"Persistent Keepalive")],-1)),ij=["disabled"],oj=nn(()=>h("hr",null,null,-1)),rj={class:"d-flex gap-2 align-items-center"},aj=nn(()=>h("strong",null,"Reset Data Usage",-1)),lj={class:"d-flex gap-2 ms-auto"},cj=nn(()=>h("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),uj=nn(()=>h("i",{class:"bi bi-arrow-down me-2"},null,-1)),dj=nn(()=>h("i",{class:"bi bi-arrow-up me-2"},null,-1)),hj={class:"d-flex align-items-center gap-2"},fj=["disabled"],pj=nn(()=>h("i",{class:"bi bi-arrow-clockwise ms-2"},null,-1)),gj=["disabled"],mj=nn(()=>h("i",{class:"bi bi-save-fill ms-2"},null,-1));function _j(e,t,n,s,i,o){return O(),F("div",$8,[h("div",C8,[h("div",E8,[h("div",P8,[h("div",T8,[M8,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=r=>this.$emit("close"))})]),this.data?(O(),F("div",D8,[h("div",O8,[h("div",I8,[R8,h("small",L8,[h("samp",null,ve(this.data.id),1)])]),h("div",null,[N8,Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[1]||(t[1]=r=>this.data.name=r),id:"peer_name_textbox",placeholder:""},null,8,F8),[[We,this.data.name]])]),h("div",null,[h("div",B8,[V8,h("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:t[2]||(t[2]=r=>this.showKey=!this.showKey)},[h("i",{class:Ee(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),Re(h("input",{type:[this.showKey?"text":"password"],class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[3]||(t[3]=r=>this.data.private_key=r),id:"peer_private_key_textbox",style:{"padding-right":"40px"}},null,8,H8),[[IC,this.data.private_key]])]),h("div",null,[j8,Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[4]||(t[4]=r=>this.data.allowed_ip=r),id:"peer_allowed_ip_textbox"},null,8,W8),[[We,this.data.allowed_ip]])]),h("div",null,[z8,Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[5]||(t[5]=r=>this.data.endpoint_allowed_ip=r),id:"peer_endpoint_allowed_ips"},null,8,Y8),[[We,this.data.endpoint_allowed_ip]])]),h("div",null,[U8,Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[6]||(t[6]=r=>this.data.DNS=r),id:"peer_DNS_textbox"},null,8,K8),[[We,this.data.DNS]])]),h("div",q8,[h("div",G8,[J8,h("div",X8,[h("div",Q8,[h("div",null,[Z8,Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[7]||(t[7]=r=>this.data.preshared_key=r),id:"peer_preshared_key_textbox"},null,8,ej),[[We,this.data.preshared_key]])]),h("div",null,[tj,Re(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[8]||(t[8]=r=>this.data.mtu=r),id:"peer_mtu"},null,8,nj),[[We,this.data.mtu]])]),h("div",null,[sj,Re(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[9]||(t[9]=r=>this.data.keepalive=r),id:"peer_keep_alive"},null,8,ij),[[We,this.data.keepalive]])])])])])]),oj,h("div",rj,[aj,h("div",lj,[h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:t[10]||(t[10]=r=>this.resetPeerData("total"))},[cj,ye(" Total ")]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:t[11]||(t[11]=r=>this.resetPeerData("receive"))},[uj,ye(" Received ")]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:t[12]||(t[12]=r=>this.resetPeerData("sent"))},[dj,ye(" Sent ")])])])]),h("div",hj,[h("button",{class:"btn btn-secondary rounded-3 shadow",onClick:t[13]||(t[13]=r=>this.reset()),disabled:!this.dataChanged||this.saving},[ye(" Revert "),pj],8,fj),h("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.dataChanged||this.saving,onClick:t[14]||(t[14]=r=>this.savePeer())},[ye(" Save Peer"),mj],8,gj)])])):ae("",!0)])])])])}const vj=ze(A8,[["render",_j],["__scopeId","data-v-5c34b056"]]);var Bo={},bj=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},T1={},Vn={};let rp;const yj=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Vn.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Vn.getSymbolTotalCodewords=function(t){return yj[t]};Vn.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Vn.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');rp=t};Vn.isKanjiModeEnabled=function(){return typeof rp<"u"};Vn.toSJIS=function(t){return rp(t)};var Su={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(s){return s&&typeof s.bit<"u"&&s.bit>=0&&s.bit<4},e.from=function(s,i){if(e.isValid(s))return s;try{return t(s)}catch{return i}}})(Su);function M1(){this.buffer=[],this.length=0}M1.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var wj=M1;function fl(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}fl.prototype.set=function(e,t,n,s){const i=e*this.size+t;this.data[i]=n,s&&(this.reservedBit[i]=!0)};fl.prototype.get=function(e,t){return this.data[e*this.size+t]};fl.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};fl.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var xj=fl,D1={};(function(e){const t=Vn.getSymbolSize;e.getRowColCoords=function(s){if(s===1)return[];const i=Math.floor(s/7)+2,o=t(s),r=o===145?26:Math.ceil((o-13)/(2*i-2))*2,a=[o-7];for(let l=1;l<i-1;l++)a[l]=a[l-1]-r;return a.push(6),a.reverse()},e.getPositions=function(s){const i=[],o=e.getRowColCoords(s),r=o.length;for(let a=0;a<r;a++)for(let l=0;l<r;l++)a===0&&l===0||a===0&&l===r-1||a===r-1&&l===0||i.push([o[a],o[l]]);return i}})(D1);var O1={};const kj=Vn.getSymbolSize,pv=7;O1.getPositions=function(t){const n=kj(t);return[[0,0],[n-pv,0],[0,n-pv]]};var I1={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const o=i.size;let r=0,a=0,l=0,c=null,u=null;for(let d=0;d<o;d++){a=l=0,c=u=null;for(let f=0;f<o;f++){let p=i.get(d,f);p===c?a++:(a>=5&&(r+=t.N1+(a-5)),c=p,a=1),p=i.get(f,d),p===u?l++:(l>=5&&(r+=t.N1+(l-5)),u=p,l=1)}a>=5&&(r+=t.N1+(a-5)),l>=5&&(r+=t.N1+(l-5))}return r},e.getPenaltyN2=function(i){const o=i.size;let r=0;for(let a=0;a<o-1;a++)for(let l=0;l<o-1;l++){const c=i.get(a,l)+i.get(a,l+1)+i.get(a+1,l)+i.get(a+1,l+1);(c===4||c===0)&&r++}return r*t.N2},e.getPenaltyN3=function(i){const o=i.size;let r=0,a=0,l=0;for(let c=0;c<o;c++){a=l=0;for(let u=0;u<o;u++)a=a<<1&2047|i.get(c,u),u>=10&&(a===1488||a===93)&&r++,l=l<<1&2047|i.get(u,c),u>=10&&(l===1488||l===93)&&r++}return r*t.N3},e.getPenaltyN4=function(i){let o=0;const r=i.data.length;for(let l=0;l<r;l++)o+=i.data[l];return Math.abs(Math.ceil(o*100/r/5)-10)*t.N4};function n(s,i,o){switch(s){case e.Patterns.PATTERN000:return(i+o)%2===0;case e.Patterns.PATTERN001:return i%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(i+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return i*o%2+i*o%3===0;case e.Patterns.PATTERN110:return(i*o%2+i*o%3)%2===0;case e.Patterns.PATTERN111:return(i*o%3+(i+o)%2)%2===0;default:throw new Error("bad maskPattern:"+s)}}e.applyMask=function(i,o){const r=o.size;for(let a=0;a<r;a++)for(let l=0;l<r;l++)o.isReserved(l,a)||o.xor(l,a,n(i,l,a))},e.getBestMask=function(i,o){const r=Object.keys(e.Patterns).length;let a=0,l=1/0;for(let c=0;c<r;c++){o(c),e.applyMask(c,i);const u=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(c,i),u<l&&(l=u,a=c)}return a}})(I1);var Au={};const Ei=Su,tc=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],nc=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Au.getBlocksCount=function(t,n){switch(n){case Ei.L:return tc[(t-1)*4+0];case Ei.M:return tc[(t-1)*4+1];case Ei.Q:return tc[(t-1)*4+2];case Ei.H:return tc[(t-1)*4+3];default:return}};Au.getTotalCodewordsCount=function(t,n){switch(n){case Ei.L:return nc[(t-1)*4+0];case Ei.M:return nc[(t-1)*4+1];case Ei.Q:return nc[(t-1)*4+2];case Ei.H:return nc[(t-1)*4+3];default:return}};var R1={},$u={};const Da=new Uint8Array(512),zc=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)Da[n]=t,zc[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)Da[n]=Da[n-255]})();$u.log=function(t){if(t<1)throw new Error("log("+t+")");return zc[t]};$u.exp=function(t){return Da[t]};$u.mul=function(t,n){return t===0||n===0?0:Da[zc[t]+zc[n]]};(function(e){const t=$u;e.mul=function(s,i){const o=new Uint8Array(s.length+i.length-1);for(let r=0;r<s.length;r++)for(let a=0;a<i.length;a++)o[r+a]^=t.mul(s[r],i[a]);return o},e.mod=function(s,i){let o=new Uint8Array(s);for(;o.length-i.length>=0;){const r=o[0];for(let l=0;l<i.length;l++)o[l]^=t.mul(i[l],r);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},e.generateECPolynomial=function(s){let i=new Uint8Array([1]);for(let o=0;o<s;o++)i=e.mul(i,new Uint8Array([1,t.exp(o)]));return i}})(R1);const L1=R1;function ap(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}ap.prototype.initialize=function(t){this.degree=t,this.genPoly=L1.generateECPolynomial(this.degree)};ap.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const s=L1.mod(n,this.genPoly),i=this.degree-s.length;if(i>0){const o=new Uint8Array(this.degree);return o.set(s,i),o}return s};var Sj=ap,N1={},Gi={},lp={};lp.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Os={};const F1="[0-9]+",Aj="[A-Z $%*+\\-./:]+";let el="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";el=el.replace(/u/g,"\\u");const $j="(?:(?![A-Z0-9 $%*+\\-./:]|"+el+`)(?:.|[\r
|
|
]))+`;Os.KANJI=new RegExp(el,"g");Os.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Os.BYTE=new RegExp($j,"g");Os.NUMERIC=new RegExp(F1,"g");Os.ALPHANUMERIC=new RegExp(Aj,"g");const Cj=new RegExp("^"+el+"$"),Ej=new RegExp("^"+F1+"$"),Pj=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Os.testKanji=function(t){return Cj.test(t)};Os.testNumeric=function(t){return Ej.test(t)};Os.testAlphanumeric=function(t){return Pj.test(t)};(function(e){const t=lp,n=Os;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,r){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?o.ccBits[0]:r<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function s(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+i)}}e.from=function(o,r){if(e.isValid(o))return o;try{return s(o)}catch{return r}}})(Gi);(function(e){const t=Vn,n=Au,s=Su,i=Gi,o=lp,r=7973,a=t.getBCHDigit(r);function l(f,p,m){for(let _=1;_<=40;_++)if(p<=e.getCapacity(_,m,f))return _}function c(f,p){return i.getCharCountIndicator(f,p)+4}function u(f,p){let m=0;return f.forEach(function(_){const b=c(_.mode,p);m+=b+_.getBitsLength()}),m}function d(f,p){for(let m=1;m<=40;m++)if(u(f,m)<=e.getCapacity(m,p,i.MIXED))return m}e.from=function(p,m){return o.isValid(p)?parseInt(p,10):m},e.getCapacity=function(p,m,_){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof _>"u"&&(_=i.BYTE);const b=t.getSymbolTotalCodewords(p),w=n.getTotalCodewordsCount(p,m),A=(b-w)*8;if(_===i.MIXED)return A;const $=A-c(_,p);switch(_){case i.NUMERIC:return Math.floor($/10*3);case i.ALPHANUMERIC:return Math.floor($/11*2);case i.KANJI:return Math.floor($/13);case i.BYTE:default:return Math.floor($/8)}},e.getBestVersionForData=function(p,m){let _;const b=s.from(m,s.M);if(Array.isArray(p)){if(p.length>1)return d(p,b);if(p.length===0)return 1;_=p[0]}else _=p;return l(_.mode,_.getLength(),b)},e.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let m=p<<12;for(;t.getBCHDigit(m)-a>=0;)m^=r<<t.getBCHDigit(m)-a;return p<<12|m}})(N1);var B1={};const Ph=Vn,V1=1335,Tj=21522,gv=Ph.getBCHDigit(V1);B1.getEncodedBits=function(t,n){const s=t.bit<<3|n;let i=s<<10;for(;Ph.getBCHDigit(i)-gv>=0;)i^=V1<<Ph.getBCHDigit(i)-gv;return(s<<10|i)^Tj};var H1={};const Mj=Gi;function Dr(e){this.mode=Mj.NUMERIC,this.data=e.toString()}Dr.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Dr.prototype.getLength=function(){return this.data.length};Dr.prototype.getBitsLength=function(){return Dr.getBitsLength(this.data.length)};Dr.prototype.write=function(t){let n,s,i;for(n=0;n+3<=this.data.length;n+=3)s=this.data.substr(n,3),i=parseInt(s,10),t.put(i,10);const o=this.data.length-n;o>0&&(s=this.data.substr(n),i=parseInt(s,10),t.put(i,o*3+1))};var Dj=Dr;const Oj=Gi,Pd=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Or(e){this.mode=Oj.ALPHANUMERIC,this.data=e}Or.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Or.prototype.getLength=function(){return this.data.length};Or.prototype.getBitsLength=function(){return Or.getBitsLength(this.data.length)};Or.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=Pd.indexOf(this.data[n])*45;s+=Pd.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(Pd.indexOf(this.data[n]),6)};var Ij=Or,Rj=function(t){for(var n=[],s=t.length,i=0;i<s;i++){var o=t.charCodeAt(i);if(o>=55296&&o<=56319&&s>i+1){var r=t.charCodeAt(i+1);r>=56320&&r<=57343&&(o=(o-55296)*1024+r-56320+65536,i+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const Lj=Rj,Nj=Gi;function Ir(e){this.mode=Nj.BYTE,typeof e=="string"&&(e=Lj(e)),this.data=new Uint8Array(e)}Ir.getBitsLength=function(t){return t*8};Ir.prototype.getLength=function(){return this.data.length};Ir.prototype.getBitsLength=function(){return Ir.getBitsLength(this.data.length)};Ir.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var Fj=Ir;const Bj=Gi,Vj=Vn;function Rr(e){this.mode=Bj.KANJI,this.data=e}Rr.getBitsLength=function(t){return t*13};Rr.prototype.getLength=function(){return this.data.length};Rr.prototype.getBitsLength=function(){return Rr.getBitsLength(this.data.length)};Rr.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=Vj.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var Hj=Rr,j1={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,s,i){var o={},r={};r[s]=0;var a=t.PriorityQueue.make();a.push(s,0);for(var l,c,u,d,f,p,m,_,b;!a.empty();){l=a.pop(),c=l.value,d=l.cost,f=n[c]||{};for(u in f)f.hasOwnProperty(u)&&(p=f[u],m=d+p,_=r[u],b=typeof r[u]>"u",(b||_>m)&&(r[u]=m,a.push(u,m),o[u]=c))}if(typeof i<"u"&&typeof r[i]>"u"){var w=["Could not find a path from ",s," to ",i,"."].join("");throw new Error(w)}return o},extract_shortest_path_from_predecessor_list:function(n,s){for(var i=[],o=s;o;)i.push(o),n[o],o=n[o];return i.reverse(),i},find_path:function(n,s,i){var o=t.single_source_shortest_paths(n,s,i);return t.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var s=t.PriorityQueue,i={},o;n=n||{};for(o in s)s.hasOwnProperty(o)&&(i[o]=s[o]);return i.queue=[],i.sorter=n.sorter||s.default_sorter,i},default_sorter:function(n,s){return n.cost-s.cost},push:function(n,s){var i={value:n,cost:s};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(j1);var jj=j1.exports;(function(e){const t=Gi,n=Dj,s=Ij,i=Fj,o=Hj,r=Os,a=Vn,l=jj;function c(w){return unescape(encodeURIComponent(w)).length}function u(w,A,$){const M=[];let k;for(;(k=w.exec($))!==null;)M.push({data:k[0],index:k.index,mode:A,length:k[0].length});return M}function d(w){const A=u(r.NUMERIC,t.NUMERIC,w),$=u(r.ALPHANUMERIC,t.ALPHANUMERIC,w);let M,k;return a.isKanjiModeEnabled()?(M=u(r.BYTE,t.BYTE,w),k=u(r.KANJI,t.KANJI,w)):(M=u(r.BYTE_KANJI,t.BYTE,w),k=[]),A.concat($,M,k).sort(function(x,C){return x.index-C.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function f(w,A){switch(A){case t.NUMERIC:return n.getBitsLength(w);case t.ALPHANUMERIC:return s.getBitsLength(w);case t.KANJI:return o.getBitsLength(w);case t.BYTE:return i.getBitsLength(w)}}function p(w){return w.reduce(function(A,$){const M=A.length-1>=0?A[A.length-1]:null;return M&&M.mode===$.mode?(A[A.length-1].data+=$.data,A):(A.push($),A)},[])}function m(w){const A=[];for(let $=0;$<w.length;$++){const M=w[$];switch(M.mode){case t.NUMERIC:A.push([M,{data:M.data,mode:t.ALPHANUMERIC,length:M.length},{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.ALPHANUMERIC:A.push([M,{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.KANJI:A.push([M,{data:M.data,mode:t.BYTE,length:c(M.data)}]);break;case t.BYTE:A.push([{data:M.data,mode:t.BYTE,length:c(M.data)}])}}return A}function _(w,A){const $={},M={start:{}};let k=["start"];for(let y=0;y<w.length;y++){const x=w[y],C=[];for(let P=0;P<x.length;P++){const E=x[P],B=""+y+P;C.push(B),$[B]={node:E,lastCount:0},M[B]={};for(let G=0;G<k.length;G++){const re=k[G];$[re]&&$[re].node.mode===E.mode?(M[re][B]=f($[re].lastCount+E.length,E.mode)-f($[re].lastCount,E.mode),$[re].lastCount+=E.length):($[re]&&($[re].lastCount=E.length),M[re][B]=f(E.length,E.mode)+4+t.getCharCountIndicator(E.mode,A))}}k=C}for(let y=0;y<k.length;y++)M[k[y]].end=0;return{map:M,table:$}}function b(w,A){let $;const M=t.getBestModeForData(w);if($=t.from(A,M),$!==t.BYTE&&$.bit<M.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString($)+`.
|
|
Suggested mode is: `+t.toString(M));switch($===t.KANJI&&!a.isKanjiModeEnabled()&&($=t.BYTE),$){case t.NUMERIC:return new n(w);case t.ALPHANUMERIC:return new s(w);case t.KANJI:return new o(w);case t.BYTE:return new i(w)}}e.fromArray=function(A){return A.reduce(function($,M){return typeof M=="string"?$.push(b(M,null)):M.data&&$.push(b(M.data,M.mode)),$},[])},e.fromString=function(A,$){const M=d(A,a.isKanjiModeEnabled()),k=m(M),y=_(k,$),x=l.find_path(y.map,"start","end"),C=[];for(let P=1;P<x.length-1;P++)C.push(y.table[x[P]].node);return e.fromArray(p(C))},e.rawSplit=function(A){return e.fromArray(d(A,a.isKanjiModeEnabled()))}})(H1);const Cu=Vn,Td=Su,Wj=wj,zj=xj,Yj=D1,Uj=O1,Th=I1,Mh=Au,Kj=Sj,Yc=N1,qj=B1,Gj=Gi,Md=H1;function Jj(e,t){const n=e.size,s=Uj.getPositions(t);for(let i=0;i<s.length;i++){const o=s[i][0],r=s[i][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||n<=o+a))for(let l=-1;l<=7;l++)r+l<=-1||n<=r+l||(a>=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?e.set(o+a,r+l,!0,!0):e.set(o+a,r+l,!1,!0))}}function Xj(e){const t=e.size;for(let n=8;n<t-8;n++){const s=n%2===0;e.set(n,6,s,!0),e.set(6,n,s,!0)}}function Qj(e,t){const n=Yj.getPositions(t);for(let s=0;s<n.length;s++){const i=n[s][0],o=n[s][1];for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)r===-2||r===2||a===-2||a===2||r===0&&a===0?e.set(i+r,o+a,!0,!0):e.set(i+r,o+a,!1,!0)}}function Zj(e,t){const n=e.size,s=Yc.getEncodedBits(t);let i,o,r;for(let a=0;a<18;a++)i=Math.floor(a/3),o=a%3+n-8-3,r=(s>>a&1)===1,e.set(i,o,r,!0),e.set(o,i,r,!0)}function Dd(e,t,n){const s=e.size,i=qj.getEncodedBits(t,n);let o,r;for(o=0;o<15;o++)r=(i>>o&1)===1,o<6?e.set(o,8,r,!0):o<8?e.set(o+1,8,r,!0):e.set(s-15+o,8,r,!0),o<8?e.set(8,s-o-1,r,!0):o<9?e.set(8,15-o-1+1,r,!0):e.set(8,15-o-1,r,!0);e.set(s-8,8,1,!0)}function eW(e,t){const n=e.size;let s=-1,i=n-1,o=7,r=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!e.isReserved(i,a-l)){let c=!1;r<t.length&&(c=(t[r]>>>o&1)===1),e.set(i,a-l,c),o--,o===-1&&(r++,o=7)}if(i+=s,i<0||n<=i){i-=s,s=-s;break}}}function tW(e,t,n){const s=new Wj;n.forEach(function(l){s.put(l.mode.bit,4),s.put(l.getLength(),Gj.getCharCountIndicator(l.mode,e)),l.write(s)});const i=Cu.getSymbolTotalCodewords(e),o=Mh.getTotalCodewordsCount(e,t),r=(i-o)*8;for(s.getLengthInBits()+4<=r&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);const a=(r-s.getLengthInBits())/8;for(let l=0;l<a;l++)s.put(l%2?17:236,8);return nW(s,e,t)}function nW(e,t,n){const s=Cu.getSymbolTotalCodewords(t),i=Mh.getTotalCodewordsCount(t,n),o=s-i,r=Mh.getBlocksCount(t,n),a=s%r,l=r-a,c=Math.floor(s/r),u=Math.floor(o/r),d=u+1,f=c-u,p=new Kj(f);let m=0;const _=new Array(r),b=new Array(r);let w=0;const A=new Uint8Array(e.buffer);for(let x=0;x<r;x++){const C=x<l?u:d;_[x]=A.slice(m,m+C),b[x]=p.encode(_[x]),m+=C,w=Math.max(w,C)}const $=new Uint8Array(s);let M=0,k,y;for(k=0;k<w;k++)for(y=0;y<r;y++)k<_[y].length&&($[M++]=_[y][k]);for(k=0;k<f;k++)for(y=0;y<r;y++)$[M++]=b[y][k];return $}function sW(e,t,n,s){let i;if(Array.isArray(e))i=Md.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const u=Md.rawSplit(e);c=Yc.getBestVersionForData(u,n)}i=Md.fromString(e,c||40)}else throw new Error("Invalid data");const o=Yc.getBestVersionForData(i,n);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=o;else if(t<o)throw new Error(`
|
|
The chosen QR Code version cannot contain this amount of data.
|
|
Minimum version required to store current data is: `+o+`.
|
|
`);const r=tW(t,n,i),a=Cu.getSymbolSize(t),l=new zj(a);return Jj(l,t),Xj(l),Qj(l,t),Dd(l,n,0),t>=7&&Zj(l,t),eW(l,r),isNaN(s)&&(s=Th.getBestMask(l,Dd.bind(null,l,n))),Th.applyMask(s,l),Dd(l,n,s),{modules:l,version:t,errorCorrectionLevel:n,maskPattern:s,segments:i}}T1.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=Td.M,i,o;return typeof n<"u"&&(s=Td.from(n.errorCorrectionLevel,Td.M),i=Yc.from(n.version),o=Th.from(n.maskPattern),n.toSJISFunc&&Cu.setToSJISFunction(n.toSJISFunc)),sW(t,i,s,o)};var W1={},cp={};(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let s=n.slice().replace("#","").split("");if(s.length<3||s.length===5||s.length>8)throw new Error("Invalid hex color: "+n);(s.length===3||s.length===4)&&(s=Array.prototype.concat.apply([],s.map(function(o){return[o,o]}))),s.length===6&&s.push("F","F");const i=parseInt(s.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+s.slice(0,6).join("")}}e.getOptions=function(s){s||(s={}),s.color||(s.color={});const i=typeof s.margin>"u"||s.margin===null||s.margin<0?4:s.margin,o=s.width&&s.width>=21?s.width:void 0,r=s.scale||4;return{width:o,scale:o?4:r,margin:i,color:{dark:t(s.color.dark||"#000000ff"),light:t(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},e.getScale=function(s,i){return i.width&&i.width>=s+i.margin*2?i.width/(s+i.margin*2):i.scale},e.getImageWidth=function(s,i){const o=e.getScale(s,i);return Math.floor((s+i.margin*2)*o)},e.qrToImageData=function(s,i,o){const r=i.modules.size,a=i.modules.data,l=e.getScale(r,o),c=Math.floor((r+o.margin*2)*l),u=o.margin*l,d=[o.color.light,o.color.dark];for(let f=0;f<c;f++)for(let p=0;p<c;p++){let m=(f*c+p)*4,_=o.color.light;if(f>=u&&p>=u&&f<c-u&&p<c-u){const b=Math.floor((f-u)/l),w=Math.floor((p-u)/l);_=d[a[b*r+w]?1:0]}s[m++]=_.r,s[m++]=_.g,s[m++]=_.b,s[m]=_.a}}})(cp);(function(e){const t=cp;function n(i,o,r){i.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=r,o.width=r,o.style.height=r+"px",o.style.width=r+"px"}function s(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,r,a){let l=a,c=r;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),r||(c=s()),l=t.getOptions(l);const u=t.getImageWidth(o.modules.size,l),d=c.getContext("2d"),f=d.createImageData(u,u);return t.qrToImageData(f.data,o,l),n(d,c,u),d.putImageData(f,0,0),c},e.renderToDataURL=function(o,r,a){let l=a;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),l||(l={});const c=e.render(o,r,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(W1);var z1={};const iW=cp;function mv(e,t){const n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function Od(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}function oW(e,t,n){let s="",i=0,o=!1,r=0;for(let a=0;a<e.length;a++){const l=Math.floor(a%t),c=Math.floor(a/t);!l&&!o&&(o=!0),e[a]?(r++,a>0&&l>0&&e[a-1]||(s+=o?Od("M",l+n,.5+c+n):Od("m",i,0),i=0,o=!1),l+1<t&&e[a+1]||(s+=Od("h",r),r=0)):i++}return s}z1.render=function(t,n,s){const i=iW.getOptions(n),o=t.modules.size,r=t.modules.data,a=o+i.margin*2,l=i.color.light.a?"<path "+mv(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+mv(i.color.dark,"stroke")+' d="'+oW(r,o,i.margin)+'"/>',u='viewBox="0 0 '+a+" "+a+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+u+' shape-rendering="crispEdges">'+l+c+`</svg>
|
|
`;return typeof s=="function"&&s(null,f),f};const rW=bj,Dh=T1,Y1=W1,aW=z1;function up(e,t,n,s,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!rW())throw new Error("Callback required as last argument");if(a){if(r<2)throw new Error("Too few arguments provided");r===2?(i=n,n=t,t=s=void 0):r===3&&(t.getContext&&typeof i>"u"?(i=s,s=void 0):(i=s,s=n,n=t,t=void 0))}else{if(r<1)throw new Error("Too few arguments provided");return r===1?(n=t,t=s=void 0):r===2&&!t.getContext&&(s=n,n=t,t=void 0),new Promise(function(l,c){try{const u=Dh.create(n,s);l(e(u,t,s))}catch(u){c(u)}})}try{const l=Dh.create(n,s);i(null,e(l,t,s))}catch(l){i(l)}}Bo.create=Dh.create;Bo.toCanvas=up.bind(null,Y1.render);Bo.toDataURL=up.bind(null,Y1.renderToDataURL);Bo.toString=up.bind(null,function(e,t,n){return aW.render(e,n)});const lW={name:"peerQRCode",props:{peerConfigData:String},mounted(){Bo.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,e=>{e&&console.error(e)})}},cW={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},uW={class:"container d-flex h-100 w-100"},dW={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},hW={class:"card rounded-3 shadow"},fW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},pW=h("h4",{class:"mb-0"},"QR Code",-1),gW={class:"card-body"},mW={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function _W(e,t,n,s,i,o){return O(),F("div",cW,[h("div",uW,[h("div",dW,[h("div",hW,[h("div",fW,[pW,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=r=>this.$emit("close"))})]),h("div",gW,[h("canvas",mW,null,512)])])])])])}const vW=ze(lW,[["render",_W]]),bW={name:"nameInput",props:{bulk:Boolean,data:Object,saving:Boolean}},yW=h("label",{for:"peer_name_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Name")],-1),wW=["disabled"];function xW(e,t,n,s,i,o){return O(),F("div",{class:Ee({inactiveField:this.bulk})},[yW,Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":t[0]||(t[0]=r=>this.data.name=r),id:"peer_name_textbox",placeholder:""},null,8,wW),[[We,this.data.name]])],2)}const kW=ze(bW,[["render",xW]]),SW={name:"privatePublicKeyInput",props:{data:Object,saving:Boolean,bulk:Boolean},setup(){return{dashboardStore:et()}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},checkMatching(){try{window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey&&(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private Key and Public Key does not match.","danger"))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},AW=h("label",{for:"peer_private_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},[ye("Private Key "),h("code",null,"(Required for QR Code and Download)")])],-1),$W={class:"input-group"},CW=["disabled"],EW=["disabled"],PW=h("i",{class:"bi bi-arrow-repeat"},null,-1),TW=[PW],MW={class:"d-flex"},DW=h("label",{for:"public_key",class:"form-label"},[h("small",{class:"text-muted"},[ye("Public Key "),h("code",null,"(Required)")])],-1),OW={class:"form-check form-switch ms-auto"},IW=["disabled"],RW=h("label",{class:"form-check-label",for:"enablePublicKeyEdit"},[h("small",null,"Edit")],-1),LW=["disabled"];function NW(e,t,n,s,i,o){return O(),F("div",{class:Ee(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[h("div",null,[AW,h("div",$W,[Re(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":t[0]||(t[0]=r=>this.keypair.privateKey=r),disabled:!this.editKey||this.bulk,onBlur:t[1]||(t[1]=r=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,CW),[[We,this.keypair.privateKey]]),h("button",{class:"btn btn-outline-info btn-sm rounded-end-3",onClick:t[2]||(t[2]=r=>this.genKeyPair()),disabled:this.bulk,type:"button",id:"button-addon2"},TW,8,EW)])]),h("div",null,[h("div",MW,[DW,h("div",OW,[Re(h("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:this.bulk,id:"enablePublicKeyEdit","onUpdate:modelValue":t[3]||(t[3]=r=>this.editKey=r)},null,8,IW),[[In,this.editKey]]),RW])]),Re(h("input",{class:Ee(["form-control-sm form-control rounded-3",{"is-invalid":this.error}]),"onUpdate:modelValue":t[4]||(t[4]=r=>this.keypair.publicKey=r),onBlur:t[5]||(t[5]=r=>this.checkMatching()),disabled:!this.editKey||this.bulk,type:"text",id:"public_key"},null,42,LW),[[We,this.keypair.publicKey]])])],2)}const FW=ze(SW,[["render",NW]]),BW={name:"allowedIPsInput",props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const e=Bn(),t=et();return{store:e,dashboardStore:t}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp.filter(e=>e.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(e)):this.availableIp.filter(e=>!this.data.allowed_ips.includes(e))}},methods:{addAllowedIp(e){return this.store.checkCIDR(e)?(this.data.allowed_ips.push(e),!0):!1}},watch:{customAvailableIp(){this.allowedIpFormatError=!1},availableIp(){this.availableIp!==void 0&&this.availableIp.length>0&&this.addAllowedIp(this.availableIp[0])}},mounted(){}},pl=e=>(en("data-v-2af3b91a"),e=e(),tn(),e),VW=pl(()=>h("label",{for:"peer_allowed_ip_textbox",class:"form-label"},[h("small",{class:"text-muted"},[ye("Allowed IPs "),h("code",null,"(Required)")])],-1)),HW=["onClick"],jW=pl(()=>h("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)),WW=[jW],zW={class:"d-flex gap-2 align-items-center"},YW={class:"input-group"},UW=["disabled"],KW=["disabled"],qW=pl(()=>h("i",{class:"bi bi-plus-lg"},null,-1)),GW=[qW],JW=pl(()=>h("small",{class:"text-muted"},"or",-1)),XW={class:"dropdown flex-grow-1"},QW=["disabled"],ZW=pl(()=>h("i",{class:"bi bi-filter-circle me-2"},null,-1)),ez={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3",style:{"overflow-y":"scroll","max-height":"270px",width:"300px !important"}},tz={class:"px-3 pb-2 pt-1"},nz=["onClick"],sz={class:"me-auto"},iz={key:0},oz={class:"px-3 text-muted"};function rz(e,t,n,s,i,o){return O(),F("div",{class:Ee({inactiveField:this.bulk})},[VW,h("div",{class:Ee(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[$e(Wi,{name:"list"},{default:Te(()=>[(O(!0),F(Me,null,Ke(this.data.allowed_ips,(r,a)=>(O(),F("span",{class:"badge rounded-pill text-bg-success",key:r},[ye(ve(r)+" ",1),h("a",{role:"button",onClick:l=>this.data.allowed_ips.splice(a,1)},WW,8,HW)]))),128))]),_:1})],2),h("div",zW,[h("div",YW,[Re(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:"Enter IP Address/CIDR","onUpdate:modelValue":t[0]||(t[0]=r=>i.customAvailableIp=r),disabled:n.bulk},null,10,UW),[[We,i.customAvailableIp]]),h("button",{class:"btn btn-outline-success btn-sm rounded-end-3",disabled:n.bulk||!this.customAvailableIp,onClick:t[1]||(t[1]=r=>{this.addAllowedIp(this.customAvailableIp)?this.customAvailableIp="":this.allowedIpFormatError=!0,this.dashboardStore.newMessage("WGDashboard","Allowed IP is invalid","danger")}),type:"button",id:"button-addon2"},GW,8,KW)]),JW,h("div",XW,[h("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!n.availableIp||n.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[ZW,ye(" Pick Available IP ")],8,QW),this.availableIp?(O(),F("ul",ez,[h("li",null,[h("div",tz,[Re(h("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":t[2]||(t[2]=r=>this.availableIpSearchString=r),placeholder:"Search..."},null,512),[[We,this.availableIpSearchString]])])]),(O(!0),F(Me,null,Ke(this.searchAvailableIps,r=>(O(),F("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:a=>this.addAllowedIp(r)},[h("span",sz,[h("small",null,ve(r),1)])],8,nz)]))),256)),this.searchAvailableIps.length===0?(O(),F("li",iz,[h("small",oz,'No available IP containing "'+ve(this.availableIpSearchString)+'"',1)])):ae("",!0)])):ae("",!0)])])],2)}const az=ze(BW,[["render",rz],["__scopeId","data-v-2af3b91a"]]),lz={name:"dnsInput",props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const e=Bn(),t=et();return{store:e,dashboardStore:t}},methods:{checkDNS(){if(this.dns){let e=this.dns.split(",").map(t=>t.replaceAll(" ",""));for(let t in e)if(!this.store.regexCheckIP(e[t])){this.error||this.dashboardStore.newMessage("WGDashboard","DNS is invalid","danger"),this.error=!0,this.data.DNS="";return}this.error=!1,this.data.DNS=this.dns}}},watch:{dns(){this.checkDNS()}}},cz=h("label",{for:"peer_DNS_textbox",class:"form-label"},[h("small",{class:"text-muted"},"DNS")],-1),uz=["disabled"];function dz(e,t,n,s,i,o){return O(),F("div",null,[cz,Re(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-3",{"is-invalid":this.error}]),disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=r=>this.dns=r),id:"peer_DNS_textbox"},null,10,uz),[[We,this.dns]])])}const hz=ze(lz,[["render",dz]]),fz={name:"endpointAllowedIps",props:{data:Object,saving:Boolean},setup(){const e=Bn(),t=et();return{store:e,dashboardStore:t}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let e=this.endpointAllowedIps.split(",").map(t=>t.replaceAll(" ",""));for(let t in e)if(!this.store.checkCIDR(e[t])){this.error||this.dashboardStore.newMessage("WGDashboard","Endpoint Allowed IP is invalid.","danger"),this.data.endpoint_allowed_ip="",this.error=!0;return}this.error=!1,this.data.endpoint_allowed_ip=this.endpointAllowedIps}},watch:{endpointAllowedIps(){this.checkAllowedIP()}}},pz=h("label",{for:"peer_endpoint_allowed_ips",class:"form-label"},[h("small",{class:"text-muted"},[ye("Endpoint Allowed IPs "),h("code",null,"(Required)")])],-1),gz=["disabled"];function mz(e,t,n,s,i,o){return O(),F("div",null,[pz,Re(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-3",{"is-invalid":i.error}]),disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=r=>this.endpointAllowedIps=r),onBlur:t[1]||(t[1]=r=>this.checkAllowedIP()),id:"peer_endpoint_allowed_ips"},null,42,gz),[[We,this.endpointAllowedIps]])])}const _z=ze(fz,[["render",mz]]),vz={name:"presharedKeyInput",props:{data:Object,saving:Boolean}},bz=h("label",{for:"peer_preshared_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Pre-Shared Key")],-1),yz=["disabled"];function wz(e,t,n,s,i,o){return O(),F("div",null,[bz,Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=r=>this.data.preshared_key=r),id:"peer_preshared_key_textbox"},null,8,yz),[[We,this.data.preshared_key]])])}const xz=ze(vz,[["render",wz]]),kz={name:"mtuInput",props:{data:Object,saving:Boolean}},Sz=h("label",{for:"peer_mtu",class:"form-label"},[h("small",{class:"text-muted"},"MTU")],-1),Az=["disabled"];function $z(e,t,n,s,i,o){return O(),F("div",null,[Sz,Re(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=r=>this.data.mtu=r),id:"peer_mtu"},null,8,Az),[[We,this.data.mtu]])])}const Cz=ze(kz,[["render",$z]]),Ez={name:"persistentKeepAliveInput",props:{data:Object,saving:Boolean}},Pz=h("label",{for:"peer_keep_alive",class:"form-label"},[h("small",{class:"text-muted"},"Persistent Keepalive")],-1),Tz=["disabled"];function Mz(e,t,n,s,i,o){return O(),F("div",null,[Pz,Re(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=r=>this.data.keepalive=r),id:"peer_keep_alive"},null,8,Tz),[[We,this.data.keepalive]])])}const Dz=ze(Ez,[["render",Mz]]),Oz={name:"bulkAdd",props:{saving:Boolean,data:Object,availableIp:void 0}},Iz={class:"form-check form-switch"},Rz=["disabled"],Lz=h("label",{class:"form-check-label me-2",for:"bulk_add"},[h("small",null,[h("strong",null,"Bulk Add")])],-1),Nz=h("small",{class:"text-muted d-block"}," By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP. ",-1),Fz=[Nz],Bz={key:0,class:"form-group"},Vz=["max"],Hz={class:"text-muted"};function jz(e,t,n,s,i,o){return O(),F("div",null,[h("div",Iz,[Re(h("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:!this.availableIp,id:"bulk_add","onUpdate:modelValue":t[0]||(t[0]=r=>this.data.bulkAdd=r)},null,8,Rz),[[In,this.data.bulkAdd]]),Lz]),h("p",{class:Ee({"mb-0":!this.data.bulkAdd})},Fz,2),this.data.bulkAdd?(O(),F("div",Bz,[Re(h("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",max:this.availableIp.length,"onUpdate:modelValue":t[1]||(t[1]=r=>this.data.bulkAddAmount=r),placeholder:"How many peers you want to add?"},null,8,Vz),[[We,this.data.bulkAddAmount]]),h("small",Hz,[ye(" You can add up to "),h("strong",null,ve(this.availableIp.length),1),ye(" peers ")])])):ae("",!0)])}const Wz=ze(Oz,[["render",jz]]),zz={name:"peerCreate",components:{BulkAdd:Wz,PersistentKeepAliveInput:Dz,MtuInput:Cz,PresharedKeyInput:xz,EndpointAllowedIps:_z,DnsInput:hz,AllowedIPsInput:az,PrivatePublicKeyInput:FW,NameInput:kW},data(){return{data:{bulkAdd:!1,bulkAddAmount:"",name:"",allowed_ips:[],private_key:"",public_key:"",DNS:this.dashboardStore.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:this.dashboardStore.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(this.dashboardStore.Configuration.Peers.peer_keep_alive),mtu:parseInt(this.dashboardStore.Configuration.Peers.peer_mtu),preshared_key:""},availableIp:void 0,availableIpSearchString:"",saving:!1,allowedIpDropdown:void 0}},mounted(){Tt("/api/getAvailableIPs/"+this.$route.params.id,{},e=>{e.status&&(this.availableIp=e.data)})},setup(){const e=Bn(),t=et();return{store:e,dashboardStore:t}},methods:{peerCreate(){this.saving=!0,dt("/api/addPeers/"+this.$route.params.id,this.data,e=>{e.status?(this.$router.push(`/configuration/${this.$route.params.id}/peers`),this.dashboardStore.newMessage("Server","Peer create successfully","success")):this.dashboardStore.newMessage("Server",e.message,"danger"),this.saving=!1})}},computed:{allRequireFieldsFilled(){let e=!0;return this.data.bulkAdd?(this.data.bulkAddAmount.length===0||this.data.bulkAddAmount>this.availableIp.length)&&(e=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(n=>{this.data[n].length===0&&(e=!1)}),e}},watch:{bulkAdd(e){e||(this.data.bulkAddAmount="")},"data.bulkAddAmount"(){this.data.bulkAddAmount>this.availableIp.length&&(this.data.bulkAddAmount=this.availableIp.length)}}},Eu=e=>(en("data-v-c3292318"),e=e(),tn(),e),Yz={class:"container"},Uz={class:"mb-4"},Kz=Eu(()=>h("h3",{class:"mb-0 text-body"},[h("i",{class:"bi bi-chevron-left"})],-1)),qz=Eu(()=>h("h3",{class:"text-body mb-0"},"Add Peers",-1)),Gz={class:"d-flex flex-column gap-2"},Jz=Eu(()=>h("hr",{class:"mb-0 mt-2"},null,-1)),Xz=Eu(()=>h("hr",{class:"mb-0 mt-2"},null,-1)),Qz={class:"row"},Zz={key:0,class:"col-sm"},eY={class:"col-sm"},tY={class:"col-sm"},nY={class:"d-flex mt-2"},sY=["disabled"],iY={key:0,class:"bi bi-plus-circle-fill me-2"};function oY(e,t,n,s,i,o){const r=je("RouterLink"),a=je("BulkAdd"),l=je("NameInput"),c=je("PrivatePublicKeyInput"),u=je("AllowedIPsInput"),d=je("EndpointAllowedIps"),f=je("DnsInput"),p=je("PresharedKeyInput"),m=je("MtuInput"),_=je("PersistentKeepAliveInput");return O(),F("div",Yz,[h("div",Uz,[$e(r,{to:"peers",is:"div",class:"d-flex align-items-center gap-4 text-decoration-none"},{default:Te(()=>[Kz,qz]),_:1})]),h("div",Gz,[$e(a,{saving:i.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),Jz,this.data.bulkAdd?ae("",!0):(O(),Ne(l,{key:0,saving:i.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?ae("",!0):(O(),Ne(c,{key:1,saving:i.saving,data:i.data},null,8,["saving","data"])),this.data.bulkAdd?ae("",!0):(O(),Ne(u,{key:2,availableIp:this.availableIp,saving:i.saving,data:i.data},null,8,["availableIp","saving","data"])),$e(d,{saving:i.saving,data:i.data},null,8,["saving","data"]),$e(f,{saving:i.saving,data:i.data},null,8,["saving","data"]),Xz,h("div",Qz,[this.data.bulkAdd?ae("",!0):(O(),F("div",Zz,[$e(p,{saving:i.saving,data:i.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),h("div",eY,[$e(m,{saving:i.saving,data:i.data},null,8,["saving","data"])]),h("div",tY,[$e(_,{saving:i.saving,data:i.data},null,8,["saving","data"])])]),h("div",nY,[h("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.allRequireFieldsFilled||this.saving,onClick:t[0]||(t[0]=b=>this.peerCreate())},[this.saving?ae("",!0):(O(),F("i",iY)),ye(" "+ve(this.saving?"Saving...":"Add"),1)],8,sY)])])])}const U1=ze(zz,[["render",oY],["__scopeId","data-v-c3292318"]]),rY={name:"scheduleDropdown",props:{options:Array,data:String,edit:!1},setup(e){e.data===void 0&&this.$emit("update",this.options[0].value)},computed:{currentSelection(){return this.options.find(e=>e.value===this.data)}}},aY={class:"dropdown scheduleDropdown"},lY={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},cY=["onClick"],uY={key:0,class:"bi bi-check ms-auto"};function dY(e,t,n,s,i,o){return O(),F("div",aY,[h("button",{class:Ee(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!n.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[h("samp",null,ve(this.currentSelection.display),1)],2),h("ul",lY,[n.edit?(O(!0),F(Me,{key:0},Ke(this.options,r=>(O(),F("li",null,[h("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:a=>e.$emit("update",r.value)},[h("samp",null,ve(r.display),1),r.value===this.currentSelection.value?(O(),F("i",uY)):ae("",!0)],8,cY)]))),256)):ae("",!0)])])}const K1=ze(rY,[["render",dY],["__scopeId","data-v-6a5aba2a"]]),hY={name:"schedulePeerJob",components:{VueDatePicker:ll,ScheduleDropdown:K1},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(e){const t=be({}),n=be(!1),s=be(!1);t.value=JSON.parse(JSON.stringify(e.pjob)),t.value.CreationDate||(n.value=!0,s.value=!0);const i=et();return{job:t,edit:n,newJob:s,store:i}},data(){return{inputType:void 0}},watch:{pjob:{deep:!0,immediate:!0,handler(e){this.edit||(this.job=JSON.parse(JSON.stringify(e)))}}},methods:{save(){this.job.Field&&this.job.Operator&&this.job.Action&&this.job.Value?dt("/api/savePeerScheduleJob/",{Job:this.job},e=>{e.status?(this.edit=!1,this.store.newMessage("Server","Job Saved!","success"),console.log(e.data),this.$emit("refresh",e.data[0]),this.newJob=!1):this.store.newMessage("Server",e.message,"danger")}):this.alert()},alert(){let e="animate__flash",t=this.$el.querySelectorAll(".scheduleDropdown"),n=this.$el.querySelectorAll("input");t.forEach(s=>s.classList.add("animate__animated",e)),n.forEach(s=>s.classList.add("animate__animated",e)),setTimeout(()=>{t.forEach(s=>s.classList.remove("animate__animated",e)),n.forEach(s=>s.classList.remove("animate__animated",e))},2e3)},reset(){this.job.CreationDate?(this.job=JSON.parse(JSON.stringify(this.pjob)),this.edit=!1):this.$emit("delete")},delete(){this.job.CreationDate&&dt("/api/deletePeerScheduleJob/",{Job:this.job},e=>{e.status?this.store.newMessage("Server","Job Deleted!","success"):(this.store.newMessage("Server",e.message,"danger"),this.$emit("delete"))}),this.$emit("delete")},parseTime(e){e&&(this.job.Value=Cn(e).format("YYYY-MM-DD HH:mm:ss"))}}},jr=e=>(en("data-v-811b149e"),e=e(),tn(),e),fY={class:"card-header bg-transparent text-muted border-0"},pY={key:0,class:"d-flex"},gY=jr(()=>h("strong",{class:"me-auto"},"Job ID",-1)),mY={key:1},_Y=jr(()=>h("span",{class:"badge text-bg-warning"},"Unsaved Job",-1)),vY=[_Y],bY={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},yY={class:"d-flex gap-2 align-items-center mb-2"},wY=jr(()=>h("samp",null," if ",-1)),xY=jr(()=>h("samp",null," is ",-1)),kY=["disabled"],SY={class:"px-5 d-flex gap-2 align-items-center"},AY=jr(()=>h("samp",null,"then",-1)),$Y={class:"d-flex gap-3"},CY=jr(()=>h("samp",null,"}",-1)),EY={key:0,class:"ms-auto d-flex gap-3"},PY={key:1,class:"ms-auto d-flex gap-3"};function TY(e,t,n,s,i,o){var l;const r=je("ScheduleDropdown"),a=je("VueDatePicker");return O(),F("div",{class:Ee(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[h("div",fY,[this.newJob?(O(),F("small",mY,vY)):(O(),F("small",pY,[gY,h("samp",null,ve(this.job.JobID),1)]))]),h("div",bY,[h("div",yY,[wY,$e(r,{edit:s.edit,options:this.dropdowns.Field,data:this.job.Field,onUpdate:t[0]||(t[0]=c=>{this.job.Field=c})},null,8,["edit","options","data"]),xY,$e(r,{edit:s.edit,options:this.dropdowns.Operator,data:this.job.Operator,onUpdate:t[1]||(t[1]=c=>this.job.Operator=c)},null,8,["edit","options","data"]),this.job.Field==="date"?(O(),Ne(a,{key:0,is24:!0,"min-date":new Date,"model-value":this.job.Value,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:!s.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):Re((O(),F("input",{key:1,class:"form-control form-control-sm form-control-dark rounded-3 flex-grow-1",disabled:!s.edit,"onUpdate:modelValue":t[2]||(t[2]=c=>this.job.Value=c),style:{width:"auto"}},null,8,kY)),[[We,this.job.Value]]),h("samp",null,ve((l=this.dropdowns.Field.find(c=>c.value===this.job.Field))==null?void 0:l.unit)+" { ",1)]),h("div",SY,[AY,$e(r,{edit:s.edit,options:this.dropdowns.Action,data:this.job.Action,onUpdate:t[3]||(t[3]=c=>this.job.Action=c)},null,8,["edit","options","data"])]),h("div",$Y,[CY,this.edit?(O(),F("div",PY,[h("a",{role:"button",class:"text-secondary text-decoration-none",onClick:t[6]||(t[6]=c=>this.reset())},"[C] Cancel"),h("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:t[7]||(t[7]=c=>this.save())},"[S] Save")])):(O(),F("div",EY,[h("a",{role:"button",class:"ms-auto text-decoration-none",onClick:t[4]||(t[4]=c=>this.edit=!0)},"[E] Edit"),h("a",{role:"button",onClick:t[5]||(t[5]=c=>this.delete()),class:"text-danger text-decoration-none"},"[D] Delete")]))])])],2)}const q1=ze(hY,[["render",TY],["__scopeId","data-v-811b149e"]]),MY={name:"peerJobs",setup(){return{store:Bn()}},props:{selectedPeer:Object},components:{SchedulePeerJob:q1,ScheduleDropdown:K1},data(){return{}},methods:{deleteJob(e){this.selectedPeer.jobs=this.selectedPeer.jobs.filter(t=>t.JobID!==e.JobID)},addJob(){this.selectedPeer.jobs.unshift(JSON.parse(JSON.stringify({JobID:Ms().toString(),Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,Field:this.store.PeerScheduleJobs.dropdowns.Field[0].value,Operator:this.store.PeerScheduleJobs.dropdowns.Operator[0].value,Value:"",CreationDate:"",ExpireDate:"",Action:this.store.PeerScheduleJobs.dropdowns.Action[0].value})))}}},dp=e=>(en("data-v-31a1606a"),e=e(),tn(),e),DY={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},OY={class:"container d-flex h-100 w-100"},IY={class:"m-auto modal-dialog-centered dashboardModal"},RY={class:"card rounded-3 shadow",style:{width:"700px"}},LY={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},NY=dp(()=>h("h4",{class:"mb-0 fw-normal"},[ye("Schedule Jobs "),h("strong")],-1)),FY={class:"card-body px-4 pb-4 pt-2 position-relative"},BY={class:"d-flex align-items-center mb-3"},VY=dp(()=>h("i",{class:"bi bi-plus-lg me-2"},null,-1)),HY={class:"card shadow-sm",key:"none",style:{height:"153px"}},jY=dp(()=>h("div",{class:"card-body text-muted text-center d-flex"},[h("h6",{class:"m-auto"},"This peer does not have any job yet.")],-1)),WY=[jY];function zY(e,t,n,s,i,o){const r=je("SchedulePeerJob");return O(),F("div",DY,[h("div",OY,[h("div",IY,[h("div",RY,[h("div",LY,[NY,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=a=>this.$emit("close"))})]),h("div",FY,[h("div",BY,[h("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow",onClick:t[1]||(t[1]=a=>this.addJob())},[VY,ye(" Job ")])]),$e(Wi,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:Te(()=>[(O(!0),F(Me,null,Ke(this.selectedPeer.jobs,(a,l)=>(O(),Ne(r,{onRefresh:t[2]||(t[2]=c=>this.$emit("refresh")),onDelete:c=>this.deleteJob(a),dropdowns:this.store.PeerScheduleJobs.dropdowns,key:a.JobID,pjob:a},null,8,["onDelete","dropdowns","pjob"]))),128)),this.selectedPeer.jobs.length===0?(O(),F("div",HY,WY)):ae("",!0)]),_:1})])])])])])}const YY=ze(MY,[["render",zY],["__scopeId","data-v-31a1606a"]]),UY={name:"peerJobsAllModal",setup(){return{store:Bn()}},components:{SchedulePeerJob:q1},props:{configurationPeers:Array[Object]},methods:{getuuid(){return Ms()}},computed:{getAllJobs(){return this.configurationPeers.filter(e=>e.jobs.length>0)}}},KY={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},qY={class:"container d-flex h-100 w-100"},GY={class:"m-auto modal-dialog-centered dashboardModal"},JY={class:"card rounded-3 shadow",style:{width:"700px"}},XY={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},QY=h("h4",{class:"mb-0 fw-normal"},"All Active Jobs ",-1),ZY={class:"card-body px-4 pb-4 pt-2"},eU={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},tU={class:"accordion-header"},nU=["data-bs-target"],sU={key:0},iU={class:"text-muted"},oU=["id"],rU={class:"accordion-body"},aU={key:1,class:"card shadow-sm",style:{height:"153px"}},lU=h("div",{class:"card-body text-muted text-center d-flex"},[h("h6",{class:"m-auto"},"No active job at the moment.")],-1),cU=[lU];function uU(e,t,n,s,i,o){const r=je("SchedulePeerJob");return O(),F("div",KY,[h("div",qY,[h("div",GY,[h("div",JY,[h("div",XY,[QY,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=a=>this.$emit("close"))})]),h("div",ZY,[this.getAllJobs.length>0?(O(),F("div",eU,[(O(!0),F(Me,null,Ke(this.getAllJobs,(a,l)=>(O(),F("div",{class:"accordion-item",key:a.id},[h("h2",tU,[h("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+l},[h("small",null,[h("strong",null,[a.name?(O(),F("span",sU,ve(a.name)+" • ",1)):ae("",!0),h("samp",iU,ve(a.id),1)])])],8,nU)]),h("div",{id:"collapse_"+l,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[h("div",rU,[(O(!0),F(Me,null,Ke(a.jobs,c=>(O(),Ne(r,{onDelete:t[1]||(t[1]=u=>this.$emit("refresh")),onRefresh:t[2]||(t[2]=u=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:c.JobID,pjob:c},null,8,["dropdowns","pjob"]))),128))])],8,oU)]))),128))])):(O(),F("div",aU,cU))])])])])])}const dU=ze(UY,[["render",uU]]),hU={name:"peerJobsLogsModal",props:{configurationInfo:Object},data(){return{dataLoading:!0,data:[],logFetchTime:void 0,showLogID:!1,showJobID:!0,showSuccessJob:!0,showFailedJob:!0,showLogAmount:10}},async mounted(){await this.fetchLog()},methods:{async fetchLog(){this.dataLoading=!0,await Tt(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},e=>{this.data=e.data,this.logFetchTime=Cn().format("YYYY-MM-DD HH:mm:ss"),this.dataLoading=!1})}},computed:{getLogs(){return this.data.filter(e=>this.showSuccessJob&&e.Status==="1"||this.showFailedJob&&e.Status==="0")},showLogs(){return this.getLogs.slice(0,this.showLogAmount)}}},fU={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},pU={class:"container-fluid d-flex h-100 w-100"},gU={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},mU={class:"card rounded-3 shadow w-100"},_U={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},vU=h("h4",{class:"mb-0"},"Jobs Logs",-1),bU={class:"card-body px-4 pb-4 pt-2"},yU={key:0},wU={class:"mb-2 d-flex gap-3"},xU=h("i",{class:"bi bi-arrow-clockwise me-2"},null,-1),kU={class:"d-flex gap-3 align-items-center"},SU=h("span",{class:"text-muted"},"Filter",-1),AU={class:"form-check"},$U=h("label",{class:"form-check-label",for:"jobLogsShowSuccessCheck"},[h("span",{class:"badge text-success-emphasis bg-success-subtle"},"Success")],-1),CU={class:"form-check"},EU=h("label",{class:"form-check-label",for:"jobLogsShowFailedCheck"},[h("span",{class:"badge text-danger-emphasis bg-danger-subtle"},"Failed")],-1),PU={class:"d-flex gap-3 align-items-center ms-auto"},TU=h("span",{class:"text-muted"},"Display",-1),MU={class:"form-check"},DU=h("label",{class:"form-check-label",for:"jobLogsShowJobIDCheck"}," Job ID ",-1),OU={class:"form-check"},IU=h("label",{class:"form-check-label",for:"jobLogsShowLogIDCheck"}," Log ID ",-1),RU={class:"table"},LU=h("th",{scope:"col"},"Date",-1),NU={key:0,scope:"col"},FU={key:1,scope:"col"},BU=h("th",{scope:"col"},"Status",-1),VU=h("th",{scope:"col"},"Message",-1),HU={style:{"font-size":"0.875rem"}},jU={scope:"row"},WU={key:0},zU={class:"text-muted"},YU={key:1},UU={class:"text-muted"},KU={class:"d-flex gap-2"},qU=h("i",{class:"bi bi-chevron-down me-2"},null,-1),GU=h("i",{class:"bi bi-chevron-up me-2"},null,-1),JU={key:1,class:"d-flex align-items-center flex-column"},XU=h("div",{class:"spinner-border text-body",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1),QU=[XU];function ZU(e,t,n,s,i,o){return O(),F("div",fU,[h("div",pU,[h("div",gU,[h("div",mU,[h("div",_U,[vU,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=r=>this.$emit("close"))})]),h("div",bU,[this.dataLoading?(O(),F("div",JU,QU)):(O(),F("div",yU,[h("p",null,"Updated at: "+ve(this.logFetchTime),1),h("div",wU,[h("button",{onClick:t[1]||(t[1]=r=>this.fetchLog()),class:"btn btn-sm rounded-3 shadow-sm text-info-emphasis bg-info-subtle border-1 border-info-subtle me-1"},[xU,ye(" Refresh ")]),h("div",kU,[SU,h("div",AU,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[2]||(t[2]=r=>this.showSuccessJob=r),id:"jobLogsShowSuccessCheck"},null,512),[[In,this.showSuccessJob]]),$U]),h("div",CU,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=r=>this.showFailedJob=r),id:"jobLogsShowFailedCheck"},null,512),[[In,this.showFailedJob]]),EU])]),h("div",PU,[TU,h("div",MU,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=r=>i.showJobID=r),id:"jobLogsShowJobIDCheck"},null,512),[[In,i.showJobID]]),DU]),h("div",OU,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[5]||(t[5]=r=>i.showLogID=r),id:"jobLogsShowLogIDCheck"},null,512),[[In,i.showLogID]]),IU])])]),h("table",RU,[h("thead",null,[h("tr",null,[LU,i.showLogID?(O(),F("th",NU,"Log ID")):ae("",!0),i.showJobID?(O(),F("th",FU,"Job ID")):ae("",!0),BU,VU])]),h("tbody",null,[(O(!0),F(Me,null,Ke(this.showLogs,r=>(O(),F("tr",HU,[h("th",jU,ve(r.LogDate),1),i.showLogID?(O(),F("td",WU,[h("samp",zU,ve(r.LogID),1)])):ae("",!0),i.showJobID?(O(),F("td",YU,[h("samp",UU,ve(r.JobID),1)])):ae("",!0),h("td",null,[h("span",{class:Ee(["badge",[r.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},ve(r.Status==="1"?"Success":"Failed"),3)]),h("td",null,ve(r.Message),1)]))),256))])]),h("div",KU,[this.getLogs.length>this.showLogAmount?(O(),F("button",{key:0,onClick:t[6]||(t[6]=r=>this.showLogAmount+=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},[qU,ye(" Show More ")])):ae("",!0),this.showLogAmount>20?(O(),F("button",{key:1,onClick:t[7]||(t[7]=r=>this.showLogAmount=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},[GU,ye(" Collapse ")])):ae("",!0)])]))])])])])])}const eK=ze(hU,[["render",ZU]]),tK={name:"peerShareLinkModal",props:{peer:Object},components:{VueDatePicker:ll},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:et()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0)},watch:{"peer.ShareLink":{deep:!0,handler(e,t){t.length!==e.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,dt("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:Cn().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},e=>{e.status?(this.peer.ShareLink=e.data,this.dataCopy=e.data.at(0),this.store.newMessage("Server","Share link created successfully","success")):this.store.newMessage("Server","Share link failed to create. Reason: "+e.message,"danger"),this.loading=!1})},updateLinkExpireDate(){dt("/api/sharePeer/update",this.dataCopy,e=>{e.status?(this.dataCopy=e.data.at(0),this.peer.ShareLink=e.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+e.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=Cn().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(e){e?this.dataCopy.ExpireDate=Cn(e).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const e=this.store.getActiveCrossServer();return e?`${e.host}/${this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}`:window.location.origin+window.location.pathname+this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}}},nK={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},sK={class:"container d-flex h-100 w-100"},iK={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},oK={class:"card rounded-3 shadow flex-grow-1"},rK={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},aK=h("h4",{class:"mb-0"},"Share Peer",-1),lK={key:0,class:"card-body px-4 pb-4"},cK={key:0},uK=h("h6",{class:"mb-3 text-muted"}," Currently the peer is not sharing ",-1),dK=["disabled"],hK=h("i",{class:"bi bi-send-fill me-2"},null,-1),fK=[hK],pK={key:1},gK={class:"d-flex gap-2 mb-4"},mK=h("i",{class:"bi bi-link-45deg"},null,-1),_K=["href"],vK={class:"d-flex flex-column gap-2 mb-3"},bK=h("small",null,[h("i",{class:"bi bi-calendar me-2"}),ye(" Expire Date ")],-1),yK=["disabled"],wK=h("i",{class:"bi bi-send-slash-fill me-2"},null,-1),xK=[wK];function kK(e,t,n,s,i,o){const r=je("VueDatePicker");return O(),F("div",nK,[h("div",sK,[h("div",iK,[h("div",oK,[h("div",rK,[aK,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=a=>this.$emit("close"))})]),this.peer.ShareLink?(O(),F("div",lK,[this.dataCopy?(O(),F("div",pK,[h("div",gK,[mK,h("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},ve(o.getUrl),9,_K)]),h("div",vK,[bK,$e(r,{is24:!0,"min-date":new Date,"model-value":this.dataCopy.ExpireDate,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","dark"])]),h("button",{onClick:t[2]||(t[2]=a=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[h("span",{class:Ee({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},xK,2),ye(" "+ve(this.loading?"Stop Sharing...":"Stop Sharing"),1)],8,yK)])):(O(),F("div",cK,[uK,h("button",{onClick:t[1]||(t[1]=a=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[h("span",{class:Ee({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},fK,2),ye(" "+ve(this.loading?"Sharing...":"Start Sharing"),1)],8,dK)]))])):ae("",!0)])])])])}const SK=ze(tK,[["render",kK]]);xu.register(da,$i,wc,yc,Ta,pc,or,Ma,hh,gc,mc,_c,vh,bh,yh,fa,Za,xh,A6,Y6,X6,Z6,aH);const AK={name:"peerList",components:{PeerShareLinkModal:SK,PeerJobsLogsModal:eK,PeerJobsAllModal:dU,PeerJobs:YY,PeerCreate:U1,PeerQRCode:vW,PeerSettings:vj,PeerSearch:V5,Peer:LF,Line:FH,Bar:NH},setup(){const e=et(),t=Bn(),n=be(void 0);return{dashboardConfigurationStore:e,wireguardConfigurationStore:t,interval:n}},data(){return{configurationToggling:!1,loading:!1,error:null,configurationInfo:[],configurationPeers:[],historyDataSentDifference:[],historyDataReceivedDifference:[],historySentData:{labels:[],datasets:[{label:"Data Sent",data:[],fill:!1,borderColor:"#198754",tension:0}]},historyReceiveData:{labels:[],datasets:[{label:"Data Received",data:[],fill:!1,borderColor:"#0d6efd",tension:0}]},peerSetting:{modalOpen:!1,selectedPeer:void 0},peerScheduleJobs:{modalOpen:!1,selectedPeer:void 0},peerQRCode:{modalOpen:!1,peerConfigData:void 0},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1,selectedPeer:void 0}}},mounted(){},watch:{$route:{immediate:!0,handler(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.loading=!0;let e=this.$route.params.id;this.configurationInfo=[],this.configurationPeers=[],e&&(this.getPeers(e),this.setPeerInterval())}},"dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval"(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.setPeerInterval()}},beforeRouteLeave(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval)},methods:{toggle(){this.configurationToggling=!0,Tt("/api/toggleWireguardConfiguration/",{configurationName:this.configurationInfo.Name},e=>{e.status?this.dashboardConfigurationStore.newMessage("Server",`${this.configurationInfo.Name} is
|
|
${e.data?"is on":"is off"}`,"Success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.configurationInfo.Status=e.data,this.configurationToggling=!1})},getPeers(e=this.$route.params.id){Tt("/api/getWireguardConfigurationInfo",{configurationName:e},t=>{if(this.configurationInfo=t.data.configurationInfo,this.configurationPeers=t.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),t.data.configurationRestrictedPeers.forEach(n=>{n.restricted=!0,this.configurationPeers.push(n)}),this.loading=!1,this.configurationPeers.length>0){const n=this.configurationPeers.map(i=>i.total_sent+i.cumu_sent).reduce((i,o)=>i+o).toFixed(4),s=this.configurationPeers.map(i=>i.total_receive+i.cumu_receive).reduce((i,o)=>i+o).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==n&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,Cn().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((n-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(n)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==s&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,Cn().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((s-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(s))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval))}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(t=>t.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_data+t.cumu_data).reduce((t,n)=>t+n).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_receive+t.cumu_receive).reduce((t,n)=>t+n).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_sent+t.cumu_sent).reduce((t,n)=>t+n).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(e=>e.name?e.name:`Untitled Peer - ${e.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(e=>e.cumu_data+e.total_data),backgroundColor:this.configurationPeers.map(e=>"#0dcaf0"),tooltip:{callbacks:{label:e=>`${e.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(e,t)=>`${e} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>`${e.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(e,t)=>`${e} MB/s`},grid:{display:!1}}}}},searchPeers(){const e=new Hr(this.configurationPeers,{keys:["name","id","allowed_ip"]}),t=this.wireguardConfigurationStore.searchString?e.search(this.wireguardConfigurationStore.searchString).map(n=>n.item):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((n,s)=>n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]>s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((n,s)=>n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]>s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:0)}}},pn=e=>(en("data-v-2a3b3231"),e=e(),tn(),e),$K={key:0},CK={class:"d-flex align-items-center"},EK=pn(()=>h("small",{CLASS:"text-muted"},"CONFIGURATION",-1)),PK={class:"d-flex align-items-center gap-3"},TK={class:"mb-0"},MK={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},DK={class:"card-body py-2 d-flex align-items-center"},OK=pn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Status")],-1)),IK={class:"form-check form-switch ms-auto"},RK=["for"],LK={key:0,class:"spinner-border spinner-border-sm","aria-hidden":"true"},NK=["disabled","id"],FK={class:"row mt-3 gy-2 gx-2 mb-2"},BK={class:"col-6 col-lg-3"},VK={class:"card rounded-3 bg-transparent shadow-sm"},HK={class:"card-body py-2"},jK=pn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Address")],-1)),WK={class:"col-6 col-lg-3"},zK={class:"card rounded-3 bg-transparent shadow-sm"},YK={class:"card-body py-2"},UK=pn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Listen Port")],-1)),KK={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},qK={class:"card rounded-3 bg-transparent shadow-sm"},GK={class:"card-body py-2"},JK=pn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Public Key")],-1)),XK={class:"row gx-2 gy-2 mb-2"},QK={class:"col-6 col-lg-3"},ZK={class:"card rounded-3 bg-transparent shadow-sm"},e7={class:"card-body d-flex"},t7=pn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Connected Peers")],-1)),n7={class:"h4"},s7=pn(()=>h("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1)),i7={class:"col-6 col-lg-3"},o7={class:"card rounded-3 bg-transparent shadow-sm"},r7={class:"card-body d-flex"},a7=pn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Total Usage")],-1)),l7={class:"h4"},c7=pn(()=>h("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1)),u7={class:"col-6 col-lg-3"},d7={class:"card rounded-3 bg-transparent shadow-sm"},h7={class:"card-body d-flex"},f7=pn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Total Received")],-1)),p7={class:"h4 text-primary"},g7=pn(()=>h("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1)),m7={class:"col-6 col-lg-3"},_7={class:"card rounded-3 bg-transparent shadow-sm"},v7={class:"card-body d-flex"},b7=pn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Total Sent")],-1)),y7={class:"h4 text-success"},w7=pn(()=>h("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1)),x7={class:"row gx-2 gy-2 mb-3"},k7={class:"col-12 col-lg-6"},S7={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},A7=pn(()=>h("div",{class:"card-header bg-transparent border-0"},[h("small",{class:"text-muted"},"Peers Total Data Usage")],-1)),$7={class:"card-body pt-1"},C7={class:"col-sm col-lg-3"},E7={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},P7=pn(()=>h("div",{class:"card-header bg-transparent border-0"},[h("small",{class:"text-muted"},"Real Time Received Data Usage")],-1)),T7={class:"card-body pt-1"},M7={class:"col-sm col-lg-3"},D7={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},O7=pn(()=>h("div",{class:"card-header bg-transparent border-0"},[h("small",{class:"text-muted"},"Real Time Sent Data Usage")],-1)),I7={class:"card-body pt-1"},R7={class:"mb-4"};function L7(e,t,n,s,i,o){const r=je("Bar"),a=je("Line"),l=je("PeerSearch"),c=je("Peer"),u=je("PeerSettings"),d=je("PeerQRCode"),f=je("PeerJobs"),p=je("PeerJobsAllModal"),m=je("PeerJobsLogsModal"),_=je("PeerShareLinkModal");return this.loading?ae("",!0):(O(),F("div",$K,[h("div",CK,[h("div",null,[EK,h("div",PK,[h("h1",TK,[h("samp",null,ve(this.configurationInfo.Name),1)])])]),h("div",MK,[h("div",DK,[h("div",null,[OK,h("div",IK,[h("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[ye(ve(this.configurationToggling?"Turning ":"")+" "+ve(this.configurationInfo.Status?"On":"Off")+" ",1),this.configurationToggling?(O(),F("span",LK)):ae("",!0)],8,RK),Re(h("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+this.configurationInfo.id,onChange:t[0]||(t[0]=b=>this.toggle()),"onUpdate:modelValue":t[1]||(t[1]=b=>this.configurationInfo.Status=b)},null,40,NK),[[In,this.configurationInfo.Status]])])]),h("div",{class:Ee(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),h("div",FK,[h("div",BK,[h("div",VK,[h("div",HK,[jK,ye(" "+ve(this.configurationInfo.Address),1)])])]),h("div",WK,[h("div",zK,[h("div",YK,[UK,ye(" "+ve(this.configurationInfo.ListenPort),1)])])]),h("div",KK,[h("div",qK,[h("div",GK,[JK,h("samp",null,ve(this.configurationInfo.PublicKey),1)])])])]),h("div",XK,[h("div",QK,[h("div",ZK,[h("div",e7,[h("div",null,[t7,h("strong",n7,ve(o.configurationSummary.connectedPeers),1)]),s7])])]),h("div",i7,[h("div",o7,[h("div",r7,[h("div",null,[a7,h("strong",l7,ve(o.configurationSummary.totalUsage)+" GB",1)]),c7])])]),h("div",u7,[h("div",d7,[h("div",h7,[h("div",null,[f7,h("strong",p7,ve(o.configurationSummary.totalReceive)+" GB",1)]),g7])])]),h("div",m7,[h("div",_7,[h("div",v7,[h("div",null,[b7,h("strong",y7,ve(o.configurationSummary.totalSent)+" GB",1)]),w7])])])]),h("div",x7,[h("div",k7,[h("div",S7,[A7,h("div",$7,[$e(r,{data:o.individualDataUsage,options:o.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),h("div",C7,[h("div",E7,[P7,h("div",T7,[$e(a,{options:o.chartOptions,data:o.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),h("div",M7,[h("div",D7,[O7,h("div",I7,[$e(a,{options:o.chartOptions,data:o.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),h("div",R7,[$e(l,{onJobsAll:t[2]||(t[2]=b=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:t[3]||(t[3]=b=>this.peerScheduleJobsLogs.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),$e(Wi,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:Te(()=>[(O(!0),F(Me,null,Ke(this.searchPeers,b=>(O(),F("div",{class:"col-12 col-lg-6 col-xl-4",key:b.id},[$e(c,{Peer:b,onShare:w=>{this.peerShare.selectedPeer=b.id,this.peerShare.modalOpen=!0},onRefresh:t[4]||(t[4]=w=>this.getPeers()),onJobs:w=>{i.peerScheduleJobs.modalOpen=!0,i.peerScheduleJobs.selectedPeer=this.configurationPeers.find(A=>A.id===b.id)},onSetting:w=>{i.peerSetting.modalOpen=!0,i.peerSetting.selectedPeer=this.configurationPeers.find(A=>A.id===b.id)},onQrcode:t[5]||(t[5]=w=>{this.peerQRCode.peerConfigData=w,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),$e(Bt,{name:"zoom"},{default:Te(()=>[this.peerSetting.modalOpen?(O(),Ne(u,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:t[6]||(t[6]=b=>this.getPeers()),onClose:t[7]||(t[7]=b=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):ae("",!0)]),_:1}),$e(Bt,{name:"zoom"},{default:Te(()=>[i.peerQRCode.modalOpen?(O(),Ne(d,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:t[8]||(t[8]=b=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):ae("",!0)]),_:1}),$e(Bt,{name:"zoom"},{default:Te(()=>[this.peerScheduleJobs.modalOpen?(O(),Ne(f,{key:0,onRefresh:t[9]||(t[9]=b=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:t[10]||(t[10]=b=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):ae("",!0)]),_:1}),$e(Bt,{name:"zoom"},{default:Te(()=>[this.peerScheduleJobsAll.modalOpen?(O(),Ne(p,{key:0,onRefresh:t[11]||(t[11]=b=>this.getPeers()),onClose:t[12]||(t[12]=b=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):ae("",!0)]),_:1}),$e(Bt,{name:"zoom"},{default:Te(()=>[this.peerScheduleJobsLogs.modalOpen?(O(),Ne(m,{key:0,onClose:t[13]||(t[13]=b=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ae("",!0)]),_:1}),$e(Bt,{name:"zoom"},{default:Te(()=>[this.peerShare.modalOpen?(O(),Ne(_,{key:0,onClose:t[14]||(t[14]=b=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(b=>b.id===this.peerShare.selectedPeer)},null,8,["peer"])):ae("",!0)]),_:1})]))}const N7=ze(AK,[["render",L7],["__scopeId","data-v-2a3b3231"]]),F7={name:"ping",data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:et()}},mounted(){Tt("/api/ping/getAllPeersIpAddress",{},e=>{e.status&&(this.loading=!0,this.cips=e.data,console.log(this.cips))})},methods:{execute(){this.selectedIp&&(this.pinging=!0,this.pingResult=void 0,Tt("/api/ping/execute",{ipAddress:this.selectedIp,count:this.count},e=>{e.status?this.pingResult=e.data:this.store.newMessage("Server",e.message,"danger")}))}},watch:{selectedConfiguration(){this.selectedPeer=void 0,this.selectedIp=void 0},selectedPeer(){this.selectedIp=void 0}}},Hn=e=>(en("data-v-875f5a3c"),e=e(),tn(),e),B7={class:"mt-5 text-body"},V7={class:"container"},H7=Hn(()=>h("h3",{class:"mb-3 text-body"},"Ping",-1)),j7={class:"row"},W7={class:"col-sm-4 d-flex gap-2 flex-column"},z7=Hn(()=>h("label",{class:"mb-1 text-muted",for:"configuration"},[h("small",null,"Configuration")],-1)),Y7=Hn(()=>h("option",{disabled:"",selected:"",value:void 0},"Select a Configuration...",-1)),U7=["value"],K7=Hn(()=>h("label",{class:"mb-1 text-muted",for:"peer"},[h("small",null,"Peer")],-1)),q7=["disabled"],G7=Hn(()=>h("option",{disabled:"",selected:"",value:void 0},"Select a Peer...",-1)),J7=["value"],X7=Hn(()=>h("label",{class:"mb-1 text-muted",for:"ip"},[h("small",null,"IP Address")],-1)),Q7=["disabled"],Z7=Hn(()=>h("option",{disabled:"",selected:"",value:void 0},"Select a IP...",-1)),e9=Hn(()=>h("label",{class:"mb-1 text-muted",for:"count"},[h("small",null,"Ping Count")],-1)),t9=["disabled"],n9=Hn(()=>h("i",{class:"bi bi-person-walking me-2"},null,-1)),s9={class:"col-sm-8"},i9={key:"pingPlaceholder"},o9={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},r9={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},a9={class:"card-body"},l9=Hn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Address")],-1)),c9={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},u9={class:"card-body"},d9=Hn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Is Alive")],-1)),h9={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},f9={class:"card-body"},p9=Hn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Average / Min / Max Round Trip Time")],-1)),g9={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},m9={class:"card-body"},_9=Hn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Sent / Received / Lost Package")],-1));function v9(e,t,n,s,i,o){return O(),F("div",B7,[h("div",V7,[H7,h("div",j7,[h("div",W7,[h("div",null,[z7,Re(h("select",{class:"form-select","onUpdate:modelValue":t[0]||(t[0]=r=>this.selectedConfiguration=r)},[Y7,(O(!0),F(Me,null,Ke(this.cips,(r,a)=>(O(),F("option",{value:a},ve(a),9,U7))),256))],512),[[hc,this.selectedConfiguration]])]),h("div",null,[K7,Re(h("select",{id:"peer",class:"form-select","onUpdate:modelValue":t[1]||(t[1]=r=>this.selectedPeer=r),disabled:this.selectedConfiguration===void 0},[G7,this.selectedConfiguration!==void 0?(O(!0),F(Me,{key:0},Ke(this.cips[this.selectedConfiguration],(r,a)=>(O(),F("option",{value:a},ve(a),9,J7))),256)):ae("",!0)],8,q7),[[hc,this.selectedPeer]])]),h("div",null,[X7,Re(h("select",{id:"ip",class:"form-select","onUpdate:modelValue":t[2]||(t[2]=r=>this.selectedIp=r),disabled:this.selectedPeer===void 0},[Z7,this.selectedPeer!==void 0?(O(!0),F(Me,{key:0},Ke(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,r=>(O(),F("option",null,ve(r),1))),256)):ae("",!0)],8,Q7),[[hc,this.selectedIp]])]),h("div",null,[e9,Re(h("input",{class:"form-control",type:"number","onUpdate:modelValue":t[3]||(t[3]=r=>this.count=r),min:"1",id:"count",placeholder:"How many times you want to ping?"},null,512),[[We,this.count]])]),h("button",{class:"btn btn-primary rounded-3 mt-3",disabled:!this.selectedIp,onClick:t[4]||(t[4]=r=>this.execute())},[n9,ye("Go! ")],8,t9)]),h("div",s9,[$e(Wi,{name:"ping"},{default:Te(()=>[this.pingResult?(O(),F("div",o9,[h("div",r9,[h("div",a9,[l9,ye(" "+ve(this.pingResult.address),1)])]),h("div",c9,[h("div",u9,[d9,h("span",{class:Ee([this.pingResult.is_alive?"text-success":"text-danger"])},[h("i",{class:Ee(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),ye(" "+ve(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),h("div",h9,[h("div",f9,[p9,h("samp",null,ve(this.pingResult.avg_rtt)+"ms / "+ve(this.pingResult.min_rtt)+"ms / "+ve(this.pingResult.max_rtt)+"ms ",1)])]),h("div",g9,[h("div",m9,[_9,h("samp",null,ve(this.pingResult.package_sent)+" / "+ve(this.pingResult.package_received)+" / "+ve(this.pingResult.package_loss),1)])])])):(O(),F("div",i9,[(O(),F(Me,null,Ke(4,r=>h("div",{class:Ee(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:Wt({"animation-delay":`${r*.15}s`})},null,6)),64))]))]),_:1})])])])])}const b9=ze(F7,[["render",v9],["__scopeId","data-v-875f5a3c"]]),y9={name:"traceroute",data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:Bn()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,Tt("/api/traceroute/execute",{ipAddress:this.ipAddress},e=>{e.status?this.tracerouteResult=e.data:this.store.newMessage("Server",e.message,"danger"),this.tracing=!1}))}}},Pu=e=>(en("data-v-dda37ccf"),e=e(),tn(),e),w9={class:"mt-5 text-body"},x9={class:"container"},k9=Pu(()=>h("h3",{class:"mb-3 text-body"},"Traceroute",-1)),S9={class:"row"},A9={class:"col-sm-4 d-flex gap-2 flex-column"},$9=Pu(()=>h("label",{class:"mb-1 text-muted",for:"ipAddress"},[h("small",null,"IP Address")],-1)),C9=["disabled"],E9=Pu(()=>h("i",{class:"bi bi-bullseye me-2"},null,-1)),P9={class:"col-sm-8 position-relative"},T9={key:"pingPlaceholder"},M9={key:"table",class:"w-100"},D9={class:"table table-borderless rounded-3 w-100"},O9=Pu(()=>h("thead",null,[h("tr",null,[h("th",{scope:"col"},"Hop"),h("th",{scope:"col"},"IP Address"),h("th",{scope:"col"},"Average / Min / Max Round Trip Time")])],-1));function I9(e,t,n,s,i,o){return O(),F("div",w9,[h("div",x9,[k9,h("div",S9,[h("div",A9,[h("div",null,[$9,Re(h("input",{id:"ipAddress",class:"form-control","onUpdate:modelValue":t[0]||(t[0]=r=>this.ipAddress=r),type:"text",placeholder:"Enter an IP Address you want to trace :)"},null,512),[[We,this.ipAddress]])]),h("button",{class:"btn btn-primary rounded-3 mt-3",disabled:!this.store.regexCheckIP(this.ipAddress)||this.tracing,onClick:t[1]||(t[1]=r=>this.execute())},[E9,ye(" "+ve(this.tracing?"Tracing...":"Trace It!"),1)],8,C9)]),h("div",P9,[$e(Wi,{name:"ping"},{default:Te(()=>[this.tracerouteResult?(O(),F("div",M9,[h("table",D9,[O9,h("tbody",null,[(O(!0),F(Me,null,Ke(this.tracerouteResult,(r,a)=>(O(),F("tr",{class:"animate__fadeInUp animate__animated",style:Wt({"animation-delay":`${a*.05}s`})},[h("td",null,ve(r.hop),1),h("td",null,ve(r.ip),1),h("td",null,ve(r.avg_rtt)+" / "+ve(r.min_rtt)+" / "+ve(r.max_rtt),1)],4))),256))])])])):(O(),F("div",T9,[(O(),F(Me,null,Ke(10,r=>h("div",{class:Ee(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:Wt({"animation-delay":`${r*.05}s`})},null,6)),64))]))]),_:1})])])])])}const R9=ze(y9,[["render",I9],["__scopeId","data-v-dda37ccf"]]),L9={name:"totp",async setup(){const e=et();let t="";return await Tt("/api/Welcome_GetTotpLink",{},n=>{n.status&&(t=n.data)}),{l:t,store:e}},mounted(){this.l&&Bo.toCanvas(document.getElementById("qrcode"),this.l,function(e){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(e){const t=document.querySelector("#totp");t.classList.remove("is-invalid","is-valid"),e.length===6&&(console.log(e),/[0-9]{6}/.test(e)?dt("/api/Welcome_VerifyTotpLink",{totp:e},n=>{n.status?(this.verified=!0,t.classList.add("is-valid"),this.$emit("verified")):(t.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(t.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},N9=["data-bs-theme"],F9={class:"m-auto text-body",style:{width:"500px"}},B9={class:"d-flex flex-column"},V9=h("h1",{class:"dashboardLogo display-4"},"Multi-Factor Authentication",-1),H9=h("p",{class:"mb-2"},[h("small",{class:"text-muted"},"1. Please scan the following QR Code to generate TOTP")],-1),j9=h("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1),W9={class:"p-3 bg-body-secondary rounded-3 border mb-3"},z9=h("p",{class:"text-muted mb-0"},[h("small",null,"Or you can click the link below:")],-1),Y9=["href"],U9={style:{"line-break":"anywhere"}},K9=h("label",{for:"totp",class:"mb-2"},[h("small",{class:"text-muted"},"2. Enter the TOTP generated by your authenticator to verify")],-1),q9={class:"form-group mb-2"},G9=["disabled"],J9={class:"invalid-feedback"},X9=h("div",{class:"valid-feedback"}," TOTP verified! ",-1),Q9=h("div",{class:"alert alert-warning rounded-3"},[h("i",{class:"bi bi-exclamation-triangle-fill me-2"}),ye(" If you ever lost your TOTP and can't login, please follow instruction on "),h("a",{href:"https://github.com/donaldzou/WGDashboard",target:"_blank"},"readme.md"),ye(" to reset. ")],-1),Z9=h("hr",null,null,-1),eq={class:"d-flex gap-3 mt-5 flex-column"},tq=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1),nq=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1);function sq(e,t,n,s,i,o){const r=je("RouterLink");return O(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[h("div",F9,[h("div",B9,[h("div",null,[V9,H9,j9,h("div",W9,[z9,h("a",{href:this.l},[h("code",U9,ve(this.l),1)],8,Y9)]),K9,h("div",q9,[Re(h("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":t[0]||(t[0]=a=>this.totp=a),disabled:this.verified},null,8,G9),[[We,this.totp]]),h("div",J9,ve(this.totpInvalidMessage),1),X9]),Q9]),Z9,h("div",eq,[this.verified?(O(),Ne(r,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:Te(()=>[ye(" Complete "),nq]),_:1})):(O(),Ne(r,{key:0,to:"/",class:"btn bg-secondary-subtle text-secondary-emphasis rounded-3 flex-grow-1 btn-lg border-1 border-secondary-subtle shadow d-flex"},{default:Te(()=>[ye(" I don't need MFA "),tq]),_:1}))])])])],8,N9)}const iq=ze(L9,[["render",sq]]),oq={name:"share",async setup(){const e=eP(),t=be(!1),n=et(),s=be(""),i=be(""),o=be(new Blob);await Tt("/api/getDashboardTheme",{},a=>{s.value=a.data});const r=e.query.ShareID;return r===void 0||r.length===0?(i.value=void 0,t.value=!0):await Tt("/api/sharePeer/get",{ShareID:r},a=>{a.status?(i.value=a.data,o.value=new Blob([i.value.file],{type:"text/plain"})):i.value=void 0,t.value=!0}),{store:n,theme:s,peerConfiguration:i,blob:o}},mounted(){Bo.toCanvas(document.querySelector("#qrcode"),this.peerConfiguration.file,e=>{e&&console.error(e)})},methods:{download(){const e=new Blob([this.peerConfiguration.file],{type:"text/plain"}),t=URL.createObjectURL(e),n=`${this.peerConfiguration.fileName}.conf`,s=document.createElement("a");s.href=t,s.download=n,s.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},hp=e=>(en("data-v-99d4b06a"),e=e(),tn(),e),rq=["data-bs-theme"],aq={class:"m-auto text-body",style:{width:"500px"}},lq={key:0,class:"text-center position-relative",style:{}},cq=X$('<div class="animate__animated animate__fadeInUp" data-v-99d4b06a><h1 style="font-size:20rem;filter:blur(1rem);animation-duration:7s;" class="animate__animated animate__flash animate__infinite" data-v-99d4b06a><i class="bi bi-file-binary" data-v-99d4b06a></i></h1></div><div class="position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp" style="animation-delay:0.1s;" data-v-99d4b06a><h3 class="m-auto" data-v-99d4b06a>Oh no... This link is either expired or invalid.</h3></div>',2),uq=[cq],dq={key:1,class:"d-flex align-items-center flex-column gap-3"},hq=hp(()=>h("div",{class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},[h("h6",null,"WGDashboard"),ye(" Scan QR Code from the WireGuard App ")],-1)),fq={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},pq=hp(()=>h("p",{class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},[ye("or click the button below to download the "),h("samp",null,".conf"),ye(" file")],-1)),gq=["download","href"],mq=hp(()=>h("i",{class:"bi bi-download"},null,-1)),_q=[mq];function vq(e,t,n,s,i,o){return O(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[h("div",aq,[this.peerConfiguration?(O(),F("div",dq,[hq,h("canvas",fq,null,512),pq,h("a",{download:this.peerConfiguration.fileName+".conf",href:o.getBlob,class:"btn btn-lg bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle animate__animated animate__fadeInUp shadow-sm",style:{"animation-delay":"0.25s"}},_q,8,gq)])):(O(),F("div",lq,uq))])],8,rq)}const bq=ze(oq,[["render",vq],["__scopeId","data-v-99d4b06a"]]),yq=async()=>{let e=!1;return await Tt("/api/validateAuthentication",{},t=>{e=t.status}),e},gl=QE({history:gE(),routes:[{name:"Index",path:"/",component:YP,meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:EM,meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:TN,meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:b9},{path:"/traceroute",name:"Traceroute",component:R9},{name:"New Configuration",path:"/new_configuration",component:h5,meta:{title:"New Configuration"}},{name:"Configuration",path:"/configuration/:id",component:m5,meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:N7},{name:"Peers Create",path:"create",component:U1}]}]},{path:"/signin",component:qT,meta:{title:"Sign In"}},{path:"/welcome",component:QN,meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:iq,meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:bq,meta:{title:"Share"}}]});gl.beforeEach(async(e,t,n)=>{const s=Bn(),i=et();e.meta.title?e.params.id?document.title=e.params.id+" | WGDashboard":document.title=e.meta.title+" | WGDashboard":document.title="WGDashboard",e.meta.requiresAuth?i.getActiveCrossServer()?(await i.getConfiguration(),!s.Configurations&&e.name!=="Configuration List"&&await s.getConfigurations(),n()):tP.getCookie("authToken")&&await yq()?(await i.getConfiguration(),!s.Configurations&&e.name!=="Configuration List"&&await s.getConfigurations(),i.Redirect=void 0,n()):(i.Redirect=e,n("/signin"),i.newMessage("WGDashboard","Session Ended","warning")):n()});const G1=()=>{let e={"content-type":"application/json"};const n=et().getActiveCrossServer();return n&&(e["wg-dashboard-apikey"]=n.apiKey),e},J1=e=>{const n=et().getActiveCrossServer();return n?`${n.host}${e}`:e},Tt=async(e,t=void 0,n=void 0)=>{const s=new URLSearchParams(t);await fetch(`${J1(e)}?${s.toString()}`,{headers:G1()}).then(i=>{const o=et();if(i.ok)return i.json();if(i.status!==200)throw i.status===401&&o.newMessage("WGDashboard","Session Ended","warning"),new Error(i.statusText)}).then(i=>n?n(i):void 0).catch(i=>{console.log(i),gl.push({path:"/signin"})})},dt=async(e,t,n)=>{await fetch(`${J1(e)}`,{headers:G1(),method:"POST",body:JSON.stringify(t)}).then(s=>{const i=et();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&i.newMessage("WGDashboard","Session Ended","warning"),new Error(s.statusText)}).then(s=>n?n(s):void 0).catch(s=>{console.log(s),gl.push({path:"/signin"})})},et=bf("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},ActiveServerConfiguration:void 0,IsElectronApp:!1}),actions:{initCrossServerConfiguration(){const e=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),e===null?localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(e)},syncCrossServerConfiguration(){localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[Ms().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(e){delete this.CrossServerConfiguration.ServerList[e]},getActiveCrossServer(){const e=localStorage.getItem("ActiveCrossServerConfiguration");if(e!==null)return this.CrossServerConfiguration.ServerList[e]},setActiveCrossServer(e){this.ActiveServerConfiguration=e,localStorage.setItem("ActiveCrossServerConfiguration",e)},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await Tt("/api/getDashboardConfiguration",{},e=>{e.status&&(this.Configuration=e.data)})},async updateConfiguration(){await dt("/api/updateDashboardConfiguration",{DashboardConfiguration:this.Configuration},e=>{console.log(e)})},async signOut(){await Tt("/api/signout",{},e=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(e,t,n){this.Messages.push({id:Ms(),from:e,content:t,type:n,show:!0})}}}),fp=e=>(en("data-v-739a0103"),e=e(),tn(),e),wq={class:"navbar bg-dark sticky-top border-bottom border-secondary-subtle","data-bs-theme":"dark"},xq={class:"container-fluid d-flex text-body align-items-center"},kq=fp(()=>h("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),Sq={key:0,class:"ms-auto text-muted"},Aq=fp(()=>h("i",{class:"bi bi-server me-2"},null,-1)),$q=fp(()=>h("a",{role:"button"},[h("i",{class:"bi bi-list"})],-1)),Cq={__name:"App",setup(e){const t=et();t.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(t.IsElectronApp=!0,t.CrossServerConfiguration.Enable=!0),Vt(t.CrossServerConfiguration,()=>{t.syncCrossServerConfiguration()},{deep:!0});const n=_e(()=>{if(t.ActiveServerConfiguration)return t.CrossServerConfiguration.ServerList[t.ActiveServerConfiguration]});return(s,i)=>(O(),F(Me,null,[h("nav",wq,[h("div",xq,[kq,n.value!==void 0?(O(),F("small",Sq,[Aq,ye(ve(n.value.host),1)])):ae("",!0),$q])]),(O(),Ne(uf,null,{default:Te(()=>[$e(q(ky),null,{default:Te(({Component:o})=>[$e(Bt,{name:"app",mode:"out-in"},{default:Te(()=>[(O(),Ne(Io(o)))]),_:2},1024)]),_:1})]),_:1}))],64))}},Eq=ze(Cq,[["__scopeId","data-v-739a0103"]]),pp=HC(Eq);pp.use(gl);const X1=YC();X1.use(({store:e})=>{e.$router=tu(gl)});pp.use(X1);pp.mount("#app");
|