52 lines
514 KiB
JavaScript
Raw Normal View History

2024-04-26 00:03:42 +08:00
var cx=Object.defineProperty;var ux=(e,t,n)=>t in e?cx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var it=(e,t,n)=>(ux(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 Kp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function hx(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 fx={exports:{}},_e="top",De="bottom",Ie="right",be="left",Fa="auto",Qi=[_e,De,Ie,be],qs="start",ki="end",Yp="clippingParents",qc="viewport",_i="popper",qp="reference",rc=Qi.reduce(function(e,t){return e.concat([t+"-"+qs,t+"-"+ki])},[]),Gc=[].concat(Qi,[Fa]).reduce(function(e,t){return e.concat([t,t+"-"+qs,t+"-"+ki])},[]),Gp="beforeRead",Xp="read",Qp="afterRead",Jp="beforeMain",Zp="main",tg="afterMain",eg="beforeWrite",ng="write",sg="afterWrite",ig=[Gp,Xp,Qp,Jp,Zp,tg,eg,ng,sg];function pn(e){return e?(e.nodeName||"").toLowerCase():null}function Le(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Gs(e){var t=Le(e).Element;return e instanceof t||e instanceof Element}function Ye(e){var t=Le(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Xc(e){if(typeof ShadowRoot>"u")return!1;var t=Le(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function px(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];!Ye(o)||!pn(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 gx(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},{});!Ye(i)||!pn(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Qc={name:"applyStyles",enabled:!0,phase:"write",fn:px,effect:gx,requires:["computeStyles"]};function dn(e){return e.split("-")[0]}var Hs=Math.max,fa=Math.min,$i=Math.round;function ac(){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 og(){return!/^((?!chrome|android).)*safari/i.test(ac())}function Mi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),i=1,o=1;t&&Ye(e)&&(i=e.offsetWidth>0&&$i(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&$i(s.height)/e.offsetHeight||1);var r=Gs(e)?Le(e):window,a=r.visualViewport,l=!og()&&n,c=(s.left+(l&&a?a.offsetLeft:0))
* 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)
2024-04-26 00:03:42 +08:00
*/(function(e,t){(function(n,s){e.exports=s(n1)})(Kp,function(n){function s(k){const h=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const b in k)if(b!=="default"){const M=Object.getOwnPropertyDescriptor(k,b);Object.defineProperty(h,b,M.get?M:{enumerable:!0,get:()=>k[b]})}}return h.default=k,Object.freeze(h)}const i=s(n),o=new Map,r={set(k,h,b){o.has(k)||o.set(k,new Map);const M=o.get(k);if(!M.has(h)&&M.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(M.keys())[0]}.`);return}M.set(h,b)},get(k,h){return o.has(k)&&o.get(k).get(h)||null},remove(k,h){if(!o.has(k))return;const b=o.get(k);b.delete(h),b.size===0&&o.delete(k)}},a=1e6,l=1e3,c="transitionend",u=k=>(k&&window.CSS&&window.CSS.escape&&(k=k.replace(/#([^\s"#']+)/g,(h,b)=>`#${CSS.escape(b)}`)),k),d=k=>k==null?`${k}`:Object.prototype.toString.call(k).match(/\s([a-z]+)/i)[1].toLowerCase(),f=k=>{do k+=Math.floor(Math.random()*a);while(document.getElementById(k));return k},p=k=>{if(!k)return 0;let{transitionDuration:h,transitionDelay:b}=window.getComputedStyle(k);const M=Number.parseFloat(h),z=Number.parseFloat(b);return!M&&!z?0:(h=h.split(",")[0],b=b.split(",")[0],(Number.parseFloat(h)+Number.parseFloat(b))*l)},m=k=>{k.dispatchEvent(new Event(c))},_=k=>!k||typeof k!="object"?!1:(typeof k.jquery<"u"&&(k=k[0]),typeof k.nodeType<"u"),v=k=>_(k)?k.jquery?k[0]:k:typeof k=="string"&&k.length>0?document.querySelector(u(k)):null,x=k=>{if(!_(k)||k.getClientRects().length===0)return!1;const h=getComputedStyle(k).getPropertyValue("visibility")==="visible",b=k.closest("details:not([open])");if(!b)return h;if(b!==k){const M=k.closest("summary");if(M&&M.parentNode!==b||M===null)return!1}return h},S=k=>!k||k.nodeType!==Node.ELEMENT_NODE||k.classList.contains("disabled")?!0:typeof k.disabled<"u"?k.disabled:k.hasAttribute("disabled")&&k.getAttribute("disabled")!=="false",P=k=>{if(!document.documentElement.attachShadow)return null;if(typeof k.getRootNode=="function"){const h=k.getRootNode();return h instanceof ShadowRoot?h:null}return k instanceof ShadowRoot?k:k.parentNode?P(k.parentNode):null},A=()=>{},y=k=>{k.offsetHeight},E=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,C=[],w=k=>{document.readyState==="loading"?(C.length||document.addEventListener("DOMContentLoaded",()=>{for(const h of C)h()}),C.push(k)):k()},$=()=>document.documentElement.dir==="rtl",D=k=>{w(()=>{const h=E();if(h){const b=k.NAME,M=h.fn[b];h.fn[b]=k.jQueryInterface,h.fn[b].Constructor=k,h.fn[b].noConflict=()=>(h.fn[b]=M,k.jQueryInterface)}})},I=(k,h=[],b=k)=>typeof k=="function"?k(...h):b,N=(k,h,b=!0)=>{if(!b){I(k);return}const z=p(h)+5;let st=!1;const et=({target:Tt})=>{Tt===h&&(st=!0,h.removeEventListener(c,et),I(k))};h.addEventListener(c,et),setTimeout(()=>{st||m(h)},z)},Q=(k,h,b,M)=>{const z=k.length;let st=k.indexOf(h);return st===-1?!b&&M?k[z-1]:k[0]:(st+=b?1:-1,M&&(st=(st+z)%z),k[Math.max(0,Math.min(st,z-1))])},Y=/[^.]*(?=\..*)\.|.*/,H=/\..*/,R=/::\d+$/,W={};let U=1;const rt={mouseenter:"mouseover",mouseleave:"mouseout"},ct=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 mt(k,h){return h&&`${h}::${U++}`||k.uidEvent||U++}function pt(k){const h=mt(k);return k.uidEvent=h,W[h]=W[h]||{},W[h]}function Pt(k,h){return function b(M){return T(M,{delegateTarget:k}),b.oneOff&&F.off(k,M.type,h),h.apply(k,[M])}}function At(k,h,b){return function M(z){const st=k.querySelectorAll(h);for(let{target:et}=z;et&&et!==this;et=et.parentNode)for(const Tt of st)if(Tt===et)return T(z,{delegateTarget:et}),M
* pinia v2.1.7
* (c) 2023 Eduardo San Martin Morote
* @license MIT
2024-04-26 00:03:42 +08:00
*/let km;const nl=e=>km=e,$m=Symbol();function Ec(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var To;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(To||(To={}));function LE(){const e=Ag(!0),t=e.run(()=>Li({}));let n=[],s=[];const i=rr({install(o){nl(i),i._a=o,o.provide($m,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!IE?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const Mm=()=>{};function qh(e,t,n,s=Mm){e.push(t);const i=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&hu()&&Cg(i),i}function fi(e,...t){e.slice().forEach(n=>{n(...t)})}const RE=e=>e();function Sc(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];Ec(i)&&Ec(s)&&e.hasOwnProperty(n)&&!re(s)&&!is(s)?e[n]=Sc(i,s):e[n]=s}return e}const NE=Symbol();function FE(e){return!Ec(e)||!e.hasOwnProperty(NE)}const{assign:Yn}=Object;function BE(e){return!!(re(e)&&e.effect)}function VE(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=B1(n.state.value[e]);return Yn(u,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=rr(We(()=>{nl(n);const p=n._s.get(e);return r[f].call(p,p)})),d),{}))}return l=Om(e,c,t,n,s,!0),l}function Om(e,t,n={},s,i,o){let r;const a=Yn({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],p;const m=s.state.value[e];!o&&!m&&(s.state.value[e]={}),Li({});let _;function v(w){let $;c=u=!1,typeof w=="function"?(w(s.state.value[e]),$={type:To.patchFunction,storeId:e,events:p}):(Sc(s.state.value[e],w),$={type:To.patchObject,payload:w,storeId:e,events:p});const D=_=Symbol();Ka().then(()=>{_===D&&(c=!0)}),u=!0,fi(d,$,s.state.value[e])}const x=o?function(){const{state:$}=n,D=$?$():{};this.$patch(I=>{Yn(I,D)})}:Mm;function S(){r.stop(),d=[],f=[],s._s.delete(e)}function P(w,$){return function(){nl(s);const D=Array.from(arguments),I=[],N=[];function Q(R){I.push(R)}function Y(R){N.push(R)}fi(f,{args:D,name:w,store:y,after:Q,onError:Y});let H;try{H=$.apply(this&&this.$id===e?this:y,D)}catch(R){throw fi(N,R),R}return H instanceof Promise?H.then(R=>(fi(I,R),R)).catch(R=>(fi(N,R),Promise.reject(R))):(fi(I,H),H)}}const A={_p:s,$id:e,$onAction:qh.bind(null,f),$patch:v,$reset:x,$subscribe(w,$={}){const D=qh(d,w,$.detached,()=>I()),I=r.run(()=>zs(()=>s.state.value[e],N=>{($.flush==="sync"?u:c)&&w({storeId:e,type:To.direct,events:p},N)},Yn({},l,$)));return D},$dispose:S},y=or(A);s._s.set(e,y);const C=(s._a&&s._a.runWithContext||RE)(()=>s._e.run(()=>(r=Ag()).run(t)));for(const w in C){const $=C[w];if(re($)&&!BE($)||is($))o||(m&&FE($)&&(re($)?$.value=m[w]:Sc($,m[w])),s.state.value[e][w]=$);else if(typeof $=="function"){const D=P(w,$);C[w]=D,a.actions[w]=$}}return Yn(y,C),Yn(kt(y),C),Object.defineProperty(y,"$state",{get:()=>s.state.value[e],set:w=>{v($=>{Yn($,w)})}}),s._p.forEach(w=>{Yn(y,r.run(()=>w({store:y,app:s._a,pinia:s,options:a})))}),m&&o&&n.hydrate&&n.hydrate(y.$state,m),c=!0,u=!0,y}function Ru(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=Tw();return a=a||(c?hn($m,null):null),a&&nl(a),a=km,a._s.has(s)||(o?Om(s,t,i,a):VE(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
2024-04-26 00:03:42 +08:00
*/const bi=typeof window<"u";function HE(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Ft=Object.assign;function Fl(e,t){const n={};for(const s in t){const i=t[s];n[s]=nn(i)?i.map(e):e(i)}return n}const Po=()=>{},nn=Array.isArray,jE=/\/$/,WE=e=>e.replace(jE,"");function Bl(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=YE(s??t,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:r}}function zE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Gh(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function UE(e,t,n){const s=t.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&Hi(t.matched[s],n.matched[i])&&Dm(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hi(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Dm(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!KE(e[n],t[n]))return!1;return!0}function KE(e,t){return nn(e)?Xh(e,t):nn(t)?Xh(t,e):e===t}function Xh(e,t){return nn(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function YE(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 qo;(function(e){e.pop="pop",e.push="push"})(qo||(qo={}));var ko;(function(e){e.back="back",e.forward="forward",e.unknown=""})(ko||(ko={}));function qE(e){if(!e)if(bi){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),WE(e)}const GE=/^[^#]+#/;function XE(e,t){return e.replace(GE,"#")+t}function QE(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 sl=()=>({left:window.pageXOffset,top:window.pageYOffset});function JE(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=QE(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 Qh(e,t){return(history.state?history.state.position-t:-1)+e}const Ac=new Map;function ZE(e,t){Ac.set(e,t)}function tS(e){const t=Ac.get(e);return Ac.delete(e),t}let eS=()=>location.protocol+"//"+location.host;function Im(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),Gh(l,"")}return Gh(n,e)+s+i}function nS(e,t,n,s){let i=[],o=[],r=null;const a=({state:f})=>{const p=Im(e,location),m=n.value,_=t.value;let v=0;if(f){if(n.value=p,t.value=f,r&&r===m){r=null;return}v=_?f.position-_.position:0}else s(p);i.forEach(x=>{x(n.value,m,{delta:v,type:qo.pop,direction:v?v>0?ko.forward:ko.back:ko.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(Ft({},f.state,{scroll:sl()}),"")}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 Jh(e,t,n,s=!1,i=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:i?sl():null}}function sS(e){const{history:t,location:n}=window,s={value:Im(e,n)},i={value:t.state};i.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replace
2024-04-03 01:16:56 -04:00
(?:
(?:${ne}:){7}(?:${ne}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:${ne}:){6}(?:${Je}|:${ne}|:)| // 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
(?:${ne}:){5}(?::${Je}|(?::${ne}){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
(?:${ne}:){4}(?:(?::${ne}){0,1}:${Je}|(?::${ne}){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
(?:${ne}:){3}(?:(?::${ne}){0,2}:${Je}|(?::${ne}){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
(?:${ne}:){2}(?:(?::${ne}){0,3}:${Je}|(?::${ne}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:${ne}:){1}(?:(?::${ne}){0,4}:${Je}|(?::${ne}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::${ne}){0,5}:${Je}|(?::${ne}){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
2024-04-26 00:03:42 +08:00
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),QS=new RegExp(`(?:^${Je}$)|(?:^${il}$)`),JS=new RegExp(`^${Je}$`),ZS=new RegExp(`^${il}$`),ol=e=>e&&e.exact?QS:new RegExp(`(?:${Jn(e)}${Je}${Jn(e)})|(?:${Jn(e)}${il}${Jn(e)})`,"g");ol.v4=e=>e&&e.exact?JS:new RegExp(`${Jn(e)}${Je}${Jn(e)}`,"g");ol.v6=e=>e&&e.exact?ZS:new RegExp(`${Jn(e)}${il}${Jn(e)}`,"g");const Um={exact:!1},Km=`${ol.v4().source}\\/(3[0-2]|[12]?[0-9])`,Ym=`${ol.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,tA=new RegExp(`^${Km}$`),eA=new RegExp(`^${Ym}$`),nA=({exact:e}=Um)=>e?tA:new RegExp(Km,"g"),sA=({exact:e}=Um)=>e?eA:new RegExp(Ym,"g"),qm=nA({exact:!0}),Gm=sA({exact:!0}),Bu=e=>qm.test(e)?4:Gm.test(e)?6:0;Bu.v4=e=>qm.test(e);Bu.v6=e=>Gm.test(e);const mn=Ru("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:""}),actions:{async getConfigurations(){await Re("/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 Bu(e)!==0}}}),Rt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n},iA={name:"navbar",setup(){const e=mn(),t=Xt();return{wireguardConfigurationsStore:e,dashboardConfigurationStore:t}}},oA={class:"col-md-3 col-lg-2 d-md-block p-3"},rA={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow"},aA={class:"sidebar-sticky pt-3"},lA={class:"nav flex-column"},cA={class:"nav-item"},uA={class:"nav-item"},dA=g("hr",null,null,-1),hA=g("h6",{class:"sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted"},[g("span",null,"Configurations")],-1),fA={class:"nav flex-column"},pA={class:"nav-item"},gA=Vw('<hr><h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted"><span>Tools</span></h6><ul class="nav flex-column"><li class="nav-item"><a class="nav-link" data-toggle="modal" data-target="#ping_modal" href="#">Ping</a></li><li class="nav-item"><a class="nav-link" data-toggle="modal" data-target="#traceroute_modal" href="#">Traceroute</a></li></ul><hr>',4),mA={class:"nav flex-column"},_A={class:"nav-item"},bA=g("ul",{class:"nav flex-column"},[g("li",{class:"nav-item"},[g("a",{href:"https://github.com/donaldzou/WGDashboard/releases/tag/"},[g("small",{class:"nav-link text-muted"})])])],-1);function vA(e,t,n,s,i,o){const r=Ot("RouterLink");return X(),ot("div",oA,[g("nav",rA,[g("div",aA,[g("ul",lA,[g("li",cA,[dt(r,{class:"nav-link",to:"/","exact-active-class":"active"},{default:Ut(()=>[gt("Home")]),_:1})]),g("li",uA,[dt(r,{class:"nav-link",to:"/settings","exact-active-class":"active"},{default:Ut(()=>[gt("Settings")]),_:1})])]),dA,hA,g("ul",fA,[g("li",pA,[(X(!0),ot(Qt,null,us(this.wireguardConfigurationsStore.Configurations,a=>(X(),de(r,{to:"/configuration/"+a.Name+"/peers",class:"nav-link nav-conf-link"},{default:Ut(()=>[g("samp",null,wt(a.Name),1)]),_:2},1032
]))+`;_n.KANJI=new RegExp(Go,"g");_n.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_n.BYTE=new RegExp(vP,"g");_n.NUMERIC=new RegExp(i_,"g");_n.ALPHANUMERIC=new RegExp(bP,"g");const yP=new RegExp("^"+Go+"$"),xP=new RegExp("^"+i_+"$"),wP=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_n.testKanji=function(t){return yP.test(t)};_n.testNumeric=function(t){return xP.test(t)};_n.testAlphanumeric=function(t){return wP.test(t)};(function(e){const t=ju,n=_n;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}}})(ms);(function(e){const t=Ne,n=al,s=rl,i=ms,o=ju,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 v=c(_.mode,p);m+=v+_.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 v=t.getSymbolTotalCodewords(p),x=n.getTotalCodewordsCount(p,m),S=(v-x)*8;if(_===i.MIXED)return S;const P=S-c(_,p);switch(_){case i.NUMERIC:return Math.floor(P/10*3);case i.ALPHANUMERIC:return Math.floor(P/11*2);case i.KANJI:return Math.floor(P/13);case i.BYTE:default:return Math.floor(P/8)}},e.getBestVersionForData=function(p,m){let _;const v=s.from(m,s.M);if(Array.isArray(p)){if(p.length>1)return d(p,v);if(p.length===0)return 1;_=p[0]}else _=p;return l(_.mode,_.getLength(),v)},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}})(s_);var o_={};const Pc=Ne,r_=1335,EP=21522,gf=Pc.getBCHDigit(r_);o_.getEncodedBits=function(t,n){const s=t.bit<<3|n;let i=s<<10;for(;Pc.getBCHDigit(i)-gf>=0;)i^=r_<<Pc.getBCHDigit(i)-gf;return(s<<10|i)^EP};var a_={};const SP=ms;function Wi(e){this.mode=SP.NUMERIC,this.data=e.toString()}Wi.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Wi.prototype.getLength=function(){return this.data.length};Wi.prototype.getBitsLength=function(){return Wi.getBitsLength(this.data.length)};Wi.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 AP=Wi;const CP=ms,Hl=["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 zi(e){this.mode=CP.ALPHANUMERIC,this.data=e}zi.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};zi.prototype.getLength=function(){return this.data.length};zi.prototype.getBitsLength=function(){return zi.getBitsLength(this.data.length)};zi.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=Hl.indexOf(this.data[n])*45;s+=Hl.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(Hl.indexOf(this.data[n]),6)};var TP
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var IP=Ki,l_={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,_,v;!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],v=typeof r[u]>"u",(v||_>m)&&(r[u]=m,a.push(u,m),o[u]=c))}if(typeof i<"u"&&typeof r[i]>"u"){var x=["Could not find a path from ",s," to ",i,"."].join("");throw new Error(x)}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})(l_);var LP=l_.exports;(function(e){const t=ms,n=AP,s=TP,i=MP,o=IP,r=_n,a=Ne,l=LP;function c(x){return unescape(encodeURIComponent(x)).length}function u(x,S,P){const A=[];let y;for(;(y=x.exec(P))!==null;)A.push({data:y[0],index:y.index,mode:S,length:y[0].length});return A}function d(x){const S=u(r.NUMERIC,t.NUMERIC,x),P=u(r.ALPHANUMERIC,t.ALPHANUMERIC,x);let A,y;return a.isKanjiModeEnabled()?(A=u(r.BYTE,t.BYTE,x),y=u(r.KANJI,t.KANJI,x)):(A=u(r.BYTE_KANJI,t.BYTE,x),y=[]),S.concat(P,A,y).sort(function(C,w){return C.index-w.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function f(x,S){switch(S){case t.NUMERIC:return n.getBitsLength(x);case t.ALPHANUMERIC:return s.getBitsLength(x);case t.KANJI:return o.getBitsLength(x);case t.BYTE:return i.getBitsLength(x)}}function p(x){return x.reduce(function(S,P){const A=S.length-1>=0?S[S.length-1]:null;return A&&A.mode===P.mode?(S[S.length-1].data+=P.data,S):(S.push(P),S)},[])}function m(x){const S=[];for(let P=0;P<x.length;P++){const A=x[P];switch(A.mode){case t.NUMERIC:S.push([A,{data:A.data,mode:t.ALPHANUMERIC,length:A.length},{data:A.data,mode:t.BYTE,length:A.length}]);break;case t.ALPHANUMERIC:S.push([A,{data:A.data,mode:t.BYTE,length:A.length}]);break;case t.KANJI:S.push([A,{data:A.data,mode:t.BYTE,length:c(A.data)}]);break;case t.BYTE:S.push([{data:A.data,mode:t.BYTE,length:c(A.data)}])}}return S}function _(x,S){const P={},A={start:{}};let y=["start"];for(let E=0;E<x.length;E++){const C=x[E],w=[];for(let $=0;$<C.length;$++){const D=C[$],I=""+E+$;w.push(I),P[I]={node:D,lastCount:0},A[I]={};for(let N=0;N<y.length;N++){const Q=y[N];P[Q]&&P[Q].node.mode===D.mode?(A[Q][I]=f(P[Q].lastCount+D.length,D.mode)-f(P[Q].lastCount,D.mode),P[Q].lastCount+=D.length):(P[Q]&&(P[Q].lastCount=D.length),A[Q][I]=f(D.length,D.mode)+4+t.getCharCountIndicator(D.mode,S))}}y=w}for(let E=0;E<y.length;E++)A[y[E]].end=0;return{map:A,table:P}}function v(x,S){let P;const A=t.getBestModeForData(x);if(P=t.from(S,A),P!==t.BYTE&&P.bit<A.bit)throw new Error('"'+x+'" cannot be encoded with mode '+t.toString(P)+`.
Suggested mode is: `+t.toString(A));switch(P===t.KANJI&&!a.isKanjiModeEnabled()&&(P=t.BYTE),P){case t.NUMERIC:return new n(x);case t.ALPHANUMERIC:return new s(x);case t.KANJI:return new o(x);case t.BYTE:return new i(x)}}e.fromArray=function(S){return S.reduce(function(P,A){return typeof A=="string"?P.push(v(A,null)):A.data&&P.push(v(A.data,A.mode)),P},[])},e.fromString=function(S,P){const A=d(S,a.isKanjiModeEnabled()),y=m(A),E=_(y,P),C=l.find_path(E.map,"start","end"),w=[];for(let $=1;$<C.length-1;$++)w.push(E.table[C[$]].node);return e.fromArray(p(w))},e.rawSplit=function(S){return e.fromArray(d(S,a.isKanjiModeEnabled()))}})(a_);const cl=Ne,jl=rl,RP=pP,NP=gP,FP=Jm,BP=Zm,kc=t_,$c=al,VP=_P,Ea=s_,HP=o_,jP=ms,Wl=a_;function WP(e,t){const n=e.size,s=BP.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 zP(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 UP(e,t){const n=FP.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 KP(e,t){const n=e.size,s=Ea.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 zl(e,t,n){const s=e.size,i=HP.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 YP(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 qP(e,t,n){const s=new RP;n.forEach(function(l){s.put(l.mode.bit,4),s.put(l.getLength(),jP.getCharCountIndicator(l.mode,e)),l.write(s)});const i=cl.getSymbolTotalCodewords(e),o=$c.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 GP(s,e,t)}function GP(e,t,n){const s=cl.getSymbolTotalCodewords(t),i=$c.getTotalCodewordsCount(t,n),o=s-i,r=$c.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 VP(f);let m=0;const _=new Array(r),v=new Array(r);let x=0;const S=new Uint8Array(e.buffer);for(let C=0;C<r;C++){const w=C<l?u:d;_[C]=S.slice(m,m+w),v[C]=p.encode(_[C]),m+=w,x=Math.max(x,w)}const P=new Uint8Array(s);let A=0,y,E;for(y=0;y<x;y++)for(E=0;E<r;E++)y<_[E].length&&(P[A++]=_[E][y]);for(y=0;y<f;y++)for(E=0;E<r;E++)P[A++]=v[E][y];return P}function XP(e,t,n,s){let i;if(Array.isArray(e))i=Wl.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const u=Wl.rawSplit(e);c=Ea.getBestVersionForData(u,n)}i=Wl.fromString(e,c||40)}else throw new Error("Invalid data");const o=Ea.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+`.
2024-04-26 00:03:42 +08:00
`);const r=qP(t,n,i),a=cl.getSymbolSize(t),l=new NP(a);return WP(l,t),zP(l),UP(l,t),zl(l,n,0),t>=7&&KP(l,t),YP(l,r),isNaN(s)&&(s=kc.getBestMask(l,zl.bind(null,l,n))),kc.applyMask(s,l),zl(l,n,s),{modules:l,version:t,errorCorrectionLevel:n,maskPattern:s,segments:i}}Xm.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=jl.M,i,o;return typeof n<"u"&&(s=jl.from(n.errorCorrectionLevel,jl.M),i=Ea.from(n.version),o=kc.from(n.maskPattern),n.toSJISFunc&&cl.setToSJISFunction(n.toSJISFunc)),XP(t,i,s,o)};var c_={},Wu={};(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 v=Math.floor((f-u)/l),x=Math.floor((p-u)/l);_=d[a[v*r+x]?1:0]}s[m++]=_.r,s[m++]=_.g,s[m++]=_.b,s[m]=_.a}}})(Wu);(function(e){const t=Wu;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)}})(c_);var u_={};const QP=Wu;function mf(e,t){const n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function Ul(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}function JP(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?Ul("M",l+n,.5+c+n):Ul("m",i,0),i=0,o=!1),l+1<t&&e[a+1]||(s+=Ul("h",r),r=0)):i++}return s}u_.render=function(t,n,s){const i=QP.getOptions(n),o=t.modules.size,r=t.modules.data,a=o+i.margin*2,l=i.color.light.a?"<path "+mf(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+mf(i.color.dark,"stroke")+' d="'+JP(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 ZP=hP,Mc=Xm,d_=c_,tk=u_;function zu(e,t,n,s,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!ZP())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=Mc.create(n,s);l(e(u,t,s))}catch(u){c(u)}})}try{const l=Mc.create(n,s);i(null,e(l,t,s))}catch(l){i(l)}}eo.create=Mc.create;eo.toCanvas=zu.bind(null,d_.render);eo.toDataURL=zu.bind(null,d_.renderToDataURL);eo.toString=zu.bind(null,function(e,t,n){return tk.render(e,n)});const ek={name:"totp",async setup(){let e="";return await Re("/api/Welcome_GetTotpLink",{},t=>{t.status&&(e=t.data)}),{l:e}},mounted(){this.l&&eo.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)?Ce("/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"))}}},nk={class:"mb-3"},sk=g("p",{class:"mb-2"},[g("small",{class:"text-muted"},"1. Please scan the following QR Code to generate TOTP")],-1),ik=g("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1),ok={class:"p-3 bg-body-secondary rounded-3 border mb-3"},rk=g("p",{class:"text-muted mb-0"},[g("small",null,"Or you can click the link below:")],-1),ak=["href"],lk={style:{"line-break":"anywhere"}},ck=g("label",{for:"totp",class:"mb-2"},[g("small",{class:"text-muted"},"2. Enter the TOTP generated by your authenticator to verify")],-1),uk={class:"form-group"},dk=["disabled"],hk={class:"invalid-feedback"},fk=g("div",{class:"valid-feedback"}," TOTP verified! ",-1);function pk(e,t,n,s,i,o){return X(),ot("div",nk,[sk,ik,g("div",ok,[rk,g("a",{href:this.l},[g("code",lk,wt(this.l),1)],8,ak)]),ck,g("div",uk,[bt(g("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]=r=>this.totp=r),disabled:this.verified},null,8,dk),[[vt,this.totp]]),g("div",hk,wt(this.totpInvalidMessage),1),fk])])}const gk=Rt(ek,[["render",pk]]),mk={name:"setup",components:{Totp:gk},setup(){return{store:Xt()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!1,verified_totp:!1},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&&(this.setup.enable_totp&&this.setup.verified_totp||!this.setup.enable_totp)}},methods:{submit(){this.loading=!0,Ce("/api/Welcome_Finish",this.setup,e=>{e.status?(this.done=!0,setTimeout(()=>{this.$router.push("/")},500)):(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})}}},_k=["data-bs-theme"],bk={class:"mx-auto text-body",style:{width:"500px"}},vk=g("span",{class:"dashboardLogo display-4"},"Nice to meet you!",-1),yk=g("p",{class:"mb-5"},"Please fill in the following fields to finish setup 😊",-1),xk=g("h3",null,"Create an account",-1),wk={key:0,class:"alert alert-danger"},Ek={class:"d-flex flex-column gap-3"},Sk={id:"createAccount"},Ak={class:"form-group text-body"},Ck=g("label",{for:"username",class:"mb-1 text-muted"},[g("small",null,"Pick an username you like")],-1),Tk={class:"form-group text-body"},Pk=g("la
*
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
2024-04-26 00:03:42 +08:00
*/(function(){function e(y){var E=new Float64Array(16);if(y)for(var C=0;C<y.length;++C)E[C]=y[C];return E}function t(y,E){for(var C,w=e(),$=e(),D=0;D<16;++D)$[D]=E[D];n($),n($),n($);for(var I=0;I<2;++I){w[0]=$[0]-65517;for(var D=1;D<15;++D)w[D]=$[D]-65535-(w[D-1]>>16&1),w[D-1]&=65535;w[15]=$[15]-32767-(w[14]>>16&1),C=w[15]>>16&1,w[14]&=65535,s($,w,1-C)}for(var D=0;D<16;++D)y[2*D]=$[D]&255,y[2*D+1]=$[D]>>8}function n(y){for(var E=0;E<16;++E)y[(E+1)%16]+=(E<15?1:38)*Math.floor(y[E]/65536),y[E]&=65535}function s(y,E,C){for(var w,$=~(C-1),D=0;D<16;++D)w=$&(y[D]^E[D]),y[D]^=w,E[D]^=w}function i(y,E,C){for(var w=0;w<16;++w)y[w]=E[w]+C[w]|0}function o(y,E,C){for(var w=0;w<16;++w)y[w]=E[w]-C[w]|0}function r(y,E,C){for(var w=new Float64Array(31),$=0;$<16;++$)for(var D=0;D<16;++D)w[$+D]+=E[$]*C[D];for(var $=0;$<15;++$)w[$]+=38*w[$+16];for(var $=0;$<16;++$)y[$]=w[$];n(y),n(y)}function a(y,E){for(var C=e(),w=0;w<16;++w)C[w]=E[w];for(var w=253;w>=0;--w)r(C,C,C),w!==2&&w!==4&&r(C,C,E);for(var w=0;w<16;++w)y[w]=C[w]}function l(y){y[31]=y[31]&127|64,y[0]&=248}function c(y){for(var E,C=new Uint8Array(32),w=e([1]),$=e([9]),D=e(),I=e([1]),N=e(),Q=e(),Y=e([56129,1]),H=e([9]),R=0;R<32;++R)C[R]=y[R];l(C);for(var R=254;R>=0;--R)E=C[R>>>3]>>>(R&7)&1,s(w,$,E),s(D,I,E),i(N,w,D),o(w,w,D),i(D,$,I),o($,$,I),r(I,N,N),r(Q,w,w),r(w,D,w),r(D,$,N),i(N,w,D),o(w,w,D),r($,w,w),o(D,I,Q),r(w,D,Y),i(w,w,I),r(D,D,w),r(w,I,Q),r(I,$,H),r($,N,N),s(w,$,E),s(D,I,E);return a(D,D),r(w,w,D),t(C,w),C}function u(){var y=new Uint8Array(32);return window.crypto.getRandomValues(y),y}function d(){var y=u();return l(y),y}function f(y,E){for(var C=Uint8Array.from([E[0]>>2&63,(E[0]<<4|E[1]>>4)&63,(E[1]<<2|E[2]>>6)&63,E[2]&63]),w=0;w<4;++w)y[w]=C[w]+65+(25-C[w]>>8&6)-(51-C[w]>>8&75)-(61-C[w]>>8&15)+(62-C[w]>>8&3)}function p(y){var E,C=new Uint8Array(44);for(E=0;E<32/3;++E)f(C.subarray(E*4),y.subarray(E*3));return f(C.subarray(E*4),Uint8Array.from([y[E*3+0],y[E*3+1],0])),C[43]=61,String.fromCharCode.apply(null,C)}function m(y){let E=window.atob(y),C=E.length,w=new Uint8Array(C);for(let D=0;D<C;D++)w[D]=E.charCodeAt(D);return new Uint8Array(w.buffer)}function _(y,E){y.push(E&255,E>>>8&255,E>>>16&255,E>>>24&255)}function v(y,E){y.push(E&255,E>>>8&255)}function x(y,E){for(var C=0;C<E.length;++C)y.push(E[C]&255)}function S(y){for(var E=unescape(encodeURIComponent(y)),C=new Uint8Array(E.length),w=0;w<E.length;++w)C[w]=E.charCodeAt(w);return C}function P(y){if(!P.table){P.table=[];for(var E=0,C=0;C<256;E=++C){for(var w=0;w<8;++w)E=E&1?3988292384^E>>>1:E>>>1;P.table[C]=E}}for(var $=-1,D=0;D<y.length;++D)$=$>>>8^P.table[($^y[D])&255];return($^-1)>>>0}function A(y){for(var E=[],C=[],w=0,$=0;$<y.length;++$){var D=S(y[$].filename),I=S(y[$].content),N=P(I);_(E,67324752),v(E,20),v(E,0),v(E,0),v(E,0),v(E,0),_(E,N),_(E,I.length),_(E,I.length),v(E,D.length),v(E,0),x(E,D),x(E,I),_(C,33639248),v(C,0),v(C,20),v(C,0),v(C,0),v(C,0),v(C,0),_(C,N),_(C,I.length),_(C,I.length),v(C,D.length),v(C,0),v(C,0),v(C,0),v(C,0),_(C,32),_(C,w),x(C,D),w+=30+I.length+D.length}return x(E,C),_(E,101010256),v(E,0),v(E,0),v(E,y.length),v(E,y.length),_(E,C.length),_(E,w),v(E,0),Uint8Array.from(E)}window.wireguard={generateKeypair:function(){var y=d(),E=c(y),C=u();return{publicKey:p(E),privateKey:p(y),presharedKey:p(C)}},generatePublicKey:function(y){return y=m(y),p(c(y))},generateZipFiles:function(y){var E=y.peers,C=A(E),w=new Blob([C],{type:"application/zip"}),$=document.createElement("a");$.download=y.filename,$.href=URL.createObjectURL(w),$.style.display="none",document.body.appendChild($),$.click(),document.body.removeChild($)}}})();const Uk={name:"newConfiguration",setup(){return{store:mn()}},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.Pu
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
2024-04-26 00:03:42 +08:00
*/function ur(e){return e+.5|0}const ts=(e,t,n)=>Math.max(Math.min(e,n),t);function vo(e){return ts(ur(e*2.55),0,255)}function as(e){return ts(ur(e*255),0,255)}function Cn(e){return ts(ur(e/2.55)/100,0,1)}function vf(e){return ts(ur(e*100),0,100)}const je={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},Oc=[..."0123456789ABCDEF"],jM=e=>Oc[e&15],WM=e=>Oc[(e&240)>>4]+Oc[e&15],jr=e=>(e&240)>>4===(e&15),zM=e=>jr(e.r)&&jr(e.g)&&jr(e.b)&&jr(e.a);function UM(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&je[e[1]]*17,g:255&je[e[2]]*17,b:255&je[e[3]]*17,a:t===5?je[e[4]]*17:255}:(t===7||t===9)&&(n={r:je[e[1]]<<4|je[e[2]],g:je[e[3]]<<4|je[e[4]],b:je[e[5]]<<4|je[e[6]],a:t===9?je[e[7]]<<4|je[e[8]]:255})),n}const KM=(e,t)=>e<255?t(e):"";function YM(e){var t=zM(e)?jM:WM;return e?"#"+t(e.r)+t(e.g)+t(e.b)+KM(e.a,t):void 0}const qM=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function g_(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 GM(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 XM(e,t,n){const s=g_(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 QM(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 Ku(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=QM(n,s,i,u,o),l=l*60+.5),[l|0,c||0,a]}function Yu(e,t,n,s){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,s)).map(as)}function qu(e,t,n){return Yu(g_,e,t,n)}function JM(e,t,n){return Yu(XM,e,t,n)}function ZM(e,t,n){return Yu(GM,e,t,n)}function m_(e){return(e%360+360)%360}function tO(e){const t=qM.exec(e);let n=255,s;if(!t)return;t[5]!==s&&(n=t[6]?vo(+t[5]):as(+t[5]));const i=m_(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=JM(i,o,r):t[1]==="hsv"?s=ZM(i,o,r):s=qu(i,o,r),{r:s[0],g:s[1],b:s[2],a:n}}function eO(e,t){var n=Ku(e);n[0]=m_(n[0]+t),n=qu(n),e.r=n[0],e.g=n[1],e.b=n[2]}function nO(e){if(!e)return;const t=Ku(e),n=t[0],s=vf(t[1]),i=vf(t[2]);return e.a<255?`hsla(${n}, ${s}%, ${i}%, ${Cn(e.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const yf={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"},xf={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:"
* Chart.js v4.4.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
2024-04-26 00:03:42 +08:00
*/function xn(){}const uO=(()=>{let e=0;return()=>e++})();function Lt(e){return e===null||typeof e>"u"}function zt(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 $t(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Jt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Pe(e,t){return Jt(e)?e:t}function Et(e,t){return typeof e>"u"?t:e}const dO=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,b_=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Ht(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Bt(e,t,n,s){let i,o,r;if(zt(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($t(e))for(r=Object.keys(e),o=r.length,i=0;i<o;i++)t.call(n,e[r[i]],r[i])}function Sa(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 Aa(e){if(zt(e))return e.map(Aa);if($t(e)){const t=Object.create(null),n=Object.keys(e),s=n.length;let i=0;for(;i<s;++i)t[n[i]]=Aa(e[n[i]]);return t}return e}function v_(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function hO(e,t,n,s){if(!v_(e))return;const i=t[e],o=n[e];$t(i)&&$t(o)?Qo(i,o,s):t[e]=Aa(o)}function Qo(e,t,n){const s=zt(t)?t:[t],i=s.length;if(!$t(e))return e;n=n||{};const o=n.merger||hO;let r;for(let a=0;a<i;++a){if(r=s[a],!$t(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 Mo(e,t){return Qo(e,t,{merger:fO})}function fO(e,t,n){if(!v_(e))return;const s=t[e],i=n[e];$t(s)&&$t(i)?Mo(s,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Aa(i))}const Ef={"":e=>e,x:e=>e.x,y:e=>e.y};function pO(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 gO(e){const t=pO(e);return n=>{for(const s of t){if(s==="")break;n=n&&n[s]}return n}}function fs(e,t){return(Ef[t]||(Ef[t]=gO(t)))(e)}function Gu(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Jo=e=>typeof e<"u",ps=e=>typeof e=="function",Sf=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function mO(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const qt=Math.PI,Yt=2*qt,_O=Yt+qt,Ca=Number.POSITIVE_INFINITY,bO=qt/180,te=qt/2,Os=qt/4,Af=qt*2/3,es=Math.log10,fn=Math.sign;function Oo(e,t,n){return Math.abs(e-t)<n}function Cf(e){const t=Math.round(e);e=Oo(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(es(e))),s=e/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function vO(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 Yi(e){return!isNaN(parseFloat(e))&&isFinite(e)}function yO(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function y_(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 tn(e){return e*(qt/180)}function Xu(e){return e*(180/qt)}function Tf(e){if(!Jt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function x_(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*qt&&(o+=Yt),{angle:o,distance:i}}function Dc(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function xO(e,t){return(e-t+_O)%Yt-qt}function $e(e){return(e%Yt+Yt)%Yt}function Zo(e,t,n,s){const i=$e(e),o=$e(t),r=$e(n),a=$e(o-i),l=$e(r-i),c=$e(i-o),u=$e(i-r);return i===o||i===r||s&&o===r||a>l&&c<u}function le(e,t,n){return Math.max(t,Math.min(n,e))}function wO(e){return le(e,-32768,32767)}function kn(e,t,n,s=1e-6){return e>=Math.min(t,n)-s&&e<=Math.max(t,n)+s}function Qu(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 $n=(e,t,n,s)=>Qu(e,n,s?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),EO=(e,t,n)=>Qu
* Chart.js v4.4.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
2024-04-26 00:03:42 +08:00
*/class TD{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=S_.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 En=new TD;const Hf="transparent",PD={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const s=Mf(e||Hf),i=s.valid&&Mf(t||Hf);return i&&i.valid?i.mix(s,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class kD{constructor(t,n,s,i){const o=n[s];i=yo([t.to,i,o,t.from]);const r=yo([t.from,o,i]);this._active=!0,this._fn=t.fn||PD[t.type||typeof r],this._easing=Do[t.easing]||Do.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=yo([t.to,n,i,t.from]),this._from=yo([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 j_{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!$t(t))return;const n=Object.keys(Zt.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!$t(o))return;const r={};for(const a of n)r[a]=o[a];(zt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,n){const s=n.options,i=MD(t,s);if(!i)return[];const o=this._createAnimations(i,s);return s.$shared&&$D(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 kD(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size
`)>-1?e.split(`
2024-04-26 00:03:42 +08:00
`):e}function eL(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 Ap(e,t){const n=e.chart.ctx,{body:s,footer:i,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=oe(t.bodyFont),c=oe(t.titleFont),u=oe(t.footerFont),d=o.length,f=i.length,p=s.length,m=ge(t.padding);let _=m.height,v=0,x=s.reduce((A,y)=>A+y.before.length+y.lines.length+y.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,d&&(_+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x){const A=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;_+=p*A+(x-p)*l.lineHeight+(x-1)*t.bodySpacing}f&&(_+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const P=function(A){v=Math.max(v,n.measureText(A).width+S)};return n.save(),n.font=c.string,Bt(e.title,P),n.font=l.string,Bt(e.beforeBody.concat(e.afterBody),P),S=t.displayColors?r+2+t.boxPadding:0,Bt(s,A=>{Bt(A.before,P),Bt(A.lines,P),Bt(A.after,P)}),S=0,n.font=u.string,Bt(e.footer,P),n.restore(),v+=m.width,{width:v,height:_}}function nL(e,t){const{y:n,height:s}=t;return n<s/2?"top":n>e.height-s/2?"bottom":"center"}function sL(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 iL(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"),sL(c,e,t,n)&&(c="center"),c}function Cp(e,t,n){const s=n.yAlign||t.yAlign||nL(e,n);return{xAlign:n.xAlign||t.xAlign||iL(e,t,n,s),yAlign:s}}function oL(e,t){let{x:n,width:s}=e;return t==="right"?n-=s:t==="center"&&(n-=s/2),n}function rL(e,t,n){let{y:s,height:i}=e;return t==="top"?s+=n:t==="bottom"?s-=i+n:s-=i/2,s}function Tp(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}=Ks(r);let m=oL(t,a);const _=rL(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:le(m,0,s.width-t.width),y:le(_,0,s.height-t.height)}}function Zr(e,t,n){const s=ge(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-s.right:e.x+s.left}function Pp(e){return rn([],Sn(e))}function aL(e,t,n){return bs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function kp(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const hb={beforeTitle:xn,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:xn,beforeBody:xn,beforeLabel:xn,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 Lt(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:xn,afterBody:xn,beforeFooter:xn,footer:xn,afterFooter:xn};function xe(e,t,n,s){const i=e[t].call(n,s);return typeof i>"u"?hb[t].call(n,s):i}class Vc extends Fn{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