diff --git a/src/static/app/index.html b/src/static/app/index.html
index 15c6c172..afa86e31 100644
--- a/src/static/app/index.html
+++ b/src/static/app/index.html
@@ -10,20 +10,13 @@
WGDashboard
+
diff --git a/src/static/app/src/utilities/fetch.js b/src/static/app/src/utilities/fetch.js
index a2c45f90..51f4e947 100644
--- a/src/static/app/src/utilities/fetch.js
+++ b/src/static/app/src/utilities/fetch.js
@@ -30,8 +30,8 @@ export const getUrl = (url) => {
if (import.meta.env.MODE === 'development') {
return url;
}
- const appPrefix = window.APP_PREFIX || '';
- return `${window.location.protocol}//${window.location.host}${appPrefix}${url}`;
+ // const appPrefix = window.APP_PREFIX || '';
+ return `./.${url}`;
}
export const fetchGet = async (url, params=undefined, callback=undefined) => {
diff --git a/src/static/dist/WGDashboardAdmin/assets/DashboardClientAssignmentStore-aB7p_aSe.js b/src/static/dist/WGDashboardAdmin/assets/DashboardClientAssignmentStore-c-G-fTFK.js
similarity index 95%
rename from src/static/dist/WGDashboardAdmin/assets/DashboardClientAssignmentStore-aB7p_aSe.js
rename to src/static/dist/WGDashboardAdmin/assets/DashboardClientAssignmentStore-c-G-fTFK.js
index 4e2cce87..713377b1 100644
--- a/src/static/dist/WGDashboardAdmin/assets/DashboardClientAssignmentStore-aB7p_aSe.js
+++ b/src/static/dist/WGDashboardAdmin/assets/DashboardClientAssignmentStore-c-G-fTFK.js
@@ -1 +1 @@
-import{a5 as A,r as n,D as S,g as l,z as v}from"./index-DW-_CXHM.js";const b=A("DashboardClientAssignmentStore",()=>{const f=n({}),d=n([]),o=n({}),c=n([]),g=n(!1),r=n(""),i=S(),w=async()=>{await l("/api/clients/allClients",{},s=>{o.value=s.data})},y=async()=>{await l("/api/clients/allClientsRaw",{},s=>{c.value=s.data,console.log(c.value)})},m=s=>Object.values(o.value).flat().find(e=>e.ClientID===s),u=async(s,e)=>{await l("/api/clients/assignedClients",{ConfigurationName:s,Peer:e},a=>{d.value=a.data})};return{assignments:d,getAssignedClients:u,getClients:w,getClientsRaw:y,clients:o,unassignClient:async(s,e,a)=>{g.value=!0,await v("/api/clients/unassignClient",{AssignmentID:a},async t=>{t.status?(i.newMessage("Server","Unassign successfully!","success"),s&&e&&await u(s,e)):(i.newMessage("Server","Unassign Failed. Reason: "+t.message,"success"),console.error("Unassign Failed. Reason: "+t.message)),g.value=!1})},assignClient:async(s,e,a,t=!0)=>{r.value=a,await v("/api/clients/assignClient",{ConfigurationName:s,Peer:e,ClientID:a},async C=>{C.status?(i.newMessage("Server","Assign successfully!","success"),t&&await u(s,e)):(i.newMessage("Server","Assign Failed. Reason: "+C.message,"success"),console.error("Assign Failed. Reason: "+C.message)),r.value=""})},getClientById:m,unassigning:g,assigning:r,clientsRaw:c,allConfigurationsPeers:f,getAllConfigurationsPeers:async()=>{await l("/api/clients/allConfigurationsPeers",{},s=>{f.value=s.data})}}});export{b as D};
+import{a5 as A,r as n,D as S,g as l,z as v}from"./index-BCe-EVqv.js";const b=A("DashboardClientAssignmentStore",()=>{const f=n({}),d=n([]),o=n({}),c=n([]),g=n(!1),r=n(""),i=S(),w=async()=>{await l("/api/clients/allClients",{},s=>{o.value=s.data})},y=async()=>{await l("/api/clients/allClientsRaw",{},s=>{c.value=s.data,console.log(c.value)})},m=s=>Object.values(o.value).flat().find(e=>e.ClientID===s),u=async(s,e)=>{await l("/api/clients/assignedClients",{ConfigurationName:s,Peer:e},a=>{d.value=a.data})};return{assignments:d,getAssignedClients:u,getClients:w,getClientsRaw:y,clients:o,unassignClient:async(s,e,a)=>{g.value=!0,await v("/api/clients/unassignClient",{AssignmentID:a},async t=>{t.status?(i.newMessage("Server","Unassign successfully!","success"),s&&e&&await u(s,e)):(i.newMessage("Server","Unassign Failed. Reason: "+t.message,"success"),console.error("Unassign Failed. Reason: "+t.message)),g.value=!1})},assignClient:async(s,e,a,t=!0)=>{r.value=a,await v("/api/clients/assignClient",{ConfigurationName:s,Peer:e,ClientID:a},async C=>{C.status?(i.newMessage("Server","Assign successfully!","success"),t&&await u(s,e)):(i.newMessage("Server","Assign Failed. Reason: "+C.message,"success"),console.error("Assign Failed. Reason: "+C.message)),r.value=""})},getClientById:m,unassigning:g,assigning:r,clientsRaw:c,allConfigurationsPeers:f,getAllConfigurationsPeers:async()=>{await l("/api/clients/allConfigurationsPeers",{},s=>{f.value=s.data})}}});export{b as D};
diff --git a/src/static/dist/WGDashboardAdmin/assets/browser-B2j17eoG.js b/src/static/dist/WGDashboardAdmin/assets/browser-gQUFp51v.js
similarity index 99%
rename from src/static/dist/WGDashboardAdmin/assets/browser-B2j17eoG.js
rename to src/static/dist/WGDashboardAdmin/assets/browser-gQUFp51v.js
index 5b21e776..1a7bc4cb 100644
--- a/src/static/dist/WGDashboardAdmin/assets/browser-B2j17eoG.js
+++ b/src/static/dist/WGDashboardAdmin/assets/browser-gQUFp51v.js
@@ -1,4 +1,4 @@
-import{O as te}from"./index-DW-_CXHM.js";import{r as ee}from"./galois-field-I2lBzzs-.js";var z={},Q,Bt;function ne(){return Bt||(Bt=1,Q=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Q}var G={},U={},pt;function _(){if(pt)return U;pt=1;let r;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},U.getSymbolTotalCodewords=function(n){return o[n]},U.getBCHDigit=function(i){let n=0;for(;i!==0;)n++,i>>>=1;return n},U.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');r=n},U.isKanjiModeEnabled=function(){return typeof r<"u"},U.toSJIS=function(n){return r(n)},U}var $={},Rt;function wt(){return Rt||(Rt=1,(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+i)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,t){if(r.isValid(n))return n;try{return o(n)}catch{return t}}})($)),$}var W,At;function re(){if(At)return W;At=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let n=0;n>>i-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},W=r,W}var Z,It;function oe(){if(It)return Z;It=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,i,n,t){const e=o*this.size+i;this.data[e]=n,t&&(this.reservedBit[e]=!0)},r.prototype.get=function(o,i){return this.data[o*this.size+i]},r.prototype.xor=function(o,i,n){this.data[o*this.size+i]^=n},r.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},Z=r,Z}var X={},Nt;function ie(){return Nt||(Nt=1,(function(r){const o=_().getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const t=Math.floor(n/7)+2,e=o(n),s=e===145?26:Math.ceil((e-13)/(2*t-2))*2,a=[e-7];for(let u=1;u=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const e=t.size;let s=0,a=0,u=0,c=null,d=null;for(let B=0;B=5&&(s+=o.N1+(a-5)),c=f,a=1),f=t.get(h,B),f===d?u++:(u>=5&&(s+=o.N1+(u-5)),d=f,u=1)}a>=5&&(s+=o.N1+(a-5)),u>=5&&(s+=o.N1+(u-5))}return s},r.getPenaltyN2=function(t){const e=t.size;let s=0;for(let a=0;a=10&&(a===1488||a===93)&&s++,u=u<<1&2047|t.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*o.N3},r.getPenaltyN4=function(t){let e=0;const s=t.data.length;for(let u=0;u=0;){const s=e[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(e,s),a}return e},nt=o,nt}var rt={},ot={},it={},Lt;function Gt(){return Lt||(Lt=1,it.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),it}var L={},Dt;function $t(){if(Dt)return L;Dt=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
+import{O as te}from"./index-BCe-EVqv.js";import{r as ee}from"./galois-field-I2lBzzs-.js";var z={},Q,Bt;function ne(){return Bt||(Bt=1,Q=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Q}var G={},U={},pt;function _(){if(pt)return U;pt=1;let r;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},U.getSymbolTotalCodewords=function(n){return o[n]},U.getBCHDigit=function(i){let n=0;for(;i!==0;)n++,i>>>=1;return n},U.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');r=n},U.isKanjiModeEnabled=function(){return typeof r<"u"},U.toSJIS=function(n){return r(n)},U}var $={},Rt;function wt(){return Rt||(Rt=1,(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+i)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,t){if(r.isValid(n))return n;try{return o(n)}catch{return t}}})($)),$}var W,At;function re(){if(At)return W;At=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let n=0;n>>i-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},W=r,W}var Z,It;function oe(){if(It)return Z;It=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,i,n,t){const e=o*this.size+i;this.data[e]=n,t&&(this.reservedBit[e]=!0)},r.prototype.get=function(o,i){return this.data[o*this.size+i]},r.prototype.xor=function(o,i,n){this.data[o*this.size+i]^=n},r.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},Z=r,Z}var X={},Nt;function ie(){return Nt||(Nt=1,(function(r){const o=_().getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const t=Math.floor(n/7)+2,e=o(n),s=e===145?26:Math.ceil((e-13)/(2*t-2))*2,a=[e-7];for(let u=1;u=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const e=t.size;let s=0,a=0,u=0,c=null,d=null;for(let B=0;B=5&&(s+=o.N1+(a-5)),c=f,a=1),f=t.get(h,B),f===d?u++:(u>=5&&(s+=o.N1+(u-5)),d=f,u=1)}a>=5&&(s+=o.N1+(a-5)),u>=5&&(s+=o.N1+(u-5))}return s},r.getPenaltyN2=function(t){const e=t.size;let s=0;for(let a=0;a=10&&(a===1488||a===93)&&s++,u=u<<1&2047|t.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*o.N3},r.getPenaltyN4=function(t){let e=0;const s=t.data.length;for(let u=0;u=0;){const s=e[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(e,s),a}return e},nt=o,nt}var rt={},ot={},it={},Lt;function Gt(){return Lt||(Lt=1,it.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),it}var L={},Dt;function $t(){if(Dt)return L;Dt=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
]))+`;L.KANJI=new RegExp(i,"g"),L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),L.BYTE=new RegExp(n,"g"),L.NUMERIC=new RegExp(r,"g"),L.ALPHANUMERIC=new RegExp(o,"g");const t=new RegExp("^"+i+"$"),e=new RegExp("^"+r+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return L.testKanji=function(u){return t.test(u)},L.testNumeric=function(u){return e.test(u)},L.testAlphanumeric=function(u){return s.test(u)},L}var qt;function F(){return qt||(qt=1,(function(r){const o=Gt(),i=$t();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(e,s){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!o.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?e.ccBits[0]:s<27?e.ccBits[1]:e.ccBits[2]},r.getBestModeForData=function(e){return i.testNumeric(e)?r.NUMERIC:i.testAlphanumeric(e)?r.ALPHANUMERIC:i.testKanji(e)?r.KANJI:r.BYTE},r.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},r.isValid=function(e){return e&&e.bit&&e.ccBits};function n(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}r.from=function(e,s){if(r.isValid(e))return e;try{return n(e)}catch{return s}}})(ot)),ot}var vt;function fe(){return vt||(vt=1,(function(r){const o=_(),i=Qt(),n=wt(),t=F(),e=Gt(),s=7973,a=o.getBCHDigit(s);function u(h,f,T){for(let M=1;M<=40;M++)if(f<=r.getCapacity(M,T,h))return M}function c(h,f){return t.getCharCountIndicator(h,f)+4}function d(h,f){let T=0;return h.forEach(function(M){const S=c(M.mode,f);T+=S+M.getBitsLength()}),T}function B(h,f){for(let T=1;T<=40;T++)if(d(h,T)<=r.getCapacity(T,f,t.MIXED))return T}r.from=function(f,T){return e.isValid(f)?parseInt(f,10):T},r.getCapacity=function(f,T,M){if(!e.isValid(f))throw new Error("Invalid QR Code version");typeof M>"u"&&(M=t.BYTE);const S=o.getSymbolTotalCodewords(f),A=i.getTotalCodewordsCount(f,T),P=(S-A)*8;if(M===t.MIXED)return P;const I=P-c(M,f);switch(M){case t.NUMERIC:return Math.floor(I/10*3);case t.ALPHANUMERIC:return Math.floor(I/11*2);case t.KANJI:return Math.floor(I/13);case t.BYTE:default:return Math.floor(I/8)}},r.getBestVersionForData=function(f,T){let M;const S=n.from(T,n.M);if(Array.isArray(f)){if(f.length>1)return B(f,S);if(f.length===0)return 1;M=f[0]}else M=f;return u(M.mode,M.getLength(),S)},r.getEncodedBits=function(f){if(!e.isValid(f)||f<7)throw new Error("Invalid QR Code version");let T=f<<12;for(;o.getBCHDigit(T)-a>=0;)T^=s<=0;)u^=o<0&&(e=this.data.substr(t),s=parseInt(e,10),n.put(s,a*3+1))},at=o,at}var ct,Ft;function ge(){if(Ft)return ct;Ft=1;const r=F(),o=["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 i(n){this.mode=r.ALPHANUMERIC,this.data=n}return i.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let s=o.indexOf(this.data[e])*45;s+=o.indexOf(this.data[e+1]),t.put(s,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},ct=i,ct}var ft,kt;function he(){if(kt)return ft;kt=1;const r=F();function o(i){this.mode=r.BYTE,typeof i=="string"?this.data=new TextEncoder().encode(i):this.data=new Uint8Array(i)}return o.getBitsLength=function(n){return n*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(i){for(let n=0,t=this.data.length;n=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),n.put(e,13)}},lt=i,lt}var dt={exports:{}},Vt;function we(){return Vt||(Vt=1,(function(r){var o={single_source_shortest_paths:function(i,n,t){var e={},s={};s[n]=0;var a=o.PriorityQueue.make();a.push(n,0);for(var u,c,d,B,h,f,T,M,S;!a.empty();){u=a.pop(),c=u.value,B=u.cost,h=i[c]||{};for(d in h)h.hasOwnProperty(d)&&(f=h[d],T=B+f,M=s[d],S=typeof s[d]>"u",(S||M>T)&&(s[d]=T,a.push(d,T),e[d]=c))}if(typeof t<"u"&&typeof s[t]>"u"){var A=["Could not find a path from ",n," to ",t,"."].join("");throw new Error(A)}return e},extract_shortest_path_from_predecessor_list:function(i,n){for(var t=[],e=n;e;)t.push(e),i[e],e=i[e];return t.reverse(),t},find_path:function(i,n,t){var e=o.single_source_shortest_paths(i,n,t);return o.extract_shortest_path_from_predecessor_list(e,t)},PriorityQueue:{make:function(i){var n=o.PriorityQueue,t={},e;i=i||{};for(e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t.queue=[],t.sorter=i.sorter||n.default_sorter,t},default_sorter:function(i,n){return i.cost-n.cost},push:function(i,n){var t={value:i,cost:n};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=o})(dt)),dt.exports}var Kt;function Ce(){return Kt||(Kt=1,(function(r){const o=F(),i=de(),n=ge(),t=he(),e=me(),s=$t(),a=_(),u=we();function c(A){return unescape(encodeURIComponent(A)).length}function d(A,P,I){const p=[];let b;for(;(b=A.exec(I))!==null;)p.push({data:b[0],index:b.index,mode:P,length:b[0].length});return p}function B(A){const P=d(s.NUMERIC,o.NUMERIC,A),I=d(s.ALPHANUMERIC,o.ALPHANUMERIC,A);let p,b;return a.isKanjiModeEnabled()?(p=d(s.BYTE,o.BYTE,A),b=d(s.KANJI,o.KANJI,A)):(p=d(s.BYTE_KANJI,o.BYTE,A),b=[]),P.concat(I,p,b).sort(function(y,C){return y.index-C.index}).map(function(y){return{data:y.data,mode:y.mode,length:y.length}})}function h(A,P){switch(P){case o.NUMERIC:return i.getBitsLength(A);case o.ALPHANUMERIC:return n.getBitsLength(A);case o.KANJI:return e.getBitsLength(A);case o.BYTE:return t.getBitsLength(A)}}function f(A){return A.reduce(function(P,I){const p=P.length-1>=0?P[P.length-1]:null;return p&&p.mode===I.mode?(P[P.length-1].data+=I.data,P):(P.push(I),P)},[])}function T(A){const P=[];for(let I=0;I=0&&w<=6&&(N===0||N===6)||N>=0&&N<=6&&(w===0||w===6)||w>=2&&w<=4&&N>=2&&N<=4?g.set(m+w,E+N,!0,!0):g.set(m+w,E+N,!1,!0))}}function T(g){const y=g.size;for(let C=8;C>w&1)===1,g.set(R,m,E,!0),g.set(m,R,E,!0)}function A(g,y,C){const l=g.size,R=d.getEncodedBits(y,C);let m,E;for(m=0;m<15;m++)E=(R>>m&1)===1,m<6?g.set(m,8,E,!0):m<8?g.set(m+1,8,E,!0):g.set(l-15+m,8,E,!0),m<8?g.set(8,l-m-1,E,!0):m<9?g.set(8,15-m-1+1,E,!0):g.set(8,15-m-1,E,!0);g.set(l-8,8,1,!0)}function P(g,y){const C=g.size;let l=-1,R=C-1,m=7,E=0;for(let w=C-1;w>0;w-=2)for(w===6&&w--;;){for(let N=0;N<2;N++)if(!g.isReserved(R,w-N)){let v=!1;E>>m&1)===1),g.set(R,w-N,v),m--,m===-1&&(E++,m=7)}if(R+=l,R<0||C<=R){R-=l,l=-l;break}}}function I(g,y,C){const l=new i;C.forEach(function(N){l.put(N.mode.bit,4),l.put(N.getLength(),B.getCharCountIndicator(N.mode,g)),N.write(l)});const R=r.getSymbolTotalCodewords(g),m=a.getTotalCodewordsCount(g,y),E=(R-m)*8;for(l.getLengthInBits()+4<=E&&l.put(0,4);l.getLengthInBits()%8!==0;)l.putBit(0);const w=(E-l.getLengthInBits())/8;for(let N=0;Na.clientAssignedPeers&&Object.keys(a.clientAssignedPeers).includes(a.configuration)?a.peers.filter(n=>!a.clientAssignedPeers[a.configuration].map(t=>t.id).includes(n.id)&&(!a.availablePeerSearchString||a.availablePeerSearchString&&(n.id.includes(a.availablePeerSearchString)||n.name.includes(a.availablePeerSearchString)))):a.availablePeerSearchString?a.peers.filter(n=>n.id.includes(a.availablePeerSearchString)||n.name.includes(a.availablePeerSearchString)):a.peers),p=h(!1),v=h(!1);return(n,t)=>{const g=M("RouterLink");return l(),i("div",Y,[e("div",{onClick:t[0]||(t[0]=s=>v.value=!v.value),role:"button",class:"card-header rounded-0 sticky-top bg-body-secondary border-0 border-bottom text-white d-flex"},[e("small",null,[e("samp",null,x(c.configuration),1)]),e("a",Q,[v.value?(l(),i("i",X)):(l(),i("i",Z))])]),v.value?_("",!0):(l(),i("div",ee,[e("div",se,[(l(!0),i(C,null,N(b.value,s=>(l(),i("div",{class:"list-group-item d-flex border-bottom list-group-item-action d-flex align-items-center gap-3",key:s.id},[p.value?(l(),i("div",ie,[e("small",ae,[o(r,{t:"Are you sure to remove this peer?"})]),t[2]||(t[2]=e("br",null,null,-1)),e("small",oe,[e("samp",null,x(s.id),1)])])):(l(),i("div",te,[e("small",le,[o(g,{class:"text-decoration-none",target:"_blank",to:"/configuration/"+c.configuration+"/peers?id="+encodeURIComponent(s.id)},{default:B(()=>[e("samp",null,x(s.id),1)]),_:2},1032,["to"])]),t[1]||(t[1]=e("br",null,null,-1)),e("small",ne,x(s.name?s.name:"Untitled Peer"),1)])),c.clientAssignedPeers?(l(),i("button",{key:2,onClick:m=>f("assign",s.id),class:L([{disabled:w(d).assigning},"btn bg-success-subtle text-success-emphasis ms-auto"])},[...t[3]||(t[3]=[e("i",{class:"bi bi-plus-circle-fill"},null,-1)])],10,re)):(l(),i("button",{key:3,onClick:m=>f("unassign",s.assignment_id),class:L([{disabled:w(d).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"]),"aria-label":"Delete Assignment"},[...t[4]||(t[4]=[e("i",{class:"bi bi-trash-fill"},null,-1)])],10,de))]))),128))])]))])}}}),ce={key:0,class:"d-flex rounded-0 border-0 flex-column d-flex flex-column border-bottom pb-1"},ue={class:"d-flex flex-column p-3 gap-3"},me={class:"d-flex align-items-center"},be={class:"mb-0"},ge={class:"text-bg-primary badge ms-2"},ve={class:"text-bg-info badge ms-2"},fe={class:"rounded-3 availablePeers border h-100 overflow-scroll flex-grow-1 d-flex flex-column"},pe={key:0,class:"text-muted m-auto p-3"},he={key:0,style:{height:"500px"},class:"d-flex flex-column p-3"},xe={class:"availablePeers border h-100 card rounded-3"},ye={class:"card-header sticky-top p-3"},_e={class:"mb-0 d-flex align-items-center"},ke={class:"card-body p-0 overflow-scroll"},Ce={key:0,class:"text-muted m-auto"},Pe={class:"card-footer d-flex gap-2 p-3 align-items-center justify-content-end"},Se={key:1},$e=D({__name:"clientAssignedPeers",props:["client","clientAssignedPeers"],emits:["refresh"],setup(c,{emit:k}){const a=c,f=h(!1),d=j(),b=h(!1),p=k,v=async(g,s,m)=>{await d.assignClient(g,s,m,!1),p("refresh")},n=async g=>{await d.unassignClient(void 0,void 0,g),p("refresh")},t=h("");return(g,s)=>(l(),i("div",null,[f.value?(l(),i("div",Se,[...s[6]||(s[6]=[e("div",{class:"p-3 placeholder-glow border-bottom"},[e("h6",{class:"placeholder w-100 rounded-3"}),e("div",{class:"placeholder w-100 rounded-3",style:{height:"400px"}})],-1)])])):(l(),i("div",ce,[e("div",ue,[e("div",me,[e("h6",be,[o(r,{t:"Assigned Peers"}),e("span",ge,[I(x(Object.keys(c.clientAssignedPeers).length)+" ",1),o(r,{t:Object.keys(c.clientAssignedPeers).length>1?"Configurations":"Configuration"},null,8,["t"])]),e("span",ve,[I(x(Object.values(c.clientAssignedPeers).flat().length)+" ",1),o(r,{t:Object.values(c.clientAssignedPeers).flat().length>1?"Peers":"Peer"},null,8,["t"])])]),e("button",{class:"btn btn-sm bg-primary-subtle text-primary-emphasis rounded-3 ms-auto",onClick:s[0]||(s[0]=m=>b.value=!b.value)},[b.value?(l(),i(C,{key:1},[s[4]||(s[4]=e("i",{class:"bi bi-check me-2"},null,-1)),o(r,{t:"Done"})],64)):(l(),i(C,{key:0},[s[3]||(s[3]=e("i",{class:"bi bi-list-check me-2"},null,-1)),o(r,{t:"Manage"})],64))])]),e("div",fe,[(l(!0),i(C,null,N(c.clientAssignedPeers,(m,y)=>(l(),A(R,{configuration:y,peers:m,onUnassign:s[1]||(s[1]=async P=>await n(P))},null,8,["configuration","peers"]))),256)),Object.keys(c.clientAssignedPeers).length===0?(l(),i("h6",pe,[o(r,{t:"No peer assigned to this client"})])):_("",!0)])]),b.value?(l(),i("div",he,[e("div",xe,[e("div",ye,[e("h6",_e,[o(r,{t:"Available Peers"})])]),e("div",ke,[(l(!0),i(C,null,N(w(d).allConfigurationsPeers,(m,y)=>(l(),A(R,{availablePeerSearchString:t.value,configuration:y,clientAssignedPeers:c.clientAssignedPeers,peers:m,key:y,onAssign:async P=>await v(y,P,a.client.ClientID)},null,8,["availablePeerSearchString","configuration","clientAssignedPeers","peers","onAssign"]))),128)),Object.keys(w(d).allConfigurationsPeers).length===0?(l(),i("h6",Ce,[o(r,{t:"No peer is available to assign"})])):_("",!0)]),e("div",Pe,[s[5]||(s[5]=e("label",{for:"availablePeerSearchString"},[e("i",{class:"bi bi-search me-2"})],-1)),O(e("input",{id:"availablePeerSearchString","onUpdate:modelValue":s[2]||(s[2]=m=>t.value=m),class:"form-control form-control-sm rounded-3 w-auto",type:"text"},null,512),[[U,t.value]])])])])):_("",!0)]))]))}}),we={class:"p-3 d-flex gap-3 flex-column border-bottom"},Ae={class:"d-flex align-items-center gap-2"},De={class:"mb-0"},Ne=D({__name:"clientDelete",props:["client"],emits:["refresh"],setup(c,{emit:k}){const a=c,f=h(!1),d=h(!1),b=k,p=E(),v=async()=>{f.value=!0,await z("/api/clients/deleteClient",{ClientID:a.client.ClientID},n=>{f.value=!1,n.status?(b("deleteSuccess"),p.newMessage("Server","Delete client successfully","success")):p.newMessage("Server","Failed to delete client","danger")})};return(n,t)=>(l(),i("div",we,[e("div",Ae,[e("h6",De,[d.value?(l(),A(r,{key:1,t:"Are you sure to delete this client?"})):(l(),A(r,{key:0,t:"Delete Client"}))]),d.value?_("",!0):(l(),i("button",{key:0,class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3 ms-auto",onClick:t[0]||(t[0]=g=>d.value=!0)},[t[2]||(t[2]=e("i",{class:"bi bi-trash-fill me-2"},null,-1)),o(r,{t:"Delete"})])),d.value?(l(),i(C,{key:1},[e("button",{onClick:v,class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3 ms-auto"},[t[3]||(t[3]=e("i",{class:"bi bi-trash-fill me-2"},null,-1)),o(r,{t:"Yes"})]),d.value?(l(),i("button",{key:0,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:t[1]||(t[1]=g=>d.value=!1)},[t[4]||(t[4]=e("i",{class:"bi bi-x-lg me-2"},null,-1)),o(r,{t:"No"})])):_("",!0)],64)):_("",!0)])]))}}),Ie={class:"p-4 border-bottom bg-body-tertiary z-0"},je={class:"mb-3 backLink"},Le={class:"text-muted"},Re={class:"d-flex flex-column gap-2"},Ve={class:"d-flex align-items-center"},Be={class:"text-muted"},Me={class:"ms-auto"},Oe={class:"d-flex align-items-center gap-2"},Ue={class:"text-muted"},Ee={style:{flex:"1 0 0","overflow-y":"scroll"}},ze={key:1,class:"d-flex w-100 h-100 text-muted"},Fe={class:"m-auto text-center"},Ge=D({__name:"clientViewer",emits:["deleteSuccess"],async setup(c,{emit:k}){let a,f;const d=j(),b=E(),p=G(),v=J(),n=V(()=>d.getClientById(p.params.id)),t=h({}),g=async()=>{await K("/api/clients/assignedPeers",{ClientID:n.value.ClientID},S=>{t.value=S.data})},s=T({Name:void 0});n.value?(q(()=>n.value.ClientID,async()=>{s.Name=n.value.Name,await g()}),[a,f]=H(()=>g()),await a,f(),s.Name=n.value.Name):(v.push("/clients"),b.newMessage("WGDashboard","Client does not exist","danger"));const m=h(!1),y=async()=>{m.value=!0,await z("/api/clients/updateProfileName",{ClientID:n.value.ClientID,Name:s.Name},S=>{S.status?(n.value.Name=s.Name,b.newMessage("Server","Client name update success","success")):(s.Name=n.value.Name,b.newMessage("Server","Client name update failed","danger")),m.value=!1})},P=async()=>{await v.push("/clients"),await d.getClients()};return(S,u)=>{const F=M("RouterLink");return n.value?(l(),i("div",{class:"text-body d-flex flex-column overflow-y-scroll h-100",key:n.value.ClientID},[e("div",Ie,[e("div",je,[o(F,{to:"/clients",class:"text-body text-decoration-none"},{default:B(()=>[...u[4]||(u[4]=[e("i",{class:"bi bi-arrow-left me-2"},null,-1),I(" Back",-1)])]),_:1})]),e("small",Le,[o(r,{t:"Email"})]),e("h1",null,x(n.value.Email),1),e("div",Re,[e("div",Ve,[e("small",Be,[o(r,{t:"Client ID"})]),e("small",Me,[e("samp",null,x(n.value.ClientID),1)])]),e("div",Oe,[e("small",Ue,[o(r,{t:"Client Name"})]),O(e("input",{class:"form-control form-control-sm rounded-3 ms-auto",style:{width:"300px"},type:"text","onUpdate:modelValue":u[0]||(u[0]=$=>s.Name=$)},null,512),[[U,s.Name]]),e("button",{onClick:u[1]||(u[1]=$=>y()),"aria-label":"Save Client Name",class:"btn btn-sm rounded-3 bg-success-subtle border-success-subtle text-success-emphasis"},[...u[5]||(u[5]=[e("i",{class:"bi bi-save-fill"},null,-1)])])])])]),e("div",Ee,[o($e,{onRefresh:u[2]||(u[2]=$=>g()),clientAssignedPeers:t.value,client:n.value},null,8,["clientAssignedPeers","client"]),o(Ne,{onDeleteSuccess:u[3]||(u[3]=$=>P()),client:n.value},null,8,["client"])])])):(l(),i("div",ze,[e("div",Fe,[u[6]||(u[6]=e("h1",null,[e("i",{class:"bi bi-person-x"})],-1)),e("p",null,[o(r,{t:"Client does not exist"})])])]))}}}),Je=W(Ge,[["__scopeId","data-v-f874264d"]]);export{Je as default};
+import{B as D,q as V,r as h,c as i,a as e,d as _,t as x,F as C,i as N,b as o,w as B,h as M,n as L,u as w,f as l,e as I,m as O,y as U,j as A,D as E,z,L as G,J as T,H as q,E as H,K as J,g as K,_ as W}from"./index-BCe-EVqv.js";import{D as j}from"./DashboardClientAssignmentStore-c-G-fTFK.js";import{L as r}from"./localeText-fe5sRLWX.js";const Y={class:"card rounded-0 border-0"},Q={role:"button",class:"ms-auto text-white"},X={key:0,class:"bi bi-chevron-compact-down"},Z={key:1,class:"bi bi-chevron-compact-up"},ee={key:0,class:"card-body p-0"},se={class:"list-group list-group-flush"},te={key:0},le={class:"text-body"},ne={class:"text-muted"},ie={key:1},ae={class:"text-body"},oe={class:"text-muted"},re=["onClick"],de=["onClick"],R=D({__name:"availablePeersGroup",props:["configuration","peers","clientAssignedPeers","availablePeerSearchString"],emits:["assign","unassign"],setup(c,{emit:k}){const a=c,f=k,d=j(),b=V(()=>a.clientAssignedPeers&&Object.keys(a.clientAssignedPeers).includes(a.configuration)?a.peers.filter(n=>!a.clientAssignedPeers[a.configuration].map(t=>t.id).includes(n.id)&&(!a.availablePeerSearchString||a.availablePeerSearchString&&(n.id.includes(a.availablePeerSearchString)||n.name.includes(a.availablePeerSearchString)))):a.availablePeerSearchString?a.peers.filter(n=>n.id.includes(a.availablePeerSearchString)||n.name.includes(a.availablePeerSearchString)):a.peers),p=h(!1),v=h(!1);return(n,t)=>{const g=M("RouterLink");return l(),i("div",Y,[e("div",{onClick:t[0]||(t[0]=s=>v.value=!v.value),role:"button",class:"card-header rounded-0 sticky-top bg-body-secondary border-0 border-bottom text-white d-flex"},[e("small",null,[e("samp",null,x(c.configuration),1)]),e("a",Q,[v.value?(l(),i("i",X)):(l(),i("i",Z))])]),v.value?_("",!0):(l(),i("div",ee,[e("div",se,[(l(!0),i(C,null,N(b.value,s=>(l(),i("div",{class:"list-group-item d-flex border-bottom list-group-item-action d-flex align-items-center gap-3",key:s.id},[p.value?(l(),i("div",ie,[e("small",ae,[o(r,{t:"Are you sure to remove this peer?"})]),t[2]||(t[2]=e("br",null,null,-1)),e("small",oe,[e("samp",null,x(s.id),1)])])):(l(),i("div",te,[e("small",le,[o(g,{class:"text-decoration-none",target:"_blank",to:"/configuration/"+c.configuration+"/peers?id="+encodeURIComponent(s.id)},{default:B(()=>[e("samp",null,x(s.id),1)]),_:2},1032,["to"])]),t[1]||(t[1]=e("br",null,null,-1)),e("small",ne,x(s.name?s.name:"Untitled Peer"),1)])),c.clientAssignedPeers?(l(),i("button",{key:2,onClick:m=>f("assign",s.id),class:L([{disabled:w(d).assigning},"btn bg-success-subtle text-success-emphasis ms-auto"])},[...t[3]||(t[3]=[e("i",{class:"bi bi-plus-circle-fill"},null,-1)])],10,re)):(l(),i("button",{key:3,onClick:m=>f("unassign",s.assignment_id),class:L([{disabled:w(d).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"]),"aria-label":"Delete Assignment"},[...t[4]||(t[4]=[e("i",{class:"bi bi-trash-fill"},null,-1)])],10,de))]))),128))])]))])}}}),ce={key:0,class:"d-flex rounded-0 border-0 flex-column d-flex flex-column border-bottom pb-1"},ue={class:"d-flex flex-column p-3 gap-3"},me={class:"d-flex align-items-center"},be={class:"mb-0"},ge={class:"text-bg-primary badge ms-2"},ve={class:"text-bg-info badge ms-2"},fe={class:"rounded-3 availablePeers border h-100 overflow-scroll flex-grow-1 d-flex flex-column"},pe={key:0,class:"text-muted m-auto p-3"},he={key:0,style:{height:"500px"},class:"d-flex flex-column p-3"},xe={class:"availablePeers border h-100 card rounded-3"},ye={class:"card-header sticky-top p-3"},_e={class:"mb-0 d-flex align-items-center"},ke={class:"card-body p-0 overflow-scroll"},Ce={key:0,class:"text-muted m-auto"},Pe={class:"card-footer d-flex gap-2 p-3 align-items-center justify-content-end"},Se={key:1},$e=D({__name:"clientAssignedPeers",props:["client","clientAssignedPeers"],emits:["refresh"],setup(c,{emit:k}){const a=c,f=h(!1),d=j(),b=h(!1),p=k,v=async(g,s,m)=>{await d.assignClient(g,s,m,!1),p("refresh")},n=async g=>{await d.unassignClient(void 0,void 0,g),p("refresh")},t=h("");return(g,s)=>(l(),i("div",null,[f.value?(l(),i("div",Se,[...s[6]||(s[6]=[e("div",{class:"p-3 placeholder-glow border-bottom"},[e("h6",{class:"placeholder w-100 rounded-3"}),e("div",{class:"placeholder w-100 rounded-3",style:{height:"400px"}})],-1)])])):(l(),i("div",ce,[e("div",ue,[e("div",me,[e("h6",be,[o(r,{t:"Assigned Peers"}),e("span",ge,[I(x(Object.keys(c.clientAssignedPeers).length)+" ",1),o(r,{t:Object.keys(c.clientAssignedPeers).length>1?"Configurations":"Configuration"},null,8,["t"])]),e("span",ve,[I(x(Object.values(c.clientAssignedPeers).flat().length)+" ",1),o(r,{t:Object.values(c.clientAssignedPeers).flat().length>1?"Peers":"Peer"},null,8,["t"])])]),e("button",{class:"btn btn-sm bg-primary-subtle text-primary-emphasis rounded-3 ms-auto",onClick:s[0]||(s[0]=m=>b.value=!b.value)},[b.value?(l(),i(C,{key:1},[s[4]||(s[4]=e("i",{class:"bi bi-check me-2"},null,-1)),o(r,{t:"Done"})],64)):(l(),i(C,{key:0},[s[3]||(s[3]=e("i",{class:"bi bi-list-check me-2"},null,-1)),o(r,{t:"Manage"})],64))])]),e("div",fe,[(l(!0),i(C,null,N(c.clientAssignedPeers,(m,y)=>(l(),A(R,{configuration:y,peers:m,onUnassign:s[1]||(s[1]=async P=>await n(P))},null,8,["configuration","peers"]))),256)),Object.keys(c.clientAssignedPeers).length===0?(l(),i("h6",pe,[o(r,{t:"No peer assigned to this client"})])):_("",!0)])]),b.value?(l(),i("div",he,[e("div",xe,[e("div",ye,[e("h6",_e,[o(r,{t:"Available Peers"})])]),e("div",ke,[(l(!0),i(C,null,N(w(d).allConfigurationsPeers,(m,y)=>(l(),A(R,{availablePeerSearchString:t.value,configuration:y,clientAssignedPeers:c.clientAssignedPeers,peers:m,key:y,onAssign:async P=>await v(y,P,a.client.ClientID)},null,8,["availablePeerSearchString","configuration","clientAssignedPeers","peers","onAssign"]))),128)),Object.keys(w(d).allConfigurationsPeers).length===0?(l(),i("h6",Ce,[o(r,{t:"No peer is available to assign"})])):_("",!0)]),e("div",Pe,[s[5]||(s[5]=e("label",{for:"availablePeerSearchString"},[e("i",{class:"bi bi-search me-2"})],-1)),O(e("input",{id:"availablePeerSearchString","onUpdate:modelValue":s[2]||(s[2]=m=>t.value=m),class:"form-control form-control-sm rounded-3 w-auto",type:"text"},null,512),[[U,t.value]])])])])):_("",!0)]))]))}}),we={class:"p-3 d-flex gap-3 flex-column border-bottom"},Ae={class:"d-flex align-items-center gap-2"},De={class:"mb-0"},Ne=D({__name:"clientDelete",props:["client"],emits:["refresh"],setup(c,{emit:k}){const a=c,f=h(!1),d=h(!1),b=k,p=E(),v=async()=>{f.value=!0,await z("/api/clients/deleteClient",{ClientID:a.client.ClientID},n=>{f.value=!1,n.status?(b("deleteSuccess"),p.newMessage("Server","Delete client successfully","success")):p.newMessage("Server","Failed to delete client","danger")})};return(n,t)=>(l(),i("div",we,[e("div",Ae,[e("h6",De,[d.value?(l(),A(r,{key:1,t:"Are you sure to delete this client?"})):(l(),A(r,{key:0,t:"Delete Client"}))]),d.value?_("",!0):(l(),i("button",{key:0,class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3 ms-auto",onClick:t[0]||(t[0]=g=>d.value=!0)},[t[2]||(t[2]=e("i",{class:"bi bi-trash-fill me-2"},null,-1)),o(r,{t:"Delete"})])),d.value?(l(),i(C,{key:1},[e("button",{onClick:v,class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3 ms-auto"},[t[3]||(t[3]=e("i",{class:"bi bi-trash-fill me-2"},null,-1)),o(r,{t:"Yes"})]),d.value?(l(),i("button",{key:0,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:t[1]||(t[1]=g=>d.value=!1)},[t[4]||(t[4]=e("i",{class:"bi bi-x-lg me-2"},null,-1)),o(r,{t:"No"})])):_("",!0)],64)):_("",!0)])]))}}),Ie={class:"p-4 border-bottom bg-body-tertiary z-0"},je={class:"mb-3 backLink"},Le={class:"text-muted"},Re={class:"d-flex flex-column gap-2"},Ve={class:"d-flex align-items-center"},Be={class:"text-muted"},Me={class:"ms-auto"},Oe={class:"d-flex align-items-center gap-2"},Ue={class:"text-muted"},Ee={style:{flex:"1 0 0","overflow-y":"scroll"}},ze={key:1,class:"d-flex w-100 h-100 text-muted"},Fe={class:"m-auto text-center"},Ge=D({__name:"clientViewer",emits:["deleteSuccess"],async setup(c,{emit:k}){let a,f;const d=j(),b=E(),p=G(),v=J(),n=V(()=>d.getClientById(p.params.id)),t=h({}),g=async()=>{await K("/api/clients/assignedPeers",{ClientID:n.value.ClientID},S=>{t.value=S.data})},s=T({Name:void 0});n.value?(q(()=>n.value.ClientID,async()=>{s.Name=n.value.Name,await g()}),[a,f]=H(()=>g()),await a,f(),s.Name=n.value.Name):(v.push("/clients"),b.newMessage("WGDashboard","Client does not exist","danger"));const m=h(!1),y=async()=>{m.value=!0,await z("/api/clients/updateProfileName",{ClientID:n.value.ClientID,Name:s.Name},S=>{S.status?(n.value.Name=s.Name,b.newMessage("Server","Client name update success","success")):(s.Name=n.value.Name,b.newMessage("Server","Client name update failed","danger")),m.value=!1})},P=async()=>{await v.push("/clients"),await d.getClients()};return(S,u)=>{const F=M("RouterLink");return n.value?(l(),i("div",{class:"text-body d-flex flex-column overflow-y-scroll h-100",key:n.value.ClientID},[e("div",Ie,[e("div",je,[o(F,{to:"/clients",class:"text-body text-decoration-none"},{default:B(()=>[...u[4]||(u[4]=[e("i",{class:"bi bi-arrow-left me-2"},null,-1),I(" Back",-1)])]),_:1})]),e("small",Le,[o(r,{t:"Email"})]),e("h1",null,x(n.value.Email),1),e("div",Re,[e("div",Ve,[e("small",Be,[o(r,{t:"Client ID"})]),e("small",Me,[e("samp",null,x(n.value.ClientID),1)])]),e("div",Oe,[e("small",Ue,[o(r,{t:"Client Name"})]),O(e("input",{class:"form-control form-control-sm rounded-3 ms-auto",style:{width:"300px"},type:"text","onUpdate:modelValue":u[0]||(u[0]=$=>s.Name=$)},null,512),[[U,s.Name]]),e("button",{onClick:u[1]||(u[1]=$=>y()),"aria-label":"Save Client Name",class:"btn btn-sm rounded-3 bg-success-subtle border-success-subtle text-success-emphasis"},[...u[5]||(u[5]=[e("i",{class:"bi bi-save-fill"},null,-1)])])])])]),e("div",Ee,[o($e,{onRefresh:u[2]||(u[2]=$=>g()),clientAssignedPeers:t.value,client:n.value},null,8,["clientAssignedPeers","client"]),o(Ne,{onDeleteSuccess:u[3]||(u[3]=$=>P()),client:n.value},null,8,["client"])])])):(l(),i("div",ze,[e("div",Fe,[u[6]||(u[6]=e("h1",null,[e("i",{class:"bi bi-person-x"})],-1)),e("p",null,[o(r,{t:"Client does not exist"})])])]))}}}),Je=W(Ge,[["__scopeId","data-v-f874264d"]]);export{Je as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/clients-BK_guIYX.js b/src/static/dist/WGDashboardAdmin/assets/clients-D8CGvKPT.js
similarity index 96%
rename from src/static/dist/WGDashboardAdmin/assets/clients-BK_guIYX.js
rename to src/static/dist/WGDashboardAdmin/assets/clients-D8CGvKPT.js
index 804ff333..672fbab2 100644
--- a/src/static/dist/WGDashboardAdmin/assets/clients-BK_guIYX.js
+++ b/src/static/dist/WGDashboardAdmin/assets/clients-D8CGvKPT.js
@@ -1 +1 @@
-import{B as C,q as L,o as B,c as g,a as e,t as y,b as d,F as D,i as N,j as v,w as V,h as I,L as E,f as r,D as z,r as b,E as O,m as x,v as j,g as w,J as R,k as G,y as M,u as f,G as T,n as $,d as S,_ as U}from"./index-DW-_CXHM.js";import{D as q}from"./DashboardClientAssignmentStore-aB7p_aSe.js";import{L as p}from"./localeText-DGSSxTBj.js";const F={class:"card rounded-0 border-0"},J={class:"card-header d-flex align-items-center rounded-0"},P={class:"my-2"},H={class:"badge text-bg-primary ms-auto"},K={class:"card-body p-0"},Q={class:"list-group list-group-flush clientList"},W={class:"text-body"},X={class:"text-muted"},k=C({__name:"clientGroup",props:["groupName","clients","searchString"],setup(h){const l=h,i=L(()=>{const a=l.searchString.toLowerCase();return l.searchString?l.clients.filter(s=>s.ClientID&&s.ClientID.toLowerCase().includes(a)||s.Email&&s.Email.toLowerCase().includes(a)||s.Name&&s.Name.toLowerCase().includes(a)):l.clients});return E(),B(()=>{document.querySelector(".clientList .active")?.scrollIntoView()}),(a,s)=>{const n=I("RouterLink");return r(),g("div",F,[e("div",J,[e("h6",P,y(h.groupName),1),e("span",H,[d(p,{t:i.value.length+" Client"+(i.value.length>1?"s":"")},null,8,["t"])])]),e("div",K,[e("div",Q,[(r(!0),g(D,null,N(i.value,o=>(r(),v(n,{key:o.ClientID,id:"client_"+o.ClientID,"active-class":"active",to:{name:"Client Viewer",params:{id:o.ClientID}},class:"list-group-item d-flex flex-column border-bottom list-group-item-action client"},{default:V(()=>[e("small",W,y(o.Email),1),e("small",X,y(o.Name?o.Name:"No Name"),1)]),_:2},1032,["id","to"]))),128))])])])}}}),Y={class:"d-flex flex-column gap-2"},Z={class:"d-flex align-items-center"},ee={class:"mb-0"},te={class:"form-check form-switch ms-auto"},se={class:"form-check-label",for:"oidc_switch"},oe=["disabled"],ae=C({__name:"oidcSettings",props:["mode"],async setup(h){let l,i;const a=h,s=z(),n=b(!1),o=b(!1),_=async()=>{await w("/api/oidc/status",{mode:a.mode},t=>{n.value=t.data,o.value=!1})};[l,i]=O(()=>_()),await l,i();const c=async()=>{o.value=!0,await w("/api/oidc/toggle",{mode:a.mode},t=>{t.status||(n.value=!n.value,s.newMessage("Server",t.message,"danger")),o.value=!1})};return(t,u)=>(r(),g("div",Y,[e("div",Z,[e("h6",ee,[d(p,{t:"OpenID Connect (OIDC)"})]),e("div",te,[e("label",se,[d(p,{t:n.value?"Enabled":"Disabled"},null,8,["t"])]),x(e("input",{disabled:o.value,"onUpdate:modelValue":u[0]||(u[0]=m=>n.value=m),onChange:u[1]||(u[1]=m=>c()),class:"form-check-input",type:"checkbox",role:"switch",id:"oidc_switch"},null,40,oe),[[j,n.value]])])])]))}}),ne={class:"position-absolute w-100 h-100 top-0 start-0 z-1 rounded-3 d-flex p-2",style:{"background-color":"#00000070","z-index":"9999"}},le={class:"card m-auto rounded-3",style:{width:"700px"}},ie={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},ce={class:"mb-0"},re={class:"card-body px-4 d-flex gap-3 flex-column"},de={class:"d-flex align-items-center"},ue={class:"mb-0"},me={class:"form-check form-switch ms-auto"},_e={class:"form-check-label",for:"oidc_switch"},pe=["disabled"],he=C({__name:"clientSettings",emits:["close"],setup(h,{emit:l}){const i=l,a=z();b(!1);const s=R({enableClients:a.Configuration.Clients.enable}),n=b(!1),o=async()=>{n.value=!0,await w("/api/clients/toggleStatus",{},_=>{s.enableClients=_.data}),n.value=!1};return(_,c)=>(r(),g("div",ne,[e("div",le,[e("div",ie,[e("h4",ce,[d(p,{t:"Clients Settings"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:c[0]||(c[0]=t=>i("close"))})]),e("div",re,[e("div",de,[e("h6",ue,[d(p,{t:"Client Side App"})]),e("div",me,[e("label",_e,[d(p,{t:s.enableClients?"Enabled":"Disabled"},null,8,["t"])]),x(e("input",{disabled:_.oidcStatusLoading,"onUpdate:modelValue":c[1]||(c[1]=t=>s.enableClients=t),onChange:c[2]||(c[2]=t=>o()),class:"form-check-input",type:"checkbox",role:"switch",id:"oidc_switch"},null,40,pe),[[j,s.enableClients]])])]),d(ae,{mode:"Client"})])])]))}}),ge={class:"text-body w-100 h-100 pb-2 position-relative"},be={class:"w-100 h-100 card rounded-3"},fe={class:"border-bottom z-0"},ve={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},Ce=["placeholder"],ye={class:"row h-100 g-0"},we={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},xe=C({__name:"clients",async setup(h){let l,i;const a=q();[l,i]=O(()=>a.getClients()),await l,i(),a.getAllConfigurationsPeers();const s=b(""),n=E(),o=b(!1),_=L(()=>Object.fromEntries(Object.entries(a.clients).filter(([c,t])=>Object.keys(a.clients).filter(u=>u!=="Local").includes(c))));return(c,t)=>{const u=I("RouterView");return r(),g("div",ge,[e("div",be,[d(G,{name:"zoom"},{default:V(()=>[o.value?(r(),v(he,{key:0,onClose:t[0]||(t[0]=m=>o.value=!1),class:"z-5"})):S("",!0)]),_:1}),e("div",fe,[e("div",ve,[t[4]||(t[4]=e("label",{for:"searchClient"},[e("i",{class:"bi bi-search me-2"})],-1)),x(e("input",{"onUpdate:modelValue":t[1]||(t[1]=m=>s.value=m),id:"searchClient",class:"form-control rounded-3 form-control-sm",placeholder:f(T)("Search Clients..."),type:"email",style:{width:"auto"}},null,8,Ce),[[M,s.value]]),e("button",{class:"btn btn-body ms-auto bg-body-secondary rounded-3 btn-sm",onClick:t[2]||(t[2]=m=>o.value=!o.value)},[t[3]||(t[3]=e("i",{class:"bi bi-gear-fill me-2"},null,-1)),d(p,{t:"Settings"})])])]),e("div",ye,[e("div",{class:$([{hide:f(n).params.id},"col-sm-4 border-end d-flex flex-column clientListContainer"])},[e("div",we,[Object.keys(f(a).clients).includes("Local")?(r(),v(k,{key:0,searchString:s.value,clients:f(a).clients.Local,groupName:"Local"},null,8,["searchString","clients"])):S("",!0),(r(!0),g(D,null,N(_.value,(m,A)=>(r(),v(k,{searchString:s.value,clients:m,groupName:A},null,8,["searchString","clients","groupName"]))),256))])],2),e("div",{class:$([{hide:!f(n).params.id},"col-sm-8 clientViewerContainer z-0"])},[d(u)],2)])])])}}}),Le=U(xe,[["__scopeId","data-v-a8650ee3"]]);export{Le as default};
+import{B as C,q as L,o as B,c as g,a as e,t as y,b as d,F as D,i as N,j as v,w as V,h as I,L as E,f as r,D as z,r as b,E as O,m as x,v as j,g as w,J as R,k as G,y as M,u as f,G as T,n as $,d as S,_ as U}from"./index-BCe-EVqv.js";import{D as q}from"./DashboardClientAssignmentStore-c-G-fTFK.js";import{L as p}from"./localeText-fe5sRLWX.js";const F={class:"card rounded-0 border-0"},J={class:"card-header d-flex align-items-center rounded-0"},P={class:"my-2"},H={class:"badge text-bg-primary ms-auto"},K={class:"card-body p-0"},Q={class:"list-group list-group-flush clientList"},W={class:"text-body"},X={class:"text-muted"},k=C({__name:"clientGroup",props:["groupName","clients","searchString"],setup(h){const l=h,i=L(()=>{const a=l.searchString.toLowerCase();return l.searchString?l.clients.filter(s=>s.ClientID&&s.ClientID.toLowerCase().includes(a)||s.Email&&s.Email.toLowerCase().includes(a)||s.Name&&s.Name.toLowerCase().includes(a)):l.clients});return E(),B(()=>{document.querySelector(".clientList .active")?.scrollIntoView()}),(a,s)=>{const n=I("RouterLink");return r(),g("div",F,[e("div",J,[e("h6",P,y(h.groupName),1),e("span",H,[d(p,{t:i.value.length+" Client"+(i.value.length>1?"s":"")},null,8,["t"])])]),e("div",K,[e("div",Q,[(r(!0),g(D,null,N(i.value,o=>(r(),v(n,{key:o.ClientID,id:"client_"+o.ClientID,"active-class":"active",to:{name:"Client Viewer",params:{id:o.ClientID}},class:"list-group-item d-flex flex-column border-bottom list-group-item-action client"},{default:V(()=>[e("small",W,y(o.Email),1),e("small",X,y(o.Name?o.Name:"No Name"),1)]),_:2},1032,["id","to"]))),128))])])])}}}),Y={class:"d-flex flex-column gap-2"},Z={class:"d-flex align-items-center"},ee={class:"mb-0"},te={class:"form-check form-switch ms-auto"},se={class:"form-check-label",for:"oidc_switch"},oe=["disabled"],ae=C({__name:"oidcSettings",props:["mode"],async setup(h){let l,i;const a=h,s=z(),n=b(!1),o=b(!1),_=async()=>{await w("/api/oidc/status",{mode:a.mode},t=>{n.value=t.data,o.value=!1})};[l,i]=O(()=>_()),await l,i();const c=async()=>{o.value=!0,await w("/api/oidc/toggle",{mode:a.mode},t=>{t.status||(n.value=!n.value,s.newMessage("Server",t.message,"danger")),o.value=!1})};return(t,u)=>(r(),g("div",Y,[e("div",Z,[e("h6",ee,[d(p,{t:"OpenID Connect (OIDC)"})]),e("div",te,[e("label",se,[d(p,{t:n.value?"Enabled":"Disabled"},null,8,["t"])]),x(e("input",{disabled:o.value,"onUpdate:modelValue":u[0]||(u[0]=m=>n.value=m),onChange:u[1]||(u[1]=m=>c()),class:"form-check-input",type:"checkbox",role:"switch",id:"oidc_switch"},null,40,oe),[[j,n.value]])])])]))}}),ne={class:"position-absolute w-100 h-100 top-0 start-0 z-1 rounded-3 d-flex p-2",style:{"background-color":"#00000070","z-index":"9999"}},le={class:"card m-auto rounded-3",style:{width:"700px"}},ie={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},ce={class:"mb-0"},re={class:"card-body px-4 d-flex gap-3 flex-column"},de={class:"d-flex align-items-center"},ue={class:"mb-0"},me={class:"form-check form-switch ms-auto"},_e={class:"form-check-label",for:"oidc_switch"},pe=["disabled"],he=C({__name:"clientSettings",emits:["close"],setup(h,{emit:l}){const i=l,a=z();b(!1);const s=R({enableClients:a.Configuration.Clients.enable}),n=b(!1),o=async()=>{n.value=!0,await w("/api/clients/toggleStatus",{},_=>{s.enableClients=_.data}),n.value=!1};return(_,c)=>(r(),g("div",ne,[e("div",le,[e("div",ie,[e("h4",ce,[d(p,{t:"Clients Settings"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:c[0]||(c[0]=t=>i("close"))})]),e("div",re,[e("div",de,[e("h6",ue,[d(p,{t:"Client Side App"})]),e("div",me,[e("label",_e,[d(p,{t:s.enableClients?"Enabled":"Disabled"},null,8,["t"])]),x(e("input",{disabled:_.oidcStatusLoading,"onUpdate:modelValue":c[1]||(c[1]=t=>s.enableClients=t),onChange:c[2]||(c[2]=t=>o()),class:"form-check-input",type:"checkbox",role:"switch",id:"oidc_switch"},null,40,pe),[[j,s.enableClients]])])]),d(ae,{mode:"Client"})])])]))}}),ge={class:"text-body w-100 h-100 pb-2 position-relative"},be={class:"w-100 h-100 card rounded-3"},fe={class:"border-bottom z-0"},ve={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},Ce=["placeholder"],ye={class:"row h-100 g-0"},we={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},xe=C({__name:"clients",async setup(h){let l,i;const a=q();[l,i]=O(()=>a.getClients()),await l,i(),a.getAllConfigurationsPeers();const s=b(""),n=E(),o=b(!1),_=L(()=>Object.fromEntries(Object.entries(a.clients).filter(([c,t])=>Object.keys(a.clients).filter(u=>u!=="Local").includes(c))));return(c,t)=>{const u=I("RouterView");return r(),g("div",ge,[e("div",be,[d(G,{name:"zoom"},{default:V(()=>[o.value?(r(),v(he,{key:0,onClose:t[0]||(t[0]=m=>o.value=!1),class:"z-5"})):S("",!0)]),_:1}),e("div",fe,[e("div",ve,[t[4]||(t[4]=e("label",{for:"searchClient"},[e("i",{class:"bi bi-search me-2"})],-1)),x(e("input",{"onUpdate:modelValue":t[1]||(t[1]=m=>s.value=m),id:"searchClient",class:"form-control rounded-3 form-control-sm",placeholder:f(T)("Search Clients..."),type:"email",style:{width:"auto"}},null,8,Ce),[[M,s.value]]),e("button",{class:"btn btn-body ms-auto bg-body-secondary rounded-3 btn-sm",onClick:t[2]||(t[2]=m=>o.value=!o.value)},[t[3]||(t[3]=e("i",{class:"bi bi-gear-fill me-2"},null,-1)),d(p,{t:"Settings"})])])]),e("div",ye,[e("div",{class:$([{hide:f(n).params.id},"col-sm-4 border-end d-flex flex-column clientListContainer"])},[e("div",we,[Object.keys(f(a).clients).includes("Local")?(r(),v(k,{key:0,searchString:s.value,clients:f(a).clients.Local,groupName:"Local"},null,8,["searchString","clients"])):S("",!0),(r(!0),g(D,null,N(_.value,(m,A)=>(r(),v(k,{searchString:s.value,clients:m,groupName:A},null,8,["searchString","clients","groupName"]))),256))])],2),e("div",{class:$([{hide:!f(n).params.id},"col-sm-8 clientViewerContainer z-0"])},[d(u)],2)])])])}}}),Le=U(xe,[["__scopeId","data-v-a8650ee3"]]);export{Le as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/configuration-PDhrvfEh.js b/src/static/dist/WGDashboardAdmin/assets/configuration-Bn8Xcxnm.js
similarity index 86%
rename from src/static/dist/WGDashboardAdmin/assets/configuration-PDhrvfEh.js
rename to src/static/dist/WGDashboardAdmin/assets/configuration-Bn8Xcxnm.js
index 65363bcf..95482831 100644
--- a/src/static/dist/WGDashboardAdmin/assets/configuration-PDhrvfEh.js
+++ b/src/static/dist/WGDashboardAdmin/assets/configuration-Bn8Xcxnm.js
@@ -1 +1 @@
-import{_ as r,c as i,b as o,w as e,k as l,j as a,l as _,S as u,h as d,f as t}from"./index-DW-_CXHM.js";const m={name:"configuration"},f={class:"mt-md-5 mt-3 text-body"};function p(h,k,x,w,$,v){const n=d("RouterView");return t(),i("div",f,[o(n,null,{default:e(({Component:s,route:c})=>[o(l,{name:"fade2",mode:"out-in"},{default:e(()=>[(t(),a(u,null,{default:e(()=>[(t(),a(_(s),{key:c.path,class:"z-1"}))]),_:2},1024))]),_:2},1024)]),_:1})])}const B=r(m,[["render",p]]);export{B as default};
+import{_ as r,c as i,b as o,w as e,k as l,j as a,l as _,S as u,h as d,f as t}from"./index-BCe-EVqv.js";const m={name:"configuration"},f={class:"mt-md-5 mt-3 text-body"};function p(h,k,x,w,$,v){const n=d("RouterView");return t(),i("div",f,[o(n,null,{default:e(({Component:s,route:c})=>[o(l,{name:"fade2",mode:"out-in"},{default:e(()=>[(t(),a(u,null,{default:e(()=>[(t(),a(_(s),{key:c.path,class:"z-1"}))]),_:2},1024))]),_:2},1024)]),_:1})])}const B=r(m,[["render",p]]);export{B as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/configurationList-CUENhDPY.js b/src/static/dist/WGDashboardAdmin/assets/configurationList-Cz8x7tFK.js
similarity index 98%
rename from src/static/dist/WGDashboardAdmin/assets/configurationList-CUENhDPY.js
rename to src/static/dist/WGDashboardAdmin/assets/configurationList-Cz8x7tFK.js
index df2540f9..b3788dfa 100644
--- a/src/static/dist/WGDashboardAdmin/assets/configurationList-CUENhDPY.js
+++ b/src/static/dist/WGDashboardAdmin/assets/configurationList-Cz8x7tFK.js
@@ -1 +1 @@
-import{_ as D,g as B,D as N,c as i,a as t,b as l,w as x,h as p,n as m,e as v,t as u,m as U,j as y,d as h,v as I,f as o,p as K,q as G,r as R,s as C,k as V,o as O,x as W,F as w,i as k,T as q,G as L,W as F,y as z}from"./index-DW-_CXHM.js";import{L as S}from"./localeText-DGSSxTBj.js";import{_ as j}from"./protocolBadge-D8iagdWj.js";import{C as E}from"./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-CLz-8WG5.js";const P={name:"configurationCard",components:{ProtocolBadge:j,LocaleText:S},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String},delay:String,display:String},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:N()}},methods:{toggle(){this.configurationToggling=!0,B("/api/toggleWireguardConfiguration",{configurationName:this.c.Name},n=>{n.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${n.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",n.message,"danger"),this.c.Status=n.data,this.configurationToggling=!1})}}},T=()=>{K(n=>({v0d365bfc:n.delay}))},M=P.setup;P.setup=M?(n,s)=>(T(),M(n,s)):T;const H={class:"card conf_card rounded-3 shadow text-decoration-none"},Y={class:"mb-0"},A={class:"card-title mb-0 d-flex align-items-center gap-2"},J={key:0},Q={class:"badge text-bg-info rounded-3 shadow"},X={class:"card-footer d-flex gap-2 flex-column"},Z={class:"row"},tt={class:"d-flex gap-2 align-items-center"},et={class:"text-muted"},st={class:"mb-0 d-block d-lg-inline-block"},ot={style:{"line-break":"anywhere"}},nt={class:"form-check form-switch ms-auto"},at=["for"],it={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},rt=["disabled","id"];function lt(n,s,e,_,a,g){const d=p("ProtocolBadge"),r=p("RouterLink"),c=p("LocaleText");return o(),i("div",{class:m(["col-12",{"col-lg-6 col-xl-4":this.display==="Grid"}])},[t("div",H,[l(r,{to:"/configuration/"+e.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:x(()=>[t("h6",Y,[t("span",{class:m(["dot",{active:e.c.Status}])},null,2)]),t("h6",A,[t("samp",null,u(e.c.Name),1),t("small",null,[l(d,{protocol:e.c.Protocol,mini:!0},null,8,["protocol"])]),e.c.Info.Description?(o(),i("small",J,[t("span",Q,[s[2]||(s[2]=t("i",{class:"bi bi-pencil-fill me-2"},null,-1)),v(" "+u(e.c.Info.Description),1)])])):h("",!0)]),s[3]||(s[3]=t("h6",{class:"mb-0 ms-auto"},[t("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),t("div",X,[t("div",Z,[t("small",{class:m(["col-6",{"col-md-3":this.display==="List"}])},[s[4]||(s[4]=t("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),v(u(e.c.DataUsage.Total>0?e.c.DataUsage.Total.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-primary-emphasis col-6",{"col-md-3":this.display==="List"}])},[s[5]||(s[5]=t("i",{class:"bi bi-arrow-down me-2"},null,-1)),v(u(e.c.DataUsage.Receive>0?e.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-success-emphasis col-6",{"col-md-3":this.display==="List"}])},[s[6]||(s[6]=t("i",{class:"bi bi-arrow-up me-2"},null,-1)),v(u(e.c.DataUsage.Sent>0?e.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["col-6",{"col-md-3 text-md-end ":this.display==="List"}])},[t("span",{class:m(["dot me-2",{active:e.c.ConnectedPeers>0}])},null,2),v(" "+u(e.c.ConnectedPeers)+" / "+u(e.c.TotalPeers)+" ",1),l(c,{t:"Peers"})],2)]),t("div",{class:m(["d-flex gap-2",[this.display==="Grid"?"flex-column":"gap-lg-3 flex-column flex-lg-row"]])},[t("div",tt,[t("small",et,[t("strong",null,[l(c,{t:"Public Key"})])]),t("small",st,[t("samp",ot,u(e.c.PublicKey),1)])]),t("div",nt,[t("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+e.c.PrivateKey},[!e.c.Status&&this.configurationToggling?(o(),y(c,{key:0,t:"Turning Off..."})):e.c.Status&&this.configurationToggling?(o(),y(c,{key:1,t:"Turning On..."})):e.c.Status&&!this.configurationToggling?(o(),y(c,{key:2,t:"On"})):!e.c.Status&&!this.configurationToggling?(o(),y(c,{key:3,t:"Off"})):h("",!0),this.configurationToggling?(o(),i("span",it)):h("",!0)],8,at),U(t("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+e.c.PrivateKey,onChange:s[0]||(s[0]=$=>this.toggle()),"onUpdate:modelValue":s[1]||(s[1]=$=>e.c.Status=$)},null,40,rt),[[I,e.c.Status]])])],2)])])],2)}const dt=D(P,[["render",lt],["__scopeId","data-v-9f596f5e"]]),ct={class:"text-muted me-2"},ut={class:"fw-bold"},mt={__name:"storageMount",props:{mount:Object,align:Boolean,square:Boolean},setup(n){K(a=>({v2dc8ab7e:_.value}));const s=n,e=R(!1),_=G(()=>s.square?"40px":"25px");return(a,g)=>(o(),i("div",{class:"flex-grow-1 square rounded-3 border position-relative",onMouseenter:g[0]||(g[0]=d=>e.value=!0),onMouseleave:g[1]||(g[1]=d=>e.value=!1),style:C({"background-color":`rgb(25 135 84 / ${n.mount.percent}%)`})},[l(V,{name:"zoomReversed"},{default:x(()=>[e.value?(o(),i("div",{key:0,style:C([{"white-space":"nowrap"},{top:_.value}]),class:m(["floatingLabel z-3 border position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow d-flex",[n.align?"end-0":"start-0"]])},[t("small",ct,[t("samp",null,u(n.mount.mountPoint),1)]),t("small",ut,u(n.mount.percent)+"% ",1)],6)):h("",!0)]),_:1})],36))}},gt=D(mt,[["__scopeId","data-v-9509d7a0"]]),ft={class:"row text-body g-3 mb-5"},_t={class:"col-md-6 col-sm-12 col-xl-3"},ht={class:"d-flex align-items-center"},pt={class:"text-muted"},yt={class:"ms-auto"},bt={key:0},vt={key:1,class:"spinner-border spinner-border-sm"},xt={class:"progress",role:"progressbar",style:{height:"6px"}},St={class:"d-flex mt-2 gap-1"},Ct={class:"col-md-6 col-sm-12 col-xl-3"},wt={class:"d-flex align-items-center"},kt={class:"text-muted"},$t={class:"ms-auto"},Dt={key:0},Lt={key:1,class:"spinner-border spinner-border-sm"},Pt={class:"progress",role:"progressbar",style:{height:"6px"}},Tt={class:"d-flex mt-2 gap-1"},Mt={class:"col-md-6 col-sm-12 col-xl-3"},Bt={class:"d-flex align-items-center"},Nt={class:"text-muted"},Ut={class:"ms-auto"},Kt={key:0},Gt={key:1,class:"spinner-border spinner-border-sm"},Vt={class:"progress",role:"progressbar",style:{height:"6px"}},It={class:"col-md-6 col-sm-12 col-xl-3"},Rt={class:"d-flex align-items-center"},Ot={class:"text-muted"},Wt={class:"ms-auto"},qt={key:0},Ft={key:1,class:"spinner-border spinner-border-sm"},zt={__name:"systemStatusWidget",setup(n){const s=N();let e=null;O(()=>{_(),e=setInterval(()=>{_()},5e3)}),W(()=>{clearInterval(e)});const _=()=>{B("/api/systemStatus",{},g=>{s.SystemStatus=g.data})},a=G(()=>s.SystemStatus);return(g,d)=>(o(),i("div",ft,[t("div",_t,[t("div",ht,[t("h6",pt,[d[0]||(d[0]=t("i",{class:"bi bi-cpu-fill me-2"},null,-1)),l(S,{t:"CPU"})]),t("h6",yt,[a.value?(o(),i("span",bt,u(a.value.CPU.cpu_percent)+"% ",1)):(o(),i("span",vt))])]),t("div",xt,[t("div",{class:"progress-bar",style:C({width:`${a.value?.CPU.cpu_percent}%`})},null,4)]),t("div",St,[(o(!0),i(w,null,k(a.value?.CPU.cpu_percent_per_cpu,(r,c)=>(o(),y(E,{key:c,align:c+1>Math.round(a.value?.CPU.cpu_percent_per_cpu.length/2),core_number:c,percentage:r},null,8,["align","core_number","percentage"]))),128))])]),t("div",Ct,[t("div",wt,[t("h6",kt,[d[1]||(d[1]=t("i",{class:"bi bi-device-ssd-fill me-2"},null,-1)),l(S,{t:"Storage"})]),t("h6",$t,[a.value?(o(),i("span",Dt,u(a.value.Disks.find(r=>r.mountPoint==="/")?a.value?.Disks.find(r=>r.mountPoint==="/").percent:a.value?.Disks[0].percent)+"% ",1)):(o(),i("span",Lt))])]),t("div",Pt,[t("div",{class:"progress-bar bg-success",style:C({width:`${a.value?.Disks.find(r=>r.mountPoint==="/")?a.value?.Disks.find(r=>r.mountPoint==="/").percent:a.value?.Disks[0].percent}%`})},null,4)]),t("div",Tt,[a.value?(o(!0),i(w,{key:0},k(a.value?.Disks,(r,c)=>(o(),y(gt,{key:r.mountPoint,align:c+1>Math.round(a.value?.Disks.length/2),mount:r},null,8,["align","mount"]))),128)):h("",!0)])]),t("div",Mt,[t("div",Bt,[t("h6",Nt,[d[2]||(d[2]=t("i",{class:"bi bi-memory me-2"},null,-1)),l(S,{t:"Memory"})]),t("h6",Ut,[a.value?(o(),i("span",Kt,u(a.value?.Memory.VirtualMemory.percent)+"% ",1)):(o(),i("span",Gt))])]),t("div",Vt,[t("div",{class:"progress-bar bg-info",style:C({width:`${a.value?.Memory.VirtualMemory.percent}%`})},null,4)])]),t("div",It,[t("div",Rt,[t("h6",Ot,[d[3]||(d[3]=t("i",{class:"bi bi-memory me-2"},null,-1)),l(S,{t:"Swap Memory"})]),t("h6",Wt,[a.value?(o(),i("span",qt,u(a.value?.Memory.SwapMemory.percent)+"% ",1)):(o(),i("span",Ft))])]),d[4]||(d[4]=t("div",{class:"progress",role:"progressbar",style:{height:"6px"}},[t("div",{class:"progress-bar bg-warning",style:{width:"$ data?.Memory.SwapMemory.percent}%"}})],-1))])]))}},jt=D(zt,[["__scopeId","data-v-851170e4"]]),Et={name:"configurationList",components:{SystemStatus:jt,LocaleText:S,ConfigurationCard:dt},async setup(){return{wireguardConfigurationsStore:F()}},data(){return{configurationLoaded:!1,sort:{Name:L("Name"),Status:L("Status"),"DataUsage.Total":L("Total Usage")},currentSort:{key:"Name",order:"asc"},currentDisplay:"List",searchKey:""}},computed:{configurations(){return this.wireguardConfigurationsStore.sortConfigurations.filter(n=>n.Name.toLowerCase().includes(this.searchKey)||n.PublicKey.includes(this.searchKey)||!this.searchKey)}},methods:{dotNotation(n,s){let e=s.split(".").reduce((_,a)=>_&&_[a],n);return typeof e=="string"?e.toLowerCase():e},updateSort(n){this.wireguardConfigurationsStore.CurrentSort.key===n?this.wireguardConfigurationsStore.CurrentSort.order=this.wireguardConfigurationsStore.CurrentSort.order==="asc"?"desc":"asc":this.wireguardConfigurationsStore.CurrentSort.key=n},updateDisplay(n){this.wireguardConfigurationsStore.CurrentDisplay!==n&&(this.wireguardConfigurationsStore.CurrentDisplay=n)}}},Ht={class:"mt-md-5 mt-3"},Yt={class:"container-fluid"},At={class:"d-flex mb-4 configurationListTitle align-items-md-center gap-2 flex-column flex-md-row"},Jt={class:"text-body d-flex mb-0"},Qt={key:0,class:"text-body filter mb-3 d-flex gap-2 flex-column flex-md-row"},Xt={class:"d-flex align-items-center gap-3 align-items-center mb-3 mb-md-0"},Zt={class:"text-muted"},te={class:"d-flex ms-auto ms-lg-0"},ee=["onClick"],se={class:"align-items-center gap-3 align-items-center mb-3 mb-md-0 d-none d-lg-flex"},oe={class:"text-muted"},ne={class:"d-flex ms-auto ms-lg-0"},ae=["onClick"],ie={class:"d-flex align-items-center ms-md-auto"},re={class:"row g-3 mb-2"},le={class:"text-muted col-12",key:"noConfiguration"};function de(n,s,e,_,a,g){const d=p("SystemStatus"),r=p("LocaleText"),c=p("RouterLink"),$=p("ConfigurationCard");return o(),i("div",Ht,[t("div",Yt,[l(d),t("div",At,[t("h2",Jt,[l(r,{t:"WireGuard Configurations"})]),l(c,{to:"/new_configuration",class:"ms-md-auto py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:x(()=>[s[1]||(s[1]=t("i",{class:"bi bi-plus-circle me-2"},null,-1)),l(r,{t:"Configuration"})]),_:1}),l(c,{to:"/restore_configuration",class:"py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:x(()=>[s[2]||(s[2]=t("i",{class:"bi bi-clock-history me-2"},null,-1)),l(r,{t:"Restore"})]),_:1})]),l(V,{name:"fade"},{default:x(()=>[this.wireguardConfigurationsStore.ConfigurationLoaded?(o(),i("div",Qt,[t("div",Xt,[t("small",Zt,[l(r,{t:"Sort By"})]),t("div",te,[(o(!0),i(w,null,k(this.wireguardConfigurationsStore.SortOptions,(f,b)=>(o(),i("a",{role:"button",onClick:ce=>g.updateSort(b),class:m([{"bg-primary-subtle text-primary-emphasis":this.wireguardConfigurationsStore.CurrentSort.key===b},"px-2 py-1 rounded-3"])},[t("small",null,[this.wireguardConfigurationsStore.CurrentSort.key===b?(o(),i("i",{key:0,class:m(["bi me-2",[this.wireguardConfigurationsStore.CurrentSort.order==="asc"?"bi-sort-up":"bi-sort-down"]])},null,2)):h("",!0),l(r,{t:f},null,8,["t"])])],10,ee))),256))])]),t("div",se,[t("small",oe,[l(r,{t:"Display as"})]),t("div",ne,[(o(),i(w,null,k([{name:"List",key:"list"},{name:"Grid",key:"grid"}],f=>t("a",{role:"button",onClick:b=>g.updateDisplay(f.name),class:m([{"bg-primary-subtle text-primary-emphasis":this.wireguardConfigurationsStore.CurrentDisplay===f.name},"px-2 py-1 rounded-3"])},[t("small",null,[t("i",{class:m(["bi me-2","bi-"+f.key])},null,2),s[3]||(s[3]=v()),l(r,{t:f.name},null,8,["t"])])],10,ae)),64))])]),t("div",ie,[s[4]||(s[4]=t("label",{for:"configurationSearch",class:"text-muted"},[t("i",{class:"bi bi-search me-2"})],-1)),U(t("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":s[0]||(s[0]=f=>this.searchKey=f),id:"configurationSearch"},null,512),[[z,this.searchKey]])])])):h("",!0)]),_:1}),t("div",re,[l(q,{name:"fade"},{default:x(()=>[this.wireguardConfigurationsStore.ConfigurationLoaded&&this.wireguardConfigurationsStore.Configurations.length===0?(o(),i("p",le,[l(r,{t:"You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard."})])):this.wireguardConfigurationsStore.ConfigurationLoaded?(o(!0),i(w,{key:1},k(g.configurations,(f,b)=>(o(),y($,{display:this.wireguardConfigurationsStore.CurrentDisplay,delay:b*.03+"s",key:f.Name,c:f},null,8,["display","delay","c"]))),128)):h("",!0)]),_:1})])])])}const _e=D(Et,[["render",de],["__scopeId","data-v-7ed053f0"]]);export{_e as default};
+import{_ as D,g as B,D as N,c as i,a as t,b as l,w as x,h as p,n as m,e as v,t as u,m as U,j as y,d as h,v as I,f as o,p as K,q as G,r as R,s as C,k as V,o as O,x as W,F as w,i as k,T as q,G as L,W as F,y as z}from"./index-BCe-EVqv.js";import{L as S}from"./localeText-fe5sRLWX.js";import{_ as j}from"./protocolBadge-56h7MGgI.js";import{C as E}from"./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-B0g652BU.js";const P={name:"configurationCard",components:{ProtocolBadge:j,LocaleText:S},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String},delay:String,display:String},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:N()}},methods:{toggle(){this.configurationToggling=!0,B("/api/toggleWireguardConfiguration",{configurationName:this.c.Name},n=>{n.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${n.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",n.message,"danger"),this.c.Status=n.data,this.configurationToggling=!1})}}},T=()=>{K(n=>({v0d365bfc:n.delay}))},M=P.setup;P.setup=M?(n,s)=>(T(),M(n,s)):T;const H={class:"card conf_card rounded-3 shadow text-decoration-none"},Y={class:"mb-0"},A={class:"card-title mb-0 d-flex align-items-center gap-2"},J={key:0},Q={class:"badge text-bg-info rounded-3 shadow"},X={class:"card-footer d-flex gap-2 flex-column"},Z={class:"row"},tt={class:"d-flex gap-2 align-items-center"},et={class:"text-muted"},st={class:"mb-0 d-block d-lg-inline-block"},ot={style:{"line-break":"anywhere"}},nt={class:"form-check form-switch ms-auto"},at=["for"],it={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},rt=["disabled","id"];function lt(n,s,e,_,a,g){const d=p("ProtocolBadge"),r=p("RouterLink"),c=p("LocaleText");return o(),i("div",{class:m(["col-12",{"col-lg-6 col-xl-4":this.display==="Grid"}])},[t("div",H,[l(r,{to:"/configuration/"+e.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:x(()=>[t("h6",Y,[t("span",{class:m(["dot",{active:e.c.Status}])},null,2)]),t("h6",A,[t("samp",null,u(e.c.Name),1),t("small",null,[l(d,{protocol:e.c.Protocol,mini:!0},null,8,["protocol"])]),e.c.Info.Description?(o(),i("small",J,[t("span",Q,[s[2]||(s[2]=t("i",{class:"bi bi-pencil-fill me-2"},null,-1)),v(" "+u(e.c.Info.Description),1)])])):h("",!0)]),s[3]||(s[3]=t("h6",{class:"mb-0 ms-auto"},[t("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),t("div",X,[t("div",Z,[t("small",{class:m(["col-6",{"col-md-3":this.display==="List"}])},[s[4]||(s[4]=t("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),v(u(e.c.DataUsage.Total>0?e.c.DataUsage.Total.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-primary-emphasis col-6",{"col-md-3":this.display==="List"}])},[s[5]||(s[5]=t("i",{class:"bi bi-arrow-down me-2"},null,-1)),v(u(e.c.DataUsage.Receive>0?e.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-success-emphasis col-6",{"col-md-3":this.display==="List"}])},[s[6]||(s[6]=t("i",{class:"bi bi-arrow-up me-2"},null,-1)),v(u(e.c.DataUsage.Sent>0?e.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["col-6",{"col-md-3 text-md-end ":this.display==="List"}])},[t("span",{class:m(["dot me-2",{active:e.c.ConnectedPeers>0}])},null,2),v(" "+u(e.c.ConnectedPeers)+" / "+u(e.c.TotalPeers)+" ",1),l(c,{t:"Peers"})],2)]),t("div",{class:m(["d-flex gap-2",[this.display==="Grid"?"flex-column":"gap-lg-3 flex-column flex-lg-row"]])},[t("div",tt,[t("small",et,[t("strong",null,[l(c,{t:"Public Key"})])]),t("small",st,[t("samp",ot,u(e.c.PublicKey),1)])]),t("div",nt,[t("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+e.c.PrivateKey},[!e.c.Status&&this.configurationToggling?(o(),y(c,{key:0,t:"Turning Off..."})):e.c.Status&&this.configurationToggling?(o(),y(c,{key:1,t:"Turning On..."})):e.c.Status&&!this.configurationToggling?(o(),y(c,{key:2,t:"On"})):!e.c.Status&&!this.configurationToggling?(o(),y(c,{key:3,t:"Off"})):h("",!0),this.configurationToggling?(o(),i("span",it)):h("",!0)],8,at),U(t("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+e.c.PrivateKey,onChange:s[0]||(s[0]=$=>this.toggle()),"onUpdate:modelValue":s[1]||(s[1]=$=>e.c.Status=$)},null,40,rt),[[I,e.c.Status]])])],2)])])],2)}const dt=D(P,[["render",lt],["__scopeId","data-v-9f596f5e"]]),ct={class:"text-muted me-2"},ut={class:"fw-bold"},mt={__name:"storageMount",props:{mount:Object,align:Boolean,square:Boolean},setup(n){K(a=>({v2dc8ab7e:_.value}));const s=n,e=R(!1),_=G(()=>s.square?"40px":"25px");return(a,g)=>(o(),i("div",{class:"flex-grow-1 square rounded-3 border position-relative",onMouseenter:g[0]||(g[0]=d=>e.value=!0),onMouseleave:g[1]||(g[1]=d=>e.value=!1),style:C({"background-color":`rgb(25 135 84 / ${n.mount.percent}%)`})},[l(V,{name:"zoomReversed"},{default:x(()=>[e.value?(o(),i("div",{key:0,style:C([{"white-space":"nowrap"},{top:_.value}]),class:m(["floatingLabel z-3 border position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow d-flex",[n.align?"end-0":"start-0"]])},[t("small",ct,[t("samp",null,u(n.mount.mountPoint),1)]),t("small",ut,u(n.mount.percent)+"% ",1)],6)):h("",!0)]),_:1})],36))}},gt=D(mt,[["__scopeId","data-v-9509d7a0"]]),ft={class:"row text-body g-3 mb-5"},_t={class:"col-md-6 col-sm-12 col-xl-3"},ht={class:"d-flex align-items-center"},pt={class:"text-muted"},yt={class:"ms-auto"},bt={key:0},vt={key:1,class:"spinner-border spinner-border-sm"},xt={class:"progress",role:"progressbar",style:{height:"6px"}},St={class:"d-flex mt-2 gap-1"},Ct={class:"col-md-6 col-sm-12 col-xl-3"},wt={class:"d-flex align-items-center"},kt={class:"text-muted"},$t={class:"ms-auto"},Dt={key:0},Lt={key:1,class:"spinner-border spinner-border-sm"},Pt={class:"progress",role:"progressbar",style:{height:"6px"}},Tt={class:"d-flex mt-2 gap-1"},Mt={class:"col-md-6 col-sm-12 col-xl-3"},Bt={class:"d-flex align-items-center"},Nt={class:"text-muted"},Ut={class:"ms-auto"},Kt={key:0},Gt={key:1,class:"spinner-border spinner-border-sm"},Vt={class:"progress",role:"progressbar",style:{height:"6px"}},It={class:"col-md-6 col-sm-12 col-xl-3"},Rt={class:"d-flex align-items-center"},Ot={class:"text-muted"},Wt={class:"ms-auto"},qt={key:0},Ft={key:1,class:"spinner-border spinner-border-sm"},zt={__name:"systemStatusWidget",setup(n){const s=N();let e=null;O(()=>{_(),e=setInterval(()=>{_()},5e3)}),W(()=>{clearInterval(e)});const _=()=>{B("/api/systemStatus",{},g=>{s.SystemStatus=g.data})},a=G(()=>s.SystemStatus);return(g,d)=>(o(),i("div",ft,[t("div",_t,[t("div",ht,[t("h6",pt,[d[0]||(d[0]=t("i",{class:"bi bi-cpu-fill me-2"},null,-1)),l(S,{t:"CPU"})]),t("h6",yt,[a.value?(o(),i("span",bt,u(a.value.CPU.cpu_percent)+"% ",1)):(o(),i("span",vt))])]),t("div",xt,[t("div",{class:"progress-bar",style:C({width:`${a.value?.CPU.cpu_percent}%`})},null,4)]),t("div",St,[(o(!0),i(w,null,k(a.value?.CPU.cpu_percent_per_cpu,(r,c)=>(o(),y(E,{key:c,align:c+1>Math.round(a.value?.CPU.cpu_percent_per_cpu.length/2),core_number:c,percentage:r},null,8,["align","core_number","percentage"]))),128))])]),t("div",Ct,[t("div",wt,[t("h6",kt,[d[1]||(d[1]=t("i",{class:"bi bi-device-ssd-fill me-2"},null,-1)),l(S,{t:"Storage"})]),t("h6",$t,[a.value?(o(),i("span",Dt,u(a.value.Disks.find(r=>r.mountPoint==="/")?a.value?.Disks.find(r=>r.mountPoint==="/").percent:a.value?.Disks[0].percent)+"% ",1)):(o(),i("span",Lt))])]),t("div",Pt,[t("div",{class:"progress-bar bg-success",style:C({width:`${a.value?.Disks.find(r=>r.mountPoint==="/")?a.value?.Disks.find(r=>r.mountPoint==="/").percent:a.value?.Disks[0].percent}%`})},null,4)]),t("div",Tt,[a.value?(o(!0),i(w,{key:0},k(a.value?.Disks,(r,c)=>(o(),y(gt,{key:r.mountPoint,align:c+1>Math.round(a.value?.Disks.length/2),mount:r},null,8,["align","mount"]))),128)):h("",!0)])]),t("div",Mt,[t("div",Bt,[t("h6",Nt,[d[2]||(d[2]=t("i",{class:"bi bi-memory me-2"},null,-1)),l(S,{t:"Memory"})]),t("h6",Ut,[a.value?(o(),i("span",Kt,u(a.value?.Memory.VirtualMemory.percent)+"% ",1)):(o(),i("span",Gt))])]),t("div",Vt,[t("div",{class:"progress-bar bg-info",style:C({width:`${a.value?.Memory.VirtualMemory.percent}%`})},null,4)])]),t("div",It,[t("div",Rt,[t("h6",Ot,[d[3]||(d[3]=t("i",{class:"bi bi-memory me-2"},null,-1)),l(S,{t:"Swap Memory"})]),t("h6",Wt,[a.value?(o(),i("span",qt,u(a.value?.Memory.SwapMemory.percent)+"% ",1)):(o(),i("span",Ft))])]),d[4]||(d[4]=t("div",{class:"progress",role:"progressbar",style:{height:"6px"}},[t("div",{class:"progress-bar bg-warning",style:{width:"$ data?.Memory.SwapMemory.percent}%"}})],-1))])]))}},jt=D(zt,[["__scopeId","data-v-851170e4"]]),Et={name:"configurationList",components:{SystemStatus:jt,LocaleText:S,ConfigurationCard:dt},async setup(){return{wireguardConfigurationsStore:F()}},data(){return{configurationLoaded:!1,sort:{Name:L("Name"),Status:L("Status"),"DataUsage.Total":L("Total Usage")},currentSort:{key:"Name",order:"asc"},currentDisplay:"List",searchKey:""}},computed:{configurations(){return this.wireguardConfigurationsStore.sortConfigurations.filter(n=>n.Name.toLowerCase().includes(this.searchKey)||n.PublicKey.includes(this.searchKey)||!this.searchKey)}},methods:{dotNotation(n,s){let e=s.split(".").reduce((_,a)=>_&&_[a],n);return typeof e=="string"?e.toLowerCase():e},updateSort(n){this.wireguardConfigurationsStore.CurrentSort.key===n?this.wireguardConfigurationsStore.CurrentSort.order=this.wireguardConfigurationsStore.CurrentSort.order==="asc"?"desc":"asc":this.wireguardConfigurationsStore.CurrentSort.key=n},updateDisplay(n){this.wireguardConfigurationsStore.CurrentDisplay!==n&&(this.wireguardConfigurationsStore.CurrentDisplay=n)}}},Ht={class:"mt-md-5 mt-3"},Yt={class:"container-fluid"},At={class:"d-flex mb-4 configurationListTitle align-items-md-center gap-2 flex-column flex-md-row"},Jt={class:"text-body d-flex mb-0"},Qt={key:0,class:"text-body filter mb-3 d-flex gap-2 flex-column flex-md-row"},Xt={class:"d-flex align-items-center gap-3 align-items-center mb-3 mb-md-0"},Zt={class:"text-muted"},te={class:"d-flex ms-auto ms-lg-0"},ee=["onClick"],se={class:"align-items-center gap-3 align-items-center mb-3 mb-md-0 d-none d-lg-flex"},oe={class:"text-muted"},ne={class:"d-flex ms-auto ms-lg-0"},ae=["onClick"],ie={class:"d-flex align-items-center ms-md-auto"},re={class:"row g-3 mb-2"},le={class:"text-muted col-12",key:"noConfiguration"};function de(n,s,e,_,a,g){const d=p("SystemStatus"),r=p("LocaleText"),c=p("RouterLink"),$=p("ConfigurationCard");return o(),i("div",Ht,[t("div",Yt,[l(d),t("div",At,[t("h2",Jt,[l(r,{t:"WireGuard Configurations"})]),l(c,{to:"/new_configuration",class:"ms-md-auto py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:x(()=>[s[1]||(s[1]=t("i",{class:"bi bi-plus-circle me-2"},null,-1)),l(r,{t:"Configuration"})]),_:1}),l(c,{to:"/restore_configuration",class:"py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:x(()=>[s[2]||(s[2]=t("i",{class:"bi bi-clock-history me-2"},null,-1)),l(r,{t:"Restore"})]),_:1})]),l(V,{name:"fade"},{default:x(()=>[this.wireguardConfigurationsStore.ConfigurationLoaded?(o(),i("div",Qt,[t("div",Xt,[t("small",Zt,[l(r,{t:"Sort By"})]),t("div",te,[(o(!0),i(w,null,k(this.wireguardConfigurationsStore.SortOptions,(f,b)=>(o(),i("a",{role:"button",onClick:ce=>g.updateSort(b),class:m([{"bg-primary-subtle text-primary-emphasis":this.wireguardConfigurationsStore.CurrentSort.key===b},"px-2 py-1 rounded-3"])},[t("small",null,[this.wireguardConfigurationsStore.CurrentSort.key===b?(o(),i("i",{key:0,class:m(["bi me-2",[this.wireguardConfigurationsStore.CurrentSort.order==="asc"?"bi-sort-up":"bi-sort-down"]])},null,2)):h("",!0),l(r,{t:f},null,8,["t"])])],10,ee))),256))])]),t("div",se,[t("small",oe,[l(r,{t:"Display as"})]),t("div",ne,[(o(),i(w,null,k([{name:"List",key:"list"},{name:"Grid",key:"grid"}],f=>t("a",{role:"button",onClick:b=>g.updateDisplay(f.name),class:m([{"bg-primary-subtle text-primary-emphasis":this.wireguardConfigurationsStore.CurrentDisplay===f.name},"px-2 py-1 rounded-3"])},[t("small",null,[t("i",{class:m(["bi me-2","bi-"+f.key])},null,2),s[3]||(s[3]=v()),l(r,{t:f.name},null,8,["t"])])],10,ae)),64))])]),t("div",ie,[s[4]||(s[4]=t("label",{for:"configurationSearch",class:"text-muted"},[t("i",{class:"bi bi-search me-2"})],-1)),U(t("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":s[0]||(s[0]=f=>this.searchKey=f),id:"configurationSearch"},null,512),[[z,this.searchKey]])])])):h("",!0)]),_:1}),t("div",re,[l(q,{name:"fade"},{default:x(()=>[this.wireguardConfigurationsStore.ConfigurationLoaded&&this.wireguardConfigurationsStore.Configurations.length===0?(o(),i("p",le,[l(r,{t:"You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard."})])):this.wireguardConfigurationsStore.ConfigurationLoaded?(o(!0),i(w,{key:1},k(g.configurations,(f,b)=>(o(),y($,{display:this.wireguardConfigurationsStore.CurrentDisplay,delay:b*.03+"s",key:f.Name,c:f},null,8,["display","delay","c"]))),128)):h("",!0)]),_:1})])])])}const _e=D(Et,[["render",de],["__scopeId","data-v-7ed053f0"]]);export{_e as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-yQR-9bfQ.js b/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-DjeLgg0R.js
similarity index 99%
rename from src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-yQR-9bfQ.js
rename to src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-DjeLgg0R.js
index 01181a44..8835605f 100644
--- a/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-yQR-9bfQ.js
+++ b/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-DjeLgg0R.js
@@ -1 +1 @@
-import{_ as A,c as r,a as e,m as h,b as l,h as y,y as _,n as $,t as x,z as w,D as k,A as K,f as i,d as g,v as D,e as C,j as v,F as S,w as V,T as F,k as M,g as T,i as E,o as N,r as I,u as m,C as U}from"./index-DW-_CXHM.js";import{L as c}from"./localeText-DGSSxTBj.js";import{d as P}from"./dayjs.min-CkHkDA7F.js";import{Z as Y}from"./vue-datepicker-DeXH1OGI.js";const H={name:"accountSettingsInputUsername",components:{LocaleText:c},props:{targetData:String,title:String},setup(){const t=k(),s=`input_${K()}`;return{store:t,uuid:s}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(t){this.changed&&(this.updating=!0,await w("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},s=>{s.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=s.message),this.changed=!1,this.updating=!1}))}}},R={class:"form-group mb-2"},j=["for"],q=["id","disabled"],B={class:"invalid-feedback"};function z(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",R,[e("label",{for:this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:this.title},null,8,["t"])])])],8,j),h(e("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:this.uuid,"onUpdate:modelValue":s[0]||(s[0]=a=>this.value=a),onKeydown:s[1]||(s[1]=a=>this.changed=!0),onBlur:s[2]||(s[2]=a=>f.useValidation()),disabled:this.updating},null,42,q),[[_,this.value]]),e("div",B,x(this.invalidFeedback),1)])}const ft=A(H,[["render",z]]),G={name:"accountSettingsInputPassword",components:{LocaleText:c},props:{targetData:String,warning:!1,warningText:""},setup(){const t=k(),s=`input_${K()}`;return{store:t,uuid:s}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(t=>t.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await w("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}},computed:{passwordValid(){return Object.values(this.value).find(t=>t.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},W={class:"d-flex flex-column gap-2"},O={class:"row g-2"},Z={class:"col-sm"},J={class:"form-group"},Q=["for"],X=["id"],ee={key:0,class:"invalid-feedback d-block"},se={class:"col-sm"},te={class:"form-group"},ae=["for"],ie=["id"],oe={class:"col-sm"},ne={class:"form-group"},le=["for"],de=["id"],re=["disabled"];function ue(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("h6",null,[l(o,{t:"Update Password"})]),e("form",W,[e("div",O,[e("div",Z,[e("div",J,[e("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"Current Password"})])])],8,Q),h(e("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"current-password","onUpdate:modelValue":s[0]||(s[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,X),[[_,this.value.currentPassword]]),u.showInvalidFeedback?(i(),r("div",ee,x(this.invalidFeedback),1)):g("",!0)])]),e("div",se,[e("div",te,[e("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"New Password"})])])],8,ae),h(e("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":s[1]||(s[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,ie),[[_,this.value.newPassword]])])]),e("div",oe,[e("div",ne,[e("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"Repeat New Password"})])])],8,le),h(e("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":s[2]||(s[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,de),[[_,this.value.repeatNewPassword]])])])]),e("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:s[3]||(s[3]=a=>this.useValidation())},[s[4]||(s[4]=e("i",{class:"bi bi-save2-fill me-2"},null,-1)),l(o,{t:"Save"})],8,re)])])}const gt=A(G,[["render",ue]]),ce={name:"dashboardTheme",components:{LocaleText:c},setup(){return{dashboardConfigurationStore:k()}},methods:{async switchTheme(t){await w("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},s=>{s.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},me={class:"text-muted mb-1 d-block"},he={class:"d-flex gap-1"};function pe(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("small",me,[e("strong",null,[l(o,{t:"Theme"})])]),e("div",he,[e("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:s[0]||(s[0]=a=>this.switchTheme("light"))},[s[2]||(s[2]=e("i",{class:"bi bi-sun-fill me-2"},null,-1)),l(o,{t:"Light"})],2),e("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:s[1]||(s[1]=a=>this.switchTheme("dark"))},[s[3]||(s[3]=e("i",{class:"bi bi-moon-fill me-2"},null,-1)),l(o,{t:"Dark"})],2)])])}const _t=A(ce,[["render",pe]]),be={name:"newDashboardAPIKey",components:{LocaleText:c,VueDatePicker:Y},data(){return{newKeyData:{ExpiredAt:P().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),NeverExpire:!1},submitting:!1}},setup(){return{store:k()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,w("/api/newDashboardAPIKey",this.newKeyData,t=>{t.status?(this.$emit("created",t.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",t.message,"danger"),this.submitting=!1})},fixDate(t){return console.log(P(t).format("YYYY-MM-DDTHH:mm:ss")),P(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=P(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},fe={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)","z-index":"9999"}},ge={class:"card m-auto rounded-3 mt-5"},_e={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},ve={class:"mb-0"},ye={class:"card-body d-flex gap-2 p-4 flex-column"},we={class:"text-muted"},$e={class:"d-flex align-items-center gap-2"},ke={class:"form-check"},xe=["disabled"],Ae={class:"form-check-label",for:"neverExpire"},Pe={key:0,class:"bi bi-check-lg me-2"};function Ce(t,s,p,b,u,f){const o=y("LocaleText"),a=y("VueDatePicker");return i(),r("div",fe,[e("div",ge,[e("div",_e,[e("h6",ve,[l(o,{t:"Create API Key"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:s[0]||(s[0]=n=>this.$emit("close"))})]),e("div",ye,[e("small",we,[l(o,{t:"When should this API Key expire?"})]),e("div",$e,[l(a,{style:{"z-index":"9999"},is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.NeverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),e("div",ke,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=n=>this.newKeyData.NeverExpire=n),id:"neverExpire",disabled:this.submitting},null,8,xe),[[D,this.newKeyData.NeverExpire]]),e("label",Ae,[l(o,{t:"Never Expire"}),s[3]||(s[3]=C(" (",-1)),s[4]||(s[4]=e("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),l(o,{t:"Don't think that's a good idea"}),s[5]||(s[5]=C(") ",-1))])]),e("button",{class:$(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:s[2]||(s[2]=n=>this.submitNewAPIKey())},[this.submitting?g("",!0):(i(),r("i",Pe)),this.submitting?(i(),v(o,{key:1,t:"Creating..."})):(i(),v(o,{key:2,t:"Create"}))],2)])])])}const De=A(be,[["render",Ce]]),Ie={name:"dashboardAPIKey",components:{LocaleText:c},props:{apiKey:Object},setup(){return{store:k()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){w("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},t=>{t.status?(this.$emit("deleted",t.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",t.message,"danger")})}}},Ke={class:"card rounded-3 shadow-sm"},Se={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},Te={class:"d-flex align-items-center gap-2"},Ve={class:"text-muted"},Ee={style:{"word-break":"break-all"}},Le={class:"d-flex align-items-center gap-2 ms-auto"},Fe={class:"text-muted"},Me={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function Ne(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",Ke,[this.confirmDelete?(i(),r(S,{key:1},[this.store.getActiveCrossServer()?g("",!0):(i(),r("div",Me,[l(o,{t:"Are you sure to delete this API key?"}),e("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:s[1]||(s[1]=a=>this.deleteAPIKey())},[...s[4]||(s[4]=[e("i",{class:"bi bi-check-lg"},null,-1)])]),e("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:s[2]||(s[2]=a=>this.confirmDelete=!1)},[...s[5]||(s[5]=[e("i",{class:"bi bi-x-lg"},null,-1)])])]))],64)):(i(),r("div",Se,[e("div",Te,[e("small",Ve,[l(o,{t:"Key"})]),e("span",Ee,x(this.apiKey.Key),1)]),e("div",Le,[e("small",Fe,[l(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?g("",!0):(i(),v(o,{key:0,t:"Never Expire"})),e("span",null,x(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?g("",!0):(i(),r("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:s[0]||(s[0]=a=>this.confirmDelete=!0)},[...s[3]||(s[3]=[e("i",{class:"bi bi-trash-fill"},null,-1)])]))]))])}const Ue=A(Ie,[["render",Ne],["__scopeId","data-v-a76253c8"]]),Ye={name:"dashboardAPIKeys",components:{LocaleText:c,DashboardAPIKey:Ue,NewDashboardAPIKey:De},setup(){return{store:k()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await w("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},t=>{t.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed to ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(t){t?T("/api/getDashboardAPIKeys",{},s=>{s.status?this.apiKeys=s.data:(this.apiKeys=[],this.store.newMessage("Server",s.message,"danger"))}):this.apiKeys=[]}}}},He={class:"card rounded-3"},Re={class:"my-2"},je={key:0,class:"form-check form-switch ms-auto"},qe={class:"form-check-label",for:"allowAPIKeysSwitch"},Be={key:0,class:"card-body position-relative d-flex flex-column gap-2"},ze={key:1,class:"card",style:{height:"300px"}},Ge={class:"card-body d-flex text-muted"},We={class:"m-auto"},Oe={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function Ze(t,s,p,b,u,f){const o=y("LocaleText"),a=y("DashboardAPIKey"),n=y("NewDashboardAPIKey");return i(),r("div",He,[e("div",{class:$(["card-header d-flex align-items-center",{"border-bottom-0 rounded-3":!this.value}])},[e("h6",Re,[s[6]||(s[6]=e("i",{class:"bi bi-key-fill me-2"},null,-1)),l(o,{t:"API Keys"})]),this.store.getActiveCrossServer()?g("",!0):(i(),r("div",je,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=d=>this.value=d),onChange:s[1]||(s[1]=d=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[D,this.value]]),e("label",qe,[this.value?(i(),v(o,{key:0,t:"Enabled"})):(i(),v(o,{key:1,t:"Disabled"}))])]))],2),this.value?(i(),r("div",Be,[this.store.getActiveCrossServer()?g("",!0):(i(),r("button",{key:0,class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:s[2]||(s[2]=d=>this.newDashboardAPIKey=!0)},[s[7]||(s[7]=e("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),l(o,{t:"API Key"})])),this.apiKeys.length===0?(i(),r("div",ze,[e("div",Ge,[e("span",We,[l(o,{t:"No WGDashboard API Key"})])])])):(i(),r("div",Oe,[l(F,{name:"apiKey"},{default:V(()=>[(i(!0),r(S,null,E(this.apiKeys,d=>(i(),v(a,{apiKey:d,key:d.Key,onDeleted:s[3]||(s[3]=L=>this.apiKeys=L)},null,8,["apiKey"]))),128))]),_:1})])),l(M,{name:"zoomReversed"},{default:V(()=>[this.newDashboardAPIKey?(i(),v(n,{key:0,onCreated:s[4]||(s[4]=d=>this.apiKeys=d),onClose:s[5]||(s[5]=d=>this.newDashboardAPIKey=!1)})):g("",!0)]),_:1})])):g("",!0)])}const vt=A(Ye,[["render",Ze],["__scopeId","data-v-f7e62927"]]),Je={name:"accountSettingsMFA",components:{LocaleText:c},setup(){const t=k(),s=`input_${K()}`;return{store:t,uuid:s}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await w("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await w("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},s=>{s.status&&this.$router.push("/2FASetup")})})}}},Qe={class:"d-flex align-items-center"},Xe={class:"form-check form-switch"},es={for:"allowMFAKeysSwitch"};function ss(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("div",Qe,[e("div",Xe,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[D,this.status]]),e("label",es,[this.status?(i(),v(o,{key:0,t:"Enabled"})):(i(),v(o,{key:1,t:"Disabled"}))])]),this.status?(i(),r("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:s[1]||(s[1]=a=>this.resetMFA())},[s[2]||(s[2]=e("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(i(),v(o,{key:0,t:"Reset"})):(i(),v(o,{key:1,t:"Setup"})),s[3]||(s[3]=C(" MFA ",-1))])):g("",!0)])])}const yt=A(Je,[["render",ss]]),ts={name:"dashboardLanguage",components:{LocaleText:c},setup(){return{store:k()}},data(){return{languages:void 0}},mounted(){T("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){w("/api/locale/update",{lang_id:t},s=>{s.status?(this.store.Configuration.Server.dashboard_language=t,this.store.Locale=s.data):this.store.newMessage("Server","WGDashboard language update failed","danger")})}},computed:{currentLanguage(){let t=this.store.Configuration.Server.dashboard_language;return this.languages.find(s=>s.lang_id===t)}}},as={class:"text-muted d-block mb-1"},is={class:"d-flex gap-2"},os={class:"dropdown w-100"},ns=["disabled"],ls={key:1},ds={class:"dropdown-menu rounded-3 shadow",style:{"max-height":"500px","overflow-y":"scroll"}},rs=["onClick"],us={class:"me-auto mb-0"},cs={class:"d-block",style:{"font-size":"0.8rem"}},ms={key:0,class:"bi bi-check text-primary fs-5"};function hs(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("small",as,[e("strong",null,[l(o,{t:"Language"})])]),e("div",is,[e("div",os,[e("button",{class:"btn bg-primary-subtle text-primary-emphasis dropdown-toggle w-100 rounded-3",disabled:!this.languages,type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[this.languages?(i(),r("span",ls,x(f.currentLanguage?.lang_name_localized),1)):(i(),v(o,{key:0,t:"Loading..."}))],8,ns),e("ul",ds,[(i(!0),r(S,null,E(this.languages,a=>(i(),r("li",null,[e("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:n=>this.changeLanguage(a.lang_id)},[e("p",us,[C(x(a.lang_name_localized)+" ",1),e("small",cs,x(a.lang_name),1)]),f.currentLanguage?.lang_id===a.lang_id?(i(),r("i",ms)):g("",!0)],8,rs)]))),256))])])])])}const wt=A(ts,[["render",hs],["__scopeId","data-v-4e34593e"]]),ps={name:"dashboardIPPortInput",components:{LocaleText:c},setup(){return{store:k()}},data(){return{ipAddress:"",port:0,invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.ipAddress=this.store.Configuration.Server.app_ip,this.port=this.store.Configuration.Server.app_port},methods:{async useValidation(t,s,p){this.changed&&(this.updating=!0,await w("/api/updateDashboardConfigurationItem",{section:"Server",key:s,value:p},b=>{b.status?(t.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[s]=p,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=b.message),this.changed=!1,this.updating=!1}))}}},bs={class:"row g-2"},fs={class:"col-sm"},gs={class:"form-group"},_s={for:"input_dashboard_ip",class:"text-muted mb-1"},vs=["disabled"],ys={class:"invalid-feedback"},ws={class:"col-sm"},$s={class:"form-group"},ks={for:"input_dashboard_ip",class:"text-muted mb-1"},xs=["disabled"],As={class:"invalid-feedback"},Ps={class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mb-2 mt-2"};function Cs(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("div",bs,[e("div",fs,[e("div",gs,[e("label",_s,[e("strong",null,[e("small",null,[l(o,{t:"IP Address / Hostname"})])])]),h(e("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":s[0]||(s[0]=a=>this.ipAddress=a),onKeydown:s[1]||(s[1]=a=>this.changed=!0),onBlur:s[2]||(s[2]=a=>f.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,vs),[[_,this.ipAddress]]),e("div",ys,x(this.invalidFeedback),1)])]),e("div",ws,[e("div",$s,[e("label",ks,[e("strong",null,[e("small",null,[l(o,{t:"Listen Port"})])])]),h(e("input",{type:"number",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":s[3]||(s[3]=a=>this.port=a),onKeydown:s[4]||(s[4]=a=>this.changed=!0),onBlur:s[5]||(s[5]=a=>f.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,xs),[[_,this.port]]),e("div",As,x(this.invalidFeedback),1)])])]),e("div",Ps,[e("small",null,[s[6]||(s[6]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),l(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])}const $t=A(ps,[["render",Cs]]),Ds={class:"card"},Is={class:"card-header"},Ks={class:"my-2 d-flex"},Ss={key:0,class:"text-success ms-auto"},Ts={class:"card-body d-flex flex-column gap-3"},Vs={class:"row gx-2 gy-2"},Es={class:"col-12"},Ls={class:"form-check mb-2 form-switch"},Fs={class:"form-check-label",for:"authentication_required"},Ms={class:"col-12 col-lg-4"},Ns={class:"form-group"},Us={for:"server",class:"text-muted mb-1"},Ys={class:"col-12 col-lg-4"},Hs={class:"form-group"},Rs={for:"port",class:"text-muted mb-1"},js={class:"col-12 col-lg-4"},qs={class:"form-group"},Bs={for:"encryption",class:"text-muted mb-1"},zs={value:"NOTLS"},Gs={key:0,class:"col-12 col-lg-4"},Ws={class:"form-group"},Os={for:"username",class:"text-muted mb-1"},Zs={key:1,class:"col-12 col-lg-4"},Js={class:"form-group"},Qs={for:"email_password",class:"text-muted mb-1"},Xs={class:"col-12 col-lg-4"},et={class:"form-group"},st={for:"send_from",class:"text-muted mb-1"},tt={key:0},at={key:1},it={class:"text-muted mb-1",for:"test_email"},ot={class:"fw-bold"},nt=["disabled"],lt=["disabled"],dt={key:0,class:"bi bi-send me-2"},rt={key:1,class:"spinner-border spinner-border-sm me-2"},ut={class:"text-muted mb-1",for:"email_template"},ct={class:"fw-bold"},kt={__name:"dashboardEmailSettings",setup(t){const s=k();N(()=>{f(),document.querySelectorAll("#emailAccount input, #emailAccount select, #email_template").forEach(a=>{a.addEventListener("change",async()=>{let n=a.attributes.getNamedItem("id").value;await w("/api/updateDashboardConfigurationItem",{section:"Email",key:n,value:s.Configuration.Email[n]},d=>{d.status?(a.classList.remove("is-invalid"),a.classList.add("is-valid")):(a.classList.remove("is-valid"),a.classList.add("is-invalid")),f()})})})});const p=I(!1),b=I(""),u=I(!1),f=async()=>{await T("/api/email/ready",{},a=>{p.value=a.status})},o=async()=>{u.value=!0,await w("/api/email/send",{Receiver:b.value,Subject:"WGDashboard Testing Email",Body:"Test 1, 2, 3! Hello World :)"},a=>{a.status?s.newMessage("Server","Test email sent successfully!","success"):s.newMessage("Server",`Test email sent failed! Reason: ${a.message}`,"danger"),u.value=!1})};return(a,n)=>(i(),r("div",Ds,[e("div",Is,[e("h6",Ks,[n[12]||(n[12]=e("i",{class:"bi bi-envelope-fill me-2"},null,-1)),l(c,{t:"Email Account"}),p.value?(i(),r("span",Ss,[n[11]||(n[11]=e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),l(c,{t:"Ready"})])):g("",!0)])]),e("div",Ts,[e("form",{onSubmit:n[7]||(n[7]=d=>d.preventDefault(d)),id:"emailAccount"},[e("div",Vs,[e("div",Es,[e("div",Ls,[h(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":n[0]||(n[0]=d=>m(s).Configuration.Email.authentication_required=d),id:"authentication_required"},null,512),[[D,m(s).Configuration.Email.authentication_required]]),e("label",Fs,[l(c,{t:"Require SMTP Authentication"})])])]),e("div",Ms,[e("div",Ns,[e("label",Us,[e("strong",null,[e("small",null,[l(c,{t:"Server"})])])]),h(e("input",{id:"server","onUpdate:modelValue":n[1]||(n[1]=d=>m(s).Configuration.Email.server=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.server]])])]),e("div",Ys,[e("div",Hs,[e("label",Rs,[e("strong",null,[e("small",null,[l(c,{t:"Port"})])])]),h(e("input",{id:"port","onUpdate:modelValue":n[2]||(n[2]=d=>m(s).Configuration.Email.port=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.port]])])]),e("div",js,[e("div",qs,[e("label",Bs,[e("strong",null,[e("small",null,[l(c,{t:"Encryption"})])])]),h(e("select",{class:"form-select rounded-3","onUpdate:modelValue":n[3]||(n[3]=d=>m(s).Configuration.Email.encryption=d),id:"encryption"},[n[13]||(n[13]=e("option",{value:"STARTTLS"}," STARTTLS ",-1)),e("option",zs,[l(c,{t:"No Encryption"})])],512),[[U,m(s).Configuration.Email.encryption]])])]),m(s).Configuration.Email.authentication_required?(i(),r("div",Gs,[e("div",Ws,[e("label",Os,[e("strong",null,[e("small",null,[l(c,{t:"Username"})])])]),h(e("input",{id:"username","onUpdate:modelValue":n[4]||(n[4]=d=>m(s).Configuration.Email.username=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.username]])])])):g("",!0),m(s).Configuration.Email.authentication_required?(i(),r("div",Zs,[e("div",Js,[e("label",Qs,[e("strong",null,[e("small",null,[l(c,{t:"Password"})])])]),h(e("input",{id:"email_password","onUpdate:modelValue":n[5]||(n[5]=d=>m(s).Configuration.Email.email_password=d),type:"password",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.email_password]])])])):g("",!0),e("div",Xs,[e("div",et,[e("label",st,[e("strong",null,[e("small",null,[l(c,{t:"Send From"})])])]),h(e("input",{id:"send_from","onUpdate:modelValue":n[6]||(n[6]=d=>m(s).Configuration.Email.send_from=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.send_from]])])])])],32),p.value?(i(),r("hr",tt)):g("",!0),p.value?(i(),r("div",at,[e("label",it,[e("small",ot,[l(c,{t:"Send Test Email"})])]),e("form",{onSubmit:n[9]||(n[9]=d=>{d.preventDefault(),o()}),class:"input-group"},[h(e("input",{type:"email",class:"form-control rounded-start-3",id:"test_email",placeholder:"john@example.com","onUpdate:modelValue":n[8]||(n[8]=d=>b.value=d),disabled:u.value},null,8,nt),[[_,b.value]]),e("button",{class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-end-3",type:"submit",value:"Submit",disabled:b.value.length===0||u.value,id:"button-addon2"},[u.value?(i(),r("span",rt)):(i(),r("i",dt)),l(c,{t:u.value?"Sending...":"Send"},null,8,["t"])],8,lt)],32)])):g("",!0),n[14]||(n[14]=e("hr",null,null,-1)),e("div",null,[e("label",ut,[e("small",ct,[l(c,{t:"Email Body Template"})])]),h(e("textarea",{class:"form-control rounded-3 font-monospace","onUpdate:modelValue":n[10]||(n[10]=d=>m(s).Configuration.Email.email_template=d),id:"email_template",style:{"min-height":"400px"}},null,512),[[_,m(s).Configuration.Email.email_template]])])])]))}};export{ft as A,_t as D,kt as _,gt as a,vt as b,yt as c,wt as d,$t as e};
+import{_ as A,c as r,a as e,m as h,b as l,h as y,y as _,n as $,t as x,z as w,D as k,A as K,f as i,d as g,v as D,e as C,j as v,F as S,w as V,T as F,k as M,g as T,i as E,o as N,r as I,u as m,C as U}from"./index-BCe-EVqv.js";import{L as c}from"./localeText-fe5sRLWX.js";import{d as P}from"./dayjs.min-Ba6APokV.js";import{Z as Y}from"./vue-datepicker-D-ia9qje.js";const H={name:"accountSettingsInputUsername",components:{LocaleText:c},props:{targetData:String,title:String},setup(){const t=k(),s=`input_${K()}`;return{store:t,uuid:s}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(t){this.changed&&(this.updating=!0,await w("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},s=>{s.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=s.message),this.changed=!1,this.updating=!1}))}}},R={class:"form-group mb-2"},j=["for"],q=["id","disabled"],B={class:"invalid-feedback"};function z(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",R,[e("label",{for:this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:this.title},null,8,["t"])])])],8,j),h(e("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:this.uuid,"onUpdate:modelValue":s[0]||(s[0]=a=>this.value=a),onKeydown:s[1]||(s[1]=a=>this.changed=!0),onBlur:s[2]||(s[2]=a=>f.useValidation()),disabled:this.updating},null,42,q),[[_,this.value]]),e("div",B,x(this.invalidFeedback),1)])}const ft=A(H,[["render",z]]),G={name:"accountSettingsInputPassword",components:{LocaleText:c},props:{targetData:String,warning:!1,warningText:""},setup(){const t=k(),s=`input_${K()}`;return{store:t,uuid:s}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(t=>t.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await w("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}},computed:{passwordValid(){return Object.values(this.value).find(t=>t.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},W={class:"d-flex flex-column gap-2"},O={class:"row g-2"},Z={class:"col-sm"},J={class:"form-group"},Q=["for"],X=["id"],ee={key:0,class:"invalid-feedback d-block"},se={class:"col-sm"},te={class:"form-group"},ae=["for"],ie=["id"],oe={class:"col-sm"},ne={class:"form-group"},le=["for"],de=["id"],re=["disabled"];function ue(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("h6",null,[l(o,{t:"Update Password"})]),e("form",W,[e("div",O,[e("div",Z,[e("div",J,[e("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"Current Password"})])])],8,Q),h(e("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"current-password","onUpdate:modelValue":s[0]||(s[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,X),[[_,this.value.currentPassword]]),u.showInvalidFeedback?(i(),r("div",ee,x(this.invalidFeedback),1)):g("",!0)])]),e("div",se,[e("div",te,[e("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"New Password"})])])],8,ae),h(e("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":s[1]||(s[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,ie),[[_,this.value.newPassword]])])]),e("div",oe,[e("div",ne,[e("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"Repeat New Password"})])])],8,le),h(e("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":s[2]||(s[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,de),[[_,this.value.repeatNewPassword]])])])]),e("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:s[3]||(s[3]=a=>this.useValidation())},[s[4]||(s[4]=e("i",{class:"bi bi-save2-fill me-2"},null,-1)),l(o,{t:"Save"})],8,re)])])}const gt=A(G,[["render",ue]]),ce={name:"dashboardTheme",components:{LocaleText:c},setup(){return{dashboardConfigurationStore:k()}},methods:{async switchTheme(t){await w("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},s=>{s.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},me={class:"text-muted mb-1 d-block"},he={class:"d-flex gap-1"};function pe(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("small",me,[e("strong",null,[l(o,{t:"Theme"})])]),e("div",he,[e("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:s[0]||(s[0]=a=>this.switchTheme("light"))},[s[2]||(s[2]=e("i",{class:"bi bi-sun-fill me-2"},null,-1)),l(o,{t:"Light"})],2),e("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:s[1]||(s[1]=a=>this.switchTheme("dark"))},[s[3]||(s[3]=e("i",{class:"bi bi-moon-fill me-2"},null,-1)),l(o,{t:"Dark"})],2)])])}const _t=A(ce,[["render",pe]]),be={name:"newDashboardAPIKey",components:{LocaleText:c,VueDatePicker:Y},data(){return{newKeyData:{ExpiredAt:P().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),NeverExpire:!1},submitting:!1}},setup(){return{store:k()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,w("/api/newDashboardAPIKey",this.newKeyData,t=>{t.status?(this.$emit("created",t.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",t.message,"danger"),this.submitting=!1})},fixDate(t){return console.log(P(t).format("YYYY-MM-DDTHH:mm:ss")),P(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=P(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},fe={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)","z-index":"9999"}},ge={class:"card m-auto rounded-3 mt-5"},_e={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},ve={class:"mb-0"},ye={class:"card-body d-flex gap-2 p-4 flex-column"},we={class:"text-muted"},$e={class:"d-flex align-items-center gap-2"},ke={class:"form-check"},xe=["disabled"],Ae={class:"form-check-label",for:"neverExpire"},Pe={key:0,class:"bi bi-check-lg me-2"};function Ce(t,s,p,b,u,f){const o=y("LocaleText"),a=y("VueDatePicker");return i(),r("div",fe,[e("div",ge,[e("div",_e,[e("h6",ve,[l(o,{t:"Create API Key"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:s[0]||(s[0]=n=>this.$emit("close"))})]),e("div",ye,[e("small",we,[l(o,{t:"When should this API Key expire?"})]),e("div",$e,[l(a,{style:{"z-index":"9999"},is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.NeverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),e("div",ke,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=n=>this.newKeyData.NeverExpire=n),id:"neverExpire",disabled:this.submitting},null,8,xe),[[D,this.newKeyData.NeverExpire]]),e("label",Ae,[l(o,{t:"Never Expire"}),s[3]||(s[3]=C(" (",-1)),s[4]||(s[4]=e("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),l(o,{t:"Don't think that's a good idea"}),s[5]||(s[5]=C(") ",-1))])]),e("button",{class:$(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:s[2]||(s[2]=n=>this.submitNewAPIKey())},[this.submitting?g("",!0):(i(),r("i",Pe)),this.submitting?(i(),v(o,{key:1,t:"Creating..."})):(i(),v(o,{key:2,t:"Create"}))],2)])])])}const De=A(be,[["render",Ce]]),Ie={name:"dashboardAPIKey",components:{LocaleText:c},props:{apiKey:Object},setup(){return{store:k()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){w("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},t=>{t.status?(this.$emit("deleted",t.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",t.message,"danger")})}}},Ke={class:"card rounded-3 shadow-sm"},Se={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},Te={class:"d-flex align-items-center gap-2"},Ve={class:"text-muted"},Ee={style:{"word-break":"break-all"}},Le={class:"d-flex align-items-center gap-2 ms-auto"},Fe={class:"text-muted"},Me={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function Ne(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",Ke,[this.confirmDelete?(i(),r(S,{key:1},[this.store.getActiveCrossServer()?g("",!0):(i(),r("div",Me,[l(o,{t:"Are you sure to delete this API key?"}),e("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:s[1]||(s[1]=a=>this.deleteAPIKey())},[...s[4]||(s[4]=[e("i",{class:"bi bi-check-lg"},null,-1)])]),e("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:s[2]||(s[2]=a=>this.confirmDelete=!1)},[...s[5]||(s[5]=[e("i",{class:"bi bi-x-lg"},null,-1)])])]))],64)):(i(),r("div",Se,[e("div",Te,[e("small",Ve,[l(o,{t:"Key"})]),e("span",Ee,x(this.apiKey.Key),1)]),e("div",Le,[e("small",Fe,[l(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?g("",!0):(i(),v(o,{key:0,t:"Never Expire"})),e("span",null,x(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?g("",!0):(i(),r("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:s[0]||(s[0]=a=>this.confirmDelete=!0)},[...s[3]||(s[3]=[e("i",{class:"bi bi-trash-fill"},null,-1)])]))]))])}const Ue=A(Ie,[["render",Ne],["__scopeId","data-v-a76253c8"]]),Ye={name:"dashboardAPIKeys",components:{LocaleText:c,DashboardAPIKey:Ue,NewDashboardAPIKey:De},setup(){return{store:k()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await w("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},t=>{t.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed to ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(t){t?T("/api/getDashboardAPIKeys",{},s=>{s.status?this.apiKeys=s.data:(this.apiKeys=[],this.store.newMessage("Server",s.message,"danger"))}):this.apiKeys=[]}}}},He={class:"card rounded-3"},Re={class:"my-2"},je={key:0,class:"form-check form-switch ms-auto"},qe={class:"form-check-label",for:"allowAPIKeysSwitch"},Be={key:0,class:"card-body position-relative d-flex flex-column gap-2"},ze={key:1,class:"card",style:{height:"300px"}},Ge={class:"card-body d-flex text-muted"},We={class:"m-auto"},Oe={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function Ze(t,s,p,b,u,f){const o=y("LocaleText"),a=y("DashboardAPIKey"),n=y("NewDashboardAPIKey");return i(),r("div",He,[e("div",{class:$(["card-header d-flex align-items-center",{"border-bottom-0 rounded-3":!this.value}])},[e("h6",Re,[s[6]||(s[6]=e("i",{class:"bi bi-key-fill me-2"},null,-1)),l(o,{t:"API Keys"})]),this.store.getActiveCrossServer()?g("",!0):(i(),r("div",je,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=d=>this.value=d),onChange:s[1]||(s[1]=d=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[D,this.value]]),e("label",qe,[this.value?(i(),v(o,{key:0,t:"Enabled"})):(i(),v(o,{key:1,t:"Disabled"}))])]))],2),this.value?(i(),r("div",Be,[this.store.getActiveCrossServer()?g("",!0):(i(),r("button",{key:0,class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:s[2]||(s[2]=d=>this.newDashboardAPIKey=!0)},[s[7]||(s[7]=e("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),l(o,{t:"API Key"})])),this.apiKeys.length===0?(i(),r("div",ze,[e("div",Ge,[e("span",We,[l(o,{t:"No WGDashboard API Key"})])])])):(i(),r("div",Oe,[l(F,{name:"apiKey"},{default:V(()=>[(i(!0),r(S,null,E(this.apiKeys,d=>(i(),v(a,{apiKey:d,key:d.Key,onDeleted:s[3]||(s[3]=L=>this.apiKeys=L)},null,8,["apiKey"]))),128))]),_:1})])),l(M,{name:"zoomReversed"},{default:V(()=>[this.newDashboardAPIKey?(i(),v(n,{key:0,onCreated:s[4]||(s[4]=d=>this.apiKeys=d),onClose:s[5]||(s[5]=d=>this.newDashboardAPIKey=!1)})):g("",!0)]),_:1})])):g("",!0)])}const vt=A(Ye,[["render",Ze],["__scopeId","data-v-f7e62927"]]),Je={name:"accountSettingsMFA",components:{LocaleText:c},setup(){const t=k(),s=`input_${K()}`;return{store:t,uuid:s}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await w("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await w("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},s=>{s.status&&this.$router.push("/2FASetup")})})}}},Qe={class:"d-flex align-items-center"},Xe={class:"form-check form-switch"},es={for:"allowMFAKeysSwitch"};function ss(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("div",Qe,[e("div",Xe,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[D,this.status]]),e("label",es,[this.status?(i(),v(o,{key:0,t:"Enabled"})):(i(),v(o,{key:1,t:"Disabled"}))])]),this.status?(i(),r("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:s[1]||(s[1]=a=>this.resetMFA())},[s[2]||(s[2]=e("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(i(),v(o,{key:0,t:"Reset"})):(i(),v(o,{key:1,t:"Setup"})),s[3]||(s[3]=C(" MFA ",-1))])):g("",!0)])])}const yt=A(Je,[["render",ss]]),ts={name:"dashboardLanguage",components:{LocaleText:c},setup(){return{store:k()}},data(){return{languages:void 0}},mounted(){T("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){w("/api/locale/update",{lang_id:t},s=>{s.status?(this.store.Configuration.Server.dashboard_language=t,this.store.Locale=s.data):this.store.newMessage("Server","WGDashboard language update failed","danger")})}},computed:{currentLanguage(){let t=this.store.Configuration.Server.dashboard_language;return this.languages.find(s=>s.lang_id===t)}}},as={class:"text-muted d-block mb-1"},is={class:"d-flex gap-2"},os={class:"dropdown w-100"},ns=["disabled"],ls={key:1},ds={class:"dropdown-menu rounded-3 shadow",style:{"max-height":"500px","overflow-y":"scroll"}},rs=["onClick"],us={class:"me-auto mb-0"},cs={class:"d-block",style:{"font-size":"0.8rem"}},ms={key:0,class:"bi bi-check text-primary fs-5"};function hs(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("small",as,[e("strong",null,[l(o,{t:"Language"})])]),e("div",is,[e("div",os,[e("button",{class:"btn bg-primary-subtle text-primary-emphasis dropdown-toggle w-100 rounded-3",disabled:!this.languages,type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[this.languages?(i(),r("span",ls,x(f.currentLanguage?.lang_name_localized),1)):(i(),v(o,{key:0,t:"Loading..."}))],8,ns),e("ul",ds,[(i(!0),r(S,null,E(this.languages,a=>(i(),r("li",null,[e("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:n=>this.changeLanguage(a.lang_id)},[e("p",us,[C(x(a.lang_name_localized)+" ",1),e("small",cs,x(a.lang_name),1)]),f.currentLanguage?.lang_id===a.lang_id?(i(),r("i",ms)):g("",!0)],8,rs)]))),256))])])])])}const wt=A(ts,[["render",hs],["__scopeId","data-v-4e34593e"]]),ps={name:"dashboardIPPortInput",components:{LocaleText:c},setup(){return{store:k()}},data(){return{ipAddress:"",port:0,invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.ipAddress=this.store.Configuration.Server.app_ip,this.port=this.store.Configuration.Server.app_port},methods:{async useValidation(t,s,p){this.changed&&(this.updating=!0,await w("/api/updateDashboardConfigurationItem",{section:"Server",key:s,value:p},b=>{b.status?(t.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[s]=p,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=b.message),this.changed=!1,this.updating=!1}))}}},bs={class:"row g-2"},fs={class:"col-sm"},gs={class:"form-group"},_s={for:"input_dashboard_ip",class:"text-muted mb-1"},vs=["disabled"],ys={class:"invalid-feedback"},ws={class:"col-sm"},$s={class:"form-group"},ks={for:"input_dashboard_ip",class:"text-muted mb-1"},xs=["disabled"],As={class:"invalid-feedback"},Ps={class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mb-2 mt-2"};function Cs(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("div",bs,[e("div",fs,[e("div",gs,[e("label",_s,[e("strong",null,[e("small",null,[l(o,{t:"IP Address / Hostname"})])])]),h(e("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":s[0]||(s[0]=a=>this.ipAddress=a),onKeydown:s[1]||(s[1]=a=>this.changed=!0),onBlur:s[2]||(s[2]=a=>f.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,vs),[[_,this.ipAddress]]),e("div",ys,x(this.invalidFeedback),1)])]),e("div",ws,[e("div",$s,[e("label",ks,[e("strong",null,[e("small",null,[l(o,{t:"Listen Port"})])])]),h(e("input",{type:"number",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":s[3]||(s[3]=a=>this.port=a),onKeydown:s[4]||(s[4]=a=>this.changed=!0),onBlur:s[5]||(s[5]=a=>f.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,xs),[[_,this.port]]),e("div",As,x(this.invalidFeedback),1)])])]),e("div",Ps,[e("small",null,[s[6]||(s[6]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),l(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])}const $t=A(ps,[["render",Cs]]),Ds={class:"card"},Is={class:"card-header"},Ks={class:"my-2 d-flex"},Ss={key:0,class:"text-success ms-auto"},Ts={class:"card-body d-flex flex-column gap-3"},Vs={class:"row gx-2 gy-2"},Es={class:"col-12"},Ls={class:"form-check mb-2 form-switch"},Fs={class:"form-check-label",for:"authentication_required"},Ms={class:"col-12 col-lg-4"},Ns={class:"form-group"},Us={for:"server",class:"text-muted mb-1"},Ys={class:"col-12 col-lg-4"},Hs={class:"form-group"},Rs={for:"port",class:"text-muted mb-1"},js={class:"col-12 col-lg-4"},qs={class:"form-group"},Bs={for:"encryption",class:"text-muted mb-1"},zs={value:"NOTLS"},Gs={key:0,class:"col-12 col-lg-4"},Ws={class:"form-group"},Os={for:"username",class:"text-muted mb-1"},Zs={key:1,class:"col-12 col-lg-4"},Js={class:"form-group"},Qs={for:"email_password",class:"text-muted mb-1"},Xs={class:"col-12 col-lg-4"},et={class:"form-group"},st={for:"send_from",class:"text-muted mb-1"},tt={key:0},at={key:1},it={class:"text-muted mb-1",for:"test_email"},ot={class:"fw-bold"},nt=["disabled"],lt=["disabled"],dt={key:0,class:"bi bi-send me-2"},rt={key:1,class:"spinner-border spinner-border-sm me-2"},ut={class:"text-muted mb-1",for:"email_template"},ct={class:"fw-bold"},kt={__name:"dashboardEmailSettings",setup(t){const s=k();N(()=>{f(),document.querySelectorAll("#emailAccount input, #emailAccount select, #email_template").forEach(a=>{a.addEventListener("change",async()=>{let n=a.attributes.getNamedItem("id").value;await w("/api/updateDashboardConfigurationItem",{section:"Email",key:n,value:s.Configuration.Email[n]},d=>{d.status?(a.classList.remove("is-invalid"),a.classList.add("is-valid")):(a.classList.remove("is-valid"),a.classList.add("is-invalid")),f()})})})});const p=I(!1),b=I(""),u=I(!1),f=async()=>{await T("/api/email/ready",{},a=>{p.value=a.status})},o=async()=>{u.value=!0,await w("/api/email/send",{Receiver:b.value,Subject:"WGDashboard Testing Email",Body:"Test 1, 2, 3! Hello World :)"},a=>{a.status?s.newMessage("Server","Test email sent successfully!","success"):s.newMessage("Server",`Test email sent failed! Reason: ${a.message}`,"danger"),u.value=!1})};return(a,n)=>(i(),r("div",Ds,[e("div",Is,[e("h6",Ks,[n[12]||(n[12]=e("i",{class:"bi bi-envelope-fill me-2"},null,-1)),l(c,{t:"Email Account"}),p.value?(i(),r("span",Ss,[n[11]||(n[11]=e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),l(c,{t:"Ready"})])):g("",!0)])]),e("div",Ts,[e("form",{onSubmit:n[7]||(n[7]=d=>d.preventDefault(d)),id:"emailAccount"},[e("div",Vs,[e("div",Es,[e("div",Ls,[h(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":n[0]||(n[0]=d=>m(s).Configuration.Email.authentication_required=d),id:"authentication_required"},null,512),[[D,m(s).Configuration.Email.authentication_required]]),e("label",Fs,[l(c,{t:"Require SMTP Authentication"})])])]),e("div",Ms,[e("div",Ns,[e("label",Us,[e("strong",null,[e("small",null,[l(c,{t:"Server"})])])]),h(e("input",{id:"server","onUpdate:modelValue":n[1]||(n[1]=d=>m(s).Configuration.Email.server=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.server]])])]),e("div",Ys,[e("div",Hs,[e("label",Rs,[e("strong",null,[e("small",null,[l(c,{t:"Port"})])])]),h(e("input",{id:"port","onUpdate:modelValue":n[2]||(n[2]=d=>m(s).Configuration.Email.port=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.port]])])]),e("div",js,[e("div",qs,[e("label",Bs,[e("strong",null,[e("small",null,[l(c,{t:"Encryption"})])])]),h(e("select",{class:"form-select rounded-3","onUpdate:modelValue":n[3]||(n[3]=d=>m(s).Configuration.Email.encryption=d),id:"encryption"},[n[13]||(n[13]=e("option",{value:"STARTTLS"}," STARTTLS ",-1)),e("option",zs,[l(c,{t:"No Encryption"})])],512),[[U,m(s).Configuration.Email.encryption]])])]),m(s).Configuration.Email.authentication_required?(i(),r("div",Gs,[e("div",Ws,[e("label",Os,[e("strong",null,[e("small",null,[l(c,{t:"Username"})])])]),h(e("input",{id:"username","onUpdate:modelValue":n[4]||(n[4]=d=>m(s).Configuration.Email.username=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.username]])])])):g("",!0),m(s).Configuration.Email.authentication_required?(i(),r("div",Zs,[e("div",Js,[e("label",Qs,[e("strong",null,[e("small",null,[l(c,{t:"Password"})])])]),h(e("input",{id:"email_password","onUpdate:modelValue":n[5]||(n[5]=d=>m(s).Configuration.Email.email_password=d),type:"password",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.email_password]])])])):g("",!0),e("div",Xs,[e("div",et,[e("label",st,[e("strong",null,[e("small",null,[l(c,{t:"Send From"})])])]),h(e("input",{id:"send_from","onUpdate:modelValue":n[6]||(n[6]=d=>m(s).Configuration.Email.send_from=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.send_from]])])])])],32),p.value?(i(),r("hr",tt)):g("",!0),p.value?(i(),r("div",at,[e("label",it,[e("small",ot,[l(c,{t:"Send Test Email"})])]),e("form",{onSubmit:n[9]||(n[9]=d=>{d.preventDefault(),o()}),class:"input-group"},[h(e("input",{type:"email",class:"form-control rounded-start-3",id:"test_email",placeholder:"john@example.com","onUpdate:modelValue":n[8]||(n[8]=d=>b.value=d),disabled:u.value},null,8,nt),[[_,b.value]]),e("button",{class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-end-3",type:"submit",value:"Submit",disabled:b.value.length===0||u.value,id:"button-addon2"},[u.value?(i(),r("span",rt)):(i(),r("i",dt)),l(c,{t:u.value?"Sending...":"Send"},null,8,["t"])],8,lt)],32)])):g("",!0),n[14]||(n[14]=e("hr",null,null,-1)),e("div",null,[e("label",ut,[e("small",ct,[l(c,{t:"Email Body Template"})])]),h(e("textarea",{class:"form-control rounded-3 font-monospace","onUpdate:modelValue":n[10]||(n[10]=d=>m(s).Configuration.Email.email_template=d),id:"email_template",style:{"min-height":"400px"}},null,512),[[_,m(s).Configuration.Email.email_template]])])])]))}};export{ft as A,_t as D,kt as _,gt as a,vt as b,yt as c,wt as d,$t as e};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-DiREU_ME.js b/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-CUUg3g-F.js
similarity index 96%
rename from src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-DiREU_ME.js
rename to src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-CUUg3g-F.js
index 0aa5626d..aa3719c7 100644
--- a/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-DiREU_ME.js
+++ b/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-CUUg3g-F.js
@@ -1 +1 @@
-import{_ as f,c as i,a as t,b as u,h as w,d as k,m as x,y,n as p,t as v,z as _,D as m,W as b,A as S,f as n,r as D,q as $,F as W,i as V}from"./index-DW-_CXHM.js";import{L as C}from"./localeText-DGSSxTBj.js";const F={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:C},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const o=m(),s=b(),r=`input_${S()}`;return{store:o,uuid:r,WireguardConfigurationStore:s}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await _("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},o=>{o.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=o.message),this.changed=!1,this.updating=!1}))}}},I={class:"card"},T={class:"card-header"},A={class:"my-2"},L={class:"card-body"},M={class:"form-group"},N=["for"],P={class:"d-flex gap-2 align-items-start"},B={class:"flex-grow-1"},G=["id","disabled"],z={class:"invalid-feedback fw-bold"},U=["disabled"],q={key:0,class:"bi bi-save2-fill"},E={key:1,class:"spinner-border spinner-border-sm"},K={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function j(o,s,r,a,c,g){const d=w("LocaleText");return n(),i("div",I,[t("div",T,[t("h6",A,[u(d,{t:"Path"})])]),t("div",L,[t("div",M,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[u(d,{t:this.title},null,8,["t"])])])],8,N),t("div",P,[t("div",B,[x(t("input",{type:"text",class:p(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":s[0]||(s[0]=e=>this.value=e),onKeydown:s[1]||(s[1]=e=>this.changed=!0),disabled:this.updating},null,42,G),[[y,this.value]]),t("div",z,v(this.invalidFeedback),1)]),t("button",{onClick:s[2]||(s[2]=e=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(n(),i("span",E)):(n(),i("i",q))],8,U)]),r.warning?(n(),i("div",K,[t("small",null,[s[3]||(s[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),u(d,{t:r.warningText},null,8,["t"])])])):k("",!0)])])])}const et=f(F,[["render",j]]),H={class:"card rounded-3"},J={class:"card-header"},O={class:"my-2"},Q={class:"card-body d-flex gap-2"},R={class:"list-group w-100"},X=["onClick"],Y={__name:"dashboardSettingsWireguardConfigurationAutostart",setup(o){const s=m(),r=b(),a=D(s.Configuration.WireGuardConfiguration.autostart),c=$(()=>r.Configurations.map(e=>e.Name)),g=async()=>{await _("/api/updateDashboardConfigurationItem",{section:"WireGuardConfiguration",key:"autostart",value:a.value},async e=>{e.status?(s.newMessage("Server","Start up configurations saved","success"),a.value=e.data):s.newMessage("Server","Start up configurations failed to save","danger")})},d=e=>{a.value.includes(e)?a.value=a.value.filter(h=>h!==e):a.value.push(e),g()};return(e,h)=>(n(),i("div",H,[t("div",J,[t("h6",O,[u(C,{t:"Toggle When Start Up"})])]),t("div",Q,[t("div",R,[(n(!0),i(W,null,V(c.value,l=>(n(),i("button",{type:"button",key:l,onClick:Z=>d(l),class:"list-group-item list-group-item-action py-2 w-100 d-flex align-items-center"},[t("samp",null,v(l),1),t("i",{class:p(["ms-auto",[a.value.includes(l)?"bi-check-circle-fill":"bi-circle"]])},null,2)],8,X))),128))])])]))}},at=f(Y,[["__scopeId","data-v-4aa2aed9"]]);export{et as D,at as a};
+import{_ as f,c as i,a as t,b as u,h as w,d as k,m as x,y,n as p,t as v,z as _,D as m,W as b,A as S,f as n,r as D,q as $,F as W,i as V}from"./index-BCe-EVqv.js";import{L as C}from"./localeText-fe5sRLWX.js";const F={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:C},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const o=m(),s=b(),r=`input_${S()}`;return{store:o,uuid:r,WireguardConfigurationStore:s}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await _("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},o=>{o.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=o.message),this.changed=!1,this.updating=!1}))}}},I={class:"card"},T={class:"card-header"},A={class:"my-2"},L={class:"card-body"},M={class:"form-group"},N=["for"],P={class:"d-flex gap-2 align-items-start"},B={class:"flex-grow-1"},G=["id","disabled"],z={class:"invalid-feedback fw-bold"},U=["disabled"],q={key:0,class:"bi bi-save2-fill"},E={key:1,class:"spinner-border spinner-border-sm"},K={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function j(o,s,r,a,c,g){const d=w("LocaleText");return n(),i("div",I,[t("div",T,[t("h6",A,[u(d,{t:"Path"})])]),t("div",L,[t("div",M,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[u(d,{t:this.title},null,8,["t"])])])],8,N),t("div",P,[t("div",B,[x(t("input",{type:"text",class:p(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":s[0]||(s[0]=e=>this.value=e),onKeydown:s[1]||(s[1]=e=>this.changed=!0),disabled:this.updating},null,42,G),[[y,this.value]]),t("div",z,v(this.invalidFeedback),1)]),t("button",{onClick:s[2]||(s[2]=e=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(n(),i("span",E)):(n(),i("i",q))],8,U)]),r.warning?(n(),i("div",K,[t("small",null,[s[3]||(s[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),u(d,{t:r.warningText},null,8,["t"])])])):k("",!0)])])])}const et=f(F,[["render",j]]),H={class:"card rounded-3"},J={class:"card-header"},O={class:"my-2"},Q={class:"card-body d-flex gap-2"},R={class:"list-group w-100"},X=["onClick"],Y={__name:"dashboardSettingsWireguardConfigurationAutostart",setup(o){const s=m(),r=b(),a=D(s.Configuration.WireGuardConfiguration.autostart),c=$(()=>r.Configurations.map(e=>e.Name)),g=async()=>{await _("/api/updateDashboardConfigurationItem",{section:"WireGuardConfiguration",key:"autostart",value:a.value},async e=>{e.status?(s.newMessage("Server","Start up configurations saved","success"),a.value=e.data):s.newMessage("Server","Start up configurations failed to save","danger")})},d=e=>{a.value.includes(e)?a.value=a.value.filter(h=>h!==e):a.value.push(e),g()};return(e,h)=>(n(),i("div",H,[t("div",J,[t("h6",O,[u(C,{t:"Toggle When Start Up"})])]),t("div",Q,[t("div",R,[(n(!0),i(W,null,V(c.value,l=>(n(),i("button",{type:"button",key:l,onClick:Z=>d(l),class:"list-group-item list-group-item-action py-2 w-100 d-flex align-items-center"},[t("samp",null,v(l),1),t("i",{class:p(["ms-auto",[a.value.includes(l)?"bi-check-circle-fill":"bi-circle"]])},null,2)],8,X))),128))])])]))}},at=f(Y,[["__scopeId","data-v-4aa2aed9"]]);export{et as D,at as a};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-VT4XDKAv.js b/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-D04P6bzU.js
similarity index 99%
rename from src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-VT4XDKAv.js
rename to src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-D04P6bzU.js
index 31d27860..ac4e4ee1 100644
--- a/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-VT4XDKAv.js
+++ b/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-D04P6bzU.js
@@ -1 +1 @@
-import{L as a}from"./localeText-DGSSxTBj.js";import{B as D,r as p,E,G as A,D as F,c as o,d as f,a as e,b as l,m as w,e as V,y as U,C as O,v as I,F as C,i as L,n as _,u as J,A as K,t as h,g as R,z as T,f as t,q as N,j as $,x as Y,_ as j,o as Z,w as P,S as M}from"./index-DW-_CXHM.js";const Q={class:"p-3"},X={key:0},ee={for:"PayloadURL",class:"form-label fw-bold text-muted"},se=["disabled"],te={for:"ContentType",class:"form-label fw-bold text-muted"},le=["disabled"],oe={class:"form-label fw-bold text-muted"},ne={class:"form-check form-switch mb-2"},ae=["disabled"],ie={class:"form-check-label",for:"VerifySSL"},de={key:0,class:"alert-danger alert rounded-3"},ue={class:"form-label fw-bold text-muted"},re={class:"card rounded-3"},ce={class:"card-body d-flex gap-2 flex-column"},be={class:"d-flex gap-2"},ve={class:"flex-grow-1"},me=["disabled","onUpdate:modelValue"],fe={class:"flex-grow-1"},pe=["disabled","onUpdate:modelValue"],ke=["onClick"],ye={class:"form-label fw-bold text-muted"},he={class:"form-check form-check-inline"},_e=["disabled","id","value"],xe=["for"],ge={class:"form-label fw-bold text-muted"},Se={class:"form-check form-switch mb-2"},we=["disabled"],$e={class:"form-check-label",for:"IsActive"},He={key:0,class:"alert alert-danger rounded-3"},We={class:"d-flex gap-2"},Ce={class:"d-flex align-items-center"},Le={class:"mb-0"},B=D({__name:"addWebHook",props:["webHook"],emits:["refresh","delete"],async setup(i,{emit:m}){let y,r;const s=p({ContentType:String,Headers:Object,IsActive:Boolean,Notes:String,PayloadURL:String,SubscribedActions:Array,VerifySSL:Boolean,WebHookID:String}),u=i;u.webHook?s.value={...u.webHook}:([y,r]=E(()=>R("/api/webHooks/createWebHook",{},g=>{s.value=g.data})),await y,r());const k=p({peer_created:A("Peer Created"),peer_deleted:A("Peer Deleted"),peer_updated:A("Peer Updated")}),x=m,d=F(),c=p(!1),S=p(""),v=p(!1),G=async g=>{g&&g.preventDefault(),v.value=!0,await T("/api/webHooks/updateWebHook",s.value,n=>{n.status?(x("refresh"),d.newMessage("Server","Webhook saved","success")):(c.value=!0,S.value=n.message,d.newMessage("Server","Webhook failed to save","danger")),v.value=!1})},z=async()=>{v.value=!0,await T("/api/webHooks/deleteWebHook",s.value,g=>{g.status?(x("delete"),d.newMessage("Server","Webhook deleted","success")):(c.value=!0,S.value=g.message,d.newMessage("Server","Webhook failed to delete","danger")),v.value=!1})};return(g,n)=>(t(),o("div",Q,[i.webHook?f("",!0):(t(),o("div",X,[e("h6",null,[l(a,{t:"Add Webhook"})]),e("p",null,[l(a,{t:"WGDashboard will sent a POST Request to the URL below with details of any subscribed events."})])])),e("form",{onSubmit:n[7]||(n[7]=b=>G(b)),class:"d-flex flex-column gap-2"},[e("div",null,[e("label",ee,[e("small",null,[l(a,{t:"Payload URL"}),n[8]||(n[8]=V("* ",-1))])]),w(e("input",{required:"",disabled:v.value,id:"PayloadURL","onUpdate:modelValue":n[0]||(n[0]=b=>s.value.PayloadURL=b),class:"form-control rounded-3",type:"url"},null,8,se),[[U,s.value.PayloadURL]])]),e("div",null,[e("label",te,[e("small",null,[l(a,{t:"Content Type"}),n[9]||(n[9]=V("* ",-1))])]),w(e("select",{disabled:v.value,id:"ContentType","onUpdate:modelValue":n[1]||(n[1]=b=>s.value.ContentType=b),class:"form-select rounded-3",required:""},[...n[10]||(n[10]=[e("option",{value:"application/json"}," application/json ",-1),e("option",{value:"application/x-www-form-urlencoded"}," application/x-www-form-urlencoded ",-1)])],8,le),[[O,s.value.ContentType]])]),e("div",null,[e("label",oe,[e("small",null,[l(a,{t:"Verify SSL"})])]),e("div",null,[e("div",ne,[w(e("input",{disabled:v.value,"onUpdate:modelValue":n[2]||(n[2]=b=>s.value.VerifySSL=b),class:"form-check-input",type:"checkbox",role:"switch",id:"VerifySSL"},null,8,ae),[[I,s.value.VerifySSL]]),e("label",ie,[l(a,{t:s.value.VerifySSL?"Enabled":"Disabled"},null,8,["t"])])]),s.value.VerifySSL?f("",!0):(t(),o("div",de,[n[11]||(n[11]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),l(a,{t:"We highly suggest to enable SSL verification"})]))])]),e("div",null,[e("label",ue,[e("small",null,[l(a,{t:"Custom Headers"})])]),e("div",re,[e("div",ce,[(t(!0),o(C,null,L(s.value.Headers,(b,H)=>(t(),o("div",be,[e("div",ve,[w(e("input",{class:"form-control rounded-3 form-control-sm",disabled:v.value,"onUpdate:modelValue":W=>b.key=W,placeholder:"Key"},null,8,me),[[U,b.key]])]),e("div",fe,[w(e("input",{class:"form-control rounded-3 form-control-sm",disabled:v.value,"onUpdate:modelValue":W=>b.value=W,placeholder:"Value"},null,8,pe),[[U,b.value]])]),e("button",{class:_([{disabled:v.value},"btn btn-sm bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3"]),type:"button",onClick:W=>delete s.value.Headers[H]},[...n[12]||(n[12]=[e("i",{class:"bi bi-trash-fill"},null,-1)])],10,ke)]))),256)),e("button",{type:"button",class:_([{disabled:v.value},"btn btn-sm bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3"]),onClick:n[3]||(n[3]=b=>s.value.Headers[J(K)().toString()]={key:"",value:""})},[n[13]||(n[13]=e("i",{class:"bi bi-plus-lg me-2"},null,-1)),l(a,{t:"Header"})],2)])])]),n[15]||(n[15]=e("hr",null,null,-1)),e("div",null,[e("label",ye,[e("small",null,[l(a,{t:"Subscribed Actions"})])]),e("div",null,[(t(!0),o(C,null,L(k.value,(b,H)=>(t(),o("div",he,[w(e("input",{class:"form-check-input",disabled:s.value.SubscribedActions.length===1&&s.value.SubscribedActions.includes(H)||v.value,type:"checkbox",id:H,value:H,"onUpdate:modelValue":n[4]||(n[4]=W=>s.value.SubscribedActions=W)},null,8,_e),[[I,s.value.SubscribedActions]]),e("label",{class:"form-check-label",for:H},h(b),9,xe)]))),256))])]),n[16]||(n[16]=e("hr",null,null,-1)),e("div",null,[e("label",ge,[e("small",null,[l(a,{t:"Enable Webhook"})])]),e("div",null,[e("div",Se,[w(e("input",{disabled:v.value,"onUpdate:modelValue":n[5]||(n[5]=b=>s.value.IsActive=b),class:"form-check-input",type:"checkbox",role:"switch",id:"IsActive"},null,8,we),[[I,s.value.IsActive]]),e("label",$e,[l(a,{t:s.value.IsActive?"Yes":"No"},null,8,["t"])])])])]),c.value?(t(),o("div",He,h(S.value),1)):f("",!0),e("div",We,[e("button",{type:"submit",class:_([{disabled:v.value},"ms-auto btn bg-success-subtle text-success-emphasis border-success-subtle rounded-3"])},[l(a,{t:"Save"})],2)]),i.webHook?(t(),o(C,{key:1},[n[14]||(n[14]=e("hr",null,null,-1)),e("div",Ce,[e("h6",Le,[l(a,{t:"Danger Zone"})]),e("button",{onClick:n[6]||(n[6]=b=>z()),type:"button",class:_([{disabled:v.value},"btn bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3 ms-auto"])},[l(a,{t:"Delete"})],2)])],64)):f("",!0)],32)]))}}),De={class:"d-flex flex-column gap-3"},Ve={class:"text-muted"},Ae={key:0},Ue={key:1},Ie={key:2},Pe={key:3},Re={class:"d-flex gap-4 align-items-center"},Te={class:"text-muted"},Me={key:0},Be={key:1},Ee={class:"text-muted"},Ne={class:"table-responsive"},je={class:"table"},qe={scope:"col"},Ge={scope:"col"},ze={scope:"col"},Fe={style:{"white-space":"nowrap"}},Oe={key:0},Je={key:1},Ke={key:2},Ye={style:{"white-space":"nowrap","overflow-x":"scroll"}},Ze={class:"bg-body-tertiary p-3 rounded-3"},Qe={class:"mb-0"},q=D({__name:"webHookSession",props:["session"],setup(i){const m=i,y=N(()=>JSON.stringify(m.session.Data,null,4));return(r,s)=>(t(),o("div",De,[e("div",null,[e("small",Ve,[l(a,{t:"Status"})]),e("h3",{class:_({"text-success":i.session.Status===0,"text-danger":i.session.Status===1,"text-warning":i.session.Status===2})},[i.session.Status===0?(t(),o("span",Ae,[s[0]||(s[0]=e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),l(a,{t:"Success"})])):f("",!0),i.session.Status===2?(t(),o("span",Ue,[s[1]||(s[1]=e("i",{class:"bi bi-trash3-fill me-2"},null,-1)),l(a,{t:"Timeout"})])):i.session.Status===1?(t(),o("span",Ie,[s[2]||(s[2]=e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),l(a,{t:"Failed"})])):i.session.Status===-1?(t(),o("span",Pe,[s[3]||(s[3]=e("i",{class:"spinner-border me-2"},null,-1)),l(a,{t:"Requesting..."})])):f("",!0)],2),e("div",Re,[e("div",null,[e("small",Te,[l(a,{t:"Started At"})]),e("h6",null,h(i.session.StartDate),1)]),i.session.EndDate?(t(),o("div",Me,[...s[4]||(s[4]=[e("i",{class:"bi bi-arrow-right"},null,-1)])])):f("",!0),i.session.EndDate?(t(),o("div",Be,[e("small",Ee,[l(a,{t:"Ended At"})]),e("h6",null,h(i.session.EndDate),1)])):f("",!0)])]),e("div",null,[e("h6",null,[l(a,{t:"Logs"})]),e("div",Ne,[e("table",je,[e("thead",null,[e("tr",null,[e("th",qe,[l(a,{t:"Datetime"})]),e("th",Ge,[l(a,{t:"Status"})]),e("th",ze,[l(a,{t:"Message"})])])]),e("tbody",null,[(t(!0),o(C,null,L([...i.session.Logs.Logs].reverse(),u=>(t(),o("tr",null,[e("td",Fe,h(u.LogTime),1),e("td",{style:{"white-space":"nowrap"},class:_({"text-success":u.Status===0,"text-danger":u.Status===1})},[u.Status===0?(t(),o("span",Oe,[...s[5]||(s[5]=[e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)])])):u.Status===1?(t(),o("span",Je,[...s[6]||(s[6]=[e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)])])):u.Status===-1?(t(),o("span",Ke,[...s[7]||(s[7]=[e("i",{class:"bi bi-circle me-2"},null,-1)])])):f("",!0)],2),e("td",Ye,h(u.Message),1)]))),256))])])])]),e("div",null,[e("h6",null,[l(a,{t:"Data"})]),e("div",Ze,[e("pre",Qe,[e("code",null,h(y.value),1)])])])]))}}),Xe={class:"card"},es={class:"card-body"},ss={key:0},ts={key:1},ls={key:2},os={key:3},ns=D({__name:"previousWebHookSession",props:["session"],setup(i){const m=p(!0);return(y,r)=>(t(),o("div",Xe,[e("div",es,[e("p",{class:"d-flex mb-0",role:"button",onClick:r[0]||(r[0]=s=>m.value=!m.value)},[e("span",{class:_({"text-success":i.session.Status===0,"text-danger":i.session.Status===1,"text-warning":i.session.Status===2})},[i.session.Status===0?(t(),o("span",ss,[...r[1]||(r[1]=[e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)])])):i.session.Status===2?(t(),o("span",ts,[...r[2]||(r[2]=[e("i",{class:"bi bi-trash3-fill me-2"},null,-1)])])):i.session.Status===1?(t(),o("span",ls,[...r[3]||(r[3]=[e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)])])):i.session.Status===-1?(t(),o("span",os,[...r[4]||(r[4]=[e("i",{class:"spinner-border spinner-border-sm me-2"},null,-1)])])):f("",!0)],2),V(" "+h(i.session.StartDate)+" ",1),r[5]||(r[5]=e("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),m.value?f("",!0):(t(),$(q,{key:0,session:i.session,class:"mt-2"},null,8,["session"]))])]))}}),as={key:0},is={class:"p-3"},ds={class:"mb-3"},us={key:0,class:"border-top p-3"},rs={class:"d-flex flex-column gap-2"},cs={key:1,class:"p-3"},bs=D({__name:"webHookSessions",props:["webHook"],async setup(i){let m,y;const r=i,s=p([]),u=p(void 0),k=async()=>{await R("/api/webHooks/getWebHookSessions",{WebHookID:r.webHook.WebHookID},d=>{s.value=d.data})};[m,y]=E(()=>k()),await m,y();const x=N(()=>{if(s.value)return s.value[0]});return u.value=setInterval(()=>{k()},5e3),Y(()=>{clearInterval(u.value)}),(d,c)=>x.value?(t(),o("div",as,[e("div",is,[e("h6",ds,[l(a,{t:"Latest Session"})]),(t(),$(q,{session:x.value,key:x.value.WebHookID},null,8,["session"]))]),s.value.length>1?(t(),o("div",us,[e("h6",null,[l(a,{t:"Previous Sessions"})]),e("div",rs,[(t(!0),o(C,null,L(s.value.slice(1),S=>(t(),$(ns,{session:S,key:S.WebHookSessionID},null,8,["session"]))),128))])])):f("",!0)])):(t(),o("div",cs,[...c[0]||(c[0]=[e("div",{class:"bg-body-tertiary p-3 w-100 d-flex rounded-3"},[e("h6",{class:"mb-0 m-auto"},"No Sessions")],-1)])]))}}),vs=j(bs,[["__scopeId","data-v-7b6e949e"]]),ms={class:"text-body w-100 h-100 pb-2 position-relative"},fs={class:"w-100 h-100 card rounded-3"},ps={class:"border-bottom z-0"},ks={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},ys={class:"my-2"},hs={key:0,class:"row h-100 g-0"},_s={class:"col-sm-4 border-end d-flex flex-column clientListContainer"},xs={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},gs={class:"list-group d-flex flex-column d-flex h-100"},Ss=["onClick"],ws={class:"mb-0 fw-bold text-body url"},$s={class:"url mb-0"},Hs={key:1,class:"flex-grow-1 d-flex text-muted"},Ws={key:0,class:"col-sm-8 clientViewerContainer d-flex flex-column"},Cs={class:"overflow-scroll",style:{flex:"1 0 0"}},Ls={class:"navbar navbar-expand-lg bg-body-tertiary sticky-top"},Ds={class:"container-fluid"},Vs={class:"navbar-nav gap-2"},As={class:"nav-item"},Us={class:"nav-item"},Is={class:"p-3"},Ps=D({__name:"dashboardWebHooks",setup(i){const m=p([]),y=p(!1);Z(async()=>{await r(),y.value=!0});const r=async()=>{await R("/api/webHooks/getWebHooks",{},x=>{m.value=x.data})},s=p(!1),u=p(void 0),k=p("edit");return(x,d)=>(t(),o("div",ms,[e("div",fs,[e("div",ps,[e("div",ks,[e("h6",ys,[d[7]||(d[7]=e("i",{class:"bi bi-plug-fill me-2"},null,-1)),l(a,{t:"Webhooks"})]),s.value?(t(),o("button",{key:1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis border-1 border-secondary-subtle rounded-3 shadow-sm ms-auto",onClick:d[1]||(d[1]=c=>s.value=!1)},[d[9]||(d[9]=e("i",{class:"bi bi-chevron-left me-2"},null,-1)),l(a,{t:"Back"})])):(t(),o("button",{key:0,class:"btn btn-sm bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm ms-auto",onClick:d[0]||(d[0]=c=>{s.value=!0,u.value=void 0})},[d[8]||(d[8]=e("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),l(a,{t:"Webhook"})]))])]),s.value?(t(),$(M,{key:1},{default:P(()=>[l(B,{onRefresh:d[6]||(d[6]=c=>{u.value=void 0,s.value=!1,r()})})]),_:1})):(t(),o("div",hs,[e("div",_s,[e("div",xs,[e("div",gs,[m.value.length>0?(t(!0),o(C,{key:0},L(m.value,c=>(t(),o("a",{role:"button",onClick:S=>u.value=c,class:_([{active:u.value?.WebHookID===c.WebHookID},"list-group-item list-group-item-action"]),"aria-current":"true"},[e("p",ws,h(c.PayloadURL),1),e("p",$s,[l(a,{t:"Subscribed Actions"}),V(": "+h(c.SubscribedActions.join(", ")),1)])],10,Ss))),256)):(t(),o("div",Hs,[l(a,{t:"No Webhooks",class:"m-auto"})]))])])]),u.value?(t(),o("div",Ws,[e("div",Cs,[e("nav",Ls,[e("div",Ds,[e("div",null,[e("ul",Vs,[e("li",As,[e("a",{onClick:d[2]||(d[2]=c=>k.value="edit"),class:_([{active:k.value==="edit"},"nav-link rounded-3"]),role:"button"},[l(a,{t:"Edit"})],2)]),e("li",Us,[e("a",{class:_([{active:k.value==="sessions"},"nav-link rounded-3"]),onClick:d[3]||(d[3]=c=>k.value="sessions"),role:"button"},[l(a,{t:"Sessions"})],2)])])])])]),k.value==="edit"?(t(),$(B,{key:u.value,onDelete:d[4]||(d[4]=c=>{r(),u.value=void 0}),webHook:u.value,onRefresh:d[5]||(d[5]=c=>r())},null,8,["webHook"])):k.value==="sessions"?(t(),$(M,{key:1},{fallback:P(()=>[e("div",Is,[l(a,{t:"Loading..."})])]),default:P(()=>[(t(),$(vs,{key:u.value,webHook:u.value},null,8,["webHook"]))]),_:1})):f("",!0)])])):f("",!0)]))])]))}}),Ms=j(Ps,[["__scopeId","data-v-e0f0e683"]]);export{Ms as default};
+import{L as a}from"./localeText-fe5sRLWX.js";import{B as D,r as p,E,G as A,D as F,c as o,d as f,a as e,b as l,m as w,e as V,y as U,C as O,v as I,F as C,i as L,n as _,u as J,A as K,t as h,g as R,z as T,f as t,q as N,j as $,x as Y,_ as j,o as Z,w as P,S as M}from"./index-BCe-EVqv.js";const Q={class:"p-3"},X={key:0},ee={for:"PayloadURL",class:"form-label fw-bold text-muted"},se=["disabled"],te={for:"ContentType",class:"form-label fw-bold text-muted"},le=["disabled"],oe={class:"form-label fw-bold text-muted"},ne={class:"form-check form-switch mb-2"},ae=["disabled"],ie={class:"form-check-label",for:"VerifySSL"},de={key:0,class:"alert-danger alert rounded-3"},ue={class:"form-label fw-bold text-muted"},re={class:"card rounded-3"},ce={class:"card-body d-flex gap-2 flex-column"},be={class:"d-flex gap-2"},ve={class:"flex-grow-1"},me=["disabled","onUpdate:modelValue"],fe={class:"flex-grow-1"},pe=["disabled","onUpdate:modelValue"],ke=["onClick"],ye={class:"form-label fw-bold text-muted"},he={class:"form-check form-check-inline"},_e=["disabled","id","value"],xe=["for"],ge={class:"form-label fw-bold text-muted"},Se={class:"form-check form-switch mb-2"},we=["disabled"],$e={class:"form-check-label",for:"IsActive"},He={key:0,class:"alert alert-danger rounded-3"},We={class:"d-flex gap-2"},Ce={class:"d-flex align-items-center"},Le={class:"mb-0"},B=D({__name:"addWebHook",props:["webHook"],emits:["refresh","delete"],async setup(i,{emit:m}){let y,r;const s=p({ContentType:String,Headers:Object,IsActive:Boolean,Notes:String,PayloadURL:String,SubscribedActions:Array,VerifySSL:Boolean,WebHookID:String}),u=i;u.webHook?s.value={...u.webHook}:([y,r]=E(()=>R("/api/webHooks/createWebHook",{},g=>{s.value=g.data})),await y,r());const k=p({peer_created:A("Peer Created"),peer_deleted:A("Peer Deleted"),peer_updated:A("Peer Updated")}),x=m,d=F(),c=p(!1),S=p(""),v=p(!1),G=async g=>{g&&g.preventDefault(),v.value=!0,await T("/api/webHooks/updateWebHook",s.value,n=>{n.status?(x("refresh"),d.newMessage("Server","Webhook saved","success")):(c.value=!0,S.value=n.message,d.newMessage("Server","Webhook failed to save","danger")),v.value=!1})},z=async()=>{v.value=!0,await T("/api/webHooks/deleteWebHook",s.value,g=>{g.status?(x("delete"),d.newMessage("Server","Webhook deleted","success")):(c.value=!0,S.value=g.message,d.newMessage("Server","Webhook failed to delete","danger")),v.value=!1})};return(g,n)=>(t(),o("div",Q,[i.webHook?f("",!0):(t(),o("div",X,[e("h6",null,[l(a,{t:"Add Webhook"})]),e("p",null,[l(a,{t:"WGDashboard will sent a POST Request to the URL below with details of any subscribed events."})])])),e("form",{onSubmit:n[7]||(n[7]=b=>G(b)),class:"d-flex flex-column gap-2"},[e("div",null,[e("label",ee,[e("small",null,[l(a,{t:"Payload URL"}),n[8]||(n[8]=V("* ",-1))])]),w(e("input",{required:"",disabled:v.value,id:"PayloadURL","onUpdate:modelValue":n[0]||(n[0]=b=>s.value.PayloadURL=b),class:"form-control rounded-3",type:"url"},null,8,se),[[U,s.value.PayloadURL]])]),e("div",null,[e("label",te,[e("small",null,[l(a,{t:"Content Type"}),n[9]||(n[9]=V("* ",-1))])]),w(e("select",{disabled:v.value,id:"ContentType","onUpdate:modelValue":n[1]||(n[1]=b=>s.value.ContentType=b),class:"form-select rounded-3",required:""},[...n[10]||(n[10]=[e("option",{value:"application/json"}," application/json ",-1),e("option",{value:"application/x-www-form-urlencoded"}," application/x-www-form-urlencoded ",-1)])],8,le),[[O,s.value.ContentType]])]),e("div",null,[e("label",oe,[e("small",null,[l(a,{t:"Verify SSL"})])]),e("div",null,[e("div",ne,[w(e("input",{disabled:v.value,"onUpdate:modelValue":n[2]||(n[2]=b=>s.value.VerifySSL=b),class:"form-check-input",type:"checkbox",role:"switch",id:"VerifySSL"},null,8,ae),[[I,s.value.VerifySSL]]),e("label",ie,[l(a,{t:s.value.VerifySSL?"Enabled":"Disabled"},null,8,["t"])])]),s.value.VerifySSL?f("",!0):(t(),o("div",de,[n[11]||(n[11]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),l(a,{t:"We highly suggest to enable SSL verification"})]))])]),e("div",null,[e("label",ue,[e("small",null,[l(a,{t:"Custom Headers"})])]),e("div",re,[e("div",ce,[(t(!0),o(C,null,L(s.value.Headers,(b,H)=>(t(),o("div",be,[e("div",ve,[w(e("input",{class:"form-control rounded-3 form-control-sm",disabled:v.value,"onUpdate:modelValue":W=>b.key=W,placeholder:"Key"},null,8,me),[[U,b.key]])]),e("div",fe,[w(e("input",{class:"form-control rounded-3 form-control-sm",disabled:v.value,"onUpdate:modelValue":W=>b.value=W,placeholder:"Value"},null,8,pe),[[U,b.value]])]),e("button",{class:_([{disabled:v.value},"btn btn-sm bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3"]),type:"button",onClick:W=>delete s.value.Headers[H]},[...n[12]||(n[12]=[e("i",{class:"bi bi-trash-fill"},null,-1)])],10,ke)]))),256)),e("button",{type:"button",class:_([{disabled:v.value},"btn btn-sm bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3"]),onClick:n[3]||(n[3]=b=>s.value.Headers[J(K)().toString()]={key:"",value:""})},[n[13]||(n[13]=e("i",{class:"bi bi-plus-lg me-2"},null,-1)),l(a,{t:"Header"})],2)])])]),n[15]||(n[15]=e("hr",null,null,-1)),e("div",null,[e("label",ye,[e("small",null,[l(a,{t:"Subscribed Actions"})])]),e("div",null,[(t(!0),o(C,null,L(k.value,(b,H)=>(t(),o("div",he,[w(e("input",{class:"form-check-input",disabled:s.value.SubscribedActions.length===1&&s.value.SubscribedActions.includes(H)||v.value,type:"checkbox",id:H,value:H,"onUpdate:modelValue":n[4]||(n[4]=W=>s.value.SubscribedActions=W)},null,8,_e),[[I,s.value.SubscribedActions]]),e("label",{class:"form-check-label",for:H},h(b),9,xe)]))),256))])]),n[16]||(n[16]=e("hr",null,null,-1)),e("div",null,[e("label",ge,[e("small",null,[l(a,{t:"Enable Webhook"})])]),e("div",null,[e("div",Se,[w(e("input",{disabled:v.value,"onUpdate:modelValue":n[5]||(n[5]=b=>s.value.IsActive=b),class:"form-check-input",type:"checkbox",role:"switch",id:"IsActive"},null,8,we),[[I,s.value.IsActive]]),e("label",$e,[l(a,{t:s.value.IsActive?"Yes":"No"},null,8,["t"])])])])]),c.value?(t(),o("div",He,h(S.value),1)):f("",!0),e("div",We,[e("button",{type:"submit",class:_([{disabled:v.value},"ms-auto btn bg-success-subtle text-success-emphasis border-success-subtle rounded-3"])},[l(a,{t:"Save"})],2)]),i.webHook?(t(),o(C,{key:1},[n[14]||(n[14]=e("hr",null,null,-1)),e("div",Ce,[e("h6",Le,[l(a,{t:"Danger Zone"})]),e("button",{onClick:n[6]||(n[6]=b=>z()),type:"button",class:_([{disabled:v.value},"btn bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3 ms-auto"])},[l(a,{t:"Delete"})],2)])],64)):f("",!0)],32)]))}}),De={class:"d-flex flex-column gap-3"},Ve={class:"text-muted"},Ae={key:0},Ue={key:1},Ie={key:2},Pe={key:3},Re={class:"d-flex gap-4 align-items-center"},Te={class:"text-muted"},Me={key:0},Be={key:1},Ee={class:"text-muted"},Ne={class:"table-responsive"},je={class:"table"},qe={scope:"col"},Ge={scope:"col"},ze={scope:"col"},Fe={style:{"white-space":"nowrap"}},Oe={key:0},Je={key:1},Ke={key:2},Ye={style:{"white-space":"nowrap","overflow-x":"scroll"}},Ze={class:"bg-body-tertiary p-3 rounded-3"},Qe={class:"mb-0"},q=D({__name:"webHookSession",props:["session"],setup(i){const m=i,y=N(()=>JSON.stringify(m.session.Data,null,4));return(r,s)=>(t(),o("div",De,[e("div",null,[e("small",Ve,[l(a,{t:"Status"})]),e("h3",{class:_({"text-success":i.session.Status===0,"text-danger":i.session.Status===1,"text-warning":i.session.Status===2})},[i.session.Status===0?(t(),o("span",Ae,[s[0]||(s[0]=e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),l(a,{t:"Success"})])):f("",!0),i.session.Status===2?(t(),o("span",Ue,[s[1]||(s[1]=e("i",{class:"bi bi-trash3-fill me-2"},null,-1)),l(a,{t:"Timeout"})])):i.session.Status===1?(t(),o("span",Ie,[s[2]||(s[2]=e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),l(a,{t:"Failed"})])):i.session.Status===-1?(t(),o("span",Pe,[s[3]||(s[3]=e("i",{class:"spinner-border me-2"},null,-1)),l(a,{t:"Requesting..."})])):f("",!0)],2),e("div",Re,[e("div",null,[e("small",Te,[l(a,{t:"Started At"})]),e("h6",null,h(i.session.StartDate),1)]),i.session.EndDate?(t(),o("div",Me,[...s[4]||(s[4]=[e("i",{class:"bi bi-arrow-right"},null,-1)])])):f("",!0),i.session.EndDate?(t(),o("div",Be,[e("small",Ee,[l(a,{t:"Ended At"})]),e("h6",null,h(i.session.EndDate),1)])):f("",!0)])]),e("div",null,[e("h6",null,[l(a,{t:"Logs"})]),e("div",Ne,[e("table",je,[e("thead",null,[e("tr",null,[e("th",qe,[l(a,{t:"Datetime"})]),e("th",Ge,[l(a,{t:"Status"})]),e("th",ze,[l(a,{t:"Message"})])])]),e("tbody",null,[(t(!0),o(C,null,L([...i.session.Logs.Logs].reverse(),u=>(t(),o("tr",null,[e("td",Fe,h(u.LogTime),1),e("td",{style:{"white-space":"nowrap"},class:_({"text-success":u.Status===0,"text-danger":u.Status===1})},[u.Status===0?(t(),o("span",Oe,[...s[5]||(s[5]=[e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)])])):u.Status===1?(t(),o("span",Je,[...s[6]||(s[6]=[e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)])])):u.Status===-1?(t(),o("span",Ke,[...s[7]||(s[7]=[e("i",{class:"bi bi-circle me-2"},null,-1)])])):f("",!0)],2),e("td",Ye,h(u.Message),1)]))),256))])])])]),e("div",null,[e("h6",null,[l(a,{t:"Data"})]),e("div",Ze,[e("pre",Qe,[e("code",null,h(y.value),1)])])])]))}}),Xe={class:"card"},es={class:"card-body"},ss={key:0},ts={key:1},ls={key:2},os={key:3},ns=D({__name:"previousWebHookSession",props:["session"],setup(i){const m=p(!0);return(y,r)=>(t(),o("div",Xe,[e("div",es,[e("p",{class:"d-flex mb-0",role:"button",onClick:r[0]||(r[0]=s=>m.value=!m.value)},[e("span",{class:_({"text-success":i.session.Status===0,"text-danger":i.session.Status===1,"text-warning":i.session.Status===2})},[i.session.Status===0?(t(),o("span",ss,[...r[1]||(r[1]=[e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)])])):i.session.Status===2?(t(),o("span",ts,[...r[2]||(r[2]=[e("i",{class:"bi bi-trash3-fill me-2"},null,-1)])])):i.session.Status===1?(t(),o("span",ls,[...r[3]||(r[3]=[e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)])])):i.session.Status===-1?(t(),o("span",os,[...r[4]||(r[4]=[e("i",{class:"spinner-border spinner-border-sm me-2"},null,-1)])])):f("",!0)],2),V(" "+h(i.session.StartDate)+" ",1),r[5]||(r[5]=e("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),m.value?f("",!0):(t(),$(q,{key:0,session:i.session,class:"mt-2"},null,8,["session"]))])]))}}),as={key:0},is={class:"p-3"},ds={class:"mb-3"},us={key:0,class:"border-top p-3"},rs={class:"d-flex flex-column gap-2"},cs={key:1,class:"p-3"},bs=D({__name:"webHookSessions",props:["webHook"],async setup(i){let m,y;const r=i,s=p([]),u=p(void 0),k=async()=>{await R("/api/webHooks/getWebHookSessions",{WebHookID:r.webHook.WebHookID},d=>{s.value=d.data})};[m,y]=E(()=>k()),await m,y();const x=N(()=>{if(s.value)return s.value[0]});return u.value=setInterval(()=>{k()},5e3),Y(()=>{clearInterval(u.value)}),(d,c)=>x.value?(t(),o("div",as,[e("div",is,[e("h6",ds,[l(a,{t:"Latest Session"})]),(t(),$(q,{session:x.value,key:x.value.WebHookID},null,8,["session"]))]),s.value.length>1?(t(),o("div",us,[e("h6",null,[l(a,{t:"Previous Sessions"})]),e("div",rs,[(t(!0),o(C,null,L(s.value.slice(1),S=>(t(),$(ns,{session:S,key:S.WebHookSessionID},null,8,["session"]))),128))])])):f("",!0)])):(t(),o("div",cs,[...c[0]||(c[0]=[e("div",{class:"bg-body-tertiary p-3 w-100 d-flex rounded-3"},[e("h6",{class:"mb-0 m-auto"},"No Sessions")],-1)])]))}}),vs=j(bs,[["__scopeId","data-v-7b6e949e"]]),ms={class:"text-body w-100 h-100 pb-2 position-relative"},fs={class:"w-100 h-100 card rounded-3"},ps={class:"border-bottom z-0"},ks={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},ys={class:"my-2"},hs={key:0,class:"row h-100 g-0"},_s={class:"col-sm-4 border-end d-flex flex-column clientListContainer"},xs={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},gs={class:"list-group d-flex flex-column d-flex h-100"},Ss=["onClick"],ws={class:"mb-0 fw-bold text-body url"},$s={class:"url mb-0"},Hs={key:1,class:"flex-grow-1 d-flex text-muted"},Ws={key:0,class:"col-sm-8 clientViewerContainer d-flex flex-column"},Cs={class:"overflow-scroll",style:{flex:"1 0 0"}},Ls={class:"navbar navbar-expand-lg bg-body-tertiary sticky-top"},Ds={class:"container-fluid"},Vs={class:"navbar-nav gap-2"},As={class:"nav-item"},Us={class:"nav-item"},Is={class:"p-3"},Ps=D({__name:"dashboardWebHooks",setup(i){const m=p([]),y=p(!1);Z(async()=>{await r(),y.value=!0});const r=async()=>{await R("/api/webHooks/getWebHooks",{},x=>{m.value=x.data})},s=p(!1),u=p(void 0),k=p("edit");return(x,d)=>(t(),o("div",ms,[e("div",fs,[e("div",ps,[e("div",ks,[e("h6",ys,[d[7]||(d[7]=e("i",{class:"bi bi-plug-fill me-2"},null,-1)),l(a,{t:"Webhooks"})]),s.value?(t(),o("button",{key:1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis border-1 border-secondary-subtle rounded-3 shadow-sm ms-auto",onClick:d[1]||(d[1]=c=>s.value=!1)},[d[9]||(d[9]=e("i",{class:"bi bi-chevron-left me-2"},null,-1)),l(a,{t:"Back"})])):(t(),o("button",{key:0,class:"btn btn-sm bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm ms-auto",onClick:d[0]||(d[0]=c=>{s.value=!0,u.value=void 0})},[d[8]||(d[8]=e("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),l(a,{t:"Webhook"})]))])]),s.value?(t(),$(M,{key:1},{default:P(()=>[l(B,{onRefresh:d[6]||(d[6]=c=>{u.value=void 0,s.value=!1,r()})})]),_:1})):(t(),o("div",hs,[e("div",_s,[e("div",xs,[e("div",gs,[m.value.length>0?(t(!0),o(C,{key:0},L(m.value,c=>(t(),o("a",{role:"button",onClick:S=>u.value=c,class:_([{active:u.value?.WebHookID===c.WebHookID},"list-group-item list-group-item-action"]),"aria-current":"true"},[e("p",ws,h(c.PayloadURL),1),e("p",$s,[l(a,{t:"Subscribed Actions"}),V(": "+h(c.SubscribedActions.join(", ")),1)])],10,Ss))),256)):(t(),o("div",Hs,[l(a,{t:"No Webhooks",class:"m-auto"})]))])])]),u.value?(t(),o("div",Ws,[e("div",Cs,[e("nav",Ls,[e("div",Ds,[e("div",null,[e("ul",Vs,[e("li",As,[e("a",{onClick:d[2]||(d[2]=c=>k.value="edit"),class:_([{active:k.value==="edit"},"nav-link rounded-3"]),role:"button"},[l(a,{t:"Edit"})],2)]),e("li",Us,[e("a",{class:_([{active:k.value==="sessions"},"nav-link rounded-3"]),onClick:d[3]||(d[3]=c=>k.value="sessions"),role:"button"},[l(a,{t:"Sessions"})],2)])])])])]),k.value==="edit"?(t(),$(B,{key:u.value,onDelete:d[4]||(d[4]=c=>{r(),u.value=void 0}),webHook:u.value,onRefresh:d[5]||(d[5]=c=>r())},null,8,["webHook"])):k.value==="sessions"?(t(),$(M,{key:1},{fallback:P(()=>[e("div",Is,[l(a,{t:"Loading..."})])]),default:P(()=>[(t(),$(vs,{key:u.value,webHook:u.value},null,8,["webHook"]))]),_:1})):f("",!0)])])):f("",!0)]))])]))}}),Ms=j(Ps,[["__scopeId","data-v-e0f0e683"]]);export{Ms as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dayjs.min-CkHkDA7F.js b/src/static/dist/WGDashboardAdmin/assets/dayjs.min-Ba6APokV.js
similarity index 99%
rename from src/static/dist/WGDashboardAdmin/assets/dayjs.min-CkHkDA7F.js
rename to src/static/dist/WGDashboardAdmin/assets/dayjs.min-Ba6APokV.js
index fbeba56b..227af7ea 100644
--- a/src/static/dist/WGDashboardAdmin/assets/dayjs.min-CkHkDA7F.js
+++ b/src/static/dist/WGDashboardAdmin/assets/dayjs.min-Ba6APokV.js
@@ -1 +1 @@
-import{O as G}from"./index-DW-_CXHM.js";var W={exports:{}},K=W.exports,E;function X(){return E||(E=1,(function(V,et){(function(A,x){V.exports=x()})(K,(function(){var A=1e3,x=6e4,U=36e5,I="millisecond",S="second",w="minute",O="hour",M="day",H="week",m="month",J="quarter",y="year",_="date",Z="Invalid Date",B=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,P=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},F=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},R={s:F,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+F(r,2,"0")+":"+F(e,2,"0")},m:function s(n,t){if(n.date()1)return s(u[0])}else{var o=n.name;D[o]=n,e=o}return!r&&e&&(k=e),e||!r&&k},f=function(s,n){if(N(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new C(t)},a=R;a.l=T,a.i=N,a.w=function(s,n){return f(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var C=(function(){function s(t){this.$L=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[q]=!0}var n=s.prototype;return n.parse=function(t){this.$d=(function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var u=e.match(B);if(u){var o=u[2]-1||0,c=(u[7]||"0").substring(0,3);return i?new Date(Date.UTC(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)):new Date(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)}}return new Date(e)})(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==Z},n.isSame=function(t,r){var e=f(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return f(t)=n?s:""+Array(n+1-r.length).join(t)+s},R={s:F,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+F(r,2,"0")+":"+F(e,2,"0")},m:function s(n,t){if(n.date()1)return s(u[0])}else{var o=n.name;D[o]=n,e=o}return!r&&e&&(k=e),e||!r&&k},f=function(s,n){if(N(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new C(t)},a=R;a.l=T,a.i=N,a.w=function(s,n){return f(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var C=(function(){function s(t){this.$L=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[q]=!0}var n=s.prototype;return n.parse=function(t){this.$d=(function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var u=e.match(B);if(u){var o=u[2]-1||0,c=(u[7]||"0").substring(0,3);return i?new Date(Date.UTC(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)):new Date(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)}}return new Date(e)})(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==Z},n.isSame=function(t,r){var e=f(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return f(t){q(()=>o.data,b=>{o.valid=/^[a-zA-Z0-9_=+.-]{1,15}$/.test(b)&&b.length>0&&!g.Configurations.find(_=>_.Name===b)})});const u=H(),x=y(!1),c=G(),a=async()=>{o.data&&(x.value=!0,clearInterval(u.Peers.RefreshInterval),await L("/api/renameWireguardConfiguration",{ConfigurationName:t.configurationName,NewConfigurationName:o.data},async b=>{b.status?(await g.getConfigurations(),u.newMessage("Server","Configuration renamed","success"),c.push(`/configuration/${o.data}/peers`)):(u.newMessage("Server",b.message,"danger"),x.value=!1)}))};return(b,_)=>(v(),h("div",re,[e("div",ue,[e("p",null,[s(n,{t:"To update this configuration's name, WGDashboard will execute the following operations:"})]),e("ol",null,[e("li",null,[s(n,{t:"Duplicate current configuration's database table and .conf file with the new name"})]),e("li",null,[s(n,{t:"Delete current configuration's database table and .conf file"})])]),e("div",ce,[e("input",{class:"form-control form-control-sm rounded-3",value:d.configurationName,disabled:""},null,8,me),_[3]||(_[3]=e("h3",{class:"mb-0"},[e("i",{class:"bi bi-arrow-right"})],-1)),C(e("input",{class:B(["form-control form-control-sm rounded-3",[o.data?o.valid?"is-valid":"is-invalid":""]]),id:"newConfigurationName","onUpdate:modelValue":_[0]||(_[0]=w=>o.data=w)},null,2),[[S,o.data]])]),e("div",{class:B(["invalid-feedback",{"d-block":!o.valid&&o.data}])},[s(n,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",fe,[e("li",null,[s(n,{t:"Configuration name already exist"})]),e("li",null,[s(n,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])],2),e("div",ge,[e("button",{onClick:_[1]||(_[1]=w=>f("close")),class:"btn btn-sm bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3"},[s(n,{t:"Cancel"})]),e("button",{onClick:_[2]||(_[2]=w=>a()),disabled:!o.data||x.value,class:"btn btn-sm btn-danger rounded-3 ms-auto"},[s(n,{t:"Save"})],8,be)])])]))}},pe=M(ve,[["__scopeId","data-v-33ea9576"]]),he={name:"Dropdown",props:{width:{type:String,default:"80px"},height:{type:String,default:"auto"},title:{type:String,default:""},disabled:{type:Boolean,default:!1},defaultDisplay:{type:Boolean,default:!1}}},ye={class:"title"};function xe(d,r,t,f,o,g){return v(),h("div",{class:B(["dropdown",{disabled:t.disabled}]),onClick:r[0]||(r[0]=(...u)=>d.toggleDropdown&&d.toggleDropdown(...u)),onFocusout:r[1]||(r[1]=(...u)=>d.hideDropdown&&d.hideDropdown(...u)),tabindex:"0"},[e("div",ye,[e("div",null,P(t.title),1)])],34)}const _e=M(he,[["render",xe]]),we={components:{Dropdown:_e},name:"CodeEditor",props:{lineNums:{type:Boolean,default:!1},modelValue:{type:String},value:{type:String},theme:{type:String,default:"github-dark"},tabSpaces:{type:Number,default:2},wrap:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},header:{type:Boolean,default:!0},width:{type:String,default:"540px"},height:{type:String,default:"auto"},maxWidth:{type:String},minWidth:{type:String},maxHeight:{type:String},minHeight:{type:String},borderRadius:{type:String,default:"12px"},languages:{type:Array,default:function(){return[["javascript","JS"]]}},langListWidth:{type:String,default:"110px"},langListHeight:{type:String,default:"auto"},langListDisplay:{type:Boolean,default:!1},displayLanguage:{type:Boolean,default:!0},zIndex:{type:String,default:"0"},fontSize:{type:String,default:"17px"},padding:{type:String,default:"20px"}},directives:{highlight:{mounted(d,r){d.textContent=r.value},updated(d,r){d.scrolling?d.scrolling=!1:d.textContent=r.value}}},data(){return{scrollBarWidth:0,scrollBarHeight:0,top:0,left:0,languageClass:"hljs language-"+this.languages[0][0],languageTitle:this.languages[0][1]?this.languages[0][1]:this.languages[0][0],content:this.value,cursorPosition:0,insertTab:!1,lineNum:0,lineNumsWidth:0,scrolling:!1,textareaHeight:0,showLineNums:this.wrap?!1:this.lineNums}},computed:{tabWidth(){let d="";for(let r=0;r{q(()=>o.data,b=>{o.valid=/^[a-zA-Z0-9_=+.-]{1,15}$/.test(b)&&b.length>0&&!g.Configurations.find(_=>_.Name===b)})});const u=H(),x=y(!1),c=G(),a=async()=>{o.data&&(x.value=!0,clearInterval(u.Peers.RefreshInterval),await L("/api/renameWireguardConfiguration",{ConfigurationName:t.configurationName,NewConfigurationName:o.data},async b=>{b.status?(await g.getConfigurations(),u.newMessage("Server","Configuration renamed","success"),c.push(`/configuration/${o.data}/peers`)):(u.newMessage("Server",b.message,"danger"),x.value=!1)}))};return(b,_)=>(v(),h("div",re,[e("div",ue,[e("p",null,[s(n,{t:"To update this configuration's name, WGDashboard will execute the following operations:"})]),e("ol",null,[e("li",null,[s(n,{t:"Duplicate current configuration's database table and .conf file with the new name"})]),e("li",null,[s(n,{t:"Delete current configuration's database table and .conf file"})])]),e("div",ce,[e("input",{class:"form-control form-control-sm rounded-3",value:d.configurationName,disabled:""},null,8,me),_[3]||(_[3]=e("h3",{class:"mb-0"},[e("i",{class:"bi bi-arrow-right"})],-1)),C(e("input",{class:B(["form-control form-control-sm rounded-3",[o.data?o.valid?"is-valid":"is-invalid":""]]),id:"newConfigurationName","onUpdate:modelValue":_[0]||(_[0]=w=>o.data=w)},null,2),[[S,o.data]])]),e("div",{class:B(["invalid-feedback",{"d-block":!o.valid&&o.data}])},[s(n,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",fe,[e("li",null,[s(n,{t:"Configuration name already exist"})]),e("li",null,[s(n,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])],2),e("div",ge,[e("button",{onClick:_[1]||(_[1]=w=>f("close")),class:"btn btn-sm bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3"},[s(n,{t:"Cancel"})]),e("button",{onClick:_[2]||(_[2]=w=>a()),disabled:!o.data||x.value,class:"btn btn-sm btn-danger rounded-3 ms-auto"},[s(n,{t:"Save"})],8,be)])])]))}},pe=M(ve,[["__scopeId","data-v-33ea9576"]]),he={name:"Dropdown",props:{width:{type:String,default:"80px"},height:{type:String,default:"auto"},title:{type:String,default:""},disabled:{type:Boolean,default:!1},defaultDisplay:{type:Boolean,default:!1}}},ye={class:"title"};function xe(d,r,t,f,o,g){return v(),h("div",{class:B(["dropdown",{disabled:t.disabled}]),onClick:r[0]||(r[0]=(...u)=>d.toggleDropdown&&d.toggleDropdown(...u)),onFocusout:r[1]||(r[1]=(...u)=>d.hideDropdown&&d.hideDropdown(...u)),tabindex:"0"},[e("div",ye,[e("div",null,P(t.title),1)])],34)}const _e=M(he,[["render",xe]]),we={components:{Dropdown:_e},name:"CodeEditor",props:{lineNums:{type:Boolean,default:!1},modelValue:{type:String},value:{type:String},theme:{type:String,default:"github-dark"},tabSpaces:{type:Number,default:2},wrap:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},header:{type:Boolean,default:!0},width:{type:String,default:"540px"},height:{type:String,default:"auto"},maxWidth:{type:String},minWidth:{type:String},maxHeight:{type:String},minHeight:{type:String},borderRadius:{type:String,default:"12px"},languages:{type:Array,default:function(){return[["javascript","JS"]]}},langListWidth:{type:String,default:"110px"},langListHeight:{type:String,default:"auto"},langListDisplay:{type:Boolean,default:!1},displayLanguage:{type:Boolean,default:!0},zIndex:{type:String,default:"0"},fontSize:{type:String,default:"17px"},padding:{type:String,default:"20px"}},directives:{highlight:{mounted(d,r){d.textContent=r.value},updated(d,r){d.scrolling?d.scrolling=!1:d.textContent=r.value}}},data(){return{scrollBarWidth:0,scrollBarHeight:0,top:0,left:0,languageClass:"hljs language-"+this.languages[0][0],languageTitle:this.languages[0][1]?this.languages[0][1]:this.languages[0][0],content:this.value,cursorPosition:0,insertTab:!1,lineNum:0,lineNumsWidth:0,scrolling:!1,textareaHeight:0,showLineNums:this.wrap?!1:this.lineNums}},computed:{tabWidth(){let d="";for(let r=0;r{this.scrollBarWidth=t[0].target.offsetWidth-t[0].target.clientWidth,this.scrollBarHeight=t[0].target.offsetHeight-t[0].target.clientHeight,this.textareaHeight=t[0].target.offsetHeight}).observe(this.$refs.textarea);const r=new ResizeObserver(t=>{this.lineNumsWidth=t[0].target.offsetWidth});this.$refs.lineNums&&r.observe(this.$refs.lineNums)},copy(){document.execCommand("copy")?(this.$refs.textarea.select(),document.execCommand("copy"),window.getSelection().removeAllRanges()):navigator.clipboard.writeText(this.$refs.textarea.value)},getLineNum(){const d=this.$refs.textarea.value;let r=0,t=d.indexOf(`
`);for(;t!==-1;)r++,t=d.indexOf(`
diff --git a/src/static/dist/WGDashboardAdmin/assets/index-DTUDBDs4.js b/src/static/dist/WGDashboardAdmin/assets/index-B8FA5wIW.js
similarity index 98%
rename from src/static/dist/WGDashboardAdmin/assets/index-DTUDBDs4.js
rename to src/static/dist/WGDashboardAdmin/assets/index-B8FA5wIW.js
index af1ea8a1..842357fa 100644
--- a/src/static/dist/WGDashboardAdmin/assets/index-DTUDBDs4.js
+++ b/src/static/dist/WGDashboardAdmin/assets/index-B8FA5wIW.js
@@ -1 +1 @@
-import{r as w,o as L,c,a as t,b as s,d as h,e as v,t as b,f as a,_ as $,D as y,w as i,T as M,n as k,u as H,g as T,G as N,W as G,h as _,F as A,i as D,j as x,k as S,l as W,S as V}from"./index-DW-_CXHM.js";import{L as m}from"./localeText-DGSSxTBj.js";import{M as I}from"./message-GT1GlDor.js";import"./dayjs.min-CkHkDA7F.js";const O={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},U={class:"container d-flex h-100 w-100"},j={class:"m-auto modal-dialog-centered dashboardModal"},z={class:"card rounded-3 shadow flex-grow-1"},B={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},R={class:"mb-0"},F={class:"card-body px-4 pb-4 d-flex flex-column gap-2"},q={class:"card text-decoration-none",target:"_blank",role:"button",href:"https://discord.gg/72TwzjeuWm"},E={class:"card-body d-flex gap-4 align-items-center"},J={class:"d-flex align-items-center"},P={class:"badge rounded-pill text-bg-primary ms-2"},Y={key:0,class:"spinner-border spinner-border-sm",style:{width:"0.7rem",height:"0.7rem"}},K={key:1},Q={class:"text-muted"},X={class:"card text-decoration-none",href:"https://docs.wgdashboard.dev/",target:"_blank"},Z={class:"card-body d-flex gap-4 align-items-center"},tt={class:"mb-0"},et={class:"text-muted"},st={__name:"helpModal",setup(l){const e=w(!0),g=w(void 0);return L(()=>{e.value=!0,fetch("https://discord.com/api/guilds/1276818723637956628/widget.json").then(d=>d.json()).then(d=>{g.value=d,e.value=!1}).catch(()=>{e.value=!1})}),(d,n)=>(a(),c("div",O,[t("div",U,[t("div",j,[t("div",z,[t("div",B,[t("h4",R,[s(m,{t:"Help"})]),t("button",{type:"button",class:"btn-close ms-auto",onClick:n[0]||(n[0]=r=>d.$emit("close"))})]),t("div",F,[t("a",q,[t("div",E,[n[3]||(n[3]=t("h1",{class:"mb-0"},[t("i",{class:"bi bi-discord"})],-1)),t("div",null,[t("div",J,[n[2]||(n[2]=t("h5",{class:"mb-0"}," Discord Server ",-1)),t("span",P,[e.value?(a(),c("span",Y)):h("",!0),g.value!==void 0&&!e.value?(a(),c("span",K,[n[1]||(n[1]=t("i",{class:"bi bi-person-fill me-2"},null,-1)),v(b(g.value.presence_count)+" Online ",1)])):h("",!0)])]),t("small",Q,[s(m,{t:"Join our Discord server for quick help or chat about WGDashboard!"})])])])]),t("a",X,[t("div",Z,[n[4]||(n[4]=t("h1",{class:"mb-0"},[t("i",{class:"bi bi-hash"})],-1)),t("div",null,[t("h5",tt,[s(m,{t:"Official Documentation"})]),t("small",et,[s(m,{t:"Official documentation contains User Guides and more..."})])])])])])])])])]))}},ot={key:"header",class:"shadow"},at={class:"p-3 d-flex gap-2 flex-column"},nt={class:"d-flex text-body"},it={class:"d-flex flex-column align-items-start gap-1"},lt={class:"mb-0"},rt={class:"mb-0"},dt={class:"list-group"},ct={href:"https://docs.wgdashboard.dev/",target:"_blank",class:"list-group-item list-group-item-action d-flex align-items-center"},ut={target:"_blank",role:"button",href:"https://discord.gg/72TwzjeuWm",class:"list-group-item list-group-item-action d-flex align-items-center"},mt={__name:"agentModal",emits:["close"],setup(l,{emit:e}){const g=e,d=y();return(n,r)=>(a(),c("div",{class:k(["agentContainer m-2 rounded-3 d-flex flex-column text-body",{enabled:H(d).HelpAgent.Enable}])},[s(M,{name:"agent-message"},{default:i(()=>[t("div",ot,[t("div",at,[t("div",nt,[t("div",it,[t("h5",lt,[s(m,{t:"Help"})])]),t("a",{role:"button",class:"ms-auto text-body",onClick:r[0]||(r[0]=o=>g("close"))},[...r[1]||(r[1]=[t("h5",{class:"mb-0"},[t("i",{class:"bi bi-x-lg"})],-1)])])]),t("p",rt,[s(m,{t:"You can visit our: "})]),t("div",dt,[t("a",ct,[r[2]||(r[2]=t("i",{class:"bi bi-book-fill"},null,-1)),s(m,{class:"ms-auto",t:"Official Documentation"})]),t("a",ut,[r[3]||(r[3]=t("i",{class:"bi bi-discord"},null,-1)),s(m,{class:"ms-auto",t:"Discord Server"})])])])])]),_:1})],2))}},gt=$(mt,[["__scopeId","data-v-f37f608d"]]),ft={name:"navbar",components:{HelpModal:st,LocaleText:m,AgentModal:gt},setup(){const l=G(),e=y();return{wireguardConfigurationsStore:l,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:"",openHelpModal:!1,openAgentModal:!1}},computed:{getActiveCrossServer(){if(this.dashboardConfigurationStore.ActiveServerConfiguration)return new URL(this.dashboardConfigurationStore.CrossServerConfiguration.ServerList[this.dashboardConfigurationStore.ActiveServerConfiguration].host)}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),await T("/api/getDashboardUpdate",{},l=>{l.status?(l.data&&(this.updateAvailable=!0,this.updateUrl=l.data),this.updateMessage=l.message):(this.updateMessage=N("Failed to check available update"),console.log(`Failed to get update: ${l.message}`))}),this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)}},_t=["data-bs-theme"],pt={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},vt={class:"sidebar-sticky"},bt={class:"text-white text-center m-0 py-3 mb-2 btn-brand"},ht={key:0,class:"ms-auto"},xt={class:"nav flex-column px-2 gap-1"},Ct={class:"nav-item"},kt={class:"nav-item"},St={class:"nav-item"},$t={class:"nav-item"},yt={class:"nav-item"},wt={class:"sidebar-heading px-3 mt-3 mb-1 text-muted text-center"},Mt={class:"nav flex-column px-2 gap-1"},At={class:"nav-item"},Dt={class:"sidebar-heading px-3 mt-3 mb-1 text-muted text-center"},Lt={class:"nav flex-column px-2 gap-1"},Ht={class:"nav-item"},Tt={class:"nav-item"},Nt={class:"nav-item"},Gt={class:"nav flex-column px-2 mb-3"},Wt={class:"nav-item"},Vt={class:"nav-item",style:{"font-size":"0.8rem"}},It=["href"],Ot={class:"nav-link text-muted rounded-3"},Ut={key:1,class:"nav-link text-muted rounded-3"};function jt(l,e,g,d,n,r){const o=_("LocaleText"),u=_("RouterLink"),C=_("HelpModal"),p=_("AgentModal");return a(),c("div",{class:k(["col-md-3 col-lg-2 d-md-block p-2 navbar-container bg-transparent",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":d.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[t("nav",pt,[t("div",vt,[t("div",bt,[e[5]||(e[5]=t("h5",{class:"mb-0"}," WGDashboard ",-1)),r.getActiveCrossServer!==void 0?(a(),c("small",ht,[e[4]||(e[4]=t("i",{class:"bi bi-hdd-rack-fill me-2"},null,-1)),v(b(r.getActiveCrossServer.host),1)])):h("",!0)]),t("ul",xt,[t("li",Ct,[s(u,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:i(()=>[e[6]||(e[6]=t("i",{class:"bi bi-house me-2"},null,-1)),s(o,{t:"Home"})]),_:1})]),t("li",kt,[s(u,{class:"nav-link rounded-3",to:"/settings","active-class":"active"},{default:i(()=>[e[7]||(e[7]=t("i",{class:"bi bi-gear me-2"},null,-1)),s(o,{t:"Settings"})]),_:1})]),t("li",St,[s(u,{class:"nav-link rounded-3",to:"/clients","active-class":"active"},{default:i(()=>[e[8]||(e[8]=t("i",{class:"bi bi-people me-2"},null,-1)),s(o,{t:"Clients"})]),_:1})]),t("li",$t,[s(u,{class:"nav-link rounded-3",to:"/webhooks","active-class":"active"},{default:i(()=>[e[9]||(e[9]=t("i",{class:"bi bi-postcard me-2"},null,-1)),s(o,{t:"Webhooks"})]),_:1})]),t("li",yt,[t("a",{class:"nav-link rounded-3",role:"button",onClick:e[0]||(e[0]=f=>n.openAgentModal=!0)},[e[10]||(e[10]=t("i",{class:"bi bi-question-circle me-2"},null,-1)),s(o,{t:"Help"})])])]),e[13]||(e[13]=t("hr",{class:"text-body my-2"},null,-1)),t("h6",wt,[s(o,{t:"WireGuard Configurations"})]),t("ul",Mt,[(a(!0),c(A,null,D(this.wireguardConfigurationsStore.sortConfigurations,f=>(a(),c("li",At,[s(u,{to:"/configuration/"+f.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:i(()=>[t("span",{class:k(["dot me-2",{active:f.Status}])},null,2),v(" "+b(f.Name),1)]),_:2},1032,["to"])]))),256))]),e[14]||(e[14]=t("hr",{class:"text-body my-2"},null,-1)),t("h6",Dt,[s(o,{t:"Tools"})]),t("ul",Lt,[t("li",Ht,[s(u,{to:"/system_status",class:"nav-link rounded-3","active-class":"active"},{default:i(()=>[s(o,{t:"System Status"})]),_:1})]),t("li",Tt,[s(u,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:i(()=>[s(o,{t:"Ping"})]),_:1})]),t("li",Nt,[s(u,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:i(()=>[s(o,{t:"Traceroute"})]),_:1})])]),e[15]||(e[15]=t("hr",{class:"text-body my-2"},null,-1)),t("ul",Gt,[t("li",Wt,[t("a",{class:"nav-link text-danger rounded-3",onClick:e[1]||(e[1]=f=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[e[11]||(e[11]=t("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),s(o,{t:"Sign Out"})])]),t("li",Vt,[this.updateAvailable?(a(),c("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[t("small",Ot,[s(o,{t:this.updateMessage},null,8,["t"]),e[12]||(e[12]=v(" (",-1)),s(o,{t:"Current Version:"}),v(" "+b(d.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,It)):(a(),c("small",Ut,[s(o,{t:this.updateMessage},null,8,["t"]),v(" ("+b(d.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])]),s(S,{name:"zoom"},{default:i(()=>[this.openHelpModal?(a(),x(C,{key:0,onClose:e[2]||(e[2]=f=>{n.openHelpModal=!1})})):h("",!0)]),_:1}),s(S,{name:"slideIn"},{default:i(()=>[this.openAgentModal?(a(),x(p,{key:0,onClose:e[3]||(e[3]=f=>n.openAgentModal=!1)})):h("",!0)]),_:1})],10,_t)}const zt=$(ft,[["render",jt],["__scopeId","data-v-982f1a52"]]),Bt={name:"index",components:{Message:I,Navbar:zt},async setup(){return{dashboardConfigurationStore:y()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(l=>l.show)}}},Rt=["data-bs-theme"],Ft={class:"row h-100"},qt={class:"col-md-9 col-lg-10 overflow-y-scroll mb-0 pt-2"},Et={class:"messageCentre text-body position-absolute d-flex"};function Jt(l,e,g,d,n,r){const o=_("Navbar"),u=_("RouterView"),C=_("Message");return a(),c("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[t("div",Ft,[s(o),t("main",qt,[(a(),x(V,null,{default:i(()=>[s(u,null,{default:i(({Component:p})=>[s(S,{name:"fade2",mode:"out-in",appear:""},{default:i(()=>[(a(),x(W(p)))]),_:2},1024)]),_:1})]),_:1})),t("div",Et,[s(M,{name:"message",tag:"div",class:"position-relative flex-sm-grow-0 flex-grow-1 d-flex align-items-end ms-sm-auto flex-column gap-2"},{default:i(()=>[(a(!0),c(A,null,D(r.getMessages.slice().reverse(),p=>(a(),x(C,{message:p,key:p.id},null,8,["message"]))),128))]),_:1})])])])],8,Rt)}const Xt=$(Bt,[["render",Jt],["__scopeId","data-v-0c6a5068"]]);export{Xt as default};
+import{r as w,o as L,c,a as t,b as s,d as h,e as v,t as b,f as a,_ as $,D as y,w as i,T as M,n as k,u as H,g as T,G as N,W as G,h as _,F as A,i as D,j as x,k as S,l as W,S as V}from"./index-BCe-EVqv.js";import{L as m}from"./localeText-fe5sRLWX.js";import{M as I}from"./message-DEALuPCn.js";import"./dayjs.min-Ba6APokV.js";const O={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},U={class:"container d-flex h-100 w-100"},j={class:"m-auto modal-dialog-centered dashboardModal"},z={class:"card rounded-3 shadow flex-grow-1"},B={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},R={class:"mb-0"},F={class:"card-body px-4 pb-4 d-flex flex-column gap-2"},q={class:"card text-decoration-none",target:"_blank",role:"button",href:"https://discord.gg/72TwzjeuWm"},E={class:"card-body d-flex gap-4 align-items-center"},J={class:"d-flex align-items-center"},P={class:"badge rounded-pill text-bg-primary ms-2"},Y={key:0,class:"spinner-border spinner-border-sm",style:{width:"0.7rem",height:"0.7rem"}},K={key:1},Q={class:"text-muted"},X={class:"card text-decoration-none",href:"https://docs.wgdashboard.dev/",target:"_blank"},Z={class:"card-body d-flex gap-4 align-items-center"},tt={class:"mb-0"},et={class:"text-muted"},st={__name:"helpModal",setup(l){const e=w(!0),g=w(void 0);return L(()=>{e.value=!0,fetch("https://discord.com/api/guilds/1276818723637956628/widget.json").then(d=>d.json()).then(d=>{g.value=d,e.value=!1}).catch(()=>{e.value=!1})}),(d,n)=>(a(),c("div",O,[t("div",U,[t("div",j,[t("div",z,[t("div",B,[t("h4",R,[s(m,{t:"Help"})]),t("button",{type:"button",class:"btn-close ms-auto",onClick:n[0]||(n[0]=r=>d.$emit("close"))})]),t("div",F,[t("a",q,[t("div",E,[n[3]||(n[3]=t("h1",{class:"mb-0"},[t("i",{class:"bi bi-discord"})],-1)),t("div",null,[t("div",J,[n[2]||(n[2]=t("h5",{class:"mb-0"}," Discord Server ",-1)),t("span",P,[e.value?(a(),c("span",Y)):h("",!0),g.value!==void 0&&!e.value?(a(),c("span",K,[n[1]||(n[1]=t("i",{class:"bi bi-person-fill me-2"},null,-1)),v(b(g.value.presence_count)+" Online ",1)])):h("",!0)])]),t("small",Q,[s(m,{t:"Join our Discord server for quick help or chat about WGDashboard!"})])])])]),t("a",X,[t("div",Z,[n[4]||(n[4]=t("h1",{class:"mb-0"},[t("i",{class:"bi bi-hash"})],-1)),t("div",null,[t("h5",tt,[s(m,{t:"Official Documentation"})]),t("small",et,[s(m,{t:"Official documentation contains User Guides and more..."})])])])])])])])])]))}},ot={key:"header",class:"shadow"},at={class:"p-3 d-flex gap-2 flex-column"},nt={class:"d-flex text-body"},it={class:"d-flex flex-column align-items-start gap-1"},lt={class:"mb-0"},rt={class:"mb-0"},dt={class:"list-group"},ct={href:"https://docs.wgdashboard.dev/",target:"_blank",class:"list-group-item list-group-item-action d-flex align-items-center"},ut={target:"_blank",role:"button",href:"https://discord.gg/72TwzjeuWm",class:"list-group-item list-group-item-action d-flex align-items-center"},mt={__name:"agentModal",emits:["close"],setup(l,{emit:e}){const g=e,d=y();return(n,r)=>(a(),c("div",{class:k(["agentContainer m-2 rounded-3 d-flex flex-column text-body",{enabled:H(d).HelpAgent.Enable}])},[s(M,{name:"agent-message"},{default:i(()=>[t("div",ot,[t("div",at,[t("div",nt,[t("div",it,[t("h5",lt,[s(m,{t:"Help"})])]),t("a",{role:"button",class:"ms-auto text-body",onClick:r[0]||(r[0]=o=>g("close"))},[...r[1]||(r[1]=[t("h5",{class:"mb-0"},[t("i",{class:"bi bi-x-lg"})],-1)])])]),t("p",rt,[s(m,{t:"You can visit our: "})]),t("div",dt,[t("a",ct,[r[2]||(r[2]=t("i",{class:"bi bi-book-fill"},null,-1)),s(m,{class:"ms-auto",t:"Official Documentation"})]),t("a",ut,[r[3]||(r[3]=t("i",{class:"bi bi-discord"},null,-1)),s(m,{class:"ms-auto",t:"Discord Server"})])])])])]),_:1})],2))}},gt=$(mt,[["__scopeId","data-v-f37f608d"]]),ft={name:"navbar",components:{HelpModal:st,LocaleText:m,AgentModal:gt},setup(){const l=G(),e=y();return{wireguardConfigurationsStore:l,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:"",openHelpModal:!1,openAgentModal:!1}},computed:{getActiveCrossServer(){if(this.dashboardConfigurationStore.ActiveServerConfiguration)return new URL(this.dashboardConfigurationStore.CrossServerConfiguration.ServerList[this.dashboardConfigurationStore.ActiveServerConfiguration].host)}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),await T("/api/getDashboardUpdate",{},l=>{l.status?(l.data&&(this.updateAvailable=!0,this.updateUrl=l.data),this.updateMessage=l.message):(this.updateMessage=N("Failed to check available update"),console.log(`Failed to get update: ${l.message}`))}),this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)}},_t=["data-bs-theme"],pt={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},vt={class:"sidebar-sticky"},bt={class:"text-white text-center m-0 py-3 mb-2 btn-brand"},ht={key:0,class:"ms-auto"},xt={class:"nav flex-column px-2 gap-1"},Ct={class:"nav-item"},kt={class:"nav-item"},St={class:"nav-item"},$t={class:"nav-item"},yt={class:"nav-item"},wt={class:"sidebar-heading px-3 mt-3 mb-1 text-muted text-center"},Mt={class:"nav flex-column px-2 gap-1"},At={class:"nav-item"},Dt={class:"sidebar-heading px-3 mt-3 mb-1 text-muted text-center"},Lt={class:"nav flex-column px-2 gap-1"},Ht={class:"nav-item"},Tt={class:"nav-item"},Nt={class:"nav-item"},Gt={class:"nav flex-column px-2 mb-3"},Wt={class:"nav-item"},Vt={class:"nav-item",style:{"font-size":"0.8rem"}},It=["href"],Ot={class:"nav-link text-muted rounded-3"},Ut={key:1,class:"nav-link text-muted rounded-3"};function jt(l,e,g,d,n,r){const o=_("LocaleText"),u=_("RouterLink"),C=_("HelpModal"),p=_("AgentModal");return a(),c("div",{class:k(["col-md-3 col-lg-2 d-md-block p-2 navbar-container bg-transparent",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":d.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[t("nav",pt,[t("div",vt,[t("div",bt,[e[5]||(e[5]=t("h5",{class:"mb-0"}," WGDashboard ",-1)),r.getActiveCrossServer!==void 0?(a(),c("small",ht,[e[4]||(e[4]=t("i",{class:"bi bi-hdd-rack-fill me-2"},null,-1)),v(b(r.getActiveCrossServer.host),1)])):h("",!0)]),t("ul",xt,[t("li",Ct,[s(u,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:i(()=>[e[6]||(e[6]=t("i",{class:"bi bi-house me-2"},null,-1)),s(o,{t:"Home"})]),_:1})]),t("li",kt,[s(u,{class:"nav-link rounded-3",to:"/settings","active-class":"active"},{default:i(()=>[e[7]||(e[7]=t("i",{class:"bi bi-gear me-2"},null,-1)),s(o,{t:"Settings"})]),_:1})]),t("li",St,[s(u,{class:"nav-link rounded-3",to:"/clients","active-class":"active"},{default:i(()=>[e[8]||(e[8]=t("i",{class:"bi bi-people me-2"},null,-1)),s(o,{t:"Clients"})]),_:1})]),t("li",$t,[s(u,{class:"nav-link rounded-3",to:"/webhooks","active-class":"active"},{default:i(()=>[e[9]||(e[9]=t("i",{class:"bi bi-postcard me-2"},null,-1)),s(o,{t:"Webhooks"})]),_:1})]),t("li",yt,[t("a",{class:"nav-link rounded-3",role:"button",onClick:e[0]||(e[0]=f=>n.openAgentModal=!0)},[e[10]||(e[10]=t("i",{class:"bi bi-question-circle me-2"},null,-1)),s(o,{t:"Help"})])])]),e[13]||(e[13]=t("hr",{class:"text-body my-2"},null,-1)),t("h6",wt,[s(o,{t:"WireGuard Configurations"})]),t("ul",Mt,[(a(!0),c(A,null,D(this.wireguardConfigurationsStore.sortConfigurations,f=>(a(),c("li",At,[s(u,{to:"/configuration/"+f.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:i(()=>[t("span",{class:k(["dot me-2",{active:f.Status}])},null,2),v(" "+b(f.Name),1)]),_:2},1032,["to"])]))),256))]),e[14]||(e[14]=t("hr",{class:"text-body my-2"},null,-1)),t("h6",Dt,[s(o,{t:"Tools"})]),t("ul",Lt,[t("li",Ht,[s(u,{to:"/system_status",class:"nav-link rounded-3","active-class":"active"},{default:i(()=>[s(o,{t:"System Status"})]),_:1})]),t("li",Tt,[s(u,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:i(()=>[s(o,{t:"Ping"})]),_:1})]),t("li",Nt,[s(u,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:i(()=>[s(o,{t:"Traceroute"})]),_:1})])]),e[15]||(e[15]=t("hr",{class:"text-body my-2"},null,-1)),t("ul",Gt,[t("li",Wt,[t("a",{class:"nav-link text-danger rounded-3",onClick:e[1]||(e[1]=f=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[e[11]||(e[11]=t("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),s(o,{t:"Sign Out"})])]),t("li",Vt,[this.updateAvailable?(a(),c("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[t("small",Ot,[s(o,{t:this.updateMessage},null,8,["t"]),e[12]||(e[12]=v(" (",-1)),s(o,{t:"Current Version:"}),v(" "+b(d.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,It)):(a(),c("small",Ut,[s(o,{t:this.updateMessage},null,8,["t"]),v(" ("+b(d.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])]),s(S,{name:"zoom"},{default:i(()=>[this.openHelpModal?(a(),x(C,{key:0,onClose:e[2]||(e[2]=f=>{n.openHelpModal=!1})})):h("",!0)]),_:1}),s(S,{name:"slideIn"},{default:i(()=>[this.openAgentModal?(a(),x(p,{key:0,onClose:e[3]||(e[3]=f=>n.openAgentModal=!1)})):h("",!0)]),_:1})],10,_t)}const zt=$(ft,[["render",jt],["__scopeId","data-v-982f1a52"]]),Bt={name:"index",components:{Message:I,Navbar:zt},async setup(){return{dashboardConfigurationStore:y()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(l=>l.show)}}},Rt=["data-bs-theme"],Ft={class:"row h-100"},qt={class:"col-md-9 col-lg-10 overflow-y-scroll mb-0 pt-2"},Et={class:"messageCentre text-body position-absolute d-flex"};function Jt(l,e,g,d,n,r){const o=_("Navbar"),u=_("RouterView"),C=_("Message");return a(),c("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[t("div",Ft,[s(o),t("main",qt,[(a(),x(V,null,{default:i(()=>[s(u,null,{default:i(({Component:p})=>[s(S,{name:"fade2",mode:"out-in",appear:""},{default:i(()=>[(a(),x(W(p)))]),_:2},1024)]),_:1})]),_:1})),t("div",Et,[s(M,{name:"message",tag:"div",class:"position-relative flex-sm-grow-0 flex-grow-1 d-flex align-items-end ms-sm-auto flex-column gap-2"},{default:i(()=>[(a(!0),c(A,null,D(r.getMessages.slice().reverse(),p=>(a(),x(C,{message:p,key:p.id},null,8,["message"]))),128))]),_:1})])])])],8,Rt)}const Xt=$(Bt,[["render",Jt],["__scopeId","data-v-0c6a5068"]]);export{Xt as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/index-DW-_CXHM.js b/src/static/dist/WGDashboardAdmin/assets/index-BCe-EVqv.js
similarity index 93%
rename from src/static/dist/WGDashboardAdmin/assets/index-DW-_CXHM.js
rename to src/static/dist/WGDashboardAdmin/assets/index-BCe-EVqv.js
index 2e7ec018..aa3ca9ff 100644
--- a/src/static/dist/WGDashboardAdmin/assets/index-DW-_CXHM.js
+++ b/src/static/dist/WGDashboardAdmin/assets/index-BCe-EVqv.js
@@ -1,4 +1,4 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DTUDBDs4.js","./localeText-DGSSxTBj.js","./message-GT1GlDor.js","./dayjs.min-CkHkDA7F.js","./message-Bh5W0B3y.css","./index-CpoCtfuw.css","./configurationList-CUENhDPY.js","./protocolBadge-D8iagdWj.js","./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-CLz-8WG5.js","./storageMount-wWOSNV8e.css","./configurationList-BKKG6ypL.css","./settings-vndraK73.js","./peersDefaultSettingsInput-CXh1gD2V.js","./dashboardEmailSettings-yQR-9bfQ.js","./vue-datepicker-DeXH1OGI.js","./index-duVMn5Kh.js","./dashboardEmailSettings-BxtXuVtX.css","./dashboardSettingsWireguardConfigurationAutostart-DiREU_ME.js","./dashboardSettingsWireguardConfigurationAutostart-D5UlSscq.css","./wgdashboardSettings-DTVWzunC.js","./peerDefaultSettings-Cow-IZva.js","./wireguardConfigurationSettings-D_J1N3Sp.js","./ping-B37IwnRr.js","./osmap-Bzmy-oq4.js","./Vector-CuSZivra.js","./Vector-BtPuoxOl.css","./osmap-CsoM1fIq.css","./ping-DgbK5UF9.css","./traceroute-BvAiVgpx.js","./traceroute-D9mlT_ah.css","./newConfiguration-KTw7FLm0.js","./index-Bno8fcdN.js","./galois-field-I2lBzzs-.js","./newConfiguration-CaR3VWG-.css","./restoreConfiguration-DJxoesHW.js","./restoreConfiguration-Go8Q_2zy.css","./systemStatus-BA9IeSOh.js","./index-Dk0b_puN.js","./systemStatus-DdUpBwt2.css","./clients-BK_guIYX.js","./DashboardClientAssignmentStore-aB7p_aSe.js","./clients-CfS2KUuu.css","./clientViewer-B2Gnxw0s.js","./clientViewer-C5axh9P7.css","./dashboardWebHooks-VT4XDKAv.js","./dashboardWebHooks-Dl-enc0Z.css","./peerList-C7P4VQnq.js","./peerList-7q3zheYP.css","./signin-FcGTPYXi.js","./signin-DZT8PIVl.css","./setup-CmZcA1UA.js","./totp-DafLO14t.js","./browser-B2j17eoG.js","./share-BH7KjNTD.js","./share-e5E8P3Ro.css"])))=>i.map(i=>d[i]);
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B8FA5wIW.js","./localeText-fe5sRLWX.js","./message-DEALuPCn.js","./dayjs.min-Ba6APokV.js","./message-Bh5W0B3y.css","./index-CpoCtfuw.css","./configurationList-Cz8x7tFK.js","./protocolBadge-56h7MGgI.js","./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-B0g652BU.js","./storageMount-wWOSNV8e.css","./configurationList-BKKG6ypL.css","./settings-KlG98Yii.js","./peersDefaultSettingsInput-B_buwHXl.js","./dashboardEmailSettings-DjeLgg0R.js","./vue-datepicker-D-ia9qje.js","./index-DCd9CkLQ.js","./dashboardEmailSettings-BxtXuVtX.css","./dashboardSettingsWireguardConfigurationAutostart-CUUg3g-F.js","./dashboardSettingsWireguardConfigurationAutostart-D5UlSscq.css","./wgdashboardSettings-D94ltk8c.js","./peerDefaultSettings-D6pua8X-.js","./wireguardConfigurationSettings-BpXMnzum.js","./ping-Bmq297ir.js","./osmap-CLc5c_eh.js","./Vector-CuSZivra.js","./Vector-BtPuoxOl.css","./osmap-CsoM1fIq.css","./ping-DgbK5UF9.css","./traceroute-DkCRz7Cp.js","./traceroute-D9mlT_ah.css","./newConfiguration-CSZaxFrx.js","./index-Bno8fcdN.js","./galois-field-I2lBzzs-.js","./newConfiguration-CaR3VWG-.css","./restoreConfiguration-CS0vimZ5.js","./restoreConfiguration-Go8Q_2zy.css","./systemStatus-BwVNyVHa.js","./index-BXCSGGkv.js","./systemStatus-DdUpBwt2.css","./clients-D8CGvKPT.js","./DashboardClientAssignmentStore-c-G-fTFK.js","./clients-CfS2KUuu.css","./clientViewer-CSPixv4n.js","./clientViewer-C5axh9P7.css","./dashboardWebHooks-D04P6bzU.js","./dashboardWebHooks-Dl-enc0Z.css","./peerList-D9CAwGmT.js","./peerList-7q3zheYP.css","./signin-Cxz-p-xk.js","./signin-DZT8PIVl.css","./setup-CPsZ8X-C.js","./totp-CM1avBKQ.js","./browser-gQUFp51v.js","./share-D9-1WFJG.js","./share-e5E8P3Ro.css"])))=>i.map(i=>d[i]);
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function mb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lg(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var s=!1;try{s=this instanceof r}catch{}return 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(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Cs={exports:{}},Qe="top",st="bottom",it="right",Je="left",Gs="auto",vr=[Qe,st,it,Je],Ln="start",or="end",Sc="clippingParents",So="viewport",Xn="popper",wc="reference",Ji=vr.reduce(function(e,t){return e.concat([t+"-"+Ln,t+"-"+or])},[]),wo=[].concat(vr,[Gs]).reduce(function(e,t){return e.concat([t,t+"-"+Ln,t+"-"+or])},[]),Oc="beforeRead",Nc="read",xc="afterRead",Rc="beforeMain",Ic="main",Dc="afterMain",Lc="beforeWrite",Pc="write",$c="afterWrite",Mc=[Oc,Nc,xc,Rc,Ic,Dc,Lc,Pc,$c];function Pt(e){return e?(e.nodeName||"").toLowerCase():null}function ot(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Pn(e){var t=ot(e).Element;return e instanceof t||e instanceof Element}function ht(e){var t=ot(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Oo(e){if(typeof ShadowRoot>"u")return!1;var t=ot(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Pg(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},s=t.attributes[n]||{},o=t.elements[n];!ht(o)||!Pt(o)||(Object.assign(o.style,r),Object.keys(s).forEach(function(a){var l=s[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function $g(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(r){var s=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=a.reduce(function(c,d){return c[d]="",c},{});!ht(s)||!Pt(s)||(Object.assign(s.style,l),Object.keys(o).forEach(function(c){s.removeAttribute(c)}))})}}const No={name:"applyStyles",enabled:!0,phase:"write",fn:Pg,effect:$g,requires:["computeStyles"]};function Lt(e){return e.split("-")[0]}var On=Math.max,Ds=Math.min,ar=Math.round;function Zi(){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 kc(){return!/^((?!chrome|android).)*safari/i.test(Zi())}function lr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),s=1,o=1;t&&ht(e)&&(s=e.offsetWidth>0&&ar(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ar(r.height)/e.offsetHeight||1);var a=Pn(e)?ot(e):window,l=a.visualViewport,c=!kc()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/s,f=(r.top+(c&&l?l.offsetTop:0))/o,h=r.width/s,p=r.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function xo(e){var t=lr(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Vc(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Oo(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Kt(e){return ot(e).getComputedStyle(e)}function Mg(e){return["table","td","th"].indexOf(Pt(e))>=0}function fn(e){return((Pn(e)?e.ownerDocument:e.document)||window.document).documentElement}function qs(e){return Pt(e)==="html"?e:e.assignedSlot||e.parentNode||(Oo(e)?e.host:null)||fn(e)}function el(e){return!ht(e)||Kt(e).position==="fixed"?null:e.offsetParent}function kg(e){var t=/firefox/i.test(Zi()),n=/Trident/i.test(Zi());if(n&&ht(e)){var r=Kt(e);if(r.position==="fixed")return null}var s=qs(e);for(Oo(s)&&(s=s.host);ht(s)&&["html","body"].indexOf(Pt(s))<0;){var o=Kt(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function Xr(e){for(var t=ot(e),n=el(e);n&&Mg(n)&&Kt(n).position==="static";)n=el(n);return n&&(Pt(n)==="html"||Pt(n)==="body"&&Kt(n).position==="static")?t:n||kg(e)||t}function Ro(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dr(e,t,n){return On(e,Ds(t,n))}function Vg(e,t,n){var r=Dr(e,t,n);return r>n?n:r}function Fc(){return{top:0,right:0,bottom:0,left:0}}function Hc(e){return Object.assign({},Fc(),e)}function Bc(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Fg=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Hc(typeof t!="number"?t:Bc(t,vr))};function Hg(e){var t,n=e.state,r=e.name,s=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Lt(n.placement),c=Ro(l),d=[Je,it].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!a)){var h=Fg(s.padding,n),p=xo(o),m=c==="y"?Qe:Je,O=c==="y"?st:it,A=n.rects.reference[f]+n.rects.reference[c]-a[c]-n.rects.popper[f],x=a[c]-n.rects.reference[c],P=Xr(o),V=P?c==="y"?P.clientHeight||0:P.clientWidth||0:0,H=A/2-x/2,M=h[m],b=V-p[f]-h[O],y=V/2-p[f]/2+H,N=Dr(M,y,b),T=c;n.modifiersData[r]=(t={},t[T]=N,t.centerOffset=N-y,t)}}function Bg(e){var t=e.state,n=e.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||Vc(t.elements.popper,s)&&(t.elements.arrow=s))}const jc={name:"arrow",enabled:!0,phase:"main",fn:Hg,effect:Bg,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function cr(e){return e.split("-")[1]}var jg={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Wg(e,t){var n=e.x,r=e.y,s=t.devicePixelRatio||1;return{x:ar(n*s)/s||0,y:ar(r*s)/s||0}}function tl(e){var t,n=e.popper,r=e.popperRect,s=e.placement,o=e.variation,a=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=a.x,m=p===void 0?0:p,O=a.y,A=O===void 0?0:O,x=typeof f=="function"?f({x:m,y:A}):{x:m,y:A};m=x.x,A=x.y;var P=a.hasOwnProperty("x"),V=a.hasOwnProperty("y"),H=Je,M=Qe,b=window;if(d){var y=Xr(n),N="clientHeight",T="clientWidth";if(y===ot(n)&&(y=fn(n),Kt(y).position!=="static"&&l==="absolute"&&(N="scrollHeight",T="scrollWidth")),y=y,s===Qe||(s===Je||s===it)&&o===or){M=st;var C=h&&y===b&&b.visualViewport?b.visualViewport.height:y[N];A-=C-r.height,A*=c?1:-1}if(s===Je||(s===Qe||s===st)&&o===or){H=it;var S=h&&y===b&&b.visualViewport?b.visualViewport.width:y[T];m-=S-r.width,m*=c?1:-1}}var U=Object.assign({position:l},d&&jg),j=f===!0?Wg({x:m,y:A},ot(n)):{x:m,y:A};if(m=j.x,A=j.y,c){var te;return Object.assign({},U,(te={},te[M]=V?"0":"",te[H]=P?"0":"",te.transform=(b.devicePixelRatio||1)<=1?"translate("+m+"px, "+A+"px)":"translate3d("+m+"px, "+A+"px, 0)",te))}return Object.assign({},U,(t={},t[M]=V?A+"px":"",t[H]=P?m+"px":"",t.transform="",t))}function Kg(e){var t=e.state,n=e.options,r=n.gpuAcceleration,s=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:Lt(t.placement),variation:cr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tl(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tl(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Io={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Kg,data:{}};var gs={passive:!0};function Ug(e){var t=e.state,n=e.instance,r=e.options,s=r.scroll,o=s===void 0?!0:s,a=r.resize,l=a===void 0?!0:a,c=ot(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,gs)}),l&&c.addEventListener("resize",n.update,gs),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,gs)}),l&&c.removeEventListener("resize",n.update,gs)}}const Do={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ug,data:{}};var Gg={left:"right",right:"left",bottom:"top",top:"bottom"};function Ss(e){return e.replace(/left|right|bottom|top/g,function(t){return Gg[t]})}var qg={start:"end",end:"start"};function nl(e){return e.replace(/start|end/g,function(t){return qg[t]})}function Lo(e){var t=ot(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Po(e){return lr(fn(e)).left+Lo(e).scrollLeft}function Yg(e,t){var n=ot(e),r=fn(e),s=n.visualViewport,o=r.clientWidth,a=r.clientHeight,l=0,c=0;if(s){o=s.width,a=s.height;var d=kc();(d||!d&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:a,x:l+Po(e),y:c}}function zg(e){var t,n=fn(e),r=Lo(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=On(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=On(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-r.scrollLeft+Po(e),c=-r.scrollTop;return Kt(s||n).direction==="rtl"&&(l+=On(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:a,x:l,y:c}}function $o(e){var t=Kt(e),n=t.overflow,r=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function Wc(e){return["html","body","#document"].indexOf(Pt(e))>=0?e.ownerDocument.body:ht(e)&&$o(e)?e:Wc(qs(e))}function Lr(e,t){var n;t===void 0&&(t=[]);var r=Wc(e),s=r===((n=e.ownerDocument)==null?void 0:n.body),o=ot(r),a=s?[o].concat(o.visualViewport||[],$o(r)?r:[]):r,l=t.concat(a);return s?l:l.concat(Lr(qs(a)))}function eo(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Xg(e,t){var n=lr(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function rl(e,t,n){return t===So?eo(Yg(e,n)):Pn(t)?Xg(t,n):eo(zg(fn(e)))}function Qg(e){var t=Lr(qs(e)),n=["absolute","fixed"].indexOf(Kt(e).position)>=0,r=n&&ht(e)?Xr(e):e;return Pn(r)?t.filter(function(s){return Pn(s)&&Vc(s,r)&&Pt(s)!=="body"}):[]}function Jg(e,t,n,r){var s=t==="clippingParents"?Qg(e):[].concat(t),o=[].concat(s,[n]),a=o[0],l=o.reduce(function(c,d){var f=rl(e,d,r);return c.top=On(f.top,c.top),c.right=Ds(f.right,c.right),c.bottom=Ds(f.bottom,c.bottom),c.left=On(f.left,c.left),c},rl(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Kc(e){var t=e.reference,n=e.element,r=e.placement,s=r?Lt(r):null,o=r?cr(r):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(s){case Qe:c={x:a,y:t.y-n.height};break;case st:c={x:a,y:t.y+t.height};break;case it:c={x:t.x+t.width,y:l};break;case Je:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=s?Ro(s):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case Ln:c[d]=c[d]-(t[f]/2-n[f]/2);break;case or:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function ur(e,t){t===void 0&&(t={});var n=t,r=n.placement,s=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?Sc:l,d=n.rootBoundary,f=d===void 0?So:d,h=n.elementContext,p=h===void 0?Xn:h,m=n.altBoundary,O=m===void 0?!1:m,A=n.padding,x=A===void 0?0:A,P=Hc(typeof x!="number"?x:Bc(x,vr)),V=p===Xn?wc:Xn,H=e.rects.popper,M=e.elements[O?V:p],b=Jg(Pn(M)?M:M.contextElement||fn(e.elements.popper),c,f,a),y=lr(e.elements.reference),N=Kc({reference:y,element:H,placement:s}),T=eo(Object.assign({},H,N)),C=p===Xn?T:y,S={top:b.top-C.top+P.top,bottom:C.bottom-b.bottom+P.bottom,left:b.left-C.left+P.left,right:C.right-b.right+P.right},U=e.modifiersData.offset;if(p===Xn&&U){var j=U[s];Object.keys(S).forEach(function(te){var he=[it,st].indexOf(te)>=0?1:-1,Ee=[Qe,st].indexOf(te)>=0?"y":"x";S[te]+=j[Ee]*he})}return S}function Zg(e,t){t===void 0&&(t={});var n=t,r=n.placement,s=n.boundary,o=n.rootBoundary,a=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?wo:c,f=cr(r),h=f?l?Ji:Ji.filter(function(O){return cr(O)===f}):vr,p=h.filter(function(O){return d.indexOf(O)>=0});p.length===0&&(p=h);var m=p.reduce(function(O,A){return O[A]=ur(e,{placement:A,boundary:s,rootBoundary:o,padding:a})[Lt(A)],O},{});return Object.keys(m).sort(function(O,A){return m[O]-m[A]})}function em(e){if(Lt(e)===Gs)return[];var t=Ss(e);return[nl(e),t,nl(t)]}function tm(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,a=n.altAxis,l=a===void 0?!0:a,c=n.fallbackPlacements,d=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,O=m===void 0?!0:m,A=n.allowedAutoPlacements,x=t.options.placement,P=Lt(x),V=P===x,H=c||(V||!O?[Ss(x)]:em(x)),M=[x].concat(H).reduce(function(de,me){return de.concat(Lt(me)===Gs?Zg(t,{placement:me,boundary:f,rootBoundary:h,padding:d,flipVariations:O,allowedAutoPlacements:A}):me)},[]),b=t.rects.reference,y=t.rects.popper,N=new Map,T=!0,C=M[0],S=0;S=0,Ee=he?"width":"height",ie=ur(t,{placement:U,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),I=he?te?it:Je:te?st:Qe;b[Ee]>y[Ee]&&(I=Ss(I));var K=Ss(I),G=[];if(o&&G.push(ie[j]<=0),l&&G.push(ie[I]<=0,ie[K]<=0),G.every(function(de){return de})){C=U,T=!1;break}N.set(U,G)}if(T)for(var X=O?3:1,re=function(me){var ye=M.find(function(L){var Q=N.get(L);if(Q)return Q.slice(0,me).every(function(Z){return Z})});if(ye)return C=ye,"break"},ne=X;ne>0;ne--){var se=re(ne);if(se==="break")break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}}const Uc={name:"flip",enabled:!0,phase:"main",fn:tm,requiresIfExists:["offset"],data:{_skip:!1}};function sl(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function il(e){return[Qe,it,st,Je].some(function(t){return e[t]>=0})}function nm(e){var t=e.state,n=e.name,r=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,a=ur(t,{elementContext:"reference"}),l=ur(t,{altBoundary:!0}),c=sl(a,r),d=sl(l,s,o),f=il(c),h=il(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Gc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:nm};function rm(e,t,n){var r=Lt(e),s=[Je,Qe].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],l=o[1];return a=a||0,l=(l||0)*s,[Je,it].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}function sm(e){var t=e.state,n=e.options,r=e.name,s=n.offset,o=s===void 0?[0,0]:s,a=wo.reduce(function(f,h){return f[h]=rm(h,t.rects,o),f},{}),l=a[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=a}const qc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:sm};function im(e){var t=e.state,n=e.name;t.modifiersData[n]=Kc({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Mo={name:"popperOffsets",enabled:!0,phase:"read",fn:im,data:{}};function om(e){return e==="x"?"y":"x"}function am(e){var t=e.state,n=e.options,r=e.name,s=n.mainAxis,o=s===void 0?!0:s,a=n.altAxis,l=a===void 0?!1:a,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,O=n.tetherOffset,A=O===void 0?0:O,x=ur(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),P=Lt(t.placement),V=cr(t.placement),H=!V,M=Ro(P),b=om(M),y=t.modifiersData.popperOffsets,N=t.rects.reference,T=t.rects.popper,C=typeof A=="function"?A(Object.assign({},t.rects,{placement:t.placement})):A,S=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),U=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(y){if(o){var te,he=M==="y"?Qe:Je,Ee=M==="y"?st:it,ie=M==="y"?"height":"width",I=y[M],K=I+x[he],G=I-x[Ee],X=m?-T[ie]/2:0,re=V===Ln?N[ie]:T[ie],ne=V===Ln?-T[ie]:-N[ie],se=t.elements.arrow,de=m&&se?xo(se):{width:0,height:0},me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Fc(),ye=me[he],L=me[Ee],Q=Dr(0,N[ie],de[ie]),Z=H?N[ie]/2-X-Q-ye-S.mainAxis:re-Q-ye-S.mainAxis,oe=H?-N[ie]/2+X+Q+L+S.mainAxis:ne+Q+L+S.mainAxis,D=t.elements.arrow&&Xr(t.elements.arrow),g=D?M==="y"?D.clientTop||0:D.clientLeft||0:0,E=(te=U?.[M])!=null?te:0,w=I+Z-E-g,$=I+oe-E,B=Dr(m?Ds(K,w):K,I,m?On(G,$):G);y[M]=B,j[M]=B-I}if(l){var F,q=M==="x"?Qe:Je,z=M==="x"?st:it,R=y[b],W=b==="y"?"height":"width",ce=R+x[q],ee=R-x[z],ae=[Qe,Je].indexOf(P)!==-1,ue=(F=U?.[b])!=null?F:0,pe=ae?ce:R-N[W]-T[W]-ue+S.altAxis,be=ae?R+N[W]+T[W]-ue-S.altAxis:ee,_e=m&&ae?Vg(pe,R,be):Dr(m?pe:ce,R,m?be:ee);y[b]=_e,j[b]=_e-R}t.modifiersData[r]=j}}const Yc={name:"preventOverflow",enabled:!0,phase:"main",fn:am,requiresIfExists:["offset"]};function lm(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cm(e){return e===ot(e)||!ht(e)?Lo(e):lm(e)}function um(e){var t=e.getBoundingClientRect(),n=ar(t.width)/e.offsetWidth||1,r=ar(t.height)/e.offsetHeight||1;return n!==1||r!==1}function fm(e,t,n){n===void 0&&(n=!1);var r=ht(t),s=ht(t)&&um(t),o=fn(t),a=lr(e,s,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Pt(t)!=="body"||$o(o))&&(l=cm(t)),ht(t)?(c=lr(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=Po(o))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function dm(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function s(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&s(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||s(o)}),r}function hm(e){var t=dm(e);return Mc.reduce(function(n,r){return n.concat(t.filter(function(s){return s.phase===r}))},[])}function pm(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function gm(e){var t=e.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var ol={placement:"bottom",modifiers:[],strategy:"absolute"};function al(){for(var e=arguments.length,t=new Array(e),n=0;n_[u]})}}return i.default=_,Object.freeze(i)}const s=r(n),o=new Map,a={set(_,i,u){o.has(_)||o.set(_,new Map);const v=o.get(_);if(!v.has(i)&&v.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(v.keys())[0]}.`);return}v.set(i,u)},get(_,i){return o.has(_)&&o.get(_).get(i)||null},remove(_,i){if(!o.has(_))return;const u=o.get(_);u.delete(i),u.size===0&&o.delete(_)}},l=1e6,c=1e3,d="transitionend",f=_=>(_&&window.CSS&&window.CSS.escape&&(_=_.replace(/#([^\s"#']+)/g,(i,u)=>`#${CSS.escape(u)}`)),_),h=_=>_==null?`${_}`:Object.prototype.toString.call(_).match(/\s([a-z]+)/i)[1].toLowerCase(),p=_=>{do _+=Math.floor(Math.random()*l);while(document.getElementById(_));return _},m=_=>{if(!_)return 0;let{transitionDuration:i,transitionDelay:u}=window.getComputedStyle(_);const v=Number.parseFloat(i),k=Number.parseFloat(u);return!v&&!k?0:(i=i.split(",")[0],u=u.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(u))*c)},O=_=>{_.dispatchEvent(new Event(d))},A=_=>!_||typeof _!="object"?!1:(typeof _.jquery<"u"&&(_=_[0]),typeof _.nodeType<"u"),x=_=>A(_)?_.jquery?_[0]:_:typeof _=="string"&&_.length>0?document.querySelector(f(_)):null,P=_=>{if(!A(_)||_.getClientRects().length===0)return!1;const i=getComputedStyle(_).getPropertyValue("visibility")==="visible",u=_.closest("details:not([open])");if(!u)return i;if(u!==_){const v=_.closest("summary");if(v&&v.parentNode!==u||v===null)return!1}return i},V=_=>!_||_.nodeType!==Node.ELEMENT_NODE||_.classList.contains("disabled")?!0:typeof _.disabled<"u"?_.disabled:_.hasAttribute("disabled")&&_.getAttribute("disabled")!=="false",H=_=>{if(!document.documentElement.attachShadow)return null;if(typeof _.getRootNode=="function"){const i=_.getRootNode();return i instanceof ShadowRoot?i:null}return _ instanceof ShadowRoot?_:_.parentNode?H(_.parentNode):null},M=()=>{},b=_=>{_.offsetHeight},y=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,N=[],T=_=>{document.readyState==="loading"?(N.length||document.addEventListener("DOMContentLoaded",()=>{for(const i of N)i()}),N.push(_)):_()},C=()=>document.documentElement.dir==="rtl",S=_=>{T(()=>{const i=y();if(i){const u=_.NAME,v=i.fn[u];i.fn[u]=_.jQueryInterface,i.fn[u].Constructor=_,i.fn[u].noConflict=()=>(i.fn[u]=v,_.jQueryInterface)}})},U=(_,i=[],u=_)=>typeof _=="function"?_.call(...i):u,j=(_,i,u=!0)=>{if(!u){U(_);return}const k=m(i)+5;let J=!1;const Y=({target:ge})=>{ge===i&&(J=!0,i.removeEventListener(d,Y),U(_))};i.addEventListener(d,Y),setTimeout(()=>{J||O(i)},k)},te=(_,i,u,v)=>{const k=_.length;let J=_.indexOf(i);return J===-1?!u&&v?_[k-1]:_[0]:(J+=u?1:-1,v&&(J=(J+k)%k),_[Math.max(0,Math.min(J,k-1))])},he=/[^.]*(?=\..*)\.|.*/,Ee=/\..*/,ie=/::\d+$/,I={};let K=1;const G={mouseenter:"mouseover",mouseleave:"mouseout"},X=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 re(_,i){return i&&`${i}::${K++}`||_.uidEvent||K++}function ne(_){const i=re(_);return _.uidEvent=i,I[i]=I[i]||{},I[i]}function se(_,i){return function u(v){return g(v,{delegateTarget:_}),u.oneOff&&D.off(_,v.type,i),i.apply(_,[v])}}function de(_,i,u){return function v(k){const J=_.querySelectorAll(i);for(let{target:Y}=k;Y&&Y!==this;Y=Y.parentNode)for(const ge of J)if(ge===Y)return g(k,{delegateTarget:Y}),v.oneOff&&D.off(_,k.type,i,u),u.apply(Y,[k])}}function me(_,i,u=null){return Object.values(_).find(v=>v.callable===i&&v.delegationSelector===u)}function ye(_,i,u){const v=typeof i=="string",k=v?u:i||u;let J=oe(_);return X.has(J)||(J=_),[v,k,J]}function L(_,i,u,v,k){if(typeof i!="string"||!_)return;let[J,Y,ge]=ye(i,u,v);i in G&&(Y=(Dg=>function(qn){if(!qn.relatedTarget||qn.relatedTarget!==qn.delegateTarget&&!qn.delegateTarget.contains(qn.relatedTarget))return Dg.call(this,qn)})(Y));const Ze=ne(_),ut=Ze[ge]||(Ze[ge]={}),Me=me(ut,Y,J?u:null);if(Me){Me.oneOff=Me.oneOff&&k;return}const Ot=re(Y,i.replace(he,"")),Et=J?de(_,u,Y):se(_,Y);Et.delegationSelector=J?u:null,Et.callable=Y,Et.oneOff=k,Et.uidEvent=Ot,ut[Ot]=Et,_.addEventListener(ge,Et,J)}function Q(_,i,u,v,k){const J=me(i[u],v,k);J&&(_.removeEventListener(u,J,!!k),delete i[u][J.uidEvent])}function Z(_,i,u,v){const k=i[u]||{};for(const[J,Y]of Object.entries(k))J.includes(v)&&Q(_,i,u,Y.callable,Y.delegationSelector)}function oe(_){return _=_.replace(Ee,""),G[_]||_}const D={on(_,i,u,v){L(_,i,u,v,!1)},one(_,i,u,v){L(_,i,u,v,!0)},off(_,i,u,v){if(typeof i!="string"||!_)return;const[k,J,Y]=ye(i,u,v),ge=Y!==i,Ze=ne(_),ut=Ze[Y]||{},Me=i.startsWith(".");if(typeof J<"u"){if(!Object.keys(ut).length)return;Q(_,Ze,Y,J,k?u:null);return}if(Me)for(const Ot of Object.keys(Ze))Z(_,Ze,Ot,i.slice(1));for(const[Ot,Et]of Object.entries(ut)){const ps=Ot.replace(ie,"");(!ge||i.includes(ps))&&Q(_,Ze,Y,Et.callable,Et.delegationSelector)}},trigger(_,i,u){if(typeof i!="string"||!_)return null;const v=y(),k=oe(i),J=i!==k;let Y=null,ge=!0,Ze=!0,ut=!1;J&&v&&(Y=v.Event(i,u),v(_).trigger(Y),ge=!Y.isPropagationStopped(),Ze=!Y.isImmediatePropagationStopped(),ut=Y.isDefaultPrevented());const Me=g(new Event(i,{bubbles:ge,cancelable:!0}),u);return ut&&Me.preventDefault(),Ze&&_.dispatchEvent(Me),Me.defaultPrevented&&Y&&Y.preventDefault(),Me}};function g(_,i={}){for(const[u,v]of Object.entries(i))try{_[u]=v}catch{Object.defineProperty(_,u,{configurable:!0,get(){return v}})}return _}function E(_){if(_==="true")return!0;if(_==="false")return!1;if(_===Number(_).toString())return Number(_);if(_===""||_==="null")return null;if(typeof _!="string")return _;try{return JSON.parse(decodeURIComponent(_))}catch{return _}}function w(_){return _.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}const $={setDataAttribute(_,i,u){_.setAttribute(`data-bs-${w(i)}`,u)},removeDataAttribute(_,i){_.removeAttribute(`data-bs-${w(i)}`)},getDataAttributes(_){if(!_)return{};const i={},u=Object.keys(_.dataset).filter(v=>v.startsWith("bs")&&!v.startsWith("bsConfig"));for(const v of u){let k=v.replace(/^bs/,"");k=k.charAt(0).toLowerCase()+k.slice(1),i[k]=E(_.dataset[v])}return i},getDataAttribute(_,i){return E(_.getAttribute(`data-bs-${w(i)}`))}};class B{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(i){return i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i}_mergeConfigObj(i,u){const v=A(u)?$.getDataAttribute(u,"config"):{};return{...this.constructor.Default,...typeof v=="object"?v:{},...A(u)?$.getDataAttributes(u):{},...typeof i=="object"?i:{}}}_typeCheckConfig(i,u=this.constructor.DefaultType){for(const[v,k]of Object.entries(u)){const J=i[v],Y=A(J)?"element":h(J);if(!new RegExp(k).test(Y))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${v}" provided type "${Y}" but expected type "${k}".`)}}}const F="5.3.8";class q extends B{constructor(i,u){super(),i=x(i),i&&(this._element=i,this._config=this._getConfig(u),a.set(this._element,this.constructor.DATA_KEY,this))}dispose(){a.remove(this._element,this.constructor.DATA_KEY),D.off(this._element,this.constructor.EVENT_KEY);for(const i of Object.getOwnPropertyNames(this))this[i]=null}_queueCallback(i,u,v=!0){j(i,u,v)}_getConfig(i){return i=this._mergeConfigObj(i,this._element),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}static getInstance(i){return a.get(x(i),this.DATA_KEY)}static getOrCreateInstance(i,u={}){return this.getInstance(i)||new this(i,typeof u=="object"?u:null)}static get VERSION(){return F}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(i){return`${i}${this.EVENT_KEY}`}}const z=_=>{let i=_.getAttribute("data-bs-target");if(!i||i==="#"){let u=_.getAttribute("href");if(!u||!u.includes("#")&&!u.startsWith("."))return null;u.includes("#")&&!u.startsWith("#")&&(u=`#${u.split("#")[1]}`),i=u&&u!=="#"?u.trim():null}return i?i.split(",").map(u=>f(u)).join(","):null},R={find(_,i=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(i,_))},findOne(_,i=document.documentElement){return Element.prototype.querySelector.call(i,_)},children(_,i){return[].concat(..._.children).filter(u=>u.matches(i))},parents(_,i){const u=[];let v=_.parentNode.closest(i);for(;v;)u.push(v),v=v.parentNode.closest(i);return u},prev(_,i){let u=_.previousElementSibling;for(;u;){if(u.matches(i))return[u];u=u.previousElementSibling}return[]},next(_,i){let u=_.nextElementSibling;for(;u;){if(u.matches(i))return[u];u=u.nextElementSibling}return[]},focusableChildren(_){const i=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(u=>`${u}:not([tabindex^="-"])`).join(",");return this.find(i,_).filter(u=>!V(u)&&P(u))},getSelectorFromElement(_){const i=z(_);return i&&R.findOne(i)?i:null},getElementFromSelector(_){const i=z(_);return i?R.findOne(i):null},getMultipleElementsFromSelector(_){const i=z(_);return i?R.find(i):[]}},W=(_,i="hide")=>{const u=`click.dismiss${_.EVENT_KEY}`,v=_.NAME;D.on(document,u,`[data-bs-dismiss="${v}"]`,function(k){if(["A","AREA"].includes(this.tagName)&&k.preventDefault(),V(this))return;const J=R.getElementFromSelector(this)||this.closest(`.${v}`);_.getOrCreateInstance(J)[i]()})},ce="alert",ae=".bs.alert",ue=`close${ae}`,pe=`closed${ae}`,be="fade",_e="show";class Ie extends q{static get NAME(){return ce}close(){if(D.trigger(this._element,ue).defaultPrevented)return;this._element.classList.remove(_e);const u=this._element.classList.contains(be);this._queueCallback(()=>this._destroyElement(),this._element,u)}_destroyElement(){this._element.remove(),D.trigger(this._element,pe),this.dispose()}static jQueryInterface(i){return this.each(function(){const u=Ie.getOrCreateInstance(this);if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i](this)}})}}W(Ie,"close"),S(Ie);const je="button",at=".bs.button",pn=".data-api",ts="active",We='[data-bs-toggle="button"]',lt=`click${at}${pn}`;class Yt extends q{static get NAME(){return je}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(ts))}static jQueryInterface(i){return this.each(function(){const u=Yt.getOrCreateInstance(this);i==="toggle"&&u[i]()})}}D.on(document,lt,We,_=>{_.preventDefault();const i=_.target.closest(We);Yt.getOrCreateInstance(i).toggle()}),S(Yt);const ns="swipe",Fn=".bs.swipe",sd=`touchstart${Fn}`,id=`touchmove${Fn}`,od=`touchend${Fn}`,ad=`pointerdown${Fn}`,ld=`pointerup${Fn}`,cd="touch",ud="pen",fd="pointer-event",dd=40,hd={endCallback:null,leftCallback:null,rightCallback:null},pd={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class rs extends B{constructor(i,u){super(),this._element=i,!(!i||!rs.isSupported())&&(this._config=this._getConfig(u),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return hd}static get DefaultType(){return pd}static get NAME(){return ns}dispose(){D.off(this._element,Fn)}_start(i){if(!this._supportPointerEvents){this._deltaX=i.touches[0].clientX;return}this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX)}_end(i){this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX-this._deltaX),this._handleSwipe(),U(this._config.endCallback)}_move(i){this._deltaX=i.touches&&i.touches.length>1?0:i.touches[0].clientX-this._deltaX}_handleSwipe(){const i=Math.abs(this._deltaX);if(i<=dd)return;const u=i/this._deltaX;this._deltaX=0,u&&U(u>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(D.on(this._element,ad,i=>this._start(i)),D.on(this._element,ld,i=>this._end(i)),this._element.classList.add(fd)):(D.on(this._element,sd,i=>this._start(i)),D.on(this._element,id,i=>this._move(i)),D.on(this._element,od,i=>this._end(i)))}_eventIsPointerPenTouch(i){return this._supportPointerEvents&&(i.pointerType===ud||i.pointerType===cd)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const gd="carousel",zt=".bs.carousel",ha=".data-api",md="ArrowLeft",_d="ArrowRight",vd=500,Ar="next",Hn="prev",Bn="left",ss="right",Ed=`slide${zt}`,_i=`slid${zt}`,yd=`keydown${zt}`,bd=`mouseenter${zt}`,Ad=`mouseleave${zt}`,Td=`dragstart${zt}`,Cd=`load${zt}${ha}`,Sd=`click${zt}${ha}`,pa="carousel",is="active",wd="slide",Od="carousel-item-end",Nd="carousel-item-start",xd="carousel-item-next",Rd="carousel-item-prev",ga=".active",ma=".carousel-item",Id=ga+ma,Dd=".carousel-item img",Ld=".carousel-indicators",Pd="[data-bs-slide], [data-bs-slide-to]",$d='[data-bs-ride="carousel"]',Md={[md]:ss,[_d]:Bn},kd={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Vd={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class jn extends q{constructor(i,u){super(i,u),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=R.findOne(Ld,this._element),this._addEventListeners(),this._config.ride===pa&&this.cycle()}static get Default(){return kd}static get DefaultType(){return Vd}static get NAME(){return gd}next(){this._slide(Ar)}nextWhenVisible(){!document.hidden&&P(this._element)&&this.next()}prev(){this._slide(Hn)}pause(){this._isSliding&&O(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){D.one(this._element,_i,()=>this.cycle());return}this.cycle()}}to(i){const u=this._getItems();if(i>u.length-1||i<0)return;if(this._isSliding){D.one(this._element,_i,()=>this.to(i));return}const v=this._getItemIndex(this._getActive());if(v===i)return;const k=i>v?Ar:Hn;this._slide(k,u[i])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(i){return i.defaultInterval=i.interval,i}_addEventListeners(){this._config.keyboard&&D.on(this._element,yd,i=>this._keydown(i)),this._config.pause==="hover"&&(D.on(this._element,bd,()=>this.pause()),D.on(this._element,Ad,()=>this._maybeEnableCycle())),this._config.touch&&rs.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const v of R.find(Dd,this._element))D.on(v,Td,k=>k.preventDefault());const u={leftCallback:()=>this._slide(this._directionToOrder(Bn)),rightCallback:()=>this._slide(this._directionToOrder(ss)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),vd+this._config.interval))}};this._swipeHelper=new rs(this._element,u)}_keydown(i){if(/input|textarea/i.test(i.target.tagName))return;const u=Md[i.key];u&&(i.preventDefault(),this._slide(this._directionToOrder(u)))}_getItemIndex(i){return this._getItems().indexOf(i)}_setActiveIndicatorElement(i){if(!this._indicatorsElement)return;const u=R.findOne(ga,this._indicatorsElement);u.classList.remove(is),u.removeAttribute("aria-current");const v=R.findOne(`[data-bs-slide-to="${i}"]`,this._indicatorsElement);v&&(v.classList.add(is),v.setAttribute("aria-current","true"))}_updateInterval(){const i=this._activeElement||this._getActive();if(!i)return;const u=Number.parseInt(i.getAttribute("data-bs-interval"),10);this._config.interval=u||this._config.defaultInterval}_slide(i,u=null){if(this._isSliding)return;const v=this._getActive(),k=i===Ar,J=u||te(this._getItems(),v,k,this._config.wrap);if(J===v)return;const Y=this._getItemIndex(J),ge=ps=>D.trigger(this._element,ps,{relatedTarget:J,direction:this._orderToDirection(i),from:this._getItemIndex(v),to:Y});if(ge(Ed).defaultPrevented||!v||!J)return;const ut=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Y),this._activeElement=J;const Me=k?Nd:Od,Ot=k?xd:Rd;J.classList.add(Ot),b(J),v.classList.add(Me),J.classList.add(Me);const Et=()=>{J.classList.remove(Me,Ot),J.classList.add(is),v.classList.remove(is,Ot,Me),this._isSliding=!1,ge(_i)};this._queueCallback(Et,v,this._isAnimated()),ut&&this.cycle()}_isAnimated(){return this._element.classList.contains(wd)}_getActive(){return R.findOne(Id,this._element)}_getItems(){return R.find(ma,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(i){return C()?i===Bn?Hn:Ar:i===Bn?Ar:Hn}_orderToDirection(i){return C()?i===Hn?Bn:ss:i===Hn?ss:Bn}static jQueryInterface(i){return this.each(function(){const u=jn.getOrCreateInstance(this,i);if(typeof i=="number"){u.to(i);return}if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i]()}})}}D.on(document,Sd,Pd,function(_){const i=R.getElementFromSelector(this);if(!i||!i.classList.contains(pa))return;_.preventDefault();const u=jn.getOrCreateInstance(i),v=this.getAttribute("data-bs-slide-to");if(v){u.to(v),u._maybeEnableCycle();return}if($.getDataAttribute(this,"slide")==="next"){u.next(),u._maybeEnableCycle();return}u.prev(),u._maybeEnableCycle()}),D.on(window,Cd,()=>{const _=R.find($d);for(const i of _)jn.getOrCreateInstance(i)}),S(jn);const Fd="collapse",Tr=".bs.collapse",Hd=".data-api",Bd=`show${Tr}`,jd=`shown${Tr}`,Wd=`hide${Tr}`,Kd=`hidden${Tr}`,Ud=`click${Tr}${Hd}`,vi="show",Wn="collapse",os="collapsing",Gd="collapsed",qd=`:scope .${Wn} .${Wn}`,Yd="collapse-horizontal",zd="width",Xd="height",Qd=".collapse.show, .collapse.collapsing",Ei='[data-bs-toggle="collapse"]',Jd={parent:null,toggle:!0},Zd={parent:"(null|element)",toggle:"boolean"};class Kn extends q{constructor(i,u){super(i,u),this._isTransitioning=!1,this._triggerArray=[];const v=R.find(Ei);for(const k of v){const J=R.getSelectorFromElement(k),Y=R.find(J).filter(ge=>ge===this._element);J!==null&&Y.length&&this._triggerArray.push(k)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Jd}static get DefaultType(){return Zd}static get NAME(){return Fd}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let i=[];if(this._config.parent&&(i=this._getFirstLevelChildren(Qd).filter(ge=>ge!==this._element).map(ge=>Kn.getOrCreateInstance(ge,{toggle:!1}))),i.length&&i[0]._isTransitioning||D.trigger(this._element,Bd).defaultPrevented)return;for(const ge of i)ge.hide();const v=this._getDimension();this._element.classList.remove(Wn),this._element.classList.add(os),this._element.style[v]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const k=()=>{this._isTransitioning=!1,this._element.classList.remove(os),this._element.classList.add(Wn,vi),this._element.style[v]="",D.trigger(this._element,jd)},Y=`scroll${v[0].toUpperCase()+v.slice(1)}`;this._queueCallback(k,this._element,!0),this._element.style[v]=`${this._element[Y]}px`}hide(){if(this._isTransitioning||!this._isShown()||D.trigger(this._element,Wd).defaultPrevented)return;const u=this._getDimension();this._element.style[u]=`${this._element.getBoundingClientRect()[u]}px`,b(this._element),this._element.classList.add(os),this._element.classList.remove(Wn,vi);for(const k of this._triggerArray){const J=R.getElementFromSelector(k);J&&!this._isShown(J)&&this._addAriaAndCollapsedClass([k],!1)}this._isTransitioning=!0;const v=()=>{this._isTransitioning=!1,this._element.classList.remove(os),this._element.classList.add(Wn),D.trigger(this._element,Kd)};this._element.style[u]="",this._queueCallback(v,this._element,!0)}_isShown(i=this._element){return i.classList.contains(vi)}_configAfterMerge(i){return i.toggle=!!i.toggle,i.parent=x(i.parent),i}_getDimension(){return this._element.classList.contains(Yd)?zd:Xd}_initializeChildren(){if(!this._config.parent)return;const i=this._getFirstLevelChildren(Ei);for(const u of i){const v=R.getElementFromSelector(u);v&&this._addAriaAndCollapsedClass([u],this._isShown(v))}}_getFirstLevelChildren(i){const u=R.find(qd,this._config.parent);return R.find(i,this._config.parent).filter(v=>!u.includes(v))}_addAriaAndCollapsedClass(i,u){if(i.length)for(const v of i)v.classList.toggle(Gd,!u),v.setAttribute("aria-expanded",u)}static jQueryInterface(i){const u={};return typeof i=="string"&&/show|hide/.test(i)&&(u.toggle=!1),this.each(function(){const v=Kn.getOrCreateInstance(this,u);if(typeof i=="string"){if(typeof v[i]>"u")throw new TypeError(`No method named "${i}"`);v[i]()}})}}D.on(document,Ud,Ei,function(_){(_.target.tagName==="A"||_.delegateTarget&&_.delegateTarget.tagName==="A")&&_.preventDefault();for(const i of R.getMultipleElementsFromSelector(this))Kn.getOrCreateInstance(i,{toggle:!1}).toggle()}),S(Kn);const _a="dropdown",gn=".bs.dropdown",yi=".data-api",eh="Escape",va="Tab",th="ArrowUp",Ea="ArrowDown",nh=2,rh=`hide${gn}`,sh=`hidden${gn}`,ih=`show${gn}`,oh=`shown${gn}`,ya=`click${gn}${yi}`,ba=`keydown${gn}${yi}`,ah=`keyup${gn}${yi}`,Un="show",lh="dropup",ch="dropend",uh="dropstart",fh="dropup-center",dh="dropdown-center",mn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',hh=`${mn}.${Un}`,as=".dropdown-menu",ph=".navbar",gh=".navbar-nav",mh=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",_h=C()?"top-end":"top-start",vh=C()?"top-start":"top-end",Eh=C()?"bottom-end":"bottom-start",yh=C()?"bottom-start":"bottom-end",bh=C()?"left-start":"right-start",Ah=C()?"right-start":"left-start",Th="top",Ch="bottom",Sh={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},wh={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class vt extends q{constructor(i,u){super(i,u),this._popper=null,this._parent=this._element.parentNode,this._menu=R.next(this._element,as)[0]||R.prev(this._element,as)[0]||R.findOne(as,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Sh}static get DefaultType(){return wh}static get NAME(){return _a}toggle(){return this._isShown()?this.hide():this.show()}show(){if(V(this._element)||this._isShown())return;const i={relatedTarget:this._element};if(!D.trigger(this._element,ih,i).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(gh))for(const v of[].concat(...document.body.children))D.on(v,"mouseover",M);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Un),this._element.classList.add(Un),D.trigger(this._element,oh,i)}}hide(){if(V(this._element)||!this._isShown())return;const i={relatedTarget:this._element};this._completeHide(i)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(i){if(!D.trigger(this._element,rh,i).defaultPrevented){if("ontouchstart"in document.documentElement)for(const v of[].concat(...document.body.children))D.off(v,"mouseover",M);this._popper&&this._popper.destroy(),this._menu.classList.remove(Un),this._element.classList.remove(Un),this._element.setAttribute("aria-expanded","false"),$.removeDataAttribute(this._menu,"popper"),D.trigger(this._element,sh,i)}}_getConfig(i){if(i=super._getConfig(i),typeof i.reference=="object"&&!A(i.reference)&&typeof i.reference.getBoundingClientRect!="function")throw new TypeError(`${_a.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return i}_createPopper(){if(typeof s>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let i=this._element;this._config.reference==="parent"?i=this._parent:A(this._config.reference)?i=x(this._config.reference):typeof this._config.reference=="object"&&(i=this._config.reference);const u=this._getPopperConfig();this._popper=s.createPopper(i,this._menu,u)}_isShown(){return this._menu.classList.contains(Un)}_getPlacement(){const i=this._parent;if(i.classList.contains(ch))return bh;if(i.classList.contains(uh))return Ah;if(i.classList.contains(fh))return Th;if(i.classList.contains(dh))return Ch;const u=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return i.classList.contains(lh)?u?vh:_h:u?yh:Eh}_detectNavbar(){return this._element.closest(ph)!==null}_getOffset(){const{offset:i}=this._config;return typeof i=="string"?i.split(",").map(u=>Number.parseInt(u,10)):typeof i=="function"?u=>i(u,this._element):i}_getPopperConfig(){const i={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&($.setDataAttribute(this._menu,"popper","static"),i.modifiers=[{name:"applyStyles",enabled:!1}]),{...i,...U(this._config.popperConfig,[void 0,i])}}_selectMenuItem({key:i,target:u}){const v=R.find(mh,this._menu).filter(k=>P(k));v.length&&te(v,u,i===Ea,!v.includes(u)).focus()}static jQueryInterface(i){return this.each(function(){const u=vt.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}static clearMenus(i){if(i.button===nh||i.type==="keyup"&&i.key!==va)return;const u=R.find(hh);for(const v of u){const k=vt.getInstance(v);if(!k||k._config.autoClose===!1)continue;const J=i.composedPath(),Y=J.includes(k._menu);if(J.includes(k._element)||k._config.autoClose==="inside"&&!Y||k._config.autoClose==="outside"&&Y||k._menu.contains(i.target)&&(i.type==="keyup"&&i.key===va||/input|select|option|textarea|form/i.test(i.target.tagName)))continue;const ge={relatedTarget:k._element};i.type==="click"&&(ge.clickEvent=i),k._completeHide(ge)}}static dataApiKeydownHandler(i){const u=/input|textarea/i.test(i.target.tagName),v=i.key===eh,k=[th,Ea].includes(i.key);if(!k&&!v||u&&!v)return;i.preventDefault();const J=this.matches(mn)?this:R.prev(this,mn)[0]||R.next(this,mn)[0]||R.findOne(mn,i.delegateTarget.parentNode),Y=vt.getOrCreateInstance(J);if(k){i.stopPropagation(),Y.show(),Y._selectMenuItem(i);return}Y._isShown()&&(i.stopPropagation(),Y.hide(),J.focus())}}D.on(document,ba,mn,vt.dataApiKeydownHandler),D.on(document,ba,as,vt.dataApiKeydownHandler),D.on(document,ya,vt.clearMenus),D.on(document,ah,vt.clearMenus),D.on(document,ya,mn,function(_){_.preventDefault(),vt.getOrCreateInstance(this).toggle()}),S(vt);const Aa="backdrop",Oh="fade",Ta="show",Ca=`mousedown.bs.${Aa}`,Nh={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},xh={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Sa extends B{constructor(i){super(),this._config=this._getConfig(i),this._isAppended=!1,this._element=null}static get Default(){return Nh}static get DefaultType(){return xh}static get NAME(){return Aa}show(i){if(!this._config.isVisible){U(i);return}this._append();const u=this._getElement();this._config.isAnimated&&b(u),u.classList.add(Ta),this._emulateAnimation(()=>{U(i)})}hide(i){if(!this._config.isVisible){U(i);return}this._getElement().classList.remove(Ta),this._emulateAnimation(()=>{this.dispose(),U(i)})}dispose(){this._isAppended&&(D.off(this._element,Ca),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const i=document.createElement("div");i.className=this._config.className,this._config.isAnimated&&i.classList.add(Oh),this._element=i}return this._element}_configAfterMerge(i){return i.rootElement=x(i.rootElement),i}_append(){if(this._isAppended)return;const i=this._getElement();this._config.rootElement.append(i),D.on(i,Ca,()=>{U(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(i){j(i,this._getElement(),this._config.isAnimated)}}const Rh="focustrap",ls=".bs.focustrap",Ih=`focusin${ls}`,Dh=`keydown.tab${ls}`,Lh="Tab",Ph="forward",wa="backward",$h={autofocus:!0,trapElement:null},Mh={autofocus:"boolean",trapElement:"element"};class Oa extends B{constructor(i){super(),this._config=this._getConfig(i),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return $h}static get DefaultType(){return Mh}static get NAME(){return Rh}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),D.off(document,ls),D.on(document,Ih,i=>this._handleFocusin(i)),D.on(document,Dh,i=>this._handleKeydown(i)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,D.off(document,ls))}_handleFocusin(i){const{trapElement:u}=this._config;if(i.target===document||i.target===u||u.contains(i.target))return;const v=R.focusableChildren(u);v.length===0?u.focus():this._lastTabNavDirection===wa?v[v.length-1].focus():v[0].focus()}_handleKeydown(i){i.key===Lh&&(this._lastTabNavDirection=i.shiftKey?wa:Ph)}}const Na=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",xa=".sticky-top",cs="padding-right",Ra="margin-right";class bi{constructor(){this._element=document.body}getWidth(){const i=document.documentElement.clientWidth;return Math.abs(window.innerWidth-i)}hide(){const i=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,cs,u=>u+i),this._setElementAttributes(Na,cs,u=>u+i),this._setElementAttributes(xa,Ra,u=>u-i)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,cs),this._resetElementAttributes(Na,cs),this._resetElementAttributes(xa,Ra)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(i,u,v){const k=this.getWidth(),J=Y=>{if(Y!==this._element&&window.innerWidth>Y.clientWidth+k)return;this._saveInitialAttribute(Y,u);const ge=window.getComputedStyle(Y).getPropertyValue(u);Y.style.setProperty(u,`${v(Number.parseFloat(ge))}px`)};this._applyManipulationCallback(i,J)}_saveInitialAttribute(i,u){const v=i.style.getPropertyValue(u);v&&$.setDataAttribute(i,u,v)}_resetElementAttributes(i,u){const v=k=>{const J=$.getDataAttribute(k,u);if(J===null){k.style.removeProperty(u);return}$.removeDataAttribute(k,u),k.style.setProperty(u,J)};this._applyManipulationCallback(i,v)}_applyManipulationCallback(i,u){if(A(i)){u(i);return}for(const v of R.find(i,this._element))u(v)}}const kh="modal",ct=".bs.modal",Vh=".data-api",Fh="Escape",Hh=`hide${ct}`,Bh=`hidePrevented${ct}`,Ia=`hidden${ct}`,Da=`show${ct}`,jh=`shown${ct}`,Wh=`resize${ct}`,Kh=`click.dismiss${ct}`,Uh=`mousedown.dismiss${ct}`,Gh=`keydown.dismiss${ct}`,qh=`click${ct}${Vh}`,La="modal-open",Yh="fade",Pa="show",Ai="modal-static",zh=".modal.show",Xh=".modal-dialog",Qh=".modal-body",Jh='[data-bs-toggle="modal"]',Zh={backdrop:!0,focus:!0,keyboard:!0},ep={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class _n extends q{constructor(i,u){super(i,u),this._dialog=R.findOne(Xh,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new bi,this._addEventListeners()}static get Default(){return Zh}static get DefaultType(){return ep}static get NAME(){return kh}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||this._isTransitioning||D.trigger(this._element,Da,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(La),this._adjustDialog(),this._backdrop.show(()=>this._showElement(i)))}hide(){!this._isShown||this._isTransitioning||D.trigger(this._element,Hh).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Pa),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){D.off(window,ct),D.off(this._dialog,ct),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Sa({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Oa({trapElement:this._element})}_showElement(i){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const u=R.findOne(Qh,this._dialog);u&&(u.scrollTop=0),b(this._element),this._element.classList.add(Pa);const v=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,D.trigger(this._element,jh,{relatedTarget:i})};this._queueCallback(v,this._dialog,this._isAnimated())}_addEventListeners(){D.on(this._element,Gh,i=>{if(i.key===Fh){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),D.on(window,Wh,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),D.on(this._element,Uh,i=>{D.one(this._element,Kh,u=>{if(!(this._element!==i.target||this._element!==u.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(La),this._resetAdjustments(),this._scrollBar.reset(),D.trigger(this._element,Ia)})}_isAnimated(){return this._element.classList.contains(Yh)}_triggerBackdropTransition(){if(D.trigger(this._element,Bh).defaultPrevented)return;const u=this._element.scrollHeight>document.documentElement.clientHeight,v=this._element.style.overflowY;v==="hidden"||this._element.classList.contains(Ai)||(u||(this._element.style.overflowY="hidden"),this._element.classList.add(Ai),this._queueCallback(()=>{this._element.classList.remove(Ai),this._queueCallback(()=>{this._element.style.overflowY=v},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const i=this._element.scrollHeight>document.documentElement.clientHeight,u=this._scrollBar.getWidth(),v=u>0;if(v&&!i){const k=C()?"paddingLeft":"paddingRight";this._element.style[k]=`${u}px`}if(!v&&i){const k=C()?"paddingRight":"paddingLeft";this._element.style[k]=`${u}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(i,u){return this.each(function(){const v=_n.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof v[i]>"u")throw new TypeError(`No method named "${i}"`);v[i](u)}})}}D.on(document,qh,Jh,function(_){const i=R.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&_.preventDefault(),D.one(i,Da,k=>{k.defaultPrevented||D.one(i,Ia,()=>{P(this)&&this.focus()})});const u=R.findOne(zh);u&&_n.getInstance(u).hide(),_n.getOrCreateInstance(i).toggle(this)}),W(_n),S(_n);const tp="offcanvas",$t=".bs.offcanvas",$a=".data-api",np=`load${$t}${$a}`,rp="Escape",Ma="show",ka="showing",Va="hiding",sp="offcanvas-backdrop",Fa=".offcanvas.show",ip=`show${$t}`,op=`shown${$t}`,ap=`hide${$t}`,Ha=`hidePrevented${$t}`,Ba=`hidden${$t}`,lp=`resize${$t}`,cp=`click${$t}${$a}`,up=`keydown.dismiss${$t}`,fp='[data-bs-toggle="offcanvas"]',dp={backdrop:!0,keyboard:!0,scroll:!1},hp={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Mt extends q{constructor(i,u){super(i,u),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return dp}static get DefaultType(){return hp}static get NAME(){return tp}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){if(this._isShown||D.trigger(this._element,ip,{relatedTarget:i}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new bi().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ka);const v=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Ma),this._element.classList.remove(ka),D.trigger(this._element,op,{relatedTarget:i})};this._queueCallback(v,this._element,!0)}hide(){if(!this._isShown||D.trigger(this._element,ap).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Va),this._backdrop.hide();const u=()=>{this._element.classList.remove(Ma,Va),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new bi().reset(),D.trigger(this._element,Ba)};this._queueCallback(u,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const i=()=>{if(this._config.backdrop==="static"){D.trigger(this._element,Ha);return}this.hide()},u=!!this._config.backdrop;return new Sa({className:sp,isVisible:u,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:u?i:null})}_initializeFocusTrap(){return new Oa({trapElement:this._element})}_addEventListeners(){D.on(this._element,up,i=>{if(i.key===rp){if(this._config.keyboard){this.hide();return}D.trigger(this._element,Ha)}})}static jQueryInterface(i){return this.each(function(){const u=Mt.getOrCreateInstance(this,i);if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i](this)}})}}D.on(document,cp,fp,function(_){const i=R.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&_.preventDefault(),V(this))return;D.one(i,Ba,()=>{P(this)&&this.focus()});const u=R.findOne(Fa);u&&u!==i&&Mt.getInstance(u).hide(),Mt.getOrCreateInstance(i).toggle(this)}),D.on(window,np,()=>{for(const _ of R.find(Fa))Mt.getOrCreateInstance(_).show()}),D.on(window,lp,()=>{for(const _ of R.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(_).position!=="fixed"&&Mt.getOrCreateInstance(_).hide()}),W(Mt),S(Mt);const ja={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},pp=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),gp=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,mp=(_,i)=>{const u=_.nodeName.toLowerCase();return i.includes(u)?pp.has(u)?!!gp.test(_.nodeValue):!0:i.filter(v=>v instanceof RegExp).some(v=>v.test(u))};function _p(_,i,u){if(!_.length)return _;if(u&&typeof u=="function")return u(_);const k=new window.DOMParser().parseFromString(_,"text/html"),J=[].concat(...k.body.querySelectorAll("*"));for(const Y of J){const ge=Y.nodeName.toLowerCase();if(!Object.keys(i).includes(ge)){Y.remove();continue}const Ze=[].concat(...Y.attributes),ut=[].concat(i["*"]||[],i[ge]||[]);for(const Me of Ze)mp(Me,ut)||Y.removeAttribute(Me.nodeName)}return k.body.innerHTML}const vp="TemplateFactory",Ep={allowList:ja,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:""},yp={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},bp={entry:"(string|element|function|null)",selector:"(string|element)"};class Ap extends B{constructor(i){super(),this._config=this._getConfig(i)}static get Default(){return Ep}static get DefaultType(){return yp}static get NAME(){return vp}getContent(){return Object.values(this._config.content).map(i=>this._resolvePossibleFunction(i)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(i){return this._checkContent(i),this._config.content={...this._config.content,...i},this}toHtml(){const i=document.createElement("div");i.innerHTML=this._maybeSanitize(this._config.template);for(const[k,J]of Object.entries(this._config.content))this._setContent(i,J,k);const u=i.children[0],v=this._resolvePossibleFunction(this._config.extraClass);return v&&u.classList.add(...v.split(" ")),u}_typeCheckConfig(i){super._typeCheckConfig(i),this._checkContent(i.content)}_checkContent(i){for(const[u,v]of Object.entries(i))super._typeCheckConfig({selector:u,entry:v},bp)}_setContent(i,u,v){const k=R.findOne(v,i);if(k){if(u=this._resolvePossibleFunction(u),!u){k.remove();return}if(A(u)){this._putElementInTemplate(x(u),k);return}if(this._config.html){k.innerHTML=this._maybeSanitize(u);return}k.textContent=u}}_maybeSanitize(i){return this._config.sanitize?_p(i,this._config.allowList,this._config.sanitizeFn):i}_resolvePossibleFunction(i){return U(i,[void 0,this])}_putElementInTemplate(i,u){if(this._config.html){u.innerHTML="",u.append(i);return}u.textContent=i.textContent}}const Tp="tooltip",Cp=new Set(["sanitize","allowList","sanitizeFn"]),Ti="fade",Sp="modal",us="show",wp=".tooltip-inner",Wa=`.${Sp}`,Ka="hide.bs.modal",Cr="hover",Ci="focus",Si="click",Op="manual",Np="hide",xp="hidden",Rp="show",Ip="shown",Dp="inserted",Lp="click",Pp="focusin",$p="focusout",Mp="mouseenter",kp="mouseleave",Vp={AUTO:"auto",TOP:"top",RIGHT:C()?"left":"right",BOTTOM:"bottom",LEFT:C()?"right":"left"},Fp={allowList:ja,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Hp={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class vn extends q{constructor(i,u){if(typeof s>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(i,u),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Fp}static get DefaultType(){return Hp}static get NAME(){return Tp}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),D.off(this._element.closest(Wa),Ka,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const i=D.trigger(this._element,this.constructor.eventName(Rp)),v=(H(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(i.defaultPrevented||!v)return;this._disposePopper();const k=this._getTipElement();this._element.setAttribute("aria-describedby",k.getAttribute("id"));const{container:J}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(J.append(k),D.trigger(this._element,this.constructor.eventName(Dp))),this._popper=this._createPopper(k),k.classList.add(us),"ontouchstart"in document.documentElement)for(const ge of[].concat(...document.body.children))D.on(ge,"mouseover",M);const Y=()=>{D.trigger(this._element,this.constructor.eventName(Ip)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(Y,this.tip,this._isAnimated())}hide(){if(!this._isShown()||D.trigger(this._element,this.constructor.eventName(Np)).defaultPrevented)return;if(this._getTipElement().classList.remove(us),"ontouchstart"in document.documentElement)for(const k of[].concat(...document.body.children))D.off(k,"mouseover",M);this._activeTrigger[Si]=!1,this._activeTrigger[Ci]=!1,this._activeTrigger[Cr]=!1,this._isHovered=null;const v=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),D.trigger(this._element,this.constructor.eventName(xp)))};this._queueCallback(v,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(i){const u=this._getTemplateFactory(i).toHtml();if(!u)return null;u.classList.remove(Ti,us),u.classList.add(`bs-${this.constructor.NAME}-auto`);const v=p(this.constructor.NAME).toString();return u.setAttribute("id",v),this._isAnimated()&&u.classList.add(Ti),u}setContent(i){this._newContent=i,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(i){return this._templateFactory?this._templateFactory.changeContent(i):this._templateFactory=new Ap({...this._config,content:i,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[wp]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(i){return this.constructor.getOrCreateInstance(i.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ti)}_isShown(){return this.tip&&this.tip.classList.contains(us)}_createPopper(i){const u=U(this._config.placement,[this,i,this._element]),v=Vp[u.toUpperCase()];return s.createPopper(this._element,i,this._getPopperConfig(v))}_getOffset(){const{offset:i}=this._config;return typeof i=="string"?i.split(",").map(u=>Number.parseInt(u,10)):typeof i=="function"?u=>i(u,this._element):i}_resolvePossibleFunction(i){return U(i,[this._element,this._element])}_getPopperConfig(i){const u={placement:i,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:v=>{this._getTipElement().setAttribute("data-popper-placement",v.state.placement)}}]};return{...u,...U(this._config.popperConfig,[void 0,u])}}_setListeners(){const i=this._config.trigger.split(" ");for(const u of i)if(u==="click")D.on(this._element,this.constructor.eventName(Lp),this._config.selector,v=>{const k=this._initializeOnDelegatedTarget(v);k._activeTrigger[Si]=!(k._isShown()&&k._activeTrigger[Si]),k.toggle()});else if(u!==Op){const v=u===Cr?this.constructor.eventName(Mp):this.constructor.eventName(Pp),k=u===Cr?this.constructor.eventName(kp):this.constructor.eventName($p);D.on(this._element,v,this._config.selector,J=>{const Y=this._initializeOnDelegatedTarget(J);Y._activeTrigger[J.type==="focusin"?Ci:Cr]=!0,Y._enter()}),D.on(this._element,k,this._config.selector,J=>{const Y=this._initializeOnDelegatedTarget(J);Y._activeTrigger[J.type==="focusout"?Ci:Cr]=Y._element.contains(J.relatedTarget),Y._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},D.on(this._element.closest(Wa),Ka,this._hideModalHandler)}_fixTitle(){const i=this._element.getAttribute("title");i&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",i),this._element.setAttribute("data-bs-original-title",i),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(i,u){clearTimeout(this._timeout),this._timeout=setTimeout(i,u)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(i){const u=$.getDataAttributes(this._element);for(const v of Object.keys(u))Cp.has(v)&&delete u[v];return i={...u,...typeof i=="object"&&i?i:{}},i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i.container=i.container===!1?document.body:x(i.container),typeof i.delay=="number"&&(i.delay={show:i.delay,hide:i.delay}),typeof i.title=="number"&&(i.title=i.title.toString()),typeof i.content=="number"&&(i.content=i.content.toString()),i}_getDelegateConfig(){const i={};for(const[u,v]of Object.entries(this._config))this.constructor.Default[u]!==v&&(i[u]=v);return i.selector=!1,i.trigger="manual",i}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(i){return this.each(function(){const u=vn.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}}S(vn);const Bp="popover",jp=".popover-header",Wp=".popover-body",Kp={...vn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Up={...vn.DefaultType,content:"(null|string|element|function)"};class fs extends vn{static get Default(){return Kp}static get DefaultType(){return Up}static get NAME(){return Bp}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[jp]:this._getTitle(),[Wp]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(i){return this.each(function(){const u=fs.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}}S(fs);const Gp="scrollspy",wi=".bs.scrollspy",qp=".data-api",Yp=`activate${wi}`,Ua=`click${wi}`,zp=`load${wi}${qp}`,Xp="dropdown-item",Gn="active",Qp='[data-bs-spy="scroll"]',Oi="[href]",Jp=".nav, .list-group",Ga=".nav-link",Zp=`${Ga}, .nav-item > ${Ga}, .list-group-item`,eg=".dropdown",tg=".dropdown-toggle",ng={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},rg={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Sr extends q{constructor(i,u){super(i,u),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return ng}static get DefaultType(){return rg}static get NAME(){return Gp}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const i of this._observableSections.values())this._observer.observe(i)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(i){return i.target=x(i.target)||document.body,i.rootMargin=i.offset?`${i.offset}px 0px -30%`:i.rootMargin,typeof i.threshold=="string"&&(i.threshold=i.threshold.split(",").map(u=>Number.parseFloat(u))),i}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(D.off(this._config.target,Ua),D.on(this._config.target,Ua,Oi,i=>{const u=this._observableSections.get(i.target.hash);if(u){i.preventDefault();const v=this._rootElement||window,k=u.offsetTop-this._element.offsetTop;if(v.scrollTo){v.scrollTo({top:k,behavior:"smooth"});return}v.scrollTop=k}}))}_getNewObserver(){const i={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(u=>this._observerCallback(u),i)}_observerCallback(i){const u=Y=>this._targetLinks.get(`#${Y.target.id}`),v=Y=>{this._previousScrollData.visibleEntryTop=Y.target.offsetTop,this._process(u(Y))},k=(this._rootElement||document.documentElement).scrollTop,J=k>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=k;for(const Y of i){if(!Y.isIntersecting){this._activeTarget=null,this._clearActiveClass(u(Y));continue}const ge=Y.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(J&&ge){if(v(Y),!k)return;continue}!J&&!ge&&v(Y)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const i=R.find(Oi,this._config.target);for(const u of i){if(!u.hash||V(u))continue;const v=R.findOne(decodeURI(u.hash),this._element);P(v)&&(this._targetLinks.set(decodeURI(u.hash),u),this._observableSections.set(u.hash,v))}}_process(i){this._activeTarget!==i&&(this._clearActiveClass(this._config.target),this._activeTarget=i,i.classList.add(Gn),this._activateParents(i),D.trigger(this._element,Yp,{relatedTarget:i}))}_activateParents(i){if(i.classList.contains(Xp)){R.findOne(tg,i.closest(eg)).classList.add(Gn);return}for(const u of R.parents(i,Jp))for(const v of R.prev(u,Zp))v.classList.add(Gn)}_clearActiveClass(i){i.classList.remove(Gn);const u=R.find(`${Oi}.${Gn}`,i);for(const v of u)v.classList.remove(Gn)}static jQueryInterface(i){return this.each(function(){const u=Sr.getOrCreateInstance(this,i);if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i]()}})}}D.on(window,zp,()=>{for(const _ of R.find(Qp))Sr.getOrCreateInstance(_)}),S(Sr);const sg="tab",En=".bs.tab",ig=`hide${En}`,og=`hidden${En}`,ag=`show${En}`,lg=`shown${En}`,cg=`click${En}`,ug=`keydown${En}`,fg=`load${En}`,dg="ArrowLeft",qa="ArrowRight",hg="ArrowUp",Ya="ArrowDown",Ni="Home",za="End",yn="active",Xa="fade",xi="show",pg="dropdown",Qa=".dropdown-toggle",gg=".dropdown-menu",Ri=`:not(${Qa})`,mg='.list-group, .nav, [role="tablist"]',_g=".nav-item, .list-group-item",vg=`.nav-link${Ri}, .list-group-item${Ri}, [role="tab"]${Ri}`,Ja='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ii=`${vg}, ${Ja}`,Eg=`.${yn}[data-bs-toggle="tab"], .${yn}[data-bs-toggle="pill"], .${yn}[data-bs-toggle="list"]`;class bn extends q{constructor(i){super(i),this._parent=this._element.closest(mg),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),D.on(this._element,ug,u=>this._keydown(u)))}static get NAME(){return sg}show(){const i=this._element;if(this._elemIsActive(i))return;const u=this._getActiveElem(),v=u?D.trigger(u,ig,{relatedTarget:i}):null;D.trigger(i,ag,{relatedTarget:u}).defaultPrevented||v&&v.defaultPrevented||(this._deactivate(u,i),this._activate(i,u))}_activate(i,u){if(!i)return;i.classList.add(yn),this._activate(R.getElementFromSelector(i));const v=()=>{if(i.getAttribute("role")!=="tab"){i.classList.add(xi);return}i.removeAttribute("tabindex"),i.setAttribute("aria-selected",!0),this._toggleDropDown(i,!0),D.trigger(i,lg,{relatedTarget:u})};this._queueCallback(v,i,i.classList.contains(Xa))}_deactivate(i,u){if(!i)return;i.classList.remove(yn),i.blur(),this._deactivate(R.getElementFromSelector(i));const v=()=>{if(i.getAttribute("role")!=="tab"){i.classList.remove(xi);return}i.setAttribute("aria-selected",!1),i.setAttribute("tabindex","-1"),this._toggleDropDown(i,!1),D.trigger(i,og,{relatedTarget:u})};this._queueCallback(v,i,i.classList.contains(Xa))}_keydown(i){if(![dg,qa,hg,Ya,Ni,za].includes(i.key))return;i.stopPropagation(),i.preventDefault();const u=this._getChildren().filter(k=>!V(k));let v;if([Ni,za].includes(i.key))v=u[i.key===Ni?0:u.length-1];else{const k=[qa,Ya].includes(i.key);v=te(u,i.target,k,!0)}v&&(v.focus({preventScroll:!0}),bn.getOrCreateInstance(v).show())}_getChildren(){return R.find(Ii,this._parent)}_getActiveElem(){return this._getChildren().find(i=>this._elemIsActive(i))||null}_setInitialAttributes(i,u){this._setAttributeIfNotExists(i,"role","tablist");for(const v of u)this._setInitialAttributesOnChild(v)}_setInitialAttributesOnChild(i){i=this._getInnerElement(i);const u=this._elemIsActive(i),v=this._getOuterElement(i);i.setAttribute("aria-selected",u),v!==i&&this._setAttributeIfNotExists(v,"role","presentation"),u||i.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(i,"role","tab"),this._setInitialAttributesOnTargetPanel(i)}_setInitialAttributesOnTargetPanel(i){const u=R.getElementFromSelector(i);u&&(this._setAttributeIfNotExists(u,"role","tabpanel"),i.id&&this._setAttributeIfNotExists(u,"aria-labelledby",`${i.id}`))}_toggleDropDown(i,u){const v=this._getOuterElement(i);if(!v.classList.contains(pg))return;const k=(J,Y)=>{const ge=R.findOne(J,v);ge&&ge.classList.toggle(Y,u)};k(Qa,yn),k(gg,xi),v.setAttribute("aria-expanded",u)}_setAttributeIfNotExists(i,u,v){i.hasAttribute(u)||i.setAttribute(u,v)}_elemIsActive(i){return i.classList.contains(yn)}_getInnerElement(i){return i.matches(Ii)?i:R.findOne(Ii,i)}_getOuterElement(i){return i.closest(_g)||i}static jQueryInterface(i){return this.each(function(){const u=bn.getOrCreateInstance(this);if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i]()}})}}D.on(document,cg,Ja,function(_){["A","AREA"].includes(this.tagName)&&_.preventDefault(),!V(this)&&bn.getOrCreateInstance(this).show()}),D.on(window,fg,()=>{for(const _ of R.find(Eg))bn.getOrCreateInstance(_)}),S(bn);const yg="toast",Xt=".bs.toast",bg=`mouseover${Xt}`,Ag=`mouseout${Xt}`,Tg=`focusin${Xt}`,Cg=`focusout${Xt}`,Sg=`hide${Xt}`,wg=`hidden${Xt}`,Og=`show${Xt}`,Ng=`shown${Xt}`,xg="fade",Za="hide",ds="show",hs="showing",Rg={animation:"boolean",autohide:"boolean",delay:"number"},Ig={animation:!0,autohide:!0,delay:5e3};class wr extends q{constructor(i,u){super(i,u),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Ig}static get DefaultType(){return Rg}static get NAME(){return yg}show(){if(D.trigger(this._element,Og).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(xg);const u=()=>{this._element.classList.remove(hs),D.trigger(this._element,Ng),this._maybeScheduleHide()};this._element.classList.remove(Za),b(this._element),this._element.classList.add(ds,hs),this._queueCallback(u,this._element,this._config.animation)}hide(){if(!this.isShown()||D.trigger(this._element,Sg).defaultPrevented)return;const u=()=>{this._element.classList.add(Za),this._element.classList.remove(hs,ds),D.trigger(this._element,wg)};this._element.classList.add(hs),this._queueCallback(u,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ds),super.dispose()}isShown(){return this._element.classList.contains(ds)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(i,u){switch(i.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=u;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=u;break}}if(u){this._clearTimeout();return}const v=i.relatedTarget;this._element===v||this._element.contains(v)||this._maybeScheduleHide()}_setListeners(){D.on(this._element,bg,i=>this._onInteraction(i,!0)),D.on(this._element,Ag,i=>this._onInteraction(i,!1)),D.on(this._element,Tg,i=>this._onInteraction(i,!0)),D.on(this._element,Cg,i=>this._onInteraction(i,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(i){return this.each(function(){const u=wr.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i](this)}})}}return W(wr),S(wr),{Alert:Ie,Button:Yt,Carousel:jn,Collapse:Kn,Dropdown:vt,Modal:_n,Offcanvas:Mt,Popover:fs,ScrollSpy:Sr,Tab:bn,Toast:wr,Tooltip:vn}}))})(Cs)),Cs.exports}Cm();function ko(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Se={},tr=[],At=()=>{},zc=()=>!1,zs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vo=e=>e.startsWith("onUpdate:"),$e=Object.assign,Fo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Sm=Object.prototype.hasOwnProperty,Te=(e,t)=>Sm.call(e,t),le=Array.isArray,nr=e=>Qr(e)==="[object Map]",Er=e=>Qr(e)==="[object Set]",cl=e=>Qr(e)==="[object Date]",fe=e=>typeof e=="function",Oe=e=>typeof e=="string",Ct=e=>typeof e=="symbol",Ce=e=>e!==null&&typeof e=="object",Ho=e=>(Ce(e)||fe(e))&&fe(e.then)&&fe(e.catch),Xc=Object.prototype.toString,Qr=e=>Xc.call(e),wm=e=>Qr(e).slice(8,-1),Qc=e=>Qr(e)==="[object Object]",Bo=e=>Oe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Pr=ko(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xs=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Om=/-\w/g,mt=Xs(e=>e.replace(Om,t=>t.slice(1).toUpperCase())),Nm=/\B([A-Z])/g,dn=Xs(e=>e.replace(Nm,"-$1").toLowerCase()),Qs=Xs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Di=Xs(e=>e?`on${Qs(e)}`:""),on=(e,t)=>!Object.is(e,t),ws=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Js=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Zc=e=>{const t=Oe(e)?Number(e):NaN;return isNaN(t)?e:t};let ul;const Zs=()=>ul||(ul=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ei(e){if(le(e)){const t={};for(let n=0;n{if(n){const r=n.split(Rm);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ti(e){let t="";if(Oe(e))t=e;else if(le(e))for(let n=0;n$n(n,t))}const tu=e=>!!(e&&e.__v_isRef===!0),Mm=e=>Oe(e)?e:e==null?"":le(e)||Ce(e)&&(e.toString===Xc||!fe(e.toString))?tu(e)?Mm(e.value):JSON.stringify(e,nu,2):String(e),nu=(e,t)=>tu(t)?nu(e,t.value):nr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[Li(r,o)+" =>"]=s,n),{})}:Er(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Li(n))}:Ct(t)?Li(t):Ce(t)&&!le(t)&&!Qc(t)?String(t):t,Li=(e,t="")=>{var n;return Ct(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function km(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}let Ke;class ru{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ke,!t&&Ke&&(this.index=(Ke.scopes||(Ke.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(Ke=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n0)return;if(Mr){let t=Mr;for(Mr=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;$r;){let t=$r;for($r=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function cu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function uu(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Uo(r),Fm(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function to(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Wr)||(e.globalVersion=Wr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!to(e))))return;e.flags|=2;const t=e.dep,n=we,r=Tt;we=e,Tt=!0;try{cu(e);const s=e.fn(e._value);(t.version===0||on(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{we=n,Tt=r,uu(e),e.flags&=-3}}function Uo(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Uo(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Fm(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Tt=!0;const du=[];function Ut(){du.push(Tt),Tt=!1}function Gt(){const e=du.pop();Tt=e===void 0?!0:e}function fl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=we;we=void 0;try{t()}finally{we=n}}}let Wr=0;class Hm{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Go{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!we||!Tt||we===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==we)n=this.activeLink=new Hm(we,this),we.deps?(n.prevDep=we.depsTail,we.depsTail.nextDep=n,we.depsTail=n):we.deps=we.depsTail=n,hu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=we.depsTail,n.nextDep=void 0,we.depsTail.nextDep=n,we.depsTail=n,we.deps===n&&(we.deps=r)}return n}trigger(t){this.version++,Wr++,this.notify(t)}notify(t){Wo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ko()}}}function hu(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hu(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ls=new WeakMap,Nn=Symbol(""),no=Symbol(""),Kr=Symbol("");function Ue(e,t,n){if(Tt&&we){let r=Ls.get(e);r||Ls.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Go),s.map=r,s.key=n),s.track()}}function Bt(e,t,n,r,s,o){const a=Ls.get(e);if(!a){Wr++;return}const l=c=>{c&&c.trigger()};if(Wo(),t==="clear")a.forEach(l);else{const c=le(e),d=c&&Bo(n);if(c&&n==="length"){const f=Number(r);a.forEach((h,p)=>{(p==="length"||p===Kr||!Ct(p)&&p>=f)&&l(h)})}else switch((n!==void 0||a.has(void 0))&&l(a.get(n)),d&&l(a.get(Kr)),t){case"add":c?d&&l(a.get("length")):(l(a.get(Nn)),nr(e)&&l(a.get(no)));break;case"delete":c||(l(a.get(Nn)),nr(e)&&l(a.get(no)));break;case"set":nr(e)&&l(a.get(Nn));break}}Ko()}function Bm(e,t){const n=Ls.get(e);return n&&n.get(t)}function Yn(e){const t=ve(e);return t===e?t:(Ue(t,"iterate",Kr),pt(e)?t:t.map(Fe))}function ni(e){return Ue(e=ve(e),"iterate",Kr),e}const jm={__proto__:null,[Symbol.iterator](){return $i(this,Symbol.iterator,Fe)},concat(...e){return Yn(this).concat(...e.map(t=>le(t)?Yn(t):t))},entries(){return $i(this,"entries",e=>(e[1]=Fe(e[1]),e))},every(e,t){return kt(this,"every",e,t,void 0,arguments)},filter(e,t){return kt(this,"filter",e,t,n=>n.map(Fe),arguments)},find(e,t){return kt(this,"find",e,t,Fe,arguments)},findIndex(e,t){return kt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return kt(this,"findLast",e,t,Fe,arguments)},findLastIndex(e,t){return kt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return kt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Mi(this,"includes",e)},indexOf(...e){return Mi(this,"indexOf",e)},join(e){return Yn(this).join(e)},lastIndexOf(...e){return Mi(this,"lastIndexOf",e)},map(e,t){return kt(this,"map",e,t,void 0,arguments)},pop(){return Or(this,"pop")},push(...e){return Or(this,"push",e)},reduce(e,...t){return dl(this,"reduce",e,t)},reduceRight(e,...t){return dl(this,"reduceRight",e,t)},shift(){return Or(this,"shift")},some(e,t){return kt(this,"some",e,t,void 0,arguments)},splice(...e){return Or(this,"splice",e)},toReversed(){return Yn(this).toReversed()},toSorted(e){return Yn(this).toSorted(e)},toSpliced(...e){return Yn(this).toSpliced(...e)},unshift(...e){return Or(this,"unshift",e)},values(){return $i(this,"values",Fe)}};function $i(e,t,n){const r=ni(e),s=r[t]();return r!==e&&!pt(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const Wm=Array.prototype;function kt(e,t,n,r,s,o){const a=ni(e),l=a!==e&&!pt(e),c=a[t];if(c!==Wm[t]){const h=c.apply(e,o);return l?Fe(h):h}let d=n;a!==e&&(l?d=function(h,p){return n.call(this,Fe(h),p,e)}:n.length>2&&(d=function(h,p){return n.call(this,h,p,e)}));const f=c.call(a,d,r);return l&&s?s(f):f}function dl(e,t,n,r){const s=ni(e);let o=n;return s!==e&&(pt(e)?n.length>3&&(o=function(a,l,c){return n.call(this,a,l,c,e)}):o=function(a,l,c){return n.call(this,a,Fe(l),c,e)}),s[t](o,...r)}function Mi(e,t,n){const r=ve(e);Ue(r,"iterate",Kr);const s=r[t](...n);return(s===-1||s===!1)&&qo(n[0])?(n[0]=ve(n[0]),r[t](...n)):s}function Or(e,t,n=[]){Ut(),Wo();const r=ve(e)[t].apply(e,n);return Ko(),Gt(),r}const Km=ko("__proto__,__v_isRef,__isVue"),pu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ct));function Um(e){Ct(e)||(e=String(e));const t=ve(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class gu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?bu:yu:o?Eu:vu).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=le(t);if(!s){let c;if(a&&(c=jm[n]))return c;if(n==="hasOwnProperty")return Um}const l=Reflect.get(t,n,Re(t)?t:r);if((Ct(n)?pu.has(n):Km(n))||(s||Ue(t,"get",n),o))return l;if(Re(l)){const c=a&&Bo(n)?l:l.value;return s&&Ce(c)?so(c):c}return Ce(l)?s?so(l):Jr(l):l}}class mu extends gu{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const c=ln(o);if(!pt(r)&&!ln(r)&&(o=ve(o),r=ve(r)),!le(t)&&Re(o)&&!Re(r))return c||(o.value=r),!0}const a=le(t)&&Bo(n)?Number(n)e,ms=e=>Reflect.getPrototypeOf(e);function Xm(e,t,n){return function(...r){const s=this.__v_raw,o=ve(s),a=nr(o),l=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,d=s[e](...r),f=n?ro:t?Ps:Fe;return!t&&Ue(o,"iterate",c?no:Nn),{next(){const{value:h,done:p}=d.next();return p?{value:h,done:p}:{value:l?[f(h[0]),f(h[1])]:f(h),done:p}},[Symbol.iterator](){return this}}}}function _s(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Qm(e,t){const n={get(s){const o=this.__v_raw,a=ve(o),l=ve(s);e||(on(s,l)&&Ue(a,"get",s),Ue(a,"get",l));const{has:c}=ms(a),d=t?ro:e?Ps:Fe;if(c.call(a,s))return d(o.get(s));if(c.call(a,l))return d(o.get(l));o!==a&&o.get(s)},get size(){const s=this.__v_raw;return!e&&Ue(ve(s),"iterate",Nn),s.size},has(s){const o=this.__v_raw,a=ve(o),l=ve(s);return e||(on(s,l)&&Ue(a,"has",s),Ue(a,"has",l)),s===l?o.has(s):o.has(s)||o.has(l)},forEach(s,o){const a=this,l=a.__v_raw,c=ve(l),d=t?ro:e?Ps:Fe;return!e&&Ue(c,"iterate",Nn),l.forEach((f,h)=>s.call(o,d(f),d(h),a))}};return $e(n,e?{add:_s("add"),set:_s("set"),delete:_s("delete"),clear:_s("clear")}:{add(s){!t&&!pt(s)&&!ln(s)&&(s=ve(s));const o=ve(this);return ms(o).has.call(o,s)||(o.add(s),Bt(o,"add",s,s)),this},set(s,o){!t&&!pt(o)&&!ln(o)&&(o=ve(o));const a=ve(this),{has:l,get:c}=ms(a);let d=l.call(a,s);d||(s=ve(s),d=l.call(a,s));const f=c.call(a,s);return a.set(s,o),d?on(o,f)&&Bt(a,"set",s,o):Bt(a,"add",s,o),this},delete(s){const o=ve(this),{has:a,get:l}=ms(o);let c=a.call(o,s);c||(s=ve(s),c=a.call(o,s)),l&&l.call(o,s);const d=o.delete(s);return c&&Bt(o,"delete",s,void 0),d},clear(){const s=ve(this),o=s.size!==0,a=s.clear();return o&&Bt(s,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Xm(s,e,t)}),n}function ri(e,t){const n=Qm(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Te(n,s)&&s in r?n:r,s,o)}const Jm={get:ri(!1,!1)},Zm={get:ri(!1,!0)},e_={get:ri(!0,!1)},t_={get:ri(!0,!0)},vu=new WeakMap,Eu=new WeakMap,yu=new WeakMap,bu=new WeakMap;function n_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function r_(e){return e.__v_skip||!Object.isExtensible(e)?0:n_(wm(e))}function Jr(e){return ln(e)?e:si(e,!1,Gm,Jm,vu)}function Au(e){return si(e,!1,Ym,Zm,Eu)}function so(e){return si(e,!0,qm,e_,yu)}function vb(e){return si(e,!0,zm,t_,bu)}function si(e,t,n,r,s){if(!Ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r_(e);if(o===0)return e;const a=s.get(e);if(a)return a;const l=new Proxy(e,o===2?r:n);return s.set(e,l),l}function an(e){return ln(e)?an(e.__v_raw):!!(e&&e.__v_isReactive)}function ln(e){return!!(e&&e.__v_isReadonly)}function pt(e){return!!(e&&e.__v_isShallow)}function qo(e){return e?!!e.__v_raw:!1}function ve(e){const t=e&&e.__v_raw;return t?ve(t):e}function ii(e){return!Te(e,"__v_skip")&&Object.isExtensible(e)&&Jc(e,"__v_skip",!0),e}const Fe=e=>Ce(e)?Jr(e):e,Ps=e=>Ce(e)?so(e):e;function Re(e){return e?e.__v_isRef===!0:!1}function xn(e){return Cu(e,!1)}function Tu(e){return Cu(e,!0)}function Cu(e,t){return Re(e)?e:new s_(e,t)}class s_{constructor(t,n){this.dep=new Go,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ve(t),this._value=n?t:Fe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||pt(t)||ln(t);t=r?t:ve(t),on(t,n)&&(this._rawValue=t,this._value=r?t:Fe(t),this.dep.trigger())}}function nt(e){return Re(e)?e.value:e}function Eb(e){return fe(e)?e():nt(e)}const i_={get:(e,t,n)=>t==="__v_raw"?e:nt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Re(s)&&!Re(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Su(e){return an(e)?e:new Proxy(e,i_)}function o_(e){const t=le(e)?new Array(e.length):{};for(const n in e)t[n]=wu(e,n);return t}class a_{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Bm(ve(this._object),this._key)}}class l_{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function yb(e,t,n){return Re(e)?e:fe(e)?new l_(e):Ce(e)&&arguments.length>1?wu(e,t,n):xn(e)}function wu(e,t,n){const r=e[t];return Re(r)?r:new a_(e,t,n)}class c_{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Go(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Wr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&we!==this)return lu(this,!0),!0}get value(){const t=this.dep.track();return fu(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function u_(e,t,n=!1){let r,s;return fe(e)?r=e:(r=e.get,s=e.set),new c_(r,s,n)}const vs={},$s=new WeakMap;let Sn;function f_(e,t=!1,n=Sn){if(n){let r=$s.get(n);r||$s.set(n,r=[]),r.push(e)}}function d_(e,t,n=Se){const{immediate:r,deep:s,once:o,scheduler:a,augmentJob:l,call:c}=n,d=M=>s?M:pt(M)||s===!1||s===0?jt(M,1):jt(M);let f,h,p,m,O=!1,A=!1;if(Re(e)?(h=()=>e.value,O=pt(e)):an(e)?(h=()=>d(e),O=!0):le(e)?(A=!0,O=e.some(M=>an(M)||pt(M)),h=()=>e.map(M=>{if(Re(M))return M.value;if(an(M))return d(M);if(fe(M))return c?c(M,2):M()})):fe(e)?t?h=c?()=>c(e,2):e:h=()=>{if(p){Ut();try{p()}finally{Gt()}}const M=Sn;Sn=f;try{return c?c(e,3,[m]):e(m)}finally{Sn=M}}:h=At,t&&s){const M=h,b=s===!0?1/0:s;h=()=>jt(M(),b)}const x=iu(),P=()=>{f.stop(),x&&x.active&&Fo(x.effects,f)};if(o&&t){const M=t;t=(...b)=>{M(...b),P()}}let V=A?new Array(e.length).fill(vs):vs;const H=M=>{if(!(!(f.flags&1)||!f.dirty&&!M))if(t){const b=f.run();if(s||O||(A?b.some((y,N)=>on(y,V[N])):on(b,V))){p&&p();const y=Sn;Sn=f;try{const N=[b,V===vs?void 0:A&&V[0]===vs?[]:V,m];V=b,c?c(t,3,N):t(...N)}finally{Sn=y}}}else f.run()};return l&&l(H),f=new ou(h),f.scheduler=a?()=>a(H,!1):H,m=M=>f_(M,!1,f),p=f.onStop=()=>{const M=$s.get(f);if(M){if(c)c(M,4);else for(const b of M)b();$s.delete(f)}},t?r?H(!0):V=f.run():a?a(H.bind(null,!0),!0):f.run(),P.pause=f.pause.bind(f),P.resume=f.resume.bind(f),P.stop=P,P}function jt(e,t=1/0,n){if(t<=0||!Ce(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Re(e))jt(e.value,t,n);else if(le(e))for(let r=0;r{jt(r,t,n)});else if(Qc(e)){for(const r in e)jt(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&jt(e[r],t,n)}return e}function Zr(e,t,n,r){try{return r?e(...r):e()}catch(s){yr(s,t,n)}}function St(e,t,n,r){if(fe(e)){const s=Zr(e,t,n,r);return s&&Ho(s)&&s.catch(o=>{yr(o,t,n)}),s}if(le(e)){const s=[];for(let o=0;o>>1,s=ze[r],o=Ur(s);o=Ur(n)?ze.push(e):ze.splice(p_(t),0,e),e.flags|=1,Nu()}}function Nu(){Ms||(Ms=Ou.then(Ru))}function ks(e){le(e)?rr.push(...e):tn&&e.id===-1?tn.splice(Qn+1,0,e):e.flags&1||(rr.push(e),e.flags|=1),Nu()}function hl(e,t,n=Rt+1){for(;nUr(n)-Ur(r));if(rr.length=0,tn){tn.push(...t);return}for(tn=t,Qn=0;Qne.id==null?e.flags&2?-1:1/0:e.id;function Ru(e){try{for(Rt=0;Rt{r._d&&Bs(-1);const o=Vs(t);let a;try{a=e(...s)}finally{Vs(o),r._d&&Bs(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function bb(e,t){if(Be===null)return e;const n=fi(Be),r=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport,kr=e=>e&&(e.disabled||e.disabled===""),pl=e=>e&&(e.defer||e.defer===""),gl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,ml=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,io=(e,t)=>{const n=e&&e.to;return Oe(n)?t?t(n):null:n},Pu={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,o,a,l,c,d){const{mc:f,pc:h,pbc:p,o:{insert:m,querySelector:O,createText:A,createComment:x}}=d,P=kr(t.props);let{shapeFlag:V,children:H,dynamicChildren:M}=t;if(e==null){const b=t.el=A(""),y=t.anchor=A("");m(b,n,r),m(y,n,r);const N=(C,S)=>{V&16&&f(H,C,S,s,o,a,l,c)},T=()=>{const C=t.target=io(t.props,O),S=$u(C,t,A,m);C&&(a!=="svg"&&gl(C)?a="svg":a!=="mathml"&&ml(C)&&(a="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(C),P||(N(C,S),Os(t,!1)))};P&&(N(n,y),Os(t,!0)),pl(t.props)?(t.el.__isMounted=!1,qe(()=>{T(),delete t.el.__isMounted},o)):T()}else{if(pl(t.props)&&e.el.__isMounted===!1){qe(()=>{Pu.process(e,t,n,r,s,o,a,l,c,d)},o);return}t.el=e.el,t.targetStart=e.targetStart;const b=t.anchor=e.anchor,y=t.target=e.target,N=t.targetAnchor=e.targetAnchor,T=kr(e.props),C=T?n:y,S=T?b:N;if(a==="svg"||gl(y)?a="svg":(a==="mathml"||ml(y))&&(a="mathml"),M?(p(e.dynamicChildren,M,C,s,o,a,l),ra(e,t,!0)):c||h(e,t,C,S,s,o,a,l,!1),P)T?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Es(t,n,b,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const U=t.target=io(t.props,O);U&&Es(t,U,null,d,0)}else T&&Es(t,y,N,d,1);Os(t,P)}},remove(e,t,n,{um:r,o:{remove:s}},o){const{shapeFlag:a,children:l,anchor:c,targetStart:d,targetAnchor:f,target:h,props:p}=e;if(h&&(s(d),s(f)),o&&s(c),a&16){const m=o||!kr(p);for(let O=0;O{e.isMounted=!0}),Gu(()=>{e.isUnmounting=!0}),e}const ft=[Function,Array],ku={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ft,onEnter:ft,onAfterEnter:ft,onEnterCancelled:ft,onBeforeLeave:ft,onLeave:ft,onAfterLeave:ft,onLeaveCancelled:ft,onBeforeAppear:ft,onAppear:ft,onAfterAppear:ft,onAppearCancelled:ft},Vu=e=>{const t=e.subTree;return t.component?Vu(t.component):t},m_={name:"BaseTransition",props:ku,setup(e,{slots:t}){const n=hn(),r=Mu();return()=>{const s=t.default&&zo(t.default(),!0);if(!s||!s.length)return;const o=Fu(s),a=ve(e),{mode:l}=a;if(r.isLeaving)return ki(o);const c=_l(o);if(!c)return ki(o);let d=Gr(c,a,r,n,h=>d=h);c.type!==ke&&Mn(c,d);let f=n.subTree&&_l(n.subTree);if(f&&f.type!==ke&&!Dt(f,c)&&Vu(n).type!==ke){let h=Gr(f,a,r,n);if(Mn(f,h),l==="out-in"&&c.type!==ke)return r.isLeaving=!0,h.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,f=void 0},ki(o);l==="in-out"&&c.type!==ke?h.delayLeave=(p,m,O)=>{const A=Hu(r,f);A[String(f.key)]=f,p[Ht]=()=>{m(),p[Ht]=void 0,delete d.delayedLeave,f=void 0},d.delayedLeave=()=>{O(),delete d.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return o}}};function Fu(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ke){t=n;break}}return t}const __=m_;function Hu(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Gr(e,t,n,r,s){const{appear:o,mode:a,persisted:l=!1,onBeforeEnter:c,onEnter:d,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:p,onLeave:m,onAfterLeave:O,onLeaveCancelled:A,onBeforeAppear:x,onAppear:P,onAfterAppear:V,onAppearCancelled:H}=t,M=String(e.key),b=Hu(n,e),y=(C,S)=>{C&&St(C,r,9,S)},N=(C,S)=>{const U=S[1];y(C,S),le(C)?C.every(j=>j.length<=1)&&U():C.length<=1&&U()},T={mode:a,persisted:l,beforeEnter(C){let S=c;if(!n.isMounted)if(o)S=x||c;else return;C[Ht]&&C[Ht](!0);const U=b[M];U&&Dt(e,U)&&U.el[Ht]&&U.el[Ht](),y(S,[C])},enter(C){let S=d,U=f,j=h;if(!n.isMounted)if(o)S=P||d,U=V||f,j=H||h;else return;let te=!1;const he=C[ys]=Ee=>{te||(te=!0,Ee?y(j,[C]):y(U,[C]),T.delayedLeave&&T.delayedLeave(),C[ys]=void 0)};S?N(S,[C,he]):he()},leave(C,S){const U=String(e.key);if(C[ys]&&C[ys](!0),n.isUnmounting)return S();y(p,[C]);let j=!1;const te=C[Ht]=he=>{j||(j=!0,S(),he?y(A,[C]):y(O,[C]),C[Ht]=void 0,b[U]===e&&delete b[U])};b[U]=e,m?N(m,[C,te]):te()},clone(C){const S=Gr(C,t,n,r,s);return s&&s(S),S}};return T}function ki(e){if(es(e))return e=cn(e),e.children=null,e}function _l(e){if(!es(e))return Lu(e.type)&&e.children?Fu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&fe(n.default))return n.default()}}function Mn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Mn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function zo(e,t=!1,n){let r=[],s=0;for(let o=0;o1)for(let o=0;on.value,set:o=>n.value=o})}return n}const Fs=new WeakMap;function Vr(e,t,n,r,s=!1){if(le(e)){e.forEach((O,A)=>Vr(O,t&&(le(t)?t[A]:t),n,r,s));return}if(sr(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Vr(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?fi(r.component):r.el,a=s?null:o,{i:l,r:c}=e,d=t&&t.r,f=l.refs===Se?l.refs={}:l.refs,h=l.setupState,p=ve(h),m=h===Se?zc:O=>Te(p,O);if(d!=null&&d!==c){if(vl(t),Oe(d))f[d]=null,m(d)&&(h[d]=null);else if(Re(d)){d.value=null;const O=t;O.k&&(f[O.k]=null)}}if(fe(c))Zr(c,l,12,[a,f]);else{const O=Oe(c),A=Re(c);if(O||A){const x=()=>{if(e.f){const P=O?m(c)?h[c]:f[c]:c.value;if(s)le(P)&&Fo(P,o);else if(le(P))P.includes(o)||P.push(o);else if(O)f[c]=[o],m(c)&&(h[c]=f[c]);else{const V=[o];c.value=V,e.k&&(f[e.k]=V)}}else O?(f[c]=a,m(c)&&(h[c]=a)):A&&(c.value=a,e.k&&(f[e.k]=a))};if(a){const P=()=>{x(),Fs.delete(e)};P.id=-1,Fs.set(e,P),qe(P,n)}else vl(e),x()}}}function vl(e){const t=Fs.get(e);t&&(t.flags|=8,Fs.delete(e))}const El=e=>e.nodeType===8;Zs().requestIdleCallback;Zs().cancelIdleCallback;function v_(e,t){if(El(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(El(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const sr=e=>!!e.type.__asyncLoader;function Cb(e){fe(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,hydrate:o,timeout:a,suspensible:l=!0,onError:c}=e;let d=null,f,h=0;const p=()=>(h++,d=null,m()),m=()=>{let O;return d||(O=d=t().catch(A=>{if(A=A instanceof Error?A:new Error(String(A)),c)return new Promise((x,P)=>{c(A,()=>x(p()),()=>P(A),h+1)});throw A}).then(A=>O!==d&&d?d:(A&&(A.__esModule||A[Symbol.toStringTag]==="Module")&&(A=A.default),f=A,A)))};return Xo({name:"AsyncComponentWrapper",__asyncLoader:m,__asyncHydrate(O,A,x){let P=!1;(A.bu||(A.bu=[])).push(()=>P=!0);const V=()=>{P||x()},H=o?()=>{const M=o(V,b=>v_(O,b));M&&(A.bum||(A.bum=[])).push(M)}:V;f?H():m().then(()=>!A.isUnmounted&&H())},get __asyncResolved(){return f},setup(){const O=He;if(Qo(O),f)return()=>bs(f,O);const A=H=>{d=null,yr(H,O,13,!r)};if(l&&O.suspense||hr)return m().then(H=>()=>bs(H,O)).catch(H=>(A(H),()=>r?Ne(r,{error:H}):null));const x=xn(!1),P=xn(),V=xn(!!s);return s&&setTimeout(()=>{V.value=!1},s),a!=null&&setTimeout(()=>{if(!x.value&&!P.value){const H=new Error(`Async component timed out after ${a}ms.`);A(H),P.value=H}},a),m().then(()=>{x.value=!0,O.parent&&es(O.parent.vnode)&&O.parent.update()}).catch(H=>{A(H),P.value=H}),()=>{if(x.value&&f)return bs(f,O);if(P.value&&r)return Ne(r,{error:P.value});if(n&&!V.value)return bs(n,O)}}})}function bs(e,t){const{ref:n,props:r,children:s,ce:o}=t.vnode,a=Ne(e,r,s);return a.ref=n,a.ce=o,delete t.vnode.ce,a}const es=e=>e.type.__isKeepAlive;function Bu(e,t){Wu(e,"a",t)}function ju(e,t){Wu(e,"da",t)}function Wu(e,t,n=He){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(ai(t,r,n),n){let s=n.parent;for(;s&&s.parent;)es(s.parent.vnode)&&E_(r,t,n,s),s=s.parent}}function E_(e,t,n,r){const s=ai(t,e,r,!0);li(()=>{Fo(r[t],s)},n)}function ai(e,t,n=He,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{Ut();const l=kn(n),c=St(t,n,e,a);return l(),Gt(),c});return r?s.unshift(o):s.push(o),o}}const qt=e=>(t,n=He)=>{(!hr||e==="sp")&&ai(e,(...r)=>t(...r),n)},y_=qt("bm"),Jo=qt("m"),Ku=qt("bu"),Uu=qt("u"),Gu=qt("bum"),li=qt("um"),b_=qt("sp"),A_=qt("rtg"),T_=qt("rtc");function C_(e,t=He){ai("ec",e,t)}const Zo="components",S_="directives";function w_(e,t){return ea(Zo,e,!0,t)||e}const qu=Symbol.for("v-ndc");function O_(e){return Oe(e)?ea(Zo,e,!1)||e:e||qu}function Sb(e){return ea(S_,e)}function ea(e,t,n=!0,r=!1){const s=Be||He;if(s){const o=s.type;if(e===Zo){const l=Tv(o,!1);if(l&&(l===t||l===mt(t)||l===Qs(mt(t))))return o}const a=yl(s[e]||o[e],t)||yl(s.appContext[e],t);return!a&&r?o:a}}function yl(e,t){return e&&(e[t]||e[mt(t)]||e[Qs(mt(t))])}function wb(e,t,n,r){let s;const o=n,a=le(e);if(a||Oe(e)){const l=a&&an(e);let c=!1,d=!1;l&&(c=!pt(e),d=ln(e),e=ni(e)),s=new Array(e.length);for(let f=0,h=e.length;ft(l,c,void 0,o));else{const l=Object.keys(e);s=new Array(l.length);for(let c=0,d=l.length;c{const o=r.fn(...s);return o&&(o.key=r.key),o}:r.fn)}return e}function Nb(e,t,n={},r,s){if(Be.ce||Be.parent&&sr(Be.parent)&&Be.parent.ce){const d=Object.keys(n).length>0;return t!=="default"&&(n.name=t),It(),Yr(Xe,null,[Ne("slot",n,r&&r())],d?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),It();const a=o&&Yu(o(n)),l=n.key||a&&a.key,c=Yr(Xe,{key:(l&&!Ct(l)?l:`_${t}`)+(!a&&r?"_fb":"")},a||(r?r():[]),a&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function Yu(e){return e.some(t=>dr(t)?!(t.type===ke||t.type===Xe&&!Yu(t.children)):!0)?e:null}const oo=e=>e?mf(e)?fi(e):oo(e.parent):null,Fr=$e(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>oo(e.parent),$root:e=>oo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xu(e),$forceUpdate:e=>e.f||(e.f=()=>{Yo(e.update)}),$nextTick:e=>e.n||(e.n=oi.bind(e.proxy)),$watch:e=>X_.bind(e)}),Vi=(e,t)=>e!==Se&&!e.__isScriptSetup&&Te(e,t),N_={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:a,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const m=a[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(Vi(r,t))return a[t]=1,r[t];if(s!==Se&&Te(s,t))return a[t]=2,s[t];if((d=e.propsOptions[0])&&Te(d,t))return a[t]=3,o[t];if(n!==Se&&Te(n,t))return a[t]=4,n[t];lo&&(a[t]=0)}}const f=Fr[t];let h,p;if(f)return t==="$attrs"&&Ue(e.attrs,"get",""),f(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==Se&&Te(n,t))return a[t]=4,n[t];if(p=c.config.globalProperties,Te(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return Vi(s,t)?(s[t]=n,!0):r!==Se&&Te(r,t)?(r[t]=n,!0):Te(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o,type:a}},l){let c,d;return!!(n[l]||e!==Se&&l[0]!=="$"&&Te(e,l)||Vi(t,l)||(c=o[0])&&Te(c,l)||Te(r,l)||Te(Fr,l)||Te(s.config.globalProperties,l)||(d=a.__cssModules)&&d[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function xb(){return x_().slots}function x_(e){const t=hn();return t.setupContext||(t.setupContext=vf(t))}function ao(e){return le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Rb(e,t){const n=ao(e);for(const r in t){if(r.startsWith("__skip"))continue;let s=n[r];s?le(s)||fe(s)?s=n[r]={type:s,default:t[r]}:s.default=t[r]:s===null&&(s=n[r]={default:t[r]}),s&&t[`__skip_${r}`]&&(s.skipFactory=!0)}return n}function Ib(e){const t=hn();let n=e();return po(),Ho(n)&&(n=n.catch(r=>{throw kn(t),r})),[n,()=>kn(t)]}let lo=!0;function R_(e){const t=Xu(e),n=e.proxy,r=e.ctx;lo=!1,t.beforeCreate&&bl(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:a,watch:l,provide:c,inject:d,created:f,beforeMount:h,mounted:p,beforeUpdate:m,updated:O,activated:A,deactivated:x,beforeDestroy:P,beforeUnmount:V,destroyed:H,unmounted:M,render:b,renderTracked:y,renderTriggered:N,errorCaptured:T,serverPrefetch:C,expose:S,inheritAttrs:U,components:j,directives:te,filters:he}=t;if(d&&I_(d,r,null),a)for(const I in a){const K=a[I];fe(K)&&(r[I]=K.bind(n))}if(s){const I=s.call(n,n);Ce(I)&&(e.data=Jr(I))}if(lo=!0,o)for(const I in o){const K=o[I],G=fe(K)?K.bind(n,n):fe(K.get)?K.get.bind(n,n):At,X=!fe(K)&&fe(K.set)?K.set.bind(n):At,re=dt({get:G,set:X});Object.defineProperty(r,I,{enumerable:!0,configurable:!0,get:()=>re.value,set:ne=>re.value=ne})}if(l)for(const I in l)zu(l[I],r,n,I);if(c){const I=fe(c)?c.call(n):c;Reflect.ownKeys(I).forEach(K=>{Ns(K,I[K])})}f&&bl(f,e,"c");function ie(I,K){le(K)?K.forEach(G=>I(G.bind(n))):K&&I(K.bind(n))}if(ie(y_,h),ie(Jo,p),ie(Ku,m),ie(Uu,O),ie(Bu,A),ie(ju,x),ie(C_,T),ie(T_,y),ie(A_,N),ie(Gu,V),ie(li,M),ie(b_,C),le(S))if(S.length){const I=e.exposed||(e.exposed={});S.forEach(K=>{Object.defineProperty(I,K,{get:()=>n[K],set:G=>n[K]=G,enumerable:!0})})}else e.exposed||(e.exposed={});b&&e.render===At&&(e.render=b),U!=null&&(e.inheritAttrs=U),j&&(e.components=j),te&&(e.directives=te),C&&Qo(e)}function I_(e,t,n=At){le(e)&&(e=co(e));for(const r in e){const s=e[r];let o;Ce(s)?"default"in s?o=rt(s.from||r,s.default,!0):o=rt(s.from||r):o=rt(s),Re(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[r]=o}}function bl(e,t,n){St(le(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function zu(e,t,n,r){let s=r.includes(".")?cf(n,r):()=>n[r];if(Oe(e)){const o=t[e];fe(o)&&In(s,o)}else if(fe(e))In(s,e.bind(n));else if(Ce(e))if(le(e))e.forEach(o=>zu(o,t,n,r));else{const o=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(o)&&In(s,o,e)}}function Xu(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,l=o.get(t);let c;return l?c=l:!s.length&&!n&&!r?c=t:(c={},s.length&&s.forEach(d=>Hs(c,d,a,!0)),Hs(c,t,a)),Ce(t)&&o.set(t,c),c}function Hs(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&Hs(e,o,n,!0),s&&s.forEach(a=>Hs(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const l=D_[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const D_={data:Al,props:Tl,emits:Tl,methods:Ir,computed:Ir,beforeCreate:Ge,created:Ge,beforeMount:Ge,mounted:Ge,beforeUpdate:Ge,updated:Ge,beforeDestroy:Ge,beforeUnmount:Ge,destroyed:Ge,unmounted:Ge,activated:Ge,deactivated:Ge,errorCaptured:Ge,serverPrefetch:Ge,components:Ir,directives:Ir,watch:P_,provide:Al,inject:L_};function Al(e,t){return t?e?function(){return $e(fe(e)?e.call(this,this):e,fe(t)?t.call(this,this):t)}:t:e}function L_(e,t){return Ir(co(e),co(t))}function co(e){if(le(e)){const t={};for(let n=0;n1)return n&&fe(t)?t.call(r&&r.proxy):t}}function k_(){return!!(hn()||Rn)}const Ju={},Zu=()=>Object.create(Ju),ef=e=>Object.getPrototypeOf(e)===Ju;function V_(e,t,n,r=!1){const s={},o=Zu();e.propsDefaults=Object.create(null),tf(e,t,s,o);for(const a in e.propsOptions[0])a in s||(s[a]=void 0);n?e.props=r?s:Au(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function F_(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:a}}=e,l=ve(s),[c]=e.propsOptions;let d=!1;if((r||a>0)&&!(a&16)){if(a&8){const f=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[p,m]=nf(h,t,!0);$e(a,p),m&&l.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!c)return Ce(e)&&r.set(e,tr),tr;if(le(o))for(let f=0;fe==="_"||e==="_ctx"||e==="$stable",na=e=>le(e)?e.map(bt):[bt(e)],B_=(e,t,n)=>{if(t._n)return t;const r=Jn((...s)=>na(t(...s)),n);return r._c=!1,r},rf=(e,t,n)=>{const r=e._ctx;for(const s in e){if(ta(s))continue;const o=e[s];if(fe(o))t[s]=B_(s,o,r);else if(o!=null){const a=na(o);t[s]=()=>a}}},sf=(e,t)=>{const n=na(t);e.slots.default=()=>n},of=(e,t,n)=>{for(const r in t)(n||!ta(r))&&(e[r]=t[r])},j_=(e,t,n)=>{const r=e.slots=Zu();if(e.vnode.shapeFlag&32){const s=t._;s?(of(r,t,n),n&&Jc(r,"_",s,!0)):rf(t,r)}else t&&sf(e,t)},W_=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,a=Se;if(r.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:of(s,t,n):(o=!t.$stable,rf(t,s)),a=t}else t&&(sf(e,t),a={default:1});if(o)for(const l in s)!ta(l)&&a[l]==null&&delete s[l]},qe=uv;function K_(e){return U_(e)}function U_(e,t){const n=Zs();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:a,createText:l,createComment:c,setText:d,setElementText:f,parentNode:h,nextSibling:p,setScopeId:m=At,insertStaticContent:O}=e,A=(g,E,w,$=null,B=null,F=null,q=void 0,z=null,R=!!E.dynamicChildren)=>{if(g===E)return;g&&!Dt(g,E)&&($=L(g),ne(g,B,F,!0),g=null),E.patchFlag===-2&&(R=!1,E.dynamicChildren=null);const{type:W,ref:ce,shapeFlag:ee}=E;switch(W){case ui:x(g,E,w,$);break;case ke:P(g,E,w,$);break;case xs:g==null&&V(E,w,$,q);break;case Xe:j(g,E,w,$,B,F,q,z,R);break;default:ee&1?b(g,E,w,$,B,F,q,z,R):ee&6?te(g,E,w,$,B,F,q,z,R):(ee&64||ee&128)&&W.process(g,E,w,$,B,F,q,z,R,oe)}ce!=null&&B?Vr(ce,g&&g.ref,F,E||g,!E):ce==null&&g&&g.ref!=null&&Vr(g.ref,null,F,g,!0)},x=(g,E,w,$)=>{if(g==null)r(E.el=l(E.children),w,$);else{const B=E.el=g.el;E.children!==g.children&&d(B,E.children)}},P=(g,E,w,$)=>{g==null?r(E.el=c(E.children||""),w,$):E.el=g.el},V=(g,E,w,$)=>{[g.el,g.anchor]=O(g.children,E,w,$,g.el,g.anchor)},H=({el:g,anchor:E},w,$)=>{let B;for(;g&&g!==E;)B=p(g),r(g,w,$),g=B;r(E,w,$)},M=({el:g,anchor:E})=>{let w;for(;g&&g!==E;)w=p(g),s(g),g=w;s(E)},b=(g,E,w,$,B,F,q,z,R)=>{if(E.type==="svg"?q="svg":E.type==="math"&&(q="mathml"),g==null)y(E,w,$,B,F,q,z,R);else{const W=g.el&&g.el._isVueCE?g.el:null;try{W&&W._beginPatch(),C(g,E,B,F,q,z,R)}finally{W&&W._endPatch()}}},y=(g,E,w,$,B,F,q,z)=>{let R,W;const{props:ce,shapeFlag:ee,transition:ae,dirs:ue}=g;if(R=g.el=a(g.type,F,ce&&ce.is,ce),ee&8?f(R,g.children):ee&16&&T(g.children,R,null,$,B,Fi(g,F),q,z),ue&&An(g,null,$,"created"),N(R,g,g.scopeId,q,$),ce){for(const be in ce)be!=="value"&&!Pr(be)&&o(R,be,null,ce[be],F,$);"value"in ce&&o(R,"value",null,ce.value,F),(W=ce.onVnodeBeforeMount)&&Nt(W,$,g)}ue&&An(g,null,$,"beforeMount");const pe=G_(B,ae);pe&&ae.beforeEnter(R),r(R,E,w),((W=ce&&ce.onVnodeMounted)||pe||ue)&&qe(()=>{W&&Nt(W,$,g),pe&&ae.enter(R),ue&&An(g,null,$,"mounted")},B)},N=(g,E,w,$,B)=>{if(w&&m(g,w),$)for(let F=0;F<$.length;F++)m(g,$[F]);if(B){let F=B.subTree;if(E===F||ff(F.type)&&(F.ssContent===E||F.ssFallback===E)){const q=B.vnode;N(g,q,q.scopeId,q.slotScopeIds,B.parent)}}},T=(g,E,w,$,B,F,q,z,R=0)=>{for(let W=R;W{const z=E.el=g.el;let{patchFlag:R,dynamicChildren:W,dirs:ce}=E;R|=g.patchFlag&16;const ee=g.props||Se,ae=E.props||Se;let ue;if(w&&Tn(w,!1),(ue=ae.onVnodeBeforeUpdate)&&Nt(ue,w,E,g),ce&&An(E,g,w,"beforeUpdate"),w&&Tn(w,!0),(ee.innerHTML&&ae.innerHTML==null||ee.textContent&&ae.textContent==null)&&f(z,""),W?S(g.dynamicChildren,W,z,w,$,Fi(E,B),F):q||K(g,E,z,null,w,$,Fi(E,B),F,!1),R>0){if(R&16)U(z,ee,ae,w,B);else if(R&2&&ee.class!==ae.class&&o(z,"class",null,ae.class,B),R&4&&o(z,"style",ee.style,ae.style,B),R&8){const pe=E.dynamicProps;for(let be=0;be{ue&&Nt(ue,w,E,g),ce&&An(E,g,w,"updated")},$)},S=(g,E,w,$,B,F,q)=>{for(let z=0;z{if(E!==w){if(E!==Se)for(const F in E)!Pr(F)&&!(F in w)&&o(g,F,E[F],null,B,$);for(const F in w){if(Pr(F))continue;const q=w[F],z=E[F];q!==z&&F!=="value"&&o(g,F,z,q,B,$)}"value"in w&&o(g,"value",E.value,w.value,B)}},j=(g,E,w,$,B,F,q,z,R)=>{const W=E.el=g?g.el:l(""),ce=E.anchor=g?g.anchor:l("");let{patchFlag:ee,dynamicChildren:ae,slotScopeIds:ue}=E;ue&&(z=z?z.concat(ue):ue),g==null?(r(W,w,$),r(ce,w,$),T(E.children||[],w,ce,B,F,q,z,R)):ee>0&&ee&64&&ae&&g.dynamicChildren?(S(g.dynamicChildren,ae,w,B,F,q,z),(E.key!=null||B&&E===B.subTree)&&ra(g,E,!0)):K(g,E,w,ce,B,F,q,z,R)},te=(g,E,w,$,B,F,q,z,R)=>{E.slotScopeIds=z,g==null?E.shapeFlag&512?B.ctx.activate(E,w,$,q,R):he(E,w,$,B,F,q,R):Ee(g,E,R)},he=(g,E,w,$,B,F,q)=>{const z=g.component=Ev(g,$,B);if(es(g)&&(z.ctx.renderer=oe),yv(z,!1,q),z.asyncDep){if(B&&B.registerDep(z,ie,q),!g.el){const R=z.subTree=Ne(ke);P(null,R,E,w),g.placeholder=R.el}}else ie(z,g,E,w,B,F,q)},Ee=(g,E,w)=>{const $=E.component=g.component;if(rv(g,E,w))if($.asyncDep&&!$.asyncResolved){I($,E,w);return}else $.next=E,$.update();else E.el=g.el,$.vnode=E},ie=(g,E,w,$,B,F,q)=>{const z=()=>{if(g.isMounted){let{next:ee,bu:ae,u:ue,parent:pe,vnode:be}=g;{const at=af(g);if(at){ee&&(ee.el=be.el,I(g,ee,q)),at.asyncDep.then(()=>{g.isUnmounted||z()});return}}let _e=ee,Ie;Tn(g,!1),ee?(ee.el=be.el,I(g,ee,q)):ee=be,ae&&ws(ae),(Ie=ee.props&&ee.props.onVnodeBeforeUpdate)&&Nt(Ie,pe,ee,be),Tn(g,!0);const je=wl(g),_t=g.subTree;g.subTree=je,A(_t,je,h(_t.el),L(_t),g,B,F),ee.el=je.el,_e===null&&sa(g,je.el),ue&&qe(ue,B),(Ie=ee.props&&ee.props.onVnodeUpdated)&&qe(()=>Nt(Ie,pe,ee,be),B)}else{let ee;const{el:ae,props:ue}=E,{bm:pe,m:be,parent:_e,root:Ie,type:je}=g,_t=sr(E);Tn(g,!1),pe&&ws(pe),!_t&&(ee=ue&&ue.onVnodeBeforeMount)&&Nt(ee,_e,E),Tn(g,!0);{Ie.ce&&Ie.ce._def.shadowRoot!==!1&&Ie.ce._injectChildStyle(je);const at=g.subTree=wl(g);A(null,at,w,$,g,B,F),E.el=at.el}if(be&&qe(be,B),!_t&&(ee=ue&&ue.onVnodeMounted)){const at=E;qe(()=>Nt(ee,_e,at),B)}(E.shapeFlag&256||_e&&sr(_e.vnode)&&_e.vnode.shapeFlag&256)&&g.a&&qe(g.a,B),g.isMounted=!0,E=w=$=null}};g.scope.on();const R=g.effect=new ou(z);g.scope.off();const W=g.update=R.run.bind(R),ce=g.job=R.runIfDirty.bind(R);ce.i=g,ce.id=g.uid,R.scheduler=()=>Yo(ce),Tn(g,!0),W()},I=(g,E,w)=>{E.component=g;const $=g.vnode.props;g.vnode=E,g.next=null,F_(g,E.props,$,w),W_(g,E.children,w),Ut(),hl(g),Gt()},K=(g,E,w,$,B,F,q,z,R=!1)=>{const W=g&&g.children,ce=g?g.shapeFlag:0,ee=E.children,{patchFlag:ae,shapeFlag:ue}=E;if(ae>0){if(ae&128){X(W,ee,w,$,B,F,q,z,R);return}else if(ae&256){G(W,ee,w,$,B,F,q,z,R);return}}ue&8?(ce&16&&ye(W,B,F),ee!==W&&f(w,ee)):ce&16?ue&16?X(W,ee,w,$,B,F,q,z,R):ye(W,B,F,!0):(ce&8&&f(w,""),ue&16&&T(ee,w,$,B,F,q,z,R))},G=(g,E,w,$,B,F,q,z,R)=>{g=g||tr,E=E||tr;const W=g.length,ce=E.length,ee=Math.min(W,ce);let ae;for(ae=0;aece?ye(g,B,F,!0,!1,ee):T(E,w,$,B,F,q,z,R,ee)},X=(g,E,w,$,B,F,q,z,R)=>{let W=0;const ce=E.length;let ee=g.length-1,ae=ce-1;for(;W<=ee&&W<=ae;){const ue=g[W],pe=E[W]=R?nn(E[W]):bt(E[W]);if(Dt(ue,pe))A(ue,pe,w,null,B,F,q,z,R);else break;W++}for(;W<=ee&&W<=ae;){const ue=g[ee],pe=E[ae]=R?nn(E[ae]):bt(E[ae]);if(Dt(ue,pe))A(ue,pe,w,null,B,F,q,z,R);else break;ee--,ae--}if(W>ee){if(W<=ae){const ue=ae+1,pe=ueae)for(;W<=ee;)ne(g[W],B,F,!0),W++;else{const ue=W,pe=W,be=new Map;for(W=pe;W<=ae;W++){const We=E[W]=R?nn(E[W]):bt(E[W]);We.key!=null&&be.set(We.key,W)}let _e,Ie=0;const je=ae-pe+1;let _t=!1,at=0;const pn=new Array(je);for(W=0;W=je){ne(We,B,F,!0);continue}let lt;if(We.key!=null)lt=be.get(We.key);else for(_e=pe;_e<=ae;_e++)if(pn[_e-pe]===0&&Dt(We,E[_e])){lt=_e;break}lt===void 0?ne(We,B,F,!0):(pn[lt-pe]=W+1,lt>=at?at=lt:_t=!0,A(We,E[lt],w,null,B,F,q,z,R),Ie++)}const ts=_t?q_(pn):tr;for(_e=ts.length-1,W=je-1;W>=0;W--){const We=pe+W,lt=E[We],Yt=E[We+1],ns=We+1{const{el:F,type:q,transition:z,children:R,shapeFlag:W}=g;if(W&6){re(g.component.subTree,E,w,$);return}if(W&128){g.suspense.move(E,w,$);return}if(W&64){q.move(g,E,w,oe);return}if(q===Xe){r(F,E,w);for(let ee=0;eez.enter(F),B);else{const{leave:ee,delayLeave:ae,afterLeave:ue}=z,pe=()=>{g.ctx.isUnmounted?s(F):r(F,E,w)},be=()=>{F._isLeaving&&F[Ht](!0),ee(F,()=>{pe(),ue&&ue()})};ae?ae(F,pe,be):be()}else r(F,E,w)},ne=(g,E,w,$=!1,B=!1)=>{const{type:F,props:q,ref:z,children:R,dynamicChildren:W,shapeFlag:ce,patchFlag:ee,dirs:ae,cacheIndex:ue}=g;if(ee===-2&&(B=!1),z!=null&&(Ut(),Vr(z,null,w,g,!0),Gt()),ue!=null&&(E.renderCache[ue]=void 0),ce&256){E.ctx.deactivate(g);return}const pe=ce&1&&ae,be=!sr(g);let _e;if(be&&(_e=q&&q.onVnodeBeforeUnmount)&&Nt(_e,E,g),ce&6)me(g.component,w,$);else{if(ce&128){g.suspense.unmount(w,$);return}pe&&An(g,null,E,"beforeUnmount"),ce&64?g.type.remove(g,E,w,oe,$):W&&!W.hasOnce&&(F!==Xe||ee>0&&ee&64)?ye(W,E,w,!1,!0):(F===Xe&&ee&384||!B&&ce&16)&&ye(R,E,w),$&&se(g)}(be&&(_e=q&&q.onVnodeUnmounted)||pe)&&qe(()=>{_e&&Nt(_e,E,g),pe&&An(g,null,E,"unmounted")},w)},se=g=>{const{type:E,el:w,anchor:$,transition:B}=g;if(E===Xe){de(w,$);return}if(E===xs){M(g);return}const F=()=>{s(w),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(g.shapeFlag&1&&B&&!B.persisted){const{leave:q,delayLeave:z}=B,R=()=>q(w,F);z?z(g.el,F,R):R()}else F()},de=(g,E)=>{let w;for(;g!==E;)w=p(g),s(g),g=w;s(E)},me=(g,E,w)=>{const{bum:$,scope:B,job:F,subTree:q,um:z,m:R,a:W}=g;Sl(R),Sl(W),$&&ws($),B.stop(),F&&(F.flags|=8,ne(q,g,E,w)),z&&qe(z,E),qe(()=>{g.isUnmounted=!0},E)},ye=(g,E,w,$=!1,B=!1,F=0)=>{for(let q=F;q{if(g.shapeFlag&6)return L(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const E=p(g.anchor||g.el),w=E&&E[Du];return w?p(w):E};let Q=!1;const Z=(g,E,w)=>{g==null?E._vnode&&ne(E._vnode,null,null,!0):A(E._vnode||null,g,E,null,null,null,w),E._vnode=g,Q||(Q=!0,hl(),xu(),Q=!1)},oe={p:A,um:ne,m:re,r:se,mt:he,mc:T,pc:K,pbc:S,n:L,o:e};return{render:Z,hydrate:void 0,createApp:M_(Z)}}function Fi({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Tn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function G_(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ra(e,t,n=!1){const r=e.children,s=t.children;if(le(r)&&le(s))for(let o=0;o>1,e[n[l]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function af(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:af(t)}function Sl(e){if(e)for(let t=0;trt(Y_);function In(e,t,n){return lf(e,t,n)}function lf(e,t,n=Se){const{immediate:r,deep:s,flush:o,once:a}=n,l=$e({},n),c=t&&r||!t&&o!=="post";let d;if(hr){if(o==="sync"){const m=z_();d=m.__watcherHandles||(m.__watcherHandles=[])}else if(!c){const m=()=>{};return m.stop=At,m.resume=At,m.pause=At,m}}const f=He;l.call=(m,O,A)=>St(m,f,O,A);let h=!1;o==="post"?l.scheduler=m=>{qe(m,f&&f.suspense)}:o!=="sync"&&(h=!0,l.scheduler=(m,O)=>{O?m():Yo(m)}),l.augmentJob=m=>{t&&(m.flags|=4),h&&(m.flags|=2,f&&(m.id=f.uid,m.i=f))};const p=d_(e,t,l);return hr&&(d?d.push(p):c&&p()),p}function X_(e,t,n){const r=this.proxy,s=Oe(e)?e.includes(".")?cf(r,e):()=>r[e]:e.bind(r,r);let o;fe(t)?o=t:(o=t.handler,n=t);const a=kn(this),l=lf(s,o.bind(r),n);return a(),l}function cf(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mt(t)}Modifiers`]||e[`${dn(t)}Modifiers`];function J_(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Se;let s=n;const o=t.startsWith("update:"),a=o&&Q_(r,t.slice(7));a&&(a.trim&&(s=n.map(f=>Oe(f)?f.trim():f)),a.number&&(s=n.map(Js)));let l,c=r[l=Di(t)]||r[l=Di(mt(t))];!c&&o&&(c=r[l=Di(dn(t))]),c&&St(c,e,6,s);const d=r[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,St(d,e,6,s)}}const Z_=new WeakMap;function uf(e,t,n=!1){const r=n?Z_:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let a={},l=!1;if(!fe(e)){const c=d=>{const f=uf(d,t,!0);f&&(l=!0,$e(a,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(Ce(e)&&r.set(e,null),null):(le(o)?o.forEach(c=>a[c]=null):$e(a,o),Ce(e)&&r.set(e,a),a)}function ci(e,t){return!e||!zs(t)?!1:(t=t.slice(2).replace(/Once$/,""),Te(e,t[0].toLowerCase()+t.slice(1))||Te(e,dn(t))||Te(e,t))}function wl(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:a,attrs:l,emit:c,render:d,renderCache:f,props:h,data:p,setupState:m,ctx:O,inheritAttrs:A}=e,x=Vs(e);let P,V;try{if(n.shapeFlag&4){const M=s||r,b=M;P=bt(d.call(b,M,f,h,m,p,O)),V=l}else{const M=t;P=bt(M.length>1?M(h,{attrs:l,slots:a,emit:c}):M(h,null)),V=t.props?l:tv(l)}}catch(M){Hr.length=0,yr(M,e,1),P=Ne(ke)}let H=P;if(V&&A!==!1){const M=Object.keys(V),{shapeFlag:b}=H;M.length&&b&7&&(o&&M.some(Vo)&&(V=nv(V,o)),H=cn(H,V,!1,!0))}return n.dirs&&(H=cn(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(n.dirs):n.dirs),n.transition&&Mn(H,n.transition),P=H,Vs(x),P}function ev(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||zs(n))&&((t||(t={}))[n]=e[n]);return t},nv=(e,t)=>{const n={};for(const r in e)(!Vo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function rv(e,t,n){const{props:r,children:s,component:o}=e,{props:a,children:l,patchFlag:c}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Ol(r,a,d):!!a;if(c&8){const f=t.dynamicProps;for(let h=0;he.__isSuspense;let fo=0;const sv={name:"Suspense",__isSuspense:!0,process(e,t,n,r,s,o,a,l,c,d){if(e==null)ov(t,n,r,s,o,a,l,c,d);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}av(e,t,n,r,s,a,l,c,d)}},hydrate:lv,normalize:cv},iv=sv;function qr(e,t){const n=e.props&&e.props[t];fe(n)&&n()}function ov(e,t,n,r,s,o,a,l,c){const{p:d,o:{createElement:f}}=c,h=f("div"),p=e.suspense=df(e,s,r,t,h,n,o,a,l,c);d(null,p.pendingBranch=e.ssContent,h,null,r,p,o,a),p.deps>0?(qr(e,"onPending"),qr(e,"onFallback"),d(null,e.ssFallback,t,n,r,null,o,a),ir(p,e.ssFallback)):p.resolve(!1,!0)}function av(e,t,n,r,s,o,a,l,{p:c,um:d,o:{createElement:f}}){const h=t.suspense=e.suspense;h.vnode=t,t.el=e.el;const p=t.ssContent,m=t.ssFallback,{activeBranch:O,pendingBranch:A,isInFallback:x,isHydrating:P}=h;if(A)h.pendingBranch=p,Dt(A,p)?(c(A,p,h.hiddenContainer,null,s,h,o,a,l),h.deps<=0?h.resolve():x&&(P||(c(O,m,n,r,s,null,o,a,l),ir(h,m)))):(h.pendingId=fo++,P?(h.isHydrating=!1,h.activeBranch=A):d(A,s,h),h.deps=0,h.effects.length=0,h.hiddenContainer=f("div"),x?(c(null,p,h.hiddenContainer,null,s,h,o,a,l),h.deps<=0?h.resolve():(c(O,m,n,r,s,null,o,a,l),ir(h,m))):O&&Dt(O,p)?(c(O,p,n,r,s,h,o,a,l),h.resolve(!0)):(c(null,p,h.hiddenContainer,null,s,h,o,a,l),h.deps<=0&&h.resolve()));else if(O&&Dt(O,p))c(O,p,n,r,s,h,o,a,l),ir(h,p);else if(qr(t,"onPending"),h.pendingBranch=p,p.shapeFlag&512?h.pendingId=p.component.suspenseId:h.pendingId=fo++,c(null,p,h.hiddenContainer,null,s,h,o,a,l),h.deps<=0)h.resolve();else{const{timeout:V,pendingId:H}=h;V>0?setTimeout(()=>{h.pendingId===H&&h.fallback(m)},V):V===0&&h.fallback(m)}}function df(e,t,n,r,s,o,a,l,c,d,f=!1){const{p:h,m:p,um:m,n:O,o:{parentNode:A,remove:x}}=d;let P;const V=fv(e);V&&t&&t.pendingBranch&&(P=t.pendingId,t.deps++);const H=e.props?Zc(e.props.timeout):void 0,M=o,b={vnode:e,parent:t,parentComponent:n,namespace:a,container:r,hiddenContainer:s,deps:0,pendingId:fo++,timeout:typeof H=="number"?H:-1,activeBranch:null,pendingBranch:null,isInFallback:!f,isHydrating:f,isUnmounted:!1,effects:[],resolve(y=!1,N=!1){const{vnode:T,activeBranch:C,pendingBranch:S,pendingId:U,effects:j,parentComponent:te,container:he,isInFallback:Ee}=b;let ie=!1;b.isHydrating?b.isHydrating=!1:y||(ie=C&&S.transition&&S.transition.mode==="out-in",ie&&(C.transition.afterLeave=()=>{U===b.pendingId&&(p(S,he,o===M?O(C):o,0),ks(j),Ee&&T.ssFallback&&(T.ssFallback.el=null))}),C&&(A(C.el)===he&&(o=O(C)),m(C,te,b,!0),!ie&&Ee&&T.ssFallback&&(T.ssFallback.el=null)),ie||p(S,he,o,0)),ir(b,S),b.pendingBranch=null,b.isInFallback=!1;let I=b.parent,K=!1;for(;I;){if(I.pendingBranch){I.effects.push(...j),K=!0;break}I=I.parent}!K&&!ie&&ks(j),b.effects=[],V&&t&&t.pendingBranch&&P===t.pendingId&&(t.deps--,t.deps===0&&!N&&t.resolve()),qr(T,"onResolve")},fallback(y){if(!b.pendingBranch)return;const{vnode:N,activeBranch:T,parentComponent:C,container:S,namespace:U}=b;qr(N,"onFallback");const j=O(T),te=()=>{b.isInFallback&&(h(null,y,S,j,C,null,U,l,c),ir(b,y))},he=y.transition&&y.transition.mode==="out-in";he&&(T.transition.afterLeave=te),b.isInFallback=!0,m(T,C,null,!0),he||te()},move(y,N,T){b.activeBranch&&p(b.activeBranch,y,N,T),b.container=y},next(){return b.activeBranch&&O(b.activeBranch)},registerDep(y,N,T){const C=!!b.pendingBranch;C&&b.deps++;const S=y.vnode.el;y.asyncDep.catch(U=>{yr(U,y,0)}).then(U=>{if(y.isUnmounted||b.isUnmounted||b.pendingId!==y.suspenseId)return;y.asyncResolved=!0;const{vnode:j}=y;go(y,U),S&&(j.el=S);const te=!S&&y.subTree.el;N(y,j,A(S||y.subTree.el),S?null:O(y.subTree),b,a,T),te&&(j.placeholder=null,x(te)),sa(y,j.el),C&&--b.deps===0&&b.resolve()})},unmount(y,N){b.isUnmounted=!0,b.activeBranch&&m(b.activeBranch,n,y,N),b.pendingBranch&&m(b.pendingBranch,n,y,N)}};return b}function lv(e,t,n,r,s,o,a,l,c){const d=t.suspense=df(t,r,n,e.parentNode,document.createElement("div"),null,s,o,a,l,!0),f=c(e,d.pendingBranch=t.ssContent,n,d,o,a);return d.deps===0&&d.resolve(!1,!0),f}function cv(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Nl(r?n.default:n),e.ssFallback=r?Nl(n.fallback):Ne(ke)}function Nl(e){let t;if(fe(e)){const n=fr&&e._c;n&&(e._d=!1,It()),e=e(),n&&(e._d=!0,t=et,hf())}return le(e)&&(e=ev(e)),e=bt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function uv(e,t){t&&t.pendingBranch?le(e)?t.effects.push(...e):t.effects.push(e):ks(e)}function ir(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,r&&r.subTree===n&&(r.vnode.el=s,sa(r,s))}function fv(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Xe=Symbol.for("v-fgt"),ui=Symbol.for("v-txt"),ke=Symbol.for("v-cmt"),xs=Symbol.for("v-stc"),Hr=[];let et=null;function It(e=!1){Hr.push(et=e?null:[])}function hf(){Hr.pop(),et=Hr[Hr.length-1]||null}let fr=1;function Bs(e,t=!1){fr+=e,e<0&&et&&t&&(et.hasOnce=!0)}function pf(e){return e.dynamicChildren=fr>0?et||tr:null,hf(),fr>0&&et&&et.push(e),e}function As(e,t,n,r,s,o){return pf(er(e,t,n,r,s,o,!0))}function Yr(e,t,n,r,s){return pf(Ne(e,t,n,r,s,!0))}function dr(e){return e?e.__v_isVNode===!0:!1}function Dt(e,t){return e.type===t.type&&e.key===t.key}const gf=({key:e})=>e??null,Rs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Oe(e)||Re(e)||fe(e)?{i:Be,r:e,k:t,f:!!n}:e:null);function er(e,t=null,n=null,r=0,s=null,o=e===Xe?0:1,a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&gf(t),ref:t&&Rs(t),scopeId:Iu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Be};return l?(ia(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=Oe(n)?8:16),fr>0&&!a&&et&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&et.push(c),c}const Ne=dv;function dv(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===qu)&&(e=ke),dr(e)){const l=cn(e,t,!0);return n&&ia(l,n),fr>0&&!o&&et&&(l.shapeFlag&6?et[et.indexOf(e)]=l:et.push(l)),l.patchFlag=-2,l}if(Cv(e)&&(e=e.__vccOpts),t){t=hv(t);let{class:l,style:c}=t;l&&!Oe(l)&&(t.class=ti(l)),Ce(c)&&(qo(c)&&!le(c)&&(c=$e({},c)),t.style=ei(c))}const a=Oe(e)?1:ff(e)?128:Lu(e)?64:Ce(e)?4:fe(e)?2:0;return er(e,t,n,r,s,a,o,!0)}function hv(e){return e?qo(e)||ef(e)?$e({},e):e:null}function cn(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:a,children:l,transition:c}=e,d=t?mv(s||{},t):s,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&gf(d),ref:t&&t.ref?n&&o?le(o)?o.concat(Rs(t)):[o,Rs(t)]:Rs(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Xe?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cn(e.ssContent),ssFallback:e.ssFallback&&cn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Mn(f,c.clone(f)),f}function pv(e=" ",t=0){return Ne(ui,null,e,t)}function gv(e="",t=!1){return t?(It(),Yr(ke,null,e)):Ne(ke,null,e)}function bt(e){return e==null||typeof e=="boolean"?Ne(ke):le(e)?Ne(Xe,null,e.slice()):dr(e)?nn(e):Ne(ui,null,String(e))}function nn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cn(e)}function ia(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(le(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ia(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!ef(t)?t._ctx=Be:s===3&&Be&&(Be.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else fe(t)?(t={default:t,_ctx:Be},n=32):(t=String(t),r&64?(n=16,t=[pv(t)]):n=8);e.children=t,e.shapeFlag|=n}function mv(...e){const t={};for(let n=0;nHe||Be;let js,ho;{const e=Zs(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(a=>a(o)):s[0](o)}};js=t("__VUE_INSTANCE_SETTERS__",n=>He=n),ho=t("__VUE_SSR_SETTERS__",n=>hr=n)}const kn=e=>{const t=He;return js(e),e.scope.on(),()=>{e.scope.off(),js(t)}},po=()=>{He&&He.scope.off(),js(null)};function mf(e){return e.vnode.shapeFlag&4}let hr=!1;function yv(e,t=!1,n=!1){t&&ho(t);const{props:r,children:s}=e.vnode,o=mf(e);V_(e,r,o,t),j_(e,s,n||t);const a=o?bv(e,t):void 0;return t&&ho(!1),a}function bv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,N_);const{setup:r}=n;if(r){Ut();const s=e.setupContext=r.length>1?vf(e):null,o=kn(e),a=Zr(r,e,0,[e.props,s]),l=Ho(a);if(Gt(),o(),(l||e.sp)&&!sr(e)&&Qo(e),l){if(a.then(po,po),t)return a.then(c=>{go(e,c)}).catch(c=>{yr(c,e,0)});e.asyncDep=a}else go(e,a)}else _f(e)}function go(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ce(t)&&(e.setupState=Su(t)),_f(e)}function _f(e,t,n){const r=e.type;e.render||(e.render=r.render||At);{const s=kn(e);Ut();try{R_(e)}finally{Gt(),s()}}}const Av={get(e,t){return Ue(e,"get",""),e[t]}};function vf(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Av),slots:e.slots,emit:e.emit,expose:t}}function fi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Su(ii(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Fr)return Fr[n](e)},has(t,n){return n in t||n in Fr}})):e.proxy}function Tv(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function Cv(e){return fe(e)&&"__vccOpts"in e}const dt=(e,t)=>u_(e,t,hr);function oa(e,t,n){try{Bs(-1);const r=arguments.length;return r===2?Ce(t)&&!le(t)?dr(t)?Ne(e,null,[t]):Ne(e,t):Ne(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&dr(n)&&(n=[n]),Ne(e,t,n))}finally{Bs(1)}}const Sv="3.5.24";let mo;const xl=typeof window<"u"&&window.trustedTypes;if(xl)try{mo=xl.createPolicy("vue",{createHTML:e=>e})}catch{}const Ef=mo?e=>mo.createHTML(e):e=>e,wv="http://www.w3.org/2000/svg",Ov="http://www.w3.org/1998/Math/MathML",Ft=typeof document<"u"?document:null,Rl=Ft&&Ft.createElement("template"),Nv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?Ft.createElementNS(wv,e):t==="mathml"?Ft.createElementNS(Ov,e):n?Ft.createElement(e,{is:n}):Ft.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Ft.createTextNode(e),createComment:e=>Ft.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ft.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const a=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{Rl.innerHTML=Ef(r==="svg"?``:r==="mathml"?``:e);const l=Rl.content;if(r==="svg"||r==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qt="transition",Nr="animation",pr=Symbol("_vtc"),yf={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},bf=$e({},ku,yf),xv=e=>(e.displayName="Transition",e.props=bf,e),Il=xv((e,{slots:t})=>oa(__,Af(e),t)),Cn=(e,t=[])=>{le(e)?e.forEach(n=>n(...t)):e&&e(...t)},Dl=e=>e?le(e)?e.some(t=>t.length>1):e.length>1:!1;function Af(e){const t={};for(const j in e)j in yf||(t[j]=e[j]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:d=a,appearToClass:f=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,O=Rv(s),A=O&&O[0],x=O&&O[1],{onBeforeEnter:P,onEnter:V,onEnterCancelled:H,onLeave:M,onLeaveCancelled:b,onBeforeAppear:y=P,onAppear:N=V,onAppearCancelled:T=H}=t,C=(j,te,he,Ee)=>{j._enterCancelled=Ee,Zt(j,te?f:l),Zt(j,te?d:a),he&&he()},S=(j,te)=>{j._isLeaving=!1,Zt(j,h),Zt(j,m),Zt(j,p),te&&te()},U=j=>(te,he)=>{const Ee=j?N:V,ie=()=>C(te,j,he);Cn(Ee,[te,ie]),Ll(()=>{Zt(te,j?c:o),xt(te,j?f:l),Dl(Ee)||Pl(te,r,A,ie)})};return $e(t,{onBeforeEnter(j){Cn(P,[j]),xt(j,o),xt(j,a)},onBeforeAppear(j){Cn(y,[j]),xt(j,c),xt(j,d)},onEnter:U(!1),onAppear:U(!0),onLeave(j,te){j._isLeaving=!0;const he=()=>S(j,te);xt(j,h),j._enterCancelled?(xt(j,p),_o(j)):(_o(j),xt(j,p)),Ll(()=>{j._isLeaving&&(Zt(j,h),xt(j,m),Dl(M)||Pl(j,r,x,he))}),Cn(M,[j,he])},onEnterCancelled(j){C(j,!1,void 0,!0),Cn(H,[j])},onAppearCancelled(j){C(j,!0,void 0,!0),Cn(T,[j])},onLeaveCancelled(j){S(j),Cn(b,[j])}})}function Rv(e){if(e==null)return null;if(Ce(e))return[Hi(e.enter),Hi(e.leave)];{const t=Hi(e);return[t,t]}}function Hi(e){return Zc(e)}function xt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[pr]||(e[pr]=new Set)).add(t)}function Zt(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[pr];n&&(n.delete(t),n.size||(e[pr]=void 0))}function Ll(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Iv=0;function Pl(e,t,n,r){const s=e._endId=++Iv,o=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:a,timeout:l,propCount:c}=Tf(e,t);if(!a)return r();const d=a+"end";let f=0;const h=()=>{e.removeEventListener(d,p),o()},p=m=>{m.target===e&&++f>=c&&h()};setTimeout(()=>{f(n[O]||"").split(", "),s=r(`${Qt}Delay`),o=r(`${Qt}Duration`),a=$l(s,o),l=r(`${Nr}Delay`),c=r(`${Nr}Duration`),d=$l(l,c);let f=null,h=0,p=0;t===Qt?a>0&&(f=Qt,h=a,p=o.length):t===Nr?d>0&&(f=Nr,h=d,p=c.length):(h=Math.max(a,d),f=h>0?a>d?Qt:Nr:null,p=f?f===Qt?o.length:c.length:0);const m=f===Qt&&/\b(?:transform|all)(?:,|$)/.test(r(`${Qt}Property`).toString());return{type:f,timeout:h,propCount:p,hasTransform:m}}function $l(e,t){for(;e.lengthMl(n)+Ml(e[r])))}function Ml(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function _o(e){return(e?e.ownerDocument:document).body.offsetHeight}function Dv(e,t,n){const r=e[pr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ws=Symbol("_vod"),Cf=Symbol("_vsh"),Db={name:"show",beforeMount(e,{value:t},{transition:n}){e[Ws]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):xr(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),xr(e,!0),r.enter(e)):r.leave(e,()=>{xr(e,!1)}):xr(e,t))},beforeUnmount(e,{value:t}){xr(e,t)}};function xr(e,t){e.style.display=t?e[Ws]:"none",e[Cf]=!t}const Sf=Symbol("");function Lb(e){const t=hn();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>Ks(o,s))},r=()=>{const s=e(t.proxy);t.ce?Ks(t.ce,s):vo(t.subTree,s),n(s)};Ku(()=>{ks(r)}),Jo(()=>{In(r,At,{flush:"post"});const s=new MutationObserver(r);s.observe(t.subTree.el.parentNode,{childList:!0}),li(()=>s.disconnect())})}function vo(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{vo(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Ks(e.el,t);else if(e.type===Xe)e.children.forEach(n=>vo(n,t));else if(e.type===xs){let{el:n,anchor:r}=e;for(;n&&(Ks(n,t),n!==r);)n=n.nextSibling}}function Ks(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const s in t){const o=km(t[s]);n.setProperty(`--${s}`,o),r+=`--${s}: ${o};`}n[Sf]=r}}const Lv=/(?:^|;)\s*display\s*:/;function Pv(e,t,n){const r=e.style,s=Oe(n);let o=!1;if(n&&!s){if(t)if(Oe(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&Is(r,l,"")}else for(const a in t)n[a]==null&&Is(r,a,"");for(const a in n)a==="display"&&(o=!0),Is(r,a,n[a])}else if(s){if(t!==n){const a=r[Sf];a&&(n+=";"+a),r.cssText=n,o=Lv.test(n)}}else t&&e.removeAttribute("style");Ws in e&&(e[Ws]=o?r.display:"",e[Cf]&&(r.display="none"))}const kl=/\s*!important$/;function Is(e,t,n){if(le(n))n.forEach(r=>Is(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=$v(e,t);kl.test(n)?e.setProperty(dn(r),n.replace(kl,""),"important"):e[r]=n}}const Vl=["Webkit","Moz","ms"],Bi={};function $v(e,t){const n=Bi[t];if(n)return n;let r=mt(t);if(r!=="filter"&&r in e)return Bi[t]=r;r=Qs(r);for(let s=0;sji||(Fv.then(()=>ji=0),ji=Date.now());function Bv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;St(jv(r,n.value),t,5,[r])};return n.value=e,n.attached=Hv(),n}function jv(e,t){if(le(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Kl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Wv=(e,t,n,r,s,o)=>{const a=s==="svg";t==="class"?Dv(e,r,a):t==="style"?Pv(e,n,r):zs(t)?Vo(t)||kv(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Kv(e,t,r,a))?(Bl(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Hl(e,t,r,a,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Oe(r))?Bl(e,mt(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Hl(e,t,r,a))};function Kv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Kl(t)&&fe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Kl(t)&&Oe(n)?!1:t in e}const wf=new WeakMap,Of=new WeakMap,Us=Symbol("_moveCb"),Ul=Symbol("_enterCb"),Uv=e=>(delete e.props.mode,e),Gv=Uv({name:"TransitionGroup",props:$e({},bf,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=hn(),r=Mu();let s,o;return Uu(()=>{if(!s.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!Xv(s[0].el,n.vnode.el,a)){s=[];return}s.forEach(qv),s.forEach(Yv);const l=s.filter(zv);_o(n.vnode.el),l.forEach(c=>{const d=c.el,f=d.style;xt(d,a),f.transform=f.webkitTransform=f.transitionDuration="";const h=d[Us]=p=>{p&&p.target!==d||(!p||p.propertyName.endsWith("transform"))&&(d.removeEventListener("transitionend",h),d[Us]=null,Zt(d,a))};d.addEventListener("transitionend",h)}),s=[]}),()=>{const a=ve(e),l=Af(a);let c=a.tag||Xe;if(s=[],o)for(let d=0;d{l.split(/\s+/).forEach(c=>c&&r.classList.remove(c))}),n.split(/\s+/).forEach(l=>l&&r.classList.add(l)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:a}=Tf(r);return o.removeChild(r),a}const un=e=>{const t=e.props["onUpdate:modelValue"]||!1;return le(t)?n=>ws(t,n):t};function Qv(e){e.target.composing=!0}function Gl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const gt=Symbol("_assign");function ql(e,t,n){return t&&(e=e.trim()),n&&(e=Js(e)),e}const Yl={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[gt]=un(s);const o=r||s.props&&s.props.type==="number";Wt(e,t?"change":"input",a=>{a.target.composing||e[gt](ql(e.value,n,o))}),(n||o)&&Wt(e,"change",()=>{e.value=ql(e.value,n,o)}),t||(Wt(e,"compositionstart",Qv),Wt(e,"compositionend",Gl),Wt(e,"change",Gl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},a){if(e[gt]=un(a),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Js(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===c)||(e.value=c))}},Jv={deep:!0,created(e,t,n){e[gt]=un(n),Wt(e,"change",()=>{const r=e._modelValue,s=gr(e),o=e.checked,a=e[gt];if(le(r)){const l=jo(r,s),c=l!==-1;if(o&&!c)a(r.concat(s));else if(!o&&c){const d=[...r];d.splice(l,1),a(d)}}else if(Er(r)){const l=new Set(r);o?l.add(s):l.delete(s),a(l)}else a(Nf(e,o))})},mounted:zl,beforeUpdate(e,t,n){e[gt]=un(n),zl(e,t,n)}};function zl(e,{value:t,oldValue:n},r){e._modelValue=t;let s;if(le(t))s=jo(t,r.props.value)>-1;else if(Er(t))s=t.has(r.props.value);else{if(t===n)return;s=$n(t,Nf(e,!0))}e.checked!==s&&(e.checked=s)}const Zv={created(e,{value:t},n){e.checked=$n(t,n.props.value),e[gt]=un(n),Wt(e,"change",()=>{e[gt](gr(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[gt]=un(r),t!==n&&(e.checked=$n(t,r.props.value))}},eE={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=Er(t);Wt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?Js(gr(a)):gr(a));e[gt](e.multiple?s?new Set(o):o:o[0]),e._assigning=!0,oi(()=>{e._assigning=!1})}),e[gt]=un(r)},mounted(e,{value:t}){Xl(e,t)},beforeUpdate(e,t,n){e[gt]=un(n)},updated(e,{value:t}){e._assigning||Xl(e,t)}};function Xl(e,t){const n=e.multiple,r=le(t);if(!(n&&!r&&!Er(t))){for(let s=0,o=e.options.length;sString(d)===String(l)):a.selected=jo(t,l)>-1}else a.selected=t.has(l);else if($n(gr(a),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function gr(e){return"_value"in e?e._value:e.value}function Nf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const $b={created(e,t,n){Ts(e,t,n,null,"created")},mounted(e,t,n){Ts(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Ts(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Ts(e,t,n,r,"updated")}};function tE(e,t){switch(e){case"SELECT":return eE;case"TEXTAREA":return Yl;default:switch(t){case"checkbox":return Jv;case"radio":return Zv;default:return Yl}}}function Ts(e,t,n,r,s){const a=tE(e.tagName,n.props&&n.props.type)[s];a&&a(e,t,n,r)}const nE=["ctrl","shift","alt","meta"],rE={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>nE.some(n=>e[`${n}Key`]&&!t.includes(n))},Mb=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((s,...o)=>{for(let a=0;a{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(s=>{if(!("key"in s))return;const o=dn(s.key);if(t.some(a=>a===o||sE[a]===o))return e(s)}))},iE=$e({patchProp:Wv},Nv);let Ql;function oE(){return Ql||(Ql=K_(iE))}const aE=((...e)=>{const t=oE().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=cE(r);if(!s)return;const o=t._component;!fe(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const a=n(s,!1,lE(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function lE(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function cE(e){return Oe(e)?document.querySelector(e):e}let xf;const di=e=>xf=e,Rf=Symbol();function Eo(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Br;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Br||(Br={}));function uE(){const e=su(!0),t=e.run(()=>xn({}));let n=[],r=[];const s=ii({install(o){di(s),s._a=o,o.provide(Rf,s),o.config.globalProperties.$pinia=s,r.forEach(a=>n.push(a)),r=[]},use(o){return this._a?n.push(o):r.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const If=()=>{};function Jl(e,t,n,r=If){e.push(t);const s=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),r())};return!n&&iu()&&Vm(s),s}function zn(e,...t){e.slice().forEach(n=>{n(...t)})}const fE=e=>e(),Zl=Symbol(),Wi=Symbol();function yo(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];Eo(s)&&Eo(r)&&e.hasOwnProperty(n)&&!Re(r)&&!an(r)?e[n]=yo(s,r):e[n]=r}return e}const dE=Symbol();function hE(e){return!Eo(e)||!Object.prototype.hasOwnProperty.call(e,dE)}const{assign:en}=Object;function pE(e){return!!(Re(e)&&e.effect)}function gE(e,t,n,r){const{state:s,actions:o,getters:a}=t,l=n.state.value[e];let c;function d(){l||(n.state.value[e]=s?s():{});const f=o_(n.state.value[e]);return en(f,o,Object.keys(a||{}).reduce((h,p)=>(h[p]=ii(dt(()=>{di(n);const m=n._s.get(e);return a[p].call(m,m)})),h),{}))}return c=Df(e,d,t,n,r,!0),c}function Df(e,t,n={},r,s,o){let a;const l=en({actions:{}},n),c={deep:!0};let d,f,h=[],p=[],m;const O=r.state.value[e];!o&&!O&&(r.state.value[e]={}),xn({});let A;function x(T){let C;d=f=!1,typeof T=="function"?(T(r.state.value[e]),C={type:Br.patchFunction,storeId:e,events:m}):(yo(r.state.value[e],T),C={type:Br.patchObject,payload:T,storeId:e,events:m});const S=A=Symbol();oi().then(()=>{A===S&&(d=!0)}),f=!0,zn(h,C,r.state.value[e])}const P=o?function(){const{state:C}=n,S=C?C():{};this.$patch(U=>{en(U,S)})}:If;function V(){a.stop(),h=[],p=[],r._s.delete(e)}const H=(T,C="")=>{if(Zl in T)return T[Wi]=C,T;const S=function(){di(r);const U=Array.from(arguments),j=[],te=[];function he(I){j.push(I)}function Ee(I){te.push(I)}zn(p,{args:U,name:S[Wi],store:b,after:he,onError:Ee});let ie;try{ie=T.apply(this&&this.$id===e?this:b,U)}catch(I){throw zn(te,I),I}return ie instanceof Promise?ie.then(I=>(zn(j,I),I)).catch(I=>(zn(te,I),Promise.reject(I))):(zn(j,ie),ie)};return S[Zl]=!0,S[Wi]=C,S},M={_p:r,$id:e,$onAction:Jl.bind(null,p),$patch:x,$reset:P,$subscribe(T,C={}){const S=Jl(h,T,C.detached,()=>U()),U=a.run(()=>In(()=>r.state.value[e],j=>{(C.flush==="sync"?f:d)&&T({storeId:e,type:Br.direct,events:m},j)},en({},c,C)));return S},$dispose:V},b=Jr(M);r._s.set(e,b);const N=(r._a&&r._a.runWithContext||fE)(()=>r._e.run(()=>(a=su()).run(()=>t({action:H}))));for(const T in N){const C=N[T];if(Re(C)&&!pE(C)||an(C))o||(O&&hE(C)&&(Re(C)?C.value=O[T]:yo(C,O[T])),r.state.value[e][T]=C);else if(typeof C=="function"){const S=H(C,T);N[T]=S,l.actions[T]=C}}return en(b,N),en(ve(b),N),Object.defineProperty(b,"$state",{get:()=>r.state.value[e],set:T=>{x(C=>{en(C,T)})}}),r._p.forEach(T=>{en(b,a.run(()=>T({store:b,app:r._a,pinia:r,options:l})))}),O&&o&&n.hydrate&&n.hydrate(b.$state,O),d=!0,f=!0,b}function Lf(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function o(a,l){const c=k_();return a=a||(c?rt(Rf,null):null),a&&di(a),a=xf,a._s.has(e)||(s?Df(e,t,r,a):gE(e,r,a)),a._s.get(e)}return o.$id=e,o}const mE=""+new URL("../img/Logo-2-Rounded-512x512.png",import.meta.url).href;const Zn=typeof document<"u";function Pf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function _E(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Pf(e.default)}const Ae=Object.assign;function Ki(e,t){const n={};for(const r in t){const s=t[r];n[r]=wt(s)?s.map(e):e(s)}return n}const jr=()=>{},wt=Array.isArray;function ec(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const $f=/#/g,vE=/&/g,EE=/\//g,yE=/=/g,bE=/\?/g,Mf=/\+/g,AE=/%5B/g,TE=/%5D/g,kf=/%5E/g,CE=/%60/g,Vf=/%7B/g,SE=/%7C/g,Ff=/%7D/g,wE=/%20/g;function aa(e){return e==null?"":encodeURI(""+e).replace(SE,"|").replace(AE,"[").replace(TE,"]")}function OE(e){return aa(e).replace(Vf,"{").replace(Ff,"}").replace(kf,"^")}function bo(e){return aa(e).replace(Mf,"%2B").replace(wE,"+").replace($f,"%23").replace(vE,"%26").replace(CE,"`").replace(Vf,"{").replace(Ff,"}").replace(kf,"^")}function NE(e){return bo(e).replace(yE,"%3D")}function xE(e){return aa(e).replace($f,"%23").replace(bE,"%3F")}function RE(e){return xE(e).replace(EE,"%2F")}function zr(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const IE=/\/$/,DE=e=>e.replace(IE,"");function Ui(e,t,n="/"){let r,s={},o="",a="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(r=t.slice(0,c),o=t.slice(c,l>0?l:t.length),s=e(o.slice(1))),l>=0&&(r=r||t.slice(0,l),a=t.slice(l,t.length)),r=ME(r??t,n),{fullPath:r+o+a,path:r,query:s,hash:zr(a)}}function LE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function tc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function PE(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&mr(t.matched[r],n.matched[s])&&Hf(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function mr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Hf(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!$E(e[n],t[n]))return!1;return!0}function $E(e,t){return wt(e)?nc(e,t):wt(t)?nc(t,e):e===t}function nc(e,t){return wt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function ME(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,a,l;for(a=0;a1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(a).join("/")}const Jt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ao=(function(e){return e.pop="pop",e.push="push",e})({}),Gi=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function kE(e){if(!e)if(Zn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),DE(e)}const VE=/^[^#]+#/;function FE(e,t){return e.replace(VE,"#")+t}function HE(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const hi=()=>({left:window.scrollX,top:window.scrollY});function BE(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=HE(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function rc(e,t){return(history.state?history.state.position-t:-1)+e}const To=new Map;function jE(e,t){To.set(e,t)}function WE(e){const t=To.get(e);return To.delete(e),t}function KE(e){return typeof e=="string"||e&&typeof e=="object"}function Bf(e){return typeof e=="string"||typeof e=="symbol"}let xe=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const jf=Symbol("");xe.MATCHER_NOT_FOUND+"",xe.NAVIGATION_GUARD_REDIRECT+"",xe.NAVIGATION_ABORTED+"",xe.NAVIGATION_CANCELLED+"",xe.NAVIGATION_DUPLICATED+"";function _r(e,t){return Ae(new Error,{type:e,[jf]:!0},t)}function Vt(e,t){return e instanceof Error&&jf in e&&(t==null||!!(e.type&t))}const UE=["params","query","hash"];function GE(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of UE)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function qE(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;rs&&bo(s)):[r&&bo(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function YE(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=wt(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const Wf=Symbol(""),ic=Symbol(""),pi=Symbol(""),la=Symbol(""),Co=Symbol("");function Rr(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function zE(e,t,n){const r=()=>{e[t].delete(n)};li(r),ju(r),Bu(()=>{e[t].add(n)}),e[t].add(n)}function Vb(e){const t=rt(Wf,{}).value;t&&zE(t,"updateGuards",e)}function rn(e,t,n,r,s,o=a=>a()){const a=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((l,c)=>{const d=p=>{p===!1?c(_r(xe.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?c(p):KE(p)?c(_r(xe.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(a&&r.enterCallbacks[s]===a&&typeof p=="function"&&a.push(p),l())},f=o(()=>e.call(r&&r.instances[s],t,n,d));let h=Promise.resolve(f);e.length<3&&(h=h.then(d)),h.catch(p=>c(p))})}function qi(e,t,n,r,s=o=>o()){const o=[];for(const a of e)for(const l in a.components){let c=a.components[l];if(!(t!=="beforeRouteEnter"&&!a.instances[l]))if(Pf(c)){const d=(c.__vccOpts||c)[t];d&&o.push(rn(d,n,r,a,l,s))}else{let d=c();o.push(()=>d.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${l}" at "${a.path}"`);const h=_E(f)?f.default:f;a.mods[l]=f,a.components[l]=h;const p=(h.__vccOpts||h)[t];return p&&rn(p,n,r,a,l,s)()}))}}return o}function XE(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;amr(d,l))?r.push(l):n.push(l));const c=e.matched[a];c&&(t.matched.find(d=>mr(d,c))||s.push(c))}return[n,r,s]}let QE=()=>location.protocol+"//"+location.host;function Kf(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let a=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),tc(l,"")}return tc(n,e)+r+s}function JE(e,t,n,r){let s=[],o=[],a=null;const l=({state:p})=>{const m=Kf(e,location),O=n.value,A=t.value;let x=0;if(p){if(n.value=m,t.value=p,a&&a===O){a=null;return}x=A?p.position-A.position:0}else r(m);s.forEach(P=>{P(n.value,O,{delta:x,type:Ao.pop,direction:x?x>0?Gi.forward:Gi.back:Gi.unknown})})};function c(){a=n.value}function d(p){s.push(p);const m=()=>{const O=s.indexOf(p);O>-1&&s.splice(O,1)};return o.push(m),m}function f(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(Ae({},p.state,{scroll:hi()}),"")}}function h(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",f),document.removeEventListener("visibilitychange",f)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",f),document.addEventListener("visibilitychange",f),{pauseListeners:c,listen:d,destroy:h}}function oc(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?hi():null}}function ZE(e){const{history:t,location:n}=window,r={value:Kf(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,d,f){const h=e.indexOf("#"),p=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+c:QE()+e+c;try{t[f?"replaceState":"pushState"](d,"",p),s.value=d}catch(m){console.error(m),n[f?"replace":"assign"](p)}}function a(c,d){o(c,Ae({},t.state,oc(s.value.back,c,s.value.forward,!0),d,{position:s.value.position}),!0),r.value=c}function l(c,d){const f=Ae({},s.value,t.state,{forward:c,scroll:hi()});o(f.current,f,!0),o(c,Ae({},oc(r.value,c,null),{position:f.position+1},d),!1),r.value=c}return{location:r,state:s,push:l,replace:a}}function ey(e){e=kE(e);const t=ZE(e),n=JE(e,t.state,t.location,t.replace);function r(o,a=!0){a||n.pauseListeners(),history.go(o)}const s=Ae({location:"",base:e,go:r,createHref:FE.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function ty(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),ey(e)}let wn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Pe=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Pe||{});const ny={type:wn.Static,value:""},ry=/[a-zA-Z0-9_]/;function sy(e){if(!e)return[[]];if(e==="/")return[[ny]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${d}": ${m}`)}let n=Pe.Static,r=n;const s=[];let o;function a(){o&&s.push(o),o=[]}let l=0,c,d="",f="";function h(){d&&(n===Pe.Static?o.push({type:wn.Static,value:d}):n===Pe.Param||n===Pe.ParamRegExp||n===Pe.ParamRegExpEnd?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),o.push({type:wn.Param,value:d,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),d="")}function p(){d+=c}for(;lt.length?t.length===1&&t[0]===Ye.Static+Ye.Segment?1:-1:0}function Uf(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const cy={strict:!1,end:!0,sensitive:!1};function uy(e,t,n){const r=ay(sy(e.path),n),s=Ae(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function fy(e,t){const n=[],r=new Map;t=ec(cy,t);function s(h){return r.get(h)}function o(h,p,m){const O=!m,A=uc(h);A.aliasOf=m&&m.record;const x=ec(t,h),P=[A];if("alias"in h){const M=typeof h.alias=="string"?[h.alias]:h.alias;for(const b of M)P.push(uc(Ae({},A,{components:m?m.record.components:A.components,path:b,aliasOf:m?m.record:A})))}let V,H;for(const M of P){const{path:b}=M;if(p&&b[0]!=="/"){const y=p.record.path,N=y[y.length-1]==="/"?"":"/";M.path=p.record.path+(b&&N+b)}if(V=uy(M,p,x),m?m.alias.push(V):(H=H||V,H!==V&&H.alias.push(V),O&&h.name&&!fc(V)&&a(h.name)),Gf(V)&&c(V),A.children){const y=A.children;for(let N=0;N{a(H)}:jr}function a(h){if(Bf(h)){const p=r.get(h);p&&(r.delete(h),n.splice(n.indexOf(p),1),p.children.forEach(a),p.alias.forEach(a))}else{const p=n.indexOf(h);p>-1&&(n.splice(p,1),h.record.name&&r.delete(h.record.name),h.children.forEach(a),h.alias.forEach(a))}}function l(){return n}function c(h){const p=py(h,n);n.splice(p,0,h),h.record.name&&!fc(h)&&r.set(h.record.name,h)}function d(h,p){let m,O={},A,x;if("name"in h&&h.name){if(m=r.get(h.name),!m)throw _r(xe.MATCHER_NOT_FOUND,{location:h});x=m.record.name,O=Ae(cc(p.params,m.keys.filter(H=>!H.optional).concat(m.parent?m.parent.keys.filter(H=>H.optional):[]).map(H=>H.name)),h.params&&cc(h.params,m.keys.map(H=>H.name))),A=m.stringify(O)}else if(h.path!=null)A=h.path,m=n.find(H=>H.re.test(A)),m&&(O=m.parse(A),x=m.record.name);else{if(m=p.name?r.get(p.name):n.find(H=>H.re.test(p.path)),!m)throw _r(xe.MATCHER_NOT_FOUND,{location:h,currentLocation:p});x=m.record.name,O=Ae({},p.params,h.params),A=m.stringify(O)}const P=[];let V=m;for(;V;)P.unshift(V.record),V=V.parent;return{name:x,path:A,params:O,matched:P,meta:hy(P)}}e.forEach(h=>o(h));function f(){n.length=0,r.clear()}return{addRoute:o,resolve:d,removeRoute:a,clearRoutes:f,getRoutes:l,getRecordMatcher:s}}function cc(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function uc(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:dy(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function dy(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function fc(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hy(e){return e.reduce((t,n)=>Ae(t,n.meta),{})}function py(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;Uf(e,t[o])<0?r=o:n=o+1}const s=gy(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function gy(e){let t=e;for(;t=t.parent;)if(Gf(t)&&Uf(e,t)===0)return t}function Gf({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function dc(e){const t=rt(pi),n=rt(la),r=dt(()=>{const c=nt(e.to);return t.resolve(c)}),s=dt(()=>{const{matched:c}=r.value,{length:d}=c,f=c[d-1],h=n.matched;if(!f||!h.length)return-1;const p=h.findIndex(mr.bind(null,f));if(p>-1)return p;const m=hc(c[d-2]);return d>1&&hc(f)===m&&h[h.length-1].path!==m?h.findIndex(mr.bind(null,c[d-2])):p}),o=dt(()=>s.value>-1&&yy(n.params,r.value.params)),a=dt(()=>s.value>-1&&s.value===n.matched.length-1&&Hf(n.params,r.value.params));function l(c={}){if(Ey(c)){const d=t[nt(e.replace)?"replace":"push"](nt(e.to)).catch(jr);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:r,href:dt(()=>r.value.href),isActive:o,isExactActive:a,navigate:l}}function my(e){return e.length===1?e[0]:e}const _y=Xo({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:dc,setup(e,{slots:t}){const n=Jr(dc(e)),{options:r}=rt(pi),s=dt(()=>({[pc(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[pc(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&my(t.default(n));return e.custom?o:oa("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),vy=_y;function Ey(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function yy(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!wt(s)||s.length!==r.length||r.some((o,a)=>o!==s[a]))return!1}return!0}function hc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const pc=(e,t,n)=>e??t??n,by=Xo({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=rt(Co),s=dt(()=>e.route||r.value),o=rt(ic,0),a=dt(()=>{let d=nt(o);const{matched:f}=s.value;let h;for(;(h=f[d])&&!h.components;)d++;return d}),l=dt(()=>s.value.matched[a.value]);Ns(ic,dt(()=>a.value+1)),Ns(Wf,l),Ns(Co,s);const c=xn();return In(()=>[c.value,l.value,e.name],([d,f,h],[p,m,O])=>{f&&(f.instances[h]=d,m&&m!==f&&d&&d===p&&(f.leaveGuards.size||(f.leaveGuards=m.leaveGuards),f.updateGuards.size||(f.updateGuards=m.updateGuards))),d&&f&&(!m||!mr(f,m)||!p)&&(f.enterCallbacks[h]||[]).forEach(A=>A(d))},{flush:"post"}),()=>{const d=s.value,f=e.name,h=l.value,p=h&&h.components[f];if(!p)return gc(n.default,{Component:p,route:d});const m=h.props[f],O=m?m===!0?d.params:typeof m=="function"?m(d):m:null,x=oa(p,Ae({},O,t,{onVnodeUnmounted:P=>{P.component.isUnmounted&&(h.instances[f]=null)},ref:c}));return gc(n.default,{Component:x,route:d})||x}}});function gc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const qf=by;function Ay(e){const t=fy(e.routes,e),n=e.parseQuery||qE,r=e.stringifyQuery||sc,s=e.history,o=Rr(),a=Rr(),l=Rr(),c=Tu(Jt);let d=Jt;Zn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Ki.bind(null,L=>""+L),h=Ki.bind(null,RE),p=Ki.bind(null,zr);function m(L,Q){let Z,oe;return Bf(L)?(Z=t.getRecordMatcher(L),oe=Q):oe=L,t.addRoute(oe,Z)}function O(L){const Q=t.getRecordMatcher(L);Q&&t.removeRoute(Q)}function A(){return t.getRoutes().map(L=>L.record)}function x(L){return!!t.getRecordMatcher(L)}function P(L,Q){if(Q=Ae({},Q||c.value),typeof L=="string"){const w=Ui(n,L,Q.path),$=t.resolve({path:w.path},Q),B=s.createHref(w.fullPath);return Ae(w,$,{params:p($.params),hash:zr(w.hash),redirectedFrom:void 0,href:B})}let Z;if(L.path!=null)Z=Ae({},L,{path:Ui(n,L.path,Q.path).path});else{const w=Ae({},L.params);for(const $ in w)w[$]==null&&delete w[$];Z=Ae({},L,{params:h(w)}),Q.params=h(Q.params)}const oe=t.resolve(Z,Q),D=L.hash||"";oe.params=f(p(oe.params));const g=LE(r,Ae({},L,{hash:OE(D),path:oe.path})),E=s.createHref(g);return Ae({fullPath:g,hash:D,query:r===sc?YE(L.query):L.query||{}},oe,{redirectedFrom:void 0,href:E})}function V(L){return typeof L=="string"?Ui(n,L,c.value.path):Ae({},L)}function H(L,Q){if(d!==L)return _r(xe.NAVIGATION_CANCELLED,{from:Q,to:L})}function M(L){return N(L)}function b(L){return M(Ae(V(L),{replace:!0}))}function y(L,Q){const Z=L.matched[L.matched.length-1];if(Z&&Z.redirect){const{redirect:oe}=Z;let D=typeof oe=="function"?oe(L,Q):oe;return typeof D=="string"&&(D=D.includes("?")||D.includes("#")?D=V(D):{path:D},D.params={}),Ae({query:L.query,hash:L.hash,params:D.path!=null?{}:L.params},D)}}function N(L,Q){const Z=d=P(L),oe=c.value,D=L.state,g=L.force,E=L.replace===!0,w=y(Z,oe);if(w)return N(Ae(V(w),{state:typeof w=="object"?Ae({},D,w.state):D,force:g,replace:E}),Q||Z);const $=Z;$.redirectedFrom=Q;let B;return!g&&PE(r,oe,Z)&&(B=_r(xe.NAVIGATION_DUPLICATED,{to:$,from:oe}),re(oe,oe,!0,!1)),(B?Promise.resolve(B):S($,oe)).catch(F=>Vt(F)?Vt(F,xe.NAVIGATION_GUARD_REDIRECT)?F:X(F):K(F,$,oe)).then(F=>{if(F){if(Vt(F,xe.NAVIGATION_GUARD_REDIRECT))return N(Ae({replace:E},V(F.to),{state:typeof F.to=="object"?Ae({},D,F.to.state):D,force:g}),Q||$)}else F=j($,oe,!0,E,D);return U($,oe,F),F})}function T(L,Q){const Z=H(L,Q);return Z?Promise.reject(Z):Promise.resolve()}function C(L){const Q=de.values().next().value;return Q&&typeof Q.runWithContext=="function"?Q.runWithContext(L):L()}function S(L,Q){let Z;const[oe,D,g]=XE(L,Q);Z=qi(oe.reverse(),"beforeRouteLeave",L,Q);for(const w of oe)w.leaveGuards.forEach($=>{Z.push(rn($,L,Q))});const E=T.bind(null,L,Q);return Z.push(E),ye(Z).then(()=>{Z=[];for(const w of o.list())Z.push(rn(w,L,Q));return Z.push(E),ye(Z)}).then(()=>{Z=qi(D,"beforeRouteUpdate",L,Q);for(const w of D)w.updateGuards.forEach($=>{Z.push(rn($,L,Q))});return Z.push(E),ye(Z)}).then(()=>{Z=[];for(const w of g)if(w.beforeEnter)if(wt(w.beforeEnter))for(const $ of w.beforeEnter)Z.push(rn($,L,Q));else Z.push(rn(w.beforeEnter,L,Q));return Z.push(E),ye(Z)}).then(()=>(L.matched.forEach(w=>w.enterCallbacks={}),Z=qi(g,"beforeRouteEnter",L,Q,C),Z.push(E),ye(Z))).then(()=>{Z=[];for(const w of a.list())Z.push(rn(w,L,Q));return Z.push(E),ye(Z)}).catch(w=>Vt(w,xe.NAVIGATION_CANCELLED)?w:Promise.reject(w))}function U(L,Q,Z){l.list().forEach(oe=>C(()=>oe(L,Q,Z)))}function j(L,Q,Z,oe,D){const g=H(L,Q);if(g)return g;const E=Q===Jt,w=Zn?history.state:{};Z&&(oe||E?s.replace(L.fullPath,Ae({scroll:E&&w&&w.scroll},D)):s.push(L.fullPath,D)),c.value=L,re(L,Q,Z,E),X()}let te;function he(){te||(te=s.listen((L,Q,Z)=>{if(!me.listening)return;const oe=P(L),D=y(oe,me.currentRoute.value);if(D){N(Ae(D,{replace:!0,force:!0}),oe).catch(jr);return}d=oe;const g=c.value;Zn&&jE(rc(g.fullPath,Z.delta),hi()),S(oe,g).catch(E=>Vt(E,xe.NAVIGATION_ABORTED|xe.NAVIGATION_CANCELLED)?E:Vt(E,xe.NAVIGATION_GUARD_REDIRECT)?(N(Ae(V(E.to),{force:!0}),oe).then(w=>{Vt(w,xe.NAVIGATION_ABORTED|xe.NAVIGATION_DUPLICATED)&&!Z.delta&&Z.type===Ao.pop&&s.go(-1,!1)}).catch(jr),Promise.reject()):(Z.delta&&s.go(-Z.delta,!1),K(E,oe,g))).then(E=>{E=E||j(oe,g,!1),E&&(Z.delta&&!Vt(E,xe.NAVIGATION_CANCELLED)?s.go(-Z.delta,!1):Z.type===Ao.pop&&Vt(E,xe.NAVIGATION_ABORTED|xe.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),U(oe,g,E)}).catch(jr)}))}let Ee=Rr(),ie=Rr(),I;function K(L,Q,Z){X(L);const oe=ie.list();return oe.length?oe.forEach(D=>D(L,Q,Z)):console.error(L),Promise.reject(L)}function G(){return I&&c.value!==Jt?Promise.resolve():new Promise((L,Q)=>{Ee.add([L,Q])})}function X(L){return I||(I=!L,he(),Ee.list().forEach(([Q,Z])=>L?Z(L):Q()),Ee.reset()),L}function re(L,Q,Z,oe){const{scrollBehavior:D}=e;if(!Zn||!D)return Promise.resolve();const g=!Z&&WE(rc(L.fullPath,0))||(oe||!Z)&&history.state&&history.state.scroll||null;return oi().then(()=>D(L,Q,g)).then(E=>E&&BE(E)).catch(E=>K(E,L,Q))}const ne=L=>s.go(L);let se;const de=new Set,me={currentRoute:c,listening:!0,addRoute:m,removeRoute:O,clearRoutes:t.clearRoutes,hasRoute:x,getRoutes:A,resolve:P,options:e,push:M,replace:b,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:o.add,beforeResolve:a.add,afterEach:l.add,onError:ie.add,isReady:G,install(L){L.component("RouterLink",vy),L.component("RouterView",qf),L.config.globalProperties.$router=me,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>nt(c)}),Zn&&!se&&c.value===Jt&&(se=!0,M(s.location).catch(oe=>{}));const Q={};for(const oe in Jt)Object.defineProperty(Q,oe,{get:()=>c.value[oe],enumerable:!0});L.provide(pi,me),L.provide(la,Au(Q)),L.provide(Co,c);const Z=L.unmount;de.add(L),L.unmount=function(){de.delete(L),de.size<1&&(d=Jt,te&&te(),te=null,c.value=Jt,se=!1,I=!1),Z()}}};function ye(L){return L.reduce((Q,Z)=>Q.then(()=>C(Z)),Promise.resolve())}return me}function Fb(){return rt(pi)}function Ty(e){return rt(la)}const Cy="modulepreload",Sy=function(e,t){return new URL(e,t).href},mc={},De=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let d=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const a=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");s=d(n.map(f=>{if(f=Sy(f,r),f in mc)return;mc[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(r)for(let O=a.length-1;O>=0;O--){const A=a[O];if(A.href===f&&(!h||A.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${p}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":Cy,h||(m.as="script"),m.crossOrigin="",m.href=f,c&&m.setAttribute("nonce",c),document.head.appendChild(m),h)return new Promise((O,A)=>{m.addEventListener("load",O),m.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return s.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},_c="[a-fA-F\\d:]",sn=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${_c})|(?<=${_c})(?=\\s|$))`:"",yt="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",Le="[a-fA-F\\d]{1,4}",gi=`
(?:
(?:${Le}:){7}(?:${Le}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
@@ -11,4 +11,4 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DTUDBDs4.js","
(?::(?:(?::${Le}){0,5}:${yt}|(?::${Le}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),wy=new RegExp(`(?:^${yt}$)|(?:^${gi}$)`),Oy=new RegExp(`^${yt}$`),Ny=new RegExp(`^${gi}$`),mi=e=>e&&e.exact?wy:new RegExp(`(?:${sn(e)}${yt}${sn(e)})|(?:${sn(e)}${gi}${sn(e)})`,"g");mi.v4=e=>e&&e.exact?Oy:new RegExp(`${sn(e)}${yt}${sn(e)}`,"g");mi.v6=e=>e&&e.exact?Ny:new RegExp(`${sn(e)}${gi}${sn(e)}`,"g");const Yf={exact:!1},zf=`${mi.v4().source}\\/(3[0-2]|[12]?[0-9])`,Xf=`${mi.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,xy=new RegExp(`^${zf}$`),Ry=new RegExp(`^${Xf}$`),Iy=({exact:e}=Yf)=>e?xy:new RegExp(zf,"g"),Dy=({exact:e}=Yf)=>e?Ry:new RegExp(Xf,"g"),Qf=Iy({exact:!0}),Jf=Dy({exact:!0}),ca=e=>Qf.test(e)?4:Jf.test(e)?6:0;ca.v4=e=>Qf.test(e);ca.v6=e=>Jf.test(e);const tt=e=>{const t=Vn();if(t.Locale===null)return e;const r=Object.keys(t.Locale).filter(s=>e.match(new RegExp("^"+s+"$","gi"))!==null);return r.length===0||r.length>1||t.Locale[r[0]].length===0?e:e.replace(new RegExp(r[0],"gi"),t.Locale[r[0]])};var Yi={},zi,vc;function Ly(){return vc||(vc=1,zi={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),zi}var Xi,Ec;function Py(){if(Ec)return Xi;Ec=1;var e={px:{px:1,cm:96/2.54,mm:96/25.4,in:96,pt:96/72,pc:16},cm:{px:2.54/96,cm:1,mm:.1,in:2.54,pt:2.54/72,pc:2.54/6},mm:{px:25.4/96,cm:10,mm:1,in:25.4,pt:25.4/72,pc:25.4/6},in:{px:1/96,cm:1/2.54,mm:1/25.4,in:1,pt:1/72,pc:1/6},pt:{px:.75,cm:72/2.54,mm:72/25.4,in:72,pt:1,pc:12},pc:{px:6/96,cm:6/2.54,mm:6/25.4,in:6,pt:6/72,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:400/360,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:Math.PI*2},turn:{deg:1/360,grad:1/400,rad:.5/Math.PI,turn:1},s:{s:1,ms:1/1e3},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:1/1e3,kHz:1},dpi:{dpi:1,dpcm:1/2.54,dppx:1/96},dpcm:{dpi:2.54,dpcm:1,dppx:2.54/96},dppx:{dpi:96,dpcm:96/2.54,dppx:1}};return Xi=function(t,n,r,s){if(!e.hasOwnProperty(r))throw new Error("Cannot convert to "+r);if(!e[r].hasOwnProperty(n))throw new Error("Cannot convert from "+n+" to "+r);var o=e[r][n]*t;return s!==!1?(s=Math.pow(10,parseInt(s)||5),Math.round(o*s)/s):o},Xi}var yc;function $y(){return yc||(yc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromRgba=T,e.fromRgb=C,e.fromHsla=S,e.fromHsl=U,e.fromString=Ee,e.default=void 0;var t=r(Ly()),n=r(Py());function r(I){return I&&I.__esModule?I:{default:I}}function s(I,K){if(!(I instanceof K))throw new TypeError("Cannot call a class as a function")}function o(I,K){for(var G=0;GI.length)&&(K=I.length);for(var G=0,X=new Array(K);G"u"||!(Symbol.iterator in Object(I)))){var G=[],X=!0,re=!1,ne=void 0;try{for(var se=I[Symbol.iterator](),de;!(X=(de=se.next()).done)&&(G.push(de.value),!(K&&G.length===K));X=!0);}catch(me){re=!0,ne=me}finally{try{!X&&se.return!=null&&se.return()}finally{if(re)throw ne}}return G}}function p(I){if(Array.isArray(I))return I}var m=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?$/,O=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])?$/,A=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,x=/^rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,P=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,V=/^rgba?\(\s*(\d+%)\s+(\d+%)\s+(\d+%)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,H=/^hsla?\(\s*(\d+)(deg|rad|grad|turn)?\s*,\s*(\d+)%\s*,\s*(\d+)%(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/;function M(I,K){return I.indexOf(K)>-1}function b(I,K,G){var X=I/255,re=K/255,ne=G/255,se=Math.max(X,re,ne),de=Math.min(X,re,ne),me=se-de,ye=(se+de)/2;if(me===0)return[0,0,ye*100];var L=me/(1-Math.abs(2*ye-1)),Q=(function(){switch(se){case X:return(re-ne)/me%6;case re:return(ne-X)/me+2;default:return(X-re)/me+4}})();return[Q*60,L*100,ye*100]}function y(I,K,G){var X=I/60,re=K/100,ne=G/100,se=(1-Math.abs(2*ne-1))*re,de=se*(1-Math.abs(X%2-1)),me=ne-se/2,ye=(function(){return X<1?[se,de,0]:X<2?[de,se,0]:X<3?[0,se,de]:X<4?[0,de,se]:X<5?[de,0,se]:[se,0,de]})(),L=l(ye,3),Q=L[0],Z=L[1],oe=L[2];return[(Q+me)*255,(Z+me)*255,(oe+me)*255]}var N=(function(){function I(K){var G=l(K,4),X=G[0],re=G[1],ne=G[2],se=G[3];s(this,I),this.values=[Math.max(Math.min(parseInt(X,10),255),0),Math.max(Math.min(parseInt(re,10),255),0),Math.max(Math.min(parseInt(ne,10),255),0),se==null?1:Math.max(Math.min(parseFloat(se),255),0)]}return a(I,[{key:"toRgbString",value:function(){var G=l(this.values,4),X=G[0],re=G[1],ne=G[2],se=G[3];return se===1?"rgb(".concat(X,", ").concat(re,", ").concat(ne,")"):"rgba(".concat(X,", ").concat(re,", ").concat(ne,", ").concat(se,")")}},{key:"toHslString",value:function(){var G=this.toHslaArray(),X=l(G,4),re=X[0],ne=X[1],se=X[2],de=X[3];return de===1?"hsl(".concat(re,", ").concat(ne,"%, ").concat(se,"%)"):"hsla(".concat(re,", ").concat(ne,"%, ").concat(se,"%, ").concat(de,")")}},{key:"toHexString",value:function(){var G=l(this.values,4),X=G[0],re=G[1],ne=G[2],se=G[3];return X=Number(X).toString(16).padStart(2,"0"),re=Number(re).toString(16).padStart(2,"0"),ne=Number(ne).toString(16).padStart(2,"0"),se=se<1?parseInt(se*255,10).toString(16).padStart(2,"0"):"","#".concat(X).concat(re).concat(ne).concat(se)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var G=l(this.values,4),X=G[0],re=G[1],ne=G[2],se=G[3],de=b(X,re,ne),me=l(de,3),ye=me[0],L=me[1],Q=me[2];return[ye,L,Q,se]}}]),I})();function T(I){var K=l(I,4),G=K[0],X=K[1],re=K[2],ne=K[3];return new N([G,X,re,ne])}function C(I){var K=l(I,3),G=K[0],X=K[1],re=K[2];return T([G,X,re,1])}function S(I){var K=l(I,4),G=K[0],X=K[1],re=K[2],ne=K[3],se=y(G,X,re),de=l(se,3),me=de[0],ye=de[1],L=de[2];return T([me,ye,L,ne])}function U(I){var K=l(I,3),G=K[0],X=K[1],re=K[2];return S([G,X,re,1])}function j(I){var K=m.exec(I)||O.exec(I),G=l(K,5),X=G[1],re=G[2],ne=G[3],se=G[4];return X=parseInt(X.length<2?X.repeat(2):X,16),re=parseInt(re.length<2?re.repeat(2):re,16),ne=parseInt(ne.length<2?ne.repeat(2):ne,16),se=se&&(parseInt(se.length<2?se.repeat(2):se,16)/255).toPrecision(1)||1,T([X,re,ne,se])}function te(I){var K=A.exec(I)||P.exec(I)||x.exec(I)||V.exec(I),G=l(K,5),X=G[1],re=G[2],ne=G[3],se=G[4];return X=M(X,"%")?parseInt(X,10)*255/100:parseInt(X,10),re=M(re,"%")?parseInt(re,10)*255/100:parseInt(re,10),ne=M(ne,"%")>0?parseInt(ne,10)*255/100:parseInt(ne,10),se=se===void 0?1:parseFloat(se)/(M(se,"%")?100:1),T([X,re,ne,se])}function he(I){var K=H.exec(I),G=l(K,6),X=G[1],re=G[2],ne=G[3],se=G[4],de=G[5];return re=re||"deg",X=(0,n.default)(parseFloat(X),re,"deg"),ne=parseFloat(ne),se=parseFloat(se),de=de===void 0?1:parseFloat(de)/(M(de,"%")?100:1),S([X,ne,se,de])}function Ee(I){return t.default[I]?C(t.default[I]):m.test(I)||O.test(I)?j(I):A.test(I)||P.test(I)||x.test(I)||V.test(I)?te(I):H.test(I)?he(I):null}var ie={fromString:Ee,fromRgb:C,fromRgba:T,fromHsl:U,fromHsla:S};e.default=ie})(Yi)),Yi}var My=$y();const ky=Lf("WireguardConfigurationsStore",{state:()=>({Configurations:[],ConfigurationLoaded:!1,searchString:"",ConfigurationListInterval:void 0,Filter:{HiddenTags:[],ShowAllPeersWhenHiddenTags:!0},SortOptions:{Name:tt("Name"),Status:tt("Status"),"DataUsage.Total":tt("Total Usage")},CurrentSort:{key:"Name",order:"asc"},CurrentDisplay:"List",PeerScheduleJobs:{dropdowns:{Field:[{display:tt("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:tt("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:tt("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:tt("Date"),value:"date",type:"date"}],Operator:[{display:tt("larger than"),value:"lgt"}],Action:[{display:tt("Restrict Peer"),value:"restrict"},{display:tt("Delete Peer"),value:"delete"},{display:tt("Reset Total Data Usage"),value:"reset_total_data_usage"}]}}}),getters:{sortConfigurations(){return[...this.Configurations].sort((e,t)=>this.CurrentSort.order==="desc"?this.dotNotation(e,this.CurrentSort.key)this.dotNotation(t,this.CurrentSort.key)?-1:0:this.dotNotation(e,this.CurrentSort.key)>this.dotNotation(t,this.CurrentSort.key)?1:this.dotNotation(e,this.CurrentSort.key){e.status&&(this.Configurations=e.data),this.ConfigurationLoaded=!0})},colorText(e){if(e){const t=My.fromString(e);if(t){const n=t.toRgbaArray();return+((n[0]*299+n[1]*587+n[2]*114)/255e3).toFixed(2)>.5?"#000":"#fff"}}return"#ffffff"},dotNotation(e,t){let n=t.split(".").reduce((r,s)=>r&&r[s],e);return typeof n=="string"?n.toLowerCase():n},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 ca(e)!==0},checkWGKeyLength(e){return/^[A-Za-z0-9+/]{43}=?=?$/.test(e)}},persist:{pick:["CurrentSort","CurrentDisplay","Filter.ShowAllPeersWhenHiddenTags"]}}),Vy=async()=>{let e=!1;return await Dn("/api/validateAuthentication",{},t=>{e=t.status}),e},br=Ay({history:ty(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:()=>De(()=>import("./index-DTUDBDs4.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:()=>De(()=>import("./configurationList-CUENhDPY.js"),__vite__mapDeps([6,1,7,8,9,10]),import.meta.url),meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"settings",component:()=>De(()=>import("./settings-vndraK73.js"),__vite__mapDeps([11,12,1,13,3,14,15,16,17,18]),import.meta.url),children:[{name:"WGDashboard Settings",path:"",component:()=>De(()=>import("./wgdashboardSettings-DTVWzunC.js"),__vite__mapDeps([19,1,13,3,14,15,16]),import.meta.url),meta:{title:"WGDashboard Settings"}},{name:"Peers Settings",path:"peers_settings",component:()=>De(()=>import("./peerDefaultSettings-Cow-IZva.js"),__vite__mapDeps([20,1,12]),import.meta.url),meta:{title:"Peers Default Settings"}},{name:"WireGuard Configuration Settings",path:"wireguard_settings",component:()=>De(()=>import("./wireguardConfigurationSettings-D_J1N3Sp.js"),__vite__mapDeps([21,17,1,18]),import.meta.url),meta:{title:"WireGuard Configuration Settings"}}],meta:{title:"Settings"}},{path:"ping",name:"Ping",component:()=>De(()=>import("./ping-B37IwnRr.js"),__vite__mapDeps([22,1,23,24,25,26,27]),import.meta.url)},{path:"traceroute",name:"Traceroute",component:()=>De(()=>import("./traceroute-BvAiVgpx.js"),__vite__mapDeps([28,23,24,25,26,1,29]),import.meta.url)},{name:"New Configuration",path:"new_configuration",component:()=>De(()=>import("./newConfiguration-KTw7FLm0.js"),__vite__mapDeps([30,31,1,32,33]),import.meta.url),meta:{title:"New Configuration"}},{name:"Restore Configuration",path:"restore_configuration",component:()=>De(()=>import("./restoreConfiguration-DJxoesHW.js"),__vite__mapDeps([34,1,3,7,31,35]),import.meta.url),meta:{title:"Restore Configuration"}},{name:"System Status",path:"system_status",component:()=>De(()=>import("./systemStatus-BA9IeSOh.js"),__vite__mapDeps([36,1,8,9,37,3,38]),import.meta.url),meta:{title:"System Status"}},{name:"Clients",path:"clients",component:()=>De(()=>import("./clients-BK_guIYX.js"),__vite__mapDeps([39,40,1,41]),import.meta.url),meta:{title:"Clients"},children:[{name:"Client Viewer",path:":id",component:()=>De(()=>import("./clientViewer-B2Gnxw0s.js"),__vite__mapDeps([42,40,1,43]),import.meta.url),meta:{title:"Clients"}}]},{name:"Webhooks",path:"webhooks",component:()=>De(()=>import("./dashboardWebHooks-VT4XDKAv.js"),__vite__mapDeps([44,1,45]),import.meta.url),meta:{title:"Webhooks"}},{name:"Configuration",path:"configuration/:id",component:()=>De(()=>import("./configuration-PDhrvfEh.js"),[],import.meta.url),meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:()=>De(()=>import("./peerList-C7P4VQnq.js"),__vite__mapDeps([46,7,1,37,3,15,24,25,31,47]),import.meta.url)}]}]},{path:"/signin",component:()=>De(()=>import("./signin-FcGTPYXi.js"),__vite__mapDeps([48,2,1,3,4,49]),import.meta.url),meta:{title:"Sign In",hideTopNav:!0}},{path:"/welcome",component:()=>De(()=>import("./setup-CmZcA1UA.js"),__vite__mapDeps([50,1]),import.meta.url),meta:{requiresAuth:!0,title:"Welcome to WGDashboard",hideTopNav:!0}},{path:"/2FASetup",component:()=>De(()=>import("./totp-DafLO14t.js"),__vite__mapDeps([51,52,32,1]),import.meta.url),meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup",hideTopNav:!0}},{path:"/share",component:()=>De(()=>import("./share-BH7KjNTD.js"),__vite__mapDeps([53,52,32,1,54]),import.meta.url),meta:{title:"Share",hideTopNav:!0}}]});br.beforeEach(async(e,t,n)=>{const r=ky(),s=Vn();e.meta.title?document.title=e.meta.title+" | WGDashboard":e.params.id?document.title=e.params.id+" | WGDashboard":document.title="WGDashboard",s.ShowNavBar=!1,document.querySelector(".loadingBar").classList.remove("loadingDone"),document.querySelector(".loadingBar").classList.add("loading"),e.meta.requiresAuth?s.getActiveCrossServer()?(await s.getConfiguration(),!r.Configurations&&e.name!=="Configuration List"&&await r.getConfigurations(),n()):await Vy()?(await s.getConfiguration(),!r.Configurations&&e.name!=="Configuration List"&&await r.getConfigurations(),s.Redirect=void 0,n()):(s.Redirect=e,n("/signin"),s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning")):n()});br.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const Zf=()=>{let e={"Content-Type":"application/json"};const n=Vn().getActiveCrossServer();if(n&&(e["wg-dashboard-apikey"]=n.apiKey,n.headers))for(let r of Object.values(n.headers))r.key&&r.value&&!Object.keys(e).includes(r.key)&&(e[r.key]=r.value);return e},ed=e=>{const n=Vn().getActiveCrossServer();if(n)return`${n.host}${e}`;const r=window.APP_PREFIX||"";return`${window.location.protocol}//${window.location.host}${r}${e}`},Dn=async(e,t=void 0,n=void 0)=>{const r=new URLSearchParams(t);await fetch(`${ed(e)}?${r.toString()}`,{headers:Zf()}).then(s=>{const o=Vn();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&o.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(s.statusText)}).then(s=>n?n(s):void 0).catch(s=>{console.log("Error:",s),br.push({path:"/signin"})})},Hb=async(e,t,n)=>{await fetch(`${ed(e)}`,{headers:Zf(),method:"POST",body:JSON.stringify(t)}).then(r=>{const s=Vn();if(r.ok)return r.json();if(r.status!==200)throw r.status===401&&s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(r.statusText)}).then(r=>n?n(r):void 0).catch(r=>{console.log("Error:",r),br.push({path:"/signin"})})},Ve=[];for(let e=0;e<256;++e)Ve.push((e+256).toString(16).slice(1));function Fy(e,t=0){return(Ve[e[t+0]]+Ve[e[t+1]]+Ve[e[t+2]]+Ve[e[t+3]]+"-"+Ve[e[t+4]]+Ve[e[t+5]]+"-"+Ve[e[t+6]]+Ve[e[t+7]]+"-"+Ve[e[t+8]]+Ve[e[t+9]]+"-"+Ve[e[t+10]]+Ve[e[t+11]]+Ve[e[t+12]]+Ve[e[t+13]]+Ve[e[t+14]]+Ve[e[t+15]]).toLowerCase()}let Qi;const Hy=new Uint8Array(16);function By(){if(!Qi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Qi=crypto.getRandomValues.bind(crypto)}return Qi(Hy)}const jy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bc={randomUUID:jy};function Wy(e,t,n){e=e||{};const r=e.random??e.rng?.()??By();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let s=0;s<16;++s)t[n+s]=r[s];return t}return Fy(r)}function Ac(e,t,n){return bc.randomUUID&&!t&&!e?bc.randomUUID():Wy(e,t,n)}const Vn=Lf("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},SystemStatus:void 0,ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:null,HelpAgent:{Enable:!1}}),actions:{initCrossServerConfiguration(){const e=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),e===null?window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(e)},syncCrossServerConfiguration(){window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[Ac().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(e){delete this.CrossServerConfiguration.ServerList[e]},getActiveCrossServer(){const e=localStorage.getItem("ActiveCrossServerConfiguration");if(e!==null)return this.CrossServerConfiguration.ServerList[e]},async setActiveCrossServer(e){this.ActiveServerConfiguration=e,localStorage.setItem("ActiveCrossServerConfiguration",e),await Dn("/api/locale",{},t=>{this.Locale=t.data})},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await Dn("/api/getDashboardConfiguration",{},e=>{e.status&&(this.Configuration=e.data)})},async signOut(){await Dn("/api/signout",{},()=>{this.removeActiveCrossServer(),document.cookie="",this.$router.go("/signin")})},newMessage(e,t,n){this.Messages.push({id:Ac(),from:tt(e),content:tt(t),type:n,show:!0})},applyLocale(e){if(this.Locale===null)return e;const n=Object.keys(this.Locale).filter(r=>e.match(new RegExp("^"+r+"$","g"))!==null);return console.log(n),n.length===0||n.length>1?e:this.Locale[n[0]]}},persist:{pick:["HelpAgent.Enable"]}});(function(){function e(b){var y=new Float64Array(16);if(b)for(var N=0;N>16&1),T[S-1]&=65535;T[15]=C[15]-32767-(T[14]>>16&1),N=T[15]>>16&1,T[14]&=65535,r(C,T,1-N)}for(var S=0;S<16;++S)b[2*S]=C[S]&255,b[2*S+1]=C[S]>>8}function n(b){for(var y=0;y<16;++y)b[(y+1)%16]+=(y<15?1:38)*Math.floor(b[y]/65536),b[y]&=65535}function r(b,y,N){for(var T,C=~(N-1),S=0;S<16;++S)T=C&(b[S]^y[S]),b[S]^=T,y[S]^=T}function s(b,y,N){for(var T=0;T<16;++T)b[T]=y[T]+N[T]|0}function o(b,y,N){for(var T=0;T<16;++T)b[T]=y[T]-N[T]|0}function a(b,y,N){for(var T=new Float64Array(31),C=0;C<16;++C)for(var S=0;S<16;++S)T[C+S]+=y[C]*N[S];for(var C=0;C<15;++C)T[C]+=38*T[C+16];for(var C=0;C<16;++C)b[C]=T[C];n(b),n(b)}function l(b,y){for(var N=e(),T=0;T<16;++T)N[T]=y[T];for(var T=253;T>=0;--T)a(N,N,N),T!==2&&T!==4&&a(N,N,y);for(var T=0;T<16;++T)b[T]=N[T]}function c(b){b[31]=b[31]&127|64,b[0]&=248}function d(b){for(var y,N=new Uint8Array(32),T=e([1]),C=e([9]),S=e(),U=e([1]),j=e(),te=e(),he=e([56129,1]),Ee=e([9]),ie=0;ie<32;++ie)N[ie]=b[ie];c(N);for(var ie=254;ie>=0;--ie)y=N[ie>>>3]>>>(ie&7)&1,r(T,C,y),r(S,U,y),s(j,T,S),o(T,T,S),s(S,C,U),o(C,C,U),a(U,j,j),a(te,T,T),a(T,S,T),a(S,C,j),s(j,T,S),o(T,T,S),a(C,T,T),o(S,U,te),a(T,S,he),s(T,T,U),a(S,S,T),a(T,U,te),a(U,C,Ee),a(C,j,j),r(T,C,y),r(S,U,y);return l(S,S),a(T,T,S),t(N,T),N}function f(){var b=new Uint8Array(32);return window.crypto.getRandomValues(b),b}function h(){var b=f();return c(b),b}function p(b,y){for(var N=Uint8Array.from([y[0]>>2&63,(y[0]<<4|y[1]>>4)&63,(y[1]<<2|y[2]>>6)&63,y[2]&63]),T=0;T<4;++T)b[T]=N[T]+65+(25-N[T]>>8&6)-(51-N[T]>>8&75)-(61-N[T]>>8&15)+(62-N[T]>>8&3)}function m(b){var y,N=new Uint8Array(44);for(y=0;y<32/3;++y)p(N.subarray(y*4),b.subarray(y*3));return p(N.subarray(y*4),Uint8Array.from([b[y*3+0],b[y*3+1],0])),N[43]=61,String.fromCharCode.apply(null,N)}function O(b){let y=window.atob(b),N=y.length,T=new Uint8Array(N);for(let S=0;S>>8&255,y>>>16&255,y>>>24&255)}function x(b,y){b.push(y&255,y>>>8&255)}function P(b,y){for(var N=0;N>>1:y>>>1;H.table[N]=y}}for(var C=-1,S=0;S>>8^H.table[(C^b[S])&255];return(C^-1)>>>0}function M(b){for(var y=[],N=[],T=0,C=0;C{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},Uy=["data-bs-theme"],Gy={key:0,class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},qy={class:"container-fluid d-flex text-body align-items-center"},Yy={key:0,class:"bi bi-list"},zy={key:1,class:"bi bi-x-lg"},Xy={__name:"App",setup(e){const t=Vn();t.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP?(t.IsElectronApp=!0,t.CrossServerConfiguration.Enable=!0,t.ActiveServerConfiguration&&Dn("/api/locale",{},r=>{t.Locale=r.data})):Dn("/api/locale",{},r=>{t.Locale=r.data}),In(t.CrossServerConfiguration,()=>{t.syncCrossServerConfiguration()},{deep:!0});const n=Ty();return(r,s)=>{const o=w_("RouterLink");return It(),As("div",{class:"h-100 bg-body","data-bs-theme":nt(t).Configuration?.Server.dashboard_theme},[s[2]||(s[2]=er("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),nt(n).meta.hideTopNav?gv("",!0):(It(),As("nav",Gy,[er("div",qy,[Ne(o,{to:"/",class:"navbar-brand mb-0 h1"},{default:Jn(()=>[...s[1]||(s[1]=[er("img",{src:mE,alt:"WGDashboard Logo",style:{width:"32px"}},null,-1)])]),_:1}),er("a",{role:"button",class:"navbarBtn text-body",onClick:s[0]||(s[0]=a=>nt(t).ShowNavBar=!nt(t).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},[Ne(Il,{name:"fade2",mode:"out-in"},{default:Jn(()=>[nt(t).ShowNavBar?(It(),As("i",zy)):(It(),As("i",Yy))]),_:1})])])])),(It(),Yr(iv,null,{default:Jn(()=>[Ne(nt(qf),null,{default:Jn(({Component:a})=>[Ne(Il,{name:"app",mode:"out-in",type:"transition",appear:""},{default:Jn(()=>[(It(),Yr(O_(a)))]),_:2},1024)]),_:1})]),_:1}))],8,Uy)}}},Qy=Ky(Xy,[["__scopeId","data-v-ddb6150e"]]);function Jy(e,t){if(e==null)return;let n=e;for(let r=0;r1&&(t=ua(typeof e!="object"||e===null||!Object.prototype.hasOwnProperty.call(e,r)?Number.isInteger(Number(n[1]))?[]:{}:e[r],t,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(e)?e.slice()[r]:Object.assign({},e,{[r]:t})}function td(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);const n={};for(const r in e)n[r]=e[r];return delete n[t[0]],n}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);const n={};for(const r in e)n[r]=e[r];return n}return ua(e,td(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function nd(e,t){return t.map(n=>n.split(".")).map(n=>[n,Jy(e,n)]).filter(n=>n[1]!==void 0).reduce((n,r)=>ua(n,r[1],r[0]),{})}function rd(e,t){return t.map(n=>n.split(".")).reduce((n,r)=>td(n,r),e)}function Tc(e,{storage:t,serializer:n,key:r,debug:s,pick:o,omit:a,beforeHydrate:l,afterHydrate:c},d,f=!0){try{f&&l?.(d);const h=t.getItem(r);if(h){const p=n.deserialize(h),m=o?nd(p,o):p,O=a?rd(m,a):m;e.$patch(O)}f&&c?.(d)}catch(h){s&&console.error("[pinia-plugin-persistedstate]",h)}}function Cc(e,{storage:t,serializer:n,key:r,debug:s,pick:o,omit:a}){try{const l=o?nd(e,o):e,c=a?rd(l,a):l,d=n.serialize(c);t.setItem(r,d)}catch(l){s&&console.error("[pinia-plugin-persistedstate]",l)}}function Zy(e,t){return typeof e=="function"?e(t):typeof e=="string"?e:t}function eb(e,t,n){const{pinia:r,store:s,options:{persist:o=n}}=e;if(!o)return;if(!(s.$id in r.state.value)){const l=r._s.get(s.$id.replace("__hot:",""));l&&Promise.resolve().then(()=>l.$persist());return}const a=(Array.isArray(o)?o:o===!0?[{}]:[o]).map(t);s.$hydrate=({runHooks:l=!0}={})=>{a.forEach(c=>{Tc(s,c,e,l)})},s.$persist=()=>{a.forEach(l=>{Cc(s.$state,l)})},a.forEach(l=>{Tc(s,l,e),s.$subscribe((c,d)=>Cc(d,l),{detached:!0})})}function tb(e={}){return function(t){eb(t,n=>{const r=Zy(n.key,t.store.$id);return{key:(e.key?e.key:s=>s)(r),debug:n.debug??e.debug??!1,serializer:n.serializer??e.serializer??{serialize:s=>JSON.stringify(s),deserialize:s=>JSON.parse(s)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate??e.beforeHydrate,afterHydrate:n.afterHydrate??e.afterHydrate,pick:n.pick,omit:n.omit}},e.auto??!1)}}var nb=tb();const fa=aE(Qy);fa.use(br);const da=uE();da.use(nb);da.use(({store:e})=>{e.$router=ii(br)});fa.use(da);fa.mount("#app");export{$b as $,Ac as A,Xo as B,eE as C,Vn as D,Ib as E,Xe as F,tt as G,In as H,kb as I,Jr as J,Fb as K,Ty as L,Cb as M,De as N,mb as O,Eb as P,Tu as Q,oa as R,iv as S,Pb as T,Sv as U,li as V,ky as W,ve as X,qo as Y,oi as Z,Ky as _,er as a,Tb as a0,Vb as a1,Sb as a2,Mb as a3,ed as a4,Lf as a5,iu as a6,Vm as a7,vb as a8,Rb as a9,xb as aa,Ob as ab,Ns as ac,so as ad,yb as ae,Nb as af,_b as ag,hv as ah,Ab as ai,rt as aj,mv as ak,Ku as al,Db as am,Ne as b,As as c,gv as d,pv as e,It as f,Dn as g,w_ as h,wb as i,Yr as j,Il as k,O_ as l,bb as m,ti as n,Jo as o,Lb as p,dt as q,xn as r,ei as s,Mm as t,nt as u,Jv as v,Jn as w,Gu as x,Yl as y,Hb as z};
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(I,K){if(I){if(typeof I=="string")return f(I,K);var G=Object.prototype.toString.call(I).slice(8,-1);if(G==="Object"&&I.constructor&&(G=I.constructor.name),G==="Map"||G==="Set")return Array.from(I);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return f(I,K)}}function f(I,K){(K==null||K>I.length)&&(K=I.length);for(var G=0,X=new Array(K);G"u"||!(Symbol.iterator in Object(I)))){var G=[],X=!0,re=!1,ne=void 0;try{for(var se=I[Symbol.iterator](),de;!(X=(de=se.next()).done)&&(G.push(de.value),!(K&&G.length===K));X=!0);}catch(me){re=!0,ne=me}finally{try{!X&&se.return!=null&&se.return()}finally{if(re)throw ne}}return G}}function p(I){if(Array.isArray(I))return I}var m=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?$/,O=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])?$/,A=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,x=/^rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,P=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,V=/^rgba?\(\s*(\d+%)\s+(\d+%)\s+(\d+%)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,H=/^hsla?\(\s*(\d+)(deg|rad|grad|turn)?\s*,\s*(\d+)%\s*,\s*(\d+)%(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/;function M(I,K){return I.indexOf(K)>-1}function b(I,K,G){var X=I/255,re=K/255,ne=G/255,se=Math.max(X,re,ne),de=Math.min(X,re,ne),me=se-de,ye=(se+de)/2;if(me===0)return[0,0,ye*100];var L=me/(1-Math.abs(2*ye-1)),Q=(function(){switch(se){case X:return(re-ne)/me%6;case re:return(ne-X)/me+2;default:return(X-re)/me+4}})();return[Q*60,L*100,ye*100]}function y(I,K,G){var X=I/60,re=K/100,ne=G/100,se=(1-Math.abs(2*ne-1))*re,de=se*(1-Math.abs(X%2-1)),me=ne-se/2,ye=(function(){return X<1?[se,de,0]:X<2?[de,se,0]:X<3?[0,se,de]:X<4?[0,de,se]:X<5?[de,0,se]:[se,0,de]})(),L=l(ye,3),Q=L[0],Z=L[1],oe=L[2];return[(Q+me)*255,(Z+me)*255,(oe+me)*255]}var N=(function(){function I(K){var G=l(K,4),X=G[0],re=G[1],ne=G[2],se=G[3];s(this,I),this.values=[Math.max(Math.min(parseInt(X,10),255),0),Math.max(Math.min(parseInt(re,10),255),0),Math.max(Math.min(parseInt(ne,10),255),0),se==null?1:Math.max(Math.min(parseFloat(se),255),0)]}return a(I,[{key:"toRgbString",value:function(){var G=l(this.values,4),X=G[0],re=G[1],ne=G[2],se=G[3];return se===1?"rgb(".concat(X,", ").concat(re,", ").concat(ne,")"):"rgba(".concat(X,", ").concat(re,", ").concat(ne,", ").concat(se,")")}},{key:"toHslString",value:function(){var G=this.toHslaArray(),X=l(G,4),re=X[0],ne=X[1],se=X[2],de=X[3];return de===1?"hsl(".concat(re,", ").concat(ne,"%, ").concat(se,"%)"):"hsla(".concat(re,", ").concat(ne,"%, ").concat(se,"%, ").concat(de,")")}},{key:"toHexString",value:function(){var G=l(this.values,4),X=G[0],re=G[1],ne=G[2],se=G[3];return X=Number(X).toString(16).padStart(2,"0"),re=Number(re).toString(16).padStart(2,"0"),ne=Number(ne).toString(16).padStart(2,"0"),se=se<1?parseInt(se*255,10).toString(16).padStart(2,"0"):"","#".concat(X).concat(re).concat(ne).concat(se)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var G=l(this.values,4),X=G[0],re=G[1],ne=G[2],se=G[3],de=b(X,re,ne),me=l(de,3),ye=me[0],L=me[1],Q=me[2];return[ye,L,Q,se]}}]),I})();function T(I){var K=l(I,4),G=K[0],X=K[1],re=K[2],ne=K[3];return new N([G,X,re,ne])}function C(I){var K=l(I,3),G=K[0],X=K[1],re=K[2];return T([G,X,re,1])}function S(I){var K=l(I,4),G=K[0],X=K[1],re=K[2],ne=K[3],se=y(G,X,re),de=l(se,3),me=de[0],ye=de[1],L=de[2];return T([me,ye,L,ne])}function U(I){var K=l(I,3),G=K[0],X=K[1],re=K[2];return S([G,X,re,1])}function j(I){var K=m.exec(I)||O.exec(I),G=l(K,5),X=G[1],re=G[2],ne=G[3],se=G[4];return X=parseInt(X.length<2?X.repeat(2):X,16),re=parseInt(re.length<2?re.repeat(2):re,16),ne=parseInt(ne.length<2?ne.repeat(2):ne,16),se=se&&(parseInt(se.length<2?se.repeat(2):se,16)/255).toPrecision(1)||1,T([X,re,ne,se])}function te(I){var K=A.exec(I)||P.exec(I)||x.exec(I)||V.exec(I),G=l(K,5),X=G[1],re=G[2],ne=G[3],se=G[4];return X=M(X,"%")?parseInt(X,10)*255/100:parseInt(X,10),re=M(re,"%")?parseInt(re,10)*255/100:parseInt(re,10),ne=M(ne,"%")>0?parseInt(ne,10)*255/100:parseInt(ne,10),se=se===void 0?1:parseFloat(se)/(M(se,"%")?100:1),T([X,re,ne,se])}function he(I){var K=H.exec(I),G=l(K,6),X=G[1],re=G[2],ne=G[3],se=G[4],de=G[5];return re=re||"deg",X=(0,n.default)(parseFloat(X),re,"deg"),ne=parseFloat(ne),se=parseFloat(se),de=de===void 0?1:parseFloat(de)/(M(de,"%")?100:1),S([X,ne,se,de])}function Ee(I){return t.default[I]?C(t.default[I]):m.test(I)||O.test(I)?j(I):A.test(I)||P.test(I)||x.test(I)||V.test(I)?te(I):H.test(I)?he(I):null}var ie={fromString:Ee,fromRgb:C,fromRgba:T,fromHsl:U,fromHsla:S};e.default=ie})(Yi)),Yi}var My=$y();const ky=Lf("WireguardConfigurationsStore",{state:()=>({Configurations:[],ConfigurationLoaded:!1,searchString:"",ConfigurationListInterval:void 0,Filter:{HiddenTags:[],ShowAllPeersWhenHiddenTags:!0},SortOptions:{Name:tt("Name"),Status:tt("Status"),"DataUsage.Total":tt("Total Usage")},CurrentSort:{key:"Name",order:"asc"},CurrentDisplay:"List",PeerScheduleJobs:{dropdowns:{Field:[{display:tt("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:tt("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:tt("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:tt("Date"),value:"date",type:"date"}],Operator:[{display:tt("larger than"),value:"lgt"}],Action:[{display:tt("Restrict Peer"),value:"restrict"},{display:tt("Delete Peer"),value:"delete"},{display:tt("Reset Total Data Usage"),value:"reset_total_data_usage"}]}}}),getters:{sortConfigurations(){return[...this.Configurations].sort((e,t)=>this.CurrentSort.order==="desc"?this.dotNotation(e,this.CurrentSort.key)this.dotNotation(t,this.CurrentSort.key)?-1:0:this.dotNotation(e,this.CurrentSort.key)>this.dotNotation(t,this.CurrentSort.key)?1:this.dotNotation(e,this.CurrentSort.key){e.status&&(this.Configurations=e.data),this.ConfigurationLoaded=!0})},colorText(e){if(e){const t=My.fromString(e);if(t){const n=t.toRgbaArray();return+((n[0]*299+n[1]*587+n[2]*114)/255e3).toFixed(2)>.5?"#000":"#fff"}}return"#ffffff"},dotNotation(e,t){let n=t.split(".").reduce((r,s)=>r&&r[s],e);return typeof n=="string"?n.toLowerCase():n},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 ca(e)!==0},checkWGKeyLength(e){return/^[A-Za-z0-9+/]{43}=?=?$/.test(e)}},persist:{pick:["CurrentSort","CurrentDisplay","Filter.ShowAllPeersWhenHiddenTags"]}}),Vy=async()=>{let e=!1;return await Dn("/api/validateAuthentication",{},t=>{e=t.status}),e},br=Ay({history:ty(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:()=>De(()=>import("./index-B8FA5wIW.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:()=>De(()=>import("./configurationList-Cz8x7tFK.js"),__vite__mapDeps([6,1,7,8,9,10]),import.meta.url),meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"settings",component:()=>De(()=>import("./settings-KlG98Yii.js"),__vite__mapDeps([11,12,1,13,3,14,15,16,17,18]),import.meta.url),children:[{name:"WGDashboard Settings",path:"",component:()=>De(()=>import("./wgdashboardSettings-D94ltk8c.js"),__vite__mapDeps([19,1,13,3,14,15,16]),import.meta.url),meta:{title:"WGDashboard Settings"}},{name:"Peers Settings",path:"peers_settings",component:()=>De(()=>import("./peerDefaultSettings-D6pua8X-.js"),__vite__mapDeps([20,1,12]),import.meta.url),meta:{title:"Peers Default Settings"}},{name:"WireGuard Configuration Settings",path:"wireguard_settings",component:()=>De(()=>import("./wireguardConfigurationSettings-BpXMnzum.js"),__vite__mapDeps([21,17,1,18]),import.meta.url),meta:{title:"WireGuard Configuration Settings"}}],meta:{title:"Settings"}},{path:"ping",name:"Ping",component:()=>De(()=>import("./ping-Bmq297ir.js"),__vite__mapDeps([22,1,23,24,25,26,27]),import.meta.url)},{path:"traceroute",name:"Traceroute",component:()=>De(()=>import("./traceroute-DkCRz7Cp.js"),__vite__mapDeps([28,23,24,25,26,1,29]),import.meta.url)},{name:"New Configuration",path:"new_configuration",component:()=>De(()=>import("./newConfiguration-CSZaxFrx.js"),__vite__mapDeps([30,31,1,32,33]),import.meta.url),meta:{title:"New Configuration"}},{name:"Restore Configuration",path:"restore_configuration",component:()=>De(()=>import("./restoreConfiguration-CS0vimZ5.js"),__vite__mapDeps([34,1,3,7,31,35]),import.meta.url),meta:{title:"Restore Configuration"}},{name:"System Status",path:"system_status",component:()=>De(()=>import("./systemStatus-BwVNyVHa.js"),__vite__mapDeps([36,1,8,9,37,3,38]),import.meta.url),meta:{title:"System Status"}},{name:"Clients",path:"clients",component:()=>De(()=>import("./clients-D8CGvKPT.js"),__vite__mapDeps([39,40,1,41]),import.meta.url),meta:{title:"Clients"},children:[{name:"Client Viewer",path:":id",component:()=>De(()=>import("./clientViewer-CSPixv4n.js"),__vite__mapDeps([42,40,1,43]),import.meta.url),meta:{title:"Clients"}}]},{name:"Webhooks",path:"webhooks",component:()=>De(()=>import("./dashboardWebHooks-D04P6bzU.js"),__vite__mapDeps([44,1,45]),import.meta.url),meta:{title:"Webhooks"}},{name:"Configuration",path:"configuration/:id",component:()=>De(()=>import("./configuration-Bn8Xcxnm.js"),[],import.meta.url),meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:()=>De(()=>import("./peerList-D9CAwGmT.js"),__vite__mapDeps([46,7,1,37,3,15,24,25,31,47]),import.meta.url)}]}]},{path:"/signin",component:()=>De(()=>import("./signin-Cxz-p-xk.js"),__vite__mapDeps([48,2,1,3,4,49]),import.meta.url),meta:{title:"Sign In",hideTopNav:!0}},{path:"/welcome",component:()=>De(()=>import("./setup-CPsZ8X-C.js"),__vite__mapDeps([50,1]),import.meta.url),meta:{requiresAuth:!0,title:"Welcome to WGDashboard",hideTopNav:!0}},{path:"/2FASetup",component:()=>De(()=>import("./totp-CM1avBKQ.js"),__vite__mapDeps([51,52,32,1]),import.meta.url),meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup",hideTopNav:!0}},{path:"/share",component:()=>De(()=>import("./share-D9-1WFJG.js"),__vite__mapDeps([53,52,32,1,54]),import.meta.url),meta:{title:"Share",hideTopNav:!0}}]});br.beforeEach(async(e,t,n)=>{const r=ky(),s=Vn();e.meta.title?document.title=e.meta.title+" | WGDashboard":e.params.id?document.title=e.params.id+" | WGDashboard":document.title="WGDashboard",s.ShowNavBar=!1,document.querySelector(".loadingBar").classList.remove("loadingDone"),document.querySelector(".loadingBar").classList.add("loading"),e.meta.requiresAuth?s.getActiveCrossServer()?(await s.getConfiguration(),!r.Configurations&&e.name!=="Configuration List"&&await r.getConfigurations(),n()):await Vy()?(await s.getConfiguration(),!r.Configurations&&e.name!=="Configuration List"&&await r.getConfigurations(),s.Redirect=void 0,n()):(s.Redirect=e,n("/signin"),s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning")):n()});br.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const Zf=()=>{let e={"Content-Type":"application/json"};const n=Vn().getActiveCrossServer();if(n&&(e["wg-dashboard-apikey"]=n.apiKey,n.headers))for(let r of Object.values(n.headers))r.key&&r.value&&!Object.keys(e).includes(r.key)&&(e[r.key]=r.value);return e},ed=e=>{const n=Vn().getActiveCrossServer();return n?`${n.host}${e}`:`./.${e}`},Dn=async(e,t=void 0,n=void 0)=>{const r=new URLSearchParams(t);await fetch(`${ed(e)}?${r.toString()}`,{headers:Zf()}).then(s=>{const o=Vn();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&o.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(s.statusText)}).then(s=>n?n(s):void 0).catch(s=>{console.log("Error:",s),br.push({path:"/signin"})})},Hb=async(e,t,n)=>{await fetch(`${ed(e)}`,{headers:Zf(),method:"POST",body:JSON.stringify(t)}).then(r=>{const s=Vn();if(r.ok)return r.json();if(r.status!==200)throw r.status===401&&s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(r.statusText)}).then(r=>n?n(r):void 0).catch(r=>{console.log("Error:",r),br.push({path:"/signin"})})},Ve=[];for(let e=0;e<256;++e)Ve.push((e+256).toString(16).slice(1));function Fy(e,t=0){return(Ve[e[t+0]]+Ve[e[t+1]]+Ve[e[t+2]]+Ve[e[t+3]]+"-"+Ve[e[t+4]]+Ve[e[t+5]]+"-"+Ve[e[t+6]]+Ve[e[t+7]]+"-"+Ve[e[t+8]]+Ve[e[t+9]]+"-"+Ve[e[t+10]]+Ve[e[t+11]]+Ve[e[t+12]]+Ve[e[t+13]]+Ve[e[t+14]]+Ve[e[t+15]]).toLowerCase()}let Qi;const Hy=new Uint8Array(16);function By(){if(!Qi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Qi=crypto.getRandomValues.bind(crypto)}return Qi(Hy)}const jy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bc={randomUUID:jy};function Wy(e,t,n){e=e||{};const r=e.random??e.rng?.()??By();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let s=0;s<16;++s)t[n+s]=r[s];return t}return Fy(r)}function Ac(e,t,n){return bc.randomUUID&&!t&&!e?bc.randomUUID():Wy(e,t,n)}const Vn=Lf("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},SystemStatus:void 0,ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:null,HelpAgent:{Enable:!1}}),actions:{initCrossServerConfiguration(){const e=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),e===null?window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(e)},syncCrossServerConfiguration(){window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[Ac().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(e){delete this.CrossServerConfiguration.ServerList[e]},getActiveCrossServer(){const e=localStorage.getItem("ActiveCrossServerConfiguration");if(e!==null)return this.CrossServerConfiguration.ServerList[e]},async setActiveCrossServer(e){this.ActiveServerConfiguration=e,localStorage.setItem("ActiveCrossServerConfiguration",e),await Dn("/api/locale",{},t=>{this.Locale=t.data})},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await Dn("/api/getDashboardConfiguration",{},e=>{e.status&&(this.Configuration=e.data)})},async signOut(){await Dn("/api/signout",{},()=>{this.removeActiveCrossServer(),document.cookie="",this.$router.go("/signin")})},newMessage(e,t,n){this.Messages.push({id:Ac(),from:tt(e),content:tt(t),type:n,show:!0})},applyLocale(e){if(this.Locale===null)return e;const n=Object.keys(this.Locale).filter(r=>e.match(new RegExp("^"+r+"$","g"))!==null);return console.log(n),n.length===0||n.length>1?e:this.Locale[n[0]]}},persist:{pick:["HelpAgent.Enable"]}});(function(){function e(b){var y=new Float64Array(16);if(b)for(var N=0;N>16&1),T[S-1]&=65535;T[15]=C[15]-32767-(T[14]>>16&1),N=T[15]>>16&1,T[14]&=65535,r(C,T,1-N)}for(var S=0;S<16;++S)b[2*S]=C[S]&255,b[2*S+1]=C[S]>>8}function n(b){for(var y=0;y<16;++y)b[(y+1)%16]+=(y<15?1:38)*Math.floor(b[y]/65536),b[y]&=65535}function r(b,y,N){for(var T,C=~(N-1),S=0;S<16;++S)T=C&(b[S]^y[S]),b[S]^=T,y[S]^=T}function s(b,y,N){for(var T=0;T<16;++T)b[T]=y[T]+N[T]|0}function o(b,y,N){for(var T=0;T<16;++T)b[T]=y[T]-N[T]|0}function a(b,y,N){for(var T=new Float64Array(31),C=0;C<16;++C)for(var S=0;S<16;++S)T[C+S]+=y[C]*N[S];for(var C=0;C<15;++C)T[C]+=38*T[C+16];for(var C=0;C<16;++C)b[C]=T[C];n(b),n(b)}function l(b,y){for(var N=e(),T=0;T<16;++T)N[T]=y[T];for(var T=253;T>=0;--T)a(N,N,N),T!==2&&T!==4&&a(N,N,y);for(var T=0;T<16;++T)b[T]=N[T]}function c(b){b[31]=b[31]&127|64,b[0]&=248}function d(b){for(var y,N=new Uint8Array(32),T=e([1]),C=e([9]),S=e(),U=e([1]),j=e(),te=e(),he=e([56129,1]),Ee=e([9]),ie=0;ie<32;++ie)N[ie]=b[ie];c(N);for(var ie=254;ie>=0;--ie)y=N[ie>>>3]>>>(ie&7)&1,r(T,C,y),r(S,U,y),s(j,T,S),o(T,T,S),s(S,C,U),o(C,C,U),a(U,j,j),a(te,T,T),a(T,S,T),a(S,C,j),s(j,T,S),o(T,T,S),a(C,T,T),o(S,U,te),a(T,S,he),s(T,T,U),a(S,S,T),a(T,U,te),a(U,C,Ee),a(C,j,j),r(T,C,y),r(S,U,y);return l(S,S),a(T,T,S),t(N,T),N}function f(){var b=new Uint8Array(32);return window.crypto.getRandomValues(b),b}function h(){var b=f();return c(b),b}function p(b,y){for(var N=Uint8Array.from([y[0]>>2&63,(y[0]<<4|y[1]>>4)&63,(y[1]<<2|y[2]>>6)&63,y[2]&63]),T=0;T<4;++T)b[T]=N[T]+65+(25-N[T]>>8&6)-(51-N[T]>>8&75)-(61-N[T]>>8&15)+(62-N[T]>>8&3)}function m(b){var y,N=new Uint8Array(44);for(y=0;y<32/3;++y)p(N.subarray(y*4),b.subarray(y*3));return p(N.subarray(y*4),Uint8Array.from([b[y*3+0],b[y*3+1],0])),N[43]=61,String.fromCharCode.apply(null,N)}function O(b){let y=window.atob(b),N=y.length,T=new Uint8Array(N);for(let S=0;S>>8&255,y>>>16&255,y>>>24&255)}function x(b,y){b.push(y&255,y>>>8&255)}function P(b,y){for(var N=0;N>>1:y>>>1;H.table[N]=y}}for(var C=-1,S=0;S>>8^H.table[(C^b[S])&255];return(C^-1)>>>0}function M(b){for(var y=[],N=[],T=0,C=0;C{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},Uy=["data-bs-theme"],Gy={key:0,class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},qy={class:"container-fluid d-flex text-body align-items-center"},Yy={key:0,class:"bi bi-list"},zy={key:1,class:"bi bi-x-lg"},Xy={__name:"App",setup(e){const t=Vn();t.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP?(t.IsElectronApp=!0,t.CrossServerConfiguration.Enable=!0,t.ActiveServerConfiguration&&Dn("/api/locale",{},r=>{t.Locale=r.data})):Dn("/api/locale",{},r=>{t.Locale=r.data}),In(t.CrossServerConfiguration,()=>{t.syncCrossServerConfiguration()},{deep:!0});const n=Ty();return(r,s)=>{const o=w_("RouterLink");return It(),As("div",{class:"h-100 bg-body","data-bs-theme":nt(t).Configuration?.Server.dashboard_theme},[s[2]||(s[2]=er("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),nt(n).meta.hideTopNav?gv("",!0):(It(),As("nav",Gy,[er("div",qy,[Ne(o,{to:"/",class:"navbar-brand mb-0 h1"},{default:Jn(()=>[...s[1]||(s[1]=[er("img",{src:mE,alt:"WGDashboard Logo",style:{width:"32px"}},null,-1)])]),_:1}),er("a",{role:"button",class:"navbarBtn text-body",onClick:s[0]||(s[0]=a=>nt(t).ShowNavBar=!nt(t).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},[Ne(Il,{name:"fade2",mode:"out-in"},{default:Jn(()=>[nt(t).ShowNavBar?(It(),As("i",zy)):(It(),As("i",Yy))]),_:1})])])])),(It(),Yr(iv,null,{default:Jn(()=>[Ne(nt(qf),null,{default:Jn(({Component:a})=>[Ne(Il,{name:"app",mode:"out-in",type:"transition",appear:""},{default:Jn(()=>[(It(),Yr(O_(a)))]),_:2},1024)]),_:1})]),_:1}))],8,Uy)}}},Qy=Ky(Xy,[["__scopeId","data-v-ddb6150e"]]);function Jy(e,t){if(e==null)return;let n=e;for(let r=0;r1&&(t=ua(typeof e!="object"||e===null||!Object.prototype.hasOwnProperty.call(e,r)?Number.isInteger(Number(n[1]))?[]:{}:e[r],t,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(e)?e.slice()[r]:Object.assign({},e,{[r]:t})}function td(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);const n={};for(const r in e)n[r]=e[r];return delete n[t[0]],n}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);const n={};for(const r in e)n[r]=e[r];return n}return ua(e,td(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function nd(e,t){return t.map(n=>n.split(".")).map(n=>[n,Jy(e,n)]).filter(n=>n[1]!==void 0).reduce((n,r)=>ua(n,r[1],r[0]),{})}function rd(e,t){return t.map(n=>n.split(".")).reduce((n,r)=>td(n,r),e)}function Tc(e,{storage:t,serializer:n,key:r,debug:s,pick:o,omit:a,beforeHydrate:l,afterHydrate:c},d,f=!0){try{f&&l?.(d);const h=t.getItem(r);if(h){const p=n.deserialize(h),m=o?nd(p,o):p,O=a?rd(m,a):m;e.$patch(O)}f&&c?.(d)}catch(h){s&&console.error("[pinia-plugin-persistedstate]",h)}}function Cc(e,{storage:t,serializer:n,key:r,debug:s,pick:o,omit:a}){try{const l=o?nd(e,o):e,c=a?rd(l,a):l,d=n.serialize(c);t.setItem(r,d)}catch(l){s&&console.error("[pinia-plugin-persistedstate]",l)}}function Zy(e,t){return typeof e=="function"?e(t):typeof e=="string"?e:t}function eb(e,t,n){const{pinia:r,store:s,options:{persist:o=n}}=e;if(!o)return;if(!(s.$id in r.state.value)){const l=r._s.get(s.$id.replace("__hot:",""));l&&Promise.resolve().then(()=>l.$persist());return}const a=(Array.isArray(o)?o:o===!0?[{}]:[o]).map(t);s.$hydrate=({runHooks:l=!0}={})=>{a.forEach(c=>{Tc(s,c,e,l)})},s.$persist=()=>{a.forEach(l=>{Cc(s.$state,l)})},a.forEach(l=>{Tc(s,l,e),s.$subscribe((c,d)=>Cc(d,l),{detached:!0})})}function tb(e={}){return function(t){eb(t,n=>{const r=Zy(n.key,t.store.$id);return{key:(e.key?e.key:s=>s)(r),debug:n.debug??e.debug??!1,serializer:n.serializer??e.serializer??{serialize:s=>JSON.stringify(s),deserialize:s=>JSON.parse(s)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate??e.beforeHydrate,afterHydrate:n.afterHydrate??e.afterHydrate,pick:n.pick,omit:n.omit}},e.auto??!1)}}var nb=tb();const fa=aE(Qy);fa.use(br);const da=uE();da.use(nb);da.use(({store:e})=>{e.$router=ii(br)});fa.use(da);fa.mount("#app");export{$b as $,Ac as A,Xo as B,eE as C,Vn as D,Ib as E,Xe as F,tt as G,In as H,kb as I,Jr as J,Fb as K,Ty as L,Cb as M,De as N,mb as O,Eb as P,Tu as Q,oa as R,iv as S,Pb as T,Sv as U,li as V,ky as W,ve as X,qo as Y,oi as Z,Ky as _,er as a,Tb as a0,Vb as a1,Sb as a2,Mb as a3,ed as a4,Lf as a5,iu as a6,Vm as a7,vb as a8,Rb as a9,xb as aa,Ob as ab,Ns as ac,so as ad,yb as ae,Nb as af,_b as ag,hv as ah,Ab as ai,rt as aj,mv as ak,Ku as al,Db as am,Ne as b,As as c,gv as d,pv as e,It as f,Dn as g,w_ as h,wb as i,Yr as j,Il as k,O_ as l,bb as m,ti as n,Jo as o,Lb as p,dt as q,xn as r,ei as s,Mm as t,nt as u,Jv as v,Jn as w,Gu as x,Yl as y,Hb as z};
diff --git a/src/static/dist/WGDashboardAdmin/assets/index-Dk0b_puN.js b/src/static/dist/WGDashboardAdmin/assets/index-BXCSGGkv.js
similarity index 99%
rename from src/static/dist/WGDashboardAdmin/assets/index-Dk0b_puN.js
rename to src/static/dist/WGDashboardAdmin/assets/index-BXCSGGkv.js
index 6c6ec86a..b4d25472 100644
--- a/src/static/dist/WGDashboardAdmin/assets/index-Dk0b_puN.js
+++ b/src/static/dist/WGDashboardAdmin/assets/index-BXCSGGkv.js
@@ -1,3 +1,3 @@
-import{B as Vs,Q as Ws,R as qe,U as Vn,r as Wn,o as Nn,V as jn,H as $n,X as Ge,Y as Ns,Z as Yn}from"./index-DW-_CXHM.js";function se(i){return i+.5|0}const lt=(i,t,e)=>Math.max(Math.min(i,e),t);function jt(i){return lt(se(i*2.55),0,255)}function dt(i){return lt(se(i*255),0,255)}function at(i){return lt(se(i/2.55)/100,0,1)}function vi(i){return lt(se(i*100),0,100)}const X={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},Ze=[..."0123456789ABCDEF"],Un=i=>Ze[i&15],Xn=i=>Ze[(i&240)>>4]+Ze[i&15],ae=i=>(i&240)>>4===(i&15),Kn=i=>ae(i.r)&&ae(i.g)&&ae(i.b)&&ae(i.a);function qn(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&X[i[1]]*17,g:255&X[i[2]]*17,b:255&X[i[3]]*17,a:t===5?X[i[4]]*17:255}:(t===7||t===9)&&(e={r:X[i[1]]<<4|X[i[2]],g:X[i[3]]<<4|X[i[4]],b:X[i[5]]<<4|X[i[6]],a:t===9?X[i[7]]<<4|X[i[8]]:255})),e}const Gn=(i,t)=>i<255?t(i):"";function Zn(i){var t=Kn(i)?Un:Xn;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Gn(i.a,t):void 0}const Qn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function js(i,t,e){const s=t*Math.min(e,1-e),n=(o,r=(o+i/30)%12)=>e-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Jn(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function to(i,t,e){const s=js(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function eo(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-r):h/(o+r),l=eo(e,s,n,h,o),l=l*60+.5),[l|0,c||0,a]}function ri(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(dt)}function ai(i,t,e){return ri(js,i,t,e)}function io(i,t,e){return ri(to,i,t,e)}function so(i,t,e){return ri(Jn,i,t,e)}function $s(i){return(i%360+360)%360}function no(i){const t=Qn.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?jt(+t[5]):dt(+t[5]));const n=$s(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=io(n,o,r):t[1]==="hsv"?s=so(n,o,r):s=ai(n,o,r),{r:s[0],g:s[1],b:s[2],a:e}}function oo(i,t){var e=oi(i);e[0]=$s(e[0]+t),e=ai(e),i.r=e[0],i.g=e[1],i.b=e[2]}function ro(i){if(!i)return;const t=oi(i),e=t[0],s=vi(t[1]),n=vi(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${at(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const ki={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"},Si={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ao(){const i={},t=Object.keys(Si),e=Object.keys(ki);let s,n,o,r,a;for(s=0;s>16&255,o>>8&255,o&255]}return i}let le;function lo(i){le||(le=ao(),le.transparent=[0,0,0,0]);const t=le[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const co=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ho(i){const t=co.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const r=+t[7];e=t[8]?jt(r):lt(r*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?jt(s):lt(s,0,255)),n=255&(t[4]?jt(n):lt(n,0,255)),o=255&(t[6]?jt(o):lt(o,0,255)),{r:s,g:n,b:o,a:e}}}function fo(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${at(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Re=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Ot=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function uo(i,t,e){const s=Ot(at(i.r)),n=Ot(at(i.g)),o=Ot(at(i.b));return{r:dt(Re(s+e*(Ot(at(t.r))-s))),g:dt(Re(n+e*(Ot(at(t.g))-n))),b:dt(Re(o+e*(Ot(at(t.b))-o))),a:i.a+e*(t.a-i.a)}}function ce(i,t,e){if(i){let s=oi(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=ai(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Ys(i,t){return i&&Object.assign(t||{},i)}function wi(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=dt(i[3]))):(t=Ys(i,{r:0,g:0,b:0,a:1}),t.a=dt(t.a)),t}function go(i){return i.charAt(0)==="r"?ho(i):no(i)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let s;e==="object"?s=wi(t):e==="string"&&(s=qn(t)||lo(t)||go(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Ys(this._rgb);return t&&(t.a=at(t.a)),t}set rgb(t){this._rgb=wi(t)}rgbString(){return this._valid?fo(this._rgb):void 0}hexString(){return this._valid?Zn(this._rgb):void 0}hslString(){return this._valid?ro(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=uo(this._rgb,t._rgb,e)),this}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=dt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=se(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ce(this._rgb,2,t),this}darken(t){return ce(this._rgb,2,-t),this}saturate(t){return ce(this._rgb,1,t),this}desaturate(t){return ce(this._rgb,1,-t),this}rotate(t){return oo(this._rgb,t),this}}function nt(){}const po=(()=>{let i=0;return()=>i++})();function A(i){return i==null}function z(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function O(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function W(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function J(i,t){return W(i)?i:t}function P(i,t){return typeof i>"u"?t:i}const mo=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function I(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function L(i,t,e,s){let n,o,r;if(z(i))for(o=i.length,n=0;ni,x:i=>i.x,y:i=>i.y};function _o(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function yo(i){const t=_o(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function Lt(i,t){return(Mi[t]||(Mi[t]=yo(t)))(i)}function li(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Qt=i=>typeof i<"u",ft=i=>typeof i=="function",Pi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function vo(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const E=Math.PI,Z=2*E,ko=Z+E,Me=Number.POSITIVE_INFINITY,So=E/180,G=E/2,mt=E/4,Di=E*2/3,Xs=Math.log10,st=Math.sign;function Xt(i,t,e){return Math.abs(i-t)n-o).pop(),t}function Mo(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Jt(i){return!Mo(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Po(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Do(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function ci(i,t,e){e=e||(r=>i[r]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const kt=(i,t,e,s)=>ci(i,e,s?n=>{const o=i[n][t];return oi[n][t]ci(i,e,s=>i[s][t]>=e);function Io(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{const s="_onData"+li(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Ti(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(qs.forEach(o=>{delete i[o]}),delete i._chartjs)}function Gs(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Zs=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function Qs(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,Zs.call(window,()=>{s=!1,i.apply(t,e)}))}}function Ro(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const hi=i=>i==="start"?"left":i==="end"?"right":"center",H=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,zo=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function Eo(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:r,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,h=r.axis,{min:d,max:f,minDefined:u,maxDefined:p}=r.getUserBounds();if(u){if(n=Math.min(kt(l,h,d).lo,e?s:kt(t,h,r.getPixelForValue(d)).lo),c){const g=l.slice(0,n+1).reverse().findIndex(m=>!A(m[a.axis]));n-=Math.max(0,g)}n=Y(n,0,s-1)}if(p){let g=Math.max(kt(l,r.axis,f,!0).hi+1,e?0:kt(t,h,r.getPixelForValue(f),!0).hi+1);if(c){const m=l.slice(g-1).findIndex(b=>!A(b[a.axis]));g+=Math.max(0,m)}o=Y(g,n,s)-n}else o=s-n}return{start:n,count:o}}function Bo(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const he=i=>i===0||i===1,Ai=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*Z/e)),Li=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*Z/e)+1,Kt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*G)+1,easeOutSine:i=>Math.sin(i*G),easeInOutSine:i=>-.5*(Math.cos(E*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>he(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>he(i)?i:Ai(i,.075,.3),easeOutElastic:i=>he(i)?i:Li(i,.075,.3),easeInOutElastic(i){return he(i)?i:i<.5?.5*Ai(i*2,.1125,.45):.5+.5*Li(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Kt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Kt.easeInBounce(i*2)*.5:Kt.easeOutBounce(i*2-1)*.5+.5};function di(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ii(i){return di(i)?i:new Gt(i)}function ze(i){return di(i)?i:new Gt(i).saturate(.5).darken(.1).hexString()}const Ho=["x","y","borderWidth","radius","tension"],Vo=["color","borderColor","backgroundColor"];function Wo(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Vo},numbers:{type:"number",properties:Ho}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function No(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Fi=new Map;function jo(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Fi.get(e);return s||(s=new Intl.NumberFormat(i,t),Fi.set(e,s)),s}function Js(i,t,e){return jo(t,e).format(i)}const $o={values(i){return z(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=Yo(i,e)}const r=Xs(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Js(i,s,l)}};function Yo(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var tn={formatters:$o};function Uo(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:tn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const wt=Object.create(null),Je=Object.create(null);function qt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>ze(n.backgroundColor),this.hoverBorderColor=(s,n)=>ze(n.borderColor),this.hoverColor=(s,n)=>ze(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ee(this,t,e)}get(t){return qt(this,t)}describe(t,e){return Ee(Je,t,e)}override(t,e){return Ee(wt,t,e)}route(t,e,s,n){const o=qt(this,t),r=qt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return O(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var R=new Xo({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Wo,No,Uo]);function Ko(i){return!i||A(i.size)||A(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ri(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function bt(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function zi(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function ti(i,t,e,s){en(i,t,e,s,null)}function en(i,t,e,s,n){let o,r,a,l,c,h,d,f;const u=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*So;if(u&&typeof u=="object"&&(o=u.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),u){default:n?i.ellipse(e,s,n/2,g,0,0,Z):i.arc(e,s,g,0,Z),i.closePath();break;case"triangle":h=n?n/2:g,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Di,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Di,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(m+mt)*l,d=Math.cos(m+mt)*(n?n/2-c:l),a=Math.sin(m+mt)*l,f=Math.sin(m+mt)*(n?n/2-c:l),i.arc(e-d,s-a,c,m-E,m-G),i.arc(e+f,s-r,c,m-G,m),i.arc(e+d,s+a,c,m,m+G),i.arc(e-f,s+r,c,m+G,m+E),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=mt;case"rectRot":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+f,s-r),i.lineTo(e+d,s+a),i.lineTo(e-f,s+r),i.closePath();break;case"crossRot":m+=mt;case"cross":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+f,s-r),i.lineTo(e-f,s+r);break;case"star":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+f,s-r),i.lineTo(e-f,s+r),m+=mt,d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+f,s-r),i.lineTo(e-f,s+r);break;case"line":r=n?n/2:Math.cos(m)*g,a=Math.sin(m)*g,i.moveTo(e-r,s-a),i.lineTo(e+r,s+a);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:g),s+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function te(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Zo(i,o),l=0;l+i||0;function sn(i,t){const e={},s=O(t),n=s?Object.keys(t):t,o=O(i)?s?r=>P(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=sr(o(r));return e}function nn(i){return sn(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Tt(i){return sn(i,["topLeft","topRight","bottomLeft","bottomRight"])}function q(i){const t=nn(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function V(i,t){i=i||{},t=t||R.font;let e=P(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=P(i.style,t.style);s&&!(""+s).match(er)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:P(i.family,t.family),lineHeight:ir(P(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:P(i.weight,t.weight),string:""};return n.string=Ko(n),n}function de(i,t,e,s){let n,o,r;for(n=0,o=i.length;ne&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function Mt(i,t){return Object.assign(Object.create(i),t)}function fi(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=ln("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>fi([a,...i],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return rn(a,l,()=>fr(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Bi(a).includes(l)},ownKeys(a){return Bi(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function It(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:on(i,s),setContext:o=>It(i,o,e,s),override:o=>It(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return rn(o,r,()=>rr(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function on(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ft(e)?e:()=>e,isIndexable:ft(s)?s:()=>s}}const or=(i,t)=>i?i+li(t):t,ui=(i,t)=>O(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function rn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function rr(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return ft(a)&&r.isScriptable(t)&&(a=ar(t,a,i,e)),z(a)&&a.length&&(a=lr(t,a,i,r.isIndexable)),ui(t,a)&&(a=It(a,n,o&&o[t],r)),a}function ar(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||s);return a.delete(i),ui(i,l)&&(l=gi(n._scopes,n,i,l)),l}function lr(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(O(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=gi(c,n,i,h);t.push(It(d,o,r&&r[i],a))}}return t}function an(i,t,e){return ft(i)?i(t,e):i}const cr=(i,t)=>i===!0?t:typeof i=="string"?Lt(t,i):void 0;function hr(i,t,e,s,n){for(const o of t){const r=cr(e,o);if(r){i.add(r);const a=an(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==s)return a}else if(r===!1&&typeof s<"u"&&e!==s)return null}return!1}function gi(i,t,e,s){const n=t._rootScopes,o=an(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=Ei(a,r,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=Ei(a,r,o,l,s),l===null)?!1:fi(Array.from(a),[""],n,o,()=>dr(t,e,s))}function Ei(i,t,e,s,n){for(;e;)e=hr(i,t,e,s,n);return e}function dr(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return z(n)&&O(e)?e:n||{}}function fr(i,t,e,s){let n;for(const o of t)if(n=ln(or(o,i),e),typeof n<"u")return ui(i,n)?gi(e,s,i,n):n}function ln(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Bi(i){let t=i._keys;return t||(t=i._keys=ur(i._scopes)),t}function ur(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}const gr=Number.EPSILON||1e-14,Ft=(i,t)=>ti==="x"?"y":"x";function pr(i,t,e,s){const n=i.skip?t:i,o=t,r=e.skip?t:e,a=Qe(o,n),l=Qe(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,f=s*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+f*(r.x-n.x),y:o.y+f*(r.y-n.y)}}}function mr(i,t,e){const s=i.length;let n,o,r,a,l,c=Ft(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")xr(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,r=i.length;oi.ownerDocument.defaultView.getComputedStyle(i,null);function vr(i,t){return Ae(i).getPropertyValue(t)}const kr=["top","right","bottom","left"];function St(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=kr[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Sr=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function wr(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(Sr(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function _t(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=Ae(e),o=n.boxSizing==="border-box",r=St(n,"padding"),a=St(n,"border","width"),{x:l,y:c,box:h}=wr(i,e),d=r.left+(h&&a.left),f=r.top+(h&&a.top);let{width:u,height:p}=t;return o&&(u-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/u*e.width/s),y:Math.round((c-f)/p*e.height/s)}}function Mr(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&mi(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=Ae(o),l=St(a,"border","width"),c=St(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=De(a.maxWidth,o,"clientWidth"),n=De(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||Me,maxHeight:n||Me}}const ue=i=>Math.round(i*10)/10;function Pr(i,t,e,s){const n=Ae(i),o=St(n,"margin"),r=De(n.maxWidth,i,"clientWidth")||Me,a=De(n.maxHeight,i,"clientHeight")||Me,l=Mr(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const f=St(n,"border","width"),u=St(n,"padding");c-=u.width+f.width,h-=u.height+f.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=ue(Math.min(c,r,l.maxWidth)),h=ue(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ue(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=ue(Math.floor(h*s))),{width:c,height:h}}function Hi(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const Dr=(function(){let i=!1;try{const t={get passive(){return i=!0,!1}};pi()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();function Vi(i,t){const e=vr(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function yt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Or(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function Cr(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=yt(i,n,e),a=yt(n,o,e),l=yt(o,t,e),c=yt(r,a,e),h=yt(a,l,e);return yt(c,h,e)}const Tr=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Ar=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function At(i,t,e){return i?Tr(t,e):Ar()}function hn(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function dn(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function fn(i){return i==="angle"?{between:Ks,compare:To,normalize:it}:{between:ct,compare:(t,e)=>t-e,normalize:t=>t}}function Wi({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Lr(i,t,e){const{property:s,start:n,end:o}=e,{between:r,normalize:a}=fn(s),l=t.length;let{start:c,end:h,loop:d}=i,f,u;if(d){for(c+=l,h+=l,f=0,u=l;fl(n,y,b)&&a(n,y)!==0,_=()=>a(o,b)===0||l(o,y,b),w=()=>g||v(),S=()=>!g||_();for(let k=h,M=h;k<=d;++k)x=t[k%r],!x.skip&&(b=c(x[s]),b!==y&&(g=l(b,n,o),m===null&&w()&&(m=a(b,n)===0?k:M),m!==null&&S()&&(p.push(Wi({start:m,end:k,loop:f,count:r,style:u})),m=null),M=k,y=b));return m!==null&&p.push(Wi({start:m,end:d,loop:f,count:r,style:u})),p}function gn(i,t){const e=[],s=i.segments;for(let n=0;nn&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Fr(i,t,e,s){const n=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function Rr(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:r,end:a}=Ir(e,n,o,s);if(s===!0)return Ni(i,[{start:r,end:a,loop:o}],e,t);const l=aa({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Zs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{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&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ot=new Hr;const $i="transparent",Vr={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Ii(i||$i),n=s.valid&&Ii(t||$i);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Wr{constructor(t,e,s,n){const o=e[s];n=de([t.to,n,o,t.from]);const r=de([t.from,o,n]);this._active=!0,this._fn=t.fn||Vr[t.type||typeof r],this._easing=Kt[t.easing]||Kt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=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=de([t.to,e,n,t.from]),this._from=de([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n{const o=t[n];if(!O(o))return;const r={};for(const a of e)r[a]=o[a];(z(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=jr(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Nr(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),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"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const f=s.get(c);if(d)if(f&&d.active()){d.update(f,h,a);continue}else d.cancel();if(!f||!f.duration){t[c]=h;continue}o[c]=d=new Wr(f,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return ot.add(this._chart,s),!0}}function Nr(i,t){const e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function Ki(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=Xr(o,r,s),d=t.length;let f;for(let u=0;ue[s].axis===t).shift()}function Gr(i,t){return Mt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Zr(i,t,e){return Mt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Bt(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const Ve=i=>i==="reset"||i==="none",qi=(i,t)=>t?i:Object.assign({},i),Qr=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:bn(e,!0),values:null};class bi{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Be(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Bt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,f,u,p)=>d==="x"?f:d==="r"?p:u,o=e.xAxisID=P(s.xAxisID,He(t,"x")),r=e.yAxisID=P(s.yAxisID,He(t,"y")),a=e.rAxisID=P(s.rAxisID,He(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ti(this._data,this),t._stacked&&Bt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(O(e)){const n=this._cachedMeta;this._data=Ur(e,n)}else if(s!==e){if(s){Ti(s,this);const n=this._cachedMeta;Bt(n),n._parsed=[]}e&&Object.isExtensible(e)&&Fo(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Be(e.vScale,e),e.stack!==s.stack&&(n=!0,Bt(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(Ki(this,e._parsed),e._stacked=Be(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,f;if(this._parsing===!1)s._parsed=n,s._sorted=!0,f=n;else{z(n[t])?f=this.parseArrayData(s,n,t,e):O(n[t])?f=this.parseObjectData(s,n,t,e):f=this.parsePrimitiveData(s,n,t,e);const u=()=>d[a]===null||c&&d[a]g||d=0;--f)if(!p()){this.updateRangeFromParsed(c,t,u,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=e.length;n=0&&tthis.getContext(s,n,e),g=c.resolveNamedOptions(f,u,p,d);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(qi(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),f=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(f,this.getContext(t,s,e))}const c=new mn(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ve(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:r}}updateElement(t,e,s,n){Ve(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Ve(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=s.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;an-o))}return i._cache.$bar}function ta(i){const t=i.iScale,e=Jr(t,i.type);let s=t._length,n,o,r,a;const l=()=>{r===32767||r===-32768||(Qt(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(n=0,o=e.length;n0?n[i-1]:null,a=iMath.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:r,max:a}}function xn(i,t,e,s){return z(i)?sa(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Gi(i,t,e,s){const n=i.iScale,o=i.vScale,r=n.getLabels(),a=n===o,l=[];let c,h,d,f;for(c=e,h=e+s;c=e?1:-1)}function oa(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.baseh.controller.options.grouped),o=s.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[s.axis],c=h=>{const d=h._parsed.find(u=>u[s.axis]===l),f=d&&d[h.vScale.axis];if(A(f)||isNaN(f))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||r.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&r.push(h.stack),h.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)t[P(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,r;for(o=0,r=e.data.length;o0&&this.getParsed(e-1);for(let _=0;_=x){S.skip=!0;continue}const k=this.getParsed(_),M=A(k[u]),C=S[f]=r.getPixelForValue(k[f],_),D=S[u]=o||M?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[u],_);S.skip=isNaN(C)||isNaN(D)||M,S.stop=_>0&&Math.abs(k[f]-v[f])>m,g&&(S.parsed=k,S.raw=c.data[_]),d&&(S.options=h||this.resolveDataElementOptions(_,w.active?"active":n)),b||this.updateElement(w,_,S,n),v=k}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function xt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xi{static override(t){Object.assign(xi.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return xt()}parse(){return xt()}format(){return xt()}add(){return xt()}diff(){return xt()}startOf(){return xt()}endOf(){return xt()}}var da={_date:xi};function fa(i,t,e,s){const{controller:n,data:o,_sorted:r}=i,a=n._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?Lo:kt;if(s){if(n._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){const f=c(o,t,e-d),u=c(o,t,e+d);return{lo:f.lo,hi:u.hi}}}}else{const h=c(o,t,e);if(l){const{vScale:d}=n._cachedMeta,{_parsed:f}=i,u=f.slice(0,h.lo+1).reverse().findIndex(g=>!A(g[d.axis]));h.lo-=Math.max(0,u);const p=f.slice(h.hi).findIndex(g=>!A(g[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function Le(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a{l[r]&&l[r](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:o}var ma={modes:{index(i,t,e,s){const n=_t(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Ne(i,n,o,s,r):je(i,n,o,!1,s,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=_t(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?Ne(i,n,o,s,r):je(i,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;he.pos===t)}function ts(i,t){return i.filter(e=>_n.indexOf(e.pos)===-1&&e.box.axis===t)}function Vt(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function ba(i){const t=[];let e,s,n,o,r,a;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=Vt(Ht(t,"left"),!0),n=Vt(Ht(t,"right")),o=Vt(Ht(t,"top"),!0),r=Vt(Ht(t,"bottom")),a=ts(t,"x"),l=ts(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:Ht(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function es(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function yn(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function va(i,t,e,s){const{pos:n,box:o}=e,r=i.maxPadding;if(!O(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&yn(r,o.getPadding());const a=Math.max(0,t.outerWidth-es(r,i,"left","right")),l=Math.max(0,t.outerHeight-es(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function ka(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Sa(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return s(i?["left","right"]:["top","bottom"])}function $t(i,t,e,s){const n=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),f=Object.assign({},n);yn(f,q(s));const u=Object.assign({maxPadding:f,w:o,h:r,x:n.left,y:n.top},n),p=_a(l.concat(c),d);$t(a.fullSize,u,d,p),$t(l,u,d,p),$t(c,u,d,p)&&$t(l,u,d,p),ka(u),is(a.leftAndTop,u,d,p),u.x+=u.w,u.y+=u.h,is(a.rightAndBottom,u,d,p),i.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},L(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}};class vn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class wa extends vn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ve="$chartjs",Ma={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ss=i=>i===null||i==="";function Pa(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[ve]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",ss(n)){const o=Vi(i,"width");o!==void 0&&(i.width=o)}if(ss(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Vi(i,"height");o!==void 0&&(i.height=o)}return i}const kn=Dr?{passive:!0}:!1;function Da(i,t,e){i&&i.addEventListener(t,e,kn)}function Oa(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,kn)}function Ca(i,t){const e=Ma[i.type]||i.type,{x:s,y:n}=_t(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Oe(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Ta(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Oe(a.addedNodes,s),r=r&&!Oe(a.removedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Aa(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Oe(a.removedNodes,s),r=r&&!Oe(a.addedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const ie=new Map;let ns=0;function Sn(){const i=window.devicePixelRatio;i!==ns&&(ns=i,ie.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function La(i,t){ie.size||window.addEventListener("resize",Sn),ie.set(i,t)}function Ia(i){ie.delete(i),ie.size||window.removeEventListener("resize",Sn)}function Fa(i,t,e){const s=i.canvas,n=s&&mi(s);if(!n)return;const o=Qs((a,l)=>{const c=n.clientWidth;e(a,l),c{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(n),La(i,o),r}function $e(i,t,e){e&&e.disconnect(),t==="resize"&&Ia(i)}function Ra(i,t,e){const s=i.canvas,n=Qs(o=>{i.ctx!==null&&e(Ca(o,i))},i);return Da(s,t,n),n}class za extends vn{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Pa(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[ve])return!1;const s=e[ve].initial;["height","width"].forEach(o=>{const r=s[o];A(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[ve],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Ta,detach:Aa,resize:Fa}[e]||Ra;n[e]=r(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:$e,detach:$e,resize:$e}[e]||Oa)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Pr(t,e,s,n)}isAttached(t){const e=t&&mi(t);return!!(e&&e.isConnected)}}function Ea(i){return!pi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?wa:za}class ut{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Jt(this.x)&&Jt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}function Ba(i,t){const e=i.options.ticks,s=Ha(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?Wa(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return Na(t,c,o,r/n),c;const h=Va(o,t,n);if(r>0){let d,f;const u=r>1?Math.round((l-a)/(r-1)):null;for(me(t,c,h,A(u)?0:a-u,a),d=0,f=r-1;dn)return l}return Math.max(n,1)}function Wa(i){const t=[];let e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,os=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,rs=(i,t)=>Math.min(t||i,i);function as(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;or+a)))return l}function Ua(i,t){L(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:J(e,J(s,e)),max:J(s,J(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=nr(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,f=h.highest.height,u=Y(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/s:u/(s-1),d+6>a&&(a=u/(s-(t.offset?.5:1)),l=this.maxHeight-Wt(t.grid)-e.padding-ls(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),r=Oo(Math.min(Math.asin(Y((h.highest.height+6)/a,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(f/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=ls(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Wt(o)+l):(t.height=this.maxHeight,t.width=Wt(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:f}=this._getLabelSizes(),u=s.padding*2,p=vt(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=s.mirror?0:m*d.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+b+u)}else{const b=s.mirror?0:g*d.width+m*f.height;t.width=Math.min(this.maxWidth,t.width+b+u)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,u=0;l?c?(f=n*t.width,u=s*e.height):(f=s*t.height,u=n*e.width):o==="start"?u=e.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,u=e.width/2),this.paddingLeft=Math.max((f-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((u-d+r)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){I(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:r[M]||0,height:a[M]||0});return{first:k(0),last:k(e-1),widest:k(w),highest:k(S),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Ao(this._alignToPixels?bt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*n?a/s:l/n:l*n0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Wt(o),u=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(B){return bt(s,B,g)};let x,y,v,_,w,S,k,M,C,D,T,N;if(r==="top")x=b(this.bottom),S=this.bottom-f,M=x-m,D=b(t.top)+m,N=t.bottom;else if(r==="bottom")x=b(this.top),D=t.top,N=b(t.bottom)-m,S=x+m,M=this.top+f;else if(r==="left")x=b(this.right),w=this.right-f,k=x-m,C=b(t.left)+m,T=t.right;else if(r==="right")x=b(this.left),C=t.left,T=b(t.right)-m,w=x+m,k=this.left+f;else if(e==="x"){if(r==="center")x=b((t.top+t.bottom)/2+.5);else if(O(r)){const B=Object.keys(r)[0],U=r[B];x=b(this.chart.scales[B].getPixelForValue(U))}D=t.top,N=t.bottom,S=x+m,M=S+f}else if(e==="y"){if(r==="center")x=b((t.left+t.right)/2);else if(O(r)){const B=Object.keys(r)[0],U=r[B];x=b(this.chart.scales[B].getPixelForValue(U))}w=x-m,k=w-f,C=t.left,T=t.right}const Q=P(n.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/Q));for(y=0;y0&&(pt-=gt/2);break}re={left:pt,top:Et,width:gt+Dt.width,height:zt+Dt.height,color:F.backdropColor}}m.push({label:v,font:M,textOffset:T,options:{rotation:g,color:U,strokeColor:ne,strokeWidth:oe,textAlign:Pt,textBaseline:N,translation:[_,w],backdrop:re}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-vt(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,r=n.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");R.route(o,n,l,a)})}function Ja(i){return"id"in i&&"defaults"in i}class tl{constructor(){this.controllers=new be(bi,"datasets",!0),this.elements=new be(ut,"elements"),this.plugins=new be(Object,"plugins"),this.scales=new be(Rt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):L(n,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,s){const n=li(t);I(s["before"+n],[],s),e[t](s),I(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;eo.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function il(i){const t={},e=[],s=Object.keys(et.plugins.items);for(let o=0;o1&&cs(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function hs(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function cl(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return hs(i,"x",e[0])||hs(i,"y",e[0])}return{}}function hl(i,t){const e=wt[i.type]||{scales:{}},s=t.scales||{},n=ei(i.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!O(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=ii(r,a,cl(r,i),R.scales[a.type]),c=al(l,n),h=e.scales||{};o[r]=Ut(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||ei(a,t),h=(wt[a]||{}).scales||{};Object.keys(h).forEach(d=>{const f=rl(d,l),u=r[f+"AxisID"]||f;o[u]=o[u]||Object.create(null),Ut(o[u],[{axis:f},s[u],h[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Ut(a,[R.scales[a.type],R.scale])}),o}function wn(i){const t=i.options||(i.options={});t.plugins=P(t.plugins,{}),t.scales=hl(i,t)}function Mn(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function dl(i){return i=i||{},i.data=Mn(i.data),wn(i),i}const ds=new Map,Pn=new Set;function xe(i,t){let e=ds.get(i);return e||(e=t(),ds.set(i,e),Pn.add(e)),e}const Nt=(i,t,e)=>{const s=Lt(t,e);s!==void 0&&i.add(s)};class fl{constructor(t){this._config=dl(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Mn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),wn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return xe(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return xe(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return xe(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return xe(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,r=this._cachedScopes(t,s),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Nt(l,t,d))),h.forEach(d=>Nt(l,n,d)),h.forEach(d=>Nt(l,wt[o]||{},d)),h.forEach(d=>Nt(l,R,d)),h.forEach(d=>Nt(l,Je,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Pn.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,wt[e]||{},R.datasets[e]||{},{type:e},R,Je]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=fs(this._resolverCache,t,n);let l=r;if(gl(r,e)){o.$shared=!1,s=ft(s)?s():s;const c=this.createResolver(t,s,a);l=It(r,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=fs(this._resolverCache,t,s);return O(e)?It(o,e,void 0,n):o}}function fs(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:fi(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const ul=i=>O(i)&&Object.getOwnPropertyNames(i).some(t=>ft(i[t]));function gl(i,t){const{isScriptable:e,isIndexable:s}=on(i);for(const n of t){const o=e(n),r=s(n),a=(r||o)&&i[n];if(o&&(ft(a)||ul(a))||r&&z(a))return!0}return!1}var pl="4.5.0";const ml=["top","bottom","left","right","chartArea"];function us(i,t){return i==="top"||i==="bottom"||ml.indexOf(i)===-1&&t==="x"}function gs(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function ps(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),I(e&&e.onComplete,[i],t)}function bl(i){const t=i.chart,e=t.options.animation;I(e&&e.onProgress,[i],t)}function Dn(i){return pi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const ke={},ms=i=>{const t=Dn(i);return Object.values(ke).filter(e=>e.canvas===t).pop()};function xl(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const r=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=r)}}}function _l(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}let _i=class{static defaults=R;static instances=ke;static overrides=wt;static registry=et;static version=pl;static getChart=ms;static register(...t){et.add(...t),bs()}static unregister(...t){et.remove(...t),bs()}constructor(t,e){const s=this.config=new fl(e),n=Dn(t),o=ms(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Ea(n)),this.platform.updateConfig(s);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=po(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new el,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ro(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],ke[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ot.listen(this,"complete",ps),ot.listen(this,"progress",bl),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return A(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return et}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return zi(this.canvas,this.ctx),this}stop(){return ot.stop(this),this}resize(t,e){ot.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Hi(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),I(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};L(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=ii(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),L(o,r=>{const a=r.options,l=a.id,c=ii(l,a),h=P(a.type,r.dtype);(a.position===void 0||us(a.position,c)!==us(r.dposition))&&(a.position=r.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const f=et.getScale(h);d=new f({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(a,t)}),L(n,(r,a)=>{r||delete s[a]}),L(s,r=>{K.configure(this,r,r.options),K.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(gs("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){L(this.scales,t=>{K.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Pi(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const r=s==="_removeElements"?-o:o;xl(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;K.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],L(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=pn(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&Ce(e,n),t.controller.draw(),n&&Te(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return te(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=ma.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Mt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);Qt(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ot.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};L(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){L(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},L(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Se(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),r=o(e,t),a=s?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,s,r),l=vo(t),c=_l(t,this._lastEvent,s,l);s&&(this._lastEvent=null,I(o.onHover,[t,a,this],this),l&&I(o.onClick,[t,a,this],this));const h=!Se(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}};function bs(){return L(_i.instances,i=>i._plugins.invalidate())}function On(i,t,e=t){i.lineCap=P(e.borderCapStyle,t.borderCapStyle),i.setLineDash(P(e.borderDash,t.borderDash)),i.lineDashOffset=P(e.borderDashOffset,t.borderDashOffset),i.lineJoin=P(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=P(e.borderWidth,t.borderWidth),i.strokeStyle=P(e.borderColor,t.borderColor)}function yl(i,t,e){i.lineTo(e.x,e.y)}function vl(i){return i.stepped?qo:i.tension||i.cubicInterpolationMode==="monotone"?Go:yl}function Cn(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),h=na&&o>a;return{count:s,start:l,loop:t.loop,ilen:c(r+(c?a-v:v))%o,y=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(u=n[x(0)],i.moveTo(u.x,u.y)),f=0;f<=a;++f){if(u=n[x(f)],u.skip)continue;const v=u.x,_=u.y,w=v|0;w===p?(_m&&(m=_),h=(d*h+v)/++d):(y(),i.lineTo(v,_),p=w,d=0,g=m=_),b=_}y()}function si(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Sl:kl}function wl(i){return i.stepped?Or:i.tension||i.cubicInterpolationMode==="monotone"?Cr:yt}function Ml(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),On(i,t.options),i.stroke(n)}function Pl(i,t,e,s){const{segments:n,options:o}=t,r=si(t);for(const a of n)On(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const Dl=typeof Path2D=="function";function Ol(i,t,e,s){Dl&&!t.options.segment?Ml(i,t,e,s):Pl(i,t,e,s)}class yi extends ut{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;yr(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Rr(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,r=gn(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],l=wl(s);let c,h;for(c=0,h=r.length;c{a=Ie(r,a,n);const l=n[r],c=n[a];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Ie(i,t,e){for(;t>i;t--){const s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function _s(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function An(i,t){let e=[],s=!1;return z(i)?(s=!0,e=i):e=Rl(i,t),e.length?new yi({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function ys(i){return i&&i.fill!==!1}function zl(i,t,e){let n=i[t].fill;const o=[t];let r;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!W(n))return n;if(r=i[n],!r)return!1;if(r.visible)return n;o.push(n),n=r.fill}return!1}function El(i,t,e){const s=Wl(i);if(O(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return W(n)&&Math.floor(n)===n?Bl(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Bl(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function Hl(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:O(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Vl(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:O(i)?s=i.value:s=t.getBaseValue(),s}function Wl(i){const t=i.options,e=t.fill;let s=P(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Nl(i){const{scale:t,index:e,line:s}=i,n=[],o=s.segments,r=s.points,a=jl(t,e);a.push(An({x:null,y:t.bottom},s));for(let l=0;l=0;--r){const a=n[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),s&&a.fill&&Xe(i.ctx,a,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;ys(o)&&Xe(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const s=t.meta.$filler;!ys(s)||e.drawTime!=="beforeDatasetDraw"||Xe(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ws=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},Jl=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class Ms extends ut{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=I(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=V(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=ws(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,u=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(d+=h,c[c.length-(g>0?0:1)]=0,u+=h,f++),l[g]={left:0,top:u,row:f,width:m,height:n},c[c.length-1]+=m+a}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let d=a,f=0,u=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:x,itemHeight:y}=tc(s,e,o,m,n);b>0&&u+y+2*a>h&&(d+=f+a,c.push({width:f,height:u}),p+=f+a,g++,f=u=0),l[b]={left:p,top:u,col:g,width:x,height:y},f=Math.max(f,x),u+=y+a}),d+=f,c.push({width:f,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,r=At(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=H(s,this.left+n,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=H(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=H(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=H(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ce(t,this),this._draw(),Te(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:r}=t,a=R.color,l=At(t.rtl,this.left,this.width),c=V(r.font),{padding:h}=r,d=c.size,f=d/2;let u;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=ws(r,d),b=function(w,S,k){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const M=P(k.lineWidth,1);if(n.fillStyle=P(k.fillStyle,a),n.lineCap=P(k.lineCap,"butt"),n.lineDashOffset=P(k.lineDashOffset,0),n.lineJoin=P(k.lineJoin,"miter"),n.lineWidth=M,n.strokeStyle=P(k.strokeStyle,a),n.setLineDash(P(k.lineDash,[])),r.usePointStyle){const C={radius:g*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:M},D=l.xPlus(w,p/2),T=S+f;en(n,C,D,T,r.pointStyleWidth&&p)}else{const C=S+Math.max((d-g)/2,0),D=l.leftForLtr(w,p),T=Tt(k.borderRadius);n.beginPath(),Object.values(T).some(N=>N!==0)?Pe(n,{x:D,y:C,w:p,h:g,radius:T}):n.rect(D,C,p,g),n.fill(),M!==0&&n.stroke()}n.restore()},x=function(w,S,k){ee(n,k.text,w,S+m/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},y=this.isHorizontal(),v=this._computeTitleHeight();y?u={x:H(o,this.left+h,this.right-s[0]),y:this.top+h+v,line:0}:u={x:this.left+h,y:H(o,this.top+v+h,this.bottom-e[0].height),line:0},hn(this.ctx,t.textDirection);const _=m+h;this.legendItems.forEach((w,S)=>{n.strokeStyle=w.fontColor,n.fillStyle=w.fontColor;const k=n.measureText(w.text).width,M=l.textAlign(w.textAlign||(w.textAlign=r.textAlign)),C=p+f+k;let D=u.x,T=u.y;l.setWidth(this.width),y?S>0&&D+C+h>this.right&&(T=u.y+=_,u.line++,D=u.x=H(o,this.left+h,this.right-s[u.line])):S>0&&T+_>this.bottom&&(D=u.x=D+e[u.line].width+h,u.line++,T=u.y=H(o,this.top+v+h,this.bottom-e[u.line].height));const N=l.x(D);if(b(N,T,w),D=zo(M,D+p+f,y?D+C:this.right,t.rtl),x(l.x(D),T,w),y)u.x+=C+h;else if(typeof w.text!="string"){const Q=c.lineHeight;u.y+=In(w,Q)+h}else u.y+=_}),dn(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=V(e.font),n=q(e.padding);if(!e.display)return;const o=At(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),h=this.top+c,d=H(t.align,d,this.right-f);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+H(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const u=H(a,d,d+f);r.textAlign=o.textAlign(hi(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=s.string,ee(r,e.text,u,h,s)}_computeTitleHeight(){const t=this.options.title,e=V(t.font),s=q(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(ct(t,this.left,this.right)&&ct(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>r.length?o:r)),t+e.size/2+s.measureText(n).width}function ic(i,t,e){let s=i;return typeof t.text!="string"&&(s=In(t,e)),s}function In(i,t){const e=i.text?i.text.length:0;return t*e}function sc(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Lc={id:"legend",_element:Ms,start(i,t,e){const s=i.legend=new Ms({ctx:i.ctx,options:e,chart:i});K.configure(i,s,e),K.addBox(i,s)},stop(i){K.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;K.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=q(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Fn extends ut{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=z(s.text)?s.text.length:1;this._padding=q(s.padding);const o=n*V(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:r}=this,a=r.align;let l=0,c,h,d;return this.isHorizontal()?(h=H(a,s,o),d=e+t,c=o-s):(r.position==="left"?(h=s+t,d=H(a,n,e),l=E*-.5):(h=o-t,d=H(a,e,n),l=E*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=V(e.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);ee(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:hi(e.align),textBaseline:"middle",translation:[r,a]})}}function nc(i,t){const e=new Fn({ctx:i.ctx,options:t,chart:i});K.configure(i,e,t),K.addBox(i,e),i.titleBlock=e}var Ic={id:"title",_element:Fn,start(i,t,e){nc(i,e)},stop(i){const t=i.titleBlock;K.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;K.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yt={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;ta+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;oMath.max(Math.min(i,e),t);function jt(i){return lt(se(i*2.55),0,255)}function dt(i){return lt(se(i*255),0,255)}function at(i){return lt(se(i/2.55)/100,0,1)}function vi(i){return lt(se(i*100),0,100)}const X={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},Ze=[..."0123456789ABCDEF"],Un=i=>Ze[i&15],Xn=i=>Ze[(i&240)>>4]+Ze[i&15],ae=i=>(i&240)>>4===(i&15),Kn=i=>ae(i.r)&&ae(i.g)&&ae(i.b)&&ae(i.a);function qn(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&X[i[1]]*17,g:255&X[i[2]]*17,b:255&X[i[3]]*17,a:t===5?X[i[4]]*17:255}:(t===7||t===9)&&(e={r:X[i[1]]<<4|X[i[2]],g:X[i[3]]<<4|X[i[4]],b:X[i[5]]<<4|X[i[6]],a:t===9?X[i[7]]<<4|X[i[8]]:255})),e}const Gn=(i,t)=>i<255?t(i):"";function Zn(i){var t=Kn(i)?Un:Xn;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Gn(i.a,t):void 0}const Qn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function js(i,t,e){const s=t*Math.min(e,1-e),n=(o,r=(o+i/30)%12)=>e-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Jn(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function to(i,t,e){const s=js(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function eo(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-r):h/(o+r),l=eo(e,s,n,h,o),l=l*60+.5),[l|0,c||0,a]}function ri(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(dt)}function ai(i,t,e){return ri(js,i,t,e)}function io(i,t,e){return ri(to,i,t,e)}function so(i,t,e){return ri(Jn,i,t,e)}function $s(i){return(i%360+360)%360}function no(i){const t=Qn.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?jt(+t[5]):dt(+t[5]));const n=$s(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=io(n,o,r):t[1]==="hsv"?s=so(n,o,r):s=ai(n,o,r),{r:s[0],g:s[1],b:s[2],a:e}}function oo(i,t){var e=oi(i);e[0]=$s(e[0]+t),e=ai(e),i.r=e[0],i.g=e[1],i.b=e[2]}function ro(i){if(!i)return;const t=oi(i),e=t[0],s=vi(t[1]),n=vi(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${at(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const ki={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"},Si={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ao(){const i={},t=Object.keys(Si),e=Object.keys(ki);let s,n,o,r,a;for(s=0;s>16&255,o>>8&255,o&255]}return i}let le;function lo(i){le||(le=ao(),le.transparent=[0,0,0,0]);const t=le[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const co=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ho(i){const t=co.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const r=+t[7];e=t[8]?jt(r):lt(r*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?jt(s):lt(s,0,255)),n=255&(t[4]?jt(n):lt(n,0,255)),o=255&(t[6]?jt(o):lt(o,0,255)),{r:s,g:n,b:o,a:e}}}function fo(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${at(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Re=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Ot=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function uo(i,t,e){const s=Ot(at(i.r)),n=Ot(at(i.g)),o=Ot(at(i.b));return{r:dt(Re(s+e*(Ot(at(t.r))-s))),g:dt(Re(n+e*(Ot(at(t.g))-n))),b:dt(Re(o+e*(Ot(at(t.b))-o))),a:i.a+e*(t.a-i.a)}}function ce(i,t,e){if(i){let s=oi(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=ai(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Ys(i,t){return i&&Object.assign(t||{},i)}function wi(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=dt(i[3]))):(t=Ys(i,{r:0,g:0,b:0,a:1}),t.a=dt(t.a)),t}function go(i){return i.charAt(0)==="r"?ho(i):no(i)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let s;e==="object"?s=wi(t):e==="string"&&(s=qn(t)||lo(t)||go(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Ys(this._rgb);return t&&(t.a=at(t.a)),t}set rgb(t){this._rgb=wi(t)}rgbString(){return this._valid?fo(this._rgb):void 0}hexString(){return this._valid?Zn(this._rgb):void 0}hslString(){return this._valid?ro(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=uo(this._rgb,t._rgb,e)),this}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=dt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=se(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ce(this._rgb,2,t),this}darken(t){return ce(this._rgb,2,-t),this}saturate(t){return ce(this._rgb,1,t),this}desaturate(t){return ce(this._rgb,1,-t),this}rotate(t){return oo(this._rgb,t),this}}function nt(){}const po=(()=>{let i=0;return()=>i++})();function A(i){return i==null}function z(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function O(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function W(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function J(i,t){return W(i)?i:t}function P(i,t){return typeof i>"u"?t:i}const mo=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function I(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function L(i,t,e,s){let n,o,r;if(z(i))for(o=i.length,n=0;ni,x:i=>i.x,y:i=>i.y};function _o(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function yo(i){const t=_o(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function Lt(i,t){return(Mi[t]||(Mi[t]=yo(t)))(i)}function li(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Qt=i=>typeof i<"u",ft=i=>typeof i=="function",Pi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function vo(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const E=Math.PI,Z=2*E,ko=Z+E,Me=Number.POSITIVE_INFINITY,So=E/180,G=E/2,mt=E/4,Di=E*2/3,Xs=Math.log10,st=Math.sign;function Xt(i,t,e){return Math.abs(i-t)n-o).pop(),t}function Mo(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Jt(i){return!Mo(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Po(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Do(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function ci(i,t,e){e=e||(r=>i[r]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const kt=(i,t,e,s)=>ci(i,e,s?n=>{const o=i[n][t];return oi[n][t]ci(i,e,s=>i[s][t]>=e);function Io(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{const s="_onData"+li(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Ti(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(qs.forEach(o=>{delete i[o]}),delete i._chartjs)}function Gs(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Zs=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function Qs(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,Zs.call(window,()=>{s=!1,i.apply(t,e)}))}}function Ro(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const hi=i=>i==="start"?"left":i==="end"?"right":"center",H=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,zo=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function Eo(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:r,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,h=r.axis,{min:d,max:f,minDefined:u,maxDefined:p}=r.getUserBounds();if(u){if(n=Math.min(kt(l,h,d).lo,e?s:kt(t,h,r.getPixelForValue(d)).lo),c){const g=l.slice(0,n+1).reverse().findIndex(m=>!A(m[a.axis]));n-=Math.max(0,g)}n=Y(n,0,s-1)}if(p){let g=Math.max(kt(l,r.axis,f,!0).hi+1,e?0:kt(t,h,r.getPixelForValue(f),!0).hi+1);if(c){const m=l.slice(g-1).findIndex(b=>!A(b[a.axis]));g+=Math.max(0,m)}o=Y(g,n,s)-n}else o=s-n}return{start:n,count:o}}function Bo(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const he=i=>i===0||i===1,Ai=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*Z/e)),Li=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*Z/e)+1,Kt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*G)+1,easeOutSine:i=>Math.sin(i*G),easeInOutSine:i=>-.5*(Math.cos(E*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>he(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>he(i)?i:Ai(i,.075,.3),easeOutElastic:i=>he(i)?i:Li(i,.075,.3),easeInOutElastic(i){return he(i)?i:i<.5?.5*Ai(i*2,.1125,.45):.5+.5*Li(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Kt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Kt.easeInBounce(i*2)*.5:Kt.easeOutBounce(i*2-1)*.5+.5};function di(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ii(i){return di(i)?i:new Gt(i)}function ze(i){return di(i)?i:new Gt(i).saturate(.5).darken(.1).hexString()}const Ho=["x","y","borderWidth","radius","tension"],Vo=["color","borderColor","backgroundColor"];function Wo(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Vo},numbers:{type:"number",properties:Ho}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function No(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Fi=new Map;function jo(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Fi.get(e);return s||(s=new Intl.NumberFormat(i,t),Fi.set(e,s)),s}function Js(i,t,e){return jo(t,e).format(i)}const $o={values(i){return z(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=Yo(i,e)}const r=Xs(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Js(i,s,l)}};function Yo(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var tn={formatters:$o};function Uo(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:tn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const wt=Object.create(null),Je=Object.create(null);function qt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>ze(n.backgroundColor),this.hoverBorderColor=(s,n)=>ze(n.borderColor),this.hoverColor=(s,n)=>ze(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ee(this,t,e)}get(t){return qt(this,t)}describe(t,e){return Ee(Je,t,e)}override(t,e){return Ee(wt,t,e)}route(t,e,s,n){const o=qt(this,t),r=qt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return O(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var R=new Xo({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Wo,No,Uo]);function Ko(i){return!i||A(i.size)||A(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ri(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function bt(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function zi(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function ti(i,t,e,s){en(i,t,e,s,null)}function en(i,t,e,s,n){let o,r,a,l,c,h,d,f;const u=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*So;if(u&&typeof u=="object"&&(o=u.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),u){default:n?i.ellipse(e,s,n/2,g,0,0,Z):i.arc(e,s,g,0,Z),i.closePath();break;case"triangle":h=n?n/2:g,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Di,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Di,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(m+mt)*l,d=Math.cos(m+mt)*(n?n/2-c:l),a=Math.sin(m+mt)*l,f=Math.sin(m+mt)*(n?n/2-c:l),i.arc(e-d,s-a,c,m-E,m-G),i.arc(e+f,s-r,c,m-G,m),i.arc(e+d,s+a,c,m,m+G),i.arc(e-f,s+r,c,m+G,m+E),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=mt;case"rectRot":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+f,s-r),i.lineTo(e+d,s+a),i.lineTo(e-f,s+r),i.closePath();break;case"crossRot":m+=mt;case"cross":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+f,s-r),i.lineTo(e-f,s+r);break;case"star":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+f,s-r),i.lineTo(e-f,s+r),m+=mt,d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+f,s-r),i.lineTo(e-f,s+r);break;case"line":r=n?n/2:Math.cos(m)*g,a=Math.sin(m)*g,i.moveTo(e-r,s-a),i.lineTo(e+r,s+a);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:g),s+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function te(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Zo(i,o),l=0;l+i||0;function sn(i,t){const e={},s=O(t),n=s?Object.keys(t):t,o=O(i)?s?r=>P(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=sr(o(r));return e}function nn(i){return sn(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Tt(i){return sn(i,["topLeft","topRight","bottomLeft","bottomRight"])}function q(i){const t=nn(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function V(i,t){i=i||{},t=t||R.font;let e=P(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=P(i.style,t.style);s&&!(""+s).match(er)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:P(i.family,t.family),lineHeight:ir(P(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:P(i.weight,t.weight),string:""};return n.string=Ko(n),n}function de(i,t,e,s){let n,o,r;for(n=0,o=i.length;ne&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function Mt(i,t){return Object.assign(Object.create(i),t)}function fi(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=ln("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>fi([a,...i],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return rn(a,l,()=>fr(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Bi(a).includes(l)},ownKeys(a){return Bi(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function It(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:on(i,s),setContext:o=>It(i,o,e,s),override:o=>It(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return rn(o,r,()=>rr(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function on(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ft(e)?e:()=>e,isIndexable:ft(s)?s:()=>s}}const or=(i,t)=>i?i+li(t):t,ui=(i,t)=>O(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function rn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function rr(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return ft(a)&&r.isScriptable(t)&&(a=ar(t,a,i,e)),z(a)&&a.length&&(a=lr(t,a,i,r.isIndexable)),ui(t,a)&&(a=It(a,n,o&&o[t],r)),a}function ar(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||s);return a.delete(i),ui(i,l)&&(l=gi(n._scopes,n,i,l)),l}function lr(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(O(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=gi(c,n,i,h);t.push(It(d,o,r&&r[i],a))}}return t}function an(i,t,e){return ft(i)?i(t,e):i}const cr=(i,t)=>i===!0?t:typeof i=="string"?Lt(t,i):void 0;function hr(i,t,e,s,n){for(const o of t){const r=cr(e,o);if(r){i.add(r);const a=an(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==s)return a}else if(r===!1&&typeof s<"u"&&e!==s)return null}return!1}function gi(i,t,e,s){const n=t._rootScopes,o=an(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=Ei(a,r,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=Ei(a,r,o,l,s),l===null)?!1:fi(Array.from(a),[""],n,o,()=>dr(t,e,s))}function Ei(i,t,e,s,n){for(;e;)e=hr(i,t,e,s,n);return e}function dr(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return z(n)&&O(e)?e:n||{}}function fr(i,t,e,s){let n;for(const o of t)if(n=ln(or(o,i),e),typeof n<"u")return ui(i,n)?gi(e,s,i,n):n}function ln(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Bi(i){let t=i._keys;return t||(t=i._keys=ur(i._scopes)),t}function ur(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}const gr=Number.EPSILON||1e-14,Ft=(i,t)=>ti==="x"?"y":"x";function pr(i,t,e,s){const n=i.skip?t:i,o=t,r=e.skip?t:e,a=Qe(o,n),l=Qe(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,f=s*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+f*(r.x-n.x),y:o.y+f*(r.y-n.y)}}}function mr(i,t,e){const s=i.length;let n,o,r,a,l,c=Ft(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")xr(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,r=i.length;oi.ownerDocument.defaultView.getComputedStyle(i,null);function vr(i,t){return Ae(i).getPropertyValue(t)}const kr=["top","right","bottom","left"];function St(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=kr[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Sr=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function wr(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(Sr(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function _t(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=Ae(e),o=n.boxSizing==="border-box",r=St(n,"padding"),a=St(n,"border","width"),{x:l,y:c,box:h}=wr(i,e),d=r.left+(h&&a.left),f=r.top+(h&&a.top);let{width:u,height:p}=t;return o&&(u-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/u*e.width/s),y:Math.round((c-f)/p*e.height/s)}}function Mr(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&mi(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=Ae(o),l=St(a,"border","width"),c=St(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=De(a.maxWidth,o,"clientWidth"),n=De(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||Me,maxHeight:n||Me}}const ue=i=>Math.round(i*10)/10;function Pr(i,t,e,s){const n=Ae(i),o=St(n,"margin"),r=De(n.maxWidth,i,"clientWidth")||Me,a=De(n.maxHeight,i,"clientHeight")||Me,l=Mr(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const f=St(n,"border","width"),u=St(n,"padding");c-=u.width+f.width,h-=u.height+f.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=ue(Math.min(c,r,l.maxWidth)),h=ue(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ue(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=ue(Math.floor(h*s))),{width:c,height:h}}function Hi(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const Dr=(function(){let i=!1;try{const t={get passive(){return i=!0,!1}};pi()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();function Vi(i,t){const e=vr(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function yt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Or(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function Cr(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=yt(i,n,e),a=yt(n,o,e),l=yt(o,t,e),c=yt(r,a,e),h=yt(a,l,e);return yt(c,h,e)}const Tr=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Ar=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function At(i,t,e){return i?Tr(t,e):Ar()}function hn(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function dn(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function fn(i){return i==="angle"?{between:Ks,compare:To,normalize:it}:{between:ct,compare:(t,e)=>t-e,normalize:t=>t}}function Wi({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Lr(i,t,e){const{property:s,start:n,end:o}=e,{between:r,normalize:a}=fn(s),l=t.length;let{start:c,end:h,loop:d}=i,f,u;if(d){for(c+=l,h+=l,f=0,u=l;fl(n,y,b)&&a(n,y)!==0,_=()=>a(o,b)===0||l(o,y,b),w=()=>g||v(),S=()=>!g||_();for(let k=h,M=h;k<=d;++k)x=t[k%r],!x.skip&&(b=c(x[s]),b!==y&&(g=l(b,n,o),m===null&&w()&&(m=a(b,n)===0?k:M),m!==null&&S()&&(p.push(Wi({start:m,end:k,loop:f,count:r,style:u})),m=null),M=k,y=b));return m!==null&&p.push(Wi({start:m,end:d,loop:f,count:r,style:u})),p}function gn(i,t){const e=[],s=i.segments;for(let n=0;nn&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Fr(i,t,e,s){const n=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function Rr(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:r,end:a}=Ir(e,n,o,s);if(s===!0)return Ni(i,[{start:r,end:a,loop:o}],e,t);const l=aa({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Zs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{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&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ot=new Hr;const $i="transparent",Vr={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Ii(i||$i),n=s.valid&&Ii(t||$i);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Wr{constructor(t,e,s,n){const o=e[s];n=de([t.to,n,o,t.from]);const r=de([t.from,o,n]);this._active=!0,this._fn=t.fn||Vr[t.type||typeof r],this._easing=Kt[t.easing]||Kt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=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=de([t.to,e,n,t.from]),this._from=de([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n{const o=t[n];if(!O(o))return;const r={};for(const a of e)r[a]=o[a];(z(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=jr(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Nr(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),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"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const f=s.get(c);if(d)if(f&&d.active()){d.update(f,h,a);continue}else d.cancel();if(!f||!f.duration){t[c]=h;continue}o[c]=d=new Wr(f,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return ot.add(this._chart,s),!0}}function Nr(i,t){const e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function Ki(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=Xr(o,r,s),d=t.length;let f;for(let u=0;ue[s].axis===t).shift()}function Gr(i,t){return Mt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Zr(i,t,e){return Mt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Bt(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const Ve=i=>i==="reset"||i==="none",qi=(i,t)=>t?i:Object.assign({},i),Qr=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:bn(e,!0),values:null};class bi{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Be(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Bt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,f,u,p)=>d==="x"?f:d==="r"?p:u,o=e.xAxisID=P(s.xAxisID,He(t,"x")),r=e.yAxisID=P(s.yAxisID,He(t,"y")),a=e.rAxisID=P(s.rAxisID,He(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ti(this._data,this),t._stacked&&Bt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(O(e)){const n=this._cachedMeta;this._data=Ur(e,n)}else if(s!==e){if(s){Ti(s,this);const n=this._cachedMeta;Bt(n),n._parsed=[]}e&&Object.isExtensible(e)&&Fo(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Be(e.vScale,e),e.stack!==s.stack&&(n=!0,Bt(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(Ki(this,e._parsed),e._stacked=Be(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,f;if(this._parsing===!1)s._parsed=n,s._sorted=!0,f=n;else{z(n[t])?f=this.parseArrayData(s,n,t,e):O(n[t])?f=this.parseObjectData(s,n,t,e):f=this.parsePrimitiveData(s,n,t,e);const u=()=>d[a]===null||c&&d[a]g||d=0;--f)if(!p()){this.updateRangeFromParsed(c,t,u,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=e.length;n=0&&tthis.getContext(s,n,e),g=c.resolveNamedOptions(f,u,p,d);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(qi(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),f=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(f,this.getContext(t,s,e))}const c=new mn(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ve(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:r}}updateElement(t,e,s,n){Ve(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Ve(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=s.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;an-o))}return i._cache.$bar}function ta(i){const t=i.iScale,e=Jr(t,i.type);let s=t._length,n,o,r,a;const l=()=>{r===32767||r===-32768||(Qt(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(n=0,o=e.length;n0?n[i-1]:null,a=iMath.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:r,max:a}}function xn(i,t,e,s){return z(i)?sa(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Gi(i,t,e,s){const n=i.iScale,o=i.vScale,r=n.getLabels(),a=n===o,l=[];let c,h,d,f;for(c=e,h=e+s;c=e?1:-1)}function oa(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.baseh.controller.options.grouped),o=s.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[s.axis],c=h=>{const d=h._parsed.find(u=>u[s.axis]===l),f=d&&d[h.vScale.axis];if(A(f)||isNaN(f))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||r.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&r.push(h.stack),h.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)t[P(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,r;for(o=0,r=e.data.length;o0&&this.getParsed(e-1);for(let _=0;_=x){S.skip=!0;continue}const k=this.getParsed(_),M=A(k[u]),C=S[f]=r.getPixelForValue(k[f],_),D=S[u]=o||M?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[u],_);S.skip=isNaN(C)||isNaN(D)||M,S.stop=_>0&&Math.abs(k[f]-v[f])>m,g&&(S.parsed=k,S.raw=c.data[_]),d&&(S.options=h||this.resolveDataElementOptions(_,w.active?"active":n)),b||this.updateElement(w,_,S,n),v=k}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function xt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xi{static override(t){Object.assign(xi.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return xt()}parse(){return xt()}format(){return xt()}add(){return xt()}diff(){return xt()}startOf(){return xt()}endOf(){return xt()}}var da={_date:xi};function fa(i,t,e,s){const{controller:n,data:o,_sorted:r}=i,a=n._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?Lo:kt;if(s){if(n._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){const f=c(o,t,e-d),u=c(o,t,e+d);return{lo:f.lo,hi:u.hi}}}}else{const h=c(o,t,e);if(l){const{vScale:d}=n._cachedMeta,{_parsed:f}=i,u=f.slice(0,h.lo+1).reverse().findIndex(g=>!A(g[d.axis]));h.lo-=Math.max(0,u);const p=f.slice(h.hi).findIndex(g=>!A(g[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function Le(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a{l[r]&&l[r](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:o}var ma={modes:{index(i,t,e,s){const n=_t(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Ne(i,n,o,s,r):je(i,n,o,!1,s,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=_t(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?Ne(i,n,o,s,r):je(i,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;he.pos===t)}function ts(i,t){return i.filter(e=>_n.indexOf(e.pos)===-1&&e.box.axis===t)}function Vt(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function ba(i){const t=[];let e,s,n,o,r,a;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=Vt(Ht(t,"left"),!0),n=Vt(Ht(t,"right")),o=Vt(Ht(t,"top"),!0),r=Vt(Ht(t,"bottom")),a=ts(t,"x"),l=ts(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:Ht(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function es(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function yn(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function va(i,t,e,s){const{pos:n,box:o}=e,r=i.maxPadding;if(!O(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&yn(r,o.getPadding());const a=Math.max(0,t.outerWidth-es(r,i,"left","right")),l=Math.max(0,t.outerHeight-es(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function ka(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Sa(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return s(i?["left","right"]:["top","bottom"])}function $t(i,t,e,s){const n=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),f=Object.assign({},n);yn(f,q(s));const u=Object.assign({maxPadding:f,w:o,h:r,x:n.left,y:n.top},n),p=_a(l.concat(c),d);$t(a.fullSize,u,d,p),$t(l,u,d,p),$t(c,u,d,p)&&$t(l,u,d,p),ka(u),is(a.leftAndTop,u,d,p),u.x+=u.w,u.y+=u.h,is(a.rightAndBottom,u,d,p),i.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},L(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}};class vn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class wa extends vn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ve="$chartjs",Ma={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ss=i=>i===null||i==="";function Pa(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[ve]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",ss(n)){const o=Vi(i,"width");o!==void 0&&(i.width=o)}if(ss(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Vi(i,"height");o!==void 0&&(i.height=o)}return i}const kn=Dr?{passive:!0}:!1;function Da(i,t,e){i&&i.addEventListener(t,e,kn)}function Oa(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,kn)}function Ca(i,t){const e=Ma[i.type]||i.type,{x:s,y:n}=_t(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Oe(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Ta(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Oe(a.addedNodes,s),r=r&&!Oe(a.removedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Aa(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Oe(a.removedNodes,s),r=r&&!Oe(a.addedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const ie=new Map;let ns=0;function Sn(){const i=window.devicePixelRatio;i!==ns&&(ns=i,ie.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function La(i,t){ie.size||window.addEventListener("resize",Sn),ie.set(i,t)}function Ia(i){ie.delete(i),ie.size||window.removeEventListener("resize",Sn)}function Fa(i,t,e){const s=i.canvas,n=s&&mi(s);if(!n)return;const o=Qs((a,l)=>{const c=n.clientWidth;e(a,l),c{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(n),La(i,o),r}function $e(i,t,e){e&&e.disconnect(),t==="resize"&&Ia(i)}function Ra(i,t,e){const s=i.canvas,n=Qs(o=>{i.ctx!==null&&e(Ca(o,i))},i);return Da(s,t,n),n}class za extends vn{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Pa(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[ve])return!1;const s=e[ve].initial;["height","width"].forEach(o=>{const r=s[o];A(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[ve],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Ta,detach:Aa,resize:Fa}[e]||Ra;n[e]=r(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:$e,detach:$e,resize:$e}[e]||Oa)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Pr(t,e,s,n)}isAttached(t){const e=t&&mi(t);return!!(e&&e.isConnected)}}function Ea(i){return!pi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?wa:za}class ut{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Jt(this.x)&&Jt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}function Ba(i,t){const e=i.options.ticks,s=Ha(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?Wa(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return Na(t,c,o,r/n),c;const h=Va(o,t,n);if(r>0){let d,f;const u=r>1?Math.round((l-a)/(r-1)):null;for(me(t,c,h,A(u)?0:a-u,a),d=0,f=r-1;dn)return l}return Math.max(n,1)}function Wa(i){const t=[];let e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,os=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,rs=(i,t)=>Math.min(t||i,i);function as(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;or+a)))return l}function Ua(i,t){L(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:J(e,J(s,e)),max:J(s,J(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=nr(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,f=h.highest.height,u=Y(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/s:u/(s-1),d+6>a&&(a=u/(s-(t.offset?.5:1)),l=this.maxHeight-Wt(t.grid)-e.padding-ls(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),r=Oo(Math.min(Math.asin(Y((h.highest.height+6)/a,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(f/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=ls(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Wt(o)+l):(t.height=this.maxHeight,t.width=Wt(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:f}=this._getLabelSizes(),u=s.padding*2,p=vt(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=s.mirror?0:m*d.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+b+u)}else{const b=s.mirror?0:g*d.width+m*f.height;t.width=Math.min(this.maxWidth,t.width+b+u)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,u=0;l?c?(f=n*t.width,u=s*e.height):(f=s*t.height,u=n*e.width):o==="start"?u=e.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,u=e.width/2),this.paddingLeft=Math.max((f-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((u-d+r)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){I(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:r[M]||0,height:a[M]||0});return{first:k(0),last:k(e-1),widest:k(w),highest:k(S),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Ao(this._alignToPixels?bt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*n?a/s:l/n:l*n0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Wt(o),u=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(B){return bt(s,B,g)};let x,y,v,_,w,S,k,M,C,D,T,N;if(r==="top")x=b(this.bottom),S=this.bottom-f,M=x-m,D=b(t.top)+m,N=t.bottom;else if(r==="bottom")x=b(this.top),D=t.top,N=b(t.bottom)-m,S=x+m,M=this.top+f;else if(r==="left")x=b(this.right),w=this.right-f,k=x-m,C=b(t.left)+m,T=t.right;else if(r==="right")x=b(this.left),C=t.left,T=b(t.right)-m,w=x+m,k=this.left+f;else if(e==="x"){if(r==="center")x=b((t.top+t.bottom)/2+.5);else if(O(r)){const B=Object.keys(r)[0],U=r[B];x=b(this.chart.scales[B].getPixelForValue(U))}D=t.top,N=t.bottom,S=x+m,M=S+f}else if(e==="y"){if(r==="center")x=b((t.left+t.right)/2);else if(O(r)){const B=Object.keys(r)[0],U=r[B];x=b(this.chart.scales[B].getPixelForValue(U))}w=x-m,k=w-f,C=t.left,T=t.right}const Q=P(n.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/Q));for(y=0;y0&&(pt-=gt/2);break}re={left:pt,top:Et,width:gt+Dt.width,height:zt+Dt.height,color:F.backdropColor}}m.push({label:v,font:M,textOffset:T,options:{rotation:g,color:U,strokeColor:ne,strokeWidth:oe,textAlign:Pt,textBaseline:N,translation:[_,w],backdrop:re}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-vt(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,r=n.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");R.route(o,n,l,a)})}function Ja(i){return"id"in i&&"defaults"in i}class tl{constructor(){this.controllers=new be(bi,"datasets",!0),this.elements=new be(ut,"elements"),this.plugins=new be(Object,"plugins"),this.scales=new be(Rt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):L(n,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,s){const n=li(t);I(s["before"+n],[],s),e[t](s),I(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;eo.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function il(i){const t={},e=[],s=Object.keys(et.plugins.items);for(let o=0;o1&&cs(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function hs(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function cl(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return hs(i,"x",e[0])||hs(i,"y",e[0])}return{}}function hl(i,t){const e=wt[i.type]||{scales:{}},s=t.scales||{},n=ei(i.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!O(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=ii(r,a,cl(r,i),R.scales[a.type]),c=al(l,n),h=e.scales||{};o[r]=Ut(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||ei(a,t),h=(wt[a]||{}).scales||{};Object.keys(h).forEach(d=>{const f=rl(d,l),u=r[f+"AxisID"]||f;o[u]=o[u]||Object.create(null),Ut(o[u],[{axis:f},s[u],h[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Ut(a,[R.scales[a.type],R.scale])}),o}function wn(i){const t=i.options||(i.options={});t.plugins=P(t.plugins,{}),t.scales=hl(i,t)}function Mn(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function dl(i){return i=i||{},i.data=Mn(i.data),wn(i),i}const ds=new Map,Pn=new Set;function xe(i,t){let e=ds.get(i);return e||(e=t(),ds.set(i,e),Pn.add(e)),e}const Nt=(i,t,e)=>{const s=Lt(t,e);s!==void 0&&i.add(s)};class fl{constructor(t){this._config=dl(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Mn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),wn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return xe(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return xe(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return xe(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return xe(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,r=this._cachedScopes(t,s),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Nt(l,t,d))),h.forEach(d=>Nt(l,n,d)),h.forEach(d=>Nt(l,wt[o]||{},d)),h.forEach(d=>Nt(l,R,d)),h.forEach(d=>Nt(l,Je,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Pn.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,wt[e]||{},R.datasets[e]||{},{type:e},R,Je]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=fs(this._resolverCache,t,n);let l=r;if(gl(r,e)){o.$shared=!1,s=ft(s)?s():s;const c=this.createResolver(t,s,a);l=It(r,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=fs(this._resolverCache,t,s);return O(e)?It(o,e,void 0,n):o}}function fs(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:fi(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const ul=i=>O(i)&&Object.getOwnPropertyNames(i).some(t=>ft(i[t]));function gl(i,t){const{isScriptable:e,isIndexable:s}=on(i);for(const n of t){const o=e(n),r=s(n),a=(r||o)&&i[n];if(o&&(ft(a)||ul(a))||r&&z(a))return!0}return!1}var pl="4.5.0";const ml=["top","bottom","left","right","chartArea"];function us(i,t){return i==="top"||i==="bottom"||ml.indexOf(i)===-1&&t==="x"}function gs(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function ps(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),I(e&&e.onComplete,[i],t)}function bl(i){const t=i.chart,e=t.options.animation;I(e&&e.onProgress,[i],t)}function Dn(i){return pi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const ke={},ms=i=>{const t=Dn(i);return Object.values(ke).filter(e=>e.canvas===t).pop()};function xl(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const r=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=r)}}}function _l(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}let _i=class{static defaults=R;static instances=ke;static overrides=wt;static registry=et;static version=pl;static getChart=ms;static register(...t){et.add(...t),bs()}static unregister(...t){et.remove(...t),bs()}constructor(t,e){const s=this.config=new fl(e),n=Dn(t),o=ms(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Ea(n)),this.platform.updateConfig(s);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=po(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new el,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ro(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],ke[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ot.listen(this,"complete",ps),ot.listen(this,"progress",bl),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return A(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return et}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return zi(this.canvas,this.ctx),this}stop(){return ot.stop(this),this}resize(t,e){ot.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Hi(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),I(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};L(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=ii(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),L(o,r=>{const a=r.options,l=a.id,c=ii(l,a),h=P(a.type,r.dtype);(a.position===void 0||us(a.position,c)!==us(r.dposition))&&(a.position=r.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const f=et.getScale(h);d=new f({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(a,t)}),L(n,(r,a)=>{r||delete s[a]}),L(s,r=>{K.configure(this,r,r.options),K.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(gs("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){L(this.scales,t=>{K.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Pi(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const r=s==="_removeElements"?-o:o;xl(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;K.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],L(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=pn(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&Ce(e,n),t.controller.draw(),n&&Te(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return te(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=ma.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Mt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);Qt(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ot.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};L(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){L(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},L(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Se(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),r=o(e,t),a=s?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,s,r),l=vo(t),c=_l(t,this._lastEvent,s,l);s&&(this._lastEvent=null,I(o.onHover,[t,a,this],this),l&&I(o.onClick,[t,a,this],this));const h=!Se(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}};function bs(){return L(_i.instances,i=>i._plugins.invalidate())}function On(i,t,e=t){i.lineCap=P(e.borderCapStyle,t.borderCapStyle),i.setLineDash(P(e.borderDash,t.borderDash)),i.lineDashOffset=P(e.borderDashOffset,t.borderDashOffset),i.lineJoin=P(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=P(e.borderWidth,t.borderWidth),i.strokeStyle=P(e.borderColor,t.borderColor)}function yl(i,t,e){i.lineTo(e.x,e.y)}function vl(i){return i.stepped?qo:i.tension||i.cubicInterpolationMode==="monotone"?Go:yl}function Cn(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),h=na&&o>a;return{count:s,start:l,loop:t.loop,ilen:c(r+(c?a-v:v))%o,y=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(u=n[x(0)],i.moveTo(u.x,u.y)),f=0;f<=a;++f){if(u=n[x(f)],u.skip)continue;const v=u.x,_=u.y,w=v|0;w===p?(_m&&(m=_),h=(d*h+v)/++d):(y(),i.lineTo(v,_),p=w,d=0,g=m=_),b=_}y()}function si(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Sl:kl}function wl(i){return i.stepped?Or:i.tension||i.cubicInterpolationMode==="monotone"?Cr:yt}function Ml(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),On(i,t.options),i.stroke(n)}function Pl(i,t,e,s){const{segments:n,options:o}=t,r=si(t);for(const a of n)On(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const Dl=typeof Path2D=="function";function Ol(i,t,e,s){Dl&&!t.options.segment?Ml(i,t,e,s):Pl(i,t,e,s)}class yi extends ut{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;yr(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Rr(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,r=gn(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],l=wl(s);let c,h;for(c=0,h=r.length;c{a=Ie(r,a,n);const l=n[r],c=n[a];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Ie(i,t,e){for(;t>i;t--){const s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function _s(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function An(i,t){let e=[],s=!1;return z(i)?(s=!0,e=i):e=Rl(i,t),e.length?new yi({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function ys(i){return i&&i.fill!==!1}function zl(i,t,e){let n=i[t].fill;const o=[t];let r;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!W(n))return n;if(r=i[n],!r)return!1;if(r.visible)return n;o.push(n),n=r.fill}return!1}function El(i,t,e){const s=Wl(i);if(O(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return W(n)&&Math.floor(n)===n?Bl(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Bl(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function Hl(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:O(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Vl(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:O(i)?s=i.value:s=t.getBaseValue(),s}function Wl(i){const t=i.options,e=t.fill;let s=P(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Nl(i){const{scale:t,index:e,line:s}=i,n=[],o=s.segments,r=s.points,a=jl(t,e);a.push(An({x:null,y:t.bottom},s));for(let l=0;l=0;--r){const a=n[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),s&&a.fill&&Xe(i.ctx,a,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;ys(o)&&Xe(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const s=t.meta.$filler;!ys(s)||e.drawTime!=="beforeDatasetDraw"||Xe(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ws=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},Jl=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class Ms extends ut{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=I(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=V(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=ws(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,u=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(d+=h,c[c.length-(g>0?0:1)]=0,u+=h,f++),l[g]={left:0,top:u,row:f,width:m,height:n},c[c.length-1]+=m+a}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let d=a,f=0,u=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:x,itemHeight:y}=tc(s,e,o,m,n);b>0&&u+y+2*a>h&&(d+=f+a,c.push({width:f,height:u}),p+=f+a,g++,f=u=0),l[b]={left:p,top:u,col:g,width:x,height:y},f=Math.max(f,x),u+=y+a}),d+=f,c.push({width:f,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,r=At(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=H(s,this.left+n,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=H(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=H(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=H(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ce(t,this),this._draw(),Te(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:r}=t,a=R.color,l=At(t.rtl,this.left,this.width),c=V(r.font),{padding:h}=r,d=c.size,f=d/2;let u;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=ws(r,d),b=function(w,S,k){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const M=P(k.lineWidth,1);if(n.fillStyle=P(k.fillStyle,a),n.lineCap=P(k.lineCap,"butt"),n.lineDashOffset=P(k.lineDashOffset,0),n.lineJoin=P(k.lineJoin,"miter"),n.lineWidth=M,n.strokeStyle=P(k.strokeStyle,a),n.setLineDash(P(k.lineDash,[])),r.usePointStyle){const C={radius:g*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:M},D=l.xPlus(w,p/2),T=S+f;en(n,C,D,T,r.pointStyleWidth&&p)}else{const C=S+Math.max((d-g)/2,0),D=l.leftForLtr(w,p),T=Tt(k.borderRadius);n.beginPath(),Object.values(T).some(N=>N!==0)?Pe(n,{x:D,y:C,w:p,h:g,radius:T}):n.rect(D,C,p,g),n.fill(),M!==0&&n.stroke()}n.restore()},x=function(w,S,k){ee(n,k.text,w,S+m/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},y=this.isHorizontal(),v=this._computeTitleHeight();y?u={x:H(o,this.left+h,this.right-s[0]),y:this.top+h+v,line:0}:u={x:this.left+h,y:H(o,this.top+v+h,this.bottom-e[0].height),line:0},hn(this.ctx,t.textDirection);const _=m+h;this.legendItems.forEach((w,S)=>{n.strokeStyle=w.fontColor,n.fillStyle=w.fontColor;const k=n.measureText(w.text).width,M=l.textAlign(w.textAlign||(w.textAlign=r.textAlign)),C=p+f+k;let D=u.x,T=u.y;l.setWidth(this.width),y?S>0&&D+C+h>this.right&&(T=u.y+=_,u.line++,D=u.x=H(o,this.left+h,this.right-s[u.line])):S>0&&T+_>this.bottom&&(D=u.x=D+e[u.line].width+h,u.line++,T=u.y=H(o,this.top+v+h,this.bottom-e[u.line].height));const N=l.x(D);if(b(N,T,w),D=zo(M,D+p+f,y?D+C:this.right,t.rtl),x(l.x(D),T,w),y)u.x+=C+h;else if(typeof w.text!="string"){const Q=c.lineHeight;u.y+=In(w,Q)+h}else u.y+=_}),dn(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=V(e.font),n=q(e.padding);if(!e.display)return;const o=At(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),h=this.top+c,d=H(t.align,d,this.right-f);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+H(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const u=H(a,d,d+f);r.textAlign=o.textAlign(hi(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=s.string,ee(r,e.text,u,h,s)}_computeTitleHeight(){const t=this.options.title,e=V(t.font),s=q(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(ct(t,this.left,this.right)&&ct(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>r.length?o:r)),t+e.size/2+s.measureText(n).width}function ic(i,t,e){let s=i;return typeof t.text!="string"&&(s=In(t,e)),s}function In(i,t){const e=i.text?i.text.length:0;return t*e}function sc(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Lc={id:"legend",_element:Ms,start(i,t,e){const s=i.legend=new Ms({ctx:i.ctx,options:e,chart:i});K.configure(i,s,e),K.addBox(i,s)},stop(i){K.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;K.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=q(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Fn extends ut{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=z(s.text)?s.text.length:1;this._padding=q(s.padding);const o=n*V(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:r}=this,a=r.align;let l=0,c,h,d;return this.isHorizontal()?(h=H(a,s,o),d=e+t,c=o-s):(r.position==="left"?(h=s+t,d=H(a,n,e),l=E*-.5):(h=o-t,d=H(a,e,n),l=E*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=V(e.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);ee(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:hi(e.align),textBaseline:"middle",translation:[r,a]})}}function nc(i,t){const e=new Fn({ctx:i.ctx,options:t,chart:i});K.configure(i,e,t),K.addBox(i,e),i.titleBlock=e}var Ic={id:"title",_element:Fn,start(i,t,e){nc(i,e)},stop(i){const t=i.titleBlock;K.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;K.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yt={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;ta+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o-1?i.split(`
`):i}function oc(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:i,label:r,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Ps(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=V(t.bodyFont),c=V(t.titleFont),h=V(t.footerFont),d=o.length,f=n.length,u=s.length,p=q(t.padding);let g=p.height,m=0,b=s.reduce((v,_)=>v+_.before.length+_.lines.length+_.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=u*v+(b-u)*l.lineHeight+(b-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*h.lineHeight+(f-1)*t.footerSpacing);let x=0;const y=function(v){m=Math.max(m,e.measureText(v).width+x)};return e.save(),e.font=c.string,L(i.title,y),e.font=l.string,L(i.beforeBody.concat(i.afterBody),y),x=t.displayColors?r+2+t.boxPadding:0,L(s,v=>{L(v.before,y),L(v.lines,y),L(v.after,y)}),x=0,e.font=h.string,L(i.footer,y),e.restore(),m+=p.width,{width:m,height:g}}function rc(i,t){const{y:e,height:s}=t;return ei.height-s/2?"bottom":"center"}function ac(i,t,e,s){const{x:n,width:o}=s,r=e.caretSize+e.caretPadding;if(i==="left"&&n+o+r>t.width||i==="right"&&n-o-r<0)return!0}function lc(i,t,e,s){const{x:n,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return s==="center"?c=n<=(a+l)/2?"left":"right":n<=o/2?c="left":n>=r-o/2&&(c="right"),ac(c,i,t,e)&&(c="center"),c}function Ds(i,t,e){const s=e.yAlign||t.yAlign||rc(i,e);return{xAlign:e.xAlign||t.xAlign||lc(i,t,e,s),yAlign:s}}function cc(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function hc(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Os(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:u}=Tt(r);let p=cc(t,a);const g=hc(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,f)+n:a==="right"&&(p+=Math.max(d,u)+n),{x:Y(p,0,s.width-t.width),y:Y(g,0,s.height-t.height)}}function _e(i,t,e){const s=q(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function Cs(i){return tt([],rt(i))}function dc(i,t,e){return Mt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Ts(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const Rn={beforeTitle:nt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.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"u"?Rn[t].call(e,s):n}class As extends ut{static positioners=Yt;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new mn(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=dc(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=j(s,"beforeTitle",this,t),o=j(s,"title",this,t),r=j(s,"afterTitle",this,t);let a=[];return a=tt(a,rt(n)),a=tt(a,rt(o)),a=tt(a,rt(r)),a}getBeforeBody(t,e){return Cs(j(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return L(t,o=>{const r={before:[],lines:[],after:[]},a=Ts(s,o);tt(r.before,rt(j(a,"beforeLabel",this,o))),tt(r.lines,j(a,"label",this,o)),tt(r.after,rt(j(a,"afterLabel",this,o))),n.push(r)}),n}getAfterBody(t,e){return Cs(j(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=j(s,"beforeFooter",this,t),o=j(s,"footer",this,t),r=j(s,"afterFooter",this,t);let a=[];return a=tt(a,rt(n)),a=tt(a,rt(o)),a=tt(a,rt(r)),a}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],r=[];let a=[],l,c;for(l=0,c=e.length;lt.filter(h,d,f,s))),t.itemSort&&(a=a.sort((h,d)=>t.itemSort(h,d,s))),L(a,h=>{const d=Ts(t.callbacks,h);n.push(j(d,"labelColor",this,h)),o.push(j(d,"labelPointStyle",this,h)),r.push(j(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,r=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const a=Yt[s.position].call(this,n,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const l=this._size=Ps(this,s),c=Object.assign({},a,l),h=Ds(this.chart,s,c),d=Os(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:r,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Tt(a),{x:f,y:u}=t,{width:p,height:g}=e;let m,b,x,y,v,_;return o==="center"?(v=u+g/2,n==="left"?(m=f,b=m-r,y=v+r,_=v-r):(m=f+p,b=m+r,y=v-r,_=v+r),x=m):(n==="left"?b=f+Math.max(l,h)+r:n==="right"?b=f+p-Math.max(c,d)-r:b=this.caretX,o==="top"?(y=u,v=y-r,m=b-r,x=b+r):(y=u+g,v=y+r,m=b+r,x=b-r),_=y),{x1:m,x2:b,x3:x,y1:y,y2:v,y3:_}}drawTitle(t,e,s){const n=this.title,o=n.length;let r,a,l;if(o){const c=At(s.rtl,this.x,this.width);for(t.x=_e(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",r=V(s.titleFont),a=s.titleSpacing,e.fillStyle=s.titleColor,e.font=r.string,l=0;lx!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Pe(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Pe(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=V(s.bodyFont);let f=d.lineHeight,u=0;const p=At(s.rtl,this.x,this.width),g=function(k){e.fillText(k,p.x(t.x+u),t.y+f/2),t.y+=f+o},m=p.textAlign(r);let b,x,y,v,_,w,S;for(e.textAlign=r,e.textBaseline="middle",e.font=d.string,t.x=_e(this,m,s),e.fillStyle=s.bodyColor,L(this.beforeBody,g),u=a&&m!=="right"?r==="center"?c/2+h:c+2+h:0,v=0,w=n.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const r=Yt[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=Ps(this,t),l=Object.assign({},r,this._size),c=Ds(e,t,l),h=Os(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=q(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),hn(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),dn(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Se(s,n),r=this._positionChanged(n,e);(o||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,s),a=this._positionChanged(r,t),l=e||!Se(r,o)||a;return l&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,r=Yt[o.position].call(this,t,e);return r!==!1&&(s!==r.x||n!==r.y)}}var Fc={id:"tooltip",_element:As,positioners:Yt,afterInit(i,t,e){e&&(i.tooltip=new As({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Rn},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const fc=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function uc(i,t,e,s){const n=i.indexOf(t);if(n===-1)return fc(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const gc=(i,t)=>i===null?null:Y(Math.round(i),0,t);function Ls(i){const t=this.getLabels();return i>=0&&ie.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function pc(i,t){const e=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:f}=i,u=o||1,p=h-1,{min:g,max:m}=t,b=!A(r),x=!A(a),y=!A(c),v=(m-g)/(d+1);let _=Oi((m-g)/p/u)*u,w,S,k,M;if(_<1e-14&&!b&&!x)return[{value:g},{value:m}];M=Math.ceil(m/_)-Math.floor(g/_),M>p&&(_=Oi(M*_/p/u)*u),A(l)||(w=Math.pow(10,l),_=Math.ceil(_*w)/w),n==="ticks"?(S=Math.floor(g/_)*_,k=Math.ceil(m/_)*_):(S=g,k=m),b&&x&&o&&Po((a-r)/o,_/1e3)?(M=Math.round(Math.min((a-r)/_,h)),_=(a-r)/M,S=r,k=a):y?(S=b?r:S,k=x?a:k,M=c-1,_=(k-S)/M):(M=(k-S)/_,Xt(M,Math.round(M),_/1e3)?M=Math.round(M):M=Math.ceil(M));const C=Math.max(Ci(_),Ci(S));w=Math.pow(10,A(l)?C:l),S=Math.round(S*w)/w,k=Math.round(k*w)/w;let D=0;for(b&&(f&&S!==r?(e.push({value:r}),Sa)break;e.push({value:T})}return x&&f&&k!==a?e.length&&Xt(e[e.length-1].value,a,Is(a,v,i))?e[e.length-1].value=a:e.push({value:a}):(!x||k===a)&&e.push({value:k}),e}function Is(i,t,{horizontal:e,minRotation:s}){const n=vt(s),o=(e?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class mc extends Rt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return A(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=e?n:l,a=l=>o=s?o:l;if(t){const l=st(n),c=st(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=pc(n,o);return t.bounds==="ticks"&&Do(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Js(t,this.chart.options.locale,this.options.ticks.format)}}class zc extends mc{static id="linear";static defaults={ticks:{callback:tn.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=vt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Fe={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},$=Object.keys(Fe);function Fs(i,t){return i-t}function Rs(i,t){if(A(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let r=t;return typeof s=="function"&&(r=s(r)),W(r)||(r=typeof s=="string"?e.parse(r,s):e.parse(r)),r===null?null:(n&&(r=n==="week"&&(Jt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,n)),+r)}function zs(i,t,e,s){const n=$.length;for(let o=$.indexOf(i);o=$.indexOf(e);o--){const r=$[o];if(Fe[r].common&&i._adapter.diff(n,s,r)>=t-1)return r}return $[e?$.indexOf(e):0]}function xc(i){for(let t=$.indexOf(i)+1,e=$.length;t=t?e[s]:e[n];i[o]=!0}}function _c(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=e[a],l>=0&&(t[l].major=!0);return t}function Bs(i,t,e){const s=[],n={},o=t.length;let r,a;for(r=0;r+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=Y(e,0,r),s=Y(s,0,r),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,r=o.unit||zs(o.minUnit,e,s,this._getLabelCapacity(e)),a=P(n.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Jt(l)||l===!0,h={};let d=e,f,u;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(s,e,r)>1e5*a)throw new Error(e+" and "+s+" are too far apart with stepSize of "+a+" "+r);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(f=d,u=0;f+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,r=e||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,s,n){const o=this.options,r=o.ticks.callback;if(r)return I(r,[t,e,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],d=c&&a[c],f=s[e],u=c&&d&&f&&f.major;return this._adapter.format(t,n||(u?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=kt(i,"pos",t)),{pos:o,time:a}=i[s],{pos:r,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=kt(i,"time",t)),{time:o,pos:a}=i[s],{time:r,pos:l}=i[n]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Ec extends Hs{static id="timeseries";static defaults=Hs.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ye(e,this.min),this._tableRange=ye(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(r=0,a=n.length;rn-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(ye(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return ye(this._table,s*this._tableRange+this._minPos,!0)}}const zn={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},yc={ariaLabel:{type:String},ariaDescribedby:{type:String}},vc={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...zn,...yc},kc=Vn[0]==="2"?(i,t)=>Object.assign(i,{attrs:t}):(i,t)=>Object.assign(i,t);function Ct(i){return Ns(i)?Ge(i):i}function Sc(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i;return Ns(t)?new Proxy(i,{}):i}function wc(i,t){const e=i.options;e&&t&&Object.assign(e,t)}function En(i,t){i.labels=t}function Bn(i,t,e){const s=[];i.datasets=t.map(n=>{const o=i.datasets.find(r=>r[e]===n[e]);return!o||!n.data||s.includes(o)?{...n}:(s.push(o),Object.assign(o,n),o)})}function Mc(i,t){const e={labels:[],datasets:[]};return En(e,i.labels),Bn(e,i.datasets,t),e}const Pc=Vs({props:vc,setup(i,t){let{expose:e,slots:s}=t;const n=Wn(null),o=Ws(null);e({chart:o});const r=()=>{if(!n.value)return;const{type:c,data:h,options:d,plugins:f,datasetIdKey:u}=i,p=Mc(h,u),g=Sc(p,h);o.value=new _i(n.value,{type:c,data:g,options:{...d},plugins:f})},a=()=>{const c=Ge(o.value);c&&(i.destroyDelay>0?setTimeout(()=>{c.destroy(),o.value=null},i.destroyDelay):(c.destroy(),o.value=null))},l=c=>{c.update(i.updateMode)};return Nn(r),jn(a),$n([()=>i.options,()=>i.data],(c,h)=>{let[d,f]=c,[u,p]=h;const g=Ge(o.value);if(!g)return;let m=!1;if(d){const b=Ct(d),x=Ct(u);b&&b!==x&&(wc(g,b),m=!0)}if(f){const b=Ct(f.labels),x=Ct(p.labels),y=Ct(f.datasets),v=Ct(p.datasets);b!==x&&(En(g.config.data,b),m=!0),y&&y!==v&&(Bn(g.config.data,y,i.datasetIdKey),m=!0)}m&&Yn(()=>{l(g)})},{deep:!0}),()=>qe("canvas",{role:"img",ariaLabel:i.ariaLabel,ariaDescribedby:i.ariaDescribedby,ref:n},[qe("p",{},[s.default?s.default():""])])}});function Hn(i,t){return _i.register(t),Vs({props:zn,setup(e,s){let{expose:n}=s;const o=Ws(null),r=a=>{o.value=a?.chart};return n({chart:o}),()=>qe(Pc,kc({ref:r},{type:i,...e}))}})}const Bc=Hn("bar",ca),Hc=Hn("line",ha);export{Tc as B,_i as C,yi as L,Cc as P,ca as a,ha as b,zc as c,Ic as d,Fc as e,Rc as f,Hc as g,Bc as h,Ac as i,Lc as p};
diff --git a/src/static/dist/WGDashboardAdmin/assets/index-duVMn5Kh.js b/src/static/dist/WGDashboardAdmin/assets/index-DCd9CkLQ.js
similarity index 96%
rename from src/static/dist/WGDashboardAdmin/assets/index-duVMn5Kh.js
rename to src/static/dist/WGDashboardAdmin/assets/index-DCd9CkLQ.js
index c3faddef..091762a3 100644
--- a/src/static/dist/WGDashboardAdmin/assets/index-duVMn5Kh.js
+++ b/src/static/dist/WGDashboardAdmin/assets/index-DCd9CkLQ.js
@@ -1 +1 @@
-import{H as I,q as w,P as S,J as k,Q as L,u as R}from"./index-DW-_CXHM.js";const W=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const X=Object.prototype.toString,Y=t=>X.call(t)==="[object Object]",$=()=>{};function C(t){return Array.isArray(t)?t:[t]}function q(t,a,r){return I(t,a,{...r,immediate:!0})}const O=W?window:void 0;function P(t){var a;const r=S(t);return(a=r?.$el)!==null&&a!==void 0?a:r}function T(...t){const a=(o,u,s,d)=>(o.addEventListener(u,s,d),()=>o.removeEventListener(u,s,d)),r=w(()=>{const o=C(S(t[0])).filter(u=>u!=null);return o.every(u=>typeof u!="string")?o:void 0});return q(()=>{var o,u;return[(o=(u=r.value)===null||u===void 0?void 0:u.map(s=>P(s)))!==null&&o!==void 0?o:[O].filter(s=>s!=null),C(S(r.value?t[1]:t[0])),C(R(r.value?t[2]:t[1])),S(r.value?t[3]:t[2])]},([o,u,s,d],p,c)=>{if(!o?.length||!u?.length||!s?.length)return;const f=Y(d)?{...d}:d,v=o.flatMap(b=>u.flatMap(h=>s.map(y=>a(b,h,y,f))));c(()=>{v.forEach(b=>b())})},{flush:"post"})}function B(t,a,r={}){const{window:o=O,ignore:u=[],capture:s=!0,detectIframe:d=!1,controls:p=!1}=r;if(!o)return p?{stop:$,cancel:$,trigger:$}:$;let c=!0;const f=e=>S(u).some(n=>{if(typeof n=="string")return Array.from(o.document.querySelectorAll(n)).some(i=>i===e.target||e.composedPath().includes(i));{const i=P(n);return i&&(e.target===i||e.composedPath().includes(i))}});function v(e){const n=S(e);return n&&n.$.subTree.shapeFlag===16}function b(e,n){const i=S(e),m=i.$.subTree&&i.$.subTree.children;return m==null||!Array.isArray(m)?!1:m.some(A=>A.el===n.target||n.composedPath().includes(A.el))}const h=e=>{const n=P(t);if(e.target!=null&&!(!(n instanceof Element)&&v(t)&&b(t,e))&&!(!n||n===e.target||e.composedPath().includes(n))){if("detail"in e&&e.detail===0&&(c=!f(e)),!c){c=!0;return}a(e)}};let y=!1;const E=[T(o,"click",e=>{y||(y=!0,setTimeout(()=>{y=!1},0),h(e))},{passive:!0,capture:s}),T(o,"pointerdown",e=>{const n=P(t);c=!f(e)&&!!(n&&!e.composedPath().includes(n))},{passive:!0}),d&&T(o,"blur",e=>{setTimeout(()=>{var n;const i=P(t);((n=o.document.activeElement)===null||n===void 0?void 0:n.tagName)==="IFRAME"&&!i?.contains(o.document.activeElement)&&a(e)},0)},{passive:!0})].filter(Boolean),x=()=>E.forEach(e=>e());return p?{stop:x,cancel:()=>{c=!1},trigger:e=>{c=!0,h(e),c=!1}}:x}function D(t,a={}){const{threshold:r=50,onSwipe:o,onSwipeEnd:u,onSwipeStart:s,passive:d=!0}=a,p=k({x:0,y:0}),c=k({x:0,y:0}),f=w(()=>p.x-c.x),v=w(()=>p.y-c.y),{max:b,abs:h}=Math,y=w(()=>b(h(f.value),h(v.value))>=r),E=L(!1),x=w(()=>y.value?h(f.value)>h(v.value)?f.value>0?"left":"right":v.value>0?"up":"down":"none"),e=l=>[l.touches[0].clientX,l.touches[0].clientY],n=(l,g)=>{p.x=l,p.y=g},i=(l,g)=>{c.x=l,c.y=g},m={passive:d,capture:!d},A=l=>{E.value&&u?.(l,x.value),E.value=!1},j=[T(t,"touchstart",l=>{if(l.touches.length!==1)return;const[g,M]=e(l);n(g,M),i(g,M),s?.(l)},m),T(t,"touchmove",l=>{if(l.touches.length!==1)return;const[g,M]=e(l);i(g,M),m.capture&&!m.passive&&Math.abs(f.value)>Math.abs(v.value)&&l.preventDefault(),!E.value&&y.value&&(E.value=!0),E.value&&o?.(l)},m),T(t,["touchend","touchcancel"],A,m)];return{isSwiping:E,direction:x,coordsStart:p,coordsEnd:c,lengthX:f,lengthY:v,stop:()=>j.forEach(l=>l())}}export{D as a,B as o,P as u};
+import{H as I,q as w,P as S,J as k,Q as L,u as R}from"./index-BCe-EVqv.js";const W=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const X=Object.prototype.toString,Y=t=>X.call(t)==="[object Object]",$=()=>{};function C(t){return Array.isArray(t)?t:[t]}function q(t,a,r){return I(t,a,{...r,immediate:!0})}const O=W?window:void 0;function P(t){var a;const r=S(t);return(a=r?.$el)!==null&&a!==void 0?a:r}function T(...t){const a=(o,u,s,d)=>(o.addEventListener(u,s,d),()=>o.removeEventListener(u,s,d)),r=w(()=>{const o=C(S(t[0])).filter(u=>u!=null);return o.every(u=>typeof u!="string")?o:void 0});return q(()=>{var o,u;return[(o=(u=r.value)===null||u===void 0?void 0:u.map(s=>P(s)))!==null&&o!==void 0?o:[O].filter(s=>s!=null),C(S(r.value?t[1]:t[0])),C(R(r.value?t[2]:t[1])),S(r.value?t[3]:t[2])]},([o,u,s,d],p,c)=>{if(!o?.length||!u?.length||!s?.length)return;const f=Y(d)?{...d}:d,v=o.flatMap(b=>u.flatMap(h=>s.map(y=>a(b,h,y,f))));c(()=>{v.forEach(b=>b())})},{flush:"post"})}function B(t,a,r={}){const{window:o=O,ignore:u=[],capture:s=!0,detectIframe:d=!1,controls:p=!1}=r;if(!o)return p?{stop:$,cancel:$,trigger:$}:$;let c=!0;const f=e=>S(u).some(n=>{if(typeof n=="string")return Array.from(o.document.querySelectorAll(n)).some(i=>i===e.target||e.composedPath().includes(i));{const i=P(n);return i&&(e.target===i||e.composedPath().includes(i))}});function v(e){const n=S(e);return n&&n.$.subTree.shapeFlag===16}function b(e,n){const i=S(e),m=i.$.subTree&&i.$.subTree.children;return m==null||!Array.isArray(m)?!1:m.some(A=>A.el===n.target||n.composedPath().includes(A.el))}const h=e=>{const n=P(t);if(e.target!=null&&!(!(n instanceof Element)&&v(t)&&b(t,e))&&!(!n||n===e.target||e.composedPath().includes(n))){if("detail"in e&&e.detail===0&&(c=!f(e)),!c){c=!0;return}a(e)}};let y=!1;const E=[T(o,"click",e=>{y||(y=!0,setTimeout(()=>{y=!1},0),h(e))},{passive:!0,capture:s}),T(o,"pointerdown",e=>{const n=P(t);c=!f(e)&&!!(n&&!e.composedPath().includes(n))},{passive:!0}),d&&T(o,"blur",e=>{setTimeout(()=>{var n;const i=P(t);((n=o.document.activeElement)===null||n===void 0?void 0:n.tagName)==="IFRAME"&&!i?.contains(o.document.activeElement)&&a(e)},0)},{passive:!0})].filter(Boolean),x=()=>E.forEach(e=>e());return p?{stop:x,cancel:()=>{c=!1},trigger:e=>{c=!0,h(e),c=!1}}:x}function D(t,a={}){const{threshold:r=50,onSwipe:o,onSwipeEnd:u,onSwipeStart:s,passive:d=!0}=a,p=k({x:0,y:0}),c=k({x:0,y:0}),f=w(()=>p.x-c.x),v=w(()=>p.y-c.y),{max:b,abs:h}=Math,y=w(()=>b(h(f.value),h(v.value))>=r),E=L(!1),x=w(()=>y.value?h(f.value)>h(v.value)?f.value>0?"left":"right":v.value>0?"up":"down":"none"),e=l=>[l.touches[0].clientX,l.touches[0].clientY],n=(l,g)=>{p.x=l,p.y=g},i=(l,g)=>{c.x=l,c.y=g},m={passive:d,capture:!d},A=l=>{E.value&&u?.(l,x.value),E.value=!1},j=[T(t,"touchstart",l=>{if(l.touches.length!==1)return;const[g,M]=e(l);n(g,M),i(g,M),s?.(l)},m),T(t,"touchmove",l=>{if(l.touches.length!==1)return;const[g,M]=e(l);i(g,M),m.capture&&!m.passive&&Math.abs(f.value)>Math.abs(v.value)&&l.preventDefault(),!E.value&&y.value&&(E.value=!0),E.value&&o?.(l)},m),T(t,["touchend","touchcancel"],A,m)];return{isSwiping:E,direction:x,coordsStart:p,coordsEnd:c,lengthX:f,lengthY:v,stop:()=>j.forEach(l=>l())}}export{D as a,B as o,P as u};
diff --git a/src/static/dist/WGDashboardAdmin/assets/localeText-DGSSxTBj.js b/src/static/dist/WGDashboardAdmin/assets/localeText-fe5sRLWX.js
similarity index 76%
rename from src/static/dist/WGDashboardAdmin/assets/localeText-DGSSxTBj.js
rename to src/static/dist/WGDashboardAdmin/assets/localeText-fe5sRLWX.js
index 948fed96..9bbca09b 100644
--- a/src/static/dist/WGDashboardAdmin/assets/localeText-DGSSxTBj.js
+++ b/src/static/dist/WGDashboardAdmin/assets/localeText-fe5sRLWX.js
@@ -1 +1 @@
-import{_ as e,G as t,c as o,t as a,f as c}from"./index-DW-_CXHM.js";const s={name:"localeText",props:{t:""},computed:{getLocaleText(){return t(this.t)}}};function n(r,p,l,_,i,x){return c(),o("span",null,a(this.getLocaleText),1)}const m=e(s,[["render",n]]);export{m as L};
+import{_ as e,G as t,c as o,t as a,f as c}from"./index-BCe-EVqv.js";const s={name:"localeText",props:{t:""},computed:{getLocaleText(){return t(this.t)}}};function n(r,p,l,_,i,x){return c(),o("span",null,a(this.getLocaleText),1)}const m=e(s,[["render",n]]);export{m as L};
diff --git a/src/static/dist/WGDashboardAdmin/assets/message-GT1GlDor.js b/src/static/dist/WGDashboardAdmin/assets/message-DEALuPCn.js
similarity index 84%
rename from src/static/dist/WGDashboardAdmin/assets/message-GT1GlDor.js
rename to src/static/dist/WGDashboardAdmin/assets/message-DEALuPCn.js
index 33f0d405..424501cd 100644
--- a/src/static/dist/WGDashboardAdmin/assets/message-GT1GlDor.js
+++ b/src/static/dist/WGDashboardAdmin/assets/message-DEALuPCn.js
@@ -1 +1 @@
-import{L as l}from"./localeText-DGSSxTBj.js";import{d as c}from"./dayjs.min-CkHkDA7F.js";import{_ as h,c as o,a as e,b as a,w as u,e as p,h as g,t as i,k as f,n as _,f as n}from"./index-DW-_CXHM.js";const x={name:"message",methods:{dayjs:c,hide(){this.ct(),this.message.show=!1},show(){this.timeout=setTimeout(()=>{this.message.show=!1},5e3)},ct(){clearTimeout(this.timeout)}},components:{LocaleText:l},props:{message:Object},mounted(){this.show()},data(){return{dismiss:!1,timeout:null}}},v=["id"],b={key:0,class:"d-flex"},w={class:"fw-bold d-block",style:{"text-transform":"uppercase"}},y={class:"ms-auto"},k={key:1},T={class:"card-body d-flex align-items-center gap-3"};function M(C,s,L,j,t,m){const d=g("LocaleText");return n(),o("div",{onMouseenter:s[1]||(s[1]=r=>{t.dismiss=!0,this.ct()}),onMouseleave:s[2]||(s[2]=r=>{t.dismiss=!1,this.show()}),class:"card shadow rounded-3 position-relative message ms-auto",id:this.message.id},[e("div",{class:_([{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"},"card-header pos"])},[a(f,{name:"zoom",mode:"out-in"},{default:u(()=>[t.dismiss?(n(),o("div",k,[e("small",{onClick:s[0]||(s[0]=r=>m.hide()),class:"d-block mx-auto w-100 text-center",style:{cursor:"pointer"}},[s[3]||(s[3]=e("i",{class:"bi bi-x-lg me-2"},null,-1)),a(d,{t:"Dismiss"})])])):(n(),o("div",b,[e("small",w,[a(d,{t:"FROM "}),p(" "+i(this.message.from),1)]),e("small",y,i(m.dayjs().format("hh:mm A")),1)]))]),_:1})],2),e("div",T,[e("div",null,i(this.message.content),1)])],40,v)}const z=h(x,[["render",M],["__scopeId","data-v-94c76b54"]]);export{z as M};
+import{L as l}from"./localeText-fe5sRLWX.js";import{d as c}from"./dayjs.min-Ba6APokV.js";import{_ as h,c as o,a as e,b as a,w as u,e as p,h as g,t as i,k as f,n as _,f as n}from"./index-BCe-EVqv.js";const x={name:"message",methods:{dayjs:c,hide(){this.ct(),this.message.show=!1},show(){this.timeout=setTimeout(()=>{this.message.show=!1},5e3)},ct(){clearTimeout(this.timeout)}},components:{LocaleText:l},props:{message:Object},mounted(){this.show()},data(){return{dismiss:!1,timeout:null}}},v=["id"],b={key:0,class:"d-flex"},w={class:"fw-bold d-block",style:{"text-transform":"uppercase"}},y={class:"ms-auto"},k={key:1},T={class:"card-body d-flex align-items-center gap-3"};function M(C,s,L,j,t,m){const d=g("LocaleText");return n(),o("div",{onMouseenter:s[1]||(s[1]=r=>{t.dismiss=!0,this.ct()}),onMouseleave:s[2]||(s[2]=r=>{t.dismiss=!1,this.show()}),class:"card shadow rounded-3 position-relative message ms-auto",id:this.message.id},[e("div",{class:_([{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"},"card-header pos"])},[a(f,{name:"zoom",mode:"out-in"},{default:u(()=>[t.dismiss?(n(),o("div",k,[e("small",{onClick:s[0]||(s[0]=r=>m.hide()),class:"d-block mx-auto w-100 text-center",style:{cursor:"pointer"}},[s[3]||(s[3]=e("i",{class:"bi bi-x-lg me-2"},null,-1)),a(d,{t:"Dismiss"})])])):(n(),o("div",b,[e("small",w,[a(d,{t:"FROM "}),p(" "+i(this.message.from),1)]),e("small",y,i(m.dayjs().format("hh:mm A")),1)]))]),_:1})],2),e("div",T,[e("div",null,i(this.message.content),1)])],40,v)}const z=h(x,[["render",M],["__scopeId","data-v-94c76b54"]]);export{z as M};
diff --git a/src/static/dist/WGDashboardAdmin/assets/newConfiguration-KTw7FLm0.js b/src/static/dist/WGDashboardAdmin/assets/newConfiguration-CSZaxFrx.js
similarity index 99%
rename from src/static/dist/WGDashboardAdmin/assets/newConfiguration-KTw7FLm0.js
rename to src/static/dist/WGDashboardAdmin/assets/newConfiguration-CSZaxFrx.js
index c795b093..25e19255 100644
--- a/src/static/dist/WGDashboardAdmin/assets/newConfiguration-KTw7FLm0.js
+++ b/src/static/dist/WGDashboardAdmin/assets/newConfiguration-CSZaxFrx.js
@@ -1,3 +1,3 @@
-import{p as F,e as V,c as W,m as z}from"./index-Bno8fcdN.js";import{B as G,W as B,r as h,o as J,H as U,q as j,c as a,f as n,a as e,d as T,m as w,b as r,t as _,y as P,C as H,F as A,i as N,e as I,n as D,z as q,E as Z,g as E,j as Q,_ as X,w as Y,h as O,D as ee}from"./index-DW-_CXHM.js";import{L as g}from"./localeText-DGSSxTBj.js";import{r as te}from"./galois-field-I2lBzzs-.js";const se=s=>{const t=s.split(`
+import{p as F,e as V,c as W,m as z}from"./index-Bno8fcdN.js";import{B as G,W as B,r as h,o as J,H as U,q as j,c as a,f as n,a as e,d as T,m as w,b as r,t as _,y as P,C as H,F as A,i as N,e as I,n as D,z as q,E as Z,g as E,j as Q,_ as X,w as Y,h as O,D as ee}from"./index-BCe-EVqv.js";import{L as g}from"./localeText-fe5sRLWX.js";import{r as te}from"./galois-field-I2lBzzs-.js";const se=s=>{const t=s.split(`
`),o={};for(let f of t){if(f==="[Peer]")break;if(f.length>0){let l=f.replace(" = ","=");l.indexOf("=")>-1&&(l=[l.slice(0,l.indexOf("=")),l.slice(l.indexOf("=")+1)],l[0]==="ListenPort"?o[l[0]]=parseInt(l[1]):o[l[0]]=l[1])}}return o},oe=s=>{const t=s.split(`
`),o=[];let f=-1;const l=t.indexOf("[Peer]");if(l===-1)return!1;for(let d=l;d-1&&(b=[b.slice(0,b.indexOf("=")),b.slice(b.indexOf("=")+1)],o[f][b[0]]=b[1])}return o};te();const ne={class:"card rounded-3"},ie={class:"card-body"},ae={class:"row"},le={class:"col-sm"},re={class:"d-flex flex-column gap-2"},de={class:"d-flex align-items-center"},ue={class:"text-muted"},ce={key:0,class:"mb-0 ms-auto"},pe={key:0,class:"d-flex gap-2 flex-column"},me={class:"text-muted d-flex align-items-center gap-1",style:{"white-space":"nowrap"}},fe={class:"badge rounded-pill text-bg-success ms-auto"},be={value:void 0,disabled:""},ve=["value"],ge={class:"col-sm"},he={class:"d-flex flex-column gap-2 h-100"},we={class:"d-flex align-items-center"},ye={class:"text-muted"},_e={key:0,class:"mb-0 ms-auto"},Ce={key:1,class:"d-flex ms-auto align-items-center"},Pe={key:0,class:"d-flex gap-2 flex-column mt-auto"},xe={class:"text-muted d-flex align-items-center gap-1",style:{"white-space":"nowrap"}},Se={class:"badge rounded-pill text-bg-success ms-auto"},$e={value:void 0,disabled:""},Le=["value"],ke={key:0,class:"d-flex gap-2"},Te={key:1,class:"d-flex gap-2"},M=G({__name:"newConfigurationTemplate",props:["template","edit","isNew","peersCount"],emits:["subnet","port","update","remove"],setup(s,{emit:t}){const o=s,f=B(),l=h(!1);o.edit&&(l.value=!0);const d=h({...o.template});h(256);const b=h([]);h(20);const u=t,S=h(void 0),i=h(void 0),x=h([]),$=()=>{if(b.value=[],o.template.Subnet){let v=new Set([...V(o.template.Subnet)]);if(o.peersCount&&o.peersCount>0){for(let k of f.Configurations){let K=k.Address.replace(" ","").split(",");for(let R of K)W(o.template.Subnet,R)&&(v=v.difference(new Set([...V(R)])))}let c=Math.floor(v.size/o.peersCount),p=0;v=Array.from(v);for(let k=0;k<(c>10?10:c);k++)b.value.push(z(v.slice(p,p+o.peersCount))),p+=o.peersCount}}},m=()=>{if(o.template.ListenPortStart&&o.template.ListenPortEnd){let v=o.template.ListenPortStart,c=o.template.ListenPortEnd;v>c&&(v=o.template.ListenPortEnd,c=o.template.ListenPortStart);let p=new Set(Array.from({length:c-v+1},(k,K)=>v+K));x.value=[...p.difference(new Set(f.Configurations.map(k=>Number(k.ListenPort))))]}};J(()=>{o.isNew||($(),m())}),U(()=>o.peersCount,()=>{$()}),U(S,()=>{u("subnet",S.value)}),U(i,()=>{u("port",i.value)}),U(()=>o.template,()=>{$(),m()},{deep:!0});const y=j(()=>{try{const{start:v,end:c}=F(d.value.Subnet);if(c-v>=1000000n)throw new Error("Too many IPs");return d.value.Subnet&&d.value.ListenPortStart&&d.value.ListenPortEnd&&d.value.ListenPortEnd>=d.value.ListenPortStart}catch{return!1}}),L=async()=>{await q("/api/newConfigurationTemplates/updateTemplate",{Template:d.value},v=>{v.status&&(u("update",d.value),l.value=!1)})},C=async()=>{await q("/api/newConfigurationTemplates/deleteTemplate",{Template:d.value},v=>{v.status&&u("remove",d)})};return(v,c)=>(n(),a("div",ne,[e("div",ie,[e("div",ae,[e("div",le,[e("div",re,[e("div",de,[e("label",ue,[e("small",null,[r(g,{t:"Subnet"})])]),l.value?w((n(),a("input",{key:1,class:"form-control-sm form-control rounded-3 w-auto ms-auto","onUpdate:modelValue":c[0]||(c[0]=p=>d.value.Subnet=p)},null,512)),[[P,d.value.Subnet]]):(n(),a("p",ce,[e("small",null,_(s.template.Subnet),1)]))]),l.value?T("",!0):(n(),a("div",pe,[e("label",me,[e("small",null,[r(g,{t:"Available Subnets"})]),e("span",fe,_(b.value.length),1)]),w(e("select",{"onUpdate:modelValue":c[1]||(c[1]=p=>S.value=p),class:"form-select form-select-sm rounded-3 w-100 ms-auto"},[e("option",be,[r(g,{t:"Select..."})]),(n(!0),a(A,null,N(b.value,p=>(n(),a("option",{value:p.join(", ")},_(p.join(", ")),9,ve))),256))],512),[[H,S.value]])]))])]),e("div",ge,[e("div",he,[e("div",we,[e("label",ye,[e("small",null,[r(g,{t:"Listen Port Range"})])]),l.value?(n(),a("div",Ce,[w(e("input",{class:"form-control-sm form-control rounded-3 ms-auto",style:{width:"80px"},"onUpdate:modelValue":c[2]||(c[2]=p=>d.value.ListenPortStart=p),type:"number"},null,512),[[P,d.value.ListenPortStart]]),c[10]||(c[10]=e("i",{class:"bi bi-arrow-right mx-2"},null,-1)),w(e("input",{class:"form-control-sm form-control rounded-3 ms-auto",style:{width:"80px"},"onUpdate:modelValue":c[3]||(c[3]=p=>d.value.ListenPortEnd=p),type:"number"},null,512),[[P,d.value.ListenPortEnd]])])):(n(),a("p",_e,[e("small",null,[I(_(s.template.ListenPortStart),1),c[9]||(c[9]=e("i",{class:"bi bi-arrow-right mx-2"},null,-1)),I(" "+_(s.template.ListenPortEnd),1)])]))]),l.value?T("",!0):(n(),a("div",Pe,[e("label",xe,[e("small",null,[r(g,{t:"Available Ports"})]),e("span",Se,_(x.value.length),1)]),w(e("select",{"onUpdate:modelValue":c[4]||(c[4]=p=>i.value=p),class:"form-select form-select-sm rounded-3 w-100 ms-auto"},[e("option",$e,[r(g,{t:"Select..."})]),(n(!0),a(A,null,N([...x.value],p=>(n(),a("option",{value:p},_(p),9,Le))),256))],512),[[H,i.value]])]))])])]),c[11]||(c[11]=e("hr",null,null,-1)),l.value?(n(),a("div",Te,[e("button",{type:"button",onClick:c[7]||(c[7]=p=>s.isNew?u("remove"):l.value=!1),class:"ms-auto btn btn-sm border-secondary-subtle bg-secondary-subtle text-secondary-emphasis rounded-3"},[r(g,{t:"Cancel"})]),e("button",{type:"button",onClick:c[8]||(c[8]=p=>L()),class:D([{disabled:!y.value},"btn btn-sm border-primary-subtle bg-primary-subtle text-primary-emphasis rounded-3"])},[r(g,{t:"Save"})],2)])):(n(),a("div",ke,[e("button",{type:"button",onClick:c[5]||(c[5]=p=>{l.value=!0,d.value={...o.template}}),class:"ms-auto btn btn-sm border-primary-subtle bg-primary-subtle text-primary-emphasis rounded-3"},[r(g,{t:"Edit"})]),e("button",{type:"button",onClick:c[6]||(c[6]=p=>C()),class:"btn btn-sm border-danger-subtle bg-danger-subtle text-danger-emphasis rounded-3"},[r(g,{t:"Delete"})])]))])]))}}),Ae={class:"card rounded-3"},Ne={class:"card-header"},Ue={class:"d-flex align-items-center"},Ie={class:"text-muted"},Ke={class:"card-body"},Oe={key:0,class:"d-flex gap-2 align-items-center mb-2"},De={class:"text-muted",style:{"white-space":"nowrap"}},qe={class:"row g-2"},Ee={key:0,class:"col-12"},Re={class:"text-center text-muted m-0"},Ve={class:"col-12"},He={class:"col-12"},Me=G({__name:"newConfigurationTemplates",emits:["subnet","port"],async setup(s,{emit:t}){let o,f;const l=t,d=h([]),b=async()=>{await E("/api/newConfigurationTemplates",{},$=>{d.value=$.data})};[o,f]=Z(()=>b()),await o,f();const u=h([]),S=async()=>{await E("/api/newConfigurationTemplates/createTemplate",{},$=>{u.value.push($.data)})},i=h(256),x=h(256);return($,m)=>(n(),a("div",Ae,[e("div",Ne,[e("div",Ue,[r(g,{t:"Subnets & Listen Ports Templates"}),e("button",{type:"button",onClick:m[0]||(m[0]=y=>S()),class:"btn btn-sm bg-success-subtle text-success-emphasis border-success-subtle rounded-3 ms-auto"},[m[9]||(m[9]=e("i",{class:"bi bi-plus-circle me-2"},null,-1)),r(g,{t:"Add Template"})])]),e("small",Ie,[r(g,{t:"Create templates to keep track a list of available Subnets & Listen Ports"})])]),e("div",Ke,[d.value.length>0?(n(),a("div",Oe,[e("label",De,[e("small",null,[r(g,{t:"No. of IP Address / Subnet"})])]),w(e("input",{type:"number","onUpdate:modelValue":m[1]||(m[1]=y=>i.value=y),onChange:m[2]||(m[2]=y=>x.value=i.value),class:"form-control form-control-sm rounded-3 w-100 ms-auto"},null,544),[[P,i.value]])])):T("",!0),e("div",qe,[u.value.length===0&&d.value.length===0?(n(),a("div",Ee,[e("p",Re,[r(g,{t:"No Templates"})])])):T("",!0),(n(!0),a(A,null,N(u.value,y=>(n(),a("div",Ve,[r(M,{edit:!0,isNew:!0,onRemove:L=>u.value=u.value.filter(C=>C.TemplateID!==y.TemplateID),onUpdate:L=>{u.value=u.value.filter(C=>C.TemplateID!==y.TemplateID),b()},onSubnet:m[3]||(m[3]=L=>l("subnet",L)),onPort:m[4]||(m[4]=L=>l("port",L)),template:y},null,8,["onRemove","onUpdate","template"])]))),256)),(n(!0),a(A,null,N(d.value,(y,L)=>(n(),a("div",He,[(n(),Q(M,{key:y.TemplateID,peersCount:x.value,onRemove:m[5]||(m[5]=C=>b()),onUpdate:m[6]||(m[6]=C=>b()),onSubnet:m[7]||(m[7]=C=>l("subnet",C)),onPort:m[8]||(m[8]=C=>l("port",C)),template:y},null,8,["peersCount","template"]))]))),256))])])]))}}),Fe={name:"newConfiguration",components:{NewConfigurationTemplates:Me,LocaleText:g},async setup(){const s=B(),t=h([]);await E("/api/protocolsEnabled",{},f=>{t.value=f.data});const o=ee();return{store:s,protocols:t,dashboardStore:o}},data(){return{newConfiguration:{ConfigurationName:"",Address:"",ListenPort:"",PrivateKey:"",PublicKey:"",PresharedKey:"",PreUp:"",PreDown:"",PostUp:"",PostDown:"",Table:"",Protocol:"wg",Jc:5,Jmin:49,Jmax:998,S1:17,S2:110,H1:0,H2:0,H3:0,H4:0},numberOfAvailableIPs:"0",error:!1,errorMessage:"",success:!1,loading:!1,parseInterfaceResult:void 0,parsePeersResult:void 0}},created(){this.wireguardGenerateKeypair();let s=[];for(;[...new Set(s)].length!==4;)s=[this.rand(1,2**31-1),this.rand(1,2**31-1),this.rand(1,2**31-1),this.rand(1,2**31-1)];this.newConfiguration.H1=s[0],this.newConfiguration.H2=s[1],this.newConfiguration.H3=s[2],this.newConfiguration.H4=s[3]},methods:{rand(s,t){return Math.floor(Math.random()*(t-s)+s)},wireguardGenerateKeypair(){const s=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=s.privateKey,this.newConfiguration.PublicKey=s.publicKey,this.newConfiguration.PresharedKey=s.presharedKey},async saveNewConfiguration(){this.goodToSubmit&&(this.loading=!0,await q("/api/addWireguardConfiguration",this.newConfiguration,async s=>{s.status?(this.success=!0,await this.store.getConfigurations(),this.$router.push(`/configuration/${this.newConfiguration.ConfigurationName}/peers`)):(this.error=!0,this.errorMessage=s.message,document.querySelector(`#${s.data}`).classList.remove("is-valid"),document.querySelector(`#${s.data}`).classList.add("is-invalid"),this.loading=!1)}))},openFileUpload(){document.querySelector("#fileUpload").click()},readFile(s){const t=s.target.files[0];if(!t)return!1;const o=new FileReader;o.onload=f=>{this.parseInterfaceResult=se(f.target.result),this.parsePeersResult=oe(f.target.result);let l=0;if(this.parseInterfaceResult){this.newConfiguration.ConfigurationName=t.name.replace(".conf","");for(let d of Object.keys(this.parseInterfaceResult))Object.keys(this.newConfiguration).includes(d)&&(this.newConfiguration[d]=this.parseInterfaceResult[d],l+=1)}l>0?this.dashboardStore.newMessage("WGDashboard",`Parse successful! Updated ${l} field(s)`,"success"):this.dashboardStore.newMessage("WGDashboard","Parse failed","danger")},o.readAsText(t)}},computed:{goodToSubmit(){let s=["ConfigurationName","Address","ListenPort","PrivateKey"],t=[...document.querySelectorAll("input[required]")];return s.find(o=>this.newConfiguration[o].length===0)===void 0&&t.find(o=>o.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(s){let t=document.querySelector("#Address");if(t){t.classList.remove("is-invalid","is-valid");try{this.numberOfAvailableIPs=0,s.replace(" ","").split(",").forEach(o=>{let f=F(o),l=Number(f.end-f.start);this.numberOfAvailableIPs+=l+1}),t.classList.add("is-valid")}catch(o){console.log(o),this.numberOfAvailableIPs="0",t.classList.add("is-invalid")}}},"newConfiguration.ListenPort"(s){let t=document.querySelector("#ListenPort");t&&(t.classList.remove("is-invalid","is-valid"),s<0||s>65353||!Number.isInteger(s)?t.classList.add("is-invalid"):t.classList.add("is-valid"))},"newConfiguration.ConfigurationName"(s){let t=document.querySelector("#ConfigurationName");t&&(t.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(s)||s.length===0||this.store.Configurations.find(o=>o.Name===s)?t.classList.add("is-invalid"):t.classList.add("is-valid"))},"newConfiguration.PrivateKey"(s){let t=document.querySelector("#PrivateKey");if(t){t.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(s),t.classList.add("is-valid")}catch{t.classList.add("is-invalid")}}}},mounted(){document.querySelector("#fileUpload").addEventListener("change",this.readFile,!1)}},Ge={class:"mt-md-5 mt-3 text-body"},Be={class:"container mb-4"},We={class:"mb-4 d-flex align-items-center gap-4 align-items-center"},ze={class:"mb-0"},Je={class:"d-flex gap-2 ms-auto"},je={class:"card rounded-3 shadow"},Ze={class:"card-header"},Qe={class:"card-body d-flex gap-2 protocolBtnGroup"},Xe={key:0,class:"bi bi-check-circle-fill me-2"},Ye={key:1,class:"bi bi-circle me-2"},et={key:0,class:"bi bi-check-circle-fill me-2"},tt={key:1,class:"bi bi-circle me-2"},st={class:"card rounded-3 shadow"},ot={class:"card-header"},nt={class:"card-body"},it=["disabled"],at={class:"invalid-feedback"},lt={key:0},rt={key:1},dt={class:"mb-0"},ut={class:"card rounded-3 shadow"},ct={class:"card-header"},pt={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},mt={class:"mb-2"},ft={class:"text-muted fw-bold mb-1"},bt={class:"input-group"},vt=["disabled"],gt={class:"text-muted fw-bold mb-1"},ht={class:"card rounded-3 shadow"},wt={class:"card-header"},yt={class:"card-body"},_t=["disabled"],Ct={class:"invalid-feedback"},Pt={key:0},xt={key:1},St={class:"card rounded-3 shadow"},$t={class:"card-header d-flex align-items-center"},Lt={class:"badge rounded-pill text-bg-success ms-auto"},kt={class:"card-body"},Tt=["disabled"],At={class:"invalid-feedback"},Nt={key:0},Ut={key:1},It={class:"accordion",id:"newConfigurationOptionalAccordion"},Kt={class:"accordion-item"},Ot={class:"accordion-header"},Dt={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},qt={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Et={class:"accordion-body d-flex flex-column gap-3"},Rt={class:"card rounded-3"},Vt={class:"card-header"},Ht={class:"card-body"},Mt=["id","onUpdate:modelValue"],Ft={class:"card rounded-3"},Gt={class:"card-header"},Bt={class:"card-body"},Wt=["id","onUpdate:modelValue"],zt=["disabled"],Jt={key:0,class:"d-flex w-100"},jt={key:1,class:"d-flex w-100"},Zt={key:2,class:"d-flex w-100 align-items-center"};function Qt(s,t,o,f,l,d){const b=O("RouterLink"),u=O("LocaleText"),S=O("NewConfigurationTemplates");return n(),a("div",Ge,[e("div",Be,[e("div",We,[r(b,{to:"/",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:Y(()=>[...t[12]||(t[12]=[e("h2",{class:"mb-0",style:{"line-height":"0"}},[e("i",{class:"bi bi-arrow-left-circle"})],-1)])]),_:1}),e("h2",ze,[r(u,{t:"New Configuration"})]),e("div",Je,[e("button",{class:"titleBtn py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[0]||(t[0]=i=>d.openFileUpload()),type:"button","aria-expanded":"false"},[t[13]||(t[13]=e("i",{class:"bi bi-upload me-2"},null,-1)),r(u,{t:"Open File"})]),t[14]||(t[14]=e("input",{type:"file",id:"fileUpload",multiple:"",class:"d-none",accept:"text/plain"},null,-1))])]),e("form",{class:"text-body d-flex flex-column gap-3",onSubmit:t[11]||(t[11]=i=>{i.preventDefault(),this.saveNewConfiguration()})},[e("div",je,[e("div",Ze,[r(u,{t:"Protocol"})]),e("div",Qe,[this.protocols.includes("wg")?(n(),a("a",{key:0,onClick:t[1]||(t[1]=i=>this.newConfiguration.Protocol="wg"),class:D([{"opacity-50":this.newConfiguration.Protocol!=="wg"},"btn btn-primary wireguardBg border-0"]),style:{"flex-basis":"100%"}},[this.newConfiguration.Protocol==="wg"?(n(),a("i",Xe)):(n(),a("i",Ye)),t[15]||(t[15]=e("strong",null," WireGuard ",-1))],2)):T("",!0),this.protocols.includes("awg")?(n(),a("a",{key:1,onClick:t[2]||(t[2]=i=>this.newConfiguration.Protocol="awg"),class:D([{"opacity-50":this.newConfiguration.Protocol!=="awg"},"btn btn-primary amneziawgBg border-0"]),style:{"flex-basis":"100%"}},[this.newConfiguration.Protocol==="awg"?(n(),a("i",et)):(n(),a("i",tt)),t[16]||(t[16]=e("strong",null," AmneziaWG ",-1))],2)):T("",!0)])]),e("div",st,[e("div",ot,[r(u,{t:"Configuration Name"})]),e("div",nt,[w(e("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":t[3]||(t[3]=i=>this.newConfiguration.ConfigurationName=i),disabled:this.loading,required:""},null,8,it),[[P,this.newConfiguration.ConfigurationName]]),e("div",at,[this.error?(n(),a("div",lt,_(this.errorMessage),1)):(n(),a("div",rt,[r(u,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",dt,[e("li",null,[r(u,{t:"Configuration name already exist."})]),e("li",null,[r(u,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),e("div",ut,[e("div",ct,[r(u,{t:"Private Key"}),t[17]||(t[17]=I(" & ",-1)),r(u,{t:"Public Key"})]),e("div",pt,[e("div",mt,[e("label",ft,[e("small",null,[r(u,{t:"Private Key"})])]),e("div",bt,[w(e("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":t[4]||(t[4]=i=>this.newConfiguration.PrivateKey=i)},null,8,vt),[[P,this.newConfiguration.PrivateKey]]),e("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:t[5]||(t[5]=i=>d.wireguardGenerateKeypair())},[...t[18]||(t[18]=[e("i",{class:"bi bi-arrow-repeat"},null,-1)])])])]),e("div",null,[e("label",gt,[e("small",null,[r(u,{t:"Public Key"})])]),w(e("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":t[6]||(t[6]=i=>this.newConfiguration.PublicKey=i),disabled:""},null,512),[[P,this.newConfiguration.PublicKey]])])])]),r(S,{onSubnet:t[7]||(t[7]=i=>this.newConfiguration.Address=i),onPort:t[8]||(t[8]=i=>this.newConfiguration.ListenPort=i)}),e("div",ht,[e("div",wt,[r(u,{t:"Listen Port"})]),e("div",yt,[w(e("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":t[9]||(t[9]=i=>this.newConfiguration.ListenPort=i),disabled:this.loading,required:""},null,8,_t),[[P,this.newConfiguration.ListenPort]]),e("div",Ct,[this.error?(n(),a("div",Pt,_(this.errorMessage),1)):(n(),a("div",xt,[r(u,{t:"Invalid port"})]))])])]),e("div",St,[e("div",$t,[r(u,{t:"IP Address/CIDR"}),e("span",Lt,[r(u,{t:l.numberOfAvailableIPs+" Available IP Address"},null,8,["t"])])]),e("div",kt,[w(e("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":t[10]||(t[10]=i=>this.newConfiguration.Address=i),disabled:this.loading,required:""},null,8,Tt),[[P,this.newConfiguration.Address]]),e("div",At,[this.error?(n(),a("div",Nt,_(this.errorMessage),1)):(n(),a("div",Ut," IP Address/CIDR is invalid "))])])]),t[23]||(t[23]=e("hr",null,null,-1)),e("div",It,[e("div",Kt,[e("h2",Ot,[e("button",Dt,[r(u,{t:"Optional Settings"})])]),e("div",qt,[e("div",Et,[(n(),a(A,null,N(["Table","PreUp","PreDown","PostUp","PostDown"],i=>e("div",Rt,[e("div",Vt,_(i),1),e("div",Ht,[w(e("input",{type:"text",class:"form-control font-monospace",id:i,"onUpdate:modelValue":x=>this.newConfiguration[i]=x},null,8,Mt),[[P,this.newConfiguration[i]]])])])),64)),this.newConfiguration.Protocol==="awg"?(n(),a(A,{key:0},N(["Jc","Jmin","Jmax","S1","S2","H1","H2","H3","H4"],i=>e("div",Ft,[e("div",Gt,_(i),1),e("div",Bt,[w(e("input",{type:"text",class:"form-control font-monospace",id:i,"onUpdate:modelValue":x=>this.newConfiguration[i]=x},null,8,Wt),[[P,this.newConfiguration[i]]])])])),64)):T("",!0)])])])]),e("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!this.goodToSubmit||this.loading||this.success},[this.success?(n(),a("span",Jt,[r(u,{t:"Success"}),t[19]||(t[19]=I("! ",-1)),t[20]||(t[20]=e("i",{class:"bi bi-check-circle-fill ms-2"},null,-1))])):this.loading?(n(),a("span",Zt,[r(u,{t:"Saving..."}),t[22]||(t[22]=e("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1))])):(n(),a("span",jt,[t[21]||(t[21]=e("i",{class:"bi bi-save-fill me-2"},null,-1)),r(u,{t:"Save"})]))],8,zt)],32)])])}const ss=X(Fe,[["render",Qt],["__scopeId","data-v-c25dcde1"]]);export{ss as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/osmap-Bzmy-oq4.js b/src/static/dist/WGDashboardAdmin/assets/osmap-CLc5c_eh.js
similarity index 98%
rename from src/static/dist/WGDashboardAdmin/assets/osmap-Bzmy-oq4.js
rename to src/static/dist/WGDashboardAdmin/assets/osmap-CLc5c_eh.js
index febfb97f..2471acaa 100644
--- a/src/static/dist/WGDashboardAdmin/assets/osmap-Bzmy-oq4.js
+++ b/src/static/dist/WGDashboardAdmin/assets/osmap-CLc5c_eh.js
@@ -1 +1 @@
-import{S as C,e as y,c as w,m as _,a as L,f as S,l as v,i as M,b as k,d as x,g as A,h as F,j as R,M as D,V as P,T as b,k as l,O as E,n as O,F as h,P as f,o as T,p as c,C as V,q as u,r as X}from"./Vector-CuSZivra.js";import{_ as Y,D as G,c as $,d as j,f as q}from"./index-DW-_CXHM.js";class r extends C{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){y(this.flatCoordinates,t),this.changed()}clone(){const t=new r(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,o,n){return nt.geo&&t.geo.lat&&t.geo.lon);return i?[i.geo.lon,i.geo.lat]:[0,0]}return[this.d.geo.lon,this.d.geo.lat]}},async mounted(){await fetch("https://tile.openstreetmap.org/",{signal:AbortSignal.timeout(1500)}).then(i=>{const t=new D({target:"map",layers:[new b({source:new E})],view:new P({center:l(this.getLastLonLat()),zoom:this.type==="traceroute"?3:10})}),e=[],o=new O;if(this.type==="traceroute")this.d.forEach(s=>{if(s.geo&&s.geo.lat&&s.geo.lon){const a=l([s.geo.lon,s.geo.lat]);e.push(a);const g=this.getLastLonLat(),m=new h({geometry:new f(a),last:s.geo.lon===g[0]&&s.geo.lat===g[1]});o.addFeature(m)}});else{const s=l([this.d.geo.lon,this.d.geo.lat]);e.push(s);const a=new h({geometry:new f(s)});o.addFeature(a)}const n=new r(e),d=new h({geometry:n});o.addFeature(d);const p=new T({source:o,style:function(s){if(s.getGeometry().getType()==="Point")return new c({image:new V({radius:10,fill:new X({color:s.get("last")?"#dc3545":"#0d6efd"}),stroke:new u({color:"white",width:5})})});if(s.getGeometry().getType()==="LineString")return new c({stroke:new u({color:"#0d6efd",width:2})})}});t.addLayer(p)}).catch(i=>{this.osmAvailable=!1})}},z={key:0,id:"map",class:"w-100 rounded-3"};function I(i,t,e,o,n,d){return this.osmAvailable?(q(),$("div",z)):j("",!0)}const H=Y(B,[["render",I]]);export{H as O};
+import{S as C,e as y,c as w,m as _,a as L,f as S,l as v,i as M,b as k,d as x,g as A,h as F,j as R,M as D,V as P,T as b,k as l,O as E,n as O,F as h,P as f,o as T,p as c,C as V,q as u,r as X}from"./Vector-CuSZivra.js";import{_ as Y,D as G,c as $,d as j,f as q}from"./index-BCe-EVqv.js";class r extends C{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){y(this.flatCoordinates,t),this.changed()}clone(){const t=new r(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,o,n){return n