2024-08-10 19:03:21 -04:00
|
|
|
var hS=Object.defineProperty;var fS=(e,t,n)=>t in e?hS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>(fS(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 fb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mS(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 gS={exports:{}},_n="top",Ln="bottom",Nn="right",bn="left",jc="auto",Ir=[_n,Ln,Nn,bn],Ao="start",ur="end",pb="clippingParents",Th="viewport",Zo="popper",mb="reference",Md=Ir.reduce(function(e,t){return e.concat([t+"-"+Ao,t+"-"+ur])},[]),Mh=[].concat(Ir,[jc]).reduce(function(e,t){return e.concat([t,t+"-"+Ao,t+"-"+ur])},[]),gb="beforeRead",_b="read",bb="afterRead",vb="beforeMain",yb="main",wb="afterMain",xb="beforeWrite",kb="write",Sb="afterWrite",Ab=[gb,_b,bb,vb,yb,wb,xb,kb,Sb];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 $o(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 Dh(e){if(typeof ShadowRoot>"u")return!1;var t=Fn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function _S(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 bS(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 Oh={name:"applyStyles",enabled:!0,phase:"write",fn:_S,effect:bS,requires:["computeStyles"]};function $s(e){return e.split("-")[0]}var _o=Math.max,bc=Math.min,dr=Math.round;function Dd(){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 $b(){return!/^((?!chrome|android).)*safari/i.test(Dd())}function hr(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&&dr(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&dr(s.height)/e.offsetHeight||1);var r=$o(e)?Fn(e):window,a=r.visualViewport,l=!$b()&&n,c=(s.left+(l&&a?a.offsetLeft:0))
|
2024-03-21 02:03:08 -04:00
|
|
|
* 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-08-10 19:03:21 -04:00
|
|
|
*/(function(e,t){(function(n,s){e.exports=s(oA)})(fb,function(n){function s(z){const m=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(m,S,K.get?K:{enumerable:!0,get:()=>z[S]})}}return m.default=z,Object.freeze(m)}const i=s(n),o=new Map,r={set(z,m,S){o.has(z)||o.set(z,new Map);const K=o.get(z);if(!K.has(m)&&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(m,S)},get(z,m){return o.has(z)&&o.get(z).get(m)||null},remove(z,m){if(!o.has(z))return;const S=o.get(z);S.delete(m),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,(m,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:m,transitionDelay:S}=window.getComputedStyle(z);const K=Number.parseFloat(m),me=Number.parseFloat(S);return!K&&!me?0:(m=m.split(",")[0],S=S.split(",")[0],(Number.parseFloat(m)+Number.parseFloat(S))*l)},g=z=>{z.dispatchEvent(new Event(c))},_=z=>!z||typeof z!="object"?!1:(typeof z.jquery<"u"&&(z=z[0]),typeof z.nodeType<"u"),v=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 m=getComputedStyle(z).getPropertyValue("visibility")==="visible",S=z.closest("details:not([open])");if(!S)return m;if(S!==z){const K=z.closest("summary");if(K&&K.parentNode!==S||K===null)return!1}return m},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 m=z.getRootNode();return m instanceof ShadowRoot?m: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=[],E=z=>{document.readyState==="loading"?(x.length||document.addEventListener("DOMContentLoaded",()=>{for(const m of x)m()}),x.push(z)):z()},P=()=>document.documentElement.dir==="rtl",C=z=>{E(()=>{const m=y();if(m){const S=z.NAME,K=m.fn[S];m.fn[S]=z.jQueryInterface,m.fn[S].Constructor=z,m.fn[S].noConflict=()=>(m.fn[S]=K,z.jQueryInterface)}})},F=(z,m=[],S=z)=>typeof z=="function"?z(...m):S,G=(z,m,S=!0)=>{if(!S){F(z);return}const me=p(m)+5;let Pe=!1;const Ee=({target:Xe})=>{Xe===m&&(Pe=!0,m.removeEventListener(c,Ee),F(z))};m.addEventListener(c,Ee),setTimeout(()=>{Pe||g(m)},me)},re=(z,m,S,K)=>{const me=z.length;let Pe=z.indexOf(m);return Pe===-1?!S&&K?z[me-1]:z[0]:(Pe+=S?1:-1,K&&(Pe=(Pe+me)%me),z[Math.max(0,Math.min(Pe,me-1))])},Y=/[^.]*(?=\..*)\.|.*/,L=/\..*/,O=/::\d+$/,V={};let Q=1;const Z={mouseenter:"mouseover",mouseleave:"mouseout"},le=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,m){return m&&`${m}::${Q++}`||z.uidEvent||Q++}function U(z){const m=we(z);return z.uidEvent=m,V[m]=V[m]||{},V[m]}function X(z,m){return function S(K){return fe(K,{delegateTarget:z}),S.oneOff&&N.off(z,K.type,m),m.apply(z,[K])}}function I(z,m,S){return function K(me){const Pe=z.querySelectorAll(m);for(let{target:Ee}=me;Ee&&Ee!==this;Ee=Ee.parentNode)for(const Xe of Pe)if(Xe===Ee)return fe(me,{delegateTa
|
2024-06-18 03:16:42 +08:00
|
|
|
* @vue/shared v3.4.29
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
* @license MIT
|
2024-08-10 19:03:21 -04:00
|
|
|
**//*! #__NO_SIDE_EFFECTS__ */function jh(e,t){const n=new Set(e.split(","));return t?s=>n.has(s.toLowerCase()):s=>n.has(s)}const bt={},ir=[],Kn=()=>{},rA=()=>!1,Yc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Wh=e=>e.startsWith("onUpdate:"),Lt=Object.assign,zh=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},aA=Object.prototype.hasOwnProperty,it=(e,t)=>aA.call(e,t),Be=Array.isArray,or=e=>Za(e)==="[object Map]",Rr=e=>Za(e)==="[object Set]",rm=e=>Za(e)==="[object Date]",Ue=e=>typeof e=="function",St=e=>typeof e=="string",Qs=e=>typeof e=="symbol",ht=e=>e!==null&&typeof e=="object",Fb=e=>(ht(e)||Ue(e))&&Ue(e.then)&&Ue(e.catch),Bb=Object.prototype.toString,Za=e=>Bb.call(e),lA=e=>Za(e).slice(8,-1),Vb=e=>Za(e)==="[object Object]",Yh=e=>St(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,fa=jh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Uc=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},cA=/-(\w)/g,Ts=Uc(e=>e.replace(cA,(t,n)=>n?n.toUpperCase():"")),uA=/\B([A-Z])/g,Mo=Uc(e=>e.replace(uA,"-$1").toLowerCase()),Kc=Uc(e=>e.charAt(0).toUpperCase()+e.slice(1)),ju=Uc(e=>e?`on${Kc(e)}`:""),Di=(e,t)=>!Object.is(e,t),tc=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Hb=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},vc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},jb=e=>{const t=St(e)?Number(e):NaN;return isNaN(t)?e:t};let am;const Wb=()=>am||(am=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)?pA(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 dA=/;(?![^(]*\))/g,hA=/:([^]+)/,fA=/\/\*[^]*?\*\//g;function pA(e){const t={};return e.replace(fA,"").split(dA).forEach(n=>{if(n){const s=n.split(hA);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ce(e){let t="";if(St(e))t=e;else if(Be(e))for(let n=0;n<e.length;n++){const s=Ce(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=Ce(t)),n&&(e.style=Wt(n)),e}const mA="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",gA=jh(mA);function zb(e){return!!e||e===""}function _A(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Eo(e[s],t[s]);return n}function Eo(e,t){if(e===t)return!0;let n=rm(e),s=rm(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Qs(e),s=Qs(t),n||s)return e===t;if(n=Be(e),s=Be(t),n||s)return n&&s?_A(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||!Eo(e[r],t[r]))return!1}}return String(e)===String(t)}function Uh(e,t){return e.findIndex(n=>Eo(n,t))}const be=e=>St(e)?e:e==null?"":Be(e)||ht(e)&&(e.toString===Bb||!Ue(e.toString))?JSON.stringify(e,Yb,2):String(e),Yb=(e,t)=>t&&t.__v_isRef?Yb(e,t.value):or(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],o)=>(n[Wu(s,o)+" =>"]=i,n),{})}:Rr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Wu(n))}:Qs(t)?Wu(t):ht(t)&&!Be(t)&&!Vb(t)?String(t):t,Wu=(e,t="")=>{var n;return Qs(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
2024-06-18 03:16:42 +08:00
|
|
|
* @vue/reactivity v3.4.29
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
* @license MIT
|
2024-08-10 19:03:21 -04:00
|
|
|
**/let Tn;class Ub{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Tn,!t&&Tn&&(this.index=(Tn.scopes||(Tn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Tn;try{return Tn=this,t()}finally{Tn=n}}}on(){Tn=this}off(){Tn=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 Kb(e){return new Ub(e)}function bA(e,t=Tn){t&&t.active&&t.effects.push(e)}function qc(){return Tn}function Kh(e){Tn&&Tn.cleanups.push(e)}let bo;class qh{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,bA(this,i)}get dirty(){if(this._dirtyLevel===2)return!1;if(this._dirtyLevel===3||this._dirtyLevel===4){this._dirtyLevel=1,Bi();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(vA(n.computed),this._dirtyLevel>=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),Vi()}return this._dirtyLevel>=5}set dirty(t){this._dirtyLevel=t?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Ei,n=bo;try{return Ei=!0,bo=this,this._runnings++,lm(this),this.fn()}finally{cm(this),this._runnings--,bo=n,Ei=t}}stop(){this.active&&(lm(this),cm(this),this.onStop&&this.onStop(),this.active=!1)}}function vA(e){return e.value}function lm(e){e._trackId++,e._depsLength=0}function cm(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)qb(e.deps[t],e);e.deps.length=e._depsLength}}function qb(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Ei=!0,Id=0;const Gb=[];function Bi(){Gb.push(Ei),Ei=!1}function Vi(){const e=Gb.pop();Ei=e===void 0?!0:e}function Gh(){Id++}function Jh(){for(Id--;!Id&&Rd.length;)Rd.shift()()}function Jb(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const s=e.deps[e._depsLength];s!==t?(s&&qb(s,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Rd=[];function Xb(e,t,n){Gh();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&&Rd.push(s.scheduler)))}Jh()}const Qb=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},yc=new WeakMap,vo=Symbol(""),Ld=Symbol("");function Cn(e,t,n){if(Ei&&bo){let s=yc.get(e);s||yc.set(e,s=new Map);let i=s.get(n);i||s.set(n,i=Qb(()=>s.delete(n))),Jb(bo,i)}}function Js(e,t,n,s,i,o){const r=yc.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"||!Qs(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(r.get(n)),t){case"add":Be(e)?Yh(n)&&a.push(r.get("length")):(a.push(r.get(vo)),or(e)&&a.push(r.get(Ld)));break;case"delete":Be(e)||(a.push(r.get(vo)),or(e)&&a.push(r.get(Ld)));break;case"set":or(e)&&a.push(r.get(vo));break}Gh();for(const l of a)l&&Xb(l,5);Jh()}function yA(e,t){const n=yc.get(e);return n&&n.get(t)}const wA=jh("__proto__,__v_isRef,__isVue"),Zb=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Qs)),um=xA();function xA(){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++)Cn(s,"get",o+"");const i=s[t](...n);return i===-1||i===!1?s[t](...n.map(Ze)):i}}),["push","pop"
|
2024-06-18 03:16:42 +08:00
|
|
|
* @vue/runtime-core v3.4.29
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
* @license MIT
|
2024-08-10 19:03:21 -04:00
|
|
|
**/function Ci(e,t,n,s){try{return s?e(...s):e()}catch(i){el(i,t,n)}}function Xn(e,t,n,s){if(Ue(e)){const i=Ci(e,t,n,s);return i&&Fb(i)&&i.catch(o=>{el(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 el(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){Bi(),Ci(l,null,10,[e,r,a]),Vi();return}}YA(e,n,i,s)}function YA(e,t,n,s=!0){console.error(e)}let Oa=!1,Nd=!1;const ln=[];let ys=0;const rr=[];let mi=null,po=0;const hv=Promise.resolve();let nf=null;function Zt(e){const t=nf||hv;return e?t.then(this?e.bind(this):e):t}function UA(e){let t=ys+1,n=ln.length;for(;t<n;){const s=t+n>>>1,i=ln[s],o=Ia(i);o<e||o===e&&i.pre?t=s+1:n=s}return t}function sf(e){(!ln.length||!ln.includes(e,Oa&&e.allowRecurse?ys+1:ys))&&(e.id==null?ln.push(e):ln.splice(UA(e.id),0,e),fv())}function fv(){!Oa&&!Nd&&(Nd=!0,nf=hv.then(mv))}function KA(e){const t=ln.indexOf(e);t>ys&&ln.splice(t,1)}function Fd(e){Be(e)?rr.push(...e):(!mi||!mi.includes(e,e.allowRecurse?po+1:po))&&rr.push(e),fv()}function mm(e,t,n=Oa?ys+1:0){for(;n<ln.length;n++){const s=ln[n];if(s&&s.pre){if(e&&s.id!==e.uid)continue;ln.splice(n,1),n--,s()}}}function pv(e){if(rr.length){const t=[...new Set(rr)].sort((n,s)=>Ia(n)-Ia(s));if(rr.length=0,mi){mi.push(...t);return}for(mi=t,po=0;po<mi.length;po++){const n=mi[po];n.active!==!1&&n()}mi=null,po=0}}const Ia=e=>e.id==null?1/0:e.id,qA=(e,t)=>{const n=Ia(e)-Ia(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function mv(e){Nd=!1,Oa=!0,ln.sort(qA);try{for(ys=0;ys<ln.length;ys++){const t=ln[ys];t&&t.active!==!1&&Ci(t,null,14)}}finally{ys=0,ln.length=0,pv(),Oa=!1,nf=null,(ln.length||rr.length)&&mv()}}function GA(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||bt;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]||bt;f&&(i=n.map(p=>St(p)?p.trim():p)),d&&(i=n.map(vc))}let a,l=s[a=ju(t)]||s[a=ju(Ts(t))];!l&&o&&(l=s[a=ju(Mo(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 gv(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=gv(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 Qc(e,t){return!e||!Yc(t)?!1:(t=t.slice(2).replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,Mo(t))||it(e,t))}let zt=null,Zc=null;function xc(e){const t=zt;return zt=e,Zc=e&&e.type.__scopeId||null,t}function yn(e){Zc=e}function wn(){Zc=null}function Te(e,t=zt,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&Mm(-1);const o=xc(t);let r;try{r=e(...i)}finally{xc(o),s._d&&Mm(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function zu(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:g,inheritAttrs:_}=e,v=xc(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,g)),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:XA(a)}}catch(M){_a.length=0,el(M,e,1),w=$e(cn)}let $=w;if(A&&_!==!1){const M=Object.keys(A),{shapeFlag:k}=$;M.length&&k&7&&(o&&M.some(Wh)&&(A=QA(A,o)),$=Oi($,A,!1,!0))}return n.dirs&&($=Oi($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(n.dirs):n.dirs),n.transition&&($.transition=n.transition),w=$,xc(v),w}function JA(e,t=!0){let n;for(let s=0;s<e.length;s++){const i=e[s];if(Na(i)){if(i.type!==cn||i.children==="v-if"){if(n)return;n=i}}else return}return n}const XA=e=>{let t;for(const n in e)(n==="class"||n==="style"||Yc(n))&&((t||(t={}))[n]=e[n]);return t},QA=(e,t)=>{const n={};for(const s in e)(!Wh(s)||
|
2024-06-18 03:16:42 +08:00
|
|
|
* @vue/runtime-dom v3.4.29
|
|
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
|
* @license MIT
|
2024-08-10 19:03:21 -04:00
|
|
|
**/const eE="http://www.w3.org/2000/svg",tE="http://www.w3.org/1998/Math/MathML",js=typeof document<"u"?document:null,Im=js&&js.createElement("template"),nE={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"?js.createElementNS(eE,e):t==="mathml"?js.createElementNS(tE,e):n?js.createElement(e,{is:n}):js.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>js.createTextNode(e),createComment:e=>js.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>js.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{Im.innerHTML=s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e;const a=Im.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]}},li="transition",Ur="animation",_r=Symbol("_vtc"),Bt=(e,{slots:t})=>Co(B$,Jv(e),t);Bt.displayName="Transition";const Gv={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},sE=Bt.props=Lt({},Fv,Gv),io=(e,t=[])=>{Be(e)?e.forEach(n=>n(...t)):e&&e(...t)},Rm=e=>e?Be(e)?e.some(t=>t.length>1):e.length>1:!1;function Jv(e){const t={};for(const G in e)G in Gv||(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,g=iE(i),_=g&&g[0],v=g&&g[1],{onBeforeEnter:w,onEnter:A,onEnterCancelled:$,onLeave:M,onLeaveCancelled:k,onBeforeAppear:y=w,onAppear:x=A,onAppearCancelled:E=$}=t,P=(G,re,Y)=>{fi(G,re?u:a),fi(G,re?c:r),Y&&Y()},C=(G,re)=>{G._isLeaving=!1,fi(G,d),fi(G,p),fi(G,f),re&&re()},F=G=>(re,Y)=>{const L=G?x:A,O=()=>P(re,G,Y);io(L,[re,O]),Lm(()=>{fi(re,G?l:o),Bs(re,G?u:a),Rm(L)||Nm(re,s,_,O)})};return Lt(t,{onBeforeEnter(G){io(w,[G]),Bs(G,o),Bs(G,r)},onBeforeAppear(G){io(y,[G]),Bs(G,l),Bs(G,c)},onEnter:F(!1),onAppear:F(!0),onLeave(G,re){G._isLeaving=!0;const Y=()=>C(G,re);Bs(G,d),Bs(G,f),Qv(),Lm(()=>{G._isLeaving&&(fi(G,d),Bs(G,p),Rm(M)||Nm(G,s,v,Y))}),io(M,[G,Y])},onEnterCancelled(G){P(G,!1),io($,[G])},onAppearCancelled(G){P(G,!0),io(E,[G])},onLeaveCancelled(G){C(G),io(k,[G])}})}function iE(e){if(e==null)return null;if(ht(e))return[qu(e.enter),qu(e.leave)];{const t=qu(e);return[t,t]}}function qu(e){return jb(e)}function Bs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[_r]||(e[_r]=new Set)).add(t)}function fi(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[_r];n&&(n.delete(t),n.size||(e[_r]=void 0))}function Lm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let oE=0;function Nm(e,t,n,s){const i=e._endId=++oE,o=()=>{i===e._endId&&s()};if(n)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=Xv(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 Xv(e,t){const n=window.getComputedStyle(e),s=g=>(n[g]||"").split(", "),i=s(`${li}Delay`),o=s(`${li}Duration`),r=Fm(i,o),a=s(`${Ur}Delay`),l=s(`${Ur}Duration`),c=Fm(a,l);let u=null,d=0,f=0;t===li?r>0&&(u=li,d=r,f=o.length):t===Ur?c>0&&(u=Ur,d=c,f=l.length):(d=Math.max(r,c),u=d>0?r>c?li:Ur:null,f=u?u===li?o.length:l.length:0);const p=u===li&&/\b(transform|all)(,|$)/.test(s(`${li}Proper
|
2024-03-21 02:03:08 -04:00
|
|
|
* pinia v2.1.7
|
|
|
|
* (c) 2023 Eduardo San Martin Morote
|
|
|
|
* @license MIT
|
2024-08-10 19:03:21 -04:00
|
|
|
*/let oy;const ou=e=>oy=e,ry=Symbol();function qd(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ba;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ba||(ba={}));function BE(){const e=Kb(!0),t=e.run(()=>ve({}));let n=[],s=[];const i=Xc({install(o){ou(i),i._a=o,o.provide(ry,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!FE?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const ay=()=>{};function Zm(e,t,n,s=ay){e.push(t);const i=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&qc()&&Kh(i),i}function Ko(e,...t){e.slice().forEach(n=>{n(...t)})}const VE=e=>e();function Gd(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];qd(i)&&qd(s)&&e.hasOwnProperty(n)&&!Ct(s)&&!yo(s)?e[n]=Gd(i,s):e[n]=s}return e}const HE=Symbol();function jE(e){return!qd(e)||!e.hasOwnProperty(HE)}const{assign:pi}=Object;function WE(e){return!!(Ct(e)&&e.effect)}function zE(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=jA(n.state.value[e]);return pi(u,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=Xc(_e(()=>{ou(n);const p=n._s.get(e);return r[f].call(p,p)})),d),{}))}return l=ly(e,c,t,n,s,!0),l}function ly(e,t,n={},s,i,o){let r;const a=pi({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],p;const g=s.state.value[e];!o&&!g&&(s.state.value[e]={}),ve({});let _;function v(E){let P;c=u=!1,typeof E=="function"?(E(s.state.value[e]),P={type:ba.patchFunction,storeId:e,events:p}):(Gd(s.state.value[e],E),P={type:ba.patchObject,payload:E,storeId:e,events:p});const C=_=Symbol();Zt().then(()=>{_===C&&(c=!0)}),u=!0,Ko(d,P,s.state.value[e])}const w=o?function(){const{state:P}=n,C=P?P():{};this.$patch(F=>{pi(F,C)})}:ay;function A(){r.stop(),d=[],f=[],s._s.delete(e)}function $(E,P){return function(){ou(s);const C=Array.from(arguments),F=[],G=[];function re(O){F.push(O)}function Y(O){G.push(O)}Ko(f,{args:C,name:E,store:k,after:re,onError:Y});let L;try{L=P.apply(this&&this.$id===e?this:k,C)}catch(O){throw Ko(G,O),O}return L instanceof Promise?L.then(O=>(Ko(F,O),O)).catch(O=>(Ko(G,O),Promise.reject(O))):(Ko(F,L),L)}}const M={_p:s,$id:e,$onAction:Zm.bind(null,f),$patch:v,$reset:w,$subscribe(E,P={}){const C=Zm(d,E,P.detached,()=>F()),F=r.run(()=>Vt(()=>s.state.value[e],G=>{(P.flush==="sync"?u:c)&&E({storeId:e,type:ba.direct,events:p},G)},pi({},l,P)));return C},$dispose:A},k=Ms(M);s._s.set(e,k);const x=(s._a&&s._a.runWithContext||VE)(()=>s._e.run(()=>(r=Kb()).run(t)));for(const E in x){const P=x[E];if(Ct(P)&&!WE(P)||yo(P))o||(g&&jE(P)&&(Ct(P)?P.value=g[E]:Gd(P,g[E])),s.state.value[e][E]=P);else if(typeof P=="function"){const C=$(E,P);x[E]=C,a.actions[E]=P}}return pi(k,x),pi(Ze(k),x),Object.defineProperty(k,"$state",{get:()=>s.state.value[e],set:E=>{v(P=>{pi(P,E)})}}),s._p.forEach(E=>{pi(k,r.run(()=>E({store:k,app:s._a,pinia:s,options:a})))}),g&&o&&n.hydrate&&n.hydrate(k.$state,g),c=!0,u=!0,k}function gf(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=x$();return a=a||(c?ls(ry,null):null),a&&ou(a),a=oy,a._s.has(s)||(o?ly(s,t,i,a):zE(s,i,a)),a._s.get(s)}return r.$id=s,r}/*!
|
2024-03-21 02:03:08 -04:00
|
|
|
* vue-router v4.2.5
|
|
|
|
* (c) 2023 Eduardo San Martin Morote
|
|
|
|
* @license MIT
|
2024-08-10 19:03:21 -04:00
|
|
|
*/const er=typeof window<"u";function YE(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ct=Object.assign;function Xu(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 va=()=>{},ds=Array.isArray,UE=/\/$/,KE=e=>e.replace(UE,"");function Qu(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=XE(s??t,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:r}}function qE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function eg(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function GE(e,t,n){const s=t.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&vr(t.matched[s],n.matched[i])&&cy(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function vr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cy(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!JE(e[n],t[n]))return!1;return!0}function JE(e,t){return ds(e)?tg(e,t):ds(t)?tg(t,e):e===t}function tg(e,t){return ds(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function XE(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 Ba;(function(e){e.pop="pop",e.push="push"})(Ba||(Ba={}));var ya;(function(e){e.back="back",e.forward="forward",e.unknown=""})(ya||(ya={}));function QE(e){if(!e)if(er){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),KE(e)}const ZE=/^[^#]+#/;function eC(e,t){return e.replace(ZE,"#")+t}function tC(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 ru=()=>({left:window.pageXOffset,top:window.pageYOffset});function nC(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=tC(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 ng(e,t){return(history.state?history.state.position-t:-1)+e}const Jd=new Map;function sC(e,t){Jd.set(e,t)}function iC(e){const t=Jd.get(e);return Jd.delete(e),t}let oC=()=>location.protocol+"//"+location.host;function uy(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),eg(l,"")}return eg(n,e)+s+i}function rC(e,t,n,s){let i=[],o=[],r=null;const a=({state:f})=>{const p=uy(e,location),g=n.value,_=t.value;let v=0;if(f){if(n.value=p,t.value=f,r&&r===g){r=null;return}v=_?f.position-_.position:0}else s(p);i.forEach(w=>{w(n.value,g,{delta:v,type:Ba.pop,direction:v?v>0?ya.forward:ya.back:ya.unknown})})};function l(){r=n.value}function c(f){i.push(f);const p=()=>{const g=i.indexOf(f);g>-1&&i.splice(g,1)};return o.push(p),p}function u(){const{history:f}=window;f.state&&f.replaceState(ct({},f.state,{scroll:ru()}),"")}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 sg(e,t,n,s=!1,i=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:i?ru():null}}function aC(e){const{history:t,location:n}=window,s={value:uy(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
|
|
|
(?:
|
2024-08-10 00:25:25 -04:00
|
|
|
(?:${Ft}:){7}(?:${Ft}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
2024-08-10 19:03:21 -04:00
|
|
|
(?:${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
|
2024-04-03 01:16:56 -04:00
|
|
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
2024-08-10 19:03:21 -04:00
|
|
|
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),JC=new RegExp(`(?:^${ss}$)|(?:^${au}$)`),XC=new RegExp(`^${ss}$`),QC=new RegExp(`^${au}$`),lu=e=>e&&e.exact?JC:new RegExp(`(?:${yi(e)}${ss}${yi(e)})|(?:${yi(e)}${au}${yi(e)})`,"g");lu.v4=e=>e&&e.exact?XC:new RegExp(`${yi(e)}${ss}${yi(e)}`,"g");lu.v6=e=>e&&e.exact?QC:new RegExp(`${yi(e)}${au}${yi(e)}`,"g");const yy={exact:!1},wy=`${lu.v4().source}\\/(3[0-2]|[12]?[0-9])`,xy=`${lu.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,ZC=new RegExp(`^${wy}$`),eP=new RegExp(`^${xy}$`),tP=({exact:e}=yy)=>e?ZC:new RegExp(wy,"g"),nP=({exact:e}=yy)=>e?eP:new RegExp(xy,"g"),ky=tP({exact:!0}),Sy=nP({exact:!0}),yf=e=>ky.test(e)?4:Sy.test(e)?6:0;yf.v4=e=>ky.test(e);yf.v6=e=>Sy.test(e);const Bn=gf("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 yf(e)!==0}}}),ze=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n},sP={name:"navbar",setup(){const e=Bn(),t=st();return{wireguardConfigurationsStore:e,dashboardConfigurationStore:t}}},iP={class:"col-md-3 col-lg-2 d-md-block p-3",style:{height:"calc(-50px + 100vh)"}},oP={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},rP={class:"sidebar-sticky pt-3"},aP={class:"nav flex-column px-2"},lP={class:"nav-item"},cP=h("i",{class:"bi bi-house me-2"},null,-1),uP={class:"nav-item"},dP=h("i",{class:"bi bi-gear me-2"},null,-1),hP=h("hr",{class:"text-body"},null,-1),fP=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),pP={class:"nav flex-column px-2"},mP={class:"nav-item"},gP=h("hr",{class:"text-body"},null,-1),_P=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),bP={class:"nav flex-column px-2"},vP={class:"nav-item"},yP={class:"nav-item"},wP=h("hr",{class:"text-body"},null,-1),xP={class:"nav flex-column px-2"},kP={class:"nav-item"},SP=h("i",{class:"bi bi-box-arrow-left me-2"},null,-1),AP=h("ul",{class:"nav flex-column"},[h("li",{class:"nav-item"},[h("a",{href:"https://github.com/donaldzou/WGDashboard/
|
2024-03-21 02:03:08 -04:00
|
|
|
*
|
|
|
|
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
2024-08-10 19:03:21 -04:00
|
|
|
*/(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,E=e(),P=e(),C=0;C<16;++C)P[C]=y[C];n(P),n(P),n(P);for(var F=0;F<2;++F){E[0]=P[0]-65517;for(var C=1;C<15;++C)E[C]=P[C]-65535-(E[C-1]>>16&1),E[C-1]&=65535;E[15]=P[15]-32767-(E[14]>>16&1),x=E[15]>>16&1,E[14]&=65535,s(P,E,1-x)}for(var C=0;C<16;++C)k[2*C]=P[C]&255,k[2*C+1]=P[C]>>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 E,P=~(x-1),C=0;C<16;++C)E=P&(k[C]^y[C]),k[C]^=E,y[C]^=E}function i(k,y,x){for(var E=0;E<16;++E)k[E]=y[E]+x[E]|0}function o(k,y,x){for(var E=0;E<16;++E)k[E]=y[E]-x[E]|0}function r(k,y,x){for(var E=new Float64Array(31),P=0;P<16;++P)for(var C=0;C<16;++C)E[P+C]+=y[P]*x[C];for(var P=0;P<15;++P)E[P]+=38*E[P+16];for(var P=0;P<16;++P)k[P]=E[P];n(k),n(k)}function a(k,y){for(var x=e(),E=0;E<16;++E)x[E]=y[E];for(var E=253;E>=0;--E)r(x,x,x),E!==2&&E!==4&&r(x,x,y);for(var E=0;E<16;++E)k[E]=x[E]}function l(k){k[31]=k[31]&127|64,k[0]&=248}function c(k){for(var y,x=new Uint8Array(32),E=e([1]),P=e([9]),C=e(),F=e([1]),G=e(),re=e(),Y=e([56129,1]),L=e([9]),O=0;O<32;++O)x[O]=k[O];l(x);for(var O=254;O>=0;--O)y=x[O>>>3]>>>(O&7)&1,s(E,P,y),s(C,F,y),i(G,E,C),o(E,E,C),i(C,P,F),o(P,P,F),r(F,G,G),r(re,E,E),r(E,C,E),r(C,P,G),i(G,E,C),o(E,E,C),r(P,E,E),o(C,F,re),r(E,C,Y),i(E,E,F),r(C,C,E),r(E,F,re),r(F,P,L),r(P,G,G),s(E,P,y),s(C,F,y);return a(C,C),r(E,E,C),t(x,E),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]),E=0;E<4;++E)k[E]=x[E]+65+(25-x[E]>>8&6)-(51-x[E]>>8&75)-(61-x[E]>>8&15)+(62-x[E]>>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 g(k){let y=window.atob(k),x=y.length,E=new Uint8Array(x);for(let C=0;C<x;C++)E[C]=y.charCodeAt(C);return new Uint8Array(E.buffer)}function _(k,y){k.push(y&255,y>>>8&255,y>>>16&255,y>>>24&255)}function v(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),E=0;E<y.length;++E)x[E]=y.charCodeAt(E);return x}function $(k){if(!$.table){$.table=[];for(var y=0,x=0;x<256;y=++x){for(var E=0;E<8;++E)y=y&1?3988292384^y>>>1:y>>>1;$.table[x]=y}}for(var P=-1,C=0;C<k.length;++C)P=P>>>8^$.table[(P^k[C])&255];return(P^-1)>>>0}function M(k){for(var y=[],x=[],E=0,P=0;P<k.length;++P){var C=A(k[P].fileName),F=A(k[P].file),G=$(F);_(y,67324752),v(y,20),v(y,0),v(y,0),v(y,0),v(y,0),_(y,G),_(y,F.length),_(y,F.length),v(y,C.length),v(y,0),w(y,C),w(y,F),_(x,33639248),v(x,0),v(x,20),v(x,0),v(x,0),v(x,0),v(x,0),_(x,G),_(x,F.length),_(x,F.length),v(x,C.length),v(x,0),v(x,0),v(x,0),v(x,0),_(x,32),_(x,E),w(x,C),E+=30+F.length+C.length}return w(y,x),_(y,101010256),v(y,0),v(y,0),v(y,k.length),v(y,k.length),_(y,x.length),_(y,E),v(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=g(k),p(c(k))},generateZipFiles:function(k,y){var x=k.data,E=M(x),P=new Blob([E],{type:"application/zip"}),C=document.createElement("a");C.download=y,C.href=URL.createObjectURL(P),C.style.display="none",document.body.appendChild(C),C.click(),document.body.removeChild(C)}}})();const WN={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
|
2024-03-21 02:03:08 -04:00
|
|
|
* @kurkle/color v0.3.2
|
|
|
|
* https://github.com/kurkle/color#readme
|
|
|
|
* (c) 2023 Jukka Kurkela
|
|
|
|
* Released under the MIT License
|
2024-08-10 19:03:21 -04:00
|
|
|
*/function rl(e){return e+.5|0}const xi=(e,t,n)=>Math.max(Math.min(e,n),t);function oa(e){return xi(rl(e*2.55),0,255)}function Mi(e){return xi(rl(e*255),0,255)}function zs(e){return xi(rl(e/2.55)/100,0,1)}function Fg(e){return xi(rl(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},oh=[..."0123456789ABCDEF"],AF=e=>oh[e&15],$F=e=>oh[(e&240)>>4]+oh[e&15],Nl=e=>(e&240)>>4===(e&15),EF=e=>Nl(e.r)&&Nl(e.g)&&Nl(e.b)&&Nl(e.a);function CF(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 PF=(e,t)=>e<255?t(e):"";function TF(e){var t=EF(e)?AF:$F;return e?"#"+t(e.r)+t(e.g)+t(e.b)+PF(e.a,t):void 0}const MF=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function b0(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 DF(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 OF(e,t,n){const s=b0(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 IF(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 Vf(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=IF(n,s,i,u,o),l=l*60+.5),[l|0,c||0,a]}function Hf(e,t,n,s){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,s)).map(Mi)}function jf(e,t,n){return Hf(b0,e,t,n)}function RF(e,t,n){return Hf(OF,e,t,n)}function LF(e,t,n){return Hf(DF,e,t,n)}function v0(e){return(e%360+360)%360}function NF(e){const t=MF.exec(e);let n=255,s;if(!t)return;t[5]!==s&&(n=t[6]?oa(+t[5]):Mi(+t[5]));const i=v0(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=RF(i,o,r):t[1]==="hsv"?s=LF(i,o,r):s=jf(i,o,r),{r:s[0],g:s[1],b:s[2],a:n}}function FF(e,t){var n=Vf(e);n[0]=v0(n[0]+t),n=jf(n),e.r=n[0],e.g=n[1],e.b=n[2]}function BF(e){if(!e)return;const t=Vf(e),n=t[0],s=Fg(t[1]),i=Fg(t[2]);return e.a<255?`hsla(${n}, ${s}%, ${i}%, ${zs(e.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const Bg={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"},Vg={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:"
|
2024-03-21 02:03:08 -04:00
|
|
|
* Chart.js v4.4.1
|
|
|
|
* https://www.chartjs.org
|
|
|
|
* (c) 2023 Chart.js Contributors
|
|
|
|
* Released under the MIT License
|
2024-08-10 19:03:21 -04:00
|
|
|
*/function Fs(){}const KF=(()=>{let e=0;return()=>e++})();function ot(e){return e===null||typeof e>"u"}function vt(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 nt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function $t(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Pn(e,t){return $t(e)?e:t}function Ge(e,t){return typeof e>"u"?t:e}const qF=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,w0=(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(vt(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(nt(e))for(r=Object.keys(e),o=r.length,i=0;i<o;i++)t.call(n,e[r[i]],r[i])}function Mc(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 Dc(e){if(vt(e))return e.map(Dc);if(nt(e)){const t=Object.create(null),n=Object.keys(e),s=n.length;let i=0;for(;i<s;++i)t[n[i]]=Dc(e[n[i]]);return t}return e}function x0(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function GF(e,t,n,s){if(!x0(e))return;const i=t[e],o=n[e];nt(i)&&nt(o)?za(i,o,s):t[e]=Dc(o)}function za(e,t,n){const s=vt(t)?t:[t],i=s.length;if(!nt(e))return e;n=n||{};const o=n.merger||GF;let r;for(let a=0;a<i;++a){if(r=s[a],!nt(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 ka(e,t){return za(e,t,{merger:JF})}function JF(e,t,n){if(!x0(e))return;const s=t[e],i=n[e];nt(s)&&nt(i)?ka(s,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Dc(i))}const jg={"":e=>e,x:e=>e.x,y:e=>e.y};function XF(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 QF(e){const t=XF(e);return n=>{for(const s of t){if(s==="")break;n=n&&n[s]}return n}}function Li(e,t){return(jg[t]||(jg[t]=QF(t)))(e)}function Wf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ya=e=>typeof e<"u",Ni=e=>typeof e=="function",Wg=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function ZF(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const wt=Math.PI,yt=2*wt,eB=yt+wt,Oc=Number.POSITIVE_INFINITY,tB=wt/180,Rt=wt/2,oo=wt/4,zg=wt*2/3,ki=Math.log10,Cs=Math.sign;function Sa(e,t,n){return Math.abs(e-t)<n}function Yg(e){const t=Math.round(e);e=Sa(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(ki(e))),s=e/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function nB(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 Er(e){return!isNaN(parseFloat(e))&&isFinite(e)}function sB(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function k0(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 zf(e){return e*(180/wt)}function Ug(e){if(!$t(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function S0(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 rh(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function iB(e,t){return(e-t+eB)%yt-wt}function Mn(e){return(e%yt+yt)%yt}function Ua(e,t,n,s){const i=Mn(e),o=Mn(t),r=Mn(n),a=Mn(o-i),l=Mn(r-i),c=Mn(i-o),u=Mn(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 oB(e){return Qt(e,-32768,32767)}function Ks(e,t,n,s=1e-6){return e>=Math.min(t,n)-s&&e<=Math.max(t,n)+s}function Yf(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 qs=(e,t,n,s)=>Yf(e,n,s?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),rB=(e,t,n)=>Yf
|
2024-03-21 02:03:08 -04:00
|
|
|
* Chart.js v4.4.1
|
|
|
|
* https://www.chartjs.org
|
|
|
|
* (c) 2023 Chart.js Contributors
|
|
|
|
* Released under the MIT License
|
2024-08-10 19:03:21 -04:00
|
|
|
*/class u4{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=E0.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 Vs=new u4;const r_="transparent",d4={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const s=Jg(e||r_),i=s.valid&&Jg(t||r_);return i&&i.valid?i.mix(s,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class h4{constructor(t,n,s,i){const o=n[s];i=ra([t.to,i,o,t.from]);const r=ra([t.from,o,i]);this._active=!0,this._fn=t.fn||d4[t.type||typeof r],this._easing=Aa[t.easing]||Aa.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=ra([t.to,n,i,t.from]),this._from=ra([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 Y0{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!nt(t))return;const n=Object.keys(Et.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!nt(o))return;const r={};for(const a of n)r[a]=o[a];(vt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,n){const s=n.options,i=p4(t,s);if(!i)return[];const o=this._createAnimations(i,s);return s.$shared&&f4(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 h4(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size
|
2024-03-21 02:03:08 -04:00
|
|
|
`)>-1?e.split(`
|
2024-08-10 19:03:21 -04:00
|
|
|
`):e}function j6(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 z_(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,g=dn(t.padding);let _=g.height,v=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){v=Math.max(v,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(),v+=g.width,{width:v,height:_}}function W6(e,t){const{y:n,height:s}=t;return n<s/2?"top":n>e.height-s/2?"bottom":"center"}function z6(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 Y6(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"),z6(c,e,t,n)&&(c="center"),c}function Y_(e,t,n){const s=n.yAlign||t.yAlign||W6(e,n);return{xAlign:n.xAlign||t.xAlign||Y6(e,t,n,s),yAlign:s}}function U6(e,t){let{x:n,width:s}=e;return t==="right"?n-=s:t==="center"&&(n-=s/2),n}function K6(e,t,n){let{y:s,height:i}=e;return t==="top"?s+=n:t==="bottom"?s-=i+n:s-=i/2,s}function U_(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}=ko(r);let g=U6(t,a);const _=K6(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,f)+i:a==="right"&&(g+=Math.max(d,p)+i),{x:Qt(g,0,s.width-t.width),y:Qt(_,0,s.height-t.height)}}function ql(e,t,n){const s=dn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-s.right:e.x+s.left}function K_(e){return bs([],Hs(e))}function q6(e,t,n){return Yi(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 d1={beforeTitle:Fs,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:Fs,beforeBody:Fs,beforeLabel:Fs,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:Fs,afterBody:Fs,beforeFooter:Fs,footer:Fs,afterFooter:Fs};function Sn(e,t,n,s){const i=e[t].call(n,s);return typeof i>"u"?d1[t].call(n,s):i}class ph extends si{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
|
|
|
|
]))+`;Ds.KANJI=new RegExp(Xa,"g");Ds.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ds.BYTE=new RegExp(pj,"g");Ds.NUMERIC=new RegExp(I1,"g");Ds.ALPHANUMERIC=new RegExp(fj,"g");const mj=new RegExp("^"+Xa+"$"),gj=new RegExp("^"+I1+"$"),_j=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ds.testKanji=function(t){return mj.test(t)};Ds.testNumeric=function(t){return gj.test(t)};Ds.testAlphanumeric=function(t){return _j.test(t)};(function(e){const t=op,n=Ds;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}}})(Ki);(function(e){const t=Vn,n=xu,s=wu,i=Ki,o=op,r=7973,a=t.getBCHDigit(r);function l(f,p,g){for(let _=1;_<=40;_++)if(p<=e.getCapacity(_,g,f))return _}function c(f,p){return i.getCharCountIndicator(f,p)+4}function u(f,p){let g=0;return f.forEach(function(_){const v=c(_.mode,p);g+=v+_.getBitsLength()}),g}function d(f,p){for(let g=1;g<=40;g++)if(u(f,g)<=e.getCapacity(g,p,i.MIXED))return g}e.from=function(p,g){return o.isValid(p)?parseInt(p,10):g},e.getCapacity=function(p,g,_){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof _>"u"&&(_=i.BYTE);const v=t.getSymbolTotalCodewords(p),w=n.getTotalCodewordsCount(p,g),A=(v-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,g){let _;const v=s.from(g,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 g=p<<12;for(;t.getBCHDigit(g)-a>=0;)g^=r<<t.getBCHDigit(g)-a;return p<<12|g}})(O1);var R1={};const $h=Vn,L1=1335,bj=21522,db=$h.getBCHDigit(L1);R1.getEncodedBits=function(t,n){const s=t.bit<<3|n;let i=s<<10;for(;$h.getBCHDigit(i)-db>=0;)i^=L1<<$h.getBCHDigit(i)-db;return(s<<10|i)^bj};var N1={};const vj=Ki;function Tr(e){this.mode=vj.NUMERIC,this.data=e.toString()}Tr.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Tr.prototype.getLength=function(){return this.data.length};Tr.prototype.getBitsLength=function(){return Tr.getBitsLength(this.data.length)};Tr.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 yj=Tr;const wj=Ki,$d=["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 Mr(e){this.mode=wj.ALPHANUMERIC,this.data=e}Mr.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Mr.prototype.getLength=function(){return this.data.length};Mr.prototype.getBitsLength=function(){return Mr.getBitsLength(this.data.length)};Mr.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=$d.indexOf(this.data[n])*45;s+=$d.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put($d.indexOf(this.data[n]),6)};var xj
|
|
|
|
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var Pj=Or,F1={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,g,_,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],g=d+p,_=r[u],v=typeof r[u]>"u",(v||_>g)&&(r[u]=g,a.push(u,g),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})(F1);var Tj=F1.exports;(function(e){const t=Ki,n=yj,s=xj,i=$j,o=Pj,r=Ds,a=Vn,l=Tj;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,E){return x.index-E.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 g(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],E=[];for(let P=0;P<x.length;P++){const C=x[P],F=""+y+P;E.push(F),$[F]={node:C,lastCount:0},M[F]={};for(let G=0;G<k.length;G++){const re=k[G];$[re]&&$[re].node.mode===C.mode?(M[re][F]=f($[re].lastCount+C.length,C.mode)-f($[re].lastCount,C.mode),$[re].lastCount+=C.length):($[re]&&($[re].lastCount=C.length),M[re][F]=f(C.length,C.mode)+4+t.getCharCountIndicator(C.mode,A))}}k=E}for(let y=0;y<k.length;y++)M[k[y]].end=0;return{map:M,table:$}}function v(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(v(M,null)):M.data&&$.push(v(M.data,M.mode)),$},[])},e.fromString=function(A,$){const M=d(A,a.isKanjiModeEnabled()),k=g(M),y=_(k,$),x=l.find_path(y.map,"start","end"),E=[];for(let P=1;P<x.length-1;P++)E.push(y.table[x[P]].node);return e.fromArray(p(E))},e.rawSplit=function(A){return e.fromArray(d(A,a.isKanjiModeEnabled()))}})(N1);const Su=Vn,Ed=wu,Mj=cj,Dj=uj,Oj=C1,Ij=P1,Eh=T1,Ch=xu,Rj=hj,Hc=O1,Lj=R1,Nj=Ki,Cd=N1;function Fj(e,t){const n=e.size,s=Ij.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 Bj(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 Vj(e,t){const n=Oj.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 Hj(e,t){const n=e.size,s=Hc.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 Pd(e,t,n){const s=e.size,i=Lj.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 jj(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 Wj(e,t,n){const s=new Mj;n.forEach(function(l){s.put(l.mode.bit,4),s.put(l.getLength(),Nj.getCharCountIndicator(l.mode,e)),l.write(s)});const i=Su.getSymbolTotalCodewords(e),o=Ch.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 zj(s,e,t)}function zj(e,t,n){const s=Su.getSymbolTotalCodewords(t),i=Ch.getTotalCodewordsCount(t,n),o=s-i,r=Ch.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 Rj(f);let g=0;const _=new Array(r),v=new Array(r);let w=0;const A=new Uint8Array(e.buffer);for(let x=0;x<r;x++){const E=x<l?u:d;_[x]=A.slice(g,g+E),v[x]=p.encode(_[x]),g+=E,w=Math.max(w,E)}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++]=v[y][k];return $}function Yj(e,t,n,s){let i;if(Array.isArray(e))i=Cd.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const u=Cd.rawSplit(e);c=Hc.getBestVersionForData(u,n)}i=Cd.fromString(e,c||40)}else throw new Error("Invalid data");const o=Hc.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(`
|
2024-08-05 15:39:11 -04:00
|
|
|
The chosen QR Code version cannot contain this amount of data.
|
|
|
|
Minimum version required to store current data is: `+o+`.
|
2024-08-10 19:03:21 -04:00
|
|
|
`);const r=Wj(t,n,i),a=Su.getSymbolSize(t),l=new Dj(a);return Fj(l,t),Bj(l),Vj(l,t),Pd(l,n,0),t>=7&&Hj(l,t),jj(l,r),isNaN(s)&&(s=Eh.getBestMask(l,Pd.bind(null,l,n))),Eh.applyMask(s,l),Pd(l,n,s),{modules:l,version:t,errorCorrectionLevel:n,maskPattern:s,segments:i}}$1.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=Ed.M,i,o;return typeof n<"u"&&(s=Ed.from(n.errorCorrectionLevel,Ed.M),i=Hc.from(n.version),o=Eh.from(n.maskPattern),n.toSJISFunc&&Su.setToSJISFunction(n.toSJISFunc)),Yj(t,i,s,o)};var B1={},rp={};(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 g=(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),w=Math.floor((p-u)/l);_=d[a[v*r+w]?1:0]}s[g++]=_.r,s[g++]=_.g,s[g++]=_.b,s[g]=_.a}}})(rp);(function(e){const t=rp;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)}})(B1);var V1={};const Uj=rp;function hb(e,t){const n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function Td(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}function Kj(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?Td("M",l+n,.5+c+n):Td("m",i,0),i=0,o=!1),l+1<t&&e[a+1]||(s+=Td("h",r),r=0)):i++}return s}V1.render=function(t,n,s){const i=Uj.getOptions(n),o=t.modules.size,r=t.modules.data,a=o+i.margin*2,l=i.color.light.a?"<path "+hb(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+hb(i.color.dark,"stroke")+' d="'+Kj(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 qj=aj,Ph=$1,H1=B1,Gj=V1;function ap(e,t,n,s,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!qj())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=Ph.create(n,s);l(e(u,t,s))}catch(u){c(u)}})}try{const l=Ph.create(n,s);i(null,e(l,t,s))}catch(l){i(l)}}No.create=Ph.create;No.toCanvas=ap.bind(null,H1.render);No.toDataURL=ap.bind(null,H1.renderToDataURL);No.toString=ap.bind(null,function(e,t,n){return Gj.render(e,n)});const Jj={name:"peerQRCode",props:{peerConfigData:String},mounted(){No.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,e=>{e&&console.error(e)})}},Xj={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},Qj={class:"container d-flex h-100 w-100"},Zj={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},eW={class:"card rounded-3 shadow"},tW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},nW=h("h4",{class:"mb-0"},"QR Code",-1),sW={class:"card-body"},iW={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function oW(e,t,n,s,i,o){return R(),B("div",Xj,[h("div",Qj,[h("div",Zj,[h("div",eW,[h("div",tW,[nW,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=r=>this.$emit("close"))})]),h("div",sW,[h("canvas",iW,null,512)])])])])])}const rW=ze(Jj,[["render",oW]]),aW={name:"nameInput",props:{bulk:Boolean,data:Object,saving:Boolean}},lW=h("label",{for:"peer_name_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Name")],-1),cW=["disabled"];function uW(e,t,n,s,i,o){return R(),B("div",{class:Ce({inactiveField:this.bulk})},[lW,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,cW),[[We,this.data.name]])],2)}const dW=ze(aW,[["render",uW]]),hW={name:"privatePublicKeyInput",props:{data:Object,saving:Boolean,bulk:Boolean},setup(){return{dashboardStore:st()}},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()}}}},fW=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),pW={class:"input-group"},mW=["disabled"],gW=["disabled"],_W=h("i",{class:"bi bi-arrow-repeat"},null,-1),bW=[_W],vW={class:"d-flex"},yW=h("label",{for:"public_key",class:"form-label"},[h("small",{class:"text-muted"},[ye("Public Key "),h("code",null,"(Required)")])],-1),wW={class:"form-check form-switch ms-auto"},xW=["disabled"],kW=h("label",{class:"form-check-label",for:"enablePublicKeyEdit"},[h("small",null,"Edit")],-1),SW=["disabled"];function AW(e,t,n,s,i,o){return R(),B("div",{class:Ce(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[h("div",null,[fW,h("div",pW,[Re(h("input",{type:"text",class:Ce(["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,mW),[
|
|
|
|
${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,In().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,In().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 Fr(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.
|