From b97fc16ad9abfea881a769db10ef8b0fe379ff01 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sun, 3 Nov 2024 18:35:21 +0800 Subject: [PATCH] Adjusted router to dynamic import --- src/static/app/dist/assets/browser.js | 8 ++ src/static/app/dist/assets/configuration.js | 1 + .../app/dist/assets/configurationList.css | 1 + .../app/dist/assets/configurationList.js | 1 + src/static/app/dist/assets/dayjs.min.js | 1 + src/static/app/dist/assets/index.css | 4 +- src/static/app/dist/assets/index.js | 74 +++++------------- src/static/app/dist/assets/index2.css | 1 + src/static/app/dist/assets/index2.js | 1 + src/static/app/dist/assets/index3.js | 1 + src/static/app/dist/assets/localeText.js | 1 + src/static/app/dist/assets/message.css | 1 + src/static/app/dist/assets/message.js | 1 + .../app/dist/assets/newConfiguration.js | 1 + src/static/app/dist/assets/osmap.css | 1 + src/static/app/dist/assets/osmap.js | 10 +++ src/static/app/dist/assets/peerCreate.css | 1 + src/static/app/dist/assets/peerCreate.js | 1 + src/static/app/dist/assets/peerList.css | 7 ++ src/static/app/dist/assets/peerList.js | 18 +++++ src/static/app/dist/assets/ping.css | 1 + src/static/app/dist/assets/ping.js | 1 + .../app/dist/assets/restoreConfiguration.css | 1 + .../app/dist/assets/restoreConfiguration.js | 4 + src/static/app/dist/assets/settings.css | 1 + src/static/app/dist/assets/settings.js | 1 + src/static/app/dist/assets/setup.js | 1 + src/static/app/dist/assets/share.css | 1 + src/static/app/dist/assets/share.js | 1 + src/static/app/dist/assets/signin.css | 1 + src/static/app/dist/assets/signin.js | 1 + src/static/app/dist/assets/totp.js | 1 + src/static/app/dist/assets/traceroute.css | 1 + src/static/app/dist/assets/traceroute.js | 1 + src/static/app/dist/assets/vue-datepicker.js | 1 + src/static/app/dist/assets/wireguard.js | 4 + src/static/app/src/router/index.js | 60 +++++++------- src/static/app/src/utilities/locale.js | 3 +- src/static/app/src/views/ping.vue | 3 +- src/static/app/src/views/traceroute.vue | 6 +- src/static/locale/de.json | 73 ++++++++++++++++- src/static/locale/it-IT.json | 78 ++++++++++++++++++- src/static/locale/ru.json | 74 +++++++++++++++++- src/static/locale/uk.json | 74 +++++++++++++++++- 44 files changed, 427 insertions(+), 101 deletions(-) create mode 100644 src/static/app/dist/assets/browser.js create mode 100644 src/static/app/dist/assets/configuration.js create mode 100644 src/static/app/dist/assets/configurationList.css create mode 100644 src/static/app/dist/assets/configurationList.js create mode 100644 src/static/app/dist/assets/dayjs.min.js create mode 100644 src/static/app/dist/assets/index2.css create mode 100644 src/static/app/dist/assets/index2.js create mode 100644 src/static/app/dist/assets/index3.js create mode 100644 src/static/app/dist/assets/localeText.js create mode 100644 src/static/app/dist/assets/message.css create mode 100644 src/static/app/dist/assets/message.js create mode 100644 src/static/app/dist/assets/newConfiguration.js create mode 100644 src/static/app/dist/assets/osmap.css create mode 100644 src/static/app/dist/assets/osmap.js create mode 100644 src/static/app/dist/assets/peerCreate.css create mode 100644 src/static/app/dist/assets/peerCreate.js create mode 100644 src/static/app/dist/assets/peerList.css create mode 100644 src/static/app/dist/assets/peerList.js create mode 100644 src/static/app/dist/assets/ping.css create mode 100644 src/static/app/dist/assets/ping.js create mode 100644 src/static/app/dist/assets/restoreConfiguration.css create mode 100644 src/static/app/dist/assets/restoreConfiguration.js create mode 100644 src/static/app/dist/assets/settings.css create mode 100644 src/static/app/dist/assets/settings.js create mode 100644 src/static/app/dist/assets/setup.js create mode 100644 src/static/app/dist/assets/share.css create mode 100644 src/static/app/dist/assets/share.js create mode 100644 src/static/app/dist/assets/signin.css create mode 100644 src/static/app/dist/assets/signin.js create mode 100644 src/static/app/dist/assets/totp.js create mode 100644 src/static/app/dist/assets/traceroute.css create mode 100644 src/static/app/dist/assets/traceroute.js create mode 100644 src/static/app/dist/assets/vue-datepicker.js create mode 100644 src/static/app/dist/assets/wireguard.js diff --git a/src/static/app/dist/assets/browser.js b/src/static/app/dist/assets/browser.js new file mode 100644 index 0000000..d7e7f6b --- /dev/null +++ b/src/static/app/dist/assets/browser.js @@ -0,0 +1,8 @@ +var O={},bt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},dt={},I={};let it;const Rt=[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];I.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};I.getSymbolTotalCodewords=function(t){return Rt[t]};I.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};I.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');it=t};I.isKanjiModeEnabled=function(){return typeof it<"u"};I.toSJIS=function(t){return it(t)};var $={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+i)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,n){if(e.isValid(o))return o;try{return t(o)}catch{return n}}})($);function ht(){this.buffer=[],this.length=0}ht.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Lt=ht;function V(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}V.prototype.set=function(e,t,i,o){const n=e*this.size+t;this.data[n]=i,o&&(this.reservedBit[n]=!0)};V.prototype.get=function(e,t){return this.data[e*this.size+t]};V.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i};V.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var _t=V,wt={};(function(e){const t=I.getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const n=Math.floor(o/7)+2,r=t(o),s=r===145?26:Math.ceil((r-13)/(2*n-2))*2,c=[r-7];for(let u=1;u=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const r=n.size;let s=0,c=0,u=0,a=null,l=null;for(let p=0;p=5&&(s+=t.N1+(c-5)),a=f,c=1),f=n.get(w,p),f===l?u++:(u>=5&&(s+=t.N1+(u-5)),l=f,u=1)}c>=5&&(s+=t.N1+(c-5)),u>=5&&(s+=t.N1+(u-5))}return s},e.getPenaltyN2=function(n){const r=n.size;let s=0;for(let c=0;c=10&&(c===1488||c===93)&&s++,u=u<<1&2047|n.get(l,a),l>=10&&(u===1488||u===93)&&s++}return s*t.N3},e.getPenaltyN4=function(n){let r=0;const s=n.data.length;for(let u=0;u=0;){const s=r[0];for(let u=0;u0){const r=new Uint8Array(this.degree);return r.set(o,n),r}return o};var Ut=st,pt={},L={},ut={};ut.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var P={};const Bt="[0-9]+",Ft="[A-Z $%*+\\-./:]+";let v="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";v=v.replace(/u/g,"\\u");const kt="(?:(?![A-Z0-9 $%*+\\-./:]|"+v+`)(?:.|[\r +]))+`;P.KANJI=new RegExp(v,"g");P.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");P.BYTE=new RegExp(kt,"g");P.NUMERIC=new RegExp(Bt,"g");P.ALPHANUMERIC=new RegExp(Ft,"g");const zt=new RegExp("^"+v+"$"),vt=new RegExp("^"+Bt+"$"),Vt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");P.testKanji=function(t){return zt.test(t)};P.testNumeric=function(t){return vt.test(t)};P.testAlphanumeric=function(t){return Vt.test(t)};(function(e){const t=ut,i=P;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(r,s){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?r.ccBits[0]:s<27?r.ccBits[1]:r.ccBits[2]},e.getBestModeForData=function(r){return i.testNumeric(r)?e.NUMERIC:i.testAlphanumeric(r)?e.ALPHANUMERIC:i.testKanji(r)?e.KANJI:e.BYTE},e.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},e.isValid=function(r){return r&&r.bit&&r.ccBits};function o(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(r,s){if(e.isValid(r))return r;try{return o(r)}catch{return s}}})(L);(function(e){const t=I,i=j,o=$,n=L,r=ut,s=7973,c=t.getBCHDigit(s);function u(w,f,m){for(let y=1;y<=40;y++)if(f<=e.getCapacity(y,m,w))return y}function a(w,f){return n.getCharCountIndicator(w,f)+4}function l(w,f){let m=0;return w.forEach(function(y){const T=a(y.mode,f);m+=T+y.getBitsLength()}),m}function p(w,f){for(let m=1;m<=40;m++)if(l(w,m)<=e.getCapacity(m,f,n.MIXED))return m}e.from=function(f,m){return r.isValid(f)?parseInt(f,10):m},e.getCapacity=function(f,m,y){if(!r.isValid(f))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=n.BYTE);const T=t.getSymbolTotalCodewords(f),h=i.getTotalCodewordsCount(f,m),E=(T-h)*8;if(y===n.MIXED)return E;const d=E-a(y,f);switch(y){case n.NUMERIC:return Math.floor(d/10*3);case n.ALPHANUMERIC:return Math.floor(d/11*2);case n.KANJI:return Math.floor(d/13);case n.BYTE:default:return Math.floor(d/8)}},e.getBestVersionForData=function(f,m){let y;const T=o.from(m,o.M);if(Array.isArray(f)){if(f.length>1)return p(f,T);if(f.length===0)return 1;y=f[0]}else y=f;return u(y.mode,y.getLength(),T)},e.getEncodedBits=function(f){if(!r.isValid(f)||f<7)throw new Error("Invalid QR Code version");let m=f<<12;for(;t.getBCHDigit(m)-c>=0;)m^=s<=0;)n^=Tt<0&&(o=this.data.substr(i),n=parseInt(o,10),t.put(n,r*3+1))};var Jt=_;const Yt=L,W=["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 D(e){this.mode=Yt.ALPHANUMERIC,this.data=e}D.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(t){let i;for(i=0;i+2<=this.data.length;i+=2){let o=W.indexOf(this.data[i])*45;o+=W.indexOf(this.data[i+1]),t.put(o,11)}this.data.length%2&&t.put(W.indexOf(this.data[i]),6)};var Ot=D;const $t=L;function U(e){this.mode=$t.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}U.getBitsLength=function(t){return t*8};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(e){for(let t=0,i=this.data.length;t=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` +Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),e.put(i,13)}};var qt=F,Nt={exports:{}};(function(e){var t={single_source_shortest_paths:function(i,o,n){var r={},s={};s[o]=0;var c=t.PriorityQueue.make();c.push(o,0);for(var u,a,l,p,w,f,m,y,T;!c.empty();){u=c.pop(),a=u.value,p=u.cost,w=i[a]||{};for(l in w)w.hasOwnProperty(l)&&(f=w[l],m=p+f,y=s[l],T=typeof s[l]>"u",(T||y>m)&&(s[l]=m,c.push(l,m),r[l]=a))}if(typeof n<"u"&&typeof s[n]>"u"){var h=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(h)}return r},extract_shortest_path_from_predecessor_list:function(i,o){for(var n=[],r=o;r;)n.push(r),i[r],r=i[r];return n.reverse(),n},find_path:function(i,o,n){var r=t.single_source_shortest_paths(i,o,n);return t.extract_shortest_path_from_predecessor_list(r,n)},PriorityQueue:{make:function(i){var o=t.PriorityQueue,n={},r;i=i||{};for(r in o)o.hasOwnProperty(r)&&(n[r]=o[r]);return n.queue=[],n.sorter=i.sorter||o.default_sorter,n},default_sorter:function(i,o){return i.cost-o.cost},push:function(i,o){var n={value:i,cost:o};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Nt);var Wt=Nt.exports;(function(e){const t=L,i=Jt,o=Ot,n=jt,r=qt,s=P,c=I,u=Wt;function a(h){return unescape(encodeURIComponent(h)).length}function l(h,E,d){const g=[];let C;for(;(C=h.exec(d))!==null;)g.push({data:C[0],index:C.index,mode:E,length:C[0].length});return g}function p(h){const E=l(s.NUMERIC,t.NUMERIC,h),d=l(s.ALPHANUMERIC,t.ALPHANUMERIC,h);let g,C;return c.isKanjiModeEnabled()?(g=l(s.BYTE,t.BYTE,h),C=l(s.KANJI,t.KANJI,h)):(g=l(s.BYTE_KANJI,t.BYTE,h),C=[]),E.concat(d,g,C).sort(function(A,N){return A.index-N.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function w(h,E){switch(E){case t.NUMERIC:return i.getBitsLength(h);case t.ALPHANUMERIC:return o.getBitsLength(h);case t.KANJI:return r.getBitsLength(h);case t.BYTE:return n.getBitsLength(h)}}function f(h){return h.reduce(function(E,d){const g=E.length-1>=0?E[E.length-1]:null;return g&&g.mode===d.mode?(E[E.length-1].data+=d.data,E):(E.push(d),E)},[])}function m(h){const E=[];for(let d=0;d=0&&c<=6&&(u===0||u===6)||u>=0&&u<=6&&(c===0||c===6)||c>=2&&c<=4&&u>=2&&u<=4?e.set(r+c,s+u,!0,!0):e.set(r+c,s+u,!1,!0))}}function ie(e){const t=e.size;for(let i=8;i>c&1)===1,e.set(n,r,s,!0),e.set(r,n,s,!0)}function x(e,t,i){const o=e.size,n=ne.getEncodedBits(t,i);let r,s;for(r=0;r<15;r++)s=(n>>r&1)===1,r<6?e.set(r,8,s,!0):r<8?e.set(r+1,8,s,!0):e.set(o-15+r,8,s,!0),r<8?e.set(8,o-r-1,s,!0):r<9?e.set(8,15-r-1+1,s,!0):e.set(8,15-r-1,s,!0);e.set(o-8,8,1,!0)}function ce(e,t){const i=e.size;let o=-1,n=i-1,r=7,s=0;for(let c=i-1;c>0;c-=2)for(c===6&&c--;;){for(let u=0;u<2;u++)if(!e.isReserved(n,c-u)){let a=!1;s>>r&1)===1),e.set(n,c-u,a),r--,r===-1&&(s++,r=7)}if(n+=o,n<0||i<=n){n-=o,o=-o;break}}}function ae(e,t,i){const o=new Zt;i.forEach(function(u){o.put(u.mode.bit,4),o.put(u.getLength(),oe.getCharCountIndicator(u.mode,e)),u.write(o)});const n=Q.getSymbolTotalCodewords(e),r=ot.getTotalCodewordsCount(e,t),s=(n-r)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const c=(s-o.getLengthInBits())/8;for(let u=0;u=7&&ue(u,t),ce(u,s),isNaN(o)&&(o=nt.getBestMask(u,x.bind(null,u,i))),nt.applyMask(o,u),x(u,i,o),{modules:u,version:t,errorCorrectionLevel:i,maskPattern:o,segments:n}}dt.create=function(t,i){if(typeof t>"u"||t==="")throw new Error("No input text");let o=Z.M,n,r;return typeof i<"u"&&(o=Z.from(i.errorCorrectionLevel,Z.M),n=Y.from(i.version),r=nt.from(i.maskPattern),i.toSJISFunc&&Q.setToSJISFunction(i.toSJISFunc)),fe(t,n,o,r)};var Mt={},ct={};(function(e){function t(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let o=i.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+i);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(r){return[r,r]}))),o.length===6&&o.push("F","F");const n=parseInt(o.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+o.slice(0,6).join("")}}e.getOptions=function(o){o||(o={}),o.color||(o.color={});const n=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,r=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:r,scale:r?4:s,margin:n,color:{dark:t(o.color.dark||"#000000ff"),light:t(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},e.getScale=function(o,n){return n.width&&n.width>=o+n.margin*2?n.width/(o+n.margin*2):n.scale},e.getImageWidth=function(o,n){const r=e.getScale(o,n);return Math.floor((o+n.margin*2)*r)},e.qrToImageData=function(o,n,r){const s=n.modules.size,c=n.modules.data,u=e.getScale(s,r),a=Math.floor((s+r.margin*2)*u),l=r.margin*u,p=[r.color.light,r.color.dark];for(let w=0;w=l&&f>=l&&w"u"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(a=o()),u=t.getOptions(u);const l=t.getImageWidth(r.modules.size,u),p=a.getContext("2d"),w=p.createImageData(l,l);return t.qrToImageData(w.data,r,u),i(p,a,l),p.putImageData(w,0,0),a},e.renderToDataURL=function(r,s,c){let u=c;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const a=e.render(r,s,u),l=u.type||"image/png",p=u.rendererOpts||{};return a.toDataURL(l,p.quality)}})(Mt);var Pt={};const ge=ct;function gt(e,t){const i=e.a/255,o=t+'="'+e.hex+'"';return i<1?o+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':o}function tt(e,t,i){let o=e+t;return typeof i<"u"&&(o+=" "+i),o}function de(e,t,i){let o="",n=0,r=!1,s=0;for(let c=0;c0&&u>0&&e[c-1]||(o+=r?tt("M",u+i,.5+a+i):tt("m",n,0),n=0,r=!1),u+1':"",a="',l='viewBox="0 0 '+c+" "+c+'"',w=''+u+a+` +`;return typeof o=="function"&&o(null,w),w};const he=bt,rt=dt,St=Mt,we=Pt;function at(e,t,i,o,n){const r=[].slice.call(arguments,1),s=r.length,c=typeof r[s-1]=="function";if(!c&&!he())throw new Error("Callback required as last argument");if(c){if(s<2)throw new Error("Too few arguments provided");s===2?(n=i,i=t,t=o=void 0):s===3&&(t.getContext&&typeof n>"u"?(n=o,o=void 0):(n=o,o=i,i=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=t,t=o=void 0):s===2&&!t.getContext&&(o=i,i=t,t=void 0),new Promise(function(u,a){try{const l=rt.create(i,o);u(e(l,t,o))}catch(l){a(l)}})}try{const u=rt.create(i,o);n(null,e(u,t,o))}catch(u){n(u)}}O.create=rt.create;O.toCanvas=at.bind(null,St.render);O.toDataURL=at.bind(null,St.renderToDataURL);O.toString=at.bind(null,function(e,t,i){return we.render(e,i)});export{O as b}; diff --git a/src/static/app/dist/assets/configuration.js b/src/static/app/dist/assets/configuration.js new file mode 100644 index 0000000..31771b3 --- /dev/null +++ b/src/static/app/dist/assets/configuration.js @@ -0,0 +1 @@ +import{_ as r,c as i,b as o,w as e,e as _,o as t,h as l,g as n,i as u,S as d}from"./index.js";const m={name:"configuration"},p={class:"mt-md-5 mt-3 text-body"};function f(h,x,k,w,$,g){const a=_("RouterView");return t(),i("div",p,[o(a,null,{default:e(({Component:s,route:c})=>[o(l,{name:"fade2",mode:"out-in"},{default:e(()=>[(t(),n(d,null,{default:e(()=>[(t(),n(u(s),{key:c.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const y=r(m,[["render",f]]);export{y as default}; diff --git a/src/static/app/dist/assets/configurationList.css b/src/static/app/dist/assets/configurationList.css new file mode 100644 index 0000000..a278303 --- /dev/null +++ b/src/static/app/dist/assets/configurationList.css @@ -0,0 +1 @@ +.fade-enter-active[data-v-a85a04a5]{transition-delay:var(--1d5189b2)!important}.configurationListTitle{.btn[data-v-790c086d]{border-radius:50%!important}}@media screen and (max-width: 768px){.configurationListTitle{&[data-v-790c086d]{flex-direction:column;gap:.5rem}h3 span[data-v-790c086d]{margin-left:auto!important}.btn[data-v-790c086d]{width:100%}}} diff --git a/src/static/app/dist/assets/configurationList.js b/src/static/app/dist/assets/configurationList.js new file mode 100644 index 0000000..3bd1d49 --- /dev/null +++ b/src/static/app/dist/assets/configurationList.js @@ -0,0 +1 @@ +import{_ as x,D as L,f as N,o as a,c as l,b as i,w as m,a as t,n as C,t as r,d as f,g as c,j as h,k as P,v as D,u as B,e as d,W as U,T as G,F as V,r as I}from"./index.js";import{L as w}from"./localeText.js";const _={name:"configurationCard",components:{LocaleText:w},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String},delay:String},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:L()}},methods:{toggle(){this.configurationToggling=!0,N("/api/toggleWireguardConfiguration/",{configurationName:this.c.Name},s=>{s.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${s.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",s.message,"danger"),this.c.Status=s.data,this.configurationToggling=!1})}}},y=()=>{B(s=>({"1d5189b2":s.delay}))},S=_.setup;_.setup=S?(s,o)=>(y(),S(s,o)):y;const K={class:"card conf_card rounded-3 shadow text-decoration-none"},R={class:"mb-0"},F={class:"card-title mb-0"},W={class:"card-footer d-flex gap-2 flex-column"},O={class:"row"},M={class:"col-6 col-md-3"},j={class:"text-primary-emphasis col-6 col-md-3"},z={class:"text-success-emphasis col-6 col-md-3"},E={class:"text-md-end col-6 col-md-3"},Y={class:"d-flex align-items-center gap-2"},q={class:"text-muted"},A={style:{"word-break":"keep-all"}},H={class:"mb-0 d-block d-lg-inline-block"},J={style:{"line-break":"anywhere"}},Q={class:"form-check form-switch ms-auto"},X=["for"],Z={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},$=["disabled","id"];function tt(s,o,e,v,k,T){const u=d("RouterLink"),n=d("LocaleText");return a(),l("div",K,[i(u,{to:"/configuration/"+e.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:m(()=>[t("h6",R,[t("span",{class:C(["dot",{active:e.c.Status}])},null,2)]),t("h6",F,[t("samp",null,r(e.c.Name),1)]),o[2]||(o[2]=t("h6",{class:"mb-0 ms-auto"},[t("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),t("div",W,[t("div",O,[t("small",M,[o[3]||(o[3]=t("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),f(r(e.c.DataUsage.Total>0?e.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),t("small",j,[o[4]||(o[4]=t("i",{class:"bi bi-arrow-down me-2"},null,-1)),f(r(e.c.DataUsage.Receive>0?e.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),t("small",z,[o[5]||(o[5]=t("i",{class:"bi bi-arrow-up me-2"},null,-1)),f(r(e.c.DataUsage.Sent>0?e.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),t("small",E,[t("span",{class:C(["dot me-2",{active:e.c.ConnectedPeers>0}])},null,2),f(" "+r(e.c.ConnectedPeers)+" / "+r(e.c.TotalPeers)+" ",1),i(n,{t:"Peers"})])]),t("div",Y,[t("small",q,[t("strong",A,[i(n,{t:"Public Key"})])]),t("small",H,[t("samp",J,r(e.c.PublicKey),1)]),t("div",Q,[t("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+e.c.PrivateKey},[!e.c.Status&&this.configurationToggling?(a(),c(n,{key:0,t:"Turning Off..."})):e.c.Status&&this.configurationToggling?(a(),c(n,{key:1,t:"Turning On..."})):e.c.Status&&!this.configurationToggling?(a(),c(n,{key:2,t:"On"})):!e.c.Status&&!this.configurationToggling?(a(),c(n,{key:3,t:"Off"})):h("",!0),this.configurationToggling?(a(),l("span",Z)):h("",!0)],8,X),P(t("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+e.c.PrivateKey,onChange:o[0]||(o[0]=g=>this.toggle()),"onUpdate:modelValue":o[1]||(o[1]=g=>e.c.Status=g)},null,40,$),[[D,e.c.Status]])])])])])}const et=x(_,[["render",tt],["__scopeId","data-v-a85a04a5"]]),ot={name:"configurationList",components:{LocaleText:w,ConfigurationCard:et},async setup(){return{wireguardConfigurationsStore:U()}},data(){return{configurationLoaded:!1}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)}},st={class:"mt-md-5 mt-3"},at={class:"container-md"},nt={class:"d-flex mb-4 configurationListTitle align-items-center gap-3"},it={class:"text-body d-flex"},rt={class:"text-muted",key:"noConfiguration"};function ct(s,o,e,v,k,T){const u=d("LocaleText"),n=d("RouterLink"),g=d("ConfigurationCard");return a(),l("div",st,[t("div",at,[t("div",nt,[t("h2",it,[t("span",null,[i(u,{t:"WireGuard Configurations"})])]),i(n,{to:"/new_configuration",class:"btn btn-dark btn-brand rounded-3 p-2 shadow ms-auto rounded-3"},{default:m(()=>o[0]||(o[0]=[t("h2",{class:"mb-0",style:{"line-height":"0"}},[t("i",{class:"bi bi-plus-circle"})],-1)])),_:1}),i(n,{to:"/restore_configuration",class:"btn btn-dark btn-brand p-2 shadow ms-2",style:{"border-radius":"100%"}},{default:m(()=>o[1]||(o[1]=[t("h2",{class:"mb-0",style:{"line-height":"0"}},[t("i",{class:"bi bi-clock-history"})],-1)])),_:1})]),i(G,{name:"fade",tag:"div",class:"d-flex flex-column gap-3 mb-4"},{default:m(()=>[this.configurationLoaded&&this.wireguardConfigurationsStore.Configurations.length===0?(a(),l("p",rt,[i(u,{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.configurationLoaded?(a(!0),l(V,{key:1},I(this.wireguardConfigurationsStore.Configurations,(b,p)=>(a(),c(g,{delay:p*.05+"s",key:b.Name,c:b},null,8,["delay","c"]))),128)):h("",!0)]),_:1})])])}const ut=x(ot,[["render",ct],["__scopeId","data-v-790c086d"]]);export{ut as default}; diff --git a/src/static/app/dist/assets/dayjs.min.js b/src/static/app/dist/assets/dayjs.min.js new file mode 100644 index 0000000..b5fe589 --- /dev/null +++ b/src/static/app/dist/assets/dayjs.min.js @@ -0,0 +1 @@ +import{ab as Q,ac as K}from"./index.js";var E={exports:{}};(function(V,X){(function(W,k){V.exports=k()})(Q,function(){var W=1e3,k=6e4,N=36e5,A="millisecond",S="second",w="minute",O="hour",M="day",T="week",m="month",U="quarter",v="year",b="date",J="Invalid Date",q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|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,G={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])+"]"}},I=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},P={s:I,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+I(r,2,"0")+":"+I(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&&(x=e),e||!r&&x},f=function(s,n){if(F(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new C(t)},a=P;a.l=j,a.i=F,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=j(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!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(q);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()!==J},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):not(caption)>*>*{background-color:transparent!important}.ping-move[data-v-6d6cffc9],.ping-enter-active[data-v-6d6cffc9],.ping-leave-active[data-v-6d6cffc9]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-6d6cffc9]{position:absolute;width:100%}.ping-enter-from[data-v-6d6cffc9],.ping-leave-to[data-v-6d6cffc9]{opacity:0;//transform: scale(1.1);filter:blur(3px)}.animate__fadeInUp[data-v-1b44aacd]{animation-timing-function:cubic-bezier(.42,0,.22,1)}.dropdownIcon[data-v-35612fa2]{transition:all .2s ease-in-out}.dropdownIcon.active[data-v-35612fa2]{transform:rotate(180deg)}.steps{&[data-v-1dc71439]{transition:all .3s ease-in-out;opacity:.3}&.active[data-v-1dc71439]{opacity:1}}.app-enter-active[data-v-ca898237],.app-leave-active[data-v-ca898237]{transition:all .7s cubic-bezier(.82,.58,.17,1)}.app-enter-from[data-v-ca898237],.app-leave-to[data-v-ca898237]{opacity:0;transform:scale(1.1)}@media screen and (min-width: 768px){.navbar[data-v-ca898237]{display:none}} + */:root{--animate-duration:1s;--animate-delay:1s;--animate-repeat:1}.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.repeat-1{-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-iteration-count:var(--animate-repeat);animation-iteration-count:var(--animate-repeat)}.animated.repeat-2{-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-iteration-count:calc(var(--animate-repeat)*2);animation-iteration-count:calc(var(--animate-repeat)*2)}.animated.repeat-3{-webkit-animation-iteration-count:3;animation-iteration-count:3;-webkit-animation-iteration-count:calc(var(--animate-repeat)*3);animation-iteration-count:calc(var(--animate-repeat)*3)}.animated.delay-1s{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-delay:var(--animate-delay);animation-delay:var(--animate-delay)}.animated.delay-2s{-webkit-animation-delay:2s;animation-delay:2s;-webkit-animation-delay:calc(var(--animate-delay)*2);animation-delay:calc(var(--animate-delay)*2)}.animated.delay-3s{-webkit-animation-delay:3s;animation-delay:3s;-webkit-animation-delay:calc(var(--animate-delay)*3);animation-delay:calc(var(--animate-delay)*3)}.animated.delay-4s{-webkit-animation-delay:4s;animation-delay:4s;-webkit-animation-delay:calc(var(--animate-delay)*4);animation-delay:calc(var(--animate-delay)*4)}.animated.delay-5s{-webkit-animation-delay:5s;animation-delay:5s;-webkit-animation-delay:calc(var(--animate-delay)*5);animation-delay:calc(var(--animate-delay)*5)}.animated.faster{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-duration:calc(var(--animate-duration)/2);animation-duration:calc(var(--animate-duration)/2)}.animated.fast{-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-duration:calc(var(--animate-duration)*.8);animation-duration:calc(var(--animate-duration)*.8)}.animated.slow{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration)*2);animation-duration:calc(var(--animate-duration)*2)}.animated.slower{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-duration:calc(var(--animate-duration)*3);animation-duration:calc(var(--animate-duration)*3)}@media (prefers-reduced-motion:reduce),print{.animated{-webkit-animation-duration:1ms!important;animation-duration:1ms!important;-webkit-transition-duration:1ms!important;transition-duration:1ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important}.animated[class*=Out]{opacity:0}}@-webkit-keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}@keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shakeX{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shakeX{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shakeX{-webkit-animation-name:shakeX;animation-name:shakeX}@-webkit-keyframes shakeY{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}@keyframes shakeY{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}.shakeY{-webkit-animation-name:shakeY;animation-name:shakeY}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0)}}@keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}.heartBeat{-webkit-animation-name:heartBeat;animation-name:heartBeat;-webkit-animation-duration:1.3s;animation-duration:1.3s;-webkit-animation-duration:calc(var(--animate-duration)*1.3);animation-duration:calc(var(--animate-duration)*1.3);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.backInDown{-webkit-animation-name:backInDown;animation-name:backInDown}@-webkit-keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.backInLeft{-webkit-animation-name:backInLeft;animation-name:backInLeft}@-webkit-keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.backInRight{-webkit-animation-name:backInRight;animation-name:backInRight}@-webkit-keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.backInUp{-webkit-animation-name:backInUp;animation-name:backInUp}@-webkit-keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}@keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}.backOutDown{-webkit-animation-name:backOutDown;animation-name:backOutDown}@-webkit-keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}@keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}.backOutLeft{-webkit-animation-name:backOutLeft;animation-name:backOutLeft}@-webkit-keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}@keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}.backOutRight{-webkit-animation-name:backOutRight;animation-name:backOutRight}@-webkit-keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}@keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}.backOutUp{-webkit-animation-name:backOutUp;animation-name:backOutUp}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}.bounceIn{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration)*.75);animation-duration:calc(var(--animate-duration)*.75);-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration)*.75);animation-duration:calc(var(--animate-duration)*.75);-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInTopLeft{-webkit-animation-name:fadeInTopLeft;animation-name:fadeInTopLeft}@-webkit-keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInTopRight{-webkit-animation-name:fadeInTopRight;animation-name:fadeInTopRight}@-webkit-keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInBottomLeft{-webkit-animation-name:fadeInBottomLeft;animation-name:fadeInBottomLeft}@-webkit-keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.fadeInBottomRight{-webkit-animation-name:fadeInBottomRight;animation-name:fadeInBottomRight}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}@keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}.fadeOutTopLeft{-webkit-animation-name:fadeOutTopLeft;animation-name:fadeOutTopLeft}@-webkit-keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}@keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}.fadeOutTopRight{-webkit-animation-name:fadeOutTopRight;animation-name:fadeOutTopRight}@-webkit-keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}@keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}.fadeOutBottomRight{-webkit-animation-name:fadeOutBottomRight;animation-name:fadeOutBottomRight}@-webkit-keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}@keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}.fadeOutBottomLeft{-webkit-animation-name:fadeOutBottomLeft;animation-name:fadeOutBottomLeft}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.flipOutX{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration)*.75);animation-duration:calc(var(--animate-duration)*.75);-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration)*.75);animation-duration:calc(var(--animate-duration)*.75);-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.lightSpeedInRight{-webkit-animation-name:lightSpeedInRight;animation-name:lightSpeedInRight;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.lightSpeedInLeft{-webkit-animation-name:lightSpeedInLeft;animation-name:lightSpeedInLeft;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}@keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}.lightSpeedOutRight{-webkit-animation-name:lightSpeedOutRight;animation-name:lightSpeedOutRight;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}@keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}.lightSpeedOutLeft{-webkit-animation-name:lightSpeedOutLeft;animation-name:lightSpeedOutLeft;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration)*2);animation-duration:calc(var(--animate-duration)*2);-webkit-animation-name:hinge;animation-name:hinge;-webkit-transform-origin:top left;transform-origin:top left}@-webkit-keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.jackInTheBox{-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft;-webkit-transform-origin:left center;transform-origin:left center}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight;-webkit-transform-origin:right center;transform-origin:right center}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.dp__input_wrap{position:relative;width:100%;box-sizing:unset}.dp__input_wrap:focus{border-color:var(--dp-border-color-hover);outline:none}.dp__input_valid{box-shadow:0 0 var(--dp-border-radius) var(--dp-success-color);border-color:var(--dp-success-color)}.dp__input_valid:hover{border-color:var(--dp-success-color)}.dp__input_invalid{box-shadow:0 0 var(--dp-border-radius) var(--dp-danger-color);border-color:var(--dp-danger-color)}.dp__input_invalid:hover{border-color:var(--dp-danger-color)}.dp__input{background-color:var(--dp-background-color);border-radius:var(--dp-border-radius);font-family:var(--dp-font-family);border:1px solid var(--dp-border-color);outline:none;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%;font-size:var(--dp-font-size);line-height:calc(var(--dp-font-size)*1.5);padding:var(--dp-input-padding);color:var(--dp-text-color);box-sizing:border-box}.dp__input::placeholder{opacity:.7}.dp__input:hover:not(.dp__input_focus){border-color:var(--dp-border-color-hover)}.dp__input_reg{caret-color:#0000}.dp__input_focus{border-color:var(--dp-border-color-focus)}.dp__disabled{background:var(--dp-disabled-color)}.dp__disabled::placeholder{color:var(--dp-disabled-color-text)}.dp__input_icons{display:inline-block;width:var(--dp-font-size);height:var(--dp-font-size);stroke-width:0;font-size:var(--dp-font-size);line-height:calc(var(--dp-font-size)*1.5);padding:6px 12px;color:var(--dp-icon-color);box-sizing:content-box}.dp__input_icon{cursor:pointer;position:absolute;top:50%;inset-inline-start:0;transform:translateY(-50%);color:var(--dp-icon-color)}.dp--clear-btn{position:absolute;top:50%;inset-inline-end:0;transform:translateY(-50%);cursor:pointer;color:var(--dp-icon-color);background:#0000;border:none;display:inline-flex;align-items:center;padding:0;margin:0}.dp__input_icon_pad{padding-inline-start:var(--dp-input-icon-padding)}.dp__menu{background:var(--dp-background-color);border-radius:var(--dp-border-radius);min-width:var(--dp-menu-min-width);font-family:var(--dp-font-family);font-size:var(--dp-font-size);user-select:none;border:1px solid var(--dp-menu-border-color);box-sizing:border-box}.dp__menu:after{box-sizing:border-box}.dp__menu:before{box-sizing:border-box}.dp__menu:focus{border:1px solid var(--dp-menu-border-color);outline:none}.dp--menu-wrapper{position:absolute;z-index:99999}.dp__menu_inner{padding:var(--dp-menu-padding)}.dp--menu--inner-stretched{padding:6px 0}.dp__menu_index{z-index:99999}.dp-menu-loading,.dp__menu_readonly,.dp__menu_disabled{position:absolute;inset:0;z-index:999999}.dp__menu_disabled{background:#ffffff80;cursor:not-allowed}.dp__menu_readonly{background:#0000;cursor:default}.dp-menu-loading{background:#ffffff80;cursor:default}.dp--menu-load-container{display:flex;height:100%;width:100%;justify-content:center;align-items:center}.dp--menu-loader{width:48px;height:48px;border:var(--dp-loader);border-bottom-color:#0000;border-radius:50%;display:inline-block;box-sizing:border-box;animation:dp-load-rotation 1s linear infinite;position:absolute}@keyframes dp-load-rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dp__arrow_top{left:var(--dp-arrow-left);top:0;height:12px;width:12px;background-color:var(--dp-background-color);position:absolute;border-inline-end:1px solid var(--dp-menu-border-color);border-top:1px solid var(--dp-menu-border-color);transform:translate(-50%,-50%) rotate(-45deg)}.dp__arrow_bottom{left:var(--dp-arrow-left);bottom:0;height:12px;width:12px;background-color:var(--dp-background-color);position:absolute;border-inline-end:1px solid var(--dp-menu-border-color);border-bottom:1px solid var(--dp-menu-border-color);transform:translate(-50%,50%) rotate(45deg)}.dp__action_extra{text-align:center;padding:2px 0}.dp--preset-dates{padding:5px;border-inline-end:1px solid var(--dp-border-color)}@media only screen and (width <= 600px){.dp--preset-dates{display:flex;align-self:center;border:none;overflow-x:auto;max-width:calc(var(--dp-menu-width) - var(--dp-action-row-padding)*2)}}.dp--preset-dates-collapsed{display:flex;align-self:center;border:none;overflow-x:auto;max-width:calc(var(--dp-menu-width) - var(--dp-action-row-padding)*2)}.dp__sidebar_left{padding:5px;border-inline-end:1px solid var(--dp-border-color)}.dp__sidebar_right{padding:5px;margin-inline-end:1px solid var(--dp-border-color)}.dp--preset-range{display:block;width:100%;padding:5px;text-align:left;white-space:nowrap;color:var(--dp-text-color);border-radius:var(--dp-border-radius);transition:var(--dp-common-transition)}.dp--preset-range:hover{background-color:var(--dp-hover-color);color:var(--dp-hover-text-color);cursor:pointer}@media only screen and (width <= 600px){.dp--preset-range{border:1px solid var(--dp-border-color);margin:0 3px}.dp--preset-range:first-child{margin-left:0}.dp--preset-range:last-child{margin-right:0}}.dp--preset-range-collapsed{border:1px solid var(--dp-border-color);margin:0 3px}.dp--preset-range-collapsed:first-child{margin-left:0}.dp--preset-range-collapsed:last-child{margin-right:0}.dp__menu_content_wrapper{display:flex}@media only screen and (width <= 600px){.dp__menu_content_wrapper{flex-direction:column-reverse}}.dp--menu-content-wrapper-collapsed{flex-direction:column-reverse}.dp__calendar_header{position:relative;display:flex;justify-content:center;align-items:center;color:var(--dp-text-color);white-space:nowrap;font-weight:700}.dp__calendar_header_item{text-align:center;flex-grow:1;height:var(--dp-cell-size);padding:var(--dp-cell-padding);width:var(--dp-cell-size);box-sizing:border-box}.dp__calendar_row{display:flex;justify-content:center;align-items:center;margin:var(--dp-row-margin)}.dp__calendar_item{text-align:center;flex-grow:1;box-sizing:border-box;color:var(--dp-text-color)}.dp__calendar{position:relative}.dp__calendar_header_cell{border-bottom:thin solid var(--dp-border-color);padding:var(--dp-calendar-header-cell-padding)}.dp__cell_inner{display:flex;align-items:center;text-align:center;justify-content:center;border-radius:var(--dp-cell-border-radius);height:var(--dp-cell-size);padding:var(--dp-cell-padding);width:var(--dp-cell-size);border:1px solid rgba(0,0,0,0);box-sizing:border-box;position:relative}.dp__cell_inner:hover{transition:all .2s}.dp__cell_auto_range_start,.dp__date_hover_start:hover,.dp__range_start{border-end-end-radius:0;border-start-end-radius:0}.dp__cell_auto_range_end,.dp__date_hover_end:hover,.dp__range_end{border-end-start-radius:0;border-start-start-radius:0}.dp__range_end,.dp__range_start,.dp__active_date{background:var(--dp-primary-color);color:var(--dp-primary-text-color)}.dp__date_hover_end:hover,.dp__date_hover_start:hover,.dp__date_hover:hover{background:var(--dp-hover-color);color:var(--dp-hover-text-color)}.dp__cell_offset{color:var(--dp-secondary-color)}.dp__cell_disabled{color:var(--dp-secondary-color);cursor:not-allowed}.dp__range_between{background:var(--dp-range-between-dates-background-color);color:var(--dp-range-between-dates-text-color);border-radius:0;border:1px solid var(--dp-range-between-border-color)}.dp__range_between_week{background:var(--dp-primary-color);color:var(--dp-primary-text-color);border-radius:0;border-top:1px solid var(--dp-primary-color);border-bottom:1px solid var(--dp-primary-color)}.dp__today{border:1px solid var(--dp-primary-color)}.dp__week_num{color:var(--dp-secondary-color);text-align:center}.dp__cell_auto_range{border-radius:0;border-top:1px dashed var(--dp-primary-color);border-bottom:1px dashed var(--dp-primary-color)}.dp__cell_auto_range_start{border-start-start-radius:var(--dp-cell-border-radius);border-end-start-radius:var(--dp-cell-border-radius);border-inline-start:1px dashed var(--dp-primary-color);border-top:1px dashed var(--dp-primary-color);border-bottom:1px dashed var(--dp-primary-color)}.dp__cell_auto_range_end{border-start-end-radius:var(--dp-cell-border-radius);border-end-end-radius:var(--dp-cell-border-radius);border-top:1px dashed var(--dp-primary-color);border-bottom:1px dashed var(--dp-primary-color);border-inline-end:1px dashed var(--dp-primary-color)}.dp__calendar_header_separator{width:100%;height:1px;background:var(--dp-border-color)}.dp__calendar_next{margin-inline-start:var(--dp-multi-calendars-spacing)}.dp__marker_line,.dp__marker_dot{height:5px;background-color:var(--dp-marker-color);position:absolute;bottom:0}.dp__marker_dot{width:5px;border-radius:50%;left:50%;transform:translate(-50%)}.dp__marker_line{width:100%;left:0}.dp__marker_tooltip{position:absolute;border-radius:var(--dp-border-radius);background-color:var(--dp-tooltip-color);padding:5px;border:1px solid var(--dp-border-color);z-index:99999;box-sizing:border-box;cursor:default}.dp__tooltip_content{white-space:nowrap}.dp__tooltip_text{display:flex;align-items:center;flex-flow:row nowrap;color:var(--dp-text-color)}.dp__tooltip_mark{height:5px;width:5px;border-radius:50%;background-color:var(--dp-text-color);color:var(--dp-text-color);margin-inline-end:5px}.dp__arrow_bottom_tp{bottom:0;height:8px;width:8px;background-color:var(--dp-tooltip-color);position:absolute;border-inline-end:1px solid var(--dp-border-color);border-bottom:1px solid var(--dp-border-color);transform:translate(-50%,50%) rotate(45deg)}.dp__instance_calendar{position:relative;width:100%}@media only screen and (width <= 600px){.dp__flex_display{flex-direction:column}}.dp--flex-display-collapsed{flex-direction:column}.dp__cell_highlight{background-color:var(--dp-highlight-color)}.dp__month_year_row{display:flex;align-items:center;height:var(--dp-month-year-row-height);color:var(--dp-text-color);box-sizing:border-box}.dp__inner_nav{display:flex;align-items:center;justify-content:center;cursor:pointer;height:var(--dp-month-year-row-button-size);width:var(--dp-month-year-row-button-size);color:var(--dp-icon-color);text-align:center;border-radius:50%}.dp__inner_nav svg{height:var(--dp-button-icon-height);width:var(--dp-button-icon-height)}.dp__inner_nav:hover{background:var(--dp-hover-color);color:var(--dp-hover-icon-color)}[dir=rtl] .dp__inner_nav{transform:rotate(180deg)}.dp__inner_nav_disabled:hover,.dp__inner_nav_disabled{background:var(--dp-disabled-color);color:var(--dp-disabled-color-text);cursor:not-allowed}.dp--year-select,.dp__month_year_select{text-align:center;cursor:pointer;height:var(--dp-month-year-row-height);display:flex;align-items:center;justify-content:center;border-radius:var(--dp-border-radius);box-sizing:border-box;color:var(--dp-text-color)}.dp--year-select:hover,.dp__month_year_select:hover{background:var(--dp-hover-color);color:var(--dp-hover-text-color);transition:var(--dp-common-transition)}.dp__month_year_select{width:50%}.dp--year-select{width:100%}.dp__month_year_wrap{display:flex;flex-direction:row;width:100%}.dp__year_disable_select{justify-content:space-around}.dp--header-wrap{display:flex;width:100%;flex-direction:column}.dp__overlay{width:100%;background:var(--dp-background-color);transition:opacity 1s ease-out;z-index:99999;font-family:var(--dp-font-family);color:var(--dp-text-color);box-sizing:border-box}.dp--overlay-absolute{position:absolute;height:100%;top:0;left:0}.dp--overlay-relative{position:relative}.dp__overlay_container::-webkit-scrollbar-track{box-shadow:var(--dp-scroll-bar-background);background-color:var(--dp-scroll-bar-background)}.dp__overlay_container::-webkit-scrollbar{width:5px;background-color:var(--dp-scroll-bar-background)}.dp__overlay_container::-webkit-scrollbar-thumb{background-color:var(--dp-scroll-bar-color);border-radius:10px}.dp__overlay:focus{border:none;outline:none}.dp__container_flex{display:flex}.dp__container_block{display:block}.dp__overlay_container{flex-direction:column;overflow-y:auto;height:var(--dp-overlay-height)}.dp__time_picker_overlay_container{height:100%}.dp__overlay_row{padding:0;box-sizing:border-box;display:flex;margin-inline:auto auto;flex-wrap:wrap;max-width:100%;width:100%;align-items:center}.dp__flex_row{flex:1}.dp__overlay_col{box-sizing:border-box;width:33%;padding:var(--dp-overlay-col-padding);white-space:nowrap}.dp__overlay_cell_pad{padding:var(--dp-common-padding) 0}.dp__overlay_cell_active{cursor:pointer;border-radius:var(--dp-border-radius);text-align:center;background:var(--dp-primary-color);color:var(--dp-primary-text-color)}.dp__overlay_cell{cursor:pointer;border-radius:var(--dp-border-radius);text-align:center}.dp__overlay_cell:hover{background:var(--dp-hover-color);color:var(--dp-hover-text-color);transition:var(--dp-common-transition)}.dp__cell_in_between{background:var(--dp-hover-color);color:var(--dp-hover-text-color)}.dp__over_action_scroll{right:5px;box-sizing:border-box}.dp__overlay_cell_disabled{cursor:not-allowed;background:var(--dp-disabled-color)}.dp__overlay_cell_disabled:hover{background:var(--dp-disabled-color)}.dp__overlay_cell_active_disabled{cursor:not-allowed;background:var(--dp-primary-disabled-color)}.dp__overlay_cell_active_disabled:hover{background:var(--dp-primary-disabled-color)}.dp__btn,.dp--qr-btn,.dp--time-invalid,.dp--time-overlay-btn{border:none;font:inherit;transition:var(--dp-common-transition);line-height:normal}.dp--tp-wrap{max-width:var(--dp-menu-min-width)}.dp__time_input{width:100%;display:flex;align-items:center;justify-content:center;user-select:none;font-family:var(--dp-font-family);color:var(--dp-text-color)}.dp__time_col_reg_block{padding:0 20px}.dp__time_col_reg_inline{padding:0 10px}.dp__time_col_reg_with_button{padding:0 15px}.dp__time_col_sec{padding:0 10px}.dp__time_col_sec_with_button{padding:0 5px}.dp__time_col{text-align:center;display:flex;align-items:center;justify-content:center;flex-direction:column}.dp__time_col_block{font-size:var(--dp-time-font-size)}.dp__time_display_block{padding:0 3px}.dp__time_display_inline{padding:5px}.dp__time_picker_inline_container{display:flex;width:100%;justify-content:center}.dp__inc_dec_button{padding:5px;margin:0;height:var(--dp-time-inc-dec-button-size);width:var(--dp-time-inc-dec-button-size);display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:50%;color:var(--dp-icon-color);box-sizing:border-box}.dp__inc_dec_button svg{height:var(--dp-time-inc-dec-button-size);width:var(--dp-time-inc-dec-button-size)}.dp__inc_dec_button:hover{background:var(--dp-hover-color);color:var(--dp-primary-color)}.dp__time_display{cursor:pointer;color:var(--dp-text-color);border-radius:var(--dp-border-radius);display:flex;align-items:center;justify-content:center}.dp__time_display:hover:enabled{background:var(--dp-hover-color);color:var(--dp-hover-text-color)}.dp__inc_dec_button_inline{width:100%;padding:0;height:8px;cursor:pointer;display:flex;align-items:center}.dp__inc_dec_button_disabled,.dp__inc_dec_button_disabled:hover{background:var(--dp-disabled-color);color:var(--dp-disabled-color-text);cursor:not-allowed}.dp__pm_am_button{background:var(--dp-primary-color);color:var(--dp-primary-text-color);border:none;padding:var(--dp-common-padding);border-radius:var(--dp-border-radius);cursor:pointer}.dp__tp_inline_btn_bar{width:100%;height:4px;background-color:var(--dp-secondary-color);transition:var(--dp-common-transition);border-collapse:collapse}.dp__tp_inline_btn_top:hover .dp__tp_btn_in_r{background-color:var(--dp-primary-color);transform:rotate(12deg) scale(1.15) translateY(-2px)}.dp__tp_inline_btn_top:hover .dp__tp_btn_in_l,.dp__tp_inline_btn_bottom:hover .dp__tp_btn_in_r{background-color:var(--dp-primary-color);transform:rotate(-12deg) scale(1.15) translateY(-2px)}.dp__tp_inline_btn_bottom:hover .dp__tp_btn_in_l{background-color:var(--dp-primary-color);transform:rotate(12deg) scale(1.15) translateY(-2px)}.dp--time-overlay-btn{background:none}.dp--time-invalid{background-color:var(--dp-disabled-color)}.dp__action_row{display:flex;align-items:center;width:100%;padding:var(--dp-action-row-padding);box-sizing:border-box;color:var(--dp-text-color);flex-flow:row nowrap}.dp__action_row svg{height:var(--dp-button-icon-height);width:auto}.dp__selection_preview{display:block;color:var(--dp-text-color);font-size:var(--dp-preview-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dp__action_buttons{display:flex;flex:0;white-space:nowrap;align-items:center;justify-content:flex-end;margin-inline-start:auto}.dp__action_button{display:inline-flex;align-items:center;background:#0000;border:1px solid rgba(0,0,0,0);padding:var(--dp-action-buttons-padding);line-height:var(--dp-action-button-height);margin-inline-start:3px;height:var(--dp-action-button-height);cursor:pointer;border-radius:var(--dp-border-radius);font-size:var(--dp-preview-font-size);font-family:var(--dp-font-family)}.dp__action_cancel{color:var(--dp-text-color);border:1px solid var(--dp-border-color)}.dp__action_cancel:hover{border-color:var(--dp-primary-color);transition:var(--dp-action-row-transtion)}.dp__action_buttons .dp__action_select{background:var(--dp-primary-color);color:var(--dp-primary-text-color)}.dp__action_buttons .dp__action_select:hover{background:var(--dp-primary-color);transition:var(--dp-action-row-transtion)}.dp__action_buttons .dp__action_select:disabled{background:var(--dp-primary-disabled-color);cursor:not-allowed}.dp-quarter-picker-wrap{display:flex;flex-direction:column;height:100%;min-width:var(--dp-menu-min-width)}.dp--qr-btn-disabled{cursor:not-allowed;background:var(--dp-disabled-color)}.dp--qr-btn-disabled:hover{background:var(--dp-disabled-color)}.dp--qr-btn{width:100%;padding:var(--dp-common-padding)}.dp--qr-btn:not(.dp--highlighted,.dp--qr-btn-active,.dp--qr-btn-disabled,.dp--qr-btn-between){background:none}.dp--qr-btn:hover:not(.dp--qr-btn-active,.dp--qr-btn-disabled){background:var(--dp-hover-color);color:var(--dp-hover-text-color);transition:var(--dp-common-transition)}.dp--quarter-items{display:flex;flex-direction:column;flex:1;width:100%;height:100%;justify-content:space-evenly}.dp--qr-btn-active{background:var(--dp-primary-color);color:var(--dp-primary-text-color)}.dp--qr-btn-between{background:var(--dp-hover-color);color:var(--dp-hover-text-color)}.dp__btn,.dp--time-overlay-btn,.dp--time-invalid,.dp--qr-btn{border:none;font:inherit;transition:var(--dp-common-transition);line-height:normal}.dp--year-mode-picker{display:flex;width:100%;align-items:center;justify-content:space-between;height:var(--dp-cell-size)}:root{--dp-common-transition: all .1s ease-in;--dp-menu-padding: 6px 8px;--dp-animation-duration: .1s;--dp-menu-appear-transition-timing: cubic-bezier(.4, 0, 1, 1);--dp-transition-timing: ease-out;--dp-action-row-transtion: all .2s ease-in;--dp-font-family: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Open Sans", "Helvetica Neue", sans-serif;--dp-border-radius: 4px;--dp-cell-border-radius: 4px;--dp-transition-length: 22px;--dp-transition-timing-general: .1s;--dp-button-height: 35px;--dp-month-year-row-height: 35px;--dp-month-year-row-button-size: 25px;--dp-button-icon-height: 20px;--dp-calendar-wrap-padding: 0 5px;--dp-cell-size: 35px;--dp-cell-padding: 5px;--dp-common-padding: 10px;--dp-input-icon-padding: 35px;--dp-input-padding: 6px 30px 6px 12px;--dp-menu-min-width: 260px;--dp-action-buttons-padding: 1px 6px;--dp-row-margin: 5px 0;--dp-calendar-header-cell-padding: .5rem;--dp-multi-calendars-spacing: 10px;--dp-overlay-col-padding: 3px;--dp-time-inc-dec-button-size: 32px;--dp-font-size: 1rem;--dp-preview-font-size: .8rem;--dp-time-font-size: 2rem;--dp-action-button-height: 22px;--dp-action-row-padding: 8px;--dp-direction: ltr}.dp__theme_dark{--dp-background-color: #212121;--dp-text-color: #fff;--dp-hover-color: #484848;--dp-hover-text-color: #fff;--dp-hover-icon-color: #959595;--dp-primary-color: #005cb2;--dp-primary-disabled-color: #61a8ea;--dp-primary-text-color: #fff;--dp-secondary-color: #a9a9a9;--dp-border-color: #2d2d2d;--dp-menu-border-color: #2d2d2d;--dp-border-color-hover: #aaaeb7;--dp-border-color-focus: #aaaeb7;--dp-disabled-color: #737373;--dp-disabled-color-text: #d0d0d0;--dp-scroll-bar-background: #212121;--dp-scroll-bar-color: #484848;--dp-success-color: #00701a;--dp-success-color-disabled: #428f59;--dp-icon-color: #959595;--dp-danger-color: #e53935;--dp-marker-color: #e53935;--dp-tooltip-color: #3e3e3e;--dp-highlight-color: rgb(0 92 178 / 20%);--dp-range-between-dates-background-color: var(--dp-hover-color, #484848);--dp-range-between-dates-text-color: var(--dp-hover-text-color, #fff);--dp-range-between-border-color: var(--dp-hover-color, #fff);--dp-loader: 5px solid #005cb2}.dp__theme_light{--dp-background-color: #fff;--dp-text-color: #212121;--dp-hover-color: #f3f3f3;--dp-hover-text-color: #212121;--dp-hover-icon-color: #959595;--dp-primary-color: #1976d2;--dp-primary-disabled-color: #6bacea;--dp-primary-text-color: #fff;--dp-secondary-color: #c0c4cc;--dp-border-color: #ddd;--dp-menu-border-color: #ddd;--dp-border-color-hover: #aaaeb7;--dp-border-color-focus: #aaaeb7;--dp-disabled-color: #f6f6f6;--dp-scroll-bar-background: #f3f3f3;--dp-scroll-bar-color: #959595;--dp-success-color: #76d275;--dp-success-color-disabled: #a3d9b1;--dp-icon-color: #959595;--dp-danger-color: #ff6f60;--dp-marker-color: #ff6f60;--dp-tooltip-color: #fafafa;--dp-disabled-color-text: #8e8e8e;--dp-highlight-color: rgb(25 118 210 / 10%);--dp-range-between-dates-background-color: var(--dp-hover-color, #f3f3f3);--dp-range-between-dates-text-color: var(--dp-hover-text-color, #212121);--dp-range-between-border-color: var(--dp-hover-color, #f3f3f3);--dp-loader: 5px solid #1976d2}.dp__flex{display:flex;align-items:center}.dp__btn{background:none}.dp__main{font-family:var(--dp-font-family);user-select:none;box-sizing:border-box;position:relative;width:100%}.dp__main *{direction:var(--dp-direction, ltr)}.dp__pointer{cursor:pointer}.dp__icon{stroke:currentcolor;fill:currentcolor}.dp__button{width:100%;text-align:center;color:var(--dp-icon-color);cursor:pointer;display:flex;align-items:center;place-content:center center;padding:var(--dp-common-padding);box-sizing:border-box;height:var(--dp-button-height)}.dp__button.dp__overlay_action{position:absolute;bottom:0}.dp__button:hover{background:var(--dp-hover-color);color:var(--dp-hover-icon-color)}.dp__button svg{height:var(--dp-button-icon-height);width:auto}.dp__button_bottom{border-bottom-left-radius:var(--dp-border-radius);border-bottom-right-radius:var(--dp-border-radius)}.dp__flex_display{display:flex}.dp__flex_display_with_input{flex-direction:column;align-items:flex-start}.dp__relative{position:relative}.calendar-next-enter-active,.calendar-next-leave-active,.calendar-prev-enter-active,.calendar-prev-leave-active{transition:all var(--dp-transition-timing-general) ease-out}.calendar-next-enter-from{opacity:0;transform:translate(var(--dp-transition-length))}.calendar-next-leave-to,.calendar-prev-enter-from{opacity:0;transform:translate(calc(var(--dp-transition-length) * -1))}.calendar-prev-leave-to{opacity:0;transform:translate(var(--dp-transition-length))}.dp-menu-appear-bottom-enter-active,.dp-menu-appear-bottom-leave-active,.dp-menu-appear-top-enter-active,.dp-menu-appear-top-leave-active,.dp-slide-up-enter-active,.dp-slide-up-leave-active,.dp-slide-down-enter-active,.dp-slide-down-leave-active{transition:all var(--dp-animation-duration) var(--dp-transition-timing)}.dp-menu-appear-top-enter-from,.dp-menu-appear-top-leave-to,.dp-slide-down-leave-to,.dp-slide-up-enter-from{opacity:0;transform:translateY(var(--dp-transition-length))}.dp-menu-appear-bottom-enter-from,.dp-menu-appear-bottom-leave-to,.dp-slide-down-enter-from,.dp-slide-up-leave-to{opacity:0;transform:translateY(calc(var(--dp-transition-length) * -1))}.dp--arrow-btn-nav{transition:var(--dp-common-transition)}.dp--highlighted{background-color:var(--dp-highlight-color)}.dp--hidden-el{visibility:hidden}.app-enter-active[data-v-ca898237],.app-leave-active[data-v-ca898237]{transition:all .7s cubic-bezier(.82,.58,.17,1)}.app-enter-from[data-v-ca898237],.app-leave-to[data-v-ca898237]{opacity:0;transform:scale(1.1)}@media screen and (min-width: 768px){.navbar[data-v-ca898237]{display:none}} diff --git a/src/static/app/dist/assets/index.js b/src/static/app/dist/assets/index.js index c841125..f944fba 100644 --- a/src/static/app/dist/assets/index.js +++ b/src/static/app/dist/assets/index.js @@ -1,79 +1,41 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();var sx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function VM(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function WM(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}),n}var zM={exports:{}},ri="top",Mi="bottom",Ii="right",oi="left",ef="auto",Kl=[ri,Mi,Ii,oi],aa="start",gl="end",rx="clippingParents",Ym="viewport",Ua="popper",ox="reference",Dp=Kl.reduce(function(t,e){return t.concat([e+"-"+aa,e+"-"+gl])},[]),Hm=[].concat(Kl,[ef]).reduce(function(t,e){return t.concat([e,e+"-"+aa,e+"-"+gl])},[]),ax="beforeRead",lx="read",cx="afterRead",ux="beforeMain",dx="main",hx="afterMain",fx="beforeWrite",gx="write",px="afterWrite",mx=[ax,lx,cx,ux,dx,hx,fx,gx,px];function Ns(t){return t?(t.nodeName||"").toLowerCase():null}function Di(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function la(t){var e=Di(t).Element;return t instanceof e||t instanceof Element}function Yi(t){var e=Di(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function jm(t){if(typeof ShadowRoot>"u")return!1;var e=Di(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function YM(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},s=e.attributes[n]||{},r=e.elements[n];!Yi(r)||!Ns(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function HM(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],r=e.attributes[i]||{},o=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),a=o.reduce(function(l,c){return l[c]="",l},{});!Yi(s)||!Ns(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const Km={name:"applyStyles",enabled:!0,phase:"write",fn:YM,effect:HM,requires:["computeStyles"]};function Rs(t){return t.split("-")[0]}var ea=Math.max,gh=Math.min,pl=Math.round;function Rp(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function _x(){return!/^((?!chrome|android).)*safari/i.test(Rp())}function ml(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),s=1,r=1;e&&Yi(t)&&(s=t.offsetWidth>0&&pl(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&pl(i.height)/t.offsetHeight||1);var o=la(t)?Di(t):window,a=o.visualViewport,l=!_x()&&n,c=(i.left+(l&&a?a.offsetLeft:0))/s,u=(i.top+(l&&a?a.offsetTop:0))/r,d=i.width/s,f=i.height/r;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Um(t){var e=ml(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function vx(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&jm(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function _r(t){return Di(t).getComputedStyle(t)}function jM(t){return["table","td","th"].indexOf(Ns(t))>=0}function fo(t){return((la(t)?t.ownerDocument:t.document)||window.document).documentElement}function tf(t){return Ns(t)==="html"?t:t.assignedSlot||t.parentNode||(jm(t)?t.host:null)||fo(t)}function Vy(t){return!Yi(t)||_r(t).position==="fixed"?null:t.offsetParent}function KM(t){var e=/firefox/i.test(Rp()),n=/Trident/i.test(Rp());if(n&&Yi(t)){var i=_r(t);if(i.position==="fixed")return null}var s=tf(t);for(jm(s)&&(s=s.host);Yi(s)&&["html","body"].indexOf(Ns(s))<0;){var r=_r(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function $u(t){for(var e=Di(t),n=Vy(t);n&&jM(n)&&_r(n).position==="static";)n=Vy(n);return n&&(Ns(n)==="html"||Ns(n)==="body"&&_r(n).position==="static")?e:n||KM(t)||e}function Gm(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Rc(t,e,n){return ea(t,gh(e,n))}function UM(t,e,n){var i=Rc(t,e,n);return i>n?n:i}function yx(){return{top:0,right:0,bottom:0,left:0}}function bx(t){return Object.assign({},yx(),t)}function wx(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var GM=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,bx(typeof e!="number"?e:wx(e,Kl))};function XM(t){var e,n=t.state,i=t.name,s=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Rs(n.placement),l=Gm(a),c=[oi,Ii].indexOf(a)>=0,u=c?"height":"width";if(!(!r||!o)){var d=GM(s.padding,n),f=Um(r),g=l==="y"?ri:oi,p=l==="y"?Mi:Ii,m=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],v=o[l]-n.rects.reference[l],y=$u(r),x=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,E=m/2-v/2,w=d[g],b=x-f[u]-d[p],C=x/2-f[u]/2+E,k=Rc(w,C,b),T=l;n.modifiersData[i]=(e={},e[T]=k,e.centerOffset=k-C,e)}}function qM(t){var e=t.state,n=t.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||vx(e.elements.popper,s)&&(e.elements.arrow=s))}const xx={name:"arrow",enabled:!0,phase:"main",fn:XM,effect:qM,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _l(t){return t.split("-")[1]}var ZM={top:"auto",right:"auto",bottom:"auto",left:"auto"};function JM(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:pl(n*s)/s||0,y:pl(i*s)/s||0}}function Wy(t){var e,n=t.popper,i=t.popperRect,s=t.placement,r=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,f=o.x,g=f===void 0?0:f,p=o.y,m=p===void 0?0:p,v=typeof u=="function"?u({x:g,y:m}):{x:g,y:m};g=v.x,m=v.y;var y=o.hasOwnProperty("x"),x=o.hasOwnProperty("y"),E=oi,w=ri,b=window;if(c){var C=$u(n),k="clientHeight",T="clientWidth";if(C===Di(n)&&(C=fo(n),_r(C).position!=="static"&&a==="absolute"&&(k="scrollHeight",T="scrollWidth")),C=C,s===ri||(s===oi||s===Ii)&&r===gl){w=Mi;var A=d&&C===b&&b.visualViewport?b.visualViewport.height:C[k];m-=A-i.height,m*=l?1:-1}if(s===oi||(s===ri||s===Mi)&&r===gl){E=Ii;var I=d&&C===b&&b.visualViewport?b.visualViewport.width:C[T];g-=I-i.width,g*=l?1:-1}}var V=Object.assign({position:a},c&&ZM),Y=u===!0?JM({x:g,y:m},Di(n)):{x:g,y:m};if(g=Y.x,m=Y.y,l){var ne;return Object.assign({},V,(ne={},ne[w]=x?"0":"",ne[E]=y?"0":"",ne.transform=(b.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",ne))}return Object.assign({},V,(e={},e[w]=x?m+"px":"",e[E]=y?g+"px":"",e.transform="",e))}function QM(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=i===void 0?!0:i,r=n.adaptive,o=r===void 0?!0:r,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Rs(e.placement),variation:_l(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Wy(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Wy(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Xm={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:QM,data:{}};var pd={passive:!0};function eI(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=Di(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach(function(u){u.addEventListener("scroll",n.update,pd)}),a&&l.addEventListener("resize",n.update,pd),function(){r&&c.forEach(function(u){u.removeEventListener("scroll",n.update,pd)}),a&&l.removeEventListener("resize",n.update,pd)}}const qm={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:eI,data:{}};var tI={left:"right",right:"left",bottom:"top",top:"bottom"};function th(t){return t.replace(/left|right|bottom|top/g,function(e){return tI[e]})}var nI={start:"end",end:"start"};function zy(t){return t.replace(/start|end/g,function(e){return nI[e]})}function Zm(t){var e=Di(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Jm(t){return ml(fo(t)).left+Zm(t).scrollLeft}function iI(t,e){var n=Di(t),i=fo(t),s=n.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=_x();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+Jm(t),y:l}}function sI(t){var e,n=fo(t),i=Zm(t),s=(e=t.ownerDocument)==null?void 0:e.body,r=ea(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=ea(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+Jm(t),l=-i.scrollTop;return _r(s||n).direction==="rtl"&&(a+=ea(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function Qm(t){var e=_r(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function Ex(t){return["html","body","#document"].indexOf(Ns(t))>=0?t.ownerDocument.body:Yi(t)&&Qm(t)?t:Ex(tf(t))}function $c(t,e){var n;e===void 0&&(e=[]);var i=Ex(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=Di(i),o=s?[r].concat(r.visualViewport||[],Qm(i)?i:[]):i,a=e.concat(o);return s?a:a.concat($c(tf(o)))}function $p(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rI(t,e){var n=ml(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Yy(t,e,n){return e===Ym?$p(iI(t,n)):la(e)?rI(e,n):$p(sI(fo(t)))}function oI(t){var e=$c(tf(t)),n=["absolute","fixed"].indexOf(_r(t).position)>=0,i=n&&Yi(t)?$u(t):t;return la(i)?e.filter(function(s){return la(s)&&vx(s,i)&&Ns(s)!=="body"}):[]}function aI(t,e,n,i){var s=e==="clippingParents"?oI(t):[].concat(e),r=[].concat(s,[n]),o=r[0],a=r.reduce(function(l,c){var u=Yy(t,c,i);return l.top=ea(u.top,l.top),l.right=gh(u.right,l.right),l.bottom=gh(u.bottom,l.bottom),l.left=ea(u.left,l.left),l},Yy(t,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Cx(t){var e=t.reference,n=t.element,i=t.placement,s=i?Rs(i):null,r=i?_l(i):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case ri:l={x:o,y:e.y-n.height};break;case Mi:l={x:o,y:e.y+e.height};break;case Ii:l={x:e.x+e.width,y:a};break;case oi:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?Gm(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(r){case aa:l[c]=l[c]-(e[u]/2-n[u]/2);break;case gl:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function vl(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=i===void 0?t.placement:i,r=n.strategy,o=r===void 0?t.strategy:r,a=n.boundary,l=a===void 0?rx:a,c=n.rootBoundary,u=c===void 0?Ym:c,d=n.elementContext,f=d===void 0?Ua:d,g=n.altBoundary,p=g===void 0?!1:g,m=n.padding,v=m===void 0?0:m,y=bx(typeof v!="number"?v:wx(v,Kl)),x=f===Ua?ox:Ua,E=t.rects.popper,w=t.elements[p?x:f],b=aI(la(w)?w:w.contextElement||fo(t.elements.popper),l,u,o),C=ml(t.elements.reference),k=Cx({reference:C,element:E,strategy:"absolute",placement:s}),T=$p(Object.assign({},E,k)),A=f===Ua?T:C,I={top:b.top-A.top+y.top,bottom:A.bottom-b.bottom+y.bottom,left:b.left-A.left+y.left,right:A.right-b.right+y.right},V=t.modifiersData.offset;if(f===Ua&&V){var Y=V[s];Object.keys(I).forEach(function(ne){var N=[Ii,Mi].indexOf(ne)>=0?1:-1,B=[ri,Mi].indexOf(ne)>=0?"y":"x";I[ne]+=Y[B]*N})}return I}function lI(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Hm:l,u=_l(i),d=u?a?Dp:Dp.filter(function(p){return _l(p)===u}):Kl,f=d.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=d);var g=f.reduce(function(p,m){return p[m]=vl(t,{placement:m,boundary:s,rootBoundary:r,padding:o})[Rs(m)],p},{});return Object.keys(g).sort(function(p,m){return g[p]-g[m]})}function cI(t){if(Rs(t)===ef)return[];var e=th(t);return[zy(t),e,zy(e)]}function uI(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,g=n.flipVariations,p=g===void 0?!0:g,m=n.allowedAutoPlacements,v=e.options.placement,y=Rs(v),x=y===v,E=l||(x||!p?[th(v)]:cI(v)),w=[v].concat(E).reduce(function(D,ee){return D.concat(Rs(ee)===ef?lI(e,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ee)},[]),b=e.rects.reference,C=e.rects.popper,k=new Map,T=!0,A=w[0],I=0;I=0,B=N?"width":"height",R=vl(e,{placement:V,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),W=N?ne?Ii:oi:ne?Mi:ri;b[B]>C[B]&&(W=th(W));var X=th(W),J=[];if(r&&J.push(R[Y]<=0),a&&J.push(R[W]<=0,R[X]<=0),J.every(function(D){return D})){A=V,T=!1;break}k.set(V,J)}if(T)for(var H=p?3:1,ce=function(ee){var ue=w.find(function(L){var le=k.get(L);if(le)return le.slice(0,ee).every(function(de){return de})});if(ue)return A=ue,"break"},ie=H;ie>0;ie--){var te=ce(ie);if(te==="break")break}e.placement!==A&&(e.modifiersData[i]._skip=!0,e.placement=A,e.reset=!0)}}const Sx={name:"flip",enabled:!0,phase:"main",fn:uI,requiresIfExists:["offset"],data:{_skip:!1}};function Hy(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function jy(t){return[ri,Ii,Mi,oi].some(function(e){return t[e]>=0})}function dI(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=vl(e,{elementContext:"reference"}),a=vl(e,{altBoundary:!0}),l=Hy(o,i),c=Hy(a,s,r),u=jy(l),d=jy(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const kx={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dI};function hI(t,e,n){var i=Rs(t),s=[oi,ri].indexOf(i)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[oi,Ii].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function fI(t){var e=t.state,n=t.options,i=t.name,s=n.offset,r=s===void 0?[0,0]:s,o=Hm.reduce(function(u,d){return u[d]=hI(d,e.rects,r),u},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=o}const Tx={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fI};function gI(t){var e=t.state,n=t.name;e.modifiersData[n]=Cx({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const e_={name:"popperOffsets",enabled:!0,phase:"read",fn:gI,data:{}};function pI(t){return t==="x"?"y":"x"}function mI(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,g=f===void 0?!0:f,p=n.tetherOffset,m=p===void 0?0:p,v=vl(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=Rs(e.placement),x=_l(e.placement),E=!x,w=Gm(y),b=pI(w),C=e.modifiersData.popperOffsets,k=e.rects.reference,T=e.rects.popper,A=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,I=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Y={x:0,y:0};if(C){if(r){var ne,N=w==="y"?ri:oi,B=w==="y"?Mi:Ii,R=w==="y"?"height":"width",W=C[w],X=W+v[N],J=W-v[B],H=g?-T[R]/2:0,ce=x===aa?k[R]:T[R],ie=x===aa?-T[R]:-k[R],te=e.elements.arrow,D=g&&te?Um(te):{width:0,height:0},ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:yx(),ue=ee[N],L=ee[B],le=Rc(0,k[R],D[R]),de=E?k[R]/2-H-le-ue-I.mainAxis:ce-le-ue-I.mainAxis,xe=E?-k[R]/2+H+le+L+I.mainAxis:ie+le+L+I.mainAxis,z=e.elements.arrow&&$u(e.elements.arrow),fe=z?w==="y"?z.clientTop||0:z.clientLeft||0:0,S=(ne=V?.[w])!=null?ne:0,O=W+de-S-fe,K=W+xe-S,U=Rc(g?gh(X,O):X,W,g?ea(J,K):J);C[w]=U,Y[w]=U-W}if(a){var oe,j=w==="x"?ri:oi,re=w==="x"?Mi:Ii,Q=C[b],ge=b==="y"?"height":"width",be=Q+v[j],we=Q-v[re],Me=[ri,oi].indexOf(y)!==-1,De=(oe=V?.[b])!=null?oe:0,Ye=Me?be:Q-k[ge]-T[ge]-De+I.altAxis,je=Me?Q+k[ge]+T[ge]-De-I.altAxis:we,nt=g&&Me?UM(Ye,Q,je):Rc(g?Ye:be,Q,g?je:we);C[b]=nt,Y[b]=nt-Q}e.modifiersData[i]=Y}}const Ax={name:"preventOverflow",enabled:!0,phase:"main",fn:mI,requiresIfExists:["offset"]};function _I(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function vI(t){return t===Di(t)||!Yi(t)?Zm(t):_I(t)}function yI(t){var e=t.getBoundingClientRect(),n=pl(e.width)/t.offsetWidth||1,i=pl(e.height)/t.offsetHeight||1;return n!==1||i!==1}function bI(t,e,n){n===void 0&&(n=!1);var i=Yi(e),s=Yi(e)&&yI(e),r=fo(e),o=ml(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((Ns(e)!=="body"||Qm(r))&&(a=vI(e)),Yi(e)?(l=ml(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=Jm(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function wI(t){var e=new Map,n=new Set,i=[];t.forEach(function(r){e.set(r.name,r)});function s(r){n.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),i.push(r)}return t.forEach(function(r){n.has(r.name)||s(r)}),i}function xI(t){var e=wI(t);return mx.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function EI(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function CI(t){var e=t.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var Ky={placement:"bottom",modifiers:[],strategy:"absolute"};function Uy(){for(var t=arguments.length,e=new Array(t),n=0;ni.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();var _g=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vg(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}),n}var Eg={exports:{}},qe="top",st="bottom",rt="right",ze="left",Fr="auto",cs=[qe,st,rt,ze],On="start",Jn="end",oc="clippingParents",lo="viewport",Wn="popper",ac="reference",Fi=cs.reduce(function(e,t){return e.concat([t+"-"+On,t+"-"+Jn])},[]),co=[].concat(cs,[Fr]).reduce(function(e,t){return e.concat([t,t+"-"+On,t+"-"+Jn])},[]),lc="beforeRead",cc="read",uc="afterRead",fc="beforeMain",dc="main",hc="afterMain",pc="beforeWrite",gc="write",mc="afterWrite",_c=[lc,cc,uc,fc,dc,hc,pc,gc,mc];function Ot(e){return e?(e.nodeName||"").toLowerCase():null}function it(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Nn(e){var t=it(e).Element;return e instanceof t||e instanceof Element}function ct(e){var t=it(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function uo(e){if(typeof ShadowRoot>"u")return!1;var t=it(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bg(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},r=t.attributes[n]||{},o=t.elements[n];!ct(o)||!Ot(o)||(Object.assign(o.style,s),Object.keys(r).forEach(function(a){var l=r[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function yg(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var r=t.elements[s],o=t.attributes[s]||{},a=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),l=a.reduce(function(c,h){return c[h]="",c},{});!ct(r)||!Ot(r)||(Object.assign(r.style,l),Object.keys(o).forEach(function(c){r.removeAttribute(c)}))})}}const fo={name:"applyStyles",enabled:!0,phase:"write",fn:bg,effect:yg,requires:["computeStyles"]};function wt(e){return e.split("-")[0]}var Cn=Math.max,Or=Math.min,Zn=Math.round;function Hi(){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 vc(){return!/^((?!chrome|android).)*safari/i.test(Hi())}function es(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),r=1,o=1;t&&ct(e)&&(r=e.offsetWidth>0&&Zn(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Zn(s.height)/e.offsetHeight||1);var a=Nn(e)?it(e):window,l=a.visualViewport,c=!vc()&&n,h=(s.left+(c&&l?l.offsetLeft:0))/r,f=(s.top+(c&&l?l.offsetTop:0))/o,d=s.width/r,p=s.height/o;return{width:d,height:p,top:f,right:h+d,bottom:f+p,left:h,x:h,y:f}}function ho(e){var t=es(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}function Ec(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&uo(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Bt(e){return it(e).getComputedStyle(e)}function Ag(e){return["table","td","th"].indexOf(Ot(e))>=0}function an(e){return((Nn(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hr(e){return Ot(e)==="html"?e:e.assignedSlot||e.parentNode||(uo(e)?e.host:null)||an(e)}function ka(e){return!ct(e)||Bt(e).position==="fixed"?null:e.offsetParent}function Tg(e){var t=/firefox/i.test(Hi()),n=/Trident/i.test(Hi());if(n&&ct(e)){var s=Bt(e);if(s.position==="fixed")return null}var r=Hr(e);for(uo(r)&&(r=r.host);ct(r)&&["html","body"].indexOf(Ot(r))<0;){var o=Bt(r);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 r;r=r.parentNode}return null}function js(e){for(var t=it(e),n=ka(e);n&&Ag(n)&&Bt(n).position==="static";)n=ka(n);return n&&(Ot(n)==="html"||Ot(n)==="body"&&Bt(n).position==="static")?t:n||Tg(e)||t}function po(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ts(e,t,n){return Cn(e,Or(t,n))}function Cg(e,t,n){var s=Ts(e,t,n);return s>n?n:s}function bc(){return{top:0,right:0,bottom:0,left:0}}function yc(e){return Object.assign({},bc(),e)}function Ac(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}var wg=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,yc(typeof t!="number"?t:Ac(t,cs))};function Sg(e){var t,n=e.state,s=e.name,r=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=wt(n.placement),c=po(l),h=[ze,rt].indexOf(l)>=0,f=h?"height":"width";if(!(!o||!a)){var d=wg(r.padding,n),p=ho(o),E=c==="y"?qe:ze,A=c==="y"?st:rt,C=n.rects.reference[f]+n.rects.reference[c]-a[c]-n.rects.popper[f],k=a[c]-n.rects.reference[c],I=js(o),R=I?c==="y"?I.clientHeight||0:I.clientWidth||0:0,F=C/2-k/2,$=d[E],O=R-p[f]-d[A],V=R/2-p[f]/2+F,Y=Ts($,V,O),K=c;n.modifiersData[s]=(t={},t[K]=Y,t.centerOffset=Y-V,t)}}function Og(e){var t=e.state,n=e.options,s=n.element,r=s===void 0?"[data-popper-arrow]":s;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||Ec(t.elements.popper,r)&&(t.elements.arrow=r))}const Tc={name:"arrow",enabled:!0,phase:"main",fn:Sg,effect:Og,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ts(e){return e.split("-")[1]}var Ng={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xg(e,t){var n=e.x,s=e.y,r=t.devicePixelRatio||1;return{x:Zn(n*r)/r||0,y:Zn(s*r)/r||0}}function Va(e){var t,n=e.popper,s=e.popperRect,r=e.placement,o=e.variation,a=e.offsets,l=e.position,c=e.gpuAcceleration,h=e.adaptive,f=e.roundOffsets,d=e.isFixed,p=a.x,E=p===void 0?0:p,A=a.y,C=A===void 0?0:A,k=typeof f=="function"?f({x:E,y:C}):{x:E,y:C};E=k.x,C=k.y;var I=a.hasOwnProperty("x"),R=a.hasOwnProperty("y"),F=ze,$=qe,O=window;if(h){var V=js(n),Y="clientHeight",K="clientWidth";if(V===it(n)&&(V=an(n),Bt(V).position!=="static"&&l==="absolute"&&(Y="scrollHeight",K="scrollWidth")),V=V,r===qe||(r===ze||r===rt)&&o===Jn){$=st;var w=d&&V===O&&O.visualViewport?O.visualViewport.height:V[Y];C-=w-s.height,C*=c?1:-1}if(r===ze||(r===qe||r===st)&&o===Jn){F=rt;var P=d&&V===O&&O.visualViewport?O.visualViewport.width:V[K];E-=P-s.width,E*=c?1:-1}}var z=Object.assign({position:l},h&&Ng),H=f===!0?xg({x:E,y:C},it(n)):{x:E,y:C};if(E=H.x,C=H.y,c){var Q;return Object.assign({},z,(Q={},Q[$]=R?"0":"",Q[F]=I?"0":"",Q.transform=(O.devicePixelRatio||1)<=1?"translate("+E+"px, "+C+"px)":"translate3d("+E+"px, "+C+"px, 0)",Q))}return Object.assign({},z,(t={},t[$]=R?C+"px":"",t[F]=I?E+"px":"",t.transform="",t))}function $g(e){var t=e.state,n=e.options,s=n.gpuAcceleration,r=s===void 0?!0:s,o=n.adaptive,a=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,h={placement:wt(t.placement),variation:ts(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Va(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Va(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const go={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:$g,data:{}};var lr={passive:!0};function Dg(e){var t=e.state,n=e.instance,s=e.options,r=s.scroll,o=r===void 0?!0:r,a=s.resize,l=a===void 0?!0:a,c=it(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&h.forEach(function(f){f.addEventListener("scroll",n.update,lr)}),l&&c.addEventListener("resize",n.update,lr),function(){o&&h.forEach(function(f){f.removeEventListener("scroll",n.update,lr)}),l&&c.removeEventListener("resize",n.update,lr)}}const mo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Dg,data:{}};var Lg={left:"right",right:"left",bottom:"top",top:"bottom"};function Er(e){return e.replace(/left|right|bottom|top/g,function(t){return Lg[t]})}var Rg={start:"end",end:"start"};function Fa(e){return e.replace(/start|end/g,function(t){return Rg[t]})}function _o(e){var t=it(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}function vo(e){return es(an(e)).left+_o(e).scrollLeft}function Ig(e,t){var n=it(e),s=an(e),r=n.visualViewport,o=s.clientWidth,a=s.clientHeight,l=0,c=0;if(r){o=r.width,a=r.height;var h=vc();(h||!h&&t==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}return{width:o,height:a,x:l+vo(e),y:c}}function Pg(e){var t,n=an(e),s=_o(e),r=(t=e.ownerDocument)==null?void 0:t.body,o=Cn(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Cn(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-s.scrollLeft+vo(e),c=-s.scrollTop;return Bt(r||n).direction==="rtl"&&(l+=Cn(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:l,y:c}}function Eo(e){var t=Bt(e),n=t.overflow,s=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+s)}function Cc(e){return["html","body","#document"].indexOf(Ot(e))>=0?e.ownerDocument.body:ct(e)&&Eo(e)?e:Cc(Hr(e))}function Cs(e,t){var n;t===void 0&&(t=[]);var s=Cc(e),r=s===((n=e.ownerDocument)==null?void 0:n.body),o=it(s),a=r?[o].concat(o.visualViewport||[],Eo(s)?s:[]):s,l=t.concat(a);return r?l:l.concat(Cs(Hr(a)))}function Bi(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Mg(e,t){var n=es(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 Ha(e,t,n){return t===lo?Bi(Ig(e,n)):Nn(t)?Mg(t,n):Bi(Pg(an(e)))}function kg(e){var t=Cs(Hr(e)),n=["absolute","fixed"].indexOf(Bt(e).position)>=0,s=n&&ct(e)?js(e):e;return Nn(s)?t.filter(function(r){return Nn(r)&&Ec(r,s)&&Ot(r)!=="body"}):[]}function Vg(e,t,n,s){var r=t==="clippingParents"?kg(e):[].concat(t),o=[].concat(r,[n]),a=o[0],l=o.reduce(function(c,h){var f=Ha(e,h,s);return c.top=Cn(f.top,c.top),c.right=Or(f.right,c.right),c.bottom=Or(f.bottom,c.bottom),c.left=Cn(f.left,c.left),c},Ha(e,a,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function wc(e){var t=e.reference,n=e.element,s=e.placement,r=s?wt(s):null,o=s?ts(s):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(r){case qe:c={x:a,y:t.y-n.height};break;case st:c={x:a,y:t.y+t.height};break;case rt:c={x:t.x+t.width,y:l};break;case ze:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var h=r?po(r):null;if(h!=null){var f=h==="y"?"height":"width";switch(o){case On:c[h]=c[h]-(t[f]/2-n[f]/2);break;case Jn:c[h]=c[h]+(t[f]/2-n[f]/2);break}}return c}function ns(e,t){t===void 0&&(t={});var n=t,s=n.placement,r=s===void 0?e.placement:s,o=n.strategy,a=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?oc:l,h=n.rootBoundary,f=h===void 0?lo:h,d=n.elementContext,p=d===void 0?Wn:d,E=n.altBoundary,A=E===void 0?!1:E,C=n.padding,k=C===void 0?0:C,I=yc(typeof k!="number"?k:Ac(k,cs)),R=p===Wn?ac:Wn,F=e.rects.popper,$=e.elements[A?R:p],O=Vg(Nn($)?$:$.contextElement||an(e.elements.popper),c,f,a),V=es(e.elements.reference),Y=wc({reference:V,element:F,strategy:"absolute",placement:r}),K=Bi(Object.assign({},F,Y)),w=p===Wn?K:V,P={top:O.top-w.top+I.top,bottom:w.bottom-O.bottom+I.bottom,left:O.left-w.left+I.left,right:w.right-O.right+I.right},z=e.modifiersData.offset;if(p===Wn&&z){var H=z[r];Object.keys(P).forEach(function(Q){var ce=[rt,st].indexOf(Q)>=0?1:-1,me=[qe,st].indexOf(Q)>=0?"y":"x";P[Q]+=H[me]*ce})}return P}function Fg(e,t){t===void 0&&(t={});var n=t,s=n.placement,r=n.boundary,o=n.rootBoundary,a=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,h=c===void 0?co:c,f=ts(s),d=f?l?Fi:Fi.filter(function(A){return ts(A)===f}):cs,p=d.filter(function(A){return h.indexOf(A)>=0});p.length===0&&(p=d);var E=p.reduce(function(A,C){return A[C]=ns(e,{placement:C,boundary:r,rootBoundary:o,padding:a})[wt(C)],A},{});return Object.keys(E).sort(function(A,C){return E[A]-E[C]})}function Hg(e){if(wt(e)===Fr)return[];var t=Er(e);return[Fa(e),t,Fa(t)]}function Bg(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!0:a,c=n.fallbackPlacements,h=n.padding,f=n.boundary,d=n.rootBoundary,p=n.altBoundary,E=n.flipVariations,A=E===void 0?!0:E,C=n.allowedAutoPlacements,k=t.options.placement,I=wt(k),R=I===k,F=c||(R||!A?[Er(k)]:Hg(k)),$=[k].concat(F).reduce(function(Be,Pe){return Be.concat(wt(Pe)===Fr?Fg(t,{placement:Pe,boundary:f,rootBoundary:d,padding:h,flipVariations:A,allowedAutoPlacements:C}):Pe)},[]),O=t.rects.reference,V=t.rects.popper,Y=new Map,K=!0,w=$[0],P=0;P<$.length;P++){var z=$[P],H=wt(z),Q=ts(z)===On,ce=[qe,st].indexOf(H)>=0,me=ce?"width":"height",re=ns(t,{placement:z,boundary:f,rootBoundary:d,altBoundary:p,padding:h}),Z=ce?Q?rt:ze:Q?st:qe;O[me]>V[me]&&(Z=Er(Z));var le=Er(Z),Ce=[];if(o&&Ce.push(re[H]<=0),l&&Ce.push(re[Z]<=0,re[le]<=0),Ce.every(function(Be){return Be})){w=z,K=!1;break}Y.set(z,Ce)}if(K)for(var He=A?3:1,De=function(Pe){var Te=$.find(function(N){var G=Y.get(N);if(G)return G.slice(0,Pe).every(function(q){return q})});if(Te)return w=Te,"break"},ye=He;ye>0;ye--){var et=De(ye);if(et==="break")break}t.placement!==w&&(t.modifiersData[s]._skip=!0,t.placement=w,t.reset=!0)}}const Sc={name:"flip",enabled:!0,phase:"main",fn:Bg,requiresIfExists:["offset"],data:{_skip:!1}};function Ba(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 ja(e){return[qe,rt,st,ze].some(function(t){return e[t]>=0})}function jg(e){var t=e.state,n=e.name,s=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,a=ns(t,{elementContext:"reference"}),l=ns(t,{altBoundary:!0}),c=Ba(a,s),h=Ba(l,r,o),f=ja(c),d=ja(h);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:h,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const Oc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:jg};function Wg(e,t,n){var s=wt(e),r=[ze,qe].indexOf(s)>=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)*r,[ze,rt].indexOf(s)>=0?{x:l,y:a}:{x:a,y:l}}function Kg(e){var t=e.state,n=e.options,s=e.name,r=n.offset,o=r===void 0?[0,0]:r,a=co.reduce(function(f,d){return f[d]=Wg(d,t.rects,o),f},{}),l=a[t.placement],c=l.x,h=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=h),t.modifiersData[s]=a}const Nc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Kg};function Ug(e){var t=e.state,n=e.name;t.modifiersData[n]=wc({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const bo={name:"popperOffsets",enabled:!0,phase:"read",fn:Ug,data:{}};function Yg(e){return e==="x"?"y":"x"}function Gg(e){var t=e.state,n=e.options,s=e.name,r=n.mainAxis,o=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!1:a,c=n.boundary,h=n.rootBoundary,f=n.altBoundary,d=n.padding,p=n.tether,E=p===void 0?!0:p,A=n.tetherOffset,C=A===void 0?0:A,k=ns(t,{boundary:c,rootBoundary:h,padding:d,altBoundary:f}),I=wt(t.placement),R=ts(t.placement),F=!R,$=po(I),O=Yg($),V=t.modifiersData.popperOffsets,Y=t.rects.reference,K=t.rects.popper,w=typeof C=="function"?C(Object.assign({},t.rects,{placement:t.placement})):C,P=typeof w=="number"?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),z=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(V){if(o){var Q,ce=$==="y"?qe:ze,me=$==="y"?st:rt,re=$==="y"?"height":"width",Z=V[$],le=Z+k[ce],Ce=Z-k[me],He=E?-K[re]/2:0,De=R===On?Y[re]:K[re],ye=R===On?-K[re]:-Y[re],et=t.elements.arrow,Be=E&&et?ho(et):{width:0,height:0},Pe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:bc(),Te=Pe[ce],N=Pe[me],G=Ts(0,Y[re],Be[re]),q=F?Y[re]/2-He-G-Te-P.mainAxis:De-G-Te-P.mainAxis,J=F?-Y[re]/2+He+G+N+P.mainAxis:ye+G+N+P.mainAxis,T=t.elements.arrow&&js(t.elements.arrow),pe=T?$==="y"?T.clientTop||0:T.clientLeft||0:0,g=(Q=z?.[$])!=null?Q:0,_=Z+q-g-pe,b=Z+J-g,L=Ts(E?Or(le,_):le,Z,E?Cn(Ce,b):Ce);V[$]=L,H[$]=L-Z}if(l){var S,D=$==="x"?qe:ze,U=$==="x"?st:rt,y=V[O],B=O==="y"?"height":"width",M=y+k[D],ne=y-k[U],X=[qe,ze].indexOf(I)!==-1,ee=(S=z?.[O])!=null?S:0,se=X?M:y-Y[B]-K[B]-ee+P.altAxis,oe=X?y+Y[B]+K[B]-ee-P.altAxis:ne,de=E&&X?Cg(se,y,oe):Ts(E?se:M,y,E?oe:ne);V[O]=de,H[O]=de-y}t.modifiersData[s]=H}}const xc={name:"preventOverflow",enabled:!0,phase:"main",fn:Gg,requiresIfExists:["offset"]};function qg(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function zg(e){return e===it(e)||!ct(e)?_o(e):qg(e)}function Xg(e){var t=e.getBoundingClientRect(),n=Zn(t.width)/e.offsetWidth||1,s=Zn(t.height)/e.offsetHeight||1;return n!==1||s!==1}function Qg(e,t,n){n===void 0&&(n=!1);var s=ct(t),r=ct(t)&&Xg(t),o=an(t),a=es(e,r,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!n)&&((Ot(t)!=="body"||Eo(o))&&(l=zg(t)),ct(t)?(c=es(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=vo(o))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Jg(e){var t=new Map,n=new Set,s=[];e.forEach(function(o){t.set(o.name,o)});function r(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&&r(c)}}),s.push(o)}return e.forEach(function(o){n.has(o.name)||r(o)}),s}function Zg(e){var t=Jg(e);return _c.reduce(function(n,s){return n.concat(t.filter(function(r){return r.phase===s}))},[])}function em(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function tm(e){var t=e.reduce(function(n,s){var r=n[s.name];return n[s.name]=r?Object.assign({},r,s,{options:Object.assign({},r.options,s.options),data:Object.assign({},r.data,s.data)}):s,n},{});return Object.keys(t).map(function(n){return t[n]})}var Wa={placement:"bottom",modifiers:[],strategy:"absolute"};function Ka(){for(var e=arguments.length,t=new Array(e),n=0;nG[M]})}}return _.default=G,Object.freeze(_)}const s=i(n),r=new Map,o={set(G,_,M){r.has(G)||r.set(G,new Map);const q=r.get(G);if(!q.has(_)&&q.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(q.keys())[0]}.`);return}q.set(_,M)},get(G,_){return r.has(G)&&r.get(G).get(_)||null},remove(G,_){if(!r.has(G))return;const M=r.get(G);M.delete(_),M.size===0&&r.delete(G)}},a=1e6,l=1e3,c="transitionend",u=G=>(G&&window.CSS&&window.CSS.escape&&(G=G.replace(/#([^\s"#']+)/g,(_,M)=>`#${CSS.escape(M)}`)),G),d=G=>G==null?`${G}`:Object.prototype.toString.call(G).match(/\s([a-z]+)/i)[1].toLowerCase(),f=G=>{do G+=Math.floor(Math.random()*a);while(document.getElementById(G));return G},g=G=>{if(!G)return 0;let{transitionDuration:_,transitionDelay:M}=window.getComputedStyle(G);const q=Number.parseFloat(_),ye=Number.parseFloat(M);return!q&&!ye?0:(_=_.split(",")[0],M=M.split(",")[0],(Number.parseFloat(_)+Number.parseFloat(M))*l)},p=G=>{G.dispatchEvent(new Event(c))},m=G=>!G||typeof G!="object"?!1:(typeof G.jquery<"u"&&(G=G[0]),typeof G.nodeType<"u"),v=G=>m(G)?G.jquery?G[0]:G:typeof G=="string"&&G.length>0?document.querySelector(u(G)):null,y=G=>{if(!m(G)||G.getClientRects().length===0)return!1;const _=getComputedStyle(G).getPropertyValue("visibility")==="visible",M=G.closest("details:not([open])");if(!M)return _;if(M!==G){const q=G.closest("summary");if(q&&q.parentNode!==M||q===null)return!1}return _},x=G=>!G||G.nodeType!==Node.ELEMENT_NODE||G.classList.contains("disabled")?!0:typeof G.disabled<"u"?G.disabled:G.hasAttribute("disabled")&&G.getAttribute("disabled")!=="false",E=G=>{if(!document.documentElement.attachShadow)return null;if(typeof G.getRootNode=="function"){const _=G.getRootNode();return _ instanceof ShadowRoot?_:null}return G instanceof ShadowRoot?G:G.parentNode?E(G.parentNode):null},w=()=>{},b=G=>{G.offsetHeight},C=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,k=[],T=G=>{document.readyState==="loading"?(k.length||document.addEventListener("DOMContentLoaded",()=>{for(const _ of k)_()}),k.push(G)):G()},A=()=>document.documentElement.dir==="rtl",I=G=>{T(()=>{const _=C();if(_){const M=G.NAME,q=_.fn[M];_.fn[M]=G.jQueryInterface,_.fn[M].Constructor=G,_.fn[M].noConflict=()=>(_.fn[M]=q,G.jQueryInterface)}})},V=(G,_=[],M=G)=>typeof G=="function"?G(..._):M,Y=(G,_,M=!0)=>{if(!M){V(G);return}const ye=g(_)+5;let Oe=!1;const $e=({target:rt})=>{rt===_&&(Oe=!0,_.removeEventListener(c,$e),V(G))};_.addEventListener(c,$e),setTimeout(()=>{Oe||p(_)},ye)},ne=(G,_,M,q)=>{const ye=G.length;let Oe=G.indexOf(_);return Oe===-1?!M&&q?G[ye-1]:G[0]:(Oe+=M?1:-1,q&&(Oe=(Oe+ye)%ye),G[Math.max(0,Math.min(Oe,ye-1))])},N=/[^.]*(?=\..*)\.|.*/,B=/\..*/,R=/::\d+$/,W={};let X=1;const J={mouseenter:"mouseover",mouseleave:"mouseout"},H=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 ce(G,_){return _&&`${_}::${X++}`||G.uidEvent||X++}function ie(G){const _=ce(G);return G.uidEvent=_,W[_]=W[_]||{},W[_]}function te(G,_){return function M(q){return fe(q,{delegateTarget:G}),M.oneOff&&z.off(G,q.type,_),_.apply(G,[q])}}function D(G,_,M){return function q(ye){const Oe=G.querySelectorAll(_);for(let{target:$e}=ye;$e&&$e!==this;$e=$e.parentNode)for(const rt of Oe)if(rt===$e)return fe(ye,{delegateTarget:$e}),q.oneOff&&z.off(G,ye.type,_,M),M.apply($e,[ye])}}function ee(G,_,M=null){return Object.values(G).find(q=>q.callable===_&&q.delegationSelector===M)}function ue(G,_,M){const q=typeof _=="string",ye=q?M:_||M;let Oe=xe(G);return H.has(Oe)||(Oe=G),[q,ye,Oe]}function L(G,_,M,q,ye){if(typeof _!="string"||!G)return;let[Oe,$e,rt]=ue(_,M,q);_ in J&&($e=(BM=>function(Ia){if(!Ia.relatedTarget||Ia.relatedTarget!==Ia.delegateTarget&&!Ia.delegateTarget.contains(Ia.relatedTarget))return BM.call(this,Ia)})($e));const di=ie(G),Ni=di[rt]||(di[rt]={}),kn=ee(Ni,$e,Oe?M:null);if(kn){kn.oneOff=kn.oneOff&&ye;return}const vs=ce($e,_.replace(N,"")),Qi=Oe?D(G,M,$e):te(G,$e);Qi.delegationSelector=Oe?M:null,Qi.callable=$e,Qi.oneOff=ye,Qi.uidEvent=vs,Ni[vs]=Qi,G.addEventListener(rt,Qi,Oe)}function le(G,_,M,q,ye){const Oe=ee(_[M],q,ye);Oe&&(G.removeEventListener(M,Oe,!!ye),delete _[M][Oe.uidEvent])}function de(G,_,M,q){const ye=_[M]||{};for(const[Oe,$e]of Object.entries(ye))Oe.includes(q)&&le(G,_,M,$e.callable,$e.delegationSelector)}function xe(G){return G=G.replace(B,""),J[G]||G}const z={on(G,_,M,q){L(G,_,M,q,!1)},one(G,_,M,q){L(G,_,M,q,!0)},off(G,_,M,q){if(typeof _!="string"||!G)return;const[ye,Oe,$e]=ue(_,M,q),rt=$e!==_,di=ie(G),Ni=di[$e]||{},kn=_.startsWith(".");if(typeof Oe<"u"){if(!Object.keys(Ni).length)return;le(G,di,$e,Oe,ye?M:null);return}if(kn)for(const vs of Object.keys(di))de(G,di,vs,_.slice(1));for(const[vs,Qi]of Object.entries(Ni)){const gd=vs.replace(R,"");(!rt||_.includes(gd))&&le(G,di,$e,Qi.callable,Qi.delegationSelector)}},trigger(G,_,M){if(typeof _!="string"||!G)return null;const q=C(),ye=xe(_),Oe=_!==ye;let $e=null,rt=!0,di=!0,Ni=!1;Oe&&q&&($e=q.Event(_,M),q(G).trigger($e),rt=!$e.isPropagationStopped(),di=!$e.isImmediatePropagationStopped(),Ni=$e.isDefaultPrevented());const kn=fe(new Event(_,{bubbles:rt,cancelable:!0}),M);return Ni&&kn.preventDefault(),di&&G.dispatchEvent(kn),kn.defaultPrevented&&$e&&$e.preventDefault(),kn}};function fe(G,_={}){for(const[M,q]of Object.entries(_))try{G[M]=q}catch{Object.defineProperty(G,M,{configurable:!0,get(){return q}})}return G}function S(G){if(G==="true")return!0;if(G==="false")return!1;if(G===Number(G).toString())return Number(G);if(G===""||G==="null")return null;if(typeof G!="string")return G;try{return JSON.parse(decodeURIComponent(G))}catch{return G}}function O(G){return G.replace(/[A-Z]/g,_=>`-${_.toLowerCase()}`)}const K={setDataAttribute(G,_,M){G.setAttribute(`data-bs-${O(_)}`,M)},removeDataAttribute(G,_){G.removeAttribute(`data-bs-${O(_)}`)},getDataAttributes(G){if(!G)return{};const _={},M=Object.keys(G.dataset).filter(q=>q.startsWith("bs")&&!q.startsWith("bsConfig"));for(const q of M){let ye=q.replace(/^bs/,"");ye=ye.charAt(0).toLowerCase()+ye.slice(1,ye.length),_[ye]=S(G.dataset[q])}return _},getDataAttribute(G,_){return S(G.getAttribute(`data-bs-${O(_)}`))}};class U{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(_){return _=this._mergeConfigObj(_),_=this._configAfterMerge(_),this._typeCheckConfig(_),_}_configAfterMerge(_){return _}_mergeConfigObj(_,M){const q=m(M)?K.getDataAttribute(M,"config"):{};return{...this.constructor.Default,...typeof q=="object"?q:{},...m(M)?K.getDataAttributes(M):{},...typeof _=="object"?_:{}}}_typeCheckConfig(_,M=this.constructor.DefaultType){for(const[q,ye]of Object.entries(M)){const Oe=_[q],$e=m(Oe)?"element":d(Oe);if(!new RegExp(ye).test($e))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${q}" provided type "${$e}" but expected type "${ye}".`)}}}const oe="5.3.3";class j extends U{constructor(_,M){super(),_=v(_),_&&(this._element=_,this._config=this._getConfig(M),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),z.off(this._element,this.constructor.EVENT_KEY);for(const _ of Object.getOwnPropertyNames(this))this[_]=null}_queueCallback(_,M,q=!0){Y(_,M,q)}_getConfig(_){return _=this._mergeConfigObj(_,this._element),_=this._configAfterMerge(_),this._typeCheckConfig(_),_}static getInstance(_){return o.get(v(_),this.DATA_KEY)}static getOrCreateInstance(_,M={}){return this.getInstance(_)||new this(_,typeof M=="object"?M:null)}static get VERSION(){return oe}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(_){return`${_}${this.EVENT_KEY}`}}const re=G=>{let _=G.getAttribute("data-bs-target");if(!_||_==="#"){let M=G.getAttribute("href");if(!M||!M.includes("#")&&!M.startsWith("."))return null;M.includes("#")&&!M.startsWith("#")&&(M=`#${M.split("#")[1]}`),_=M&&M!=="#"?M.trim():null}return _?_.split(",").map(M=>u(M)).join(","):null},Q={find(G,_=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(_,G))},findOne(G,_=document.documentElement){return Element.prototype.querySelector.call(_,G)},children(G,_){return[].concat(...G.children).filter(M=>M.matches(_))},parents(G,_){const M=[];let q=G.parentNode.closest(_);for(;q;)M.push(q),q=q.parentNode.closest(_);return M},prev(G,_){let M=G.previousElementSibling;for(;M;){if(M.matches(_))return[M];M=M.previousElementSibling}return[]},next(G,_){let M=G.nextElementSibling;for(;M;){if(M.matches(_))return[M];M=M.nextElementSibling}return[]},focusableChildren(G){const _=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(M=>`${M}:not([tabindex^="-"])`).join(",");return this.find(_,G).filter(M=>!x(M)&&y(M))},getSelectorFromElement(G){const _=re(G);return _&&Q.findOne(_)?_:null},getElementFromSelector(G){const _=re(G);return _?Q.findOne(_):null},getMultipleElementsFromSelector(G){const _=re(G);return _?Q.find(_):[]}},ge=(G,_="hide")=>{const M=`click.dismiss${G.EVENT_KEY}`,q=G.NAME;z.on(document,M,`[data-bs-dismiss="${q}"]`,function(ye){if(["A","AREA"].includes(this.tagName)&&ye.preventDefault(),x(this))return;const Oe=Q.getElementFromSelector(this)||this.closest(`.${q}`);G.getOrCreateInstance(Oe)[_]()})},be="alert",Me=".bs.alert",De=`close${Me}`,Ye=`closed${Me}`,je="fade",nt="show";class et extends j{static get NAME(){return be}close(){if(z.trigger(this._element,De).defaultPrevented)return;this._element.classList.remove(nt);const M=this._element.classList.contains(je);this._queueCallback(()=>this._destroyElement(),this._element,M)}_destroyElement(){this._element.remove(),z.trigger(this._element,Ye),this.dispose()}static jQueryInterface(_){return this.each(function(){const M=et.getOrCreateInstance(this);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_](this)}})}}ge(et,"close"),I(et);const Jt="button",gn=".bs.button",Gt=".data-api",Ci="active",qi='[data-bs-toggle="button"]',Qt=`click${gn}${Gt}`;class ae extends j{static get NAME(){return Jt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Ci))}static jQueryInterface(_){return this.each(function(){const M=ae.getOrCreateInstance(this);_==="toggle"&&M[_]()})}}z.on(document,Qt,qi,G=>{G.preventDefault();const _=G.target.closest(qi);ae.getOrCreateInstance(_).toggle()}),I(ae);const Te="swipe",he=".bs.swipe",Ae=`touchstart${he}`,Ne=`touchmove${he}`,Xt=`touchend${he}`,pn=`pointerdown${he}`,$i=`pointerup${he}`,zs="touch",mn="pen",Cn="pointer-event",Sn=40,li={endCallback:null,leftCallback:null,rightCallback:null},ci={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ui extends U{constructor(_,M){super(),this._element=_,!(!_||!ui.isSupported())&&(this._config=this._getConfig(M),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return li}static get DefaultType(){return ci}static get NAME(){return Te}dispose(){z.off(this._element,he)}_start(_){if(!this._supportPointerEvents){this._deltaX=_.touches[0].clientX;return}this._eventIsPointerPenTouch(_)&&(this._deltaX=_.clientX)}_end(_){this._eventIsPointerPenTouch(_)&&(this._deltaX=_.clientX-this._deltaX),this._handleSwipe(),V(this._config.endCallback)}_move(_){this._deltaX=_.touches&&_.touches.length>1?0:_.touches[0].clientX-this._deltaX}_handleSwipe(){const _=Math.abs(this._deltaX);if(_<=Sn)return;const M=_/this._deltaX;this._deltaX=0,M&&V(M>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(z.on(this._element,pn,_=>this._start(_)),z.on(this._element,$i,_=>this._end(_)),this._element.classList.add(Cn)):(z.on(this._element,Ae,_=>this._start(_)),z.on(this._element,Ne,_=>this._move(_)),z.on(this._element,Xt,_=>this._end(_)))}_eventIsPointerPenTouch(_){return this._supportPointerEvents&&(_.pointerType===mn||_.pointerType===zs)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Zi="carousel",zt=".bs.carousel",Li=".data-api",ig="ArrowLeft",EA="ArrowRight",CA=500,ec="next",Ca="prev",Sa="left",sd="right",SA=`slide${zt}`,sg=`slid${zt}`,kA=`keydown${zt}`,TA=`mouseenter${zt}`,AA=`mouseleave${zt}`,PA=`dragstart${zt}`,MA=`load${zt}${Li}`,IA=`click${zt}${Li}`,ey="carousel",rd="active",DA="slide",RA="carousel-item-end",$A="carousel-item-start",LA="carousel-item-next",OA="carousel-item-prev",ty=".active",ny=".carousel-item",NA=ty+ny,FA=".carousel-item img",BA=".carousel-indicators",VA="[data-bs-slide], [data-bs-slide-to]",WA='[data-bs-ride="carousel"]',zA={[ig]:sd,[EA]:Sa},YA={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},HA={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ka extends j{constructor(_,M){super(_,M),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Q.findOne(BA,this._element),this._addEventListeners(),this._config.ride===ey&&this.cycle()}static get Default(){return YA}static get DefaultType(){return HA}static get NAME(){return Zi}next(){this._slide(ec)}nextWhenVisible(){!document.hidden&&y(this._element)&&this.next()}prev(){this._slide(Ca)}pause(){this._isSliding&&p(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){z.one(this._element,sg,()=>this.cycle());return}this.cycle()}}to(_){const M=this._getItems();if(_>M.length-1||_<0)return;if(this._isSliding){z.one(this._element,sg,()=>this.to(_));return}const q=this._getItemIndex(this._getActive());if(q===_)return;const ye=_>q?ec:Ca;this._slide(ye,M[_])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(_){return _.defaultInterval=_.interval,_}_addEventListeners(){this._config.keyboard&&z.on(this._element,kA,_=>this._keydown(_)),this._config.pause==="hover"&&(z.on(this._element,TA,()=>this.pause()),z.on(this._element,AA,()=>this._maybeEnableCycle())),this._config.touch&&ui.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const q of Q.find(FA,this._element))z.on(q,PA,ye=>ye.preventDefault());const M={leftCallback:()=>this._slide(this._directionToOrder(Sa)),rightCallback:()=>this._slide(this._directionToOrder(sd)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),CA+this._config.interval))}};this._swipeHelper=new ui(this._element,M)}_keydown(_){if(/input|textarea/i.test(_.target.tagName))return;const M=zA[_.key];M&&(_.preventDefault(),this._slide(this._directionToOrder(M)))}_getItemIndex(_){return this._getItems().indexOf(_)}_setActiveIndicatorElement(_){if(!this._indicatorsElement)return;const M=Q.findOne(ty,this._indicatorsElement);M.classList.remove(rd),M.removeAttribute("aria-current");const q=Q.findOne(`[data-bs-slide-to="${_}"]`,this._indicatorsElement);q&&(q.classList.add(rd),q.setAttribute("aria-current","true"))}_updateInterval(){const _=this._activeElement||this._getActive();if(!_)return;const M=Number.parseInt(_.getAttribute("data-bs-interval"),10);this._config.interval=M||this._config.defaultInterval}_slide(_,M=null){if(this._isSliding)return;const q=this._getActive(),ye=_===ec,Oe=M||ne(this._getItems(),q,ye,this._config.wrap);if(Oe===q)return;const $e=this._getItemIndex(Oe),rt=gd=>z.trigger(this._element,gd,{relatedTarget:Oe,direction:this._orderToDirection(_),from:this._getItemIndex(q),to:$e});if(rt(SA).defaultPrevented||!q||!Oe)return;const Ni=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement($e),this._activeElement=Oe;const kn=ye?$A:RA,vs=ye?LA:OA;Oe.classList.add(vs),b(Oe),q.classList.add(kn),Oe.classList.add(kn);const Qi=()=>{Oe.classList.remove(kn,vs),Oe.classList.add(rd),q.classList.remove(rd,vs,kn),this._isSliding=!1,rt(sg)};this._queueCallback(Qi,q,this._isAnimated()),Ni&&this.cycle()}_isAnimated(){return this._element.classList.contains(DA)}_getActive(){return Q.findOne(NA,this._element)}_getItems(){return Q.find(ny,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(_){return A()?_===Sa?Ca:ec:_===Sa?ec:Ca}_orderToDirection(_){return A()?_===Ca?Sa:sd:_===Ca?sd:Sa}static jQueryInterface(_){return this.each(function(){const M=ka.getOrCreateInstance(this,_);if(typeof _=="number"){M.to(_);return}if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_]()}})}}z.on(document,IA,VA,function(G){const _=Q.getElementFromSelector(this);if(!_||!_.classList.contains(ey))return;G.preventDefault();const M=ka.getOrCreateInstance(_),q=this.getAttribute("data-bs-slide-to");if(q){M.to(q),M._maybeEnableCycle();return}if(K.getDataAttribute(this,"slide")==="next"){M.next(),M._maybeEnableCycle();return}M.prev(),M._maybeEnableCycle()}),z.on(window,MA,()=>{const G=Q.find(WA);for(const _ of G)ka.getOrCreateInstance(_)}),I(ka);const jA="collapse",tc=".bs.collapse",KA=".data-api",UA=`show${tc}`,GA=`shown${tc}`,XA=`hide${tc}`,qA=`hidden${tc}`,ZA=`click${tc}${KA}`,rg="show",Ta="collapse",od="collapsing",JA="collapsed",QA=`:scope .${Ta} .${Ta}`,e2="collapse-horizontal",t2="width",n2="height",i2=".collapse.show, .collapse.collapsing",og='[data-bs-toggle="collapse"]',s2={parent:null,toggle:!0},r2={parent:"(null|element)",toggle:"boolean"};class Aa extends j{constructor(_,M){super(_,M),this._isTransitioning=!1,this._triggerArray=[];const q=Q.find(og);for(const ye of q){const Oe=Q.getSelectorFromElement(ye),$e=Q.find(Oe).filter(rt=>rt===this._element);Oe!==null&&$e.length&&this._triggerArray.push(ye)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return s2}static get DefaultType(){return r2}static get NAME(){return jA}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let _=[];if(this._config.parent&&(_=this._getFirstLevelChildren(i2).filter(rt=>rt!==this._element).map(rt=>Aa.getOrCreateInstance(rt,{toggle:!1}))),_.length&&_[0]._isTransitioning||z.trigger(this._element,UA).defaultPrevented)return;for(const rt of _)rt.hide();const q=this._getDimension();this._element.classList.remove(Ta),this._element.classList.add(od),this._element.style[q]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const ye=()=>{this._isTransitioning=!1,this._element.classList.remove(od),this._element.classList.add(Ta,rg),this._element.style[q]="",z.trigger(this._element,GA)},$e=`scroll${q[0].toUpperCase()+q.slice(1)}`;this._queueCallback(ye,this._element,!0),this._element.style[q]=`${this._element[$e]}px`}hide(){if(this._isTransitioning||!this._isShown()||z.trigger(this._element,XA).defaultPrevented)return;const M=this._getDimension();this._element.style[M]=`${this._element.getBoundingClientRect()[M]}px`,b(this._element),this._element.classList.add(od),this._element.classList.remove(Ta,rg);for(const ye of this._triggerArray){const Oe=Q.getElementFromSelector(ye);Oe&&!this._isShown(Oe)&&this._addAriaAndCollapsedClass([ye],!1)}this._isTransitioning=!0;const q=()=>{this._isTransitioning=!1,this._element.classList.remove(od),this._element.classList.add(Ta),z.trigger(this._element,qA)};this._element.style[M]="",this._queueCallback(q,this._element,!0)}_isShown(_=this._element){return _.classList.contains(rg)}_configAfterMerge(_){return _.toggle=!!_.toggle,_.parent=v(_.parent),_}_getDimension(){return this._element.classList.contains(e2)?t2:n2}_initializeChildren(){if(!this._config.parent)return;const _=this._getFirstLevelChildren(og);for(const M of _){const q=Q.getElementFromSelector(M);q&&this._addAriaAndCollapsedClass([M],this._isShown(q))}}_getFirstLevelChildren(_){const M=Q.find(QA,this._config.parent);return Q.find(_,this._config.parent).filter(q=>!M.includes(q))}_addAriaAndCollapsedClass(_,M){if(_.length)for(const q of _)q.classList.toggle(JA,!M),q.setAttribute("aria-expanded",M)}static jQueryInterface(_){const M={};return typeof _=="string"&&/show|hide/.test(_)&&(M.toggle=!1),this.each(function(){const q=Aa.getOrCreateInstance(this,M);if(typeof _=="string"){if(typeof q[_]>"u")throw new TypeError(`No method named "${_}"`);q[_]()}})}}z.on(document,ZA,og,function(G){(G.target.tagName==="A"||G.delegateTarget&&G.delegateTarget.tagName==="A")&&G.preventDefault();for(const _ of Q.getMultipleElementsFromSelector(this))Aa.getOrCreateInstance(_,{toggle:!1}).toggle()}),I(Aa);const iy="dropdown",ko=".bs.dropdown",ag=".data-api",o2="Escape",sy="Tab",a2="ArrowUp",ry="ArrowDown",l2=2,c2=`hide${ko}`,u2=`hidden${ko}`,d2=`show${ko}`,h2=`shown${ko}`,oy=`click${ko}${ag}`,ay=`keydown${ko}${ag}`,f2=`keyup${ko}${ag}`,Pa="show",g2="dropup",p2="dropend",m2="dropstart",_2="dropup-center",v2="dropdown-center",To='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',y2=`${To}.${Pa}`,ad=".dropdown-menu",b2=".navbar",w2=".navbar-nav",x2=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",E2=A()?"top-end":"top-start",C2=A()?"top-start":"top-end",S2=A()?"bottom-end":"bottom-start",k2=A()?"bottom-start":"bottom-end",T2=A()?"left-start":"right-start",A2=A()?"right-start":"left-start",P2="top",M2="bottom",I2={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},D2={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Ji extends j{constructor(_,M){super(_,M),this._popper=null,this._parent=this._element.parentNode,this._menu=Q.next(this._element,ad)[0]||Q.prev(this._element,ad)[0]||Q.findOne(ad,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return I2}static get DefaultType(){return D2}static get NAME(){return iy}toggle(){return this._isShown()?this.hide():this.show()}show(){if(x(this._element)||this._isShown())return;const _={relatedTarget:this._element};if(!z.trigger(this._element,d2,_).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(w2))for(const q of[].concat(...document.body.children))z.on(q,"mouseover",w);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Pa),this._element.classList.add(Pa),z.trigger(this._element,h2,_)}}hide(){if(x(this._element)||!this._isShown())return;const _={relatedTarget:this._element};this._completeHide(_)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(_){if(!z.trigger(this._element,c2,_).defaultPrevented){if("ontouchstart"in document.documentElement)for(const q of[].concat(...document.body.children))z.off(q,"mouseover",w);this._popper&&this._popper.destroy(),this._menu.classList.remove(Pa),this._element.classList.remove(Pa),this._element.setAttribute("aria-expanded","false"),K.removeDataAttribute(this._menu,"popper"),z.trigger(this._element,u2,_)}}_getConfig(_){if(_=super._getConfig(_),typeof _.reference=="object"&&!m(_.reference)&&typeof _.reference.getBoundingClientRect!="function")throw new TypeError(`${iy.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return _}_createPopper(){if(typeof s>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let _=this._element;this._config.reference==="parent"?_=this._parent:m(this._config.reference)?_=v(this._config.reference):typeof this._config.reference=="object"&&(_=this._config.reference);const M=this._getPopperConfig();this._popper=s.createPopper(_,this._menu,M)}_isShown(){return this._menu.classList.contains(Pa)}_getPlacement(){const _=this._parent;if(_.classList.contains(p2))return T2;if(_.classList.contains(m2))return A2;if(_.classList.contains(_2))return P2;if(_.classList.contains(v2))return M2;const M=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return _.classList.contains(g2)?M?C2:E2:M?k2:S2}_detectNavbar(){return this._element.closest(b2)!==null}_getOffset(){const{offset:_}=this._config;return typeof _=="string"?_.split(",").map(M=>Number.parseInt(M,10)):typeof _=="function"?M=>_(M,this._element):_}_getPopperConfig(){const _={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(K.setDataAttribute(this._menu,"popper","static"),_.modifiers=[{name:"applyStyles",enabled:!1}]),{..._,...V(this._config.popperConfig,[_])}}_selectMenuItem({key:_,target:M}){const q=Q.find(x2,this._menu).filter(ye=>y(ye));q.length&&ne(q,M,_===ry,!q.includes(M)).focus()}static jQueryInterface(_){return this.each(function(){const M=Ji.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_]()}})}static clearMenus(_){if(_.button===l2||_.type==="keyup"&&_.key!==sy)return;const M=Q.find(y2);for(const q of M){const ye=Ji.getInstance(q);if(!ye||ye._config.autoClose===!1)continue;const Oe=_.composedPath(),$e=Oe.includes(ye._menu);if(Oe.includes(ye._element)||ye._config.autoClose==="inside"&&!$e||ye._config.autoClose==="outside"&&$e||ye._menu.contains(_.target)&&(_.type==="keyup"&&_.key===sy||/input|select|option|textarea|form/i.test(_.target.tagName)))continue;const rt={relatedTarget:ye._element};_.type==="click"&&(rt.clickEvent=_),ye._completeHide(rt)}}static dataApiKeydownHandler(_){const M=/input|textarea/i.test(_.target.tagName),q=_.key===o2,ye=[a2,ry].includes(_.key);if(!ye&&!q||M&&!q)return;_.preventDefault();const Oe=this.matches(To)?this:Q.prev(this,To)[0]||Q.next(this,To)[0]||Q.findOne(To,_.delegateTarget.parentNode),$e=Ji.getOrCreateInstance(Oe);if(ye){_.stopPropagation(),$e.show(),$e._selectMenuItem(_);return}$e._isShown()&&(_.stopPropagation(),$e.hide(),Oe.focus())}}z.on(document,ay,To,Ji.dataApiKeydownHandler),z.on(document,ay,ad,Ji.dataApiKeydownHandler),z.on(document,oy,Ji.clearMenus),z.on(document,f2,Ji.clearMenus),z.on(document,oy,To,function(G){G.preventDefault(),Ji.getOrCreateInstance(this).toggle()}),I(Ji);const ly="backdrop",R2="fade",cy="show",uy=`mousedown.bs.${ly}`,$2={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},L2={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class dy extends U{constructor(_){super(),this._config=this._getConfig(_),this._isAppended=!1,this._element=null}static get Default(){return $2}static get DefaultType(){return L2}static get NAME(){return ly}show(_){if(!this._config.isVisible){V(_);return}this._append();const M=this._getElement();this._config.isAnimated&&b(M),M.classList.add(cy),this._emulateAnimation(()=>{V(_)})}hide(_){if(!this._config.isVisible){V(_);return}this._getElement().classList.remove(cy),this._emulateAnimation(()=>{this.dispose(),V(_)})}dispose(){this._isAppended&&(z.off(this._element,uy),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const _=document.createElement("div");_.className=this._config.className,this._config.isAnimated&&_.classList.add(R2),this._element=_}return this._element}_configAfterMerge(_){return _.rootElement=v(_.rootElement),_}_append(){if(this._isAppended)return;const _=this._getElement();this._config.rootElement.append(_),z.on(_,uy,()=>{V(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(_){Y(_,this._getElement(),this._config.isAnimated)}}const O2="focustrap",ld=".bs.focustrap",N2=`focusin${ld}`,F2=`keydown.tab${ld}`,B2="Tab",V2="forward",hy="backward",W2={autofocus:!0,trapElement:null},z2={autofocus:"boolean",trapElement:"element"};class fy extends U{constructor(_){super(),this._config=this._getConfig(_),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return W2}static get DefaultType(){return z2}static get NAME(){return O2}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),z.off(document,ld),z.on(document,N2,_=>this._handleFocusin(_)),z.on(document,F2,_=>this._handleKeydown(_)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,z.off(document,ld))}_handleFocusin(_){const{trapElement:M}=this._config;if(_.target===document||_.target===M||M.contains(_.target))return;const q=Q.focusableChildren(M);q.length===0?M.focus():this._lastTabNavDirection===hy?q[q.length-1].focus():q[0].focus()}_handleKeydown(_){_.key===B2&&(this._lastTabNavDirection=_.shiftKey?hy:V2)}}const gy=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",py=".sticky-top",cd="padding-right",my="margin-right";class lg{constructor(){this._element=document.body}getWidth(){const _=document.documentElement.clientWidth;return Math.abs(window.innerWidth-_)}hide(){const _=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,cd,M=>M+_),this._setElementAttributes(gy,cd,M=>M+_),this._setElementAttributes(py,my,M=>M-_)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,cd),this._resetElementAttributes(gy,cd),this._resetElementAttributes(py,my)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(_,M,q){const ye=this.getWidth(),Oe=$e=>{if($e!==this._element&&window.innerWidth>$e.clientWidth+ye)return;this._saveInitialAttribute($e,M);const rt=window.getComputedStyle($e).getPropertyValue(M);$e.style.setProperty(M,`${q(Number.parseFloat(rt))}px`)};this._applyManipulationCallback(_,Oe)}_saveInitialAttribute(_,M){const q=_.style.getPropertyValue(M);q&&K.setDataAttribute(_,M,q)}_resetElementAttributes(_,M){const q=ye=>{const Oe=K.getDataAttribute(ye,M);if(Oe===null){ye.style.removeProperty(M);return}K.removeDataAttribute(ye,M),ye.style.setProperty(M,Oe)};this._applyManipulationCallback(_,q)}_applyManipulationCallback(_,M){if(m(_)){M(_);return}for(const q of Q.find(_,this._element))M(q)}}const Y2="modal",Oi=".bs.modal",H2=".data-api",j2="Escape",K2=`hide${Oi}`,U2=`hidePrevented${Oi}`,_y=`hidden${Oi}`,vy=`show${Oi}`,G2=`shown${Oi}`,X2=`resize${Oi}`,q2=`click.dismiss${Oi}`,Z2=`mousedown.dismiss${Oi}`,J2=`keydown.dismiss${Oi}`,Q2=`click${Oi}${H2}`,yy="modal-open",eP="fade",by="show",cg="modal-static",tP=".modal.show",nP=".modal-dialog",iP=".modal-body",sP='[data-bs-toggle="modal"]',rP={backdrop:!0,focus:!0,keyboard:!0},oP={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ao extends j{constructor(_,M){super(_,M),this._dialog=Q.findOne(nP,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new lg,this._addEventListeners()}static get Default(){return rP}static get DefaultType(){return oP}static get NAME(){return Y2}toggle(_){return this._isShown?this.hide():this.show(_)}show(_){this._isShown||this._isTransitioning||z.trigger(this._element,vy,{relatedTarget:_}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(yy),this._adjustDialog(),this._backdrop.show(()=>this._showElement(_)))}hide(){!this._isShown||this._isTransitioning||z.trigger(this._element,K2).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(by),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){z.off(window,Oi),z.off(this._dialog,Oi),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new dy({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new fy({trapElement:this._element})}_showElement(_){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 M=Q.findOne(iP,this._dialog);M&&(M.scrollTop=0),b(this._element),this._element.classList.add(by);const q=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,z.trigger(this._element,G2,{relatedTarget:_})};this._queueCallback(q,this._dialog,this._isAnimated())}_addEventListeners(){z.on(this._element,J2,_=>{if(_.key===j2){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),z.on(window,X2,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),z.on(this._element,Z2,_=>{z.one(this._element,q2,M=>{if(!(this._element!==_.target||this._element!==M.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(yy),this._resetAdjustments(),this._scrollBar.reset(),z.trigger(this._element,_y)})}_isAnimated(){return this._element.classList.contains(eP)}_triggerBackdropTransition(){if(z.trigger(this._element,U2).defaultPrevented)return;const M=this._element.scrollHeight>document.documentElement.clientHeight,q=this._element.style.overflowY;q==="hidden"||this._element.classList.contains(cg)||(M||(this._element.style.overflowY="hidden"),this._element.classList.add(cg),this._queueCallback(()=>{this._element.classList.remove(cg),this._queueCallback(()=>{this._element.style.overflowY=q},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const _=this._element.scrollHeight>document.documentElement.clientHeight,M=this._scrollBar.getWidth(),q=M>0;if(q&&!_){const ye=A()?"paddingLeft":"paddingRight";this._element.style[ye]=`${M}px`}if(!q&&_){const ye=A()?"paddingRight":"paddingLeft";this._element.style[ye]=`${M}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(_,M){return this.each(function(){const q=Ao.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof q[_]>"u")throw new TypeError(`No method named "${_}"`);q[_](M)}})}}z.on(document,Q2,sP,function(G){const _=Q.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&G.preventDefault(),z.one(_,vy,ye=>{ye.defaultPrevented||z.one(_,_y,()=>{y(this)&&this.focus()})});const M=Q.findOne(tP);M&&Ao.getInstance(M).hide(),Ao.getOrCreateInstance(_).toggle(this)}),ge(Ao),I(Ao);const aP="offcanvas",Ys=".bs.offcanvas",wy=".data-api",lP=`load${Ys}${wy}`,cP="Escape",xy="show",Ey="showing",Cy="hiding",uP="offcanvas-backdrop",Sy=".offcanvas.show",dP=`show${Ys}`,hP=`shown${Ys}`,fP=`hide${Ys}`,ky=`hidePrevented${Ys}`,Ty=`hidden${Ys}`,gP=`resize${Ys}`,pP=`click${Ys}${wy}`,mP=`keydown.dismiss${Ys}`,_P='[data-bs-toggle="offcanvas"]',vP={backdrop:!0,keyboard:!0,scroll:!1},yP={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Hs extends j{constructor(_,M){super(_,M),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return vP}static get DefaultType(){return yP}static get NAME(){return aP}toggle(_){return this._isShown?this.hide():this.show(_)}show(_){if(this._isShown||z.trigger(this._element,dP,{relatedTarget:_}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new lg().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Ey);const q=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(xy),this._element.classList.remove(Ey),z.trigger(this._element,hP,{relatedTarget:_})};this._queueCallback(q,this._element,!0)}hide(){if(!this._isShown||z.trigger(this._element,fP).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Cy),this._backdrop.hide();const M=()=>{this._element.classList.remove(xy,Cy),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new lg().reset(),z.trigger(this._element,Ty)};this._queueCallback(M,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const _=()=>{if(this._config.backdrop==="static"){z.trigger(this._element,ky);return}this.hide()},M=!!this._config.backdrop;return new dy({className:uP,isVisible:M,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:M?_:null})}_initializeFocusTrap(){return new fy({trapElement:this._element})}_addEventListeners(){z.on(this._element,mP,_=>{if(_.key===cP){if(this._config.keyboard){this.hide();return}z.trigger(this._element,ky)}})}static jQueryInterface(_){return this.each(function(){const M=Hs.getOrCreateInstance(this,_);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_](this)}})}}z.on(document,pP,_P,function(G){const _=Q.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&G.preventDefault(),x(this))return;z.one(_,Ty,()=>{y(this)&&this.focus()});const M=Q.findOne(Sy);M&&M!==_&&Hs.getInstance(M).hide(),Hs.getOrCreateInstance(_).toggle(this)}),z.on(window,lP,()=>{for(const G of Q.find(Sy))Hs.getOrCreateInstance(G).show()}),z.on(window,gP,()=>{for(const G of Q.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(G).position!=="fixed"&&Hs.getOrCreateInstance(G).hide()}),ge(Hs),I(Hs);const Ay={"*":["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:[]},bP=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),wP=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,xP=(G,_)=>{const M=G.nodeName.toLowerCase();return _.includes(M)?bP.has(M)?!!wP.test(G.nodeValue):!0:_.filter(q=>q instanceof RegExp).some(q=>q.test(M))};function EP(G,_,M){if(!G.length)return G;if(M&&typeof M=="function")return M(G);const ye=new window.DOMParser().parseFromString(G,"text/html"),Oe=[].concat(...ye.body.querySelectorAll("*"));for(const $e of Oe){const rt=$e.nodeName.toLowerCase();if(!Object.keys(_).includes(rt)){$e.remove();continue}const di=[].concat(...$e.attributes),Ni=[].concat(_["*"]||[],_[rt]||[]);for(const kn of di)xP(kn,Ni)||$e.removeAttribute(kn.nodeName)}return ye.body.innerHTML}const CP="TemplateFactory",SP={allowList:Ay,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},kP={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},TP={entry:"(string|element|function|null)",selector:"(string|element)"};class AP extends U{constructor(_){super(),this._config=this._getConfig(_)}static get Default(){return SP}static get DefaultType(){return kP}static get NAME(){return CP}getContent(){return Object.values(this._config.content).map(_=>this._resolvePossibleFunction(_)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(_){return this._checkContent(_),this._config.content={...this._config.content,..._},this}toHtml(){const _=document.createElement("div");_.innerHTML=this._maybeSanitize(this._config.template);for(const[ye,Oe]of Object.entries(this._config.content))this._setContent(_,Oe,ye);const M=_.children[0],q=this._resolvePossibleFunction(this._config.extraClass);return q&&M.classList.add(...q.split(" ")),M}_typeCheckConfig(_){super._typeCheckConfig(_),this._checkContent(_.content)}_checkContent(_){for(const[M,q]of Object.entries(_))super._typeCheckConfig({selector:M,entry:q},TP)}_setContent(_,M,q){const ye=Q.findOne(q,_);if(ye){if(M=this._resolvePossibleFunction(M),!M){ye.remove();return}if(m(M)){this._putElementInTemplate(v(M),ye);return}if(this._config.html){ye.innerHTML=this._maybeSanitize(M);return}ye.textContent=M}}_maybeSanitize(_){return this._config.sanitize?EP(_,this._config.allowList,this._config.sanitizeFn):_}_resolvePossibleFunction(_){return V(_,[this])}_putElementInTemplate(_,M){if(this._config.html){M.innerHTML="",M.append(_);return}M.textContent=_.textContent}}const PP="tooltip",MP=new Set(["sanitize","allowList","sanitizeFn"]),ug="fade",IP="modal",ud="show",DP=".tooltip-inner",Py=`.${IP}`,My="hide.bs.modal",nc="hover",dg="focus",RP="click",$P="manual",LP="hide",OP="hidden",NP="show",FP="shown",BP="inserted",VP="click",WP="focusin",zP="focusout",YP="mouseenter",HP="mouseleave",jP={AUTO:"auto",TOP:"top",RIGHT:A()?"left":"right",BOTTOM:"bottom",LEFT:A()?"right":"left"},KP={allowList:Ay,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"},UP={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 Po extends j{constructor(_,M){if(typeof s>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(_,M),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 KP}static get DefaultType(){return UP}static get NAME(){return PP}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),z.off(this._element.closest(Py),My,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 _=z.trigger(this._element,this.constructor.eventName(NP)),q=(E(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(_.defaultPrevented||!q)return;this._disposePopper();const ye=this._getTipElement();this._element.setAttribute("aria-describedby",ye.getAttribute("id"));const{container:Oe}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(Oe.append(ye),z.trigger(this._element,this.constructor.eventName(BP))),this._popper=this._createPopper(ye),ye.classList.add(ud),"ontouchstart"in document.documentElement)for(const rt of[].concat(...document.body.children))z.on(rt,"mouseover",w);const $e=()=>{z.trigger(this._element,this.constructor.eventName(FP)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback($e,this.tip,this._isAnimated())}hide(){if(!this._isShown()||z.trigger(this._element,this.constructor.eventName(LP)).defaultPrevented)return;if(this._getTipElement().classList.remove(ud),"ontouchstart"in document.documentElement)for(const ye of[].concat(...document.body.children))z.off(ye,"mouseover",w);this._activeTrigger[RP]=!1,this._activeTrigger[dg]=!1,this._activeTrigger[nc]=!1,this._isHovered=null;const q=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),z.trigger(this._element,this.constructor.eventName(OP)))};this._queueCallback(q,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(_){const M=this._getTemplateFactory(_).toHtml();if(!M)return null;M.classList.remove(ug,ud),M.classList.add(`bs-${this.constructor.NAME}-auto`);const q=f(this.constructor.NAME).toString();return M.setAttribute("id",q),this._isAnimated()&&M.classList.add(ug),M}setContent(_){this._newContent=_,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(_){return this._templateFactory?this._templateFactory.changeContent(_):this._templateFactory=new AP({...this._config,content:_,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[DP]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(_){return this.constructor.getOrCreateInstance(_.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ug)}_isShown(){return this.tip&&this.tip.classList.contains(ud)}_createPopper(_){const M=V(this._config.placement,[this,_,this._element]),q=jP[M.toUpperCase()];return s.createPopper(this._element,_,this._getPopperConfig(q))}_getOffset(){const{offset:_}=this._config;return typeof _=="string"?_.split(",").map(M=>Number.parseInt(M,10)):typeof _=="function"?M=>_(M,this._element):_}_resolvePossibleFunction(_){return V(_,[this._element])}_getPopperConfig(_){const M={placement:_,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:q=>{this._getTipElement().setAttribute("data-popper-placement",q.state.placement)}}]};return{...M,...V(this._config.popperConfig,[M])}}_setListeners(){const _=this._config.trigger.split(" ");for(const M of _)if(M==="click")z.on(this._element,this.constructor.eventName(VP),this._config.selector,q=>{this._initializeOnDelegatedTarget(q).toggle()});else if(M!==$P){const q=M===nc?this.constructor.eventName(YP):this.constructor.eventName(WP),ye=M===nc?this.constructor.eventName(HP):this.constructor.eventName(zP);z.on(this._element,q,this._config.selector,Oe=>{const $e=this._initializeOnDelegatedTarget(Oe);$e._activeTrigger[Oe.type==="focusin"?dg:nc]=!0,$e._enter()}),z.on(this._element,ye,this._config.selector,Oe=>{const $e=this._initializeOnDelegatedTarget(Oe);$e._activeTrigger[Oe.type==="focusout"?dg:nc]=$e._element.contains(Oe.relatedTarget),$e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},z.on(this._element.closest(Py),My,this._hideModalHandler)}_fixTitle(){const _=this._element.getAttribute("title");_&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",_),this._element.setAttribute("data-bs-original-title",_),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(_,M){clearTimeout(this._timeout),this._timeout=setTimeout(_,M)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(_){const M=K.getDataAttributes(this._element);for(const q of Object.keys(M))MP.has(q)&&delete M[q];return _={...M,...typeof _=="object"&&_?_:{}},_=this._mergeConfigObj(_),_=this._configAfterMerge(_),this._typeCheckConfig(_),_}_configAfterMerge(_){return _.container=_.container===!1?document.body:v(_.container),typeof _.delay=="number"&&(_.delay={show:_.delay,hide:_.delay}),typeof _.title=="number"&&(_.title=_.title.toString()),typeof _.content=="number"&&(_.content=_.content.toString()),_}_getDelegateConfig(){const _={};for(const[M,q]of Object.entries(this._config))this.constructor.Default[M]!==q&&(_[M]=q);return _.selector=!1,_.trigger="manual",_}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(_){return this.each(function(){const M=Po.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_]()}})}}I(Po);const GP="popover",XP=".popover-header",qP=".popover-body",ZP={...Po.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},JP={...Po.DefaultType,content:"(null|string|element|function)"};class dd extends Po{static get Default(){return ZP}static get DefaultType(){return JP}static get NAME(){return GP}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[XP]:this._getTitle(),[qP]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(_){return this.each(function(){const M=dd.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_]()}})}}I(dd);const QP="scrollspy",hg=".bs.scrollspy",eM=".data-api",tM=`activate${hg}`,Iy=`click${hg}`,nM=`load${hg}${eM}`,iM="dropdown-item",Ma="active",sM='[data-bs-spy="scroll"]',fg="[href]",rM=".nav, .list-group",Dy=".nav-link",oM=`${Dy}, .nav-item > ${Dy}, .list-group-item`,aM=".dropdown",lM=".dropdown-toggle",cM={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},uM={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ic extends j{constructor(_,M){super(_,M),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 cM}static get DefaultType(){return uM}static get NAME(){return QP}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const _ of this._observableSections.values())this._observer.observe(_)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(_){return _.target=v(_.target)||document.body,_.rootMargin=_.offset?`${_.offset}px 0px -30%`:_.rootMargin,typeof _.threshold=="string"&&(_.threshold=_.threshold.split(",").map(M=>Number.parseFloat(M))),_}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(z.off(this._config.target,Iy),z.on(this._config.target,Iy,fg,_=>{const M=this._observableSections.get(_.target.hash);if(M){_.preventDefault();const q=this._rootElement||window,ye=M.offsetTop-this._element.offsetTop;if(q.scrollTo){q.scrollTo({top:ye,behavior:"smooth"});return}q.scrollTop=ye}}))}_getNewObserver(){const _={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(M=>this._observerCallback(M),_)}_observerCallback(_){const M=$e=>this._targetLinks.get(`#${$e.target.id}`),q=$e=>{this._previousScrollData.visibleEntryTop=$e.target.offsetTop,this._process(M($e))},ye=(this._rootElement||document.documentElement).scrollTop,Oe=ye>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=ye;for(const $e of _){if(!$e.isIntersecting){this._activeTarget=null,this._clearActiveClass(M($e));continue}const rt=$e.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(Oe&&rt){if(q($e),!ye)return;continue}!Oe&&!rt&&q($e)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const _=Q.find(fg,this._config.target);for(const M of _){if(!M.hash||x(M))continue;const q=Q.findOne(decodeURI(M.hash),this._element);y(q)&&(this._targetLinks.set(decodeURI(M.hash),M),this._observableSections.set(M.hash,q))}}_process(_){this._activeTarget!==_&&(this._clearActiveClass(this._config.target),this._activeTarget=_,_.classList.add(Ma),this._activateParents(_),z.trigger(this._element,tM,{relatedTarget:_}))}_activateParents(_){if(_.classList.contains(iM)){Q.findOne(lM,_.closest(aM)).classList.add(Ma);return}for(const M of Q.parents(_,rM))for(const q of Q.prev(M,oM))q.classList.add(Ma)}_clearActiveClass(_){_.classList.remove(Ma);const M=Q.find(`${fg}.${Ma}`,_);for(const q of M)q.classList.remove(Ma)}static jQueryInterface(_){return this.each(function(){const M=ic.getOrCreateInstance(this,_);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_]()}})}}z.on(window,nM,()=>{for(const G of Q.find(sM))ic.getOrCreateInstance(G)}),I(ic);const dM="tab",Mo=".bs.tab",hM=`hide${Mo}`,fM=`hidden${Mo}`,gM=`show${Mo}`,pM=`shown${Mo}`,mM=`click${Mo}`,_M=`keydown${Mo}`,vM=`load${Mo}`,yM="ArrowLeft",Ry="ArrowRight",bM="ArrowUp",$y="ArrowDown",gg="Home",Ly="End",Io="active",Oy="fade",pg="show",wM="dropdown",Ny=".dropdown-toggle",xM=".dropdown-menu",mg=`:not(${Ny})`,EM='.list-group, .nav, [role="tablist"]',CM=".nav-item, .list-group-item",SM=`.nav-link${mg}, .list-group-item${mg}, [role="tab"]${mg}`,Fy='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',_g=`${SM}, ${Fy}`,kM=`.${Io}[data-bs-toggle="tab"], .${Io}[data-bs-toggle="pill"], .${Io}[data-bs-toggle="list"]`;class Do extends j{constructor(_){super(_),this._parent=this._element.closest(EM),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),z.on(this._element,_M,M=>this._keydown(M)))}static get NAME(){return dM}show(){const _=this._element;if(this._elemIsActive(_))return;const M=this._getActiveElem(),q=M?z.trigger(M,hM,{relatedTarget:_}):null;z.trigger(_,gM,{relatedTarget:M}).defaultPrevented||q&&q.defaultPrevented||(this._deactivate(M,_),this._activate(_,M))}_activate(_,M){if(!_)return;_.classList.add(Io),this._activate(Q.getElementFromSelector(_));const q=()=>{if(_.getAttribute("role")!=="tab"){_.classList.add(pg);return}_.removeAttribute("tabindex"),_.setAttribute("aria-selected",!0),this._toggleDropDown(_,!0),z.trigger(_,pM,{relatedTarget:M})};this._queueCallback(q,_,_.classList.contains(Oy))}_deactivate(_,M){if(!_)return;_.classList.remove(Io),_.blur(),this._deactivate(Q.getElementFromSelector(_));const q=()=>{if(_.getAttribute("role")!=="tab"){_.classList.remove(pg);return}_.setAttribute("aria-selected",!1),_.setAttribute("tabindex","-1"),this._toggleDropDown(_,!1),z.trigger(_,fM,{relatedTarget:M})};this._queueCallback(q,_,_.classList.contains(Oy))}_keydown(_){if(![yM,Ry,bM,$y,gg,Ly].includes(_.key))return;_.stopPropagation(),_.preventDefault();const M=this._getChildren().filter(ye=>!x(ye));let q;if([gg,Ly].includes(_.key))q=M[_.key===gg?0:M.length-1];else{const ye=[Ry,$y].includes(_.key);q=ne(M,_.target,ye,!0)}q&&(q.focus({preventScroll:!0}),Do.getOrCreateInstance(q).show())}_getChildren(){return Q.find(_g,this._parent)}_getActiveElem(){return this._getChildren().find(_=>this._elemIsActive(_))||null}_setInitialAttributes(_,M){this._setAttributeIfNotExists(_,"role","tablist");for(const q of M)this._setInitialAttributesOnChild(q)}_setInitialAttributesOnChild(_){_=this._getInnerElement(_);const M=this._elemIsActive(_),q=this._getOuterElement(_);_.setAttribute("aria-selected",M),q!==_&&this._setAttributeIfNotExists(q,"role","presentation"),M||_.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(_,"role","tab"),this._setInitialAttributesOnTargetPanel(_)}_setInitialAttributesOnTargetPanel(_){const M=Q.getElementFromSelector(_);M&&(this._setAttributeIfNotExists(M,"role","tabpanel"),_.id&&this._setAttributeIfNotExists(M,"aria-labelledby",`${_.id}`))}_toggleDropDown(_,M){const q=this._getOuterElement(_);if(!q.classList.contains(wM))return;const ye=(Oe,$e)=>{const rt=Q.findOne(Oe,q);rt&&rt.classList.toggle($e,M)};ye(Ny,Io),ye(xM,pg),q.setAttribute("aria-expanded",M)}_setAttributeIfNotExists(_,M,q){_.hasAttribute(M)||_.setAttribute(M,q)}_elemIsActive(_){return _.classList.contains(Io)}_getInnerElement(_){return _.matches(_g)?_:Q.findOne(_g,_)}_getOuterElement(_){return _.closest(CM)||_}static jQueryInterface(_){return this.each(function(){const M=Do.getOrCreateInstance(this);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_]()}})}}z.on(document,mM,Fy,function(G){["A","AREA"].includes(this.tagName)&&G.preventDefault(),!x(this)&&Do.getOrCreateInstance(this).show()}),z.on(window,vM,()=>{for(const G of Q.find(kM))Do.getOrCreateInstance(G)}),I(Do);const TM="toast",Sr=".bs.toast",AM=`mouseover${Sr}`,PM=`mouseout${Sr}`,MM=`focusin${Sr}`,IM=`focusout${Sr}`,DM=`hide${Sr}`,RM=`hidden${Sr}`,$M=`show${Sr}`,LM=`shown${Sr}`,OM="fade",By="hide",hd="show",fd="showing",NM={animation:"boolean",autohide:"boolean",delay:"number"},FM={animation:!0,autohide:!0,delay:5e3};class sc extends j{constructor(_,M){super(_,M),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return FM}static get DefaultType(){return NM}static get NAME(){return TM}show(){if(z.trigger(this._element,$M).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(OM);const M=()=>{this._element.classList.remove(fd),z.trigger(this._element,LM),this._maybeScheduleHide()};this._element.classList.remove(By),b(this._element),this._element.classList.add(hd,fd),this._queueCallback(M,this._element,this._config.animation)}hide(){if(!this.isShown()||z.trigger(this._element,DM).defaultPrevented)return;const M=()=>{this._element.classList.add(By),this._element.classList.remove(fd,hd),z.trigger(this._element,RM)};this._element.classList.add(fd),this._queueCallback(M,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(hd),super.dispose()}isShown(){return this._element.classList.contains(hd)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(_,M){switch(_.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=M;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=M;break}}if(M){this._clearTimeout();return}const q=_.relatedTarget;this._element===q||this._element.contains(q)||this._maybeScheduleHide()}_setListeners(){z.on(this._element,AM,_=>this._onInteraction(_,!0)),z.on(this._element,PM,_=>this._onInteraction(_,!1)),z.on(this._element,MM,_=>this._onInteraction(_,!0)),z.on(this._element,IM,_=>this._onInteraction(_,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(_){return this.each(function(){const M=sc.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_](this)}})}}return ge(sc),I(sc),{Alert:et,Button:ae,Carousel:ka,Collapse:Aa,Dropdown:Ji,Modal:Ao,Offcanvas:Hs,Popover:dd,ScrollSpy:ic,Tab:Do,Toast:sc,Tooltip:Po}})})(zM);/** + */(function(e,t){(function(n,s){e.exports=s(lm)})(_g,function(n){function s(m){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const u in m)if(u!=="default"){const v=Object.getOwnPropertyDescriptor(m,u);Object.defineProperty(i,u,v.get?v:{enumerable:!0,get:()=>m[u]})}}return i.default=m,Object.freeze(i)}const r=s(n),o=new Map,a={set(m,i,u){o.has(m)||o.set(m,new Map);const v=o.get(m);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(m,i){return o.has(m)&&o.get(m).get(i)||null},remove(m,i){if(!o.has(m))return;const u=o.get(m);u.delete(i),u.size===0&&o.delete(m)}},l=1e6,c=1e3,h="transitionend",f=m=>(m&&window.CSS&&window.CSS.escape&&(m=m.replace(/#([^\s"#']+)/g,(i,u)=>`#${CSS.escape(u)}`)),m),d=m=>m==null?`${m}`:Object.prototype.toString.call(m).match(/\s([a-z]+)/i)[1].toLowerCase(),p=m=>{do m+=Math.floor(Math.random()*l);while(document.getElementById(m));return m},E=m=>{if(!m)return 0;let{transitionDuration:i,transitionDelay:u}=window.getComputedStyle(m);const v=Number.parseFloat(i),x=Number.parseFloat(u);return!v&&!x?0:(i=i.split(",")[0],u=u.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(u))*c)},A=m=>{m.dispatchEvent(new Event(h))},C=m=>!m||typeof m!="object"?!1:(typeof m.jquery<"u"&&(m=m[0]),typeof m.nodeType<"u"),k=m=>C(m)?m.jquery?m[0]:m:typeof m=="string"&&m.length>0?document.querySelector(f(m)):null,I=m=>{if(!C(m)||m.getClientRects().length===0)return!1;const i=getComputedStyle(m).getPropertyValue("visibility")==="visible",u=m.closest("details:not([open])");if(!u)return i;if(u!==m){const v=m.closest("summary");if(v&&v.parentNode!==u||v===null)return!1}return i},R=m=>!m||m.nodeType!==Node.ELEMENT_NODE||m.classList.contains("disabled")?!0:typeof m.disabled<"u"?m.disabled:m.hasAttribute("disabled")&&m.getAttribute("disabled")!=="false",F=m=>{if(!document.documentElement.attachShadow)return null;if(typeof m.getRootNode=="function"){const i=m.getRootNode();return i instanceof ShadowRoot?i:null}return m instanceof ShadowRoot?m:m.parentNode?F(m.parentNode):null},$=()=>{},O=m=>{m.offsetHeight},V=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Y=[],K=m=>{document.readyState==="loading"?(Y.length||document.addEventListener("DOMContentLoaded",()=>{for(const i of Y)i()}),Y.push(m)):m()},w=()=>document.documentElement.dir==="rtl",P=m=>{K(()=>{const i=V();if(i){const u=m.NAME,v=i.fn[u];i.fn[u]=m.jQueryInterface,i.fn[u].Constructor=m,i.fn[u].noConflict=()=>(i.fn[u]=v,m.jQueryInterface)}})},z=(m,i=[],u=m)=>typeof m=="function"?m(...i):u,H=(m,i,u=!0)=>{if(!u){z(m);return}const x=E(i)+5;let W=!1;const j=({target:ae})=>{ae===i&&(W=!0,i.removeEventListener(h,j),z(m))};i.addEventListener(h,j),setTimeout(()=>{W||A(i)},x)},Q=(m,i,u,v)=>{const x=m.length;let W=m.indexOf(i);return W===-1?!u&&v?m[x-1]:m[0]:(W+=u?1:-1,v&&(W=(W+x)%x),m[Math.max(0,Math.min(W,x-1))])},ce=/[^.]*(?=\..*)\.|.*/,me=/\..*/,re=/::\d+$/,Z={};let le=1;const Ce={mouseenter:"mouseover",mouseleave:"mouseout"},He=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 De(m,i){return i&&`${i}::${le++}`||m.uidEvent||le++}function ye(m){const i=De(m);return m.uidEvent=i,Z[i]=Z[i]||{},Z[i]}function et(m,i){return function u(v){return pe(v,{delegateTarget:m}),u.oneOff&&T.off(m,v.type,i),i.apply(m,[v])}}function Be(m,i,u){return function v(x){const W=m.querySelectorAll(i);for(let{target:j}=x;j&&j!==this;j=j.parentNode)for(const ae of W)if(ae===j)return pe(x,{delegateTarget:j}),v.oneOff&&T.off(m,x.type,i,u),u.apply(j,[x])}}function Pe(m,i,u=null){return Object.values(m).find(v=>v.callable===i&&v.delegationSelector===u)}function Te(m,i,u){const v=typeof i=="string",x=v?u:i||u;let W=J(m);return He.has(W)||(W=m),[v,x,W]}function N(m,i,u,v,x){if(typeof i!="string"||!m)return;let[W,j,ae]=Te(i,u,v);i in Ce&&(j=(mg=>function(Hn){if(!Hn.relatedTarget||Hn.relatedTarget!==Hn.delegateTarget&&!Hn.delegateTarget.contains(Hn.relatedTarget))return mg.call(this,Hn)})(j));const Xe=ye(m),at=Xe[ae]||(Xe[ae]={}),Ne=Pe(at,j,W?u:null);if(Ne){Ne.oneOff=Ne.oneOff&&x;return}const yt=De(j,i.replace(ce,"")),gt=W?Be(m,u,j):et(m,j);gt.delegationSelector=W?u:null,gt.callable=j,gt.oneOff=x,gt.uidEvent=yt,at[yt]=gt,m.addEventListener(ae,gt,W)}function G(m,i,u,v,x){const W=Pe(i[u],v,x);W&&(m.removeEventListener(u,W,!!x),delete i[u][W.uidEvent])}function q(m,i,u,v){const x=i[u]||{};for(const[W,j]of Object.entries(x))W.includes(v)&&G(m,i,u,j.callable,j.delegationSelector)}function J(m){return m=m.replace(me,""),Ce[m]||m}const T={on(m,i,u,v){N(m,i,u,v,!1)},one(m,i,u,v){N(m,i,u,v,!0)},off(m,i,u,v){if(typeof i!="string"||!m)return;const[x,W,j]=Te(i,u,v),ae=j!==i,Xe=ye(m),at=Xe[j]||{},Ne=i.startsWith(".");if(typeof W<"u"){if(!Object.keys(at).length)return;G(m,Xe,j,W,x?u:null);return}if(Ne)for(const yt of Object.keys(Xe))q(m,Xe,yt,i.slice(1));for(const[yt,gt]of Object.entries(at)){const ar=yt.replace(re,"");(!ae||i.includes(ar))&&G(m,Xe,j,gt.callable,gt.delegationSelector)}},trigger(m,i,u){if(typeof i!="string"||!m)return null;const v=V(),x=J(i),W=i!==x;let j=null,ae=!0,Xe=!0,at=!1;W&&v&&(j=v.Event(i,u),v(m).trigger(j),ae=!j.isPropagationStopped(),Xe=!j.isImmediatePropagationStopped(),at=j.isDefaultPrevented());const Ne=pe(new Event(i,{bubbles:ae,cancelable:!0}),u);return at&&Ne.preventDefault(),Xe&&m.dispatchEvent(Ne),Ne.defaultPrevented&&j&&j.preventDefault(),Ne}};function pe(m,i={}){for(const[u,v]of Object.entries(i))try{m[u]=v}catch{Object.defineProperty(m,u,{configurable:!0,get(){return v}})}return m}function g(m){if(m==="true")return!0;if(m==="false")return!1;if(m===Number(m).toString())return Number(m);if(m===""||m==="null")return null;if(typeof m!="string")return m;try{return JSON.parse(decodeURIComponent(m))}catch{return m}}function _(m){return m.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}const b={setDataAttribute(m,i,u){m.setAttribute(`data-bs-${_(i)}`,u)},removeDataAttribute(m,i){m.removeAttribute(`data-bs-${_(i)}`)},getDataAttributes(m){if(!m)return{};const i={},u=Object.keys(m.dataset).filter(v=>v.startsWith("bs")&&!v.startsWith("bsConfig"));for(const v of u){let x=v.replace(/^bs/,"");x=x.charAt(0).toLowerCase()+x.slice(1,x.length),i[x]=g(m.dataset[v])}return i},getDataAttribute(m,i){return g(m.getAttribute(`data-bs-${_(i)}`))}};class L{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=C(u)?b.getDataAttribute(u,"config"):{};return{...this.constructor.Default,...typeof v=="object"?v:{},...C(u)?b.getDataAttributes(u):{},...typeof i=="object"?i:{}}}_typeCheckConfig(i,u=this.constructor.DefaultType){for(const[v,x]of Object.entries(u)){const W=i[v],j=C(W)?"element":d(W);if(!new RegExp(x).test(j))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${v}" provided type "${j}" but expected type "${x}".`)}}}const S="5.3.3";class D extends L{constructor(i,u){super(),i=k(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),T.off(this._element,this.constructor.EVENT_KEY);for(const i of Object.getOwnPropertyNames(this))this[i]=null}_queueCallback(i,u,v=!0){H(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(k(i),this.DATA_KEY)}static getOrCreateInstance(i,u={}){return this.getInstance(i)||new this(i,typeof u=="object"?u:null)}static get VERSION(){return S}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 U=m=>{let i=m.getAttribute("data-bs-target");if(!i||i==="#"){let u=m.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},y={find(m,i=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(i,m))},findOne(m,i=document.documentElement){return Element.prototype.querySelector.call(i,m)},children(m,i){return[].concat(...m.children).filter(u=>u.matches(i))},parents(m,i){const u=[];let v=m.parentNode.closest(i);for(;v;)u.push(v),v=v.parentNode.closest(i);return u},prev(m,i){let u=m.previousElementSibling;for(;u;){if(u.matches(i))return[u];u=u.previousElementSibling}return[]},next(m,i){let u=m.nextElementSibling;for(;u;){if(u.matches(i))return[u];u=u.nextElementSibling}return[]},focusableChildren(m){const i=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(u=>`${u}:not([tabindex^="-"])`).join(",");return this.find(i,m).filter(u=>!R(u)&&I(u))},getSelectorFromElement(m){const i=U(m);return i&&y.findOne(i)?i:null},getElementFromSelector(m){const i=U(m);return i?y.findOne(i):null},getMultipleElementsFromSelector(m){const i=U(m);return i?y.find(i):[]}},B=(m,i="hide")=>{const u=`click.dismiss${m.EVENT_KEY}`,v=m.NAME;T.on(document,u,`[data-bs-dismiss="${v}"]`,function(x){if(["A","AREA"].includes(this.tagName)&&x.preventDefault(),R(this))return;const W=y.getElementFromSelector(this)||this.closest(`.${v}`);m.getOrCreateInstance(W)[i]()})},M="alert",X=".bs.alert",ee=`close${X}`,se=`closed${X}`,oe="fade",de="show";class ue extends D{static get NAME(){return M}close(){if(T.trigger(this._element,ee).defaultPrevented)return;this._element.classList.remove(de);const u=this._element.classList.contains(oe);this._queueCallback(()=>this._destroyElement(),this._element,u)}_destroyElement(){this._element.remove(),T.trigger(this._element,se),this.dispose()}static jQueryInterface(i){return this.each(function(){const u=ue.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)}})}}B(ue,"close"),P(ue);const je="button",tt=".bs.button",We=".data-api",dn="active",ds='[data-bs-toggle="button"]',Ke=`click${tt}${We}`;class Me extends D{static get NAME(){return je}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(dn))}static jQueryInterface(i){return this.each(function(){const u=Me.getOrCreateInstance(this);i==="toggle"&&u[i]()})}}T.on(document,Ke,ds,m=>{m.preventDefault();const i=m.target.closest(ds);Me.getOrCreateInstance(i).toggle()}),P(Me);const zs="swipe",Ln=".bs.swipe",Bf=`touchstart${Ln}`,jf=`touchmove${Ln}`,Wf=`touchend${Ln}`,Kf=`pointerdown${Ln}`,Uf=`pointerup${Ln}`,Yf="touch",Gf="pen",qf="pointer-event",zf=40,Xf={endCallback:null,leftCallback:null,rightCallback:null},Qf={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Xs extends L{constructor(i,u){super(),this._element=i,!(!i||!Xs.isSupported())&&(this._config=this._getConfig(u),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Xf}static get DefaultType(){return Qf}static get NAME(){return zs}dispose(){T.off(this._element,Ln)}_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(),z(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<=zf)return;const u=i/this._deltaX;this._deltaX=0,u&&z(u>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(T.on(this._element,Kf,i=>this._start(i)),T.on(this._element,Uf,i=>this._end(i)),this._element.classList.add(qf)):(T.on(this._element,Bf,i=>this._start(i)),T.on(this._element,jf,i=>this._move(i)),T.on(this._element,Wf,i=>this._end(i)))}_eventIsPointerPenTouch(i){return this._supportPointerEvents&&(i.pointerType===Gf||i.pointerType===Yf)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Jf="carousel",Wt=".bs.carousel",Xo=".data-api",Zf="ArrowLeft",ed="ArrowRight",td=500,hs="next",Rn="prev",In="left",Qs="right",nd=`slide${Wt}`,ci=`slid${Wt}`,sd=`keydown${Wt}`,rd=`mouseenter${Wt}`,id=`mouseleave${Wt}`,od=`dragstart${Wt}`,ad=`load${Wt}${Xo}`,ld=`click${Wt}${Xo}`,Qo="carousel",Js="active",cd="slide",ud="carousel-item-end",fd="carousel-item-start",dd="carousel-item-next",hd="carousel-item-prev",Jo=".active",Zo=".carousel-item",pd=Jo+Zo,gd=".carousel-item img",md=".carousel-indicators",_d="[data-bs-slide], [data-bs-slide-to]",vd='[data-bs-ride="carousel"]',Ed={[Zf]:Qs,[ed]:In},bd={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},yd={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Pn extends D{constructor(i,u){super(i,u),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=y.findOne(md,this._element),this._addEventListeners(),this._config.ride===Qo&&this.cycle()}static get Default(){return bd}static get DefaultType(){return yd}static get NAME(){return Jf}next(){this._slide(hs)}nextWhenVisible(){!document.hidden&&I(this._element)&&this.next()}prev(){this._slide(Rn)}pause(){this._isSliding&&A(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){T.one(this._element,ci,()=>this.cycle());return}this.cycle()}}to(i){const u=this._getItems();if(i>u.length-1||i<0)return;if(this._isSliding){T.one(this._element,ci,()=>this.to(i));return}const v=this._getItemIndex(this._getActive());if(v===i)return;const x=i>v?hs:Rn;this._slide(x,u[i])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(i){return i.defaultInterval=i.interval,i}_addEventListeners(){this._config.keyboard&&T.on(this._element,sd,i=>this._keydown(i)),this._config.pause==="hover"&&(T.on(this._element,rd,()=>this.pause()),T.on(this._element,id,()=>this._maybeEnableCycle())),this._config.touch&&Xs.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const v of y.find(gd,this._element))T.on(v,od,x=>x.preventDefault());const u={leftCallback:()=>this._slide(this._directionToOrder(In)),rightCallback:()=>this._slide(this._directionToOrder(Qs)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),td+this._config.interval))}};this._swipeHelper=new Xs(this._element,u)}_keydown(i){if(/input|textarea/i.test(i.target.tagName))return;const u=Ed[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=y.findOne(Jo,this._indicatorsElement);u.classList.remove(Js),u.removeAttribute("aria-current");const v=y.findOne(`[data-bs-slide-to="${i}"]`,this._indicatorsElement);v&&(v.classList.add(Js),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(),x=i===hs,W=u||Q(this._getItems(),v,x,this._config.wrap);if(W===v)return;const j=this._getItemIndex(W),ae=ar=>T.trigger(this._element,ar,{relatedTarget:W,direction:this._orderToDirection(i),from:this._getItemIndex(v),to:j});if(ae(nd).defaultPrevented||!v||!W)return;const at=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(j),this._activeElement=W;const Ne=x?fd:ud,yt=x?dd:hd;W.classList.add(yt),O(W),v.classList.add(Ne),W.classList.add(Ne);const gt=()=>{W.classList.remove(Ne,yt),W.classList.add(Js),v.classList.remove(Js,yt,Ne),this._isSliding=!1,ae(ci)};this._queueCallback(gt,v,this._isAnimated()),at&&this.cycle()}_isAnimated(){return this._element.classList.contains(cd)}_getActive(){return y.findOne(pd,this._element)}_getItems(){return y.find(Zo,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(i){return w()?i===In?Rn:hs:i===In?hs:Rn}_orderToDirection(i){return w()?i===Rn?In:Qs:i===Rn?Qs:In}static jQueryInterface(i){return this.each(function(){const u=Pn.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]()}})}}T.on(document,ld,_d,function(m){const i=y.getElementFromSelector(this);if(!i||!i.classList.contains(Qo))return;m.preventDefault();const u=Pn.getOrCreateInstance(i),v=this.getAttribute("data-bs-slide-to");if(v){u.to(v),u._maybeEnableCycle();return}if(b.getDataAttribute(this,"slide")==="next"){u.next(),u._maybeEnableCycle();return}u.prev(),u._maybeEnableCycle()}),T.on(window,ad,()=>{const m=y.find(vd);for(const i of m)Pn.getOrCreateInstance(i)}),P(Pn);const Ad="collapse",ps=".bs.collapse",Td=".data-api",Cd=`show${ps}`,wd=`shown${ps}`,Sd=`hide${ps}`,Od=`hidden${ps}`,Nd=`click${ps}${Td}`,ui="show",Mn="collapse",Zs="collapsing",xd="collapsed",$d=`:scope .${Mn} .${Mn}`,Dd="collapse-horizontal",Ld="width",Rd="height",Id=".collapse.show, .collapse.collapsing",fi='[data-bs-toggle="collapse"]',Pd={parent:null,toggle:!0},Md={parent:"(null|element)",toggle:"boolean"};class kn extends D{constructor(i,u){super(i,u),this._isTransitioning=!1,this._triggerArray=[];const v=y.find(fi);for(const x of v){const W=y.getSelectorFromElement(x),j=y.find(W).filter(ae=>ae===this._element);W!==null&&j.length&&this._triggerArray.push(x)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Pd}static get DefaultType(){return Md}static get NAME(){return Ad}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let i=[];if(this._config.parent&&(i=this._getFirstLevelChildren(Id).filter(ae=>ae!==this._element).map(ae=>kn.getOrCreateInstance(ae,{toggle:!1}))),i.length&&i[0]._isTransitioning||T.trigger(this._element,Cd).defaultPrevented)return;for(const ae of i)ae.hide();const v=this._getDimension();this._element.classList.remove(Mn),this._element.classList.add(Zs),this._element.style[v]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const x=()=>{this._isTransitioning=!1,this._element.classList.remove(Zs),this._element.classList.add(Mn,ui),this._element.style[v]="",T.trigger(this._element,wd)},j=`scroll${v[0].toUpperCase()+v.slice(1)}`;this._queueCallback(x,this._element,!0),this._element.style[v]=`${this._element[j]}px`}hide(){if(this._isTransitioning||!this._isShown()||T.trigger(this._element,Sd).defaultPrevented)return;const u=this._getDimension();this._element.style[u]=`${this._element.getBoundingClientRect()[u]}px`,O(this._element),this._element.classList.add(Zs),this._element.classList.remove(Mn,ui);for(const x of this._triggerArray){const W=y.getElementFromSelector(x);W&&!this._isShown(W)&&this._addAriaAndCollapsedClass([x],!1)}this._isTransitioning=!0;const v=()=>{this._isTransitioning=!1,this._element.classList.remove(Zs),this._element.classList.add(Mn),T.trigger(this._element,Od)};this._element.style[u]="",this._queueCallback(v,this._element,!0)}_isShown(i=this._element){return i.classList.contains(ui)}_configAfterMerge(i){return i.toggle=!!i.toggle,i.parent=k(i.parent),i}_getDimension(){return this._element.classList.contains(Dd)?Ld:Rd}_initializeChildren(){if(!this._config.parent)return;const i=this._getFirstLevelChildren(fi);for(const u of i){const v=y.getElementFromSelector(u);v&&this._addAriaAndCollapsedClass([u],this._isShown(v))}}_getFirstLevelChildren(i){const u=y.find($d,this._config.parent);return y.find(i,this._config.parent).filter(v=>!u.includes(v))}_addAriaAndCollapsedClass(i,u){if(i.length)for(const v of i)v.classList.toggle(xd,!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]()}})}}T.on(document,Nd,fi,function(m){(m.target.tagName==="A"||m.delegateTarget&&m.delegateTarget.tagName==="A")&&m.preventDefault();for(const i of y.getMultipleElementsFromSelector(this))kn.getOrCreateInstance(i,{toggle:!1}).toggle()}),P(kn);const ea="dropdown",hn=".bs.dropdown",di=".data-api",kd="Escape",ta="Tab",Vd="ArrowUp",na="ArrowDown",Fd=2,Hd=`hide${hn}`,Bd=`hidden${hn}`,jd=`show${hn}`,Wd=`shown${hn}`,sa=`click${hn}${di}`,ra=`keydown${hn}${di}`,Kd=`keyup${hn}${di}`,Vn="show",Ud="dropup",Yd="dropend",Gd="dropstart",qd="dropup-center",zd="dropdown-center",pn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Xd=`${pn}.${Vn}`,er=".dropdown-menu",Qd=".navbar",Jd=".navbar-nav",Zd=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",eh=w()?"top-end":"top-start",th=w()?"top-start":"top-end",nh=w()?"bottom-end":"bottom-start",sh=w()?"bottom-start":"bottom-end",rh=w()?"left-start":"right-start",ih=w()?"right-start":"left-start",oh="top",ah="bottom",lh={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ch={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class pt extends D{constructor(i,u){super(i,u),this._popper=null,this._parent=this._element.parentNode,this._menu=y.next(this._element,er)[0]||y.prev(this._element,er)[0]||y.findOne(er,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return lh}static get DefaultType(){return ch}static get NAME(){return ea}toggle(){return this._isShown()?this.hide():this.show()}show(){if(R(this._element)||this._isShown())return;const i={relatedTarget:this._element};if(!T.trigger(this._element,jd,i).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Jd))for(const v of[].concat(...document.body.children))T.on(v,"mouseover",$);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Vn),this._element.classList.add(Vn),T.trigger(this._element,Wd,i)}}hide(){if(R(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(!T.trigger(this._element,Hd,i).defaultPrevented){if("ontouchstart"in document.documentElement)for(const v of[].concat(...document.body.children))T.off(v,"mouseover",$);this._popper&&this._popper.destroy(),this._menu.classList.remove(Vn),this._element.classList.remove(Vn),this._element.setAttribute("aria-expanded","false"),b.removeDataAttribute(this._menu,"popper"),T.trigger(this._element,Bd,i)}}_getConfig(i){if(i=super._getConfig(i),typeof i.reference=="object"&&!C(i.reference)&&typeof i.reference.getBoundingClientRect!="function")throw new TypeError(`${ea.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return i}_createPopper(){if(typeof r>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let i=this._element;this._config.reference==="parent"?i=this._parent:C(this._config.reference)?i=k(this._config.reference):typeof this._config.reference=="object"&&(i=this._config.reference);const u=this._getPopperConfig();this._popper=r.createPopper(i,this._menu,u)}_isShown(){return this._menu.classList.contains(Vn)}_getPlacement(){const i=this._parent;if(i.classList.contains(Yd))return rh;if(i.classList.contains(Gd))return ih;if(i.classList.contains(qd))return oh;if(i.classList.contains(zd))return ah;const u=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return i.classList.contains(Ud)?u?th:eh:u?sh:nh}_detectNavbar(){return this._element.closest(Qd)!==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")&&(b.setDataAttribute(this._menu,"popper","static"),i.modifiers=[{name:"applyStyles",enabled:!1}]),{...i,...z(this._config.popperConfig,[i])}}_selectMenuItem({key:i,target:u}){const v=y.find(Zd,this._menu).filter(x=>I(x));v.length&&Q(v,u,i===na,!v.includes(u)).focus()}static jQueryInterface(i){return this.each(function(){const u=pt.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===Fd||i.type==="keyup"&&i.key!==ta)return;const u=y.find(Xd);for(const v of u){const x=pt.getInstance(v);if(!x||x._config.autoClose===!1)continue;const W=i.composedPath(),j=W.includes(x._menu);if(W.includes(x._element)||x._config.autoClose==="inside"&&!j||x._config.autoClose==="outside"&&j||x._menu.contains(i.target)&&(i.type==="keyup"&&i.key===ta||/input|select|option|textarea|form/i.test(i.target.tagName)))continue;const ae={relatedTarget:x._element};i.type==="click"&&(ae.clickEvent=i),x._completeHide(ae)}}static dataApiKeydownHandler(i){const u=/input|textarea/i.test(i.target.tagName),v=i.key===kd,x=[Vd,na].includes(i.key);if(!x&&!v||u&&!v)return;i.preventDefault();const W=this.matches(pn)?this:y.prev(this,pn)[0]||y.next(this,pn)[0]||y.findOne(pn,i.delegateTarget.parentNode),j=pt.getOrCreateInstance(W);if(x){i.stopPropagation(),j.show(),j._selectMenuItem(i);return}j._isShown()&&(i.stopPropagation(),j.hide(),W.focus())}}T.on(document,ra,pn,pt.dataApiKeydownHandler),T.on(document,ra,er,pt.dataApiKeydownHandler),T.on(document,sa,pt.clearMenus),T.on(document,Kd,pt.clearMenus),T.on(document,sa,pn,function(m){m.preventDefault(),pt.getOrCreateInstance(this).toggle()}),P(pt);const ia="backdrop",uh="fade",oa="show",aa=`mousedown.bs.${ia}`,fh={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},dh={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class la extends L{constructor(i){super(),this._config=this._getConfig(i),this._isAppended=!1,this._element=null}static get Default(){return fh}static get DefaultType(){return dh}static get NAME(){return ia}show(i){if(!this._config.isVisible){z(i);return}this._append();const u=this._getElement();this._config.isAnimated&&O(u),u.classList.add(oa),this._emulateAnimation(()=>{z(i)})}hide(i){if(!this._config.isVisible){z(i);return}this._getElement().classList.remove(oa),this._emulateAnimation(()=>{this.dispose(),z(i)})}dispose(){this._isAppended&&(T.off(this._element,aa),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(uh),this._element=i}return this._element}_configAfterMerge(i){return i.rootElement=k(i.rootElement),i}_append(){if(this._isAppended)return;const i=this._getElement();this._config.rootElement.append(i),T.on(i,aa,()=>{z(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(i){H(i,this._getElement(),this._config.isAnimated)}}const hh="focustrap",tr=".bs.focustrap",ph=`focusin${tr}`,gh=`keydown.tab${tr}`,mh="Tab",_h="forward",ca="backward",vh={autofocus:!0,trapElement:null},Eh={autofocus:"boolean",trapElement:"element"};class ua extends L{constructor(i){super(),this._config=this._getConfig(i),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return vh}static get DefaultType(){return Eh}static get NAME(){return hh}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),T.off(document,tr),T.on(document,ph,i=>this._handleFocusin(i)),T.on(document,gh,i=>this._handleKeydown(i)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,T.off(document,tr))}_handleFocusin(i){const{trapElement:u}=this._config;if(i.target===document||i.target===u||u.contains(i.target))return;const v=y.focusableChildren(u);v.length===0?u.focus():this._lastTabNavDirection===ca?v[v.length-1].focus():v[0].focus()}_handleKeydown(i){i.key===mh&&(this._lastTabNavDirection=i.shiftKey?ca:_h)}}const fa=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",da=".sticky-top",nr="padding-right",ha="margin-right";class hi{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,nr,u=>u+i),this._setElementAttributes(fa,nr,u=>u+i),this._setElementAttributes(da,ha,u=>u-i)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,nr),this._resetElementAttributes(fa,nr),this._resetElementAttributes(da,ha)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(i,u,v){const x=this.getWidth(),W=j=>{if(j!==this._element&&window.innerWidth>j.clientWidth+x)return;this._saveInitialAttribute(j,u);const ae=window.getComputedStyle(j).getPropertyValue(u);j.style.setProperty(u,`${v(Number.parseFloat(ae))}px`)};this._applyManipulationCallback(i,W)}_saveInitialAttribute(i,u){const v=i.style.getPropertyValue(u);v&&b.setDataAttribute(i,u,v)}_resetElementAttributes(i,u){const v=x=>{const W=b.getDataAttribute(x,u);if(W===null){x.style.removeProperty(u);return}b.removeDataAttribute(x,u),x.style.setProperty(u,W)};this._applyManipulationCallback(i,v)}_applyManipulationCallback(i,u){if(C(i)){u(i);return}for(const v of y.find(i,this._element))u(v)}}const bh="modal",ot=".bs.modal",yh=".data-api",Ah="Escape",Th=`hide${ot}`,Ch=`hidePrevented${ot}`,pa=`hidden${ot}`,ga=`show${ot}`,wh=`shown${ot}`,Sh=`resize${ot}`,Oh=`click.dismiss${ot}`,Nh=`mousedown.dismiss${ot}`,xh=`keydown.dismiss${ot}`,$h=`click${ot}${yh}`,ma="modal-open",Dh="fade",_a="show",pi="modal-static",Lh=".modal.show",Rh=".modal-dialog",Ih=".modal-body",Ph='[data-bs-toggle="modal"]',Mh={backdrop:!0,focus:!0,keyboard:!0},kh={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class gn extends D{constructor(i,u){super(i,u),this._dialog=y.findOne(Rh,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new hi,this._addEventListeners()}static get Default(){return Mh}static get DefaultType(){return kh}static get NAME(){return bh}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||this._isTransitioning||T.trigger(this._element,ga,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ma),this._adjustDialog(),this._backdrop.show(()=>this._showElement(i)))}hide(){!this._isShown||this._isTransitioning||T.trigger(this._element,Th).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(_a),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){T.off(window,ot),T.off(this._dialog,ot),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new la({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ua({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=y.findOne(Ih,this._dialog);u&&(u.scrollTop=0),O(this._element),this._element.classList.add(_a);const v=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,T.trigger(this._element,wh,{relatedTarget:i})};this._queueCallback(v,this._dialog,this._isAnimated())}_addEventListeners(){T.on(this._element,xh,i=>{if(i.key===Ah){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),T.on(window,Sh,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),T.on(this._element,Nh,i=>{T.one(this._element,Oh,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(ma),this._resetAdjustments(),this._scrollBar.reset(),T.trigger(this._element,pa)})}_isAnimated(){return this._element.classList.contains(Dh)}_triggerBackdropTransition(){if(T.trigger(this._element,Ch).defaultPrevented)return;const u=this._element.scrollHeight>document.documentElement.clientHeight,v=this._element.style.overflowY;v==="hidden"||this._element.classList.contains(pi)||(u||(this._element.style.overflowY="hidden"),this._element.classList.add(pi),this._queueCallback(()=>{this._element.classList.remove(pi),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 x=w()?"paddingLeft":"paddingRight";this._element.style[x]=`${u}px`}if(!v&&i){const x=w()?"paddingRight":"paddingLeft";this._element.style[x]=`${u}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(i,u){return this.each(function(){const v=gn.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof v[i]>"u")throw new TypeError(`No method named "${i}"`);v[i](u)}})}}T.on(document,$h,Ph,function(m){const i=y.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&m.preventDefault(),T.one(i,ga,x=>{x.defaultPrevented||T.one(i,pa,()=>{I(this)&&this.focus()})});const u=y.findOne(Lh);u&&gn.getInstance(u).hide(),gn.getOrCreateInstance(i).toggle(this)}),B(gn),P(gn);const Vh="offcanvas",xt=".bs.offcanvas",va=".data-api",Fh=`load${xt}${va}`,Hh="Escape",Ea="show",ba="showing",ya="hiding",Bh="offcanvas-backdrop",Aa=".offcanvas.show",jh=`show${xt}`,Wh=`shown${xt}`,Kh=`hide${xt}`,Ta=`hidePrevented${xt}`,Ca=`hidden${xt}`,Uh=`resize${xt}`,Yh=`click${xt}${va}`,Gh=`keydown.dismiss${xt}`,qh='[data-bs-toggle="offcanvas"]',zh={backdrop:!0,keyboard:!0,scroll:!1},Xh={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class $t extends D{constructor(i,u){super(i,u),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return zh}static get DefaultType(){return Xh}static get NAME(){return Vh}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){if(this._isShown||T.trigger(this._element,jh,{relatedTarget:i}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new hi().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ba);const v=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Ea),this._element.classList.remove(ba),T.trigger(this._element,Wh,{relatedTarget:i})};this._queueCallback(v,this._element,!0)}hide(){if(!this._isShown||T.trigger(this._element,Kh).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ya),this._backdrop.hide();const u=()=>{this._element.classList.remove(Ea,ya),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new hi().reset(),T.trigger(this._element,Ca)};this._queueCallback(u,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const i=()=>{if(this._config.backdrop==="static"){T.trigger(this._element,Ta);return}this.hide()},u=!!this._config.backdrop;return new la({className:Bh,isVisible:u,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:u?i:null})}_initializeFocusTrap(){return new ua({trapElement:this._element})}_addEventListeners(){T.on(this._element,Gh,i=>{if(i.key===Hh){if(this._config.keyboard){this.hide();return}T.trigger(this._element,Ta)}})}static jQueryInterface(i){return this.each(function(){const u=$t.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)}})}}T.on(document,Yh,qh,function(m){const i=y.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&m.preventDefault(),R(this))return;T.one(i,Ca,()=>{I(this)&&this.focus()});const u=y.findOne(Aa);u&&u!==i&&$t.getInstance(u).hide(),$t.getOrCreateInstance(i).toggle(this)}),T.on(window,Fh,()=>{for(const m of y.find(Aa))$t.getOrCreateInstance(m).show()}),T.on(window,Uh,()=>{for(const m of y.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(m).position!=="fixed"&&$t.getOrCreateInstance(m).hide()}),B($t),P($t);const wa={"*":["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:[]},Qh=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Jh=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Zh=(m,i)=>{const u=m.nodeName.toLowerCase();return i.includes(u)?Qh.has(u)?!!Jh.test(m.nodeValue):!0:i.filter(v=>v instanceof RegExp).some(v=>v.test(u))};function ep(m,i,u){if(!m.length)return m;if(u&&typeof u=="function")return u(m);const x=new window.DOMParser().parseFromString(m,"text/html"),W=[].concat(...x.body.querySelectorAll("*"));for(const j of W){const ae=j.nodeName.toLowerCase();if(!Object.keys(i).includes(ae)){j.remove();continue}const Xe=[].concat(...j.attributes),at=[].concat(i["*"]||[],i[ae]||[]);for(const Ne of Xe)Zh(Ne,at)||j.removeAttribute(Ne.nodeName)}return x.body.innerHTML}const tp="TemplateFactory",np={allowList:wa,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},sp={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},rp={entry:"(string|element|function|null)",selector:"(string|element)"};class ip extends L{constructor(i){super(),this._config=this._getConfig(i)}static get Default(){return np}static get DefaultType(){return sp}static get NAME(){return tp}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[x,W]of Object.entries(this._config.content))this._setContent(i,W,x);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},rp)}_setContent(i,u,v){const x=y.findOne(v,i);if(x){if(u=this._resolvePossibleFunction(u),!u){x.remove();return}if(C(u)){this._putElementInTemplate(k(u),x);return}if(this._config.html){x.innerHTML=this._maybeSanitize(u);return}x.textContent=u}}_maybeSanitize(i){return this._config.sanitize?ep(i,this._config.allowList,this._config.sanitizeFn):i}_resolvePossibleFunction(i){return z(i,[this])}_putElementInTemplate(i,u){if(this._config.html){u.innerHTML="",u.append(i);return}u.textContent=i.textContent}}const op="tooltip",ap=new Set(["sanitize","allowList","sanitizeFn"]),gi="fade",lp="modal",sr="show",cp=".tooltip-inner",Sa=`.${lp}`,Oa="hide.bs.modal",gs="hover",mi="focus",up="click",fp="manual",dp="hide",hp="hidden",pp="show",gp="shown",mp="inserted",_p="click",vp="focusin",Ep="focusout",bp="mouseenter",yp="mouseleave",Ap={AUTO:"auto",TOP:"top",RIGHT:w()?"left":"right",BOTTOM:"bottom",LEFT:w()?"right":"left"},Tp={allowList:wa,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"},Cp={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 mn extends D{constructor(i,u){if(typeof r>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");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 Tp}static get DefaultType(){return Cp}static get NAME(){return op}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),T.off(this._element.closest(Sa),Oa,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=T.trigger(this._element,this.constructor.eventName(pp)),v=(F(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(i.defaultPrevented||!v)return;this._disposePopper();const x=this._getTipElement();this._element.setAttribute("aria-describedby",x.getAttribute("id"));const{container:W}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(W.append(x),T.trigger(this._element,this.constructor.eventName(mp))),this._popper=this._createPopper(x),x.classList.add(sr),"ontouchstart"in document.documentElement)for(const ae of[].concat(...document.body.children))T.on(ae,"mouseover",$);const j=()=>{T.trigger(this._element,this.constructor.eventName(gp)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(j,this.tip,this._isAnimated())}hide(){if(!this._isShown()||T.trigger(this._element,this.constructor.eventName(dp)).defaultPrevented)return;if(this._getTipElement().classList.remove(sr),"ontouchstart"in document.documentElement)for(const x of[].concat(...document.body.children))T.off(x,"mouseover",$);this._activeTrigger[up]=!1,this._activeTrigger[mi]=!1,this._activeTrigger[gs]=!1,this._isHovered=null;const v=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),T.trigger(this._element,this.constructor.eventName(hp)))};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(gi,sr),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(gi),u}setContent(i){this._newContent=i,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(i){return this._templateFactory?this._templateFactory.changeContent(i):this._templateFactory=new ip({...this._config,content:i,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[cp]: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(gi)}_isShown(){return this.tip&&this.tip.classList.contains(sr)}_createPopper(i){const u=z(this._config.placement,[this,i,this._element]),v=Ap[u.toUpperCase()];return r.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 z(i,[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,...z(this._config.popperConfig,[u])}}_setListeners(){const i=this._config.trigger.split(" ");for(const u of i)if(u==="click")T.on(this._element,this.constructor.eventName(_p),this._config.selector,v=>{this._initializeOnDelegatedTarget(v).toggle()});else if(u!==fp){const v=u===gs?this.constructor.eventName(bp):this.constructor.eventName(vp),x=u===gs?this.constructor.eventName(yp):this.constructor.eventName(Ep);T.on(this._element,v,this._config.selector,W=>{const j=this._initializeOnDelegatedTarget(W);j._activeTrigger[W.type==="focusin"?mi:gs]=!0,j._enter()}),T.on(this._element,x,this._config.selector,W=>{const j=this._initializeOnDelegatedTarget(W);j._activeTrigger[W.type==="focusout"?mi:gs]=j._element.contains(W.relatedTarget),j._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},T.on(this._element.closest(Sa),Oa,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=b.getDataAttributes(this._element);for(const v of Object.keys(u))ap.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:k(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=mn.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}}P(mn);const wp="popover",Sp=".popover-header",Op=".popover-body",Np={...mn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},xp={...mn.DefaultType,content:"(null|string|element|function)"};class rr extends mn{static get Default(){return Np}static get DefaultType(){return xp}static get NAME(){return wp}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Sp]:this._getTitle(),[Op]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(i){return this.each(function(){const u=rr.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}}P(rr);const $p="scrollspy",_i=".bs.scrollspy",Dp=".data-api",Lp=`activate${_i}`,Na=`click${_i}`,Rp=`load${_i}${Dp}`,Ip="dropdown-item",Fn="active",Pp='[data-bs-spy="scroll"]',vi="[href]",Mp=".nav, .list-group",xa=".nav-link",kp=`${xa}, .nav-item > ${xa}, .list-group-item`,Vp=".dropdown",Fp=".dropdown-toggle",Hp={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Bp={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ms extends D{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 Hp}static get DefaultType(){return Bp}static get NAME(){return $p}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=k(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&&(T.off(this._config.target,Na),T.on(this._config.target,Na,vi,i=>{const u=this._observableSections.get(i.target.hash);if(u){i.preventDefault();const v=this._rootElement||window,x=u.offsetTop-this._element.offsetTop;if(v.scrollTo){v.scrollTo({top:x,behavior:"smooth"});return}v.scrollTop=x}}))}_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=j=>this._targetLinks.get(`#${j.target.id}`),v=j=>{this._previousScrollData.visibleEntryTop=j.target.offsetTop,this._process(u(j))},x=(this._rootElement||document.documentElement).scrollTop,W=x>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=x;for(const j of i){if(!j.isIntersecting){this._activeTarget=null,this._clearActiveClass(u(j));continue}const ae=j.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(W&&ae){if(v(j),!x)return;continue}!W&&!ae&&v(j)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const i=y.find(vi,this._config.target);for(const u of i){if(!u.hash||R(u))continue;const v=y.findOne(decodeURI(u.hash),this._element);I(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(Fn),this._activateParents(i),T.trigger(this._element,Lp,{relatedTarget:i}))}_activateParents(i){if(i.classList.contains(Ip)){y.findOne(Fp,i.closest(Vp)).classList.add(Fn);return}for(const u of y.parents(i,Mp))for(const v of y.prev(u,kp))v.classList.add(Fn)}_clearActiveClass(i){i.classList.remove(Fn);const u=y.find(`${vi}.${Fn}`,i);for(const v of u)v.classList.remove(Fn)}static jQueryInterface(i){return this.each(function(){const u=ms.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]()}})}}T.on(window,Rp,()=>{for(const m of y.find(Pp))ms.getOrCreateInstance(m)}),P(ms);const jp="tab",_n=".bs.tab",Wp=`hide${_n}`,Kp=`hidden${_n}`,Up=`show${_n}`,Yp=`shown${_n}`,Gp=`click${_n}`,qp=`keydown${_n}`,zp=`load${_n}`,Xp="ArrowLeft",$a="ArrowRight",Qp="ArrowUp",Da="ArrowDown",Ei="Home",La="End",vn="active",Ra="fade",bi="show",Jp="dropdown",Ia=".dropdown-toggle",Zp=".dropdown-menu",yi=`:not(${Ia})`,eg='.list-group, .nav, [role="tablist"]',tg=".nav-item, .list-group-item",ng=`.nav-link${yi}, .list-group-item${yi}, [role="tab"]${yi}`,Pa='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ai=`${ng}, ${Pa}`,sg=`.${vn}[data-bs-toggle="tab"], .${vn}[data-bs-toggle="pill"], .${vn}[data-bs-toggle="list"]`;class En extends D{constructor(i){super(i),this._parent=this._element.closest(eg),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),T.on(this._element,qp,u=>this._keydown(u)))}static get NAME(){return jp}show(){const i=this._element;if(this._elemIsActive(i))return;const u=this._getActiveElem(),v=u?T.trigger(u,Wp,{relatedTarget:i}):null;T.trigger(i,Up,{relatedTarget:u}).defaultPrevented||v&&v.defaultPrevented||(this._deactivate(u,i),this._activate(i,u))}_activate(i,u){if(!i)return;i.classList.add(vn),this._activate(y.getElementFromSelector(i));const v=()=>{if(i.getAttribute("role")!=="tab"){i.classList.add(bi);return}i.removeAttribute("tabindex"),i.setAttribute("aria-selected",!0),this._toggleDropDown(i,!0),T.trigger(i,Yp,{relatedTarget:u})};this._queueCallback(v,i,i.classList.contains(Ra))}_deactivate(i,u){if(!i)return;i.classList.remove(vn),i.blur(),this._deactivate(y.getElementFromSelector(i));const v=()=>{if(i.getAttribute("role")!=="tab"){i.classList.remove(bi);return}i.setAttribute("aria-selected",!1),i.setAttribute("tabindex","-1"),this._toggleDropDown(i,!1),T.trigger(i,Kp,{relatedTarget:u})};this._queueCallback(v,i,i.classList.contains(Ra))}_keydown(i){if(![Xp,$a,Qp,Da,Ei,La].includes(i.key))return;i.stopPropagation(),i.preventDefault();const u=this._getChildren().filter(x=>!R(x));let v;if([Ei,La].includes(i.key))v=u[i.key===Ei?0:u.length-1];else{const x=[$a,Da].includes(i.key);v=Q(u,i.target,x,!0)}v&&(v.focus({preventScroll:!0}),En.getOrCreateInstance(v).show())}_getChildren(){return y.find(Ai,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=y.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(Jp))return;const x=(W,j)=>{const ae=y.findOne(W,v);ae&&ae.classList.toggle(j,u)};x(Ia,vn),x(Zp,bi),v.setAttribute("aria-expanded",u)}_setAttributeIfNotExists(i,u,v){i.hasAttribute(u)||i.setAttribute(u,v)}_elemIsActive(i){return i.classList.contains(vn)}_getInnerElement(i){return i.matches(Ai)?i:y.findOne(Ai,i)}_getOuterElement(i){return i.closest(tg)||i}static jQueryInterface(i){return this.each(function(){const u=En.getOrCreateInstance(this);if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i]()}})}}T.on(document,Gp,Pa,function(m){["A","AREA"].includes(this.tagName)&&m.preventDefault(),!R(this)&&En.getOrCreateInstance(this).show()}),T.on(window,zp,()=>{for(const m of y.find(sg))En.getOrCreateInstance(m)}),P(En);const rg="toast",Kt=".bs.toast",ig=`mouseover${Kt}`,og=`mouseout${Kt}`,ag=`focusin${Kt}`,lg=`focusout${Kt}`,cg=`hide${Kt}`,ug=`hidden${Kt}`,fg=`show${Kt}`,dg=`shown${Kt}`,hg="fade",Ma="hide",ir="show",or="showing",pg={animation:"boolean",autohide:"boolean",delay:"number"},gg={animation:!0,autohide:!0,delay:5e3};class _s extends D{constructor(i,u){super(i,u),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return gg}static get DefaultType(){return pg}static get NAME(){return rg}show(){if(T.trigger(this._element,fg).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(hg);const u=()=>{this._element.classList.remove(or),T.trigger(this._element,dg),this._maybeScheduleHide()};this._element.classList.remove(Ma),O(this._element),this._element.classList.add(ir,or),this._queueCallback(u,this._element,this._config.animation)}hide(){if(!this.isShown()||T.trigger(this._element,cg).defaultPrevented)return;const u=()=>{this._element.classList.add(Ma),this._element.classList.remove(or,ir),T.trigger(this._element,ug)};this._element.classList.add(or),this._queueCallback(u,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ir),super.dispose()}isShown(){return this._element.classList.contains(ir)}_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(){T.on(this._element,ig,i=>this._onInteraction(i,!0)),T.on(this._element,og,i=>this._onInteraction(i,!1)),T.on(this._element,ag,i=>this._onInteraction(i,!0)),T.on(this._element,lg,i=>this._onInteraction(i,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(i){return this.each(function(){const u=_s.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i](this)}})}}return B(_s),P(_s),{Alert:ue,Button:Me,Carousel:Pn,Collapse:kn,Dropdown:pt,Modal:gn,Offcanvas:$t,Popover:rr,ScrollSpy:ms,Tab:En,Toast:_s,Tooltip:mn}})})(Eg);/** * @vue/shared v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function t_(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const Mt={},rl=[],$s=()=>{},DI=()=>!1,sf=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),n_=t=>t.startsWith("onUpdate:"),vn=Object.assign,i_=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},RI=Object.prototype.hasOwnProperty,xt=(t,e)=>RI.call(t,e),Ke=Array.isArray,ol=t=>Lu(t)==="[object Map]",Ul=t=>Lu(t)==="[object Set]",Gy=t=>Lu(t)==="[object Date]",Je=t=>typeof t=="function",Kt=t=>typeof t=="string",Fs=t=>typeof t=="symbol",It=t=>t!==null&&typeof t=="object",Px=t=>(It(t)||Je(t))&&Je(t.then)&&Je(t.catch),Mx=Object.prototype.toString,Lu=t=>Mx.call(t),$I=t=>Lu(t).slice(8,-1),Ix=t=>Lu(t)==="[object Object]",s_=t=>Kt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Lc=t_(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),rf=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},LI=/-(\w)/g,Ui=rf(t=>t.replace(LI,(e,n)=>n?n.toUpperCase():"")),OI=/\B([A-Z])/g,go=rf(t=>t.replace(OI,"-$1").toLowerCase()),of=rf(t=>t.charAt(0).toUpperCase()+t.slice(1)),vg=rf(t=>t?`on${of(t)}`:""),so=(t,e)=>!Object.is(t,e),nh=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},ph=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Rx=t=>{const e=Kt(t)?Number(t):NaN;return isNaN(e)?t:e};let Xy;const $x=()=>Xy||(Xy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mn(t){if(Ke(t)){const e={};for(let n=0;n{if(n){const i=n.split(FI);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Ee(t){let e="";if(Kt(t))e=t;else if(Ke(t))for(let n=0;nca(n,e))}const Ox=t=>!!(t&&t.__v_isRef===!0),pe=t=>Kt(t)?t:t==null?"":Ke(t)||It(t)&&(t.toString===Mx||!Je(t.toString))?Ox(t)?pe(t.value):JSON.stringify(t,Nx,2):String(t),Nx=(t,e)=>Ox(e)?Nx(t,e.value):ol(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[yg(i,r)+" =>"]=s,n),{})}:Ul(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>yg(n))}:Fs(e)?yg(e):It(e)&&!Ke(e)&&!Ix(e)?String(e):e,yg=(t,e="")=>{var n;return Fs(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** +**//*! #__NO_SIDE_EFFECTS__ */function yo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const _e={},Yn=[],St=()=>{},cm=()=>!1,jr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ao=e=>e.startsWith("onUpdate:"),Se=Object.assign,To=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},um=Object.prototype.hasOwnProperty,he=(e,t)=>um.call(e,t),te=Array.isArray,Gn=e=>Ws(e)==="[object Map]",us=e=>Ws(e)==="[object Set]",Ua=e=>Ws(e)==="[object Date]",ie=e=>typeof e=="function",be=e=>typeof e=="string",Nt=e=>typeof e=="symbol",ve=e=>e!==null&&typeof e=="object",$c=e=>(ve(e)||ie(e))&&ie(e.then)&&ie(e.catch),Dc=Object.prototype.toString,Ws=e=>Dc.call(e),fm=e=>Ws(e).slice(8,-1),Lc=e=>Ws(e)==="[object Object]",Co=e=>be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ws=yo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Wr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},dm=/-(\w)/g,ht=Wr(e=>e.replace(dm,(t,n)=>n?n.toUpperCase():"")),hm=/\B([A-Z])/g,ln=Wr(e=>e.replace(hm,"-$1").toLowerCase()),Kr=Wr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ti=Wr(e=>e?`on${Kr(e)}`:""),sn=(e,t)=>!Object.is(e,t),br=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Nr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ic=e=>{const t=be(e)?Number(e):NaN;return isNaN(t)?e:t};let Ya;const Pc=()=>Ya||(Ya=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ur(e){if(te(e)){const t={};for(let n=0;n{if(n){const s=n.split(gm);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Yr(e){let t="";if(be(e))t=e;else if(te(e))for(let n=0;nxn(n,t))}const kc=e=>!!(e&&e.__v_isRef===!0),Vc=e=>be(e)?e:e==null?"":te(e)||ve(e)&&(e.toString===Dc||!ie(e.toString))?kc(e)?Vc(e.value):JSON.stringify(e,Fc,2):String(e),Fc=(e,t)=>kc(t)?Fc(e,t.value):Gn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Ci(s,o)+" =>"]=r,n),{})}:us(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ci(n))}:Nt(t)?Ci(t):ve(t)&&!te(t)&&!Lc(t)?String(t):t,Ci=(e,t="")=>{var n;return Nt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let ei;class Fx{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ei,!e&&ei&&(this.index=(ei.scopes||(ei.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0)return;if(Nc){let e=Nc;for(Nc=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Oc;){let e=Oc;for(Oc=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function Yx(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Hx(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),c_(i),HI(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function Lp(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(jx(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function jx(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Qc))return;t.globalVersion=Qc;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Lp(t)){t.flags&=-3;return}const n=Rt,i=us;Rt=t,us=!0;try{Yx(t);const s=t.fn(t._value);(e.version===0||so(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Rt=n,us=i,Hx(t),t.flags&=-3}}function c_(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i),!n.subs&&n.computed){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)c_(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function HI(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let us=!0;const Kx=[];function po(){Kx.push(us),us=!1}function mo(){const t=Kx.pop();us=t===void 0?!0:t}function qy(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Rt;Rt=void 0;try{e()}finally{Rt=n}}}let Qc=0;class jI{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class u_{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!Rt||!us||Rt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Rt)n=this.activeLink=new jI(Rt,this),Rt.deps?(n.prevDep=Rt.depsTail,Rt.depsTail.nextDep=n,Rt.depsTail=n):Rt.deps=Rt.depsTail=n,Ux(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Rt.depsTail,n.nextDep=void 0,Rt.depsTail.nextDep=n,Rt.depsTail=n,Rt.deps===n&&(Rt.deps=i)}return n}trigger(e){this.version++,Qc++,this.notify(e)}notify(e){a_();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{l_()}}}function Ux(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Ux(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const mh=new WeakMap,ta=Symbol(""),Op=Symbol(""),eu=Symbol("");function qn(t,e,n){if(us&&Rt){let i=mh.get(t);i||mh.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new u_),s.map=i,s.key=n),s.track()}}function dr(t,e,n,i,s,r){const o=mh.get(t);if(!o){Qc++;return}const a=l=>{l&&l.trigger()};if(a_(),e==="clear")o.forEach(a);else{const l=Ke(t),c=l&&s_(n);if(l&&n==="length"){const u=Number(i);o.forEach((d,f)=>{(f==="length"||f===eu||!Fs(f)&&f>=u)&&a(d)})}else switch(n!==void 0&&a(o.get(n)),c&&a(o.get(eu)),e){case"add":l?c&&a(o.get("length")):(a(o.get(ta)),ol(t)&&a(o.get(Op)));break;case"delete":l||(a(o.get(ta)),ol(t)&&a(o.get(Op)));break;case"set":ol(t)&&a(o.get(ta));break}}l_()}function KI(t,e){const n=mh.get(t);return n&&n.get(e)}function Da(t){const e=lt(t);return e===t?e:(qn(e,"iterate",eu),Hi(t)?e:e.map(Kn))}function lf(t){return qn(t=lt(t),"iterate",eu),t}const UI={__proto__:null,[Symbol.iterator](){return wg(this,Symbol.iterator,Kn)},concat(...t){return Da(this).concat(...t.map(e=>Ke(e)?Da(e):e))},entries(){return wg(this,"entries",t=>(t[1]=Kn(t[1]),t))},every(t,e){return js(this,"every",t,e,void 0,arguments)},filter(t,e){return js(this,"filter",t,e,n=>n.map(Kn),arguments)},find(t,e){return js(this,"find",t,e,Kn,arguments)},findIndex(t,e){return js(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return js(this,"findLast",t,e,Kn,arguments)},findLastIndex(t,e){return js(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return js(this,"forEach",t,e,void 0,arguments)},includes(...t){return xg(this,"includes",t)},indexOf(...t){return xg(this,"indexOf",t)},join(t){return Da(this).join(t)},lastIndexOf(...t){return xg(this,"lastIndexOf",t)},map(t,e){return js(this,"map",t,e,void 0,arguments)},pop(){return rc(this,"pop")},push(...t){return rc(this,"push",t)},reduce(t,...e){return Zy(this,"reduce",t,e)},reduceRight(t,...e){return Zy(this,"reduceRight",t,e)},shift(){return rc(this,"shift")},some(t,e){return js(this,"some",t,e,void 0,arguments)},splice(...t){return rc(this,"splice",t)},toReversed(){return Da(this).toReversed()},toSorted(t){return Da(this).toSorted(t)},toSpliced(...t){return Da(this).toSpliced(...t)},unshift(...t){return rc(this,"unshift",t)},values(){return wg(this,"values",Kn)}};function wg(t,e,n){const i=lf(t),s=i[e]();return i!==t&&!Hi(t)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=n(r.value)),r}),s}const GI=Array.prototype;function js(t,e,n,i,s,r){const o=lf(t),a=o!==t&&!Hi(t),l=o[e];if(l!==GI[e]){const d=l.apply(t,r);return a?Kn(d):d}let c=n;o!==t&&(a?c=function(d,f){return n.call(this,Kn(d),f,t)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,t)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Zy(t,e,n,i){const s=lf(t);let r=n;return s!==t&&(Hi(t)?n.length>3&&(r=function(o,a,l){return n.call(this,o,a,l,t)}):r=function(o,a,l){return n.call(this,o,Kn(a),l,t)}),s[e](r,...i)}function xg(t,e,n){const i=lt(t);qn(i,"iterate",eu);const s=i[e](...n);return(s===-1||s===!1)&&Ou(n[0])?(n[0]=lt(n[0]),i[e](...n)):s}function rc(t,e,n=[]){po(),a_();const i=lt(t)[e].apply(t,n);return l_(),mo(),i}const XI=t_("__proto__,__v_isRef,__isVue"),Gx=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Fs));function qI(t){Fs(t)||(t=String(t));const e=lt(this);return qn(e,"has",t),e.hasOwnProperty(t)}class Xx{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){const s=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(s?r?cD:Qx:r?Jx:Zx).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Ke(e);if(!s){let l;if(o&&(l=UI[n]))return l;if(n==="hasOwnProperty")return qI}const a=Reflect.get(e,n,Ht(e)?e:i);return(Fs(n)?Gx.has(n):XI(n))||(s||qn(e,"get",n),r)?a:Ht(a)?o&&s_(n)?a:a.value:It(a)?s?tE(a):Ei(a):a}}class qx extends Xx{constructor(e=!1){super(!1,e)}set(e,n,i,s){let r=e[n];if(!this._isShallow){const l=ua(r);if(!Hi(i)&&!ua(i)&&(r=lt(r),i=lt(i)),!Ke(e)&&Ht(r)&&!Ht(i))return l?!1:(r.value=i,!0)}const o=Ke(e)&&s_(n)?Number(n)t,cf=t=>Reflect.getPrototypeOf(t);function md(t,e,n=!1,i=!1){t=t.__v_raw;const s=lt(t),r=lt(e);n||(so(e,r)&&qn(s,"get",e),qn(s,"get",r));const{has:o}=cf(s),a=i?d_:n?g_:Kn;if(o.call(s,e))return a(t.get(e));if(o.call(s,r))return a(t.get(r));t!==s&&t.get(e)}function _d(t,e=!1){const n=this.__v_raw,i=lt(n),s=lt(t);return e||(so(t,s)&&qn(i,"has",t),qn(i,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)}function vd(t,e=!1){return t=t.__v_raw,!e&&qn(lt(t),"iterate",ta),Reflect.get(t,"size",t)}function Jy(t,e=!1){!e&&!Hi(t)&&!ua(t)&&(t=lt(t));const n=lt(this);return cf(n).has.call(n,t)||(n.add(t),dr(n,"add",t,t)),this}function Qy(t,e,n=!1){!n&&!Hi(e)&&!ua(e)&&(e=lt(e));const i=lt(this),{has:s,get:r}=cf(i);let o=s.call(i,t);o||(t=lt(t),o=s.call(i,t));const a=r.call(i,t);return i.set(t,e),o?so(e,a)&&dr(i,"set",t,e):dr(i,"add",t,e),this}function eb(t){const e=lt(this),{has:n,get:i}=cf(e);let s=n.call(e,t);s||(t=lt(t),s=n.call(e,t)),i&&i.call(e,t);const r=e.delete(t);return s&&dr(e,"delete",t,void 0),r}function tb(){const t=lt(this),e=t.size!==0,n=t.clear();return e&&dr(t,"clear",void 0,void 0),n}function yd(t,e){return function(i,s){const r=this,o=r.__v_raw,a=lt(o),l=e?d_:t?g_:Kn;return!t&&qn(a,"iterate",ta),o.forEach((c,u)=>i.call(s,l(c),l(u),r))}}function bd(t,e,n){return function(...i){const s=this.__v_raw,r=lt(s),o=ol(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...i),u=n?d_:e?g_:Kn;return!e&&qn(r,"iterate",l?Op:ta),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function kr(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function tD(){const t={get(r){return md(this,r)},get size(){return vd(this)},has:_d,add:Jy,set:Qy,delete:eb,clear:tb,forEach:yd(!1,!1)},e={get(r){return md(this,r,!1,!0)},get size(){return vd(this)},has:_d,add(r){return Jy.call(this,r,!0)},set(r,o){return Qy.call(this,r,o,!0)},delete:eb,clear:tb,forEach:yd(!1,!0)},n={get(r){return md(this,r,!0)},get size(){return vd(this,!0)},has(r){return _d.call(this,r,!0)},add:kr("add"),set:kr("set"),delete:kr("delete"),clear:kr("clear"),forEach:yd(!0,!1)},i={get(r){return md(this,r,!0,!0)},get size(){return vd(this,!0)},has(r){return _d.call(this,r,!0)},add:kr("add"),set:kr("set"),delete:kr("delete"),clear:kr("clear"),forEach:yd(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=bd(r,!1,!1),n[r]=bd(r,!0,!1),e[r]=bd(r,!1,!0),i[r]=bd(r,!0,!0)}),[t,n,e,i]}const[nD,iD,sD,rD]=tD();function h_(t,e){const n=e?t?rD:sD:t?iD:nD;return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(xt(n,s)&&s in i?n:i,s,r)}const oD={get:h_(!1,!1)},aD={get:h_(!1,!0)},lD={get:h_(!0,!1)};const Zx=new WeakMap,Jx=new WeakMap,Qx=new WeakMap,cD=new WeakMap;function uD(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function dD(t){return t.__v_skip||!Object.isExtensible(t)?0:uD($I(t))}function Ei(t){return ua(t)?t:f_(t,!1,JI,oD,Zx)}function eE(t){return f_(t,!1,eD,aD,Jx)}function tE(t){return f_(t,!0,QI,lD,Qx)}function f_(t,e,n,i,s){if(!It(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=s.get(t);if(r)return r;const o=dD(t);if(o===0)return t;const a=new Proxy(t,o===2?i:n);return s.set(t,a),a}function Qr(t){return ua(t)?Qr(t.__v_raw):!!(t&&t.__v_isReactive)}function ua(t){return!!(t&&t.__v_isReadonly)}function Hi(t){return!!(t&&t.__v_isShallow)}function Ou(t){return t?!!t.__v_raw:!1}function lt(t){const e=t&&t.__v_raw;return e?lt(e):t}function uf(t){return!xt(t,"__v_skip")&&Object.isExtensible(t)&&Dx(t,"__v_skip",!0),t}const Kn=t=>It(t)?Ei(t):t,g_=t=>It(t)?tE(t):t;function Ht(t){return t?t.__v_isRef===!0:!1}function me(t){return nE(t,!1)}function df(t){return nE(t,!0)}function nE(t,e){return Ht(t)?t:new hD(t,e)}class hD{constructor(e,n){this.dep=new u_,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:lt(e),this._value=n?e:Kn(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||Hi(e)||ua(e);e=i?e:lt(e),so(e,n)&&(this._rawValue=e,this._value=i?e:Kn(e),this.dep.trigger())}}function Z(t){return Ht(t)?t.value:t}const fD={get:(t,e,n)=>e==="__v_raw"?t:Z(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return Ht(s)&&!Ht(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function iE(t){return Qr(t)?t:new Proxy(t,fD)}function gD(t){const e=Ke(t)?new Array(t.length):{};for(const n in t)e[n]=sE(t,n);return e}class pD{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return KI(lt(this._object),this._key)}}class mD{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tu(t,e,n){return Ht(t)?t:Je(t)?new mD(t):It(t)&&arguments.length>1?sE(t,e,n):me(t)}function sE(t,e,n){const i=t[e];return Ht(i)?i:new pD(t,e,n)}class _D{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new u_(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Rt!==this)return zx(this,!0),!0}get value(){const e=this.dep.track();return jx(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function vD(t,e,n=!1){let i,s;return Je(t)?i=t:(i=t.get,s=t.set),new _D(i,s,n)}const wd={},_h=new WeakMap;let zo;function yD(t,e=!1,n=zo){if(n){let i=_h.get(n);i||_h.set(n,i=[]),i.push(t)}}function bD(t,e,n=Mt){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=n,c=w=>s?w:Hi(w)||s===!1||s===0?rr(w,1):rr(w);let u,d,f,g,p=!1,m=!1;if(Ht(t)?(d=()=>t.value,p=Hi(t)):Qr(t)?(d=()=>c(t),p=!0):Ke(t)?(m=!0,p=t.some(w=>Qr(w)||Hi(w)),d=()=>t.map(w=>{if(Ht(w))return w.value;if(Qr(w))return c(w);if(Je(w))return l?l(w,2):w()})):Je(t)?e?d=l?()=>l(t,2):t:d=()=>{if(f){po();try{f()}finally{mo()}}const w=zo;zo=u;try{return l?l(t,3,[g]):t(g)}finally{zo=w}}:d=$s,e&&s){const w=d,b=s===!0?1/0:s;d=()=>rr(w(),b)}const v=af(),y=()=>{u.stop(),v&&i_(v.effects,u)};if(r&&e){const w=e;e=(...b)=>{w(...b),y()}}let x=m?new Array(t.length).fill(wd):wd;const E=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(e){const b=u.run();if(s||p||(m?b.some((C,k)=>so(C,x[k])):so(b,x))){f&&f();const C=zo;zo=u;try{const k=[b,x===wd?void 0:m&&x[0]===wd?[]:x,g];l?l(e,3,k):e(...k),x=b}finally{zo=C}}}else u.run()};return a&&a(E),u=new Vx(d),u.scheduler=o?()=>o(E,!1):E,g=w=>yD(w,!1,u),f=u.onStop=()=>{const w=_h.get(u);if(w){if(l)l(w,4);else for(const b of w)b();_h.delete(u)}},e?i?E(!0):x=u.run():o?o(E.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function rr(t,e=1/0,n){if(e<=0||!It(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Ht(t))rr(t.value,e,n);else if(Ke(t))for(let i=0;i{rr(i,e,n)});else if(Ix(t)){for(const i in t)rr(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&rr(t[i],e,n)}return t}/** +**/let Ye;class Hc{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ye,!t&&Ye&&(this.index=(Ye.scopes||(Ye.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)return;if(Os){let t=Os;for(Os=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ss;){let t=Ss;for(Ss=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Yc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Gc(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),No(s),Am(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function ji(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(qc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function qc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Is))return;e.globalVersion=Is;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ji(e)){e.flags&=-3;return}const n=Ee,s=vt;Ee=e,vt=!0;try{Yc(e);const r=e.fn(e._value);(t.version===0||sn(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ee=n,vt=s,Gc(e),e.flags&=-3}}function No(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s),!n.subs&&n.computed){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)No(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Am(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let vt=!0;const zc=[];function cn(){zc.push(vt),vt=!1}function un(){const e=zc.pop();vt=e===void 0?!0:e}function Ga(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ee;Ee=void 0;try{t()}finally{Ee=n}}}let Is=0;class Tm{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 xo{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}track(t){if(!Ee||!vt||Ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ee)n=this.activeLink=new Tm(Ee,this),Ee.deps?(n.prevDep=Ee.depsTail,Ee.depsTail.nextDep=n,Ee.depsTail=n):Ee.deps=Ee.depsTail=n,Xc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ee.depsTail,n.nextDep=void 0,Ee.depsTail.nextDep=n,Ee.depsTail=n,Ee.deps===n&&(Ee.deps=s)}return n}trigger(t){this.version++,Is++,this.notify(t)}notify(t){So();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Oo()}}}function Xc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Xc(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const xr=new WeakMap,wn=Symbol(""),Wi=Symbol(""),Ps=Symbol("");function Fe(e,t,n){if(vt&&Ee){let s=xr.get(e);s||xr.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new xo),r.map=s,r.key=n),r.track()}}function Ft(e,t,n,s,r,o){const a=xr.get(e);if(!a){Is++;return}const l=c=>{c&&c.trigger()};if(So(),t==="clear")a.forEach(l);else{const c=te(e),h=c&&Co(n);if(c&&n==="length"){const f=Number(s);a.forEach((d,p)=>{(p==="length"||p===Ps||!Nt(p)&&p>=f)&&l(d)})}else switch(n!==void 0&&l(a.get(n)),h&&l(a.get(Ps)),t){case"add":c?h&&l(a.get("length")):(l(a.get(wn)),Gn(e)&&l(a.get(Wi)));break;case"delete":c||(l(a.get(wn)),Gn(e)&&l(a.get(Wi)));break;case"set":Gn(e)&&l(a.get(wn));break}}Oo()}function Cm(e,t){const n=xr.get(e);return n&&n.get(t)}function Bn(e){const t=fe(e);return t===e?t:(Fe(t,"iterate",Ps),ut(e)?t:t.map(ke))}function Gr(e){return Fe(e=fe(e),"iterate",Ps),e}const wm={__proto__:null,[Symbol.iterator](){return Si(this,Symbol.iterator,ke)},concat(...e){return Bn(this).concat(...e.map(t=>te(t)?Bn(t):t))},entries(){return Si(this,"entries",e=>(e[1]=ke(e[1]),e))},every(e,t){return Dt(this,"every",e,t,void 0,arguments)},filter(e,t){return Dt(this,"filter",e,t,n=>n.map(ke),arguments)},find(e,t){return Dt(this,"find",e,t,ke,arguments)},findIndex(e,t){return Dt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Dt(this,"findLast",e,t,ke,arguments)},findLastIndex(e,t){return Dt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Dt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Oi(this,"includes",e)},indexOf(...e){return Oi(this,"indexOf",e)},join(e){return Bn(this).join(e)},lastIndexOf(...e){return Oi(this,"lastIndexOf",e)},map(e,t){return Dt(this,"map",e,t,void 0,arguments)},pop(){return vs(this,"pop")},push(...e){return vs(this,"push",e)},reduce(e,...t){return qa(this,"reduce",e,t)},reduceRight(e,...t){return qa(this,"reduceRight",e,t)},shift(){return vs(this,"shift")},some(e,t){return Dt(this,"some",e,t,void 0,arguments)},splice(...e){return vs(this,"splice",e)},toReversed(){return Bn(this).toReversed()},toSorted(e){return Bn(this).toSorted(e)},toSpliced(...e){return Bn(this).toSpliced(...e)},unshift(...e){return vs(this,"unshift",e)},values(){return Si(this,"values",ke)}};function Si(e,t,n){const s=Gr(e),r=s[t]();return s!==e&&!ut(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.value&&(o.value=n(o.value)),o}),r}const Sm=Array.prototype;function Dt(e,t,n,s,r,o){const a=Gr(e),l=a!==e&&!ut(e),c=a[t];if(c!==Sm[t]){const d=c.apply(e,o);return l?ke(d):d}let h=n;a!==e&&(l?h=function(d,p){return n.call(this,ke(d),p,e)}:n.length>2&&(h=function(d,p){return n.call(this,d,p,e)}));const f=c.call(a,h,s);return l&&r?r(f):f}function qa(e,t,n,s){const r=Gr(e);let o=n;return r!==e&&(ut(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,ke(l),c,e)}),r[t](o,...s)}function Oi(e,t,n){const s=fe(e);Fe(s,"iterate",Ps);const r=s[t](...n);return(r===-1||r===!1)&&Ro(n[0])?(n[0]=fe(n[0]),s[t](...n)):r}function vs(e,t,n=[]){cn(),So();const s=fe(e)[t].apply(e,n);return Oo(),un(),s}const Om=yo("__proto__,__v_isRef,__isVue"),Qc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Nt));function Nm(e){Nt(e)||(e=String(e));const t=fe(this);return Fe(t,"has",e),t.hasOwnProperty(e)}class Jc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Bm:nu:o?tu:eu).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=te(t);if(!r){let c;if(a&&(c=wm[n]))return c;if(n==="hasOwnProperty")return Nm}const l=Reflect.get(t,n,Ae(t)?t:s);return(Nt(n)?Qc.has(n):Om(n))||(r||Fe(t,"get",n),o)?l:Ae(l)?a&&Co(n)?l:l.value:ve(l)?r?ru(l):Ks(l):l}}class Zc extends Jc{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];if(!this._isShallow){const c=$n(o);if(!ut(s)&&!$n(s)&&(o=fe(o),s=fe(s)),!te(t)&&Ae(o)&&!Ae(s))return c?!1:(o.value=s,!0)}const a=te(t)&&Co(n)?Number(n)e,qr=e=>Reflect.getPrototypeOf(e);function cr(e,t,n=!1,s=!1){e=e.__v_raw;const r=fe(e),o=fe(t);n||(sn(t,o)&&Fe(r,"get",t),Fe(r,"get",o));const{has:a}=qr(r),l=s?$o:n?Io:ke;if(a.call(r,t))return l(e.get(t));if(a.call(r,o))return l(e.get(o));e!==r&&e.get(t)}function ur(e,t=!1){const n=this.__v_raw,s=fe(n),r=fe(e);return t||(sn(e,r)&&Fe(s,"has",e),Fe(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function fr(e,t=!1){return e=e.__v_raw,!t&&Fe(fe(e),"iterate",wn),Reflect.get(e,"size",e)}function za(e,t=!1){!t&&!ut(e)&&!$n(e)&&(e=fe(e));const n=fe(this);return qr(n).has.call(n,e)||(n.add(e),Ft(n,"add",e,e)),this}function Xa(e,t,n=!1){!n&&!ut(t)&&!$n(t)&&(t=fe(t));const s=fe(this),{has:r,get:o}=qr(s);let a=r.call(s,e);a||(e=fe(e),a=r.call(s,e));const l=o.call(s,e);return s.set(e,t),a?sn(t,l)&&Ft(s,"set",e,t):Ft(s,"add",e,t),this}function Qa(e){const t=fe(this),{has:n,get:s}=qr(t);let r=n.call(t,e);r||(e=fe(e),r=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return r&&Ft(t,"delete",e,void 0),o}function Ja(){const e=fe(this),t=e.size!==0,n=e.clear();return t&&Ft(e,"clear",void 0,void 0),n}function dr(e,t){return function(s,r){const o=this,a=o.__v_raw,l=fe(a),c=t?$o:e?Io:ke;return!e&&Fe(l,"iterate",wn),a.forEach((h,f)=>s.call(r,c(h),c(f),o))}}function hr(e,t,n){return function(...s){const r=this.__v_raw,o=fe(r),a=Gn(o),l=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,h=r[e](...s),f=n?$o:t?Io:ke;return!t&&Fe(o,"iterate",c?Wi:wn),{next(){const{value:d,done:p}=h.next();return p?{value:d,done:p}:{value:l?[f(d[0]),f(d[1])]:f(d),done:p}},[Symbol.iterator](){return this}}}}function Ut(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Rm(){const e={get(o){return cr(this,o)},get size(){return fr(this)},has:ur,add:za,set:Xa,delete:Qa,clear:Ja,forEach:dr(!1,!1)},t={get(o){return cr(this,o,!1,!0)},get size(){return fr(this)},has:ur,add(o){return za.call(this,o,!0)},set(o,a){return Xa.call(this,o,a,!0)},delete:Qa,clear:Ja,forEach:dr(!1,!0)},n={get(o){return cr(this,o,!0)},get size(){return fr(this,!0)},has(o){return ur.call(this,o,!0)},add:Ut("add"),set:Ut("set"),delete:Ut("delete"),clear:Ut("clear"),forEach:dr(!0,!1)},s={get(o){return cr(this,o,!0,!0)},get size(){return fr(this,!0)},has(o){return ur.call(this,o,!0)},add:Ut("add"),set:Ut("set"),delete:Ut("delete"),clear:Ut("clear"),forEach:dr(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=hr(o,!1,!1),n[o]=hr(o,!0,!1),t[o]=hr(o,!1,!0),s[o]=hr(o,!0,!0)}),[e,n,t,s]}const[Im,Pm,Mm,km]=Rm();function Do(e,t){const n=t?e?km:Mm:e?Pm:Im;return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(he(n,r)&&r in s?n:s,r,o)}const Vm={get:Do(!1,!1)},Fm={get:Do(!1,!0)},Hm={get:Do(!0,!1)};const eu=new WeakMap,tu=new WeakMap,nu=new WeakMap,Bm=new WeakMap;function jm(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Wm(e){return e.__v_skip||!Object.isExtensible(e)?0:jm(fm(e))}function Ks(e){return $n(e)?e:Lo(e,!1,$m,Vm,eu)}function su(e){return Lo(e,!1,Lm,Fm,tu)}function ru(e){return Lo(e,!0,Dm,Hm,nu)}function Lo(e,t,n,s,r){if(!ve(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const a=Wm(e);if(a===0)return e;const l=new Proxy(e,a===2?s:n);return r.set(e,l),l}function nn(e){return $n(e)?nn(e.__v_raw):!!(e&&e.__v_isReactive)}function $n(e){return!!(e&&e.__v_isReadonly)}function ut(e){return!!(e&&e.__v_isShallow)}function Ro(e){return e?!!e.__v_raw:!1}function fe(e){const t=e&&e.__v_raw;return t?fe(t):e}function zr(e){return!he(e,"__v_skip")&&Object.isExtensible(e)&&Rc(e,"__v_skip",!0),e}const ke=e=>ve(e)?Ks(e):e,Io=e=>ve(e)?ru(e):e;function Ae(e){return e?e.__v_isRef===!0:!1}function Xr(e){return ou(e,!1)}function iu(e){return ou(e,!0)}function ou(e,t){return Ae(e)?e:new Km(e,t)}class Km{constructor(t,n){this.dep=new xo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:fe(t),this._value=n?t:ke(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ut(t)||$n(t);t=s?t:fe(t),sn(t,n)&&(this._rawValue=t,this._value=s?t:ke(t),this.dep.trigger())}}function Ht(e){return Ae(e)?e.value:e}const Um={get:(e,t,n)=>t==="__v_raw"?e:Ht(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Ae(r)&&!Ae(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function au(e){return nn(e)?e:new Proxy(e,Um)}function Ym(e){const t=te(e)?new Array(e.length):{};for(const n in e)t[n]=lu(e,n);return t}class Gm{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,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 Cm(fe(this._object),this._key)}}class qm{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 jb(e,t,n){return Ae(e)?e:ie(e)?new qm(e):ve(e)&&arguments.length>1?lu(e,t,n):Xr(e)}function lu(e,t,n){const s=e[t];return Ae(s)?s:new Gm(e,t,n)}class zm{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new xo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Is-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ee!==this)return Uc(this,!0),!0}get value(){const t=this.dep.track();return qc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Xm(e,t,n=!1){let s,r;return ie(e)?s=e:(s=e.get,r=e.set),new zm(s,r,n)}const pr={},$r=new WeakMap;let Tn;function Qm(e,t=!1,n=Tn){if(n){let s=$r.get(n);s||$r.set(n,s=[]),s.push(e)}}function Jm(e,t,n=_e){const{immediate:s,deep:r,once:o,scheduler:a,augmentJob:l,call:c}=n,h=$=>r?$:ut($)||r===!1||r===0?kt($,1):kt($);let f,d,p,E,A=!1,C=!1;if(Ae(e)?(d=()=>e.value,A=ut(e)):nn(e)?(d=()=>h(e),A=!0):te(e)?(C=!0,A=e.some($=>nn($)||ut($)),d=()=>e.map($=>{if(Ae($))return $.value;if(nn($))return h($);if(ie($))return c?c($,2):$()})):ie(e)?t?d=c?()=>c(e,2):e:d=()=>{if(p){cn();try{p()}finally{un()}}const $=Tn;Tn=f;try{return c?c(e,3,[E]):e(E)}finally{Tn=$}}:d=St,t&&r){const $=d,O=r===!0?1/0:r;d=()=>kt($(),O)}const k=jc(),I=()=>{f.stop(),k&&To(k.effects,f)};if(o&&t){const $=t;t=(...O)=>{$(...O),I()}}let R=C?new Array(e.length).fill(pr):pr;const F=$=>{if(!(!(f.flags&1)||!f.dirty&&!$))if(t){const O=f.run();if(r||A||(C?O.some((V,Y)=>sn(V,R[Y])):sn(O,R))){p&&p();const V=Tn;Tn=f;try{const Y=[O,R===pr?void 0:C&&R[0]===pr?[]:R,E];c?c(t,3,Y):t(...Y),R=O}finally{Tn=V}}}else f.run()};return l&&l(F),f=new Wc(d),f.scheduler=a?()=>a(F,!1):F,E=$=>Qm($,!1,f),p=f.onStop=()=>{const $=$r.get(f);if($){if(c)c($,4);else for(const O of $)O();$r.delete(f)}},t?s?F(!0):R=f.run():a?a(F.bind(null,!0),!0):f.run(),I.pause=f.pause.bind(f),I.resume=f.resume.bind(f),I.stop=I,I}function kt(e,t=1/0,n){if(t<=0||!ve(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ae(e))kt(e.value,t,n);else if(te(e))for(let s=0;s{kt(s,t,n)});else if(Lc(e)){for(const s in e)kt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&kt(e[s],t,n)}return e}/** * @vue/runtime-core v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Nu(t,e,n,i){try{return i?t(...i):t()}catch(s){Fu(s,e,n)}}function fs(t,e,n,i){if(Je(t)){const s=Nu(t,e,n,i);return s&&Px(s)&&s.catch(r=>{Fu(r,e,n)}),s}if(Ke(t)){const s=[];for(let r=0;r>>1,s=ti[i],r=nu(s);r=nu(n)?ti.push(t):ti.splice(xD(e),0,t),t.flags|=1,oE()}}function oE(){vh||(vh=rE.then(lE))}function Np(t){Ke(t)?al.push(...t):Vr&&t.id===-1?Vr.splice(Ga+1,0,t):t.flags&1||(al.push(t),t.flags|=1),oE()}function nb(t,e,n=ws+1){for(;nnu(n)-nu(i));if(al.length=0,Vr){Vr.push(...e);return}for(Vr=e,Ga=0;Gat.id==null?t.flags&2?-1:1/0:t.id;function lE(t){try{for(ws=0;ws{i._d&&pb(-1);const r=yh(e);let o;try{o=t(...s)}finally{yh(r),i._d&&pb(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function Re(t,e){if(wn===null)return t;const n=_f(wn),i=t.dirs||(t.dirs=[]);for(let s=0;st.__isTeleport,Fc=t=>t&&(t.disabled||t.disabled===""),ED=t=>t&&(t.defer||t.defer===""),ib=t=>typeof SVGElement<"u"&&t instanceof SVGElement,sb=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Fp=(t,e)=>{const n=t&&t.to;return Kt(n)?e?e(n):null:n},CD={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,r,o,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:g,querySelector:p,createText:m,createComment:v}}=c,y=Fc(e.props);let{shapeFlag:x,children:E,dynamicChildren:w}=e;if(t==null){const b=e.el=m(""),C=e.anchor=m("");g(b,n,i),g(C,n,i);const k=(A,I)=>{x&16&&(s&&s.isCE&&(s.ce._teleportTarget=A),u(E,A,I,s,r,o,a,l))},T=()=>{const A=e.target=Fp(e.props,p),I=hE(A,e,m,g);A&&(o!=="svg"&&ib(A)?o="svg":o!=="mathml"&&sb(A)&&(o="mathml"),y||(k(A,I),ih(e)))};y&&(k(n,C),ih(e)),ED(e.props)?fi(T,r):T()}else{e.el=t.el,e.targetStart=t.targetStart;const b=e.anchor=t.anchor,C=e.target=t.target,k=e.targetAnchor=t.targetAnchor,T=Fc(t.props),A=T?n:C,I=T?b:k;if(o==="svg"||ib(C)?o="svg":(o==="mathml"||sb(C))&&(o="mathml"),w?(f(t.dynamicChildren,w,A,s,r,o,a),y_(t,e,!0)):l||d(t,e,A,I,s,r,o,a,!1),y)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):xd(e,n,b,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const V=e.target=Fp(e.props,p);V&&xd(e,V,null,c,0)}else T&&xd(e,C,k,c,1);ih(e)}},remove(t,e,n,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:f}=t;if(d&&(s(c),s(u)),r&&s(l),o&16){const g=r||!Fc(f);for(let p=0;p{t.isMounted=!0}),EE(()=>{t.isUnmounting=!0}),t}const Fi=[Function,Array],gE={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Fi,onEnter:Fi,onAfterEnter:Fi,onEnterCancelled:Fi,onBeforeLeave:Fi,onLeave:Fi,onAfterLeave:Fi,onLeaveCancelled:Fi,onBeforeAppear:Fi,onAppear:Fi,onAfterAppear:Fi,onAppearCancelled:Fi},pE=t=>{const e=t.subTree;return e.component?pE(e.component):e},TD={name:"BaseTransition",props:gE,setup(t,{slots:e}){const n=Bu(),i=fE();return()=>{const s=e.default&&m_(e.default(),!0);if(!s||!s.length)return;const r=mE(s),o=lt(t),{mode:a}=o;if(i.isLeaving)return Eg(r);const l=rb(r);if(!l)return Eg(r);let c=iu(l,o,i,n,f=>c=f);l.type!==Nn&&da(l,c);const u=n.subTree,d=u&&rb(u);if(d&&d.type!==Nn&&!Es(l,d)&&pE(n).type!==Nn){const f=iu(d,o,i,n);if(da(d,f),a==="out-in"&&l.type!==Nn)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave},Eg(r);a==="in-out"&&l.type!==Nn&&(f.delayLeave=(g,p,m)=>{const v=_E(i,d);v[String(d.key)]=d,g[Wr]=()=>{p(),g[Wr]=void 0,delete c.delayedLeave},c.delayedLeave=m})}return r}}};function mE(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Nn){e=n;break}}return e}const AD=TD;function _E(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function iu(t,e,n,i,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:g,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:v,onAppear:y,onAfterAppear:x,onAppearCancelled:E}=e,w=String(t.key),b=_E(n,t),C=(A,I)=>{A&&fs(A,i,9,I)},k=(A,I)=>{const V=I[1];C(A,I),Ke(A)?A.every(Y=>Y.length<=1)&&V():A.length<=1&&V()},T={mode:o,persisted:a,beforeEnter(A){let I=l;if(!n.isMounted)if(r)I=v||l;else return;A[Wr]&&A[Wr](!0);const V=b[w];V&&Es(t,V)&&V.el[Wr]&&V.el[Wr](),C(I,[A])},enter(A){let I=c,V=u,Y=d;if(!n.isMounted)if(r)I=y||c,V=x||u,Y=E||d;else return;let ne=!1;const N=A[Ed]=B=>{ne||(ne=!0,B?C(Y,[A]):C(V,[A]),T.delayedLeave&&T.delayedLeave(),A[Ed]=void 0)};I?k(I,[A,N]):N()},leave(A,I){const V=String(t.key);if(A[Ed]&&A[Ed](!0),n.isUnmounting)return I();C(f,[A]);let Y=!1;const ne=A[Wr]=N=>{Y||(Y=!0,I(),N?C(m,[A]):C(p,[A]),A[Wr]=void 0,b[V]===t&&delete b[V])};b[V]=t,g?k(g,[A,ne]):ne()},clone(A){const I=iu(A,e,n,i,s);return s&&s(I),I}};return T}function Eg(t){if(hf(t))return t=ro(t),t.children=null,t}function rb(t){if(!hf(t))return dE(t.type)&&t.children?mE(t.children):t;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&Je(n.default))return n.default()}}function da(t,e){t.shapeFlag&6&&t.component?(t.transition=e,da(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function m_(t,e=!1,n){let i=[],s=0;for(let r=0;r1)for(let r=0;rn.value,set:r=>n.value=r})}return n}function Vp(t,e,n,i,s=!1){if(Ke(t)){t.forEach((p,m)=>Vp(p,e&&(Ke(e)?e[m]:e),n,i,s));return}if(ll(i)&&!s)return;const r=i.shapeFlag&4?_f(i.component):i.el,o=s?null:r,{i:a,r:l}=t,c=e&&e.r,u=a.refs===Mt?a.refs={}:a.refs,d=a.setupState,f=lt(d),g=d===Mt?()=>!1:p=>xt(f,p);if(c!=null&&c!==l&&(Kt(c)?(u[c]=null,g(c)&&(d[c]=null)):Ht(c)&&(c.value=null)),Je(l))Nu(l,a,12,[o,u]);else{const p=Kt(l),m=Ht(l);if(p||m){const v=()=>{if(t.f){const y=p?g(l)?d[l]:u[l]:l.value;s?Ke(y)&&i_(y,r):Ke(y)?y.includes(r)||y.push(r):p?(u[l]=[r],g(l)&&(d[l]=u[l])):(l.value=[r],t.k&&(u[t.k]=l.value))}else p?(u[l]=o,g(l)&&(d[l]=o)):m&&(l.value=o,t.k&&(u[t.k]=o))};o?(v.id=-1,fi(v,n)):v()}}}const ll=t=>!!t.type.__asyncLoader,hf=t=>t.type.__isKeepAlive;function PD(t,e){yE(t,"a",e)}function MD(t,e){yE(t,"da",e)}function yE(t,e,n=Pn){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(ff(e,i,n),n){let s=n.parent;for(;s&&s.parent;)hf(s.parent.vnode)&&ID(i,e,n,s),s=s.parent}}function ID(t,e,n,i){const s=ff(e,t,i,!0);_o(()=>{i_(i[e],s)},n)}function ff(t,e,n=Pn,i=!1){if(n){const s=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...o)=>{po();const a=Vu(n),l=fs(e,n,t,o);return a(),mo(),l});return i?s.unshift(r):s.push(r),r}}const wr=t=>(e,n=Pn)=>{(!mf||t==="sp")&&ff(t,(...i)=>e(...i),n)},bE=wr("bm"),Vt=wr("m"),wE=wr("bu"),xE=wr("u"),EE=wr("bum"),_o=wr("um"),DD=wr("sp"),RD=wr("rtg"),$D=wr("rtc");function LD(t,e=Pn){ff("ec",t,e)}const CE="components";function Se(t,e){return kE(CE,t,!0,e)||t}const SE=Symbol.for("v-ndc");function _a(t){return Kt(t)?kE(CE,t,!1)||t:t||SE}function kE(t,e,n=!0,i=!1){const s=wn||Pn;if(s){const r=s.type;{const a=kR(r,!1);if(a&&(a===e||a===Ui(e)||a===of(Ui(e))))return r}const o=ob(s[t]||r[t],e)||ob(s.appContext[t],e);return!o&&i?r:o}}function ob(t,e){return t&&(t[e]||t[Ui(e)]||t[of(Ui(e))])}function Ge(t,e,n,i){let s;const r=n,o=Ke(t);if(o||Kt(t)){const a=o&&Qr(t);let l=!1;a&&(l=!Hi(t),t=lf(t)),s=new Array(t.length);for(let c=0,u=t.length;ce(a,l,void 0,r));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,c=a.length;l{const r=i.fn(...s);return r&&(r.key=i.key),r}:i.fn)}return t}function Fe(t,e,n={},i,s){if(wn.ce||wn.parent&&ll(wn.parent)&&wn.parent.ce)return e!=="default"&&(n.name=e),P(),Ce(Ie,null,[$("slot",n,i)],64);let r=t[e];r&&r._c&&(r._d=!1),P();const o=r&&TE(r(n)),a=Ce(Ie,{key:(n.key||o&&o.key||`_${e}`)+(!o&&i?"_fb":"")},o||[],o&&t._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function TE(t){return t.some(e=>bl(e)?!(e.type===Nn||e.type===Ie&&!TE(e.children)):!0)?t:null}const Wp=t=>t?GE(t)?_f(t):Wp(t.parent):null,Bc=vn(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Wp(t.parent),$root:t=>Wp(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>__(t),$forceUpdate:t=>t.f||(t.f=()=>{p_(t.update)}),$nextTick:t=>t.n||(t.n=Rn.bind(t.proxy)),$watch:t=>rR.bind(t)}),Cg=(t,e)=>t!==Mt&&!t.__isScriptSetup&&xt(t,e),OD={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const g=o[e];if(g!==void 0)switch(g){case 1:return i[e];case 2:return s[e];case 4:return n[e];case 3:return r[e]}else{if(Cg(i,e))return o[e]=1,i[e];if(s!==Mt&&xt(s,e))return o[e]=2,s[e];if((c=t.propsOptions[0])&&xt(c,e))return o[e]=3,r[e];if(n!==Mt&&xt(n,e))return o[e]=4,n[e];zp&&(o[e]=0)}}const u=Bc[e];let d,f;if(u)return e==="$attrs"&&qn(t.attrs,"get",""),u(t);if((d=a.__cssModules)&&(d=d[e]))return d;if(n!==Mt&&xt(n,e))return o[e]=4,n[e];if(f=l.config.globalProperties,xt(f,e))return f[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:r}=t;return Cg(s,e)?(s[e]=n,!0):i!==Mt&&xt(i,e)?(i[e]=n,!0):xt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:s,propsOptions:r}},o){let a;return!!n[o]||t!==Mt&&xt(t,o)||Cg(e,o)||(a=r[0])&&xt(a,o)||xt(i,o)||xt(Bc,o)||xt(s.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:xt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function va(){return AE().slots}function ND(){return AE().attrs}function AE(){const t=Bu();return t.setupContext||(t.setupContext=qE(t))}function ab(t){return Ke(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let zp=!0;function FD(t){const e=__(t),n=t.proxy,i=t.ctx;zp=!1,e.beforeCreate&&lb(e.beforeCreate,t,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:g,updated:p,activated:m,deactivated:v,beforeDestroy:y,beforeUnmount:x,destroyed:E,unmounted:w,render:b,renderTracked:C,renderTriggered:k,errorCaptured:T,serverPrefetch:A,expose:I,inheritAttrs:V,components:Y,directives:ne,filters:N}=e;if(c&&BD(c,i,null),o)for(const W in o){const X=o[W];Je(X)&&(i[W]=X.bind(n))}if(s){const W=s.call(n,n);It(W)&&(t.data=Ei(W))}if(zp=!0,r)for(const W in r){const X=r[W],J=Je(X)?X.bind(n,n):Je(X.get)?X.get.bind(n,n):$s,H=!Je(X)&&Je(X.set)?X.set.bind(n):$s,ce=ve({get:J,set:H});Object.defineProperty(i,W,{enumerable:!0,configurable:!0,get:()=>ce.value,set:ie=>ce.value=ie})}if(a)for(const W in a)PE(a[W],i,n,W);if(l){const W=Je(l)?l.call(n):l;Reflect.ownKeys(W).forEach(X=>{sh(X,W[X])})}u&&lb(u,t,"c");function R(W,X){Ke(X)?X.forEach(J=>W(J.bind(n))):X&&W(X.bind(n))}if(R(bE,d),R(Vt,f),R(wE,g),R(xE,p),R(PD,m),R(MD,v),R(LD,T),R($D,C),R(RD,k),R(EE,x),R(_o,w),R(DD,A),Ke(I))if(I.length){const W=t.exposed||(t.exposed={});I.forEach(X=>{Object.defineProperty(W,X,{get:()=>n[X],set:J=>n[X]=J})})}else t.exposed||(t.exposed={});b&&t.render===$s&&(t.render=b),V!=null&&(t.inheritAttrs=V),Y&&(t.components=Y),ne&&(t.directives=ne),A&&vE(t)}function BD(t,e,n=$s){Ke(t)&&(t=Yp(t));for(const i in t){const s=t[i];let r;It(s)?"default"in s?r=ji(s.from||i,s.default,!0):r=ji(s.from||i):r=ji(s),Ht(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function lb(t,e,n){fs(Ke(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function PE(t,e,n,i){let s=i.includes(".")?WE(n,i):()=>n[i];if(Kt(t)){const r=e[t];Je(r)&&jt(s,r)}else if(Je(t))jt(s,t.bind(n));else if(It(t))if(Ke(t))t.forEach(r=>PE(r,e,n,i));else{const r=Je(t.handler)?t.handler.bind(n):e[t.handler];Je(r)&&jt(s,r,t)}}function __(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=t.appContext,a=r.get(e);let l;return a?l=a:!s.length&&!n&&!i?l=e:(l={},s.length&&s.forEach(c=>bh(l,c,o,!0)),bh(l,e,o)),It(e)&&r.set(e,l),l}function bh(t,e,n,i=!1){const{mixins:s,extends:r}=e;r&&bh(t,r,n,!0),s&&s.forEach(o=>bh(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const a=VD[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const VD={data:cb,props:ub,emits:ub,methods:wc,computed:wc,beforeCreate:Jn,created:Jn,beforeMount:Jn,mounted:Jn,beforeUpdate:Jn,updated:Jn,beforeDestroy:Jn,beforeUnmount:Jn,destroyed:Jn,unmounted:Jn,activated:Jn,deactivated:Jn,errorCaptured:Jn,serverPrefetch:Jn,components:wc,directives:wc,watch:zD,provide:cb,inject:WD};function cb(t,e){return e?t?function(){return vn(Je(t)?t.call(this,this):t,Je(e)?e.call(this,this):e)}:e:t}function WD(t,e){return wc(Yp(t),Yp(e))}function Yp(t){if(Ke(t)){const e={};for(let n=0;n1)return n&&Je(e)?e.call(i&&i.proxy):e}}function jD(){return!!(Pn||wn||na)}const IE={},DE=()=>Object.create(IE),RE=t=>Object.getPrototypeOf(t)===IE;function KD(t,e,n,i=!1){const s={},r=DE();t.propsDefaults=Object.create(null),$E(t,e,s,r);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);n?t.props=i?s:eE(s):t.type.props?t.props=s:t.props=r,t.attrs=r}function UD(t,e,n,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=t,a=lt(s),[l]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let d=0;d{l=!0;const[f,g]=LE(d,e,!0);vn(o,f),g&&a.push(...g)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!r&&!l)return It(t)&&i.set(t,rl),rl;if(Ke(r))for(let u=0;ut[0]==="_"||t==="$stable",v_=t=>Ke(t)?t.map(is):[is(t)],XD=(t,e,n)=>{if(e._n)return e;const i=Pe((...s)=>v_(e(...s)),n);return i._c=!1,i},NE=(t,e,n)=>{const i=t._ctx;for(const s in t){if(OE(s))continue;const r=t[s];if(Je(r))e[s]=XD(s,r,i);else if(r!=null){const o=v_(r);e[s]=()=>o}}},FE=(t,e)=>{const n=v_(e);t.slots.default=()=>n},BE=(t,e,n)=>{for(const i in e)(n||i!=="_")&&(t[i]=e[i])},qD=(t,e,n)=>{const i=t.slots=DE();if(t.vnode.shapeFlag&32){const s=e._;s?(BE(i,e,n),n&&Dx(i,"_",s,!0)):NE(e,i)}else e&&FE(t,e)},ZD=(t,e,n)=>{const{vnode:i,slots:s}=t;let r=!0,o=Mt;if(i.shapeFlag&32){const a=e._;a?n&&a===1?r=!1:BE(s,e,n):(r=!e.$stable,NE(e,s)),o=e}else e&&(FE(t,e),o={default:1});if(r)for(const a in s)!OE(a)&&o[a]==null&&delete s[a]},fi=_R;function JD(t){return QD(t)}function QD(t,e){const n=$x();n.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:g=$s,insertStaticContent:p}=t,m=(S,O,K,U=null,oe=null,j=null,re=void 0,Q=null,ge=!!O.dynamicChildren)=>{if(S===O)return;S&&!Es(S,O)&&(U=L(S),ie(S,oe,j,!0),S=null),O.patchFlag===-2&&(ge=!1,O.dynamicChildren=null);const{type:be,ref:we,shapeFlag:Me}=O;switch(be){case pf:v(S,O,K,U);break;case Nn:y(S,O,K,U);break;case rh:S==null&&x(O,K,U,re);break;case Ie:Y(S,O,K,U,oe,j,re,Q,ge);break;default:Me&1?b(S,O,K,U,oe,j,re,Q,ge):Me&6?ne(S,O,K,U,oe,j,re,Q,ge):(Me&64||Me&128)&&be.process(S,O,K,U,oe,j,re,Q,ge,xe)}we!=null&&oe&&Vp(we,S&&S.ref,j,O||S,!O)},v=(S,O,K,U)=>{if(S==null)i(O.el=a(O.children),K,U);else{const oe=O.el=S.el;O.children!==S.children&&c(oe,O.children)}},y=(S,O,K,U)=>{S==null?i(O.el=l(O.children||""),K,U):O.el=S.el},x=(S,O,K,U)=>{[S.el,S.anchor]=p(S.children,O,K,U,S.el,S.anchor)},E=({el:S,anchor:O},K,U)=>{let oe;for(;S&&S!==O;)oe=f(S),i(S,K,U),S=oe;i(O,K,U)},w=({el:S,anchor:O})=>{let K;for(;S&&S!==O;)K=f(S),s(S),S=K;s(O)},b=(S,O,K,U,oe,j,re,Q,ge)=>{O.type==="svg"?re="svg":O.type==="math"&&(re="mathml"),S==null?C(O,K,U,oe,j,re,Q,ge):A(S,O,oe,j,re,Q,ge)},C=(S,O,K,U,oe,j,re,Q)=>{let ge,be;const{props:we,shapeFlag:Me,transition:De,dirs:Ye}=S;if(ge=S.el=o(S.type,j,we&&we.is,we),Me&8?u(ge,S.children):Me&16&&T(S.children,ge,null,U,oe,Sg(S,j),re,Q),Ye&&Ro(S,null,U,"created"),k(ge,S,S.scopeId,re,U),we){for(const nt in we)nt!=="value"&&!Lc(nt)&&r(ge,nt,null,we[nt],j,U);"value"in we&&r(ge,"value",null,we.value,j),(be=we.onVnodeBeforeMount)&&ys(be,U,S)}Ye&&Ro(S,null,U,"beforeMount");const je=eR(oe,De);je&&De.beforeEnter(ge),i(ge,O,K),((be=we&&we.onVnodeMounted)||je||Ye)&&fi(()=>{be&&ys(be,U,S),je&&De.enter(ge),Ye&&Ro(S,null,U,"mounted")},oe)},k=(S,O,K,U,oe)=>{if(K&&g(S,K),U)for(let j=0;j{for(let be=ge;be{const Q=O.el=S.el;let{patchFlag:ge,dynamicChildren:be,dirs:we}=O;ge|=S.patchFlag&16;const Me=S.props||Mt,De=O.props||Mt;let Ye;if(K&&$o(K,!1),(Ye=De.onVnodeBeforeUpdate)&&ys(Ye,K,O,S),we&&Ro(O,S,K,"beforeUpdate"),K&&$o(K,!0),(Me.innerHTML&&De.innerHTML==null||Me.textContent&&De.textContent==null)&&u(Q,""),be?I(S.dynamicChildren,be,Q,K,U,Sg(O,oe),j):re||X(S,O,Q,null,K,U,Sg(O,oe),j,!1),ge>0){if(ge&16)V(Q,Me,De,K,oe);else if(ge&2&&Me.class!==De.class&&r(Q,"class",null,De.class,oe),ge&4&&r(Q,"style",Me.style,De.style,oe),ge&8){const je=O.dynamicProps;for(let nt=0;nt{Ye&&ys(Ye,K,O,S),we&&Ro(O,S,K,"updated")},U)},I=(S,O,K,U,oe,j,re)=>{for(let Q=0;Q{if(O!==K){if(O!==Mt)for(const j in O)!Lc(j)&&!(j in K)&&r(S,j,O[j],null,oe,U);for(const j in K){if(Lc(j))continue;const re=K[j],Q=O[j];re!==Q&&j!=="value"&&r(S,j,Q,re,oe,U)}"value"in K&&r(S,"value",O.value,K.value,oe)}},Y=(S,O,K,U,oe,j,re,Q,ge)=>{const be=O.el=S?S.el:a(""),we=O.anchor=S?S.anchor:a("");let{patchFlag:Me,dynamicChildren:De,slotScopeIds:Ye}=O;Ye&&(Q=Q?Q.concat(Ye):Ye),S==null?(i(be,K,U),i(we,K,U),T(O.children||[],K,we,oe,j,re,Q,ge)):Me>0&&Me&64&&De&&S.dynamicChildren?(I(S.dynamicChildren,De,K,oe,j,re,Q),(O.key!=null||oe&&O===oe.subTree)&&y_(S,O,!0)):X(S,O,K,we,oe,j,re,Q,ge)},ne=(S,O,K,U,oe,j,re,Q,ge)=>{O.slotScopeIds=Q,S==null?O.shapeFlag&512?oe.ctx.activate(O,K,U,re,ge):N(O,K,U,oe,j,re,ge):B(S,O,ge)},N=(S,O,K,U,oe,j,re)=>{const Q=S.component=xR(S,U,oe);if(hf(S)&&(Q.ctx.renderer=xe),ER(Q,!1,re),Q.asyncDep){if(oe&&oe.registerDep(Q,R,re),!S.el){const ge=Q.subTree=$(Nn);y(null,ge,O,K)}}else R(Q,S,O,K,oe,j,re)},B=(S,O,K)=>{const U=O.component=S.component;if(dR(S,O,K))if(U.asyncDep&&!U.asyncResolved){W(U,O,K);return}else U.next=O,U.update();else O.el=S.el,U.vnode=O},R=(S,O,K,U,oe,j,re)=>{const Q=()=>{if(S.isMounted){let{next:Me,bu:De,u:Ye,parent:je,vnode:nt}=S;{const Gt=VE(S);if(Gt){Me&&(Me.el=nt.el,W(S,Me,re)),Gt.asyncDep.then(()=>{S.isUnmounted||Q()});return}}let et=Me,Jt;$o(S,!1),Me?(Me.el=nt.el,W(S,Me,re)):Me=nt,De&&nh(De),(Jt=Me.props&&Me.props.onVnodeBeforeUpdate)&&ys(Jt,je,Me,nt),$o(S,!0);const Wt=kg(S),gn=S.subTree;S.subTree=Wt,m(gn,Wt,d(gn.el),L(gn),S,oe,j),Me.el=Wt.el,et===null&&w_(S,Wt.el),Ye&&fi(Ye,oe),(Jt=Me.props&&Me.props.onVnodeUpdated)&&fi(()=>ys(Jt,je,Me,nt),oe)}else{let Me;const{el:De,props:Ye}=O,{bm:je,m:nt,parent:et,root:Jt,type:Wt}=S,gn=ll(O);if($o(S,!1),je&&nh(je),!gn&&(Me=Ye&&Ye.onVnodeBeforeMount)&&ys(Me,et,O),$o(S,!0),De&&fe){const Gt=()=>{S.subTree=kg(S),fe(De,S.subTree,S,oe,null)};gn&&Wt.__asyncHydrate?Wt.__asyncHydrate(De,S,Gt):Gt()}else{Jt.ce&&Jt.ce._injectChildStyle(Wt);const Gt=S.subTree=kg(S);m(null,Gt,K,U,S,oe,j),O.el=Gt.el}if(nt&&fi(nt,oe),!gn&&(Me=Ye&&Ye.onVnodeMounted)){const Gt=O;fi(()=>ys(Me,et,Gt),oe)}(O.shapeFlag&256||et&&ll(et.vnode)&&et.vnode.shapeFlag&256)&&S.a&&fi(S.a,oe),S.isMounted=!0,O=K=U=null}};S.scope.on();const ge=S.effect=new Vx(Q);S.scope.off();const be=S.update=ge.run.bind(ge),we=S.job=ge.runIfDirty.bind(ge);we.i=S,we.id=S.uid,ge.scheduler=()=>p_(we),$o(S,!0),be()},W=(S,O,K)=>{O.component=S;const U=S.vnode.props;S.vnode=O,S.next=null,UD(S,O.props,U,K),ZD(S,O.children,K),po(),nb(S),mo()},X=(S,O,K,U,oe,j,re,Q,ge=!1)=>{const be=S&&S.children,we=S?S.shapeFlag:0,Me=O.children,{patchFlag:De,shapeFlag:Ye}=O;if(De>0){if(De&128){H(be,Me,K,U,oe,j,re,Q,ge);return}else if(De&256){J(be,Me,K,U,oe,j,re,Q,ge);return}}Ye&8?(we&16&&ue(be,oe,j),Me!==be&&u(K,Me)):we&16?Ye&16?H(be,Me,K,U,oe,j,re,Q,ge):ue(be,oe,j,!0):(we&8&&u(K,""),Ye&16&&T(Me,K,U,oe,j,re,Q,ge))},J=(S,O,K,U,oe,j,re,Q,ge)=>{S=S||rl,O=O||rl;const be=S.length,we=O.length,Me=Math.min(be,we);let De;for(De=0;Dewe?ue(S,oe,j,!0,!1,Me):T(O,K,U,oe,j,re,Q,ge,Me)},H=(S,O,K,U,oe,j,re,Q,ge)=>{let be=0;const we=O.length;let Me=S.length-1,De=we-1;for(;be<=Me&&be<=De;){const Ye=S[be],je=O[be]=ge?zr(O[be]):is(O[be]);if(Es(Ye,je))m(Ye,je,K,null,oe,j,re,Q,ge);else break;be++}for(;be<=Me&&be<=De;){const Ye=S[Me],je=O[De]=ge?zr(O[De]):is(O[De]);if(Es(Ye,je))m(Ye,je,K,null,oe,j,re,Q,ge);else break;Me--,De--}if(be>Me){if(be<=De){const Ye=De+1,je=YeDe)for(;be<=Me;)ie(S[be],oe,j,!0),be++;else{const Ye=be,je=be,nt=new Map;for(be=je;be<=De;be++){const Qt=O[be]=ge?zr(O[be]):is(O[be]);Qt.key!=null&&nt.set(Qt.key,be)}let et,Jt=0;const Wt=De-je+1;let gn=!1,Gt=0;const Ci=new Array(Wt);for(be=0;be=Wt){ie(Qt,oe,j,!0);continue}let ae;if(Qt.key!=null)ae=nt.get(Qt.key);else for(et=je;et<=De;et++)if(Ci[et-je]===0&&Es(Qt,O[et])){ae=et;break}ae===void 0?ie(Qt,oe,j,!0):(Ci[ae-je]=be+1,ae>=Gt?Gt=ae:gn=!0,m(Qt,O[ae],K,null,oe,j,re,Q,ge),Jt++)}const qi=gn?tR(Ci):rl;for(et=qi.length-1,be=Wt-1;be>=0;be--){const Qt=je+be,ae=O[Qt],Te=Qt+1{const{el:j,type:re,transition:Q,children:ge,shapeFlag:be}=S;if(be&6){ce(S.component.subTree,O,K,U);return}if(be&128){S.suspense.move(O,K,U);return}if(be&64){re.move(S,O,K,xe);return}if(re===Ie){i(j,O,K);for(let Me=0;MeQ.enter(j),oe);else{const{leave:Me,delayLeave:De,afterLeave:Ye}=Q,je=()=>i(j,O,K),nt=()=>{Me(j,()=>{je(),Ye&&Ye()})};De?De(j,je,nt):nt()}else i(j,O,K)},ie=(S,O,K,U=!1,oe=!1)=>{const{type:j,props:re,ref:Q,children:ge,dynamicChildren:be,shapeFlag:we,patchFlag:Me,dirs:De,cacheIndex:Ye}=S;if(Me===-2&&(oe=!1),Q!=null&&Vp(Q,null,K,S,!0),Ye!=null&&(O.renderCache[Ye]=void 0),we&256){O.ctx.deactivate(S);return}const je=we&1&&De,nt=!ll(S);let et;if(nt&&(et=re&&re.onVnodeBeforeUnmount)&&ys(et,O,S),we&6)ee(S.component,K,U);else{if(we&128){S.suspense.unmount(K,U);return}je&&Ro(S,null,O,"beforeUnmount"),we&64?S.type.remove(S,O,K,xe,U):be&&!be.hasOnce&&(j!==Ie||Me>0&&Me&64)?ue(be,O,K,!1,!0):(j===Ie&&Me&384||!oe&&we&16)&&ue(ge,O,K),U&&te(S)}(nt&&(et=re&&re.onVnodeUnmounted)||je)&&fi(()=>{et&&ys(et,O,S),je&&Ro(S,null,O,"unmounted")},K)},te=S=>{const{type:O,el:K,anchor:U,transition:oe}=S;if(O===Ie){D(K,U);return}if(O===rh){w(S);return}const j=()=>{s(K),oe&&!oe.persisted&&oe.afterLeave&&oe.afterLeave()};if(S.shapeFlag&1&&oe&&!oe.persisted){const{leave:re,delayLeave:Q}=oe,ge=()=>re(K,j);Q?Q(S.el,j,ge):ge()}else j()},D=(S,O)=>{let K;for(;S!==O;)K=f(S),s(S),S=K;s(O)},ee=(S,O,K)=>{const{bum:U,scope:oe,job:j,subTree:re,um:Q,m:ge,a:be}=S;hb(ge),hb(be),U&&nh(U),oe.stop(),j&&(j.flags|=8,ie(re,S,O,K)),Q&&fi(Q,O),fi(()=>{S.isUnmounted=!0},O),O&&O.pendingBranch&&!O.isUnmounted&&S.asyncDep&&!S.asyncResolved&&S.suspenseId===O.pendingId&&(O.deps--,O.deps===0&&O.resolve())},ue=(S,O,K,U=!1,oe=!1,j=0)=>{for(let re=j;re{if(S.shapeFlag&6)return L(S.component.subTree);if(S.shapeFlag&128)return S.suspense.next();const O=f(S.anchor||S.el),K=O&&O[uE];return K?f(K):O};let le=!1;const de=(S,O,K)=>{S==null?O._vnode&&ie(O._vnode,null,null,!0):m(O._vnode||null,S,O,null,null,null,K),O._vnode=S,le||(le=!0,nb(),aE(),le=!1)},xe={p:m,um:ie,m:ce,r:te,mt:N,mc:T,pc:X,pbc:I,n:L,o:t};let z,fe;return{render:de,hydrate:z,createApp:HD(de,z)}}function Sg({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function $o({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function eR(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function y_(t,e,n=!1){const i=t.children,s=e.children;if(Ke(i)&&Ke(s))for(let r=0;r>1,t[n[a]]0&&(e[i]=n[r-1]),n[r]=i)}}for(r=n.length,o=n[r-1];r-- >0;)n[r]=o,o=e[o];return n}function VE(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:VE(e)}function hb(t){if(t)for(let e=0;eji(nR);function sR(t,e){return b_(t,null,{flush:"post"})}function jt(t,e,n){return b_(t,e,n)}function b_(t,e,n=Mt){const{immediate:i,deep:s,flush:r,once:o}=n,a=vn({},n);let l;if(mf)if(r==="sync"){const f=iR();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!e||i)a.once=!0;else{const f=()=>{};return f.stop=$s,f.resume=$s,f.pause=$s,f}const c=Pn;a.call=(f,g,p)=>fs(f,c,g,p);let u=!1;r==="post"?a.scheduler=f=>{fi(f,c&&c.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(f,g)=>{g?f():p_(f)}),a.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const d=bD(t,e,a);return l&&l.push(d),d}function rR(t,e,n){const i=this.proxy,s=Kt(t)?t.includes(".")?WE(i,t):()=>i[t]:t.bind(i,i);let r;Je(e)?r=e:(r=e.handler,n=e);const o=Vu(this),a=b_(s,r.bind(i),n);return o(),a}function WE(t,e){const n=e.split(".");return()=>{let i=t;for(let s=0;se==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Ui(e)}Modifiers`]||t[`${go(e)}Modifiers`];function aR(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||Mt;let s=n;const r=e.startsWith("update:"),o=r&&oR(i,e.slice(7));o&&(o.trim&&(s=n.map(u=>Kt(u)?u.trim():u)),o.number&&(s=n.map(ph)));let a,l=i[a=vg(e)]||i[a=vg(Ui(e))];!l&&r&&(l=i[a=vg(go(e))]),l&&fs(l,t,6,s);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,fs(c,t,6,s)}}function zE(t,e,n=!1){const i=e.emitsCache,s=i.get(t);if(s!==void 0)return s;const r=t.emits;let o={},a=!1;if(!Je(t)){const l=c=>{const u=zE(c,e,!0);u&&(a=!0,vn(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!a?(It(t)&&i.set(t,null),null):(Ke(r)?r.forEach(l=>o[l]=null):vn(o,r),It(t)&&i.set(t,o),o)}function gf(t,e){return!t||!sf(e)?!1:(e=e.slice(2).replace(/Once$/,""),xt(t,e[0].toLowerCase()+e.slice(1))||xt(t,go(e))||xt(t,e))}function kg(t){const{type:e,vnode:n,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:g,ctx:p,inheritAttrs:m}=t,v=yh(t);let y,x;try{if(n.shapeFlag&4){const w=s||i,b=w;y=is(c.call(b,w,u,d,g,f,p)),x=a}else{const w=e;y=is(w.length>1?w(d,{attrs:a,slots:o,emit:l}):w(d,null)),x=e.props?a:cR(a)}}catch(w){Vc.length=0,Fu(w,t,1),y=$(Nn)}let E=y;if(x&&m!==!1){const w=Object.keys(x),{shapeFlag:b}=E;w.length&&b&7&&(r&&w.some(n_)&&(x=uR(x,r)),E=ro(E,x,!1,!0))}return n.dirs&&(E=ro(E,null,!1,!0),E.dirs=E.dirs?E.dirs.concat(n.dirs):n.dirs),n.transition&&da(E,n.transition),y=E,yh(v),y}function lR(t,e=!0){let n;for(let i=0;i{let e;for(const n in t)(n==="class"||n==="style"||sf(n))&&((e||(e={}))[n]=t[n]);return e},uR=(t,e)=>{const n={};for(const i in t)(!n_(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function dR(t,e,n){const{props:i,children:s,component:r}=t,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?fb(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let d=0;dt.__isSuspense;let jp=0;const hR={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,r,o,a,l,c){if(t==null)fR(e,n,i,s,r,o,a,l,c);else{if(r&&r.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}gR(t,e,n,i,s,o,a,l,c)}},hydrate:pR,normalize:mR},x_=hR;function su(t,e){const n=t.props&&t.props[e];Je(n)&&n()}function fR(t,e,n,i,s,r,o,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),f=t.suspense=HE(t,s,i,e,d,n,r,o,a,l);c(null,f.pendingBranch=t.ssContent,d,null,i,f,r,o),f.deps>0?(su(t,"onPending"),su(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,r,o),cl(f,t.ssFallback)):f.resolve(!1,!0)}function gR(t,e,n,i,s,r,o,a,{p:l,um:c,o:{createElement:u}}){const d=e.suspense=t.suspense;d.vnode=e,e.el=t.el;const f=e.ssContent,g=e.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:v,isHydrating:y}=d;if(m)d.pendingBranch=f,Es(f,m)?(l(m,f,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0?d.resolve():v&&(y||(l(p,g,n,i,s,null,r,o,a),cl(d,g)))):(d.pendingId=jp++,y?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),v?(l(null,f,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0?d.resolve():(l(p,g,n,i,s,null,r,o,a),cl(d,g))):p&&Es(f,p)?(l(p,f,n,i,s,d,r,o,a),d.resolve(!0)):(l(null,f,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0&&d.resolve()));else if(p&&Es(f,p))l(p,f,n,i,s,d,r,o,a),cl(d,f);else if(su(e,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=jp++,l(null,f,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0)d.resolve();else{const{timeout:x,pendingId:E}=d;x>0?setTimeout(()=>{d.pendingId===E&&d.fallback(g)},x):x===0&&d.fallback(g)}}function HE(t,e,n,i,s,r,o,a,l,c,u=!1){const{p:d,m:f,um:g,n:p,o:{parentNode:m,remove:v}}=c;let y;const x=vR(t);x&&e&&e.pendingBranch&&(y=e.pendingId,e.deps++);const E=t.props?Rx(t.props.timeout):void 0,w=r,b={vnode:t,parent:e,parentComponent:n,namespace:o,container:i,hiddenContainer:s,deps:0,pendingId:jp++,timeout:typeof E=="number"?E:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(C=!1,k=!1){const{vnode:T,activeBranch:A,pendingBranch:I,pendingId:V,effects:Y,parentComponent:ne,container:N}=b;let B=!1;b.isHydrating?b.isHydrating=!1:C||(B=A&&I.transition&&I.transition.mode==="out-in",B&&(A.transition.afterLeave=()=>{V===b.pendingId&&(f(I,N,r===w?p(A):r,0),Np(Y))}),A&&(m(A.el)===N&&(r=p(A)),g(A,ne,b,!0)),B||f(I,N,r,0)),cl(b,I),b.pendingBranch=null,b.isInFallback=!1;let R=b.parent,W=!1;for(;R;){if(R.pendingBranch){R.effects.push(...Y),W=!0;break}R=R.parent}!W&&!B&&Np(Y),b.effects=[],x&&e&&e.pendingBranch&&y===e.pendingId&&(e.deps--,e.deps===0&&!k&&e.resolve()),su(T,"onResolve")},fallback(C){if(!b.pendingBranch)return;const{vnode:k,activeBranch:T,parentComponent:A,container:I,namespace:V}=b;su(k,"onFallback");const Y=p(T),ne=()=>{b.isInFallback&&(d(null,C,I,Y,A,null,V,a,l),cl(b,C))},N=C.transition&&C.transition.mode==="out-in";N&&(T.transition.afterLeave=ne),b.isInFallback=!0,g(T,A,null,!0),N||ne()},move(C,k,T){b.activeBranch&&f(b.activeBranch,C,k,T),b.container=C},next(){return b.activeBranch&&p(b.activeBranch)},registerDep(C,k,T){const A=!!b.pendingBranch;A&&b.deps++;const I=C.vnode.el;C.asyncDep.catch(V=>{Fu(V,C,0)}).then(V=>{if(C.isUnmounted||b.isUnmounted||b.pendingId!==C.suspenseId)return;C.asyncResolved=!0;const{vnode:Y}=C;Up(C,V,!1),I&&(Y.el=I);const ne=!I&&C.subTree.el;k(C,Y,m(I||C.subTree.el),I?null:p(C.subTree),b,o,T),ne&&v(ne),w_(C,Y.el),A&&--b.deps===0&&b.resolve()})},unmount(C,k){b.isUnmounted=!0,b.activeBranch&&g(b.activeBranch,n,C,k),b.pendingBranch&&g(b.pendingBranch,n,C,k)}};return b}function pR(t,e,n,i,s,r,o,a,l){const c=e.suspense=HE(e,i,n,t.parentNode,document.createElement("div"),null,s,r,o,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,r,o);return c.deps===0&&c.resolve(!1,!0),u}function mR(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=gb(i?n.default:n),t.ssFallback=i?gb(n.fallback):$(Nn)}function gb(t){let e;if(Je(t)){const n=yl&&t._c;n&&(t._d=!1,P()),t=t(),n&&(t._d=!0,e=bi,jE())}return Ke(t)&&(t=lR(t)),t=is(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function _R(t,e){e&&e.pendingBranch?Ke(t)?e.effects.push(...t):e.effects.push(t):Np(t)}function cl(t,e){t.activeBranch=e;const{vnode:n,parentComponent:i}=t;let s=e.el;for(;!s&&e.component;)e=e.component.subTree,s=e.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,w_(i,s))}function vR(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const Ie=Symbol.for("v-fgt"),pf=Symbol.for("v-txt"),Nn=Symbol.for("v-cmt"),rh=Symbol.for("v-stc"),Vc=[];let bi=null;function P(t=!1){Vc.push(bi=t?null:[])}function jE(){Vc.pop(),bi=Vc[Vc.length-1]||null}let yl=1;function pb(t){yl+=t,t<0&&bi&&(bi.hasOnce=!0)}function KE(t){return t.dynamicChildren=yl>0?bi||rl:null,jE(),yl>0&&bi&&bi.push(t),t}function F(t,e,n,i,s,r){return KE(h(t,e,n,i,s,r,!0))}function Ce(t,e,n,i,s){return KE($(t,e,n,i,s,!0))}function bl(t){return t?t.__v_isVNode===!0:!1}function Es(t,e){return t.type===e.type&&t.key===e.key}const UE=({key:t})=>t??null,oh=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Kt(t)||Ht(t)||Je(t)?{i:wn,r:t,k:e,f:!!n}:t:null);function h(t,e=null,n=null,i=0,s=null,r=t===Ie?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&UE(e),ref:e&&oh(e),scopeId:cE,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:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:wn};return a?(E_(l,n),r&128&&t.normalize(l)):n&&(l.shapeFlag|=Kt(n)?8:16),yl>0&&!o&&bi&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&bi.push(l),l}const $=yR;function yR(t,e=null,n=null,i=0,s=null,r=!1){if((!t||t===SE)&&(t=Nn),bl(t)){const a=ro(t,e,!0);return n&&E_(a,n),yl>0&&!r&&bi&&(a.shapeFlag&6?bi[bi.indexOf(t)]=a:bi.push(a)),a.patchFlag=-2,a}if(TR(t)&&(t=t.__vccOpts),e){e=ii(e);let{class:a,style:l}=e;a&&!Kt(a)&&(e.class=Ee(a)),It(l)&&(Ou(l)&&!Ke(l)&&(l=vn({},l)),e.style=Mn(l))}const o=Kt(t)?1:YE(t)?128:dE(t)?64:It(t)?4:Je(t)?2:0;return h(t,e,n,i,s,o,r,!0)}function ii(t){return t?Ou(t)||RE(t)?vn({},t):t:null}function ro(t,e,n=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=t,c=e?xn(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&UE(c),ref:e&&e.ref?n&&r?Ke(r)?r.concat(oh(e)):[r,oh(e)]:oh(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Ie?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ro(t.ssContent),ssFallback:t.ssFallback&&ro(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&da(u,l.clone(u)),u}function Be(t=" ",e=0){return $(pf,null,t,e)}function se(t="",e=!1){return e?(P(),Ce(Nn,null,t)):$(Nn,null,t)}function is(t){return t==null||typeof t=="boolean"?$(Nn):Ke(t)?$(Ie,null,t.slice()):bl(t)?zr(t):$(pf,null,String(t))}function zr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:ro(t)}function E_(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(Ke(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),E_(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!RE(e)?e._ctx=wn:s===3&&wn&&(wn.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Je(e)?(e={default:e,_ctx:wn},n=32):(e=String(e),i&64?(n=16,e=[Be(e)]):n=8);t.children=e,t.shapeFlag|=n}function xn(...t){const e={};for(let n=0;nPn||wn;let wh,Kp;{const t=$x(),e=(n,i)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};wh=e("__VUE_INSTANCE_SETTERS__",n=>Pn=n),Kp=e("__VUE_SSR_SETTERS__",n=>mf=n)}const Vu=t=>{const e=Pn;return wh(t),t.scope.on(),()=>{t.scope.off(),wh(e)}},mb=()=>{Pn&&Pn.scope.off(),wh(null)};function GE(t){return t.vnode.shapeFlag&4}let mf=!1;function ER(t,e=!1,n=!1){e&&Kp(e);const{props:i,children:s}=t.vnode,r=GE(t);KD(t,i,r,e),qD(t,s,n);const o=r?CR(t,e):void 0;return e&&Kp(!1),o}function CR(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,OD);const{setup:i}=n;if(i){const s=t.setupContext=i.length>1?qE(t):null,r=Vu(t);po();const o=Nu(i,t,0,[t.props,s]);if(mo(),r(),Px(o)){if(ll(t)||vE(t),o.then(mb,mb),e)return o.then(a=>{Up(t,a,e)}).catch(a=>{Fu(a,t,0)});t.asyncDep=o}else Up(t,o,e)}else XE(t,e)}function Up(t,e,n){Je(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:It(e)&&(t.setupState=iE(e)),XE(t,n)}let _b;function XE(t,e,n){const i=t.type;if(!t.render){if(!e&&_b&&!i.render){const s=i.template||__(t).template;if(s){const{isCustomElement:r,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=vn(vn({isCustomElement:r,delimiters:a},o),l);i.render=_b(s,c)}}t.render=i.render||$s}{const s=Vu(t);po();try{FD(t)}finally{mo(),s()}}}const SR={get(t,e){return qn(t,"get",""),t[e]}};function qE(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,SR),slots:t.slots,emit:t.emit,expose:e}}function _f(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(iE(uf(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Bc)return Bc[n](t)},has(e,n){return n in e||n in Bc}})):t.proxy}function kR(t,e=!0){return Je(t)?t.displayName||t.name:t.name||e&&t.__name}function TR(t){return Je(t)&&"__vccOpts"in t}const ve=(t,e)=>vD(t,e,mf);function ha(t,e,n){const i=arguments.length;return i===2?It(e)&&!Ke(e)?bl(e)?$(t,null,[e]):$(t,e):$(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&bl(n)&&(n=[n]),$(t,e,n))}const ZE="3.5.11";/** +**/function Us(e,t,n,s){try{return s?e(...s):e()}catch(r){Ys(r,t,n)}}function Et(e,t,n,s){if(ie(e)){const r=Us(e,t,n,s);return r&&$c(r)&&r.catch(o=>{Ys(o,t,n)}),r}if(te(e)){const r=[];for(let o=0;o>>1,r=Ge[s],o=Ms(r);o=Ms(n)?Ge.push(e):Ge.splice(e_(t),0,e),e.flags|=1,uu()}}function uu(){Dr||(Dr=cu.then(du))}function Ki(e){te(e)?qn.push(...e):Xt&&e.id===-1?Xt.splice(Kn+1,0,e):e.flags&1||(qn.push(e),e.flags|=1),uu()}function Za(e,t,n=Tt+1){for(;nMs(n)-Ms(s));if(qn.length=0,Xt){Xt.push(...t);return}for(Xt=t,Kn=0;Kne.id==null?e.flags&2?-1:1/0:e.id;function du(e){try{for(Tt=0;Tt{s._d&&dl(-1);const o=Lr(t);let a;try{a=e(...r)}finally{Lr(o),s._d&&dl(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function Wb(e,t){if(Oe===null)return e;const n=si(Oe),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Ns=e=>e&&(e.disabled||e.disabled===""),t_=e=>e&&(e.defer||e.defer===""),el=e=>typeof SVGElement<"u"&&e instanceof SVGElement,tl=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ui=(e,t)=>{const n=e&&e.to;return be(n)?t?t(n):null:n},n_={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,a,l,c,h){const{mc:f,pc:d,pbc:p,o:{insert:E,querySelector:A,createText:C,createComment:k}}=h,I=Ns(t.props);let{shapeFlag:R,children:F,dynamicChildren:$}=t;if(e==null){const O=t.el=C(""),V=t.anchor=C("");E(O,n,s),E(V,n,s);const Y=(w,P)=>{R&16&&(r&&r.isCE&&(r.ce._teleportTarget=w),f(F,w,P,r,o,a,l,c))},K=()=>{const w=t.target=Ui(t.props,A),P=mu(w,t,C,E);w&&(a!=="svg"&&el(w)?a="svg":a!=="mathml"&&tl(w)&&(a="mathml"),I||(Y(w,P),Ar(t)))};I&&(Y(n,V),Ar(t)),t_(t.props)?Je(K,o):K()}else{t.el=e.el,t.targetStart=e.targetStart;const O=t.anchor=e.anchor,V=t.target=e.target,Y=t.targetAnchor=e.targetAnchor,K=Ns(e.props),w=K?n:V,P=K?O:Y;if(a==="svg"||el(V)?a="svg":(a==="mathml"||tl(V))&&(a="mathml"),$?(p(e.dynamicChildren,$,w,r,o,a,l),Bo(e,t,!0)):c||d(e,t,w,P,r,o,a,l,!1),I)K?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):gr(t,n,O,h,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const z=t.target=Ui(t.props,A);z&&gr(t,z,null,h,0)}else K&&gr(t,V,Y,h,1);Ar(t)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:a,children:l,anchor:c,targetStart:h,targetAnchor:f,target:d,props:p}=e;if(d&&(r(h),r(f)),o&&r(c),a&16){const E=o||!Ns(p);for(let A=0;A{e.isMounted=!0}),Ou(()=>{e.isUnmounting=!0}),e}const lt=[Function,Array],vu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:lt,onEnter:lt,onAfterEnter:lt,onEnterCancelled:lt,onBeforeLeave:lt,onLeave:lt,onAfterLeave:lt,onLeaveCancelled:lt,onBeforeAppear:lt,onAppear:lt,onAfterAppear:lt,onAppearCancelled:lt},Eu=e=>{const t=e.subTree;return t.component?Eu(t.component):t},r_={name:"BaseTransition",props:vu,setup(e,{slots:t}){const n=Gs(),s=_u();return()=>{const r=t.default&&Mo(t.default(),!0);if(!r||!r.length)return;const o=bu(r),a=fe(e),{mode:l}=a;if(s.isLeaving)return Ni(o);const c=nl(o);if(!c)return Ni(o);let h=ks(c,a,s,n,p=>h=p);c.type!==Ie&&Dn(c,h);const f=n.subTree,d=f&&nl(f);if(d&&d.type!==Ie&&!Ct(c,d)&&Eu(n).type!==Ie){const p=ks(d,a,s,n);if(Dn(d,p),l==="out-in"&&c.type!==Ie)return s.isLeaving=!0,p.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete p.afterLeave},Ni(o);l==="in-out"&&c.type!==Ie&&(p.delayLeave=(E,A,C)=>{const k=yu(s,d);k[String(d.key)]=d,E[Qt]=()=>{A(),E[Qt]=void 0,delete h.delayedLeave},h.delayedLeave=C})}return o}}};function bu(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ie){t=n;break}}return t}const i_=r_;function yu(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function ks(e,t,n,s,r){const{appear:o,mode:a,persisted:l=!1,onBeforeEnter:c,onEnter:h,onAfterEnter:f,onEnterCancelled:d,onBeforeLeave:p,onLeave:E,onAfterLeave:A,onLeaveCancelled:C,onBeforeAppear:k,onAppear:I,onAfterAppear:R,onAppearCancelled:F}=t,$=String(e.key),O=yu(n,e),V=(w,P)=>{w&&Et(w,s,9,P)},Y=(w,P)=>{const z=P[1];V(w,P),te(w)?w.every(H=>H.length<=1)&&z():w.length<=1&&z()},K={mode:a,persisted:l,beforeEnter(w){let P=c;if(!n.isMounted)if(o)P=k||c;else return;w[Qt]&&w[Qt](!0);const z=O[$];z&&Ct(e,z)&&z.el[Qt]&&z.el[Qt](),V(P,[w])},enter(w){let P=h,z=f,H=d;if(!n.isMounted)if(o)P=I||h,z=R||f,H=F||d;else return;let Q=!1;const ce=w[mr]=me=>{Q||(Q=!0,me?V(H,[w]):V(z,[w]),K.delayedLeave&&K.delayedLeave(),w[mr]=void 0)};P?Y(P,[w,ce]):ce()},leave(w,P){const z=String(e.key);if(w[mr]&&w[mr](!0),n.isUnmounting)return P();V(p,[w]);let H=!1;const Q=w[Qt]=ce=>{H||(H=!0,P(),ce?V(C,[w]):V(A,[w]),w[Qt]=void 0,O[z]===e&&delete O[z])};O[z]=e,E?Y(E,[w,Q]):Q()},clone(w){const P=ks(w,t,n,s,r);return r&&r(P),P}};return K}function Ni(e){if(Jr(e))return e=rn(e),e.children=null,e}function nl(e){if(!Jr(e))return gu(e.type)&&e.children?bu(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ie(n.default))return n.default()}}function Dn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dn(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 Mo(e,t=!1,n){let s=[],r=0;for(let o=0;o1)for(let o=0;on.value,set:o=>n.value=o})}return n}function Yi(e,t,n,s,r=!1){if(te(e)){e.forEach((A,C)=>Yi(A,t&&(te(t)?t[C]:t),n,s,r));return}if(zn(s)&&!r)return;const o=s.shapeFlag&4?si(s.component):s.el,a=r?null:o,{i:l,r:c}=e,h=t&&t.r,f=l.refs===_e?l.refs={}:l.refs,d=l.setupState,p=fe(d),E=d===_e?()=>!1:A=>he(p,A);if(h!=null&&h!==c&&(be(h)?(f[h]=null,E(h)&&(d[h]=null)):Ae(h)&&(h.value=null)),ie(c))Us(c,l,12,[a,f]);else{const A=be(c),C=Ae(c);if(A||C){const k=()=>{if(e.f){const I=A?E(c)?d[c]:f[c]:c.value;r?te(I)&&To(I,o):te(I)?I.includes(o)||I.push(o):A?(f[c]=[o],E(c)&&(d[c]=f[c])):(c.value=[o],e.k&&(f[e.k]=c.value))}else A?(f[c]=a,E(c)&&(d[c]=a)):C&&(c.value=a,e.k&&(f[e.k]=a))};a?(k.id=-1,Je(k,n)):k()}}}const zn=e=>!!e.type.__asyncLoader,Jr=e=>e.type.__isKeepAlive;function o_(e,t){Cu(e,"a",t)}function a_(e,t){Cu(e,"da",t)}function Cu(e,t,n=xe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Zr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Jr(r.parent.vnode)&&l_(s,t,n,r),r=r.parent}}function l_(e,t,n,s){const r=Zr(t,e,s,!0);Vo(()=>{To(s[t],r)},n)}function Zr(e,t,n=xe,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{cn();const l=qs(n),c=Et(t,n,e,a);return l(),un(),c});return s?r.unshift(o):r.push(o),o}}const jt=e=>(t,n=xe)=>{(!ni||e==="sp")&&Zr(e,(...s)=>t(...s),n)},wu=jt("bm"),ko=jt("m"),c_=jt("bu"),Su=jt("u"),Ou=jt("bum"),Vo=jt("um"),u_=jt("sp"),f_=jt("rtg"),d_=jt("rtc");function h_(e,t=xe){Zr("ec",e,t)}const Nu="components";function Yb(e,t){return $u(Nu,e,!0,t)||e}const xu=Symbol.for("v-ndc");function p_(e){return be(e)?$u(Nu,e,!1)||e:e||xu}function $u(e,t,n=!0,s=!1){const r=Oe||xe;if(r){const o=r.type;{const l=lv(o,!1);if(l&&(l===t||l===ht(t)||l===Kr(ht(t))))return o}const a=sl(r[e]||o[e],t)||sl(r.appContext[e],t);return!a&&s?o:a}}function sl(e,t){return e&&(e[t]||e[ht(t)]||e[Kr(ht(t))])}function Gb(e,t,n,s){let r;const o=n,a=te(e);if(a||be(e)){const l=a&&nn(e);let c=!1;l&&(c=!ut(e),e=Gr(e)),r=new Array(e.length);for(let h=0,f=e.length;ht(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,h=l.length;c{const o=s.fn(...r);return o&&(o.key=s.key),o}:s.fn)}return e}function zb(e,t,n={},s,r){if(Oe.ce||Oe.parent&&zn(Oe.parent)&&Oe.parent.ce)return t!=="default"&&(n.name=t),en(),Fs(Ve,null,[$e("slot",n,s)],64);let o=e[t];o&&o._c&&(o._d=!1),en();const a=o&&Du(o(n)),l=Fs(Ve,{key:(n.key||a&&a.key||`_${t}`)+(!a&&s?"_fb":"")},a||[],a&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function Du(e){return e.some(t=>rs(t)?!(t.type===Ie||t.type===Ve&&!Du(t.children)):!0)?e:null}const Gi=e=>e?Zu(e)?si(e):Gi(e.parent):null,xs=Se(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=>Gi(e.parent),$root:e=>Gi(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Fo(e),$forceUpdate:e=>e.f||(e.f=()=>{Po(e.update)}),$nextTick:e=>e.n||(e.n=Qr.bind(e.proxy)),$watch:e=>k_.bind(e)}),xi=(e,t)=>e!==_e&&!e.__isScriptSetup&&he(e,t),g_={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:a,type:l,appContext:c}=e;let h;if(t[0]!=="$"){const E=a[t];if(E!==void 0)switch(E){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(xi(s,t))return a[t]=1,s[t];if(r!==_e&&he(r,t))return a[t]=2,r[t];if((h=e.propsOptions[0])&&he(h,t))return a[t]=3,o[t];if(n!==_e&&he(n,t))return a[t]=4,n[t];qi&&(a[t]=0)}}const f=xs[t];let d,p;if(f)return t==="$attrs"&&Fe(e.attrs,"get",""),f(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==_e&&he(n,t))return a[t]=4,n[t];if(p=c.config.globalProperties,he(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return xi(r,t)?(r[t]=n,!0):s!==_e&&he(s,t)?(s[t]=n,!0):he(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},a){let l;return!!n[a]||e!==_e&&he(e,a)||xi(t,a)||(l=o[0])&&he(l,a)||he(s,a)||he(xs,a)||he(r.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:he(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Xb(){return Lu().slots}function Qb(){return Lu().attrs}function Lu(){const e=Gs();return e.setupContext||(e.setupContext=tf(e))}function rl(e){return te(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let qi=!0;function m_(e){const t=Fo(e),n=e.proxy,s=e.ctx;qi=!1,t.beforeCreate&&il(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:a,watch:l,provide:c,inject:h,created:f,beforeMount:d,mounted:p,beforeUpdate:E,updated:A,activated:C,deactivated:k,beforeDestroy:I,beforeUnmount:R,destroyed:F,unmounted:$,render:O,renderTracked:V,renderTriggered:Y,errorCaptured:K,serverPrefetch:w,expose:P,inheritAttrs:z,components:H,directives:Q,filters:ce}=t;if(h&&__(h,s,null),a)for(const Z in a){const le=a[Z];ie(le)&&(s[Z]=le.bind(n))}if(r){const Z=r.call(n,n);ve(Z)&&(e.data=Ks(Z))}if(qi=!0,o)for(const Z in o){const le=o[Z],Ce=ie(le)?le.bind(n,n):ie(le.get)?le.get.bind(n,n):St,He=!ie(le)&&ie(le.set)?le.set.bind(n):St,De=nt({get:Ce,set:He});Object.defineProperty(s,Z,{enumerable:!0,configurable:!0,get:()=>De.value,set:ye=>De.value=ye})}if(l)for(const Z in l)Ru(l[Z],s,n,Z);if(c){const Z=ie(c)?c.call(n):c;Reflect.ownKeys(Z).forEach(le=>{Tr(le,Z[le])})}f&&il(f,e,"c");function re(Z,le){te(le)?le.forEach(Ce=>Z(Ce.bind(n))):le&&Z(le.bind(n))}if(re(wu,d),re(ko,p),re(c_,E),re(Su,A),re(o_,C),re(a_,k),re(h_,K),re(d_,V),re(f_,Y),re(Ou,R),re(Vo,$),re(u_,w),te(P))if(P.length){const Z=e.exposed||(e.exposed={});P.forEach(le=>{Object.defineProperty(Z,le,{get:()=>n[le],set:Ce=>n[le]=Ce})})}else e.exposed||(e.exposed={});O&&e.render===St&&(e.render=O),z!=null&&(e.inheritAttrs=z),H&&(e.components=H),Q&&(e.directives=Q),w&&Tu(e)}function __(e,t,n=St){te(e)&&(e=zi(e));for(const s in e){const r=e[s];let o;ve(r)?"default"in r?o=ft(r.from||s,r.default,!0):o=ft(r.from||s):o=ft(r),Ae(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[s]=o}}function il(e,t,n){Et(te(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ru(e,t,n,s){let r=s.includes(".")?Uu(n,s):()=>n[s];if(be(e)){const o=t[e];ie(o)&&Xn(r,o)}else if(ie(e))Xn(r,e.bind(n));else if(ve(e))if(te(e))e.forEach(o=>Ru(o,t,n,s));else{const o=ie(e.handler)?e.handler.bind(n):t[e.handler];ie(o)&&Xn(r,o,e)}}function Fo(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(h=>Rr(c,h,a,!0)),Rr(c,t,a)),ve(t)&&o.set(t,c),c}function Rr(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Rr(e,o,n,!0),r&&r.forEach(a=>Rr(e,a,n,!0));for(const a in t)if(!(s&&a==="expose")){const l=v_[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const v_={data:ol,props:al,emits:al,methods:As,computed:As,beforeCreate:Ue,created:Ue,beforeMount:Ue,mounted:Ue,beforeUpdate:Ue,updated:Ue,beforeDestroy:Ue,beforeUnmount:Ue,destroyed:Ue,unmounted:Ue,activated:Ue,deactivated:Ue,errorCaptured:Ue,serverPrefetch:Ue,components:As,directives:As,watch:b_,provide:ol,inject:E_};function ol(e,t){return t?e?function(){return Se(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function E_(e,t){return As(zi(e),zi(t))}function zi(e){if(te(e)){const t={};for(let n=0;n1)return n&&ie(t)?t.call(s&&s.proxy):t}}function T_(){return!!(xe||Oe||Sn)}const Pu={},Mu=()=>Object.create(Pu),ku=e=>Object.getPrototypeOf(e)===Pu;function C_(e,t,n,s=!1){const r={},o=Mu();e.propsDefaults=Object.create(null),Vu(e,t,r,o);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);n?e.props=s?r:su(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function w_(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:a}}=e,l=fe(r),[c]=e.propsOptions;let h=!1;if((s||a>0)&&!(a&16)){if(a&8){const f=e.vnode.dynamicProps;for(let d=0;d{c=!0;const[p,E]=Fu(d,t,!0);Se(a,p),E&&l.push(...E)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!c)return ve(e)&&s.set(e,Yn),Yn;if(te(o))for(let f=0;fe[0]==="_"||e==="$stable",Ho=e=>te(e)?e.map(_t):[_t(e)],O_=(e,t,n)=>{if(t._n)return t;const s=yr((...r)=>Ho(t(...r)),n);return s._c=!1,s},Bu=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Hu(r))continue;const o=e[r];if(ie(o))t[r]=O_(r,o,s);else if(o!=null){const a=Ho(o);t[r]=()=>a}}},ju=(e,t)=>{const n=Ho(t);e.slots.default=()=>n},Wu=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},N_=(e,t,n)=>{const s=e.slots=Mu();if(e.vnode.shapeFlag&32){const r=t._;r?(Wu(s,t,n),n&&Rc(s,"_",r,!0)):Bu(t,s)}else t&&ju(e,t)},x_=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,a=_e;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Wu(r,t,n):(o=!t.$stable,Bu(t,r)),a=t}else t&&(ju(e,t),a={default:1});if(o)for(const l in r)!Hu(l)&&a[l]==null&&delete r[l]},Je=X_;function $_(e){return D_(e)}function D_(e,t){const n=Pc();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:a,createText:l,createComment:c,setText:h,setElementText:f,parentNode:d,nextSibling:p,setScopeId:E=St,insertStaticContent:A}=e,C=(g,_,b,L=null,S=null,D=null,U=void 0,y=null,B=!!_.dynamicChildren)=>{if(g===_)return;g&&!Ct(g,_)&&(L=N(g),ye(g,S,D,!0),g=null),_.patchFlag===-2&&(B=!1,_.dynamicChildren=null);const{type:M,ref:ne,shapeFlag:X}=_;switch(M){case ti:k(g,_,b,L);break;case Ie:I(g,_,b,L);break;case Cr:g==null&&R(_,b,L,U);break;case Ve:H(g,_,b,L,S,D,U,y,B);break;default:X&1?O(g,_,b,L,S,D,U,y,B):X&6?Q(g,_,b,L,S,D,U,y,B):(X&64||X&128)&&M.process(g,_,b,L,S,D,U,y,B,J)}ne!=null&&S&&Yi(ne,g&&g.ref,D,_||g,!_)},k=(g,_,b,L)=>{if(g==null)s(_.el=l(_.children),b,L);else{const S=_.el=g.el;_.children!==g.children&&h(S,_.children)}},I=(g,_,b,L)=>{g==null?s(_.el=c(_.children||""),b,L):_.el=g.el},R=(g,_,b,L)=>{[g.el,g.anchor]=A(g.children,_,b,L,g.el,g.anchor)},F=({el:g,anchor:_},b,L)=>{let S;for(;g&&g!==_;)S=p(g),s(g,b,L),g=S;s(_,b,L)},$=({el:g,anchor:_})=>{let b;for(;g&&g!==_;)b=p(g),r(g),g=b;r(_)},O=(g,_,b,L,S,D,U,y,B)=>{_.type==="svg"?U="svg":_.type==="math"&&(U="mathml"),g==null?V(_,b,L,S,D,U,y,B):w(g,_,S,D,U,y,B)},V=(g,_,b,L,S,D,U,y)=>{let B,M;const{props:ne,shapeFlag:X,transition:ee,dirs:se}=g;if(B=g.el=a(g.type,D,ne&&ne.is,ne),X&8?f(B,g.children):X&16&&K(g.children,B,null,L,S,$i(g,D),U,y),se&&bn(g,null,L,"created"),Y(B,g,g.scopeId,U,L),ne){for(const de in ne)de!=="value"&&!ws(de)&&o(B,de,null,ne[de],D,L);"value"in ne&&o(B,"value",null,ne.value,D),(M=ne.onVnodeBeforeMount)&&At(M,L,g)}se&&bn(g,null,L,"beforeMount");const oe=L_(S,ee);oe&&ee.beforeEnter(B),s(B,_,b),((M=ne&&ne.onVnodeMounted)||oe||se)&&Je(()=>{M&&At(M,L,g),oe&&ee.enter(B),se&&bn(g,null,L,"mounted")},S)},Y=(g,_,b,L,S)=>{if(b&&E(g,b),L)for(let D=0;D{for(let M=B;M{const y=_.el=g.el;let{patchFlag:B,dynamicChildren:M,dirs:ne}=_;B|=g.patchFlag&16;const X=g.props||_e,ee=_.props||_e;let se;if(b&&yn(b,!1),(se=ee.onVnodeBeforeUpdate)&&At(se,b,_,g),ne&&bn(_,g,b,"beforeUpdate"),b&&yn(b,!0),(X.innerHTML&&ee.innerHTML==null||X.textContent&&ee.textContent==null)&&f(y,""),M?P(g.dynamicChildren,M,y,b,L,$i(_,S),D):U||le(g,_,y,null,b,L,$i(_,S),D,!1),B>0){if(B&16)z(y,X,ee,b,S);else if(B&2&&X.class!==ee.class&&o(y,"class",null,ee.class,S),B&4&&o(y,"style",X.style,ee.style,S),B&8){const oe=_.dynamicProps;for(let de=0;de{se&&At(se,b,_,g),ne&&bn(_,g,b,"updated")},L)},P=(g,_,b,L,S,D,U)=>{for(let y=0;y<_.length;y++){const B=g[y],M=_[y],ne=B.el&&(B.type===Ve||!Ct(B,M)||B.shapeFlag&70)?d(B.el):b;C(B,M,ne,null,L,S,D,U,!0)}},z=(g,_,b,L,S)=>{if(_!==b){if(_!==_e)for(const D in _)!ws(D)&&!(D in b)&&o(g,D,_[D],null,S,L);for(const D in b){if(ws(D))continue;const U=b[D],y=_[D];U!==y&&D!=="value"&&o(g,D,y,U,S,L)}"value"in b&&o(g,"value",_.value,b.value,S)}},H=(g,_,b,L,S,D,U,y,B)=>{const M=_.el=g?g.el:l(""),ne=_.anchor=g?g.anchor:l("");let{patchFlag:X,dynamicChildren:ee,slotScopeIds:se}=_;se&&(y=y?y.concat(se):se),g==null?(s(M,b,L),s(ne,b,L),K(_.children||[],b,ne,S,D,U,y,B)):X>0&&X&64&&ee&&g.dynamicChildren?(P(g.dynamicChildren,ee,b,S,D,U,y),(_.key!=null||S&&_===S.subTree)&&Bo(g,_,!0)):le(g,_,b,ne,S,D,U,y,B)},Q=(g,_,b,L,S,D,U,y,B)=>{_.slotScopeIds=y,g==null?_.shapeFlag&512?S.ctx.activate(_,b,L,U,B):ce(_,b,L,S,D,U,B):me(g,_,B)},ce=(g,_,b,L,S,D,U)=>{const y=g.component=rv(g,L,S);if(Jr(g)&&(y.ctx.renderer=J),iv(y,!1,U),y.asyncDep){if(S&&S.registerDep(y,re,U),!g.el){const B=y.subTree=$e(Ie);I(null,B,_,b)}}else re(y,g,_,b,S,D,U)},me=(g,_,b)=>{const L=_.component=g.component;if(W_(g,_,b))if(L.asyncDep&&!L.asyncResolved){Z(L,_,b);return}else L.next=_,L.update();else _.el=g.el,L.vnode=_},re=(g,_,b,L,S,D,U)=>{const y=()=>{if(g.isMounted){let{next:X,bu:ee,u:se,parent:oe,vnode:de}=g;{const We=Ku(g);if(We){X&&(X.el=de.el,Z(g,X,U)),We.asyncDep.then(()=>{g.isUnmounted||y()});return}}let ue=X,je;yn(g,!1),X?(X.el=de.el,Z(g,X,U)):X=de,ee&&br(ee),(je=X.props&&X.props.onVnodeBeforeUpdate)&&At(je,oe,X,de),yn(g,!0);const Le=Di(g),tt=g.subTree;g.subTree=Le,C(tt,Le,d(tt.el),N(tt),g,S,D),X.el=Le.el,ue===null&&Wo(g,Le.el),se&&Je(se,S),(je=X.props&&X.props.onVnodeUpdated)&&Je(()=>At(je,oe,X,de),S)}else{let X;const{el:ee,props:se}=_,{bm:oe,m:de,parent:ue,root:je,type:Le}=g,tt=zn(_);if(yn(g,!1),oe&&br(oe),!tt&&(X=se&&se.onVnodeBeforeMount)&&At(X,ue,_),yn(g,!0),ee&&pe){const We=()=>{g.subTree=Di(g),pe(ee,g.subTree,g,S,null)};tt&&Le.__asyncHydrate?Le.__asyncHydrate(ee,g,We):We()}else{je.ce&&je.ce._injectChildStyle(Le);const We=g.subTree=Di(g);C(null,We,b,L,g,S,D),_.el=We.el}if(de&&Je(de,S),!tt&&(X=se&&se.onVnodeMounted)){const We=_;Je(()=>At(X,ue,We),S)}(_.shapeFlag&256||ue&&zn(ue.vnode)&&ue.vnode.shapeFlag&256)&&g.a&&Je(g.a,S),g.isMounted=!0,_=b=L=null}};g.scope.on();const B=g.effect=new Wc(y);g.scope.off();const M=g.update=B.run.bind(B),ne=g.job=B.runIfDirty.bind(B);ne.i=g,ne.id=g.uid,B.scheduler=()=>Po(ne),yn(g,!0),M()},Z=(g,_,b)=>{_.component=g;const L=g.vnode.props;g.vnode=_,g.next=null,w_(g,_.props,L,b),x_(g,_.children,b),cn(),Za(g),un()},le=(g,_,b,L,S,D,U,y,B=!1)=>{const M=g&&g.children,ne=g?g.shapeFlag:0,X=_.children,{patchFlag:ee,shapeFlag:se}=_;if(ee>0){if(ee&128){He(M,X,b,L,S,D,U,y,B);return}else if(ee&256){Ce(M,X,b,L,S,D,U,y,B);return}}se&8?(ne&16&&Te(M,S,D),X!==M&&f(b,X)):ne&16?se&16?He(M,X,b,L,S,D,U,y,B):Te(M,S,D,!0):(ne&8&&f(b,""),se&16&&K(X,b,L,S,D,U,y,B))},Ce=(g,_,b,L,S,D,U,y,B)=>{g=g||Yn,_=_||Yn;const M=g.length,ne=_.length,X=Math.min(M,ne);let ee;for(ee=0;eene?Te(g,S,D,!0,!1,X):K(_,b,L,S,D,U,y,B,X)},He=(g,_,b,L,S,D,U,y,B)=>{let M=0;const ne=_.length;let X=g.length-1,ee=ne-1;for(;M<=X&&M<=ee;){const se=g[M],oe=_[M]=B?Jt(_[M]):_t(_[M]);if(Ct(se,oe))C(se,oe,b,null,S,D,U,y,B);else break;M++}for(;M<=X&&M<=ee;){const se=g[X],oe=_[ee]=B?Jt(_[ee]):_t(_[ee]);if(Ct(se,oe))C(se,oe,b,null,S,D,U,y,B);else break;X--,ee--}if(M>X){if(M<=ee){const se=ee+1,oe=seee)for(;M<=X;)ye(g[M],S,D,!0),M++;else{const se=M,oe=M,de=new Map;for(M=oe;M<=ee;M++){const Ke=_[M]=B?Jt(_[M]):_t(_[M]);Ke.key!=null&&de.set(Ke.key,M)}let ue,je=0;const Le=ee-oe+1;let tt=!1,We=0;const dn=new Array(Le);for(M=0;M=Le){ye(Ke,S,D,!0);continue}let Me;if(Ke.key!=null)Me=de.get(Ke.key);else for(ue=oe;ue<=ee;ue++)if(dn[ue-oe]===0&&Ct(Ke,_[ue])){Me=ue;break}Me===void 0?ye(Ke,S,D,!0):(dn[Me-oe]=M+1,Me>=We?We=Me:tt=!0,C(Ke,_[Me],b,null,S,D,U,y,B),je++)}const ds=tt?R_(dn):Yn;for(ue=ds.length-1,M=Le-1;M>=0;M--){const Ke=oe+M,Me=_[Ke],zs=Ke+1{const{el:D,type:U,transition:y,children:B,shapeFlag:M}=g;if(M&6){De(g.component.subTree,_,b,L);return}if(M&128){g.suspense.move(_,b,L);return}if(M&64){U.move(g,_,b,J);return}if(U===Ve){s(D,_,b);for(let X=0;Xy.enter(D),S);else{const{leave:X,delayLeave:ee,afterLeave:se}=y,oe=()=>s(D,_,b),de=()=>{X(D,()=>{oe(),se&&se()})};ee?ee(D,oe,de):de()}else s(D,_,b)},ye=(g,_,b,L=!1,S=!1)=>{const{type:D,props:U,ref:y,children:B,dynamicChildren:M,shapeFlag:ne,patchFlag:X,dirs:ee,cacheIndex:se}=g;if(X===-2&&(S=!1),y!=null&&Yi(y,null,b,g,!0),se!=null&&(_.renderCache[se]=void 0),ne&256){_.ctx.deactivate(g);return}const oe=ne&1&&ee,de=!zn(g);let ue;if(de&&(ue=U&&U.onVnodeBeforeUnmount)&&At(ue,_,g),ne&6)Pe(g.component,b,L);else{if(ne&128){g.suspense.unmount(b,L);return}oe&&bn(g,null,_,"beforeUnmount"),ne&64?g.type.remove(g,_,b,J,L):M&&!M.hasOnce&&(D!==Ve||X>0&&X&64)?Te(M,_,b,!1,!0):(D===Ve&&X&384||!S&&ne&16)&&Te(B,_,b),L&&et(g)}(de&&(ue=U&&U.onVnodeUnmounted)||oe)&&Je(()=>{ue&&At(ue,_,g),oe&&bn(g,null,_,"unmounted")},b)},et=g=>{const{type:_,el:b,anchor:L,transition:S}=g;if(_===Ve){Be(b,L);return}if(_===Cr){$(g);return}const D=()=>{r(b),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(g.shapeFlag&1&&S&&!S.persisted){const{leave:U,delayLeave:y}=S,B=()=>U(b,D);y?y(g.el,D,B):B()}else D()},Be=(g,_)=>{let b;for(;g!==_;)b=p(g),r(g),g=b;r(_)},Pe=(g,_,b)=>{const{bum:L,scope:S,job:D,subTree:U,um:y,m:B,a:M}=g;cl(B),cl(M),L&&br(L),S.stop(),D&&(D.flags|=8,ye(U,g,_,b)),y&&Je(y,_),Je(()=>{g.isUnmounted=!0},_),_&&_.pendingBranch&&!_.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===_.pendingId&&(_.deps--,_.deps===0&&_.resolve())},Te=(g,_,b,L=!1,S=!1,D=0)=>{for(let U=D;U{if(g.shapeFlag&6)return N(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const _=p(g.anchor||g.el),b=_&&_[pu];return b?p(b):_};let G=!1;const q=(g,_,b)=>{g==null?_._vnode&&ye(_._vnode,null,null,!0):C(_._vnode||null,g,_,null,null,null,b),_._vnode=g,G||(G=!0,Za(),fu(),G=!1)},J={p:C,um:ye,m:De,r:et,mt:ce,mc:K,pc:le,pbc:P,n:N,o:e};let T,pe;return{render:q,hydrate:T,createApp:A_(q,T)}}function $i({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 yn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function L_(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Bo(e,t,n=!1){const s=e.children,r=t.children;if(te(s)&&te(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function Ku(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ku(t)}function cl(e){if(e)for(let t=0;tft(I_);function M_(e,t){return jo(e,null,{flush:"post"})}function Xn(e,t,n){return jo(e,t,n)}function jo(e,t,n=_e){const{immediate:s,deep:r,flush:o,once:a}=n,l=Se({},n);let c;if(ni)if(o==="sync"){const p=P_();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!t||s)l.once=!0;else{const p=()=>{};return p.stop=St,p.resume=St,p.pause=St,p}const h=xe;l.call=(p,E,A)=>Et(p,h,E,A);let f=!1;o==="post"?l.scheduler=p=>{Je(p,h&&h.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(p,E)=>{E?p():Po(p)}),l.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,h&&(p.id=h.uid,p.i=h))};const d=Jm(e,t,l);return c&&c.push(d),d}function k_(e,t,n){const s=this.proxy,r=be(e)?e.includes(".")?Uu(s,e):()=>s[e]:e.bind(s,s);let o;ie(t)?o=t:(o=t.handler,n=t);const a=qs(this),l=jo(r,o.bind(s),n);return a(),l}function Uu(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ht(t)}Modifiers`]||e[`${ln(t)}Modifiers`];function F_(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||_e;let r=n;const o=t.startsWith("update:"),a=o&&V_(s,t.slice(7));a&&(a.trim&&(r=n.map(f=>be(f)?f.trim():f)),a.number&&(r=n.map(Nr)));let l,c=s[l=Ti(t)]||s[l=Ti(ht(t))];!c&&o&&(c=s[l=Ti(ln(t))]),c&&Et(c,e,6,r);const h=s[l+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Et(h,e,6,r)}}function Yu(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let a={},l=!1;if(!ie(e)){const c=h=>{const f=Yu(h,t,!0);f&&(l=!0,Se(a,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(ve(e)&&s.set(e,null),null):(te(o)?o.forEach(c=>a[c]=null):Se(a,o),ve(e)&&s.set(e,a),a)}function ei(e,t){return!e||!jr(t)?!1:(t=t.slice(2).replace(/Once$/,""),he(e,t[0].toLowerCase()+t.slice(1))||he(e,ln(t))||he(e,t))}function Di(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:a,attrs:l,emit:c,render:h,renderCache:f,props:d,data:p,setupState:E,ctx:A,inheritAttrs:C}=e,k=Lr(e);let I,R;try{if(n.shapeFlag&4){const $=r||s,O=$;I=_t(h.call(O,$,f,d,E,p,A)),R=l}else{const $=t;I=_t($.length>1?$(d,{attrs:l,slots:a,emit:c}):$(d,null)),R=t.props?l:B_(l)}}catch($){$s.length=0,Ys($,e,1),I=$e(Ie)}let F=I;if(R&&C!==!1){const $=Object.keys(R),{shapeFlag:O}=F;$.length&&O&7&&(o&&$.some(Ao)&&(R=j_(R,o)),F=rn(F,R,!1,!0))}return n.dirs&&(F=rn(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(n.dirs):n.dirs),n.transition&&Dn(F,n.transition),I=F,Lr(k),I}function H_(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||jr(n))&&((t||(t={}))[n]=e[n]);return t},j_=(e,t)=>{const n={};for(const s in e)(!Ao(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function W_(e,t,n){const{props:s,children:r,component:o}=e,{props:a,children:l,patchFlag:c}=t,h=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?ul(s,a,h):!!a;if(c&8){const f=t.dynamicProps;for(let d=0;de.__isSuspense;let Qi=0;const K_={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,o,a,l,c,h){if(e==null)Y_(t,n,s,r,o,a,l,c,h);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}G_(e,t,n,s,r,a,l,c,h)}},hydrate:q_,normalize:z_},U_=K_;function Vs(e,t){const n=e.props&&e.props[t];ie(n)&&n()}function Y_(e,t,n,s,r,o,a,l,c){const{p:h,o:{createElement:f}}=c,d=f("div"),p=e.suspense=qu(e,r,s,t,d,n,o,a,l,c);h(null,p.pendingBranch=e.ssContent,d,null,s,p,o,a),p.deps>0?(Vs(e,"onPending"),Vs(e,"onFallback"),h(null,e.ssFallback,t,n,s,null,o,a),Qn(p,e.ssFallback)):p.resolve(!1,!0)}function G_(e,t,n,s,r,o,a,l,{p:c,um:h,o:{createElement:f}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,E=t.ssFallback,{activeBranch:A,pendingBranch:C,isInFallback:k,isHydrating:I}=d;if(C)d.pendingBranch=p,Ct(p,C)?(c(C,p,d.hiddenContainer,null,r,d,o,a,l),d.deps<=0?d.resolve():k&&(I||(c(A,E,n,s,r,null,o,a,l),Qn(d,E)))):(d.pendingId=Qi++,I?(d.isHydrating=!1,d.activeBranch=C):h(C,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=f("div"),k?(c(null,p,d.hiddenContainer,null,r,d,o,a,l),d.deps<=0?d.resolve():(c(A,E,n,s,r,null,o,a,l),Qn(d,E))):A&&Ct(p,A)?(c(A,p,n,s,r,d,o,a,l),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,r,d,o,a,l),d.deps<=0&&d.resolve()));else if(A&&Ct(p,A))c(A,p,n,s,r,d,o,a,l),Qn(d,p);else if(Vs(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=Qi++,c(null,p,d.hiddenContainer,null,r,d,o,a,l),d.deps<=0)d.resolve();else{const{timeout:R,pendingId:F}=d;R>0?setTimeout(()=>{d.pendingId===F&&d.fallback(E)},R):R===0&&d.fallback(E)}}function qu(e,t,n,s,r,o,a,l,c,h,f=!1){const{p:d,m:p,um:E,n:A,o:{parentNode:C,remove:k}}=h;let I;const R=Q_(e);R&&t&&t.pendingBranch&&(I=t.pendingId,t.deps++);const F=e.props?Ic(e.props.timeout):void 0,$=o,O={vnode:e,parent:t,parentComponent:n,namespace:a,container:s,hiddenContainer:r,deps:0,pendingId:Qi++,timeout:typeof F=="number"?F:-1,activeBranch:null,pendingBranch:null,isInFallback:!f,isHydrating:f,isUnmounted:!1,effects:[],resolve(V=!1,Y=!1){const{vnode:K,activeBranch:w,pendingBranch:P,pendingId:z,effects:H,parentComponent:Q,container:ce}=O;let me=!1;O.isHydrating?O.isHydrating=!1:V||(me=w&&P.transition&&P.transition.mode==="out-in",me&&(w.transition.afterLeave=()=>{z===O.pendingId&&(p(P,ce,o===$?A(w):o,0),Ki(H))}),w&&(C(w.el)===ce&&(o=A(w)),E(w,Q,O,!0)),me||p(P,ce,o,0)),Qn(O,P),O.pendingBranch=null,O.isInFallback=!1;let re=O.parent,Z=!1;for(;re;){if(re.pendingBranch){re.effects.push(...H),Z=!0;break}re=re.parent}!Z&&!me&&Ki(H),O.effects=[],R&&t&&t.pendingBranch&&I===t.pendingId&&(t.deps--,t.deps===0&&!Y&&t.resolve()),Vs(K,"onResolve")},fallback(V){if(!O.pendingBranch)return;const{vnode:Y,activeBranch:K,parentComponent:w,container:P,namespace:z}=O;Vs(Y,"onFallback");const H=A(K),Q=()=>{O.isInFallback&&(d(null,V,P,H,w,null,z,l,c),Qn(O,V))},ce=V.transition&&V.transition.mode==="out-in";ce&&(K.transition.afterLeave=Q),O.isInFallback=!0,E(K,w,null,!0),ce||Q()},move(V,Y,K){O.activeBranch&&p(O.activeBranch,V,Y,K),O.container=V},next(){return O.activeBranch&&A(O.activeBranch)},registerDep(V,Y,K){const w=!!O.pendingBranch;w&&O.deps++;const P=V.vnode.el;V.asyncDep.catch(z=>{Ys(z,V,0)}).then(z=>{if(V.isUnmounted||O.isUnmounted||O.pendingId!==V.suspenseId)return;V.asyncResolved=!0;const{vnode:H}=V;Zi(V,z,!1),P&&(H.el=P);const Q=!P&&V.subTree.el;Y(V,H,C(P||V.subTree.el),P?null:A(V.subTree),O,a,K),Q&&k(Q),Wo(V,H.el),w&&--O.deps===0&&O.resolve()})},unmount(V,Y){O.isUnmounted=!0,O.activeBranch&&E(O.activeBranch,n,V,Y),O.pendingBranch&&E(O.pendingBranch,n,V,Y)}};return O}function q_(e,t,n,s,r,o,a,l,c){const h=t.suspense=qu(t,s,n,e.parentNode,document.createElement("div"),null,r,o,a,l,!0),f=c(e,h.pendingBranch=t.ssContent,n,h,o,a);return h.deps===0&&h.resolve(!1,!0),f}function z_(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=fl(s?n.default:n),e.ssFallback=s?fl(n.fallback):$e(Ie)}function fl(e){let t;if(ie(e)){const n=ss&&e._c;n&&(e._d=!1,en()),e=e(),n&&(e._d=!0,t=Ze,zu())}return te(e)&&(e=H_(e)),e=_t(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function X_(e,t){t&&t.pendingBranch?te(e)?t.effects.push(...e):t.effects.push(e):Ki(e)}function Qn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,s&&s.subTree===n&&(s.vnode.el=r,Wo(s,r))}function Q_(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ve=Symbol.for("v-fgt"),ti=Symbol.for("v-txt"),Ie=Symbol.for("v-cmt"),Cr=Symbol.for("v-stc"),$s=[];let Ze=null;function en(e=!1){$s.push(Ze=e?null:[])}function zu(){$s.pop(),Ze=$s[$s.length-1]||null}let ss=1;function dl(e){ss+=e,e<0&&Ze&&(Ze.hasOnce=!0)}function Xu(e){return e.dynamicChildren=ss>0?Ze||Yn:null,zu(),ss>0&&Ze&&Ze.push(e),e}function hl(e,t,n,s,r,o){return Xu(It(e,t,n,s,r,o,!0))}function Fs(e,t,n,s,r){return Xu($e(e,t,n,s,r,!0))}function rs(e){return e?e.__v_isVNode===!0:!1}function Ct(e,t){return e.type===t.type&&e.key===t.key}const Qu=({key:e})=>e??null,wr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?be(e)||Ae(e)||ie(e)?{i:Oe,r:e,k:t,f:!!n}:e:null);function It(e,t=null,n=null,s=0,r=null,o=e===Ve?0:1,a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Qu(t),ref:t&&wr(t),scopeId:hu,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:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Oe};return l?(Ko(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=be(n)?8:16),ss>0&&!a&&Ze&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Ze.push(c),c}const $e=J_;function J_(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===xu)&&(e=Ie),rs(e)){const l=rn(e,t,!0);return n&&Ko(l,n),ss>0&&!o&&Ze&&(l.shapeFlag&6?Ze[Ze.indexOf(e)]=l:Ze.push(l)),l.patchFlag=-2,l}if(cv(e)&&(e=e.__vccOpts),t){t=Z_(t);let{class:l,style:c}=t;l&&!be(l)&&(t.class=Yr(l)),ve(c)&&(Ro(c)&&!te(c)&&(c=Se({},c)),t.style=Ur(c))}const a=be(e)?1:Gu(e)?128:gu(e)?64:ve(e)?4:ie(e)?2:0;return It(e,t,n,s,r,a,o,!0)}function Z_(e){return e?Ro(e)||ku(e)?Se({},e):e:null}function rn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:a,children:l,transition:c}=e,h=t?tv(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&Qu(h),ref:t&&t.ref?n&&o?te(o)?o.concat(wr(t)):[o,wr(t)]:wr(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!==Ve?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&&rn(e.ssContent),ssFallback:e.ssFallback&&rn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Dn(f,c.clone(f)),f}function Ju(e=" ",t=0){return $e(ti,null,e,t)}function ev(e="",t=!1){return t?(en(),Fs(Ie,null,e)):$e(Ie,null,e)}function _t(e){return e==null||typeof e=="boolean"?$e(Ie):te(e)?$e(Ve,null,e.slice()):rs(e)?Jt(e):$e(ti,null,String(e))}function Jt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:rn(e)}function Ko(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(te(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Ko(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!ku(t)?t._ctx=Oe:r===3&&Oe&&(Oe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:Oe},n=32):(t=String(t),s&64?(n=16,t=[Ju(t)]):n=8);e.children=t,e.shapeFlag|=n}function tv(...e){const t={};for(let n=0;nxe||Oe;let Ir,Ji;{const e=Pc(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(a=>a(o)):r[0](o)}};Ir=t("__VUE_INSTANCE_SETTERS__",n=>xe=n),Ji=t("__VUE_SSR_SETTERS__",n=>ni=n)}const qs=e=>{const t=xe;return Ir(e),e.scope.on(),()=>{e.scope.off(),Ir(t)}},pl=()=>{xe&&xe.scope.off(),Ir(null)};function Zu(e){return e.vnode.shapeFlag&4}let ni=!1;function iv(e,t=!1,n=!1){t&&Ji(t);const{props:s,children:r}=e.vnode,o=Zu(e);C_(e,s,o,t),N_(e,r,n);const a=o?ov(e,t):void 0;return t&&Ji(!1),a}function ov(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,g_);const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?tf(e):null,o=qs(e);cn();const a=Us(s,e,0,[e.props,r]);if(un(),o(),$c(a)){if(zn(e)||Tu(e),a.then(pl,pl),t)return a.then(l=>{Zi(e,l,t)}).catch(l=>{Ys(l,e,0)});e.asyncDep=a}else Zi(e,a,t)}else ef(e,t)}function Zi(e,t,n){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ve(t)&&(e.setupState=au(t)),ef(e,n)}let gl;function ef(e,t,n){const s=e.type;if(!e.render){if(!t&&gl&&!s.render){const r=s.template||Fo(e).template;if(r){const{isCustomElement:o,compilerOptions:a}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,h=Se(Se({isCustomElement:o,delimiters:l},a),c);s.render=gl(r,h)}}e.render=s.render||St}{const r=qs(e);cn();try{m_(e)}finally{un(),r()}}}const av={get(e,t){return Fe(e,"get",""),e[t]}};function tf(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,av),slots:e.slots,emit:e.emit,expose:t}}function si(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(au(zr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in xs)return xs[n](e)},has(t,n){return n in t||n in xs}})):e.proxy}function lv(e,t=!0){return ie(e)?e.displayName||e.name:e.name||t&&e.__name}function cv(e){return ie(e)&&"__vccOpts"in e}const nt=(e,t)=>Xm(e,t,ni);function Uo(e,t,n){const s=arguments.length;return s===2?ve(t)&&!te(t)?rs(t)?$e(e,null,[t]):$e(e,t):$e(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&rs(n)&&(n=[n]),$e(e,t,n))}const uv="3.5.11";/** * @vue/runtime-dom v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Gp;const vb=typeof window<"u"&&window.trustedTypes;if(vb)try{Gp=vb.createPolicy("vue",{createHTML:t=>t})}catch{}const JE=Gp?t=>Gp.createHTML(t):t=>t,AR="http://www.w3.org/2000/svg",PR="http://www.w3.org/1998/Math/MathML",tr=typeof document<"u"?document:null,yb=tr&&tr.createElement("template"),MR={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const s=e==="svg"?tr.createElementNS(AR,t):e==="mathml"?tr.createElementNS(PR,t):n?tr.createElement(t,{is:n}):tr.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>tr.createTextNode(t),createComment:t=>tr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>tr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,s,r){const o=n?n.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===r||!(s=s.nextSibling)););else{yb.innerHTML=JE(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const a=yb.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Tr="transition",oc="animation",wl=Symbol("_vtc"),QE={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},eC=vn({},gE,QE),IR=t=>(t.displayName="Transition",t.props=eC,t),vt=IR((t,{slots:e})=>ha(AD,tC(t),e)),Lo=(t,e=[])=>{Ke(t)?t.forEach(n=>n(...e)):t&&t(...e)},bb=t=>t?Ke(t)?t.some(e=>e.length>1):t.length>1:!1;function tC(t){const e={};for(const Y in t)Y in QE||(e[Y]=t[Y]);if(t.css===!1)return e;const{name:n="v",type:i,duration:s,enterFromClass:r=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=t,p=DR(s),m=p&&p[0],v=p&&p[1],{onBeforeEnter:y,onEnter:x,onEnterCancelled:E,onLeave:w,onLeaveCancelled:b,onBeforeAppear:C=y,onAppear:k=x,onAppearCancelled:T=E}=e,A=(Y,ne,N)=>{Or(Y,ne?u:a),Or(Y,ne?c:o),N&&N()},I=(Y,ne)=>{Y._isLeaving=!1,Or(Y,d),Or(Y,g),Or(Y,f),ne&&ne()},V=Y=>(ne,N)=>{const B=Y?k:x,R=()=>A(ne,Y,N);Lo(B,[ne,R]),wb(()=>{Or(ne,Y?l:r),qs(ne,Y?u:a),bb(B)||xb(ne,i,m,R)})};return vn(e,{onBeforeEnter(Y){Lo(y,[Y]),qs(Y,r),qs(Y,o)},onBeforeAppear(Y){Lo(C,[Y]),qs(Y,l),qs(Y,c)},onEnter:V(!1),onAppear:V(!0),onLeave(Y,ne){Y._isLeaving=!0;const N=()=>I(Y,ne);qs(Y,d),qs(Y,f),iC(),wb(()=>{Y._isLeaving&&(Or(Y,d),qs(Y,g),bb(w)||xb(Y,i,v,N))}),Lo(w,[Y,N])},onEnterCancelled(Y){A(Y,!1),Lo(E,[Y])},onAppearCancelled(Y){A(Y,!0),Lo(T,[Y])},onLeaveCancelled(Y){I(Y),Lo(b,[Y])}})}function DR(t){if(t==null)return null;if(It(t))return[Tg(t.enter),Tg(t.leave)];{const e=Tg(t);return[e,e]}}function Tg(t){return Rx(t)}function qs(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[wl]||(t[wl]=new Set)).add(e)}function Or(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[wl];n&&(n.delete(e),n.size||(t[wl]=void 0))}function wb(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let RR=0;function xb(t,e,n,i){const s=t._endId=++RR,r=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:a,propCount:l}=nC(t,e);if(!o)return i();const c=o+"end";let u=0;const d=()=>{t.removeEventListener(c,f),r()},f=g=>{g.target===t&&++u>=l&&d()};setTimeout(()=>{u(n[p]||"").split(", "),s=i(`${Tr}Delay`),r=i(`${Tr}Duration`),o=Eb(s,r),a=i(`${oc}Delay`),l=i(`${oc}Duration`),c=Eb(a,l);let u=null,d=0,f=0;e===Tr?o>0&&(u=Tr,d=o,f=r.length):e===oc?c>0&&(u=oc,d=c,f=l.length):(d=Math.max(o,c),u=d>0?o>c?Tr:oc:null,f=u?u===Tr?r.length:l.length:0);const g=u===Tr&&/\b(transform|all)(,|$)/.test(i(`${Tr}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:g}}function Eb(t,e){for(;t.lengthCb(n)+Cb(t[i])))}function Cb(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function iC(){return document.body.offsetHeight}function $R(t,e,n){const i=t[wl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const xh=Symbol("_vod"),sC=Symbol("_vsh"),ah={beforeMount(t,{value:e},{transition:n}){t[xh]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):ac(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),ac(t,!0),i.enter(t)):i.leave(t,()=>{ac(t,!1)}):ac(t,e))},beforeUnmount(t,{value:e}){ac(t,e)}};function ac(t,e){t.style.display=e?t[xh]:"none",t[sC]=!e}const rC=Symbol("");function oC(t){const e=Bu();if(!e)return;const n=e.ut=(s=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(r=>Eh(r,s))},i=()=>{const s=t(e.proxy);e.ce?Eh(e.ce,s):Xp(e.subTree,s),n(s)};bE(()=>{sR(i)}),Vt(()=>{const s=new MutationObserver(i);s.observe(e.subTree.el.parentNode,{childList:!0}),_o(()=>s.disconnect())})}function Xp(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Xp(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)Eh(t.el,e);else if(t.type===Ie)t.children.forEach(n=>Xp(n,e));else if(t.type===rh){let{el:n,anchor:i}=t;for(;n&&(Eh(n,e),n!==i);)n=n.nextSibling}}function Eh(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const s in e)n.setProperty(`--${s}`,e[s]),i+=`--${s}: ${e[s]};`;n[rC]=i}}const LR=/(^|;)\s*display\s*:/;function OR(t,e,n){const i=t.style,s=Kt(n);let r=!1;if(n&&!s){if(e)if(Kt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&lh(i,a,"")}else for(const o in e)n[o]==null&&lh(i,o,"");for(const o in n)o==="display"&&(r=!0),lh(i,o,n[o])}else if(s){if(e!==n){const o=i[rC];o&&(n+=";"+o),i.cssText=n,r=LR.test(n)}}else e&&t.removeAttribute("style");xh in t&&(t[xh]=r?i.display:"",t[sC]&&(i.display="none"))}const Sb=/\s*!important$/;function lh(t,e,n){if(Ke(n))n.forEach(i=>lh(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=NR(t,e);Sb.test(n)?t.setProperty(go(i),n.replace(Sb,""),"important"):t[i]=n}}const kb=["Webkit","Moz","ms"],Ag={};function NR(t,e){const n=Ag[e];if(n)return n;let i=Ui(e);if(i!=="filter"&&i in t)return Ag[e]=i;i=of(i);for(let s=0;sPg||(WR.then(()=>Pg=0),Pg=Date.now());function YR(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;fs(HR(i,n.value),e,5,[i])};return n.value=t,n.attached=zR(),n}function HR(t,e){if(Ke(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const Db=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,jR=(t,e,n,i,s,r)=>{const o=s==="svg";e==="class"?$R(t,i,o):e==="style"?OR(t,n,i):sf(e)?n_(e)||BR(t,e,n,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):KR(t,e,i,o))?(Pb(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Ab(t,e,i,o,r,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Kt(i))?Pb(t,Ui(e),i):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),Ab(t,e,i,o))};function KR(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&Db(e)&&Je(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Db(e)&&Kt(n)?!1:e in t}const aC=new WeakMap,lC=new WeakMap,Ch=Symbol("_moveCb"),Rb=Symbol("_enterCb"),UR=t=>(delete t.props.mode,t),GR=UR({name:"TransitionGroup",props:vn({},eC,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Bu(),i=fE();let s,r;return xE(()=>{if(!s.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!JR(s[0].el,n.vnode.el,o))return;s.forEach(XR),s.forEach(qR);const a=s.filter(ZR);iC(),a.forEach(l=>{const c=l.el,u=c.style;qs(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Ch]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",d),c[Ch]=null,Or(c,o))};c.addEventListener("transitionend",d)})}),()=>{const o=lt(t),a=tC(o);let l=o.tag||Ie;if(s=[],r)for(let c=0;c{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const r=e.nodeType===1?e:e.parentNode;r.appendChild(i);const{hasTransform:o}=nC(i);return r.removeChild(i),o}const oo=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ke(e)?n=>nh(e,n):e};function QR(t){t.target.composing=!0}function $b(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Ki=Symbol("_assign"),We={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[Ki]=oo(s);const r=i||s.props&&s.props.type==="number";or(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),r&&(a=ph(a)),t[Ki](a)}),n&&or(t,"change",()=>{t.value=t.value.trim()}),e||(or(t,"compositionstart",QR),or(t,"compositionend",$b),or(t,"change",$b))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:s,number:r}},o){if(t[Ki]=oo(o),t.composing)return;const a=(r||t.type==="number")&&!/^0\d/.test(t.value)?ph(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||s&&t.value.trim()===l)||(t.value=l))}},Gn={deep:!0,created(t,e,n){t[Ki]=oo(n),or(t,"change",()=>{const i=t._modelValue,s=xl(t),r=t.checked,o=t[Ki];if(Ke(i)){const a=r_(i,s),l=a!==-1;if(r&&!l)o(i.concat(s));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Ul(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(cC(t,r))})},mounted:Lb,beforeUpdate(t,e,n){t[Ki]=oo(n),Lb(t,e,n)}};function Lb(t,{value:e},n){t._modelValue=e;let i;Ke(e)?i=r_(e,n.props.value)>-1:Ul(e)?i=e.has(n.props.value):i=ca(e,cC(t,!0)),t.checked!==i&&(t.checked=i)}const e$={created(t,{value:e},n){t.checked=ca(e,n.props.value),t[Ki]=oo(n),or(t,"change",()=>{t[Ki](xl(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[Ki]=oo(i),e!==n&&(t.checked=ca(e,i.props.value))}},ch={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=Ul(e);or(t,"change",()=>{const r=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?ph(xl(o)):xl(o));t[Ki](t.multiple?s?new Set(r):r:r[0]),t._assigning=!0,Rn(()=>{t._assigning=!1})}),t[Ki]=oo(i)},mounted(t,{value:e}){Ob(t,e)},beforeUpdate(t,e,n){t[Ki]=oo(n)},updated(t,{value:e}){t._assigning||Ob(t,e)}};function Ob(t,e){const n=t.multiple,i=Ke(e);if(!(n&&!i&&!Ul(e))){for(let s=0,r=t.options.length;sString(c)===String(a)):o.selected=r_(e,a)>-1}else o.selected=e.has(a);else if(ca(xl(o),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function xl(t){return"_value"in t?t._value:t.value}function cC(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const uC={created(t,e,n){Cd(t,e,n,null,"created")},mounted(t,e,n){Cd(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){Cd(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){Cd(t,e,n,i,"updated")}};function t$(t,e){switch(t){case"SELECT":return ch;case"TEXTAREA":return We;default:switch(e){case"checkbox":return Gn;case"radio":return e$;default:return We}}}function Cd(t,e,n,i,s){const o=t$(t.tagName,n.props&&n.props.type)[s];o&&o(t,e,n,i)}const n$=["ctrl","shift","alt","meta"],i$={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>n$.some(n=>t[`${n}Key`]&&!e.includes(n))},ru=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(s,...r)=>{for(let o=0;o{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=s=>{if(!("key"in s))return;const r=go(s.key);if(e.some(o=>o===r||s$[o]===r))return t(s)})},r$=vn({patchProp:jR},MR);let Nb;function hC(){return Nb||(Nb=JD(r$))}const Fb=(...t)=>{hC().render(...t)},o$=(...t)=>{const e=hC().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=l$(i);if(!s)return;const r=e._component;!Je(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,a$(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function a$(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function l$(t){return Kt(t)?document.querySelector(t):t}var c$=!1;/*! +**/let eo;const ml=typeof window<"u"&&window.trustedTypes;if(ml)try{eo=ml.createPolicy("vue",{createHTML:e=>e})}catch{}const nf=eo?e=>eo.createHTML(e):e=>e,fv="http://www.w3.org/2000/svg",dv="http://www.w3.org/1998/Math/MathML",Pt=typeof document<"u"?document:null,_l=Pt&&Pt.createElement("template"),hv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Pt.createElementNS(fv,e):t==="mathml"?Pt.createElementNS(dv,e):n?Pt.createElement(e,{is:n}):Pt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Pt.createTextNode(e),createComment:e=>Pt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const a=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{_l.innerHTML=nf(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=_l.content;if(s==="svg"||s==="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]}},Yt="transition",Es="animation",is=Symbol("_vtc"),sf={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},rf=Se({},vu,sf),pv=e=>(e.displayName="Transition",e.props=rf,e),gv=pv((e,{slots:t})=>Uo(i_,of(e),t)),An=(e,t=[])=>{te(e)?e.forEach(n=>n(...t)):e&&e(...t)},vl=e=>e?te(e)?e.some(t=>t.length>1):e.length>1:!1;function of(e){const t={};for(const H in e)H in sf||(t[H]=e[H]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:h=a,appearToClass:f=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:E=`${n}-leave-to`}=e,A=mv(r),C=A&&A[0],k=A&&A[1],{onBeforeEnter:I,onEnter:R,onEnterCancelled:F,onLeave:$,onLeaveCancelled:O,onBeforeAppear:V=I,onAppear:Y=R,onAppearCancelled:K=F}=t,w=(H,Q,ce)=>{qt(H,Q?f:l),qt(H,Q?h:a),ce&&ce()},P=(H,Q)=>{H._isLeaving=!1,qt(H,d),qt(H,E),qt(H,p),Q&&Q()},z=H=>(Q,ce)=>{const me=H?Y:R,re=()=>w(Q,H,ce);An(me,[Q,re]),El(()=>{qt(Q,H?c:o),Rt(Q,H?f:l),vl(me)||bl(Q,s,C,re)})};return Se(t,{onBeforeEnter(H){An(I,[H]),Rt(H,o),Rt(H,a)},onBeforeAppear(H){An(V,[H]),Rt(H,c),Rt(H,h)},onEnter:z(!1),onAppear:z(!0),onLeave(H,Q){H._isLeaving=!0;const ce=()=>P(H,Q);Rt(H,d),Rt(H,p),lf(),El(()=>{H._isLeaving&&(qt(H,d),Rt(H,E),vl($)||bl(H,s,k,ce))}),An($,[H,ce])},onEnterCancelled(H){w(H,!1),An(F,[H])},onAppearCancelled(H){w(H,!0),An(K,[H])},onLeaveCancelled(H){P(H),An(O,[H])}})}function mv(e){if(e==null)return null;if(ve(e))return[Li(e.enter),Li(e.leave)];{const t=Li(e);return[t,t]}}function Li(e){return Ic(e)}function Rt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[is]||(e[is]=new Set)).add(t)}function qt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[is];n&&(n.delete(t),n.size||(e[is]=void 0))}function El(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let _v=0;function bl(e,t,n,s){const r=e._endId=++_v,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:a,timeout:l,propCount:c}=af(e,t);if(!a)return s();const h=a+"end";let f=0;const d=()=>{e.removeEventListener(h,p),o()},p=E=>{E.target===e&&++f>=c&&d()};setTimeout(()=>{f(n[A]||"").split(", "),r=s(`${Yt}Delay`),o=s(`${Yt}Duration`),a=yl(r,o),l=s(`${Es}Delay`),c=s(`${Es}Duration`),h=yl(l,c);let f=null,d=0,p=0;t===Yt?a>0&&(f=Yt,d=a,p=o.length):t===Es?h>0&&(f=Es,d=h,p=c.length):(d=Math.max(a,h),f=d>0?a>h?Yt:Es:null,p=f?f===Yt?o.length:c.length:0);const E=f===Yt&&/\b(transform|all)(,|$)/.test(s(`${Yt}Property`).toString());return{type:f,timeout:d,propCount:p,hasTransform:E}}function yl(e,t){for(;e.lengthAl(n)+Al(e[s])))}function Al(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function lf(){return document.body.offsetHeight}function vv(e,t,n){const s=e[is];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Pr=Symbol("_vod"),cf=Symbol("_vsh"),Jb={beforeMount(e,{value:t},{transition:n}){e[Pr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):bs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),bs(e,!0),s.enter(e)):s.leave(e,()=>{bs(e,!1)}):bs(e,t))},beforeUnmount(e,{value:t}){bs(e,t)}};function bs(e,t){e.style.display=t?e[Pr]:"none",e[cf]=!t}const uf=Symbol("");function Zb(e){const t=Gs();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>Mr(o,r))},s=()=>{const r=e(t.proxy);t.ce?Mr(t.ce,r):to(t.subTree,r),n(r)};wu(()=>{M_(s)}),ko(()=>{const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),Vo(()=>r.disconnect())})}function to(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{to(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Mr(e.el,t);else if(e.type===Ve)e.children.forEach(n=>to(n,t));else if(e.type===Cr){let{el:n,anchor:s}=e;for(;n&&(Mr(n,t),n!==s);)n=n.nextSibling}}function Mr(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const r in t)n.setProperty(`--${r}`,t[r]),s+=`--${r}: ${t[r]};`;n[uf]=s}}const Ev=/(^|;)\s*display\s*:/;function bv(e,t,n){const s=e.style,r=be(n);let o=!1;if(n&&!r){if(t)if(be(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&Sr(s,l,"")}else for(const a in t)n[a]==null&&Sr(s,a,"");for(const a in n)a==="display"&&(o=!0),Sr(s,a,n[a])}else if(r){if(t!==n){const a=s[uf];a&&(n+=";"+a),s.cssText=n,o=Ev.test(n)}}else t&&e.removeAttribute("style");Pr in e&&(e[Pr]=o?s.display:"",e[cf]&&(s.display="none"))}const Tl=/\s*!important$/;function Sr(e,t,n){if(te(n))n.forEach(s=>Sr(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=yv(e,t);Tl.test(n)?e.setProperty(ln(s),n.replace(Tl,""),"important"):e[s]=n}}const Cl=["Webkit","Moz","ms"],Ri={};function yv(e,t){const n=Ri[t];if(n)return n;let s=ht(t);if(s!=="filter"&&s in e)return Ri[t]=s;s=Kr(s);for(let r=0;rIi||(wv.then(()=>Ii=0),Ii=Date.now());function Ov(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Et(Nv(s,n.value),t,5,[s])};return n.value=e,n.attached=Sv(),n}function Nv(e,t){if(te(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const $l=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xv=(e,t,n,s,r,o)=>{const a=r==="svg";t==="class"?vv(e,s,a):t==="style"?bv(e,n,s):jr(t)?Ao(t)||Tv(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$v(e,t,s,a))?(Ol(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Sl(e,t,s,a,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!be(s))?Ol(e,ht(t),s):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Sl(e,t,s,a))};function $v(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&$l(t)&&ie(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return $l(t)&&be(n)?!1:t in e}const ff=new WeakMap,df=new WeakMap,kr=Symbol("_moveCb"),Dl=Symbol("_enterCb"),Dv=e=>(delete e.props.mode,e),Lv=Dv({name:"TransitionGroup",props:Se({},rf,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Gs(),s=_u();let r,o;return Su(()=>{if(!r.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!Mv(r[0].el,n.vnode.el,a))return;r.forEach(Rv),r.forEach(Iv);const l=r.filter(Pv);lf(),l.forEach(c=>{const h=c.el,f=h.style;Rt(h,a),f.transform=f.webkitTransform=f.transitionDuration="";const d=h[kr]=p=>{p&&p.target!==h||(!p||/transform$/.test(p.propertyName))&&(h.removeEventListener("transitionend",d),h[kr]=null,qt(h,a))};h.addEventListener("transitionend",d)})}),()=>{const a=fe(e),l=of(a);let c=a.tag||Ve;if(r=[],o)for(let h=0;h{l.split(/\s+/).forEach(c=>c&&s.classList.remove(c))}),n.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(s);const{hasTransform:a}=af(s);return o.removeChild(s),a}const on=e=>{const t=e.props["onUpdate:modelValue"]||!1;return te(t)?n=>br(t,n):t};function kv(e){e.target.composing=!0}function Ll(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const dt=Symbol("_assign"),Rl={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[dt]=on(r);const o=s||r.props&&r.props.type==="number";Vt(e,t?"change":"input",a=>{if(a.target.composing)return;let l=e.value;n&&(l=l.trim()),o&&(l=Nr(l)),e[dt](l)}),n&&Vt(e,"change",()=>{e.value=e.value.trim()}),t||(Vt(e,"compositionstart",kv),Vt(e,"compositionend",Ll),Vt(e,"change",Ll))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},a){if(e[dt]=on(a),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Nr(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},Vv={deep:!0,created(e,t,n){e[dt]=on(n),Vt(e,"change",()=>{const s=e._modelValue,r=os(e),o=e.checked,a=e[dt];if(te(s)){const l=wo(s,r),c=l!==-1;if(o&&!c)a(s.concat(r));else if(!o&&c){const h=[...s];h.splice(l,1),a(h)}}else if(us(s)){const l=new Set(s);o?l.add(r):l.delete(r),a(l)}else a(hf(e,o))})},mounted:Il,beforeUpdate(e,t,n){e[dt]=on(n),Il(e,t,n)}};function Il(e,{value:t},n){e._modelValue=t;let s;te(t)?s=wo(t,n.props.value)>-1:us(t)?s=t.has(n.props.value):s=xn(t,hf(e,!0)),e.checked!==s&&(e.checked=s)}const Fv={created(e,{value:t},n){e.checked=xn(t,n.props.value),e[dt]=on(n),Vt(e,"change",()=>{e[dt](os(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[dt]=on(s),t!==n&&(e.checked=xn(t,s.props.value))}},Hv={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=us(t);Vt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?Nr(os(a)):os(a));e[dt](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,Qr(()=>{e._assigning=!1})}),e[dt]=on(s)},mounted(e,{value:t}){Pl(e,t)},beforeUpdate(e,t,n){e[dt]=on(n)},updated(e,{value:t}){e._assigning||Pl(e,t)}};function Pl(e,t){const n=e.multiple,s=te(t);if(!(n&&!s&&!us(t))){for(let r=0,o=e.options.length;rString(h)===String(l)):a.selected=wo(t,l)>-1}else a.selected=t.has(l);else if(xn(os(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function os(e){return"_value"in e?e._value:e.value}function hf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ty={created(e,t,n){_r(e,t,n,null,"created")},mounted(e,t,n){_r(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){_r(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){_r(e,t,n,s,"updated")}};function Bv(e,t){switch(e){case"SELECT":return Hv;case"TEXTAREA":return Rl;default:switch(t){case"checkbox":return Vv;case"radio":return Fv;default:return Rl}}}function _r(e,t,n,s,r){const a=Bv(e.tagName,n.props&&n.props.type)[r];a&&a(e,t,n,s)}const jv=["ctrl","shift","alt","meta"],Wv={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)=>jv.some(n=>e[`${n}Key`]&&!t.includes(n))},ny=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...o)=>{for(let a=0;a{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const o=ln(r.key);if(t.some(a=>a===o||Kv[a]===o))return e(r)})},Uv=Se({patchProp:xv},hv);let Ml;function pf(){return Ml||(Ml=$_(Uv))}const ry=(...e)=>{pf().render(...e)},Yv=(...e)=>{const t=pf().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=qv(s);if(!r)return;const o=t._component;!ie(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const a=n(r,!1,Gv(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function Gv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qv(e){return be(e)?document.querySelector(e):e}var zv=!1;/*! * pinia v2.2.4 * (c) 2024 Eduardo San Martin Morote * @license MIT - */let fC;const vf=t=>fC=t,gC=Symbol();function qp(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Wc;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Wc||(Wc={}));function u$(){const t=Bx(!0),e=t.run(()=>me({}));let n=[],i=[];const s=uf({install(r){vf(s),s._a=r,r.provide(gC,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return!this._a&&!c$?i.push(r):n.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const pC=()=>{};function Bb(t,e,n,i=pC){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&af()&&o_(s),s}function Ra(t,...e){t.slice().forEach(n=>{n(...e)})}const d$=t=>t(),Vb=Symbol(),Mg=Symbol();function Zp(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];qp(s)&&qp(i)&&t.hasOwnProperty(n)&&!Ht(i)&&!Qr(i)?t[n]=Zp(s,i):t[n]=i}return t}const h$=Symbol();function f$(t){return!qp(t)||!t.hasOwnProperty(h$)}const{assign:Nr}=Object;function g$(t){return!!(Ht(t)&&t.effect)}function p$(t,e,n,i){const{state:s,actions:r,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=s?s():{});const u=gD(n.state.value[t]);return Nr(u,r,Object.keys(o||{}).reduce((d,f)=>(d[f]=uf(ve(()=>{vf(n);const g=n._s.get(t);return o[f].call(g,g)})),d),{}))}return l=mC(t,c,e,n,i,!0),l}function mC(t,e,n={},i,s,r){let o;const a=Nr({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],g;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),me({});let m;function v(T){let A;c=u=!1,typeof T=="function"?(T(i.state.value[t]),A={type:Wc.patchFunction,storeId:t,events:g}):(Zp(i.state.value[t],T),A={type:Wc.patchObject,payload:T,storeId:t,events:g});const I=m=Symbol();Rn().then(()=>{m===I&&(c=!0)}),u=!0,Ra(d,A,i.state.value[t])}const y=r?function(){const{state:A}=n,I=A?A():{};this.$patch(V=>{Nr(V,I)})}:pC;function x(){o.stop(),d=[],f=[],i._s.delete(t)}const E=(T,A="")=>{if(Vb in T)return T[Mg]=A,T;const I=function(){vf(i);const V=Array.from(arguments),Y=[],ne=[];function N(W){Y.push(W)}function B(W){ne.push(W)}Ra(f,{args:V,name:I[Mg],store:b,after:N,onError:B});let R;try{R=T.apply(this&&this.$id===t?this:b,V)}catch(W){throw Ra(ne,W),W}return R instanceof Promise?R.then(W=>(Ra(Y,W),W)).catch(W=>(Ra(ne,W),Promise.reject(W))):(Ra(Y,R),R)};return I[Vb]=!0,I[Mg]=A,I},w={_p:i,$id:t,$onAction:Bb.bind(null,f),$patch:v,$reset:y,$subscribe(T,A={}){const I=Bb(d,T,A.detached,()=>V()),V=o.run(()=>jt(()=>i.state.value[t],Y=>{(A.flush==="sync"?u:c)&&T({storeId:t,type:Wc.direct,events:g},Y)},Nr({},l,A)));return I},$dispose:x},b=Ei(w);i._s.set(t,b);const k=(i._a&&i._a.runWithContext||d$)(()=>i._e.run(()=>(o=Bx()).run(()=>e({action:E}))));for(const T in k){const A=k[T];if(Ht(A)&&!g$(A)||Qr(A))r||(p&&f$(A)&&(Ht(A)?A.value=p[T]:Zp(A,p[T])),i.state.value[t][T]=A);else if(typeof A=="function"){const I=E(A,T);k[T]=I,a.actions[T]=A}}return Nr(b,k),Nr(lt(b),k),Object.defineProperty(b,"$state",{get:()=>i.state.value[t],set:T=>{v(A=>{Nr(A,T)})}}),i._p.forEach(T=>{Nr(b,o.run(()=>T({store:b,app:i._a,pinia:i,options:a})))}),p&&r&&n.hydrate&&n.hydrate(b.$state,p),c=!0,u=!0,b}function _C(t,e,n){let i,s;const r=typeof e=="function";typeof t=="string"?(i=t,s=r?n:e):(s=t,i=t.id);function o(a,l){const c=jD();return a=a||(c?ji(gC,null):null),a&&vf(a),a=fC,a._s.has(i)||(r?mC(i,e,s,a):p$(i,s,a)),a._s.get(i)}return o.$id=i,o}/*! + */let gf;const ri=e=>gf=e,mf=Symbol();function no(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ds;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ds||(Ds={}));function Xv(){const e=Bc(!0),t=e.run(()=>Xr({}));let n=[],s=[];const r=zr({install(o){ri(r),r._a=o,o.provide(mf,r),o.config.globalProperties.$pinia=r,s.forEach(a=>n.push(a)),s=[]},use(o){return!this._a&&!zv?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const _f=()=>{};function kl(e,t,n,s=_f){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&jc()&&ym(r),r}function jn(e,...t){e.slice().forEach(n=>{n(...t)})}const Qv=e=>e(),Vl=Symbol(),Pi=Symbol();function so(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];no(r)&&no(s)&&e.hasOwnProperty(n)&&!Ae(s)&&!nn(s)?e[n]=so(r,s):e[n]=s}return e}const Jv=Symbol();function Zv(e){return!no(e)||!e.hasOwnProperty(Jv)}const{assign:zt}=Object;function eE(e){return!!(Ae(e)&&e.effect)}function tE(e,t,n,s){const{state:r,actions:o,getters:a}=t,l=n.state.value[e];let c;function h(){l||(n.state.value[e]=r?r():{});const f=Ym(n.state.value[e]);return zt(f,o,Object.keys(a||{}).reduce((d,p)=>(d[p]=zr(nt(()=>{ri(n);const E=n._s.get(e);return a[p].call(E,E)})),d),{}))}return c=vf(e,h,t,n,s,!0),c}function vf(e,t,n={},s,r,o){let a;const l=zt({actions:{}},n),c={deep:!0};let h,f,d=[],p=[],E;const A=s.state.value[e];!o&&!A&&(s.state.value[e]={}),Xr({});let C;function k(K){let w;h=f=!1,typeof K=="function"?(K(s.state.value[e]),w={type:Ds.patchFunction,storeId:e,events:E}):(so(s.state.value[e],K),w={type:Ds.patchObject,payload:K,storeId:e,events:E});const P=C=Symbol();Qr().then(()=>{C===P&&(h=!0)}),f=!0,jn(d,w,s.state.value[e])}const I=o?function(){const{state:w}=n,P=w?w():{};this.$patch(z=>{zt(z,P)})}:_f;function R(){a.stop(),d=[],p=[],s._s.delete(e)}const F=(K,w="")=>{if(Vl in K)return K[Pi]=w,K;const P=function(){ri(s);const z=Array.from(arguments),H=[],Q=[];function ce(Z){H.push(Z)}function me(Z){Q.push(Z)}jn(p,{args:z,name:P[Pi],store:O,after:ce,onError:me});let re;try{re=K.apply(this&&this.$id===e?this:O,z)}catch(Z){throw jn(Q,Z),Z}return re instanceof Promise?re.then(Z=>(jn(H,Z),Z)).catch(Z=>(jn(Q,Z),Promise.reject(Z))):(jn(H,re),re)};return P[Vl]=!0,P[Pi]=w,P},$={_p:s,$id:e,$onAction:kl.bind(null,p),$patch:k,$reset:I,$subscribe(K,w={}){const P=kl(d,K,w.detached,()=>z()),z=a.run(()=>Xn(()=>s.state.value[e],H=>{(w.flush==="sync"?f:h)&&K({storeId:e,type:Ds.direct,events:E},H)},zt({},c,w)));return P},$dispose:R},O=Ks($);s._s.set(e,O);const Y=(s._a&&s._a.runWithContext||Qv)(()=>s._e.run(()=>(a=Bc()).run(()=>t({action:F}))));for(const K in Y){const w=Y[K];if(Ae(w)&&!eE(w)||nn(w))o||(A&&Zv(w)&&(Ae(w)?w.value=A[K]:so(w,A[K])),s.state.value[e][K]=w);else if(typeof w=="function"){const P=F(w,K);Y[K]=P,l.actions[K]=w}}return zt(O,Y),zt(fe(O),Y),Object.defineProperty(O,"$state",{get:()=>s.state.value[e],set:K=>{k(w=>{zt(w,K)})}}),s._p.forEach(K=>{zt(O,a.run(()=>K({store:O,app:s._a,pinia:s,options:l})))}),A&&o&&n.hydrate&&n.hydrate(O.$state,A),h=!0,f=!0,O}function Ef(e,t,n){let s,r;const o=typeof t=="function";typeof e=="string"?(s=e,r=o?n:t):(r=e,s=e.id);function a(l,c){const h=T_();return l=l||(h?ft(mf,null):null),l&&ri(l),l=gf,l._s.has(s)||(o?vf(s,t,r,l):tE(s,r,l)),l._s.get(s)}return a.$id=s,a}/*! * vue-router v4.4.5 * (c) 2024 Eduardo San Martin Morote * @license MIT - */const Xa=typeof document<"u";function vC(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function m$(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&vC(t.default)}const kt=Object.assign;function Ig(t,e){const n={};for(const i in e){const s=e[i];n[i]=gs(s)?s.map(t):t(s)}return n}const zc=()=>{},gs=Array.isArray,yC=/#/g,_$=/&/g,v$=/\//g,y$=/=/g,b$=/\?/g,bC=/\+/g,w$=/%5B/g,x$=/%5D/g,wC=/%5E/g,E$=/%60/g,xC=/%7B/g,C$=/%7C/g,EC=/%7D/g,S$=/%20/g;function C_(t){return encodeURI(""+t).replace(C$,"|").replace(w$,"[").replace(x$,"]")}function k$(t){return C_(t).replace(xC,"{").replace(EC,"}").replace(wC,"^")}function Jp(t){return C_(t).replace(bC,"%2B").replace(S$,"+").replace(yC,"%23").replace(_$,"%26").replace(E$,"`").replace(xC,"{").replace(EC,"}").replace(wC,"^")}function T$(t){return Jp(t).replace(y$,"%3D")}function A$(t){return C_(t).replace(yC,"%23").replace(b$,"%3F")}function P$(t){return t==null?"":A$(t).replace(v$,"%2F")}function ou(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const M$=/\/$/,I$=t=>t.replace(M$,"");function Dg(t,e,n="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=t(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=L$(i??e,n),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:ou(o)}}function D$(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Wb(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function R$(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&El(e.matched[i],n.matched[s])&&CC(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function El(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function CC(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!$$(t[n],e[n]))return!1;return!0}function $$(t,e){return gs(t)?zb(t,e):gs(e)?zb(e,t):t===e}function zb(t,e){return gs(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function L$(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=n.length-1,o,a;for(o=0;o1&&r--;else break;return n.slice(0,r).join("/")+"/"+i.slice(o).join("/")}const Ar={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var au;(function(t){t.pop="pop",t.push="push"})(au||(au={}));var Yc;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Yc||(Yc={}));function O$(t){if(!t)if(Xa){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),I$(t)}const N$=/^[^#]+#/;function F$(t,e){return t.replace(N$,"#")+e}function B$(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const yf=()=>({left:window.scrollX,top:window.scrollY});function V$(t){let e;if("el"in t){const n=t.el,i=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;e=B$(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function Yb(t,e){return(history.state?history.state.position-e:-1)+t}const Qp=new Map;function W$(t,e){Qp.set(t,e)}function z$(t){const e=Qp.get(t);return Qp.delete(t),e}let Y$=()=>location.protocol+"//"+location.host;function SC(t,e){const{pathname:n,search:i,hash:s}=e,r=t.indexOf("#");if(r>-1){let a=s.includes(t.slice(r))?t.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),Wb(l,"")}return Wb(n,t)+i+s}function H$(t,e,n,i){let s=[],r=[],o=null;const a=({state:f})=>{const g=SC(t,location),p=n.value,m=e.value;let v=0;if(f){if(n.value=g,e.value=f,o&&o===p){o=null;return}v=m?f.position-m.position:0}else i(g);s.forEach(y=>{y(n.value,p,{delta:v,type:au.pop,direction:v?v>0?Yc.forward:Yc.back:Yc.unknown})})};function l(){o=n.value}function c(f){s.push(f);const g=()=>{const p=s.indexOf(f);p>-1&&s.splice(p,1)};return r.push(g),g}function u(){const{history:f}=window;f.state&&f.replaceState(kt({},f.state,{scroll:yf()}),"")}function d(){for(const f of r)f();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Hb(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?yf():null}}function j$(t){const{history:e,location:n}=window,i={value:SC(t,n)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const d=t.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:Y$()+t+l;try{e[u?"replaceState":"pushState"](c,"",f),s.value=c}catch(g){console.error(g),n[u?"replace":"assign"](f)}}function o(l,c){const u=kt({},e.state,Hb(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=kt({},s.value,e.state,{forward:l,scroll:yf()});r(u.current,u,!0);const d=kt({},Hb(i.value,l,null),{position:u.position+1},c);r(l,d,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function K$(t){t=O$(t);const e=j$(t),n=H$(t,e.state,e.location,e.replace);function i(r,o=!0){o||n.pauseListeners(),history.go(r)}const s=kt({location:"",base:t,go:i,createHref:F$.bind(null,t)},e,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function U$(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),K$(t)}function G$(t){return typeof t=="string"||t&&typeof t=="object"}function kC(t){return typeof t=="string"||typeof t=="symbol"}const TC=Symbol("");var jb;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(jb||(jb={}));function Cl(t,e){return kt(new Error,{type:t,[TC]:!0},e)}function Ks(t,e){return t instanceof Error&&TC in t&&(e==null||!!(t.type&e))}const Kb="[^/]+?",X$={sensitive:!1,strict:!1,start:!0,end:!0},q$=/[.+*?^${}()[\]/\\]/g;function Z$(t,e){const n=kt({},X$,e),i=[];let s=n.start?"^":"";const r=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function AC(t,e){let n=0;const i=t.score,s=e.score;for(;n0&&e[e.length-1]<0}const Q$={type:0,value:""},eL=/[a-zA-Z0-9_]/;function tL(t){if(!t)return[[]];if(t==="/")return[[Q$]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=0,i=n;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function d(){c&&(n===0?r.push({type:0,value:c}):n===1||n===2||n===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a{o(E)}:zc}function o(d){if(kC(d)){const f=i.get(d);f&&(i.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=oL(d,n);n.splice(f,0,d),d.record.name&&!qb(d)&&i.set(d.record.name,d)}function c(d,f){let g,p={},m,v;if("name"in d&&d.name){if(g=i.get(d.name),!g)throw Cl(1,{location:d});v=g.record.name,p=kt(Gb(f.params,g.keys.filter(E=>!E.optional).concat(g.parent?g.parent.keys.filter(E=>E.optional):[]).map(E=>E.name)),d.params&&Gb(d.params,g.keys.map(E=>E.name))),m=g.stringify(p)}else if(d.path!=null)m=d.path,g=n.find(E=>E.re.test(m)),g&&(p=g.parse(m),v=g.record.name);else{if(g=f.name?i.get(f.name):n.find(E=>E.re.test(f.path)),!g)throw Cl(1,{location:d,currentLocation:f});v=g.record.name,p=kt({},f.params,d.params),m=g.stringify(p)}const y=[];let x=g;for(;x;)y.unshift(x.record),x=x.parent;return{name:v,path:m,params:p,matched:y,meta:rL(y)}}t.forEach(d=>r(d));function u(){n.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function Gb(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function Xb(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:sL(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function sL(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]=typeof n=="object"?n[i]:n;return e}function qb(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function rL(t){return t.reduce((e,n)=>kt(e,n.meta),{})}function Zb(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function oL(t,e){let n=0,i=e.length;for(;n!==i;){const r=n+i>>1;AC(t,e[r])<0?i=r:n=r+1}const s=aL(t);return s&&(i=e.lastIndexOf(s,i-1)),i}function aL(t){let e=t;for(;e=e.parent;)if(PC(e)&&AC(t,e)===0)return e}function PC({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function lL(t){const e={};if(t===""||t==="?")return e;const i=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;sr&&Jp(r)):[i&&Jp(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function cL(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=gs(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const uL=Symbol(""),Qb=Symbol(""),bf=Symbol(""),S_=Symbol(""),em=Symbol("");function lc(){let t=[];function e(i){return t.push(i),()=>{const s=t.indexOf(i);s>-1&&t.splice(s,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Yr(t,e,n,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=f=>{f===!1?l(Cl(4,{from:n,to:e})):f instanceof Error?l(f):G$(f)?l(Cl(2,{from:e,to:f})):(o&&i.enterCallbacks[s]===o&&typeof f=="function"&&o.push(f),a())},u=r(()=>t.call(i&&i.instances[s],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(f=>l(f))})}function Rg(t,e,n,i,s=r=>r()){const r=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(vC(l)){const u=(l.__vccOpts||l)[e];u&&r.push(Yr(u,n,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=m$(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const g=(d.__vccOpts||d)[e];return g&&Yr(g,n,i,o,a,s)()}))}}return r}function e0(t){const e=ji(bf),n=ji(S_),i=ve(()=>{const l=Z(t.to);return e.resolve(l)}),s=ve(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(El.bind(null,u));if(f>-1)return f;const g=t0(l[c-2]);return c>1&&t0(u)===g&&d[d.length-1].path!==g?d.findIndex(El.bind(null,l[c-2])):f}),r=ve(()=>s.value>-1&&gL(n.params,i.value.params)),o=ve(()=>s.value>-1&&s.value===n.matched.length-1&&CC(n.params,i.value.params));function a(l={}){return fL(l)?e[Z(t.replace)?"replace":"push"](Z(t.to)).catch(zc):Promise.resolve()}return{route:i,href:ve(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}const dL=fn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:e0,setup(t,{slots:e}){const n=Ei(e0(t)),{options:i}=ji(bf),s=ve(()=>({[n0(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[n0(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&e.default(n);return t.custom?r:ha("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},r)}}}),hL=dL;function fL(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function gL(t,e){for(const n in e){const i=e[n],s=t[n];if(typeof i=="string"){if(i!==s)return!1}else if(!gs(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function t0(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const n0=(t,e,n)=>t??e??n,pL=fn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=ji(em),s=ve(()=>t.route||i.value),r=ji(Qb,0),o=ve(()=>{let c=Z(r);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=ve(()=>s.value.matched[o.value]);sh(Qb,ve(()=>o.value+1)),sh(uL,a),sh(em,s);const l=me();return jt(()=>[l.value,a.value,t.name],([c,u,d],[f,g,p])=>{u&&(u.instances[d]=c,g&&g!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!El(u,g)||!f)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=s.value,u=t.name,d=a.value,f=d&&d.components[u];if(!f)return i0(n.default,{Component:f,route:c});const g=d.props[u],p=g?g===!0?c.params:typeof g=="function"?g(c):g:null,v=ha(f,kt({},p,e,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return i0(n.default,{Component:v,route:c})||v}}});function i0(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const MC=pL;function mL(t){const e=iL(t.routes,t),n=t.parseQuery||lL,i=t.stringifyQuery||Jb,s=t.history,r=lc(),o=lc(),a=lc(),l=df(Ar);let c=Ar;Xa&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ig.bind(null,L=>""+L),d=Ig.bind(null,P$),f=Ig.bind(null,ou);function g(L,le){let de,xe;return kC(L)?(de=e.getRecordMatcher(L),xe=le):xe=L,e.addRoute(xe,de)}function p(L){const le=e.getRecordMatcher(L);le&&e.removeRoute(le)}function m(){return e.getRoutes().map(L=>L.record)}function v(L){return!!e.getRecordMatcher(L)}function y(L,le){if(le=kt({},le||l.value),typeof L=="string"){const O=Dg(n,L,le.path),K=e.resolve({path:O.path},le),U=s.createHref(O.fullPath);return kt(O,K,{params:f(K.params),hash:ou(O.hash),redirectedFrom:void 0,href:U})}let de;if(L.path!=null)de=kt({},L,{path:Dg(n,L.path,le.path).path});else{const O=kt({},L.params);for(const K in O)O[K]==null&&delete O[K];de=kt({},L,{params:d(O)}),le.params=d(le.params)}const xe=e.resolve(de,le),z=L.hash||"";xe.params=u(f(xe.params));const fe=D$(i,kt({},L,{hash:k$(z),path:xe.path})),S=s.createHref(fe);return kt({fullPath:fe,hash:z,query:i===Jb?cL(L.query):L.query||{}},xe,{redirectedFrom:void 0,href:S})}function x(L){return typeof L=="string"?Dg(n,L,l.value.path):kt({},L)}function E(L,le){if(c!==L)return Cl(8,{from:le,to:L})}function w(L){return k(L)}function b(L){return w(kt(x(L),{replace:!0}))}function C(L){const le=L.matched[L.matched.length-1];if(le&&le.redirect){const{redirect:de}=le;let xe=typeof de=="function"?de(L):de;return typeof xe=="string"&&(xe=xe.includes("?")||xe.includes("#")?xe=x(xe):{path:xe},xe.params={}),kt({query:L.query,hash:L.hash,params:xe.path!=null?{}:L.params},xe)}}function k(L,le){const de=c=y(L),xe=l.value,z=L.state,fe=L.force,S=L.replace===!0,O=C(de);if(O)return k(kt(x(O),{state:typeof O=="object"?kt({},z,O.state):z,force:fe,replace:S}),le||de);const K=de;K.redirectedFrom=le;let U;return!fe&&R$(i,xe,de)&&(U=Cl(16,{to:K,from:xe}),ce(xe,xe,!0,!1)),(U?Promise.resolve(U):I(K,xe)).catch(oe=>Ks(oe)?Ks(oe,2)?oe:H(oe):X(oe,K,xe)).then(oe=>{if(oe){if(Ks(oe,2))return k(kt({replace:S},x(oe.to),{state:typeof oe.to=="object"?kt({},z,oe.to.state):z,force:fe}),le||K)}else oe=Y(K,xe,!0,S,z);return V(K,xe,oe),oe})}function T(L,le){const de=E(L,le);return de?Promise.reject(de):Promise.resolve()}function A(L){const le=D.values().next().value;return le&&typeof le.runWithContext=="function"?le.runWithContext(L):L()}function I(L,le){let de;const[xe,z,fe]=_L(L,le);de=Rg(xe.reverse(),"beforeRouteLeave",L,le);for(const O of xe)O.leaveGuards.forEach(K=>{de.push(Yr(K,L,le))});const S=T.bind(null,L,le);return de.push(S),ue(de).then(()=>{de=[];for(const O of r.list())de.push(Yr(O,L,le));return de.push(S),ue(de)}).then(()=>{de=Rg(z,"beforeRouteUpdate",L,le);for(const O of z)O.updateGuards.forEach(K=>{de.push(Yr(K,L,le))});return de.push(S),ue(de)}).then(()=>{de=[];for(const O of fe)if(O.beforeEnter)if(gs(O.beforeEnter))for(const K of O.beforeEnter)de.push(Yr(K,L,le));else de.push(Yr(O.beforeEnter,L,le));return de.push(S),ue(de)}).then(()=>(L.matched.forEach(O=>O.enterCallbacks={}),de=Rg(fe,"beforeRouteEnter",L,le,A),de.push(S),ue(de))).then(()=>{de=[];for(const O of o.list())de.push(Yr(O,L,le));return de.push(S),ue(de)}).catch(O=>Ks(O,8)?O:Promise.reject(O))}function V(L,le,de){a.list().forEach(xe=>A(()=>xe(L,le,de)))}function Y(L,le,de,xe,z){const fe=E(L,le);if(fe)return fe;const S=le===Ar,O=Xa?history.state:{};de&&(xe||S?s.replace(L.fullPath,kt({scroll:S&&O&&O.scroll},z)):s.push(L.fullPath,z)),l.value=L,ce(L,le,de,S),H()}let ne;function N(){ne||(ne=s.listen((L,le,de)=>{if(!ee.listening)return;const xe=y(L),z=C(xe);if(z){k(kt(z,{replace:!0}),xe).catch(zc);return}c=xe;const fe=l.value;Xa&&W$(Yb(fe.fullPath,de.delta),yf()),I(xe,fe).catch(S=>Ks(S,12)?S:Ks(S,2)?(k(S.to,xe).then(O=>{Ks(O,20)&&!de.delta&&de.type===au.pop&&s.go(-1,!1)}).catch(zc),Promise.reject()):(de.delta&&s.go(-de.delta,!1),X(S,xe,fe))).then(S=>{S=S||Y(xe,fe,!1),S&&(de.delta&&!Ks(S,8)?s.go(-de.delta,!1):de.type===au.pop&&Ks(S,20)&&s.go(-1,!1)),V(xe,fe,S)}).catch(zc)}))}let B=lc(),R=lc(),W;function X(L,le,de){H(L);const xe=R.list();return xe.length?xe.forEach(z=>z(L,le,de)):console.error(L),Promise.reject(L)}function J(){return W&&l.value!==Ar?Promise.resolve():new Promise((L,le)=>{B.add([L,le])})}function H(L){return W||(W=!L,N(),B.list().forEach(([le,de])=>L?de(L):le()),B.reset()),L}function ce(L,le,de,xe){const{scrollBehavior:z}=t;if(!Xa||!z)return Promise.resolve();const fe=!de&&z$(Yb(L.fullPath,0))||(xe||!de)&&history.state&&history.state.scroll||null;return Rn().then(()=>z(L,le,fe)).then(S=>S&&V$(S)).catch(S=>X(S,L,le))}const ie=L=>s.go(L);let te;const D=new Set,ee={currentRoute:l,listening:!0,addRoute:g,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:v,getRoutes:m,resolve:y,options:t,push:w,replace:b,go:ie,back:()=>ie(-1),forward:()=>ie(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:R.add,isReady:J,install(L){const le=this;L.component("RouterLink",hL),L.component("RouterView",MC),L.config.globalProperties.$router=le,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>Z(l)}),Xa&&!te&&l.value===Ar&&(te=!0,w(s.location).catch(z=>{}));const de={};for(const z in Ar)Object.defineProperty(de,z,{get:()=>l.value[z],enumerable:!0});L.provide(bf,le),L.provide(S_,eE(de)),L.provide(em,l);const xe=L.unmount;D.add(L),L.unmount=function(){D.delete(L),D.size<1&&(c=Ar,ne&&ne(),ne=null,l.value=Ar,te=!1,W=!1),xe()}}};function ue(L){return L.reduce((le,de)=>le.then(()=>A(de)),Promise.resolve())}return ee}function _L(t,e){const n=[],i=[],s=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;oEl(c,a))?i.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>El(c,l))||s.push(l))}return[n,i,s]}function IC(){return ji(bf)}function Wu(t){return ji(S_)}const vL={getCookie(t){const n=`; ${document.cookie}`.split(`; ${t}=`);if(n.length===2)return n.pop().split(";").shift()}},s0="[a-fA-F\\d:]",jr=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${s0})|(?<=${s0})(?=\\s|$))`:"",ns="(?: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}",_n="[a-fA-F\\d]{1,4}",wf=` + */const Un=typeof document<"u";function bf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function nE(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&bf(e.default)}const ge=Object.assign;function Mi(e,t){const n={};for(const s in t){const r=t[s];n[s]=bt(r)?r.map(e):e(r)}return n}const Ls=()=>{},bt=Array.isArray,yf=/#/g,sE=/&/g,rE=/\//g,iE=/=/g,oE=/\?/g,Af=/\+/g,aE=/%5B/g,lE=/%5D/g,Tf=/%5E/g,cE=/%60/g,Cf=/%7B/g,uE=/%7C/g,wf=/%7D/g,fE=/%20/g;function Yo(e){return encodeURI(""+e).replace(uE,"|").replace(aE,"[").replace(lE,"]")}function dE(e){return Yo(e).replace(Cf,"{").replace(wf,"}").replace(Tf,"^")}function ro(e){return Yo(e).replace(Af,"%2B").replace(fE,"+").replace(yf,"%23").replace(sE,"%26").replace(cE,"`").replace(Cf,"{").replace(wf,"}").replace(Tf,"^")}function hE(e){return ro(e).replace(iE,"%3D")}function pE(e){return Yo(e).replace(yf,"%23").replace(oE,"%3F")}function gE(e){return e==null?"":pE(e).replace(rE,"%2F")}function Hs(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const mE=/\/$/,_E=e=>e.replace(mE,"");function ki(e,t,n="/"){let s,r={},o="",a="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(s=t.slice(0,c),o=t.slice(c+1,l>-1?l:t.length),r=e(o)),l>-1&&(s=s||t.slice(0,l),a=t.slice(l,t.length)),s=yE(s??t,n),{fullPath:s+(o&&"?")+o+a,path:s,query:r,hash:Hs(a)}}function vE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Fl(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function EE(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&as(t.matched[s],n.matched[r])&&Sf(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function as(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Sf(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!bE(e[n],t[n]))return!1;return!0}function bE(e,t){return bt(e)?Hl(e,t):bt(t)?Hl(t,e):e===t}function Hl(e,t){return bt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function yE(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,a,l;for(a=0;a1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(a).join("/")}const Gt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Bs;(function(e){e.pop="pop",e.push="push"})(Bs||(Bs={}));var Rs;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Rs||(Rs={}));function AE(e){if(!e)if(Un){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),_E(e)}const TE=/^[^#]+#/;function CE(e,t){return e.replace(TE,"#")+t}function wE(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const ii=()=>({left:window.scrollX,top:window.scrollY});function SE(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=wE(r,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 Bl(e,t){return(history.state?history.state.position-t:-1)+e}const io=new Map;function OE(e,t){io.set(e,t)}function NE(e){const t=io.get(e);return io.delete(e),t}let xE=()=>location.protocol+"//"+location.host;function Of(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let l=r.includes(e.slice(o))?e.slice(o).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),Fl(c,"")}return Fl(n,e)+s+r}function $E(e,t,n,s){let r=[],o=[],a=null;const l=({state:p})=>{const E=Of(e,location),A=n.value,C=t.value;let k=0;if(p){if(n.value=E,t.value=p,a&&a===A){a=null;return}k=C?p.position-C.position:0}else s(E);r.forEach(I=>{I(n.value,A,{delta:k,type:Bs.pop,direction:k?k>0?Rs.forward:Rs.back:Rs.unknown})})};function c(){a=n.value}function h(p){r.push(p);const E=()=>{const A=r.indexOf(p);A>-1&&r.splice(A,1)};return o.push(E),E}function f(){const{history:p}=window;p.state&&p.replaceState(ge({},p.state,{scroll:ii()}),"")}function d(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:c,listen:h,destroy:d}}function jl(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?ii():null}}function DE(e){const{history:t,location:n}=window,s={value:Of(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,h,f){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+c:xE()+e+c;try{t[f?"replaceState":"pushState"](h,"",p),r.value=h}catch(E){console.error(E),n[f?"replace":"assign"](p)}}function a(c,h){const f=ge({},t.state,jl(r.value.back,c,r.value.forward,!0),h,{position:r.value.position});o(c,f,!0),s.value=c}function l(c,h){const f=ge({},r.value,t.state,{forward:c,scroll:ii()});o(f.current,f,!0);const d=ge({},jl(s.value,c,null),{position:f.position+1},h);o(c,d,!1),s.value=c}return{location:s,state:r,push:l,replace:a}}function LE(e){e=AE(e);const t=DE(e),n=$E(e,t.state,t.location,t.replace);function s(o,a=!0){a||n.pauseListeners(),history.go(o)}const r=ge({location:"",base:e,go:s,createHref:CE.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function RE(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),LE(e)}function IE(e){return typeof e=="string"||e&&typeof e=="object"}function Nf(e){return typeof e=="string"||typeof e=="symbol"}const xf=Symbol("");var Wl;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Wl||(Wl={}));function ls(e,t){return ge(new Error,{type:e,[xf]:!0},t)}function Lt(e,t){return e instanceof Error&&xf in e&&(t==null||!!(e.type&t))}const Kl="[^/]+?",PE={sensitive:!1,strict:!1,start:!0,end:!0},ME=/[.+*?^${}()[\]/\\]/g;function kE(e,t){const n=ge({},PE,t),s=[];let r=n.start?"^":"";const o=[];for(const h of e){const f=h.length?[]:[90];n.strict&&!h.length&&(r+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function $f(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const FE={type:0,value:""},HE=/[a-zA-Z0-9_]/;function BE(e){if(!e)return[[]];if(e==="/")return[[FE]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(E){throw new Error(`ERR (${n})/"${h}": ${E}`)}let n=0,s=n;const r=[];let o;function a(){o&&r.push(o),o=[]}let l=0,c,h="",f="";function d(){h&&(n===0?o.push({type:0,value:h}):n===1||n===2||n===3?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:h,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),h="")}function p(){h+=c}for(;l{a(F)}:Ls}function a(d){if(Nf(d)){const p=s.get(d);p&&(s.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(a),p.alias.forEach(a))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&s.delete(d.record.name),d.children.forEach(a),d.alias.forEach(a))}}function l(){return n}function c(d){const p=YE(d,n);n.splice(p,0,d),d.record.name&&!ql(d)&&s.set(d.record.name,d)}function h(d,p){let E,A={},C,k;if("name"in d&&d.name){if(E=s.get(d.name),!E)throw ls(1,{location:d});k=E.record.name,A=ge(Yl(p.params,E.keys.filter(F=>!F.optional).concat(E.parent?E.parent.keys.filter(F=>F.optional):[]).map(F=>F.name)),d.params&&Yl(d.params,E.keys.map(F=>F.name))),C=E.stringify(A)}else if(d.path!=null)C=d.path,E=n.find(F=>F.re.test(C)),E&&(A=E.parse(C),k=E.record.name);else{if(E=p.name?s.get(p.name):n.find(F=>F.re.test(p.path)),!E)throw ls(1,{location:d,currentLocation:p});k=E.record.name,A=ge({},p.params,d.params),C=E.stringify(A)}const I=[];let R=E;for(;R;)I.unshift(R.record),R=R.parent;return{name:k,path:C,params:A,matched:I,meta:UE(I)}}e.forEach(d=>o(d));function f(){n.length=0,s.clear()}return{addRoute:o,resolve:h,removeRoute:a,clearRoutes:f,getRoutes:l,getRecordMatcher:r}}function Yl(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Gl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:KE(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 KE(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function ql(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function UE(e){return e.reduce((t,n)=>ge(t,n.meta),{})}function zl(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function YE(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;$f(e,t[o])<0?s=o:n=o+1}const r=GE(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function GE(e){let t=e;for(;t=t.parent;)if(Df(t)&&$f(e,t)===0)return t}function Df({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function qE(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&ro(o)):[s&&ro(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function zE(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=bt(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const XE=Symbol(""),Ql=Symbol(""),oi=Symbol(""),Go=Symbol(""),oo=Symbol("");function ys(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Zt(e,t,n,s,r,o=a=>a()){const a=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const h=p=>{p===!1?c(ls(4,{from:n,to:t})):p instanceof Error?c(p):IE(p)?c(ls(2,{from:t,to:p})):(a&&s.enterCallbacks[r]===a&&typeof p=="function"&&a.push(p),l())},f=o(()=>e.call(s&&s.instances[r],t,n,h));let d=Promise.resolve(f);e.length<3&&(d=d.then(h)),d.catch(p=>c(p))})}function Vi(e,t,n,s,r=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(bf(c)){const f=(c.__vccOpts||c)[t];f&&o.push(Zt(f,n,s,a,l,r))}else{let h=c();o.push(()=>h.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${l}" at "${a.path}"`);const d=nE(f)?f.default:f;a.mods[l]=f,a.components[l]=d;const E=(d.__vccOpts||d)[t];return E&&Zt(E,n,s,a,l,r)()}))}}return o}function Jl(e){const t=ft(oi),n=ft(Go),s=nt(()=>{const c=Ht(e.to);return t.resolve(c)}),r=nt(()=>{const{matched:c}=s.value,{length:h}=c,f=c[h-1],d=n.matched;if(!f||!d.length)return-1;const p=d.findIndex(as.bind(null,f));if(p>-1)return p;const E=Zl(c[h-2]);return h>1&&Zl(f)===E&&d[d.length-1].path!==E?d.findIndex(as.bind(null,c[h-2])):p}),o=nt(()=>r.value>-1&&eb(n.params,s.value.params)),a=nt(()=>r.value>-1&&r.value===n.matched.length-1&&Sf(n.params,s.value.params));function l(c={}){return ZE(c)?t[Ht(e.replace)?"replace":"push"](Ht(e.to)).catch(Ls):Promise.resolve()}return{route:s,href:nt(()=>s.value.href),isActive:o,isExactActive:a,navigate:l}}const QE=Au({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Jl,setup(e,{slots:t}){const n=Ks(Jl(e)),{options:s}=ft(oi),r=nt(()=>({[ec(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[ec(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:Uo("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),JE=QE;function ZE(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 eb(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!bt(r)||r.length!==s.length||s.some((o,a)=>o!==r[a]))return!1}return!0}function Zl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ec=(e,t,n)=>e??t??n,tb=Au({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=ft(oo),r=nt(()=>e.route||s.value),o=ft(Ql,0),a=nt(()=>{let h=Ht(o);const{matched:f}=r.value;let d;for(;(d=f[h])&&!d.components;)h++;return h}),l=nt(()=>r.value.matched[a.value]);Tr(Ql,nt(()=>a.value+1)),Tr(XE,l),Tr(oo,r);const c=Xr();return Xn(()=>[c.value,l.value,e.name],([h,f,d],[p,E,A])=>{f&&(f.instances[d]=h,E&&E!==f&&h&&h===p&&(f.leaveGuards.size||(f.leaveGuards=E.leaveGuards),f.updateGuards.size||(f.updateGuards=E.updateGuards))),h&&f&&(!E||!as(f,E)||!p)&&(f.enterCallbacks[d]||[]).forEach(C=>C(h))},{flush:"post"}),()=>{const h=r.value,f=e.name,d=l.value,p=d&&d.components[f];if(!p)return tc(n.default,{Component:p,route:h});const E=d.props[f],A=E?E===!0?h.params:typeof E=="function"?E(h):E:null,k=Uo(p,ge({},A,t,{onVnodeUnmounted:I=>{I.component.isUnmounted&&(d.instances[f]=null)},ref:c}));return tc(n.default,{Component:k,route:h})||k}}});function tc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Lf=tb;function nb(e){const t=WE(e.routes,e),n=e.parseQuery||qE,s=e.stringifyQuery||Xl,r=e.history,o=ys(),a=ys(),l=ys(),c=iu(Gt);let h=Gt;Un&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Mi.bind(null,N=>""+N),d=Mi.bind(null,gE),p=Mi.bind(null,Hs);function E(N,G){let q,J;return Nf(N)?(q=t.getRecordMatcher(N),J=G):J=N,t.addRoute(J,q)}function A(N){const G=t.getRecordMatcher(N);G&&t.removeRoute(G)}function C(){return t.getRoutes().map(N=>N.record)}function k(N){return!!t.getRecordMatcher(N)}function I(N,G){if(G=ge({},G||c.value),typeof N=="string"){const _=ki(n,N,G.path),b=t.resolve({path:_.path},G),L=r.createHref(_.fullPath);return ge(_,b,{params:p(b.params),hash:Hs(_.hash),redirectedFrom:void 0,href:L})}let q;if(N.path!=null)q=ge({},N,{path:ki(n,N.path,G.path).path});else{const _=ge({},N.params);for(const b in _)_[b]==null&&delete _[b];q=ge({},N,{params:d(_)}),G.params=d(G.params)}const J=t.resolve(q,G),T=N.hash||"";J.params=f(p(J.params));const pe=vE(s,ge({},N,{hash:dE(T),path:J.path})),g=r.createHref(pe);return ge({fullPath:pe,hash:T,query:s===Xl?zE(N.query):N.query||{}},J,{redirectedFrom:void 0,href:g})}function R(N){return typeof N=="string"?ki(n,N,c.value.path):ge({},N)}function F(N,G){if(h!==N)return ls(8,{from:G,to:N})}function $(N){return Y(N)}function O(N){return $(ge(R(N),{replace:!0}))}function V(N){const G=N.matched[N.matched.length-1];if(G&&G.redirect){const{redirect:q}=G;let J=typeof q=="function"?q(N):q;return typeof J=="string"&&(J=J.includes("?")||J.includes("#")?J=R(J):{path:J},J.params={}),ge({query:N.query,hash:N.hash,params:J.path!=null?{}:N.params},J)}}function Y(N,G){const q=h=I(N),J=c.value,T=N.state,pe=N.force,g=N.replace===!0,_=V(q);if(_)return Y(ge(R(_),{state:typeof _=="object"?ge({},T,_.state):T,force:pe,replace:g}),G||q);const b=q;b.redirectedFrom=G;let L;return!pe&&EE(s,J,q)&&(L=ls(16,{to:b,from:J}),De(J,J,!0,!1)),(L?Promise.resolve(L):P(b,J)).catch(S=>Lt(S)?Lt(S,2)?S:He(S):le(S,b,J)).then(S=>{if(S){if(Lt(S,2))return Y(ge({replace:g},R(S.to),{state:typeof S.to=="object"?ge({},T,S.to.state):T,force:pe}),G||b)}else S=H(b,J,!0,g,T);return z(b,J,S),S})}function K(N,G){const q=F(N,G);return q?Promise.reject(q):Promise.resolve()}function w(N){const G=Be.values().next().value;return G&&typeof G.runWithContext=="function"?G.runWithContext(N):N()}function P(N,G){let q;const[J,T,pe]=sb(N,G);q=Vi(J.reverse(),"beforeRouteLeave",N,G);for(const _ of J)_.leaveGuards.forEach(b=>{q.push(Zt(b,N,G))});const g=K.bind(null,N,G);return q.push(g),Te(q).then(()=>{q=[];for(const _ of o.list())q.push(Zt(_,N,G));return q.push(g),Te(q)}).then(()=>{q=Vi(T,"beforeRouteUpdate",N,G);for(const _ of T)_.updateGuards.forEach(b=>{q.push(Zt(b,N,G))});return q.push(g),Te(q)}).then(()=>{q=[];for(const _ of pe)if(_.beforeEnter)if(bt(_.beforeEnter))for(const b of _.beforeEnter)q.push(Zt(b,N,G));else q.push(Zt(_.beforeEnter,N,G));return q.push(g),Te(q)}).then(()=>(N.matched.forEach(_=>_.enterCallbacks={}),q=Vi(pe,"beforeRouteEnter",N,G,w),q.push(g),Te(q))).then(()=>{q=[];for(const _ of a.list())q.push(Zt(_,N,G));return q.push(g),Te(q)}).catch(_=>Lt(_,8)?_:Promise.reject(_))}function z(N,G,q){l.list().forEach(J=>w(()=>J(N,G,q)))}function H(N,G,q,J,T){const pe=F(N,G);if(pe)return pe;const g=G===Gt,_=Un?history.state:{};q&&(J||g?r.replace(N.fullPath,ge({scroll:g&&_&&_.scroll},T)):r.push(N.fullPath,T)),c.value=N,De(N,G,q,g),He()}let Q;function ce(){Q||(Q=r.listen((N,G,q)=>{if(!Pe.listening)return;const J=I(N),T=V(J);if(T){Y(ge(T,{replace:!0}),J).catch(Ls);return}h=J;const pe=c.value;Un&&OE(Bl(pe.fullPath,q.delta),ii()),P(J,pe).catch(g=>Lt(g,12)?g:Lt(g,2)?(Y(g.to,J).then(_=>{Lt(_,20)&&!q.delta&&q.type===Bs.pop&&r.go(-1,!1)}).catch(Ls),Promise.reject()):(q.delta&&r.go(-q.delta,!1),le(g,J,pe))).then(g=>{g=g||H(J,pe,!1),g&&(q.delta&&!Lt(g,8)?r.go(-q.delta,!1):q.type===Bs.pop&&Lt(g,20)&&r.go(-1,!1)),z(J,pe,g)}).catch(Ls)}))}let me=ys(),re=ys(),Z;function le(N,G,q){He(N);const J=re.list();return J.length?J.forEach(T=>T(N,G,q)):console.error(N),Promise.reject(N)}function Ce(){return Z&&c.value!==Gt?Promise.resolve():new Promise((N,G)=>{me.add([N,G])})}function He(N){return Z||(Z=!N,ce(),me.list().forEach(([G,q])=>N?q(N):G()),me.reset()),N}function De(N,G,q,J){const{scrollBehavior:T}=e;if(!Un||!T)return Promise.resolve();const pe=!q&&NE(Bl(N.fullPath,0))||(J||!q)&&history.state&&history.state.scroll||null;return Qr().then(()=>T(N,G,pe)).then(g=>g&&SE(g)).catch(g=>le(g,N,G))}const ye=N=>r.go(N);let et;const Be=new Set,Pe={currentRoute:c,listening:!0,addRoute:E,removeRoute:A,clearRoutes:t.clearRoutes,hasRoute:k,getRoutes:C,resolve:I,options:e,push:$,replace:O,go:ye,back:()=>ye(-1),forward:()=>ye(1),beforeEach:o.add,beforeResolve:a.add,afterEach:l.add,onError:re.add,isReady:Ce,install(N){const G=this;N.component("RouterLink",JE),N.component("RouterView",Lf),N.config.globalProperties.$router=G,Object.defineProperty(N.config.globalProperties,"$route",{enumerable:!0,get:()=>Ht(c)}),Un&&!et&&c.value===Gt&&(et=!0,$(r.location).catch(T=>{}));const q={};for(const T in Gt)Object.defineProperty(q,T,{get:()=>c.value[T],enumerable:!0});N.provide(oi,G),N.provide(Go,su(q)),N.provide(oo,c);const J=N.unmount;Be.add(N),N.unmount=function(){Be.delete(N),Be.size<1&&(h=Gt,Q&&Q(),Q=null,c.value=Gt,et=!1,Z=!1),J()}}};function Te(N){return N.reduce((G,q)=>G.then(()=>w(q)),Promise.resolve())}return Pe}function sb(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;aas(h,l))?s.push(l):n.push(l));const c=e.matched[a];c&&(t.matched.find(h=>as(h,c))||r.push(c))}return[n,s,r]}function iy(){return ft(oi)}function oy(e){return ft(Go)}const rb="modulepreload",ib=function(e){return"/static/app/dist/"+e},nc={},Qe=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");r=Promise.allSettled(n.map(c=>{if(c=ib(c),c in nc)return;nc[c]=!0;const h=c.endsWith(".css"),f=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const d=document.createElement("link");if(d.rel=h?"stylesheet":rb,h||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),h)return new Promise((p,E)=>{d.addEventListener("load",p),d.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},ob={getCookie(e){const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2)return n.pop().split(";").shift()}},sc="[a-fA-F\\d:]",tn=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${sc})|(?<=${sc})(?=\\s|$))`:"",mt="(?: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}",we="[a-fA-F\\d]{1,4}",ai=` (?: -(?:${_n}:){7}(?:${_n}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 -(?:${_n}:){6}(?:${ns}|:${_n}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 -(?:${_n}:){5}(?::${ns}|(?::${_n}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 -(?:${_n}:){4}(?:(?::${_n}){0,1}:${ns}|(?::${_n}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 -(?:${_n}:){3}(?:(?::${_n}){0,2}:${ns}|(?::${_n}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 -(?:${_n}:){2}(?:(?::${_n}){0,3}:${ns}|(?::${_n}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 -(?:${_n}:){1}(?:(?::${_n}){0,4}:${ns}|(?::${_n}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 -(?::(?:(?::${_n}){0,5}:${ns}|(?::${_n}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 +(?:${we}:){7}(?:${we}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 +(?:${we}:){6}(?:${mt}|:${we}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 +(?:${we}:){5}(?::${mt}|(?::${we}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 +(?:${we}:){4}(?:(?::${we}){0,1}:${mt}|(?::${we}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 +(?:${we}:){3}(?:(?::${we}){0,2}:${mt}|(?::${we}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 +(?:${we}:){2}(?:(?::${we}){0,3}:${mt}|(?::${we}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 +(?:${we}:){1}(?:(?::${we}){0,4}:${mt}|(?::${we}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 +(?::(?:(?::${we}){0,5}:${mt}|(?::${we}){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(),yL=new RegExp(`(?:^${ns}$)|(?:^${wf}$)`),bL=new RegExp(`^${ns}$`),wL=new RegExp(`^${wf}$`),xf=t=>t&&t.exact?yL:new RegExp(`(?:${jr(t)}${ns}${jr(t)})|(?:${jr(t)}${wf}${jr(t)})`,"g");xf.v4=t=>t&&t.exact?bL:new RegExp(`${jr(t)}${ns}${jr(t)}`,"g");xf.v6=t=>t&&t.exact?wL:new RegExp(`${jr(t)}${wf}${jr(t)}`,"g");const DC={exact:!1},RC=`${xf.v4().source}\\/(3[0-2]|[12]?[0-9])`,$C=`${xf.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,xL=new RegExp(`^${RC}$`),EL=new RegExp(`^${$C}$`),CL=({exact:t}=DC)=>t?xL:new RegExp(RC,"g"),SL=({exact:t}=DC)=>t?EL:new RegExp($C,"g"),LC=CL({exact:!0}),OC=SL({exact:!0}),k_=t=>LC.test(t)?4:OC.test(t)?6:0;k_.v4=t=>LC.test(t);k_.v6=t=>OC.test(t);const At=t=>{const e=Xe();if(e.Locale===null)return t;const i=Object.keys(e.Locale).filter(s=>t.match(new RegExp("^"+s+"$","gi"))!==null);return i.length===0||i.length>1?t:t.replace(new RegExp(i[0],"gi"),e.Locale[i[0]])},$n=_C("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:At("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:At("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:At("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:At("Date"),value:"date",type:"date"}],Operator:[{display:At("larger than"),value:"lgt"}],Action:[{display:At("Restrict Peer"),value:"restrict"},{display:At("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Pt("/api/getWireguardConfigurations",{},t=>{t.status&&(this.Configurations=t.data)})},regexCheckIP(t){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(t)},checkCIDR(t){return k_(t)!==0},checkWGKeyLength(t){return console.log(t),/^[A-Za-z0-9+/]{43}=?=?$/.test(t)}}}),ze=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},kL={name:"localeText",props:{t:""},computed:{getLocaleText(){return At(this.t)}}};function TL(t,e,n,i,s,r){return pe(this.getLocaleText)}const Le=ze(kL,[["render",TL]]),AL={name:"navbar",components:{LocaleText:Le},setup(){const t=$n(),e=Xe();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){Pt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage=At("Failed to check available update"),console.log(`Failed to get update: ${t.message}`))})}},PL=["data-bs-theme"],ML={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},IL={class:"sidebar-sticky"},DL={class:"nav flex-column px-2"},RL={class:"nav-item"},$L={class:"nav-item"},LL={class:"nav-item"},OL={class:"nav-link rounded-3",target:"_blank",href:"https://donaldzou.github.io/WGDashboard-Documentation/user-guides.html"},NL={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},FL={class:"nav flex-column px-2"},BL={class:"nav-item"},VL={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},WL={class:"nav flex-column px-2"},zL={class:"nav-item"},YL={class:"nav-item"},HL={class:"nav flex-column px-2 mb-3"},jL={class:"nav-item"},KL={class:"nav-item",style:{"font-size":"0.8rem"}},UL=["href"],GL={class:"nav-link text-muted rounded-3"},XL={key:1,class:"nav-link text-muted rounded-3"};function qL(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink");return P(),F("div",{class:Ee(["col-md-3 col-lg-2 d-md-block p-2 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":i.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[h("nav",ML,[h("div",IL,[e[8]||(e[8]=h("h5",{class:"text-white text-center m-0 py-3 mb-3 btn-brand"},"WGDashboard",-1)),h("ul",DL,[h("li",RL,[$(a,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:Pe(()=>[e[1]||(e[1]=h("i",{class:"bi bi-house me-2"},null,-1)),$(o,{t:"Home"})]),_:1})]),h("li",$L,[$(a,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:Pe(()=>[e[2]||(e[2]=h("i",{class:"bi bi-gear me-2"},null,-1)),$(o,{t:"Settings"})]),_:1})]),h("li",LL,[h("a",OL,[e[3]||(e[3]=h("i",{class:"bi bi-question-circle me-2"},null,-1)),$(o,{t:"Help"})])])]),e[9]||(e[9]=h("hr",{class:"text-body"},null,-1)),h("h6",NL,[e[4]||(e[4]=h("i",{class:"bi bi-body-text me-2"},null,-1)),$(o,{t:"WireGuard Configurations"})]),h("ul",FL,[(P(!0),F(Ie,null,Ge(this.wireguardConfigurationsStore.Configurations,l=>(P(),F("li",BL,[$(a,{to:"/configuration/"+l.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:Pe(()=>[h("span",{class:Ee(["dot me-2",{active:l.Status}])},null,2),Be(" "+pe(l.Name),1)]),_:2},1032,["to"])]))),256))]),e[10]||(e[10]=h("hr",{class:"text-body"},null,-1)),h("h6",VL,[e[5]||(e[5]=h("i",{class:"bi bi-tools me-2"},null,-1)),$(o,{t:"Tools"})]),h("ul",WL,[h("li",zL,[$(a,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:Pe(()=>[$(o,{t:"Ping"})]),_:1})]),h("li",YL,[$(a,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:Pe(()=>[$(o,{t:"Traceroute"})]),_:1})])]),e[11]||(e[11]=h("hr",{class:"text-body"},null,-1)),h("ul",HL,[h("li",jL,[h("a",{class:"nav-link text-danger rounded-3",onClick:e[0]||(e[0]=l=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[e[6]||(e[6]=h("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),$(o,{t:"Sign Out"})])]),h("li",KL,[this.updateAvailable?(P(),F("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[h("small",GL,[$(o,{t:this.updateMessage},null,8,["t"]),e[7]||(e[7]=Be(" (")),$(o,{t:"Current Version:"}),Be(" "+pe(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,UL)):(P(),F("small",XL,[$(o,{t:this.updateMessage},null,8,["t"]),Be(" ("+pe(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])])],10,PL)}const ZL=ze(AL,[["render",qL],["__scopeId","data-v-461d2bae"]]);var NC={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(sx,function(){var n=1e3,i=6e4,s=36e5,r="millisecond",o="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",g="year",p="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,x={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(N){var B=["th","st","nd","rd"],R=N%100;return"["+N+(B[(R-20)%10]||B[R]||B[0])+"]"}},E=function(N,B,R){var W=String(N);return!W||W.length>=B?N:""+Array(B+1-W.length).join(R)+N},w={s:E,z:function(N){var B=-N.utcOffset(),R=Math.abs(B),W=Math.floor(R/60),X=R%60;return(B<=0?"+":"-")+E(W,2,"0")+":"+E(X,2,"0")},m:function N(B,R){if(B.date()1)return N(H[0])}else{var ce=B.name;C[ce]=B,X=ce}return!W&&X&&(b=X),X||!W&&b},I=function(N,B){if(T(N))return N.clone();var R=typeof B=="object"?B:{};return R.date=N,R.args=arguments,new Y(R)},V=w;V.l=A,V.i=T,V.w=function(N,B){return I(N,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var Y=function(){function N(R){this.$L=A(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[k]=!0}var B=N.prototype;return B.parse=function(R){this.$d=function(W){var X=W.date,J=W.utc;if(X===null)return new Date(NaN);if(V.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var H=X.match(v);if(H){var ce=H[2]-1||0,ie=(H[7]||"0").substring(0,3);return J?new Date(Date.UTC(H[1],ce,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)):new Date(H[1],ce,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)}}return new Date(X)}(R),this.init()},B.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},B.$utils=function(){return V},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(R,W){var X=I(R);return this.startOf(W)<=X&&X<=this.endOf(W)},B.isAfter=function(R,W){return I(R){this.message.show=!1},5e3)}},eO=["id"],tO={class:"card-body"},nO={class:"d-flex"},iO={class:"fw-bold d-block",style:{"text-transform":"uppercase"}},sO={class:"ms-auto"};function rO(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",{class:Ee(["card shadow rounded-3 position-relative message ms-auto",{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"}]),id:this.message.id},[h("div",tO,[h("div",nO,[h("small",iO,[$(o,{t:"FROM "}),Be(" "+pe(this.message.from),1)]),h("small",sO,pe(r.dayjs().format("hh:mm A")),1)]),Be(" "+pe(this.message.content),1)])],10,eO)}const FC=ze(QL,[["render",rO],["__scopeId","data-v-f50b8f0c"]]),oO={name:"index",components:{Message:FC,Navbar:ZL},async setup(){return{dashboardConfigurationStore:Xe()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(t=>t.show)}}},aO=["data-bs-theme"],lO={class:"row h-100"},cO={class:"col-md-9 col-lg-10 overflow-y-scroll mb-0 pt-2"},uO={class:"messageCentre text-body position-fixed d-flex"};function dO(t,e,n,i,s,r){const o=Se("Navbar"),a=Se("RouterView"),l=Se("Message");return P(),F("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[h("div",lO,[$(o),h("main",cO,[(P(),Ce(x_,null,{default:Pe(()=>[$(a,null,{default:Pe(({Component:c})=>[$(vt,{name:"fade2",mode:"out-in",appear:""},{default:Pe(()=>[(P(),Ce(_a(c)))]),_:2},1024)]),_:1})]),_:1})),h("div",uO,[$(vo,{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:Pe(()=>[(P(!0),F(Ie,null,Ge(r.getMessages.slice().reverse(),c=>(P(),Ce(l,{message:c,key:c.id},null,8,["message"]))),128))]),_:1})])])])],8,aO)}const hO=ze(oO,[["render",dO],["__scopeId","data-v-93734089"]]),fO={name:"RemoteServer",props:{server:Object},data(){return{active:!1,startTime:void 0,endTime:void 0,errorMsg:"",refreshing:!1}},methods:{async handshake(){this.active=!1,this.server.host&&this.server.apiKey&&(this.refreshing=!0,this.startTime=void 0,this.endTime=void 0,this.startTime=Fn(),await fetch(`${this.server.host}/api/handshake`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},method:"GET",signal:AbortSignal.timeout(5e3)}).then(t=>{if(t.status===200)return t.json();throw new Error(t.statusText)}).then(()=>{this.endTime=Fn(),this.active=!0}).catch(t=>{this.active=!1,this.errorMsg=t}),this.refreshing=!1)},async connect(){await fetch(`${this.server.host}/api/authenticate`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},body:JSON.stringify({host:window.location.hostname}),method:"POST",signal:AbortSignal.timeout(5e3)}).then(t=>t.json()).then(t=>{this.$emit("setActiveServer"),this.$router.push("/")})}},mounted(){this.handshake()},computed:{getHandshakeTime(){return this.startTime&&this.endTime?`${Fn().subtract(this.startTime).millisecond()}ms`:this.refreshing?At("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},gO={class:"card rounded-3"},pO={class:"card-body"},mO={class:"d-flex gap-3 w-100 remoteServerContainer"},_O={class:"d-flex gap-3 align-items-center flex-grow-1"},vO={class:"d-flex gap-3 align-items-center flex-grow-1"},yO={class:"d-flex gap-2 button-group"},bO={class:"card-footer gap-2 d-flex align-items-center"},wO={key:0,class:"spin ms-auto text-primary-emphasis"};function xO(t,e,n,i,s,r){return P(),F("div",gO,[h("div",pO,[h("div",mO,[h("div",_O,[e[7]||(e[7]=h("i",{class:"bi bi-server"},null,-1)),Re(h("input",{class:"form-control form-control-sm",onBlur:e[0]||(e[0]=o=>this.handshake()),"onUpdate:modelValue":e[1]||(e[1]=o=>this.server.host=o),type:"url"},null,544),[[We,this.server.host]])]),h("div",vO,[e[8]||(e[8]=h("i",{class:"bi bi-key-fill"},null,-1)),Re(h("input",{class:"form-control form-control-sm",onBlur:e[2]||(e[2]=o=>this.handshake()),"onUpdate:modelValue":e[3]||(e[3]=o=>this.server.apiKey=o),type:"text"},null,544),[[We,this.server.apiKey]])]),h("div",yO,[h("button",{onClick:e[4]||(e[4]=o=>this.$emit("delete")),class:"ms-auto btn btn-sm bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle"},e[9]||(e[9]=[h("i",{class:"bi bi-trash"},null,-1)])),h("button",{onClick:e[5]||(e[5]=o=>this.connect()),class:Ee([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},e[10]||(e[10]=[h("i",{class:"bi bi-arrow-right-circle"},null,-1)]),2)])])]),h("div",bO,[h("span",{class:Ee(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),h("small",null,pe(this.getHandshakeTime),1),this.refreshing?(P(),F("div",wO,e[11]||(e[11]=[h("i",{class:"bi bi-arrow-clockwise"},null,-1)]))):(P(),F("a",{key:1,role:"button",onClick:e[6]||(e[6]=o=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},e[12]||(e[12]=[h("i",{class:"bi bi-arrow-clockwise me"},null,-1)])))])])}const EO=ze(fO,[["render",xO],["__scopeId","data-v-ed7817c7"]]),CO={name:"RemoteServerList",setup(){return{store:Xe()}},components:{LocaleText:Le,RemoteServer:EO}},SO={class:"w-100 mt-3"},kO={class:"d-flex align-items-center mb-3"},TO={class:"mb-0"},AO={class:"w-100 d-flex gap-3 flex-column p-3 border border-1 border-secondary-subtle rounded-3",style:{height:"400px","overflow-y":"scroll"}},PO={key:0,class:"text-muted m-auto"};function MO(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RemoteServer");return P(),F("div",SO,[h("div",kO,[h("h5",TO,[$(o,{t:"Server List"})]),h("button",{onClick:e[0]||(e[0]=l=>this.store.addCrossServerConfiguration()),class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle shadow-sm ms-auto"},[e[1]||(e[1]=h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),$(o,{t:"Server"})])]),h("div",AO,[(P(!0),F(Ie,null,Ge(this.store.CrossServerConfiguration.ServerList,(l,c)=>(P(),Ce(a,{onSetActiveServer:u=>this.store.setActiveCrossServer(c),onDelete:u=>this.store.deleteCrossServerConfiguration(c),key:c,server:l},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(P(),F("h6",PO,[$(o,{t:"Click"}),e[2]||(e[2]=h("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1)),$(o,{t:"to add your server"})])):se("",!0)])])}const IO=ze(CO,[["render",MO]]),DO={name:"signInInput",methods:{GetLocale:At},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return At(this.placeholder)}}},RO=["type","id","name","placeholder"];function $O(t,e,n,i,s,r){return Re((P(),F("input",{type:n.type,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data[this.id]=o),class:"form-control",id:this.id,name:this.id,autocomplete:"on",placeholder:this.getLocaleText,required:""},null,8,RO)),[[uC,this.data[this.id]]])}const LO=ze(DO,[["render",$O]]),OO={name:"signInTOTP",methods:{GetLocale:At},props:{data:""},computed:{getLocaleText(){return At("OTP from your authenticator")}}},NO=["placeholder"];function FO(t,e,n,i,s,r){return Re((P(),F("input",{class:"form-control totp",required:"",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code",placeholder:this.getLocaleText,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data.totp=o)},null,8,NO)),[[We,this.data.totp]])}const BO=ze(OO,[["render",FO]]),VO={name:"signin",components:{SignInTOTP:BO,SignInInput:LO,LocaleText:Le,RemoteServerList:IO,Message:FC},async setup(){const t=Xe();let e="dark",n=!1,i;return t.IsElectronApp||await Promise.all([Pt("/api/getDashboardTheme",{},s=>{e=s.data}),Pt("/api/isTotpEnabled",{},s=>{n=s.data}),Pt("/api/getDashboardVersion",{},s=>{i=s.data})]),t.removeActiveCrossServer(),{store:t,theme:e,totpEnabled:n,version:i}},data(){return{data:{username:"",password:"",totp:""},loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(t=>t.show)},applyLocale(t){return At(t)}},methods:{GetLocale:At,async auth(){this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)?(this.loading=!0,await dt("/api/authenticate",this.data,t=>{t.status?(this.loginError=!1,this.$refs.signInBtn.classList.add("signedIn"),t.message?this.$router.push("/welcome"):this.store.Redirect!==void 0?this.$router.push(this.store.Redirect):this.$router.push("/")):(this.loginError=!0,this.loginErrorMessage=t.message,document.querySelectorAll("input[required]").forEach(e=>{e.classList.remove("is-valid"),e.classList.add("is-invalid")}),this.loading=!1)})):document.querySelectorAll("input[required]").forEach(t=>{t.value.length===0?(t.classList.remove("is-valid"),t.classList.add("is-invalid")):(t.classList.remove("is-invalid"),t.classList.add("is-valid"))})}}},WO=["data-bs-theme"],zO={class:"login-box m-auto"},YO={class:"m-auto",style:{width:"700px"}},HO={class:"mb-0 text-body"},jO={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},KO={class:"form-group text-body"},UO={class:"form-group text-body"},GO={key:0,class:"form-group text-body"},XO={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},qO={key:0,class:"d-flex w-100"},ZO={key:1,class:"d-flex w-100 align-items-center"},JO={key:3,class:"d-flex mt-3"},QO={class:"form-check form-switch ms-auto"},e3={class:"form-check-label",for:"flexSwitchCheckChecked"},t3={class:"text-muted pb-3 d-block w-100 text-center mt-3"},n3={class:"messageCentre text-body position-absolute end-0 m-3"};function i3(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("SignInInput"),l=Se("SignInTOTP"),c=Se("RemoteServerList"),u=Se("Message");return P(),F("div",{class:"container-fluid login-container-fluid d-flex main flex-column py-4 text-body",style:{"overflow-y":"scroll"},"data-bs-theme":this.theme},[h("div",zO,[h("div",YO,[h("h4",HO,[$(o,{t:"Welcome to"})]),e[7]||(e[7]=h("span",{class:"dashboardLogo display-3"},[h("strong",null,"WGDashboard")],-1)),s.loginError?(P(),F("div",jO,[$(o,{t:this.loginErrorMessage},null,8,["t"])])):se("",!0),this.store.CrossServerConfiguration.Enable?(P(),Ce(c,{key:2})):(P(),F("form",{key:1,onSubmit:e[0]||(e[0]=d=>{d.preventDefault(),this.auth()})},[h("div",KO,[e[2]||(e[2]=h("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-person-circle"})],-1)),$(a,{id:"username",data:this.data,type:"text",placeholder:"Username"},null,8,["data"])]),h("div",UO,[e[3]||(e[3]=h("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-key-fill"})],-1)),$(a,{id:"password",data:this.data,type:"password",placeholder:"Password"},null,8,["data"])]),i.totpEnabled?(P(),F("div",GO,[e[4]||(e[4]=h("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-lock-fill"})],-1)),$(l,{data:this.data},null,8,["data"])])):se("",!0),h("button",XO,[this.loading?(P(),F("span",ZO,[$(o,{t:"Signing In..."}),e[6]||(e[6]=h("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1))])):(P(),F("span",qO,[$(o,{t:"Sign In"}),e[5]||(e[5]=h("i",{class:"ms-auto bi bi-chevron-right"},null,-1))]))],512)],32)),this.store.IsElectronApp?se("",!0):(P(),F("div",JO,[h("div",QO,[Re(h("input",{"onUpdate:modelValue":e[1]||(e[1]=d=>this.store.CrossServerConfiguration.Enable=d),class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,512),[[Gn,this.store.CrossServerConfiguration.Enable]]),h("label",e3,[$(o,{t:"Access Remote Server"})])])]))])]),h("small",t3,[Be(" WGDashboard "+pe(this.version)+" | Developed with ❤️ by ",1),e[8]||(e[8]=h("a",{href:"https://github.com/donaldzou",target:"_blank"},[h("strong",null,"Donald Zou")],-1))]),h("div",n3,[$(vo,{name:"message",tag:"div",class:"position-relative"},{default:Pe(()=>[(P(!0),F(Ie,null,Ge(r.getMessages.slice().reverse(),d=>(P(),Ce(u,{message:d,key:d.id},null,8,["message"]))),128))]),_:1})])],8,WO)}const s3=ze(VO,[["render",i3],["__scopeId","data-v-95530d22"]]),T_={name:"configurationCard",components:{LocaleText:Le},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String},delay:String},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:Xe()}},methods:{toggle(){this.configurationToggling=!0,Pt("/api/toggleWireguardConfiguration/",{configurationName:this.c.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${t.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.c.Status=t.data,this.configurationToggling=!1})}}},r0=()=>{oC(t=>({"1d5189b2":t.delay}))},o0=T_.setup;T_.setup=o0?(t,e)=>(r0(),o0(t,e)):r0;const r3={class:"card conf_card rounded-3 shadow text-decoration-none"},o3={class:"mb-0"},a3={class:"card-title mb-0"},l3={class:"card-footer d-flex gap-2 flex-column"},c3={class:"row"},u3={class:"col-6 col-md-3"},d3={class:"text-primary-emphasis col-6 col-md-3"},h3={class:"text-success-emphasis col-6 col-md-3"},f3={class:"text-md-end col-6 col-md-3"},g3={class:"d-flex align-items-center gap-2"},p3={class:"text-muted"},m3={style:{"word-break":"keep-all"}},_3={class:"mb-0 d-block d-lg-inline-block"},v3={style:{"line-break":"anywhere"}},y3={class:"form-check form-switch ms-auto"},b3=["for"],w3={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},x3=["disabled","id"];function E3(t,e,n,i,s,r){const o=Se("RouterLink"),a=Se("LocaleText");return P(),F("div",r3,[$(o,{to:"/configuration/"+n.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:Pe(()=>[h("h6",o3,[h("span",{class:Ee(["dot",{active:n.c.Status}])},null,2)]),h("h6",a3,[h("samp",null,pe(n.c.Name),1)]),e[2]||(e[2]=h("h6",{class:"mb-0 ms-auto"},[h("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),h("div",l3,[h("div",c3,[h("small",u3,[e[3]||(e[3]=h("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),Be(pe(n.c.DataUsage.Total>0?n.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),h("small",d3,[e[4]||(e[4]=h("i",{class:"bi bi-arrow-down me-2"},null,-1)),Be(pe(n.c.DataUsage.Receive>0?n.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),h("small",h3,[e[5]||(e[5]=h("i",{class:"bi bi-arrow-up me-2"},null,-1)),Be(pe(n.c.DataUsage.Sent>0?n.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),h("small",f3,[h("span",{class:Ee(["dot me-2",{active:n.c.ConnectedPeers>0}])},null,2),Be(" "+pe(n.c.ConnectedPeers)+" / "+pe(n.c.TotalPeers)+" ",1),$(a,{t:"Peers"})])]),h("div",g3,[h("small",p3,[h("strong",m3,[$(a,{t:"Public Key"})])]),h("small",_3,[h("samp",v3,pe(n.c.PublicKey),1)]),h("div",y3,[h("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+n.c.PrivateKey},[!n.c.Status&&this.configurationToggling?(P(),Ce(a,{key:0,t:"Turning Off..."})):n.c.Status&&this.configurationToggling?(P(),Ce(a,{key:1,t:"Turning On..."})):n.c.Status&&!this.configurationToggling?(P(),Ce(a,{key:2,t:"On"})):!n.c.Status&&!this.configurationToggling?(P(),Ce(a,{key:3,t:"Off"})):se("",!0),this.configurationToggling?(P(),F("span",w3)):se("",!0)],8,b3),Re(h("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+n.c.PrivateKey,onChange:e[0]||(e[0]=l=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=l=>n.c.Status=l)},null,40,x3),[[Gn,n.c.Status]])])])])])}const C3=ze(T_,[["render",E3],["__scopeId","data-v-a85a04a5"]]),S3={name:"configurationList",components:{LocaleText:Le,ConfigurationCard:C3},async setup(){return{wireguardConfigurationsStore:$n()}},data(){return{configurationLoaded:!1}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)}},k3={class:"mt-md-5 mt-3"},T3={class:"container-md"},A3={class:"d-flex mb-4 configurationListTitle align-items-center gap-3"},P3={class:"text-body d-flex"},M3={class:"text-muted",key:"noConfiguration"};function I3(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink"),l=Se("ConfigurationCard");return P(),F("div",k3,[h("div",T3,[h("div",A3,[h("h2",P3,[h("span",null,[$(o,{t:"WireGuard Configurations"})])]),$(a,{to:"/new_configuration",class:"btn btn-dark btn-brand rounded-3 p-2 shadow ms-auto rounded-3"},{default:Pe(()=>e[0]||(e[0]=[h("h2",{class:"mb-0",style:{"line-height":"0"}},[h("i",{class:"bi bi-plus-circle"})],-1)])),_:1})]),$(vo,{name:"fade",tag:"div",class:"d-flex flex-column gap-3 mb-4"},{default:Pe(()=>[this.configurationLoaded&&this.wireguardConfigurationsStore.Configurations.length===0?(P(),F("p",M3,[$(o,{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.configurationLoaded?(P(!0),F(Ie,{key:1},Ge(this.wireguardConfigurationsStore.Configurations,(c,u)=>(P(),Ce(l,{delay:u*.05+"s",key:c.Name,c},null,8,["delay","c"]))),128)):se("",!0)]),_:1})])])}const D3=ze(S3,[["render",I3],["__scopeId","data-v-b9c1bda1"]]);let Sd;const R3=new Uint8Array(16);function $3(){if(!Sd&&(Sd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sd(R3)}const Ln=[];for(let t=0;t<256;++t)Ln.push((t+256).toString(16).slice(1));function L3(t,e=0){return Ln[t[e+0]]+Ln[t[e+1]]+Ln[t[e+2]]+Ln[t[e+3]]+"-"+Ln[t[e+4]]+Ln[t[e+5]]+"-"+Ln[t[e+6]]+Ln[t[e+7]]+"-"+Ln[t[e+8]]+Ln[t[e+9]]+"-"+Ln[t[e+10]]+Ln[t[e+11]]+Ln[t[e+12]]+Ln[t[e+13]]+Ln[t[e+14]]+Ln[t[e+15]]}const O3=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),a0={randomUUID:O3};function Bs(t,e,n){if(a0.randomUUID&&!e&&!t)return a0.randomUUID();t=t||{};const i=t.random||(t.rng||$3)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,L3(i)}const N3={components:{LocaleText:Le},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=Xe(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Peers[this.targetData]},methods:{async useValidation(){this.changed&&await dt("/api/updateDashboardConfigurationItem",{section:"Peers",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Peers[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1})}}},F3={class:"form-group mb-2"},B3=["for"],V3=["id","disabled"],W3={class:"invalid-feedback"},z3={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"};function Y3(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",F3,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[$(o,{t:this.title},null,8,["t"])])])],8,B3),Re(h("input",{type:"text",class:Ee(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation()),disabled:this.updating},null,42,V3),[[We,this.value]]),h("div",W3,pe(this.invalidFeedback),1),n.warning?(P(),F("div",z3,[h("small",null,[e[3]||(e[3]=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),$(o,{t:n.warningText},null,8,["t"])])])):se("",!0)])}const H3=ze(N3,[["render",Y3]]),j3=t=>{},K3={name:"accountSettingsInputUsername",components:{LocaleText:Le},props:{targetData:String,title:String},setup(){const t=Xe(),e=`input_${Bs()}`;return{store:t,uuid:e}},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 dt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},e=>{e.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=e.message),this.changed=!1,this.updating=!1}))}}},U3={class:"form-group mb-2"},G3=["for"],X3=["id","disabled"],q3={class:"invalid-feedback"};function Z3(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",U3,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[$(o,{t:this.title},null,8,["t"])])])],8,G3),Re(h("input",{type:"text",class:Ee(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation()),disabled:this.updating},null,42,X3),[[We,this.value]]),h("div",q3,pe(this.invalidFeedback),1)])}const J3=ze(K3,[["render",Z3]]),Q3={name:"accountSettingsInputPassword",components:{LocaleText:Le},props:{targetData:String,warning:!1,warningText:""},setup(){const t=Xe(),e=`input_${Bs()}`;return{store:t,uuid:e}},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 dt("/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}}},eN={class:"d-flex flex-column gap-2"},tN={class:"row g-2"},nN={class:"col-sm"},iN={class:"form-group"},sN=["for"],rN=["id"],oN={key:0,class:"invalid-feedback d-block"},aN={class:"col-sm"},lN={class:"form-group"},cN=["for"],uN=["id"],dN={class:"col-sm"},hN={class:"form-group"},fN=["for"],gN=["id"],pN=["disabled"];function mN(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",eN,[h("div",tN,[h("div",nN,[h("div",iN,[h("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[$(o,{t:"Current Password"})])])],8,sN),Re(h("input",{type:"password",class:Ee(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,rN),[[We,this.value.currentPassword]]),s.showInvalidFeedback?(P(),F("div",oN,pe(this.invalidFeedback),1)):se("",!0)])]),h("div",aN,[h("div",lN,[h("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[$(o,{t:"New Password"})])])],8,cN),Re(h("input",{type:"password",class:Ee(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[1]||(e[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,uN),[[We,this.value.newPassword]])])]),h("div",dN,[h("div",hN,[h("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[$(o,{t:"Repeat New Password"})])])],8,fN),Re(h("input",{type:"password",class:Ee(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[2]||(e[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,gN),[[We,this.value.repeatNewPassword]])])])]),h("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:e[3]||(e[3]=a=>this.useValidation())},[e[4]||(e[4]=h("i",{class:"bi bi-save2-fill me-2"},null,-1)),$(o,{t:"Update Password"})],8,pN)])}const _N=ze(Q3,[["render",mN]]),vN={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:Le},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=Xe(),e=$n(),n=`input_${Bs()}`;return{store:t,uuid:n,WireguardConfigurationStore:e}},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 dt("/api/updateDashboardConfigurationItem",{section:"Server",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,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1}))}}},yN={class:"card"},bN={class:"card-header"},wN={class:"my-2"},xN={class:"card-body"},EN={class:"form-group"},CN=["for"],SN={class:"d-flex gap-2 align-items-start"},kN={class:"flex-grow-1"},TN=["id","disabled"],AN={class:"invalid-feedback fw-bold"},PN=["disabled"],MN={key:0,class:"bi bi-save2-fill"},IN={key:1,class:"spinner-border spinner-border-sm"},DN={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 RN(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",yN,[h("div",bN,[h("h6",wN,[$(o,{t:"Path"})])]),h("div",xN,[h("div",EN,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[$(o,{t:this.title},null,8,["t"])])])],8,CN),h("div",SN,[h("div",kN,[Re(h("input",{type:"text",class:Ee(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),disabled:this.updating},null,42,TN),[[We,this.value]]),h("div",AN,pe(this.invalidFeedback),1)]),h("button",{onClick:e[2]||(e[2]=a=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(P(),F("span",IN)):(P(),F("i",MN))],8,PN)]),n.warning?(P(),F("div",DN,[h("small",null,[e[3]||(e[3]=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),$(o,{t:n.warningText},null,8,["t"])])])):se("",!0)])])])}const $N=ze(vN,[["render",RN]]),LN={name:"dashboardTheme",components:{LocaleText:Le},setup(){return{dashboardConfigurationStore:Xe()}},methods:{async switchTheme(t){await dt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},ON={class:"text-muted mb-1 d-block"},NN={class:"d-flex gap-1"};function FN(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("small",ON,[h("strong",null,[$(o,{t:"Theme"})])]),h("div",NN,[h("button",{class:Ee(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=a=>this.switchTheme("light"))},[e[2]||(e[2]=h("i",{class:"bi bi-sun-fill me-2"},null,-1)),$(o,{t:"Light"})],2),h("button",{class:Ee(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=a=>this.switchTheme("dark"))},[e[3]||(e[3]=h("i",{class:"bi bi-moon-fill me-2"},null,-1)),$(o,{t:"Dark"})],2)])])}const BN=ze(LN,[["render",FN]]),VN={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const t=Xe(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{app_ip:"",app_port:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.app_ip=this.store.Configuration.Server.app_ip,this.app_port=this.store.Configuration.Server.app_port},methods:{async useValidation(){this.changed&&await dt("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},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,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)})}}},WN={class:"invalid-feedback d-block mt-0"},zN={class:"row"},YN={class:"form-group mb-2 col-sm"},HN=["for"],jN=["id"],KN={class:"form-group col-sm"},UN=["for"],GN=["id"];function XN(t,e,n,i,s,r){return P(),F("div",null,[h("div",WN,pe(this.invalidFeedback),1),h("div",zN,[h("div",YN,[h("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},e[2]||(e[2]=[h("strong",null,[h("small",null,"Dashboard IP Address")],-1)]),8,HN),Re(h("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=o=>this.app_ip=o)},null,8,jN),[[We,this.app_ip]]),e[3]||(e[3]=h("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[h("small",null,[h("i",{class:"bi bi-exclamation-triangle-fill me-2"}),h("code",null,"0.0.0.0"),Be(" means it can be access by anyone with your server IP Address.")])],-1))]),h("div",KN,[h("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},e[4]||(e[4]=[h("strong",null,[h("small",null,"Dashboard Port")],-1)]),8,UN),Re(h("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=o=>this.app_port=o)},null,8,GN),[[We,this.app_port]])])]),e[5]||(e[5]=h("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[h("i",{class:"bi bi-floppy-fill me-2"}),Be("Update Dashboard Settings & Restart ")],-1))])}const qN=ze(VN,[["render",XN]]);function He(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function yt(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function rs(t,e){const n=He(t);return isNaN(e)?yt(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function ds(t,e){const n=He(t);if(isNaN(e))return yt(t,NaN);if(!e)return n;const i=n.getDate(),s=yt(t,n.getTime());s.setMonth(n.getMonth()+e+1,0);const r=s.getDate();return i>=r?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}function BC(t,e){const{years:n=0,months:i=0,weeks:s=0,days:r=0,hours:o=0,minutes:a=0,seconds:l=0}=e,c=He(t),u=i||n?ds(c,i+n*12):c,d=r||s?rs(u,r+s*7):u,f=a+o*60,p=(l+f*60)*1e3;return yt(t,d.getTime()+p)}function ZN(t,e){const n=+He(t);return yt(t,n+e)}const VC=6048e5,JN=864e5,QN=6e4,WC=36e5,eF=1e3;function tF(t,e){return ZN(t,e*WC)}let nF={};function ya(){return nF}function ps(t,e){const n=ya(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=He(t),r=s.getDay(),o=(r=s.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function l0(t){const e=He(t);return e.setHours(0,0,0,0),e}function Sh(t){const e=He(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function YC(t,e){const n=l0(t),i=l0(e),s=+n-Sh(n),r=+i-Sh(i);return Math.round((s-r)/JN)}function iF(t){const e=zC(t),n=yt(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Sl(n)}function sF(t,e){const n=e*3;return ds(t,n)}function A_(t,e){return ds(t,e*12)}function c0(t,e){const n=He(t),i=He(e),s=n.getTime()-i.getTime();return s<0?-1:s>0?1:s}function HC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Hc(t){if(!HC(t)&&typeof t!="number")return!1;const e=He(t);return!isNaN(Number(e))}function u0(t){const e=He(t);return Math.trunc(e.getMonth()/3)+1}function rF(t,e){const n=He(t),i=He(e);return n.getFullYear()-i.getFullYear()}function oF(t,e){const n=He(t),i=He(e),s=c0(n,i),r=Math.abs(rF(n,i));n.setFullYear(1584),i.setFullYear(1584);const o=c0(n,i)===-s,a=s*(r-+o);return a===0?0:a}function jC(t,e){const n=He(t.start),i=He(t.end);let s=+n>+i;const r=s?+n:+i,o=s?i:n;o.setHours(0,0,0,0);let a=1;const l=[];for(;+o<=r;)l.push(He(o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return s?l.reverse():l}function Xo(t){const e=He(t),n=e.getMonth(),i=n-n%3;return e.setMonth(i,1),e.setHours(0,0,0,0),e}function aF(t,e){const n=He(t.start),i=He(t.end);let s=+n>+i;const r=s?+Xo(n):+Xo(i);let o=Xo(s?i:n),a=1;const l=[];for(;+o<=r;)l.push(He(o)),o=sF(o,a);return s?l.reverse():l}function lF(t){const e=He(t);return e.setDate(1),e.setHours(0,0,0,0),e}function KC(t){const e=He(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function lu(t){const e=He(t),n=yt(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function UC(t,e){const n=ya(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=He(t),r=s.getDay(),o=(r{let i;const s=cF[t];return typeof s=="string"?i=s:e===1?i=s.one:i=s.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function $g(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const dF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},fF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gF={date:$g({formats:dF,defaultWidth:"full"}),time:$g({formats:hF,defaultWidth:"full"}),dateTime:$g({formats:fF,defaultWidth:"full"})},pF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mF=(t,e,n,i)=>pF[t];function cc(t){return(e,n)=>{const i=n?.context?String(n.context):"standalone";let s;if(i==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):o;s=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[o]}const r=t.argumentCallback?t.argumentCallback(e):e;return s[r]}}const _F={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},vF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},bF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},wF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},xF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},EF=(t,e)=>{const n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},CF={ordinalNumber:EF,era:cc({values:_F,defaultWidth:"wide"}),quarter:cc({values:vF,defaultWidth:"wide",argumentCallback:t=>t-1}),month:cc({values:yF,defaultWidth:"wide"}),day:cc({values:bF,defaultWidth:"wide"}),dayPeriod:cc({values:wF,defaultWidth:"wide",formattingValues:xF,defaultFormattingWidth:"wide"})};function uc(t){return(e,n={})=>{const i=n.width,s=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],r=e.match(s);if(!r)return null;const o=r[0],a=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?kF(a,d=>d.test(o)):SF(a,d=>d.test(o));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(o.length);return{value:c,rest:u}}}function SF(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function kF(t,e){for(let n=0;n{const i=e.match(t.matchPattern);if(!i)return null;const s=i[0],r=e.match(t.parsePattern);if(!r)return null;let o=t.valueCallback?t.valueCallback(r[0]):r[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(s.length);return{value:o,rest:a}}}const AF=/^(\d+)(th|st|nd|rd)?/i,PF=/\d+/i,MF={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},IF={any:[/^b/i,/^(a|c)/i]},DF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},RF={any:[/1/i,/2/i,/3/i,/4/i]},$F={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},LF={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},OF={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},NF={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},FF={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},BF={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},VF={ordinalNumber:TF({matchPattern:AF,parsePattern:PF,valueCallback:t=>parseInt(t,10)}),era:uc({matchPatterns:MF,defaultMatchWidth:"wide",parsePatterns:IF,defaultParseWidth:"any"}),quarter:uc({matchPatterns:DF,defaultMatchWidth:"wide",parsePatterns:RF,defaultParseWidth:"any",valueCallback:t=>t+1}),month:uc({matchPatterns:$F,defaultMatchWidth:"wide",parsePatterns:LF,defaultParseWidth:"any"}),day:uc({matchPatterns:OF,defaultMatchWidth:"wide",parsePatterns:NF,defaultParseWidth:"any"}),dayPeriod:uc({matchPatterns:FF,defaultMatchWidth:"any",parsePatterns:BF,defaultParseWidth:"any"})},GC={code:"en-US",formatDistance:uF,formatLong:gF,formatRelative:mF,localize:CF,match:VF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function WF(t){const e=He(t);return YC(e,lu(e))+1}function P_(t){const e=He(t),n=+Sl(e)-+iF(e);return Math.round(n/VC)+1}function M_(t,e){const n=He(t),i=n.getFullYear(),s=ya(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,o=yt(t,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);const a=ps(o,e),l=yt(t,0);l.setFullYear(i,0,r),l.setHours(0,0,0,0);const c=ps(l,e);return n.getTime()>=a.getTime()?i+1:n.getTime()>=c.getTime()?i:i-1}function zF(t,e){const n=ya(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=M_(t,e),r=yt(t,0);return r.setFullYear(s,0,i),r.setHours(0,0,0,0),ps(r,e)}function I_(t,e){const n=He(t),i=+ps(n,e)-+zF(n,e);return Math.round(i/VC)+1}function St(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const Pr={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return St(e==="yy"?i%100:i,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):St(n+1,2)},d(t,e){return St(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return St(t.getHours()%12||12,e.length)},H(t,e){return St(t.getHours(),e.length)},m(t,e){return St(t.getMinutes(),e.length)},s(t,e){return St(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),s=Math.trunc(i*Math.pow(10,n-3));return St(s,e.length)}},$a={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},h0={G:function(t,e,n){const i=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const i=t.getFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Pr.y(t,e)},Y:function(t,e,n,i){const s=M_(t,i),r=s>0?s:1-s;if(e==="YY"){const o=r%100;return St(o,2)}return e==="Yo"?n.ordinalNumber(r,{unit:"year"}):St(r,e.length)},R:function(t,e){const n=zC(t);return St(n,e.length)},u:function(t,e){const n=t.getFullYear();return St(n,e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return St(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return St(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){const i=t.getMonth();switch(e){case"M":case"MM":return Pr.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return St(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){const s=I_(t,i);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):St(s,e.length)},I:function(t,e,n){const i=P_(t);return e==="Io"?n.ordinalNumber(i,{unit:"week"}):St(i,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Pr.d(t,e)},D:function(t,e,n){const i=WF(t);return e==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):St(i,e.length)},E:function(t,e,n){const i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){const s=t.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return St(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){const s=t.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return St(r,e.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const i=t.getDay(),s=i===0?7:i;switch(e){case"i":return String(s);case"ii":return St(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const i=t.getHours();let s;switch(i===12?s=$a.noon:i===0?s=$a.midnight:s=i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let s;switch(i>=17?s=$a.evening:i>=12?s=$a.afternoon:i>=4?s=$a.morning:s=$a.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let i=t.getHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Pr.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Pr.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return e==="Ko"?n.ordinalNumber(i,{unit:"hour"}):St(i,e.length)},k:function(t,e,n){let i=t.getHours();return i===0&&(i=24),e==="ko"?n.ordinalNumber(i,{unit:"hour"}):St(i,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Pr.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Pr.s(t,e)},S:function(t,e){return Pr.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(i===0)return"Z";switch(e){case"X":return g0(i);case"XXXX":case"XX":return Yo(i);case"XXXXX":case"XXX":default:return Yo(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return g0(i);case"xxxx":case"xx":return Yo(i);case"xxxxx":case"xxx":default:return Yo(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+f0(i,":");case"OOOO":default:return"GMT"+Yo(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+f0(i,":");case"zzzz":default:return"GMT"+Yo(i,":")}},t:function(t,e,n){const i=Math.trunc(t.getTime()/1e3);return St(i,e.length)},T:function(t,e,n){const i=t.getTime();return St(i,e.length)}};function f0(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=Math.trunc(i/60),r=i%60;return r===0?n+String(s):n+String(s)+e+St(r,2)}function g0(t,e){return t%60===0?(t>0?"-":"+")+St(Math.abs(t)/60,2):Yo(t,e)}function Yo(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=St(Math.trunc(i/60),2),r=St(i%60,2);return n+s+e+r}const p0=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},XC=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},YF=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return p0(t,e);let r;switch(i){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"});break}return r.replace("{{date}}",p0(i,e)).replace("{{time}}",XC(s,e))},tm={p:XC,P:YF},HF=/^D+$/,jF=/^Y+$/,KF=["D","DD","YY","YYYY"];function qC(t){return HF.test(t)}function ZC(t){return jF.test(t)}function nm(t,e,n){const i=UF(t,e,n);if(console.warn(i),KF.includes(t))throw new RangeError(i)}function UF(t,e,n){const i=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const GF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,XF=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qF=/^'([^]*?)'?$/,ZF=/''/g,JF=/[a-zA-Z]/;function Ls(t,e,n){const i=ya(),s=n?.locale??i.locale??GC,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=He(t);if(!Hc(a))throw new RangeError("Invalid time value");let l=e.match(XF).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=tm[d];return f(u,s.formatLong)}return u}).join("").match(GF).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:QF(u)};if(h0[d])return{isToken:!0,value:u};if(d.match(JF))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const c={firstWeekContainsDate:r,weekStartsOn:o,locale:s};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&ZC(d)||!n?.useAdditionalDayOfYearTokens&&qC(d))&&nm(d,e,String(t));const f=h0[d[0]];return f(a,d,s.localize,c)}).join("")}function QF(t){const e=t.match(qF);return e?e[1].replace(ZF,"'"):t}function e5(t){return He(t).getDay()}function t5(t){const e=He(t),n=e.getFullYear(),i=e.getMonth(),s=yt(t,0);return s.setFullYear(n,i+1,0),s.setHours(0,0,0,0),s.getDate()}function n5(){return Object.assign({},ya())}function vr(t){return He(t).getHours()}function i5(t){let n=He(t).getDay();return n===0&&(n=7),n}function ao(t){return He(t).getMinutes()}function at(t){return He(t).getMonth()}function kl(t){return He(t).getSeconds()}function Ze(t){return He(t).getFullYear()}function Tl(t,e){const n=He(t),i=He(e);return n.getTime()>i.getTime()}function cu(t,e){const n=He(t),i=He(e);return+n<+i}function tl(t,e){const n=He(t),i=He(e);return+n==+i}function s5(t,e){const n=e instanceof Date?yt(e,0):new e(0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}const r5=10;class JC{subPriority=0;validate(e,n){return!0}}class o5 extends JC{constructor(e,n,i,s,r){super(),this.value=e,this.validateValue=n,this.setValue=i,this.priority=s,r&&(this.subPriority=r)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,i){return this.setValue(e,n,this.value,i)}}class a5 extends JC{priority=r5;subPriority=-1;set(e,n){return n.timestampIsSet?e:yt(e,s5(e,Date))}}class wt{run(e,n,i,s){const r=this.parse(e,n,i,s);return r?{setter:new o5(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(e,n,i){return!0}}class l5 extends wt{priority=140;parse(e,n,i){switch(n){case"G":case"GG":case"GGG":return i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"});case"GGGGG":return i.era(e,{width:"narrow"});case"GGGG":default:return i.era(e,{width:"wide"})||i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"})}}set(e,n,i){return n.era=i,e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const cn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Cs={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function un(t,e){return t&&{value:e(t.value),rest:t.rest}}function Zt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Ss(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const i=n[1]==="+"?1:-1,s=n[2]?parseInt(n[2],10):0,r=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:i*(s*WC+r*QN+o*eF),rest:e.slice(n[0].length)}}function QC(t){return Zt(cn.anyDigitsSigned,t)}function on(t,e){switch(t){case 1:return Zt(cn.singleDigit,e);case 2:return Zt(cn.twoDigits,e);case 3:return Zt(cn.threeDigits,e);case 4:return Zt(cn.fourDigits,e);default:return Zt(new RegExp("^\\d{1,"+t+"}"),e)}}function kh(t,e){switch(t){case 1:return Zt(cn.singleDigitSigned,e);case 2:return Zt(cn.twoDigitsSigned,e);case 3:return Zt(cn.threeDigitsSigned,e);case 4:return Zt(cn.fourDigitsSigned,e);default:return Zt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function D_(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function eS(t,e){const n=e>0,i=n?e:1-e;let s;if(i<=50)s=t||100;else{const r=i+50,o=Math.trunc(r/100)*100,a=t>=r%100;s=t+o-(a?100:0)}return n?s:1-s}function tS(t){return t%400===0||t%4===0&&t%100!==0}class c5 extends wt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="yy"});switch(n){case"y":return un(on(4,e),s);case"yo":return un(i.ordinalNumber(e,{unit:"year"}),s);default:return un(on(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i){const s=e.getFullYear();if(i.isTwoDigitYear){const o=eS(i.year,s);return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}const r=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class u5 extends wt{priority=130;parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="YY"});switch(n){case"Y":return un(on(4,e),s);case"Yo":return un(i.ordinalNumber(e,{unit:"year"}),s);default:return un(on(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i,s){const r=M_(e,s);if(i.isTwoDigitYear){const a=eS(i.year,r);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),ps(e,s)}const o=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(o,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),ps(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class d5 extends wt{priority=130;parse(e,n){return kh(n==="R"?4:n.length,e)}set(e,n,i){const s=yt(e,0);return s.setFullYear(i,0,4),s.setHours(0,0,0,0),Sl(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class h5 extends wt{priority=130;parse(e,n){return kh(n==="u"?4:n.length,e)}set(e,n,i){return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class f5 extends wt{priority=120;parse(e,n,i){switch(n){case"Q":case"QQ":return on(n.length,e);case"Qo":return i.ordinalNumber(e,{unit:"quarter"});case"QQQ":return i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(e,{width:"wide",context:"formatting"})||i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class g5 extends wt{priority=120;parse(e,n,i){switch(n){case"q":case"qq":return on(n.length,e);case"qo":return i.ordinalNumber(e,{unit:"quarter"});case"qqq":return i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(e,{width:"wide",context:"standalone"})||i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class p5 extends wt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"M":return un(Zt(cn.month,e),s);case"MM":return un(on(2,e),s);case"Mo":return un(i.ordinalNumber(e,{unit:"month"}),s);case"MMM":return i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(e,{width:"wide",context:"formatting"})||i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}}class m5 extends wt{priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"L":return un(Zt(cn.month,e),s);case"LL":return un(on(2,e),s);case"Lo":return un(i.ordinalNumber(e,{unit:"month"}),s);case"LLL":return i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(e,{width:"wide",context:"standalone"})||i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function _5(t,e,n){const i=He(t),s=I_(i,n)-e;return i.setDate(i.getDate()-s*7),i}class v5 extends wt{priority=100;parse(e,n,i){switch(n){case"w":return Zt(cn.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return on(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i,s){return ps(_5(e,i,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function y5(t,e){const n=He(t),i=P_(n)-e;return n.setDate(n.getDate()-i*7),n}class b5 extends wt{priority=100;parse(e,n,i){switch(n){case"I":return Zt(cn.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return on(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i){return Sl(y5(e,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const w5=[31,28,31,30,31,30,31,31,30,31,30,31],x5=[31,29,31,30,31,30,31,31,30,31,30,31];class E5 extends wt{priority=90;subPriority=1;parse(e,n,i){switch(n){case"d":return Zt(cn.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return on(n.length,e)}}validate(e,n){const i=e.getFullYear(),s=tS(i),r=e.getMonth();return s?n>=1&&n<=x5[r]:n>=1&&n<=w5[r]}set(e,n,i){return e.setDate(i),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class C5 extends wt{priority=90;subpriority=1;parse(e,n,i){switch(n){case"D":case"DD":return Zt(cn.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return on(n.length,e)}}validate(e,n){const i=e.getFullYear();return tS(i)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,i){return e.setMonth(0,i),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function R_(t,e,n){const i=ya(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=He(t),o=r.getDay(),l=(e%7+7)%7,c=7-s,u=e<0||e>6?e-(o+c)%7:(l+c)%7-(o+c)%7;return rs(r,u)}class S5 extends wt{priority=90;parse(e,n,i){switch(n){case"E":case"EE":case"EEE":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=R_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class k5 extends wt{priority=90;parse(e,n,i,s){const r=o=>{const a=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return un(on(n.length,e),r);case"eo":return un(i.ordinalNumber(e,{unit:"day"}),r);case"eee":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeeee":return i.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=R_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class T5 extends wt{priority=90;parse(e,n,i,s){const r=o=>{const a=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return un(on(n.length,e),r);case"co":return un(i.ordinalNumber(e,{unit:"day"}),r);case"ccc":return i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"ccccc":return i.day(e,{width:"narrow",context:"standalone"});case"cccccc":return i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(e,{width:"wide",context:"standalone"})||i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=R_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function A5(t,e){const n=He(t),i=i5(n),s=e-i;return rs(n,s)}class P5 extends wt{priority=90;parse(e,n,i){const s=r=>r===0?7:r;switch(n){case"i":case"ii":return on(n.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return un(i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return un(i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return un(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return un(i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,n){return n>=1&&n<=7}set(e,n,i){return e=A5(e,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class M5 extends wt{priority=80;parse(e,n,i){switch(n){case"a":case"aa":case"aaa":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(D_(i),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class I5 extends wt{priority=80;parse(e,n,i){switch(n){case"b":case"bb":case"bbb":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(D_(i),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class D5 extends wt{priority=80;parse(e,n,i){switch(n){case"B":case"BB":case"BBB":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(D_(i),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class R5 extends wt{priority=70;parse(e,n,i){switch(n){case"h":return Zt(cn.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return on(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,i){const s=e.getHours()>=12;return s&&i<12?e.setHours(i+12,0,0,0):!s&&i===12?e.setHours(0,0,0,0):e.setHours(i,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class $5 extends wt{priority=70;parse(e,n,i){switch(n){case"H":return Zt(cn.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return on(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,i){return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class L5 extends wt{priority=70;parse(e,n,i){switch(n){case"K":return Zt(cn.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return on(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.getHours()>=12&&i<12?e.setHours(i+12,0,0,0):e.setHours(i,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class O5 extends wt{priority=70;parse(e,n,i){switch(n){case"k":return Zt(cn.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return on(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,i){const s=i<=24?i%24:i;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class N5 extends wt{priority=60;parse(e,n,i){switch(n){case"m":return Zt(cn.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return on(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setMinutes(i,0,0),e}incompatibleTokens=["t","T"]}class F5 extends wt{priority=50;parse(e,n,i){switch(n){case"s":return Zt(cn.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return on(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setSeconds(i,0),e}incompatibleTokens=["t","T"]}class B5 extends wt{priority=30;parse(e,n){const i=s=>Math.trunc(s*Math.pow(10,-n.length+3));return un(on(n.length,e),i)}set(e,n,i){return e.setMilliseconds(i),e}incompatibleTokens=["t","T"]}class V5 extends wt{priority=10;parse(e,n){switch(n){case"X":return Ss(Cs.basicOptionalMinutes,e);case"XX":return Ss(Cs.basic,e);case"XXXX":return Ss(Cs.basicOptionalSeconds,e);case"XXXXX":return Ss(Cs.extendedOptionalSeconds,e);case"XXX":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:yt(e,e.getTime()-Sh(e)-i)}incompatibleTokens=["t","T","x"]}class W5 extends wt{priority=10;parse(e,n){switch(n){case"x":return Ss(Cs.basicOptionalMinutes,e);case"xx":return Ss(Cs.basic,e);case"xxxx":return Ss(Cs.basicOptionalSeconds,e);case"xxxxx":return Ss(Cs.extendedOptionalSeconds,e);case"xxx":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:yt(e,e.getTime()-Sh(e)-i)}incompatibleTokens=["t","T","X"]}class z5 extends wt{priority=40;parse(e){return QC(e)}set(e,n,i){return[yt(e,i*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Y5 extends wt{priority=20;parse(e){return QC(e)}set(e,n,i){return[yt(e,i),{timestampIsSet:!0}]}incompatibleTokens="*"}const H5={G:new l5,y:new c5,Y:new u5,R:new d5,u:new h5,Q:new f5,q:new g5,M:new p5,L:new m5,w:new v5,I:new b5,d:new E5,D:new C5,E:new S5,e:new k5,c:new T5,i:new P5,a:new M5,b:new I5,B:new D5,h:new R5,H:new $5,K:new L5,k:new O5,m:new N5,s:new F5,S:new B5,X:new V5,x:new W5,t:new z5,T:new Y5},j5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,K5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,U5=/^'([^]*?)'?$/,G5=/''/g,X5=/\S/,q5=/[a-zA-Z]/;function im(t,e,n,i){const s=n5(),r=i?.locale??s.locale??GC,o=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(e==="")return t===""?He(n):yt(n,NaN);const l={firstWeekContainsDate:o,weekStartsOn:a,locale:r},c=[new a5],u=e.match(K5).map(m=>{const v=m[0];if(v in tm){const y=tm[v];return y(m,r.formatLong)}return m}).join("").match(j5),d=[];for(let m of u){!i?.useAdditionalWeekYearTokens&&ZC(m)&&nm(m,e,t),!i?.useAdditionalDayOfYearTokens&&qC(m)&&nm(m,e,t);const v=m[0],y=H5[v];if(y){const{incompatibleTokens:x}=y;if(Array.isArray(x)){const w=d.find(b=>x.includes(b.token)||b.token===v);if(w)throw new RangeError(`The format string mustn't contain \`${w.fullToken}\` and \`${m}\` at the same time`)}else if(y.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);d.push({token:v,fullToken:m});const E=y.run(t,m,r.match,l);if(!E)return yt(n,NaN);c.push(E.setter),t=E.rest}else{if(v.match(q5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(m==="''"?m="'":v==="'"&&(m=Z5(m)),t.indexOf(m)===0)t=t.slice(m.length);else return yt(n,NaN)}}if(t.length>0&&X5.test(t))return yt(n,NaN);const f=c.map(m=>m.priority).sort((m,v)=>v-m).filter((m,v,y)=>y.indexOf(m)===v).map(m=>c.filter(v=>v.priority===m).sort((v,y)=>y.subPriority-v.subPriority)).map(m=>m[0]);let g=He(n);if(isNaN(g.getTime()))return yt(n,NaN);const p={};for(const m of f){if(!m.validate(g,l))return yt(n,NaN);const v=m.set(g,p,l);Array.isArray(v)?(g=v[0],Object.assign(p,v[1])):g=v}return yt(n,g)}function Z5(t){return t.match(U5)[1].replace(G5,"'")}function m0(t,e){const n=Xo(t),i=Xo(e);return+n==+i}function J5(t,e){return rs(t,-e)}function nS(t,e){const n=He(t),i=n.getFullYear(),s=n.getDate(),r=yt(t,0);r.setFullYear(i,e,15),r.setHours(0,0,0,0);const o=t5(r);return n.setMonth(e,Math.min(s,o)),n}function Dt(t,e){let n=He(t);return isNaN(+n)?yt(t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=nS(n,e.month)),e.date!=null&&n.setDate(e.date),e.hours!=null&&n.setHours(e.hours),e.minutes!=null&&n.setMinutes(e.minutes),e.seconds!=null&&n.setSeconds(e.seconds),e.milliseconds!=null&&n.setMilliseconds(e.milliseconds),n)}function Q5(t,e){const n=He(t);return n.setHours(e),n}function iS(t,e){const n=He(t);return n.setMilliseconds(e),n}function e4(t,e){const n=He(t);return n.setMinutes(e),n}function sS(t,e){const n=He(t);return n.setSeconds(e),n}function As(t,e){const n=He(t);return isNaN(+n)?yt(t,NaN):(n.setFullYear(e),n)}function Al(t,e){return ds(t,-e)}function t4(t,e){const{years:n=0,months:i=0,weeks:s=0,days:r=0,hours:o=0,minutes:a=0,seconds:l=0}=e,c=Al(t,i+n*12),u=J5(c,r+s*7),d=a+o*60,g=(l+d*60)*1e3;return yt(t,u.getTime()-g)}function rS(t,e){return A_(t,-e)}function Gl(){const t=ND();return P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...t},[h("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),h("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),h("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),h("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}Gl.compatConfig={MODE:3};function oS(){return P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),h("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}oS.compatConfig={MODE:3};function $_(){return P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}$_.compatConfig={MODE:3};function L_(){return P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}L_.compatConfig={MODE:3};function O_(){return P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),h("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}O_.compatConfig={MODE:3};function N_(){return P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}N_.compatConfig={MODE:3};function F_(){return P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}F_.compatConfig={MODE:3};const xi=(t,e)=>e?new Date(t.toLocaleString("en-US",{timeZone:e})):new Date(t),B_=(t,e,n)=>sm(t,e,n)||ke(),n4=(t,e,n)=>{const i=e.dateInTz?xi(new Date(t),e.dateInTz):ke(t);return n?ai(i,!0):i},sm=(t,e,n)=>{if(!t)return null;const i=n?ai(ke(t),!0):ke(t);return e?e.exactMatch?n4(t,e,n):xi(i,e.timezone):i},i4=t=>{if(!t)return 0;const e=new Date,n=new Date(e.toLocaleString("en-US",{timeZone:"UTC"})),i=new Date(e.toLocaleString("en-US",{timeZone:t})),s=i.getTimezoneOffset()/60;return(+n-+i)/(1e3*60*60)-s};var ts=(t=>(t.month="month",t.year="year",t))(ts||{}),Ho=(t=>(t.top="top",t.bottom="bottom",t))(Ho||{}),ia=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(ia||{}),jn=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(jn||{});const s4=["timestamp","date","iso"];var Qn=(t=>(t.up="up",t.down="down",t.left="left",t.right="right",t))(Qn||{}),Nt=(t=>(t.arrowUp="ArrowUp",t.arrowDown="ArrowDown",t.arrowLeft="ArrowLeft",t.arrowRight="ArrowRight",t.enter="Enter",t.space=" ",t.esc="Escape",t.tab="Tab",t.home="Home",t.end="End",t.pageUp="PageUp",t.pageDown="PageDown",t))(Nt||{});function _0(t){return e=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${e}T00:00:00+00:00`)).slice(0,2)}function r4(t){return e=>Ls(xi(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:t})}const o4=(t,e,n)=>{const i=[1,2,3,4,5,6,7];let s;if(t!==null)try{s=i.map(r4(t))}catch{s=i.map(_0(e))}else s=i.map(_0(e));const r=s.slice(0,n),o=s.slice(n+1,s.length);return[s[n]].concat(...o).concat(...r)},V_=(t,e,n)=>{const i=[];for(let s=+t[0];s<=+t[1];s++)i.push({value:+s,text:uS(s,e)});return n?i.reverse():i},aS=(t,e,n)=>{const i=[1,2,3,4,5,6,7,8,9,10,11,12].map(r=>{const o=r<10?`0${r}`:r;return new Date(`2017-${o}-01T00:00:00+00:00`)});if(t!==null)try{const r=n==="long"?"LLLL":"LLL";return i.map((o,a)=>{const l=Ls(xi(o,"UTC"),r,{locale:t});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:a}})}catch{}const s=new Intl.DateTimeFormat(e,{month:n,timeZone:"UTC"});return i.map((r,o)=>{const a=s.format(r);return{text:a.charAt(0).toUpperCase()+a.substring(1),value:o}})},a4=t=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][t],bn=t=>{const e=Z(t);return e!=null&&e.$el?e?.$el:e},l4=t=>({type:"dot",...t??{}}),lS=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,W_={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},Tn=t=>t,v0=t=>t===0?t:!t||isNaN(+t)?null:+t,y0=t=>t===null,cS=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},c4=t=>{const e=[],n=i=>i.filter(s=>s);for(let i=0;i{const i=n!=null,s=e!=null;if(!i&&!s)return!1;const r=+n,o=+e;return i&&s?+t>r||+tr:s?+tc4(t).map(n=>n.map(i=>{const{active:s,disabled:r,isBetween:o,highlighted:a}=e(i);return{...i,active:s,disabled:r,className:{dp__overlay_cell_active:s,dp__overlay_cell:!s,dp__overlay_cell_disabled:r,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:r&&s,dp__cell_in_between:o,"dp--highlighted":a}}})),eo=(t,e,n=!1)=>{t&&e.allowStopPropagation&&(n&&t.stopImmediatePropagation(),t.stopPropagation())},u4=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function d4(t,e){let n=[...document.querySelectorAll(u4())];n=n.filter(s=>!t.contains(s)||s.hasAttribute("data-datepicker-instance"));const i=n.indexOf(t);if(i>=0&&(e?i-1>=0:i+1<=n.length))return n[i+(e?-1:1)]}const rm=(t,e)=>t?.querySelector(`[data-dp-element="${e}"]`),uS=(t,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(t),z_=t=>Ls(t,"dd-MM-yyyy"),Lg=t=>Array.isArray(t),Th=(t,e)=>e.get(z_(t)),h4=(t,e)=>t?e?e instanceof Map?!!Th(t,e):e(ke(t)):!1:!0,si=(t,e,n=!1,i)=>{if(t.key===Nt.enter||t.key===Nt.space)return n&&t.preventDefault(),e();if(i)return i(t)},b0=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(t=>navigator.userAgent.includes(t))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,w0=(t,e,n,i,s,r)=>{const o=im(t,e.slice(0,t.length),new Date,{locale:r});return Hc(o)&&HC(o)?i||s?o:Dt(o,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},f4=(t,e,n,i,s,r)=>{const o=Array.isArray(n)?n[0]:n;if(typeof e=="string")return w0(t,e,o,i,s,r);if(Array.isArray(e)){let a=null;for(const l of e)if(a=w0(t,l,o,i,s,r),a)break;return a}return typeof e=="function"?e(t):null},ke=t=>t?new Date(t):new Date,g4=(t,e,n)=>{if(e){const s=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),l=n?t.getSeconds().toString().padStart(2,"0"):"00";return`${t.getFullYear()}-${s}-${r}T${o}:${a}:${l}.000Z`}const i=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());return new Date(i).toISOString()},ai=(t,e)=>{const n=ke(JSON.parse(JSON.stringify(t))),i=Dt(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?lF(i):i},to=(t,e,n,i)=>{let s=t?ke(t):ke();return(e||e===0)&&(s=Q5(s,+e)),(n||n===0)&&(s=e4(s,+n)),(i||i===0)&&(s=sS(s,+i)),iS(s,0)},tn=(t,e)=>!t||!e?!1:cu(ai(t),ai(e)),ct=(t,e)=>!t||!e?!1:tl(ai(t),ai(e)),ln=(t,e)=>!t||!e?!1:Tl(ai(t),ai(e)),Ef=(t,e,n)=>t!=null&&t[0]&&t!=null&&t[1]?ln(n,t[0])&&tn(n,t[1]):t!=null&&t[0]&&e?ln(n,t[0])&&tn(n,e)||tn(n,t[0])&&ln(n,e):!1,os=t=>{const e=Dt(new Date(t),{date:1});return ai(e)},Og=(t,e,n)=>e&&(n||n===0)?Object.fromEntries(["hours","minutes","seconds"].map(i=>i===e?[i,n]:[i,isNaN(+t[i])?void 0:+t[i]])):{hours:isNaN(+t.hours)?void 0:+t.hours,minutes:isNaN(+t.minutes)?void 0:+t.minutes,seconds:isNaN(+t.seconds)?void 0:+t.seconds},sa=t=>({hours:vr(t),minutes:ao(t),seconds:kl(t)}),dS=(t,e)=>{if(e){const n=Ze(ke(e));if(n>t)return 12;if(n===t)return at(ke(e))}},hS=(t,e)=>{if(e){const n=Ze(ke(e));return n{if(t)return Ze(ke(t))},fS=(t,e)=>{const n=ln(t,e)?e:t,i=ln(e,t)?e:t;return jC({start:n,end:i})},p4=t=>{const e=ds(t,1);return{month:at(e),year:Ze(e)}},nr=(t,e)=>{const n=ps(t,{weekStartsOn:+e}),i=UC(t,{weekStartsOn:+e});return[n,i]},gS=(t,e)=>{const n={hours:vr(ke()),minutes:ao(ke()),seconds:e?kl(ke()):0};return Object.assign(n,t)},Kr=(t,e,n)=>[Dt(ke(t),{date:1}),Dt(ke(),{month:e,year:n,date:1})],ar=(t,e,n)=>{let i=t?ke(t):ke();return(e||e===0)&&(i=nS(i,e)),n&&(i=As(i,n)),i},pS=(t,e,n,i,s)=>{if(!i||s&&!e||!s&&!n)return!1;const r=s?ds(t,1):Al(t,1),o=[at(r),Ze(r)];return s?!_4(...o,e):!m4(...o,n)},m4=(t,e,n)=>tn(...Kr(n,t,e))||ct(...Kr(n,t,e)),_4=(t,e,n)=>ln(...Kr(n,t,e))||ct(...Kr(n,t,e)),mS=(t,e,n,i,s,r,o)=>{if(typeof e=="function"&&!o)return e(t);const a=n?{locale:n}:void 0;return Array.isArray(t)?`${Ls(t[0],r,a)}${s&&!t[1]?"":i}${t[1]?Ls(t[1],r,a):""}`:Ls(t,r,a)},La=t=>{if(t)return null;throw new Error(W_.prop("partial-range"))},kd=(t,e)=>{if(e)return t();throw new Error(W_.prop("range"))},om=t=>Array.isArray(t)?Hc(t[0])&&(t[1]?Hc(t[1]):!0):t?Hc(t):!1,v4=(t,e)=>Dt(e??ke(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),Ng=(t,e,n,i)=>{if(!t)return!0;if(i){const s=n==="max"?cu(t,e):Tl(t,e),r={seconds:0,milliseconds:0};return s||tl(Dt(t,r),Dt(e,r))}return n==="max"?t.getTime()<=e.getTime():t.getTime()>=e.getTime()},Fg=(t,e,n)=>t?v4(t,e):ke(n??e),x0=(t,e,n,i,s)=>{if(Array.isArray(i)){const o=Fg(t,i[0],e),a=Fg(t,i[1],e);return Ng(i[0],o,n,!!e)&&Ng(i[1],a,n,!!e)&&s}const r=Fg(t,i,e);return Ng(i,r,n,!!e)&&s},Bg=t=>Dt(ke(),sa(t)),y4=(t,e)=>t instanceof Map?Array.from(t.values()).filter(n=>Ze(ke(n))===e).map(n=>at(n)):[],_S=(t,e,n)=>typeof t=="function"?t({month:e,year:n}):!!t.months.find(i=>i.month===e&&i.year===n),Y_=(t,e)=>typeof t=="function"?t(e):t.years.includes(e),vS=t=>Ls(t,"yyyy-MM-dd"),dc=Ei({menuFocused:!1,shiftKeyInMenu:!1}),yS=()=>{const t=n=>{dc.menuFocused=n},e=n=>{dc.shiftKeyInMenu!==n&&(dc.shiftKeyInMenu=n)};return{control:ve(()=>({shiftKeyInMenu:dc.shiftKeyInMenu,menuFocused:dc.menuFocused})),setMenuFocused:t,setShiftKey:e}},Ot=Ei({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Vg=me(null),Td=me(!1),Wg=me(!1),zg=me(!1),Yg=me(!1),Wn=me(0),an=me(0),yo=()=>{const t=ve(()=>Td.value?[...Ot.selectionGrid,Ot.actionRow].filter(d=>d.length):Wg.value?[...Ot.timePicker[0],...Ot.timePicker[1],Yg.value?[]:[Vg.value],Ot.actionRow].filter(d=>d.length):zg.value?[...Ot.monthPicker,Ot.actionRow]:[Ot.monthYear,...Ot.calendar,Ot.time,Ot.actionRow].filter(d=>d.length)),e=d=>{Wn.value=d?Wn.value+1:Wn.value-1;let f=null;t.value[an.value]&&(f=t.value[an.value][Wn.value]),!f&&t.value[an.value+(d?1:-1)]?(an.value=an.value+(d?1:-1),Wn.value=d?0:t.value[an.value].length-1):f||(Wn.value=d?Wn.value-1:Wn.value+1)},n=d=>{an.value===0&&!d||an.value===t.value.length&&d||(an.value=d?an.value+1:an.value-1,t.value[an.value]?t.value[an.value]&&!t.value[an.value][Wn.value]&&Wn.value!==0&&(Wn.value=t.value[an.value].length-1):an.value=d?an.value-1:an.value+1)},i=d=>{let f=null;t.value[an.value]&&(f=t.value[an.value][Wn.value]),f?f.focus({preventScroll:!Td.value}):Wn.value=d?Wn.value-1:Wn.value+1},s=()=>{e(!0),i(!0)},r=()=>{e(!1),i(!1)},o=()=>{n(!1),i(!0)},a=()=>{n(!0),i(!0)},l=(d,f)=>{Ot[f]=d},c=(d,f)=>{Ot[f]=d},u=()=>{Wn.value=0,an.value=0};return{buildMatrix:l,buildMultiLevelMatrix:c,setTimePickerBackRef:d=>{Vg.value=d},setSelectionGrid:d=>{Td.value=d,u(),d||(Ot.selectionGrid=[])},setTimePicker:(d,f=!1)=>{Wg.value=d,Yg.value=f,u(),d||(Ot.timePicker[0]=[],Ot.timePicker[1]=[])},setTimePickerElements:(d,f=0)=>{Ot.timePicker[f]=d},arrowRight:s,arrowLeft:r,arrowUp:o,arrowDown:a,clearArrowNav:()=>{Ot.monthYear=[],Ot.calendar=[],Ot.time=[],Ot.actionRow=[],Ot.selectionGrid=[],Ot.timePicker[0]=[],Ot.timePicker[1]=[],Td.value=!1,Wg.value=!1,Yg.value=!1,zg.value=!1,u(),Vg.value=null},setMonthPicker:d=>{zg.value=d,u()},refSets:Ot}},E0=t=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...t??{}}),b4=t=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:e=>`Month picker${e?" overlay":""}`,yearPicker:e=>`Year picker${e?" overlay":""}`,timeOverlay:e=>`${e} overlay`,...t??{}}),C0=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,w4=t=>{const e=typeof t=="object"&&t,n={static:!0,solo:!1};if(!t)return{...n,count:C0(!1)};const i=e?t:{},s=e?i.count??!0:t,r=C0(s);return Object.assign(n,i,{count:r})},x4=(t,e,n)=>t||(typeof n=="string"?n:e),E4=t=>typeof t=="boolean"?t?E0({}):!1:E0(t),C4=t=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...e,...t??{},enabled:!0}:{...e,enabled:t}},S4=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),k4=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),T4=t=>{const e={input:!1};return typeof t=="object"?{...e,...t??{},enabled:!0}:{enabled:t,...e}},A4=t=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,...t??{}}),P4=t=>{const e={dates:Array.isArray(t)?t.map(n=>ke(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...e,...t??{}}},M4=t=>typeof t=="object"?{type:t?.type??"local",hideOnOffsetDates:t?.hideOnOffsetDates??!1}:{type:t,hideOnOffsetDates:!1},I4=t=>{const e={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof t=="object"?{enabled:!0,...e,...t}:{enabled:t,...e}},D4=t=>t?typeof t=="string"?{timezone:t,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:t.timezone,exactMatch:t.exactMatch??!1,dateInTz:t.dateInTz??void 0,emitTimezone:t.emitTimezone??void 0,convertModel:t.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},Hg=(t,e,n)=>new Map(t.map(i=>{const s=B_(i,e,n);return[z_(s),s]})),R4=(t,e)=>t.length?new Map(t.map(n=>{const i=B_(n.date,e);return[z_(i),n]})):null,$4=t=>{var e;return{minDate:sm(t.minDate,t.timezone,t.isSpecific),maxDate:sm(t.maxDate,t.timezone,t.isSpecific),disabledDates:Lg(t.disabledDates)?Hg(t.disabledDates,t.timezone,t.isSpecific):t.disabledDates,allowedDates:Lg(t.allowedDates)?Hg(t.allowedDates,t.timezone,t.isSpecific):null,highlight:typeof t.highlight=="object"&&Lg((e=t.highlight)==null?void 0:e.dates)?Hg(t.highlight.dates,t.timezone):t.highlight,markers:R4(t.markers,t.timezone)}},L4=t=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:null}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},O4=t=>({...Object.fromEntries(Object.keys(t).map(e=>{const n=e,i=t[n],s=typeof t[n]=="string"?{[i]:!0}:Object.fromEntries(i.map(r=>[r,!0]));return[e,s]}))}),Ut=t=>{const e=()=>{const C=t.enableSeconds?":ss":"",k=t.enableMinutes?":mm":"";return t.is24?`HH${k}${C}`:`hh${k}${C} aa`},n=()=>{var C;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?e():t.weekPicker?`${((C=v.value)==null?void 0:C.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},i=C=>gS(C,t.enableSeconds),s=()=>w.value.enabled?t.startTime&&Array.isArray(t.startTime)?[i(t.startTime[0]),i(t.startTime[1])]:null:t.startTime&&!Array.isArray(t.startTime)?i(t.startTime):null,r=ve(()=>w4(t.multiCalendars)),o=ve(()=>s()),a=ve(()=>b4(t.ariaLabels)),l=ve(()=>S4(t.filters)),c=ve(()=>E4(t.transitions)),u=ve(()=>k4(t.actionRow)),d=ve(()=>x4(t.previewFormat,t.format,n())),f=ve(()=>C4(t.textInput)),g=ve(()=>T4(t.inline)),p=ve(()=>A4(t.config)),m=ve(()=>P4(t.highlight)),v=ve(()=>M4(t.weekNumbers)),y=ve(()=>D4(t.timezone)),x=ve(()=>L4(t.multiDates)),E=ve(()=>$4({minDate:t.minDate,maxDate:t.maxDate,disabledDates:t.disabledDates,allowedDates:t.allowedDates,highlight:m.value,markers:t.markers,timezone:y.value,isSpecific:t.monthPicker||t.yearPicker||t.quarterPicker})),w=ve(()=>I4(t.range)),b=ve(()=>O4(t.ui));return{defaultedTransitions:c,defaultedMultiCalendars:r,defaultedStartTime:o,defaultedAriaLabels:a,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:f,defaultedInline:g,defaultedConfig:p,defaultedHighlight:m,defaultedWeekNumbers:v,defaultedRange:w,propDates:E,defaultedTz:y,defaultedMultiDates:x,defaultedUI:b,getDefaultPattern:n,getDefaultStartTime:s}},N4=(t,e,n)=>{const i=me(),{defaultedTextInput:s,defaultedRange:r,defaultedTz:o,defaultedMultiDates:a,getDefaultPattern:l}=Ut(e),c=me(""),u=tu(e,"format"),d=tu(e,"formatLocale");jt(i,()=>{typeof e.onInternalModelChange=="function"&&t("internal-model-change",i.value,ue(!0))},{deep:!0}),jt(r,(L,le)=>{L.enabled!==le.enabled&&(i.value=null)}),jt(u,()=>{X()});const f=L=>o.value.timezone&&o.value.convertModel?xi(L,o.value.timezone):L,g=L=>{if(o.value.timezone&&o.value.convertModel){const le=i4(o.value.timezone);return tF(L,le)}return L},p=(L,le,de=!1)=>mS(L,e.format,e.formatLocale,s.value.rangeSeparator,e.modelAuto,le??l(),de),m=L=>L?e.modelType?H(L):{hours:vr(L),minutes:ao(L),seconds:e.enableSeconds?kl(L):0}:null,v=L=>e.modelType?H(L):{month:at(L),year:Ze(L)},y=L=>Array.isArray(L)?a.value.enabled?L.map(le=>x(le,As(ke(),le))):kd(()=>[As(ke(),L[0]),L[1]?As(ke(),L[1]):La(r.value.partialRange)],r.value.enabled):As(ke(),+L),x=(L,le)=>(typeof L=="string"||typeof L=="number")&&e.modelType?J(L):le,E=L=>Array.isArray(L)?[x(L[0],to(null,+L[0].hours,+L[0].minutes,L[0].seconds)),x(L[1],to(null,+L[1].hours,+L[1].minutes,L[1].seconds))]:x(L,to(null,L.hours,L.minutes,L.seconds)),w=L=>{const le=Dt(ke(),{date:1});return Array.isArray(L)?a.value.enabled?L.map(de=>x(de,ar(le,+de.month,+de.year))):kd(()=>[x(L[0],ar(le,+L[0].month,+L[0].year)),x(L[1],L[1]?ar(le,+L[1].month,+L[1].year):La(r.value.partialRange))],r.value.enabled):x(L,ar(le,+L.month,+L.year))},b=L=>{if(Array.isArray(L))return L.map(le=>J(le));throw new Error(W_.dateArr("multi-dates"))},C=L=>{if(Array.isArray(L)&&r.value.enabled){const le=L[0],de=L[1];return[ke(Array.isArray(le)?le[0]:null),Array.isArray(de)&&de.length?ke(de[0]):null]}return ke(L[0])},k=L=>e.modelAuto?Array.isArray(L)?[J(L[0]),J(L[1])]:e.autoApply?[J(L)]:[J(L),null]:Array.isArray(L)?kd(()=>L[1]?[J(L[0]),L[1]?J(L[1]):La(r.value.partialRange)]:[J(L[0])],r.value.enabled):J(L),T=()=>{Array.isArray(i.value)&&r.value.enabled&&i.value.length===1&&i.value.push(La(r.value.partialRange))},A=()=>{const L=i.value;return[H(L[0]),L[1]?H(L[1]):La(r.value.partialRange)]},I=()=>i.value[1]?A():H(Tn(i.value[0])),V=()=>(i.value||[]).map(L=>H(L)),Y=(L=!1)=>(L||T(),e.modelAuto?I():a.value.enabled?V():Array.isArray(i.value)?kd(()=>A(),r.value.enabled):H(Tn(i.value))),ne=L=>!L||Array.isArray(L)&&!L.length?null:e.timePicker?E(Tn(L)):e.monthPicker?w(Tn(L)):e.yearPicker?y(Tn(L)):a.value.enabled?b(Tn(L)):e.weekPicker?C(Tn(L)):k(Tn(L)),N=L=>{const le=ne(L);om(Tn(le))?(i.value=Tn(le),X()):(i.value=null,c.value="")},B=()=>{const L=le=>Ls(le,s.value.format);return`${L(i.value[0])} ${s.value.rangeSeparator} ${i.value[1]?L(i.value[1]):""}`},R=()=>n.value&&i.value?Array.isArray(i.value)?B():Ls(i.value,s.value.format):p(i.value),W=()=>i.value?a.value.enabled?i.value.map(L=>p(L)).join("; "):s.value.enabled&&typeof s.value.format=="string"?R():p(i.value):"",X=()=>{!e.format||typeof e.format=="string"||s.value.enabled&&typeof s.value.format=="string"?c.value=W():c.value=e.format(i.value)},J=L=>{if(e.utc){const le=new Date(L);return e.utc==="preserve"?new Date(le.getTime()+le.getTimezoneOffset()*6e4):le}return e.modelType?s4.includes(e.modelType)?f(new Date(L)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?f(im(L,l(),new Date,{locale:d.value})):f(im(L,e.modelType,new Date,{locale:d.value})):f(new Date(L))},H=L=>L?e.utc?g4(L,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+g(L):e.modelType==="iso"?g(L).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?p(g(L)):p(g(L),e.modelType,!0):g(L):"",ce=(L,le=!1,de=!1)=>{if(de)return L;if(t("update:model-value",L),o.value.emitTimezone&&le){const xe=Array.isArray(L)?L.map(z=>xi(Tn(z),o.value.emitTimezone)):xi(Tn(L),o.value.emitTimezone);t("update:model-timezone-value",xe)}},ie=L=>Array.isArray(i.value)?a.value.enabled?i.value.map(le=>L(le)):[L(i.value[0]),i.value[1]?L(i.value[1]):La(r.value.partialRange)]:L(Tn(i.value)),te=()=>{if(Array.isArray(i.value)){const L=nr(i.value[0],e.weekStart),le=i.value[1]?nr(i.value[1],e.weekStart):[];return[L.map(de=>ke(de)),le.map(de=>ke(de))]}return nr(i.value,e.weekStart).map(L=>ke(L))},D=(L,le)=>ce(Tn(ie(L)),!1,le),ee=L=>{const le=te();return L?le:t("update:model-value",te())},ue=(L=!1)=>(L||X(),e.monthPicker?D(v,L):e.timePicker?D(m,L):e.yearPicker?D(Ze,L):e.weekPicker?ee(L):ce(Y(L),!0,L));return{inputValue:c,internalModelValue:i,checkBeforeEmit:()=>i.value?r.value.enabled?r.value.partialRange?i.value.length>=1:i.value.length===2:!!i.value:!1,parseExternalModelValue:N,formatInputValue:X,emitModelValue:ue}},F4=(t,e)=>{const{defaultedFilters:n,propDates:i}=Ut(t),{validateMonthYearInRange:s}=bo(t),r=(u,d)=>{let f=u;return n.value.months.includes(at(f))?(f=d?ds(u,1):Al(u,1),r(f,d)):f},o=(u,d)=>{let f=u;return n.value.years.includes(Ze(f))?(f=d?A_(u,1):rS(u,1),o(f,d)):f},a=(u,d=!1)=>{const f=Dt(ke(),{month:t.month,year:t.year});let g=u?ds(f,1):Al(f,1);t.disableYearSelect&&(g=As(g,t.year));let p=at(g),m=Ze(g);n.value.months.includes(p)&&(g=r(g,u),p=at(g),m=Ze(g)),n.value.years.includes(m)&&(g=o(g,u),m=Ze(g)),s(p,m,u,t.preventMinMaxNavigation)&&l(p,m,d)},l=(u,d,f)=>{e("update-month-year",{month:u,year:d,fromNav:f})},c=ve(()=>u=>pS(Dt(ke(),{month:t.month,year:t.year}),i.value.maxDate,i.value.minDate,t.preventMinMaxNavigation,u));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}},Cf={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},_s={...Cf,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},B4=["title"],V4=["disabled"],W4=fn({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},..._s},emits:["close-picker","select-date","select-now","invalid-select"],setup(t,{emit:e}){const n=e,i=t,{defaultedActionRow:s,defaultedPreviewFormat:r,defaultedMultiCalendars:o,defaultedTextInput:a,defaultedInline:l,defaultedRange:c,defaultedMultiDates:u}=Ut(i),{isTimeValid:d,isMonthValid:f}=bo(i),{buildMatrix:g}=yo(),p=me(null),m=me(null),v=me(!1),y=me({}),x=me(null),E=me(null);Vt(()=>{i.arrowNavigation&&g([bn(p),bn(m)],"actionRow"),w(),window.addEventListener("resize",w)}),_o(()=>{window.removeEventListener("resize",w)});const w=()=>{v.value=!1,setTimeout(()=>{var N,B;const R=(N=x.value)==null?void 0:N.getBoundingClientRect(),W=(B=E.value)==null?void 0:B.getBoundingClientRect();R&&W&&(y.value.maxWidth=`${W.width-R.width-20}px`),v.value=!0},0)},b=ve(()=>c.value.enabled&&!c.value.partialRange&&i.internalModelValue?i.internalModelValue.length===2:!0),C=ve(()=>!d.value(i.internalModelValue)||!f.value(i.internalModelValue)||!b.value),k=()=>{const N=r.value;return i.timePicker||i.monthPicker,N(Tn(i.internalModelValue))},T=()=>{const N=i.internalModelValue;return o.value.count>0?`${A(N[0])} - ${A(N[1])}`:[A(N[0]),A(N[1])]},A=N=>mS(N,r.value,i.formatLocale,a.value.rangeSeparator,i.modelAuto,r.value),I=ve(()=>!i.internalModelValue||!i.menuMount?"":typeof r.value=="string"?Array.isArray(i.internalModelValue)?i.internalModelValue.length===2&&i.internalModelValue[1]?T():u.value.enabled?i.internalModelValue.map(N=>`${A(N)}`):i.modelAuto?`${A(i.internalModelValue[0])}`:`${A(i.internalModelValue[0])} -`:A(i.internalModelValue):k()),V=()=>u.value.enabled?"; ":" - ",Y=ve(()=>Array.isArray(I.value)?I.value.join(V()):I.value),ne=()=>{d.value(i.internalModelValue)&&f.value(i.internalModelValue)&&b.value?n("select-date"):n("invalid-select")};return(N,B)=>(P(),F("div",{ref_key:"actionRowRef",ref:E,class:"dp__action_row"},[N.$slots["action-row"]?Fe(N.$slots,"action-row",In(xn({key:0},{internalModelValue:N.internalModelValue,disabled:C.value,selectDate:()=>N.$emit("select-date"),closePicker:()=>N.$emit("close-picker")}))):(P(),F(Ie,{key:1},[Z(s).showPreview?(P(),F("div",{key:0,class:"dp__selection_preview",title:Y.value,style:Mn(y.value)},[N.$slots["action-preview"]&&v.value?Fe(N.$slots,"action-preview",{key:0,value:N.internalModelValue}):se("",!0),!N.$slots["action-preview"]&&v.value?(P(),F(Ie,{key:1},[Be(pe(Y.value),1)],64)):se("",!0)],12,B4)):se("",!0),h("div",{ref_key:"actionBtnContainer",ref:x,class:"dp__action_buttons","data-dp-element":"action-row"},[N.$slots["action-buttons"]?Fe(N.$slots,"action-buttons",{key:0,value:N.internalModelValue}):se("",!0),N.$slots["action-buttons"]?se("",!0):(P(),F(Ie,{key:1},[!Z(l).enabled&&Z(s).showCancel?(P(),F("button",{key:0,ref_key:"cancelButtonRef",ref:p,type:"button",class:"dp__action_button dp__action_cancel",onClick:B[0]||(B[0]=R=>N.$emit("close-picker")),onKeydown:B[1]||(B[1]=R=>Z(si)(R,()=>N.$emit("close-picker")))},pe(N.cancelText),545)):se("",!0),Z(s).showNow?(P(),F("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:B[2]||(B[2]=R=>N.$emit("select-now")),onKeydown:B[3]||(B[3]=R=>Z(si)(R,()=>N.$emit("select-now")))},pe(N.nowButtonLabel),33)):se("",!0),Z(s).showSelect?(P(),F("button",{key:2,ref_key:"selectButtonRef",ref:m,type:"button",class:"dp__action_button dp__action_select",disabled:C.value,"data-test":"select-button",onKeydown:B[4]||(B[4]=R=>Z(si)(R,()=>ne())),onClick:ne},pe(N.selectText),41,V4)):se("",!0)],64))],512)],64))],512))}}),z4=["role","aria-label","tabindex"],Y4={class:"dp__selection_grid_header"},H4=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],j4=["aria-label"],zu=fn({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(t,{expose:e,emit:n}){const{setSelectionGrid:i,buildMultiLevelMatrix:s,setMonthPicker:r}=yo(),o=n,a=t,{defaultedAriaLabels:l,defaultedTextInput:c,defaultedConfig:u}=Ut(a),{hideNavigationButtons:d}=Tf(),f=me(!1),g=me(null),p=me(null),m=me([]),v=me(),y=me(null),x=me(0),E=me(null);wE(()=>{g.value=null}),Vt(()=>{Rn().then(()=>V()),a.noOverlayFocus||b(),w(!0)}),_o(()=>w(!1));const w=ie=>{var te;a.arrowNavigation&&((te=a.headerRefs)!=null&&te.length?r(ie):i(ie))},b=()=>{var ie;const te=bn(p);te&&(c.value.enabled||(g.value?(ie=g.value)==null||ie.focus({preventScroll:!0}):te.focus({preventScroll:!0})),f.value=te.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!a.useRelative,"dp--overlay-relative":a.useRelative})),k=ve(()=>a.useRelative?{height:`${a.height}px`,width:"var(--dp-menu-min-width)"}:void 0),T=ve(()=>({dp__overlay_col:!0})),A=ve(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:f.value,dp__button_bottom:a.isLast})),I=ve(()=>{var ie,te;return{dp__overlay_container:!0,dp__container_flex:((ie=a.items)==null?void 0:ie.length)<=6,dp__container_block:((te=a.items)==null?void 0:te.length)>6}});jt(()=>a.items,()=>V(!1),{deep:!0});const V=(ie=!0)=>{Rn().then(()=>{const te=bn(g),D=bn(p),ee=bn(y),ue=bn(E),L=ee?ee.getBoundingClientRect().height:0;D&&(D.getBoundingClientRect().height?x.value=D.getBoundingClientRect().height-L:x.value=u.value.modeHeight-L),te&&ue&&ie&&(ue.scrollTop=te.offsetTop-ue.offsetTop-(x.value/2-te.getBoundingClientRect().height)-L)})},Y=ie=>{ie.disabled||o("selected",ie.value)},ne=()=>{o("toggle"),o("reset-flow")},N=()=>{a.escClose&&ne()},B=(ie,te,D,ee)=>{ie&&((te.active||te.value===a.focusValue)&&(g.value=ie),a.arrowNavigation&&(Array.isArray(m.value[D])?m.value[D][ee]=ie:m.value[D]=[ie],R()))},R=()=>{var ie,te;const D=(ie=a.headerRefs)!=null&&ie.length?[a.headerRefs].concat(m.value):m.value.concat([a.skipButtonRef?[]:[y.value]]);s(Tn(D),(te=a.headerRefs)!=null&&te.length?"monthPicker":"selectionGrid")},W=ie=>{a.arrowNavigation||eo(ie,u.value,!0)},X=ie=>{v.value=ie,o("hover-value",ie)},J=()=>{if(ne(),!a.isLast){const ie=rm(a.menuWrapRef??null,"action-row");if(ie){const te=cS(ie);te?.focus()}}},H=ie=>{switch(ie.key){case Nt.esc:return N();case Nt.arrowLeft:return W(ie);case Nt.arrowRight:return W(ie);case Nt.arrowUp:return W(ie);case Nt.arrowDown:return W(ie);default:return}},ce=ie=>{if(ie.key===Nt.enter)return ne();if(ie.key===Nt.tab)return J()};return e({focusGrid:b}),(ie,te)=>{var D;return P(),F("div",{ref_key:"gridWrapRef",ref:p,class:Ee(C.value),style:Mn(k.value),role:ie.useRelative?void 0:"dialog","aria-label":ie.overlayLabel,tabindex:ie.useRelative?void 0:"0",onKeydown:H,onClick:te[0]||(te[0]=ru(()=>{},["prevent"]))},[h("div",{ref_key:"containerRef",ref:E,class:Ee(I.value),style:Mn({"--dp-overlay-height":`${x.value}px`}),role:"grid"},[h("div",Y4,[Fe(ie.$slots,"header")]),ie.$slots.overlay?Fe(ie.$slots,"overlay",{key:0}):(P(!0),F(Ie,{key:1},Ge(ie.items,(ee,ue)=>(P(),F("div",{key:ue,class:Ee(["dp__overlay_row",{dp__flex_row:ie.items.length>=3}]),role:"row"},[(P(!0),F(Ie,null,Ge(ee,(L,le)=>(P(),F("div",{key:L.value,ref_for:!0,ref:de=>B(de,L,ue,le),role:"gridcell",class:Ee(T.value),"aria-selected":L.active||void 0,"aria-disabled":L.disabled||void 0,tabindex:"0","data-test":L.text,onClick:ru(de=>Y(L),["prevent"]),onKeydown:de=>Z(si)(de,()=>Y(L),!0),onMouseover:de=>X(L.value)},[h("div",{class:Ee(L.className)},[ie.$slots.item?Fe(ie.$slots,"item",{key:0,item:L}):se("",!0),ie.$slots.item?se("",!0):(P(),F(Ie,{key:1},[Be(pe(L.text),1)],64))],2)],42,H4))),128))],2))),128))],6),ie.$slots["button-icon"]?Re((P(),F("button",{key:0,ref_key:"toggleButton",ref:y,type:"button","aria-label":(D=Z(l))==null?void 0:D.toggleOverlay,class:Ee(A.value),tabindex:"0",onClick:ne,onKeydown:ce},[Fe(ie.$slots,"button-icon")],42,j4)),[[ah,!Z(d)(ie.hideNavigation,ie.type)]]):se("",!0)],46,z4)}}}),Sf=fn({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(t){const e=t,n=ve(()=>e.multiCalendars>0?[...Array(e.multiCalendars).keys()]:[0]),i=ve(()=>({dp__instance_calendar:e.multiCalendars>0}));return(s,r)=>(P(),F("div",{class:Ee({dp__menu_inner:!s.stretch,"dp--menu--inner-stretched":s.stretch,dp__flex_display:s.multiCalendars>0,"dp--flex-display-collapsed":s.collapse})},[(P(!0),F(Ie,null,Ge(n.value,(o,a)=>(P(),F("div",{key:o,class:Ee(i.value)},[Fe(s.$slots,"default",{instance:o,index:a})],2))),128))],2))}}),K4=["data-dp-element","aria-label","aria-disabled"],jc=fn({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const n=e,i=me(null);return Vt(()=>n("set-ref",i)),(s,r)=>(P(),F("button",{ref_key:"elRef",ref:i,type:"button","data-dp-element":s.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":s.ariaLabel,"aria-disabled":s.disabled||void 0,onClick:r[0]||(r[0]=o=>s.$emit("activate")),onKeydown:r[1]||(r[1]=o=>Z(si)(o,()=>s.$emit("activate"),!0))},[h("span",{class:Ee(["dp__inner_nav",{dp__inner_nav_disabled:s.disabled}])},[Fe(s.$slots,"default")],2)],40,K4))}}),U4=["aria-label","data-test"],bS=fn({__name:"YearModePicker",props:{..._s,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(t,{emit:e}){const n=e,i=t,{showRightIcon:s,showLeftIcon:r}=Tf(),{defaultedConfig:o,defaultedMultiCalendars:a,defaultedAriaLabels:l,defaultedTransitions:c,defaultedUI:u}=Ut(i),{showTransition:d,transitionName:f}=Yu(c),g=me(!1),p=(y=!1,x)=>{g.value=!g.value,n("toggle-year-picker",{flow:y,show:x})},m=y=>{g.value=!1,n("year-select",y)},v=(y=!1)=>{n("handle-year",y)};return(y,x)=>{var E,w,b,C,k;return P(),F(Ie,null,[h("div",{class:Ee(["dp--year-mode-picker",{"dp--hidden-el":g.value}])},[Z(r)(Z(a),t.instance)?(P(),Ce(jc,{key:0,ref:"mpPrevIconRef","aria-label":(E=Z(l))==null?void 0:E.prevYear,disabled:t.isDisabled(!1),class:Ee((w=Z(u))==null?void 0:w.navBtnPrev),onActivate:x[0]||(x[0]=T=>v(!1))},{default:Pe(()=>[y.$slots["arrow-left"]?Fe(y.$slots,"arrow-left",{key:0}):se("",!0),y.$slots["arrow-left"]?se("",!0):(P(),Ce(Z($_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):se("",!0),h("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${t.year}-${(b=Z(l))==null?void 0:b.openYearsOverlay}`,"data-test":`year-mode-btn-${t.instance}`,onClick:x[1]||(x[1]=()=>p(!1)),onKeydown:x[2]||(x[2]=dC(()=>p(!1),["enter"]))},[y.$slots.year?Fe(y.$slots,"year",{key:0,year:t.year}):se("",!0),y.$slots.year?se("",!0):(P(),F(Ie,{key:1},[Be(pe(t.year),1)],64))],40,U4),Z(s)(Z(a),t.instance)?(P(),Ce(jc,{key:1,ref:"mpNextIconRef","aria-label":(C=Z(l))==null?void 0:C.nextYear,disabled:t.isDisabled(!0),class:Ee((k=Z(u))==null?void 0:k.navBtnNext),onActivate:x[3]||(x[3]=T=>v(!0))},{default:Pe(()=>[y.$slots["arrow-right"]?Fe(y.$slots,"arrow-right",{key:0}):se("",!0),y.$slots["arrow-right"]?se("",!0):(P(),Ce(Z(L_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):se("",!0)],2),$(vt,{name:Z(f)(t.showYearPicker),css:Z(d)},{default:Pe(()=>{var T,A;return[t.showYearPicker?(P(),Ce(zu,{key:0,items:t.items,"text-input":y.textInput,"esc-close":y.escClose,config:y.config,"is-last":y.autoApply&&!Z(o).keepActionRow,"hide-navigation":y.hideNavigation,"aria-labels":y.ariaLabels,"overlay-label":(A=(T=Z(l))==null?void 0:T.yearPicker)==null?void 0:A.call(T,!0),type:"year",onToggle:p,onSelected:x[4]||(x[4]=I=>m(I))},Xn({"button-icon":Pe(()=>[y.$slots["calendar-icon"]?Fe(y.$slots,"calendar-icon",{key:0}):se("",!0),y.$slots["calendar-icon"]?se("",!0):(P(),Ce(Z(Gl),{key:1}))]),_:2},[y.$slots["year-overlay-value"]?{name:"item",fn:Pe(({item:I})=>[Fe(y.$slots,"year-overlay-value",{text:I.text,value:I.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):se("",!0)]}),_:3},8,["name","css"])],64)}}}),H_=(t,e,n)=>{if(e.value&&Array.isArray(e.value))if(e.value.some(i=>ct(t,i))){const i=e.value.filter(s=>!ct(s,t));e.value=i.length?i:null}else(n&&+n>e.value.length||!n)&&e.value.push(t);else e.value=[t]},j_=(t,e,n)=>{let i=t.value?t.value.slice():[];return i.length===2&&i[1]!==null&&(i=[]),i.length?tn(e,i[0])?(i.unshift(e),n("range-start",i[0]),n("range-start",i[1])):(i[1]=e,n("range-end",e)):(i=[e],n("range-start",e)),i},kf=(t,e,n,i)=>{t&&(t[0]&&t[1]&&n&&e("auto-apply"),t[0]&&!t[1]&&i&&n&&e("auto-apply"))},wS=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(e=>xi(ke(e),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=xi(ke(t.value),t.timezone))},xS=(t,e,n,i)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&i.value.partialRange)?i.value.fixedStart&&(ln(t,e.value[0])||ct(t,e.value[0]))?[e.value[0],t]:i.value.fixedEnd&&(tn(t,e.value[1])||ct(t,e.value[1]))?[t,e.value[1]]:(n("invalid-fixed-range",t),e.value):[],ES=({multiCalendars:t,range:e,highlight:n,propDates:i,calendars:s,modelValue:r,props:o,filters:a,year:l,month:c,emit:u})=>{const d=ve(()=>V_(o.yearRange,o.locale,o.reverseYears)),f=me([!1]),g=ve(()=>(I,V)=>{const Y=Dt(os(new Date),{month:c.value(I),year:l.value(I)}),ne=V?KC(Y):lu(Y);return pS(ne,i.value.maxDate,i.value.minDate,o.preventMinMaxNavigation,V)}),p=()=>Array.isArray(r.value)&&t.value.solo&&r.value[1],m=()=>{for(let I=0;I{if(!I)return m();const V=Dt(ke(),s.value[I]);return s.value[0].year=Ze(rS(V,t.value.count-1)),m()},y=(I,V)=>{const Y=oF(V,I);return e.value.showLastInRange&&Y>1?V:I},x=I=>o.focusStartDate||t.value.solo?I[0]:I[1]?y(I[0],I[1]):I[0],E=()=>{if(r.value){const I=Array.isArray(r.value)?x(r.value):r.value;s.value[0]={month:at(I),year:Ze(I)}}},w=()=>{E(),t.value.count&&m()};jt(r,(I,V)=>{o.isTextInputDate&&JSON.stringify(I??{})!==JSON.stringify(V??{})&&w()}),Vt(()=>{w()});const b=(I,V)=>{s.value[V].year=I,u("update-month-year",{instance:V,year:I,month:s.value[V].month}),t.value.count&&!t.value.solo&&v(V)},C=ve(()=>I=>Pl(d.value,V=>{var Y;const ne=l.value(I)===V.value,N=uu(V.value,Ml(i.value.minDate),Ml(i.value.maxDate))||((Y=a.value.years)==null?void 0:Y.includes(l.value(I))),B=Y_(n.value,V.value);return{active:ne,disabled:N,highlighted:B}})),k=(I,V)=>{b(I,V),A(V)},T=(I,V=!1)=>{if(!g.value(I,V)){const Y=V?l.value(I)+1:l.value(I)-1;b(Y,I)}},A=(I,V=!1,Y)=>{V||u("reset-flow"),Y!==void 0?f.value[I]=Y:f.value[I]=!f.value[I],f.value[I]?u("overlay-toggle",{open:!0,overlay:jn.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:jn.year}))};return{isDisabled:g,groupedYears:C,showYearPicker:f,selectYear:b,toggleYearPicker:A,handleYearSelect:k,handleYear:T}},G4=(t,e)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,defaultedRange:o,defaultedHighlight:a,propDates:l,defaultedTz:c,defaultedFilters:u,defaultedMultiDates:d}=Ut(t),f=()=>{t.isTextInputDate&&w(Ze(ke(t.startDate)),0)},{modelValue:g,year:p,month:m,calendars:v}=Hu(t,e,f),y=ve(()=>aS(t.formatLocale,t.locale,t.monthNameFormat)),x=me(null),{checkMinMaxRange:E}=bo(t),{selectYear:w,groupedYears:b,showYearPicker:C,toggleYearPicker:k,handleYearSelect:T,handleYear:A,isDisabled:I}=ES({modelValue:g,multiCalendars:n,range:o,highlight:a,calendars:v,year:p,propDates:l,month:m,filters:u,props:t,emit:e});Vt(()=>{t.startDate&&(g.value&&t.focusStartDate||!g.value)&&w(Ze(ke(t.startDate)),0)});const V=D=>D?{month:at(D),year:Ze(D)}:{month:null,year:null},Y=()=>g.value?Array.isArray(g.value)?g.value.map(D=>V(D)):V(g.value):V(),ne=(D,ee)=>{const ue=v.value[D],L=Y();return Array.isArray(L)?L.some(le=>le.year===ue?.year&&le.month===ee):ue?.year===L.year&&ee===L.month},N=(D,ee,ue)=>{var L,le;const de=Y();return Array.isArray(de)?p.value(ee)===((L=de[ue])==null?void 0:L.year)&&D===((le=de[ue])==null?void 0:le.month):!1},B=(D,ee)=>{if(o.value.enabled){const ue=Y();if(Array.isArray(g.value)&&Array.isArray(ue)){const L=N(D,ee,0)||N(D,ee,1),le=ar(os(ke()),D,p.value(ee));return Ef(g.value,x.value,le)&&!L}return!1}return!1},R=ve(()=>D=>Pl(y.value,ee=>{var ue;const L=ne(D,ee.value),le=uu(ee.value,dS(p.value(D),l.value.minDate),hS(p.value(D),l.value.maxDate))||y4(l.value.disabledDates,p.value(D)).includes(ee.value)||((ue=u.value.months)==null?void 0:ue.includes(ee.value)),de=B(ee.value,D),xe=_S(a.value,ee.value,p.value(D));return{active:L,disabled:le,isBetween:de,highlighted:xe}})),W=(D,ee)=>ar(os(ke()),D,p.value(ee)),X=(D,ee)=>{const ue=g.value?g.value:os(new Date);g.value=ar(ue,D,p.value(ee)),e("auto-apply"),e("update-flow-step")},J=(D,ee)=>{const ue=W(D,ee);o.value.fixedEnd||o.value.fixedStart?g.value=xS(ue,g,e,o):g.value?E(ue,g.value)&&(g.value=j_(g,W(D,ee),e)):g.value=[W(D,ee)],Rn().then(()=>{kf(g.value,e,t.autoApply,t.modelAuto)})},H=(D,ee)=>{H_(W(D,ee),g,d.value.limit),e("auto-apply",!0)},ce=(D,ee)=>(v.value[ee].month=D,te(ee,v.value[ee].year,D),d.value.enabled?H(D,ee):o.value.enabled?J(D,ee):X(D,ee)),ie=(D,ee)=>{w(D,ee),te(ee,D,null)},te=(D,ee,ue)=>{let L=ue;if(!L&&L!==0){const le=Y();L=Array.isArray(le)?le[D].month:le.month}e("update-month-year",{instance:D,year:ee,month:L})};return{groupedMonths:R,groupedYears:b,year:p,isDisabled:I,defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,showYearPicker:C,modelValue:g,presetDate:(D,ee)=>{wS({value:D,modelValue:g,range:o.value.enabled,timezone:ee?void 0:c.value.timezone}),e("auto-apply")},setHoverDate:(D,ee)=>{x.value=W(D,ee)},selectMonth:ce,selectYear:ie,toggleYearPicker:k,handleYearSelect:T,handleYear:A,getModelMonthYear:Y}},X4=fn({compatConfig:{MODE:3},__name:"MonthPicker",props:{..._s},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=va(),r=Pi(s,"yearMode"),o=t;Vt(()=>{o.shadow||i("mount",null)});const{groupedMonths:a,groupedYears:l,year:c,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:f,showYearPicker:g,modelValue:p,presetDate:m,setHoverDate:v,selectMonth:y,selectYear:x,toggleYearPicker:E,handleYearSelect:w,handleYear:b,getModelMonthYear:C}=G4(o,i);return e({getSidebarProps:()=>({modelValue:p,year:c,getModelMonthYear:C,selectMonth:y,selectYear:x,handleYear:b}),presetDate:m,toggleYearPicker:k=>E(0,k)}),(k,T)=>(P(),Ce(Sf,{"multi-calendars":Z(d).count,collapse:k.collapse,stretch:""},{default:Pe(({instance:A})=>[k.$slots["top-extra"]?Fe(k.$slots,"top-extra",{key:0,value:k.internalModelValue}):se("",!0),k.$slots["month-year"]?Fe(k.$slots,"month-year",In(xn({key:1},{year:Z(c),months:Z(a)(A),years:Z(l)(A),selectMonth:Z(y),selectYear:Z(x),instance:A}))):(P(),Ce(zu,{key:2,items:Z(a)(A),"arrow-navigation":k.arrowNavigation,"is-last":k.autoApply&&!Z(f).keepActionRow,"esc-close":k.escClose,height:Z(f).modeHeight,config:k.config,"no-overlay-focus":!!(k.noOverlayFocus||k.textInput),"use-relative":"",type:"month",onSelected:I=>Z(y)(I,A),onHoverValue:I=>Z(v)(I,A)},Xn({header:Pe(()=>[$(bS,xn(k.$props,{items:Z(l)(A),instance:A,"show-year-picker":Z(g)[A],year:Z(c)(A),"is-disabled":I=>Z(u)(A,I),onHandleYear:I=>Z(b)(A,I),onYearSelect:I=>Z(w)(I,A),onToggleYearPicker:I=>Z(E)(A,I?.flow,I?.show)}),Xn({_:2},[Ge(Z(r),(I,V)=>({name:I,fn:Pe(Y=>[Fe(k.$slots,I,In(ii(Y)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[k.$slots["month-overlay-value"]?{name:"item",fn:Pe(({item:I})=>[Fe(k.$slots,"month-overlay-value",{text:I.text,value:I.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),q4=(t,e)=>{const n=()=>{t.isTextInputDate&&(u.value=Ze(ke(t.startDate)))},{modelValue:i}=Hu(t,e,n),s=me(null),{defaultedHighlight:r,defaultedMultiDates:o,defaultedFilters:a,defaultedRange:l,propDates:c}=Ut(t),u=me();Vt(()=>{t.startDate&&(i.value&&t.focusStartDate||!i.value)&&(u.value=Ze(ke(t.startDate)))});const d=m=>Array.isArray(i.value)?i.value.some(v=>Ze(v)===m):i.value?Ze(i.value)===m:!1,f=m=>l.value.enabled&&Array.isArray(i.value)?Ef(i.value,s.value,p(m)):!1,g=ve(()=>Pl(V_(t.yearRange,t.locale,t.reverseYears),m=>{const v=d(m.value),y=uu(m.value,Ml(c.value.minDate),Ml(c.value.maxDate))||a.value.years.includes(m.value),x=f(m.value)&&!v,E=Y_(r.value,m.value);return{active:v,disabled:y,isBetween:x,highlighted:E}})),p=m=>As(os(lu(new Date)),m);return{groupedYears:g,modelValue:i,focusYear:u,setHoverValue:m=>{s.value=As(os(new Date),m)},selectYear:m=>{var v;if(e("update-month-year",{instance:0,year:m}),o.value.enabled)return i.value?Array.isArray(i.value)&&(((v=i.value)==null?void 0:v.map(y=>Ze(y))).includes(m)?i.value=i.value.filter(y=>Ze(y)!==m):i.value.push(As(ai(ke()),m))):i.value=[As(ai(lu(ke())),m)],e("auto-apply",!0);l.value.enabled?(i.value=j_(i,p(m),e),Rn().then(()=>{kf(i.value,e,t.autoApply,t.modelAuto)})):(i.value=p(m),e("auto-apply"))}}},Z4=fn({compatConfig:{MODE:3},__name:"YearPicker",props:{..._s},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(t,{expose:e,emit:n}){const i=n,s=t,{groupedYears:r,modelValue:o,focusYear:a,selectYear:l,setHoverValue:c}=q4(s,i),{defaultedConfig:u}=Ut(s);return e({getSidebarProps:()=>({modelValue:o,selectYear:l})}),(d,f)=>(P(),F("div",null,[d.$slots["top-extra"]?Fe(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):se("",!0),d.$slots["month-year"]?Fe(d.$slots,"month-year",In(xn({key:1},{years:Z(r),selectYear:Z(l)}))):(P(),Ce(zu,{key:2,items:Z(r),"is-last":d.autoApply&&!Z(u).keepActionRow,height:Z(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":Z(a),type:"year","use-relative":"",onSelected:Z(l),onHoverValue:Z(c)},Xn({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:Pe(({item:g})=>[Fe(d.$slots,"year-overlay-value",{text:g.text,value:g.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),J4={key:0,class:"dp__time_input"},Q4=["data-test","aria-label","onKeydown","onClick","onMousedown"],eB=["aria-label","disabled","data-test","onKeydown","onClick"],tB=["data-test","aria-label","onKeydown","onClick","onMousedown"],nB={key:0},iB=["aria-label"],sB=fn({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},..._s},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(t,{expose:e,emit:n}){const i=n,s=t,{setTimePickerElements:r,setTimePickerBackRef:o}=yo(),{defaultedAriaLabels:a,defaultedTransitions:l,defaultedFilters:c,defaultedConfig:u,defaultedRange:d}=Ut(s),{transitionName:f,showTransition:g}=Yu(l),p=Ei({hours:!1,minutes:!1,seconds:!1}),m=me("AM"),v=me(null),y=me([]),x=me(),E=me(!1);Vt(()=>{i("mounted")});const w=S=>Dt(new Date,{hours:S.hours,minutes:S.minutes,seconds:s.enableSeconds?S.seconds:0,milliseconds:0}),b=ve(()=>S=>W(S,s[S])||k(S,s[S])),C=ve(()=>({hours:s.hours,minutes:s.minutes,seconds:s.seconds})),k=(S,O)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!s.validateTime(S,O):!1,T=(S,O)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const K=O?+s[`${S}Increment`]:-+s[`${S}Increment`],U=s[S]+K;return!s.validateTime(S,U)}return!1},A=ve(()=>S=>!ie(+s[S]+ +s[`${S}Increment`],S)||T(S,!0)),I=ve(()=>S=>!ie(+s[S]-+s[`${S}Increment`],S)||T(S,!1)),V=(S,O)=>BC(Dt(ke(),S),O),Y=(S,O)=>t4(Dt(ke(),S),O),ne=ve(()=>({dp__time_col:!0,dp__time_col_block:!s.timePickerInline,dp__time_col_reg_block:!s.enableSeconds&&s.is24&&!s.timePickerInline,dp__time_col_reg_inline:!s.enableSeconds&&s.is24&&s.timePickerInline,dp__time_col_reg_with_button:!s.enableSeconds&&!s.is24,dp__time_col_sec:s.enableSeconds&&s.is24,dp__time_col_sec_with_button:s.enableSeconds&&!s.is24})),N=ve(()=>{const S=[{type:"hours"}];return s.enableMinutes&&S.push({type:"",separator:!0},{type:"minutes"}),s.enableSeconds&&S.push({type:"",separator:!0},{type:"seconds"}),S}),B=ve(()=>N.value.filter(S=>!S.separator)),R=ve(()=>S=>{if(S==="hours"){const O=le(+s.hours);return{text:O<10?`0${O}`:`${O}`,value:O}}return{text:s[S]<10?`0${s[S]}`:`${s[S]}`,value:s[S]}}),W=(S,O)=>{var K;if(!s.disabledTimesConfig)return!1;const U=s.disabledTimesConfig(s.order,S==="hours"?O:void 0);return U[S]?!!((K=U[S])!=null&&K.includes(O)):!0},X=(S,O)=>O!=="hours"||m.value==="AM"?S:S+12,J=S=>{const O=s.is24?24:12,K=S==="hours"?O:60,U=+s[`${S}GridIncrement`],oe=S==="hours"&&!s.is24?U:0,j=[];for(let re=oe;re({active:!1,disabled:c.value.times[S].includes(re.value)||!ie(re.value,S)||W(S,re.value)||k(S,re.value)}))},H=S=>S>=0?S:59,ce=S=>S>=0?S:23,ie=(S,O)=>{const K=s.minTime?w(Og(s.minTime)):null,U=s.maxTime?w(Og(s.maxTime)):null,oe=w(Og(C.value,O,O==="minutes"||O==="seconds"?H(S):ce(S)));return K&&U?(cu(oe,U)||tl(oe,U))&&(Tl(oe,K)||tl(oe,K)):K?Tl(oe,K)||tl(oe,K):U?cu(oe,U)||tl(oe,U):!0},te=S=>s[`no${S[0].toUpperCase()+S.slice(1)}Overlay`],D=S=>{te(S)||(p[S]=!p[S],p[S]?(E.value=!0,i("overlay-opened",S)):(E.value=!1,i("overlay-closed",S)))},ee=S=>S==="hours"?vr:S==="minutes"?ao:kl,ue=()=>{x.value&&clearTimeout(x.value)},L=(S,O=!0,K)=>{const U=O?V:Y,oe=O?+s[`${S}Increment`]:-+s[`${S}Increment`];ie(+s[S]+oe,S)&&i(`update:${S}`,ee(S)(U({[S]:+s[S]},{[S]:+s[`${S}Increment`]}))),!(K!=null&&K.keyboard)&&u.value.timeArrowHoldThreshold&&(x.value=setTimeout(()=>{L(S,O)},u.value.timeArrowHoldThreshold))},le=S=>s.is24?S:(S>=12?m.value="PM":m.value="AM",a4(S)),de=()=>{m.value==="PM"?(m.value="AM",i("update:hours",s.hours-12)):(m.value="PM",i("update:hours",s.hours+12)),i("am-pm-change",m.value)},xe=S=>{p[S]=!0},z=(S,O,K)=>{if(S&&s.arrowNavigation){Array.isArray(y.value[O])?y.value[O][K]=S:y.value[O]=[S];const U=y.value.reduce((oe,j)=>j.map((re,Q)=>[...oe[Q]||[],j[Q]]),[]);o(s.closeTimePickerBtn),v.value&&(U[1]=U[1].concat(v.value)),r(U,s.order)}},fe=(S,O)=>(D(S),i(`update:${S}`,O));return e({openChildCmp:xe}),(S,O)=>{var K;return S.disabled?se("",!0):(P(),F("div",J4,[(P(!0),F(Ie,null,Ge(N.value,(U,oe)=>{var j,re,Q;return P(),F("div",{key:oe,class:Ee(ne.value)},[U.separator?(P(),F(Ie,{key:0},[E.value?se("",!0):(P(),F(Ie,{key:0},[Be(":")],64))],64)):(P(),F(Ie,{key:1},[h("button",{ref_for:!0,ref:ge=>z(ge,oe,0),type:"button",class:Ee({dp__btn:!0,dp__inc_dec_button:!S.timePickerInline,dp__inc_dec_button_inline:S.timePickerInline,dp__tp_inline_btn_top:S.timePickerInline,dp__inc_dec_button_disabled:A.value(U.type),"dp--hidden-el":E.value}),"data-test":`${U.type}-time-inc-btn-${s.order}`,"aria-label":(j=Z(a))==null?void 0:j.incrementValue(U.type),tabindex:"0",onKeydown:ge=>Z(si)(ge,()=>L(U.type,!0,{keyboard:!0}),!0),onClick:ge=>Z(u).timeArrowHoldThreshold?void 0:L(U.type,!0),onMousedown:ge=>Z(u).timeArrowHoldThreshold?L(U.type,!0):void 0,onMouseup:ue},[s.timePickerInline?(P(),F(Ie,{key:1},[S.$slots["tp-inline-arrow-up"]?Fe(S.$slots,"tp-inline-arrow-up",{key:0}):(P(),F(Ie,{key:1},[O[2]||(O[2]=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[3]||(O[3]=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(P(),F(Ie,{key:0},[S.$slots["arrow-up"]?Fe(S.$slots,"arrow-up",{key:0}):se("",!0),S.$slots["arrow-up"]?se("",!0):(P(),Ce(Z(N_),{key:1}))],64))],42,Q4),h("button",{ref_for:!0,ref:ge=>z(ge,oe,1),type:"button","aria-label":`${R.value(U.type).text}-${(re=Z(a))==null?void 0:re.openTpOverlay(U.type)}`,class:Ee({dp__time_display:!0,dp__time_display_block:!S.timePickerInline,dp__time_display_inline:S.timePickerInline,"dp--time-invalid":b.value(U.type),"dp--time-overlay-btn":!b.value(U.type),"dp--hidden-el":E.value}),disabled:te(U.type),tabindex:"0","data-test":`${U.type}-toggle-overlay-btn-${s.order}`,onKeydown:ge=>Z(si)(ge,()=>D(U.type),!0),onClick:ge=>D(U.type)},[S.$slots[U.type]?Fe(S.$slots,U.type,{key:0,text:R.value(U.type).text,value:R.value(U.type).value}):se("",!0),S.$slots[U.type]?se("",!0):(P(),F(Ie,{key:1},[Be(pe(R.value(U.type).text),1)],64))],42,eB),h("button",{ref_for:!0,ref:ge=>z(ge,oe,2),type:"button",class:Ee({dp__btn:!0,dp__inc_dec_button:!S.timePickerInline,dp__inc_dec_button_inline:S.timePickerInline,dp__tp_inline_btn_bottom:S.timePickerInline,dp__inc_dec_button_disabled:I.value(U.type),"dp--hidden-el":E.value}),"data-test":`${U.type}-time-dec-btn-${s.order}`,"aria-label":(Q=Z(a))==null?void 0:Q.decrementValue(U.type),tabindex:"0",onKeydown:ge=>Z(si)(ge,()=>L(U.type,!1,{keyboard:!0}),!0),onClick:ge=>Z(u).timeArrowHoldThreshold?void 0:L(U.type,!1),onMousedown:ge=>Z(u).timeArrowHoldThreshold?L(U.type,!1):void 0,onMouseup:ue},[s.timePickerInline?(P(),F(Ie,{key:1},[S.$slots["tp-inline-arrow-down"]?Fe(S.$slots,"tp-inline-arrow-down",{key:0}):(P(),F(Ie,{key:1},[O[4]||(O[4]=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[5]||(O[5]=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(P(),F(Ie,{key:0},[S.$slots["arrow-down"]?Fe(S.$slots,"arrow-down",{key:0}):se("",!0),S.$slots["arrow-down"]?se("",!0):(P(),Ce(Z(F_),{key:1}))],64))],42,tB)],64))],2)}),128)),S.is24?se("",!0):(P(),F("div",nB,[S.$slots["am-pm-button"]?Fe(S.$slots,"am-pm-button",{key:0,toggle:de,value:m.value}):se("",!0),S.$slots["am-pm-button"]?se("",!0):(P(),F("button",{key:1,ref_key:"amPmButton",ref:v,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(K=Z(a))==null?void 0:K.amPmButton,tabindex:"0",onClick:de,onKeydown:O[0]||(O[0]=U=>Z(si)(U,()=>de(),!0))},pe(m.value),41,iB))])),(P(!0),F(Ie,null,Ge(B.value,(U,oe)=>(P(),Ce(vt,{key:oe,name:Z(f)(p[U.type]),css:Z(g)},{default:Pe(()=>{var j,re;return[p[U.type]?(P(),Ce(zu,{key:0,items:J(U.type),"is-last":S.autoApply&&!Z(u).keepActionRow,"esc-close":S.escClose,type:U.type,"text-input":S.textInput,config:S.config,"arrow-navigation":S.arrowNavigation,"aria-labels":S.ariaLabels,"overlay-label":(re=(j=Z(a)).timeOverlay)==null?void 0:re.call(j,U.type),onSelected:Q=>fe(U.type,Q),onToggle:Q=>D(U.type),onResetFlow:O[1]||(O[1]=Q=>S.$emit("reset-flow"))},Xn({"button-icon":Pe(()=>[S.$slots["clock-icon"]?Fe(S.$slots,"clock-icon",{key:0}):se("",!0),S.$slots["clock-icon"]?se("",!0):(P(),Ce(_a(S.timePickerInline?Z(Gl):Z(O_)),{key:1}))]),_:2},[S.$slots[`${U.type}-overlay-value`]?{name:"item",fn:Pe(({item:Q})=>[Fe(S.$slots,`${U.type}-overlay-value`,{text:Q.text,value:Q.value})]),key:"0"}:void 0,S.$slots[`${U.type}-overlay-header`]?{name:"header",fn:Pe(()=>[Fe(S.$slots,`${U.type}-overlay-header`,{toggle:()=>D(U.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):se("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),rB={class:"dp--tp-wrap"},oB=["aria-label","tabindex"],aB=["role","aria-label","tabindex"],lB=["aria-label"],CS=fn({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},..._s},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(t,{expose:e,emit:n}){const i=n,s=t,{buildMatrix:r,setTimePicker:o}=yo(),a=va(),{defaultedTransitions:l,defaultedAriaLabels:c,defaultedTextInput:u,defaultedConfig:d,defaultedRange:f}=Ut(s),{transitionName:g,showTransition:p}=Yu(l),{hideNavigationButtons:m}=Tf(),v=me(null),y=me(null),x=me([]),E=me(null),w=me(!1);Vt(()=>{i("mount"),!s.timePicker&&s.arrowNavigation?r([bn(v.value)],"time"):o(!0,s.timePicker)});const b=ve(()=>f.value.enabled&&s.modelAuto?lS(s.internalModelValue):!0),C=me(!1),k=J=>({hours:Array.isArray(s.hours)?s.hours[J]:s.hours,minutes:Array.isArray(s.minutes)?s.minutes[J]:s.minutes,seconds:Array.isArray(s.seconds)?s.seconds[J]:s.seconds}),T=ve(()=>{const J=[];if(f.value.enabled)for(let H=0;H<2;H++)J.push(k(H));else J.push(k(0));return J}),A=(J,H=!1,ce="")=>{H||i("reset-flow"),C.value=J,i(J?"overlay-opened":"overlay-closed",jn.time),s.arrowNavigation&&o(J),Rn(()=>{ce!==""&&x.value[0]&&x.value[0].openChildCmp(ce)})},I=ve(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:s.autoApply&&!d.value.keepActionRow})),V=Pi(a,"timePicker"),Y=(J,H,ce)=>f.value.enabled?H===0?[J,T.value[1][ce]]:[T.value[0][ce],J]:J,ne=J=>{i("update:hours",J)},N=J=>{i("update:minutes",J)},B=J=>{i("update:seconds",J)},R=()=>{if(E.value&&!u.value.enabled&&!s.noOverlayFocus){const J=cS(E.value);J&&J.focus({preventScroll:!0})}},W=J=>{w.value=!1,i("overlay-closed",J)},X=J=>{w.value=!0,i("overlay-opened",J)};return e({toggleTimePicker:A}),(J,H)=>{var ce;return P(),F("div",rB,[!J.timePicker&&!J.timePickerInline?Re((P(),F("button",{key:0,ref_key:"openTimePickerBtn",ref:v,type:"button",class:Ee({...I.value,"dp--hidden-el":C.value}),"aria-label":(ce=Z(c))==null?void 0:ce.openTimePicker,tabindex:J.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:H[0]||(H[0]=ie=>Z(si)(ie,()=>A(!0))),onClick:H[1]||(H[1]=ie=>A(!0))},[J.$slots["clock-icon"]?Fe(J.$slots,"clock-icon",{key:0}):se("",!0),J.$slots["clock-icon"]?se("",!0):(P(),Ce(Z(O_),{key:1}))],42,oB)),[[ah,!Z(m)(J.hideNavigation,"time")]]):se("",!0),$(vt,{name:Z(g)(C.value),css:Z(p)&&!J.timePickerInline},{default:Pe(()=>{var ie,te;return[C.value||J.timePicker||J.timePickerInline?(P(),F("div",{key:0,ref_key:"overlayRef",ref:E,role:J.timePickerInline?void 0:"dialog",class:Ee({dp__overlay:!J.timePickerInline,"dp--overlay-absolute":!s.timePicker&&!J.timePickerInline,"dp--overlay-relative":s.timePicker}),style:Mn(J.timePicker?{height:`${Z(d).modeHeight}px`}:void 0),"aria-label":(ie=Z(c))==null?void 0:ie.timePicker,tabindex:J.timePickerInline?void 0:0},[h("div",{class:Ee(J.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[J.$slots["time-picker-overlay"]?Fe(J.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:ne,setMinutes:N,setSeconds:B}):se("",!0),J.$slots["time-picker-overlay"]?se("",!0):(P(),F("div",{key:1,class:Ee(J.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(P(!0),F(Ie,null,Ge(T.value,(D,ee)=>Re((P(),Ce(sB,xn({key:ee,ref_for:!0},{...J.$props,order:ee,hours:D.hours,minutes:D.minutes,seconds:D.seconds,closeTimePickerBtn:y.value,disabledTimesConfig:t.disabledTimesConfig,disabled:ee===0?Z(f).fixedStart:Z(f).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:x,"validate-time":(ue,L)=>t.validateTime(ue,Y(L,ee,ue)),"onUpdate:hours":ue=>ne(Y(ue,ee,"hours")),"onUpdate:minutes":ue=>N(Y(ue,ee,"minutes")),"onUpdate:seconds":ue=>B(Y(ue,ee,"seconds")),onMounted:R,onOverlayClosed:W,onOverlayOpened:X,onAmPmChange:H[2]||(H[2]=ue=>J.$emit("am-pm-change",ue))}),Xn({_:2},[Ge(Z(V),(ue,L)=>({name:ue,fn:Pe(le=>[Fe(J.$slots,ue,xn({ref_for:!0},le))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[ah,ee===0?!0:b.value]])),128))],2)),!J.timePicker&&!J.timePickerInline?Re((P(),F("button",{key:2,ref_key:"closeTimePickerBtn",ref:y,type:"button",class:Ee({...I.value,"dp--hidden-el":w.value}),"aria-label":(te=Z(c))==null?void 0:te.closeTimePicker,tabindex:"0",onKeydown:H[3]||(H[3]=D=>Z(si)(D,()=>A(!1))),onClick:H[4]||(H[4]=D=>A(!1))},[J.$slots["calendar-icon"]?Fe(J.$slots,"calendar-icon",{key:0}):se("",!0),J.$slots["calendar-icon"]?se("",!0):(P(),Ce(Z(Gl),{key:1}))],42,lB)),[[ah,!Z(m)(J.hideNavigation,"time")]]):se("",!0)],2)],14,aB)):se("",!0)]}),_:3},8,["name","css"])])}}}),SS=(t,e,n,i)=>{const{defaultedRange:s}=Ut(t),r=(E,w)=>Array.isArray(e[E])?e[E][w]:e[E],o=E=>t.enableSeconds?Array.isArray(e.seconds)?e.seconds[E]:e.seconds:0,a=(E,w)=>E?w!==void 0?to(E,r("hours",w),r("minutes",w),o(w)):to(E,e.hours,e.minutes,o()):sS(ke(),o(w)),l=(E,w)=>{e[E]=w},c=ve(()=>t.modelAuto&&s.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:s.value.enabled),u=(E,w)=>{const b=Object.fromEntries(Object.keys(e).map(C=>C===E?[C,w]:[C,e[C]].slice()));if(c.value&&!s.value.disableTimeRangeValidation){const C=T=>n.value?to(n.value[T],b.hours[T],b.minutes[T],b.seconds[T]):null,k=T=>iS(n.value[T],0);return!(ct(C(0),C(1))&&(Tl(C(0),k(1))||cu(C(1),k(0))))}return!0},d=(E,w)=>{u(E,w)&&(l(E,w),i&&i())},f=E=>{d("hours",E)},g=E=>{d("minutes",E)},p=E=>{d("seconds",E)},m=(E,w,b,C)=>{w&&f(E),!w&&!b&&g(E),b&&p(E),n.value&&C(n.value)},v=E=>{if(E){const w=Array.isArray(E),b=w?[+E[0].hours,+E[1].hours]:+E.hours,C=w?[+E[0].minutes,+E[1].minutes]:+E.minutes,k=w?[+E[0].seconds,+E[1].seconds]:+E.seconds;l("hours",b),l("minutes",C),t.enableSeconds&&l("seconds",k)}},y=(E,w)=>{const b={hours:Array.isArray(e.hours)?e.hours[E]:e.hours,disabledArr:[]};return(w||w===0)&&(b.hours=w),Array.isArray(t.disabledTimes)&&(b.disabledArr=s.value.enabled&&Array.isArray(t.disabledTimes[E])?t.disabledTimes[E]:t.disabledTimes),b},x=ve(()=>(E,w)=>{var b;if(Array.isArray(t.disabledTimes)){const{disabledArr:C,hours:k}=y(E,w),T=C.filter(A=>+A.hours===k);return((b=T[0])==null?void 0:b.minutes)==="*"?{hours:[k],minutes:void 0,seconds:void 0}:{hours:[],minutes:T?.map(A=>+A.minutes)??[],seconds:T?.map(A=>A.seconds?+A.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:f,updateMinutes:g,updateSeconds:p,getSetDateTime:a,updateTimeValues:m,getSecondsValue:o,assignStartTime:v,validateTime:u,disabledTimesConfig:x}},cB=(t,e)=>{const n=()=>{t.isTextInputDate&&w()},{modelValue:i,time:s}=Hu(t,e,n),{defaultedStartTime:r,defaultedRange:o,defaultedTz:a}=Ut(t),{updateTimeValues:l,getSetDateTime:c,setTime:u,assignStartTime:d,disabledTimesConfig:f,validateTime:g}=SS(t,s,i,p);function p(){e("update-flow-step")}const m=C=>{const{hours:k,minutes:T,seconds:A}=C;return{hours:+k,minutes:+T,seconds:A?+A:0}},v=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const k=m(t.startTime[0]),T=m(t.startTime[1]);return[Dt(ke(),k),Dt(ke(),T)]}const C=m(t.startTime);return Dt(ke(),C)}return o.value.enabled?[null,null]:null},y=()=>{if(o.value.enabled){const[C,k]=v();i.value=[xi(c(C,0),a.value.timezone),xi(c(k,1),a.value.timezone)]}else i.value=xi(c(v()),a.value.timezone)},x=C=>Array.isArray(C)?[sa(ke(C[0])),sa(ke(C[1]))]:[sa(C??ke())],E=(C,k,T)=>{u("hours",C),u("minutes",k),u("seconds",t.enableSeconds?T:0)},w=()=>{const[C,k]=x(i.value);return o.value.enabled?E([C.hours,k.hours],[C.minutes,k.minutes],[C.seconds,k.seconds]):E(C.hours,C.minutes,C.seconds)};Vt(()=>{if(!t.shadow)return d(r.value),i.value?w():y()});const b=()=>{Array.isArray(i.value)?i.value=i.value.map((C,k)=>C&&c(C,k)):i.value=c(i.value),e("time-update")};return{modelValue:i,time:s,disabledTimesConfig:f,updateTime:(C,k=!0,T=!1)=>{l(C,k,T,b)},validateTime:g}},uB=fn({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{..._s},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=va(),o=Pi(r,"timePicker"),a=me(null),{time:l,modelValue:c,disabledTimesConfig:u,updateTime:d,validateTime:f}=cB(s,i);return Vt(()=>{s.shadow||i("mount",null)}),e({getSidebarProps:()=>({modelValue:c,time:l,updateTime:d}),toggleTimePicker:(g,p=!1,m="")=>{var v;(v=a.value)==null||v.toggleTimePicker(g,p,m)}}),(g,p)=>(P(),Ce(Sf,{"multi-calendars":0,stretch:""},{default:Pe(()=>[$(CS,xn({ref_key:"tpRef",ref:a},g.$props,{hours:Z(l).hours,minutes:Z(l).minutes,seconds:Z(l).seconds,"internal-model-value":g.internalModelValue,"disabled-times-config":Z(u),"validate-time":Z(f),"onUpdate:hours":p[0]||(p[0]=m=>Z(d)(m)),"onUpdate:minutes":p[1]||(p[1]=m=>Z(d)(m,!1)),"onUpdate:seconds":p[2]||(p[2]=m=>Z(d)(m,!1,!0)),onAmPmChange:p[3]||(p[3]=m=>g.$emit("am-pm-change",m)),onResetFlow:p[4]||(p[4]=m=>g.$emit("reset-flow")),onOverlayClosed:p[5]||(p[5]=m=>g.$emit("overlay-toggle",{open:!1,overlay:m})),onOverlayOpened:p[6]||(p[6]=m=>g.$emit("overlay-toggle",{open:!0,overlay:m}))}),Xn({_:2},[Ge(Z(o),(m,v)=>({name:m,fn:Pe(y=>[Fe(g.$slots,m,In(ii(y)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),dB={class:"dp--header-wrap"},hB={key:0,class:"dp__month_year_wrap"},fB={key:0},gB={class:"dp__month_year_wrap"},pB=["data-dp-element","aria-label","data-test","onClick","onKeydown"],mB=fn({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},..._s},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(t,{expose:e,emit:n}){const i=n,s=t,{defaultedTransitions:r,defaultedAriaLabels:o,defaultedMultiCalendars:a,defaultedFilters:l,defaultedConfig:c,defaultedHighlight:u,propDates:d,defaultedUI:f}=Ut(s),{transitionName:g,showTransition:p}=Yu(r),{buildMatrix:m}=yo(),{handleMonthYearChange:v,isDisabled:y,updateMonthYear:x}=F4(s,i),{showLeftIcon:E,showRightIcon:w}=Tf(),b=me(!1),C=me(!1),k=me(!1),T=me([null,null,null,null]);Vt(()=>{i("mount")});const A=te=>({get:()=>s[te],set:D=>{const ee=te===ts.month?ts.year:ts.month;i("update-month-year",{[te]:D,[ee]:s[ee]}),te===ts.month?W(!0):X(!0)}}),I=ve(A(ts.month)),V=ve(A(ts.year)),Y=ve(()=>te=>({month:s.month,year:s.year,items:te===ts.month?s.months:s.years,instance:s.instance,updateMonthYear:x,toggle:te===ts.month?W:X})),ne=ve(()=>s.months.find(D=>D.value===s.month)||{text:"",value:0}),N=ve(()=>Pl(s.months,te=>{const D=s.month===te.value,ee=uu(te.value,dS(s.year,d.value.minDate),hS(s.year,d.value.maxDate))||l.value.months.includes(te.value),ue=_S(u.value,te.value,s.year);return{active:D,disabled:ee,highlighted:ue}})),B=ve(()=>Pl(s.years,te=>{const D=s.year===te.value,ee=uu(te.value,Ml(d.value.minDate),Ml(d.value.maxDate))||l.value.years.includes(te.value),ue=Y_(u.value,te.value);return{active:D,disabled:ee,highlighted:ue}})),R=(te,D,ee)=>{ee!==void 0?te.value=ee:te.value=!te.value,te.value?(k.value=!0,i("overlay-opened",D)):(k.value=!1,i("overlay-closed",D))},W=(te=!1,D)=>{J(te),R(b,jn.month,D)},X=(te=!1,D)=>{J(te),R(C,jn.year,D)},J=te=>{te||i("reset-flow")},H=(te,D)=>{s.arrowNavigation&&(T.value[D]=bn(te),m(T.value,"monthYear"))},ce=ve(()=>{var te,D,ee,ue,L,le;return[{type:ts.month,index:1,toggle:W,modelValue:I.value,updateModelValue:de=>I.value=de,text:ne.value.text,showSelectionGrid:b.value,items:N.value,ariaLabel:(te=o.value)==null?void 0:te.openMonthsOverlay,overlayLabel:((ee=(D=o.value).monthPicker)==null?void 0:ee.call(D,!0))??void 0},{type:ts.year,index:2,toggle:X,modelValue:V.value,updateModelValue:de=>V.value=de,text:uS(s.year,s.locale),showSelectionGrid:C.value,items:B.value,ariaLabel:(ue=o.value)==null?void 0:ue.openYearsOverlay,overlayLabel:((le=(L=o.value).yearPicker)==null?void 0:le.call(L,!0))??void 0}]}),ie=ve(()=>s.disableYearSelect?[ce.value[0]]:s.yearFirst?[...ce.value].reverse():ce.value);return e({toggleMonthPicker:W,toggleYearPicker:X,handleMonthYearChange:v}),(te,D)=>{var ee,ue,L,le,de,xe;return P(),F("div",dB,[te.$slots["month-year"]?(P(),F("div",hB,[Fe(te.$slots,"month-year",In(ii({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:Z(x),handleMonthYearChange:Z(v),instance:t.instance})))])):(P(),F(Ie,{key:1},[te.$slots["top-extra"]?(P(),F("div",fB,[Fe(te.$slots,"top-extra",{value:te.internalModelValue})])):se("",!0),h("div",gB,[Z(E)(Z(a),t.instance)&&!te.vertical?(P(),Ce(jc,{key:0,"aria-label":(ee=Z(o))==null?void 0:ee.prevMonth,disabled:Z(y)(!1),class:Ee((ue=Z(f))==null?void 0:ue.navBtnPrev),"el-name":"action-prev",onActivate:D[0]||(D[0]=z=>Z(v)(!1,!0)),onSetRef:D[1]||(D[1]=z=>H(z,0))},{default:Pe(()=>[te.$slots["arrow-left"]?Fe(te.$slots,"arrow-left",{key:0}):se("",!0),te.$slots["arrow-left"]?se("",!0):(P(),Ce(Z($_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):se("",!0),h("div",{class:Ee(["dp__month_year_wrap",{dp__year_disable_select:te.disableYearSelect}])},[(P(!0),F(Ie,null,Ge(ie.value,(z,fe)=>(P(),F(Ie,{key:z.type},[h("button",{ref_for:!0,ref:S=>H(S,fe+1),type:"button","data-dp-element":`overlay-${z.type}`,class:Ee(["dp__btn dp__month_year_select",{"dp--hidden-el":k.value}]),"aria-label":`${z.text}-${z.ariaLabel}`,"data-test":`${z.type}-toggle-overlay-${t.instance}`,onClick:z.toggle,onKeydown:S=>Z(si)(S,()=>z.toggle(),!0)},[te.$slots[z.type]?Fe(te.$slots,z.type,{key:0,text:z.text,value:s[z.type]}):se("",!0),te.$slots[z.type]?se("",!0):(P(),F(Ie,{key:1},[Be(pe(z.text),1)],64))],42,pB),$(vt,{name:Z(g)(z.showSelectionGrid),css:Z(p)},{default:Pe(()=>[z.showSelectionGrid?(P(),Ce(zu,{key:0,items:z.items,"arrow-navigation":te.arrowNavigation,"hide-navigation":te.hideNavigation,"is-last":te.autoApply&&!Z(c).keepActionRow,"skip-button-ref":!1,config:te.config,type:z.type,"header-refs":[],"esc-close":te.escClose,"menu-wrap-ref":te.menuWrapRef,"text-input":te.textInput,"aria-labels":te.ariaLabels,"overlay-label":z.overlayLabel,onSelected:z.updateModelValue,onToggle:z.toggle},Xn({"button-icon":Pe(()=>[te.$slots["calendar-icon"]?Fe(te.$slots,"calendar-icon",{key:0}):se("",!0),te.$slots["calendar-icon"]?se("",!0):(P(),Ce(Z(Gl),{key:1}))]),_:2},[te.$slots[`${z.type}-overlay-value`]?{name:"item",fn:Pe(({item:S})=>[Fe(te.$slots,`${z.type}-overlay-value`,{text:S.text,value:S.value})]),key:"0"}:void 0,te.$slots[`${z.type}-overlay`]?{name:"overlay",fn:Pe(()=>[Fe(te.$slots,`${z.type}-overlay`,xn({ref_for:!0},Y.value(z.type)))]),key:"1"}:void 0,te.$slots[`${z.type}-overlay-header`]?{name:"header",fn:Pe(()=>[Fe(te.$slots,`${z.type}-overlay-header`,{toggle:z.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):se("",!0)]),_:2},1032,["name","css"])],64))),128))],2),Z(E)(Z(a),t.instance)&&te.vertical?(P(),Ce(jc,{key:1,"aria-label":(L=Z(o))==null?void 0:L.prevMonth,"el-name":"action-prev",disabled:Z(y)(!1),class:Ee((le=Z(f))==null?void 0:le.navBtnPrev),onActivate:D[2]||(D[2]=z=>Z(v)(!1,!0))},{default:Pe(()=>[te.$slots["arrow-up"]?Fe(te.$slots,"arrow-up",{key:0}):se("",!0),te.$slots["arrow-up"]?se("",!0):(P(),Ce(Z(N_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):se("",!0),Z(w)(Z(a),t.instance)?(P(),Ce(jc,{key:2,ref:"rightIcon","el-name":"action-next",disabled:Z(y)(!0),"aria-label":(de=Z(o))==null?void 0:de.nextMonth,class:Ee((xe=Z(f))==null?void 0:xe.navBtnNext),onActivate:D[3]||(D[3]=z=>Z(v)(!0,!0)),onSetRef:D[4]||(D[4]=z=>H(z,te.disableYearSelect?2:3))},{default:Pe(()=>[te.$slots[te.vertical?"arrow-down":"arrow-right"]?Fe(te.$slots,te.vertical?"arrow-down":"arrow-right",{key:0}):se("",!0),te.$slots[te.vertical?"arrow-down":"arrow-right"]?se("",!0):(P(),Ce(_a(te.vertical?Z(F_):Z(L_)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):se("",!0)])],64))])}}}),_B={class:"dp__calendar_header",role:"row"},vB={key:0,class:"dp__calendar_header_item",role:"gridcell"},yB=["aria-label"],bB={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},wB={class:"dp__cell_inner"},xB=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],EB=fn({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},..._s},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(t,{expose:e,emit:n}){const i=n,s=t,{buildMultiLevelMatrix:r}=yo(),{defaultedTransitions:o,defaultedConfig:a,defaultedAriaLabels:l,defaultedMultiCalendars:c,defaultedWeekNumbers:u,defaultedMultiDates:d,defaultedUI:f}=Ut(s),g=me(null),p=me({bottom:"",left:"",transform:""}),m=me([]),v=me(null),y=me(!0),x=me(""),E=me({startX:0,endX:0,startY:0,endY:0}),w=me([]),b=me({left:"50%"}),C=me(!1),k=ve(()=>s.calendar?s.calendar(s.mappedDates):s.mappedDates),T=ve(()=>s.dayNames?Array.isArray(s.dayNames)?s.dayNames:s.dayNames(s.locale,+s.weekStart):o4(s.formatLocale,s.locale,+s.weekStart));Vt(()=>{i("mount",{cmp:"calendar",refs:m}),a.value.noSwipe||v.value&&(v.value.addEventListener("touchstart",H,{passive:!1}),v.value.addEventListener("touchend",ce,{passive:!1}),v.value.addEventListener("touchmove",ie,{passive:!1})),s.monthChangeOnScroll&&v.value&&v.value.addEventListener("wheel",ee,{passive:!1})});const A=z=>z?s.vertical?"vNext":"next":s.vertical?"vPrevious":"previous",I=(z,fe)=>{if(s.transitions){const S=ai(ar(ke(),s.month,s.year));x.value=ln(ai(ar(ke(),z,fe)),S)?o.value[A(!0)]:o.value[A(!1)],y.value=!1,Rn(()=>{y.value=!0})}},V=ve(()=>({...f.value.calendar??{}})),Y=ve(()=>z=>{const fe=l4(z);return{dp__marker_dot:fe.type==="dot",dp__marker_line:fe.type==="line"}}),ne=ve(()=>z=>ct(z,g.value)),N=ve(()=>({dp__calendar:!0,dp__calendar_next:c.value.count>0&&s.instance!==0})),B=ve(()=>z=>s.hideOffsetDates?z.current:!0),R=async(z,fe)=>{const{width:S,height:O}=z.getBoundingClientRect();g.value=fe.value;let K={left:`${S/2}px`},U=-50;if(await Rn(),w.value[0]){const{left:oe,width:j}=w.value[0].getBoundingClientRect();oe<0&&(K={left:"0"},U=0,b.value.left=`${S/2}px`),window.innerWidth{var O,K,U;const oe=bn(m.value[fe][S]);oe&&((O=z.marker)!=null&&O.customPosition&&(U=(K=z.marker)==null?void 0:K.tooltip)!=null&&U.length?p.value=z.marker.customPosition(oe):await R(oe,z),i("tooltip-open",z.marker))},X=async(z,fe,S)=>{var O,K;if(C.value&&d.value.enabled&&d.value.dragSelect)return i("select-date",z);i("set-hover-date",z),(K=(O=z.marker)==null?void 0:O.tooltip)!=null&&K.length&&await W(z,fe,S)},J=z=>{g.value&&(g.value=null,p.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),i("tooltip-close",z.marker))},H=z=>{E.value.startX=z.changedTouches[0].screenX,E.value.startY=z.changedTouches[0].screenY},ce=z=>{E.value.endX=z.changedTouches[0].screenX,E.value.endY=z.changedTouches[0].screenY,te()},ie=z=>{s.vertical&&!s.inline&&z.preventDefault()},te=()=>{const z=s.vertical?"Y":"X";Math.abs(E.value[`start${z}`]-E.value[`end${z}`])>10&&i("handle-swipe",E.value[`start${z}`]>E.value[`end${z}`]?"right":"left")},D=(z,fe,S)=>{z&&(Array.isArray(m.value[fe])?m.value[fe][S]=z:m.value[fe]=[z]),s.arrowNavigation&&r(m.value,"calendar")},ee=z=>{s.monthChangeOnScroll&&(z.preventDefault(),i("handle-scroll",z))},ue=z=>u.value.type==="local"?I_(z.value,{weekStartsOn:+s.weekStart}):u.value.type==="iso"?P_(z.value):typeof u.value.type=="function"?u.value.type(z.value):"",L=z=>{const fe=z[0];return u.value.hideOnOffsetDates?z.some(S=>S.current)?ue(fe):"":ue(fe)},le=(z,fe,S=!0)=>{S&&b0()||!S&&!b0()||d.value.enabled||(eo(z,a.value),i("select-date",fe))},de=z=>{eo(z,a.value)},xe=z=>{d.value.enabled&&d.value.dragSelect?(C.value=!0,i("select-date",z)):d.value.enabled&&i("select-date",z)};return e({triggerTransition:I}),(z,fe)=>(P(),F("div",{class:Ee(N.value)},[h("div",{ref_key:"calendarWrapRef",ref:v,class:Ee(V.value),role:"grid"},[h("div",_B,[z.weekNumbers?(P(),F("div",vB,pe(z.weekNumName),1)):se("",!0),(P(!0),F(Ie,null,Ge(T.value,(S,O)=>{var K,U;return P(),F("div",{key:O,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(U=(K=Z(l))==null?void 0:K.weekDay)==null?void 0:U.call(K,O)},[z.$slots["calendar-header"]?Fe(z.$slots,"calendar-header",{key:0,day:S,index:O}):se("",!0),z.$slots["calendar-header"]?se("",!0):(P(),F(Ie,{key:1},[Be(pe(S),1)],64))],8,yB)}),128))]),fe[2]||(fe[2]=h("div",{class:"dp__calendar_header_separator"},null,-1)),$(vt,{name:x.value,css:!!z.transitions},{default:Pe(()=>[y.value?(P(),F("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:fe[1]||(fe[1]=S=>C.value=!1)},[(P(!0),F(Ie,null,Ge(k.value,(S,O)=>(P(),F("div",{key:O,class:"dp__calendar_row",role:"row"},[z.weekNumbers?(P(),F("div",bB,[h("div",wB,pe(L(S.days)),1)])):se("",!0),(P(!0),F(Ie,null,Ge(S.days,(K,U)=>{var oe,j,re;return P(),F("div",{id:Z(vS)(K.value),ref_for:!0,ref:Q=>D(Q,O,U),key:U+O,role:"gridcell",class:"dp__calendar_item","aria-pressed":(K.classData.dp__active_date||K.classData.dp__range_start||K.classData.dp__range_start)??void 0,"aria-disabled":K.classData.dp__cell_disabled||void 0,"aria-label":(j=(oe=Z(l))==null?void 0:oe.day)==null?void 0:j.call(oe,K),tabindex:!K.current&&z.hideOffsetDates?void 0:0,"data-test":K.value,onClick:ru(Q=>le(Q,K),["prevent"]),onTouchend:Q=>le(Q,K,!1),onKeydown:Q=>Z(si)(Q,()=>z.$emit("select-date",K)),onMouseenter:Q=>X(K,O,U),onMouseleave:Q=>J(K),onMousedown:Q=>xe(K),onMouseup:fe[0]||(fe[0]=Q=>C.value=!1)},[h("div",{class:Ee(["dp__cell_inner",K.classData])},[z.$slots.day&&B.value(K)?Fe(z.$slots,"day",{key:0,day:+K.text,date:K.value}):se("",!0),z.$slots.day?se("",!0):(P(),F(Ie,{key:1},[Be(pe(K.text),1)],64)),K.marker&&B.value(K)?(P(),F(Ie,{key:2},[z.$slots.marker?Fe(z.$slots,"marker",{key:0,marker:K.marker,day:+K.text,date:K.value}):(P(),F("div",{key:1,class:Ee(Y.value(K.marker)),style:Mn(K.marker.color?{backgroundColor:K.marker.color}:{})},null,6))],64)):se("",!0),ne.value(K.value)?(P(),F("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:w,class:"dp__marker_tooltip",style:Mn(p.value)},[(re=K.marker)!=null&&re.tooltip?(P(),F("div",{key:0,class:"dp__tooltip_content",onClick:de},[(P(!0),F(Ie,null,Ge(K.marker.tooltip,(Q,ge)=>(P(),F("div",{key:ge,class:"dp__tooltip_text"},[z.$slots["marker-tooltip"]?Fe(z.$slots,"marker-tooltip",{key:0,tooltip:Q,day:K.value}):se("",!0),z.$slots["marker-tooltip"]?se("",!0):(P(),F(Ie,{key:1},[h("div",{class:"dp__tooltip_mark",style:Mn(Q.color?{backgroundColor:Q.color}:{})},null,4),h("div",null,pe(Q.text),1)],64))]))),128)),h("div",{class:"dp__arrow_bottom_tp",style:Mn(b.value)},null,4)])):se("",!0)],4)):se("",!0)],2)],40,xB)}),128))]))),128))],32)):se("",!0)]),_:3},8,["name","css"])],2)],2))}}),S0=t=>Array.isArray(t),CB=(t,e,n,i)=>{const s=me([]),r=me(new Date),o=me(),a=()=>H(t.isTextInputDate),{modelValue:l,calendars:c,time:u,today:d}=Hu(t,e,a),{defaultedMultiCalendars:f,defaultedStartTime:g,defaultedRange:p,defaultedConfig:m,defaultedTz:v,propDates:y,defaultedMultiDates:x}=Ut(t),{validateMonthYearInRange:E,isDisabled:w,isDateRangeAllowed:b,checkMinMaxRange:C}=bo(t),{updateTimeValues:k,getSetDateTime:T,setTime:A,assignStartTime:I,validateTime:V,disabledTimesConfig:Y}=SS(t,u,l,i),ne=ve(()=>ae=>c.value[ae]?c.value[ae].month:0),N=ve(()=>ae=>c.value[ae]?c.value[ae].year:0),B=ae=>!m.value.keepViewOnOffsetClick||ae?!0:!o.value,R=(ae,Te,he,Ae=!1)=>{var Ne,Xt;B(Ae)&&(c.value[ae]||(c.value[ae]={month:0,year:0}),c.value[ae].month=y0(Te)?(Ne=c.value[ae])==null?void 0:Ne.month:Te,c.value[ae].year=y0(he)?(Xt=c.value[ae])==null?void 0:Xt.year:he)},W=()=>{t.autoApply&&e("select-date")};Vt(()=>{t.shadow||(l.value||(z(),g.value&&I(g.value)),H(!0),t.focusStartDate&&t.startDate&&z())});const X=ve(()=>{var ae;return(ae=t.flow)!=null&&ae.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),J=()=>{t.autoApply&&X.value&&e("auto-apply",t.partialFlow?t.flowStep!==t.flow.length:!1)},H=(ae=!1)=>{if(l.value)return Array.isArray(l.value)?(s.value=l.value,L(ae)):te(l.value,ae);if(f.value.count&&ae&&!t.startDate)return ie(ke(),ae)},ce=()=>Array.isArray(l.value)&&p.value.enabled?at(l.value[0])===at(l.value[1]??l.value[0]):!1,ie=(ae=new Date,Te=!1)=>{if((!f.value.count||!f.value.static||Te)&&R(0,at(ae),Ze(ae)),f.value.count&&(!f.value.solo||!l.value||ce()))for(let he=1;he{ie(ae),A("hours",vr(ae)),A("minutes",ao(ae)),A("seconds",kl(ae)),f.value.count&&Te&&xe()},D=ae=>{if(f.value.count){if(f.value.solo)return 0;const Te=at(ae[0]),he=at(ae[1]);return Math.abs(he-Te){ae[1]&&p.value.showLastInRange?ie(ae[D(ae)],Te):ie(ae[0],Te);const he=(Ae,Ne)=>[Ae(ae[0]),ae[1]?Ae(ae[1]):u[Ne][1]];A("hours",he(vr,"hours")),A("minutes",he(ao,"minutes")),A("seconds",he(kl,"seconds"))},ue=(ae,Te)=>{if((p.value.enabled||t.weekPicker)&&!x.value.enabled)return ee(ae,Te);if(x.value.enabled&&Te){const he=ae[ae.length-1];return te(he,Te)}},L=ae=>{const Te=l.value;ue(Te,ae),f.value.count&&f.value.solo&&xe()},le=(ae,Te)=>{const he=Dt(ke(),{month:ne.value(Te),year:N.value(Te)}),Ae=ae<0?ds(he,1):Al(he,1);E(at(Ae),Ze(Ae),ae<0,t.preventMinMaxNavigation)&&(R(Te,at(Ae),Ze(Ae)),e("update-month-year",{instance:Te,month:at(Ae),year:Ze(Ae)}),f.value.count&&!f.value.solo&&de(Te),n())},de=ae=>{for(let Te=ae-1;Te>=0;Te--){const he=Al(Dt(ke(),{month:ne.value(Te+1),year:N.value(Te+1)}),1);R(Te,at(he),Ze(he))}for(let Te=ae+1;Te<=f.value.count-1;Te++){const he=ds(Dt(ke(),{month:ne.value(Te-1),year:N.value(Te-1)}),1);R(Te,at(he),Ze(he))}},xe=()=>{if(Array.isArray(l.value)&&l.value.length===2){const ae=ke(ke(l.value[1]?l.value[1]:ds(l.value[0],1))),[Te,he]=[at(l.value[0]),Ze(l.value[0])],[Ae,Ne]=[at(l.value[1]),Ze(l.value[1])];(Te!==Ae||Te===Ae&&he!==Ne)&&f.value.solo&&R(1,at(ae),Ze(ae))}else l.value&&!Array.isArray(l.value)&&(R(0,at(l.value),Ze(l.value)),ie(ke()))},z=()=>{t.startDate&&(R(0,at(ke(t.startDate)),Ze(ke(t.startDate))),f.value.count&&de(0))},fe=(ae,Te)=>{if(t.monthChangeOnScroll){const he=new Date().getTime()-r.value.getTime(),Ae=Math.abs(ae.deltaY);let Ne=500;Ae>1&&(Ne=100),Ae>100&&(Ne=0),he>Ne&&(r.value=new Date,le(t.monthChangeOnScroll!=="inverse"?-ae.deltaY:ae.deltaY,Te))}},S=(ae,Te,he=!1)=>{t.monthChangeOnArrows&&t.vertical===he&&O(ae,Te)},O=(ae,Te)=>{le(ae==="right"?-1:1,Te)},K=ae=>{if(y.value.markers)return Th(ae.value,y.value.markers)},U=(ae,Te)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[ae==0,!0];case"fair":return[ae==0||Te>ae,!0];case"append":return[!1,!1];default:return[!1,!1]}},oe=(ae,Te,he,Ae)=>{if(t.sixWeeks&&ae.length<6){const Ne=6-ae.length,Xt=(Te.getDay()+7-Ae)%7,pn=6-(he.getDay()+7-Ae)%7,[$i,zs]=U(Xt,pn);for(let mn=1;mn<=Ne;mn++)if(zs?!!(mn%2)==$i:$i){const Cn=ae[0].days[0],Sn=j(rs(Cn.value,-7),at(Te));ae.unshift({days:Sn})}else{const Cn=ae[ae.length-1],Sn=Cn.days[Cn.days.length-1],li=j(rs(Sn.value,1),at(Te));ae.push({days:li})}}return ae},j=(ae,Te)=>{const he=ke(ae),Ae=[];for(let Ne=0;Ne<7;Ne++){const Xt=rs(he,Ne),pn=at(Xt)!==Te;Ae.push({text:t.hideOffsetDates&&pn?"":Xt.getDate(),value:Xt,current:!pn,classData:{}})}return Ae},re=(ae,Te)=>{const he=[],Ae=new Date(Te,ae),Ne=new Date(Te,ae+1,0),Xt=t.weekStart,pn=ps(Ae,{weekStartsOn:Xt}),$i=zs=>{const mn=j(zs,ae);if(he.push({days:mn}),!he[he.length-1].days.some(Cn=>ct(ai(Cn.value),ai(Ne)))){const Cn=rs(zs,7);$i(Cn)}};return $i(pn),oe(he,Ae,Ne,Xt)},Q=ae=>{const Te=to(ke(ae.value),u.hours,u.minutes,je());e("date-update",Te),x.value.enabled?H_(Te,l,x.value.limit):l.value=Te,i(),Rn().then(()=>{J()})},ge=ae=>p.value.noDisabledRange?fS(s.value[0],ae).some(Te=>w(Te)):!1,be=()=>{s.value=l.value?l.value.slice():[],s.value.length===2&&!(p.value.fixedStart||p.value.fixedEnd)&&(s.value=[])},we=(ae,Te)=>{const he=[ke(ae.value),rs(ke(ae.value),+p.value.autoRange)];b(he)?(Te&&Me(ae.value),s.value=he):e("invalid-date",ae.value)},Me=ae=>{const Te=at(ke(ae)),he=Ze(ke(ae));if(R(0,Te,he),f.value.count>0)for(let Ae=1;Ae{if(ge(ae.value)||!C(ae.value,l.value,p.value.fixedStart?0:1))return e("invalid-date",ae.value);s.value=xS(ke(ae.value),l,e,p)},Ye=(ae,Te)=>{if(be(),p.value.autoRange)return we(ae,Te);if(p.value.fixedStart||p.value.fixedEnd)return De(ae);s.value[0]?C(ke(ae.value),l.value)&&!ge(ae.value)?tn(ke(ae.value),ke(s.value[0]))?(s.value.unshift(ke(ae.value)),e("range-end",s.value[0])):(s.value[1]=ke(ae.value),e("range-end",s.value[1])):(t.autoApply&&e("auto-apply-invalid",ae.value),e("invalid-date",ae.value)):(s.value[0]=ke(ae.value),e("range-start",s.value[0]))},je=(ae=!0)=>t.enableSeconds?Array.isArray(u.seconds)?ae?u.seconds[0]:u.seconds[1]:u.seconds:0,nt=ae=>{s.value[ae]=to(s.value[ae],u.hours[ae],u.minutes[ae],je(ae!==1))},et=()=>{var ae,Te;s.value[0]&&s.value[1]&&+((ae=s.value)==null?void 0:ae[0])>+((Te=s.value)==null?void 0:Te[1])&&(s.value.reverse(),e("range-start",s.value[0]),e("range-end",s.value[1]))},Jt=()=>{s.value.length&&(s.value[0]&&!s.value[1]?nt(0):(nt(0),nt(1),i()),et(),l.value=s.value.slice(),kf(s.value,e,t.autoApply,t.modelAuto))},Wt=(ae,Te=!1)=>{if(w(ae.value)||!ae.current&&t.hideOffsetDates)return e("invalid-date",ae.value);if(o.value=JSON.parse(JSON.stringify(ae)),!p.value.enabled)return Q(ae);S0(u.hours)&&S0(u.minutes)&&!x.value.enabled&&(Ye(ae,Te),Jt())},gn=(ae,Te)=>{var he;R(ae,Te.month,Te.year,!0),f.value.count&&!f.value.solo&&de(ae),e("update-month-year",{instance:ae,month:Te.month,year:Te.year}),n(f.value.solo?ae:void 0);const Ae=(he=t.flow)!=null&&he.length?t.flow[t.flowStep]:void 0;!Te.fromNav&&(Ae===jn.month||Ae===jn.year)&&i()},Gt=(ae,Te)=>{wS({value:ae,modelValue:l,range:p.value.enabled,timezone:Te?void 0:v.value.timezone}),W(),t.multiCalendars&&Rn().then(()=>H(!0))},Ci=()=>{const ae=B_(ke(),v.value);p.value.enabled?l.value&&Array.isArray(l.value)&&l.value[0]?l.value=tn(ae,l.value[0])?[ae,l.value[0]]:[l.value[0],ae]:l.value=[ae]:l.value=ae,W()},qi=()=>{if(Array.isArray(l.value))if(x.value.enabled){const ae=Qt();l.value[l.value.length-1]=T(ae)}else l.value=l.value.map((ae,Te)=>ae&&T(ae,Te));else l.value=T(l.value);e("time-update")},Qt=()=>Array.isArray(l.value)&&l.value.length?l.value[l.value.length-1]:null;return{calendars:c,modelValue:l,month:ne,year:N,time:u,disabledTimesConfig:Y,today:d,validateTime:V,getCalendarDays:re,getMarker:K,handleScroll:fe,handleSwipe:O,handleArrow:S,selectDate:Wt,updateMonthYear:gn,presetDate:Gt,selectCurrentDate:Ci,updateTime:(ae,Te=!0,he=!1)=>{k(ae,Te,he,qi)},assignMonthAndYear:ie}},SB={key:0},kB=fn({__name:"DatePicker",props:{..._s},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,{calendars:r,month:o,year:a,modelValue:l,time:c,disabledTimesConfig:u,today:d,validateTime:f,getCalendarDays:g,getMarker:p,handleArrow:m,handleScroll:v,handleSwipe:y,selectDate:x,updateMonthYear:E,presetDate:w,selectCurrentDate:b,updateTime:C,assignMonthAndYear:k}=CB(s,i,ce,ie),T=va(),{setHoverDate:A,getDayClassData:I,clearHoverDate:V}=WB(l,s),{defaultedMultiCalendars:Y}=Ut(s),ne=me([]),N=me([]),B=me(null),R=Pi(T,"calendar"),W=Pi(T,"monthYear"),X=Pi(T,"timePicker"),J=fe=>{s.shadow||i("mount",fe)};jt(r,()=>{s.shadow||setTimeout(()=>{i("recalculate-position")},0)},{deep:!0}),jt(Y,(fe,S)=>{fe.count-S.count>0&&k()},{deep:!0});const H=ve(()=>fe=>g(o.value(fe),a.value(fe)).map(S=>({...S,days:S.days.map(O=>(O.marker=p(O),O.classData=I(O),O))})));function ce(fe){var S;fe||fe===0?(S=N.value[fe])==null||S.triggerTransition(o.value(fe),a.value(fe)):N.value.forEach((O,K)=>O.triggerTransition(o.value(K),a.value(K)))}function ie(){i("update-flow-step")}const te=(fe,S=!1)=>{x(fe,S),s.spaceConfirm&&i("select-date")},D=(fe,S,O=0)=>{var K;(K=ne.value[O])==null||K.toggleMonthPicker(fe,S)},ee=(fe,S,O=0)=>{var K;(K=ne.value[O])==null||K.toggleYearPicker(fe,S)},ue=(fe,S,O)=>{var K;(K=B.value)==null||K.toggleTimePicker(fe,S,O)},L=(fe,S)=>{var O;if(!s.range){const K=l.value?l.value:d,U=S?new Date(S):K,oe=fe?ps(U,{weekStartsOn:1}):UC(U,{weekStartsOn:1});x({value:oe,current:at(U)===o.value(0),text:"",classData:{}}),(O=document.getElementById(vS(oe)))==null||O.focus()}},le=fe=>{var S;(S=ne.value[0])==null||S.handleMonthYearChange(fe,!0)},de=fe=>{E(0,{month:o.value(0),year:a.value(0)+(fe?1:-1),fromNav:!0})},xe=(fe,S)=>{fe===jn.time&&i(`time-picker-${S?"open":"close"}`),i("overlay-toggle",{open:S,overlay:fe})},z=fe=>{i("overlay-toggle",{open:!1,overlay:fe}),i("focus-menu")};return e({clearHoverDate:V,presetDate:w,selectCurrentDate:b,toggleMonthPicker:D,toggleYearPicker:ee,toggleTimePicker:ue,handleArrow:m,updateMonthYear:E,getSidebarProps:()=>({modelValue:l,month:o,year:a,time:c,updateTime:C,updateMonthYear:E,selectDate:x,presetDate:w}),changeMonth:le,changeYear:de,selectWeekDate:L}),(fe,S)=>(P(),F(Ie,null,[$(Sf,{"multi-calendars":Z(Y).count,collapse:fe.collapse},{default:Pe(({instance:O,index:K})=>[fe.disableMonthYearSelect?se("",!0):(P(),Ce(mB,xn({key:0,ref:U=>{U&&(ne.value[K]=U)},months:Z(aS)(fe.formatLocale,fe.locale,fe.monthNameFormat),years:Z(V_)(fe.yearRange,fe.locale,fe.reverseYears),month:Z(o)(O),year:Z(a)(O),instance:O},fe.$props,{onMount:S[0]||(S[0]=U=>J(Z(ia).header)),onResetFlow:S[1]||(S[1]=U=>fe.$emit("reset-flow")),onUpdateMonthYear:U=>Z(E)(O,U),onOverlayClosed:z,onOverlayOpened:S[2]||(S[2]=U=>fe.$emit("overlay-toggle",{open:!0,overlay:U}))}),Xn({_:2},[Ge(Z(W),(U,oe)=>({name:U,fn:Pe(j=>[Fe(fe.$slots,U,In(ii(j)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),$(EB,xn({ref:U=>{U&&(N.value[K]=U)},"mapped-dates":H.value(O),month:Z(o)(O),year:Z(a)(O),instance:O},fe.$props,{onSelectDate:U=>Z(x)(U,O!==1),onHandleSpace:U=>te(U,O!==1),onSetHoverDate:S[3]||(S[3]=U=>Z(A)(U)),onHandleScroll:U=>Z(v)(U,O),onHandleSwipe:U=>Z(y)(U,O),onMount:S[4]||(S[4]=U=>J(Z(ia).calendar)),onResetFlow:S[5]||(S[5]=U=>fe.$emit("reset-flow")),onTooltipOpen:S[6]||(S[6]=U=>fe.$emit("tooltip-open",U)),onTooltipClose:S[7]||(S[7]=U=>fe.$emit("tooltip-close",U))}),Xn({_:2},[Ge(Z(R),(U,oe)=>({name:U,fn:Pe(j=>[Fe(fe.$slots,U,In(ii({...j})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),fe.enableTimePicker?(P(),F("div",SB,[fe.$slots["time-picker"]?Fe(fe.$slots,"time-picker",In(xn({key:0},{time:Z(c),updateTime:Z(C)}))):(P(),Ce(CS,xn({key:1,ref_key:"timePickerRef",ref:B},fe.$props,{hours:Z(c).hours,minutes:Z(c).minutes,seconds:Z(c).seconds,"internal-model-value":fe.internalModelValue,"disabled-times-config":Z(u),"validate-time":Z(f),onMount:S[8]||(S[8]=O=>J(Z(ia).timePicker)),"onUpdate:hours":S[9]||(S[9]=O=>Z(C)(O)),"onUpdate:minutes":S[10]||(S[10]=O=>Z(C)(O,!1)),"onUpdate:seconds":S[11]||(S[11]=O=>Z(C)(O,!1,!0)),onResetFlow:S[12]||(S[12]=O=>fe.$emit("reset-flow")),onOverlayClosed:S[13]||(S[13]=O=>xe(O,!1)),onOverlayOpened:S[14]||(S[14]=O=>xe(O,!0)),onAmPmChange:S[15]||(S[15]=O=>fe.$emit("am-pm-change",O))}),Xn({_:2},[Ge(Z(X),(O,K)=>({name:O,fn:Pe(U=>[Fe(fe.$slots,O,In(ii(U)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):se("",!0)],64))}}),TB=(t,e)=>{const n=me(),{defaultedMultiCalendars:i,defaultedConfig:s,defaultedHighlight:r,defaultedRange:o,propDates:a,defaultedFilters:l,defaultedMultiDates:c}=Ut(t),{modelValue:u,year:d,month:f,calendars:g}=Hu(t,e),{isDisabled:p}=bo(t),{selectYear:m,groupedYears:v,showYearPicker:y,isDisabled:x,toggleYearPicker:E,handleYearSelect:w,handleYear:b}=ES({modelValue:u,multiCalendars:i,range:o,highlight:r,calendars:g,propDates:a,month:f,year:d,filters:l,props:t,emit:e}),C=(B,R)=>[B,R].map(W=>Ls(W,"MMMM",{locale:t.formatLocale})).join("-"),k=ve(()=>B=>u.value?Array.isArray(u.value)?u.value.some(R=>m0(B,R)):m0(u.value,B):!1),T=B=>{if(o.value.enabled){if(Array.isArray(u.value)){const R=ct(B,u.value[0])||ct(B,u.value[1]);return Ef(u.value,n.value,B)&&!R}return!1}return!1},A=(B,R)=>B.quarter===u0(R)&&B.year===Ze(R),I=B=>typeof r.value=="function"?r.value({quarter:u0(B),year:Ze(B)}):!!r.value.quarters.find(R=>A(R,B)),V=ve(()=>B=>{const R=Dt(new Date,{year:d.value(B)});return aF({start:lu(R),end:KC(R)}).map(W=>{const X=Xo(W),J=d0(W),H=p(W),ce=T(X),ie=I(X);return{text:C(X,J),value:X,active:k.value(X),highlighted:ie,disabled:H,isBetween:ce}})}),Y=B=>{H_(B,u,c.value.limit),e("auto-apply",!0)},ne=B=>{u.value=j_(u,B,e),kf(u.value,e,t.autoApply,t.modelAuto)},N=B=>{u.value=B,e("auto-apply")};return{defaultedConfig:s,defaultedMultiCalendars:i,groupedYears:v,year:d,isDisabled:x,quarters:V,showYearPicker:y,modelValue:u,setHoverDate:B=>{n.value=B},selectYear:m,selectQuarter:(B,R,W)=>{if(!W)return g.value[R].month=at(d0(B)),c.value.enabled?Y(B):o.value.enabled?ne(B):N(B)},toggleYearPicker:E,handleYearSelect:w,handleYear:b}},AB={class:"dp--quarter-items"},PB=["data-test","disabled","onClick","onMouseover"],MB=fn({compatConfig:{MODE:3},__name:"QuarterPicker",props:{..._s},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=va(),o=Pi(r,"yearMode"),{defaultedMultiCalendars:a,defaultedConfig:l,groupedYears:c,year:u,isDisabled:d,quarters:f,modelValue:g,showYearPicker:p,setHoverDate:m,selectQuarter:v,toggleYearPicker:y,handleYearSelect:x,handleYear:E}=TB(s,i);return e({getSidebarProps:()=>({modelValue:g,year:u,selectQuarter:v,handleYearSelect:x,handleYear:E})}),(w,b)=>(P(),Ce(Sf,{"multi-calendars":Z(a).count,collapse:w.collapse,stretch:""},{default:Pe(({instance:C})=>[h("div",{class:"dp-quarter-picker-wrap",style:Mn({minHeight:`${Z(l).modeHeight}px`})},[w.$slots["top-extra"]?Fe(w.$slots,"top-extra",{key:0,value:w.internalModelValue}):se("",!0),h("div",null,[$(bS,xn(w.$props,{items:Z(c)(C),instance:C,"show-year-picker":Z(p)[C],year:Z(u)(C),"is-disabled":k=>Z(d)(C,k),onHandleYear:k=>Z(E)(C,k),onYearSelect:k=>Z(x)(k,C),onToggleYearPicker:k=>Z(y)(C,k?.flow,k?.show)}),Xn({_:2},[Ge(Z(o),(k,T)=>({name:k,fn:Pe(A=>[Fe(w.$slots,k,In(ii(A)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),h("div",AB,[(P(!0),F(Ie,null,Ge(Z(f)(C),(k,T)=>(P(),F("div",{key:T},[h("button",{type:"button",class:Ee(["dp--qr-btn",{"dp--qr-btn-active":k.active,"dp--qr-btn-between":k.isBetween,"dp--qr-btn-disabled":k.disabled,"dp--highlighted":k.highlighted}]),"data-test":k.value,disabled:k.disabled,onClick:A=>Z(v)(k.value,C,k.disabled),onMouseover:A=>Z(m)(k.value)},[w.$slots.quarter?Fe(w.$slots,"quarter",{key:0,value:k.value,text:k.text}):(P(),F(Ie,{key:1},[Be(pe(k.text),1)],64))],42,PB)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),IB=["id","tabindex","role","aria-label"],DB={key:0,class:"dp--menu-load-container"},RB={key:1,class:"dp--menu-header"},$B={key:0,class:"dp__sidebar_left"},LB=["data-test","onClick","onKeydown"],OB={key:2,class:"dp__sidebar_right"},NB={key:3,class:"dp__action_extra"},k0=fn({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...Cf,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=me(null),o=ve(()=>{const{openOnTop:j,...re}=s;return{...re,flowStep:A.value,collapse:s.collapse,noOverlayFocus:s.noOverlayFocus,menuWrapRef:r.value}}),{setMenuFocused:a,setShiftKey:l,control:c}=yS(),u=va(),{defaultedTextInput:d,defaultedInline:f,defaultedConfig:g,defaultedUI:p}=Ut(s),m=me(null),v=me(0),y=me(null),x=me(!1),E=me(null);Vt(()=>{if(!s.shadow){x.value=!0,w(),window.addEventListener("resize",w);const j=bn(r);if(j&&!d.value.enabled&&!f.value.enabled&&(a(!0),R()),j){const re=Q=>{g.value.allowPreventDefault&&Q.preventDefault(),eo(Q,g.value,!0)};j.addEventListener("pointerdown",re),j.addEventListener("mousedown",re)}}}),_o(()=>{window.removeEventListener("resize",w)});const w=()=>{const j=bn(y);j&&(v.value=j.getBoundingClientRect().width)},{arrowRight:b,arrowLeft:C,arrowDown:k,arrowUp:T}=yo(),{flowStep:A,updateFlowStep:I,childMount:V,resetFlow:Y,handleFlow:ne}=zB(s,i,E),N=ve(()=>s.monthPicker?X4:s.yearPicker?Z4:s.timePicker?uB:s.quarterPicker?MB:kB),B=ve(()=>{var j;if(g.value.arrowLeft)return g.value.arrowLeft;const re=(j=r.value)==null?void 0:j.getBoundingClientRect(),Q=s.getInputRect();return Q?.width=(re?.right??0)&&Q?.width{const j=bn(r);j&&j.focus({preventScroll:!0})},W=ve(()=>{var j;return((j=E.value)==null?void 0:j.getSidebarProps())||{}}),X=()=>{s.openOnTop&&i("recalculate-position")},J=Pi(u,"action"),H=ve(()=>s.monthPicker||s.yearPicker?Pi(u,"monthYear"):s.timePicker?Pi(u,"timePicker"):Pi(u,"shared")),ce=ve(()=>s.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),ie=ve(()=>({dp__menu_disabled:s.disabled,dp__menu_readonly:s.readonly,"dp-menu-loading":s.loading})),te=ve(()=>({dp__menu:!0,dp__menu_index:!f.value.enabled,dp__relative:f.value.enabled,...p.value.menu??{}})),D=j=>{eo(j,g.value,!0)},ee=()=>{s.escClose&&i("close-picker")},ue=j=>{if(s.arrowNavigation){if(j===Qn.up)return T();if(j===Qn.down)return k();if(j===Qn.left)return C();if(j===Qn.right)return b()}else j===Qn.left||j===Qn.up?z("handleArrow",Qn.left,0,j===Qn.up):z("handleArrow",Qn.right,0,j===Qn.down)},L=j=>{l(j.shiftKey),!s.disableMonthYearSelect&&j.code===Nt.tab&&j.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(j.preventDefault(),eo(j,g.value,!0),i("close-picker"))},le=()=>{R(),i("time-picker-close")},de=j=>{var re,Q,ge;(re=E.value)==null||re.toggleTimePicker(!1,!1),(Q=E.value)==null||Q.toggleMonthPicker(!1,!1,j),(ge=E.value)==null||ge.toggleYearPicker(!1,!1,j)},xe=(j,re=0)=>{var Q,ge,be;return j==="month"?(Q=E.value)==null?void 0:Q.toggleMonthPicker(!1,!0,re):j==="year"?(ge=E.value)==null?void 0:ge.toggleYearPicker(!1,!0,re):j==="time"?(be=E.value)==null?void 0:be.toggleTimePicker(!0,!1):de(re)},z=(j,...re)=>{var Q,ge;(Q=E.value)!=null&&Q[j]&&((ge=E.value)==null||ge[j](...re))},fe=()=>{z("selectCurrentDate")},S=(j,re)=>{z("presetDate",j,re)},O=()=>{z("clearHoverDate")},K=(j,re)=>{z("updateMonthYear",j,re)},U=(j,re)=>{j.preventDefault(),ue(re)},oe=j=>{var re,Q,ge;if(L(j),j.key===Nt.home||j.key===Nt.end)return z("selectWeekDate",j.key===Nt.home,j.target.getAttribute("id"));switch((j.key===Nt.pageUp||j.key===Nt.pageDown)&&(j.shiftKey?(z("changeYear",j.key===Nt.pageUp),(re=rm(r.value,"overlay-year"))==null||re.focus()):(z("changeMonth",j.key===Nt.pageUp),(Q=rm(r.value,j.key===Nt.pageUp?"action-prev":"action-next"))==null||Q.focus()),j.target.getAttribute("id")&&((ge=r.value)==null||ge.focus({preventScroll:!0}))),j.key){case Nt.esc:return ee();case Nt.arrowLeft:return U(j,Qn.left);case Nt.arrowRight:return U(j,Qn.right);case Nt.arrowUp:return U(j,Qn.up);case Nt.arrowDown:return U(j,Qn.down);default:return}};return e({updateMonthYear:K,switchView:xe,handleFlow:ne}),(j,re)=>{var Q,ge,be;return P(),F("div",{id:j.uid?`dp-menu-${j.uid}`:void 0,ref_key:"dpMenuRef",ref:r,tabindex:Z(f).enabled?void 0:"0",role:Z(f).enabled?void 0:"dialog","aria-label":(Q=j.ariaLabels)==null?void 0:Q.menu,class:Ee(te.value),style:Mn({"--dp-arrow-left":B.value}),onMouseleave:O,onClick:D,onKeydown:oe},[(j.disabled||j.readonly)&&Z(f).enabled||j.loading?(P(),F("div",{key:0,class:Ee(ie.value)},[j.loading?(P(),F("div",DB,re[19]||(re[19]=[h("span",{class:"dp--menu-loader"},null,-1)]))):se("",!0)],2)):se("",!0),j.$slots["menu-header"]?(P(),F("div",RB,[Fe(j.$slots,"menu-header")])):se("",!0),!Z(f).enabled&&!j.teleportCenter?(P(),F("div",{key:2,class:Ee(ce.value)},null,2)):se("",!0),h("div",{ref_key:"innerMenuRef",ref:y,class:Ee({dp__menu_content_wrapper:((ge=j.presetDates)==null?void 0:ge.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(((be=j.presetDates)==null?void 0:be.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"])}),style:Mn({"--dp-menu-width":`${v.value}px`})},[j.$slots["left-sidebar"]?(P(),F("div",$B,[Fe(j.$slots,"left-sidebar",In(ii(W.value)))])):se("",!0),j.presetDates.length?(P(),F("div",{key:1,class:Ee({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(P(!0),F(Ie,null,Ge(j.presetDates,(we,Me)=>(P(),F(Ie,{key:Me},[we.slot?Fe(j.$slots,we.slot,{key:0,presetDate:S,label:we.label,value:we.value}):(P(),F("button",{key:1,type:"button",style:Mn(we.style||{}),class:Ee(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test":we.testId??void 0,onClick:ru(De=>S(we.value,we.noTz),["prevent"]),onKeydown:De=>Z(si)(De,()=>S(we.value,we.noTz),!0)},pe(we.label),47,LB))],64))),128))],2)):se("",!0),h("div",{ref_key:"calendarWrapperRef",ref:m,class:"dp__instance_calendar",role:"document"},[(P(),Ce(_a(N.value),xn({ref_key:"dynCmpRef",ref:E},o.value,{"flow-step":Z(A),onMount:Z(V),onUpdateFlowStep:Z(I),onResetFlow:Z(Y),onFocusMenu:R,onSelectDate:re[0]||(re[0]=we=>j.$emit("select-date")),onDateUpdate:re[1]||(re[1]=we=>j.$emit("date-update",we)),onTooltipOpen:re[2]||(re[2]=we=>j.$emit("tooltip-open",we)),onTooltipClose:re[3]||(re[3]=we=>j.$emit("tooltip-close",we)),onAutoApply:re[4]||(re[4]=we=>j.$emit("auto-apply",we)),onRangeStart:re[5]||(re[5]=we=>j.$emit("range-start",we)),onRangeEnd:re[6]||(re[6]=we=>j.$emit("range-end",we)),onInvalidFixedRange:re[7]||(re[7]=we=>j.$emit("invalid-fixed-range",we)),onTimeUpdate:re[8]||(re[8]=we=>j.$emit("time-update")),onAmPmChange:re[9]||(re[9]=we=>j.$emit("am-pm-change",we)),onTimePickerOpen:re[10]||(re[10]=we=>j.$emit("time-picker-open",we)),onTimePickerClose:le,onRecalculatePosition:X,onUpdateMonthYear:re[11]||(re[11]=we=>j.$emit("update-month-year",we)),onAutoApplyInvalid:re[12]||(re[12]=we=>j.$emit("auto-apply-invalid",we)),onInvalidDate:re[13]||(re[13]=we=>j.$emit("invalid-date",we)),onOverlayToggle:re[14]||(re[14]=we=>j.$emit("overlay-toggle",we)),"onUpdate:internalModelValue":re[15]||(re[15]=we=>j.$emit("update:internal-model-value",we))}),Xn({_:2},[Ge(H.value,(we,Me)=>({name:we,fn:Pe(De=>[Fe(j.$slots,we,In(ii({...De})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),j.$slots["right-sidebar"]?(P(),F("div",OB,[Fe(j.$slots,"right-sidebar",In(ii(W.value)))])):se("",!0),j.$slots["action-extra"]?(P(),F("div",NB,[j.$slots["action-extra"]?Fe(j.$slots,"action-extra",{key:0,selectCurrentDate:fe}):se("",!0)])):se("",!0)],6),!j.autoApply||Z(g).keepActionRow?(P(),Ce(W4,xn({key:3,"menu-mount":x.value},o.value,{"calendar-width":v.value,onClosePicker:re[16]||(re[16]=we=>j.$emit("close-picker")),onSelectDate:re[17]||(re[17]=we=>j.$emit("select-date")),onInvalidSelect:re[18]||(re[18]=we=>j.$emit("invalid-select")),onSelectNow:fe}),Xn({_:2},[Ge(Z(J),(we,Me)=>({name:we,fn:Pe(De=>[Fe(j.$slots,we,In(ii({...De})))])}))]),1040,["menu-mount","calendar-width"])):se("",!0)],46,IB)}}});var qa=(t=>(t.center="center",t.left="left",t.right="right",t))(qa||{});const FB=({menuRef:t,menuRefInner:e,inputRef:n,pickerWrapperRef:i,inline:s,emit:r,props:o,slots:a})=>{const{defaultedConfig:l}=Ut(o),c=me({}),u=me(!1),d=me({top:"0",left:"0"}),f=me(!1),g=tu(o,"teleportCenter");jt(g,()=>{d.value=JSON.parse(JSON.stringify({})),b()});const p=R=>{if(o.teleport){const W=R.getBoundingClientRect();return{left:W.left+window.scrollX,top:W.top+window.scrollY}}return{top:0,left:0}},m=(R,W)=>{d.value.left=`${R+W-c.value.width}px`},v=R=>{d.value.left=`${R}px`},y=(R,W)=>{o.position===qa.left&&v(R),o.position===qa.right&&m(R,W),o.position===qa.center&&(d.value.left=`${R+W/2-c.value.width/2}px`)},x=R=>{const{width:W,height:X}=R.getBoundingClientRect(),{top:J,left:H}=o.altPosition?o.altPosition(R):p(R);return{top:+J,left:+H,width:W,height:X}},E=()=>{d.value.left="50%",d.value.top="50%",d.value.transform="translate(-50%, -50%)",d.value.position="fixed",delete d.value.opacity},w=()=>{const R=bn(n),{top:W,left:X,transform:J}=o.altPosition(R);d.value={top:`${W}px`,left:`${X}px`,transform:J??""}},b=(R=!0)=>{var W;if(!s.value.enabled){if(g.value)return E();if(o.altPosition!==null)return w();if(R){const X=o.teleport?(W=e.value)==null?void 0:W.$el:t.value;X&&(c.value=X.getBoundingClientRect()),r("recalculate-position")}return Y()}},C=({inputEl:R,left:W,width:X})=>{window.screen.width>768&&!u.value&&y(W,X),A(R)},k=R=>{const{top:W,left:X,height:J,width:H}=x(R);d.value.top=`${J+W+ +o.offset}px`,f.value=!1,u.value||(d.value.left=`${X+H/2-c.value.width/2}px`),C({inputEl:R,left:X,width:H})},T=R=>{const{top:W,left:X,width:J}=x(R);d.value.top=`${W-+o.offset-c.value.height}px`,f.value=!0,C({inputEl:R,left:X,width:J})},A=R=>{if(o.autoPosition){const{left:W,width:X}=x(R),{left:J,right:H}=c.value;if(!u.value){if(Math.abs(J)!==Math.abs(H)){if(J<=0)return u.value=!0,v(W);if(H>=document.documentElement.clientWidth)return u.value=!0,m(W,X)}return y(W,X)}}},I=()=>{const R=bn(n);if(R){const{height:W}=c.value,{top:X,height:J}=R.getBoundingClientRect(),H=window.innerHeight-X-J,ce=X;return W<=H?Ho.bottom:W>H&&W<=ce?Ho.top:H>=ce?Ho.bottom:Ho.top}return Ho.bottom},V=R=>I()===Ho.bottom?k(R):T(R),Y=()=>{const R=bn(n);if(R)return o.autoPosition?V(R):k(R)},ne=function(R){if(R){const W=R.scrollHeight>R.clientHeight,X=window.getComputedStyle(R).overflowY.indexOf("hidden")!==-1;return W&&!X}return!0},N=function(R){return!R||R===document.body||R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:ne(R)?R:N(R.assignedSlot&&l.value.shadowDom?R.assignedSlot.parentNode:R.parentNode)},B=R=>{if(R)switch(o.position){case qa.left:return{left:0,transform:"translateX(0)"};case qa.right:return{left:`${R.width}px`,transform:"translateX(-100%)"};default:return{left:`${R.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:f,menuStyle:d,xCorrect:u,setMenuPosition:b,getScrollableParent:N,shadowRender:(R,W)=>{var X,J,H;const ce=document.createElement("div"),ie=(X=bn(n))==null?void 0:X.getBoundingClientRect();ce.setAttribute("id","dp--temp-container");const te=(J=i.value)!=null&&J.clientWidth?i.value:document.body;te.append(ce);const D=B(ie),ee=l.value.shadowDom?Object.keys(a).filter(L=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(L)):Object.keys(a),ue=ha(R,{...W,shadow:!0,style:{opacity:0,position:"absolute",...D}},Object.fromEntries(ee.map(L=>[L,a[L]])));Fb(ue,ce),c.value=(H=ue.el)==null?void 0:H.getBoundingClientRect(),Fb(null,ce),te.removeChild(ce)}}},Mr=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],BB=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],VB={all:()=>Mr,monthYear:()=>Mr.filter(t=>t.use.includes("month-year")),input:()=>BB,timePicker:()=>Mr.filter(t=>t.use.includes("time")),action:()=>Mr.filter(t=>t.use.includes("action")),calendar:()=>Mr.filter(t=>t.use.includes("calendar")),menu:()=>Mr.filter(t=>t.use.includes("menu")),shared:()=>Mr.filter(t=>t.use.includes("shared")),yearMode:()=>Mr.filter(t=>t.use.includes("year-mode"))},Pi=(t,e,n)=>{const i=[];return VB[e]().forEach(s=>{t[s.name]&&i.push(s.name)}),n!=null&&n.length&&n.forEach(s=>{s.slot&&i.push(s.slot)}),i},Yu=t=>{const e=ve(()=>i=>t.value?i?t.value.open:t.value.close:""),n=ve(()=>i=>t.value?i?t.value.menuAppearTop:t.value.menuAppearBottom:"");return{transitionName:e,showTransition:!!t.value,menuTransition:n}},Hu=(t,e,n)=>{const{defaultedRange:i,defaultedTz:s}=Ut(t),r=ke(xi(ke(),s.value.timezone)),o=me([{month:at(r),year:Ze(r)}]),a=f=>{const g={hours:vr(r),minutes:ao(r),seconds:0};return i.value.enabled?[g[f],g[f]]:g[f]},l=Ei({hours:a("hours"),minutes:a("minutes"),seconds:a("seconds")});jt(i,(f,g)=>{f.enabled!==g.enabled&&(l.hours=a("hours"),l.minutes=a("minutes"),l.seconds=a("seconds"))},{deep:!0});const c=ve({get:()=>t.internalModelValue,set:f=>{!t.readonly&&!t.disabled&&e("update:internal-model-value",f)}}),u=ve(()=>f=>o.value[f]?o.value[f].month:0),d=ve(()=>f=>o.value[f]?o.value[f].year:0);return jt(c,(f,g)=>{n&&JSON.stringify(f??{})!==JSON.stringify(g??{})&&n()},{deep:!0}),{calendars:o,time:l,modelValue:c,month:u,year:d,today:r}},WB=(t,e)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:i,defaultedUI:s,defaultedHighlight:r,defaultedTz:o,propDates:a,defaultedRange:l}=Ut(e),{isDisabled:c}=bo(e),u=me(null),d=me(xi(new Date,o.value.timezone)),f=D=>{!D.current&&e.hideOffsetDates||(u.value=D.value)},g=()=>{u.value=null},p=D=>Array.isArray(t.value)&&l.value.enabled&&t.value[0]&&u.value?D?ln(u.value,t.value[0]):tn(u.value,t.value[0]):!0,m=(D,ee)=>{const ue=()=>t.value?ee?t.value[0]||null:t.value[1]:null,L=t.value&&Array.isArray(t.value)?ue():null;return ct(ke(D.value),L)},v=D=>{const ee=Array.isArray(t.value)?t.value[0]:null;return D?!tn(u.value??null,ee):!0},y=(D,ee=!0)=>(l.value.enabled||e.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?e.hideOffsetDates&&!D.current?!1:ct(ke(D.value),t.value[ee?0:1]):l.value.enabled?m(D,ee)&&v(ee)||ct(D.value,Array.isArray(t.value)?t.value[0]:null)&&p(ee):!1,x=(D,ee)=>{if(Array.isArray(t.value)&&t.value[0]&&t.value.length===1){const ue=ct(D.value,u.value);return ee?ln(t.value[0],D.value)&&ue:tn(t.value[0],D.value)&&ue}return!1},E=D=>!t.value||e.hideOffsetDates&&!D.current?!1:l.value.enabled?e.modelAuto&&Array.isArray(t.value)?ct(D.value,t.value[0]?t.value[0]:d.value):!1:i.value.enabled&&Array.isArray(t.value)?t.value.some(ee=>ct(ee,D.value)):ct(D.value,t.value?t.value:d.value),w=D=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!D.current)return!1;const ee=rs(u.value,+l.value.autoRange),ue=nr(ke(u.value),e.weekStart);return e.weekPicker?ct(ue[1],ke(D.value)):ct(ee,ke(D.value))}return!1}return!1},b=D=>{if(l.value.autoRange||e.weekPicker){if(u.value){const ee=rs(u.value,+l.value.autoRange);if(e.hideOffsetDates&&!D.current)return!1;const ue=nr(ke(u.value),e.weekStart);return e.weekPicker?ln(D.value,ue[0])&&tn(D.value,ue[1]):ln(D.value,u.value)&&tn(D.value,ee)}return!1}return!1},C=D=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!D.current)return!1;const ee=nr(ke(u.value),e.weekStart);return e.weekPicker?ct(ee[0],D.value):ct(u.value,D.value)}return!1}return!1},k=D=>Ef(t.value,u.value,D.value),T=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,A=()=>e.modelAuto?lS(e.internalModelValue):!0,I=D=>{if(e.weekPicker)return!1;const ee=l.value.enabled?!y(D)&&!y(D,!1):!0;return!c(D.value)&&!E(D)&&!(!D.current&&e.hideOffsetDates)&&ee},V=D=>l.value.enabled?e.modelAuto?T()&&E(D):!1:E(D),Y=D=>r.value?h4(D.value,a.value.highlight):!1,ne=D=>{const ee=c(D.value);return ee&&(typeof r.value=="function"?!r.value(D.value,ee):!r.value.options.highlightDisabled)},N=D=>{var ee;return typeof r.value=="function"?r.value(D.value):(ee=r.value.weekdays)==null?void 0:ee.includes(D.value.getDay())},B=D=>(l.value.enabled||e.weekPicker)&&(!(n.value.count>0)||D.current)&&A()&&!(!D.current&&e.hideOffsetDates)&&!E(D)?k(D):!1,R=D=>{const{isRangeStart:ee,isRangeEnd:ue}=H(D),L=l.value.enabled?ee||ue:!1;return{dp__cell_offset:!D.current,dp__pointer:!e.disabled&&!(!D.current&&e.hideOffsetDates)&&!c(D.value),dp__cell_disabled:c(D.value),dp__cell_highlight:!ne(D)&&(Y(D)||N(D))&&!V(D)&&!L&&!C(D)&&!(B(D)&&e.weekPicker)&&!ue,dp__cell_highlight_active:!ne(D)&&(Y(D)||N(D))&&V(D),dp__today:!e.noToday&&ct(D.value,d.value)&&D.current,"dp--past":tn(D.value,d.value),"dp--future":ln(D.value,d.value)}},W=D=>({dp__active_date:V(D),dp__date_hover:I(D)}),X=D=>{if(t.value&&!Array.isArray(t.value)){const ee=nr(t.value,e.weekStart);return{...ie(D),dp__range_start:ct(ee[0],D.value),dp__range_end:ct(ee[1],D.value),dp__range_between_week:ln(D.value,ee[0])&&tn(D.value,ee[1])}}return{...ie(D)}},J=D=>{if(t.value&&Array.isArray(t.value)){const ee=nr(t.value[0],e.weekStart),ue=t.value[1]?nr(t.value[1],e.weekStart):[];return{...ie(D),dp__range_start:ct(ee[0],D.value)||ct(ue[0],D.value),dp__range_end:ct(ee[1],D.value)||ct(ue[1],D.value),dp__range_between_week:ln(D.value,ee[0])&&tn(D.value,ee[1])||ln(D.value,ue[0])&&tn(D.value,ue[1]),dp__range_between:ln(D.value,ee[1])&&tn(D.value,ue[0])}}return{...ie(D)}},H=D=>{const ee=n.value.count>0?D.current&&y(D)&&A():y(D)&&A(),ue=n.value.count>0?D.current&&y(D,!1)&&A():y(D,!1)&&A();return{isRangeStart:ee,isRangeEnd:ue}},ce=D=>{const{isRangeStart:ee,isRangeEnd:ue}=H(D);return{dp__range_start:ee,dp__range_end:ue,dp__range_between:B(D),dp__date_hover:ct(D.value,u.value)&&!ee&&!ue&&!e.weekPicker,dp__date_hover_start:x(D,!0),dp__date_hover_end:x(D,!1)}},ie=D=>({...ce(D),dp__cell_auto_range:b(D),dp__cell_auto_range_start:C(D),dp__cell_auto_range_end:w(D)}),te=D=>l.value.enabled?l.value.autoRange?ie(D):e.modelAuto?{...W(D),...ce(D)}:e.weekPicker?J(D):ce(D):e.weekPicker?X(D):W(D);return{setHoverDate:f,clearHoverDate:g,getDayClassData:D=>e.hideOffsetDates&&!D.current?{}:{...R(D),...te(D),[e.dayClass?e.dayClass(D.value,e.internalModelValue):""]:!0,...s.value.calendarCell??{}}}},bo=t=>{const{defaultedFilters:e,defaultedRange:n,propDates:i,defaultedMultiDates:s}=Ut(t),r=N=>i.value.disabledDates?typeof i.value.disabledDates=="function"?i.value.disabledDates(ke(N)):!!Th(N,i.value.disabledDates):!1,o=N=>i.value.maxDate?t.yearPicker?Ze(N)>Ze(i.value.maxDate):ln(N,i.value.maxDate):!1,a=N=>i.value.minDate?t.yearPicker?Ze(N){const B=o(N),R=a(N),W=r(N),X=e.value.months.map(te=>+te).includes(at(N)),J=t.disabledWeekDays.length?t.disabledWeekDays.some(te=>+te===e5(N)):!1,H=g(N),ce=Ze(N),ie=ce<+t.yearRange[0]||ce>+t.yearRange[1];return!(B||R||W||X||ie||J||H)},c=(N,B)=>tn(...Kr(i.value.minDate,N,B))||ct(...Kr(i.value.minDate,N,B)),u=(N,B)=>ln(...Kr(i.value.maxDate,N,B))||ct(...Kr(i.value.maxDate,N,B)),d=(N,B,R)=>{let W=!1;return i.value.maxDate&&R&&u(N,B)&&(W=!0),i.value.minDate&&!R&&c(N,B)&&(W=!0),W},f=(N,B,R,W)=>{let X=!1;return W&&(i.value.minDate||i.value.maxDate)?i.value.minDate&&i.value.maxDate?X=d(N,B,R):(i.value.minDate&&c(N,B)||i.value.maxDate&&u(N,B))&&(X=!0):X=!0,X},g=N=>Array.isArray(i.value.allowedDates)&&!i.value.allowedDates.length?!0:i.value.allowedDates?!Th(N,i.value.allowedDates):!1,p=N=>!l(N),m=N=>n.value.noDisabledRange?!jC({start:N[0],end:N[1]}).some(B=>p(B)):!0,v=N=>{if(N){const B=Ze(N);return B>=+t.yearRange[0]&&B<=t.yearRange[1]}return!0},y=(N,B)=>!!(Array.isArray(N)&&N[B]&&(n.value.maxRange||n.value.minRange)&&v(N[B])),x=(N,B,R=0)=>{if(y(B,R)&&v(N)){const W=YC(N,B[R]),X=fS(B[R],N),J=X.length===1?0:X.filter(ce=>p(ce)).length,H=Math.abs(W)-(n.value.minMaxRawRange?0:J);if(n.value.minRange&&n.value.maxRange)return H>=+n.value.minRange&&H<=+n.value.maxRange;if(n.value.minRange)return H>=+n.value.minRange;if(n.value.maxRange)return H<=+n.value.maxRange}return!0},E=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,w=N=>Array.isArray(N)?[N[0]?Bg(N[0]):null,N[1]?Bg(N[1]):null]:Bg(N),b=(N,B,R)=>N.find(W=>+W.hours===vr(B)&&W.minutes==="*"?!0:+W.minutes===ao(B)&&+W.hours===vr(B))&&R,C=(N,B,R)=>{const[W,X]=N,[J,H]=B;return!b(W,J,R)&&!b(X,H,R)&&R},k=(N,B)=>{const R=Array.isArray(B)?B:[B];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?C(t.disabledTimes,R,N):!R.some(W=>b(t.disabledTimes,W,N)):N},T=(N,B)=>{const R=Array.isArray(B)?[sa(B[0]),B[1]?sa(B[1]):void 0]:sa(B),W=!t.disabledTimes(R);return N&&W},A=(N,B)=>t.disabledTimes?Array.isArray(t.disabledTimes)?k(B,N):T(B,N):B,I=N=>{let B=!0;if(!N||E())return!0;const R=!i.value.minDate&&!i.value.maxDate?w(N):N;return(t.maxTime||i.value.maxDate)&&(B=x0(t.maxTime,i.value.maxDate,"max",Tn(R),B)),(t.minTime||i.value.minDate)&&(B=x0(t.minTime,i.value.minDate,"min",Tn(R),B)),A(N,B)},V=N=>{if(!t.monthPicker)return!0;let B=!0;const R=ke(os(N));if(i.value.minDate&&i.value.maxDate){const W=ke(os(i.value.minDate)),X=ke(os(i.value.maxDate));return ln(R,W)&&tn(R,X)||ct(R,W)||ct(R,X)}if(i.value.minDate){const W=ke(os(i.value.minDate));B=ln(R,W)||ct(R,W)}if(i.value.maxDate){const W=ke(os(i.value.maxDate));B=tn(R,W)||ct(R,W)}return B},Y=ve(()=>N=>!t.enableTimePicker||t.ignoreTimeValidation?!0:I(N)),ne=ve(()=>N=>t.monthPicker?Array.isArray(N)&&(n.value.enabled||s.value.enabled)?!N.filter(B=>!V(B)).length:V(N):!0);return{isDisabled:p,validateDate:l,validateMonthYearInRange:f,isDateRangeAllowed:m,checkMinMaxRange:x,isValidTime:I,isTimeValid:Y,isMonthValid:ne}},Tf=()=>{const t=ve(()=>(i,s)=>i?.includes(s)),e=ve(()=>(i,s)=>i.count?i.solo?!0:s===0:!0),n=ve(()=>(i,s)=>i.count?i.solo?!0:s===i.count-1:!0);return{hideNavigationButtons:t,showLeftIcon:e,showRightIcon:n}},zB=(t,e,n)=>{const i=me(0),s=Ei({[ia.timePicker]:!t.enableTimePicker||t.timePicker||t.monthPicker,[ia.calendar]:!1,[ia.header]:!1}),r=ve(()=>t.monthPicker||t.timePicker),o=d=>{var f;if((f=t.flow)!=null&&f.length){if(!d&&r.value)return u();s[d]=!0,Object.keys(s).filter(g=>!s[g]).length||u()}},a=()=>{var d,f;(d=t.flow)!=null&&d.length&&i.value!==-1&&(i.value+=1,e("flow-step",i.value),u()),((f=t.flow)==null?void 0:f.length)===i.value&&Rn().then(()=>l())},l=()=>{i.value=-1},c=(d,f,...g)=>{var p,m;t.flow[i.value]===d&&n.value&&((m=(p=n.value)[f])==null||m.call(p,...g))},u=(d=0)=>{d&&(i.value+=d),c(jn.month,"toggleMonthPicker",!0),c(jn.year,"toggleYearPicker",!0),c(jn.calendar,"toggleTimePicker",!1,!0),c(jn.time,"toggleTimePicker",!0,!0);const f=t.flow[i.value];(f===jn.hours||f===jn.minutes||f===jn.seconds)&&c(f,"toggleTimePicker",!0,!0,f)};return{childMount:o,updateFlowStep:a,resetFlow:l,handleFlow:u,flowStep:i}},YB={key:1,class:"dp__input_wrap"},HB=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],jB={key:2,class:"dp--clear-btn"},KB=["aria-label"],UB=fn({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Cf},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(t,{expose:e,emit:n}){const i=n,s=t,{defaultedTextInput:r,defaultedAriaLabels:o,defaultedInline:a,defaultedConfig:l,defaultedRange:c,defaultedMultiDates:u,defaultedUI:d,getDefaultPattern:f,getDefaultStartTime:g}=Ut(s),{checkMinMaxRange:p}=bo(s),m=me(),v=me(null),y=me(!1),x=me(!1),E=ve(()=>({dp__pointer:!s.disabled&&!s.readonly&&!r.value.enabled,dp__disabled:s.disabled,dp__input_readonly:!r.value.enabled,dp__input:!0,dp__input_icon_pad:!s.hideInputIcon,dp__input_valid:typeof s.state=="boolean"?s.state:!1,dp__input_invalid:typeof s.state=="boolean"?!s.state:!1,dp__input_focus:y.value||s.isMenuOpen,dp__input_reg:!r.value.enabled,...d.value.input??{}})),w=()=>{i("set-input-date",null),s.clearable&&s.autoApply&&(i("set-empty-date"),m.value=null)},b=H=>{const ce=g();return f4(H,r.value.format??f(),ce??gS({},s.enableSeconds),s.inputValue,x.value,s.formatLocale)},C=H=>{const{rangeSeparator:ce}=r.value,[ie,te]=H.split(`${ce}`);if(ie){const D=b(ie.trim()),ee=te?b(te.trim()):null;if(Tl(D,ee))return;const ue=D&&ee?[D,ee]:[D];p(ee,ue,0)&&(m.value=D?ue:null)}},k=()=>{x.value=!0},T=H=>{if(c.value.enabled)C(H);else if(u.value.enabled){const ce=H.split(";");m.value=ce.map(ie=>b(ie.trim())).filter(ie=>ie)}else m.value=b(H)},A=H=>{var ce;const ie=typeof H=="string"?H:(ce=H.target)==null?void 0:ce.value;ie!==""?(r.value.openMenu&&!s.isMenuOpen&&i("open"),T(ie),i("set-input-date",m.value)):w(),x.value=!1,i("update:input-value",ie),i("text-input",H,m.value)},I=H=>{r.value.enabled?(T(H.target.value),r.value.enterSubmit&&om(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0),m.value=null):r.value.enterSubmit&&s.inputValue===""&&(m.value=null,i("clear"))):ne(H)},V=(H,ce)=>{r.value.enabled&&r.value.tabSubmit&&!ce&&T(H.target.value),r.value.tabSubmit&&om(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0,!0),m.value=null):r.value.tabSubmit&&s.inputValue===""&&(m.value=null,i("clear",!0))},Y=()=>{y.value=!0,i("focus"),Rn().then(()=>{var H;r.value.enabled&&r.value.selectOnFocus&&((H=v.value)==null||H.select())})},ne=H=>{if(eo(H,l.value,!0),r.value.enabled&&r.value.openMenu&&!a.value.input){if(r.value.openMenu==="open"&&!s.isMenuOpen)return i("open");if(r.value.openMenu==="toggle")return i("toggle")}else r.value.enabled||i("toggle")},N=()=>{i("real-blur"),y.value=!1,(!s.isMenuOpen||a.value.enabled&&a.value.input)&&i("blur"),s.autoApply&&r.value.enabled&&m.value&&!s.isMenuOpen&&(i("set-input-date",m.value),i("select-date"),m.value=null)},B=H=>{eo(H,l.value,!0),i("clear")},R=H=>{if(H.key==="Tab"&&V(H),H.key==="Enter"&&I(H),!r.value.enabled){if(H.code==="Tab")return;H.preventDefault()}},W=()=>{var H;(H=v.value)==null||H.focus({preventScroll:!0})},X=H=>{m.value=H},J=H=>{H.key===Nt.tab&&V(H,!0)};return e({focusInput:W,setParsedDate:X}),(H,ce)=>{var ie,te,D;return P(),F("div",{onClick:ne},[H.$slots.trigger&&!H.$slots["dp-input"]&&!Z(a).enabled?Fe(H.$slots,"trigger",{key:0}):se("",!0),!H.$slots.trigger&&(!Z(a).enabled||Z(a).input)?(P(),F("div",YB,[H.$slots["dp-input"]&&!H.$slots.trigger&&(!Z(a).enabled||Z(a).enabled&&Z(a).input)?Fe(H.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:A,onEnter:I,onTab:V,onClear:B,onBlur:N,onKeypress:R,onPaste:k,onFocus:Y,openMenu:()=>H.$emit("open"),closeMenu:()=>H.$emit("close"),toggleMenu:()=>H.$emit("toggle")}):se("",!0),H.$slots["dp-input"]?se("",!0):(P(),F("input",{key:1,id:H.uid?`dp-input-${H.uid}`:void 0,ref_key:"inputRef",ref:v,"data-test":"dp-input",name:H.name,class:Ee(E.value),inputmode:Z(r).enabled?"text":"none",placeholder:H.placeholder,disabled:H.disabled,readonly:H.readonly,required:H.required,value:t.inputValue,autocomplete:H.autocomplete,"aria-label":(ie=Z(o))==null?void 0:ie.input,"aria-disabled":H.disabled||void 0,"aria-invalid":H.state===!1?!0:void 0,onInput:A,onBlur:N,onFocus:Y,onKeypress:R,onKeydown:ce[0]||(ce[0]=ee=>R(ee)),onPaste:k},null,42,HB)),h("div",{onClick:ce[3]||(ce[3]=ee=>i("toggle"))},[H.$slots["input-icon"]&&!H.hideInputIcon?(P(),F("span",{key:0,class:"dp__input_icon",onClick:ce[1]||(ce[1]=ee=>i("toggle"))},[Fe(H.$slots,"input-icon")])):se("",!0),!H.$slots["input-icon"]&&!H.hideInputIcon&&!H.$slots["dp-input"]?(P(),Ce(Z(Gl),{key:1,"aria-label":(te=Z(o))==null?void 0:te.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:ce[2]||(ce[2]=ee=>i("toggle"))},null,8,["aria-label"])):se("",!0)]),H.$slots["clear-icon"]&&t.inputValue&&H.clearable&&!H.disabled&&!H.readonly?(P(),F("span",jB,[Fe(H.$slots,"clear-icon",{clear:B})])):se("",!0),H.clearable&&!H.$slots["clear-icon"]&&t.inputValue&&!H.disabled&&!H.readonly?(P(),F("button",{key:3,"aria-label":(D=Z(o))==null?void 0:D.clearInput,class:"dp--clear-btn",type:"button",onKeydown:ce[4]||(ce[4]=ee=>Z(si)(ee,()=>B(ee),!0,J)),onClick:ce[5]||(ce[5]=ru(ee=>B(ee),["prevent"]))},[$(Z(oS),{class:"dp__input_icons","data-test":"clear-icon"})],40,KB)):se("",!0)])):se("",!0)])}}}),GB=typeof window<"u"?window:void 0,jg=()=>{},XB=t=>af()?(o_(t),!0):!1,qB=(t,e,n,i)=>{if(!t)return jg;let s=jg;const r=jt(()=>Z(t),a=>{s(),a&&(a.addEventListener(e,n,i),s=()=>{a.removeEventListener(e,n,i),s=jg})},{immediate:!0,flush:"post"}),o=()=>{r(),s()};return XB(o),o},ZB=(t,e,n,i={})=>{const{window:s=GB,event:r="pointerdown"}=i;return s?qB(s,r,o=>{const a=bn(t),l=bn(e);!a||!l||a===o.target||o.composedPath().includes(a)||o.composedPath().includes(l)||n(o)},{passive:!0}):void 0},JB=fn({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...Cf},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=va(),o=me(!1),a=tu(s,"modelValue"),l=tu(s,"timezone"),c=me(null),u=me(null),d=me(null),f=me(!1),g=me(null),p=me(!1),m=me(!1),v=me(!1),y=me(!1),{setMenuFocused:x,setShiftKey:E}=yS(),{clearArrowNav:w}=yo(),{validateDate:b,isValidTime:C}=bo(s),{defaultedTransitions:k,defaultedTextInput:T,defaultedInline:A,defaultedConfig:I,defaultedRange:V,defaultedMultiDates:Y}=Ut(s),{menuTransition:ne,showTransition:N}=Yu(k);Vt(()=>{ee(s.modelValue),Rn().then(()=>{if(!A.value.enabled){const he=ce(g.value);he?.addEventListener("scroll",K),window?.addEventListener("resize",U)}}),A.value.enabled&&(o.value=!0),window?.addEventListener("keyup",oe),window?.addEventListener("keydown",j)}),_o(()=>{if(!A.value.enabled){const he=ce(g.value);he?.removeEventListener("scroll",K),window?.removeEventListener("resize",U)}window?.removeEventListener("keyup",oe),window?.removeEventListener("keydown",j)});const B=Pi(r,"all",s.presetDates),R=Pi(r,"input");jt([a,l],()=>{ee(a.value)},{deep:!0});const{openOnTop:W,menuStyle:X,xCorrect:J,setMenuPosition:H,getScrollableParent:ce,shadowRender:ie}=FB({menuRef:c,menuRefInner:u,inputRef:d,pickerWrapperRef:g,inline:A,emit:i,props:s,slots:r}),{inputValue:te,internalModelValue:D,parseExternalModelValue:ee,emitModelValue:ue,formatInputValue:L,checkBeforeEmit:le}=N4(i,s,f),de=ve(()=>({dp__main:!0,dp__theme_dark:s.dark,dp__theme_light:!s.dark,dp__flex_display:A.value.enabled,"dp--flex-display-collapsed":v.value,dp__flex_display_with_input:A.value.input})),xe=ve(()=>s.dark?"dp__theme_dark":"dp__theme_light"),z=ve(()=>s.teleport?{to:typeof s.teleport=="boolean"?"body":s.teleport,disabled:!s.teleport||A.value.enabled}:{}),fe=ve(()=>({class:"dp__outer_menu_wrap"})),S=ve(()=>A.value.enabled&&(s.timePicker||s.monthPicker||s.yearPicker||s.quarterPicker)),O=()=>{var he,Ae;return(Ae=(he=d.value)==null?void 0:he.$el)==null?void 0:Ae.getBoundingClientRect()},K=()=>{o.value&&(I.value.closeOnScroll?je():H())},U=()=>{var he;o.value&&H();const Ae=(he=u.value)==null?void 0:he.$el.getBoundingClientRect().width;v.value=document.body.offsetWidth<=Ae},oe=he=>{he.key==="Tab"&&!A.value.enabled&&!s.teleport&&I.value.tabOutClosesMenu&&(g.value.contains(document.activeElement)||je()),m.value=he.shiftKey},j=he=>{m.value=he.shiftKey},re=()=>{!s.disabled&&!s.readonly&&(ie(k0,s),H(!1),o.value=!0,o.value&&i("open"),o.value||Ye(),ee(s.modelValue))},Q=()=>{var he;te.value="",Ye(),(he=d.value)==null||he.setParsedDate(null),i("update:model-value",null),i("update:model-timezone-value",null),i("cleared"),I.value.closeOnClearValue&&je()},ge=()=>{const he=D.value;return!he||!Array.isArray(he)&&b(he)?!0:Array.isArray(he)?Y.value.enabled||he.length===2&&b(he[0])&&b(he[1])?!0:V.value.partialRange&&!s.timePicker?b(he[0]):!1:!1},be=()=>{le()&&ge()?(ue(),je()):i("invalid-select",D.value)},we=he=>{Me(),ue(),I.value.closeOnAutoApply&&!he&&je()},Me=()=>{d.value&&T.value.enabled&&d.value.setParsedDate(D.value)},De=(he=!1)=>{s.autoApply&&C(D.value)&&ge()&&(V.value.enabled&&Array.isArray(D.value)?(V.value.partialRange||D.value.length===2)&&we(he):we(he))},Ye=()=>{T.value.enabled||(D.value=null)},je=()=>{A.value.enabled||(o.value&&(o.value=!1,J.value=!1,x(!1),E(!1),w(),i("closed"),te.value&&ee(a.value)),Ye(),i("blur"))},nt=(he,Ae,Ne=!1)=>{if(!he){D.value=null;return}const Xt=Array.isArray(he)?!he.some($i=>!b($i)):b(he),pn=C(he);Xt&&pn?(y.value=!0,D.value=he,Ae&&(p.value=Ne,be(),i("text-submit")),Rn().then(()=>{y.value=!1})):i("invalid-date",he)},et=()=>{s.autoApply&&C(D.value)&&ue(),Me()},Jt=()=>o.value?je():re(),Wt=he=>{D.value=he},gn=()=>{T.value.enabled&&(f.value=!0,L()),i("focus")},Gt=()=>{if(T.value.enabled&&(f.value=!1,ee(s.modelValue),p.value)){const he=d4(g.value,m.value);he?.focus()}i("blur")},Ci=he=>{u.value&&u.value.updateMonthYear(0,{month:v0(he.month),year:v0(he.year)})},qi=he=>{ee(he??s.modelValue)},Qt=(he,Ae)=>{var Ne;(Ne=u.value)==null||Ne.switchView(he,Ae)},ae=he=>I.value.onClickOutside?I.value.onClickOutside(he):je(),Te=(he=0)=>{var Ae;(Ae=u.value)==null||Ae.handleFlow(he)};return ZB(c,d,()=>ae(ge)),e({closeMenu:je,selectDate:be,clearValue:Q,openMenu:re,onScroll:K,formatInputValue:L,updateInternalModelValue:Wt,setMonthYear:Ci,parseModel:qi,switchView:Qt,toggleMenu:Jt,handleFlow:Te,dpWrapMenuRef:c}),(he,Ae)=>(P(),F("div",{ref_key:"pickerWrapperRef",ref:g,class:Ee(de.value),"data-datepicker-instance":""},[$(UB,xn({ref_key:"inputRef",ref:d,"input-value":Z(te),"onUpdate:inputValue":Ae[0]||(Ae[0]=Ne=>Ht(te)?te.value=Ne:null),"is-menu-open":o.value},he.$props,{onClear:Q,onOpen:re,onSetInputDate:nt,onSetEmptyDate:Z(ue),onSelectDate:be,onToggle:Jt,onClose:je,onFocus:gn,onBlur:Gt,onRealBlur:Ae[1]||(Ae[1]=Ne=>f.value=!1),onTextInput:Ae[2]||(Ae[2]=Ne=>he.$emit("text-input",Ne))}),Xn({_:2},[Ge(Z(R),(Ne,Xt)=>({name:Ne,fn:Pe(pn=>[Fe(he.$slots,Ne,In(ii(pn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(P(),Ce(_a(he.teleport?kD:"div"),In(ii(z.value)),{default:Pe(()=>[$(vt,{name:Z(ne)(Z(W)),css:Z(N)&&!Z(A).enabled},{default:Pe(()=>[o.value?(P(),F("div",xn({key:0,ref_key:"dpWrapMenuRef",ref:c},fe.value,{class:{"dp--menu-wrapper":!Z(A).enabled},style:Z(A).enabled?void 0:Z(X)}),[$(k0,xn({ref_key:"dpMenuRef",ref:u},he.$props,{"internal-model-value":Z(D),"onUpdate:internalModelValue":Ae[3]||(Ae[3]=Ne=>Ht(D)?D.value=Ne:null),class:{[xe.value]:!0,"dp--menu-wrapper":he.teleport},"open-on-top":Z(W),"no-overlay-focus":S.value,collapse:v.value,"get-input-rect":O,"is-text-input-date":y.value,onClosePicker:je,onSelectDate:be,onAutoApply:De,onTimeUpdate:et,onFlowStep:Ae[4]||(Ae[4]=Ne=>he.$emit("flow-step",Ne)),onUpdateMonthYear:Ae[5]||(Ae[5]=Ne=>he.$emit("update-month-year",Ne)),onInvalidSelect:Ae[6]||(Ae[6]=Ne=>he.$emit("invalid-select",Z(D))),onAutoApplyInvalid:Ae[7]||(Ae[7]=Ne=>he.$emit("invalid-select",Ne)),onInvalidFixedRange:Ae[8]||(Ae[8]=Ne=>he.$emit("invalid-fixed-range",Ne)),onRecalculatePosition:Z(H),onTooltipOpen:Ae[9]||(Ae[9]=Ne=>he.$emit("tooltip-open",Ne)),onTooltipClose:Ae[10]||(Ae[10]=Ne=>he.$emit("tooltip-close",Ne)),onTimePickerOpen:Ae[11]||(Ae[11]=Ne=>he.$emit("time-picker-open",Ne)),onTimePickerClose:Ae[12]||(Ae[12]=Ne=>he.$emit("time-picker-close",Ne)),onAmPmChange:Ae[13]||(Ae[13]=Ne=>he.$emit("am-pm-change",Ne)),onRangeStart:Ae[14]||(Ae[14]=Ne=>he.$emit("range-start",Ne)),onRangeEnd:Ae[15]||(Ae[15]=Ne=>he.$emit("range-end",Ne)),onDateUpdate:Ae[16]||(Ae[16]=Ne=>he.$emit("date-update",Ne)),onInvalidDate:Ae[17]||(Ae[17]=Ne=>he.$emit("invalid-date",Ne)),onOverlayToggle:Ae[18]||(Ae[18]=Ne=>he.$emit("overlay-toggle",Ne))}),Xn({_:2},[Ge(Z(B),(Ne,Xt)=>({name:Ne,fn:Pe(pn=>[Fe(he.$slots,Ne,In(ii({...pn})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):se("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),ju=(()=>{const t=JB;return t.install=e=>{e.component("Vue3DatePicker",t)},t})(),QB=Object.freeze(Object.defineProperty({__proto__:null,default:ju},Symbol.toStringTag,{value:"Module"}));Object.entries(QB).forEach(([t,e])=>{t!=="default"&&(ju[t]=e)});const eV={name:"newDashboardAPIKey",components:{LocaleText:Le,VueDatePicker:ju},data(){return{newKeyData:{ExpiredAt:Fn().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:Xe()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,dt("/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(Fn(t).format("YYYY-MM-DDTHH:mm:ss")),Fn(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=Fn(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},tV={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)"}},nV={class:"card m-auto rounded-3 mt-5"},iV={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},sV={class:"mb-0"},rV={class:"card-body d-flex gap-2 p-4 flex-column"},oV={class:"text-muted"},aV={class:"d-flex align-items-center gap-2"},lV={class:"form-check"},cV=["disabled"],uV={class:"form-check-label",for:"neverExpire"},dV={key:0,class:"bi bi-check-lg me-2"};function hV(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("VueDatePicker");return P(),F("div",tV,[h("div",nV,[h("div",iV,[h("h6",sV,[$(o,{t:"Create API Key"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),h("div",rV,[h("small",oV,[$(o,{t:"When should this API Key expire?"})]),h("div",aV,[$(a,{is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.neverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),h("div",lV,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=l=>this.newKeyData.neverExpire=l),id:"neverExpire",disabled:this.submitting},null,8,cV),[[Gn,this.newKeyData.neverExpire]]),h("label",uV,[$(o,{t:"Never Expire"}),e[3]||(e[3]=Be(" (")),e[4]||(e[4]=h("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),$(o,{t:"Don't think that's a good idea"}),e[5]||(e[5]=Be(") "))])]),h("button",{class:Ee(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:e[2]||(e[2]=l=>this.submitNewAPIKey())},[this.submitting?se("",!0):(P(),F("i",dV)),this.submitting?(P(),Ce(o,{key:1,t:"Creating..."})):(P(),Ce(o,{key:2,t:"Create"}))],2)])])])}const fV=ze(eV,[["render",hV]]),gV={name:"dashboardAPIKey",components:{LocaleText:Le},props:{apiKey:Object},setup(){return{store:Xe()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){dt("/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")})}}},pV={class:"card rounded-3 shadow-sm"},mV={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},_V={class:"d-flex align-items-center gap-2"},vV={class:"text-muted"},yV={style:{"word-break":"break-all"}},bV={class:"d-flex align-items-center gap-2 ms-auto"},wV={class:"text-muted"},xV={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function EV(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",pV,[this.confirmDelete?(P(),F(Ie,{key:1},[this.store.getActiveCrossServer()?se("",!0):(P(),F("div",xV,[$(o,{t:"Are you sure to delete this API key?"}),h("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:e[1]||(e[1]=a=>this.deleteAPIKey())},e[4]||(e[4]=[h("i",{class:"bi bi-check-lg"},null,-1)])),h("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:e[2]||(e[2]=a=>this.confirmDelete=!1)},e[5]||(e[5]=[h("i",{class:"bi bi-x-lg"},null,-1)]))]))],64)):(P(),F("div",mV,[h("div",_V,[h("small",vV,[$(o,{t:"Key"})]),h("span",yV,pe(this.apiKey.Key),1)]),h("div",bV,[h("small",wV,[$(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?se("",!0):(P(),Ce(o,{key:0,t:"Never Expire"})),h("span",null,pe(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?se("",!0):(P(),F("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=a=>this.confirmDelete=!0)},e[3]||(e[3]=[h("i",{class:"bi bi-trash-fill"},null,-1)])))]))])}const CV=ze(gV,[["render",EV],["__scopeId","data-v-a76253c8"]]),SV={name:"dashboardAPIKeys",components:{LocaleText:Le,DashboardAPIKey:CV,NewDashboardAPIKey:fV},setup(){return{store:Xe()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await dt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},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?Pt("/api/getDashboardAPIKeys",{},e=>{console.log(e),e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},kV={class:"card rounded-3"},TV={class:"my-2"},AV={key:0,class:"form-check form-switch ms-auto"},PV={class:"form-check-label",for:"allowAPIKeysSwitch"},MV={key:0,class:"card-body position-relative d-flex flex-column gap-2"},IV={key:1,class:"card",style:{height:"300px"}},DV={class:"card-body d-flex text-muted"},RV={class:"m-auto"},$V={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function LV(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("DashboardAPIKey"),l=Se("NewDashboardAPIKey");return P(),F("div",kV,[h("div",{class:Ee(["card-header d-flex align-items-center",{"border-bottom-0 rounded-3":!this.value}])},[h("h6",TV,[$(o,{t:"API Keys"})]),this.store.getActiveCrossServer()?se("",!0):(P(),F("div",AV,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=c=>this.value=c),onChange:e[1]||(e[1]=c=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[Gn,this.value]]),h("label",PV,[this.value?(P(),Ce(o,{key:0,t:"Enabled"})):(P(),Ce(o,{key:1,t:"Disabled"}))])]))],2),this.value?(P(),F("div",MV,[this.store.getActiveCrossServer()?se("",!0):(P(),F("button",{key:0,class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:e[2]||(e[2]=c=>this.newDashboardAPIKey=!0)},[e[6]||(e[6]=h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),$(o,{t:"API Key"})])),this.apiKeys.length===0?(P(),F("div",IV,[h("div",DV,[h("span",RV,[$(o,{t:"No WGDashboard API Key"})])])])):(P(),F("div",$V,[$(vo,{name:"apiKey"},{default:Pe(()=>[(P(!0),F(Ie,null,Ge(this.apiKeys,c=>(P(),Ce(a,{apiKey:c,key:c.Key,onDeleted:e[3]||(e[3]=u=>this.apiKeys=u)},null,8,["apiKey"]))),128))]),_:1})])),$(vt,{name:"zoomReversed"},{default:Pe(()=>[this.newDashboardAPIKey?(P(),Ce(l,{key:0,onCreated:e[4]||(e[4]=c=>this.apiKeys=c),onClose:e[5]||(e[5]=c=>this.newDashboardAPIKey=!1)})):se("",!0)]),_:1})])):se("",!0)])}const OV=ze(SV,[["render",LV],["__scopeId","data-v-3d3ef755"]]),NV={name:"accountSettingsMFA",components:{LocaleText:Le},setup(){const t=Xe(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await dt("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await dt("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},FV={class:"d-flex align-items-center"},BV={class:"form-check form-switch"},VV={for:"allowMFAKeysSwitch"};function WV(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("div",FV,[h("div",BV,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[Gn,this.status]]),h("label",VV,[this.status?(P(),Ce(o,{key:0,t:"Enabled"})):(P(),Ce(o,{key:1,t:"Disabled"}))])]),this.status?(P(),F("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:e[1]||(e[1]=a=>this.resetMFA())},[e[2]||(e[2]=h("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(P(),Ce(o,{key:0,t:"Reset"})):(P(),Ce(o,{key:1,t:"Setup"})),e[3]||(e[3]=Be(" MFA "))])):se("",!0)])])}const zV=ze(NV,[["render",WV]]),YV={name:"dashboardLanguage",components:{LocaleText:Le},setup(){return{store:Xe()}},data(){return{languages:void 0}},mounted(){Pt("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){dt("/api/locale/update",{lang_id:t},e=>{e.status?(this.store.Configuration.Server.dashboard_language=t,this.store.Locale=e.data):this.store.newMessage("Server","Dashboard language update failed","danger")})}},computed:{currentLanguage(){let t=this.store.Configuration.Server.dashboard_language;return this.languages.find(e=>e.lang_id===t)}}},HV={class:"text-muted d-block mb-1"},jV={class:"d-flex gap-2"},KV={class:"dropdown w-100"},UV=["disabled"],GV={key:1},XV={class:"dropdown-menu rounded-3 shadow"},qV=["onClick"],ZV={class:"me-auto mb-0"},JV={class:"d-block",style:{"font-size":"0.8rem"}},QV={key:0,class:"bi bi-check text-primary fs-5"};function e6(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("small",HV,[h("strong",null,[$(o,{t:"Language"})])]),h("div",jV,[h("div",KV,[h("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?(P(),F("span",GV,pe(r.currentLanguage?.lang_name_localized),1)):(P(),Ce(o,{key:0,t:"Loading..."}))],8,UV),h("ul",XV,[(P(!0),F(Ie,null,Ge(this.languages,a=>(P(),F("li",null,[h("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:l=>this.changeLanguage(a.lang_id)},[h("p",ZV,[Be(pe(a.lang_name_localized)+" ",1),h("small",JV,pe(a.lang_name),1)]),r.currentLanguage?.lang_id===a.lang_id?(P(),F("i",QV)):se("",!0)],8,qV)]))),256))])])])])}const t6=ze(YV,[["render",e6],["__scopeId","data-v-08b165a8"]]),n6={name:"dashboardIPPortInput",components:{LocaleText:Le},setup(){return{store:Xe()}},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,e,n){this.changed&&(this.updating=!0,await dt("/api/updateDashboardConfigurationItem",{section:"Server",key:e,value:n},i=>{i.status?(t.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[e]=n,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=i.message),this.changed=!1,this.updating=!1}))}}},i6={class:"row g-2"},s6={class:"col-sm"},r6={class:"form-group"},o6={for:"input_dashboard_ip",class:"text-muted mb-1"},a6=["disabled"],l6={class:"invalid-feedback"},c6={class:"col-sm"},u6={class:"form-group"},d6={for:"input_dashboard_ip",class:"text-muted mb-1"},h6=["disabled"],f6={class:"invalid-feedback"},g6={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 p6(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("div",i6,[h("div",s6,[h("div",r6,[h("label",o6,[h("strong",null,[h("small",null,[$(o,{t:"IP Address / Hostname"})])])]),Re(h("input",{type:"text",class:Ee(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[0]||(e[0]=a=>this.ipAddress=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,a6),[[We,this.ipAddress]]),h("div",l6,pe(this.invalidFeedback),1)])]),h("div",c6,[h("div",u6,[h("label",d6,[h("strong",null,[h("small",null,[$(o,{t:"Listen Port"})])])]),Re(h("input",{type:"number",class:Ee(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[3]||(e[3]=a=>this.port=a),onKeydown:e[4]||(e[4]=a=>this.changed=!0),onBlur:e[5]||(e[5]=a=>r.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,h6),[[We,this.port]]),h("div",f6,pe(this.invalidFeedback),1)])])]),h("div",g6,[h("small",null,[e[6]||(e[6]=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),$(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])}const m6=ze(n6,[["render",p6]]),_6={class:"card rounded-3"},v6={class:"card-header"},y6={class:"my-2"},b6={class:"card-body d-flex gap-2"},w6={class:"list-group w-100"},x6=["onClick"],E6={__name:"dashboardSettingsWireguardConfigurationAutostart",setup(t){const e=Xe(),n=$n(),i=me(e.Configuration.WireGuardConfiguration.autostart),s=ve(()=>n.Configurations.map(a=>a.Name)),r=async()=>{await dt("/api/updateDashboardConfigurationItem",{section:"WireGuardConfiguration",key:"autostart",value:i.value},async a=>{a.status?e.newMessage("Server","Start up configurations saved","success"):e.newMessage("Server","Start up configurations failed to save","danger")})},o=a=>{i.value.includes(a)?i.value=i.value.filter(l=>l!==a):i.value.push(a)};return jt(i,()=>{r()},{deep:!0}),(a,l)=>(P(),F("div",_6,[h("div",v6,[h("h6",y6,[$(Le,{t:"Toggle When Start Up"})])]),h("div",b6,[h("div",w6,[(P(!0),F(Ie,null,Ge(s.value,c=>(P(),F("button",{type:"button",key:c,onClick:u=>o(c),class:"list-group-item list-group-item-action py-2 w-100 d-flex align-items-center"},[h("samp",null,pe(c),1),h("i",{class:Ee(["ms-auto",[i.value.includes(c)?"bi-check-circle-fill":"bi-circle"]])},null,2)],8,x6))),128))])])]))}},C6=ze(E6,[["__scopeId","data-v-c1f65888"]]),S6={name:"settings",methods:{ipV46RegexCheck:j3},components:{DashboardSettingsWireguardConfigurationAutostart:C6,DashboardIPPortInput:m6,DashboardLanguage:t6,LocaleText:Le,AccountSettingsMFA:zV,DashboardAPIKeys:OV,DashboardSettingsInputIPAddressAndPort:qN,DashboardTheme:BN,DashboardSettingsInputWireguardConfigurationPath:$N,AccountSettingsInputPassword:_N,AccountSettingsInputUsername:J3,PeersDefaultSettingsInput:H3},setup(){return{dashboardConfigurationStore:Xe()}},data(){return{activeTab:"WGDashboard"}}},k6={class:"mt-md-5 mt-3 text-body mb-3"},T6={class:"container-md d-flex flex-column gap-4"},A6={class:"nav nav-pills nav-justified align-items-center gap-2"},P6={class:"nav-item"},M6={class:"nav-item"},I6={class:"nav-item"},D6={key:0,class:"d-flex gap-3 flex-column"},R6={key:1,class:"d-flex gap-3 flex-column"},$6={class:"card rounded-3"},L6={class:"card-header"},O6={class:"my-2"},N6={class:"card-body"},F6={key:2,class:"d-flex gap-3 flex-column"},B6={class:"card rounded-3"},V6={class:"card-header"},W6={class:"my-2"},z6={class:"card-body"},Y6={class:"row g-2"},H6={class:"col-sm"},j6={class:"col-sm"},K6={class:"card"},U6={class:"card-header"},G6={class:"my-2"},X6={class:"card-body"},q6={class:"card"},Z6={class:"card-header"},J6={class:"my-2"},Q6={class:"card-body d-flex flex-column gap-3"},e8={class:"card"},t8={class:"card-header"},n8={class:"my-2"},i8={class:"card-body"};function s8(t,e,n,i,s,r){const o=Se("DashboardSettingsInputWireguardConfigurationPath"),a=Se("DashboardSettingsWireguardConfigurationAutostart"),l=Se("LocaleText"),c=Se("PeersDefaultSettingsInput"),u=Se("DashboardTheme"),d=Se("DashboardLanguage"),f=Se("DashboardIPPortInput"),g=Se("AccountSettingsInputUsername"),p=Se("AccountSettingsInputPassword"),m=Se("AccountSettingsMFA"),v=Se("DashboardAPIKeys");return P(),F("div",k6,[h("div",T6,[h("div",null,[h("ul",A6,[h("li",P6,[h("a",{class:Ee(["nav-link rounded-3",{active:this.activeTab==="WGDashboard"}]),onClick:e[0]||(e[0]=y=>this.activeTab="WGDashboard"),role:"button"},e[3]||(e[3]=[h("h6",{class:"my-2"}," WGDashboard Settings ",-1)]),2)]),h("li",M6,[h("a",{class:Ee(["nav-link rounded-3",{active:this.activeTab==="Peers"}]),onClick:e[1]||(e[1]=y=>this.activeTab="Peers"),role:"button"},e[4]||(e[4]=[h("h6",{class:"my-2"}," Peers Settings ",-1)]),2)]),h("li",I6,[h("a",{class:Ee(["nav-link rounded-3",{active:this.activeTab==="WireGuardConfiguration"}]),onClick:e[2]||(e[2]=y=>this.activeTab="WireGuardConfiguration"),role:"button"},e[5]||(e[5]=[h("h6",{class:"my-2"}," WireGuard Configuration Settings ",-1)]),2)])]),e[7]||(e[7]=h("hr",null,null,-1)),h("div",null,[$(vt,{name:"fade2",mode:"out-in"},{default:Pe(()=>[s.activeTab==="WireGuardConfiguration"?(P(),F("div",D6,[$(o,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"}),$(a)])):s.activeTab==="Peers"?(P(),F("div",R6,[h("div",$6,[h("div",L6,[h("h6",O6,[$(l,{t:"Peer Default Settings"})])]),h("div",N6,[h("div",null,[$(c,{targetData:"peer_global_dns",title:"DNS"}),$(c,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),$(c,{targetData:"peer_mtu",title:"MTU"}),$(c,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),$(c,{targetData:"remote_endpoint",title:"Peer Remote Endpoint",warning:!0,warningText:"This will be changed globally, and will be apply to all peer's QR code and configuration file."})])])])])):s.activeTab==="WGDashboard"?(P(),F("div",F6,[h("div",B6,[h("div",V6,[h("h6",W6,[$(l,{t:"Appearance"})])]),h("div",z6,[h("div",Y6,[h("div",H6,[$(u)]),h("div",j6,[$(d)])])])]),h("div",K6,[h("div",U6,[h("h6",G6,[$(l,{t:"Dashboard IP Address & Listen Port"})])]),h("div",X6,[$(f)])]),h("div",q6,[h("div",Z6,[h("h6",J6,[$(l,{t:"Account Settings"})])]),h("div",Q6,[h("div",null,[$(g,{targetData:"username",title:"Username"})]),e[6]||(e[6]=h("hr",null,null,-1)),h("div",null,[$(p,{targetData:"password"})])])]),h("div",e8,[h("div",t8,[h("h6",n8,[$(l,{t:"Multi-Factor Authentication (MFA)"})])]),h("div",i8,[this.dashboardConfigurationStore.getActiveCrossServer()?se("",!0):(P(),Ce(m,{key:0}))])]),$(v)])):se("",!0)]),_:1})])])])])}const r8=ze(S6,[["render",s8]]),o8={name:"setup",components:{LocaleText:Le},setup(){return{store:Xe()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!0},loading:!1,errorMessage:"",done:!1}},computed:{goodToSubmit(){return this.setup.username&&this.setup.newPassword.length>=8&&this.setup.repeatNewPassword.length>=8&&this.setup.newPassword===this.setup.repeatNewPassword}},methods:{submit(){this.loading=!0,dt("/api/Welcome_Finish",this.setup,t=>{t.status?(this.done=!0,this.$router.push("/2FASetup")):(document.querySelectorAll("#createAccount input").forEach(e=>e.classList.add("is-invalid")),this.errorMessage=t.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},a8=["data-bs-theme"],l8={class:"m-auto text-body",style:{width:"500px"}},c8={class:"dashboardLogo display-4"},u8={class:"mb-5"},d8={key:0,class:"alert alert-danger"},h8={class:"d-flex flex-column gap-3"},f8={id:"createAccount",class:"d-flex flex-column gap-2"},g8={class:"form-group text-body"},p8={for:"username",class:"mb-1 text-muted"},m8={class:"form-group text-body"},_8={for:"password",class:"mb-1 text-muted"},v8={class:"form-group text-body"},y8={for:"confirmPassword",class:"mb-1 text-muted"},b8=["disabled"],w8={key:0,class:"d-flex align-items-center w-100"},x8={key:1,class:"d-flex align-items-center w-100"};function E8(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[h("div",l8,[h("span",c8,[$(o,{t:"Nice to meet you!"})]),h("p",u8,[$(o,{t:"Please fill in the following fields to finish setup"}),e[4]||(e[4]=Be(" 😊"))]),h("div",null,[h("h3",null,[$(o,{t:"Create an account"})]),this.errorMessage?(P(),F("div",d8,pe(this.errorMessage),1)):se("",!0),h("div",h8,[h("form",f8,[h("div",g8,[h("label",p8,[h("small",null,[$(o,{t:"Enter an username you like"})])]),Re(h("input",{type:"text",autocomplete:"username","onUpdate:modelValue":e[0]||(e[0]=a=>this.setup.username=a),class:"form-control",id:"username",name:"username",required:""},null,512),[[We,this.setup.username]])]),h("div",m8,[h("label",_8,[h("small",null,[$(o,{t:"Enter a password"}),h("code",null,[$(o,{t:"(At least 8 characters and make sure is strong enough!)"})])])]),Re(h("input",{type:"password",autocomplete:"new-password","onUpdate:modelValue":e[1]||(e[1]=a=>this.setup.newPassword=a),class:"form-control",id:"password",name:"password",required:""},null,512),[[We,this.setup.newPassword]])]),h("div",v8,[h("label",y8,[h("small",null,[$(o,{t:"Confirm password"})])]),Re(h("input",{type:"password",autocomplete:"confirm-new-password","onUpdate:modelValue":e[2]||(e[2]=a=>this.setup.repeatNewPassword=a),class:"form-control",id:"confirmPassword",name:"confirmPassword",required:""},null,512),[[We,this.setup.repeatNewPassword]])])]),h("button",{class:"btn btn-dark btn-lg mb-5 d-flex btn-brand shadow align-items-center",ref:"signInBtn",disabled:!this.goodToSubmit||this.loading||this.done,onClick:e[3]||(e[3]=a=>this.submit())},[!this.loading&&!this.done?(P(),F("span",w8,[$(o,{t:"Next"}),e[5]||(e[5]=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1))])):(P(),F("span",x8,[$(o,{t:"Saving..."}),e[6]||(e[6]=h("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1))]))],8,b8)])])])],8,a8)}const C8=ze(o8,[["render",E8]]);function K_(t){return t.includes(":")?6:t.includes(".")?4:0}function S8(t){const e=K_(t);if(!e)throw new Error(`Invalid IP address: ${t}`);let n=0n,i=0n;const s=Object.create(null);if(e===4)for(const r of t.split(".").map(BigInt).reverse())n+=r*2n**i,i+=8n;else{if(t.includes(".")&&(s.ipv4mapped=!0,t=t.split(":").map(a=>{if(a.includes(".")){const[l,c,u,d]=a.split(".").map(f=>Number(f).toString(16).padStart(2,"0"));return`${l}${c}:${u}${d}`}else return a}).join(":")),t.includes("%")){let a;[,t,a]=/(.+)%(.+)/.exec(t)||[],s.scopeid=a}const r=t.split(":"),o=r.indexOf("");if(o!==-1)for(;r.length<8;)r.splice(o,0,"");for(const a of r.map(l=>BigInt(parseInt(l||"0",16))).reverse())n+=a*2n**i,i+=16n}return s.number=n,s.version=e,s}const Kg={4:32,6:128},k8=t=>t.includes("/")?K_(t):0;function am(t){const e=k8(t),n=Object.create(null);if(e)n.cidr=t,n.version=e;else{const d=K_(t);if(d)n.cidr=`${t}/${Kg[d]}`,n.version=d;else throw new Error(`Network is not a CIDR or IP: ${t}`)}const[i,s]=n.cidr.split("/");if(!/^[0-9]+$/.test(s))throw new Error(`Network is not a CIDR or IP: ${t}`);n.prefix=s,n.single=s===String(Kg[n.version]);const{number:r,version:o}=S8(i),a=Kg[o],l=r.toString(2).padStart(a,"0"),c=Number(a-s),u=l.substring(0,a-c);return n.start=BigInt(`0b${u}${"0".repeat(c)}`),n.end=BigInt(`0b${u}${"1".repeat(c)}`),n}/*! SPDX-License-Identifier: GPL-2.0 - * - * Copyright (C) 2015-2020 Jason A. Donenfeld . All Rights Reserved. - */(function(){function t(b){var C=new Float64Array(16);if(b)for(var k=0;k>16&1),T[I-1]&=65535;T[15]=A[15]-32767-(T[14]>>16&1),k=T[15]>>16&1,T[14]&=65535,i(A,T,1-k)}for(var I=0;I<16;++I)b[2*I]=A[I]&255,b[2*I+1]=A[I]>>8}function n(b){for(var C=0;C<16;++C)b[(C+1)%16]+=(C<15?1:38)*Math.floor(b[C]/65536),b[C]&=65535}function i(b,C,k){for(var T,A=~(k-1),I=0;I<16;++I)T=A&(b[I]^C[I]),b[I]^=T,C[I]^=T}function s(b,C,k){for(var T=0;T<16;++T)b[T]=C[T]+k[T]|0}function r(b,C,k){for(var T=0;T<16;++T)b[T]=C[T]-k[T]|0}function o(b,C,k){for(var T=new Float64Array(31),A=0;A<16;++A)for(var I=0;I<16;++I)T[A+I]+=C[A]*k[I];for(var A=0;A<15;++A)T[A]+=38*T[A+16];for(var A=0;A<16;++A)b[A]=T[A];n(b),n(b)}function a(b,C){for(var k=t(),T=0;T<16;++T)k[T]=C[T];for(var T=253;T>=0;--T)o(k,k,k),T!==2&&T!==4&&o(k,k,C);for(var T=0;T<16;++T)b[T]=k[T]}function l(b){b[31]=b[31]&127|64,b[0]&=248}function c(b){for(var C,k=new Uint8Array(32),T=t([1]),A=t([9]),I=t(),V=t([1]),Y=t(),ne=t(),N=t([56129,1]),B=t([9]),R=0;R<32;++R)k[R]=b[R];l(k);for(var R=254;R>=0;--R)C=k[R>>>3]>>>(R&7)&1,i(T,A,C),i(I,V,C),s(Y,T,I),r(T,T,I),s(I,A,V),r(A,A,V),o(V,Y,Y),o(ne,T,T),o(T,I,T),o(I,A,Y),s(Y,T,I),r(T,T,I),o(A,T,T),r(I,V,ne),o(T,I,N),s(T,T,V),o(I,I,T),o(T,V,ne),o(V,A,B),o(A,Y,Y),i(T,A,C),i(I,V,C);return a(I,I),o(T,T,I),e(k,T),k}function u(){var b=new Uint8Array(32);return window.crypto.getRandomValues(b),b}function d(){var b=u();return l(b),b}function f(b,C){for(var k=Uint8Array.from([C[0]>>2&63,(C[0]<<4|C[1]>>4)&63,(C[1]<<2|C[2]>>6)&63,C[2]&63]),T=0;T<4;++T)b[T]=k[T]+65+(25-k[T]>>8&6)-(51-k[T]>>8&75)-(61-k[T]>>8&15)+(62-k[T]>>8&3)}function g(b){var C,k=new Uint8Array(44);for(C=0;C<32/3;++C)f(k.subarray(C*4),b.subarray(C*3));return f(k.subarray(C*4),Uint8Array.from([b[C*3+0],b[C*3+1],0])),k[43]=61,String.fromCharCode.apply(null,k)}function p(b){let C=window.atob(b),k=C.length,T=new Uint8Array(k);for(let I=0;I>>8&255,C>>>16&255,C>>>24&255)}function v(b,C){b.push(C&255,C>>>8&255)}function y(b,C){for(var k=0;k>>1:C>>>1;E.table[k]=C}}for(var A=-1,I=0;I>>8^E.table[(A^b[I])&255];return(A^-1)>>>0}function w(b){for(var C=[],k=[],T=0,A=0;A{t.status?(this.success=!0,await this.store.getConfigurations(),this.$router.push(`/configuration/${this.newConfiguration.ConfigurationName}/peers`)):(this.error=!0,this.errorMessage=t.message,document.querySelector(`#${t.data}`).classList.remove("is-valid"),document.querySelector(`#${t.data}`).classList.add("is-invalid"),this.loading=!1)}))}},computed:{goodToSubmit(){let t=["ConfigurationName","Address","ListenPort","PrivateKey"],e=[...document.querySelectorAll("input[required]")];return t.find(n=>this.newConfiguration[n].length===0)===void 0&&e.find(n=>n.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(t){let e=document.querySelector("#Address");e.classList.remove("is-invalid","is-valid");try{if(t.trim().split("/").filter(s=>s.length>0).length!==2)throw Error();let n=am(t),i=n.end-n.start;this.numberOfAvailableIPs=i.toLocaleString(),e.classList.add("is-valid")}catch{this.numberOfAvailableIPs="0",e.classList.add("is-invalid")}},"newConfiguration.ListenPort"(t){let e=document.querySelector("#ListenPort");e.classList.remove("is-invalid","is-valid"),t<0||t>65353||!Number.isInteger(t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.ConfigurationName"(t){let e=document.querySelector("#ConfigurationName");e.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t)||t.length===0||this.store.Configurations.find(n=>n.Name===t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.PrivateKey"(t){let e=document.querySelector("#PrivateKey");e.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(t),e.classList.add("is-valid")}catch{e.classList.add("is-invalid")}}}},A8={class:"mt-5 text-body"},P8={class:"container mb-4"},M8={class:"mb-4 d-flex align-items-center gap-4"},I8={class:"mb-0"},D8={class:"card rounded-3 shadow"},R8={class:"card-header"},$8={class:"card-body"},L8=["disabled"],O8={class:"invalid-feedback"},N8={key:0},F8={key:1},B8={class:"mb-0"},V8={class:"card rounded-3 shadow"},W8={class:"card-header"},z8={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},Y8={class:"mb-2"},H8={class:"text-muted fw-bold mb-1"},j8={class:"input-group"},K8=["disabled"],U8={class:"text-muted fw-bold mb-1"},G8={class:"card rounded-3 shadow"},X8={class:"card-header"},q8={class:"card-body"},Z8=["disabled"],J8={class:"invalid-feedback"},Q8={key:0},eW={key:1},tW={class:"card rounded-3 shadow"},nW={class:"card-header d-flex align-items-center"},iW={class:"badge rounded-pill text-bg-success ms-auto"},sW={class:"card-body"},rW=["disabled"],oW={class:"invalid-feedback"},aW={key:0},lW={key:1},cW={class:"accordion",id:"newConfigurationOptionalAccordion"},uW={class:"accordion-item"},dW={class:"accordion-header"},hW={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},fW={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},gW={class:"accordion-body d-flex flex-column gap-3"},pW={class:"card rounded-3"},mW={class:"card-body"},_W={class:"card rounded-3"},vW={class:"card-body"},yW={class:"card rounded-3"},bW={class:"card-body"},wW={class:"card rounded-3"},xW={class:"card-body"},EW=["disabled"],CW={key:0,class:"d-flex w-100"},SW={key:1,class:"d-flex w-100"},kW={key:2,class:"d-flex w-100 align-items-center"};function TW(t,e,n,i,s,r){const o=Se("RouterLink"),a=Se("LocaleText");return P(),F("div",A8,[h("div",P8,[h("div",M8,[$(o,{to:"/",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:Pe(()=>e[11]||(e[11]=[h("h2",{class:"mb-0",style:{"line-height":"0"}},[h("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1}),h("h2",I8,[$(a,{t:"New Configuration"})]),$(o,{to:"/restore_configuration",class:"btn btn-dark btn-brand p-2 shadow ms-auto",style:{"border-radius":"100%"}},{default:Pe(()=>e[12]||(e[12]=[h("h2",{class:"mb-0",style:{"line-height":"0"}},[h("i",{class:"bi bi-clock-history"})],-1)])),_:1})]),h("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[10]||(e[10]=l=>{l.preventDefault(),this.saveNewConfiguration()})},[h("div",D8,[h("div",R8,[$(a,{t:"Configuration Name"})]),h("div",$8,[Re(h("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":e[0]||(e[0]=l=>this.newConfiguration.ConfigurationName=l),disabled:this.loading,required:""},null,8,L8),[[We,this.newConfiguration.ConfigurationName]]),h("div",O8,[this.error?(P(),F("div",N8,pe(this.errorMessage),1)):(P(),F("div",F8,[$(a,{t:"Configuration name is invalid. Possible reasons:"}),h("ul",B8,[h("li",null,[$(a,{t:"Configuration name already exist."})]),h("li",null,[$(a,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),h("div",V8,[h("div",W8,[$(a,{t:"Private Key"}),e[13]||(e[13]=Be(" & ")),$(a,{t:"Public Key"})]),h("div",z8,[h("div",Y8,[h("label",H8,[h("small",null,[$(a,{t:"Private Key"})])]),h("div",j8,[Re(h("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":e[1]||(e[1]=l=>this.newConfiguration.PrivateKey=l)},null,8,K8),[[We,this.newConfiguration.PrivateKey]]),h("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=l=>r.wireguardGenerateKeypair())},e[14]||(e[14]=[h("i",{class:"bi bi-arrow-repeat"},null,-1)]))])]),h("div",null,[h("label",U8,[h("small",null,[$(a,{t:"Public Key"})])]),Re(h("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":e[3]||(e[3]=l=>this.newConfiguration.PublicKey=l),disabled:""},null,512),[[We,this.newConfiguration.PublicKey]])])])]),h("div",G8,[h("div",X8,[$(a,{t:"Listen Port"})]),h("div",q8,[Re(h("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":e[4]||(e[4]=l=>this.newConfiguration.ListenPort=l),disabled:this.loading,required:""},null,8,Z8),[[We,this.newConfiguration.ListenPort]]),h("div",J8,[this.error?(P(),F("div",Q8,pe(this.errorMessage),1)):(P(),F("div",eW,[$(a,{t:"Invalid port"})]))])])]),h("div",tW,[h("div",nW,[$(a,{t:"IP Address/CIDR"}),h("span",iW,pe(s.numberOfAvailableIPs)+" Available IPs",1)]),h("div",sW,[Re(h("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":e[5]||(e[5]=l=>this.newConfiguration.Address=l),disabled:this.loading,required:""},null,8,rW),[[We,this.newConfiguration.Address]]),h("div",oW,[this.error?(P(),F("div",aW,pe(this.errorMessage),1)):(P(),F("div",lW," IP Address/CIDR is invalid "))])])]),e[23]||(e[23]=h("hr",null,null,-1)),h("div",cW,[h("div",uW,[h("h2",dW,[h("button",hW,[$(a,{t:"Optional Settings"})])]),h("div",fW,[h("div",gW,[h("div",pW,[e[15]||(e[15]=h("div",{class:"card-header"},"PreUp",-1)),h("div",mW,[Re(h("input",{type:"text",class:"form-control",id:"preUp","onUpdate:modelValue":e[6]||(e[6]=l=>this.newConfiguration.PreUp=l)},null,512),[[We,this.newConfiguration.PreUp]])])]),h("div",_W,[e[16]||(e[16]=h("div",{class:"card-header"},"PreDown",-1)),h("div",vW,[Re(h("input",{type:"text",class:"form-control",id:"preDown","onUpdate:modelValue":e[7]||(e[7]=l=>this.newConfiguration.PreDown=l)},null,512),[[We,this.newConfiguration.PreDown]])])]),h("div",yW,[e[17]||(e[17]=h("div",{class:"card-header"},"PostUp",-1)),h("div",bW,[Re(h("input",{type:"text",class:"form-control",id:"postUp","onUpdate:modelValue":e[8]||(e[8]=l=>this.newConfiguration.PostUp=l)},null,512),[[We,this.newConfiguration.PostUp]])])]),h("div",wW,[e[18]||(e[18]=h("div",{class:"card-header"},"PostDown",-1)),h("div",xW,[Re(h("input",{type:"text",class:"form-control",id:"postDown","onUpdate:modelValue":e[9]||(e[9]=l=>this.newConfiguration.PostDown=l)},null,512),[[We,this.newConfiguration.PostDown]])])])])])])]),h("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!this.goodToSubmit||this.loading||this.success},[this.success?(P(),F("span",CW,[$(a,{t:"Success"}),e[19]||(e[19]=Be("! ")),e[20]||(e[20]=h("i",{class:"bi bi-check-circle-fill ms-2"},null,-1))])):this.loading?(P(),F("span",kW,[$(a,{t:"Saving..."}),e[22]||(e[22]=h("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1))])):(P(),F("span",SW,[e[21]||(e[21]=h("i",{class:"bi bi-save-fill me-2"},null,-1)),$(a,{t:"Save"})]))],8,EW)],32)])])}const AW=ze(T8,[["render",TW]]),PW={name:"configuration"},MW={class:"mt-md-5 mt-3 text-body"};function IW(t,e,n,i,s,r){const o=Se("RouterView");return P(),F("div",MW,[$(o,null,{default:Pe(({Component:a,route:l})=>[$(vt,{name:"fade2",mode:"out-in"},{default:Pe(()=>[(P(),Ce(x_,null,{default:Pe(()=>[(P(),Ce(_a(a),{key:l.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const DW=ze(PW,[["render",IW]]),RW={name:"peerSearch",components:{LocaleText:Le},setup(){const t=Xe(),e=$n();return{store:t,wireguardConfigurationStore:e}},props:{configuration:Object},data(){return{sort:{status:At("Status"),name:At("Name"),allowed_ip:At("Allowed IPs"),restricted:At("Restricted")},interval:{5e3:At("5 Seconds"),1e4:At("10 Seconds"),3e4:At("30 Seconds"),6e4:At("1 Minutes")},searchString:"",searchStringTimeout:void 0,showDisplaySettings:!1,showMoreSettings:!1}},methods:{debounce(){this.searchStringTimeout?(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)):this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)},updateSort(t){dt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:t},e=>{e.status&&this.store.getConfiguration()})},updateRefreshInterval(t){dt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:t},e=>{e.status&&this.store.getConfiguration()})},downloadAllPeer(){Pt(`/api/downloadAllPeers/${this.configuration.Name}`,{},t=>{console.log(t),window.wireguard.generateZipFiles(t,this.configuration.Name)})}},computed:{searchBarPlaceholder(){return At("Search Peers...")}}},$W={class:"mb-3"},LW={class:"d-flex gap-2 z-3 peerSearchContainer"},OW={class:"mt-3 mt-md-0 flex-grow-1"},NW=["placeholder"],FW={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},BW={class:"container-md d-flex h-100 w-100"},VW={class:"m-auto modal-dialog-centered dashboardModal"},WW={class:"card rounded-3 shadow w-100"},zW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},YW={class:"mb-0 fw-normal"},HW={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},jW={class:"text-muted fw-bold mb-2"},KW={class:"list-group"},UW=["onClick"],GW={class:"me-auto"},XW={key:0,class:"bi bi-check text-primary"},qW={class:"text-muted fw-bold mb-2"},ZW={class:"list-group"},JW=["onClick"],QW={class:"me-auto"},ez={key:0,class:"bi bi-check text-primary"},tz={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},nz={class:"container-md d-flex h-100 w-100"},iz={class:"m-auto modal-dialog-centered dashboardModal"},sz={class:"card rounded-3 shadow w-100"},rz={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},oz={class:"mb-0"},az={class:"card-body px-4 pb-4 d-flex gap-3 flex-column pt-0"},lz={class:"text-muted fw-bold mb-2"},cz={class:"list-group"},uz={class:"text-muted fw-bold mb-2"},dz={class:"list-group"};function hz(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink");return P(),F("div",$W,[h("div",LW,[$(a,{to:"create",class:"text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm"},{default:Pe(()=>[e[13]||(e[13]=h("i",{class:"bi bi-plus-lg me-2"},null,-1)),$(o,{t:"Peer"})]),_:1}),h("button",{class:"btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm",onClick:e[0]||(e[0]=l=>this.downloadAllPeer())},[e[14]||(e[14]=h("i",{class:"bi bi-download me-2"},null,-1)),$(o,{t:"Download All"})]),h("div",OW,[Re(h("input",{class:"form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100",placeholder:r.searchBarPlaceholder,id:"searchPeers",onKeyup:e[1]||(e[1]=l=>this.debounce()),"onUpdate:modelValue":e[2]||(e[2]=l=>this.searchString=l)},null,40,NW),[[We,this.searchString]])]),h("button",{onClick:e[3]||(e[3]=l=>this.showDisplaySettings=!0),class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",type:"button","aria-expanded":"false"},[e[15]||(e[15]=h("i",{class:"bi bi-filter-circle me-2"},null,-1)),$(o,{t:"Display"})]),h("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[4]||(e[4]=l=>this.$emit("editConfiguration")),type:"button","aria-expanded":"false"},e[16]||(e[16]=[h("i",{class:"bi bi-gear-fill"},null,-1)])),h("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[5]||(e[5]=l=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},e[17]||(e[17]=[h("i",{class:"bi bi-three-dots"},null,-1)])),$(vt,{name:"zoom"},{default:Pe(()=>[this.showDisplaySettings?(P(),F("div",FW,[h("div",BW,[h("div",VW,[h("div",WW,[h("div",zW,[h("h4",YW,[$(o,{t:"Display"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[6]||(e[6]=l=>this.showDisplaySettings=!1)})]),h("div",HW,[h("div",null,[h("p",jW,[h("small",null,[$(o,{t:"Sort by"})])]),h("div",KW,[(P(!0),F(Ie,null,Ge(this.sort,(l,c)=>(P(),F("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateSort(c)},[h("span",GW,pe(l),1),i.store.Configuration.Server.dashboard_sort===c?(P(),F("i",XW)):se("",!0)],8,UW))),256))])]),h("div",null,[h("p",qW,[h("small",null,[$(o,{t:"Refresh Interval"})])]),h("div",ZW,[(P(!0),F(Ie,null,Ge(this.interval,(l,c)=>(P(),F("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateRefreshInterval(c)},[h("span",QW,pe(l),1),i.store.Configuration.Server.dashboard_refresh_interval===c?(P(),F("i",ez)):se("",!0)],8,JW))),256))])])])])])])])):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[this.showMoreSettings?(P(),F("div",tz,[h("div",nz,[h("div",iz,[h("div",sz,[h("div",rz,[h("h4",oz,[$(o,{t:"Other Settings"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[7]||(e[7]=l=>this.showMoreSettings=!1)})]),h("div",az,[h("div",null,[h("p",lz,[h("small",null,[$(o,{t:"Peers"})])]),h("div",cz,[h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[8]||(e[8]=l=>this.$emit("selectPeers"))},[$(o,{t:"Select Peers"})]),h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[9]||(e[9]=l=>this.$emit("jobsAll"))},[$(o,{t:"Active Jobs"})]),h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[10]||(e[10]=l=>this.$emit("jobLogs"))},[$(o,{t:"Logs"})])])]),h("div",null,[h("p",uz,[h("small",null,[$(o,{t:"Configuration"})])]),h("div",dz,[h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[11]||(e[11]=l=>this.$emit("backupRestore"))},[$(o,{t:"Backup & Restore"})]),h("a",{class:"list-group-item list-group-item-action d-flex text-danger fw-bold",role:"button",onClick:e[12]||(e[12]=l=>this.$emit("deleteConfiguration"))},[$(o,{t:"Delete"})])])])])])])])])):se("",!0)]),_:1})])])}const fz=ze(RW,[["render",hz],["__scopeId","data-v-aaa147c4"]]);function gz(t){return af()?(o_(t),!0):!1}function kS(t){return typeof t=="function"?t():Z(t)}const TS=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const pz=Object.prototype.toString,mz=t=>pz.call(t)==="[object Object]",uh=()=>{},_z=vz();function vz(){var t,e;return TS&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function xc(t){var e;const n=kS(t);return(e=n?.$el)!=null?e:n}const AS=TS?window:void 0;function Ug(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=AS):[e,n,i,s]=t,!e)return uh;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(u=>u()),r.length=0},a=(u,d,f,g)=>(u.addEventListener(d,f,g),()=>u.removeEventListener(d,f,g)),l=jt(()=>[xc(e),kS(s)],([u,d])=>{if(o(),!u)return;const f=mz(d)?{...d}:d;r.push(...n.flatMap(g=>i.map(p=>a(u,g,p,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return gz(c),c}let T0=!1;function yz(t,e,n={}){const{window:i=AS,ignore:s=[],capture:r=!0,detectIframe:o=!1}=n;if(!i)return uh;_z&&!T0&&(T0=!0,Array.from(i.document.body.children).forEach(f=>f.addEventListener("click",uh)),i.document.documentElement.addEventListener("click",uh));let a=!0;const l=f=>s.some(g=>{if(typeof g=="string")return Array.from(i.document.querySelectorAll(g)).some(p=>p===f.target||f.composedPath().includes(p));{const p=xc(g);return p&&(f.target===p||f.composedPath().includes(p))}}),u=[Ug(i,"click",f=>{const g=xc(t);if(!(!g||g===f.target||f.composedPath().includes(g))){if(f.detail===0&&(a=!l(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:r}),Ug(i,"pointerdown",f=>{const g=xc(t);a=!l(f)&&!!(g&&!f.composedPath().includes(g))},{passive:!0}),o&&Ug(i,"blur",f=>{setTimeout(()=>{var g;const p=xc(t);((g=i.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!p?.contains(i.document.activeElement)&&e(f)},0)})].filter(Boolean);return()=>u.forEach(f=>f())}const bz={name:"peerSettingsDropdown",components:{LocaleText:Le},setup(){return{dashboardStore:Xe()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1,confirmDelete:!1}},methods:{downloadPeer(){Pt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{if(t.status){const e=new Blob([t.data.file],{type:"text/plain"}),n=URL.createObjectURL(e),i=`${t.data.fileName}.conf`,s=document.createElement("a");s.href=n,s.download=i,s.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",t.message,"danger")})},downloadQRCode(){Pt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit("qrcode",t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,dt(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,dt(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,dt(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},wz={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},xz={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Ez={class:"text-body d-flex"},Cz={class:"ms-auto"},Sz={key:1},kz={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},Tz={key:2,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Az={key:1,class:"confirmDelete"},Pz={class:"d-flex w-100 gap-2"},Mz=["disabled"],Iz=["disabled"],Dz={key:1};function Rz(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("ul",wz,[this.Peer.restricted?(P(),F("li",Dz,[h("a",{class:Ee(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:e[9]||(e[9]=a=>this.allowAccessPeer()),role:"button"},[e[24]||(e[24]=h("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(P(),Ce(o,{key:1,t:"Allowing Access..."})):(P(),Ce(o,{key:0,t:"Allow Access"}))],2)])):(P(),F(Ie,{key:0},[this.confirmDelete?(P(),F("li",Az,[e[23]||(e[23]=h("small",{style:{"white-space":"break-spaces"},class:"mb-2 d-block fw-bold"},"Are you sure to delete this peer?",-1)),h("div",Pz,[h("button",{disabled:this.deleteBtnDisabled,onClick:e[7]||(e[7]=a=>this.confirmDelete=!1),class:"flex-grow-1 btn btn-sm bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle"},[$(o,{t:"No"})],8,Mz),h("button",{onClick:e[8]||(e[8]=a=>this.deletePeer()),disabled:this.deleteBtnDisabled,class:"flex-grow-1 ms-auto btn btn-sm bg-danger"},[$(o,{t:"Yes"})],8,Iz)])])):(P(),F(Ie,{key:0},[this.Peer.status==="running"?(P(),F(Ie,{key:0},[h("li",xz,[h("span",Ez,[e[10]||(e[10]=h("i",{class:"bi bi-box-arrow-in-right"},null,-1)),h("span",Cz,pe(this.Peer.endpoint),1)])]),e[11]||(e[11]=h("li",null,[h("hr",{class:"dropdown-divider"})],-1))],64)):se("",!0),this.Peer.private_key?(P(),F("li",Tz,[h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[0]||(e[0]=a=>this.downloadPeer())},e[12]||(e[12]=[h("i",{class:"me-auto bi bi-download"},null,-1)])),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[1]||(e[1]=a=>this.downloadQRCode())},e[13]||(e[13]=[h("i",{class:"me-auto bi bi-qr-code"},null,-1)])),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[2]||(e[2]=a=>this.$emit("share"))},e[14]||(e[14]=[h("i",{class:"me-auto bi bi-share"},null,-1)]))])):(P(),F("li",Sz,[h("small",kz,[$(o,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),e[21]||(e[21]=h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:e[3]||(e[3]=a=>this.$emit("setting"))},[e[15]||(e[15]=h("i",{class:"me-auto bi bi-pen"},null,-1)),e[16]||(e[16]=Be()),$(o,{t:"Peer Settings"})])]),h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:e[4]||(e[4]=a=>this.$emit("jobs"))},[e[17]||(e[17]=h("i",{class:"me-auto bi bi-app-indicator"},null,-1)),e[18]||(e[18]=Be()),$(o,{t:"Schedule Jobs"})])]),e[22]||(e[22]=h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),h("li",null,[h("a",{class:Ee(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:e[5]||(e[5]=a=>this.restrictPeer()),role:"button"},[e[19]||(e[19]=h("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(P(),Ce(o,{key:1,t:"Restricting..."})):(P(),Ce(o,{key:0,t:"Restrict Access"}))],2)]),h("li",null,[h("a",{class:Ee(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:e[6]||(e[6]=a=>this.confirmDelete=!0),role:"button"},[e[20]||(e[20]=h("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(P(),Ce(o,{key:1,t:"Deleting..."})):(P(),Ce(o,{key:0,t:"Delete"}))],2)])],64))],64))])}const $z=ze(bz,[["render",Rz],["__scopeId","data-v-3fa1c090"]]),Lz={name:"peer",components:{LocaleText:Le,PeerSettingsDropdown:$z},props:{Peer:Object},data(){return{}},setup(){const t=me(null),e=me(!1);return yz(t,n=>{e.value=!1}),{target:t,subMenuOpened:e}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},Oz={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},Nz={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},Fz={class:"text-primary"},Bz={class:"text-success"},Vz={key:0,class:"text-secondary"},Wz={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},zz={class:"card-body pt-1",style:{"font-size":"0.9rem"}},Yz={class:"mb-1"},Hz={class:"d-block"},jz={class:"text-muted"},Kz={class:"d-block"},Uz={class:"d-flex align-items-end"};function Gz(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("PeerSettingsDropdown");return P(),F("div",{class:Ee(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":n.Peer.restricted}])},[h("div",null,[n.Peer.restricted?(P(),F("div",Wz,[e[11]||(e[11]=h("i",{class:"bi-lock-fill me-2"},null,-1)),$(o,{t:"Access Restricted"})])):(P(),F("div",Oz,[h("div",{class:Ee(["dot ms-0",{active:n.Peer.status==="running"}])},null,2),h("div",Nz,[h("span",Fz,[e[6]||(e[6]=h("i",{class:"bi bi-arrow-down"},null,-1)),h("strong",null,pe((n.Peer.cumu_receive+n.Peer.total_receive).toFixed(4)),1),e[7]||(e[7]=Be(" GB "))]),h("span",Bz,[e[8]||(e[8]=h("i",{class:"bi bi-arrow-up"},null,-1)),h("strong",null,pe((n.Peer.cumu_sent+n.Peer.total_sent).toFixed(4)),1),e[9]||(e[9]=Be(" GB "))]),n.Peer.latest_handshake!=="No Handshake"?(P(),F("span",Vz,[e[10]||(e[10]=h("i",{class:"bi bi-arrows-angle-contract"},null,-1)),Be(" "+pe(r.getLatestHandshake)+" ago ",1)])):se("",!0)])]))]),h("div",zz,[h("h6",null,pe(n.Peer.name?n.Peer.name:"Untitled Peer"),1),h("div",Yz,[e[12]||(e[12]=h("small",{class:"text-muted"}," Public Key ",-1)),h("small",Hz,[h("samp",null,pe(n.Peer.id),1)])]),h("div",null,[h("small",jz,[$(o,{t:"Allowed IPs"})]),h("small",Kz,[h("samp",null,pe(n.Peer.allowed_ip),1)])]),h("div",Uz,[h("div",{class:Ee(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[h("a",{role:"button",class:"text-body",onClick:e[0]||(e[0]=l=>this.subMenuOpened=!0)},e[13]||(e[13]=[h("h5",{class:"mb-0"},[h("i",{class:"bi bi-three-dots"})],-1)])),$(vt,{name:"slide-fade"},{default:Pe(()=>[this.subMenuOpened?(P(),Ce(a,{key:0,onQrcode:e[1]||(e[1]=l=>this.$emit("qrcode",l)),onSetting:e[2]||(e[2]=l=>this.$emit("setting")),onJobs:e[3]||(e[3]=l=>this.$emit("jobs")),onRefresh:e[4]||(e[4]=l=>this.$emit("refresh")),onShare:e[5]||(e[5]=l=>this.$emit("share")),Peer:n.Peer,ref:"target"},null,8,["Peer"])):se("",!0)]),_:1})],2)])])],2)}const Xz=ze(Lz,[["render",Gz],["__scopeId","data-v-116e739e"]]);/*! - * @kurkle/color v0.3.2 - * https://github.com/kurkle/color#readme - * (c) 2023 Jukka Kurkela - * Released under the MIT License - */function Ku(t){return t+.5|0}const Ur=(t,e,n)=>Math.max(Math.min(t,n),e);function Ec(t){return Ur(Ku(t*2.55),0,255)}function no(t){return Ur(Ku(t*255),0,255)}function ir(t){return Ur(Ku(t/2.55)/100,0,1)}function A0(t){return Ur(Ku(t*100),0,100)}const Bi={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},lm=[..."0123456789ABCDEF"],qz=t=>lm[t&15],Zz=t=>lm[(t&240)>>4]+lm[t&15],Ad=t=>(t&240)>>4===(t&15),Jz=t=>Ad(t.r)&&Ad(t.g)&&Ad(t.b)&&Ad(t.a);function Qz(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Bi[t[1]]*17,g:255&Bi[t[2]]*17,b:255&Bi[t[3]]*17,a:e===5?Bi[t[4]]*17:255}:(e===7||e===9)&&(n={r:Bi[t[1]]<<4|Bi[t[2]],g:Bi[t[3]]<<4|Bi[t[4]],b:Bi[t[5]]<<4|Bi[t[6]],a:e===9?Bi[t[7]]<<4|Bi[t[8]]:255})),n}const eY=(t,e)=>t<255?e(t):"";function tY(t){var e=Jz(t)?qz:Zz;return t?"#"+e(t.r)+e(t.g)+e(t.b)+eY(t.a,e):void 0}const nY=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function PS(t,e,n){const i=e*Math.min(n,1-n),s=(r,o=(r+t/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function iY(t,e,n){const i=(s,r=(s+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function sY(t,e,n){const i=PS(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)i[s]*=1-e-n,i[s]+=e;return i}function rY(t,e,n,i,s){return t===s?(e-n)/i+(e.5?u/(2-r-o):u/(r+o),l=rY(n,i,s,u,r),l=l*60+.5),[l|0,c||0,a]}function G_(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(no)}function X_(t,e,n){return G_(PS,t,e,n)}function oY(t,e,n){return G_(sY,t,e,n)}function aY(t,e,n){return G_(iY,t,e,n)}function MS(t){return(t%360+360)%360}function lY(t){const e=nY.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?Ec(+e[5]):no(+e[5]));const s=MS(+e[2]),r=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=oY(s,r,o):e[1]==="hsv"?i=aY(s,r,o):i=X_(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}function cY(t,e){var n=U_(t);n[0]=MS(n[0]+e),n=X_(n),t.r=n[0],t.g=n[1],t.b=n[2]}function uY(t){if(!t)return;const e=U_(t),n=e[0],i=A0(e[1]),s=A0(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${ir(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const P0={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"},M0={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 dY(){const t={},e=Object.keys(M0),n=Object.keys(P0);let i,s,r,o,a;for(i=0;i>16&255,r>>8&255,r&255]}return t}let Pd;function hY(t){Pd||(Pd=dY(),Pd.transparent=[0,0,0,0]);const e=Pd[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const fY=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function gY(t){const e=fY.exec(t);let n=255,i,s,r;if(e){if(e[7]!==i){const o=+e[7];n=e[8]?Ec(o):Ur(o*255,0,255)}return i=+e[1],s=+e[3],r=+e[5],i=255&(e[2]?Ec(i):Ur(i,0,255)),s=255&(e[4]?Ec(s):Ur(s,0,255)),r=255&(e[6]?Ec(r):Ur(r,0,255)),{r:i,g:s,b:r,a:n}}}function pY(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ir(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Gg=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Oa=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function mY(t,e,n){const i=Oa(ir(t.r)),s=Oa(ir(t.g)),r=Oa(ir(t.b));return{r:no(Gg(i+n*(Oa(ir(e.r))-i))),g:no(Gg(s+n*(Oa(ir(e.g))-s))),b:no(Gg(r+n*(Oa(ir(e.b))-r))),a:t.a+n*(e.a-t.a)}}function Md(t,e,n){if(t){let i=U_(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=X_(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function IS(t,e){return t&&Object.assign(e||{},t)}function I0(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=no(t[3]))):(e=IS(t,{r:0,g:0,b:0,a:1}),e.a=no(e.a)),e}function _Y(t){return t.charAt(0)==="r"?gY(t):lY(t)}class du{constructor(e){if(e instanceof du)return e;const n=typeof e;let i;n==="object"?i=I0(e):n==="string"&&(i=Qz(e)||hY(e)||_Y(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=IS(this._rgb);return e&&(e.a=ir(e.a)),e}set rgb(e){this._rgb=I0(e)}rgbString(){return this._valid?pY(this._rgb):void 0}hexString(){return this._valid?tY(this._rgb):void 0}hslString(){return this._valid?uY(this._rgb):void 0}mix(e,n){if(e){const i=this.rgb,s=e.rgb;let r;const o=n===r?.5:n,a=2*o-1,l=i.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,i.r=255&c*i.r+r*s.r+.5,i.g=255&c*i.g+r*s.g+.5,i.b=255&c*i.b+r*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,n){return e&&(this._rgb=mY(this._rgb,e._rgb,n)),this}clone(){return new du(this.rgb)}alpha(e){return this._rgb.a=no(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Ku(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Md(this._rgb,2,e),this}darken(e){return Md(this._rgb,2,-e),this}saturate(e){return Md(this._rgb,1,e),this}desaturate(e){return Md(this._rgb,1,-e),this}rotate(e){return cY(this._rgb,e),this}}/*! - * Chart.js v4.4.4 - * https://www.chartjs.org - * (c) 2024 Chart.js Contributors - * Released under the MIT License - */function Us(){}const vY=(()=>{let t=0;return()=>t++})();function gt(t){return t===null||typeof t>"u"}function Yt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function ut(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function nn(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Si(t,e){return nn(t)?t:e}function it(t,e){return typeof t>"u"?e:t}const yY=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,DS=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function $t(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Tt(t,e,n,i){let s,r,o;if(Yt(t))for(r=t.length,s=0;st,x:t=>t.x,y:t=>t.y};function xY(t){const e=t.split("."),n=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function EY(t){const e=xY(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function lo(t,e){return(D0[e]||(D0[e]=EY(e)))(t)}function q_(t){return t.charAt(0).toUpperCase()+t.slice(1)}const fu=t=>typeof t<"u",co=t=>typeof t=="function",R0=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function CY(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Bt=Math.PI,Ft=2*Bt,SY=Ft+Bt,Mh=Number.POSITIVE_INFINITY,kY=Bt/180,dn=Bt/2,Oo=Bt/4,$0=Bt*2/3,Gr=Math.log10,Os=Math.sign;function Uc(t,e,n){return Math.abs(t-e)s-r).pop(),e}function Il(t){return!isNaN(parseFloat(t))&&isFinite(t)}function AY(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function $S(t,e,n){let i,s,r;for(i=0,s=t.length;il&&c=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function J_(t,e,n){n=n||(o=>t[o]1;)r=s+i>>1,n(r)?s=r:i=r;return{lo:s,hi:i}}const cr=(t,e,n,i)=>J_(t,n,i?s=>{const r=t[s][e];return rt[s][e]J_(t,n,i=>t[i][e]>=n);function DY(t,e,n){let i=0,s=t.length;for(;ii&&t[s-1]>n;)s--;return i>0||s{const i="_onData"+q_(n),s=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...r){const o=s.apply(this,r);return t._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...r)}),o}})})}function N0(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(OS.forEach(r=>{delete t[r]}),delete t._chartjs)}function NS(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const FS=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function BS(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,FS.call(window,()=>{i=!1,t.apply(e,n)}))}}function $Y(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const Q_=t=>t==="start"?"left":t==="end"?"right":"center",Yn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,LY=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e;function VS(t,e,n){const i=e.length;let s=0,r=i;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:c,max:u,minDefined:d,maxDefined:f}=o.getUserBounds();d&&(s=Dn(Math.min(cr(a,l,c).lo,n?i:cr(e,l,o.getPixelForValue(c)).lo),0,i-1)),f?r=Dn(Math.max(cr(a,o.axis,u,!0).hi+1,n?0:cr(e,l,o.getPixelForValue(u),!0).hi+1),s,i)-s:r=i-s}return{start:s,count:r}}function WS(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,s={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=s,!0;const r=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),r}const Id=t=>t===0||t===1,F0=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Ft/n)),B0=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Ft/n)+1,Gc={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*dn)+1,easeOutSine:t=>Math.sin(t*dn),easeInOutSine:t=>-.5*(Math.cos(Bt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Id(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Id(t)?t:F0(t,.075,.3),easeOutElastic:t=>Id(t)?t:B0(t,.075,.3),easeInOutElastic(t){return Id(t)?t:t<.5?.5*F0(t*2,.1125,.45):.5+.5*B0(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Gc.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Gc.easeInBounce(t*2)*.5:Gc.easeOutBounce(t*2-1)*.5+.5};function ev(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function V0(t){return ev(t)?t:new du(t)}function Xg(t){return ev(t)?t:new du(t).saturate(.5).darken(.1).hexString()}const OY=["x","y","borderWidth","radius","tension"],NY=["color","borderColor","backgroundColor"];function FY(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:NY},numbers:{type:"number",properties:OY}}),t.describe("animations",{_fallback:"animation"}),t.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:e=>e|0}}}})}function BY(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const W0=new Map;function VY(t,e){e=e||{};const n=t+JSON.stringify(e);let i=W0.get(n);return i||(i=new Intl.NumberFormat(t,e),W0.set(n,i)),i}function Uu(t,e,n){return VY(e,n).format(t)}const zS={values(t){return Yt(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const i=this.chart.options.locale;let s,r=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),r=WY(t,n)}const o=Gr(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Uu(t,i,l)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Gr(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?zS.numeric.call(this,t,e,n):""}};function WY(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Af={formatters:zS};function zY(t){t.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:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Af.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const fa=Object.create(null),um=Object.create(null);function Xc(t,e){if(!e)return t;const n=e.split(".");for(let i=0,s=n.length;ii.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=(i,s)=>Xg(s.backgroundColor),this.hoverBorderColor=(i,s)=>Xg(s.borderColor),this.hoverColor=(i,s)=>Xg(s.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(e),this.apply(n)}set(e,n){return qg(this,e,n)}get(e){return Xc(this,e)}describe(e,n){return qg(um,e,n)}override(e,n){return qg(fa,e,n)}route(e,n,i,s){const r=Xc(this,e),o=Xc(this,i),a="_"+n;Object.defineProperties(r,{[a]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[s];return ut(l)?Object.assign({},c,l):it(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var sn=new YY({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[FY,BY,zY]);function HY(t){return!t||gt(t.size)||gt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ih(t,e,n,i,s){let r=e[s];return r||(r=e[s]=t.measureText(s).width,n.push(s)),r>i&&(i=r),i}function jY(t,e,n,i){i=i||{};let s=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},r=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let o=0;const a=n.length;let l,c,u,d,f;for(l=0;ln.length){for(l=0;l0&&t.stroke()}}function ur(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&r.strokeColor!=="";let l,c;for(t.save(),t.font=s.string,GY(t,r),l=0;l+t||0;function tv(t,e){const n={},i=ut(e),s=i?Object.keys(e):e,r=ut(t)?i?o=>it(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of s)n[o]=eH(r(o));return n}function HS(t){return tv(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ra(t){return tv(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Zn(t){const e=HS(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function En(t,e){t=t||{},e=e||sn.font;let n=it(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=it(t.style,e.style);i&&!(""+i).match(JY)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:it(t.family,e.family),lineHeight:QY(it(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:it(t.weight,e.weight),string:""};return s.string=HY(s),s}function Cc(t,e,n,i){let s,r,o;for(s=0,r=t.length;sn&&a===0?0:a+l;return{min:o(i,-Math.abs(r)),max:o(s,r)}}function wo(t,e){return Object.assign(Object.create(t),e)}function nv(t,e=[""],n,i,s=()=>t[0]){const r=n||t;typeof i>"u"&&(i=GS("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:i,_getTarget:s,override:a=>nv([a,...t],e,r,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return KS(a,l,()=>cH(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return H0(a).includes(l)},ownKeys(a){return H0(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function Dl(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:jS(t,i),setContext:r=>Dl(t,r,n,i),override:r=>Dl(t.override(r),e,n,i)};return new Proxy(s,{deleteProperty(r,o){return delete r[o],delete t[o],!0},get(r,o,a){return KS(r,o,()=>iH(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(r,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(r,o,a){return t[o]=a,delete r[o],!0}})}function jS(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:n,indexable:i,isScriptable:co(n)?n:()=>n,isIndexable:co(i)?i:()=>i}}const nH=(t,e)=>t?t+q_(e):e,iv=(t,e)=>ut(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function KS(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function iH(t,e,n){const{_proxy:i,_context:s,_subProxy:r,_descriptors:o}=t;let a=i[e];return co(a)&&o.isScriptable(e)&&(a=sH(e,a,t,n)),Yt(a)&&a.length&&(a=rH(e,a,t,o.isIndexable)),iv(e,a)&&(a=Dl(a,s,r&&r[e],o)),a}function sH(t,e,n,i){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(r,o||i);return a.delete(t),iv(t,l)&&(l=sv(s._scopes,s,t,l)),l}function rH(t,e,n,i){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=n;if(typeof r.index<"u"&&i(t))return e[r.index%e.length];if(ut(e[0])){const l=e,c=s._scopes.filter(u=>u!==l);e=[];for(const u of l){const d=sv(c,s,t,u);e.push(Dl(d,r,o&&o[t],a))}}return e}function US(t,e,n){return co(t)?t(e,n):t}const oH=(t,e)=>t===!0?e:typeof t=="string"?lo(e,t):void 0;function aH(t,e,n,i,s){for(const r of e){const o=oH(n,r);if(o){t.add(o);const a=US(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(o===!1&&typeof i<"u"&&n!==i)return null}return!1}function sv(t,e,n,i){const s=e._rootScopes,r=US(e._fallback,n,i),o=[...t,...s],a=new Set;a.add(i);let l=Y0(a,o,n,r||n,i);return l===null||typeof r<"u"&&r!==n&&(l=Y0(a,o,r,l,i),l===null)?!1:nv(Array.from(a),[""],s,r,()=>lH(e,n,i))}function Y0(t,e,n,i,s){for(;n;)n=aH(t,e,n,i,s);return n}function lH(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return Yt(s)&&ut(n)?n:s||{}}function cH(t,e,n,i){let s;for(const r of e)if(s=GS(nH(r,t),n),typeof s<"u")return iv(t,s)?sv(n,i,t,s):s}function GS(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i<"u")return i}}function H0(t){let e=t._keys;return e||(e=t._keys=uH(t._scopes)),e}function uH(t){const e=new Set;for(const n of t)for(const i of Object.keys(n).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function XS(t,e,n,i){const{iScale:s}=t,{key:r="r"}=this._parsing,o=new Array(i);let a,l,c,u;for(a=0,l=i;aet==="x"?"y":"x";function hH(t,e,n,i){const s=t.skip?e:t,r=e,o=n.skip?e:n,a=cm(r,s),l=cm(o,r);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,f=i*u;return{previous:{x:r.x-d*(o.x-s.x),y:r.y-d*(o.y-s.y)},next:{x:r.x+f*(o.x-s.x),y:r.y+f*(o.y-s.y)}}}function fH(t,e,n){const i=t.length;let s,r,o,a,l,c=Rl(t,0);for(let u=0;u!c.skip)),e.cubicInterpolationMode==="monotone")pH(t,s);else{let c=i?t[t.length-1]:t[0];for(r=0,o=t.length;rt.ownerDocument.defaultView.getComputedStyle(t,null);function vH(t,e){return If(t).getPropertyValue(e)}const yH=["top","right","bottom","left"];function oa(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const r=yH[s];i[r]=parseFloat(t[e+"-"+r+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const bH=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function wH(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:r}=i;let o=!1,a,l;if(bH(s,r,t.target))a=s,l=r;else{const c=e.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function jo(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=If(n),r=s.boxSizing==="border-box",o=oa(s,"padding"),a=oa(s,"border","width"),{x:l,y:c,box:u}=wH(t,n),d=o.left+(u&&a.left),f=o.top+(u&&a.top);let{width:g,height:p}=e;return r&&(g-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-d)/g*n.width/i),y:Math.round((c-f)/p*n.height/i)}}function xH(t,e,n){let i,s;if(e===void 0||n===void 0){const r=t&&ov(t);if(!r)e=t.clientWidth,n=t.clientHeight;else{const o=r.getBoundingClientRect(),a=If(r),l=oa(a,"border","width"),c=oa(a,"padding");e=o.width-c.width-l.width,n=o.height-c.height-l.height,i=Dh(a.maxWidth,r,"clientWidth"),s=Dh(a.maxHeight,r,"clientHeight")}}return{width:e,height:n,maxWidth:i||Mh,maxHeight:s||Mh}}const Rd=t=>Math.round(t*10)/10;function EH(t,e,n,i){const s=If(t),r=oa(s,"margin"),o=Dh(s.maxWidth,t,"clientWidth")||Mh,a=Dh(s.maxHeight,t,"clientHeight")||Mh,l=xH(t,e,n);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const f=oa(s,"border","width"),g=oa(s,"padding");c-=g.width+f.width,u-=g.height+f.height}return c=Math.max(0,c-r.width),u=Math.max(0,i?c/i:u-r.height),c=Rd(Math.min(c,o,l.maxWidth)),u=Rd(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Rd(c/2)),(e!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Rd(Math.floor(u*i))),{width:c,height:u}}function j0(t,e,n){const i=e||1,s=Math.floor(t.height*i),r=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==i||o.height!==s||o.width!==r?(t.currentDevicePixelRatio=i,o.height=s,o.width=r,t.ctx.setTransform(i,0,0,i,0,0),!0):!1}const CH=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};rv()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function K0(t,e){const n=vH(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ko(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function SH(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:i==="middle"?n<.5?t.y:e.y:i==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function kH(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=Ko(t,s,n),a=Ko(s,r,n),l=Ko(r,e,n),c=Ko(o,a,n),u=Ko(a,l,n);return Ko(c,u,n)}const TH=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},AH=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ul(t,e,n){return t?TH(e,n):AH()}function ZS(t,e){let n,i;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function JS(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function QS(t){return t==="angle"?{between:gu,compare:PY,normalize:ki}:{between:lr,compare:(e,n)=>e-n,normalize:e=>e}}function U0({start:t,end:e,count:n,loop:i,style:s}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n===0,style:s}}function PH(t,e,n){const{property:i,start:s,end:r}=n,{between:o,normalize:a}=QS(i),l=e.length;let{start:c,end:u,loop:d}=t,f,g;if(d){for(c+=l,u+=l,f=0,g=l;fl(s,E,y)&&a(s,E)!==0,b=()=>a(r,y)===0||l(r,E,y),C=()=>m||w(),k=()=>!m||b();for(let T=u,A=u;T<=d;++T)x=e[T%o],!x.skip&&(y=c(x[i]),y!==E&&(m=l(y,s,r),v===null&&C()&&(v=a(y,s)===0?T:A),v!==null&&k()&&(p.push(U0({start:v,end:T,loop:f,count:o,style:g})),v=null),A=T,E=y));return v!==null&&p.push(U0({start:v,end:d,loop:f,count:o,style:g})),p}function tk(t,e){const n=[],i=t.segments;for(let s=0;ss&&t[r%e].skip;)r--;return r%=e,{start:s,end:r}}function IH(t,e,n,i){const s=t.length,r=[];let o=e,a=t[e],l;for(l=e+1;l<=n;++l){const c=t[l%s];c.skip||c.stop?a.skip||(i=!1,r.push({start:e%s,end:(l-1)%s,loop:i}),e=o=c.stop?l:null):(o=l,a.skip&&(e=l)),a=c}return o!==null&&r.push({start:e%s,end:o%s,loop:i}),r}function DH(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const r=!!t._loop,{start:o,end:a}=MH(n,s,r,i);if(i===!0)return G0(t,[{start:o,end:a,loop:r}],n,e);const l=aa({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=FS.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,e,"progress")),r.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),n+=r.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Zs=new LH;const q0="transparent",OH={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=V0(t||q0),s=i.valid&&V0(e||q0);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class NH{constructor(e,n,i,s){const r=n[i];s=Cc([e.to,s,r,e.from]);const o=Cc([e.from,r,s]);this._active=!0,this._fn=e.fn||OH[e.type||typeof o],this._easing=Gc[e.easing]||Gc.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=Cc([e.to,n,s,e.from]),this._from=Cc([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to;let l;if(this._active=r!==a&&(o||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(r,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let s=0;s{const r=e[s];if(!ut(r))return;const o={};for(const a of n)o[a]=r[a];(Yt(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(e,n){const i=n.options,s=BH(e,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&FH(e.options.$animations,i).then(()=>{e.options=i},()=>{}),r}_createAnimations(e,n){const i=this._properties,s=[],r=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,n));continue}const u=n[c];let d=r[c];const f=i.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){e[c]=u;continue}r[c]=d=new NH(f,e,c,u),s.push(d)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return Zs.add(this._chart,i),!0}}function FH(t,e){const n=[],i=Object.keys(e);for(let s=0;s0||!n&&r<0)return s.index}return null}function t1(t,e){const{chart:n,_cachedMeta:i}=t,s=n._stacks||(n._stacks={}),{iScale:r,vScale:o,index:a}=i,l=r.axis,c=o.axis,u=YH(r,o,i),d=e.length;let f;for(let g=0;gn[i].axis===e).shift()}function KH(t,e){return wo(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function UH(t,e,n){return wo(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function hc(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const s of e){const r=s._stacks;if(!r||r[i]===void 0||r[i][n]===void 0)return;delete r[i][n],r[i]._visualValues!==void 0&&r[i]._visualValues[n]!==void 0&&delete r[i]._visualValues[n]}}}const Jg=t=>t==="reset"||t==="none",n1=(t,e)=>e?t:Object.assign({},t),GH=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:ik(n,!0),values:null};class xo{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Q0(e.vScale,e),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(e){this.index!==e&&hc(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(d,f,g,p)=>d==="x"?f:d==="r"?p:g,r=n.xAxisID=it(i.xAxisID,Zg(e,"x")),o=n.yAxisID=it(i.yAxisID,Zg(e,"y")),a=n.rAxisID=it(i.rAxisID,Zg(e,"r")),l=n.indexAxis,c=n.iAxisID=s(l,r,o,a),u=n.vAxisID=s(l,o,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&N0(this._data,this),e._stacked&&hc(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(ut(n)){const s=this._cachedMeta;this._data=zH(n,s)}else if(i!==n){if(i){N0(i,this);const s=this._cachedMeta;hc(s),s._parsed=[]}n&&Object.isExtensible(n)&&RY(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const r=n._stacked;n._stacked=Q0(n.vScale,n),n.stack!==i.stack&&(s=!0,hc(n),n.stack=i.stack),this._resyncElements(e),(s||r!==n._stacked)&&t1(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:o}=i,a=r.axis;let l=e===0&&n===s.length?!0:i._sorted,c=e>0&&i._parsed[e-1],u,d,f;if(this._parsing===!1)i._parsed=s,i._sorted=!0,f=s;else{Yt(s[e])?f=this.parseArrayData(i,s,e,n):ut(s[e])?f=this.parseObjectData(i,s,e,n):f=this.parsePrimitiveData(i,s,e,n);const g=()=>d[a]===null||c&&d[a]m||d=0;--f)if(!p()){this.updateRangeFromParsed(c,e,g,l);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let s,r,o;for(s=0,r=n.length;s=0&&ethis.getContext(i,s,n),m=c.resolveNamedOptions(f,g,p,d);return m.$shared&&(m.$shared=l,r[o]=Object.freeze(n1(m,l))),m}_resolveAnimations(e,n,i){const s=this.chart,r=this._cachedDataOpts,o=`animation-${n}`,a=r[o];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(e,i,n))}const c=new nk(s,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Jg(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),s=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(n,r)||r!==s;return this.updateSharedOptions(r,n,i),{sharedOptions:r,includeOptions:o}}updateElement(e,n,i,s){Jg(s)?Object.assign(e,i):this._resolveAnimations(n,s).update(e,i)}updateSharedOptions(e,n,i){e&&!Jg(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,s){e.active=s;const r=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(e,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=i.length,r=n.length,o=Math.min(r,s);o&&this.parse(0,o),r>s?this._insertElements(s,r-s,e):r{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(r),a=e;as-r))}return t._cache.$bar}function qH(t){const e=t.iScale,n=XH(e,t.type);let i=e._length,s,r,o,a;const l=()=>{o===32767||o===-32768||(fu(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(s=0,r=n.length;s0?s[t-1]:null,a=tMath.abs(a)&&(l=a,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}function sk(t,e,n,i){return Yt(t)?QH(t,e,n,i):e[n.axis]=n.parse(t,i),e}function i1(t,e,n,i){const s=t.iScale,r=t.vScale,o=s.getLabels(),a=s===r,l=[];let c,u,d,f;for(c=n,u=n+i;c=n?1:-1)}function tj(t){let e,n,i,s,r;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.baseu.controller.options.grouped),r=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[i.axis],c=u=>{const d=u._parsed.find(g=>g[i.axis]===l),f=d&&d[u.vScale.axis];if(gt(f)||isNaN(f))return!0};for(const u of s)if(!(n!==void 0&&c(u))&&((r===!1||o.indexOf(u.stack)===-1||r===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,i){const s=this._getStacks(e,i),r=n!==void 0?s.indexOf(n):-1;return r===-1?s.length-1:r}_getRuler(){const e=this.options,n=this._cachedMeta,i=n.iScale,s=[];let r,o;for(r=0,o=n.data.length;r=0;--i)n=Math.max(n,e[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=n,o=this.getParsed(e),a=s.getLabelForValue(o.x),l=r.getLabelForValue(o.y),c=o._custom;return{label:i[e]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,i,s){const r=s==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,s),u=o.axis,d=a.axis;for(let f=n;fgu(E,a,l,!0)?1:Math.max(w,w*n,b,b*n),p=(E,w,b)=>gu(E,a,l,!0)?-1:Math.min(w,w*n,b,b*n),m=g(0,c,d),v=g(dn,u,f),y=p(Bt,c,d),x=p(Bt+dn,u,f);i=(m-y)/2,s=(v-x)/2,r=-(m+y)/2,o=-(v+x)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:o}}class ok extends xo{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return n.labels.map((r,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=l=>+i[l];if(ut(i[e])){const{key:l="value"}=this._parsing;r=c=>+lo(i[c],l)}let o,a;for(o=e,a=e+n;o0&&!isNaN(e)?Ft*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Uu(n._parsed[e],i.options.locale);return{label:s[e]||"",value:r}}getMaxBorderWidth(e){let n=0;const i=this.chart;let s,r,o,a,l;if(!e){for(s=0,r=i.data.datasets.length;s0&&this.getParsed(n-1);for(let b=0;b=x){k.skip=!0;continue}const T=this.getParsed(b),A=gt(T[g]),I=k[f]=o.getPixelForValue(T[f],b),V=k[g]=r||A?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,T,l):T[g],b);k.skip=isNaN(I)||isNaN(V)||A,k.stop=b>0&&Math.abs(T[f]-w[f])>v,m&&(k.parsed=T,k.raw=c.data[b]),d&&(k.options=u||this.resolveDataElementOptions(b,C.active?"active":s)),y||this.updateElement(C,b,k,s),w=T}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,i=n.options&&n.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const r=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class aj extends xo{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return n.labels.map((r,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Uu(n._parsed[e].r,i.options.locale);return{label:s[e]||"",value:r}}parseObjectData(e,n,i,s){return XS.bind(this)(e,n,i,s)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(rn.max&&(n.max=r))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,i=e.options,s=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),a=(r-o)/e.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,i,s){const r=s==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*Bt;let g=f,p;const m=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(e,n,i){return this.chart.getDataVisibility(e)?ls(this.resolveDataElementOptions(e,n).angle||i):0}}class lj extends ok{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class cj extends xo{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){const n=this._cachedMeta.vScale,i=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(e,n,i,s){return XS.bind(this)(e,n,i,s)}update(e){const n=this._cachedMeta,i=n.dataset,s=n.data||[],r=n.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===s.length,options:o};this.updateElement(i,void 0,a,e)}this.updateElements(s,0,s.length,e)}updateElements(e,n,i,s){const r=this._cachedMeta.rScale,o=s==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let w=n;w0&&Math.abs(C[g]-E[g])>y,v&&(k.parsed=C,k.raw=c.data[w]),f&&(k.options=d||this.resolveDataElementOptions(w,b.active?"active":s)),x||this.updateElement(b,w,k,s),E=C}this.updateSharedOptions(d,s,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,r,o)/2}}function Fo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class av{static override(e){Object.assign(av.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return Fo()}parse(){return Fo()}format(){return Fo()}add(){return Fo()}diff(){return Fo()}startOf(){return Fo()}endOf(){return Fo()}}var dj={_date:av};function hj(t,e,n,i){const{controller:s,data:r,_sorted:o}=t,a=s._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&o&&r.length){const l=a._reversePixels?IY:cr;if(i){if(s._sharedOptions){const c=r[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const d=l(r,e,n-u),f=l(r,e,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(r,e,n)}return{lo:0,hi:r.length-1}}function Gu(t,e,n,i,s){const r=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=r.length;a{l[o]&&l[o](e[n],s)&&(r.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(e.x,e.y,s))}),i&&!a?[]:r}var mj={evaluateInteractionItems:Gu,modes:{index(t,e,n,i){const s=jo(e,t),r=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?ep(t,s,r,i,o):tp(t,s,r,!1,i,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(t,e,n,i){const s=jo(e,t),r=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?ep(t,s,r,i,o):tp(t,s,r,!1,i,o);if(a.length>0){const l=a[0].datasetIndex,c=t.getDatasetMeta(l).data;a=[];for(let u=0;un.pos===e)}function a1(t,e){return t.filter(n=>lk.indexOf(n.pos)===-1&&n.box.axis===e)}function gc(t,e){return t.sort((n,i)=>{const s=e?i:n,r=e?n:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function _j(t){const e=[];let n,i,s,r,o,a;for(n=0,i=(t||[]).length;nc.box.fullSize),!0),i=gc(fc(e,"left"),!0),s=gc(fc(e,"right")),r=gc(fc(e,"top"),!0),o=gc(fc(e,"bottom")),a=a1(e,"x"),l=a1(e,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:fc(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}function l1(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ck(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function wj(t,e,n,i){const{pos:s,box:r}=n,o=t.maxPadding;if(!ut(s)){n.size&&(t[s]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?r.height:r.width),n.size=d.size/d.count,t[s]+=n.size}r.getPadding&&ck(o,r.getPadding());const a=Math.max(0,e.outerWidth-l1(o,t,"left","right")),l=Math.max(0,e.outerHeight-l1(o,t,"top","bottom")),c=a!==t.w,u=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function xj(t){const e=t.maxPadding;function n(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Ej(t,e){const n=e.maxPadding;function i(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{r[o]=Math.max(e[o],n[o])}),r}return i(t?["left","right"]:["top","bottom"])}function Sc(t,e,n,i){const s=[];let r,o,a,l,c,u;for(r=0,o=t.length,c=0;r{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,v)=>v.box.options&&v.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},s);ck(f,Zn(i));const g=Object.assign({maxPadding:f,w:r,h:o,x:s.left,y:s.top},s),p=yj(l.concat(c),d);Sc(a.fullSize,g,d,p),Sc(l,g,d,p),Sc(c,g,d,p)&&Sc(l,g,d,p),xj(g),c1(a.leftAndTop,g,d,p),g.x+=g.w,g.y+=g.h,c1(a.rightAndBottom,g,d,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},Tt(a.chartArea,m=>{const v=m.box;Object.assign(v,t.chartArea),v.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class uk{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,s){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(e){return!0}updateConfig(e){}}class Cj extends uk{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const dh="$chartjs",Sj={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},u1=t=>t===null||t==="";function kj(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[dh]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",u1(s)){const r=K0(t,"width");r!==void 0&&(t.width=r)}if(u1(i))if(t.style.height==="")t.height=t.width/(e||2);else{const r=K0(t,"height");r!==void 0&&(t.height=r)}return t}const dk=CH?{passive:!0}:!1;function Tj(t,e,n){t&&t.addEventListener(e,n,dk)}function Aj(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,dk)}function Pj(t,e){const n=Sj[t.type]||t.type,{x:i,y:s}=jo(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Rh(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Mj(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Rh(a.addedNodes,i),o=o&&!Rh(a.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Ij(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Rh(a.removedNodes,i),o=o&&!Rh(a.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const mu=new Map;let d1=0;function hk(){const t=window.devicePixelRatio;t!==d1&&(d1=t,mu.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Dj(t,e){mu.size||window.addEventListener("resize",hk),mu.set(t,e)}function Rj(t){mu.delete(t),mu.size||window.removeEventListener("resize",hk)}function $j(t,e,n){const i=t.canvas,s=i&&ov(i);if(!s)return;const r=BS((a,l)=>{const c=s.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||r(c,u)});return o.observe(s),Dj(t,r),o}function np(t,e,n){n&&n.disconnect(),e==="resize"&&Rj(t)}function Lj(t,e,n){const i=t.canvas,s=BS(r=>{t.ctx!==null&&n(Pj(r,t))},t);return Tj(i,e,s),s}class Oj extends uk{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(kj(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[dh])return!1;const i=n[dh].initial;["height","width"].forEach(r=>{const o=i[r];gt(o)?n.removeAttribute(r):n.setAttribute(r,o)});const s=i.style||{};return Object.keys(s).forEach(r=>{n.style[r]=s[r]}),n.width=n.width,delete n[dh],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),o={attach:Mj,detach:Ij,resize:$j}[n]||Lj;s[n]=o(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),s=i[n];if(!s)return;({attach:np,detach:np,resize:np}[n]||Aj)(e,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,s){return EH(e,n,i,s)}isAttached(e){const n=e&&ov(e);return!!(n&&n.isConnected)}}function Nj(t){return!rv()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Cj:Oj}let xr=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return Il(this.x)&&Il(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const s={};return e.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}};function Fj(t,e){const n=t.options.ticks,i=Bj(t),s=Math.min(n.maxTicksLimit||i,i),r=n.major.enabled?Wj(e):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return zj(e,c,r,o/s),c;const u=Vj(r,e,s);if(o>0){let d,f;const g=o>1?Math.round((l-a)/(o-1)):null;for(Ld(e,c,u,gt(g)?0:a-g,a),d=0,f=o-1;ds)return l}return Math.max(s,1)}function Wj(t){const e=[];let n,i;for(n=0,i=t.length;nt==="left"?"right":t==="right"?"left":t,h1=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,f1=(t,e)=>Math.min(e||t,t);function g1(t,e){const n=[],i=t.length/e,s=t.length;let r=0;for(;ro+a)))return l}function Kj(t,e){Tt(t,n=>{const i=n.gc,s=i.length/2;let r;if(s>e){for(r=0;ri?i:n,i=s&&n>i?n:i,{min:Si(n,Si(i,n)),max:Si(i,Si(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$t(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=tH(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,g=Dn(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/i:g/(i-1),d+6>a&&(a=g/(i-(e.offset?.5:1)),l=this.maxHeight-pc(e.grid)-n.padding-p1(e.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),o=Z_(Math.min(Math.asin(Dn((u.highest.height+6)/a,-1,1)),Math.asin(Dn(l/c,-1,1))-Math.asin(Dn(f/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){$t(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$t(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=p1(s,n.options.font);if(a?(e.width=this.maxWidth,e.height=pc(r)+l):(e.height=this.maxHeight,e.width=pc(r)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),g=i.padding*2,p=ls(this.labelRotation),m=Math.cos(p),v=Math.sin(p);if(a){const y=i.mirror?0:v*d.width+m*f.height;e.height=Math.min(this.maxHeight,e.height+y+g)}else{const y=i.mirror?0:m*d.width+v*f.height;e.width=Math.min(this.maxWidth,e.width+y+g)}this._calculatePadding(c,u,v,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,i,s){const{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,g=0;l?c?(f=s*e.width,g=i*n.height):(f=i*e.height,g=s*n.width):r==="start"?g=n.width:r==="end"?f=e.width:r!=="inner"&&(f=e.width/2,g=n.width/2),this.paddingLeft=Math.max((f-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((g-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=e.height/2;r==="start"?(u=0,d=e.height):r==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_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(){$t(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,i;for(n=0,i=e.length;n({width:o[A]||0,height:a[A]||0});return{first:T(0),last:T(n-1),widest:T(C),highest:T(k),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return MY(this._alignToPixels?No(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&ea*s?a/i:l/s:l*s0}_computeGridLineItems(e){const n=this.axis,i=this.chart,s=this.options,{grid:r,position:o,border:a}=s,l=r.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=pc(r),g=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,v=m/2,y=function(R){return No(i,R,m)};let x,E,w,b,C,k,T,A,I,V,Y,ne;if(o==="top")x=y(this.bottom),k=this.bottom-f,A=x-v,V=y(e.top)+v,ne=e.bottom;else if(o==="bottom")x=y(this.top),V=e.top,ne=y(e.bottom)-v,k=x+v,A=this.top+f;else if(o==="left")x=y(this.right),C=this.right-f,T=x-v,I=y(e.left)+v,Y=e.right;else if(o==="right")x=y(this.left),I=e.left,Y=y(e.right)-v,C=x+v,T=this.left+f;else if(n==="x"){if(o==="center")x=y((e.top+e.bottom)/2+.5);else if(ut(o)){const R=Object.keys(o)[0],W=o[R];x=y(this.chart.scales[R].getPixelForValue(W))}V=e.top,ne=e.bottom,k=x+v,A=k+f}else if(n==="y"){if(o==="center")x=y((e.left+e.right)/2);else if(ut(o)){const R=Object.keys(o)[0],W=o[R];x=y(this.chart.scales[R].getPixelForValue(W))}C=x-v,T=C-f,I=e.left,Y=e.right}const N=it(s.ticks.maxTicksLimit,d),B=Math.max(1,Math.ceil(d/N));for(E=0;E0&&(ue-=D/2);break}ce={left:ue,top:ee,width:D+ie.width,height:te+ie.height,color:B.backdropColor}}v.push({label:w,font:A,textOffset:Y,options:{rotation:m,color:W,strokeColor:X,strokeWidth:J,textAlign:H,textBaseline:ne,translation:[b,C],backdrop:ce}})}return v}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-ls(this.labelRotation))return e==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,o=this._getLabelSizes(),a=e+r,l=o.widest.width;let c,u;return n==="left"?s?(u=this.right+r,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+r,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:s,width:r,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,s,r,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(r=>r.value===e);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,o;const a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(r=0,o=s.length;r{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let r,o;for(r=0,o=n.length;r{const i=n.split("."),s=i.pop(),r=[t].concat(i).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");sn.route(r,s,l,a)})}function Qj(t){return"id"in t&&"defaults"in t}class eK{constructor(){this.controllers=new Od(xo,"datasets",!0),this.elements=new Od(xr,"elements"),this.plugins=new Od(Object,"plugins"),this.scales=new Od(ba,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,i){[...n].forEach(s=>{const r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(e,r,s):Tt(s,o=>{const a=i||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,i){const s=q_(e);$t(i["before"+s],[],i),n[e](i),$t(i["after"+s],[],i)}_getRegistryForType(e){for(let n=0;nr.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,i),e,"stop"),this._notify(s(i,n),e,"start")}}function nK(t){const e={},n=[],i=Object.keys(xs.plugins.items);for(let r=0;r1&&m1(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function _1(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function cK(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(n.length)return _1(t,"x",n[0])||_1(t,"y",n[0])}return{}}function uK(t,e){const n=fa[t.type]||{scales:{}},i=e.scales||{},s=hm(t.type,e),r=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!ut(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=fm(o,a,cK(o,t),sn.scales[a.type]),c=aK(l,s),u=n.scales||{};r[o]=Kc(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||hm(a,e),u=(fa[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=oK(d,l),g=o[f+"AxisID"]||f;r[g]=r[g]||Object.create(null),Kc(r[g],[{axis:f},i[g],u[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];Kc(a,[sn.scales[a.type],sn.scale])}),r}function fk(t){const e=t.options||(t.options={});e.plugins=it(e.plugins,{}),e.scales=uK(t,e)}function gk(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function dK(t){return t=t||{},t.data=gk(t.data),fk(t),t}const v1=new Map,pk=new Set;function Nd(t,e){let n=v1.get(t);return n||(n=e(),v1.set(t,n),pk.add(n)),n}const mc=(t,e,n)=>{const i=lo(e,n);i!==void 0&&t.add(i)};let hK=class{constructor(e){this._config=dK(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=gk(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),fk(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Nd(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Nd(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Nd(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return Nd(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let s=i.get(e);return(!s||n)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,n,i){const{options:s,type:r}=this,o=this._cachedScopes(e,i),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{e&&(l.add(e),u.forEach(d=>mc(l,e,d))),u.forEach(d=>mc(l,s,d)),u.forEach(d=>mc(l,fa[r]||{},d)),u.forEach(d=>mc(l,sn,d)),u.forEach(d=>mc(l,um,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),pk.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,fa[n]||{},sn.datasets[n]||{},{type:n},sn,um]}resolveNamedOptions(e,n,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=y1(this._resolverCache,e,s);let l=o;if(gK(o,n)){r.$shared=!1,i=co(i)?i():i;const c=this.createResolver(e,i,a);l=Dl(o,i,c)}for(const c of n)r[c]=l[c];return r}createResolver(e,n,i=[""],s){const{resolver:r}=y1(this._resolverCache,e,i);return ut(n)?Dl(r,n,void 0,s):r}};function y1(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const s=n.join();let r=i.get(s);return r||(r={resolver:nv(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const fK=t=>ut(t)&&Object.getOwnPropertyNames(t).some(e=>co(t[e]));function gK(t,e){const{isScriptable:n,isIndexable:i}=jS(t);for(const s of e){const r=n(s),o=i(s),a=(o||r)&&t[s];if(r&&(co(a)||fK(a))||o&&Yt(a))return!0}return!1}var pK="4.4.4";const mK=["top","bottom","left","right","chartArea"];function b1(t,e){return t==="top"||t==="bottom"||mK.indexOf(t)===-1&&e==="x"}function w1(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function x1(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),$t(n&&n.onComplete,[t],e)}function _K(t){const e=t.chart,n=e.options.animation;$t(n&&n.onProgress,[t],e)}function mk(t){return rv()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const hh={},E1=t=>{const e=mk(t);return Object.values(hh).filter(n=>n.canvas===e).pop()};function vK(t,e,n){const i=Object.keys(t);for(const s of i){const r=+s;if(r>=e){const o=t[s];delete t[s],(n>0||r>e)&&(t[r+n]=o)}}}function yK(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}function Fd(t,e,n){return t.options.clip?t[n]:e[n]}function bK(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:Fd(n,e,"left"),right:Fd(n,e,"right"),top:Fd(i,e,"top"),bottom:Fd(i,e,"bottom")}:e}let Df=class{static defaults=sn;static instances=hh;static overrides=fa;static registry=xs;static version=pK;static getChart=E1;static register(...e){xs.add(...e),C1()}static unregister(...e){xs.remove(...e),C1()}constructor(e,n){const i=this.config=new hK(n),s=mk(e),r=E1(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Nj(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=vY(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,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 tK,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=$Y(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],hh[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Zs.listen(this,"complete",x1),Zs.listen(this,"progress",_K),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:s,_aspectRatio:r}=this;return gt(e)?n&&r?r:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return xs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():j0(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return z0(this.canvas,this.ctx),this}stop(){return Zs.stop(this),this}resize(e,n){Zs.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,n,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,j0(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),$t(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Tt(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,s=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let r=[];n&&(r=r.concat(Object.keys(n).map(o=>{const a=n[o],l=fm(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Tt(r,o=>{const a=o.options,l=a.id,c=fm(l,a),u=it(a.type,o.dtype);(a.position===void 0||b1(a.position,c)!==b1(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const f=xs.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,e)}),Tt(s,(o,a)=>{o||delete i[a]}),Tt(i,o=>{Wi.configure(this,o,o.options),Wi.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((s,r)=>s.index-r.index),i>n){for(let s=n;sn.length&&delete this._stacks,e.forEach((i,s)=>{n.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(w1("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Tt(this.scales,e=>{Wi.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!R0(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:r}of n){const o=i==="_removeElements"?-r:r;vK(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=r=>new Set(e.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),s=i(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Wi.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Tt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,i=e._clip,s=!i.disabled,r=bK(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Pf(n,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),e.controller.draw(),s&&Mf(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return ur(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,s){const r=mj.modes[n];return typeof r=="function"?r(this,e,i,s):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let s=i.filter(r=>r&&r._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=wo(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const s=i?"show":"hide",r=this.getDatasetMeta(e),o=r.controller._resolveAnimations(void 0,s);fu(n)?(r.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(r,{visible:i}),this.update(a=>a.datasetIndex===e?s:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Zs.remove(this),e=0,n=this.data.datasets.length;e{n.addEventListener(this,r,o),e[r]=o},s=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};Tt(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),e[l]=c},s=(l,c)=>{e[l]&&(n.removeEventListener(this,l,c),delete e[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Tt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Tt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const s=i?"set":"remove";let r,o,a,l;for(n==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=e.length;a{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!Ah(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,i){const s=this.options.hover,r=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=r(n,e),a=i?e:r(e,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const r=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:s=[],options:r}=this,o=n,a=this._getActiveElements(e,s,i,o),l=CY(e),c=yK(e,this._lastEvent,i,l);i&&(this._lastEvent=null,$t(r.onHover,[e,a,this],this),l&&$t(r.onClick,[e,a,this],this));const u=!Ah(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(e,n,i,s){if(e.type==="mouseout")return[];if(!i)return n;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,s)}};function C1(){return Tt(Df.instances,t=>t._plugins.invalidate())}function wK(t,e,n){const{startAngle:i,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=e;let c=s/a;t.beginPath(),t.arc(r,o,a,i-c,n+c),l>s?(c=s/l,t.arc(r,o,l,n+c,i-c,!0)):t.arc(r,o,s,n+dn,i-dn),t.closePath(),t.clip()}function xK(t){return tv(t,["outerStart","outerEnd","innerStart","innerEnd"])}function EK(t,e,n,i){const s=xK(t.options.borderRadius),r=(n-e)/2,o=Math.min(r,i*e/2),a=l=>{const c=(n-Math.min(r,l))*i/2;return Dn(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Dn(s.innerStart,0,o),innerEnd:Dn(s.innerEnd,0,o)}}function Na(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function $h(t,e,n,i,s,r){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=e,d=Math.max(e.outerRadius+i+n-c,0),f=u>0?u+i+n+c:0;let g=0;const p=s-l;if(i){const B=u>0?u-i:0,R=d>0?d-i:0,W=(B+R)/2,X=W!==0?p*W/(W+i):p;g=(p-X)/2}const m=Math.max(.001,p*d-n/Bt)/d,v=(p-m)/2,y=l+v+g,x=s-v-g,{outerStart:E,outerEnd:w,innerStart:b,innerEnd:C}=EK(e,f,d,x-y),k=d-E,T=d-w,A=y+E/k,I=x-w/T,V=f+b,Y=f+C,ne=y+b/V,N=x-C/Y;if(t.beginPath(),r){const B=(A+I)/2;if(t.arc(o,a,d,A,B),t.arc(o,a,d,B,I),w>0){const J=Na(T,I,o,a);t.arc(J.x,J.y,w,I,x+dn)}const R=Na(Y,x,o,a);if(t.lineTo(R.x,R.y),C>0){const J=Na(Y,N,o,a);t.arc(J.x,J.y,C,x+dn,N+Math.PI)}const W=(x-C/f+(y+b/f))/2;if(t.arc(o,a,f,x-C/f,W,!0),t.arc(o,a,f,W,y+b/f,!0),b>0){const J=Na(V,ne,o,a);t.arc(J.x,J.y,b,ne+Math.PI,y-dn)}const X=Na(k,y,o,a);if(t.lineTo(X.x,X.y),E>0){const J=Na(k,A,o,a);t.arc(J.x,J.y,E,y-dn,A)}}else{t.moveTo(o,a);const B=Math.cos(A)*d+o,R=Math.sin(A)*d+a;t.lineTo(B,R);const W=Math.cos(I)*d+o,X=Math.sin(I)*d+a;t.lineTo(W,X)}t.closePath()}function CK(t,e,n,i,s){const{fullCircles:r,startAngle:o,circumference:a}=e;let l=e.endAngle;if(r){$h(t,e,n,i,l,s);for(let c=0;ce!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,i){const s=this.getProps(["x","y"],i),{angle:r,distance:o}=LS(s,{x:e,y:n}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),f=(this.options.spacing+this.options.borderWidth)/2,g=it(d,l-a),p=gu(r,a,l)&&a!==l,m=g>=Ft||p,v=lr(o,c+f,u+f);return m&&v}getCenterPoint(e){const{x:n,y:i,startAngle:s,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:c}=this.options,u=(s+r)/2,d=(o+a+c+l)/2;return{x:n+Math.cos(u)*d,y:i+Math.sin(u)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:i}=this,s=(n.offset||0)/4,r=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=i>Ft?Math.floor(i/Ft):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*s,Math.sin(a)*s);const l=1-Math.sin(Math.min(Bt,i||0)),c=s*l;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,CK(e,this,c,r,o),SK(e,this,c,r,o),e.restore()}}function _k(t,e,n=e){t.lineCap=it(n.borderCapStyle,e.borderCapStyle),t.setLineDash(it(n.borderDash,e.borderDash)),t.lineDashOffset=it(n.borderDashOffset,e.borderDashOffset),t.lineJoin=it(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=it(n.borderWidth,e.borderWidth),t.strokeStyle=it(n.borderColor,e.borderColor)}function TK(t,e,n){t.lineTo(n.x,n.y)}function AK(t){return t.stepped?KY:t.tension||t.cubicInterpolationMode==="monotone"?UY:TK}function vk(t,e,n={}){const i=t.length,{start:s=0,end:r=i-1}=n,{start:o,end:a}=e,l=Math.max(s,o),c=Math.min(r,a),u=sa&&r>a;return{count:i,start:l,loop:e.loop,ilen:c(o+(c?a-w:w))%r,E=()=>{m!==v&&(t.lineTo(u,v),t.lineTo(u,m),t.lineTo(u,y))};for(l&&(g=s[x(0)],t.moveTo(g.x,g.y)),f=0;f<=a;++f){if(g=s[x(f)],g.skip)continue;const w=g.x,b=g.y,C=w|0;C===p?(bv&&(v=b),u=(d*u+w)/++d):(E(),t.lineTo(w,b),p=C,d=0,m=v=b),y=b}E()}function gm(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?MK:PK}function IK(t){return t.stepped?SH:t.tension||t.cubicInterpolationMode==="monotone"?kH:Ko}function DK(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),_k(t,e.options),t.stroke(s)}function RK(t,e,n,i){const{segments:s,options:r}=e,o=gm(e);for(const a of s)_k(t,r,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const $K=typeof Path2D=="function";function LK(t,e,n,i){$K&&!e.options.segment?DK(t,e,n,i):RK(t,e,n,i)}class Rf extends xr{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:e=>e!=="borderDash"&&e!=="fill"};constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;_H(this._points,i,e,s,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=DH(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,i=e.length;return i&&n[e[i-1].end]}interpolate(e,n){const i=this.options,s=e[n],r=this.points,o=tk(this,{property:n,start:s,end:s});if(!o.length)return;const a=[],l=IK(i);let c,u;for(c=0,u=o.length;c=n)return t.slice(e,e+n);const o=[],a=(n-2)/(r-2);let l=0;const c=e+n-1;let u=e,d,f,g,p,m;for(o[l++]=t[u],d=0;dg&&(g=p,f=t[x],m=x);o[l++]=f,u=m}return o[l++]=t[c],o}function HK(t,e,n,i){let s=0,r=0,o,a,l,c,u,d,f,g,p,m;const v=[],y=e+n-1,x=t[e].x,w=t[y].x-x;for(o=e;om&&(m=c,f=o),s=(r*s+a.x)/++r;else{const C=o-1;if(!gt(d)&&!gt(f)){const k=Math.min(d,f),T=Math.max(d,f);k!==g&&k!==C&&v.push({...t[k],x:s}),T!==g&&T!==C&&v.push({...t[T],x:s})}o>0&&C!==g&&v.push(t[C]),v.push(a),u=b,r=0,p=m=c,d=f=g=o}}return v}function bk(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function k1(t){t.data.datasets.forEach(e=>{bk(e)})}function jK(t,e){const n=e.length;let i=0,s;const{iScale:r}=t,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(i=Dn(cr(e,r.axis,o).lo,0,n-1)),c?s=Dn(cr(e,r.axis,a).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var KK={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){k1(t);return}const i=t.width;t.data.datasets.forEach((s,r)=>{const{_data:o,indexAxis:a}=s,l=t.getDatasetMeta(r),c=o||s.data;if(Cc([a,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=t.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:d,count:f}=jK(l,c);const g=n.threshold||4*i;if(f<=g){bk(s);return}gt(o)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(n.algorithm){case"lttb":p=YK(c,d,f,i,n);break;case"min-max":p=HK(c,d,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=p})},destroy(t){k1(t)}};function UK(t,e,n){const i=t.segments,s=t.points,r=e.points,o=[];for(const a of i){let{start:l,end:c}=a;c=lv(l,c,s);const u=pm(n,s[l],s[c],a.loop);if(!e.segments){o.push({source:a,target:u,start:s[l],end:s[c]});continue}const d=tk(e,u);for(const f of d){const g=pm(n,r[f.start],r[f.end],f.loop),p=ek(a,s,g);for(const m of p)o.push({source:m,target:f,start:{[n]:T1(u,g,"start",Math.max)},end:{[n]:T1(u,g,"end",Math.min)}})}}return o}function pm(t,e,n,i){if(i)return;let s=e[t],r=n[t];return t==="angle"&&(s=ki(s),r=ki(r)),{property:t,start:s,end:r}}function GK(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,r=[];return e.segments.forEach(({start:o,end:a})=>{a=lv(o,a,s);const l=s[o],c=s[a];i!==null?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):n!==null&&(r.push({x:n,y:l.y}),r.push({x:n,y:c.y}))}),r}function lv(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function T1(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function wk(t,e){let n=[],i=!1;return Yt(t)?(i=!0,n=t):n=GK(t,e),n.length?new Rf({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function A1(t){return t&&t.fill!==!1}function XK(t,e,n){let s=t[e].fill;const r=[e];let o;if(!n)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!nn(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function qK(t,e,n){const i=eU(t);if(ut(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return nn(s)&&Math.floor(s)===s?ZK(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function ZK(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function JK(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:ut(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function QK(t,e,n){let i;return t==="start"?i=n:t==="end"?i=e.options.reverse?e.min:e.max:ut(t)?i=t.value:i=e.getBaseValue(),i}function eU(t){const e=t.options,n=e.fill;let i=it(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function tU(t){const{scale:e,index:n,line:i}=t,s=[],r=i.segments,o=i.points,a=nU(e,n);a.push(wk({x:null,y:e.bottom},i));for(let l=0;l=0;--o){const a=s[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),i&&a.fill&&rp(t.ctx,a,r))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=t.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const r=i[s].$filler;A1(r)&&rp(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;!A1(i)||n.drawTime!=="beforeDatasetDraw"||rp(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const D1=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},fU=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class R1 extends xr{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,i){this.maxWidth=e,this.maxHeight=n,this._margins=i,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 e=this.options.labels||{};let n=$t(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(i=>e.filter(i,this.chart.data))),e.sort&&(n=n.sort((i,s)=>e.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const i=e.labels,s=En(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=D1(i,r);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,r,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,s,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,i,s){const{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let d=e;r.textAlign="left",r.textBaseline="middle";let f=-1,g=-u;return this.legendItems.forEach((p,m)=>{const v=i+n/2+r.measureText(p.text).width;(m===0||c[c.length-1]+v+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,g+=u,f++),l[m]={left:0,top:g,row:f,width:v,height:s},c[c.length-1]+=v+a}),d}_fitCols(e,n,i,s){const{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-e;let d=a,f=0,g=0,p=0,m=0;return this.legendItems.forEach((v,y)=>{const{itemWidth:x,itemHeight:E}=gU(i,n,r,v,s);y>0&&g+E+2*a>u&&(d+=f+a,c.push({width:f,height:g}),p+=f+a,m++,f=g=0),l[y]={left:p,top:g,col:m,width:x,height:E},f=Math.max(f,x),g+=E+a}),d+=f,c.push({width:f,height:g}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:r}}=this,o=ul(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=Yn(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Yn(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+e+s,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+s}else{let a=0,l=Yn(i,this.top+e+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Yn(i,this.top+e+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Pf(e,this),this._draw(),Mf(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:s}=this,{align:r,labels:o}=e,a=sn.color,l=ul(e.rtl,this.left,this.width),c=En(o.font),{padding:u}=o,d=c.size,f=d/2;let g;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:v}=D1(o,d),y=function(C,k,T){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const A=it(T.lineWidth,1);if(s.fillStyle=it(T.fillStyle,a),s.lineCap=it(T.lineCap,"butt"),s.lineDashOffset=it(T.lineDashOffset,0),s.lineJoin=it(T.lineJoin,"miter"),s.lineWidth=A,s.strokeStyle=it(T.strokeStyle,a),s.setLineDash(it(T.lineDash,[])),o.usePointStyle){const I={radius:m*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:A},V=l.xPlus(C,p/2),Y=k+f;YS(s,I,V,Y,o.pointStyleWidth&&p)}else{const I=k+Math.max((d-m)/2,0),V=l.leftForLtr(C,p),Y=ra(T.borderRadius);s.beginPath(),Object.values(Y).some(ne=>ne!==0)?pu(s,{x:V,y:I,w:p,h:m,radius:Y}):s.rect(V,I,p,m),s.fill(),A!==0&&s.stroke()}s.restore()},x=function(C,k,T){ga(s,T.text,C,k+v/2,c,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},E=this.isHorizontal(),w=this._computeTitleHeight();E?g={x:Yn(r,this.left+u,this.right-i[0]),y:this.top+u+w,line:0}:g={x:this.left+u,y:Yn(r,this.top+w+u,this.bottom-n[0].height),line:0},ZS(this.ctx,e.textDirection);const b=v+u;this.legendItems.forEach((C,k)=>{s.strokeStyle=C.fontColor,s.fillStyle=C.fontColor;const T=s.measureText(C.text).width,A=l.textAlign(C.textAlign||(C.textAlign=o.textAlign)),I=p+f+T;let V=g.x,Y=g.y;l.setWidth(this.width),E?k>0&&V+I+u>this.right&&(Y=g.y+=b,g.line++,V=g.x=Yn(r,this.left+u,this.right-i[g.line])):k>0&&Y+b>this.bottom&&(V=g.x=V+n[g.line].width+u,g.line++,Y=g.y=Yn(r,this.top+w+u,this.bottom-n[g.line].height));const ne=l.x(V);if(y(ne,Y,C),V=LY(A,V+p+f,E?V+I:this.right,e.rtl),x(l.x(V),Y,C),E)g.x+=I+u;else if(typeof C.text!="string"){const N=c.lineHeight;g.y+=Ek(C,N)+u}else g.y+=b}),JS(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=En(n.font),s=Zn(n.padding);if(!n.display)return;const r=ul(e.rtl,this.left,this.width),o=this.ctx,a=n.position,l=i.size/2,c=s.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=Yn(e.align,d,this.right-f);else{const p=this.columnSizes.reduce((m,v)=>Math.max(m,v.height),0);u=c+Yn(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const g=Yn(a,d,d+f);o.textAlign=r.textAlign(Q_(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,ga(o,n.text,g,u,i)}_computeTitleHeight(){const e=this.options.title,n=En(e.font),i=Zn(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,s,r;if(lr(e,this.left,this.right)&&lr(n,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;ir.length>o.length?r:o)),e+n.size/2+i.measureText(s).width}function mU(t,e,n){let i=t;return typeof e.text!="string"&&(i=Ek(e,n)),i}function Ek(t,e){const n=t.text?t.text.length:0;return e*n}function _U(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var vU={id:"legend",_element:R1,start(t,e,n){const i=t.legend=new R1({ctx:t.ctx,options:n,chart:t});Wi.configure(t,i,n),Wi.addBox(t,i)},stop(t){Wi.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;Wi.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Zn(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Ck extends xr{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const s=Yt(i.text)?i.text.length:1;this._padding=Zn(i.padding);const r=s*En(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:i,bottom:s,right:r,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=Yn(a,i,r),d=n+e,c=r-i):(o.position==="left"?(u=i+e,d=Yn(a,s,n),l=Bt*-.5):(u=r-e,d=Yn(a,n,s),l=Bt*.5),c=s-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const i=En(n.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);ga(e,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:Q_(n.align),textBaseline:"middle",translation:[o,a]})}}function yU(t,e){const n=new Ck({ctx:t.ctx,options:e,chart:t});Wi.configure(t,n,e),Wi.addBox(t,n),t.titleBlock=n}var bU={id:"title",_element:Ck,start(t,e,n){yU(t,n)},stop(t){const e=t.titleBlock;Wi.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;Wi.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const kc={average(t){if(!t.length)return!1;let e,n,i=new Set,s=0,r=0;for(e=0,n=t.length;ea+l)/i.size,y:s/r}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,s=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=t.length;r-1?t.split(` -`):t}function wU(t,e){const{element:n,datasetIndex:i,index:s}=e,r=t.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:t,label:o,parsed:r.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function $1(t,e){const n=t.chart.ctx,{body:i,footer:s,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=En(e.bodyFont),c=En(e.titleFont),u=En(e.footerFont),d=r.length,f=s.length,g=i.length,p=Zn(e.padding);let m=p.height,v=0,y=i.reduce((w,b)=>w+b.before.length+b.lines.length+b.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),y){const w=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=g*w+(y-g)*l.lineHeight+(y-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*u.lineHeight+(f-1)*e.footerSpacing);let x=0;const E=function(w){v=Math.max(v,n.measureText(w).width+x)};return n.save(),n.font=c.string,Tt(t.title,E),n.font=l.string,Tt(t.beforeBody.concat(t.afterBody),E),x=e.displayColors?o+2+e.boxPadding:0,Tt(i,w=>{Tt(w.before,E),Tt(w.lines,E),Tt(w.after,E)}),x=0,n.font=u.string,Tt(t.footer,E),n.restore(),v+=p.width,{width:v,height:m}}function xU(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function EU(t,e,n,i){const{x:s,width:r}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&s+r+o>e.width||t==="right"&&s-r-o<0)return!0}function CU(t,e,n,i){const{x:s,width:r}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),EU(c,t,e,n)&&(c="center"),c}function L1(t,e,n){const i=n.yAlign||e.yAlign||xU(t,n);return{xAlign:n.xAlign||e.xAlign||CU(t,e,n,i),yAlign:i}}function SU(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function kU(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function O1(t,e,n,i){const{caretSize:s,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=s+r,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:g}=ra(o);let p=SU(e,a);const m=kU(e,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,f)+s:a==="right"&&(p+=Math.max(d,g)+s),{x:Dn(p,0,i.width-e.width),y:Dn(m,0,i.height-e.height)}}function Bd(t,e,n){const i=Zn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function N1(t){return bs([],Js(t))}function TU(t,e,n){return wo(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function F1(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Sk={beforeTitle:Us,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex"u"?Sk[e].call(n,i):s}class B1 extends xr{static positioners=kc;constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,r=new nk(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=TU(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=hi(i,"beforeTitle",this,e),r=hi(i,"title",this,e),o=hi(i,"afterTitle",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(o)),a}getBeforeBody(e,n){return N1(hi(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return Tt(e,r=>{const o={before:[],lines:[],after:[]},a=F1(i,r);bs(o.before,Js(hi(a,"beforeLabel",this,r))),bs(o.lines,hi(a,"label",this,r)),bs(o.after,Js(hi(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(e,n){return N1(hi(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=hi(i,"beforeFooter",this,e),r=hi(i,"footer",this,e),o=hi(i,"afterFooter",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(o)),a}_createItems(e){const n=this._active,i=this.chart.data,s=[],r=[],o=[];let a=[],l,c;for(l=0,c=n.length;le.filter(u,d,f,i))),e.itemSort&&(a=a.sort((u,d)=>e.itemSort(u,d,i))),Tt(a,u=>{const d=F1(e.callbacks,u);s.push(hi(d,"labelColor",this,u)),r.push(hi(d,"labelPointStyle",this,u)),o.push(hi(d,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const i=this.options.setContext(this.getContext()),s=this._active;let r,o=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{const a=kc[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=$1(this,i),c=Object.assign({},a,l),u=L1(this.chart,i,c),d=O1(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,s){const r=this.getCaretPosition(e,i,s);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(e,n,i){const{xAlign:s,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=ra(a),{x:f,y:g}=e,{width:p,height:m}=n;let v,y,x,E,w,b;return r==="center"?(w=g+m/2,s==="left"?(v=f,y=v-o,E=w+o,b=w-o):(v=f+p,y=v+o,E=w-o,b=w+o),x=v):(s==="left"?y=f+Math.max(l,u)+o:s==="right"?y=f+p-Math.max(c,d)-o:y=this.caretX,r==="top"?(E=g,w=E-o,v=y-o,x=y+o):(E=g+m,w=E+o,v=y+o,x=y-o),b=E),{x1:v,x2:y,x3:x,y1:E,y2:w,y3:b}}drawTitle(e,n,i){const s=this.title,r=s.length;let o,a,l;if(r){const c=ul(i.rtl,this.x,this.width);for(e.x=Bd(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",o=En(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lx!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,pu(e,{x:m,y:p,w:c,h:l,radius:y}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),pu(e,{x:v,y:p+1,w:c-2,h:l-2,radius:y}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(m,p,c,l),e.strokeRect(m,p,c,l),e.fillStyle=o.backgroundColor,e.fillRect(v,p+1,c-2,l-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:s}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=En(i.bodyFont);let f=d.lineHeight,g=0;const p=ul(i.rtl,this.x,this.width),m=function(T){n.fillText(T,p.x(e.x+g),e.y+f/2),e.y+=f+r},v=p.textAlign(o);let y,x,E,w,b,C,k;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=Bd(this,v,i),n.fillStyle=i.bodyColor,Tt(this.beforeBody,m),g=a&&v!=="right"?o==="center"?c/2+u:c+2+u:0,w=0,C=s.length;w0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const o=kc[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=$1(this,e),l=Object.assign({},o,this._size),c=L1(n,e,l),u=O1(e,l,c,n);(s._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Zn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=i,this.drawBackground(r,e,s,n),ZS(e,n.textDirection),r.y+=o.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),JS(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,s=e.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}}),r=!Ah(i,s),o=this._positionChanged(s,n);(r||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],o=this._getActiveElements(e,r,n,i),a=this._positionChanged(o,e),l=n||!Ah(o,r)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,i,s){const r=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:s,options:r}=this,o=kc[r.position].call(this,e,n);return o!==!1&&(i!==o.x||s!==o.y)}}var AU={id:"tooltip",_element:B1,positioners:kc,afterInit(t,e,n){n&&(t.tooltip=new B1({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:Sk},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const PU=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function MU(t,e,n,i){const s=t.indexOf(e);if(s===-1)return PU(t,e,n,i);const r=t.lastIndexOf(e);return s!==r?n:s}const IU=(t,e)=>t===null?null:Dn(Math.round(t),0,e);function V1(t){const e=this.getLabels();return t>=0&&tn.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function RU(t,e){const n=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=t,g=r||1,p=u-1,{min:m,max:v}=e,y=!gt(o),x=!gt(a),E=!gt(c),w=(v-m)/(d+1);let b=L0((v-m)/p/g)*g,C,k,T,A;if(b<1e-14&&!y&&!x)return[{value:m},{value:v}];A=Math.ceil(v/b)-Math.floor(m/b),A>p&&(b=L0(A*b/p/g)*g),gt(l)||(C=Math.pow(10,l),b=Math.ceil(b*C)/C),s==="ticks"?(k=Math.floor(m/b)*b,T=Math.ceil(v/b)*b):(k=m,T=v),y&&x&&r&&AY((a-o)/r,b/1e3)?(A=Math.round(Math.min((a-o)/b,u)),b=(a-o)/A,k=o,T=a):E?(k=y?o:k,T=x?a:T,A=c-1,b=(T-k)/A):(A=(T-k)/b,Uc(A,Math.round(A),b/1e3)?A=Math.round(A):A=Math.ceil(A));const I=Math.max(O0(b),O0(k));C=Math.pow(10,gt(l)?I:l),k=Math.round(k*C)/C,T=Math.round(T*C)/C;let V=0;for(y&&(f&&k!==o?(n.push({value:o}),ka)break;n.push({value:Y})}return x&&f&&T!==a?n.length&&Uc(n[n.length-1].value,a,W1(a,w,t))?n[n.length-1].value=a:n.push({value:a}):(!x||T===a)&&n.push({value:T}),n}function W1(t,e,{horizontal:n,minRotation:i}){const s=ls(i),r=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/r,o)}class Lh extends ba{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return gt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const o=l=>s=n?s:l,a=l=>r=i?r:l;if(e){const l=Os(s),c=Os(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(s===r){let l=r===0?1:Math.abs(r*.05);a(r+l),e||o(s-l)}this.min=s,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,o=RU(s,r);return e.bounds==="ticks"&&$S(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-n)/Math.max(e.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return Uu(e,this.chart.options.locale,this.options.ticks.format)}}class $U extends Lh{static id="linear";static defaults={ticks:{callback:Af.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=nn(e)?e:0,this.max=nn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=ls(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const _u=t=>Math.floor(Gr(t)),Bo=(t,e)=>Math.pow(10,_u(t)+e);function z1(t){return t/Math.pow(10,_u(t))===1}function Y1(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function LU(t,e){const n=e-t;let i=_u(n);for(;Y1(t,e,i)>10;)i++;for(;Y1(t,e,i)<10;)i--;return Math.min(i,_u(t))}function OU(t,{min:e,max:n}){e=Si(t.min,e);const i=[],s=_u(e);let r=LU(e,n),o=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),l=s>r?Math.pow(10,s):0,c=Math.round((e-l)*o)/o,u=Math.floor((e-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,r)),f=Si(t.min,Math.round((l+u+d*Math.pow(10,r))*o)/o);for(;f=10?d=d<15?15:20:d++,d>=20&&(r++,d=2,o=r>=0?1:o),f=Math.round((l+u+d*Math.pow(10,r))*o)/o;const g=Si(t.max,f);return i.push({value:g,major:z1(g),significand:d}),i}class NU extends ba{static id="logarithmic";static defaults={ticks:{callback:Af.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=Lh.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return nn(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=nn(e)?Math.max(0,e):null,this.max=nn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!nn(this._userMin)&&(this.min=e===Bo(this.min,0)?Bo(this.min,-1):Bo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const r=a=>i=e?i:a,o=a=>s=n?s:a;i===s&&(i<=0?(r(1),o(10)):(r(Bo(i,-1)),o(Bo(s,1)))),i<=0&&r(Bo(s,-1)),s<=0&&o(Bo(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=OU(n,this);return e.bounds==="ticks"&&$S(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Uu(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Gr(e),this._valueRange=Gr(this.max)-Gr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Gr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}function mm(t){const e=t.ticks;if(e.display&&t.display){const n=Zn(e.backdropPadding);return it(e.font&&e.font.size,sn.font.size)+n.height}return 0}function FU(t,e,n){return n=Yt(n)?n:[n],{w:jY(t,e.string,n),h:n.length*e.lineHeight}}function H1(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:ts?{start:e-n,end:e}:{start:e,end:e+n}}function BU(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],r=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?Bt/r:0;for(let l=0;le.r&&(a=(i.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),s.starte.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function WU(t,e,n){const i=t.drawingArea,{extra:s,additionalAngle:r,padding:o,size:a}=n,l=t.getPointPosition(e,i+s+o,r),c=Math.round(Z_(ki(l.angle+dn))),u=KU(l.y,a.h,c),d=HU(c),f=jU(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function zU(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:r}=t;return!(ur({x:n,y:i},e)||ur({x:n,y:r},e)||ur({x:s,y:i},e)||ur({x:s,y:r},e))}function YU(t,e,n){const i=[],s=t._pointLabels.length,r=t.options,{centerPointLabels:o,display:a}=r.pointLabels,l={extra:mm(r)/2,additionalAngle:o?Bt/s:0};let c;for(let u=0;u270||n<90)&&(t-=e),t}function UU(t,e,n){const{left:i,top:s,right:r,bottom:o}=n,{backdropColor:a}=e;if(!gt(a)){const l=ra(e.borderRadius),c=Zn(e.backdropPadding);t.fillStyle=a;const u=i-c.left,d=s-c.top,f=r-i+c.width,g=o-s+c.height;Object.values(l).some(p=>p!==0)?(t.beginPath(),pu(t,{x:u,y:d,w:f,h:g,radius:l}),t.fill()):t.fillRect(u,d,f,g)}}function GU(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const r=t._pointLabelItems[s];if(!r.visible)continue;const o=i.setContext(t.getPointLabelContext(s));UU(n,o,r);const a=En(o.font),{x:l,y:c,textAlign:u}=r;ga(n,t._pointLabels[s],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function kk(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Ft);else{let r=t.getPointPosition(0,e);s.moveTo(r.x,r.y);for(let o=1;o{const s=$t(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?BU(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,s){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,s))}getIndexAngle(e){const n=Ft/(this._pointLabels.length||1),i=this.options.startAngle||0;return ki(e*n+ls(i))}getDistanceFromCenterForValue(e){if(gt(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(gt(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),g=s.setContext(f),p=r.setContext(f);XU(this,g,l,o,p)}}),i.display){for(e.save(),a=o-1;a>=0;a--){const u=i.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(e.lineWidth=f,e.strokeStyle=d,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=En(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=u.string,o=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=Zn(c.backdropPadding);e.fillRect(-o/2-d.left,-r-u.size/2-d.top,o+d.width,u.size+d.height)}ga(e,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}const $f={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}},_i=Object.keys($f);function j1(t,e){return t-e}function K1(t,e){if(gt(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:r}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),nn(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Il(r)||r===!0)?n.startOf(o,"isoWeek",r):n.startOf(o,s)),+o)}function U1(t,e,n,i){const s=_i.length;for(let r=_i.indexOf(t);r=_i.indexOf(n);r--){const o=_i[r];if($f[o].common&&t._adapter.diff(s,i,o)>=e-1)return o}return _i[n?_i.indexOf(n):0]}function QU(t){for(let e=_i.indexOf(t)+1,n=_i.length;e=e?n[i]:n[s];t[r]=!0}}function eG(t,e,n,i){const s=t._adapter,r=+s.startOf(e[0].value,i),o=e[e.length-1].value;let a,l;for(a=r;a<=o;a=+s.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}function X1(t,e,n){const i=[],s={},r=e.length;let o,a;for(o=0;o+e.value))}initOffsets(e=[]){let n=0,i=0,s,r;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?i=r:i=(r-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Dn(n,0,o),i=Dn(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,s=this.options,r=s.time,o=r.unit||U1(r.minUnit,n,i,this._getLabelCapacity(n)),a=it(s.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=Il(l)||l===!0,u={};let d=n,f,g;if(c&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,c?"day":o),e.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,g=0;f+m)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,r=this._unit,o=n||s[r];return this._adapter.format(e,o)}_tickFormatFunction(e,n,i,s){const r=this.options,o=r.ticks.callback;if(o)return $t(o,[e,n,i],this);const a=r.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=i[n],g=c&&d&&f&&f.major;return this._adapter.format(e,s||(g?d:u))}generateTickLabels(e){let n,i,s;for(n=0,i=e.length;n0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n=t[i].pos&&e<=t[s].pos&&({lo:i,hi:s}=cr(t,"pos",e)),{pos:r,time:a}=t[i],{pos:o,time:l}=t[s]):(e>=t[i].time&&e<=t[s].time&&({lo:i,hi:s}=cr(t,"time",e)),{time:r,pos:a}=t[i],{time:o,pos:l}=t[s]);const c=o-r;return c?a+(l-a)*(e-r)/c:a}class tG extends _m{static id="timeseries";static defaults=_m.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Vd(n,this.min),this._tableRange=Vd(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,s=[],r=[];let o,a,l,c,u;for(o=0,a=e.length;o=n&&c<=i&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,a=s.length;os-r)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Vd(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return Vd(this._table,i*this._tableRange+this._minPos,!0)}}const Tk={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},nG={ariaLabel:{type:String},ariaDescribedby:{type:String}},iG={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Tk,...nG},sG=ZE[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Fa(t){return Ou(t)?lt(t):t}function rG(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return Ou(e)?new Proxy(t,{}):t}function oG(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function Ak(t,e){t.labels=e}function Pk(t,e,n){const i=[];t.datasets=e.map(s=>{const r=t.datasets.find(o=>o[n]===s[n]);return!r||!s.data||i.includes(r)?{...s}:(i.push(r),Object.assign(r,s),r)})}function aG(t,e){const n={labels:[],datasets:[]};return Ak(n,t.labels),Pk(n,t.datasets,e),n}const lG=fn({props:iG,setup(t,e){let{expose:n,slots:i}=e;const s=me(null),r=df(null);n({chart:r});const o=()=>{if(!s.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:g}=t,p=aG(u,g),m=rG(p,u);r.value=new Df(s.value,{type:c,data:m,options:{...d},plugins:f})},a=()=>{const c=lt(r.value);c&&(t.destroyDelay>0?setTimeout(()=>{c.destroy(),r.value=null},t.destroyDelay):(c.destroy(),r.value=null))},l=c=>{c.update(t.updateMode)};return Vt(o),_o(a),jt([()=>t.options,()=>t.data],(c,u)=>{let[d,f]=c,[g,p]=u;const m=lt(r.value);if(!m)return;let v=!1;if(d){const y=Fa(d),x=Fa(g);y&&y!==x&&(oG(m,y),v=!0)}if(f){const y=Fa(f.labels),x=Fa(p.labels),E=Fa(f.datasets),w=Fa(p.datasets);y!==x&&(Ak(m.config.data,y),v=!0),E&&E!==w&&(Pk(m.config.data,E,t.datasetIdKey),v=!0)}v&&Rn(()=>{l(m)})},{deep:!0}),()=>ha("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:s},[ha("p",{},[i.default?i.default():""])])}});function Mk(t,e){return Df.register(e),fn({props:Tk,setup(n,i){let{expose:s}=i;const r=df(null),o=a=>{r.value=a?.chart};return s({chart:r}),()=>ha(lG,sG({ref:o},{type:t,...n}))}})}const cG=Mk("bar",rk),uG=Mk("line",ak);function yr(t){return Array.isArray?Array.isArray(t):Rk(t)==="[object Array]"}const dG=1/0;function hG(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-dG?"-0":e}function fG(t){return t==null?"":hG(t)}function Ps(t){return typeof t=="string"}function Ik(t){return typeof t=="number"}function gG(t){return t===!0||t===!1||pG(t)&&Rk(t)=="[object Boolean]"}function Dk(t){return typeof t=="object"}function pG(t){return Dk(t)&&t!==null}function Ti(t){return t!=null}function op(t){return!t.trim().length}function Rk(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const mG="Incorrect 'index' type",_G=t=>`Invalid value for key ${t}`,vG=t=>`Pattern length exceeds max of ${t}.`,yG=t=>`Missing ${t} property in key`,bG=t=>`Property 'weight' in key '${t}' must be a positive integer`,q1=Object.prototype.hasOwnProperty;class wG{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(i=>{let s=$k(i);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(i=>{i.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function $k(t){let e=null,n=null,i=null,s=1,r=null;if(Ps(t)||yr(t))i=t,e=Z1(t),n=vm(t);else{if(!q1.call(t,"name"))throw new Error(yG("name"));const o=t.name;if(i=o,q1.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(bG(o));e=Z1(o),n=vm(o),r=t.getFn}return{path:e,id:n,weight:s,src:i,getFn:r}}function Z1(t){return yr(t)?t:t.split(".")}function vm(t){return yr(t)?t.join("."):t}function xG(t,e){let n=[],i=!1;const s=(r,o,a)=>{if(Ti(r))if(!o[a])n.push(r);else{let l=o[a];const c=r[l];if(!Ti(c))return;if(a===o.length-1&&(Ps(c)||Ik(c)||gG(c)))n.push(fG(c));else if(yr(c)){i=!0;for(let u=0,d=c.length;ut.score===e.score?t.idx{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ps(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();Ps(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,i=this.size();n{let o=s.getFn?s.getFn(e):this.getFn(e,s.path);if(Ti(o)){if(yr(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(Ti(u))if(Ps(u)&&!op(u)){let d={v:u,i:c,n:this.norm.get(u)};a.push(d)}else yr(u)&&u.forEach((d,f)=>{l.push({nestedArrIndex:f,value:d})})}i.$[r]=a}else if(Ps(o)&&!op(o)){let a={v:o,n:this.norm.get(o)};i.$[r]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Lk(t,e,{getFn:n=Qe.getFn,fieldNormWeight:i=Qe.fieldNormWeight}={}){const s=new cv({getFn:n,fieldNormWeight:i});return s.setKeys(t.map($k)),s.setSources(e),s.create(),s}function PG(t,{getFn:e=Qe.getFn,fieldNormWeight:n=Qe.fieldNormWeight}={}){const{keys:i,records:s}=t,r=new cv({getFn:e,fieldNormWeight:n});return r.setKeys(i),r.setIndexRecords(s),r}function Wd(t,{errors:e=0,currentLocation:n=0,expectedLocation:i=0,distance:s=Qe.distance,ignoreLocation:r=Qe.ignoreLocation}={}){const o=e/t.length;if(r)return o;const a=Math.abs(i-n);return s?o+a/s:a?1:o}function MG(t=[],e=Qe.minMatchCharLength){let n=[],i=-1,s=-1,r=0;for(let o=t.length;r=e&&n.push([i,s]),i=-1)}return t[r-1]&&r-i>=e&&n.push([i,r-1]),n}const Go=32;function IG(t,e,n,{location:i=Qe.location,distance:s=Qe.distance,threshold:r=Qe.threshold,findAllMatches:o=Qe.findAllMatches,minMatchCharLength:a=Qe.minMatchCharLength,includeMatches:l=Qe.includeMatches,ignoreLocation:c=Qe.ignoreLocation}={}){if(e.length>Go)throw new Error(vG(Go));const u=e.length,d=t.length,f=Math.max(0,Math.min(i,d));let g=r,p=f;const m=a>1||l,v=m?Array(d):[];let y;for(;(y=t.indexOf(e,p))>-1;){let k=Wd(e,{currentLocation:y,expectedLocation:f,distance:s,ignoreLocation:c});if(g=Math.min(k,g),p=y+u,m){let T=0;for(;T=I;N-=1){let B=N-1,R=n[t.charAt(B)];if(m&&(v[B]=+!!R),Y[N]=(Y[N+1]<<1|1)&R,k&&(Y[N]|=(x[N+1]|x[N])<<1|1|x[N+1]),Y[N]&b&&(E=Wd(e,{errors:k,currentLocation:B,expectedLocation:f,distance:s,ignoreLocation:c}),E<=g)){if(g=E,p=B,p<=f)break;I=Math.max(1,2*f-p)}}if(Wd(e,{errors:k+1,currentLocation:f,expectedLocation:f,distance:s,ignoreLocation:c})>g)break;x=Y}const C={isMatch:p>=0,score:Math.max(.001,E)};if(m){const k=MG(v,a);k.length?l&&(C.indices=k):C.isMatch=!1}return C}function DG(t){let e={};for(let n=0,i=t.length;n{this.chunks.push({pattern:f,alphabet:DG(f),startIndex:g})},d=this.pattern.length;if(d>Go){let f=0;const g=d%Go,p=d-g;for(;f{const{isMatch:y,score:x,indices:E}=IG(e,p,m,{location:s+v,distance:r,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});y&&(f=!0),d+=x,y&&E&&(u=[...u,...E])});let g={isMatch:f,score:f?d/this.chunks.length:1};return f&&i&&(g.indices=u),g}}class Eo{constructor(e){this.pattern=e}static isMultiMatch(e){return J1(e,this.multiRegex)}static isSingleMatch(e){return J1(e,this.singleRegex)}search(){}}function J1(t,e){const n=t.match(e);return n?n[1]:null}class RG extends Eo{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class $G extends Eo{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class LG extends Eo{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class OG extends Eo{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class NG extends Eo{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class FG extends Eo{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class Nk extends Eo{constructor(e,{location:n=Qe.location,threshold:i=Qe.threshold,distance:s=Qe.distance,includeMatches:r=Qe.includeMatches,findAllMatches:o=Qe.findAllMatches,minMatchCharLength:a=Qe.minMatchCharLength,isCaseSensitive:l=Qe.isCaseSensitive,ignoreLocation:c=Qe.ignoreLocation}={}){super(e),this._bitapSearch=new Ok(e,{location:n,threshold:i,distance:s,includeMatches:r,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Fk extends Eo{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,i;const s=[],r=this.pattern.length;for(;(i=e.indexOf(this.pattern,n))>-1;)n=i+r,s.push([i,n-1]);const o=!!s.length;return{isMatch:o,score:o?0:1,indices:s}}}const ym=[RG,Fk,LG,OG,FG,NG,$G,Nk],Q1=ym.length,BG=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,VG="|";function WG(t,e={}){return t.split(VG).map(n=>{let i=n.trim().split(BG).filter(r=>r&&!!r.trim()),s=[];for(let r=0,o=i.length;r!!(t[Oh.AND]||t[Oh.OR]),jG=t=>!!t[xm.PATH],KG=t=>!yr(t)&&Dk(t)&&!Em(t),ew=t=>({[Oh.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Bk(t,e,{auto:n=!0}={}){const i=s=>{let r=Object.keys(s);const o=jG(s);if(!o&&r.length>1&&!Em(s))return i(ew(s));if(KG(s)){const l=o?s[xm.PATH]:r[0],c=o?s[xm.PATTERN]:s[l];if(!Ps(c))throw new Error(_G(l));const u={keyId:vm(l),pattern:c};return n&&(u.searcher=wm(c,e)),u}let a={children:[],operator:r[0]};return r.forEach(l=>{const c=s[l];yr(c)&&c.forEach(u=>{a.children.push(i(u))})}),a};return Em(t)||(t=ew(t)),i(t)}function UG(t,{ignoreFieldNorm:e=Qe.ignoreFieldNorm}){t.forEach(n=>{let i=1;n.matches.forEach(({key:s,norm:r,score:o})=>{const a=s?s.weight:null;i*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:r))}),n.score=i})}function GG(t,e){const n=t.matches;e.matches=[],Ti(n)&&n.forEach(i=>{if(!Ti(i.indices)||!i.indices.length)return;const{indices:s,value:r}=i;let o={indices:s,value:r};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function XG(t,e){e.score=t.score}function qG(t,e,{includeMatches:n=Qe.includeMatches,includeScore:i=Qe.includeScore}={}){const s=[];return n&&s.push(GG),i&&s.push(XG),t.map(r=>{const{idx:o}=r,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(r,a)}),a})}class Xl{constructor(e,n={},i){this.options={...Qe,...n},this.options.useExtendedSearch,this._keyStore=new wG(this.options.keys),this.setCollection(e,i)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof cv))throw new Error(mG);this._myIndex=n||Lk(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ti(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let i=0,s=this._docs.length;i-1&&(l=l.slice(0,n)),qG(l,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e){const n=wm(e,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:r,i:o,n:a})=>{if(!Ti(r))return;const{isMatch:l,score:c,indices:u}=n.searchIn(r);l&&s.push({item:r,idx:o,matches:[{score:c,value:r,norm:a,indices:u}]})}),s}_searchLogical(e){const n=Bk(e,this.options),i=(a,l,c)=>{if(!a.children){const{keyId:d,searcher:f}=a,g=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:f});return g&&g.length?[{idx:c,item:l,matches:g}]:[]}const u=[];for(let d=0,f=a.children.length;d{if(Ti(a)){let c=i(n,a,l);c.length&&(r[l]||(r[l]={idx:l,item:a,matches:[]},o.push(r[l])),c.forEach(({matches:u})=>{r[l].matches.push(...u)}))}}),o}_searchObjectList(e){const n=wm(e,this.options),{keys:i,records:s}=this._myIndex,r=[];return s.forEach(({$:o,i:a})=>{if(!Ti(o))return;let l=[];i.forEach((c,u)=>{l.push(...this._findMatches({key:c,value:o[u],searcher:n}))}),l.length&&r.push({idx:a,item:o,matches:l})}),r}_findMatches({key:e,value:n,searcher:i}){if(!Ti(n))return[];let s=[];if(yr(n))n.forEach(({v:r,i:o,n:a})=>{if(!Ti(r))return;const{isMatch:l,score:c,indices:u}=i.searchIn(r);l&&s.push({score:c,key:e,value:r,idx:o,norm:a,indices:u})});else{const{v:r,n:o}=n,{isMatch:a,score:l,indices:c}=i.searchIn(r);a&&s.push({score:l,key:e,value:r,norm:o,indices:c})}return s}}Xl.version="7.0.0";Xl.createIndex=Lk;Xl.parseIndex=PG;Xl.config=Qe;Xl.parseQuery=Bk;HG(YG);const ZG={name:"peerSettings",components:{LocaleText:Le},props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:Xe()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,dt(`/api/updatePeerSettings/${this.$route.params.id}`,this.data,t=>{this.saving=!1,t.status?this.dashboardConfigurationStore.newMessage("Server","Peer saved","success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.$emit("refresh")})},resetPeerData(t){this.saving=!0,dt(`/api/resetPeerData/${this.$route.params.id}`,{id:this.data.id,type:t},e=>{this.saving=!1,e.status?this.dashboardConfigurationStore.newMessage("Server","Peer data usage reset successfully","success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.$emit("refresh")})}},beforeMount(){this.reset()},mounted(){this.$el.querySelectorAll("input").forEach(t=>{t.addEventListener("keyup",()=>{this.dataChanged=!0})})}},JG={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},QG={class:"container d-flex h-100 w-100"},e7={class:"m-auto modal-dialog-centered dashboardModal"},t7={class:"card rounded-3 shadow flex-grow-1"},n7={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},i7={class:"mb-0"},s7={key:0,class:"card-body px-4 pb-4"},r7={class:"d-flex flex-column gap-2 mb-4"},o7={class:"d-flex align-items-center"},a7={class:"text-muted"},l7={class:"ms-auto"},c7={for:"peer_name_textbox",class:"form-label"},u7={class:"text-muted"},d7=["disabled"],h7={class:"d-flex position-relative"},f7={for:"peer_private_key_textbox",class:"form-label"},g7={class:"text-muted"},p7=["type","disabled"],m7={for:"peer_allowed_ip_textbox",class:"form-label"},_7={class:"text-muted"},v7=["disabled"],y7={for:"peer_endpoint_allowed_ips",class:"form-label"},b7={class:"text-muted"},w7=["disabled"],x7={for:"peer_DNS_textbox",class:"form-label"},E7={class:"text-muted"},C7=["disabled"],S7={class:"accordion mt-3",id:"peerSettingsAccordion"},k7={class:"accordion-item"},T7={class:"accordion-header"},A7={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},P7={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},M7={class:"accordion-body d-flex flex-column gap-2 mb-2"},I7={for:"peer_preshared_key_textbox",class:"form-label"},D7={class:"text-muted"},R7=["disabled"],$7={for:"peer_mtu",class:"form-label"},L7={class:"text-muted"},O7=["disabled"],N7={for:"peer_keep_alive",class:"form-label"},F7={class:"text-muted"},B7=["disabled"],V7={class:"d-flex gap-2 align-items-center"},W7={class:"d-flex gap-2 ms-auto"},z7={class:"d-flex align-items-center gap-2"},Y7=["disabled"],H7=["disabled"];function j7(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",JG,[h("div",QG,[h("div",e7,[h("div",t7,[h("div",n7,[h("h4",i7,[$(o,{t:"Peer Settings"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),this.data?(P(),F("div",s7,[h("div",r7,[h("div",o7,[h("small",a7,[$(o,{t:"Public Key"})]),h("small",l7,[h("samp",null,pe(this.data.id),1)])]),h("div",null,[h("label",c7,[h("small",u7,[$(o,{t:"Name"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,d7),[[We,this.data.name]])]),h("div",null,[h("div",h7,[h("label",f7,[h("small",g7,[$(o,{t:"Private Key"}),h("code",null,[$(o,{t:"(Required for QR Code and Download)"})])])]),h("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:e[2]||(e[2]=a=>this.showKey=!this.showKey)},[h("i",{class:Ee(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),Re(h("input",{type:[this.showKey?"text":"password"],class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[3]||(e[3]=a=>this.data.private_key=a),id:"peer_private_key_textbox",style:{"padding-right":"40px"}},null,8,p7),[[uC,this.data.private_key]])]),h("div",null,[h("label",m7,[h("small",_7,[$(o,{t:"Allowed IPs"}),h("code",null,[$(o,{t:"(Required)"})])])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[4]||(e[4]=a=>this.data.allowed_ip=a),id:"peer_allowed_ip_textbox"},null,8,v7),[[We,this.data.allowed_ip]])]),h("div",null,[h("label",y7,[h("small",b7,[$(o,{t:"Endpoint Allowed IPs"}),h("code",null,[$(o,{t:"(Required)"})])])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[5]||(e[5]=a=>this.data.endpoint_allowed_ip=a),id:"peer_endpoint_allowed_ips"},null,8,w7),[[We,this.data.endpoint_allowed_ip]])]),h("div",null,[h("label",x7,[h("small",E7,[$(o,{t:"DNS"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[6]||(e[6]=a=>this.data.DNS=a),id:"peer_DNS_textbox"},null,8,C7),[[We,this.data.DNS]])]),h("div",S7,[h("div",k7,[h("h2",T7,[h("button",A7,[$(o,{t:"Optional Settings"})])]),h("div",P7,[h("div",M7,[h("div",null,[h("label",I7,[h("small",D7,[$(o,{t:"Pre-Shared Key"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[7]||(e[7]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,R7),[[We,this.data.preshared_key]])]),h("div",null,[h("label",$7,[h("small",L7,[$(o,{t:"MTU"})])]),Re(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[8]||(e[8]=a=>this.data.mtu=a),id:"peer_mtu"},null,8,O7),[[We,this.data.mtu]])]),h("div",null,[h("label",N7,[h("small",F7,[$(o,{t:"Persistent Keepalive"})])]),Re(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[9]||(e[9]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,B7),[[We,this.data.keepalive]])])])])])]),e[18]||(e[18]=h("hr",null,null,-1)),h("div",V7,[h("strong",null,[$(o,{t:"Reset Data Usage"})]),h("div",W7,[h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[10]||(e[10]=a=>this.resetPeerData("total"))},[e[15]||(e[15]=h("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),$(o,{t:"Total"})]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[11]||(e[11]=a=>this.resetPeerData("receive"))},[e[16]||(e[16]=h("i",{class:"bi bi-arrow-down me-2"},null,-1)),$(o,{t:"Received"})]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[12]||(e[12]=a=>this.resetPeerData("sent"))},[e[17]||(e[17]=h("i",{class:"bi bi-arrow-up me-2"},null,-1)),$(o,{t:"Sent"})])])])]),h("div",z7,[h("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto px-3 py-2",onClick:e[13]||(e[13]=a=>this.reset()),disabled:!this.dataChanged||this.saving},e[19]||(e[19]=[h("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,Y7),h("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 px-3 py-2 shadow",disabled:!this.dataChanged||this.saving,onClick:e[14]||(e[14]=a=>this.savePeer())},e[20]||(e[20]=[h("i",{class:"bi bi-save-fill"},null,-1)]),8,H7)])])):se("",!0)])])])])}const K7=ze(ZG,[["render",j7],["__scopeId","data-v-a63ae8cb"]]);var wa={},U7=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Vk={},Ri={};let uv;const G7=[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];Ri.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Ri.getSymbolTotalCodewords=function(e){return G7[e]};Ri.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Ri.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');uv=e};Ri.isKanjiModeEnabled=function(){return typeof uv<"u"};Ri.toSJIS=function(e){return uv(e)};var Lf={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,s){if(t.isValid(i))return i;try{return e(i)}catch{return s}}})(Lf);function Wk(){this.buffer=[],this.length=0}Wk.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var X7=Wk;function Xu(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Xu.prototype.set=function(t,e,n,i){const s=t*this.size+e;this.data[s]=n,i&&(this.reservedBit[s]=!0)};Xu.prototype.get=function(t,e){return this.data[t*this.size+e]};Xu.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Xu.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var q7=Xu,zk={};(function(t){const e=Ri.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const s=Math.floor(i/7)+2,r=e(i),o=r===145?26:Math.ceil((r-13)/(2*s-2))*2,a=[r-7];for(let l=1;l=0&&s<=7},t.from=function(s){return t.isValid(s)?parseInt(s,10):void 0},t.getPenaltyN1=function(s){const r=s.size;let o=0,a=0,l=0,c=null,u=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),c=g,a=1),g=s.get(f,d),g===u?l++:(l>=5&&(o+=e.N1+(l-5)),u=g,l=1)}a>=5&&(o+=e.N1+(a-5)),l>=5&&(o+=e.N1+(l-5))}return o},t.getPenaltyN2=function(s){const r=s.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,l=l<<1&2047|s.get(u,c),u>=10&&(l===1488||l===93)&&o++}return o*e.N3},t.getPenaltyN4=function(s){let r=0;const o=s.data.length;for(let l=0;l=0;){const o=r[0];for(let l=0;l0){const r=new Uint8Array(this.degree);return r.set(i,s),r}return i};var J7=dv,Uk={},Co={},hv={};hv.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Vs={};const Gk="[0-9]+",Q7="[A-Z $%*+\\-./:]+";let vu="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";vu=vu.replace(/u/g,"\\u");const e9="(?:(?![A-Z0-9 $%*+\\-./:]|"+vu+`)(?:.|[\r -]))+`;Vs.KANJI=new RegExp(vu,"g");Vs.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Vs.BYTE=new RegExp(e9,"g");Vs.NUMERIC=new RegExp(Gk,"g");Vs.ALPHANUMERIC=new RegExp(Q7,"g");const t9=new RegExp("^"+vu+"$"),n9=new RegExp("^"+Gk+"$"),i9=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Vs.testKanji=function(e){return t9.test(e)};Vs.testNumeric=function(e){return n9.test(e)};Vs.testAlphanumeric=function(e){return i9.test(e)};(function(t){const e=hv,n=Vs;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(r,o){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?r.ccBits[0]:o<27?r.ccBits[1]:r.ccBits[2]},t.getBestModeForData=function(r){return n.testNumeric(r)?t.NUMERIC:n.testAlphanumeric(r)?t.ALPHANUMERIC:n.testKanji(r)?t.KANJI:t.BYTE},t.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},t.isValid=function(r){return r&&r.bit&&r.ccBits};function i(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+s)}}t.from=function(r,o){if(t.isValid(r))return r;try{return i(r)}catch{return o}}})(Co);(function(t){const e=Ri,n=Of,i=Lf,s=Co,r=hv,o=7973,a=e.getBCHDigit(o);function l(f,g,p){for(let m=1;m<=40;m++)if(g<=t.getCapacity(m,p,f))return m}function c(f,g){return s.getCharCountIndicator(f,g)+4}function u(f,g){let p=0;return f.forEach(function(m){const v=c(m.mode,g);p+=v+m.getBitsLength()}),p}function d(f,g){for(let p=1;p<=40;p++)if(u(f,p)<=t.getCapacity(p,g,s.MIXED))return p}t.from=function(g,p){return r.isValid(g)?parseInt(g,10):p},t.getCapacity=function(g,p,m){if(!r.isValid(g))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=s.BYTE);const v=e.getSymbolTotalCodewords(g),y=n.getTotalCodewordsCount(g,p),x=(v-y)*8;if(m===s.MIXED)return x;const E=x-c(m,g);switch(m){case s.NUMERIC:return Math.floor(E/10*3);case s.ALPHANUMERIC:return Math.floor(E/11*2);case s.KANJI:return Math.floor(E/13);case s.BYTE:default:return Math.floor(E/8)}},t.getBestVersionForData=function(g,p){let m;const v=i.from(p,i.M);if(Array.isArray(g)){if(g.length>1)return d(g,v);if(g.length===0)return 1;m=g[0]}else m=g;return l(m.mode,m.getLength(),v)},t.getEncodedBits=function(g){if(!r.isValid(g)||g<7)throw new Error("Invalid QR Code version");let p=g<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<=0;)s^=qk<0&&(i=this.data.substr(n),s=parseInt(i,10),e.put(s,r*3+1))};var o9=$l;const a9=Co,ap=["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 Ll(t){this.mode=a9.ALPHANUMERIC,this.data=t}Ll.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Ll.prototype.getLength=function(){return this.data.length};Ll.prototype.getBitsLength=function(){return Ll.getBitsLength(this.data.length)};Ll.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=ap.indexOf(this.data[n])*45;i+=ap.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(ap.indexOf(this.data[n]),6)};var l9=Ll;const c9=Co;function Ol(t){this.mode=c9.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}Ol.getBitsLength=function(e){return e*8};Ol.prototype.getLength=function(){return this.data.length};Ol.prototype.getBitsLength=function(){return Ol.getBitsLength(this.data.length)};Ol.prototype.write=function(t){for(let e=0,n=this.data.length;e=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` -Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var f9=Nl,Jk={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,i,s){var r={},o={};o[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var l,c,u,d,f,g,p,m,v;!a.empty();){l=a.pop(),c=l.value,d=l.cost,f=n[c]||{};for(u in f)f.hasOwnProperty(u)&&(g=f[u],p=d+g,m=o[u],v=typeof o[u]>"u",(v||m>p)&&(o[u]=p,a.push(u,p),r[u]=c))}if(typeof s<"u"&&typeof o[s]>"u"){var y=["Could not find a path from ",i," to ",s,"."].join("");throw new Error(y)}return r},extract_shortest_path_from_predecessor_list:function(n,i){for(var s=[],r=i;r;)s.push(r),n[r],r=n[r];return s.reverse(),s},find_path:function(n,i,s){var r=e.single_source_shortest_paths(n,i,s);return e.extract_shortest_path_from_predecessor_list(r,s)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,s={},r;n=n||{};for(r in i)i.hasOwnProperty(r)&&(s[r]=i[r]);return s.queue=[],s.sorter=n.sorter||i.default_sorter,s},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var s={value:n,cost:i};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(Jk);var g9=Jk.exports;(function(t){const e=Co,n=o9,i=l9,s=u9,r=f9,o=Vs,a=Ri,l=g9;function c(y){return unescape(encodeURIComponent(y)).length}function u(y,x,E){const w=[];let b;for(;(b=y.exec(E))!==null;)w.push({data:b[0],index:b.index,mode:x,length:b[0].length});return w}function d(y){const x=u(o.NUMERIC,e.NUMERIC,y),E=u(o.ALPHANUMERIC,e.ALPHANUMERIC,y);let w,b;return a.isKanjiModeEnabled()?(w=u(o.BYTE,e.BYTE,y),b=u(o.KANJI,e.KANJI,y)):(w=u(o.BYTE_KANJI,e.BYTE,y),b=[]),x.concat(E,w,b).sort(function(k,T){return k.index-T.index}).map(function(k){return{data:k.data,mode:k.mode,length:k.length}})}function f(y,x){switch(x){case e.NUMERIC:return n.getBitsLength(y);case e.ALPHANUMERIC:return i.getBitsLength(y);case e.KANJI:return r.getBitsLength(y);case e.BYTE:return s.getBitsLength(y)}}function g(y){return y.reduce(function(x,E){const w=x.length-1>=0?x[x.length-1]:null;return w&&w.mode===E.mode?(x[x.length-1].data+=E.data,x):(x.push(E),x)},[])}function p(y){const x=[];for(let E=0;E=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?t.set(r+a,o+l,!0,!0):t.set(r+a,o+l,!1,!0))}}function E9(t){const e=t.size;for(let n=8;n>a&1)===1,t.set(s,r,o,!0),t.set(r,s,o,!0)}function up(t,e,n){const i=t.size,s=b9.getEncodedBits(e,n);let r,o;for(r=0;r<15;r++)o=(s>>r&1)===1,r<6?t.set(r,8,o,!0):r<8?t.set(r+1,8,o,!0):t.set(i-15+r,8,o,!0),r<8?t.set(8,i-r-1,o,!0):r<9?t.set(8,15-r-1+1,o,!0):t.set(8,15-r-1,o,!0);t.set(i-8,8,1,!0)}function k9(t,e){const n=t.size;let i=-1,s=n-1,r=7,o=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!t.isReserved(s,a-l)){let c=!1;o>>r&1)===1),t.set(s,a-l,c),r--,r===-1&&(o++,r=7)}if(s+=i,s<0||n<=s){s-=i,i=-i;break}}}function T9(t,e,n){const i=new p9;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),w9.getCharCountIndicator(l.mode,t)),l.write(i)});const s=Ff.getSymbolTotalCodewords(t),r=km.getTotalCodewordsCount(t,e),o=(s-r)*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const a=(o-i.getLengthInBits())/8;for(let l=0;l=7&&S9(l,e),k9(l,o),isNaN(i)&&(i=Sm.getBestMask(l,up.bind(null,l,n))),Sm.applyMask(i,l),up(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:s}}Vk.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=lp.M,s,r;return typeof n<"u"&&(i=lp.from(n.errorCorrectionLevel,lp.M),s=Fh.from(n.version),r=Sm.from(n.maskPattern),n.toSJISFunc&&Ff.setToSJISFunction(n.toSJISFunc)),P9(e,s,i,r)};var Qk={},fv={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(r){return[r,r]}))),i.length===6&&i.push("F","F");const s=parseInt(i.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const s=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,r=i.width&&i.width>=21?i.width:void 0,o=i.scale||4;return{width:r,scale:r?4:o,margin:s,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,s){return s.width&&s.width>=i+s.margin*2?s.width/(i+s.margin*2):s.scale},t.getImageWidth=function(i,s){const r=t.getScale(i,s);return Math.floor((i+s.margin*2)*r)},t.qrToImageData=function(i,s,r){const o=s.modules.size,a=s.modules.data,l=t.getScale(o,r),c=Math.floor((o+r.margin*2)*l),u=r.margin*l,d=[r.color.light,r.color.dark];for(let f=0;f=u&&g>=u&&f"u"&&(!o||!o.getContext)&&(l=o,o=void 0),o||(c=i()),l=e.getOptions(l);const u=e.getImageWidth(r.modules.size,l),d=c.getContext("2d"),f=d.createImageData(u,u);return e.qrToImageData(f.data,r,l),n(d,c,u),d.putImageData(f,0,0),c},t.renderToDataURL=function(r,o,a){let l=a;typeof l>"u"&&(!o||!o.getContext)&&(l=o,o=void 0),l||(l={});const c=t.render(r,o,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(Qk);var eT={};const M9=fv;function iw(t,e){const n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function dp(t,e,n){let i=t+e;return typeof n<"u"&&(i+=" "+n),i}function I9(t,e,n){let i="",s=0,r=!1,o=0;for(let a=0;a0&&l>0&&t[a-1]||(i+=r?dp("M",l+n,.5+c+n):dp("m",s,0),s=0,r=!1),l+1':"",c="',u='viewBox="0 0 '+a+" "+a+'"',f=''+l+c+` -`;return typeof i=="function"&&i(null,f),f};const D9=U7,Tm=Vk,tT=Qk,R9=eT;function gv(t,e,n,i,s){const r=[].slice.call(arguments,1),o=r.length,a=typeof r[o-1]=="function";if(!a&&!D9())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(s=n,n=e,e=i=void 0):o===3&&(e.getContext&&typeof s>"u"?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(n=e,e=i=void 0):o===2&&!e.getContext&&(i=n,n=e,e=void 0),new Promise(function(l,c){try{const u=Tm.create(n,i);l(t(u,e,i))}catch(u){c(u)}})}try{const l=Tm.create(n,i);s(null,t(l,e,i))}catch(l){s(l)}}wa.create=Tm.create;wa.toCanvas=gv.bind(null,tT.render);wa.toDataURL=gv.bind(null,tT.renderToDataURL);wa.toString=gv.bind(null,function(t,e,n){return R9.render(t,n)});const $9={name:"peerQRCode",components:{LocaleText:Le},props:{peerConfigData:String},mounted(){wa.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},L9={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},O9={class:"container d-flex h-100 w-100"},N9={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},F9={class:"card rounded-3 shadow"},B9={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},V9={class:"mb-0"},W9={class:"card-body"},z9={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function Y9(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",L9,[h("div",O9,[h("div",N9,[h("div",F9,[h("div",B9,[h("h4",V9,[$(o,{t:"QR Code"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),h("div",W9,[h("canvas",z9,null,512)])])])])])}const H9=ze($9,[["render",Y9]]),j9={name:"nameInput",components:{LocaleText:Le},props:{bulk:Boolean,data:Object,saving:Boolean}},K9={for:"peer_name_textbox",class:"form-label"},U9={class:"text-muted"},G9=["disabled"];function X9(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",{class:Ee({inactiveField:this.bulk})},[h("label",K9,[h("small",U9,[$(o,{t:"Name"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,G9),[[We,this.data.name]])],2)}const q9=ze(j9,[["render",X9]]),Z9={name:"privatePublicKeyInput",components:{LocaleText:Le},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const t=Xe(),e=$n();return{dashboardStore:t,wgStore:e}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},testKey(t){return/^[A-Za-z0-9+/]{43}=?=?$/.test(t)},checkMatching(){try{this.keypair.privateKey&&this.wgStore.checkWGKeyLength(this.keypair.privateKey)&&(this.keypair.publicKey=window.wireguard.generatePublicKey(this.keypair.privateKey),window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey?(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private key does not match with the public key","danger")):(this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},J9={for:"peer_private_key_textbox",class:"form-label"},Q9={class:"text-muted"},eX={class:"input-group"},tX=["disabled"],nX=["disabled"],iX={class:"d-flex"},sX={for:"public_key",class:"form-label"},rX={class:"text-muted"},oX={class:"form-check form-switch ms-auto"},aX=["disabled"],lX={class:"form-check-label",for:"enablePublicKeyEdit"},cX=["disabled"];function uX(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",{class:Ee(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[h("div",null,[h("label",J9,[h("small",Q9,[$(o,{t:"Private Key"}),h("code",null,[$(o,{t:"(Required for QR Code and Download)"})])])]),h("div",eX,[Re(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.keypair.privateKey=a),disabled:!this.editKey||this.bulk,onBlur:e[1]||(e[1]=a=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,tX),[[We,this.keypair.privateKey]]),h("button",{class:"btn btn-outline-info btn-sm rounded-end-3",onClick:e[2]||(e[2]=a=>this.genKeyPair()),disabled:this.bulk,type:"button",id:"button-addon2"},e[6]||(e[6]=[h("i",{class:"bi bi-arrow-repeat"},null,-1)]),8,nX)])]),h("div",null,[h("div",iX,[h("label",sX,[h("small",rX,[$(o,{t:"Public Key"}),h("code",null,[$(o,{t:"(Required)"})])])]),h("div",oX,[Re(h("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:this.bulk,id:"enablePublicKeyEdit","onUpdate:modelValue":e[3]||(e[3]=a=>this.editKey=a)},null,8,aX),[[Gn,this.editKey]]),h("label",lX,[h("small",null,[$(o,{t:"Use your own Private and Public Key"})])])])]),Re(h("input",{class:Ee(["form-control-sm form-control rounded-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[4]||(e[4]=a=>this.keypair.publicKey=a),onBlur:e[5]||(e[5]=a=>this.checkMatching()),disabled:!this.editKey||this.bulk,type:"text",id:"public_key"},null,42,cX),[[We,this.keypair.publicKey]])])],2)}const dX=ze(Z9,[["render",uX]]),hX={name:"allowedIPsInput",components:{LocaleText:Le},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const t=$n(),e=Xe();return{store:t,dashboardStore:e}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp.filter(t=>t.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(t)):this.availableIp.filter(t=>!this.data.allowed_ips.includes(t))},inputGetLocale(){return At("Enter IP Address/CIDR")}},methods:{addAllowedIp(t){return this.store.checkCIDR(t)?(this.data.allowed_ips.push(t),this.customAvailableIp="",!0):(this.allowedIpFormatError=!0,this.dashboardStore.newMessage("WGDashboard","Allowed IPs is invalid","danger"),!1)}},watch:{customAvailableIp(){this.allowedIpFormatError=!1},availableIp(){this.availableIp!==void 0&&this.availableIp.length>0&&this.addAllowedIp(this.availableIp[0])}},mounted(){}},fX={for:"peer_allowed_ip_textbox",class:"form-label"},gX={class:"text-muted"},pX=["onClick"],mX={class:"d-flex gap-2 align-items-center"},_X={class:"input-group"},vX=["placeholder","disabled"],yX=["disabled"],bX={class:"text-muted"},wX={class:"dropdown flex-grow-1"},xX=["disabled"],EX={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3",style:{"overflow-y":"scroll","max-height":"270px",width:"300px !important"}},CX={class:"px-3 pb-2 pt-1 d-flex gap-3 align-items-center"},SX=["onClick"],kX={class:"me-auto"},TX={key:0},AX={class:"px-3 text-muted"};function PX(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",{class:Ee({inactiveField:this.bulk})},[h("label",fX,[h("small",gX,[$(o,{t:"Allowed IPs"}),h("code",null,[$(o,{t:"(Required)"})])])]),h("div",{class:Ee(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[$(vo,{name:"list"},{default:Pe(()=>[(P(!0),F(Ie,null,Ge(this.data.allowed_ips,(a,l)=>(P(),F("span",{class:"badge rounded-pill text-bg-success",key:a},[Be(pe(a)+" ",1),h("a",{role:"button",onClick:c=>this.data.allowed_ips.splice(l,1)},e[3]||(e[3]=[h("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)]),8,pX)]))),128))]),_:1})],2),h("div",mX,[h("div",_X,[Re(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:this.inputGetLocale,"onUpdate:modelValue":e[0]||(e[0]=a=>s.customAvailableIp=a),disabled:n.bulk},null,10,vX),[[We,s.customAvailableIp]]),h("button",{class:"btn btn-outline-success btn-sm rounded-end-3",disabled:n.bulk||!this.customAvailableIp,onClick:e[1]||(e[1]=a=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},e[4]||(e[4]=[h("i",{class:"bi bi-plus-lg"},null,-1)]),8,yX)]),h("small",bX,[$(o,{t:"or"})]),h("div",wX,[h("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!n.availableIp||n.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[e[5]||(e[5]=h("i",{class:"bi bi-filter-circle me-2"},null,-1)),$(o,{t:"Pick Available IP"})],8,xX),this.availableIp?(P(),F("ul",EX,[h("li",null,[h("div",CX,[e[6]||(e[6]=h("label",{for:"availableIpSearchString",class:"text-muted"},[h("i",{class:"bi bi-search"})],-1)),Re(h("input",{id:"availableIpSearchString",class:"form-control form-control-sm rounded-3","onUpdate:modelValue":e[2]||(e[2]=a=>this.availableIpSearchString=a)},null,512),[[We,this.availableIpSearchString]])])]),(P(!0),F(Ie,null,Ge(this.searchAvailableIps,a=>(P(),F("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:l=>this.addAllowedIp(a)},[h("span",kX,[h("small",null,pe(a),1)])],8,SX)]))),256)),this.searchAvailableIps.length===0?(P(),F("li",TX,[h("small",AX,[$(o,{t:"No available IP containing"}),Be(' "'+pe(this.availableIpSearchString)+'"',1)])])):se("",!0)])):se("",!0)])])],2)}const MX=ze(hX,[["render",PX],["__scopeId","data-v-6d5fc831"]]),IX={name:"dnsInput",components:{LocaleText:Le},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const t=$n(),e=Xe();return{store:t,dashboardStore:e}},methods:{checkDNS(){if(this.dns){let t=this.dns.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.regexCheckIP(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","DNS format is incorrect","danger"),this.error=!0,this.data.DNS="";return}this.error=!1,this.data.DNS=this.dns}}},watch:{dns(){this.checkDNS()}}},DX={for:"peer_DNS_textbox",class:"form-label"},RX={class:"text-muted"},$X=["disabled"];function LX(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("label",DX,[h("small",RX,[$(o,{t:"DNS"})])]),Re(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-3",{"is-invalid":this.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.dns=a),id:"peer_DNS_textbox"},null,10,$X),[[We,this.dns]])])}const OX=ze(IX,[["render",LX]]),NX={name:"endpointAllowedIps",components:{LocaleText:Le},props:{data:Object,saving:Boolean},setup(){const t=$n(),e=Xe();return{store:t,dashboardStore:e}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let t=this.endpointAllowedIps.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.checkCIDR(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","Endpoint Allowed IPs format is incorrect","danger"),this.data.endpoint_allowed_ip="",this.error=!0;return}this.error=!1,this.data.endpoint_allowed_ip=this.endpointAllowedIps}},watch:{endpointAllowedIps(){this.checkAllowedIP()}}},FX={for:"peer_endpoint_allowed_ips",class:"form-label"},BX={class:"text-muted"},VX=["disabled"];function WX(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("label",FX,[h("small",BX,[$(o,{t:"Endpoint Allowed IPs"}),h("code",null,[$(o,{t:"(Required)"})])])]),Re(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-3",{"is-invalid":s.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.endpointAllowedIps=a),onBlur:e[1]||(e[1]=a=>this.checkAllowedIP()),id:"peer_endpoint_allowed_ips"},null,42,VX),[[We,this.endpointAllowedIps]])])}const zX=ze(NX,[["render",WX]]),YX={name:"presharedKeyInput",components:{LocaleText:Le},props:{data:Object,saving:Boolean},data(){return{enable:!1}},watch:{enable(){this.enable?this.data.preshared_key=window.wireguard.generateKeypair().presharedKey:this.data.preshared_key=""}}},HX={class:"d-flex align-items-start"},jX={for:"peer_preshared_key_textbox",class:"form-label"},KX={class:"text-muted"},UX={class:"form-check form-switch ms-auto"},GX=["disabled"];function XX(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("div",HX,[h("label",jX,[h("small",KX,[$(o,{t:"Pre-Shared Key"})])]),h("div",UX,[Re(h("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=a=>this.enable=a),id:"peer_preshared_key_switch"},null,512),[[Gn,this.enable]])])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||!this.enable,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,GX),[[We,this.data.preshared_key]])])}const qX=ze(YX,[["render",XX]]),ZX={name:"mtuInput",components:{LocaleText:Le},props:{data:Object,saving:Boolean}},JX={for:"peer_mtu",class:"form-label"},QX={class:"text-muted"},eq=["disabled"];function tq(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("label",JX,[h("small",QX,[$(o,{t:"MTU"})])]),Re(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.mtu=a),min:"0",id:"peer_mtu"},null,8,eq),[[We,this.data.mtu]])])}const nq=ze(ZX,[["render",tq]]),iq={name:"persistentKeepAliveInput",components:{LocaleText:Le},props:{data:Object,saving:Boolean}},sq={for:"peer_keep_alive",class:"form-label"},rq={class:"text-muted"},oq=["disabled"];function aq(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("label",sq,[h("small",rq,[$(o,{t:"Persistent Keepalive"})])]),Re(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,oq),[[We,this.data.keepalive]])])}const lq=ze(iq,[["render",aq]]),cq={name:"bulkAdd",components:{LocaleText:Le},props:{saving:Boolean,data:Object,availableIp:void 0},computed:{bulkAddGetLocale(){return At("How many peers you want to add?")}}},uq={class:"form-check form-switch"},dq=["disabled"],hq={class:"form-check-label me-2",for:"bulk_add"},fq={class:"text-muted d-block"},gq={key:0,class:"form-group"},pq=["max","placeholder"],mq={class:"text-muted"};function _q(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",null,[h("div",uq,[Re(h("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:!this.availableIp,id:"bulk_add","onUpdate:modelValue":e[0]||(e[0]=a=>this.data.bulkAdd=a)},null,8,dq),[[Gn,this.data.bulkAdd]]),h("label",hq,[h("small",null,[h("strong",null,[$(o,{t:"Bulk Add"})])])])]),h("p",{class:Ee({"mb-0":!this.data.bulkAdd})},[h("small",fq,[$(o,{t:"By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP."})])],2),this.data.bulkAdd?(P(),F("div",gq,[Re(h("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",max:this.availableIp.length,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.bulkAddAmount=a),placeholder:this.bulkAddGetLocale},null,8,pq),[[We,this.data.bulkAddAmount]]),h("small",mq,[$(o,{t:"You can add up to "+this.availableIp.length+" peers"},null,8,["t"])])])):se("",!0)])}const vq=ze(cq,[["render",_q]]),yq={name:"peerCreate",components:{LocaleText:Le,BulkAdd:vq,PersistentKeepAliveInput:lq,MtuInput:nq,PresharedKeyInput:qX,EndpointAllowedIps:zX,DnsInput:OX,AllowedIPsInput:MX,PrivatePublicKeyInput:dX,NameInput:q9},data(){return{data:{bulkAdd:!1,bulkAddAmount:0,name:"",allowed_ips:[],private_key:"",public_key:"",DNS:this.dashboardStore.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:this.dashboardStore.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(this.dashboardStore.Configuration.Peers.peer_keep_alive),mtu:parseInt(this.dashboardStore.Configuration.Peers.peer_mtu),preshared_key:"",preshared_key_bulkAdd:!1},availableIp:void 0,availableIpSearchString:"",saving:!1,allowedIpDropdown:void 0}},mounted(){Pt("/api/getAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.availableIp=t.data)})},setup(){const t=$n(),e=Xe();return{store:t,dashboardStore:e}},methods:{peerCreate(){this.saving=!0,dt("/api/addPeers/"+this.$route.params.id,this.data,t=>{t.status?(this.$router.push(`/configuration/${this.$route.params.id}/peers`),this.dashboardStore.newMessage("Server","Peer created successfully","success")):this.dashboardStore.newMessage("Server",t.message,"danger"),this.saving=!1})}},computed:{allRequireFieldsFilled(){let t=!0;return this.data.bulkAdd?(this.data.bulkAddAmount.length===0||this.data.bulkAddAmount>this.availableIp.length)&&(t=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(n=>{this.data[n].length===0&&(t=!1)}),t}},watch:{bulkAdd(t){t||(this.data.bulkAddAmount="")},"data.bulkAddAmount"(){this.data.bulkAddAmount>this.availableIp.length&&(this.data.bulkAddAmount=this.availableIp.length)}}},bq={class:"container"},wq={class:"mb-4"},xq={class:"mb-5 d-flex align-items-center gap-4"},Eq={class:"mb-0"},Cq={class:"d-flex flex-column gap-2"},Sq={class:"row gy-3"},kq={key:0,class:"col-sm"},Tq={class:"col-sm"},Aq={class:"col-sm"},Pq={key:1,class:"col-12"},Mq={class:"form-check form-switch"},Iq={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},Dq={class:"fw-bold"},Rq={class:"d-flex mt-2"},$q=["disabled"],Lq={key:0,class:"bi bi-plus-circle-fill me-2"};function Oq(t,e,n,i,s,r){const o=Se("RouterLink"),a=Se("LocaleText"),l=Se("BulkAdd"),c=Se("NameInput"),u=Se("PrivatePublicKeyInput"),d=Se("AllowedIPsInput"),f=Se("EndpointAllowedIps"),g=Se("DnsInput"),p=Se("PresharedKeyInput"),m=Se("MtuInput"),v=Se("PersistentKeepAliveInput");return P(),F("div",bq,[h("div",wq,[h("div",xq,[$(o,{to:"peers",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:Pe(()=>e[2]||(e[2]=[h("h2",{class:"mb-0",style:{"line-height":"0"}},[h("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1}),h("h2",Eq,[$(a,{t:"Add Peers"})])])]),h("div",Cq,[$(l,{saving:s.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),e[3]||(e[3]=h("hr",{class:"mb-0 mt-2"},null,-1)),this.data.bulkAdd?se("",!0):(P(),Ce(c,{key:0,saving:s.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?se("",!0):(P(),Ce(u,{key:1,saving:s.saving,data:s.data},null,8,["saving","data"])),this.data.bulkAdd?se("",!0):(P(),Ce(d,{key:2,availableIp:this.availableIp,saving:s.saving,data:s.data},null,8,["availableIp","saving","data"])),$(f,{saving:s.saving,data:s.data},null,8,["saving","data"]),$(g,{saving:s.saving,data:s.data},null,8,["saving","data"]),e[4]||(e[4]=h("hr",{class:"mb-0 mt-2"},null,-1)),h("div",Sq,[this.data.bulkAdd?se("",!0):(P(),F("div",kq,[$(p,{saving:s.saving,data:s.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),h("div",Tq,[$(m,{saving:s.saving,data:s.data},null,8,["saving","data"])]),h("div",Aq,[$(v,{saving:s.saving,data:s.data},null,8,["saving","data"])]),this.data.bulkAdd?(P(),F("div",Pq,[h("div",Mq,[Re(h("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=y=>this.data.preshared_key_bulkAdd=y),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[Gn,this.data.preshared_key_bulkAdd]]),h("label",Iq,[h("small",Dq,[$(a,{t:"Pre-Shared Key"}),this.data.preshared_key_bulkAdd?(P(),Ce(a,{key:0,t:"Enabled"})):(P(),Ce(a,{key:1,t:"Disabled"}))])])])])):se("",!0)]),h("div",Rq,[h("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.allRequireFieldsFilled||this.saving,onClick:e[1]||(e[1]=y=>this.peerCreate())},[this.saving?se("",!0):(P(),F("i",Lq)),this.saving?(P(),Ce(a,{key:1,t:"Adding..."})):(P(),Ce(a,{key:2,t:"Add"}))],8,$q)])])])}const nT=ze(yq,[["render",Oq],["__scopeId","data-v-17eb547c"]]),Nq={name:"scheduleDropdown",props:{options:Array,data:String,edit:!1},setup(t){t.data===void 0&&this.$emit("update",this.options[0].value)},computed:{currentSelection(){return this.options.find(t=>t.value===this.data)}}},Fq={class:"dropdown scheduleDropdown"},Bq={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},Vq=["onClick"],Wq={key:0,class:"bi bi-check ms-auto"};function zq(t,e,n,i,s,r){return P(),F("div",Fq,[h("button",{class:Ee(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!n.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[h("samp",null,pe(this.currentSelection.display),1)],2),h("ul",Bq,[n.edit?(P(!0),F(Ie,{key:0},Ge(this.options,o=>(P(),F("li",null,[h("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:a=>t.$emit("update",o.value)},[h("samp",null,pe(o.display),1),o.value===this.currentSelection.value?(P(),F("i",Wq)):se("",!0)],8,Vq)]))),256)):se("",!0)])])}const iT=ze(Nq,[["render",zq],["__scopeId","data-v-6a5aba2a"]]),Yq={name:"schedulePeerJob",components:{LocaleText:Le,VueDatePicker:ju,ScheduleDropdown:iT},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(t){const e=me({}),n=me(!1),i=me(!1);e.value=JSON.parse(JSON.stringify(t.pjob)),e.value.CreationDate||(n.value=!0,i.value=!0);const s=Xe();return{job:e,edit:n,newJob:i,store:s}},data(){return{inputType:void 0}},watch:{pjob:{deep:!0,immediate:!0,handler(t){this.edit||(this.job=JSON.parse(JSON.stringify(t)))}}},methods:{save(){this.job.Field&&this.job.Operator&&this.job.Action&&this.job.Value?dt("/api/savePeerScheduleJob/",{Job:this.job},t=>{t.status?(this.edit=!1,this.store.newMessage("Server","Peer job saved","success"),console.log(t.data),this.$emit("refresh",t.data[0]),this.newJob=!1):this.store.newMessage("Server",t.message,"danger")}):this.alert()},alert(){let t="animate__flash",e=this.$el.querySelectorAll(".scheduleDropdown"),n=this.$el.querySelectorAll("input");e.forEach(i=>i.classList.add("animate__animated",t)),n.forEach(i=>i.classList.add("animate__animated",t)),setTimeout(()=>{e.forEach(i=>i.classList.remove("animate__animated",t)),n.forEach(i=>i.classList.remove("animate__animated",t))},2e3)},reset(){this.job.CreationDate?(this.job=JSON.parse(JSON.stringify(this.pjob)),this.edit=!1):this.$emit("delete")},delete(){this.job.CreationDate&&dt("/api/deletePeerScheduleJob/",{Job:this.job},t=>{t.status?this.store.newMessage("Server","Peer job deleted","success"):(this.store.newMessage("Server",t.message,"danger"),this.$emit("delete"))}),this.$emit("delete")},parseTime(t){t&&(this.job.Value=Fn(t).format("YYYY-MM-DD HH:mm:ss"))}}},Hq={class:"card-header bg-transparent text-muted border-0"},jq={key:0,class:"d-flex"},Kq={class:"me-auto"},Uq={key:1},Gq={class:"badge text-bg-warning"},Xq={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},qq={class:"d-flex gap-2 align-items-center mb-2"},Zq=["disabled"],Jq={class:"px-5 d-flex gap-2 align-items-center"},Qq={class:"d-flex gap-3"},eZ={key:0,class:"ms-auto d-flex gap-3"},tZ={key:1,class:"ms-auto d-flex gap-3"};function nZ(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("ScheduleDropdown"),l=Se("VueDatePicker");return P(),F("div",{class:Ee(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[h("div",Hq,[this.newJob?(P(),F("small",Uq,[h("span",Gq,[$(o,{t:"Unsaved Job"})])])):(P(),F("small",jq,[h("strong",Kq,[$(o,{t:"Job ID"})]),h("samp",null,pe(this.job.JobID),1)]))]),h("div",Xq,[h("div",qq,[h("samp",null,[$(o,{t:"if"})]),$(a,{edit:i.edit,options:this.dropdowns.Field,data:this.job.Field,onUpdate:e[0]||(e[0]=c=>{this.job.Field=c})},null,8,["edit","options","data"]),h("samp",null,[$(o,{t:"is"})]),$(a,{edit:i.edit,options:this.dropdowns.Operator,data:this.job.Operator,onUpdate:e[1]||(e[1]=c=>this.job.Operator=c)},null,8,["edit","options","data"]),this.job.Field==="date"?(P(),Ce(l,{key:0,is24:!0,"min-date":new Date,"model-value":this.job.Value,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:!i.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):Re((P(),F("input",{key:1,class:"form-control form-control-sm form-control-dark rounded-3 flex-grow-1",disabled:!i.edit,"onUpdate:modelValue":e[2]||(e[2]=c=>this.job.Value=c),style:{width:"auto"}},null,8,Zq)),[[We,this.job.Value]]),h("samp",null,pe(this.dropdowns.Field.find(c=>c.value===this.job.Field)?.unit)+" { ",1)]),h("div",Jq,[h("samp",null,[$(o,{t:"then"})]),$(a,{edit:i.edit,options:this.dropdowns.Action,data:this.job.Action,onUpdate:e[3]||(e[3]=c=>this.job.Action=c)},null,8,["edit","options","data"])]),h("div",Qq,[e[12]||(e[12]=h("samp",null,"}",-1)),this.edit?(P(),F("div",tZ,[h("a",{role:"button",class:"text-secondary text-decoration-none",onClick:e[6]||(e[6]=c=>this.reset())},[e[10]||(e[10]=Be("[C] ")),$(o,{t:"Cancel"})]),h("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:e[7]||(e[7]=c=>this.save())},[e[11]||(e[11]=Be("[S] ")),$(o,{t:"Save"})])])):(P(),F("div",eZ,[h("a",{role:"button",class:"ms-auto text-decoration-none",onClick:e[4]||(e[4]=c=>this.edit=!0)},[e[8]||(e[8]=Be("[E] ")),$(o,{t:"Edit"})]),h("a",{role:"button",onClick:e[5]||(e[5]=c=>this.delete()),class:"text-danger text-decoration-none"},[e[9]||(e[9]=Be("[D] ")),$(o,{t:"Delete"})])]))])])],2)}const sT=ze(Yq,[["render",nZ],["__scopeId","data-v-8f3f1b93"]]),iZ={name:"peerJobs",setup(){return{store:$n()}},props:{selectedPeer:Object},components:{LocaleText:Le,SchedulePeerJob:sT,ScheduleDropdown:iT},data(){return{}},methods:{deleteJob(t){this.selectedPeer.jobs=this.selectedPeer.jobs.filter(e=>e.JobID!==t.JobID)},addJob(){this.selectedPeer.jobs.unshift(JSON.parse(JSON.stringify({JobID:Bs().toString(),Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,Field:this.store.PeerScheduleJobs.dropdowns.Field[0].value,Operator:this.store.PeerScheduleJobs.dropdowns.Operator[0].value,Value:"",CreationDate:"",ExpireDate:"",Action:this.store.PeerScheduleJobs.dropdowns.Action[0].value})))}}},sZ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},rZ={class:"container d-flex h-100 w-100"},oZ={class:"m-auto modal-dialog-centered dashboardModal"},aZ={class:"card rounded-3 shadow",style:{width:"700px"}},lZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},cZ={class:"mb-0 fw-normal"},uZ={class:"card-body px-4 pb-4 pt-2 position-relative"},dZ={class:"d-flex align-items-center mb-3"},hZ={class:"card shadow-sm",key:"none",style:{height:"153px"}},fZ={class:"card-body text-muted text-center d-flex"},gZ={class:"m-auto"};function pZ(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("SchedulePeerJob");return P(),F("div",sZ,[h("div",rZ,[h("div",oZ,[h("div",aZ,[h("div",lZ,[h("h4",cZ,[$(o,{t:"Schedule Jobs"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),h("div",uZ,[h("div",dZ,[h("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow",onClick:e[1]||(e[1]=l=>this.addJob())},[e[3]||(e[3]=h("i",{class:"bi bi-plus-lg me-2"},null,-1)),$(o,{t:"Job"})])]),$(vo,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:Pe(()=>[(P(!0),F(Ie,null,Ge(this.selectedPeer.jobs,(l,c)=>(P(),Ce(a,{onRefresh:e[2]||(e[2]=u=>this.$emit("refresh")),onDelete:u=>this.deleteJob(l),dropdowns:this.store.PeerScheduleJobs.dropdowns,key:l.JobID,pjob:l},null,8,["onDelete","dropdowns","pjob"]))),128)),this.selectedPeer.jobs.length===0?(P(),F("div",hZ,[h("div",fZ,[h("h6",gZ,[$(o,{t:"This peer does not have any job yet."})])])])):se("",!0)]),_:1})])])])])])}const mZ=ze(iZ,[["render",pZ],["__scopeId","data-v-5bbdd42b"]]),_Z={name:"peerJobsAllModal",setup(){return{store:$n()}},components:{LocaleText:Le,SchedulePeerJob:sT},props:{configurationPeers:Array[Object]},methods:{getuuid(){return Bs()}},computed:{getAllJobs(){return this.configurationPeers.filter(t=>t.jobs.length>0)}}},vZ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},yZ={class:"container d-flex h-100 w-100"},bZ={class:"m-auto modal-dialog-centered dashboardModal"},wZ={class:"card rounded-3 shadow",style:{width:"700px"}},xZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},EZ={class:"mb-0 fw-normal"},CZ={class:"card-body px-4 pb-4 pt-2"},SZ={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},kZ={class:"accordion-header"},TZ=["data-bs-target"],AZ={key:0},PZ={class:"text-muted"},MZ=["id"],IZ={class:"accordion-body"},DZ={key:1,class:"card shadow-sm",style:{height:"153px"}},RZ={class:"card-body text-muted text-center d-flex"},$Z={class:"m-auto"};function LZ(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("SchedulePeerJob");return P(),F("div",vZ,[h("div",yZ,[h("div",bZ,[h("div",wZ,[h("div",xZ,[h("h4",EZ,[$(o,{t:"All Active Jobs"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),h("div",CZ,[this.getAllJobs.length>0?(P(),F("div",SZ,[(P(!0),F(Ie,null,Ge(this.getAllJobs,(l,c)=>(P(),F("div",{class:"accordion-item",key:l.id},[h("h2",kZ,[h("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+c},[h("small",null,[h("strong",null,[l.name?(P(),F("span",AZ,pe(l.name)+" • ",1)):se("",!0),h("samp",PZ,pe(l.id),1)])])],8,TZ)]),h("div",{id:"collapse_"+c,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[h("div",IZ,[(P(!0),F(Ie,null,Ge(l.jobs,u=>(P(),Ce(a,{onDelete:e[1]||(e[1]=d=>this.$emit("refresh")),onRefresh:e[2]||(e[2]=d=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:u.JobID,pjob:u},null,8,["dropdowns","pjob"]))),128))])],8,MZ)]))),128))])):(P(),F("div",DZ,[h("div",RZ,[h("span",$Z,[$(o,{t:"No active job at the moment."})])])]))])])])])])}const OZ=ze(_Z,[["render",LZ]]),NZ={name:"peerJobsLogsModal",components:{LocaleText:Le},props:{configurationInfo:Object},data(){return{dataLoading:!0,data:[],logFetchTime:void 0,showLogID:!1,showJobID:!0,showSuccessJob:!0,showFailedJob:!0,showLogAmount:10}},async mounted(){await this.fetchLog()},methods:{async fetchLog(){this.dataLoading=!0,await Pt(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},t=>{this.data=t.data,this.logFetchTime=Fn().format("YYYY-MM-DD HH:mm:ss"),this.dataLoading=!1})}},computed:{getLogs(){return this.data.filter(t=>this.showSuccessJob&&t.Status==="1"||this.showFailedJob&&t.Status==="0")},showLogs(){return this.getLogs.slice(0,this.showLogAmount)}}},FZ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},BZ={class:"container-fluid d-flex h-100 w-100"},VZ={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},WZ={class:"card rounded-3 shadow w-100"},zZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},YZ={class:"mb-0"},HZ={class:"card-body px-4 pb-4 pt-2"},jZ={key:0},KZ={class:"mb-2 d-flex gap-3"},UZ={class:"d-flex gap-3 align-items-center"},GZ={class:"text-muted"},XZ={class:"form-check"},qZ={class:"form-check-label",for:"jobLogsShowSuccessCheck"},ZZ={class:"badge text-success-emphasis bg-success-subtle"},JZ={class:"form-check"},QZ={class:"form-check-label",for:"jobLogsShowFailedCheck"},eJ={class:"badge text-danger-emphasis bg-danger-subtle"},tJ={class:"d-flex gap-3 align-items-center ms-auto"},nJ={class:"text-muted"},iJ={class:"form-check"},sJ={class:"form-check-label",for:"jobLogsShowJobIDCheck"},rJ={class:"form-check"},oJ={class:"form-check-label",for:"jobLogsShowLogIDCheck"},aJ={class:"table"},lJ={scope:"col"},cJ={key:0,scope:"col"},uJ={key:1,scope:"col"},dJ={scope:"col"},hJ={scope:"col"},fJ={style:{"font-size":"0.875rem"}},gJ={scope:"row"},pJ={key:0},mJ={class:"text-muted"},_J={key:1},vJ={class:"text-muted"},yJ={class:"d-flex gap-2"},bJ={key:1,class:"d-flex align-items-center flex-column"};function wJ(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",FZ,[h("div",BZ,[h("div",VZ,[h("div",WZ,[h("div",zZ,[h("h4",YZ,[$(o,{t:"Jobs Logs"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),h("div",HZ,[this.dataLoading?(P(),F("div",bJ,e[11]||(e[11]=[h("div",{class:"spinner-border text-body",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1)]))):(P(),F("div",jZ,[h("p",null,[$(o,{t:"Updated at"}),Be(" : "+pe(this.logFetchTime),1)]),h("div",KZ,[h("button",{onClick:e[1]||(e[1]=a=>this.fetchLog()),class:"btn btn-sm rounded-3 shadow-sm text-info-emphasis bg-info-subtle border-1 border-info-subtle me-1"},[e[8]||(e[8]=h("i",{class:"bi bi-arrow-clockwise me-2"},null,-1)),$(o,{t:"Refresh"})]),h("div",UZ,[h("span",GZ,[$(o,{t:"Filter"})]),h("div",XZ,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=a=>this.showSuccessJob=a),id:"jobLogsShowSuccessCheck"},null,512),[[Gn,this.showSuccessJob]]),h("label",qZ,[h("span",ZZ,[$(o,{t:"Success"})])])]),h("div",JZ,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=a=>this.showFailedJob=a),id:"jobLogsShowFailedCheck"},null,512),[[Gn,this.showFailedJob]]),h("label",QZ,[h("span",eJ,[$(o,{t:"Failed"})])])])]),h("div",tJ,[h("span",nJ,[$(o,{t:"Display"})]),h("div",iJ,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=a=>s.showJobID=a),id:"jobLogsShowJobIDCheck"},null,512),[[Gn,s.showJobID]]),h("label",sJ,[$(o,{t:"Job ID"})])]),h("div",rJ,[Re(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=a=>s.showLogID=a),id:"jobLogsShowLogIDCheck"},null,512),[[Gn,s.showLogID]]),h("label",oJ,[$(o,{t:"Log ID"})])])])]),h("table",aJ,[h("thead",null,[h("tr",null,[h("th",lJ,[$(o,{t:"Date"})]),s.showLogID?(P(),F("th",cJ,[$(o,{t:"Log ID"})])):se("",!0),s.showJobID?(P(),F("th",uJ,[$(o,{t:"Job ID"})])):se("",!0),h("th",dJ,[$(o,{t:"Status"})]),h("th",hJ,[$(o,{t:"Message"})])])]),h("tbody",null,[(P(!0),F(Ie,null,Ge(this.showLogs,a=>(P(),F("tr",fJ,[h("th",gJ,pe(a.LogDate),1),s.showLogID?(P(),F("td",pJ,[h("samp",mJ,pe(a.LogID),1)])):se("",!0),s.showJobID?(P(),F("td",_J,[h("samp",vJ,pe(a.JobID),1)])):se("",!0),h("td",null,[h("span",{class:Ee(["badge",[a.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},pe(a.Status==="1"?"Success":"Failed"),3)]),h("td",null,pe(a.Message),1)]))),256))])]),h("div",yJ,[this.getLogs.length>this.showLogAmount?(P(),F("button",{key:0,onClick:e[6]||(e[6]=a=>this.showLogAmount+=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},e[9]||(e[9]=[h("i",{class:"bi bi-chevron-down me-2"},null,-1),Be(" Show More ")]))):se("",!0),this.showLogAmount>20?(P(),F("button",{key:1,onClick:e[7]||(e[7]=a=>this.showLogAmount=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},e[10]||(e[10]=[h("i",{class:"bi bi-chevron-up me-2"},null,-1),Be(" Collapse ")]))):se("",!0)])]))])])])])])}const xJ=ze(NZ,[["render",wJ]]),EJ={name:"peerShareLinkModal",props:{peer:Object},components:{LocaleText:Le,VueDatePicker:ju},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:Xe()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0)},watch:{"peer.ShareLink":{deep:!0,handler(t,e){e.length!==t.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,dt("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:Fn().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},t=>{t.status?(this.peer.ShareLink=t.data,this.dataCopy=t.data.at(0)):this.store.newMessage("Server","Share link failed to create. Reason: "+t.message,"danger"),this.loading=!1})},updateLinkExpireDate(){dt("/api/sharePeer/update",this.dataCopy,t=>{t.status?(this.dataCopy=t.data.at(0),this.peer.ShareLink=t.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+t.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=Fn().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(t){t?this.dataCopy.ExpireDate=Fn(t).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const t=this.store.getActiveCrossServer();return t?`${t.host}/${this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}`:window.location.origin+window.location.pathname+this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}}},CJ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},SJ={class:"container d-flex h-100 w-100"},kJ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},TJ={class:"card rounded-3 shadow flex-grow-1"},AJ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},PJ={class:"mb-0"},MJ={key:0,class:"card-body px-4 pb-4"},IJ={key:0},DJ={class:"mb-3 text-muted"},RJ=["disabled"],$J={key:1},LJ={class:"d-flex gap-2 mb-4"},OJ=["href"],NJ={class:"d-flex flex-column gap-2 mb-3"},FJ=["disabled"];function BJ(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("VueDatePicker");return P(),F("div",CJ,[h("div",SJ,[h("div",kJ,[h("div",TJ,[h("div",AJ,[h("h4",PJ,[$(o,{t:"Share Peer"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),this.peer.ShareLink?(P(),F("div",MJ,[this.dataCopy?(P(),F("div",$J,[h("div",LJ,[e[4]||(e[4]=h("i",{class:"bi bi-link-45deg"},null,-1)),h("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},pe(r.getUrl),9,OJ)]),h("div",NJ,[h("small",null,[e[5]||(e[5]=h("i",{class:"bi bi-calendar me-2"},null,-1)),$(o,{t:"Expire At"})]),$(a,{is24:!0,"min-date":new Date,"model-value":this.dataCopy.ExpireDate,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","dark"])]),h("button",{onClick:e[2]||(e[2]=l=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[h("span",{class:Ee({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[6]||(e[6]=[h("i",{class:"bi bi-send-slash-fill me-2"},null,-1)]),2),this.loading?(P(),Ce(o,{key:0,t:"Stop Sharing..."})):(P(),Ce(o,{key:1,t:"Stop Sharing"}))],8,FJ)])):(P(),F("div",IJ,[h("h6",DJ,[$(o,{t:"Currently the peer is not sharing"})]),h("button",{onClick:e[1]||(e[1]=l=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[h("span",{class:Ee({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[3]||(e[3]=[h("i",{class:"bi bi-send-fill me-2"},null,-1)]),2),this.loading?(P(),Ce(o,{key:0,t:"Sharing..."})):(P(),Ce(o,{key:1,t:"Start Sharing"}))],8,RJ)]))])):se("",!0)])])])])}const VJ=ze(EJ,[["render",BJ]]),WJ={class:"container d-flex h-100 w-100"},zJ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},YJ={class:"card rounded-3 shadow flex-grow-1"},HJ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},jJ={class:"mb-0"},KJ={class:"card-body px-4 pb-4"},UJ={class:"d-flex gap-2 flex-column"},GJ={class:"d-flex align-items-center"},XJ={class:"text-muted"},qJ={class:"ms-auto"},ZJ={class:"d-flex align-items-center"},JJ={class:"text-muted"},QJ={class:"ms-auto"},eQ={for:"configuration_private_key",class:"form-label d-flex"},tQ={class:"text-muted d-block"},nQ={class:"form-check form-switch ms-auto"},iQ=["disabled"],sQ={for:"configuration_ipaddress_cidr",class:"form-label"},rQ={class:"text-muted"},oQ=["disabled"],aQ={for:"configuration_listen_port",class:"form-label"},lQ={class:"text-muted"},cQ=["disabled"],uQ={for:"configuration_preup",class:"form-label"},dQ={class:"text-muted"},hQ=["disabled"],fQ={for:"configuration_predown",class:"form-label"},gQ={class:"text-muted"},pQ=["disabled"],mQ={for:"configuration_postup",class:"form-label"},_Q={class:"text-muted"},vQ=["disabled"],yQ={for:"configuration_postdown",class:"form-label"},bQ={class:"text-muted"},wQ=["disabled"],xQ={class:"d-flex align-items-center gap-2 mt-4"},EQ=["disabled"],CQ=["disabled"],SQ={__name:"editConfiguration",props:{configurationInfo:Object},emits:["changed","close"],setup(t,{emit:e}){const n=t,i=$n(),s=Xe(),r=me(!1),o=Ei(JSON.parse(JSON.stringify(n.configurationInfo))),a=me(!1),l=me(!1);me(!1);const c=Ei({PrivateKey:!0,IPAddress:!0,ListenPort:!0}),u=Bp("editConfigurationContainer"),d=()=>{i.checkWGKeyLength(o.PrivateKey)?(c.PrivateKey=!0,o.PublicKey=window.wireguard.generatePublicKey(o.PrivateKey)):c.PrivateKey=!1},f=()=>{l.value=!1,Object.assign(o,JSON.parse(JSON.stringify(n.configurationInfo)))},g=e,p=()=>{r.value=!0,dt("/api/updateWireguardConfiguration",o,m=>{r.value=!1,m.status?(s.newMessage("Server","Configuration saved","success"),l.value=!1,g("dataChanged",m.data)):s.newMessage("Server",m.message,"danger")})};return jt(o,()=>{l.value=JSON.stringify(o)!==JSON.stringify(n.configurationInfo)},{deep:!0}),me(!1),(m,v)=>(P(),F("div",{class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref_key:"editConfigurationContainer",ref:u},[h("div",WJ,[h("div",zJ,[h("div",YJ,[h("div",HJ,[h("h4",jJ,[$(Le,{t:"Configuration Settings"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:v[0]||(v[0]=y=>m.$emit("close"))})]),h("div",KJ,[h("div",UJ,[h("div",GJ,[h("small",XJ,[$(Le,{t:"Name"})]),h("small",qJ,[h("samp",null,pe(o.Name),1)])]),h("div",ZJ,[h("small",JJ,[$(Le,{t:"Public Key"})]),h("small",QJ,[h("samp",null,pe(o.PublicKey),1)])]),v[15]||(v[15]=h("hr",null,null,-1)),h("div",null,[h("label",eQ,[h("small",tQ,[$(Le,{t:"Private Key"})]),h("div",nQ,[Re(h("input",{class:"form-check-input",type:"checkbox",role:"switch",id:"editPrivateKeySwitch","onUpdate:modelValue":v[1]||(v[1]=y=>a.value=y)},null,512),[[Gn,a.value]]),v[12]||(v[12]=h("label",{class:"form-check-label",for:"editPrivateKeySwitch"},[h("small",null,"Edit")],-1))])]),Re(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-3",{"is-invalid":!c.PrivateKey}]),disabled:r.value||!a.value,onKeyup:v[2]||(v[2]=y=>d()),"onUpdate:modelValue":v[3]||(v[3]=y=>o.PrivateKey=y),id:"configuration_private_key"},null,42,iQ),[[We,o.PrivateKey]])]),h("div",null,[h("label",sQ,[h("small",rQ,[$(Le,{t:"IP Address/CIDR"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":v[4]||(v[4]=y=>o.Address=y),id:"configuration_ipaddress_cidr"},null,8,oQ),[[We,o.Address]])]),h("div",null,[h("label",aQ,[h("small",lQ,[$(Le,{t:"Listen Port"})])]),Re(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":v[5]||(v[5]=y=>o.ListenPort=y),id:"configuration_listen_port"},null,8,cQ),[[We,o.ListenPort]])]),h("div",null,[h("label",uQ,[h("small",dQ,[$(Le,{t:"PreUp"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":v[6]||(v[6]=y=>o.PreUp=y),id:"configuration_preup"},null,8,hQ),[[We,o.PreUp]])]),h("div",null,[h("label",fQ,[h("small",gQ,[$(Le,{t:"PreDown"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":v[7]||(v[7]=y=>o.PreDown=y),id:"configuration_predown"},null,8,pQ),[[We,o.PreDown]])]),h("div",null,[h("label",mQ,[h("small",_Q,[$(Le,{t:"PostUp"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":v[8]||(v[8]=y=>o.PostUp=y),id:"configuration_postup"},null,8,vQ),[[We,o.PostUp]])]),h("div",null,[h("label",yQ,[h("small",bQ,[$(Le,{t:"PostDown"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":v[9]||(v[9]=y=>o.PostDown=y),id:"configuration_postdown"},null,8,wQ),[[We,o.PostDown]])]),h("div",xQ,[h("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto",onClick:v[10]||(v[10]=y=>f()),disabled:!l.value||r.value},v[13]||(v[13]=[h("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,EQ),h("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 shadow",disabled:!l.value||r.value,onClick:v[11]||(v[11]=y=>p())},v[14]||(v[14]=[h("i",{class:"bi bi-save-fill"},null,-1)]),8,CQ)])])])])])])],512))}},kQ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref:"selectPeersContainer"},TQ={class:"container d-flex h-100 w-100"},AQ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},PQ={class:"card rounded-3 shadow flex-grow-1"},MQ={class:"card-header bg-transparent d-flex align-items-center gap-2 p-4 flex-column pb-3"},IQ={class:"mb-2 w-100 d-flex"},DQ={class:"mb-0"},RQ={class:"d-flex w-100 align-items-center gap-2"},$Q={class:"d-flex gap-3"},LQ={class:"card-body px-4 flex-grow-1 d-flex gap-2 flex-column position-relative",ref:"card-body",style:{"overflow-y":"scroll"}},OQ=["onClick","disabled","data-id"],NQ={class:"d-flex align-items-center gap-3"},FQ={key:0},BQ={class:"d-flex flex-column"},VQ={class:"fw-bold"},WQ={class:"text-muted"},zQ={key:1,class:"ms-auto"},YQ={key:0,class:"spinner-border spinner-border-sm",role:"status"},HQ={class:"card-footer px-4 py-3 gap-2 d-flex align-items-center"},jQ=["disabled"],KQ={key:0,class:"flex-grow-1 text-center"},UQ=["disabled"],GQ={key:0,class:"flex-grow-1 text-center"},XQ=["disabled"],qQ={key:0,class:"flex-grow-1 text-center"},ZQ=["disabled"],JQ={__name:"selectPeers",props:{configurationPeers:Array},emits:["refresh","close"],setup(t,{emit:e}){const n=t,i=me(!1),s=me(!1),r=me([]),o=me(""),a=E=>{r.value.find(w=>w===E)?r.value=r.value.filter(w=>w!==E):r.value.push(E)},l=ve(()=>i.value||s.value?n.configurationPeers.filter(E=>r.value.find(w=>w===E.id)):o.value.length>0?n.configurationPeers.filter(E=>E.id.includes(o.value)||E.name.includes(o.value)):n.configurationPeers);jt(r,()=>{r.value.length===0&&(i.value=!1,s.value=!1)});const c=Wu(),u=Xe(),d=e,f=me(!1),g=()=>{f.value=!0,dt(`/api/deletePeers/${c.params.id}`,{peers:r.value},E=>{u.newMessage("Server",E.message,E.status?"success":"danger"),E.status&&(r.value=[],i.value=!1),d("refresh"),f.value=!1})},p=Ei({success:[],failed:[]}),m=Bp("card-body"),v=Bp("sp"),y=async()=>{s.value=!0;for(const E of r.value)m.value.scrollTo({top:v.value.find(w=>w.dataset.id===E).offsetTop-20,behavior:"smooth"}),await Pt("/api/downloadPeer/"+c.params.id,{id:E},w=>{if(w.status){const b=new Blob([w.data.file],{type:"text/plain"}),C=URL.createObjectURL(b),k=`${w.data.fileName}.conf`,T=document.createElement("a");T.href=C,T.download=k,T.click(),p.success.push(E)}else p.failed.push(E)})},x=()=>{p.success=[],p.failed=[],s.value=!1};return(E,w)=>(P(),F("div",kQ,[h("div",TQ,[h("div",AQ,[h("div",PQ,[h("div",MQ,[h("div",IQ,[h("h4",DQ,[$(Le,{t:"Select Peers"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:w[0]||(w[0]=b=>d("close"))})]),h("div",RQ,[h("div",$Q,[s.value?se("",!0):(P(),F("a",{key:0,role:"button",onClick:w[1]||(w[1]=b=>r.value=t.configurationPeers.map(C=>C.id)),class:"text-decoration-none text-body"},w[9]||(w[9]=[h("small",null,[h("i",{class:"bi bi-check-all me-2"}),Be("Select All ")],-1)]))),r.value.length>0&&!s.value?(P(),F("a",{key:1,role:"button",class:"text-decoration-none text-body",onClick:w[2]||(w[2]=b=>r.value=[])},w[10]||(w[10]=[h("small",null,[h("i",{class:"bi bi-x-circle-fill me-2"}),Be("Clear ")],-1)]))):se("",!0)]),w[11]||(w[11]=h("label",{class:"ms-auto",for:"selectPeersSearchInput"},[h("i",{class:"bi bi-search"})],-1)),Re(h("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":w[3]||(w[3]=b=>o.value=b),id:"selectPeersSearchInput",style:{width:"200px !important"},type:"text"},null,512),[[We,o.value]])])]),h("div",LQ,[(P(!0),F(Ie,null,Ge(l.value,b=>(P(),F("button",{type:"button",class:Ee(["btn w-100 peerBtn text-start rounded-3",{active:r.value.find(C=>C===b.id)}]),onClick:C=>a(b.id),key:b.id,disabled:i.value||s.value,ref_for:!0,ref:"sp","data-id":b.id},[h("div",NQ,[s.value?se("",!0):(P(),F("span",FQ,[h("i",{class:Ee(["bi",[r.value.find(C=>C===b.id)?"bi-check-circle-fill":"bi-circle"]])},null,2)])),h("div",BQ,[h("small",VQ,pe(b.name?b.name:"Untitled Peer"),1),h("small",WQ,[h("samp",null,pe(b.id),1)])]),s.value?(P(),F("span",zQ,[!p.success.find(C=>C===b.id)&&!p.failed.find(C=>C===b.id)?(P(),F("div",YQ,w[12]||(w[12]=[h("span",{class:"visually-hidden"},"Loading...",-1)]))):(P(),F("i",{key:1,class:Ee(["bi",[p.failed.find(C=>C===b.id)?"bi-x-circle-fill":"bi-check-circle-fill"]])},null,2))])):se("",!0)])],10,OQ))),128))],512),h("div",HQ,[!i.value&&!s.value?(P(),F(Ie,{key:0},[h("button",{class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3",disabled:r.value.length===0||f.value,onClick:w[4]||(w[4]=b=>y())},w[13]||(w[13]=[h("i",{class:"bi bi-download"},null,-1)]),8,jQ),r.value.length>0?(P(),F("span",KQ,[w[14]||(w[14]=h("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),Be(" "+pe(r.value.length)+" Peer"+pe(r.value.length>1?"s":""),1)])):se("",!0),h("button",{class:"btn bg-danger-subtle text-danger-emphasis border-danger-subtle ms-auto rounded-3",onClick:w[5]||(w[5]=b=>i.value=!0),disabled:r.value.length===0||f.value},w[15]||(w[15]=[h("i",{class:"bi bi-trash"},null,-1)]),8,UQ)],64)):s.value?(P(),F(Ie,{key:1},[p.failed.length+p.success.length1?"s":"")+"... ",1)):(P(),F(Ie,{key:1},[w[16]||(w[16]=h("strong",null," Download Finished ",-1)),h("button",{onClick:w[6]||(w[6]=b=>x()),class:"btn bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle rounded-3 ms-auto"}," Done ")],64))],64)):i.value?(P(),F(Ie,{key:2},[h("button",{class:"btn btn-danger rounded-3",disabled:r.value.length===0||f.value,onClick:w[7]||(w[7]=b=>g())}," Yes ",8,XQ),r.value.length>0?(P(),F("strong",qQ," Are you sure to delete "+pe(r.value.length)+" Peer"+pe(r.value.length>1?"s":"")+"? ",1)):se("",!0),h("button",{class:"btn bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle ms-auto rounded-3",disabled:r.value.length===0||f.value,onClick:w[8]||(w[8]=b=>i.value=!1)}," No ",8,ZQ)],64)):se("",!0)])])])])],512))}},QQ=ze(JQ,[["__scopeId","data-v-8e40593b"]]),eee={class:"card my-0 rounded-3"},tee={class:"card-body position-relative"},nee={key:0,class:"position-absolute w-100 h-100 confirmationContainer start-0 top-0 rounded-3 d-flex p-2"},iee={class:"m-auto"},see={class:"d-flex gap-2 align-items-center justify-content-center"},ree=["disabled"],oee=["disabled"],aee={key:0,class:"position-absolute w-100 h-100 confirmationContainer start-0 top-0 rounded-3 d-flex p-2"},lee={class:"m-auto"},cee={class:"d-flex gap-2 align-items-center justify-content-center"},uee=["disabled"],dee=["disabled"],hee={class:"d-flex gap-3"},fee={class:"d-flex flex-column"},gee={class:"d-flex flex-column"},pee={class:"d-flex gap-2 align-items-center ms-auto"},mee={class:"card rounded-3"},_ee={key:0,class:"card-body"},vee=["value"],yee={class:"d-flex"},bee={__name:"backup",props:["b","delay"],emits:["refresh","refreshPeersList"],setup(t,{emit:e}){oC(g=>({df360394:d.value}));const n=t,i=me(!1),s=me(!1),r=Wu(),o=e,a=Xe(),l=me(!1),c=()=>{l.value=!0,dt("/api/deleteWireguardConfigurationBackup",{configurationName:r.params.id,backupFileName:n.b.filename},g=>{l.value=!1,g.status?(o("refresh"),a.newMessage("Server","Backup deleted","success")):a.newMessage("Server","Backup failed to delete","danger")})},u=()=>{l.value=!0,dt("/api/restoreWireguardConfigurationBackup",{configurationName:r.params.id,backupFileName:n.b.filename},g=>{l.value=!1,s.value=!1,g.status?(o("refresh"),a.newMessage("Server","Backup restored with "+n.b.filename,"success")):a.newMessage("Server","Backup failed to restore","danger")})},d=ve(()=>n.delay+"s"),f=me(!1);return(g,p)=>(P(),F("div",eee,[h("div",tee,[$(vt,{name:"zoomReversed"},{default:Pe(()=>[i.value?(P(),F("div",nee,[h("div",iee,[p[7]||(p[7]=h("h5",null,"Are you sure to delete this backup?",-1)),h("div",see,[h("button",{class:"btn btn-danger rounded-3",disabled:l.value,onClick:p[0]||(p[0]=m=>c())}," Yes ",8,ree),h("button",{onClick:p[1]||(p[1]=m=>i.value=!1),disabled:l.value,class:"btn bg-secondary-subtle text-secondary-emphasis border-secondary-subtle rounded-3"}," No ",8,oee)])])])):se("",!0)]),_:1}),$(vt,{name:"zoomReversed"},{default:Pe(()=>[s.value?(P(),F("div",aee,[h("div",lee,[p[8]||(p[8]=h("h5",null,"Are you sure to restore this backup?",-1)),h("div",cee,[h("button",{disabled:l.value,onClick:p[2]||(p[2]=m=>u()),class:"btn btn-success rounded-3"}," Yes ",8,uee),h("button",{onClick:p[3]||(p[3]=m=>s.value=!1),disabled:l.value,class:"btn bg-secondary-subtle text-secondary-emphasis border-secondary-subtle rounded-3"}," No ",8,dee)])])])):se("",!0)]),_:1}),h("div",hee,[h("div",fee,[p[9]||(p[9]=h("small",{class:"text-muted"}," Backup ",-1)),h("samp",null,pe(t.b.filename),1)]),h("div",gee,[p[10]||(p[10]=h("small",{class:"text-muted"}," Backup Date ",-1)),Be(" "+pe(Z(Fn)(t.b.backupDate,"YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss")),1)]),h("div",pee,[h("button",{onClick:p[4]||(p[4]=m=>s.value=!0),class:"btn bg-warning-subtle text-warning-emphasis border-warning-subtle rounded-3 btn-sm"},p[11]||(p[11]=[h("i",{class:"bi bi-clock-history"},null,-1)])),h("button",{onClick:p[5]||(p[5]=m=>i.value=!0),class:"btn bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3 btn-sm"},p[12]||(p[12]=[h("i",{class:"bi bi-trash-fill"},null,-1)]))])]),p[15]||(p[15]=h("hr",null,null,-1)),h("div",mee,[h("a",{role:"button",class:Ee(["card-header d-flex text-decoration-none align-items-center",{"border-bottom-0":!f.value}]),style:{cursor:"pointer"},onClick:p[6]||(p[6]=m=>f.value=!f.value)},p[13]||(p[13]=[h("small",null,".conf File ",-1),h("i",{class:"bi bi-chevron-down ms-auto"},null,-1)]),2),f.value?(P(),F("div",_ee,[h("textarea",{class:"form-control rounded-3",value:t.b.content,disabled:"",style:{height:"300px","font-family":"var(--bs-font-monospace),sans-serif !important"}},null,8,vee)])):se("",!0)]),p[16]||(p[16]=h("hr",null,null,-1)),h("div",yee,[p[14]||(p[14]=h("span",null,[h("i",{class:"bi bi-database me-1"}),Be(" Database ")],-1)),h("i",{class:Ee(["bi ms-auto",[t.b.database?"text-success bi-check-circle-fill":"text-danger bi-x-circle-fill"]])},null,2)])])]))}},wee=ze(bee,[["__scopeId","data-v-61688b74"]]),xee={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref:"editConfigurationContainer"},Eee={class:"d-flex h-100 w-100"},Cee={class:"modal-dialog-centered dashboardModal w-100 h-100 overflow-x-scroll flex-column gap-3 mx-3"},See={class:"my-5 d-flex gap-3 flex-column position-relative"},kee={class:"title"},Tee={class:"d-flex mb-3"},Aee={class:"mb-0"},Pee={class:"position-relative d-flex flex-column gap-3"},Mee={class:"text-center title",key:"spinner"},Iee={class:"card my-0 rounded-3",key:"noBackups"},Dee={__name:"configurationBackupRestore",emits:["close","refreshPeersList"],setup(t,{emit:e}){const n=Wu(),i=me([]),s=me(!0),r=e;Vt(()=>{o()});const o=()=>{s.value=!0,Pt("/api/getWireguardConfigurationBackup",{configurationName:n.params.id},l=>{i.value=l.data,s.value=!1})},a=()=>{Pt("/api/createWireguardConfigurationBackup",{configurationName:n.params.id},l=>{i.value=l.data,s.value=!1})};return(l,c)=>(P(),F("div",xee,[h("div",Eee,[h("div",Cee,[h("div",See,[h("div",kee,[h("div",Tee,[h("h4",Aee,[$(Le,{t:"Backup & Restore"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:c[0]||(c[0]=u=>l.$emit("close"))})]),h("button",{onClick:c[1]||(c[1]=u=>a()),class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3 w-100"},c[4]||(c[4]=[h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1),Be(" Create Backup ")]))]),h("div",Pee,[$(vo,{name:"list1"},{default:Pe(()=>[s.value&&i.value.length===0?(P(),F("div",Mee,c[5]||(c[5]=[h("div",{class:"spinner-border"},null,-1)]))):!s.value&&i.value.length===0?(P(),F("div",Iee,c[6]||(c[6]=[h("div",{class:"card-body text-center text-muted"},[h("i",{class:"bi bi-x-circle-fill me-2"}),Be(" No backup yet, click the button above to create backup. ")],-1)]))):se("",!0),(P(!0),F(Ie,null,Ge(i.value,(u,d)=>(P(),Ce(wee,{onRefresh:c[2]||(c[2]=f=>o()),onRefreshPeersList:c[3]||(c[3]=f=>r("refreshPeersList")),b:u,delay:d*.05,key:u.filename},null,8,["b","delay"]))),128))]),_:1})])])])])],512))}},Ree=ze(Dee,[["__scopeId","data-v-b454707b"]]),$ee={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},Lee={class:"container d-flex h-100 w-100"},Oee={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},Nee={class:"card rounded-3 shadow flex-grow-1 bg-danger-subtle border-danger-subtle",id:"deleteConfigurationContainer"},Fee={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},Bee={class:"card-body px-4"},Vee={key:0},Wee={key:1},zee={key:2,class:"d-flex align-items-center gap-2"},Yee=["placeholder"],Hee=["disabled"],jee={__name:"deleteConfiguration",emits:["backup"],setup(t,{emit:e}){const i=Wu().params.id,s=me(""),r=IC(),o=Xe(),a=me(!1),l=()=>{clearInterval(o.Peers.RefreshInterval),a.value=!0,dt("/api/deleteWireguardConfiguration",{Name:i},g=>{g.status?(r.push("/"),o.newMessage("Server","Configuration deleted","success")):a.value=!1})},c=me(!0),u=me([]),d=()=>{c.value=!0,Pt("/api/getWireguardConfigurationBackup",{configurationName:i},g=>{u.value=g.data,c.value=!1})};Vt(()=>{d()});const f=e;return(g,p)=>(P(),F("div",$ee,[h("div",Lee,[h("div",Oee,[h("div",Nee,[h("div",Fee,[p[5]||(p[5]=h("h5",{class:"mb-0"}," Are you sure to delete this configuration? ",-1)),h("button",{type:"button",class:"btn-close ms-auto",onClick:p[0]||(p[0]=m=>g.$emit("close"))})]),h("div",Bee,[p[12]||(p[12]=h("p",{class:"text-muted"},[Be(" Once you deleted, all connected peers will get disconnected; Both configuration file ("),h("code",null,".conf"),Be(") and database table related to this configuration will get deleted. ")],-1)),h("div",{class:Ee(["alert",[c.value?"alert-secondary":u.value.length>0?"alert-success":"alert-danger"]])},[c.value?(P(),F("div",Vee,[p[6]||(p[6]=h("i",{class:"bi bi-search me-2"},null,-1)),$(Le,{t:"Checking backups..."})])):u.value.length>0?(P(),F("div",Wee,[p[7]||(p[7]=h("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),$(Le,{t:"This configuration have "+u.value.length+" backups"},null,8,["t"])])):(P(),F("div",zee,[p[10]||(p[10]=h("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),$(Le,{t:"This configuration have no backup."}),h("a",{role:"button",onClick:p[1]||(p[1]=m=>f("backup")),class:"ms-auto btn btn-sm btn-primary rounded-3"},p[8]||(p[8]=[h("i",{class:"bi bi-clock-history me-2"},null,-1),Be(" Backup ")])),h("a",{role:"button",onClick:p[2]||(p[2]=m=>d()),class:"btn btn-sm btn-primary rounded-3"},p[9]||(p[9]=[h("i",{class:"bi bi-arrow-clockwise"},null,-1)]))]))],2),p[13]||(p[13]=h("hr",null,null,-1)),p[14]||(p[14]=h("p",null,"If you're sure, please type in the configuration name below and click Delete.",-1)),Re(h("input",{class:"form-control rounded-3 mb-3",placeholder:Z(i),"onUpdate:modelValue":p[3]||(p[3]=m=>s.value=m),type:"text"},null,8,Yee),[[We,s.value]]),h("button",{class:"btn btn-danger w-100",onClick:p[4]||(p[4]=m=>l()),disabled:s.value!==Z(i)||a.value},p[11]||(p[11]=[h("i",{class:"bi bi-trash-fill me-2 rounded-3"},null,-1),Be(" Delete ")]),8,Hee)])])])])]))}};Df.register(kK,Rf,zK,OK,rk,rj,ok,ak,lj,aj,cj,uj,DU,$U,NU,ZU,_m,tG,KK,hU,vU,bU,AU);const Kee={name:"peerList",components:{DeleteConfiguration:jee,ConfigurationBackupRestore:Ree,SelectPeers:QQ,EditConfiguration:SQ,LocaleText:Le,PeerShareLinkModal:VJ,PeerJobsLogsModal:xJ,PeerJobsAllModal:OZ,PeerJobs:mZ,PeerCreate:nT,PeerQRCode:H9,PeerSettings:K7,PeerSearch:fz,Peer:Xz,Line:uG,Bar:cG},setup(){const t=Xe(),e=$n(),n=me(void 0);return{dashboardConfigurationStore:t,wireguardConfigurationStore:e,interval:n}},data(){return{configurationToggling:!1,loading:!1,error:null,configurationInfo:[],configurationPeers:[],historyDataSentDifference:[],historyDataReceivedDifference:[],historySentData:{labels:[],datasets:[{label:"Data Sent",data:[],fill:!1,borderColor:"#198754",tension:0}]},historyReceiveData:{labels:[],datasets:[{label:"Data Received",data:[],fill:!1,borderColor:"#0d6efd",tension:0}]},peerSetting:{modalOpen:!1,selectedPeer:void 0},peerScheduleJobs:{modalOpen:!1,selectedPeer:void 0},peerQRCode:{modalOpen:!1,peerConfigData:void 0},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1,selectedPeer:void 0},editConfiguration:{modalOpen:!1},selectPeers:{modalOpen:!1},backupRestore:{modalOpen:!1},deleteConfiguration:{modalOpen:!1}}},mounted(){},watch:{$route:{immediate:!0,handler(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.loading=!0;let t=this.$route.params.id;this.configurationInfo=[],this.configurationPeers=[],t&&(this.getPeers(t),this.setPeerInterval())}},"dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval"(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.setPeerInterval()}},beforeRouteLeave(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval)},methods:{toggle(){this.configurationToggling=!0,Pt("/api/toggleWireguardConfiguration/",{configurationName:this.configurationInfo.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.configurationInfo.Name} ${t.data?"is on":"is off"}`,"success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.configurationInfo.Status=t.data,this.configurationToggling=!1})},getPeers(t=this.$route.params.id){Pt("/api/getWireguardConfigurationInfo",{configurationName:t},e=>{if(this.configurationInfo=e.data.configurationInfo,this.configurationPeers=e.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),e.data.configurationRestrictedPeers.forEach(n=>{n.restricted=!0,this.configurationPeers.push(n)}),this.loading=!1,this.configurationPeers.length>0){const n=this.configurationPeers.map(s=>s.total_sent+s.cumu_sent).reduce((s,r)=>s+r).toFixed(4),i=this.configurationPeers.map(s=>s.total_receive+s.cumu_receive).reduce((s,r)=>s+r).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==n&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,Fn().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((n-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(n)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==i&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,Fn().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((i-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(i))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval))}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(e=>e.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_data+e.cumu_data).reduce((e,n)=>e+n,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_receive+e.cumu_receive).reduce((e,n)=>e+n,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_sent+e.cumu_sent).reduce((e,n)=>e+n,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(t=>t.name?t.name:`Untitled Peer - ${t.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(t=>t.cumu_data+t.total_data),backgroundColor:this.configurationPeers.map(t=>"#0dcaf0"),tooltip:{callbacks:{label:t=>`${t.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:t=>`${t.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} MB/s`},grid:{display:!1}}}}},searchPeers(){new Xl(this.configurationPeers,{keys:["name","id","allowed_ip"]});const t=this.wireguardConfigurationStore.searchString?this.configurationPeers.filter(e=>e.name.includes(this.wireguardConfigurationStore.searchString)||e.id.includes(this.wireguardConfigurationStore.searchString)||e.allowed_ip.includes(this.wireguardConfigurationStore.searchString)):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:0)}}},Uee={key:0,class:"container-md"},Gee={class:"d-flex align-items-center"},Xee={CLASS:"text-muted"},qee={class:"d-flex align-items-center gap-3"},Zee={class:"mb-0 display-4"},Jee={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},Qee={class:"card-body py-2 d-flex align-items-center"},ete={class:"mb-0 text-muted"},tte={class:"form-check form-switch ms-auto"},nte=["for"],ite={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},ste=["disabled","id"],rte={class:"row mt-3 gy-2 gx-2 mb-2"},ote={class:"col-12 col-lg-3"},ate={class:"card rounded-3 bg-transparent shadow-sm"},lte={class:"card-body py-2"},cte={class:"mb-0 text-muted"},ute={class:"col-12 col-lg-3"},dte={class:"card rounded-3 bg-transparent shadow-sm"},hte={class:"card-body py-2"},fte={class:"mb-0 text-muted"},gte={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},pte={class:"card rounded-3 bg-transparent shadow-sm"},mte={class:"card-body py-2"},_te={class:"mb-0 text-muted"},vte={class:"row gx-2 gy-2 mb-2"},yte={class:"col-12 col-lg-3"},bte={class:"card rounded-3 bg-transparent shadow-sm"},wte={class:"card-body d-flex"},xte={class:"mb-0 text-muted"},Ete={class:"h4"},Cte={class:"col-12 col-lg-3"},Ste={class:"card rounded-3 bg-transparent shadow-sm"},kte={class:"card-body d-flex"},Tte={class:"mb-0 text-muted"},Ate={class:"h4"},Pte={class:"col-12 col-lg-3"},Mte={class:"card rounded-3 bg-transparent shadow-sm"},Ite={class:"card-body d-flex"},Dte={class:"mb-0 text-muted"},Rte={class:"h4 text-primary"},$te={class:"col-12 col-lg-3"},Lte={class:"card rounded-3 bg-transparent shadow-sm"},Ote={class:"card-body d-flex"},Nte={class:"mb-0 text-muted"},Fte={class:"h4 text-success"},Bte={class:"row gx-2 gy-2 mb-3"},Vte={class:"col-12 col-lg-6"},Wte={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},zte={class:"card-header bg-transparent border-0"},Yte={class:"text-muted"},Hte={class:"card-body pt-1"},jte={class:"col-sm col-lg-3"},Kte={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},Ute={class:"card-header bg-transparent border-0"},Gte={class:"text-muted"},Xte={class:"card-body pt-1"},qte={class:"col-sm col-lg-3"},Zte={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},Jte={class:"card-header bg-transparent border-0"},Qte={class:"text-muted"},ene={class:"card-body pt-1"},tne={class:"mb-3"};function nne(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("Bar"),l=Se("Line"),c=Se("PeerSearch"),u=Se("Peer"),d=Se("PeerSettings"),f=Se("PeerQRCode"),g=Se("PeerJobs"),p=Se("PeerJobsAllModal"),m=Se("PeerJobsLogsModal"),v=Se("PeerShareLinkModal"),y=Se("EditConfiguration"),x=Se("SelectPeers"),E=Se("DeleteConfiguration"),w=Se("ConfigurationBackupRestore");return this.loading?se("",!0):(P(),F("div",Uee,[h("div",Gee,[h("div",null,[h("small",Xee,[$(o,{t:"CONFIGURATION"})]),h("div",qee,[h("h1",Zee,[h("samp",null,pe(this.configurationInfo.Name),1)])])]),h("div",Jee,[h("div",Qee,[h("div",null,[h("p",ete,[h("small",null,[$(o,{t:"Status"})])]),h("div",tte,[h("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[!this.configurationInfo.Status&&this.configurationToggling?(P(),Ce(o,{key:0,t:"Turning Off..."})):this.configurationInfo.Status&&this.configurationToggling?(P(),Ce(o,{key:1,t:"Turning On..."})):this.configurationInfo.Status&&!this.configurationToggling?(P(),Ce(o,{key:2,t:"On"})):!this.configurationInfo.Status&&!this.configurationToggling?(P(),Ce(o,{key:3,t:"Off"})):se("",!0),this.configurationToggling?(P(),F("span",ite)):se("",!0)],8,nte),Re(h("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+this.configurationInfo.id,onChange:e[0]||(e[0]=b=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=b=>this.configurationInfo.Status=b)},null,40,ste),[[Gn,this.configurationInfo.Status]])])]),h("div",{class:Ee(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),e[31]||(e[31]=h("hr",null,null,-1)),h("div",rte,[h("div",ote,[h("div",ate,[h("div",lte,[h("p",cte,[h("small",null,[$(o,{t:"Address"})])]),Be(" "+pe(this.configurationInfo.Address),1)])])]),h("div",ute,[h("div",dte,[h("div",hte,[h("p",fte,[h("small",null,[$(o,{t:"Listen Port"})])]),Be(" "+pe(this.configurationInfo.ListenPort),1)])])]),h("div",gte,[h("div",pte,[h("div",mte,[h("p",_te,[h("small",null,[$(o,{t:"Public Key"})])]),h("samp",null,pe(this.configurationInfo.PublicKey),1)])])])]),h("div",vte,[h("div",yte,[h("div",bte,[h("div",wte,[h("div",null,[h("p",xte,[h("small",null,[$(o,{t:"Connected Peers"})])]),h("strong",Ete,pe(r.configurationSummary.connectedPeers)+" / "+pe(s.configurationPeers.length),1)]),e[27]||(e[27]=h("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),h("div",Cte,[h("div",Ste,[h("div",kte,[h("div",null,[h("p",Tte,[h("small",null,[$(o,{t:"Total Usage"})])]),h("strong",Ate,pe(r.configurationSummary.totalUsage)+" GB",1)]),e[28]||(e[28]=h("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),h("div",Pte,[h("div",Mte,[h("div",Ite,[h("div",null,[h("p",Dte,[h("small",null,[$(o,{t:"Total Received"})])]),h("strong",Rte,pe(r.configurationSummary.totalReceive)+" GB",1)]),e[29]||(e[29]=h("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),h("div",$te,[h("div",Lte,[h("div",Ote,[h("div",null,[h("p",Nte,[h("small",null,[$(o,{t:"Total Sent"})])]),h("strong",Fte,pe(r.configurationSummary.totalSent)+" GB",1)]),e[30]||(e[30]=h("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),h("div",Bte,[h("div",Vte,[h("div",Wte,[h("div",zte,[h("small",Yte,[$(o,{t:"Peers Data Usage"})])]),h("div",Hte,[$(a,{data:r.individualDataUsage,options:r.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),h("div",jte,[h("div",Kte,[h("div",Ute,[h("small",Gte,[$(o,{t:"Real Time Received Data Usage"})])]),h("div",Xte,[$(l,{options:r.chartOptions,data:r.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),h("div",qte,[h("div",Zte,[h("div",Jte,[h("small",Qte,[$(o,{t:"Real Time Sent Data Usage"})])]),h("div",ene,[$(l,{options:r.chartOptions,data:r.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),h("div",tne,[$(c,{onJobsAll:e[2]||(e[2]=b=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:e[3]||(e[3]=b=>this.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:e[4]||(e[4]=b=>this.editConfiguration.modalOpen=!0),onSelectPeers:e[5]||(e[5]=b=>this.selectPeers.modalOpen=!0),onBackupRestore:e[6]||(e[6]=b=>this.backupRestore.modalOpen=!0),onDeleteConfiguration:e[7]||(e[7]=b=>this.deleteConfiguration.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),$(vo,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:Pe(()=>[(P(!0),F(Ie,null,Ge(this.searchPeers,b=>(P(),F("div",{class:"col-12 col-lg-6 col-xl-4",key:b.id},[$(u,{Peer:b,onShare:C=>{this.peerShare.selectedPeer=b.id,this.peerShare.modalOpen=!0},onRefresh:e[8]||(e[8]=C=>this.getPeers()),onJobs:C=>{s.peerScheduleJobs.modalOpen=!0,s.peerScheduleJobs.selectedPeer=this.configurationPeers.find(k=>k.id===b.id)},onSetting:C=>{s.peerSetting.modalOpen=!0,s.peerSetting.selectedPeer=this.configurationPeers.find(k=>k.id===b.id)},onQrcode:e[9]||(e[9]=C=>{this.peerQRCode.peerConfigData=C,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),$(vt,{name:"zoom"},{default:Pe(()=>[this.peerSetting.modalOpen?(P(),Ce(d,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:e[10]||(e[10]=b=>this.getPeers()),onClose:e[11]||(e[11]=b=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[s.peerQRCode.modalOpen?(P(),Ce(f,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:e[12]||(e[12]=b=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[this.peerScheduleJobs.modalOpen?(P(),Ce(g,{key:0,onRefresh:e[13]||(e[13]=b=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:e[14]||(e[14]=b=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[this.peerScheduleJobsAll.modalOpen?(P(),Ce(p,{key:0,onRefresh:e[15]||(e[15]=b=>this.getPeers()),onClose:e[16]||(e[16]=b=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[this.peerScheduleJobsLogs.modalOpen?(P(),Ce(m,{key:0,onClose:e[17]||(e[17]=b=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[this.peerShare.modalOpen?(P(),Ce(v,{key:0,onClose:e[18]||(e[18]=b=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(b=>b.id===this.peerShare.selectedPeer)},null,8,["peer"])):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[this.editConfiguration.modalOpen?(P(),Ce(y,{key:0,onClose:e[19]||(e[19]=b=>this.editConfiguration.modalOpen=!1),onDataChanged:e[20]||(e[20]=b=>this.configurationInfo=b),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[this.selectPeers.modalOpen?(P(),Ce(x,{key:0,onRefresh:e[21]||(e[21]=b=>this.getPeers()),configurationPeers:this.configurationPeers,onClose:e[22]||(e[22]=b=>this.selectPeers.modalOpen=!1)},null,8,["configurationPeers"])):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[s.deleteConfiguration.modalOpen?(P(),Ce(E,{key:0,onBackup:e[23]||(e[23]=b=>s.backupRestore.modalOpen=!0),onClose:e[24]||(e[24]=b=>s.deleteConfiguration.modalOpen=!1)})):se("",!0)]),_:1}),$(vt,{name:"zoom"},{default:Pe(()=>[s.backupRestore.modalOpen?(P(),Ce(w,{key:0,onClose:e[25]||(e[25]=b=>s.backupRestore.modalOpen=!1),onRefreshPeersList:e[26]||(e[26]=b=>this.getPeers())})):se("",!0)]),_:1})]))}const ine=ze(Kee,[["render",nne],["__scopeId","data-v-7a0360ac"]]);class Er{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Fl={PROPERTYCHANGE:"propertychange"};class Bf{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function sne(t,e,n){let i,s;n=n||hr;let r=0,o=t.length,a=!1;for(;r>1),s=+n(t[i],e),s<0?r=i+1:(o=i,a=!s);return a?r:~r}function hr(t,e){return t>e?1:t0?s-1:s}return i-1}if(n>0){for(let s=1;s0||o===0)})}function yu(){return!0}function Wf(){return!1}function Bl(){}function rT(t){let e,n,i;return function(){const s=Array.prototype.slice.call(arguments);return(!n||this!==i||!So(s,n))&&(i=this,n=s,e=t.apply(this,arguments)),e}}function ane(t){function e(){let n;try{n=t()}catch(i){return Promise.reject(i)}return n instanceof Promise?n:Promise.resolve(n)}return e()}function qu(t){for(const e in t)delete t[e]}function Vl(t){let e;for(e in t)return!1;return!e}class zf extends Bf{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,n){if(!e||!n)return;const i=this.listeners_||(this.listeners_={}),s=i[e]||(i[e]=[]);s.includes(n)||s.push(n)}dispatchEvent(e){const n=typeof e=="string",i=n?e:e.type,s=this.listeners_&&this.listeners_[i];if(!s)return;const r=n?new Er(e):e;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let c=0,u=s.length;c0:!1}removeEventListener(e,n){if(!this.listeners_)return;const i=this.listeners_[e];if(!i)return;const s=i.indexOf(n);s!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[s]=Bl,++this.pendingRemovals_[e]):(i.splice(s,1),i.length===0&&delete this.listeners_[e]))}}const tt={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ft(t,e,n,i,s){if(s){const o=n;n=function(){t.removeEventListener(e,n),o.apply(i??this,arguments)}}else i&&i!==t&&(n=n.bind(i));const r={target:t,type:e,listener:n};return t.addEventListener(e,n),r}function Bh(t,e,n,i){return ft(t,e,n,i,!0)}function Lt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),qu(t))}class Zu extends zf{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(tt.CHANGE)}getRevision(){return this.revision_}onInternal(e,n){if(Array.isArray(e)){const i=e.length,s=new Array(i);for(let r=0;r0;)this.pop()}extend(e){for(let n=0,i=e.length;nthis.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n),this.array_.splice(e,0,n),this.updateLength_(),this.dispatchEvent(new Hd(gi.ADD,n,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const n=this.getLength();return this.insertAt(n,e),this.getLength()}remove(e){const n=this.array_;for(let i=0,s=n.length;i=this.getLength())return;const n=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new Hd(gi.REMOVE,n,e)),n}setAt(e,n){const i=this.getLength();if(e>=i){this.insertAt(e,n);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n,e);const s=this.array_[e];this.array_[e]=n,this.dispatchEvent(new Hd(gi.REMOVE,s,e)),this.dispatchEvent(new Hd(gi.ADD,n,e))}updateLength_(){this.set(rw.LENGTH,this.array_.length)}assertUnique_(e,n){for(let i=0,s=this.array_.length;i1?(n=s,i=r):l>0&&(n+=o*l,i+=a*l)}return dl(t,e,n,i)}function dl(t,e,n,i){const s=n-t,r=i-e;return s*s+r*r}function dne(t){const e=t.length;for(let i=0;ir&&(r=l,s=a)}if(r===0)return null;const o=t[s];t[s]=t[i],t[i]=o;for(let a=i+1;a=0;i--){n[i]=t[i][e]/t[i][i];for(let s=i-1;s>=0;s--)t[s][e]-=t[s][i]*n[i]}return n}function fh(t){return t*Math.PI/180}function hl(t,e){const n=t%e;return n*e<0?n+e:n}function Ai(t,e,n){return t+n*(e-t)}function mv(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function jd(t,e){return Math.floor(mv(t,e))}function Kd(t,e){return Math.ceil(mv(t,e))}class oT extends Ws{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const n=Object.assign({},e);typeof e.properties=="object"&&(delete n.properties,Object.assign(n,e.properties)),n[Ct.OPACITY]=e.opacity!==void 0?e.opacity:1,mt(typeof n[Ct.OPACITY]=="number","Layer opacity must be a number"),n[Ct.VISIBLE]=e.visible!==void 0?e.visible:!0,n[Ct.Z_INDEX]=e.zIndex,n[Ct.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,n[Ct.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,n[Ct.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,n[Ct.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=n.className!==void 0?n.className:"ol-layer",delete n.className,this.setProperties(n),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const n=this.state_||{layer:this,managed:e===void 0?!0:e},i=this.getZIndex();return n.opacity=rn(Math.round(this.getOpacity()*100)/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=i===void 0&&!n.managed?1/0:i,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.state_=n,n}getLayersArray(e){return pt()}getLayerStatesArray(e){return pt()}getExtent(){return this.get(Ct.EXTENT)}getMaxResolution(){return this.get(Ct.MAX_RESOLUTION)}getMinResolution(){return this.get(Ct.MIN_RESOLUTION)}getMinZoom(){return this.get(Ct.MIN_ZOOM)}getMaxZoom(){return this.get(Ct.MAX_ZOOM)}getOpacity(){return this.get(Ct.OPACITY)}getSourceState(){return pt()}getVisible(){return this.get(Ct.VISIBLE)}getZIndex(){return this.get(Ct.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(Ct.EXTENT,e)}setMaxResolution(e){this.set(Ct.MAX_RESOLUTION,e)}setMinResolution(e){this.set(Ct.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(Ct.MAX_ZOOM,e)}setMinZoom(e){this.set(Ct.MIN_ZOOM,e)}setOpacity(e){mt(typeof e=="number","Layer opacity must be a number"),this.set(Ct.OPACITY,e)}setVisible(e){this.set(Ct.VISIBLE,e)}setZIndex(e){this.set(Ct.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const zi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Hn={ANIMATING:0,INTERACTING:1},es={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},hne=42,_v=256,vv={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class aT{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||vv[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Ju=6378137,nl=Math.PI*Ju,fne=[-nl,-nl,nl,nl],gne=[-180,-85,180,85],Ud=Ju*Math.log(Math.tan(Math.PI/2));class Ba extends aT{constructor(e){super({code:e,units:"m",extent:fne,global:!0,worldExtent:gne,getPointResolution:function(n,i){return n/Math.cosh(i[1]/Ju)}})}}const ow=[new Ba("EPSG:3857"),new Ba("EPSG:102100"),new Ba("EPSG:102113"),new Ba("EPSG:900913"),new Ba("http://www.opengis.net/def/crs/EPSG/0/3857"),new Ba("http://www.opengis.net/gml/srs/epsg.xml#3857")];function pne(t,e,n,i){const s=t.length;n=n>1?n:2,i=i??n,e===void 0&&(n>2?e=t.slice():e=new Array(s));for(let r=0;rUd?o=Ud:o<-Ud&&(o=-Ud),e[r+1]=o}return e}function mne(t,e,n,i){const s=t.length;n=n>1?n:2,i=i??n,e===void 0&&(n>2?e=t.slice():e=new Array(s));for(let r=0;rs&&(l=l|An.RIGHT),ar&&(l=l|An.ABOVE),l===An.UNKNOWN&&(l=An.INTERSECTING),l}function Gi(){return[1/0,1/0,-1/0,-1/0]}function uo(t,e,n,i,s){return s?(s[0]=t,s[1]=e,s[2]=n,s[3]=i,s):[t,e,n,i]}function Yf(t){return uo(1/0,1/0,-1/0,-1/0,t)}function uT(t,e){const n=t[0],i=t[1];return uo(n,i,n,i,e)}function wv(t,e,n,i,s){const r=Yf(s);return dT(r,t,e,n,i)}function bu(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function xne(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function Zc(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function dT(t,e,n,i,s){for(;ne[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Uf(t){return t[2]=o&&m<=l),!i&&r&An.RIGHT&&!(s&An.RIGHT)&&(v=g-(f-l)*p,i=v>=a&&v<=c),!i&&r&An.BELOW&&!(s&An.BELOW)&&(m=f-(g-a)/p,i=m>=o&&m<=l),!i&&r&An.LEFT&&!(s&An.LEFT)&&(v=g-(f-o)*p,i=v>=a&&v<=c)}return i}function fT(t,e){const n=e.getExtent(),i=pa(t);if(e.canWrapX()&&(i[0]=n[2])){const s=bt(n),o=Math.floor((i[0]-n[0])/s)*s;t[0]-=o,t[2]-=o}return t}function xv(t,e,n){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];fT(t,e);const s=bt(i);if(bt(t)>s&&!n)return[[i[0],t[1],i[2],t[3]]];if(t[0]i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-s,t[3]]]}return[t]}function Ane(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Wh(t,e){let n=!0;for(let i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function Ev(t,e){const n=Math.cos(e),i=Math.sin(e),s=t[0]*n-t[1]*i,r=t[1]*n+t[0]*i;return t[0]=s,t[1]=r,t}function Pne(t,e){return t[0]*=e,t[1]*=e,t}function gT(t,e){if(e.canWrapX()){const n=bt(e.getExtent()),i=Mne(t,e,n);i&&(t[0]-=i*n)}return t}function Mne(t,e,n){const i=e.getExtent();let s=0;return e.canWrapX()&&(t[0]i[2])&&(n=n||bt(i),s=Math.floor((t[0]-i[0])/n)),s}const Ine=63710088e-1;function uw(t,e,n){n=n||Ine;const i=fh(t[1]),s=fh(e[1]),r=(s-i)/2,o=fh(e[0]-t[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(s);return 2*n*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function pT(...t){console.warn(...t)}let Im=!0;function mT(t){Im=!1}function Cv(t,e){if(e!==void 0){for(let n=0,i=t.length;n=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Im=!1,pT("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function yT(t,e){return t}function Zr(t,e){return t}function Lne(){hw(ow),hw(lw),$ne(lw,ow,pne,mne)}Lne();function fw(t,e,n){return function(i,s,r,o,a){if(!i)return;if(!s&&!e)return i;const l=e?0:r[0]*s,c=e?0:r[1]*s,u=a?a[0]:0,d=a?a[1]:0;let f=t[0]+l/2+u,g=t[2]-l/2+u,p=t[1]+c/2+d,m=t[3]-c/2+d;f>g&&(f=(g+f)/2,g=f),p>m&&(p=(m+p)/2,m=p);let v=rn(i[0],f,g),y=rn(i[1],p,m);if(o&&n&&s){const x=30*s;v+=-x*Math.log(1+Math.max(0,f-i[0])/x)+x*Math.log(1+Math.max(0,i[0]-g)/x),y+=-x*Math.log(1+Math.max(0,p-i[1])/x)+x*Math.log(1+Math.max(0,i[1]-m)/x)}return[v,y]}}function One(t){return t}function Tv(t,e,n,i){const s=bt(e)/n[0],r=Un(e)/n[1];return i?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function Av(t,e,n){let i=Math.min(t,e);const s=50;return i*=Math.log(1+s*Math.max(0,t/e-1))/s+1,n&&(i=Math.max(i,n),i/=Math.log(1+s*Math.max(0,n/t-1))/s+1),rn(i,n/2,e*2)}function Nne(t,e,n,i){return e=e!==void 0?e:!0,function(s,r,o,a){if(s!==void 0){const l=t[0],c=t[t.length-1],u=n?Tv(l,n,o,i):l;if(a)return e?Av(s,u,c):rn(s,c,u);const d=Math.min(u,s),f=Math.floor(pv(t,d,r));return t[f]>u&&fMath.round(n*mw[i])/mw[i]).join(", ")+")"}function io(t,e,n,i,s,r,o){r=r||[],o=o||2;let a=0;for(let l=e;l{if(!i)return this.getSimplifiedGeometry(n);const s=this.clone();return s.applyTransform(i),s.getSimplifiedGeometry(n)})}simplifyTransformed(e,n){return this.simplifyTransformedInternal(this.getRevision(),e,n)}clone(){return pt()}closestPointXY(e,n,i,s){return pt()}containsXY(e,n){const i=this.getClosestPoint([e,n]);return i[0]===e&&i[1]===n}getClosestPoint(e,n){return n=n||[NaN,NaN],this.closestPointXY(e[0],e[1],n,1/0),n}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return pt()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&Yf(n),this.extentRevision_=this.getRevision()}return kne(this.extent_,e)}rotate(e,n){pt()}scale(e,n,i){pt()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return pt()}getType(){return pt()}applyTransform(e){pt()}intersectsExtent(e){return pt()}translate(e,n){pt()}transform(e,n){const i=Xi(e),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),u=Un(c)/Un(l);return br(_w,c[0],c[3],u,-u,0,0,0),io(r,0,r.length,a,_w,o),zh(i,n)(r,o,a)}:zh(i,n);return this.applyTransform(s),this}}class Gf extends Gne{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return wv(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return pt()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const n=this.getSimplifiedGeometryInternal(e);return n.getFlatCoordinates().length1)d=n;else if(f>0){for(let g=0;gs&&(s=c),r=a,o=l}return s}function Zne(t,e,n,i,s){for(let r=0,o=n.length;r0;){const d=c.pop(),f=c.pop();let g=0;const p=t[f],m=t[f+1],v=t[d],y=t[d+1];for(let x=f+i;xg&&(u=x,g=b)}g>s&&(l[(u-e)/i]=1,f+i0&&m>g)&&(p<0&&v0&&v>p)){c=d,u=f;continue}r[o++]=c,r[o++]=u,a=c,l=u,c=d,u=f}return r[o++]=c,r[o++]=u,o}function ET(t,e,n,i,s,r,o,a){for(let l=0,c=n.length;lr&&(c-a)*(r-l)-(s-a)*(u-l)>0&&o++:u<=r&&(c-a)*(r-l)-(s-a)*(u-l)<0&&o--,a=c,l=u}return o!==0}function ST(t,e,n,i,s,r){if(n.length===0||!Zo(t,e,n[0],i,s,r))return!1;for(let o=1,a=n.length;oy&&(c=(u+d)/2,ST(t,e,n,i,c,p)&&(v=c,y=x)),u=d}return isNaN(v)&&(v=s[r]),o?(o.push(v,p,y),o):[v,p,y]}function rie(t,e,n,i,s){let r=[];for(let o=0,a=n.length;o=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:kT(t,e,n,i,function(o,a){return Tne(s,o,a)}):!1}function TT(t,e,n,i,s){return!!($v(t,e,n,i,s)||Zo(t,e,n,i,s[0],s[1])||Zo(t,e,n,i,s[0],s[3])||Zo(t,e,n,i,s[2],s[1])||Zo(t,e,n,i,s[2],s[3]))}function oie(t,e,n,i,s){if(!TT(t,e,n[0],i,s))return!1;if(n.length===1)return!0;for(let r=1,o=n.length;r0}function lie(t,e,n,i,s){s=s!==void 0?s:!1;for(let r=0,o=n.length;r1&&typeof arguments[n-1]=="function"&&(i=arguments[n-1],--n);let s=0;for(;s0}getInteracting(){return this.hints_[Hn.INTERACTING]>0}cancelAnimations(){this.setHint(Hn.ANIMATING,-this.hints_[Hn.ANIMATING]);let e;for(let n=0,i=this.animations_.length;n=0;--i){const s=this.animations_[i];let r=!0;for(let o=0,a=s.length;o0?c/l.duration:1;u>=1?(l.complete=!0,u=1):r=!1;const d=l.easing(u);if(l.sourceCenter){const f=l.sourceCenter[0],g=l.sourceCenter[1],p=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const v=f+d*(p-f),y=g+d*(m-g);this.targetCenter_=[v,y]}if(l.sourceResolution&&l.targetResolution){const f=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const g=this.getViewportSize_(this.getRotation()),p=this.constraints_.resolution(f,0,g,!0);this.targetCenter_=this.calculateCenterZoom(p,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=f,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const f=d===1?hl(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const g=this.constraints_.rotation(f,!0);this.targetCenter_=this.calculateCenterRotate(g,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=f}if(this.applyTargetState_(!0),n=!0,!l.complete)break}if(r){this.animations_[i]=null,this.setHint(Hn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&Gd(o,!0)}}this.animations_=this.animations_.filter(Boolean),n&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,n){let i;const s=this.getCenterInternal();return s!==void 0&&(i=[s[0]-n[0],s[1]-n[1]],Ev(i,e-this.getRotation()),Ane(i,n)),i}calculateCenterZoom(e,n){let i;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const o=n[0]-e*(n[0]-s[0])/r,a=n[1]-e*(n[1]-s[1])/r;i=[o,a]}return i}getViewportSize_(e){const n=this.viewportSize_;if(e){const i=n[0],s=n[1];return[Math.abs(i*Math.cos(e))+Math.abs(s*Math.sin(e)),Math.abs(i*Math.sin(e))+Math.abs(s*Math.cos(e))]}return n}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&Dm(e,this.getProjection())}getCenterInternal(){return this.get(es.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const n=this.calculateExtentInternal(e);return yT(n,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const n=this.getCenterInternal();mt(n,"The view center is not defined");const i=this.getResolution();mt(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return mt(s!==void 0,"The view rotation is not defined"),Mm(n,i,s,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(es.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,n){return this.getResolutionForExtentInternal(Zr(e,this.getProjection()),n)}getResolutionForExtentInternal(e,n){n=n||this.getViewportSizeMinusPadding_();const i=bt(e)/n[0],s=Un(e)/n[1];return Math.max(i,s)}getResolutionForValueFunction(e){e=e||2;const n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(n/i)/Math.log(e);return function(r){return n/Math.pow(e,r*s)}}getRotation(){return this.get(es.ROTATION)}getValueForResolutionFunction(e){const n=Math.log(e||2),i=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(i/s)/n;return function(o){return Math.log(i/o)/n/r}}getViewportSizeMinusPadding_(e){let n=this.getViewportSize_(e);const i=this.padding_;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n}getState(){const e=this.getProjection(),n=this.getResolution(),i=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const o=this.getViewportSizeMinusPadding_();s=pp(s,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],n,i)}return{center:s.slice(0),projection:e!==void 0?e:null,resolution:n,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const n=this.getResolution();return n!==void 0&&(e=this.getZoomForResolution(n)),e}getZoomForResolution(e){let n=this.minZoom_||0,i,s;if(this.resolutions_){const r=pv(this.resolutions_,e,1);n=r,i=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=i/this.resolutions_[r+1]}else i=this.maxResolution_,s=this.zoomFactor_;return n+Math.log(i/e)/Math.log(s)}getResolutionForZoom(e){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];const n=rn(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,rn(e-n,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,n){let i;if(mt(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){mt(!Uf(e),"Cannot fit empty extent provided as `geometry`");const s=Zr(e,this.getProjection());i=xw(s)}else if(e.getType()==="Circle"){const s=Zr(e.getExtent(),this.getProjection());i=xw(s),i.rotate(this.getRotation(),pa(s))}else i=e;this.fitInternal(i,n)}rotatedExtentForGeometry(e){const n=this.getRotation(),i=Math.cos(n),s=Math.sin(-n),r=e.getFlatCoordinates(),o=e.getStride();let a=1/0,l=1/0,c=-1/0,u=-1/0;for(let d=0,f=r.length;d{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let n;const i=this.getMapInternal();!e&&i&&(e=i.getView()),e instanceof ks?n={viewState:e.getState(),extent:e.calculateExtent()}:n=e,!n.layerStatesArray&&i&&(n.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let s;n.layerStatesArray?s=n.layerStatesArray.find(o=>o.layer===this):s=this.getLayerState();const r=this.getExtent();return Ov(s,n.viewState)&&(!r||vi(r,n.extent))}getAttributions(e){if(!this.isVisible(e))return[];const n=this.getSource()?.getAttributions();if(!n)return[];const i=e instanceof ks?e.getViewStateAndExtent():e;let s=n(i);return Array.isArray(s)||(s=[s]),s}render(e,n){const i=this.getRenderer();return i.prepareFrame(e)?(this.rendered=!0,i.renderFrame(e,n)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(e,n){}renderDeferred(e){const n=this.getRenderer();n&&n.renderDeferred(e)}setMapInternal(e){e||this.unrender(),this.set(Ct.MAP,e)}getMapInternal(){return this.get(Ct.MAP)}setMap(e){this.mapPrecomposeKey_&&(Lt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Lt(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=ft(e,zi.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ft(this,tt.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const n=e.frameState.layerStatesArray,i=this.getLayerState(!1);mt(!n.some(s=>s.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),n.push(i)}setSource(e){this.set(Ct.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Ov(t,e){if(!t.visible)return!1;const n=e.resolution;if(n=t.maxResolution)return!1;const i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}function AT(t,e,n=0,i=t.length-1,s=gie){for(;i>n;){if(i-n>600){const l=i-n+1,c=e-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),g=Math.max(n,Math.floor(e-c*d/l+f)),p=Math.min(i,Math.floor(e+(l-c)*d/l+f));AT(t,e,g,p,s)}const r=t[e];let o=n,a=i;for(_c(t,n,e),s(t[i],r)>0&&_c(t,n,i);o0;)a--}s(t[n],r)===0?_c(t,n,a):(a++,_c(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}}function _c(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function gie(t,e){return te?1:0}let PT=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const i=[];if(!qd(e,n))return i;const s=this.toBBox,r=[];for(;n;){for(let o=0;o=0&&r[n].children.length>this._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(s,r,n)}_split(e,n){const i=e[n],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const o=this._chooseSplitIndex(i,r,s),a=Za(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,Va(i,this.toBBox),Va(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,n){this.data=Za([e,n]),this.data.height=e.height+1,this.data.leaf=!1,Va(this.data,this.toBBox)}_chooseSplitIndex(e,n,i){let s,r=1/0,o=1/0;for(let a=n;a<=i-n;a++){const l=Tc(e,0,a,this.toBBox),c=Tc(e,a,i,this.toBBox),u=yie(l,c),d=mp(l)+mp(c);u=n;c--){const u=e.children[c];Ac(a,e.leaf?r(u):u),l+=Xd(a)}return l}_adjustParentBBoxes(e,n,i){for(let s=i;s>=0;s--)Ac(n[s],e)}_condense(e){for(let n=e.length-1,i;n>=0;n--)e[n].children.length===0?n>0?(i=e[n-1].children,i.splice(i.indexOf(e[n]),1)):this.clear():Va(e[n],this.toBBox)}};function pie(t,e,n){if(!n)return e.indexOf(t);for(let i=0;i=t.minX&&e.maxY>=t.minY}function Za(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Ew(t,e,n,i,s){const r=[e,n];for(;r.length;){if(n=r.pop(),e=r.pop(),n-e<=i)continue;const o=e+Math.ceil((n-e)/i/2)*i;AT(t,o,e,n,s),r.push(e,o,o,n)}}const ot={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function Cw(t){return t[0]>0&&t[1]>0}function bie(t,e,n){return n===void 0&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function wi(t,e){return Array.isArray(t)?t:(e===void 0?e=[t,t]:(e[0]=t,e[1]=t),e)}class Zf{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=wi(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Zf({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return pt()}getImage(e){return pt()}getHitDetectionImage(){return pt()}getPixelRatio(e){return 1}getImageState(){return pt()}getImageSize(){return pt()}getOrigin(){return pt()}getSize(){return pt()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=wi(e)}listenImageChange(e){pt()}load(){pt()}unlistenImageChange(e){pt()}ready(){return Promise.resolve()}}const Su={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var Bn={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};Bn.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}};Bn.max=Bn.whitepoint[2].D65;Bn.rgb=function(t,e){e=e||Bn.whitepoint[2].E;var n=t[0]/e[0],i=t[1]/e[1],s=t[2]/e[2],r,o,a;return r=n*3.240969941904521+i*-1.537383177570093+s*-.498610760293,o=n*-.96924363628087+i*1.87596750150772+s*.041555057407175,a=n*.055630079696993+i*-.20397695888897+s*1.056971514242878,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,r=Math.min(Math.max(0,r),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[r*255,o*255,a*255]};Su.xyz=function(t,e){var n=t[0]/255,i=t[1]/255,s=t[2]/255;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=n*.41239079926595+i*.35758433938387+s*.18048078840183,o=n*.21263900587151+i*.71516867876775+s*.072192315360733,a=n*.019330818715591+i*.11919477979462+s*.95053215224966;return e=e||Bn.whitepoint[2].E,[r*e[0],o*e[1],a*e[2]]};const Nv={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,n){var i,s,r,o,a,l,c,u,d,f,g,p,m;if(r=t[0],o=t[1],a=t[2],r===0)return[0,0,0];var v=.0011070564598794539;return e=e||"D65",n=n||2,d=Bn.whitepoint[n][e][0],f=Bn.whitepoint[n][e][1],g=Bn.whitepoint[n][e][2],p=4*d/(d+15*f+3*g),m=9*f/(d+15*f+3*g),i=o/(13*r)+p||0,s=a/(13*r)+m||0,c=r>8?f*Math.pow((r+16)/116,3):f*r*v,l=c*9*i/(4*s)||0,u=c*(12-3*i-20*s)/(4*s)||0,[l,c,u]}};Bn.luv=function(t,e,n){var i,s,r,o,a,l,c,u,d,f,g,p,m,v=.008856451679035631,y=903.2962962962961;e=e||"D65",n=n||2,d=Bn.whitepoint[n][e][0],f=Bn.whitepoint[n][e][1],g=Bn.whitepoint[n][e][2],p=4*d/(d+15*f+3*g),m=9*f/(d+15*f+3*g),l=t[0],c=t[1],u=t[2],i=4*l/(l+15*c+3*u)||0,s=9*c/(l+15*c+3*u)||0;var x=c/f;return r=x<=v?y*x:116*Math.pow(x,1/3)-16,o=13*r*(i-p),a=13*r*(s-m),[r,o,a]};var MT={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e=t[0],n=t[1],i=t[2],s,r,o;return o=i/360*2*Math.PI,s=n*Math.cos(o),r=n*Math.sin(o),[e,s,r]},xyz:function(t){return Nv.xyz(MT.luv(t))}};Nv.lchuv=function(t){var e=t[0],n=t[1],i=t[2],s=Math.sqrt(n*n+i*i),r=Math.atan2(i,n),o=r*360/2/Math.PI;return o<0&&(o+=360),[e,s,o]};Bn.lchuv=function(t){return Nv.lchuv(Bn.luv(t))};const Sw={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]};var kw={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function wie(t){var e,n=[],i=1,s;if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(t=String(t).toLowerCase(),Sw[t])n=Sw[t].slice(),s="rgb";else if(t==="transparent")i=0,s="rgb",n=[0,0,0];else if(t[0]==="#"){var r=t.slice(1),o=r.length,a=o<=4;i=1,a?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],o===4&&(i=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],o===8&&(i=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),s="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var l=e[1];s=l.replace(/a$/,"");var c=s==="cmyk"?4:s==="gray"?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=n.shift()),n=n.map(function(u,d){if(u[u.length-1]==="%")return u=parseFloat(u)/100,d===3?u:s==="rgb"?u*255:s[0]==="h"||s[0]==="l"&&!d?u*100:s==="lab"?u*125:s==="lch"?d<2?u*150:u*360:s[0]==="o"&&!d?u:s==="oklab"?u*.4:s==="oklch"?d<2?u*.4:u*360:u;if(s[d]==="h"||d===2&&s[s.length-1]==="h"){if(kw[u]!==void 0)return kw[u];if(u.endsWith("deg"))return parseFloat(u);if(u.endsWith("turn"))return parseFloat(u)*360;if(u.endsWith("grad"))return parseFloat(u)*360/400;if(u.endsWith("rad"))return parseFloat(u)*180/Math.PI}return u==="none"?0:parseFloat(u)}),i=n.length>c?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(u){return parseFloat(u)}),s=t.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:n,alpha:i}}const vp={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100,s,r,o,a,l,c=0;if(n===0)return l=i*255,[l,l,l];for(r=i<.5?i*(1+n):i+n-i*n,s=2*i-r,a=[0,0,0];c<3;)o=e+1/3*-(c-1),o<0?o++:o>1&&o--,l=6*o<1?s+(r-s)*6*o:2*o<1?r:3*o<2?s+(r-s)*(2/3-o)*6:s,a[c++]=l*255;return a}};Su.hsl=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,s=Math.min(e,n,i),r=Math.max(e,n,i),o=r-s,a,l,c;return r===s?a=0:e===r?a=(n-i)/o:n===r?a=2+(i-e)/o:i===r&&(a=4+(e-n)/o),a=Math.min(a*60,360),a<0&&(a+=360),c=(s+r)/2,r===s?l=0:c<=.5?l=o/(r+s):l=o/(2-r-s),[a,l*100,c*100]};function xie(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var e,n=wie(t);if(!n.space)return[];const i=n.space[0]==="h"?vp.min:Su.min,s=n.space[0]==="h"?vp.max:Su.max;return e=Array(3),e[0]=Math.min(Math.max(n.values[0],i[0]),s[0]),e[1]=Math.min(Math.max(n.values[1],i[1]),s[1]),e[2]=Math.min(Math.max(n.values[2],i[2]),s[2]),n.space[0]==="h"&&(e=vp.rgb(e)),e.push(Math.min(Math.max(n.alpha,0),1)),e}const Fv=[NaN,NaN,NaN,0];function Eie(t){return typeof t=="string"?t:Vv(t)}const Cie=1024,vc={};let yp=0;function Sie(t){if(t.length===4)return t;const e=t.slice();return e[3]=1,e}function Tw(t){const e=Bn.lchuv(Su.xyz(t));return e[3]=t[3],e}function kie(t){const e=Bn.rgb(MT.xyz(t));return e[3]=t[3],e}function Bv(t){if(t==="none")return Fv;if(vc.hasOwnProperty(t))return vc[t];if(yp>=Cie){let n=0;for(const i in vc)n++&3||(delete vc[i],--yp)}const e=xie(t);if(e.length!==4)throw new Error('failed to parse "'+t+'" as color');for(const n of e)if(isNaN(n))throw new Error('failed to parse "'+t+'" as color');return IT(e),vc[t]=e,++yp,e}function ku(t){return Array.isArray(t)?t:Bv(t)}function IT(t){return t[0]=rn(t[0]+.5|0,0,255),t[1]=rn(t[1]+.5|0,0,255),t[2]=rn(t[2]+.5|0,0,255),t[3]=rn(t[3],0,1),t}function Vv(t){let e=t[0];e!=(e|0)&&(e=e+.5|0);let n=t[1];n!=(n|0)&&(n=n+.5|0);let i=t[2];i!=(i|0)&&(i=i+.5|0);const s=t[3]===void 0?1:Math.round(t[3]*1e3)/1e3;return"rgba("+e+","+n+","+i+","+s+")"}const ho=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",Tie=ho.includes("firefox"),Aie=ho.includes("safari")&&!ho.includes("chrom");Aie&&(ho.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ho));const Pie=ho.includes("webkit")&&!ho.includes("edge"),DT=ho.includes("macintosh"),RT=typeof devicePixelRatio<"u"?devicePixelRatio:1,$T=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,LT=typeof Image<"u"&&Image.prototype.decode,OT=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}();function hn(t,e,n,i){let s;return n&&n.length?s=n.shift():$T?s=new OffscreenCanvas(t||300,e||300):s=document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",i)}let bp;function Hh(){return bp||(bp=hn(1,1)),bp}function zl(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function Aw(t,e){const n=e.parentNode;n&&n.replaceChild(t,e)}function Mie(t){for(;t.lastChild;)t.lastChild.remove()}function Iie(t,e){const n=t.childNodes;for(let i=0;;++i){const s=n[i],r=e[i];if(!s&&!r)break;if(s!==r){if(!s){t.appendChild(r);continue}if(!r){t.removeChild(s),--i;continue}t.insertBefore(r,s)}}}function Die(t,e,n){const i=t;let s=!0,r=!1,o=!1;const a=[Bh(i,tt.LOAD,function(){o=!0,r||e()})];return i.src&<?(r=!0,i.decode().then(function(){s&&e()}).catch(function(l){s&&(o?e():n())})):a.push(Bh(i,tt.ERROR,n)),function(){s=!1,a.forEach(Lt)}}function Rie(t,e){return new Promise((n,i)=>{function s(){o(),n(t)}function r(){o(),i(new Error("Image load error"))}function o(){t.removeEventListener("load",s),t.removeEventListener("error",r)}t.addEventListener("load",s),t.addEventListener("error",r)})}function $ie(t,e){return e&&(t.src=e),t.src&<?new Promise((n,i)=>t.decode().then(()=>n(t)).catch(s=>t.complete&&t.width?n(t):i(s))):Rie(t)}class Lie{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const n in this.cache_){const i=this.cache_[n];!(e++&3)&&!i.hasListener()&&(delete this.cache_[n],delete this.patternCache_[n],--this.cacheSize_)}}}get(e,n,i){const s=wp(e,n,i);return s in this.cache_?this.cache_[s]:null}getPattern(e,n,i){const s=wp(e,n,i);return s in this.patternCache_?this.patternCache_[s]:null}set(e,n,i,s,r){const o=wp(e,n,i),a=o in this.cache_;this.cache_[o]=s,r&&(s.getImageState()===ot.IDLE&&s.load(),s.getImageState()===ot.LOADING?s.ready().then(()=>{this.patternCache_[o]=Hh().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=Hh().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function wp(t,e,n){const i=n?ku(n):"null";return e+":"+t+":"+i}const Is=new Lie;let yc=null;class Oie extends zf{constructor(e,n,i,s,r){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=i,this.canvas_={},this.color_=r,this.imageState_=s===void 0?ot.IDLE:s,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=n,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===ot.LOADED){yc||(yc=hn(1,1,void 0,{willReadFrequently:!0})),yc.drawImage(this.image_,0,0);try{yc.getImageData(0,0,1,1),this.tainted_=!1}catch{yc=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(tt.CHANGE)}handleImageError_(){this.imageState_=ot.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=ot.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],n=this.size_[1],i=hn(e,n);i.fillRect(0,0,e,n),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===ot.IDLE){this.image_||this.initializeImage_(),this.imageState_=ot.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&$ie(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==ot.LOADED)return;const n=this.image_,i=hn(Math.ceil(n.width*e),Math.ceil(n.height*e)),s=i.canvas;i.scale(e,e),i.drawImage(n,0,0),i.globalCompositeOperation="multiply",i.fillStyle=Eie(this.color_),i.fillRect(0,0,s.width/e,s.height/e),i.globalCompositeOperation="destination-in",i.drawImage(n,0,0),this.canvas_[e]=s}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)e();else{const n=()=>{(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)&&(this.removeEventListener(tt.CHANGE,n),e())};this.addEventListener(tt.CHANGE,n)}})),this.ready_}}function Wv(t,e,n,i,s,r){let o=e===void 0?void 0:Is.get(e,n,s);return o||(o=new Oie(t,t&&"src"in t?t.src||void 0:e,n,i,s),Is.set(e,n,s,o,r)),r&&o&&!Is.getPattern(e,n,s)&&Is.set(e,n,s,o,r),o}function Ds(t){return t?Array.isArray(t)?Vv(t):typeof t=="object"&&"src"in t?Nie(t):t:null}function Nie(t){if(!t.offset||!t.size)return Is.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,n=Is.getPattern(e,void 0,t.color);if(n)return n;const i=Is.get(t.src,"anonymous",null);if(i.getImageState()!==ot.LOADED)return null;const s=hn(t.size[0],t.size[1]);return s.drawImage(i.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),Wv(s.canvas,e,void 0,ot.LOADED,t.color,!0),Is.getPattern(e,void 0,t.color)}const Zd="ol-hidden",Jf="ol-unselectable",zv="ol-control",Pw="ol-collapsed",Fie=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),Mw=["style","variant","weight","size","lineHeight","family"],NT=function(t){const e=t.match(Fie);if(!e)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=Mw.length;iMath.max(s,Kh(t,r)),0);return n[e]=i,i}function Wie(t,e){const n=[],i=[],s=[];let r=0,o=0,a=0,l=0;for(let c=0,u=e.length;c<=u;c+=2){const d=e[c];if(d===` -`||c===u){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const f=e[c+1]||t.font,g=Kh(f,d);n.push(g),o+=g;const p=Vie(f);i.push(p),l=Math.max(l,p)}return{width:r,height:a,widths:n,heights:i,lineWidths:s}}function zie(t,e,n,i,s,r,o,a,l,c,u){t.save(),n!==1&&(t.globalAlpha===void 0?t.globalAlpha=d=>d.globalAlpha*=n:t.globalAlpha*=n),e&&t.transform.apply(t,e),i.contextInstructions?(t.translate(l,c),t.scale(u[0],u[1]),Yie(i,t)):u[0]<0||u[1]<0?(t.translate(l,c),t.scale(u[0],u[1]),t.drawImage(i,s,r,o,a,0,0,o,a)):t.drawImage(i,s,r,o,a,l,c,o*u[0],a*u[1]),t.restore()}function Yie(t,e){const n=t.contextInstructions;for(let i=0,s=n.length;ithis.imageState_=ot.LOADED),this.render()}clone(){const e=this.getScale(),n=new Qf({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n}getAnchor(){const e=this.size_,n=this.getDisplacement(),i=this.getScaleArray();return[e[0]/2-n[0]/i[0],e[1]/2+n[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){let n=this.canvases_[e];if(!n){const i=this.renderOptions_,s=hn(i.size*e,i.size*e);this.draw_(i,s,e),n=s.canvas,this.canvases_[e]=n}return n}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,n,i){if(n===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return n;let s=this.radius,r=this.radius2_===void 0?s:this.radius2_;if(s{this.patternImage_=null}),n.getImageState()===ot.IDLE&&n.load(),n.getImageState()===ot.LOADING&&(this.patternImage_=n)}this.color_=e}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}class jl{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=e.lineDash!==void 0?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}clone(){const e=this.getColor();return new jl({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setWidth(e){this.width_=e}}class pr{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=Dw,e.geometry!==void 0&&this.setGeometry(e.geometry),this.fill_=e.fill!==void 0?e.fill:null,this.image_=e.image!==void 0?e.image:null,this.renderer_=e.renderer!==void 0?e.renderer:null,this.hitDetectionRenderer_=e.hitDetectionRenderer!==void 0?e.hitDetectionRenderer:null,this.stroke_=e.stroke!==void 0?e.stroke:null,this.text_=e.text!==void 0?e.text:null,this.zIndex_=e.zIndex}clone(){let e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new pr({geometry:e??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(n){return n.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=Dw,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function Hie(t){let e;if(typeof t=="function")e=t;else{let n;Array.isArray(t)?n=t:(mt(typeof t.getZIndex=="function","Expected an `Style` or an array of `Style`"),n=[t]),e=function(){return n}}return e}let xp=null;function VT(t,e){if(!xp){const n=new Zl({color:"rgba(255,255,255,0.4)"}),i=new jl({color:"#3399CC",width:1.25});xp=[new pr({image:new Qu({fill:n,stroke:i,radius:5}),fill:n,stroke:i})]}return xp}function Dw(t){return t.getGeometry()}function Rw(t,e,n,i){return n!==void 0&&i!==void 0?[n/t,i/e]:n!==void 0?n/t:i!==void 0?i/e:1}class eg extends Zf{constructor(e){e=e||{};const n=e.opacity!==void 0?e.opacity:1,i=e.rotation!==void 0?e.rotation:0,s=e.scale!==void 0?e.scale:1,r=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:n,rotation:i,scale:s,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:r,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null;const o=e.img!==void 0?e.img:null;let a=e.src;mt(!(a!==void 0&&o),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&o&&(a=o.src||Et(o)),mt(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),mt(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(e.src!==void 0?l=ot.IDLE:o!==void 0&&("complete"in o?o.complete?l=o.src?ot.LOADED:ot.IDLE:l=ot.LOADING:l=ot.LOADED),this.color_=e.color!==void 0?ku(e.color):null,this.iconImage_=Wv(o,a,this.crossOrigin_,l,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,this.initialOptions_,e.width!==void 0||e.height!==void 0){let c,u;if(e.size)[c,u]=e.size;else{const d=this.getImage(1);if(d.width&&d.height)c=d.width,u=d.height;else if(d instanceof HTMLImageElement){this.initialOptions_=e;const f=()=>{if(this.unlistenImageChange(f),!this.initialOptions_)return;const g=this.iconImage_.getSize();this.setScale(Rw(g[0],g[1],e.width,e.height))};this.listenImageChange(f);return}}c!==void 0&&this.setScale(Rw(c,u,e.width,e.height))}}clone(){let e,n,i;return this.initialOptions_?(n=this.initialOptions_.width,i=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new eg({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:n,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=s[0]),this.anchorYUnits_=="fraction"&&(e[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+s[1])}this.normalizedAnchor_=e}const n=this.getDisplacement(),i=this.getScaleArray();return[e[0]-n[0]/i[0],e[1]+n[1]/i[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){const n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=i[0]-n[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=i[1]-n[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==ot.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){const e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==ot.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(tt.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(tt.CHANGE,e)}ready(){return this.iconImage_.ready()}}const jie="#333";class Yv{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=wi(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new Zl({color:jie}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Yv({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=wi(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}}let Ea=0;const ni=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},Xie={[_e.Get]:qe(st(1,1/0),$w),[_e.Var]:qe(st(1,1),qie),[_e.Has]:qe(st(1,1/0),$w),[_e.Id]:qe(Zie,Wa),[_e.Concat]:qe(st(2,1/0),_t(mi)),[_e.GeometryType]:qe(Jie,Wa),[_e.LineMetric]:qe(Wa),[_e.Resolution]:qe(Wa),[_e.Zoom]:qe(Wa),[_e.Time]:qe(Wa),[_e.Any]:qe(st(2,1/0),_t(ni)),[_e.All]:qe(st(2,1/0),_t(ni)),[_e.Not]:qe(st(1,1),_t(ni)),[_e.Equal]:qe(st(2,2),_t(Jd)),[_e.NotEqual]:qe(st(2,2),_t(Jd)),[_e.GreaterThan]:qe(st(2,2),_t(ht)),[_e.GreaterThanOrEqualTo]:qe(st(2,2),_t(ht)),[_e.LessThan]:qe(st(2,2),_t(ht)),[_e.LessThanOrEqualTo]:qe(st(2,2),_t(ht)),[_e.Multiply]:qe(st(2,1/0),Lw),[_e.Coalesce]:qe(st(2,1/0),Lw),[_e.Divide]:qe(st(2,2),_t(ht)),[_e.Add]:qe(st(2,1/0),_t(ht)),[_e.Subtract]:qe(st(2,2),_t(ht)),[_e.Clamp]:qe(st(3,3),_t(ht)),[_e.Mod]:qe(st(2,2),_t(ht)),[_e.Pow]:qe(st(2,2),_t(ht)),[_e.Abs]:qe(st(1,1),_t(ht)),[_e.Floor]:qe(st(1,1),_t(ht)),[_e.Ceil]:qe(st(1,1),_t(ht)),[_e.Round]:qe(st(1,1),_t(ht)),[_e.Sin]:qe(st(1,1),_t(ht)),[_e.Cos]:qe(st(1,1),_t(ht)),[_e.Atan]:qe(st(1,2),_t(ht)),[_e.Sqrt]:qe(st(1,1),_t(ht)),[_e.Match]:qe(st(4,1/0),Ow,ese),[_e.Between]:qe(st(3,3),_t(ht)),[_e.Interpolate]:qe(st(6,1/0),Ow,tse),[_e.Case]:qe(st(3,1/0),Qie,nse),[_e.In]:qe(st(2,2),ise),[_e.Number]:qe(st(1,1/0),_t(Jd)),[_e.String]:qe(st(1,1/0),_t(Jd)),[_e.Array]:qe(st(1,1/0),_t(ht)),[_e.Color]:qe(st(1,4),_t(ht)),[_e.Band]:qe(st(1,3),_t(ht)),[_e.Palette]:qe(st(2,2),sse),[_e.ToString]:qe(st(1,1),_t(ni|ht|mi|as))};function $w(t,e,n){const i=t.length-1,s=new Array(i);for(let r=0;re){const a=e===1/0?`${t} or more`:`${t} to ${e}`;throw new Error(`expected ${a} arguments for ${r}, got ${o}`)}}}function Lw(t,e,n){const i=t.length-1,s=new Array(i);for(let r=0;ri.featureId;case _e.GeometryType:return i=>i.geometryType;case _e.Concat:{const i=t.args.map(s=>ms(s));return s=>"".concat(...i.map(r=>r(s).toString()))}case _e.Resolution:return i=>i.resolution;case _e.Any:case _e.All:case _e.Between:case _e.In:case _e.Not:return cse(t);case _e.Equal:case _e.NotEqual:case _e.LessThan:case _e.LessThanOrEqualTo:case _e.GreaterThan:case _e.GreaterThanOrEqualTo:return lse(t);case _e.Multiply:case _e.Divide:case _e.Add:case _e.Subtract:case _e.Clamp:case _e.Mod:case _e.Pow:case _e.Abs:case _e.Floor:case _e.Ceil:case _e.Round:case _e.Sin:case _e.Cos:case _e.Atan:case _e.Sqrt:return use(t);case _e.Case:return dse(t);case _e.Match:return hse(t);case _e.Interpolate:return fse(t);case _e.ToString:return gse(t);default:throw new Error(`Unsupported operator ${n}`)}}function ose(t,e){const n=t.operator,i=t.args.length,s=new Array(i);for(let r=0;r{for(let o=0;o{for(let o=0;o{const r=t.args;let o=s.properties[i];for(let a=1,l=r.length;as.variables[i];case _e.Has:return s=>{const r=t.args;if(!(i in s.properties))return!1;let o=s.properties[i];for(let a=1,l=r.length;ai(r)===s(r);case _e.NotEqual:return r=>i(r)!==s(r);case _e.LessThan:return r=>i(r)i(r)<=s(r);case _e.GreaterThan:return r=>i(r)>s(r);case _e.GreaterThanOrEqualTo:return r=>i(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${n}`)}}function cse(t,e){const n=t.operator,i=t.args.length,s=new Array(i);for(let r=0;r{for(let o=0;o{for(let o=0;o{const o=s[0](r),a=s[1](r),l=s[2](r);return o>=a&&o<=l};case _e.In:return r=>{const o=s[0](r);for(let a=1;a!s[0](r);default:throw new Error(`Unsupported logical operator ${n}`)}}function use(t,e){const n=t.operator,i=t.args.length,s=new Array(i);for(let r=0;r{let o=1;for(let a=0;as[0](r)/s[1](r);case _e.Add:return r=>{let o=0;for(let a=0;as[0](r)-s[1](r);case _e.Clamp:return r=>{const o=s[0](r),a=s[1](r);if(ol?l:o};case _e.Mod:return r=>s[0](r)%s[1](r);case _e.Pow:return r=>Math.pow(s[0](r),s[1](r));case _e.Abs:return r=>Math.abs(s[0](r));case _e.Floor:return r=>Math.floor(s[0](r));case _e.Ceil:return r=>Math.ceil(s[0](r));case _e.Round:return r=>Math.round(s[0](r));case _e.Sin:return r=>Math.sin(s[0](r));case _e.Cos:return r=>Math.cos(s[0](r));case _e.Atan:return i===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case _e.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${n}`)}}function dse(t,e){const n=t.args.length,i=new Array(n);for(let s=0;s{for(let r=0;r{const r=i[0](s);for(let o=1;o{const r=i[0](s),o=i[1](s);let a,l;for(let c=2;c=o)return c===2?d:f?pse(r,o,a,l,u,d):Dc(r,o,a,l,u,d);a=u,l=d}return l}}function gse(t,e){const n=t.operator,i=t.args.length,s=new Array(i);for(let r=0;r{const o=s[0](r);return t.args[0].type===as?Vv(o):o.toString()};default:throw new Error(`Unsupported convert operator ${n}`)}}function Dc(t,e,n,i,s,r){const o=s-n;if(o===0)return i;const a=e-n,l=t===1?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1);return i+l*(r-i)}function pse(t,e,n,i,s,r){if(s-n===0)return i;const a=Tw(i),l=Tw(r);let c=l[2]-a[2];c>180?c-=360:c<-180&&(c+=360);const u=[Dc(t,e,n,a[0],s,l[0]),Dc(t,e,n,a[1],s,l[1]),a[2]+Dc(t,e,n,0,s,c),Dc(t,e,n,i[3],s,r[3])];return IT(kie(u))}function mse(t){return!0}function _se(t){const e=WT(),n=vse(t,e),i=YT();return function(s,r){if(i.properties=s.getPropertiesInternal(),i.resolution=r,e.featureId){const o=s.getId();o!==void 0?i.featureId=o:i.featureId=null}return e.geometryType&&(i.geometryType=zT(s.getGeometry())),n(i)}}function Nw(t){const e=WT(),n=t.length,i=new Array(n);for(let o=0;onull;i=jv(t,e+"fill-color",n)}if(!i)return null;const s=new Zl;return function(r){const o=i(r);return o===Fv?null:(s.setColor(o),s)}}function Du(t,e,n){const i=yi(t,e+"stroke-width",n),s=jv(t,e+"stroke-color",n);if(!i&&!s)return null;const r=sr(t,e+"stroke-line-cap",n),o=sr(t,e+"stroke-line-join",n),a=HT(t,e+"stroke-line-dash",n),l=yi(t,e+"stroke-line-dash-offset",n),c=yi(t,e+"stroke-miter-limit",n),u=new jl;return function(d){if(s){const f=s(d);if(f===Fv)return null;u.setColor(f)}if(i&&u.setWidth(i(d)),r){const f=r(d);if(f!=="butt"&&f!=="round"&&f!=="square")throw new Error("Expected butt, round, or square line cap");u.setLineCap(f)}if(o){const f=o(d);if(f!=="bevel"&&f!=="round"&&f!=="miter")throw new Error("Expected bevel, round, or miter line join");u.setLineJoin(f)}return a&&u.setLineDash(a(d)),l&&u.setLineDashOffset(l(d)),c&&u.setMiterLimit(c(d)),u}}function yse(t,e){const n="text-",i=sr(t,n+"value",e);if(!i)return null;const s=Iu(t,n,e),r=Iu(t,n+"background-",e),o=Du(t,n,e),a=Du(t,n+"background-",e),l=sr(t,n+"font",e),c=yi(t,n+"max-angle",e),u=yi(t,n+"offset-x",e),d=yi(t,n+"offset-y",e),f=Ru(t,n+"overflow",e),g=sr(t,n+"placement",e),p=yi(t,n+"repeat",e),m=tg(t,n+"scale",e),v=Ru(t,n+"rotate-with-view",e),y=yi(t,n+"rotation",e),x=sr(t,n+"align",e),E=sr(t,n+"justify",e),w=sr(t,n+"baseline",e),b=HT(t,n+"padding",e),C=ng(t,n+"declutter-mode"),k=new Yv({declutterMode:C});return function(T){if(k.setText(i(T)),s&&k.setFill(s(T)),r&&k.setBackgroundFill(r(T)),o&&k.setStroke(o(T)),a&&k.setBackgroundStroke(a(T)),l&&k.setFont(l(T)),c&&k.setMaxAngle(c(T)),u&&k.setOffsetX(u(T)),d&&k.setOffsetY(d(T)),f&&k.setOverflow(f(T)),g){const A=g(T);if(A!=="point"&&A!=="line")throw new Error("Expected point or line for text-placement");k.setPlacement(A)}if(p&&k.setRepeat(p(T)),m&&k.setScale(m(T)),v&&k.setRotateWithView(v(T)),y&&k.setRotation(y(T)),x){const A=x(T);if(A!=="left"&&A!=="center"&&A!=="right"&&A!=="end"&&A!=="start")throw new Error("Expected left, right, center, start, or end for text-align");k.setTextAlign(A)}if(E){const A=E(T);if(A!=="left"&&A!=="right"&&A!=="center")throw new Error("Expected left, right, or center for text-justify");k.setJustify(A)}if(w){const A=w(T);if(A!=="bottom"&&A!=="top"&&A!=="middle"&&A!=="alphabetic"&&A!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");k.setTextBaseline(A)}return b&&k.setPadding(b(T)),k}}function bse(t,e){return"icon-src"in t?wse(t,e):"shape-points"in t?xse(t,e):"circle-radius"in t?Ese(t,e):null}function wse(t,e){const n="icon-",i=n+"src",s=jT(t[i],i),r=Uh(t,n+"anchor",e),o=tg(t,n+"scale",e),a=yi(t,n+"opacity",e),l=Uh(t,n+"displacement",e),c=yi(t,n+"rotation",e),u=Ru(t,n+"rotate-with-view",e),d=Bw(t,n+"anchor-origin"),f=Vw(t,n+"anchor-x-units"),g=Vw(t,n+"anchor-y-units"),p=Ase(t,n+"color"),m=kse(t,n+"cross-origin"),v=Tse(t,n+"offset"),y=Bw(t,n+"offset-origin"),x=Gh(t,n+"width"),E=Gh(t,n+"height"),w=Sse(t,n+"size"),b=ng(t,n+"declutter-mode"),C=new eg({src:s,anchorOrigin:d,anchorXUnits:f,anchorYUnits:g,color:p,crossOrigin:m,offset:v,offsetOrigin:y,height:E,width:x,size:w,declutterMode:b});return function(k){return a&&C.setOpacity(a(k)),l&&C.setDisplacement(l(k)),c&&C.setRotation(c(k)),u&&C.setRotateWithView(u(k)),o&&C.setScale(o(k)),r&&C.setAnchor(r(k)),C}}function xse(t,e){const n="shape-",i=n+"points",s=n+"radius",r=Om(t[i],i),o=Om(t[s],s),a=Iu(t,n,e),l=Du(t,n,e),c=tg(t,n+"scale",e),u=Uh(t,n+"displacement",e),d=yi(t,n+"rotation",e),f=Ru(t,n+"rotate-with-view",e),g=Gh(t,n+"radius2"),p=Gh(t,n+"angle"),m=ng(t,n+"declutter-mode"),v=new Qf({points:r,radius:o,radius2:g,angle:p,declutterMode:m});return function(y){return a&&v.setFill(a(y)),l&&v.setStroke(l(y)),u&&v.setDisplacement(u(y)),d&&v.setRotation(d(y)),f&&v.setRotateWithView(f(y)),c&&v.setScale(c(y)),v}}function Ese(t,e){const n="circle-",i=Iu(t,n,e),s=Du(t,n,e),r=yi(t,n+"radius",e),o=tg(t,n+"scale",e),a=Uh(t,n+"displacement",e),l=yi(t,n+"rotation",e),c=Ru(t,n+"rotate-with-view",e),u=ng(t,n+"declutter-mode"),d=new Qu({radius:5,declutterMode:u});return function(f){return r&&d.setRadius(r(f)),i&&d.setFill(i(f)),s&&d.setStroke(s(f)),a&&d.setDisplacement(a(f)),l&&d.setRotation(l(f)),c&&d.setRotateWithView(c(f)),o&&d.setScale(o(f)),d}}function yi(t,e,n){if(!(e in t))return;const i=Cr(t[e],ht,n);return function(s){return Om(i(s),e)}}function sr(t,e,n){if(!(e in t))return null;const i=Cr(t[e],mi,n);return function(s){return jT(i(s),e)}}function Cse(t,e,n){const i=sr(t,e+"pattern-src",n),s=Fw(t,e+"pattern-offset",n),r=Fw(t,e+"pattern-size",n),o=jv(t,e+"color",n);return function(a){return{src:i(a),offset:s&&s(a),size:r&&r(a),color:o&&o(a)}}}function Ru(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ni,n);return function(s){const r=i(s);if(typeof r!="boolean")throw new Error(`Expected a boolean for ${e}`);return r}}function jv(t,e,n){if(!(e in t))return null;const i=Cr(t[e],as,n);return function(s){return KT(i(s),e)}}function HT(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ma,n);return function(s){return ed(i(s),e)}}function Uh(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ma,n);return function(s){const r=ed(i(s),e);if(r.length!==2)throw new Error(`Expected two numbers for ${e}`);return r}}function Fw(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ma,n);return function(s){return UT(i(s),e)}}function tg(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ma|ht,n);return function(s){return Pse(i(s),e)}}function Gh(t,e){const n=t[e];if(n!==void 0){if(typeof n!="number")throw new Error(`Expected a number for ${e}`);return n}}function Sse(t,e){const n=t[e];if(n!==void 0){if(typeof n=="number")return wi(n);if(!Array.isArray(n))throw new Error(`Expected a number or size array for ${e}`);if(n.length!==2||typeof n[0]!="number"||typeof n[1]!="number")throw new Error(`Expected a number or size array for ${e}`);return n}}function kse(t,e){const n=t[e];if(n!==void 0){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);return n}}function Bw(t,e){const n=t[e];if(n!==void 0){if(n!=="bottom-left"&&n!=="bottom-right"&&n!=="top-left"&&n!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return n}}function Vw(t,e){const n=t[e];if(n!==void 0){if(n!=="pixels"&&n!=="fraction")throw new Error(`Expected pixels or fraction for ${e}`);return n}}function Tse(t,e){const n=t[e];if(n!==void 0)return ed(n,e)}function ng(t,e){const n=t[e];if(n!==void 0){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);if(n!=="declutter"&&n!=="obstacle"&&n!=="none")throw new Error(`Expected declutter, obstacle, or none for ${e}`);return n}}function Ase(t,e){const n=t[e];if(n!==void 0)return KT(n,e)}function ed(t,e){if(!Array.isArray(t))throw new Error(`Expected an array for ${e}`);const n=t.length;for(let i=0;i4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return n}function UT(t,e){const n=ed(t,e);if(n.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return n}function Pse(t,e){return typeof t=="number"?t:UT(t,e)}const Ww={RENDER_ORDER:"renderOrder"};class GT extends qf{constructor(e){e=e||{};const n=Object.assign({},e);delete n.style,delete n.renderBuffer,delete n.updateWhileAnimating,delete n.updateWhileInteracting,super(n),this.declutter_=e.declutter?String(e.declutter):void 0,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Ww.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e,n){const i=this.getDeclutter();i in e.declutter||(e.declutter[i]=new PT(9)),this.getRenderer().renderDeclutter(e,n)}setRenderOrder(e){this.set(Ww.RENDER_ORDER,e)}setStyle(e){this.style_=e===void 0?VT:e;const n=Mse(e);this.styleFunction_=e===null?void 0:Hie(n),this.changed()}}function Mse(t){if(t===void 0)return VT;if(!t)return null;if(typeof t=="function"||t instanceof pr)return t;if(!Array.isArray(t))return Nw([t]);if(t.length===0)return[];const e=t.length,n=t[0];if(n instanceof pr){const s=new Array(e);for(let r=0;r=0;--b){const C=m[b],k=C.layer;if(k.hasRenderer()&&Ov(C,u)&&a.call(l,k)){const T=k.getRenderer(),A=k.getSource();if(T&&A){const I=A.getWrapX()?g:e,V=d.bind(null,C.managed);x[0]=I[0]+p[w][0],x[1]=I[1]+p[w][1],c=T.forEachFeatureAtCoordinate(x,n,i,V,y)}if(c)return c}}if(y.length===0)return;const E=1/y.length;return y.forEach((w,b)=>w.distanceSq+=b*E),y.sort((w,b)=>w.distanceSq-b.distanceSq),y.some(w=>c=w.callback(w.feature,w.layer,w.geometry)),c}hasFeatureAtCoordinate(e,n,i,s,r,o){return this.forEachFeatureAtCoordinate(e,n,i,s,yu,this,r,o)!==void 0}getMap(){return this.map_}renderFrame(e){pt()}scheduleExpireIconCache(e){Is.canExpireCache()&&e.postRenderFunctions.push(Dse)}}function Dse(t,e){Is.expire()}class XT extends Er{constructor(e,n,i,s){super(e),this.inversePixelTransform=n,this.frameState=i,this.context=s}}class Rse extends Ise{constructor(e){super(e),this.fontChangeListenerKey_=ft(er,Fl.PROPERTYCHANGE,e.redrawText,e),this.element_=document.createElement("div");const n=this.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",this.element_.className=Jf+" ol-layers";const i=e.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(e,n){const i=this.getMap();if(i.hasListener(e)){const s=new XT(e,void 0,n);i.dispatchEvent(s)}}disposeInternal(){Lt(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(zi.PRECOMPOSE,e);const n=e.layerStatesArray.sort((a,l)=>a.zIndex-l.zIndex);n.some(a=>a.layer instanceof GT&&a.layer.getDeclutter())&&(e.declutter={});const s=e.viewState;this.children_.length=0;const r=[];let o=null;for(let a=0,l=n.length;a=0;--i){const s=n[i],r=s.layer;r.getDeclutter()&&r.renderDeclutter(e,s)}n.forEach(i=>i.layer.renderDeferred(e))}}}class Hr extends Er{constructor(e,n){super(e),this.layer=n}}const Ep={LAYERS:"layers"};class Jl extends oT{constructor(e){e=e||{};const n=Object.assign({},e);delete n.layers;let i=e.layers;super(n),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Ep.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new Ms(i.slice(),{unique:!0}):mt(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new Ms(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Lt),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(ft(e,gi.ADD,this.handleLayersAdd_,this),ft(e,gi.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(Lt);qu(this.listenerKeys_);const n=e.getArray();for(let i=0,s=n.length;i{this.clickTimeoutId_=void 0;const i=new Fr(en.SINGLECLICK,this.map_,e);this.dispatchEvent(i)},250)}updateActivePointers_(e){const n=e,i=n.pointerId;if(n.type==en.POINTERUP||n.type==en.POINTERCANCEL){delete this.trackedTouches_[i];for(const s in this.trackedTouches_)if(this.trackedTouches_[s].target!==n.target){delete this.trackedTouches_[s];break}}else(n.type==en.POINTERDOWN||n.type==en.POINTERMOVE)&&(this.trackedTouches_[i]=n);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const n=new Fr(en.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(n),this.emulateClicks_&&!n.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Lt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);const n=new Fr(en.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(n),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){const i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(ft(i,en.POINTERMOVE,this.handlePointerMove_,this),ft(i,en.POINTERUP,this.handlePointerUp_,this),ft(this.element_,en.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(ft(this.element_.getRootNode(),en.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const n=new Fr(en.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(n)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const n=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new Fr(en.POINTERMOVE,this.map_,e,n))}handleTouchMove_(e){const n=this.originalPointerMoveEvent_;(!n||n.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Lt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Lt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Lt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Br={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},zn={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Xh=1/0;class Lse{constructor(e,n){this.priorityFunction_=e,this.keyFunction_=n,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,qu(this.queuedElements_)}dequeue(){const e=this.elements_,n=this.priorities_,i=e[0];e.length==1?(e.length=0,n.length=0):(e[0]=e.pop(),n[0]=n.pop(),this.siftUp_(0));const s=this.keyFunction_(i);return delete this.queuedElements_[s],i}enqueue(e){mt(!(this.keyFunction_(e)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const n=this.priorityFunction_(e);return n!=Xh?(this.elements_.push(e),this.priorities_.push(n),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const n=this.elements_,i=this.priorities_,s=n.length,r=n[e],o=i[e],a=e;for(;e>1;){const l=this.getLeftChildIndex_(e),c=this.getRightChildIndex_(e),u=ce;){const a=this.getParentIndex_(n);if(s[a]>o)i[n]=i[a],s[n]=s[a],n=a;else break}i[n]=r,s[n]=o}reprioritize(){const e=this.priorityFunction_,n=this.elements_,i=this.priorities_;let s=0;const r=n.length;let o,a,l;for(a=0;a0;){const s=this.dequeue()[0],r=s.getKey();s.getState()===Ve.IDLE&&!(r in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++i,s.load())}}}function Nse(t,e,n,i,s){if(!t||!(n in t.wantedTiles)||!t.wantedTiles[n][e.getKey()])return Xh;const r=t.viewState.center,o=i[0]-r[0],a=i[1]-r[1];return 65536*Math.log(s)+Math.sqrt(o*o+a*a)/s}class Kv extends Ws{constructor(e){super();const n=e.element;n&&!e.target&&!n.style.pointerEvents&&(n.style.pointerEvents="auto"),this.element=n||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(e){this.map_&&this.element?.remove();for(let n=0,i=this.listenerKeys.length;ns.getAttributions(e)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(s=>i.add(s)):i.add(this.attributions_)),!this.overrideCollapsible_){const s=!n.some(r=>r.getSource()?.getAttributionsCollapsible()===!1);this.setCollapsible(s)}return Array.from(i)}async updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const n=await Promise.all(this.collectSourceAttributions_(e).map(s=>ane(()=>s))),i=n.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!So(n,this.renderedAttributions_)){Mie(this.ulElement_);for(let s=0,r=n.length;s0&&i%(2*Math.PI)!==0?n.animate({rotation:0,duration:this.duration_,easing:ql}):n.setRotation(0))}render(e){const n=e.frameState;if(!n)return;const i=n.viewState.rotation;if(i!=this.rotation_){const s="rotate("+i+"rad)";if(this.autoHide_){const r=this.element.classList.contains(Zd);!r&&i===0?this.element.classList.add(Zd):r&&i!==0&&this.element.classList.remove(Zd)}this.label_.style.transform=s}this.rotation_=i}}class Vse extends Kv{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const n=e.className!==void 0?e.className:"ol-zoom",i=e.delta!==void 0?e.delta:1,s=e.zoomInClassName!==void 0?e.zoomInClassName:n+"-in",r=e.zoomOutClassName!==void 0?e.zoomOutClassName:n+"-out",o=e.zoomInLabel!==void 0?e.zoomInLabel:"+",a=e.zoomOutLabel!==void 0?e.zoomOutLabel:"–",l=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",c=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=s,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof o=="string"?document.createTextNode(o):o),u.addEventListener(tt.CLICK,this.handleClick_.bind(this,i),!1);const d=document.createElement("button");d.className=r,d.setAttribute("type","button"),d.title=c,d.appendChild(typeof a=="string"?document.createTextNode(a):a),d.addEventListener(tt.CLICK,this.handleClick_.bind(this,-i),!1);const f=n+" "+Jf+" "+zv,g=this.element;g.className=f,g.appendChild(u),g.appendChild(d),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,n){n.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const i=this.getMap().getView();if(!i)return;const s=i.getZoom();if(s!==void 0){const r=i.getConstrainedZoom(s+e);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:r,duration:this.duration_,easing:ql})):i.setZoom(r)}}}function Wse(t){t=t||{};const e=new Ms;return(t.zoom!==void 0?t.zoom:!0)&&e.push(new Vse(t.zoomOptions)),(t.rotate!==void 0?t.rotate:!0)&&e.push(new Bse(t.rotateOptions)),(t.attribution!==void 0?t.attribution:!0)&&e.push(new Fse(t.attributionOptions)),e}const zw={ACTIVE:"active"};class td extends Ws{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(zw.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(zw.ACTIVE,e)}setMap(e){this.map_=e}}function zse(t,e,n){const i=t.getCenterInternal();if(i){const s=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:n!==void 0?n:250,easing:zne,center:t.getConstrainedCenter(s)})}}function Uv(t,e,n,i){const s=t.getZoom();if(s===void 0)return;const r=t.getConstrainedZoom(s+e),o=t.getResolutionForZoom(r);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:n,duration:i!==void 0?i:250,easing:ql})}class Yse extends td{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let n=!1;if(e.type==en.DBLCLICK){const i=e.originalEvent,s=e.map,r=e.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();Uv(a,o,r,this.duration_),i.preventDefault(),n=!0}return!n}}class nd extends td{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let n=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==en.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==en.POINTERUP){const i=this.handleUpEvent(e);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(e.type==en.POINTERDOWN){const i=this.handleDownEvent(e);this.handlingDownUpSequence=i,n=this.stopDown(i)}else e.type==en.POINTERMOVE&&this.handleMoveEvent(e);return!n}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}}function Gv(t){const e=t.length;let n=0,i=0;for(let s=0;s0&&this.condition_(e)){const i=e.map.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class Zse extends nd{constructor(e){e=e||{},super({stopDown:Wf}),this.condition_=e.condition?e.condition:Hse,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!Cp(e))return;const n=e.map,i=n.getView();if(i.getConstraints().rotation===Pv)return;const s=n.getSize(),r=e.pixel,o=Math.atan2(s[1]/2-r[1],r[0]-s[0]/2);if(this.lastAngle_!==void 0){const a=o-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=o}handleUpEvent(e){return Cp(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return Cp(e)&&ZT(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class Jse extends Bf{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,n=this.endPixel_,i="px",s=this.element_.style;s.left=Math.min(e[0],n[0])+i,s.top=Math.min(e[1],n[1])+i,s.width=Math.abs(n[0]-e[0])+i,s.height=Math.abs(n[1]-e[1])+i}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const n=this.element_.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,n){this.startPixel_=e,this.endPixel_=n,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const e=this.startPixel_,n=this.endPixel_,s=[e,[e[0],n[1]],n,[n[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);s[4]=s[0].slice(),this.geometry_?this.geometry_.setCoordinates([s]):this.geometry_=new Cu([s])}getGeometry(){return this.geometry_}}const za={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class bc extends Er{constructor(e,n,i){super(e),this.coordinate=n,this.mapBrowserEvent=i}}class Qse extends nd{constructor(e){super(),this.on,this.once,this.un,e=e??{},this.box_=new Jse(e.className||"ol-dragbox"),this.minArea_=e.minArea??64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition??ZT,this.boxEndCondition_=e.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(e,n,i){const s=i[0]-n[0],r=i[1]-n[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.startPixel_&&(this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new bc(za.BOXDRAG,e.coordinate,e)))}handleUpEvent(e){if(!this.startPixel_)return!1;const n=this.boxEndCondition_(e,this.startPixel_,e.pixel);return n&&this.onBoxEnd(e),this.dispatchEvent(new bc(n?za.BOXEND:za.BOXCANCEL,e.coordinate,e)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new bc(za.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}setActive(e){e||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new bc(za.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(e)}setMap(e){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new bc(za.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(e)}}class ere extends Qse{constructor(e){e=e||{};const n=e.condition?e.condition:Gse;super({condition:n,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){const i=this.getMap().getView();let s=this.getGeometry();if(this.out_){const r=i.rotatedExtentForGeometry(s),o=i.getResolutionForExtentInternal(r),a=i.getResolution()/o;s=s.clone(),s.scale(a*a)}i.fitInternal(s,{duration:this.duration_,easing:ql})}}const Wo={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class tre extends td{constructor(e){super(),e=e||{},this.defaultCondition_=function(n){return JT(n)&&QT(n)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let n=!1;if(e.type==tt.KEYDOWN){const i=e.originalEvent,s=i.key;if(this.condition_(e)&&(s==Wo.DOWN||s==Wo.LEFT||s==Wo.RIGHT||s==Wo.UP)){const o=e.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,c=0;s==Wo.DOWN?c=-a:s==Wo.LEFT?l=-a:s==Wo.RIGHT?l=a:c=a;const u=[l,c];Ev(u,o.getRotation()),zse(o,u,this.duration_),i.preventDefault(),n=!0}}return!n}}class nre extends td{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(n){return!Use(n)&&QT(n)},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let n=!1;if(e.type==tt.KEYDOWN||e.type==tt.KEYPRESS){const i=e.originalEvent,s=i.key;if(this.condition_(e)&&(s==="+"||s==="-")){const r=e.map,o=s==="+"?this.delta_:-this.delta_,a=r.getView();Uv(a,o,void 0,this.duration_),i.preventDefault(),n=!0}}return!n}}class ire{constructor(e,n,i){this.decay_=e,this.minVelocity_=n,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,n){this.points_.push(e,n,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,n=this.points_.length-3;if(this.points_[n+2]0&&this.points_[i+2]>e;)i-=3;const s=this.points_[n+2]-this.points_[i+2];if(s<1e3/60)return!1;const r=this.points_[n]-this.points_[i],o=this.points_[n+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/s,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class sre extends td{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;const n=e.condition?e.condition:Kse;this.condition_=e.onFocusOnly?Fm(qT,n):n,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const e=this.getMap();if(!e)return;e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(e){if(!this.condition_(e)||e.type!==tt.WHEEL)return!0;const i=e.map,s=e.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.pixel);let r;if(e.type==tt.WHEEL&&(r=s.deltaY,Tie&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=RT),s.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const o=Date.now();this.startTime_===void 0&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const a=i.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_?i.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=o,!1;this.totalDelta_+=r;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),l),!1}handleWheelZoom_(e){const n=e.getView();n.getAnimating()&&n.cancelAnimations();let i=-rn(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Uv(n,i,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}class rre extends nd{constructor(e){e=e||{};const n=e;n.stopDown||(n.stopDown=Wf),super(n),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let n=0;const i=this.targetPointers[0],s=this.targetPointers[1],r=Math.atan2(s.clientY-i.clientY,s.clientX-i.clientX);if(this.lastAngle_!==void 0){const l=r-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),n=l}this.lastAngle_=r;const o=e.map,a=o.getView();a.getConstraints().rotation!==Pv&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Gv(this.targetPointers))),this.rotating_&&(o.render(),a.adjustRotationInternal(n,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){const n=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1}}class ore extends nd{constructor(e){e=e||{};const n=e;n.stopDown||(n.stopDown=Wf),super(n),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let n=1;const i=this.targetPointers[0],s=this.targetPointers[1],r=i.clientX-s.clientX,o=i.clientY-s.clientY,a=Math.sqrt(r*r+o*o);this.lastDistance_!==void 0&&(n=this.lastDistance_/a),this.lastDistance_=a;const l=e.map,c=l.getView();n!=1&&(this.lastScaleDelta_=n),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(Gv(this.targetPointers))),l.render(),c.adjustResolutionInternal(n,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const i=e.map.getView(),s=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,s),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const n=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1}}function are(t){t=t||{};const e=new Ms,n=new ire(-.005,.05,100);return(t.altShiftDragRotate!==void 0?t.altShiftDragRotate:!0)&&e.push(new Zse),(t.doubleClickZoom!==void 0?t.doubleClickZoom:!0)&&e.push(new Yse({delta:t.zoomDelta,duration:t.zoomDuration})),(t.dragPan!==void 0?t.dragPan:!0)&&e.push(new qse({onFocusOnly:t.onFocusOnly,kinetic:n})),(t.pinchRotate!==void 0?t.pinchRotate:!0)&&e.push(new rre),(t.pinchZoom!==void 0?t.pinchZoom:!0)&&e.push(new ore({duration:t.zoomDuration})),(t.keyboard!==void 0?t.keyboard:!0)&&(e.push(new tre),e.push(new nre({delta:t.zoomDelta,duration:t.zoomDuration}))),(t.mouseWheelZoom!==void 0?t.mouseWheelZoom:!0)&&e.push(new sre({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(t.shiftDragZoom!==void 0?t.shiftDragZoom:!0)&&e.push(new ere({duration:t.zoomDuration})),e}function eA(t){if(t instanceof qf){t.setMapInternal(null);return}t instanceof Jl&&t.getLayers().forEach(eA)}function tA(t,e){if(t instanceof qf){t.setMapInternal(e);return}if(t instanceof Jl){const n=t.getLayers().getArray();for(let i=0,s=n.length;ithis.updateSize()),this.controls=n.controls||Wse(),this.interactions=n.interactions||are({onFocusOnly:!0}),this.overlays_=n.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Ose(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(zn.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(zn.VIEW,this.handleViewChanged_),this.addChangeListener(zn.SIZE,this.handleSizeChanged_),this.addChangeListener(zn.TARGET,this.handleTargetChanged_),this.setProperties(n.values);const i=this;e.view&&!(e.view instanceof ks)&&e.view.then(function(s){i.setView(new ks(s))}),this.controls.addEventListener(gi.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(gi.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(gi.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(gi.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(gi.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(gi.REMOVE,s=>{const r=s.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],s.element.setMap(null)}),this.controls.forEach(s=>{s.setMap(this)}),this.interactions.forEach(s=>{s.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){tA(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const n=e.getId();n!==void 0&&(this.overlayIdIndex_[n.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,n,i){if(!this.frameState_||!this.renderer_)return;const s=this.getCoordinateFromPixelInternal(e);i=i!==void 0?i:{};const r=i.hitTolerance!==void 0?i.hitTolerance:0,o=i.layerFilter!==void 0?i.layerFilter:yu,a=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,a,n,null,o,null)}getFeaturesAtPixel(e,n){const i=[];return this.forEachFeatureAtPixel(e,function(s){i.push(s)},n),i}getAllLayers(){const e=[];function n(i){i.forEach(function(s){s instanceof Jl?n(s.getLayers()):e.push(s)})}return n(this.getLayers()),e}hasFeatureAtPixel(e,n){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(e);n=n!==void 0?n:{};const s=n.layerFilter!==void 0?n.layerFilter:yu,r=n.hitTolerance!==void 0?n.hitTolerance:0,o=n.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,o,s,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const i=this.viewport_.getBoundingClientRect(),s=this.getSize(),r=i.width/s[0],o=i.height/s[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-i.left)/r,(a.clientY-i.top)/o]}getTarget(){return this.get(zn.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return Dm(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const n=this.frameState_;return n?On(n.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const n=this.overlayIdIndex_[e.toString()];return n!==void 0?n:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(zn.LAYERGROUP)}setLayers(e){const n=this.getLayerGroup();if(e instanceof Ms){n.setLayers(e);return}const i=n.getLayers();i.clear(),i.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let n=0,i=e.length;n=0;r--){const o=s[r];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){const e=this.frameState_,n=this.tileQueue_;if(!n.isEmpty()){let s=this.maxTilesLoading_,r=s;if(e){const o=e.viewHints;if(o[Hn.ANIMATING]||o[Hn.INTERACTING]){const a=Date.now()-e.time>8;s=a?0:8,r=a?0:2}}n.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){const n=this.getLayerGroup();n&&this.handleLayerRemove_(new Hr("removelayer",n)),this.set(zn.LAYERGROUP,e)}setSize(e){this.set(zn.SIZE,e)}setTarget(e){this.set(zn.TARGET,e)}setView(e){if(!e||e instanceof ks){this.set(zn.VIEW,e);return}this.set(zn.VIEW,new ks);const n=this;e.then(function(i){n.setView(new ks(i))})}updateSize(){const e=this.getTargetElement();let n;if(e){const s=getComputedStyle(e),r=e.offsetWidth-parseFloat(s.borderLeftWidth)-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderRightWidth),o=e.offsetHeight-parseFloat(s.borderTopWidth)-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderBottomWidth);!isNaN(r)&&!isNaN(o)&&(n=[Math.max(0,r),Math.max(0,o)],!Cw(n)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&pT("No map visible because the map container's width or height are 0."))}const i=this.getSize();n&&(!i||!So(n,i))&&(this.setSize(n),this.updateViewportSize_(n))}updateViewportSize_(e){const n=this.getView();n&&n.setViewportSize(e)}};function cre(t){let e=null;t.keyboardEventTarget!==void 0&&(e=typeof t.keyboardEventTarget=="string"?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const n={},i=t.layers&&typeof t.layers.getLayers=="function"?t.layers:new Jl({layers:t.layers});n[zn.LAYERGROUP]=i,n[zn.TARGET]=t.target,n[zn.VIEW]=t.view instanceof ks?t.view:new ks;let s;t.controls!==void 0&&(Array.isArray(t.controls)?s=new Ms(t.controls.slice()):(mt(typeof t.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),s=t.controls));let r;t.interactions!==void 0&&(Array.isArray(t.interactions)?r=new Ms(t.interactions.slice()):(mt(typeof t.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),r=t.interactions));let o;return t.overlays!==void 0?Array.isArray(t.overlays)?o=new Ms(t.overlays.slice()):(mt(typeof t.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=t.overlays):o=new Ms,{controls:s,interactions:r,keyboardEventTarget:e,overlays:o,values:n}}class Xv extends zf{constructor(e,n,i){super(),i=i||{},this.tileCoord=e,this.state=n,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(tt.CHANGE)}release(){this.state===Ve.ERROR&&this.setState(Ve.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==Ve.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}load(){pt()}getAlpha(e,n){if(!this.transition_)return 1;let i=this.transitionStarts_[e];if(!i)i=n,this.transitionStarts_[e]=i;else if(i===-1)return 1;const s=n-i+1e3/60;return s>=this.transition_?1:bT(s/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}class nA extends Xv{constructor(e,n,i,s,r,o){super(e,n,o),this.crossOrigin_=s,this.src_=i,this.key=i,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(e){this.image_=e,this.state=Ve.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=Ve.ERROR,this.unlistenImage_(),this.image_=ure(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=Ve.LOADED:this.state=Ve.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==Ve.ERROR&&(this.state=Ve.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Ve.IDLE&&(this.state=Ve.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Die(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}function ure(){const t=hn(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}const iA=.5,dre=10,Yw=.25;class sA{constructor(e,n,i,s,r,o){this.sourceProj_=e,this.targetProj_=n;let a={};const l=zh(this.targetProj_,this.sourceProj_);this.transformInv_=function(x){const E=x[0]+"/"+x[1];return a[E]||(a[E]=l(x)),a[E]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&bt(s)>=bt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?bt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?bt(this.targetProj_.getExtent()):null;const c=xa(i),u=Kf(i),d=jf(i),f=Hf(i),g=this.transformInv_(c),p=this.transformInv_(u),m=this.transformInv_(d),v=this.transformInv_(f),y=dre+(o?Math.max(0,Math.ceil(Math.log2(wu(i)/(o*o*256*256)))):0);if(this.addQuad_(c,u,d,f,g,p,m,v,y),this.wrapsXInSource_){let x=1/0;this.triangles_.forEach(function(E,w,b){x=Math.min(x,E.source[0][0],E.source[1][0],E.source[2][0])}),this.triangles_.forEach(E=>{if(Math.max(E.source[0][0],E.source[1][0],E.source[2][0])-x>this.sourceWorldWidth_/2){const w=[[E.source[0][0],E.source[0][1]],[E.source[1][0],E.source[1][1]],[E.source[2][0],E.source[2][1]]];w[0][0]-x>this.sourceWorldWidth_/2&&(w[0][0]-=this.sourceWorldWidth_),w[1][0]-x>this.sourceWorldWidth_/2&&(w[1][0]-=this.sourceWorldWidth_),w[2][0]-x>this.sourceWorldWidth_/2&&(w[2][0]-=this.sourceWorldWidth_);const b=Math.min(w[0][0],w[1][0],w[2][0]);Math.max(w[0][0],w[1][0],w[2][0])-b.5&&d<1;let p=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const v=cw([e,n,i,s]);p=bt(v)/this.targetWorldWidth_>Yw||p}!g&&this.sourceProj_.isGlobal()&&d&&(p=d>Yw||p)}if(!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!vi(u,this.maxSourceExtent_))return;let m=0;if(!p&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(c>0)p=!0;else if(m=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(c>0){if(!p){const v=[(e[0]+i[0])/2,(e[1]+i[1])/2],y=this.transformInv_(v);let x;g?x=(hl(r[0],f)+hl(a[0],f))/2-hl(y[0],f):x=(r[0]+a[0])/2-y[0];const E=(r[1]+a[1])/2-y[1];p=x*x+E*E>this.errorThresholdSquared_}if(p){if(Math.abs(e[0]-i[0])<=Math.abs(e[1]-i[1])){const v=[(n[0]+i[0])/2,(n[1]+i[1])/2],y=this.transformInv_(v),x=[(s[0]+e[0])/2,(s[1]+e[1])/2],E=this.transformInv_(x);this.addQuad_(e,n,v,x,r,o,y,E,c-1),this.addQuad_(x,v,i,s,E,y,a,l,c-1)}else{const v=[(e[0]+n[0])/2,(e[1]+n[1])/2],y=this.transformInv_(v),x=[(i[0]+s[0])/2,(i[1]+s[1])/2],E=this.transformInv_(x);this.addQuad_(e,v,x,s,r,y,E,l,c-1),this.addQuad_(v,n,i,x,y,o,a,E,c-1)}return}}if(g){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}m&11||this.addTriangle_(e,i,s,r,a,l),m&14||this.addTriangle_(e,i,n,r,a,o),m&&(m&13||this.addTriangle_(n,s,e,o,l,r),m&7||this.addTriangle_(n,s,i,o,l,a))}calculateSourceExtent(){const e=Gi();return this.triangles_.forEach(function(n,i,s){const r=n.source;Zc(e,r[0]),Zc(e,r[1]),Zc(e,r[2])}),e}getTriangles(){return this.triangles_}}let Sp;const mr=[];function Hw(t,e,n,i,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(i,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(n,s)),t.restore()}function kp(t,e){return Math.abs(t[e*4]-210)>2||Math.abs(t[e*4+3]-.75*255)>2}function hre(){if(Sp===void 0){const t=hn(6,6,mr);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Hw(t,4,5,4,0),Hw(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;Sp=kp(e,0)||kp(e,4)||kp(e,8),zl(t),mr.push(t.canvas)}return Sp}function jw(t,e,n,i){const s=vT(n,e,t);let r=dw(e,i,n);const o=e.getMetersPerUnit();o!==void 0&&(r*=o);const a=t.getMetersPerUnit();a!==void 0&&(r/=a);const l=t.getExtent();if(!l||Wl(l,s)){const c=dw(t,r,s)/r;isFinite(c)&&c>0&&(r/=c)}return r}function rA(t,e,n,i){const s=pa(n);let r=jw(t,e,s,i);return(!isFinite(r)||r<=0)&&hT(n,function(o){return r=jw(t,e,o,i),isFinite(r)&&r>0}),r}function oA(t,e,n,i,s,r,o,a,l,c,u,d,f,g){const p=hn(Math.round(n*t),Math.round(n*e),mr);if(d||(p.imageSmoothingEnabled=!1),l.length===0)return p.canvas;p.scale(n,n);function m(b){return Math.round(b*n)/n}p.globalCompositeOperation="lighter";const v=Gi();l.forEach(function(b,C,k){xne(v,b.extent)});let y;const x=n/i,E=(d?1:1+Math.pow(2,-24))/x;if(!f||l.length!==1||c!==0){if(y=hn(Math.round(bt(v)*x),Math.round(Un(v)*x),mr),d||(y.imageSmoothingEnabled=!1),s&&g){const b=(s[0]-v[0])*x,C=-(s[3]-v[3])*x,k=bt(s)*x,T=Un(s)*x;y.rect(b,C,k,T),y.clip()}l.forEach(function(b,C,k){if(b.image.width>0&&b.image.height>0){if(b.clipExtent){y.save();const Y=(b.clipExtent[0]-v[0])*x,ne=-(b.clipExtent[3]-v[3])*x,N=bt(b.clipExtent)*x,B=Un(b.clipExtent)*x;y.rect(d?Y:Math.round(Y),d?ne:Math.round(ne),d?N:Math.round(Y+N)-Math.round(Y),d?B:Math.round(ne+B)-Math.round(ne)),y.clip()}const T=(b.extent[0]-v[0])*x,A=-(b.extent[3]-v[3])*x,I=bt(b.extent)*x,V=Un(b.extent)*x;y.drawImage(b.image,c,c,b.image.width-2*c,b.image.height-2*c,d?T:Math.round(T),d?A:Math.round(A),d?I:Math.round(T+I)-Math.round(T),d?V:Math.round(A+V)-Math.round(A)),b.clipExtent&&y.restore()}})}const w=xa(o);return a.getTriangles().forEach(function(b,C,k){const T=b.source,A=b.target;let I=T[0][0],V=T[0][1],Y=T[1][0],ne=T[1][1],N=T[2][0],B=T[2][1];const R=m((A[0][0]-w[0])/r),W=m(-(A[0][1]-w[1])/r),X=m((A[1][0]-w[0])/r),J=m(-(A[1][1]-w[1])/r),H=m((A[2][0]-w[0])/r),ce=m(-(A[2][1]-w[1])/r),ie=I,te=V;I=0,V=0,Y-=ie,ne-=te,N-=ie,B-=te;const D=[[Y,ne,0,0,X-R],[N,B,0,0,H-R],[0,0,Y,ne,J-W],[0,0,N,B,ce-W]],ee=dne(D);if(!ee)return;if(p.save(),p.beginPath(),hre()||!d){p.moveTo(X,J);const L=4,le=R-X,de=W-J;for(let xe=0;xe{const I=n.getTileRangeForExtentAndZ(A,this.sourceZ_);for(let V=I.minX;V<=I.maxX;V++)for(let Y=I.minY;Y<=I.maxY;Y++){const ne=c(this.sourceZ_,V,Y,a);if(ne){const N=k*C;this.sourceTiles_.push({tile:ne,offset:N})}}++k}),this.sourceTiles_.length===0&&(this.state=Ve.EMPTY)}}getImage(){return this.canvas_}reproject_(){const e=[];if(this.sourceTiles_.forEach(n=>{const i=n.tile;if(i&&i.getState()==Ve.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);s[0]+=n.offset,s[2]+=n.offset;const r=this.clipExtent_?.slice();r&&(r[0]+=n.offset,r[2]+=n.offset),e.push({extent:s,clipExtent:r,image:i.getImage()})}}),this.sourceTiles_.length=0,e.length===0)this.state=Ve.ERROR;else{const n=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(n),s=typeof i=="number"?i:i[0],r=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(n),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=oA(s,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=Ve.LOADED}this.changed()}load(){if(this.state==Ve.IDLE){this.state=Ve.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:n})=>{const i=n.getState();if(i==Ve.IDLE||i==Ve.LOADING){e++;const s=ft(n,tt.CHANGE,r=>{const o=n.getState();(o==Ve.LOADED||o==Ve.ERROR||o==Ve.EMPTY)&&(Lt(s),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:n},i,s){n.getState()==Ve.IDLE&&n.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Lt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(zl(this.canvas_.getContext("2d")),mr.push(this.canvas_),this.canvas_=null),super.release()}}const Tp={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class aA extends Ws{constructor(e){super(),this.projection=Xi(e.projection),this.attributions_=Kw(e.attributions),this.attributionsCollapsible_=e.attributionsCollapsible??!0,this.loading=!1,this.state_=e.state!==void 0?e.state:"ready",this.wrapX_=e.wrapX!==void 0?e.wrapX:!1,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const n=this;this.viewPromise_=new Promise(function(i,s){n.viewResolver=i,n.viewRejector=s})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=Kw(e),this.changed()}setState(e){this.state_=e,this.changed()}}function Kw(t){return t?typeof t=="function"?t:(Array.isArray(t)||(t=[t]),e=>t):null}class qv{constructor(e,n,i,s){this.minX=e,this.maxX=n,this.minY=i,this.maxY=s}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,n){return this.minX<=e&&e<=this.maxX&&this.minY<=n&&n<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minXthis.maxX&&(this.maxX=e.maxX),e.minYthis.maxY&&(this.maxY=e.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function Ya(t,e,n,i,s){return s!==void 0?(s.minX=t,s.maxX=e,s.minY=n,s.maxY=i,s):new qv(t,e,n,i)}function qh(t,e,n,i){return i!==void 0?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function fre(t,e,n){return t+"/"+e+"/"+n}function gre(t){return pre(t[0],t[1],t[2])}function pre(t,e,n){return(e<n||n>e.getMaxZoom())return!1;const r=e.getFullTileRange(n);return r?r.containsXY(i,s):!0}const Ha=[0,0,0],Dr=5;class lA{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,mt(one(this.resolutions_,(s,r)=>r-s),"`resolutions` must be sorted in descending order");let n;if(!e.origins){for(let s=0,r=this.resolutions_.length-1;s{const o=new qv(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(i){const a=this.getTileRangeForExtentAndZ(i,r);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o}):i&&this.calculateTileRanges_(i)}forEachTileCoord(e,n,i){const s=this.getTileRangeForExtentAndZ(e,n);for(let r=s.minX,o=s.maxX;r<=o;++r)for(let a=s.minY,l=s.maxY;a<=l;++a)i([n,r,a])}forEachTileCoordParentTileRange(e,n,i,s){let r,o,a,l=null,c=e[0]-1;for(this.zoomFactor_===2?(o=e[1],a=e[2]):l=this.getTileCoordExtent(e,s);c>=this.minZoom;){if(o!==void 0&&a!==void 0?(o=Math.floor(o/2),a=Math.floor(a/2),r=Ya(o,o,a,a,i)):r=this.getTileRangeForExtentAndZ(l,c,i),n(c,r))return!0;--c}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,n,i){if(e[0]this.maxZoom||n0?i:Math.max(r/n[0],s/n[1]);const o=e+1,a=new Array(o);for(let l=0;lthis.getTileInternal(g,p,m,v,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return f.key=l,f}getTileInternal(e,n,i,s,r){const o=this.getKey();return this.createTile_(e,n,i,s,r,o)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,n){const i=Xi(e);if(i){const s=Et(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=n)}}}function Rre(t,e){t.getImage().src=e}class $re extends Dre{constructor(e){e=e||{};const n=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:yre({extent:Zv(n),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:n,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0}getGutter(){return this.gutter_}}const Lre='© OpenStreetMap contributors.';class Ore extends $re{constructor(e){e=e||{};let n;e.attributions!==void 0?n=e.attributions:n=[Lre];const i=e.crossOrigin!==void 0?e.crossOrigin:"anonymous",s=e.url!==void 0?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:n,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:i,interpolate:e.interpolate,maxZoom:e.maxZoom!==void 0?e.maxZoom:19,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:s,wrapX:e.wrapX,zDirection:e.zDirection})}}const Qd={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Nre extends qf{constructor(e){e=e||{};const n=Object.assign({},e),i=e.cacheSize;delete e.cacheSize,delete n.preload,delete n.useInterimTilesOnError,super(n),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Qd.PRELOAD)}setPreload(e){this.set(Qd.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(Qd.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(Qd.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}const Fre=5;class Bre extends Zu{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.staleKeys_=new Array,this.maxStaleKeys=Fre}getStaleKeys(){return this.staleKeys_}prependStaleKey(e){this.staleKeys_.unshift(e),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(e){return pt()}getData(e){return null}prepareFrame(e){return pt()}renderFrame(e,n){return pt()}forEachFeatureAtCoordinate(e,n,i,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){const n=e.target;(n.getState()===ot.LOADED||n.getState()===ot.ERROR)&&this.renderIfReadyAndVisible()}loadImage(e){let n=e.getState();return n!=ot.LOADED&&n!=ot.ERROR&&e.addEventListener(tt.CHANGE,this.boundHandleImageChange_),n==ot.IDLE&&(e.load(),n=e.getState()),n==ot.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}renderDeferred(e){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class dA{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Hh(),{get:(e,n)=>{if(typeof Hh()[n]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(n),this.pushMethodArgs_},set:(e,n,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(n,i),!0)})}pushMethodArgs_=(...e)=>(this.instructions_[this.zIndex+this.offset_].push(e),this);pushFunction(e){this.instructions_[this.zIndex+this.offset_].push(e)}getContext(){return this.context_}draw(e){this.instructions_.forEach(n=>{for(let i=0,s=n.length;i0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();){const n=this.pop();n instanceof Bf&&n.dispose()}}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let n=this.oldest_;for(;n;)e(n.value_,n.key_,this),n=n.newer}get(e,n){const i=this.entries_[e];return mt(i!==void 0,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(e){const n=this.entries_[e];return mt(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_?(this.newest_=n.older,this.newest_&&(this.newest_.newer=null)):n===this.oldest_?(this.oldest_=n.newer,this.oldest_&&(this.oldest_.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.entries_[e],--this.count_,n.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let n=0,i;for(i=this.newest_;i;i=i.older)e[n++]=i.key_;return e}getValues(){const e=new Array(this.count_);let n=0,i;for(i=this.newest_;i;i=i.older)e[n++]=i.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){return this.entries_[e]?.value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,n){this.get(e),this.entries_[e].value_=n}set(e,n){mt(!(e in this.entries_),"Tried to set a value for a key that is used already");const i={key_:e,newer:null,older:this.newest_,value_:n};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_}setSize(e){this.highWaterMark=e}}class Kre extends Vm{constructor(e){super({tileCoord:e.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:e.interpolate,transition:e.transition}),this.pixelRatio_=e.pixelRatio,this.gutter_=e.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=e.sourceTileGrid,this.targetTileGrid_=e.targetTileGrid,this.wrappedTileCoord_=e.wrappedTileCoord||e.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const n=e.sourceProj,i=n.getExtent(),s=e.sourceTileGrid.getExtent();this.clipExtent_=n.canWrapX()?s?cs(i,s):i:s;const r=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),o=this.targetTileGrid_.getExtent();let a=this.sourceTileGrid_.getExtent();const l=o?cs(r,o):r;if(wu(l)===0){this.state=Ve.EMPTY;return}i&&(a?a=cs(a,i):a=i);const c=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),u=e.targetProj,d=rA(n,u,l,c);if(!isFinite(d)||d<=0){this.state=Ve.EMPTY;return}const f=e.errorThreshold!==void 0?e.errorThreshold:iA;if(this.triangulation_=new sA(n,u,l,a,d*f,c),this.triangulation_.getTriangles().length===0){this.state=Ve.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(d);let g=this.triangulation_.calculateSourceExtent();if(a&&(n.canWrapX()?(g[1]=rn(g[1],a[1],a[3]),g[3]=rn(g[3],a[1],a[3])):g=cs(g,a)),!wu(g))this.state=Ve.EMPTY;else{let p=0,m=0;n.canWrapX()&&(p=bt(i),m=Math.floor((g[0]-i[0])/p)),xv(g.slice(),n,!0).forEach(y=>{const x=this.sourceTileGrid_.getTileRangeForExtentAndZ(y,this.sourceZ_),E=e.getTileFunction;for(let w=x.minX;w<=x.maxX;w++)for(let b=x.minY;b<=x.maxY;b++){const C=E(this.sourceZ_,w,b,this.pixelRatio_);if(C){const k=m*p;this.sourceTiles_.push({tile:C,offset:k})}}++m}),this.sourceTiles_.length===0&&(this.state=Ve.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const e=[];let n=!1;if(this.sourceTiles_.forEach(p=>{const m=p.tile;if(!m||m.getState()!==Ve.LOADED)return;const v=m.getSize(),y=this.gutter_;let x;const E=Wre(m.getData());E?x=E:(n=!0,x=Yre(Zh(m.getData())));const w=[v[0]+2*y,v[1]+2*y],b=x instanceof Float32Array,C=w[0]*w[1],k=b?Float32Array:Uint8ClampedArray,T=new k(x.buffer),A=k.BYTES_PER_ELEMENT,I=A*T.length/C,V=T.byteLength/w[1],Y=Math.floor(V/A/w[0]),ne=C*Y;let N=T;if(T.length!==ne){N=new k(ne);let W=0,X=0;const J=w[0]*Y;for(let H=0;H=0;--p){const m=[];for(let b=0,C=e.length;b{const i=n.getState();if(i!==Ve.IDLE&&i!==Ve.LOADING)return;e++;const s=ft(n,tt.CHANGE,()=>{const r=n.getState();(r==Ve.LOADED||r==Ve.ERROR||r==Ve.EMPTY)&&(Lt(s),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:n}){n.getState()==Ve.IDLE&&n.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(Lt),this.sourcesListenerKeys_=null}}function Ap(t,e,n,i){return`${t},${fre(e,n,i)}`}function Pp(t,e,n){if(!(n in t))return t[n]=new Set([e]),!0;const i=t[n],s=i.has(e);return s||i.add(e),!s}function Ure(t,e,n){const i=t[n];return i?i.delete(e):!1}function Gw(t,e){const n=t.layerStatesArray[t.layerIndex];n.extent&&(e=cs(e,Zr(n.extent,t.viewState.projection)));const i=n.layer.getRenderSource();if(!i.getWrapX()){const s=i.getTileGridForProjection(t.viewState.projection).getExtent();s&&(e=cs(e,s))}return e}class Gre extends hA{constructor(e,n){super(e),n=n||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=Gi(),this.tempTileRange_=new qv(0,0,0,0),this.tempTileCoord_=qh(0,0,0);const i=n.cacheSize!==void 0?n.cacheSize:512;this.tileCache_=new jre(i),this.renderedProjection_=void 0,this.maxStaleKeys=i*.5}getTileCache(){return this.tileCache_}getOrCreateTile(e,n,i,s){const r=this.tileCache_,a=this.getLayer().getSource(),l=Ap(a.getKey(),e,n,i);let c;if(r.containsKey(l))c=r.get(l);else{if(c=a.getTile(e,n,i,s.pixelRatio,s.viewState.projection),!c)return null;r.set(l,c)}return c}getTile(e,n,i,s){const r=this.getOrCreateTile(e,n,i,s);return r||null}getData(e){const n=this.frameState;if(!n)return null;const i=this.getLayer(),s=On(n.pixelToCoordinateTransform,e.slice()),r=i.getExtent();if(r&&!Wl(r,s))return null;const o=n.viewState,a=i.getRenderSource(),l=a.getTileGridForProjection(o.projection),c=a.getTilePixelRatio(n.pixelRatio);for(let u=l.getZForResolution(o.resolution);u>=l.getMinZoom();--u){const d=l.getTileCoordForCoordAndZ(s,u),f=this.getTile(u,d[1],d[2],n);if(!f||f.getState()!==Ve.LOADED)continue;const g=l.getOrigin(u),p=wi(l.getTileSize(u)),m=l.getResolution(u);let v;if(f instanceof nA||f instanceof Bm)v=f.getImage();else if(f instanceof Vm){if(v=Zh(f.getData()),!v)continue}else continue;const y=Math.floor(c*((s[0]-g[0])/m-d[1]*p[0])),x=Math.floor(c*((g[1]-s[1])/m-d[2]*p[1])),E=Math.round(c*a.getGutterForProjection(o.projection));return this.getImageData(v,y+E,x+E)}return null}prepareFrame(e){this.renderedProjection_?e.viewState.projection!==this.renderedProjection_&&(this.tileCache_.clear(),this.renderedProjection_=e.viewState.projection):this.renderedProjection_=e.viewState.projection;const n=this.getLayer().getSource();if(!n)return!1;const i=n.getRevision();return this.renderedRevision_?this.renderedRevision_!==i&&(this.renderedRevision_=i,this.renderedSourceKey_===n.getKey()&&this.tileCache_.clear()):this.renderedRevision_=i,!0}enqueueTiles(e,n,i,s,r){const o=e.viewState,a=this.getLayer(),l=a.getRenderSource(),c=l.getTileGridForProjection(o.projection),u=Et(l);u in e.wantedTiles||(e.wantedTiles[u]={});const d=e.wantedTiles[u],f=a.getMapInternal(),g=Math.max(i-r,c.getMinZoom(),c.getZForResolution(Math.min(a.getMaxResolution(),f?f.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):c.getResolution(0)),l.zDirection));for(let p=i;p>=g;--p){const m=c.getTileRangeForExtentAndZ(n,p,this.tempTileRange_),v=c.getResolution(p);for(let y=m.minX;y<=m.maxX;++y)for(let x=m.minY;x<=m.maxY;++x){const E=this.getTile(p,y,x,e);if(!E||!Pp(s,E,p))continue;const b=E.getKey();if(d[b]=!0,E.getState()===Ve.IDLE&&!e.tileQueue.isKeyQueued(b)){const C=qh(p,y,x,this.tempTileCoord_);e.tileQueue.enqueue([E,u,c.getTileCoordCenter(C),v])}}}}findStaleTile_(e,n){const i=this.tileCache_,s=e[0],r=e[1],o=e[2],a=this.getStaleKeys();for(let l=0;l0&&setTimeout(()=>{this.enqueueTiles(e,I,g-1,T,A-1)},0),!(g in T))return this.container;const V=Et(this),Y=e.time;for(const H of T[g]){const ce=H.getState();if((H instanceof Bm||H instanceof Kre)&&ce===Ve.EMPTY)continue;const ie=H.tileCoord;if(ce===Ve.LOADED&&H.getAlpha(V,Y)===1){H.endTransition(V);continue}if(this.renderComplete=!1,this.findStaleTile_(ie,T)){Ure(T,H,g),e.animate=!0;continue}if(this.findAltTiles_(f,ie,g+1,T))continue;const ee=f.getMinZoom();for(let ue=g-1;ue>=ee&&!this.findAltTiles_(f,ie,ue,T);--ue);}const ne=p/o*l/y,N=this.getRenderContext(e);br(this.tempTransform,x/2,E/2,ne,ne,0,-x/2,-E/2),i.extent&&this.clipUnrotated(N,e,w),u.getInterpolate()||(N.imageSmoothingEnabled=!1),this.preRender(N,e);const B=Object.keys(T).map(Number);B.sort(hr);let R;const W=[],X=[];for(let H=B.length-1;H>=0;--H){const ce=B[H],ie=u.getTilePixelSize(ce,l,r),D=f.getResolution(ce)/p,ee=ie[0]*D*ne,ue=ie[1]*D*ne,L=f.getTileCoordForCoordAndZ(xa(k),ce),le=f.getTileCoordExtent(L),de=On(this.tempTransform,[y*(le[0]-k[0])/p,y*(k[3]-le[3])/p]),xe=y*u.getGutterForProjection(r);for(const z of T[ce]){if(z.getState()!==Ve.LOADED)continue;const fe=z.tileCoord,S=L[1]-fe[1],O=Math.round(de[0]-(S-1)*ee),K=L[2]-fe[2],U=Math.round(de[1]-(K-1)*ue),oe=Math.round(de[0]-S*ee),j=Math.round(de[1]-K*ue),re=O-oe,Q=U-j,ge=B.length===1;let be=!1;R=[oe,j,oe+re,j,oe+re,j+Q,oe,j+Q];for(let we=0,Me=W.length;we{const ie=Et(u),te=ce.wantedTiles[ie],D=te?Object.keys(te).length:0;this.updateCacheSize(D),this.tileCache_.expireCache()};return e.postRenderFunctions.push(J),this.container}updateCacheSize(e){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,e*2)}drawTile(e,n,i,s,r,o,a,l){let c;if(e instanceof Vm){if(c=Zh(e.getData()),!c)throw new Error("Rendering array data is not yet supported")}else c=this.getTileImage(e);if(!c)return;const u=this.getRenderContext(n),d=Et(this),f=n.layerStatesArray[n.layerIndex],g=f.opacity*(l?e.getAlpha(d,n.time):1),p=g!==u.globalAlpha;p&&(u.save(),u.globalAlpha=g),u.drawImage(c,a,a,c.width-2*a,c.height-2*a,i,s,r,o),p&&u.restore(),g!==f.opacity?n.animate=!0:l&&e.endTransition(d)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}updateUsedTiles(e,n,i){const s=Et(n);s in e||(e[s]={}),e[s][i.getKey()]=!0}}class Xre extends Nre{constructor(e){super(e)}createRenderer(){return new Gre(this,{cacheSize:this.getCacheSize()})}}class Jc extends Ws{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const n=e;this.setGeometry(n)}else{const n=e;this.setProperties(n)}}clone(){const e=new Jc(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const n=this.getGeometry();n&&e.setGeometry(n.clone());const i=this.getStyle();return i&&e.setStyle(i),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(Lt(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=ft(e,tt.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?qre(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function qre(t){if(typeof t=="function")return t;let e;return Array.isArray(t)?e=t:(mt(typeof t.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}function Wm(t,e,n,i,s,r,o){let a,l;const c=(n-e)/i;if(c===1)a=e;else if(c===2)a=e,l=s;else if(c!==0){let u=t[e],d=t[e+1],f=0;const g=[0];for(let v=e+i;v1?o:2,r=r||new Array(o);for(let u=0;u>1;sl&&(this.instructions.push([Ue.CUSTOM,l,u,e,i,qo,r]),this.hitDetectionInstructions.push([Ue.CUSTOM,l,u,e,s||i,qo,r]));break;case"Point":c=e.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),u=this.coordinates.length,this.instructions.push([Ue.CUSTOM,l,u,e,i,void 0,r]),this.hitDetectionInstructions.push([Ue.CUSTOM,l,u,e,s||i,void 0,r]);break}this.endGeometry(n)}beginGeometry(e,n,i){this.beginGeometryInstruction1_=[Ue.BEGIN_GEOMETRY,n,0,e,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ue.BEGIN_GEOMETRY,n,0,e,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let n;const i=e.length;let s,r,o=-1;for(n=0;nthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(e){const n=e.fillStyle,i=[Ue.SET_FILL_STYLE,n];return typeof n!="string"&&i.push(e.fillPatternScale),i}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[Ue.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,n){const i=e.fillStyle;(typeof i!="string"||e.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(n.call(this,e)),e.currentFillStyle=i)}updateStrokeStyle(e,n){const i=e.strokeStyle,s=e.lineCap,r=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,l=e.lineWidth,c=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=s||r!=e.currentLineDash&&!So(e.currentLineDash,r)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=l||e.currentMiterLimit!=c)&&(i!==void 0&&n.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=s,e.currentLineDash=r,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=l,e.currentMiterLimit=c)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const n=[Ue.END_GEOMETRY,e];this.instructions.push(n),this.hitDetectionInstructions.push(n)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=lT(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;yv(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class Jre extends id{constructor(e,n,i,s){super(e,n,i,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,n,i){if(!this.image_||this.maxExtent&&!Wl(this.maxExtent,e.getFlatCoordinates()))return;this.beginGeometry(e,n,i);const s=e.getFlatCoordinates(),r=e.getStride(),o=this.coordinates.length,a=this.appendFlatPointCoordinates(s,r);this.instructions.push([Ue.DRAW_IMAGE,o,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Ue.DRAW_IMAGE,o,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(n)}drawMultiPoint(e,n,i){if(!this.image_)return;this.beginGeometry(e,n,i);const s=e.getFlatCoordinates(),r=[];for(let l=0,c=s.length;l=t){const p=(t-a+g)/g,m=Ai(c,d,p),v=Ai(u,f,p);l.push(m,v),r.push(l),l=[m,v],a==t&&(o+=s),a=0}else if(a0&&r.push(l),r}function toe(t,e,n,i,s){let r=n,o=n,a=0,l=0,c=n,u,d,f,g,p,m,v,y,x,E;for(d=n;dt&&(l>a&&(a=l,r=c,o=d),l=0,c=d-s)),f=g,v=x,y=E),p=w,m=b}return l+=g,l>a?[c,d]:[r,o]}const Qh={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class noe extends id{constructor(e,n,i,s){super(e,n,i,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[pi]={fillStyle:pi},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,n,i){const s=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!s&&!r)return;const a=this.coordinates;let l=a.length;const c=e.getType();let u=null,d=e.getStride();if(o.placement==="line"&&(c=="LineString"||c=="MultiLineString"||c=="Polygon"||c=="MultiPolygon")){if(!vi(this.maxExtent,e.getExtent()))return;let f;if(u=e.getFlatCoordinates(),c=="LineString")f=[u.length];else if(c=="MultiLineString")f=e.getEnds();else if(c=="Polygon")f=e.getEnds().slice(0,1);else if(c=="MultiPolygon"){const v=e.getEndss();f=[];for(let y=0,x=v.length;y{const b=a[(x+w)*2]===u[w*d]&&a[(x+w)*2+1]===u[w*d+1];return b||--x,b})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&this.updateFillStyle(this.state,this.createFill),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,n,i);let p=o.padding;if(p!=Jo&&(o.scale[0]<0||o.scale[1]<0)){let x=o.padding[0],E=o.padding[1],w=o.padding[2],b=o.padding[3];o.scale[0]<0&&(E=-E,b=-b),o.scale[1]<0&&(x=-x,w=-w),p=[x,E,w,b]}const m=this.pixelRatio;this.instructions.push([Ue.DRAW_IMAGE,l,g,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,p==Jo?Jo:p.map(function(x){return x*m}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,f]);const v=1/m,y=this.state.fillStyle;o.backgroundFill&&(this.state.fillStyle=pi,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Ue.DRAW_IMAGE,l,g,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[v,v],NaN,this.declutterMode_,this.declutterImageWithText_,p,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?pi:this.fillKey_,this.textOffsetX_,this.textOffsetY_,f]),o.backgroundFill&&(this.state.fillStyle=y,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(n)}}saveTextStates_(){const e=this.textStrokeState_,n=this.textState_,i=this.textFillState_,s=this.strokeKey_;e&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:n.font,textAlign:n.textAlign||Pu,justify:n.justify,textBaseline:n.textBaseline||jh,scale:n.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(e,n){const i=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,c=Qh[s.textBaseline],u=this.textOffsetY_*l,d=this.text_,f=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([Ue.DRAW_CHARS,e,n,c,s.overflow,a,s.maxAngle,l,u,r,f*l,d,o,1,this.declutterMode_]),this.hitDetectionInstructions.push([Ue.DRAW_CHARS,e,n,c,s.overflow,a&&pi,s.maxAngle,l,u,r,f*l,d,o,1/l,this.declutterMode_])}setTextStyle(e,n){let i,s,r;if(!e)this.text_="";else{const o=e.getFill();o?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=Ds(o.getColor()||pi)):(s=null,this.textFillState_=s);const a=e.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const p=a.getLineDash(),m=a.getLineDashOffset(),v=a.getWidth(),y=a.getMiterLimit();r.lineCap=a.getLineCap()||Yl,r.lineDash=p?p.slice():fr,r.lineDashOffset=m===void 0?gr:m,r.lineJoin=a.getLineJoin()||Hl,r.lineWidth=v===void 0?Mu:v,r.miterLimit=y===void 0?Tu:y,r.strokeStyle=Ds(a.getColor()||Au)}i=this.textState_;const l=e.getFont()||FT;Bie(l);const c=e.getScaleArray();i.overflow=e.getOverflow(),i.font=l,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.repeat=e.getRepeat(),i.justify=e.getJustify(),i.textBaseline=e.getTextBaseline()||jh,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||Jo,i.scale=c===void 0?[1,1]:c;const u=e.getOffsetX(),d=e.getOffsetY(),f=e.getRotateWithView(),g=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=u===void 0?0:u,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=f===void 0?!1:f,this.textRotation_=g===void 0?0:g,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:Et(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+Et(s.fillStyle):""}this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=n}}const ioe={Circle:qw,Default:id,Image:Jre,LineString:Qre,Polygon:qw,Text:noe};class soe{constructor(e,n,i,s){this.tolerance_=e,this.maxExtent_=n,this.pixelRatio_=s,this.resolution_=i,this.buildersByZIndex_={}}finish(){const e={};for(const n in this.buildersByZIndex_){e[n]=e[n]||{};const i=this.buildersByZIndex_[n];for(const s in i){const r=i[s].finish();e[n][s]=r}}return e}getBuilder(e,n){const i=e!==void 0?e.toString():"0";let s=this.buildersByZIndex_[i];s===void 0&&(s={},this.buildersByZIndex_[i]=s);let r=s[n];if(r===void 0){const o=ioe[n];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[n]=r}return r}}function roe(t,e,n,i,s,r,o,a,l,c,u,d){let f=t[e],g=t[e+1],p=0,m=0,v=0,y=0;function x(){p=f,m=g,e+=i,f=t[e],g=t[e+1],y+=v,v=Math.sqrt((f-p)*(f-p)+(g-m)*(g-m))}do x();while(eR[2]}else V=w>A;const Y=Math.PI,ne=[],N=C+i===e;e=C,v=0,y=k,f=t[e],g=t[e+1];let B;if(N){x(),B=Math.atan2(g-m,f-p),V&&(B+=B>0?-Y:Y);const R=(A+w)/2,W=(I+b)/2;return ne[0]=[R,W,(T-r)/2,B,s],ne}s=s.replace(/\n/g," ");for(let R=0,W=s.length;R0?-Y:Y),B!==void 0){let D=X-B;if(D+=D>Y?-2*Y:D<-Y?2*Y:0,Math.abs(D)>o)return null}B=X;const J=R;let H=0;for(;R0&&t.push(` -`,""),t.push(e,""),t}class aoe{constructor(e,n,i,s,r){this.overlaps=i,this.pixelRatio=n,this.resolution=e,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=hs(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new dA:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,n,i,s){const r=e+n+i+s;if(this.labels_[r])return this.labels_[r];const o=s?this.strokeStates[s]:null,a=i?this.fillStates[i]:null,l=this.textStates[n],c=this.pixelRatio,u=[l.scale[0]*c,l.scale[1]*c],d=l.justify?Qh[l.justify]:Mp(Array.isArray(e)?e[0]:e,l.textAlign||Pu),f=s&&o.lineWidth?o.lineWidth:0,g=Array.isArray(e)?e:String(e).split(` -`).reduce(ooe,[]),{width:p,height:m,widths:v,heights:y,lineWidths:x}=Wie(l,g),E=p+f,w=[],b=(E+2)*u[0],C=(m+f)*u[1],k={width:b<0?Math.floor(b):Math.ceil(b),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:w};(u[0]!=1||u[1]!=1)&&w.push("scale",u),s&&(w.push("strokeStyle",o.strokeStyle),w.push("lineWidth",f),w.push("lineCap",o.lineCap),w.push("lineJoin",o.lineJoin),w.push("miterLimit",o.miterLimit),w.push("setLineDash",[o.lineDash]),w.push("lineDashOffset",o.lineDashOffset)),i&&w.push("fillStyle",a.fillStyle),w.push("textBaseline","middle"),w.push("textAlign","center");const T=.5-d;let A=d*E+T*f;const I=[],V=[];let Y=0,ne=0,N=0,B=0,R;for(let W=0,X=g.length;We?e-c:r,w=o+u>n?n-u:o,b=p[3]+E*f[0]+p[1],C=p[0]+w*f[1]+p[2],k=y-p[3],T=x-p[0];(m||d!==0)&&(Rr[0]=k,$r[0]=k,Rr[1]=T,Gs[1]=T,Gs[0]=k+b,Xs[0]=Gs[0],Xs[1]=T+C,$r[1]=Xs[1]);let A;return d!==0?(A=br(hs(),i,s,1,1,d,-i,-s),On(A,Rr),On(A,Gs),On(A,Xs),On(A,$r),uo(Math.min(Rr[0],Gs[0],Xs[0],$r[0]),Math.min(Rr[1],Gs[1],Xs[1],$r[1]),Math.max(Rr[0],Gs[0],Xs[0],$r[0]),Math.max(Rr[1],Gs[1],Xs[1],$r[1]),Ka)):uo(Math.min(k,k+b),Math.min(T,T+C),Math.max(k,k+b),Math.max(T,T+C),Ka),g&&(y=Math.round(y),x=Math.round(x)),{drawImageX:y,drawImageY:x,drawImageW:E,drawImageH:w,originX:c,originY:u,declutterBox:{minX:Ka[0],minY:Ka[1],maxX:Ka[2],maxY:Ka[3],value:v},canvasTransform:A,scale:f}}replayImageOrLabel_(e,n,i,s,r,o,a){const l=!!(o||a),c=s.declutterBox,u=a?a[2]*s.scale[0]/2:0;return c.minX-u<=n[0]&&c.maxX+u>=0&&c.minY-u<=n[1]&&c.maxY+u>=0&&(l&&this.replayTextBackground_(e,Rr,Gs,Xs,$r,o,a),zie(e,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(e){const n=this.alignAndScaleFill_;if(n){const i=On(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;e.save(),e.translate(i[0]%s,i[1]%s),n!==1&&e.scale(n,n),e.rotate(this.viewRotation_)}e.fill(),n&&e.restore()}setStrokeStyle_(e,n){e.strokeStyle=n[1],e.lineWidth=n[2],e.lineCap=n[3],e.lineJoin=n[4],e.miterLimit=n[5],e.lineDashOffset=n[7],e.setLineDash(n[6])}drawLabelWithPointPlacement_(e,n,i,s){const r=this.textStates[n],o=this.createLabel(e,n,s,i),a=this.strokeStates[i],l=this.pixelRatio,c=Mp(Array.isArray(e)?e[0]:e,r.textAlign||Pu),u=Qh[r.textBaseline||jh],d=a&&a.lineWidth?a.lineWidth:0,f=o.width/l-2*r.scale[0],g=c*f+2*(.5-c)*d,p=u*o.height/l+2*(.5-u)*d;return{label:o,anchorX:g,anchorY:p}}execute_(e,n,i,s,r,o,a,l){const c=this.zIndexContext_;let u;this.pixelCoordinates_&&So(i,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=io(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Yne(this.renderedTransform_,i));let d=0;const f=s.length;let g=0,p,m,v,y,x,E,w,b,C,k,T,A,I,V=0,Y=0,ne=null,N=null;const B=this.coordinateCache_,R=this.viewRotation_,W=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,X={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:R},J=this.instructions!=s||this.overlaps?0:200;let H,ce,ie,te;for(;dJ&&(this.fill_(e),V=0),Y>J&&(e.stroke(),Y=0),!V&&!Y&&(e.beginPath(),x=NaN,E=NaN),++d;break;case Ue.CIRCLE:g=D[1];const ue=u[g],L=u[g+1],le=u[g+2],de=u[g+3],xe=le-ue,z=de-L,fe=Math.sqrt(xe*xe+z*z);e.moveTo(ue+fe,L),e.arc(ue,L,fe,0,2*Math.PI,!0),++d;break;case Ue.CLOSE_PATH:e.closePath(),++d;break;case Ue.CUSTOM:g=D[1],p=D[2];const S=D[3],O=D[4],K=D[5];X.geometry=S,X.feature=H,d in B||(B[d]=[]);const U=B[d];K?K(u,g,p,2,U):(U[0]=u[g],U[1]=u[g+1],U.length=2),c&&(c.zIndex=D[6]),O(U,X),++d;break;case Ue.DRAW_IMAGE:g=D[1],p=D[2],C=D[3],m=D[4],v=D[5];let oe=D[6];const j=D[7],re=D[8],Q=D[9],ge=D[10];let be=D[11];const we=D[12];let Me=D[13];y=D[14]||"declutter";const De=D[15];if(!C&&D.length>=20){k=D[19],T=D[20],A=D[21],I=D[22];const mn=this.drawLabelWithPointPlacement_(k,T,A,I);C=mn.label,D[3]=C;const Cn=D[23];m=(mn.anchorX-Cn)*this.pixelRatio,D[4]=m;const Sn=D[24];v=(mn.anchorY-Sn)*this.pixelRatio,D[5]=v,oe=C.height,D[6]=oe,Me=C.width,D[13]=Me}let Ye;D.length>25&&(Ye=D[25]);let je,nt,et;D.length>17?(je=D[16],nt=D[17],et=D[18]):(je=Jo,nt=!1,et=!1),ge&&W?be+=R:!ge&&!W&&(be-=R);let Jt=0;for(;g!pA.includes(t));class coe{constructor(e,n,i,s,r,o,a){this.maxExtent_=e,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=n,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=hs(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,a)}clip(e,n){const i=this.getClipCoords(n);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()}createExecutors_(e,n){for(const i in e){let s=this.executorsByZIndex_[i];s===void 0&&(s={},this.executorsByZIndex_[i]=s);const r=e[i];for(const o in r){const a=r[o];s[o]=new aoe(this.resolution_,this.pixelRatio_,this.overlaps_,a,n)}}}hasExecutors(e){for(const n in this.executorsByZIndex_){const i=this.executorsByZIndex_[n];for(let s=0,r=e.length;s0){if(!o||k==="none"||g!=="Image"&&g!=="Text"||o.includes(b)){const V=(f[A]-3)/4,Y=s-V%a,ne=s-(V/a|0),N=r(b,C,Y*Y+ne*ne);if(N)return N}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(hr);let v,y,x,E,w;for(v=m.length-1;v>=0;--v){const b=m[v].toString();for(x=this.executorsByZIndex_[b],y=sl.length-1;y>=0;--y)if(g=sl[y],E=x[g],E!==void 0&&(w=E.executeHitDetection(u,l,i,p,d),w))return w}}getClipCoords(e){const n=this.maxExtent_;if(!n)return null;const i=n[0],s=n[1],r=n[2],o=n[3],a=[i,s,i,o,r,o,r,s];return io(a,0,8,2,e,a),a}isEmpty(){return Vl(this.executorsByZIndex_)}execute(e,n,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(hr),o=o||sl;const c=sl.length;let u,d,f,g,p;for(a&&l.reverse(),u=0,d=l.length;uy.execute(b,n,i,s,r,a)),w&&E.restore(),x){x.offset();const b=l[u]*c+f;this.deferredZIndexContexts_[b]||(this.deferredZIndexContexts_[b]=[]),this.deferredZIndexContexts_[b].push(x)}}}}this.renderedContext_=e}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const e=this.deferredZIndexContexts_,n=Object.keys(e).map(Number).sort(hr);for(let i=0,s=n.length;i{r.draw(this.renderedContext_),r.clear()}),e[n[i]].length=0}}const Ip={};function uoe(t){if(Ip[t]!==void 0)return Ip[t];const e=t*2+1,n=t*t,i=new Array(n+1);for(let r=0;r<=t;++r)for(let o=0;o<=t;++o){const a=r*r+o*o;if(a>n)break;let l=i[a];l||(l=[],i[a]=l),l.push(((t+r)*e+(t+o))*4+3),r>0&&l.push(((t-r)*e+(t+o))*4+3),o>0&&(l.push(((t+r)*e+(t-o))*4+3),r>0&&l.push(((t-r)*e+(t-o))*4+3))}const s=[];for(let r=0,o=i.length;rd*this.pixelRatio_),lineDashOffset:(o||gr)*this.pixelRatio_,lineJoin:a!==void 0?a:Hl,lineWidth:(l!==void 0?l:Mu)*this.pixelRatio_,miterLimit:c!==void 0?c:Tu,strokeStyle:Ds(i||Au)}}}setImageStyle(e){let n;if(!e||!(n=e.getSize())){this.image_=null;return}const i=e.getPixelRatio(this.pixelRatio_),s=e.getAnchor(),r=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[1]*i,this.imageHeight_=n[1]*i,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=n[0]*i}setTextStyle(e){if(!e)this.text_="";else{const n=e.getFill();if(!n)this.textFillState_=null;else{const g=n.getColor();this.textFillState_={fillStyle:Ds(g||pi)}}const i=e.getStroke();if(!i)this.textStrokeState_=null;else{const g=i.getColor(),p=i.getLineCap(),m=i.getLineDash(),v=i.getLineDashOffset(),y=i.getLineJoin(),x=i.getWidth(),E=i.getMiterLimit();this.textStrokeState_={lineCap:p!==void 0?p:Yl,lineDash:m||fr,lineDashOffset:v||gr,lineJoin:y!==void 0?y:Hl,lineWidth:x!==void 0?x:Mu,miterLimit:E!==void 0?E:Tu,strokeStyle:Ds(g||Au)}}const s=e.getFont(),r=e.getOffsetX(),o=e.getOffsetY(),a=e.getRotateWithView(),l=e.getRotation(),c=e.getScaleArray(),u=e.getText(),d=e.getTextAlign(),f=e.getTextBaseline();this.textState_={font:s!==void 0?s:FT,textAlign:d!==void 0?d:Pu,textBaseline:f!==void 0?f:jh},this.text_=u!==void 0?Array.isArray(u)?u.reduce((g,p,m)=>g+=m%2?" ":p,""):u:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}}}const Ts=.5;function hoe(t,e,n,i,s,r,o,a,l){const c=s,u=t[0]*Ts,d=t[1]*Ts,f=hn(u,d);f.imageSmoothingEnabled=!1;const g=f.canvas,p=new doe(f,Ts,s,null,o,a,null),m=n.length,v=Math.floor((256*256*256-1)/m),y={};for(let E=1;E<=m;++E){const w=n[E-1],b=w.getStyleFunction()||i;if(!b)continue;let C=b(w,r);if(!C)continue;Array.isArray(C)||(C=[C]);const T=(E*v).toString(16).padStart(7,"#00000");for(let A=0,I=C.length;A0;return d&&Promise.all(l).then(()=>s(null)),_oe(t,e,n,i,r,o,a),d}function _oe(t,e,n,i,s,r,o){const a=n.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(i,s);if(n.getRenderer())vA(t,l,n,e,o);else{const u=mA[l.getType()];u(t,l,n,e,o,r)}}function vA(t,e,n,i,s){if(e.getType()=="GeometryCollection"){const o=e.getGeometries();for(let a=0,l=o.length;a{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=this.frameState.size.slice(),s=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,c=this.getLayer(),u=[],d=i[0]*Ts,f=i[1]*Ts;u.push(this.getRenderTransform(s,r,o,Ts,d,f,0).slice());const g=c.getSource(),p=a.getExtent();if(g.getWrapX()&&a.canWrapX()&&!il(p,l)){let m=l[0];const v=bt(p);let y=0,x;for(;mp[2];)++y,x=v*y,u.push(this.getRenderTransform(s,r,o,Ts,d,f,x).slice()),m-=v}this.hitDetectionImageData_=hoe(i,u,this.renderedFeatures_,c.getStyleFunction(),l,r,o,Qw(r,this.renderedPixelRatio_))}n(foe(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,n,i,s,r){if(!this.replayGroup_)return;const o=n.viewState.resolution,a=n.viewState.rotation,l=this.getLayer(),c={},u=function(p,m,v){const y=Et(p),x=c[y];if(x){if(x!==!0&&vd=p.forEachFeatureAtCoordinate(e,o,a,i,u,g&&n.declutter[g]?n.declutter[g].all().map(m=>m.value):null)),d}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const n=this.getLayer(),i=n.getSource();if(!i)return!1;const s=e.viewHints[Hn.ANIMATING],r=e.viewHints[Hn.INTERACTING],o=n.getUpdateWhileAnimating(),a=n.getUpdateWhileInteracting();if(this.ready&&!o&&s||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=e.extent,c=e.viewState,u=c.projection,d=c.resolution,f=e.pixelRatio,g=n.getRevision(),p=n.getRenderBuffer();let m=n.getRenderOrder();m===void 0&&(m=poe);const v=c.center.slice(),y=yv(l,p*d),x=y.slice(),E=[y.slice()],w=u.getExtent();if(i.getWrapX()&&u.canWrapX()&&!il(w,e.extent)){const N=bt(w),B=Math.max(bt(y)/2,N);y[0]=w[0]-B,y[2]=w[2]+B,gT(v,u);const R=fT(E[0],u);R[0]w[0]&&R[2]>w[2]&&E.push([R[0]-N,R[1],R[2]-N,R[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==g&&this.renderedRenderOrder_==m&&this.renderedFrameDeclutter_===!!e.declutter&&il(this.wrappedRenderedExtent_,y))return So(this.renderedExtent_,x)||(this.hitDetectionImageData_=null,this.renderedExtent_=x),this.renderedCenter_=v,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const b=new soe(_A(d,f),y,d,f);let C;for(let N=0,B=E.length;N{let R;const W=N.getStyleFunction()||n.getStyleFunction();if(W&&(R=W(N,d)),R){const X=this.renderFeature(N,k,R,b,C,this.getLayer().getDeclutter(),B);T=T&&!X}},I=yT(y),V=i.getFeaturesInExtent(I);m&&V.sort(m);for(let N=0,B=V.length;N{if(e===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),n&&this.simplifiedGeometry_.applyTransform(n);const i=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":i.length=Xf(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=tie(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,i,0,s);break;case"Polygon":s=[],i.length=ET(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(e),i,0,s);break}return s&&(this.simplifiedGeometry_=new ss(this.type_,i,s,2,this.properties_,this.id_)),this.squaredTolerance_=e,this.simplifiedGeometry_}),this}}ss.prototype.getFlatCoordinates=ss.prototype.getOrientedFlatCoordinates;const Vi={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Aoe(t,e){return[[-1/0,-1/0,1/0,1/0]]}let Poe=!1;function Moe(t,e,n,i,s,r,o){const a=new XMLHttpRequest;a.open("GET",typeof t=="function"?t(n,i,s):t,!0),e.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Poe,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const c=e.getType();try{let u;c=="text"||c=="json"?u=a.responseText:c=="xml"?u=a.responseXML||a.responseText:c=="arraybuffer"&&(u=a.response),u?r(e.readFeatures(u,{extent:n,featureProjection:s}),e.readProjection(u)):o()}catch{o()}}else o()},a.onerror=o,a.send()}function ix(t,e){return function(n,i,s,r,o){const a=this;Moe(t,e,n,i,s,function(l,c){a.addFeatures(l),r!==void 0&&r(l)},o||Bl)}}class Lr extends Er{constructor(e,n,i){super(e),this.feature=n,this.features=i}}class Ioe extends aA{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=Bl,this.format_=e.format||null,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(mt(this.format_,"`format` must be set when `url` is set"),this.loader_=ix(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:Aoe;const n=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=n?new tx:null,this.loadedExtentsRtree_=new tx,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,s;Array.isArray(e.features)?s=e.features:e.features&&(i=e.features,s=i.getArray()),!n&&i===void 0&&(i=new Ms(s)),s!==void 0&&this.addFeaturesInternal(s),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const n=Et(e);if(!this.addToIndex_(n,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(n,e);const i=e.getGeometry();if(i){const s=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,e)}else this.nullGeometryFeatures_[n]=e;this.dispatchEvent(new Lr(Vi.ADDFEATURE,e))}setupChangeEvents_(e,n){n instanceof ss||(this.featureChangeKeys_[e]=[ft(n,tt.CHANGE,this.handleFeatureChange_,this),ft(n,Fl.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(e,n){let i=!0;if(n.getId()!==void 0){const s=String(n.getId());if(!(s in this.idIndex_))this.idIndex_[s]=n;else if(n instanceof ss){const r=this.idIndex_[s];r instanceof ss?Array.isArray(r)?r.push(n):this.idIndex_[s]=[r,n]:i=!1}else i=!1}return i&&(mt(!(e in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[e]=n),i}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const n=[],i=[],s=[];for(let r=0,o=e.length;r{n||(n=!0,this.addFeature(i.element),n=!1)}),e.addEventListener(gi.REMOVE,i=>{n||(n=!0,this.removeFeature(i.element),n=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(Lt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(i);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const n=new Lr(Vi.CLEAR);this.dispatchEvent(n),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,n){const i=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(i,function(s){const r=s.getGeometry();if(r instanceof ss||r.intersectsCoordinate(e))return n(s)})}forEachFeatureInExtent(e,n){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,n);this.featuresCollection_&&this.featuresCollection_.forEach(n)}forEachFeatureIntersectingExtent(e,n){return this.forEachFeatureInExtent(e,function(i){const s=i.getGeometry();if(s instanceof ss||s.intersectsExtent(e)){const r=n(i);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),Vl(this.nullGeometryFeatures_)||Vf(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const n=[];return this.forEachFeatureAtCoordinateDirect(e,function(i){n.push(i)}),n}getFeaturesInExtent(e,n){if(this.featuresRtree_){if(!(n&&n.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const s=xv(e,n);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,n){const i=e[0],s=e[1];let r=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return n=n||yu,this.featuresRtree_.forEachInExtent(l,function(c){if(n(c)){const u=c.getGeometry(),d=a;if(a=u instanceof ss?0:u.closestPointXY(i,s,o,a),a{--this.loadingExtentsCount_,this.dispatchEvent(new Lr(Vi.FEATURESLOADEND,void 0,u))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Lr(Vi.FEATURESLOADERROR))}),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const n=this.loadedExtentsRtree_;let i;n.forEachInExtent(e,function(s){if(bu(s.extent,e))return i=s,!0}),i&&n.remove(i)}removeFeatures(e){let n=!1;for(let i=0,s=e.length;ie.geo&&e.geo.lat&&e.geo.lon);return t?[t.geo.lon,t.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(t=>{const e=new lre({target:"map",layers:[new Xre({source:new Ore})],view:new ks({center:hp(this.getLastLonLat()),zoom:this.type==="traceroute"?3:10})}),n=[],i=new Ioe;if(this.type==="traceroute")console.log(this.getLastLonLat()),this.d.forEach(a=>{if(a.geo&&a.geo.lat&&a.geo.lon){const l=hp([a.geo.lon,a.geo.lat]);n.push(l);const c=this.getLastLonLat();console.log(a.geo.lon,a.geo.lat),console.log(a.geo.lon===c[0]&&a.geo.lat===c[1]);const u=new Jc({geometry:new Eu(l),last:a.geo.lon===c[0]&&a.geo.lat===c[1]});i.addFeature(u)}});else{const a=hp([this.d.geo.lon,this.d.geo.lat]);n.push(a);const l=new Jc({geometry:new Eu(a)});i.addFeature(l)}const s=new Jh(n),r=new Jc({geometry:s});i.addFeature(r);const o=new koe({source:i,style:function(a){if(a.getGeometry().getType()==="Point")return new pr({image:new Qu({radius:10,fill:new Zl({color:a.get("last")?"#dc3545":"#0d6efd"}),stroke:new jl({color:"white",width:5})})});if(a.getGeometry().getType()==="LineString")return new pr({stroke:new jl({color:"#0d6efd",width:2})})}});e.addLayer(o),this.store.Configuration.Server.dashboard_theme==="dark"&&e.on("postcompose",function(a){document.querySelector("#map").style.filter="grayscale(80%) invert(100%) "})}).catch(t=>{this.osmAvailable=!1})}},Roe={key:0,id:"map",class:"w-100 rounded-3"};function $oe(t,e,n,i,s,r){return this.osmAvailable?(P(),F("div",Roe)):se("",!0)}const yA=ze(Doe,[["render",$oe]]),Loe={name:"ping",components:{OSMap:yA,LocaleText:Le},data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:Xe()}},mounted(){Pt("/api/ping/getAllPeersIpAddress",{},t=>{t.status&&(this.loading=!0,this.cips=t.data,console.log(this.cips))})},methods:{execute(){this.selectedIp&&(this.pinging=!0,this.pingResult=void 0,Pt("/api/ping/execute",{ipAddress:this.selectedIp,count:this.count},t=>{t.status?this.pingResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.pinging=!1}))}},watch:{selectedConfiguration(){this.selectedPeer=void 0,this.selectedIp=void 0},selectedPeer(){this.selectedIp=void 0}}},Ooe={class:"mt-md-5 mt-3 text-body"},Noe={class:"container"},Foe={class:"row"},Boe={class:"col-sm-4 d-flex gap-2 flex-column"},Voe={class:"mb-1 text-muted",for:"configuration"},Woe=["disabled"],zoe=["value"],Yoe={class:"mb-1 text-muted",for:"peer"},Hoe=["disabled"],joe=["value"],Koe={class:"mb-1 text-muted",for:"ip"},Uoe=["disabled"],Goe={class:"d-flex align-items-center gap-2"},Xoe={class:"text-muted"},qoe={class:"mb-1 text-muted",for:"ipAddress"},Zoe=["disabled"],Joe={class:"mb-1 text-muted",for:"count"},Qoe={class:"d-flex gap-3 align-items-center"},eae=["disabled"],tae=["disabled"],nae={key:0,class:"d-block"},iae={key:1,class:"d-block"},sae={class:"col-sm-8 position-relative"},rae={key:"pingPlaceholder"},oae={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},aae={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},lae={class:"card-body row"},cae={class:"col-sm"},uae={class:"mb-0 text-muted"},dae={key:0,class:"col-sm"},hae={class:"mb-0 text-muted"},fae={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},gae={class:"card-body"},pae={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},mae={class:"card-body"},_ae={class:"mb-0 text-muted"},vae={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},yae={class:"card-body"},bae={class:"mb-0 text-muted"};function wae(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("OSMap");return P(),F("div",Ooe,[h("div",Noe,[e[19]||(e[19]=h("h3",{class:"mb-3 text-body"},"Ping",-1)),h("div",Foe,[h("div",Boe,[h("div",null,[h("label",Voe,[h("small",null,[$(o,{t:"Configuration"})])]),Re(h("select",{class:"form-select","onUpdate:modelValue":e[0]||(e[0]=l=>this.selectedConfiguration=l),disabled:this.pinging},[e[7]||(e[7]=h("option",{disabled:"",selected:"",value:void 0},null,-1)),(P(!0),F(Ie,null,Ge(this.cips,(l,c)=>(P(),F("option",{value:c},pe(c),9,zoe))),256))],8,Woe),[[ch,this.selectedConfiguration]])]),h("div",null,[h("label",Yoe,[h("small",null,[$(o,{t:"Peer"})])]),Re(h("select",{id:"peer",class:"form-select","onUpdate:modelValue":e[1]||(e[1]=l=>this.selectedPeer=l),disabled:this.selectedConfiguration===void 0||this.pinging},[e[8]||(e[8]=h("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedConfiguration!==void 0?(P(!0),F(Ie,{key:0},Ge(this.cips[this.selectedConfiguration],(l,c)=>(P(),F("option",{value:c},pe(c),9,joe))),256)):se("",!0)],8,Hoe),[[ch,this.selectedPeer]])]),h("div",null,[h("label",Koe,[h("small",null,[$(o,{t:"IP Address"})])]),Re(h("select",{id:"ip",class:"form-select","onUpdate:modelValue":e[2]||(e[2]=l=>this.selectedIp=l),disabled:this.selectedPeer===void 0||this.pinging},[e[9]||(e[9]=h("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedPeer!==void 0?(P(!0),F(Ie,{key:0},Ge(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,l=>(P(),F("option",null,pe(l),1))),256)):se("",!0)],8,Uoe),[[ch,this.selectedIp]])]),h("div",Goe,[e[10]||(e[10]=h("div",{class:"flex-grow-1 border-top"},null,-1)),h("small",Xoe,[$(o,{t:"OR"})]),e[11]||(e[11]=h("div",{class:"flex-grow-1 border-top"},null,-1))]),h("div",null,[h("label",qoe,[h("small",null,[$(o,{t:"Enter IP Address / Hostname"})])]),Re(h("input",{class:"form-control",type:"text",id:"ipAddress",disabled:this.pinging,"onUpdate:modelValue":e[3]||(e[3]=l=>this.selectedIp=l)},null,8,Zoe),[[We,this.selectedIp]])]),e[16]||(e[16]=h("div",{class:"w-100 border-top my-2"},null,-1)),h("div",null,[h("label",Joe,[h("small",null,[$(o,{t:"Count"})])]),h("div",Qoe,[h("button",{onClick:e[4]||(e[4]=l=>this.count--),disabled:this.count===1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},e[12]||(e[12]=[h("i",{class:"bi bi-dash-lg"},null,-1)]),8,eae),h("strong",null,pe(this.count),1),h("button",{role:"button",onClick:e[5]||(e[5]=l=>this.count++),class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},e[13]||(e[13]=[h("i",{class:"bi bi-plus-lg"},null,-1)]))])]),h("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:!this.selectedIp||this.pinging,onClick:e[6]||(e[6]=l=>this.execute())},[$(vt,{name:"slide"},{default:Pe(()=>[this.pinging?(P(),F("span",iae,e[15]||(e[15]=[h("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),h("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(P(),F("span",nae,e[14]||(e[14]=[h("i",{class:"bi bi-person-walking me-2"},null,-1),Be("Ping! ")])))]),_:1})],8,tae)]),h("div",sae,[$(vt,{name:"ping"},{default:Pe(()=>[this.pingResult?(P(),F("div",oae,[this.pingResult.geo&&this.pingResult.geo.status==="success"?(P(),Ce(a,{key:0,d:this.pingResult},null,8,["d"])):se("",!0),h("div",aae,[h("div",lae,[h("div",cae,[h("p",uae,[h("small",null,[$(o,{t:"IP Address"})])]),Be(" "+pe(this.pingResult.address),1)]),this.pingResult.geo&&this.pingResult.geo.status==="success"?(P(),F("div",dae,[h("p",hae,[h("small",null,[$(o,{t:"Geolocation"})])]),Be(" "+pe(this.pingResult.geo.city)+", "+pe(this.pingResult.geo.country),1)])):se("",!0)])]),h("div",fae,[h("div",gae,[e[18]||(e[18]=h("p",{class:"mb-0 text-muted"},[h("small",null,"Is Alive")],-1)),h("span",{class:Ee([this.pingResult.is_alive?"text-success":"text-danger"])},[h("i",{class:Ee(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),Be(" "+pe(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),h("div",pae,[h("div",mae,[h("p",_ae,[h("small",null,[$(o,{t:"Average / Min / Max Round Trip Time"})])]),h("samp",null,pe(this.pingResult.avg_rtt)+"ms / "+pe(this.pingResult.min_rtt)+"ms / "+pe(this.pingResult.max_rtt)+"ms ",1)])]),h("div",vae,[h("div",yae,[h("p",bae,[h("small",null,[$(o,{t:"Sent / Received / Lost Package"})])]),h("samp",null,pe(this.pingResult.package_sent)+" / "+pe(this.pingResult.package_received)+" / "+pe(this.pingResult.package_loss),1)])])])):(P(),F("div",rae,[e[17]||(e[17]=h("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px"}},null,-1)),(P(),F(Ie,null,Ge(4,l=>h("div",{class:Ee(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:Mn({"animation-delay":`${l*.15}s`})},null,6)),64))]))]),_:1})])])])])}const xae=ze(Loe,[["render",wae],["__scopeId","data-v-f5cd36ce"]]),Eae={name:"traceroute",components:{LocaleText:Le,OSMap:yA},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:$n()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,Pt("/api/traceroute/execute",{ipAddress:this.ipAddress},t=>{t.status?this.tracerouteResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.tracing=!1}))}}},Cae={class:"mt-md-5 mt-3 text-body"},Sae={class:"container-md"},kae={class:"mb-3 text-body"},Tae={class:"d-flex gap-2 flex-column mb-5"},Aae={class:"mb-1 text-muted",for:"ipAddress"},Pae=["disabled"],Mae=["disabled"],Iae={key:0,class:"d-block"},Dae={key:1,class:"d-block"},Rae={class:"position-relative"},$ae={key:"pingPlaceholder"},Lae={key:1},Oae={key:"table",class:"w-100 mt-2"},Nae={class:"table table-sm rounded-3 w-100"},Fae={scope:"col"},Bae={scope:"col"},Vae={scope:"col"},Wae={scope:"col"},zae={scope:"col"},Yae={scope:"col"},Hae={key:0};function jae(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("OSMap");return P(),F("div",Cae,[h("div",Sae,[h("h3",kae,[$(o,{t:"Traceroute"})]),h("div",Tae,[h("div",null,[h("label",Aae,[h("small",null,[$(o,{t:"Enter IP Address / Hostname"})])]),Re(h("input",{disabled:this.tracing,id:"ipAddress",class:"form-control","onUpdate:modelValue":e[0]||(e[0]=l=>this.ipAddress=l),onKeyup:e[1]||(e[1]=dC(l=>this.execute(),["enter"])),type:"text"},null,40,Pae),[[We,this.ipAddress]])]),h("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:this.tracing||!this.ipAddress,onClick:e[2]||(e[2]=l=>this.execute())},[$(vt,{name:"slide"},{default:Pe(()=>[this.tracing?(P(),F("span",Dae,e[4]||(e[4]=[h("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),h("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(P(),F("span",Iae,e[3]||(e[3]=[h("i",{class:"bi bi-person-walking me-2"},null,-1),Be("Trace! ")])))]),_:1})],8,Mae)]),h("div",Rae,[$(vt,{name:"ping"},{default:Pe(()=>[this.tracerouteResult?(P(),F("div",Lae,[$(a,{d:this.tracerouteResult,type:"traceroute"},null,8,["d"]),h("div",Oae,[h("table",Nae,[h("thead",null,[h("tr",null,[h("th",Fae,[$(o,{t:"Hop"})]),h("th",Bae,[$(o,{t:"IP Address"})]),h("th",Vae,[$(o,{t:"Average RTT (ms)"})]),h("th",Wae,[$(o,{t:"Min RTT (ms)"})]),h("th",zae,[$(o,{t:"Max RTT (ms)"})]),h("th",Yae,[$(o,{t:"Geolocation"})])])]),h("tbody",null,[(P(!0),F(Ie,null,Ge(this.tracerouteResult,(l,c)=>(P(),F("tr",null,[h("td",null,[h("small",null,pe(l.hop),1)]),h("td",null,[h("small",null,pe(l.ip),1)]),h("td",null,[h("small",null,pe(l.avg_rtt),1)]),h("td",null,[h("small",null,pe(l.min_rtt),1)]),h("td",null,[h("small",null,pe(l.max_rtt),1)]),h("td",null,[l.geo.city&&l.geo.country?(P(),F("span",Hae,[h("small",null,pe(l.geo.city)+", "+pe(l.geo.country),1)])):se("",!0)])]))),256))])])])])):(P(),F("div",$ae,[e[5]||(e[5]=h("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),(P(),F(Ie,null,Ge(5,l=>h("div",{class:Ee(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:Mn({"animation-delay":`${l*.05}s`})},null,6)),64))]))]),_:1})])])])}const Kae=ze(Eae,[["render",jae],["__scopeId","data-v-6d6cffc9"]]),Uae={name:"totp",components:{LocaleText:Le},async setup(){const t=Xe();let e="";return await Pt("/api/Welcome_GetTotpLink",{},n=>{n.status&&(e=n.data)}),{l:e,store:t}},mounted(){this.l&&wa.toCanvas(document.getElementById("qrcode"),this.l,function(t){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(t){const e=document.querySelector("#totp");e.classList.remove("is-invalid","is-valid"),t.length===6&&(console.log(t),/[0-9]{6}/.test(t)?dt("/api/Welcome_VerifyTotpLink",{totp:t},n=>{n.status?(this.verified=!0,e.classList.add("is-valid"),this.$emit("verified")):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},Gae=["data-bs-theme"],Xae={class:"m-auto text-body",style:{width:"500px"}},qae={class:"d-flex flex-column"},Zae={class:"dashboardLogo display-4"},Jae={class:"mb-2"},Qae={class:"text-muted"},ele={class:"p-3 bg-body-secondary rounded-3 border mb-3"},tle={class:"text-muted mb-0"},nle=["href"],ile={style:{"line-break":"anywhere"}},sle={for:"totp",class:"mb-2"},rle={class:"text-muted"},ole={class:"form-group mb-2"},ale=["disabled"],lle={class:"invalid-feedback"},cle={class:"valid-feedback"},ule={class:"d-flex gap-3 mt-5 flex-column"};function dle(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink");return P(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[h("div",Xae,[h("div",qae,[h("div",null,[h("h1",Zae,[$(o,{t:"Multi-Factor Authentication (MFA)"})]),h("p",Jae,[h("small",Qae,[$(o,{t:"1. Please scan the following QR Code to generate TOTP with your choice of authenticator"})])]),e[1]||(e[1]=h("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1)),h("div",ele,[h("p",tle,[h("small",null,[$(o,{t:"Or you can click the link below:"})])]),h("a",{href:this.l},[h("code",ile,pe(this.l),1)],8,nle)]),h("label",sle,[h("small",rle,[$(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),h("div",ole,[Re(h("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":e[0]||(e[0]=l=>this.totp=l),disabled:this.verified},null,8,ale),[[We,this.totp]]),h("div",lle,[$(o,{t:this.totpInvalidMessage},null,8,["t"])]),h("div",cle,[$(o,{t:"TOTP verified!"})])])]),e[4]||(e[4]=h("hr",null,null,-1)),h("div",ule,[this.verified?(P(),Ce(a,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:Pe(()=>[$(o,{t:"Complete"}),e[3]||(e[3]=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1})):(P(),Ce(a,{key:0,to:"/",class:"btn bg-secondary-subtle text-secondary-emphasis rounded-3 flex-grow-1 btn-lg border-1 border-secondary-subtle shadow d-flex"},{default:Pe(()=>[$(o,{t:"I don't need MFA"}),e[2]||(e[2]=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1}))])])])],8,Gae)}const hle=ze(Uae,[["render",dle]]),fle={name:"share",components:{LocaleText:Le},async setup(){const t=Wu(),e=me(!1),n=Xe(),i=me(""),s=me(void 0),r=me(new Blob);await Pt("/api/getDashboardTheme",{},a=>{i.value=a.data});const o=t.query.ShareID;return o===void 0||o.length===0?(s.value=void 0,e.value=!0):await Pt("/api/sharePeer/get",{ShareID:o},a=>{a.status?(s.value=a.data,r.value=new Blob([s.value.file],{type:"text/plain"})):s.value=void 0,e.value=!0}),{store:n,theme:i,peerConfiguration:s,blob:r}},mounted(){this.peerConfiguration&&wa.toCanvas(document.querySelector("#qrcode"),this.peerConfiguration.file,t=>{t&&console.error(t)})},methods:{download(){const t=new Blob([this.peerConfiguration.file],{type:"text/plain"}),e=URL.createObjectURL(t),n=`${this.peerConfiguration.fileName}.conf`,i=document.createElement("a");i.href=e,i.download=n,i.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},gle=["data-bs-theme"],ple={class:"m-auto text-body",style:{width:"500px"}},mle={key:0,class:"text-center position-relative",style:{}},_le={class:"position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp",style:{"animation-delay":"0.1s"}},vle={class:"m-auto"},yle={key:1,class:"d-flex align-items-center flex-column gap-3"},ble={class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},wle={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},xle={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},Ele=["download","href"];function Cle(t,e,n,i,s,r){const o=Se("LocaleText");return P(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[h("div",ple,[this.peerConfiguration?(P(),F("div",yle,[h("div",ble,[e[1]||(e[1]=h("h6",null,"WGDashboard",-1)),$(o,{t:"Scan QR Code with the WireGuard App to add peer"})]),h("canvas",wle,null,512),h("p",xle,[$(o,{t:"or click the button below to download the "}),e[2]||(e[2]=h("samp",null,".conf",-1)),$(o,{t:" file"})]),h("a",{download:this.peerConfiguration.fileName+".conf",href:r.getBlob,class:"btn btn-lg bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle animate__animated animate__fadeInUp shadow-sm",style:{"animation-delay":"0.25s"}},e[3]||(e[3]=[h("i",{class:"bi bi-download"},null,-1)]),8,Ele)])):(P(),F("div",mle,[e[0]||(e[0]=h("div",{class:"animate__animated animate__fadeInUp"},[h("h1",{style:{"font-size":"20rem",filter:"blur(1rem)","animation-duration":"7s"},class:"animate__animated animate__flash animate__infinite"},[h("i",{class:"bi bi-file-binary"})])],-1)),h("div",_le,[h("h3",vle,[$(o,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,gle)}const Sle=ze(fle,[["render",Cle],["__scopeId","data-v-1b44aacd"]]),kle={class:"card rounded-3 shadow-sm"},Tle={class:"d-flex gap-3 align-items-center"},Ale={class:"mb-0"},Ple={class:"text-muted"},Mle={key:0,class:"card-footer p-3 d-flex flex-column gap-2"},Ile=["onClick","id"],Dle={class:"card-body d-flex p-3 gap-3 align-items-center"},Rle={__name:"backupGroup",props:{configurationName:String,backups:Array,open:!1,selectedConfigurationBackup:Object},emits:["select"],setup(t,{emit:e}){const n=t,i=e,s=me(n.open);return Vt(()=>{n.selectedConfigurationBackup&&document.querySelector(`#${n.selectedConfigurationBackup.filename.replace(".conf","")}`).scrollIntoView({behavior:"smooth"})}),(r,o)=>(P(),F("div",kle,[h("a",{role:"button",class:"card-body d-flex align-items-center text-decoration-none",onClick:o[0]||(o[0]=a=>s.value=!s.value)},[h("div",Tle,[h("h6",Ale,[h("samp",null,pe(t.configurationName),1)]),h("small",Ple,pe(t.backups.length)+" "+pe(t.backups.length>1?"Backups":"Backup"),1)]),h("h5",{class:Ee(["ms-auto mb-0 dropdownIcon text-muted",{active:s.value}])},o[1]||(o[1]=[h("i",{class:"bi bi-chevron-down"},null,-1)]),2)]),s.value?(P(),F("div",Mle,[(P(!0),F(Ie,null,Ge(t.backups,a=>(P(),F("div",{class:"card rounded-3 shadow-sm animate__animated",key:a.filename,onClick:()=>{i("select",a)},id:a.filename.replace(".conf",""),role:"button"},[h("div",Dle,[h("small",null,[o[2]||(o[2]=h("i",{class:"bi bi-file-earmark me-2"},null,-1)),h("samp",null,pe(a.filename),1)]),h("small",null,[o[3]||(o[3]=h("i",{class:"bi bi-clock-history me-2"},null,-1)),h("samp",null,pe(Z(Fn)(a.backupDate).format("YYYY-MM-DD HH:mm:ss")),1)]),h("small",null,[o[4]||(o[4]=h("i",{class:"bi bi-database me-2"},null,-1)),Be(" "+pe(a.database?"Yes":"No"),1)]),o[5]||(o[5]=h("small",{class:"text-muted ms-auto"},[h("i",{class:"bi bi-chevron-right"})],-1))])],8,Ile))),128))])):se("",!0)]))}},$le=ze(Rle,[["__scopeId","data-v-35612fa2"]]),Lle={class:"d-flex flex-column gap-5",id:"confirmBackup"},Ole={class:"d-flex flex-column gap-3"},Nle={class:"d-flex flex-column flex-sm-row align-items-start align-items-sm-center gap-3"},Fle={class:"mb-0"},Ble={class:"text-muted mb-1",for:"ConfigurationName"},Vle={class:"invalid-feedback"},Wle={key:0},zle={key:1},Yle={class:"mb-0"},Hle={class:"row g-3"},jle={class:"col-sm"},Kle={class:"text-muted mb-1",for:"PrivateKey"},Ule={class:"input-group"},Gle={class:"col-sm"},Xle={class:"text-muted mb-1",for:"PublicKey"},qle={class:"text-muted mb-1",for:"ListenPort"},Zle={class:"invalid-feedback"},Jle={key:0},Qle={key:1},ece={class:"mb-0"},tce={class:"text-muted mb-1 d-flex",for:"ListenPort"},nce={class:"invalid-feedback"},ice={key:0},sce={key:1},rce={class:"accordion",id:"newConfigurationOptionalAccordion"},oce={class:"accordion-item"},ace={class:"accordion-header"},lce={class:"accordion-button collapsed rounded-3",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},cce={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},uce={class:"accordion-body d-flex flex-column gap-3"},dce={class:"text-muted mb-1",for:"PreUp"},hce={class:"text-muted mb-1",for:"PreDown"},fce={class:"text-muted mb-1",for:"PostUp"},gce={class:"text-muted mb-1",for:"PostDown"},pce={class:"d-flex flex-column gap-3"},mce={class:"d-flex flex-column flex-sm-row align-items-start align-items-sm-center gap-3"},_ce={class:"mb-0"},vce={key:0},yce={class:"row g-3"},bce={class:"col-sm"},wce={class:"card text-bg-success rounded-3"},xce={class:"card-body"},Ece={class:"col-sm"},Cce={class:"card text-bg-warning rounded-3"},Sce={class:"card-body"},kce={class:"d-flex"},Tce=["disabled"],Ace={__name:"confirmBackup",props:{selectedConfigurationBackup:Object},setup(t){const e=t,n=Ei({ConfigurationName:e.selectedConfigurationBackup.filename.split("_")[0],Backup:e.selectedConfigurationBackup.filename}),i=e.selectedConfigurationBackup.content.split(` -`);for(let E of i){if(E==="[Peer]")break;if(E.length>0){let w=E.replace(" = ","=").split("=");w[0]==="ListenPort"?n[w[0]]=parseInt(w[1]):n[w[0]]=w[1]}}const s=me(!1),r=me(!1),o=me(""),a=$n(),l=ve(()=>/^[a-zA-Z0-9_=+.-]{1,15}$/.test(n.ConfigurationName)&&n.ConfigurationName.length>0&&!a.Configurations.find(E=>E.Name===n.ConfigurationName)),c=ve(()=>{try{wireguard.generatePublicKey(n.PrivateKey)}catch{return!1}return!0}),u=ve(()=>n.ListenPort>0&&n.ListenPort<=65353&&Number.isInteger(n.ListenPort)&&!a.Configurations.find(E=>parseInt(E.ListenPort)===n.ListenPort)),d=ve(()=>{try{return am(n.Address),!0}catch{return!1}}),f=ve(()=>d.value&&u.value&&c.value&&l.value);Vt(()=>{document.querySelector("main").scrollTo({top:0,behavior:"smooth"}),jt(()=>c,E=>{E&&(n.PublicKey=wireguard.generatePublicKey(n.PrivateKey))},{immediate:!0})});const g=ve(()=>{let E;try{E=am(n.Address)}catch{return 0}return E.end-E.start}),p=ve(()=>e.selectedConfigurationBackup.database?e.selectedConfigurationBackup.databaseContent.split(` -`).filter(w=>w.search('INSERT INTO "(.*)"')>=0).length:0),m=ve(()=>e.selectedConfigurationBackup.database?e.selectedConfigurationBackup.databaseContent.split(` -`).filter(w=>w.search('INSERT INTO "(.*)_restrict_access"')>=0).length:0),v=Xe(),y=IC(),x=async()=>{f.value&&await dt("/api/addWireguardConfiguration",n,async E=>{E.status&&(v.newMessage("Server","Configuration restored","success"),await a.getConfigurations(),await y.push(`/configuration/${n.ConfigurationName}/peers`))})};return(E,w)=>(P(),F("div",Lle,[h("form",Ole,[h("div",Nle,[h("h4",Fle,[$(Le,{t:"Configuration File"})])]),h("div",null,[h("label",Ble,[h("small",null,[$(Le,{t:"Configuration Name"})])]),Re(h("input",{type:"text",class:Ee(["form-control rounded-3",[l.value?"is-valid":"is-invalid"]]),placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":w[0]||(w[0]=b=>n.ConfigurationName=b),disabled:"",required:""},null,2),[[We,n.ConfigurationName]]),h("div",Vle,[s.value?(P(),F("div",Wle,pe(o.value),1)):(P(),F("div",zle,[$(Le,{t:"Configuration name is invalid. Possible reasons:"}),h("ul",Yle,[h("li",null,[$(Le,{t:"Configuration name already exist."})]),h("li",null,[$(Le,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])]),h("div",Hle,[h("div",jle,[h("div",null,[h("label",Kle,[h("small",null,[$(Le,{t:"Private Key"})])]),h("div",Ule,[Re(h("input",{type:"text",class:Ee(["form-control rounded-start-3",[c.value?"is-valid":"is-invalid"]]),id:"PrivateKey",required:"","onUpdate:modelValue":w[1]||(w[1]=b=>n.PrivateKey=b),disabled:""},null,2),[[We,n.PrivateKey]])])])]),h("div",Gle,[h("div",null,[h("label",Xle,[h("small",null,[$(Le,{t:"Public Key"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PublicKey","onUpdate:modelValue":w[2]||(w[2]=b=>n.PublicKey=b),disabled:""},null,512),[[We,n.PublicKey]])])])]),h("div",null,[h("label",qle,[h("small",null,[$(Le,{t:"Listen Port"})])]),Re(h("input",{type:"number",class:Ee(["form-control rounded-3",[u.value?"is-valid":"is-invalid"]]),placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":w[3]||(w[3]=b=>n.ListenPort=b),disabled:"",required:""},null,2),[[We,n.ListenPort]]),h("div",Zle,[s.value?(P(),F("div",Jle,pe(o.value),1)):(P(),F("div",Qle,[$(Le,{t:"Listen Port is invalid. Possible reasons:"}),h("ul",ece,[h("li",null,[$(Le,{t:"Invalid port."})]),h("li",null,[$(Le,{t:"Port is assigned to existing WireGuard Configuration. "})])])]))])]),h("div",null,[h("label",tce,[h("small",null,[$(Le,{t:"IP Address/CIDR"})]),h("small",{class:Ee(["ms-auto",[g.value>0?"text-success":"text-danger"]])},pe(g.value)+" Available IP Address ",3)]),Re(h("input",{type:"text",class:Ee(["form-control",[d.value?"is-valid":"is-invalid"]]),placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":w[4]||(w[4]=b=>n.Address=b),disabled:"",required:""},null,2),[[We,n.Address]]),h("div",nce,[s.value?(P(),F("div",ice,pe(o.value),1)):(P(),F("div",sce,[$(Le,{t:"IP Address/CIDR is invalid"})]))])]),h("div",rce,[h("div",oce,[h("h2",ace,[h("button",lce,[$(Le,{t:"Optional Settings"})])]),h("div",cce,[h("div",uce,[h("div",null,[h("label",dce,[h("small",null,[$(Le,{t:"PreUp"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PreUp",disabled:"","onUpdate:modelValue":w[5]||(w[5]=b=>n.PreUp=b)},null,512),[[We,n.PreUp]])]),h("div",null,[h("label",hce,[h("small",null,[$(Le,{t:"PreDown"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PreDown",disabled:"","onUpdate:modelValue":w[6]||(w[6]=b=>n.PreDown=b)},null,512),[[We,n.PreDown]])]),h("div",null,[h("label",fce,[h("small",null,[$(Le,{t:"PostUp"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PostUp",disabled:"","onUpdate:modelValue":w[7]||(w[7]=b=>n.PostUp=b)},null,512),[[We,n.PostUp]])]),h("div",null,[h("label",gce,[h("small",null,[$(Le,{t:"PostDown"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PostDown",disabled:"","onUpdate:modelValue":w[8]||(w[8]=b=>n.PostDown=b)},null,512),[[We,n.PostDown]])])])])])])]),h("div",pce,[h("div",mce,[h("h4",_ce,[$(Le,{t:"Database File"})]),h("h4",{class:Ee(["mb-0 ms-auto",[t.selectedConfigurationBackup.database?"text-success":"text-danger"]])},[h("i",{class:Ee(["bi",[t.selectedConfigurationBackup.database?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2)],2)]),t.selectedConfigurationBackup.database?(P(),F("div",vce,[h("div",yce,[h("div",bce,[h("div",wce,[h("div",xce,[w[10]||(w[10]=h("i",{class:"bi bi-person-fill me-2"},null,-1)),w[11]||(w[11]=Be(" Contain ")),h("strong",null,pe(p.value),1),Be(" Peer"+pe(p.value>1?"s":""),1)])])]),h("div",Ece,[h("div",Cce,[h("div",Sce,[w[12]||(w[12]=h("i",{class:"bi bi-person-fill-lock me-2"},null,-1)),w[13]||(w[13]=Be(" Contain ")),h("strong",null,pe(m.value),1),Be(" Restricted Peer"+pe(m.value>1?"s":""),1)])])])])])):se("",!0)]),h("div",kce,[h("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!f.value||r.value,onClick:w[9]||(w[9]=b=>x())},[w[14]||(w[14]=h("i",{class:"bi bi-clock-history me-2"},null,-1)),Be(" "+pe(r.value?"Restoring...":"Restore"),1)],8,Tce)])]))}},Pce={class:"mt-5 text-body"},Mce={class:"container mb-4"},Ice={class:"mb-5 d-flex align-items-center gap-4"},Dce={class:"mb-0"},Rce={key:0},$ce={class:"d-flex text-decoration-none text-body flex-grow-1 align-items-center gap-3"},Lce={class:"text-muted"},Oce={key:0,class:"ms-sm-auto"},Nce={key:0,id:"step1Detail"},Fce={class:"mb-4"},Bce={class:"d-flex gap-3 flex-column"},Vce={key:0},Wce={class:"my-5",key:"step2",id:"step2"},zce={class:"text-muted"},Yce={__name:"restoreConfiguration",setup(t){const e=me(void 0);Vt(()=>{Pt("/api/getAllWireguardConfigurationBackup",{},r=>{e.value=r.data})});const n=me(!1),i=me(void 0),s=me("");return(r,o)=>{const a=Se("RouterLink");return P(),F("div",Pce,[h("div",Mce,[h("div",Ice,[$(a,{to:"/new_configuration",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:Pe(()=>o[1]||(o[1]=[h("h2",{class:"mb-0",style:{"line-height":"0"}},[h("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1}),h("h2",Dce,[$(Le,{t:"Restore Configuration"})])]),e.value?(P(),F("div",Rce,[h("div",{class:Ee(["d-flex mb-5 align-items-center steps",{active:!n.value}]),role:"button",onClick:o[0]||(o[0]=l=>n.value=!1),key:"step1"},[h("div",$ce,[o[3]||(o[3]=h("h1",{class:"mb-0",style:{"line-height":"0"}},[h("i",{class:"bi bi-1-circle-fill"})],-1)),h("div",null,[o[2]||(o[2]=h("h4",{class:"mb-0"},"Step 1",-1)),h("small",Lce,[n.value?(P(),Ce(Le,{key:1,t:"Click to change a backup"})):(P(),Ce(Le,{key:0,t:"Select a backup you want to restore"}))])])]),$(vt,{name:"zoomReversed"},{default:Pe(()=>[n.value?(P(),F("div",Oce,[o[4]||(o[4]=h("small",{class:"text-muted"},"Selected Backup",-1)),h("h6",null,[h("samp",null,pe(i.value.filename),1)])])):se("",!0)]),_:1})],2),n.value?se("",!0):(P(),F("div",Nce,[h("div",Fce,[h("div",Bce,[(P(!0),F(Ie,null,Ge(Object.keys(e.value.NonExistingConfigurations),l=>(P(),Ce($le,{onSelect:c=>{i.value=c,s.value=l,n.value=!0},selectedConfigurationBackup:i.value,open:s.value===l,"configuration-name":l,backups:e.value.NonExistingConfigurations[l]},null,8,["onSelect","selectedConfigurationBackup","open","configuration-name","backups"]))),256)),Object.keys(e.value.NonExistingConfigurations).length===0?(P(),F("div",Vce,o[5]||(o[5]=[h("div",{class:"card rounded-3"},[h("div",{class:"card-body"},[h("p",{class:"mb-0"},"You don't have any configuration to restore")])],-1)]))):se("",!0)])])])),h("div",Wce,[h("div",{class:Ee(["steps d-flex text-decoration-none text-body flex-grow-1 align-items-center gap-3",{active:n.value}])},[o[7]||(o[7]=h("h1",{class:"mb-0",style:{"line-height":"0"}},[h("i",{class:"bi bi-2-circle-fill"})],-1)),h("div",null,[o[6]||(o[6]=h("h4",{class:"mb-0"},"Step 2",-1)),h("small",zce,[n.value?(P(),Ce(Le,{key:1,t:"Confirm & edit restore information"})):(P(),Ce(Le,{key:0,t:"Backup not selected"}))])])],2)]),n.value?(P(),Ce(Ace,{selectedConfigurationBackup:i.value,key:"confirm"},null,8,["selectedConfigurationBackup"])):se("",!0)])):se("",!0)])])}}},Hce=ze(Yce,[["__scopeId","data-v-1dc71439"]]),jce=async()=>{let t=!1;return await Pt("/api/validateAuthentication",{},e=>{t=e.status}),t},Ql=mL({history:U$(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:hO,meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:D3,meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:r8,meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:xae},{path:"/traceroute",name:"Traceroute",component:Kae},{name:"New Configuration",path:"/new_configuration",component:AW,meta:{title:"New Configuration"}},{name:"Restore Configuration",path:"/restore_configuration",component:Hce,meta:{title:"Restore Configuration"}},{name:"Configuration",path:"/configuration/:id",component:DW,meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:ine},{name:"Peers Create",path:"create",component:nT}]}]},{path:"/signin",component:s3,meta:{title:"Sign In"}},{path:"/welcome",component:C8,meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:hle,meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:Sle,meta:{title:"Share"}}]});Ql.beforeEach(async(t,e,n)=>{const i=$n(),s=Xe();t.meta.title?t.params.id?document.title=t.params.id+" | WGDashboard":document.title=t.meta.title+" | WGDashboard":document.title="WGDashboard",s.ShowNavBar=!1,document.querySelector(".loadingBar").classList.remove("loadingDone"),document.querySelector(".loadingBar").classList.add("loading"),t.meta.requiresAuth?s.getActiveCrossServer()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),n()):vL.getCookie("authToken")&&await jce()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),s.Redirect=void 0,n()):(s.Redirect=t,n("/signin"),s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning")):n()});Ql.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const bA=()=>{let t={"content-type":"application/json"};const n=Xe().getActiveCrossServer();return n&&(t["wg-dashboard-apikey"]=n.apiKey),t},wA=t=>{const n=Xe().getActiveCrossServer();return n?`${n.host}${t}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+t).replace(/\/\//g,"/")}`},Pt=async(t,e=void 0,n=void 0)=>{const i=new URLSearchParams(e);await fetch(`${wA(t)}?${i.toString()}`,{headers:bA()}).then(s=>{const r=Xe();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&r.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(s),Ql.push({path:"/signin"})})},dt=async(t,e,n)=>{await fetch(`${wA(t)}`,{headers:bA(),method:"POST",body:JSON.stringify(e)}).then(i=>{const s=Xe();if(i.ok)return i.json();if(i.status!==200)throw i.status===401&&s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(i.statusText)}).then(i=>n?n(i):void 0).catch(i=>{console.log(i),Ql.push({path:"/signin"})})},Xe=_C("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:void 0}),actions:{initCrossServerConfiguration(){const t=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),t===null?window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(t)},syncCrossServerConfiguration(){window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[Bs().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(t){delete this.CrossServerConfiguration.ServerList[t]},getActiveCrossServer(){const t=localStorage.getItem("ActiveCrossServerConfiguration");if(t!==null)return this.CrossServerConfiguration.ServerList[t]},setActiveCrossServer(t){this.ActiveServerConfiguration=t,localStorage.setItem("ActiveCrossServerConfiguration",t)},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await Pt("/api/getDashboardConfiguration",{},t=>{t.status&&(this.Configuration=t.data)})},async signOut(){await Pt("/api/signout",{},t=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(t,e,n){this.Messages.push({id:Bs(),from:At(t),content:At(e),type:n,show:!0})},applyLocale(t){if(this.Locale===null)return t;const n=Object.keys(this.Locale).filter(i=>t.match(new RegExp("^"+i+"$","g"))!==null);return console.log(n),n.length===0||n.length>1?t:this.Locale[n[0]]}}}),Kce={class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},Uce={class:"container-fluid d-flex text-body align-items-center"},Gce={key:0,class:"ms-auto text-muted"},Xce={__name:"App",setup(t){const e=Xe();e.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(e.IsElectronApp=!0,e.CrossServerConfiguration.Enable=!0),jt(e.CrossServerConfiguration,()=>{e.syncCrossServerConfiguration()},{deep:!0});const n=ve(()=>{if(e.ActiveServerConfiguration)return e.CrossServerConfiguration.ServerList[e.ActiveServerConfiguration]});return(i,s)=>(P(),F(Ie,null,[s[4]||(s[4]=h("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),h("nav",Kce,[h("div",Uce,[s[3]||(s[3]=h("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),n.value!==void 0?(P(),F("small",Gce,[s[1]||(s[1]=h("i",{class:"bi bi-server me-2"},null,-1)),Be(pe(n.value.host),1)])):se("",!0),h("a",{role:"button",class:"navbarBtn text-body",onClick:s[0]||(s[0]=r=>Z(e).ShowNavBar=!Z(e).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},s[2]||(s[2]=[h("i",{class:"bi bi-list"},null,-1)]))])]),(P(),Ce(x_,null,{default:Pe(()=>[$(Z(MC),null,{default:Pe(({Component:r})=>[$(vt,{name:"app",mode:"out-in",type:"transition",appear:""},{default:Pe(()=>[(P(),Ce(_a(r)))]),_:2},1024)]),_:1})]),_:1}))],64))}},qce=ze(Xce,[["__scopeId","data-v-ca898237"]]);let zm;await fetch("/api/locale").then(t=>t.json()).then(t=>zm=t.data).catch(()=>{zm=null});const Qv=o$(qce);Qv.use(Ql);const xA=u$();xA.use(({store:t})=>{t.$router=uf(Ql)});Qv.use(xA);const Zce=Xe();Zce.Locale=zm;Qv.mount("#app"); +`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),ab=new RegExp(`(?:^${mt}$)|(?:^${ai}$)`),lb=new RegExp(`^${mt}$`),cb=new RegExp(`^${ai}$`),li=e=>e&&e.exact?ab:new RegExp(`(?:${tn(e)}${mt}${tn(e)})|(?:${tn(e)}${ai}${tn(e)})`,"g");li.v4=e=>e&&e.exact?lb:new RegExp(`${tn(e)}${mt}${tn(e)}`,"g");li.v6=e=>e&&e.exact?cb:new RegExp(`${tn(e)}${ai}${tn(e)}`,"g");const Rf={exact:!1},If=`${li.v4().source}\\/(3[0-2]|[12]?[0-9])`,Pf=`${li.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,ub=new RegExp(`^${If}$`),fb=new RegExp(`^${Pf}$`),db=({exact:e}=Rf)=>e?ub:new RegExp(If,"g"),hb=({exact:e}=Rf)=>e?fb:new RegExp(Pf,"g"),Mf=db({exact:!0}),kf=hb({exact:!0}),qo=e=>Mf.test(e)?4:kf.test(e)?6:0;qo.v4=e=>Mf.test(e);qo.v6=e=>kf.test(e);const Mt=e=>{const t=fn();if(t.Locale===null)return e;const s=Object.keys(t.Locale).filter(r=>e.match(new RegExp("^"+r+"$","gi"))!==null);return s.length===0||s.length>1||t.Locale[s[0]].length===0?e:e.replace(new RegExp(s[0],"gi"),t.Locale[s[0]])},pb=Ef("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:Mt("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:Mt("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:Mt("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:Mt("Date"),value:"date",type:"date"}],Operator:[{display:Mt("larger than"),value:"lgt"}],Action:[{display:Mt("Restrict Peer"),value:"restrict"},{display:Mt("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Vr("/api/getWireguardConfigurations",{},e=>{e.status&&(this.Configurations=e.data)})},regexCheckIP(e){return/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/.test(e)},checkCIDR(e){return qo(e)!==0},checkWGKeyLength(e){return console.log(e),/^[A-Za-z0-9+/]{43}=?=?$/.test(e)}}}),gb=async()=>{let e=!1;return await Vr("/api/validateAuthentication",{},t=>{e=t.status}),e},fs=nb({history:RE(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:()=>Qe(()=>import("./index2.js"),__vite__mapDeps([0,1,2,3,4,5])),meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:()=>Qe(()=>import("./configurationList.js"),__vite__mapDeps([6,1,7])),meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:()=>Qe(()=>import("./settings.js"),__vite__mapDeps([8,1,3,9,10])),meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:()=>Qe(()=>import("./ping.js"),__vite__mapDeps([11,1,12,13,14]))},{path:"/traceroute",name:"Traceroute",component:()=>Qe(()=>import("./traceroute.js"),__vite__mapDeps([15,12,13,1,16]))},{name:"New Configuration",path:"/new_configuration",component:()=>Qe(()=>import("./newConfiguration.js"),__vite__mapDeps([17,18,19,1])),meta:{title:"New Configuration"}},{name:"Restore Configuration",path:"/restore_configuration",component:()=>Qe(()=>import("./restoreConfiguration.js"),__vite__mapDeps([20,1,3,18,21])),meta:{title:"Restore Configuration"}},{name:"Configuration",path:"/configuration/:id",component:()=>Qe(()=>import("./configuration.js"),[]),meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:()=>Qe(()=>import("./peerList.js"),__vite__mapDeps([22,1,3,23,24,19,25,9,26]))},{name:"Peers Create",path:"create",component:()=>Qe(()=>import("./peerCreate.js"),__vite__mapDeps([24,1,19,25]))}]}]},{path:"/signin",component:()=>Qe(()=>import("./signin.js"),__vite__mapDeps([27,2,1,3,4,28])),meta:{title:"Sign In"}},{path:"/welcome",component:()=>Qe(()=>import("./setup.js"),__vite__mapDeps([29,1])),meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:()=>Qe(()=>import("./totp.js"),__vite__mapDeps([30,23,1])),meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:()=>Qe(()=>import("./share.js"),__vite__mapDeps([31,23,1,32])),meta:{title:"Share"}}]});fs.beforeEach(async(e,t,n)=>{const s=pb(),r=fn();e.meta.title?e.params.id?document.title=e.params.id+" | WGDashboard":document.title=e.meta.title+" | WGDashboard":document.title="WGDashboard",r.ShowNavBar=!1,document.querySelector(".loadingBar").classList.remove("loadingDone"),document.querySelector(".loadingBar").classList.add("loading"),e.meta.requiresAuth?r.getActiveCrossServer()?(await r.getConfiguration(),!s.Configurations&&e.name!=="Configuration List"&&await s.getConfigurations(),n()):ob.getCookie("authToken")&&await gb()?(await r.getConfiguration(),!s.Configurations&&e.name!=="Configuration List"&&await s.getConfigurations(),r.Redirect=void 0,n()):(r.Redirect=e,n("/signin"),r.newMessage("WGDashboard","Sign in session ended, please sign in again","warning")):n()});fs.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const Vf=()=>{let e={"content-type":"application/json"};const n=fn().getActiveCrossServer();return n&&(e["wg-dashboard-apikey"]=n.apiKey),e},Ff=e=>{const n=fn().getActiveCrossServer();return n?`${n.host}${e}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+e).replace(/\/\//g,"/")}`},Vr=async(e,t=void 0,n=void 0)=>{const s=new URLSearchParams(t);await fetch(`${Ff(e)}?${s.toString()}`,{headers:Vf()}).then(r=>{const o=fn();if(r.ok)return r.json();if(r.status!==200)throw r.status===401&&o.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(r),fs.push({path:"/signin"})})},ay=async(e,t,n)=>{await fetch(`${Ff(e)}`,{headers:Vf(),method:"POST",body:JSON.stringify(t)}).then(s=>{const r=fn();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&r.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(s),fs.push({path:"/signin"})})};let vr;const mb=new Uint8Array(16);function _b(){if(!vr&&(vr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vr(mb)}const Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function vb(e,t=0){return Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]}const Eb=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),rc={randomUUID:Eb};function ic(e,t,n){if(rc.randomUUID&&!t&&!e)return rc.randomUUID();e=e||{};const s=e.random||(e.rng||_b)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,vb(s)}const fn=Ef("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:void 0}),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[ic().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(e){delete this.CrossServerConfiguration.ServerList[e]},getActiveCrossServer(){const e=localStorage.getItem("ActiveCrossServerConfiguration");if(e!==null)return this.CrossServerConfiguration.ServerList[e]},setActiveCrossServer(e){this.ActiveServerConfiguration=e,localStorage.setItem("ActiveCrossServerConfiguration",e)},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await Vr("/api/getDashboardConfiguration",{},e=>{e.status&&(this.Configuration=e.data)})},async signOut(){await Vr("/api/signout",{},e=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(e,t,n){this.Messages.push({id:ic(),from:Mt(e),content:Mt(t),type:n,show:!0})},applyLocale(e){if(this.Locale===null)return e;const n=Object.keys(this.Locale).filter(s=>e.match(new RegExp("^"+s+"$","g"))!==null);return console.log(n),n.length===0||n.length>1?e:this.Locale[n[0]]}}}),bb=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},yb={class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},Ab={class:"container-fluid d-flex text-body align-items-center"},Tb={key:0,class:"ms-auto text-muted"},Cb={__name:"App",setup(e){const t=fn();t.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(t.IsElectronApp=!0,t.CrossServerConfiguration.Enable=!0),Xn(t.CrossServerConfiguration,()=>{t.syncCrossServerConfiguration()},{deep:!0});const n=nt(()=>{if(t.ActiveServerConfiguration)return t.CrossServerConfiguration.ServerList[t.ActiveServerConfiguration]});return(s,r)=>(en(),hl(Ve,null,[r[4]||(r[4]=It("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),It("nav",yb,[It("div",Ab,[r[3]||(r[3]=It("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),n.value!==void 0?(en(),hl("small",Tb,[r[1]||(r[1]=It("i",{class:"bi bi-server me-2"},null,-1)),Ju(Vc(n.value.host),1)])):ev("",!0),It("a",{role:"button",class:"navbarBtn text-body",onClick:r[0]||(r[0]=o=>Ht(t).ShowNavBar=!Ht(t).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},r[2]||(r[2]=[It("i",{class:"bi bi-list"},null,-1)]))])]),(en(),Fs(U_,null,{default:yr(()=>[$e(Ht(Lf),null,{default:yr(({Component:o})=>[$e(gv,{name:"app",mode:"out-in",type:"transition",appear:""},{default:yr(()=>[(en(),Fs(p_(o)))]),_:2},1024)]),_:1})]),_:1}))],64))}},wb=bb(Cb,[["__scopeId","data-v-ca898237"]]);let ao;await fetch("/api/locale").then(e=>e.json()).then(e=>ao=e.data).catch(()=>{ao=null});const zo=Yv(wb);zo.use(fs);const Hf=Xv();Hf.use(({store:e})=>{e.$router=zr(fs)});zo.use(Hf);const Sb=fn();Sb.Locale=ao;zo.mount("#app");export{qb as $,ko as A,Ht as B,Ks as C,fn as D,Xn as E,Ve as F,Mt as G,iy as H,jc as I,ym as J,Au as K,iu as L,Uo as M,uv as N,Vo as O,fe as P,Qr as Q,Ro as R,U_ as S,ey as T,ty as U,Ub as V,pb as W,oy as X,Xb as Y,jb as Z,bb as _,It as a,zb as a0,Bb as a1,Z_ as a2,tv as a3,Ae as a4,Kb as a5,ny as a6,ry as a7,Qb as a8,c_ as a9,Jb as aa,_g as ab,Hb as ac,$e as b,hl as c,Ju as d,Yb as e,Vr as f,Fs as g,gv as h,p_ as i,ev as j,Wb as k,ic as l,ay as m,Yr as n,en as o,Rl as p,Xr as q,Gb as r,nt as s,Vc as t,Zb as u,Vv as v,yr as w,Hv as x,Ur as y,sy as z}; diff --git a/src/static/app/dist/assets/index2.css b/src/static/app/dist/assets/index2.css new file mode 100644 index 0000000..d82cf83 --- /dev/null +++ b/src/static/app/dist/assets/index2.css @@ -0,0 +1 @@ +@media screen and (max-width: 768px){.navbar-container[data-v-461d2bae]{position:absolute;z-index:1000;animation-duration:.4s;animation-fill-mode:both;display:none;animation-timing-function:cubic-bezier(.82,.58,.17,.9)}.navbar-container.active[data-v-461d2bae]{animation-direction:normal;display:block!important;animation-name:zoomInFade-461d2bae}}.navbar-container[data-v-461d2bae]{height:100vh}@supports (height: 100dvh){@media screen and (max-width: 768px){.navbar-container[data-v-461d2bae]{height:calc(100dvh - 50px)}}}@keyframes zoomInFade-461d2bae{0%{opacity:0;transform:translateY(60px);filter:blur(3px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}.messageCentre[data-v-93734089]{top:1rem;right:1rem;width:calc(100% - 2rem)}main[data-v-93734089]{height:100vh}@supports (height: 100dvh){@media screen and (max-width: 768px){main[data-v-93734089]{height:calc(100dvh - 50px)}}} diff --git a/src/static/app/dist/assets/index2.js b/src/static/app/dist/assets/index2.js new file mode 100644 index 0000000..c575ce7 --- /dev/null +++ b/src/static/app/dist/assets/index2.js @@ -0,0 +1 @@ +import{_ as h,W as y,D as p,f as w,G as M,o as n,c as l,a as t,b as s,w as i,F as x,r as C,n as v,d as g,t as b,e as u,g as f,T as $,h as N,i as T,S as D}from"./index.js";import{L}from"./localeText.js";import{M as G}from"./message.js";import"./dayjs.min.js";const V={name:"navbar",components:{LocaleText:L},setup(){const o=y(),e=p();return{wireguardConfigurationsStore:o,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){w("/api/getDashboardUpdate",{},o=>{o.status?(o.data&&(this.updateAvailable=!0,this.updateUrl=o.data),this.updateMessage=o.message):(this.updateMessage=M("Failed to check available update"),console.log(`Failed to get update: ${o.message}`))})}},B=["data-bs-theme"],W={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},F={class:"sidebar-sticky"},R={class:"nav flex-column px-2"},U={class:"nav-item"},z={class:"nav-item"},A={class:"nav-item"},H={class:"nav-link rounded-3",target:"_blank",href:"https://donaldzou.github.io/WGDashboard-Documentation/user-guides.html"},I={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},O={class:"nav flex-column px-2"},q={class:"nav-item"},E={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},P={class:"nav flex-column px-2"},j={class:"nav-item"},J={class:"nav-item"},K={class:"nav flex-column px-2 mb-3"},Q={class:"nav-item"},X={class:"nav-item",style:{"font-size":"0.8rem"}},Y=["href"],Z={class:"nav-link text-muted rounded-3"},tt={key:1,class:"nav-link text-muted rounded-3"};function et(o,e,k,c,S,_){const a=u("LocaleText"),r=u("RouterLink");return n(),l("div",{class:v(["col-md-3 col-lg-2 d-md-block p-2 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":c.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[t("nav",W,[t("div",F,[e[8]||(e[8]=t("h5",{class:"text-white text-center m-0 py-3 mb-3 btn-brand"},"WGDashboard",-1)),t("ul",R,[t("li",U,[s(r,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:i(()=>[e[1]||(e[1]=t("i",{class:"bi bi-house me-2"},null,-1)),s(a,{t:"Home"})]),_:1})]),t("li",z,[s(r,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:i(()=>[e[2]||(e[2]=t("i",{class:"bi bi-gear me-2"},null,-1)),s(a,{t:"Settings"})]),_:1})]),t("li",A,[t("a",H,[e[3]||(e[3]=t("i",{class:"bi bi-question-circle me-2"},null,-1)),s(a,{t:"Help"})])])]),e[9]||(e[9]=t("hr",{class:"text-body"},null,-1)),t("h6",I,[e[4]||(e[4]=t("i",{class:"bi bi-body-text me-2"},null,-1)),s(a,{t:"WireGuard Configurations"})]),t("ul",O,[(n(!0),l(x,null,C(this.wireguardConfigurationsStore.Configurations,d=>(n(),l("li",q,[s(r,{to:"/configuration/"+d.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:i(()=>[t("span",{class:v(["dot me-2",{active:d.Status}])},null,2),g(" "+b(d.Name),1)]),_:2},1032,["to"])]))),256))]),e[10]||(e[10]=t("hr",{class:"text-body"},null,-1)),t("h6",E,[e[5]||(e[5]=t("i",{class:"bi bi-tools me-2"},null,-1)),s(a,{t:"Tools"})]),t("ul",P,[t("li",j,[s(r,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:i(()=>[s(a,{t:"Ping"})]),_:1})]),t("li",J,[s(r,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:i(()=>[s(a,{t:"Traceroute"})]),_:1})])]),e[11]||(e[11]=t("hr",{class:"text-body"},null,-1)),t("ul",K,[t("li",Q,[t("a",{class:"nav-link text-danger rounded-3",onClick:e[0]||(e[0]=d=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[e[6]||(e[6]=t("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),s(a,{t:"Sign Out"})])]),t("li",X,[this.updateAvailable?(n(),l("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[t("small",Z,[s(a,{t:this.updateMessage},null,8,["t"]),e[7]||(e[7]=g(" (")),s(a,{t:"Current Version:"}),g(" "+b(c.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,Y)):(n(),l("small",tt,[s(a,{t:this.updateMessage},null,8,["t"]),g(" ("+b(c.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])])],10,B)}const st=h(V,[["render",et],["__scopeId","data-v-461d2bae"]]),at={name:"index",components:{Message:G,Navbar:st},async setup(){return{dashboardConfigurationStore:p()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(o=>o.show)}}},ot=["data-bs-theme"],nt={class:"row h-100"},it={class:"col-md-9 col-lg-10 overflow-y-scroll mb-0 pt-2"},rt={class:"messageCentre text-body position-fixed d-flex"};function lt(o,e,k,c,S,_){const a=u("Navbar"),r=u("RouterView"),d=u("Message");return n(),l("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[t("div",nt,[s(a),t("main",it,[(n(),f(D,null,{default:i(()=>[s(r,null,{default:i(({Component:m})=>[s(N,{name:"fade2",mode:"out-in",appear:""},{default:i(()=>[(n(),f(T(m)))]),_:2},1024)]),_:1})]),_:1})),t("div",rt,[s($,{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(()=>[(n(!0),l(x,null,C(_.getMessages.slice().reverse(),m=>(n(),f(d,{message:m,key:m.id},null,8,["message"]))),128))]),_:1})])])])],8,ot)}const gt=h(at,[["render",lt],["__scopeId","data-v-93734089"]]);export{gt as default}; diff --git a/src/static/app/dist/assets/index3.js b/src/static/app/dist/assets/index3.js new file mode 100644 index 0000000..b569214 --- /dev/null +++ b/src/static/app/dist/assets/index3.js @@ -0,0 +1 @@ +function f(e){return e.includes(":")?6:e.includes(".")?4:0}function b(e){const i=f(e);if(!i)throw new Error(`Invalid IP address: ${e}`);let n=0n,o=0n;const r=Object.create(null);if(i===4)for(const s of e.split(".").map(BigInt).reverse())n+=s*2n**o,o+=8n;else{if(e.includes(".")&&(r.ipv4mapped=!0,e=e.split(":").map(t=>{if(t.includes(".")){const[c,l,d,a]=t.split(".").map($=>Number($).toString(16).padStart(2,"0"));return`${c}${l}:${d}${a}`}else return t}).join(":")),e.includes("%")){let t;[,e,t]=/(.+)%(.+)/.exec(e)||[],r.scopeid=t}const s=e.split(":"),u=s.indexOf("");if(u!==-1)for(;s.length<8;)s.splice(u,0,"");for(const t of s.map(c=>BigInt(parseInt(c||"0",16))).reverse())n+=t*2n**o,o+=16n}return r.number=n,r.version=i,r}const p={4:32,6:128},I=e=>e.includes("/")?f(e):0;function m(e){const i=I(e),n=Object.create(null);if(i)n.cidr=e,n.version=i;else{const a=f(e);if(a)n.cidr=`${e}/${p[a]}`,n.version=a;else throw new Error(`Network is not a CIDR or IP: ${e}`)}const[o,r]=n.cidr.split("/");if(!/^[0-9]+$/.test(r))throw new Error(`Network is not a CIDR or IP: ${e}`);n.prefix=r,n.single=r===String(p[n.version]);const{number:s,version:u}=b(o),t=p[u],c=s.toString(2).padStart(t,"0"),l=Number(t-r),d=c.substring(0,t-l);return n.start=BigInt(`0b${d}${"0".repeat(l)}`),n.end=BigInt(`0b${d}${"1".repeat(l)}`),n}export{m as p}; diff --git a/src/static/app/dist/assets/localeText.js b/src/static/app/dist/assets/localeText.js new file mode 100644 index 0000000..645bb54 --- /dev/null +++ b/src/static/app/dist/assets/localeText.js @@ -0,0 +1 @@ +import{_ as t,G as e,t as o}from"./index.js";const s={name:"localeText",props:{t:""},computed:{getLocaleText(){return e(this.t)}}};function a(c,r,n,p,_,i){return o(this.getLocaleText)}const x=t(s,[["render",a]]);export{x as L}; diff --git a/src/static/app/dist/assets/message.css b/src/static/app/dist/assets/message.css new file mode 100644 index 0000000..0a8a1f9 --- /dev/null +++ b/src/static/app/dist/assets/message.css @@ -0,0 +1 @@ +.message[data-v-f50b8f0c]{width:100%}@media screen and (min-width: 576px){.message[data-v-f50b8f0c]{width:400px}} diff --git a/src/static/app/dist/assets/message.js b/src/static/app/dist/assets/message.js new file mode 100644 index 0000000..30007e2 --- /dev/null +++ b/src/static/app/dist/assets/message.js @@ -0,0 +1 @@ +import{L as c}from"./localeText.js";import{d as n}from"./dayjs.min.js";import{_ as d,o as r,c as m,a as s,b as i,d as t,t as e,n as l,e as _}from"./index.js";const p={name:"message",methods:{dayjs:n},components:{LocaleText:c},props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},g=["id"],h={class:"card-body"},f={class:"d-flex"},x={class:"fw-bold d-block",style:{"text-transform":"uppercase"}},u={class:"ms-auto"};function b(y,v,w,T,L,a){const o=_("LocaleText");return r(),m("div",{class:l(["card shadow rounded-3 position-relative message ms-auto",{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"}]),id:this.message.id},[s("div",h,[s("div",f,[s("small",x,[i(o,{t:"FROM "}),t(" "+e(this.message.from),1)]),s("small",u,e(a.dayjs().format("hh:mm A")),1)]),t(" "+e(this.message.content),1)])],10,g)}const M=d(p,[["render",b],["__scopeId","data-v-f50b8f0c"]]);export{M}; diff --git a/src/static/app/dist/assets/newConfiguration.js b/src/static/app/dist/assets/newConfiguration.js new file mode 100644 index 0000000..aa9c20a --- /dev/null +++ b/src/static/app/dist/assets/newConfiguration.js @@ -0,0 +1 @@ +import{p as b}from"./index3.js";import"./wireguard.js";import{_ as y,W as _,m as w,c as d,a as s,b as o,w as C,k as l,p as u,t as c,d as g,e as m,o as r}from"./index.js";import{L as P}from"./localeText.js";const x={name:"newConfiguration",components:{LocaleText:P},setup(){return{store:_()}},data(){return{newConfiguration:{ConfigurationName:"",Address:"",ListenPort:"",PrivateKey:"",PublicKey:"",PresharedKey:"",PreUp:"",PreDown:"",PostUp:"",PostDown:""},numberOfAvailableIPs:"0",error:!1,errorMessage:"",success:!1,loading:!1}},created(){this.wireguardGenerateKeypair()},methods:{wireguardGenerateKeypair(){const t=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=t.privateKey,this.newConfiguration.PublicKey=t.publicKey,this.newConfiguration.PresharedKey=t.presharedKey},async saveNewConfiguration(){this.goodToSubmit&&(this.loading=!0,await w("/api/addWireguardConfiguration",this.newConfiguration,async t=>{t.status?(this.success=!0,await this.store.getConfigurations(),this.$router.push(`/configuration/${this.newConfiguration.ConfigurationName}/peers`)):(this.error=!0,this.errorMessage=t.message,document.querySelector(`#${t.data}`).classList.remove("is-valid"),document.querySelector(`#${t.data}`).classList.add("is-invalid"),this.loading=!1)}))}},computed:{goodToSubmit(){let t=["ConfigurationName","Address","ListenPort","PrivateKey"],e=[...document.querySelectorAll("input[required]")];return t.find(a=>this.newConfiguration[a].length===0)===void 0&&e.find(a=>a.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(t){let e=document.querySelector("#Address");e.classList.remove("is-invalid","is-valid");try{if(t.trim().split("/").filter(p=>p.length>0).length!==2)throw Error();let a=b(t),f=a.end-a.start;this.numberOfAvailableIPs=f.toLocaleString(),e.classList.add("is-valid")}catch{this.numberOfAvailableIPs="0",e.classList.add("is-invalid")}},"newConfiguration.ListenPort"(t){let e=document.querySelector("#ListenPort");e.classList.remove("is-invalid","is-valid"),t<0||t>65353||!Number.isInteger(t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.ConfigurationName"(t){let e=document.querySelector("#ConfigurationName");e.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t)||t.length===0||this.store.Configurations.find(a=>a.Name===t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.PrivateKey"(t){let e=document.querySelector("#PrivateKey");e.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(t),e.classList.add("is-valid")}catch{e.classList.add("is-invalid")}}}},L={class:"mt-5 text-body"},K={class:"container mb-4"},k={class:"mb-4 d-flex align-items-center gap-4"},A={class:"mb-0"},U={class:"card rounded-3 shadow"},S={class:"card-header"},N={class:"card-body"},D=["disabled"],q={class:"invalid-feedback"},I={key:0},O={key:1},T={class:"mb-0"},$={class:"card rounded-3 shadow"},V={class:"card-header"},M={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},R={class:"mb-2"},B={class:"text-muted fw-bold mb-1"},E={class:"input-group"},G=["disabled"],W={class:"text-muted fw-bold mb-1"},z={class:"card rounded-3 shadow"},Z={class:"card-header"},j={class:"card-body"},F=["disabled"],H={class:"invalid-feedback"},J={key:0},Q={key:1},X={class:"card rounded-3 shadow"},Y={class:"card-header d-flex align-items-center"},ss={class:"badge rounded-pill text-bg-success ms-auto"},es={class:"card-body"},ts=["disabled"],is={class:"invalid-feedback"},os={key:0},ns={key:1},as={class:"accordion",id:"newConfigurationOptionalAccordion"},ds={class:"accordion-item"},rs={class:"accordion-header"},ls={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},us={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},cs={class:"accordion-body d-flex flex-column gap-3"},ps={class:"card rounded-3"},fs={class:"card-body"},gs={class:"card rounded-3"},ms={class:"card-body"},hs={class:"card rounded-3"},vs={class:"card-body"},bs={class:"card rounded-3"},ys={class:"card-body"},_s=["disabled"],ws={key:0,class:"d-flex w-100"},Cs={key:1,class:"d-flex w-100"},Ps={key:2,class:"d-flex w-100 align-items-center"};function xs(t,e,a,f,p,h){const v=m("RouterLink"),n=m("LocaleText");return r(),d("div",L,[s("div",K,[s("div",k,[o(v,{to:"/",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:C(()=>e[11]||(e[11]=[s("h2",{class:"mb-0",style:{"line-height":"0"}},[s("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1}),s("h2",A,[o(n,{t:"New Configuration"})])]),s("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[10]||(e[10]=i=>{i.preventDefault(),this.saveNewConfiguration()})},[s("div",U,[s("div",S,[o(n,{t:"Configuration Name"})]),s("div",N,[l(s("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":e[0]||(e[0]=i=>this.newConfiguration.ConfigurationName=i),disabled:this.loading,required:""},null,8,D),[[u,this.newConfiguration.ConfigurationName]]),s("div",q,[this.error?(r(),d("div",I,c(this.errorMessage),1)):(r(),d("div",O,[o(n,{t:"Configuration name is invalid. Possible reasons:"}),s("ul",T,[s("li",null,[o(n,{t:"Configuration name already exist."})]),s("li",null,[o(n,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),s("div",$,[s("div",V,[o(n,{t:"Private Key"}),e[12]||(e[12]=g(" & ")),o(n,{t:"Public Key"})]),s("div",M,[s("div",R,[s("label",B,[s("small",null,[o(n,{t:"Private Key"})])]),s("div",E,[l(s("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":e[1]||(e[1]=i=>this.newConfiguration.PrivateKey=i)},null,8,G),[[u,this.newConfiguration.PrivateKey]]),s("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=i=>h.wireguardGenerateKeypair())},e[13]||(e[13]=[s("i",{class:"bi bi-arrow-repeat"},null,-1)]))])]),s("div",null,[s("label",W,[s("small",null,[o(n,{t:"Public Key"})])]),l(s("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":e[3]||(e[3]=i=>this.newConfiguration.PublicKey=i),disabled:""},null,512),[[u,this.newConfiguration.PublicKey]])])])]),s("div",z,[s("div",Z,[o(n,{t:"Listen Port"})]),s("div",j,[l(s("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":e[4]||(e[4]=i=>this.newConfiguration.ListenPort=i),disabled:this.loading,required:""},null,8,F),[[u,this.newConfiguration.ListenPort]]),s("div",H,[this.error?(r(),d("div",J,c(this.errorMessage),1)):(r(),d("div",Q,[o(n,{t:"Invalid port"})]))])])]),s("div",X,[s("div",Y,[o(n,{t:"IP Address/CIDR"}),s("span",ss,c(p.numberOfAvailableIPs)+" Available IPs",1)]),s("div",es,[l(s("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":e[5]||(e[5]=i=>this.newConfiguration.Address=i),disabled:this.loading,required:""},null,8,ts),[[u,this.newConfiguration.Address]]),s("div",is,[this.error?(r(),d("div",os,c(this.errorMessage),1)):(r(),d("div",ns," IP Address/CIDR is invalid "))])])]),e[22]||(e[22]=s("hr",null,null,-1)),s("div",as,[s("div",ds,[s("h2",rs,[s("button",ls,[o(n,{t:"Optional Settings"})])]),s("div",us,[s("div",cs,[s("div",ps,[e[14]||(e[14]=s("div",{class:"card-header"},"PreUp",-1)),s("div",fs,[l(s("input",{type:"text",class:"form-control",id:"preUp","onUpdate:modelValue":e[6]||(e[6]=i=>this.newConfiguration.PreUp=i)},null,512),[[u,this.newConfiguration.PreUp]])])]),s("div",gs,[e[15]||(e[15]=s("div",{class:"card-header"},"PreDown",-1)),s("div",ms,[l(s("input",{type:"text",class:"form-control",id:"preDown","onUpdate:modelValue":e[7]||(e[7]=i=>this.newConfiguration.PreDown=i)},null,512),[[u,this.newConfiguration.PreDown]])])]),s("div",hs,[e[16]||(e[16]=s("div",{class:"card-header"},"PostUp",-1)),s("div",vs,[l(s("input",{type:"text",class:"form-control",id:"postUp","onUpdate:modelValue":e[8]||(e[8]=i=>this.newConfiguration.PostUp=i)},null,512),[[u,this.newConfiguration.PostUp]])])]),s("div",bs,[e[17]||(e[17]=s("div",{class:"card-header"},"PostDown",-1)),s("div",ys,[l(s("input",{type:"text",class:"form-control",id:"postDown","onUpdate:modelValue":e[9]||(e[9]=i=>this.newConfiguration.PostDown=i)},null,512),[[u,this.newConfiguration.PostDown]])])])])])])]),s("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?(r(),d("span",ws,[o(n,{t:"Success"}),e[18]||(e[18]=g("! ")),e[19]||(e[19]=s("i",{class:"bi bi-check-circle-fill ms-2"},null,-1))])):this.loading?(r(),d("span",Ps,[o(n,{t:"Saving..."}),e[21]||(e[21]=s("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1))])):(r(),d("span",Cs,[e[20]||(e[20]=s("i",{class:"bi bi-save-fill me-2"},null,-1)),o(n,{t:"Save"})]))],8,_s)],32)])])}const Us=y(x,[["render",xs]]);export{Us as default}; diff --git a/src/static/app/dist/assets/osmap.css b/src/static/app/dist/assets/osmap.css new file mode 100644 index 0000000..68bd3c9 --- /dev/null +++ b/src/static/app/dist/assets/osmap.css @@ -0,0 +1 @@ +:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.ol-overviewmap .ol-viewport:hover{cursor:pointer}.ol-layer canvas{border-radius:var(--bs-border-radius-lg)!important}#map{height:300px} diff --git a/src/static/app/dist/assets/osmap.js b/src/static/app/dist/assets/osmap.js new file mode 100644 index 0000000..24e3e87 --- /dev/null +++ b/src/static/app/dist/assets/osmap.js @@ -0,0 +1,10 @@ +import{_ as el,D as il,o as nl,c as sl,j as rl}from"./index.js";class fe{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const di={PROPERTYCHANGE:"propertychange"};class Wn{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function ol(n,t,e){let i,s;e=e||ae;let r=0,o=n.length,a=!1;for(;r>1),s=+e(n[i],t),s<0?r=i+1:(o=i,a=!s);return a?r:~r}function ae(n,t){return n>t?1:n0?s-1:s}return i-1}if(e>0){for(let s=1;s0||o===0)})}function Wi(){return!0}function Zn(){return!1}function fi(){}function No(n){let t,e,i;return function(){const s=Array.prototype.slice.call(arguments);return(!e||this!==i||!Ae(s,e))&&(i=this,e=s,t=n.apply(this,arguments)),t}}function hl(n){function t(){let e;try{e=n()}catch(i){return Promise.reject(i)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function nn(n){for(const t in n)delete n[t]}function gi(n){let t;for(t in n)return!1;return!t}class Kn extends Wn{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),s=i[t]||(i[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",i=e?t:t.type,s=this.listeners_&&this.listeners_[i];if(!s)return;const r=e?new fe(t):t;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let c=0,h=s.length;c0:!1}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const s=i.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[s]=fi,++this.pendingRemovals_[t]):(i.splice(s,1),i.length===0&&delete this.listeners_[t]))}}const z={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function V(n,t,e,i,s){if(s){const o=e;e=function(){n.removeEventListener(t,e),o.apply(i??this,arguments)}}else i&&i!==n&&(e=e.bind(i));const r={target:n,type:t,listener:e};return n.addEventListener(t,e),r}function vn(n,t,e,i){return V(n,t,e,i,!0)}function tt(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),nn(n))}class sn extends Kn{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(z.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,s=new Array(i);for(let r=0;r0;)this.pop()}extend(t){for(let e=0,i=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new gn(wt.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,s=e.length;i=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new gn(wt.REMOVE,e,t)),e}setAt(t,e){const i=this.getLength();if(t>=i){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const s=this.array_[t];this.array_[t]=e,this.dispatchEvent(new gn(wt.REMOVE,s,t)),this.dispatchEvent(new gn(wt.ADD,e,t))}updateLength_(){this.set(Nr.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,s=this.array_.length;i1?(e=s,i=r):l>0&&(e+=o*l,i+=a*l)}return hi(n,t,e,i)}function hi(n,t,e,i){const s=e-n,r=i-t;return s*s+r*r}function fl(n){const t=n.length;for(let i=0;ir&&(r=l,s=a)}if(r===0)return null;const o=n[s];n[s]=n[i],n[i]=o;for(let a=i+1;a=0;i--){e[i]=n[i][t]/n[i][i];for(let s=i-1;s>=0;s--)n[s][t]-=n[s][i]*e[i]}return e}function In(n){return n*Math.PI/180}function ci(n,t){const e=n%t;return e*t<0?e+t:e}function St(n,t,e){return n+e*(t-n)}function Vs(n,t){const e=Math.pow(10,t);return Math.round(n*e)/e}function _n(n,t){return Math.floor(Vs(n,t))}function mn(n,t){return Math.ceil(Vs(n,t))}class Go extends $t{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[J.OPACITY]=t.opacity!==void 0?t.opacity:1,j(typeof e[J.OPACITY]=="number","Layer opacity must be a number"),e[J.VISIBLE]=t.visible!==void 0?t.visible:!0,e[J.Z_INDEX]=t.zIndex,e[J.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[J.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[J.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[J.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},i=this.getZIndex();return e.opacity=st(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=i===void 0&&!e.managed?1/0:i,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return U()}getLayerStatesArray(t){return U()}getExtent(){return this.get(J.EXTENT)}getMaxResolution(){return this.get(J.MAX_RESOLUTION)}getMinResolution(){return this.get(J.MIN_RESOLUTION)}getMinZoom(){return this.get(J.MIN_ZOOM)}getMaxZoom(){return this.get(J.MAX_ZOOM)}getOpacity(){return this.get(J.OPACITY)}getSourceState(){return U()}getVisible(){return this.get(J.VISIBLE)}getZIndex(){return this.get(J.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(J.EXTENT,t)}setMaxResolution(t){this.set(J.MAX_RESOLUTION,t)}setMinResolution(t){this.set(J.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(J.MAX_ZOOM,t)}setMinZoom(t){this.set(J.MIN_ZOOM,t)}setOpacity(t){j(typeof t=="number","Layer opacity must be a number"),this.set(J.OPACITY,t)}setVisible(t){this.set(J.VISIBLE,t)}setZIndex(t){this.set(J.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Ot={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},mt={ANIMATING:0,INTERACTING:1},Nt={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},gl=42,Us=256,js={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class zo{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||js[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const rn=6378137,oi=Math.PI*rn,_l=[-oi,-oi,oi,oi],ml=[-180,-85,180,85],pn=rn*Math.log(Math.tan(Math.PI/2));class je extends zo{constructor(t){super({code:t,units:"m",extent:_l,global:!0,worldExtent:ml,getPointResolution:function(e,i){return e/Math.cosh(i[1]/rn)}})}}const Gr=[new je("EPSG:3857"),new je("EPSG:102100"),new je("EPSG:102113"),new je("EPSG:900913"),new je("http://www.opengis.net/def/crs/EPSG/0/3857"),new je("http://www.opengis.net/gml/srs/epsg.xml#3857")];function pl(n,t,e,i){const s=n.length;e=e>1?e:2,i=i??e,t===void 0&&(e>2?t=n.slice():t=new Array(s));for(let r=0;rpn?o=pn:o<-pn&&(o=-pn),t[r+1]=o}return t}function yl(n,t,e,i){const s=n.length;e=e>1?e:2,i=i??e,t===void 0&&(e>2?t=n.slice():t=new Array(s));for(let r=0;rs&&(l=l|ht.RIGHT),ar&&(l=l|ht.ABOVE),l===ht.UNKNOWN&&(l=ht.INTERSECTING),l}function Ft(){return[1/0,1/0,-1/0,-1/0]}function Se(n,t,e,i,s){return s?(s[0]=n,s[1]=t,s[2]=e,s[3]=i,s):[n,t,e,i]}function Bn(n){return Se(1/0,1/0,-1/0,-1/0,n)}function Yo(n,t){const e=n[0],i=n[1];return Se(e,i,e,i,t)}function $s(n,t,e,i,s){const r=Bn(s);return Zo(r,n,t,e,i)}function Yi(n,t){return n[0]==t[0]&&n[2]==t[2]&&n[1]==t[1]&&n[3]==t[3]}function Tl(n,t){return t[0]n[2]&&(n[2]=t[2]),t[1]n[3]&&(n[3]=t[3]),n}function zi(n,t){t[0]n[2]&&(n[2]=t[0]),t[1]n[3]&&(n[3]=t[1])}function Zo(n,t,e,i,s){for(;et[0]?i[0]=n[0]:i[0]=t[0],n[1]>t[1]?i[1]=n[1]:i[1]=t[1],n[2]=t[0]&&n[1]<=t[3]&&n[3]>=t[1]}function Hn(n){return n[2]=o&&_<=l),!i&&r&ht.RIGHT&&!(s&ht.RIGHT)&&(m=f-(d-l)*g,i=m>=a&&m<=c),!i&&r&ht.BELOW&&!(s&ht.BELOW)&&(_=d-(f-a)/g,i=_>=o&&_<=l),!i&&r&ht.LEFT&&!(s&ht.LEFT)&&(m=f-(d-o)*g,i=m>=a&&m<=c)}return i}function Bo(n,t){const e=t.getExtent(),i=Xe(n);if(t.canWrapX()&&(i[0]=e[2])){const s=q(e),o=Math.floor((i[0]-e[0])/s)*s;n[0]-=o,n[2]-=o}return n}function Js(n,t,e){if(t.canWrapX()){const i=t.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[i[0],n[1],i[2],n[3]]];Bo(n,t);const s=q(i);if(q(n)>s&&!e)return[[i[0],n[1],i[2],n[3]]];if(n[0]i[2])return[[n[0],n[1],i[2],n[3]],[i[0],n[1],n[2]-s,n[3]]]}return[n]}function Ml(n,t){return n[0]+=+t[0],n[1]+=+t[1],n}function Ln(n,t){let e=!0;for(let i=n.length-1;i>=0;--i)if(n[i]!=t[i]){e=!1;break}return e}function Qs(n,t){const e=Math.cos(t),i=Math.sin(t),s=n[0]*e-n[1]*i,r=n[1]*e+n[0]*i;return n[0]=s,n[1]=r,n}function bl(n,t){return n[0]*=t,n[1]*=t,n}function Vo(n,t){if(t.canWrapX()){const e=q(t.getExtent()),i=Dl(n,t,e);i&&(n[0]-=i*e)}return n}function Dl(n,t,e){const i=t.getExtent();let s=0;return t.canWrapX()&&(n[0]i[2])&&(e=e||q(i),s=Math.floor((n[0]-i[0])/e)),s}const Pl=63710088e-1;function Yr(n,t,e){e=e||Pl;const i=In(n[1]),s=In(t[1]),r=(s-i)/2,o=In(t[0]-n[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(s);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function Uo(...n){console.warn(...n)}let Os=!0;function jo(n){Os=!1}function tr(n,t){if(t!==void 0){for(let e=0,i=n.length;e=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(Os=!1,Uo("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function $o(n,t){return n}function Te(n,t){return n}function Nl(){Kr(Gr),Kr(Xr),kl(Xr,Gr,pl,yl)}Nl();function Br(n,t,e){return function(i,s,r,o,a){if(!i)return;if(!s&&!t)return i;const l=t?0:r[0]*s,c=t?0:r[1]*s,h=a?a[0]:0,u=a?a[1]:0;let d=n[0]+l/2+h,f=n[2]-l/2+h,g=n[1]+c/2+u,_=n[3]-c/2+u;d>f&&(d=(f+d)/2,f=d),g>_&&(g=(_+g)/2,_=g);let m=st(i[0],d,f),p=st(i[1],g,_);if(o&&e&&s){const y=30*s;m+=-y*Math.log(1+Math.max(0,d-i[0])/y)+y*Math.log(1+Math.max(0,i[0]-f)/y),p+=-y*Math.log(1+Math.max(0,g-i[1])/y)+y*Math.log(1+Math.max(0,i[1]-_)/y)}return[m,p]}}function Gl(n){return n}function nr(n,t,e,i){const s=q(t)/e[0],r=pt(t)/e[1];return i?Math.min(n,Math.max(s,r)):Math.min(n,Math.min(s,r))}function sr(n,t,e){let i=Math.min(n,t);const s=50;return i*=Math.log(1+s*Math.max(0,n/t-1))/s+1,e&&(i=Math.max(i,e),i/=Math.log(1+s*Math.max(0,e/n-1))/s+1),st(i,e/2,t*2)}function zl(n,t,e,i){return t=t!==void 0?t:!0,function(s,r,o,a){if(s!==void 0){const l=n[0],c=n[n.length-1],h=e?nr(l,e,o,i):l;if(a)return t?sr(s,h,c):st(s,c,h);const u=Math.min(h,s),d=Math.floor(Bs(n,u,r));return n[d]>h&&dMath.round(e*jr[i])/jr[i]).join(", ")+")"}function ve(n,t,e,i,s,r,o){r=r||[],o=o||2;let a=0;for(let l=t;l{if(!i)return this.getSimplifiedGeometry(e);const s=this.clone();return s.applyTransform(i),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return U()}closestPointXY(t,e,i,s){return U()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return U()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Bn(e),this.extentRevision_=this.getRevision()}return Ll(this.extent_,t)}rotate(t,e){U()}scale(t,e,i){U()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return U()}getType(){return U()}applyTransform(t){U()}intersectsExtent(t){return U()}translate(t,e){U()}transform(t,e){const i=kt(t),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),h=pt(c)/pt(l);return de(Hr,c[0],c[3],h,-h,0,0,0),ve(r,0,r.length,a,Hr,o),An(i,e)(r,o,a)}:An(i,e);return this.applyTransform(s),this}}class qn extends ql{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return $s(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return U()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length1)u=e;else if(d>0){for(let f=0;fs&&(s=c),r=a,o=l}return s}function Ql(n,t,e,i,s){for(let r=0,o=e.length;r0;){const u=c.pop(),d=c.pop();let f=0;const g=n[d],_=n[d+1],m=n[u],p=n[u+1];for(let y=d+i;yf&&(h=y,f=w)}f>s&&(l[(h-t)/i]=1,d+i0&&_>f)&&(g<0&&m0&&m>g)){c=u,h=d;continue}r[o++]=c,r[o++]=h,a=c,l=h,c=u,h=d}return r[o++]=c,r[o++]=h,o}function ea(n,t,e,i,s,r,o,a){for(let l=0,c=e.length;lr&&(c-a)*(r-l)-(s-a)*(h-l)>0&&o++:h<=r&&(c-a)*(r-l)-(s-a)*(h-l)<0&&o--,a=c,l=h}return o!==0}function na(n,t,e,i,s,r){if(e.length===0||!Ne(n,t,e[0],i,s,r))return!1;for(let o=1,a=e.length;op&&(c=(h+u)/2,na(n,t,e,i,c,g)&&(m=c,p=y)),h=u}return isNaN(m)&&(m=s[r]),o?(o.push(m,g,p),o):[m,g,p]}function ah(n,t,e,i,s){let r=[];for(let o=0,a=e.length;o=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:sa(n,t,e,i,function(o,a){return Al(s,o,a)}):!1}function ra(n,t,e,i,s){return!!(cr(n,t,e,i,s)||Ne(n,t,e,i,s[0],s[1])||Ne(n,t,e,i,s[0],s[3])||Ne(n,t,e,i,s[2],s[1])||Ne(n,t,e,i,s[2],s[3]))}function lh(n,t,e,i,s){if(!ra(n,t,e[0],i,s))return!1;if(e.length===1)return!0;for(let r=1,o=e.length;r0}function ch(n,t,e,i,s){s=s!==void 0?s:!1;for(let r=0,o=e.length;r1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let s=0;for(;s0}getInteracting(){return this.hints_[mt.INTERACTING]>0}cancelAnimations(){this.setHint(mt.ANIMATING,-this.hints_[mt.ANIMATING]);let t;for(let e=0,i=this.animations_.length;e=0;--i){const s=this.animations_[i];let r=!0;for(let o=0,a=s.length;o0?c/l.duration:1;h>=1?(l.complete=!0,h=1):r=!1;const u=l.easing(h);if(l.sourceCenter){const d=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],_=l.targetCenter[1];this.nextCenter_=l.targetCenter;const m=d+u*(g-d),p=f+u*(_-f);this.targetCenter_=[m,p]}if(l.sourceResolution&&l.targetResolution){const d=u===1?l.targetResolution:l.sourceResolution+u*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const d=u===1?ci(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+u*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(r){this.animations_[i]=null,this.setHint(mt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&yn(o,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const s=this.getCenterInternal();return s!==void 0&&(i=[s[0]-e[0],s[1]-e[1]],Qs(i,t-this.getRotation()),Ml(i,e)),i}calculateCenterZoom(t,e){let i;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const o=e[0]-t*(e[0]-s[0])/r,a=e[1]-t*(e[1]-s[1])/r;i=[o,a]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],s=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(s*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Fs(t,this.getProjection())}getCenterInternal(){return this.get(Nt.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return $o(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();j(e,"The view center is not defined");const i=this.getResolution();j(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return j(s!==void 0,"The view rotation is not defined"),Ps(e,i,s,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Nt.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Te(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=q(t)/e[0],s=pt(t)/e[1];return Math.max(i,s)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(e/i)/Math.log(t);return function(r){return e/Math.pow(t,r*s)}}getRotation(){return this.get(Nt.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(i/s)/e;return function(o){return Math.log(i/o)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const o=this.getViewportSizeMinusPadding_();s=gs(s,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,i)}return{center:s.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,i,s;if(this.resolutions_){const r=Bs(this.resolutions_,t,1);e=r,i=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=i/this.resolutions_[r+1]}else i=this.maxResolution_,s=this.zoomFactor_;return e+Math.log(i/t)/Math.log(s)}getResolutionForZoom(t){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];const e=st(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,st(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(j(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){j(!Hn(t),"Cannot fit empty extent provided as `geometry`");const s=Te(t,this.getProjection());i=to(s)}else if(t.getType()==="Circle"){const s=Te(t.getExtent(),this.getProjection());i=to(s),i.rotate(this.getRotation(),Xe(s))}else i=t;this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride();let a=1/0,l=1/0,c=-1/0,h=-1/0;for(let u=0,d=r.length;u{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const i=this.getMapInternal();!t&&i&&(t=i.getView()),t instanceof Vt?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let s;e.layerStatesArray?s=e.layerStatesArray.find(o=>o.layer===this):s=this.getLayerState();const r=this.getExtent();return dr(s,e.viewState)&&(!r||Tt(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];const e=this.getSource()?.getAttributions();if(!e)return[];const i=t instanceof Vt?t.getViewStateAndExtent():t;let s=e(i);return Array.isArray(s)||(s=[s]),s}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(J.MAP,t)}getMapInternal(){return this.get(J.MAP)}setMap(t){this.mapPrecomposeKey_&&(tt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(tt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=V(t,Ot.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=V(this,z.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);j(!e.some(s=>s.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}setSource(t){this.set(J.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function dr(n,t){if(!n.visible)return!1;const e=t.resolution;if(e=n.maxResolution)return!1;const i=t.zoom;return i>n.minZoom&&i<=n.maxZoom}function oa(n,t,e=0,i=n.length-1,s=mh){for(;i>e;){if(i-e>600){const l=i-e+1,c=t-e+1,h=Math.log(l),u=.5*Math.exp(2*h/3),d=.5*Math.sqrt(h*u*(l-u)/l)*(c-l/2<0?-1:1),f=Math.max(e,Math.floor(t-c*u/l+d)),g=Math.min(i,Math.floor(t+(l-c)*u/l+d));oa(n,t,f,g,s)}const r=n[t];let o=e,a=i;for(Ai(n,e,t),s(n[i],r)>0&&Ai(n,e,i);o0;)a--}s(n[e],r)===0?Ai(n,e,a):(a++,Ai(n,a,i)),a<=t&&(e=a+1),t<=a&&(i=a-1)}}function Ai(n,t,e){const i=n[t];n[t]=n[e],n[e]=i}function mh(n,t){return nt?1:0}let aa=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!xn(t,e))return i;const s=this.toBBox,r=[];for(;e;){for(let o=0;o=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)}_split(t,e){const i=t[e],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const o=this._chooseSplitIndex(i,r,s),a=ii(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,He(i,this.toBBox),He(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,e){this.data=ii([t,e]),this.data.height=t.height+1,this.data.leaf=!1,He(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let s,r=1/0,o=1/0;for(let a=e;a<=i-e;a++){const l=Pi(t,0,a,this.toBBox),c=Pi(t,a,i,this.toBBox),h=wh(l,c),u=_s(l)+_s(c);h=e;c--){const h=t.children[c];Oi(a,t.leaf?r(h):h),l+=En(a)}return l}_adjustParentBBoxes(t,e,i){for(let s=i;s>=0;s--)Oi(e[s],t)}_condense(t){for(let e=t.length-1,i;e>=0;e--)t[e].children.length===0?e>0?(i=t[e-1].children,i.splice(i.indexOf(t[e]),1)):this.clear():He(t[e],this.toBBox)}};function ph(n,t,e){if(!e)return t.indexOf(n);for(let i=0;i=n.minX&&t.maxY>=n.minY}function ii(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function eo(n,t,e,i,s){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=i)continue;const o=t+Math.ceil((e-t)/i/2)*i;oa(n,o,t,e,s),r.push(t,o,o,e)}}const Y={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function io(n){return n[0]>0&&n[1]>0}function Ch(n,t,e){return e===void 0&&(e=[0,0]),e[0]=n[0]*t+.5|0,e[1]=n[1]*t+.5|0,e}function vt(n,t){return Array.isArray(n)?n:(t===void 0?t=[n,n]:(t[0]=n,t[1]=n),t)}class Qn{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=vt(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Qn({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return U()}getImage(t){return U()}getHitDetectionImage(){return U()}getPixelRatio(t){return 1}getImageState(){return U()}getImageSize(){return U()}getOrigin(){return U()}getSize(){return U()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=vt(t)}listenImageChange(t){U()}load(){U()}unlistenImageChange(t){U()}ready(){return Promise.resolve()}}const Ui={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var ft={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};ft.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}};ft.max=ft.whitepoint[2].D65;ft.rgb=function(n,t){t=t||ft.whitepoint[2].E;var e=n[0]/t[0],i=n[1]/t[1],s=n[2]/t[2],r,o,a;return r=e*3.240969941904521+i*-1.537383177570093+s*-.498610760293,o=e*-.96924363628087+i*1.87596750150772+s*.041555057407175,a=e*.055630079696993+i*-.20397695888897+s*1.056971514242878,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,r=Math.min(Math.max(0,r),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[r*255,o*255,a*255]};Ui.xyz=function(n,t){var e=n[0]/255,i=n[1]/255,s=n[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=e*.41239079926595+i*.35758433938387+s*.18048078840183,o=e*.21263900587151+i*.71516867876775+s*.072192315360733,a=e*.019330818715591+i*.11919477979462+s*.95053215224966;return t=t||ft.whitepoint[2].E,[r*t[0],o*t[1],a*t[2]]};const fr={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(n,t,e){var i,s,r,o,a,l,c,h,u,d,f,g,_;if(r=n[0],o=n[1],a=n[2],r===0)return[0,0,0];var m=.0011070564598794539;return t=t||"D65",e=e||2,u=ft.whitepoint[e][t][0],d=ft.whitepoint[e][t][1],f=ft.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),_=9*d/(u+15*d+3*f),i=o/(13*r)+g||0,s=a/(13*r)+_||0,c=r>8?d*Math.pow((r+16)/116,3):d*r*m,l=c*9*i/(4*s)||0,h=c*(12-3*i-20*s)/(4*s)||0,[l,c,h]}};ft.luv=function(n,t,e){var i,s,r,o,a,l,c,h,u,d,f,g,_,m=.008856451679035631,p=903.2962962962961;t=t||"D65",e=e||2,u=ft.whitepoint[e][t][0],d=ft.whitepoint[e][t][1],f=ft.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),_=9*d/(u+15*d+3*f),l=n[0],c=n[1],h=n[2],i=4*l/(l+15*c+3*h)||0,s=9*c/(l+15*c+3*h)||0;var y=c/d;return r=y<=m?p*y:116*Math.pow(y,1/3)-16,o=13*r*(i-g),a=13*r*(s-_),[r,o,a]};var la={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(n){var t=n[0],e=n[1],i=n[2],s,r,o;return o=i/360*2*Math.PI,s=e*Math.cos(o),r=e*Math.sin(o),[t,s,r]},xyz:function(n){return fr.xyz(la.luv(n))}};fr.lchuv=function(n){var t=n[0],e=n[1],i=n[2],s=Math.sqrt(e*e+i*i),r=Math.atan2(i,e),o=r*360/2/Math.PI;return o<0&&(o+=360),[t,s,o]};ft.lchuv=function(n){return fr.lchuv(ft.luv(n))};const no={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]};var so={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Rh(n){var t,e=[],i=1,s;if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(n=String(n).toLowerCase(),no[n])e=no[n].slice(),s="rgb";else if(n==="transparent")i=0,s="rgb",e=[0,0,0];else if(n[0]==="#"){var r=n.slice(1),o=r.length,a=o<=4;i=1,a?(e=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],o===4&&(i=parseInt(r[3]+r[3],16)/255)):(e=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],o===8&&(i=parseInt(r[6]+r[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),s="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(n)){var l=t[1];s=l.replace(/a$/,"");var c=s==="cmyk"?4:s==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=e.shift()),e=e.map(function(h,u){if(h[h.length-1]==="%")return h=parseFloat(h)/100,u===3?h:s==="rgb"?h*255:s[0]==="h"||s[0]==="l"&&!u?h*100:s==="lab"?h*125:s==="lch"?u<2?h*150:h*360:s[0]==="o"&&!u?h:s==="oklab"?h*.4:s==="oklch"?u<2?h*.4:h*360:h;if(s[u]==="h"||u===2&&s[s.length-1]==="h"){if(so[h]!==void 0)return so[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),i=e.length>c?e.pop():1}else/[0-9](?:\s|\/|,)/.test(n)&&(e=n.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),s=n.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:e,alpha:i}}const ps={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(n){var t=n[0]/360,e=n[1]/100,i=n[2]/100,s,r,o,a,l,c=0;if(e===0)return l=i*255,[l,l,l];for(r=i<.5?i*(1+e):i+e-i*e,s=2*i-r,a=[0,0,0];c<3;)o=t+1/3*-(c-1),o<0?o++:o>1&&o--,l=6*o<1?s+(r-s)*6*o:2*o<1?r:3*o<2?s+(r-s)*(2/3-o)*6:s,a[c++]=l*255;return a}};Ui.hsl=function(n){var t=n[0]/255,e=n[1]/255,i=n[2]/255,s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a,l,c;return r===s?a=0:t===r?a=(e-i)/o:e===r?a=2+(i-t)/o:i===r&&(a=4+(t-e)/o),a=Math.min(a*60,360),a<0&&(a+=360),c=(s+r)/2,r===s?l=0:c<=.5?l=o/(r+s):l=o/(2-r-s),[a,l*100,c*100]};function Th(n){Array.isArray(n)&&n.raw&&(n=String.raw(...arguments)),n instanceof Number&&(n=+n);var t,e=Rh(n);if(!e.space)return[];const i=e.space[0]==="h"?ps.min:Ui.min,s=e.space[0]==="h"?ps.max:Ui.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],i[0]),s[0]),t[1]=Math.min(Math.max(e.values[1],i[1]),s[1]),t[2]=Math.min(Math.max(e.values[2],i[2]),s[2]),e.space[0]==="h"&&(t=ps.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}const gr=[NaN,NaN,NaN,0];function Ih(n){return typeof n=="string"?n:mr(n)}const vh=1024,Mi={};let ys=0;function Sh(n){if(n.length===4)return n;const t=n.slice();return t[3]=1,t}function ro(n){const t=ft.lchuv(Ui.xyz(n));return t[3]=n[3],t}function Lh(n){const t=ft.rgb(la.xyz(n));return t[3]=n[3],t}function _r(n){if(n==="none")return gr;if(Mi.hasOwnProperty(n))return Mi[n];if(ys>=vh){let e=0;for(const i in Mi)e++&3||(delete Mi[i],--ys)}const t=Th(n);if(t.length!==4)throw new Error('failed to parse "'+n+'" as color');for(const e of t)if(isNaN(e))throw new Error('failed to parse "'+n+'" as color');return ha(t),Mi[n]=t,++ys,t}function ji(n){return Array.isArray(n)?n:_r(n)}function ha(n){return n[0]=st(n[0]+.5|0,0,255),n[1]=st(n[1]+.5|0,0,255),n[2]=st(n[2]+.5|0,0,255),n[3]=st(n[3],0,1),n}function mr(n){let t=n[0];t!=(t|0)&&(t=t+.5|0);let e=n[1];e!=(e|0)&&(e=e+.5|0);let i=n[2];i!=(i|0)&&(i=i+.5|0);const s=n[3]===void 0?1:Math.round(n[3]*1e3)/1e3;return"rgba("+t+","+e+","+i+","+s+")"}const Le=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",Ah=Le.includes("firefox"),Mh=Le.includes("safari")&&!Le.includes("chrom");Mh&&(Le.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Le));const bh=Le.includes("webkit")&&!Le.includes("edge"),ca=Le.includes("macintosh"),ua=typeof devicePixelRatio<"u"?devicePixelRatio:1,da=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,fa=typeof Image<"u"&&Image.prototype.decode,ga=function(){let n=!1;try{const t=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return n}();function rt(n,t,e,i){let s;return e&&e.length?s=e.shift():da?s=new OffscreenCanvas(n||300,t||300):s=document.createElement("canvas"),n&&(s.width=n),t&&(s.height=t),s.getContext("2d",i)}let Es;function bn(){return Es||(Es=rt(1,1)),Es}function mi(n){const t=n.canvas;t.width=1,t.height=1,n.clearRect(0,0,1,1)}function oo(n,t){const e=t.parentNode;e&&e.replaceChild(n,t)}function Dh(n){for(;n.lastChild;)n.lastChild.remove()}function Ph(n,t){const e=n.childNodes;for(let i=0;;++i){const s=e[i],r=t[i];if(!s&&!r)break;if(s!==r){if(!s){n.appendChild(r);continue}if(!r){n.removeChild(s),--i;continue}n.insertBefore(r,s)}}}function Oh(n,t,e){const i=n;let s=!0,r=!1,o=!1;const a=[vn(i,z.LOAD,function(){o=!0,r||t()})];return i.src&&fa?(r=!0,i.decode().then(function(){s&&t()}).catch(function(l){s&&(o?t():e())})):a.push(vn(i,z.ERROR,e)),function(){s=!1,a.forEach(tt)}}function Fh(n,t){return new Promise((e,i)=>{function s(){o(),e(n)}function r(){o(),i(new Error("Image load error"))}function o(){n.removeEventListener("load",s),n.removeEventListener("error",r)}n.addEventListener("load",s),n.addEventListener("error",r)})}function kh(n,t){return t&&(n.src=t),n.src&&fa?new Promise((e,i)=>n.decode().then(()=>e(n)).catch(s=>n.complete&&n.width?e(n):i(s))):Fh(n)}class Nh{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];!(t++&3)&&!i.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const s=xs(t,e,i);return s in this.cache_?this.cache_[s]:null}getPattern(t,e,i){const s=xs(t,e,i);return s in this.patternCache_?this.patternCache_[s]:null}set(t,e,i,s,r){const o=xs(t,e,i),a=o in this.cache_;this.cache_[o]=s,r&&(s.getImageState()===Y.IDLE&&s.load(),s.getImageState()===Y.LOADING?s.ready().then(()=>{this.patternCache_[o]=bn().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=bn().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function xs(n,t,e){const i=e?ji(e):"null";return t+":"+n+":"+i}const Ht=new Nh;let bi=null;class Gh extends Kn{constructor(t,e,i,s,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=r,this.imageState_=s===void 0?Y.IDLE:s,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Y.LOADED){bi||(bi=rt(1,1,void 0,{willReadFrequently:!0})),bi.drawImage(this.image_,0,0);try{bi.getImageData(0,0,1,1),this.tainted_=!1}catch{bi=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(z.CHANGE)}handleImageError_(){this.imageState_=Y.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Y.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=rt(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Y.IDLE){this.image_||this.initializeImage_(),this.imageState_=Y.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&kh(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Y.LOADED)return;const e=this.image_,i=rt(Math.ceil(e.width*t),Math.ceil(e.height*t)),s=i.canvas;i.scale(t,t),i.drawImage(e,0,0),i.globalCompositeOperation="multiply",i.fillStyle=Ih(this.color_),i.fillRect(0,0,s.width/t,s.height/t),i.globalCompositeOperation="destination-in",i.drawImage(e,0,0),this.canvas_[t]=s}ready(){return this.ready_||(this.ready_=new Promise(t=>{if(this.imageState_===Y.LOADED||this.imageState_===Y.ERROR)t();else{const e=()=>{(this.imageState_===Y.LOADED||this.imageState_===Y.ERROR)&&(this.removeEventListener(z.CHANGE,e),t())};this.addEventListener(z.CHANGE,e)}})),this.ready_}}function pr(n,t,e,i,s,r){let o=t===void 0?void 0:Ht.get(t,e,s);return o||(o=new Gh(n,n&&"src"in n?n.src||void 0:t,e,i,s),Ht.set(t,e,s,o,r)),r&&o&&!Ht.getPattern(t,e,s)&&Ht.set(t,e,s,o,r),o}function qt(n){return n?Array.isArray(n)?mr(n):typeof n=="object"&&"src"in n?zh(n):n:null}function zh(n){if(!n.offset||!n.size)return Ht.getPattern(n.src,"anonymous",n.color);const t=n.src+":"+n.offset,e=Ht.getPattern(t,void 0,n.color);if(e)return e;const i=Ht.get(n.src,"anonymous",null);if(i.getImageState()!==Y.LOADED)return null;const s=rt(n.size[0],n.size[1]);return s.drawImage(i.getImage(1),n.offset[0],n.offset[1],n.size[0],n.size[1],0,0,n.size[0],n.size[1]),pr(s.canvas,t,void 0,Y.LOADED,n.color,!0),Ht.getPattern(t,void 0,n.color)}const wn="ol-hidden",ts="ol-unselectable",yr="ol-control",ao="ol-collapsed",Xh=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),lo=["style","variant","weight","size","lineHeight","family"],_a=function(n){const t=n.match(Xh);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=lo.length;iMath.max(s,Pn(n,r)),0);return e[t]=i,i}function Zh(n,t){const e=[],i=[],s=[];let r=0,o=0,a=0,l=0;for(let c=0,h=t.length;c<=h;c+=2){const u=t[c];if(u===` +`||c===h){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const d=t[c+1]||n.font,f=Pn(d,u);e.push(f),o+=f;const g=Yh(d);i.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:e,heights:i,lineWidths:s}}function Kh(n,t,e,i,s,r,o,a,l,c,h){n.save(),e!==1&&(n.globalAlpha===void 0?n.globalAlpha=u=>u.globalAlpha*=e:n.globalAlpha*=e),t&&n.transform.apply(n,t),i.contextInstructions?(n.translate(l,c),n.scale(h[0],h[1]),Bh(i,n)):h[0]<0||h[1]<0?(n.translate(l,c),n.scale(h[0],h[1]),n.drawImage(i,s,r,o,a,0,0,o,a)):n.drawImage(i,s,r,o,a,l,c,o*h[0],a*h[1]),n.restore()}function Bh(n,t){const e=n.contextInstructions;for(let i=0,s=e.length;ithis.imageState_=Y.LOADED),this.render()}clone(){const t=this.getScale(),e=new es({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,s=rt(i.size*t,i.size*t);this.draw_(i,s,t),e=s.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius,r=this.radius2_===void 0?s:this.radius2_;if(s{this.patternImage_=null}),e.getImageState()===Y.IDLE&&e.load(),e.getImageState()===Y.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}class Ei{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Ei({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}class ce{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=co,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new ce({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=co,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Vh(n){let t;if(typeof n=="function")t=n;else{let e;Array.isArray(n)?e=n:(j(typeof n.getZIndex=="function","Expected an `Style` or an array of `Style`"),e=[n]),t=function(){return e}}return t}let ws=null;function ya(n,t){if(!ws){const e=new wi({color:"rgba(255,255,255,0.4)"}),i=new Ei({color:"#3399CC",width:1.25});ws=[new ce({image:new on({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}return ws}function co(n){return n.getGeometry()}function uo(n,t,e,i){return e!==void 0&&i!==void 0?[e/n,i/t]:e!==void 0?e/n:i!==void 0?i/t:1}class is extends Qn{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,i=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:i,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const o=t.img!==void 0?t.img:null;let a=t.src;j(!(a!==void 0&&o),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&o&&(a=o.src||$(o)),j(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),j(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(t.src!==void 0?l=Y.IDLE:o!==void 0&&("complete"in o?o.complete?l=o.src?Y.LOADED:Y.IDLE:l=Y.LOADING:l=Y.LOADED),this.color_=t.color!==void 0?ji(t.color):null,this.iconImage_=pr(o,a,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,this.initialOptions_,t.width!==void 0||t.height!==void 0){let c,h;if(t.size)[c,h]=t.size;else{const u=this.getImage(1);if(u.width&&u.height)c=u.width,h=u.height;else if(u instanceof HTMLImageElement){this.initialOptions_=t;const d=()=>{if(this.unlistenImageChange(d),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(uo(f[0],f[1],t.width,t.height))};this.listenImageChange(d);return}}c!==void 0&&this.setScale(uo(c,h,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new is({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=i[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==Y.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==Y.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(z.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(z.CHANGE,t)}ready(){return this.iconImage_.ready()}}const Uh="#333";class Er{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=vt(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new wi({color:Uh}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Er({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=vt(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}let Ze=0;const Et=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},$h={[C.Get]:N(W(1,1/0),fo),[C.Var]:N(W(1,1),Jh),[C.Has]:N(W(1,1/0),fo),[C.Id]:N(Qh,qe),[C.Concat]:N(W(2,1/0),H(Rt)),[C.GeometryType]:N(tc,qe),[C.LineMetric]:N(qe),[C.Resolution]:N(qe),[C.Zoom]:N(qe),[C.Time]:N(qe),[C.Any]:N(W(2,1/0),H(Et)),[C.All]:N(W(2,1/0),H(Et)),[C.Not]:N(W(1,1),H(Et)),[C.Equal]:N(W(2,2),H(Cn)),[C.NotEqual]:N(W(2,2),H(Cn)),[C.GreaterThan]:N(W(2,2),H(B)),[C.GreaterThanOrEqualTo]:N(W(2,2),H(B)),[C.LessThan]:N(W(2,2),H(B)),[C.LessThanOrEqualTo]:N(W(2,2),H(B)),[C.Multiply]:N(W(2,1/0),go),[C.Coalesce]:N(W(2,1/0),go),[C.Divide]:N(W(2,2),H(B)),[C.Add]:N(W(2,1/0),H(B)),[C.Subtract]:N(W(2,2),H(B)),[C.Clamp]:N(W(3,3),H(B)),[C.Mod]:N(W(2,2),H(B)),[C.Pow]:N(W(2,2),H(B)),[C.Abs]:N(W(1,1),H(B)),[C.Floor]:N(W(1,1),H(B)),[C.Ceil]:N(W(1,1),H(B)),[C.Round]:N(W(1,1),H(B)),[C.Sin]:N(W(1,1),H(B)),[C.Cos]:N(W(1,1),H(B)),[C.Atan]:N(W(1,2),H(B)),[C.Sqrt]:N(W(1,1),H(B)),[C.Match]:N(W(4,1/0),_o,ic),[C.Between]:N(W(3,3),H(B)),[C.Interpolate]:N(W(6,1/0),_o,nc),[C.Case]:N(W(3,1/0),ec,sc),[C.In]:N(W(2,2),rc),[C.Number]:N(W(1,1/0),H(Cn)),[C.String]:N(W(1,1/0),H(Cn)),[C.Array]:N(W(1,1/0),H(B)),[C.Color]:N(W(1,4),H(B)),[C.Band]:N(W(1,3),H(B)),[C.Palette]:N(W(2,2),oc),[C.ToString]:N(W(1,1),H(Et|B|Rt|zt))};function fo(n,t,e){const i=n.length-1,s=new Array(i);for(let r=0;rt){const a=t===1/0?`${n} or more`:`${n} to ${t}`;throw new Error(`expected ${a} arguments for ${r}, got ${o}`)}}}function go(n,t,e){const i=n.length-1,s=new Array(i);for(let r=0;ri.featureId;case C.GeometryType:return i=>i.geometryType;case C.Concat:{const i=n.args.map(s=>Yt(s));return s=>"".concat(...i.map(r=>r(s).toString()))}case C.Resolution:return i=>i.resolution;case C.Any:case C.All:case C.Between:case C.In:case C.Not:return uc(n);case C.Equal:case C.NotEqual:case C.LessThan:case C.LessThanOrEqualTo:case C.GreaterThan:case C.GreaterThanOrEqualTo:return cc(n);case C.Multiply:case C.Divide:case C.Add:case C.Subtract:case C.Clamp:case C.Mod:case C.Pow:case C.Abs:case C.Floor:case C.Ceil:case C.Round:case C.Sin:case C.Cos:case C.Atan:case C.Sqrt:return dc(n);case C.Case:return fc(n);case C.Match:return gc(n);case C.Interpolate:return _c(n);case C.ToString:return mc(n);default:throw new Error(`Unsupported operator ${e}`)}}function lc(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let r=0;r{for(let o=0;o{for(let o=0;o{const r=n.args;let o=s.properties[i];for(let a=1,l=r.length;as.variables[i];case C.Has:return s=>{const r=n.args;if(!(i in s.properties))return!1;let o=s.properties[i];for(let a=1,l=r.length;ai(r)===s(r);case C.NotEqual:return r=>i(r)!==s(r);case C.LessThan:return r=>i(r)i(r)<=s(r);case C.GreaterThan:return r=>i(r)>s(r);case C.GreaterThanOrEqualTo:return r=>i(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${e}`)}}function uc(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let r=0;r{for(let o=0;o{for(let o=0;o{const o=s[0](r),a=s[1](r),l=s[2](r);return o>=a&&o<=l};case C.In:return r=>{const o=s[0](r);for(let a=1;a!s[0](r);default:throw new Error(`Unsupported logical operator ${e}`)}}function dc(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let r=0;r{let o=1;for(let a=0;as[0](r)/s[1](r);case C.Add:return r=>{let o=0;for(let a=0;as[0](r)-s[1](r);case C.Clamp:return r=>{const o=s[0](r),a=s[1](r);if(ol?l:o};case C.Mod:return r=>s[0](r)%s[1](r);case C.Pow:return r=>Math.pow(s[0](r),s[1](r));case C.Abs:return r=>Math.abs(s[0](r));case C.Floor:return r=>Math.floor(s[0](r));case C.Ceil:return r=>Math.ceil(s[0](r));case C.Round:return r=>Math.round(s[0](r));case C.Sin:return r=>Math.sin(s[0](r));case C.Cos:return r=>Math.cos(s[0](r));case C.Atan:return i===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case C.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${e}`)}}function fc(n,t){const e=n.args.length,i=new Array(e);for(let s=0;s{for(let r=0;r{const r=i[0](s);for(let o=1;o{const r=i[0](s),o=i[1](s);let a,l;for(let c=2;c=o)return c===2?u:d?pc(r,o,a,l,h,u):Gi(r,o,a,l,h,u);a=h,l=u}return l}}function mc(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let r=0;r{const o=s[0](r);return n.args[0].type===zt?mr(o):o.toString()};default:throw new Error(`Unsupported convert operator ${e}`)}}function Gi(n,t,e,i,s,r){const o=s-e;if(o===0)return i;const a=t-e,l=n===1?a/o:(Math.pow(n,a)-1)/(Math.pow(n,o)-1);return i+l*(r-i)}function pc(n,t,e,i,s,r){if(s-e===0)return i;const a=ro(i),l=ro(r);let c=l[2]-a[2];c>180?c-=360:c<-180&&(c+=360);const h=[Gi(n,t,e,a[0],s,l[0]),Gi(n,t,e,a[1],s,l[1]),a[2]+Gi(n,t,e,0,s,c),Gi(n,t,e,i[3],s,r[3])];return ha(Lh(h))}function yc(n){return!0}function Ec(n){const t=Ea(),e=xc(n,t),i=wa();return function(s,r){if(i.properties=s.getPropertiesInternal(),i.resolution=r,t.featureId){const o=s.getId();o!==void 0?i.featureId=o:i.featureId=null}return t.geometryType&&(i.geometryType=xa(s.getGeometry())),e(i)}}function mo(n){const t=Ea(),e=n.length,i=new Array(e);for(let o=0;onull;i=wr(n,t+"fill-color",e)}if(!i)return null;const s=new wi;return function(r){const o=i(r);return o===gr?null:(s.setColor(o),s)}}function tn(n,t,e){const i=It(n,t+"stroke-width",e),s=wr(n,t+"stroke-color",e);if(!i&&!s)return null;const r=oe(n,t+"stroke-line-cap",e),o=oe(n,t+"stroke-line-join",e),a=Ca(n,t+"stroke-line-dash",e),l=It(n,t+"stroke-line-dash-offset",e),c=It(n,t+"stroke-miter-limit",e),h=new Ei;return function(u){if(s){const d=s(u);if(d===gr)return null;h.setColor(d)}if(i&&h.setWidth(i(u)),r){const d=r(u);if(d!=="butt"&&d!=="round"&&d!=="square")throw new Error("Expected butt, round, or square line cap");h.setLineCap(d)}if(o){const d=o(u);if(d!=="bevel"&&d!=="round"&&d!=="miter")throw new Error("Expected bevel, round, or miter line join");h.setLineJoin(d)}return a&&h.setLineDash(a(u)),l&&h.setLineDashOffset(l(u)),c&&h.setMiterLimit(c(u)),h}}function wc(n,t){const e="text-",i=oe(n,e+"value",t);if(!i)return null;const s=Qi(n,e,t),r=Qi(n,e+"background-",t),o=tn(n,e,t),a=tn(n,e+"background-",t),l=oe(n,e+"font",t),c=It(n,e+"max-angle",t),h=It(n,e+"offset-x",t),u=It(n,e+"offset-y",t),d=en(n,e+"overflow",t),f=oe(n,e+"placement",t),g=It(n,e+"repeat",t),_=ns(n,e+"scale",t),m=en(n,e+"rotate-with-view",t),p=It(n,e+"rotation",t),y=oe(n,e+"align",t),x=oe(n,e+"justify",t),E=oe(n,e+"baseline",t),w=Ca(n,e+"padding",t),v=ss(n,e+"declutter-mode"),T=new Er({declutterMode:v});return function(R){if(T.setText(i(R)),s&&T.setFill(s(R)),r&&T.setBackgroundFill(r(R)),o&&T.setStroke(o(R)),a&&T.setBackgroundStroke(a(R)),l&&T.setFont(l(R)),c&&T.setMaxAngle(c(R)),h&&T.setOffsetX(h(R)),u&&T.setOffsetY(u(R)),d&&T.setOverflow(d(R)),f){const I=f(R);if(I!=="point"&&I!=="line")throw new Error("Expected point or line for text-placement");T.setPlacement(I)}if(g&&T.setRepeat(g(R)),_&&T.setScale(_(R)),m&&T.setRotateWithView(m(R)),p&&T.setRotation(p(R)),y){const I=y(R);if(I!=="left"&&I!=="center"&&I!=="right"&&I!=="end"&&I!=="start")throw new Error("Expected left, right, center, start, or end for text-align");T.setTextAlign(I)}if(x){const I=x(R);if(I!=="left"&&I!=="right"&&I!=="center")throw new Error("Expected left, right, or center for text-justify");T.setJustify(I)}if(E){const I=E(R);if(I!=="bottom"&&I!=="top"&&I!=="middle"&&I!=="alphabetic"&&I!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");T.setTextBaseline(I)}return w&&T.setPadding(w(R)),T}}function Cc(n,t){return"icon-src"in n?Rc(n,t):"shape-points"in n?Tc(n,t):"circle-radius"in n?Ic(n,t):null}function Rc(n,t){const e="icon-",i=e+"src",s=Ra(n[i],i),r=On(n,e+"anchor",t),o=ns(n,e+"scale",t),a=It(n,e+"opacity",t),l=On(n,e+"displacement",t),c=It(n,e+"rotation",t),h=en(n,e+"rotate-with-view",t),u=yo(n,e+"anchor-origin"),d=Eo(n,e+"anchor-x-units"),f=Eo(n,e+"anchor-y-units"),g=Mc(n,e+"color"),_=Lc(n,e+"cross-origin"),m=Ac(n,e+"offset"),p=yo(n,e+"offset-origin"),y=Fn(n,e+"width"),x=Fn(n,e+"height"),E=Sc(n,e+"size"),w=ss(n,e+"declutter-mode"),v=new is({src:s,anchorOrigin:u,anchorXUnits:d,anchorYUnits:f,color:g,crossOrigin:_,offset:m,offsetOrigin:p,height:x,width:y,size:E,declutterMode:w});return function(T){return a&&v.setOpacity(a(T)),l&&v.setDisplacement(l(T)),c&&v.setRotation(c(T)),h&&v.setRotateWithView(h(T)),o&&v.setScale(o(T)),r&&v.setAnchor(r(T)),v}}function Tc(n,t){const e="shape-",i=e+"points",s=e+"radius",r=zs(n[i],i),o=zs(n[s],s),a=Qi(n,e,t),l=tn(n,e,t),c=ns(n,e+"scale",t),h=On(n,e+"displacement",t),u=It(n,e+"rotation",t),d=en(n,e+"rotate-with-view",t),f=Fn(n,e+"radius2"),g=Fn(n,e+"angle"),_=ss(n,e+"declutter-mode"),m=new es({points:r,radius:o,radius2:f,angle:g,declutterMode:_});return function(p){return a&&m.setFill(a(p)),l&&m.setStroke(l(p)),h&&m.setDisplacement(h(p)),u&&m.setRotation(u(p)),d&&m.setRotateWithView(d(p)),c&&m.setScale(c(p)),m}}function Ic(n,t){const e="circle-",i=Qi(n,e,t),s=tn(n,e,t),r=It(n,e+"radius",t),o=ns(n,e+"scale",t),a=On(n,e+"displacement",t),l=It(n,e+"rotation",t),c=en(n,e+"rotate-with-view",t),h=ss(n,e+"declutter-mode"),u=new on({radius:5,declutterMode:h});return function(d){return r&&u.setRadius(r(d)),i&&u.setFill(i(d)),s&&u.setStroke(s(d)),a&&u.setDisplacement(a(d)),l&&u.setRotation(l(d)),c&&u.setRotateWithView(c(d)),o&&u.setScale(o(d)),u}}function It(n,t,e){if(!(t in n))return;const i=ge(n[t],B,e);return function(s){return zs(i(s),t)}}function oe(n,t,e){if(!(t in n))return null;const i=ge(n[t],Rt,e);return function(s){return Ra(i(s),t)}}function vc(n,t,e){const i=oe(n,t+"pattern-src",e),s=po(n,t+"pattern-offset",e),r=po(n,t+"pattern-size",e),o=wr(n,t+"color",e);return function(a){return{src:i(a),offset:s&&s(a),size:r&&r(a),color:o&&o(a)}}}function en(n,t,e){if(!(t in n))return null;const i=ge(n[t],Et,e);return function(s){const r=i(s);if(typeof r!="boolean")throw new Error(`Expected a boolean for ${t}`);return r}}function wr(n,t,e){if(!(t in n))return null;const i=ge(n[t],zt,e);return function(s){return Ta(i(s),t)}}function Ca(n,t,e){if(!(t in n))return null;const i=ge(n[t],We,e);return function(s){return an(i(s),t)}}function On(n,t,e){if(!(t in n))return null;const i=ge(n[t],We,e);return function(s){const r=an(i(s),t);if(r.length!==2)throw new Error(`Expected two numbers for ${t}`);return r}}function po(n,t,e){if(!(t in n))return null;const i=ge(n[t],We,e);return function(s){return Ia(i(s),t)}}function ns(n,t,e){if(!(t in n))return null;const i=ge(n[t],We|B,e);return function(s){return bc(i(s),t)}}function Fn(n,t){const e=n[t];if(e!==void 0){if(typeof e!="number")throw new Error(`Expected a number for ${t}`);return e}}function Sc(n,t){const e=n[t];if(e!==void 0){if(typeof e=="number")return vt(e);if(!Array.isArray(e))throw new Error(`Expected a number or size array for ${t}`);if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw new Error(`Expected a number or size array for ${t}`);return e}}function Lc(n,t){const e=n[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);return e}}function yo(n,t){const e=n[t];if(e!==void 0){if(e!=="bottom-left"&&e!=="bottom-right"&&e!=="top-left"&&e!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${t}`);return e}}function Eo(n,t){const e=n[t];if(e!==void 0){if(e!=="pixels"&&e!=="fraction")throw new Error(`Expected pixels or fraction for ${t}`);return e}}function Ac(n,t){const e=n[t];if(e!==void 0)return an(e,t)}function ss(n,t){const e=n[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);if(e!=="declutter"&&e!=="obstacle"&&e!=="none")throw new Error(`Expected declutter, obstacle, or none for ${t}`);return e}}function Mc(n,t){const e=n[t];if(e!==void 0)return Ta(e,t)}function an(n,t){if(!Array.isArray(n))throw new Error(`Expected an array for ${t}`);const e=n.length;for(let i=0;i4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function Ia(n,t){const e=an(n,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function bc(n,t){return typeof n=="number"?n:Ia(n,t)}const xo={RENDER_ORDER:"renderOrder"};class va extends Jn{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(xo.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter||(t.declutter[i]=new aa(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(xo.RENDER_ORDER,t)}setStyle(t){this.style_=t===void 0?ya:t;const e=Dc(t);this.styleFunction_=t===null?void 0:Vh(e),this.changed()}}function Dc(n){if(n===void 0)return ya;if(!n)return null;if(typeof n=="function"||n instanceof ce)return n;if(!Array.isArray(n))return mo([n]);if(n.length===0)return[];const t=n.length,e=n[0];if(e instanceof ce){const s=new Array(t);for(let r=0;r=0;--w){const v=_[w],T=v.layer;if(T.hasRenderer()&&dr(v,h)&&a.call(l,T)){const R=T.getRenderer(),I=T.getSource();if(R&&I){const G=I.getWrapX()?f:t,D=u.bind(null,v.managed);y[0]=G[0]+g[E][0],y[1]=G[1]+g[E][1],c=R.forEachFeatureAtCoordinate(y,e,i,D,p)}if(c)return c}}if(p.length===0)return;const x=1/p.length;return p.forEach((E,w)=>E.distanceSq+=w*x),p.sort((E,w)=>E.distanceSq-w.distanceSq),p.some(E=>c=E.callback(E.feature,E.layer,E.geometry)),c}hasFeatureAtCoordinate(t,e,i,s,r,o){return this.forEachFeatureAtCoordinate(t,e,i,s,Wi,this,r,o)!==void 0}getMap(){return this.map_}renderFrame(t){U()}scheduleExpireIconCache(t){Ht.canExpireCache()&&t.postRenderFunctions.push(Oc)}}function Oc(n,t){Ht.expire()}class Sa extends fe{constructor(t,e,i,s){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=s}}class Fc extends Pc{constructor(t){super(t),this.fontChangeListenerKey_=V(re,di.PROPERTYCHANGE,t.redrawText,t),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=ts+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const s=new Sa(t,void 0,e);i.dispatchEvent(s)}}disposeInternal(){tt(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Ot.PRECOMPOSE,t);const e=t.layerStatesArray.sort((a,l)=>a.zIndex-l.zIndex);e.some(a=>a.layer instanceof va&&a.layer.getDeclutter())&&(t.declutter={});const s=t.viewState;this.children_.length=0;const r=[];let o=null;for(let a=0,l=e.length;a=0;--i){const s=e[i],r=s.layer;r.getDeclutter()&&r.renderDeclutter(t,s)}e.forEach(i=>i.layer.renderDeferred(t))}}}class Re extends fe{constructor(t,e){super(t),this.layer=e}}const Cs={LAYERS:"layers"};class Ci extends Go{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Cs.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new jt(i.slice(),{unique:!0}):j(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new jt(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(tt),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(V(t,wt.ADD,this.handleLayersAdd_,this),V(t,wt.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(tt);nn(this.listenerKeys_);const e=t.getArray();for(let i=0,s=e.length;i{this.clickTimeoutId_=void 0;const i=new we(nt.SINGLECLICK,this.map_,t);this.dispatchEvent(i)},250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==nt.POINTERUP||e.type==nt.POINTERCANCEL){delete this.trackedTouches_[i];for(const s in this.trackedTouches_)if(this.trackedTouches_[s].target!==e.target){delete this.trackedTouches_[s];break}}else(e.type==nt.POINTERDOWN||e.type==nt.POINTERMOVE)&&(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new we(nt.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(tt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new we(nt.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),this.dragListenerKeys_.length===0){const i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(V(i,nt.POINTERMOVE,this.handlePointerMove_,this),V(i,nt.POINTERUP,this.handlePointerUp_,this),V(this.element_,nt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(V(this.element_.getRootNode(),nt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new we(nt.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new we(nt.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(tt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(tt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(tt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Ce={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},_t={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},kn=1/0;class Nc{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,nn(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const s=this.keyFunction_(i);return delete this.queuedElements_[s],i}enqueue(t){j(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=kn?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,s=e.length,r=e[t],o=i[t],a=t;for(;t>1;){const l=this.getLeftChildIndex_(t),c=this.getRightChildIndex_(t),h=ct;){const a=this.getParentIndex_(e);if(s[a]>o)i[e]=i[a],s[e]=s[a],e=a;else break}i[e]=r,s[e]=o}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let s=0;const r=e.length;let o,a,l;for(a=0;a0;){const s=this.dequeue()[0],r=s.getKey();s.getState()===M.IDLE&&!(r in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++i,s.load())}}}function zc(n,t,e,i,s){if(!n||!(e in n.wantedTiles)||!n.wantedTiles[e][t.getKey()])return kn;const r=n.viewState.center,o=i[0]-r[0],a=i[1]-r[1];return 65536*Math.log(s)+Math.sqrt(o*o+a*a)/s}class Cr extends $t{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&this.element?.remove();for(let e=0,i=this.listenerKeys.length;es.getAttributions(t)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(s=>i.add(s)):i.add(this.attributions_)),!this.overrideCollapsible_){const s=!e.some(r=>r.getSource()?.getAttributionsCollapsible()===!1);this.setCollapsible(s)}return Array.from(i)}async updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=await Promise.all(this.collectSourceAttributions_(t).map(s=>hl(()=>s))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Ae(e,this.renderedAttributions_)){Dh(this.ulElement_);for(let s=0,r=e.length;s0&&i%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:xi}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const s="rotate("+i+"rad)";if(this.autoHide_){const r=this.element.classList.contains(wn);!r&&i===0?this.element.classList.add(wn):r&&i!==0&&this.element.classList.remove(wn)}this.label_.style.transform=s}this.rotation_=i}}class Yc extends Cr{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",i=t.delta!==void 0?t.delta:1,s=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",o=t.zoomInLabel!==void 0?t.zoomInLabel:"+",a=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",c=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=s,h.setAttribute("type","button"),h.title=l,h.appendChild(typeof o=="string"?document.createTextNode(o):o),h.addEventListener(z.CLICK,this.handleClick_.bind(this,i),!1);const u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=c,u.appendChild(typeof a=="string"?document.createTextNode(a):a),u.addEventListener(z.CLICK,this.handleClick_.bind(this,-i),!1);const d=e+" "+ts+" "+yr,f=this.element;f.className=d,f.appendChild(h),f.appendChild(u),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const i=this.getMap().getView();if(!i)return;const s=i.getZoom();if(s!==void 0){const r=i.getConstrainedZoom(s+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:r,duration:this.duration_,easing:xi})):i.setZoom(r)}}}function Zc(n){n=n||{};const t=new jt;return(n.zoom!==void 0?n.zoom:!0)&&t.push(new Yc(n.zoomOptions)),(n.rotate!==void 0?n.rotate:!0)&&t.push(new Wc(n.rotateOptions)),(n.attribution!==void 0?n.attribution:!0)&&t.push(new Xc(n.attributionOptions)),t}const wo={ACTIVE:"active"};class ln extends $t{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(wo.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(wo.ACTIVE,t)}setMap(t){this.map_=t}}function Kc(n,t,e){const i=n.getCenterInternal();if(i){const s=[i[0]+t[0],i[1]+t[1]];n.animateInternal({duration:e!==void 0?e:250,easing:Kl,center:n.getConstrainedCenter(s)})}}function Rr(n,t,e,i){const s=n.getZoom();if(s===void 0)return;const r=n.getConstrainedZoom(s+t),o=n.getResolutionForZoom(r);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:o,anchor:e,duration:i!==void 0?i:250,easing:xi})}class Bc extends ln{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==nt.DBLCLICK){const i=t.originalEvent,s=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();Rr(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}class hn extends ln{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==nt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==nt.POINTERUP){const i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==nt.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==nt.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function Tr(n){const t=n.length;let e=0,i=0;for(let s=0;s0&&this.condition_(t)){const i=t.map.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class Qc extends hn{constructor(t){t=t||{},super({stopDown:Zn}),this.condition_=t.condition?t.condition:Vc,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Rs(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===rr)return;const s=e.getSize(),r=t.pixel,o=Math.atan2(s[1]/2-r[1],r[0]-s[0]/2);if(this.lastAngle_!==void 0){const a=o-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=o}handleUpEvent(t){return Rs(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Rs(t)&&Aa(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class tu extends Wn{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",s=this.element_.style;s.left=Math.min(t[0],e[0])+i,s.top=Math.min(t[1],e[1])+i,s.width=Math.abs(e[0]-t[0])+i,s.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,s=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);s[4]=s[0].slice(),this.geometry_?this.geometry_.setCoordinates([s]):this.geometry_=new Vi([s])}getGeometry(){return this.geometry_}}const $e={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Di extends fe{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class eu extends hn{constructor(t){super(),this.on,this.once,this.un,t=t??{},this.box_=new tu(t.className||"ol-dragbox"),this.minArea_=t.minArea??64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition??Aa,this.boxEndCondition_=t.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const s=i[0]-e[0],r=i[1]-e[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Di($e.BOXDRAG,t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Di(e?$e.BOXEND:$e.BOXCANCEL,t.coordinate,t)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Di($e.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Di($e.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}setMap(t){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Di($e.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(t)}}class iu extends eu{constructor(t){t=t||{};const e=t.condition?t.condition:qc;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const i=this.getMap().getView();let s=this.getGeometry();if(this.out_){const r=i.rotatedExtentForGeometry(s),o=i.getResolutionForExtentInternal(r),a=i.getResolution()/o;s=s.clone(),s.scale(a*a)}i.fitInternal(s,{duration:this.duration_,easing:xi})}}const Oe={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class nu extends ln{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return Ma(e)&&ba(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==z.KEYDOWN){const i=t.originalEvent,s=i.key;if(this.condition_(t)&&(s==Oe.DOWN||s==Oe.LEFT||s==Oe.RIGHT||s==Oe.UP)){const o=t.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,c=0;s==Oe.DOWN?c=-a:s==Oe.LEFT?l=-a:s==Oe.RIGHT?l=a:c=a;const h=[l,c];Qs(h,o.getRotation()),Kc(o,h,this.duration_),i.preventDefault(),e=!0}}return!e}}class su extends ln{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!Hc(e)&&ba(e)},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==z.KEYDOWN||t.type==z.KEYPRESS){const i=t.originalEvent,s=i.key;if(this.condition_(t)&&(s==="+"||s==="-")){const r=t.map,o=s==="+"?this.delta_:-this.delta_,a=r.getView();Rr(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}class ru{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[i+2]>t;)i-=3;const s=this.points_[e+2]-this.points_[i+2];if(s<1e3/60)return!1;const r=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/s,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class ou extends ln{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:jc;this.condition_=t.onFocusOnly?Ws(La,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(t){if(!this.condition_(t)||t.type!==z.WHEEL)return!0;const i=t.map,s=t.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.pixel);let r;if(t.type==z.WHEEL&&(r=s.deltaY,Ah&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=ua),s.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const o=Date.now();this.startTime_===void 0&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const a=i.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_?i.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=o,!1;this.totalDelta_+=r;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-st(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Rr(e,i,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}class au extends hn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Zn),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],s=this.targetPointers[1],r=Math.atan2(s.clientY-i.clientY,s.clientX-i.clientX);if(this.lastAngle_!==void 0){const l=r-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=l}this.lastAngle_=r;const o=t.map,a=o.getView();a.getConstraints().rotation!==rr&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Tr(this.targetPointers))),this.rotating_&&(o.render(),a.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}class lu extends hn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Zn),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],s=this.targetPointers[1],r=i.clientX-s.clientX,o=i.clientY-s.clientY,a=Math.sqrt(r*r+o*o);this.lastDistance_!==void 0&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,c=l.getView();e!=1&&(this.lastScaleDelta_=e),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(Tr(this.targetPointers))),l.render(),c.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const i=t.map.getView(),s=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,s),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}function hu(n){n=n||{};const t=new jt,e=new ru(-.005,.05,100);return(n.altShiftDragRotate!==void 0?n.altShiftDragRotate:!0)&&t.push(new Qc),(n.doubleClickZoom!==void 0?n.doubleClickZoom:!0)&&t.push(new Bc({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan!==void 0?n.dragPan:!0)&&t.push(new Jc({onFocusOnly:n.onFocusOnly,kinetic:e})),(n.pinchRotate!==void 0?n.pinchRotate:!0)&&t.push(new au),(n.pinchZoom!==void 0?n.pinchZoom:!0)&&t.push(new lu({duration:n.zoomDuration})),(n.keyboard!==void 0?n.keyboard:!0)&&(t.push(new nu),t.push(new su({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom!==void 0?n.mouseWheelZoom:!0)&&t.push(new ou({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom!==void 0?n.shiftDragZoom:!0)&&t.push(new iu({duration:n.zoomDuration})),t}function Da(n){if(n instanceof Jn){n.setMapInternal(null);return}n instanceof Ci&&n.getLayers().forEach(Da)}function Pa(n,t){if(n instanceof Jn){n.setMapInternal(t);return}if(n instanceof Ci){const e=n.getLayers().getArray();for(let i=0,s=e.length;ithis.updateSize()),this.controls=e.controls||Zc(),this.interactions=e.interactions||hu({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Gc(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(_t.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(_t.VIEW,this.handleViewChanged_),this.addChangeListener(_t.SIZE,this.handleSizeChanged_),this.addChangeListener(_t.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;t.view&&!(t.view instanceof Vt)&&t.view.then(function(s){i.setView(new Vt(s))}),this.controls.addEventListener(wt.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(wt.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(wt.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(wt.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(wt.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(wt.REMOVE,s=>{const r=s.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],s.element.setMap(null)}),this.controls.forEach(s=>{s.setMap(this)}),this.interactions.forEach(s=>{s.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){Pa(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const s=this.getCoordinateFromPixelInternal(t);i=i!==void 0?i:{};const r=i.hitTolerance!==void 0?i.hitTolerance:0,o=i.layerFilter!==void 0?i.layerFilter:Wi,a=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,a,e,null,o,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,function(s){i.push(s)},e),i}getAllLayers(){const t=[];function e(i){i.forEach(function(s){s instanceof Ci?e(s.getLayers()):t.push(s)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const s=e.layerFilter!==void 0?e.layerFilter:Wi,r=e.hitTolerance!==void 0?e.hitTolerance:0,o=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,o,s,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const i=this.viewport_.getBoundingClientRect(),s=this.getSize(),r=i.width/s[0],o=i.height/s[1],a="changedTouches"in t?t.changedTouches[0]:t;return[(a.clientX-i.left)/r,(a.clientY-i.top)/o]}getTarget(){return this.get(_t.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Fs(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?dt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(_t.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof jt){e.setLayers(t);return}const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e=0;r--){const o=s[r];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let s=this.maxTilesLoading_,r=s;if(t){const o=t.viewHints;if(o[mt.ANIMATING]||o[mt.INTERACTING]){const a=Date.now()-t.time>8;s=a?0:8,r=a?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Re("removelayer",e)),this.set(_t.LAYERGROUP,t)}setSize(t){this.set(_t.SIZE,t)}setTarget(t){this.set(_t.TARGET,t)}setView(t){if(!t||t instanceof Vt){this.set(_t.VIEW,t);return}this.set(_t.VIEW,new Vt);const e=this;t.then(function(i){e.setView(new Vt(i))})}updateSize(){const t=this.getTargetElement();let e;if(t){const s=getComputedStyle(t),r=t.offsetWidth-parseFloat(s.borderLeftWidth)-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderRightWidth),o=t.offsetHeight-parseFloat(s.borderTopWidth)-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderBottomWidth);!isNaN(r)&&!isNaN(o)&&(e=[Math.max(0,r),Math.max(0,o)],!io(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&Uo("No map visible because the map container's width or height are 0."))}const i=this.getSize();e&&(!i||!Ae(e,i))&&(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}function uu(n){let t=null;n.keyboardEventTarget!==void 0&&(t=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);const e={},i=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new Ci({layers:n.layers});e[_t.LAYERGROUP]=i,e[_t.TARGET]=n.target,e[_t.VIEW]=n.view instanceof Vt?n.view:new Vt;let s;n.controls!==void 0&&(Array.isArray(n.controls)?s=new jt(n.controls.slice()):(j(typeof n.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),s=n.controls));let r;n.interactions!==void 0&&(Array.isArray(n.interactions)?r=new jt(n.interactions.slice()):(j(typeof n.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),r=n.interactions));let o;return n.overlays!==void 0?Array.isArray(n.overlays)?o=new jt(n.overlays.slice()):(j(typeof n.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=n.overlays):o=new jt,{controls:s,interactions:r,keyboardEventTarget:t,overlays:o,values:e}}class Ir extends Kn{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(z.CHANGE)}release(){this.state===M.ERROR&&this.setState(M.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==M.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){U()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(!i)i=e,this.transitionStarts_[t]=i;else if(i===-1)return 1;const s=e-i+1e3/60;return s>=this.transition_?1:Jo(s/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}class Oa extends Ir{constructor(t,e,i,s,r,o){super(t,e,o),this.crossOrigin_=s,this.src_=i,this.key=i,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=M.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=M.ERROR,this.unlistenImage_(),this.image_=du(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=M.LOADED:this.state=M.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==M.ERROR&&(this.state=M.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==M.IDLE&&(this.state=M.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Oh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}function du(){const n=rt(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}const Fa=.5,fu=10,Co=.25;class ka{constructor(t,e,i,s,r,o){this.sourceProj_=t,this.targetProj_=e;let a={};const l=An(this.targetProj_,this.sourceProj_);this.transformInv_=function(y){const x=y[0]+"/"+y[1];return a[x]||(a[x]=l(y)),a[x]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&q(s)>=q(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?q(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?q(this.targetProj_.getExtent()):null;const c=Ye(i),h=jn(i),u=Un(i),d=Vn(i),f=this.transformInv_(c),g=this.transformInv_(h),_=this.transformInv_(u),m=this.transformInv_(d),p=fu+(o?Math.max(0,Math.ceil(Math.log2(Zi(i)/(o*o*256*256)))):0);if(this.addQuad_(c,h,u,d,f,g,_,m,p),this.wrapsXInSource_){let y=1/0;this.triangles_.forEach(function(x,E,w){y=Math.min(y,x.source[0][0],x.source[1][0],x.source[2][0])}),this.triangles_.forEach(x=>{if(Math.max(x.source[0][0],x.source[1][0],x.source[2][0])-y>this.sourceWorldWidth_/2){const E=[[x.source[0][0],x.source[0][1]],[x.source[1][0],x.source[1][1]],[x.source[2][0],x.source[2][1]]];E[0][0]-y>this.sourceWorldWidth_/2&&(E[0][0]-=this.sourceWorldWidth_),E[1][0]-y>this.sourceWorldWidth_/2&&(E[1][0]-=this.sourceWorldWidth_),E[2][0]-y>this.sourceWorldWidth_/2&&(E[2][0]-=this.sourceWorldWidth_);const w=Math.min(E[0][0],E[1][0],E[2][0]);Math.max(E[0][0],E[1][0],E[2][0])-w.5&&u<1;let g=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const m=Wr([t,e,i,s]);g=q(m)/this.targetWorldWidth_>Co||g}!f&&this.sourceProj_.isGlobal()&&u&&(g=u>Co||g)}if(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!Tt(h,this.maxSourceExtent_))return;let _=0;if(!g&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(c>0)g=!0;else if(_=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),_!=1&&_!=2&&_!=4&&_!=8)return}if(c>0){if(!g){const m=[(t[0]+i[0])/2,(t[1]+i[1])/2],p=this.transformInv_(m);let y;f?y=(ci(r[0],d)+ci(a[0],d))/2-ci(p[0],d):y=(r[0]+a[0])/2-p[0];const x=(r[1]+a[1])/2-p[1];g=y*y+x*x>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const m=[(e[0]+i[0])/2,(e[1]+i[1])/2],p=this.transformInv_(m),y=[(s[0]+t[0])/2,(s[1]+t[1])/2],x=this.transformInv_(y);this.addQuad_(t,e,m,y,r,o,p,x,c-1),this.addQuad_(y,m,i,s,x,p,a,l,c-1)}else{const m=[(t[0]+e[0])/2,(t[1]+e[1])/2],p=this.transformInv_(m),y=[(i[0]+s[0])/2,(i[1]+s[1])/2],x=this.transformInv_(y);this.addQuad_(t,m,y,s,r,p,x,l,c-1),this.addQuad_(m,e,i,y,p,o,a,x,c-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}_&11||this.addTriangle_(t,i,s,r,a,l),_&14||this.addTriangle_(t,i,e,r,a,o),_&&(_&13||this.addTriangle_(e,s,t,o,l,r),_&7||this.addTriangle_(e,s,i,o,l,a))}calculateSourceExtent(){const t=Ft();return this.triangles_.forEach(function(e,i,s){const r=e.source;zi(t,r[0]),zi(t,r[1]),zi(t,r[2])}),t}getTriangles(){return this.triangles_}}let Ts;const ue=[];function Ro(n,t,e,i,s){n.beginPath(),n.moveTo(0,0),n.lineTo(t,e),n.lineTo(i,s),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(t,i)+1,Math.max(e,s)),n.restore()}function Is(n,t){return Math.abs(n[t*4]-210)>2||Math.abs(n[t*4+3]-.75*255)>2}function gu(){if(Ts===void 0){const n=rt(6,6,ue);n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",Ro(n,4,5,4,0),Ro(n,4,5,0,5);const t=n.getImageData(0,0,3,3).data;Ts=Is(t,0)||Is(t,4)||Is(t,8),mi(n),ue.push(n.canvas)}return Ts}function To(n,t,e,i){const s=qo(e,t,n);let r=Zr(t,i,e);const o=t.getMetersPerUnit();o!==void 0&&(r*=o);const a=n.getMetersPerUnit();a!==void 0&&(r/=a);const l=n.getExtent();if(!l||_i(l,s)){const c=Zr(n,r,s)/r;isFinite(c)&&c>0&&(r/=c)}return r}function Na(n,t,e,i){const s=Xe(e);let r=To(n,t,s,i);return(!isFinite(r)||r<=0)&&Ko(e,function(o){return r=To(n,t,o,i),isFinite(r)&&r>0}),r}function Ga(n,t,e,i,s,r,o,a,l,c,h,u,d,f){const g=rt(Math.round(e*n),Math.round(e*t),ue);if(u||(g.imageSmoothingEnabled=!1),l.length===0)return g.canvas;g.scale(e,e);function _(w){return Math.round(w*e)/e}g.globalCompositeOperation="lighter";const m=Ft();l.forEach(function(w,v,T){Tl(m,w.extent)});let p;const y=e/i,x=(u?1:1+Math.pow(2,-24))/y;if(!d||l.length!==1||c!==0){if(p=rt(Math.round(q(m)*y),Math.round(pt(m)*y),ue),u||(p.imageSmoothingEnabled=!1),s&&f){const w=(s[0]-m[0])*y,v=-(s[3]-m[3])*y,T=q(s)*y,R=pt(s)*y;p.rect(w,v,T,R),p.clip()}l.forEach(function(w,v,T){if(w.image.width>0&&w.image.height>0){if(w.clipExtent){p.save();const b=(w.clipExtent[0]-m[0])*y,O=-(w.clipExtent[3]-m[3])*y,A=q(w.clipExtent)*y,F=pt(w.clipExtent)*y;p.rect(u?b:Math.round(b),u?O:Math.round(O),u?A:Math.round(b+A)-Math.round(b),u?F:Math.round(O+F)-Math.round(O)),p.clip()}const R=(w.extent[0]-m[0])*y,I=-(w.extent[3]-m[3])*y,G=q(w.extent)*y,D=pt(w.extent)*y;p.drawImage(w.image,c,c,w.image.width-2*c,w.image.height-2*c,u?R:Math.round(R),u?I:Math.round(I),u?G:Math.round(R+G)-Math.round(R),u?D:Math.round(I+D)-Math.round(I)),w.clipExtent&&p.restore()}})}const E=Ye(o);return a.getTriangles().forEach(function(w,v,T){const R=w.source,I=w.target;let G=R[0][0],D=R[0][1],b=R[1][0],O=R[1][1],A=R[2][0],F=R[2][1];const L=_((I[0][0]-E[0])/r),Z=_(-(I[0][1]-E[1])/r),K=_((I[1][0]-E[0])/r),et=_(-(I[1][1]-E[1])/r),k=_((I[2][0]-E[0])/r),X=_(-(I[2][1]-E[1])/r),Q=G,ct=D;G=0,D=0,b-=Q,O-=ct,A-=Q,F-=ct;const S=[[b,O,0,0,K-L],[A,F,0,0,k-L],[0,0,b,O,et-Z],[0,0,A,F,X-Z]],xt=fl(S);if(!xt)return;if(g.save(),g.beginPath(),gu()||!u){g.moveTo(K,et);const at=4,Zt=L-K,Jt=Z-et;for(let Lt=0;Lt{const G=e.getTileRangeForExtentAndZ(I,this.sourceZ_);for(let D=G.minX;D<=G.maxX;D++)for(let b=G.minY;b<=G.maxY;b++){const O=c(this.sourceZ_,D,b,a);if(O){const A=T*v;this.sourceTiles_.push({tile:O,offset:A})}}++T}),this.sourceTiles_.length===0&&(this.state=M.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{const i=e.tile;if(i&&i.getState()==M.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);s[0]+=e.offset,s[2]+=e.offset;const r=this.clipExtent_?.slice();r&&(r[0]+=e.offset,r[2]+=e.offset),t.push({extent:s,clipExtent:r,image:i.getImage()})}}),this.sourceTiles_.length=0,t.length===0)this.state=M.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),s=typeof i=="number"?i:i[0],r=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Ga(s,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=M.LOADED}this.changed()}load(){if(this.state==M.IDLE){this.state=M.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const i=e.getState();if(i==M.IDLE||i==M.LOADING){t++;const s=V(e,z.CHANGE,r=>{const o=e.getState();(o==M.LOADED||o==M.ERROR||o==M.EMPTY)&&(tt(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e},i,s){e.getState()==M.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(tt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(mi(this.canvas_.getContext("2d")),ue.push(this.canvas_),this.canvas_=null),super.release()}}const vs={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class za extends $t{constructor(t){super(),this.projection=kt(t.projection),this.attributions_=Io(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible??!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(i,s){e.viewResolver=i,e.viewRejector=s})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Io(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Io(n){return n?typeof n=="function"?n:(Array.isArray(n)||(n=[n]),t=>n):null}class vr{constructor(t,e,i,s){this.minX=t,this.maxX=e,this.minY=i,this.maxY=s}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Je(n,t,e,i,s){return s!==void 0?(s.minX=n,s.maxX=t,s.minY=e,s.maxY=i,s):new vr(n,t,e,i)}function Nn(n,t,e,i){return i!==void 0?(i[0]=n,i[1]=t,i[2]=e,i):[n,t,e]}function _u(n,t,e){return n+"/"+t+"/"+e}function mu(n){return pu(n[0],n[1],n[2])}function pu(n,t,e){return(t<e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(i,s):!0}const Qe=[0,0,0],pe=5;class Xa{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,j(ll(this.resolutions_,(s,r)=>r-s),"`resolutions` must be sorted in descending order");let e;if(!t.origins){for(let s=0,r=this.resolutions_.length-1;s{const o=new vr(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(i){const a=this.getTileRangeForExtentAndZ(i,r);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o}):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const s=this.getTileRangeForExtentAndZ(t,e);for(let r=s.minX,o=s.maxX;r<=o;++r)for(let a=s.minY,l=s.maxY;a<=l;++a)i([e,r,a])}forEachTileCoordParentTileRange(t,e,i,s){let r,o,a,l=null,c=t[0]-1;for(this.zoomFactor_===2?(o=t[1],a=t[2]):l=this.getTileCoordExtent(t,s);c>=this.minZoom;){if(o!==void 0&&a!==void 0?(o=Math.floor(o/2),a=Math.floor(a/2),r=Je(o,o,a,a,i)):r=this.getTileRangeForExtentAndZ(l,c,i),e(c,r))return!0;--c}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]this.maxZoom||e0?i:Math.max(r/e[0],s/e[1]);const o=t+1,a=new Array(o);for(let l=0;lthis.getTileInternal(f,g,_,m,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return d.key=l,d}getTileInternal(t,e,i,s,r){const o=this.getKey();return this.createTile_(t,e,i,s,r,o)}setRenderReprojectionEdges(t){this.renderReprojectionEdges_!=t&&(this.renderReprojectionEdges_=t,this.changed())}setTileGridForProjection(t,e){const i=kt(t);if(i){const s=$(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}}function Fu(n,t){n.getImage().src=t}class ku extends Ou{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",i=t.tileGrid!==void 0?t.tileGrid:wu({extent:Sr(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const Nu='© OpenStreetMap contributors.';class Gu extends ku{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Nu];const i=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",s=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}}const Rn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class zu extends Jn{constructor(t){t=t||{};const e=Object.assign({},t),i=t.cacheSize;delete t.cacheSize,delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Rn.PRELOAD)}setPreload(t){this.set(Rn.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(Rn.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(Rn.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const Xu=5;class Wu extends sn{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.staleKeys_=new Array,this.maxStaleKeys=Xu}getStaleKeys(){return this.staleKeys_}prependStaleKey(t){this.staleKeys_.unshift(t),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(t){return U()}getData(t){return null}prepareFrame(t){return U()}renderFrame(t,e){return U()}forEachFeatureAtCoordinate(t,e,i,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===Y.LOADED||e.getState()===Y.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Y.LOADED&&e!=Y.ERROR&&t.addEventListener(z.CHANGE,this.boundHandleImageChange_),e==Y.IDLE&&(t.load(),e=t.getState()),e==Y.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class Za{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(bn(),{get:(t,e)=>{if(typeof bn()[e]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let i=0,s=e.length;i0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();){const e=this.pop();e instanceof Wn&&e.dispose()}}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return j(i!==void 0,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return j(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,i;for(i=this.newest_;i;i=i.older)t[e++]=i.key_;return t}getValues(){const t=new Array(this.count_);let e=0,i;for(i=this.newest_;i;i=i.older)t[e++]=i.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){j(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}class ju extends Zs{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=t.sourceProj,i=e.getExtent(),s=t.sourceTileGrid.getExtent();this.clipExtent_=e.canWrapX()?s?Xt(i,s):i:s;const r=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),o=this.targetTileGrid_.getExtent();let a=this.sourceTileGrid_.getExtent();const l=o?Xt(r,o):r;if(Zi(l)===0){this.state=M.EMPTY;return}i&&(a?a=Xt(a,i):a=i);const c=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),h=t.targetProj,u=Na(e,h,l,c);if(!isFinite(u)||u<=0){this.state=M.EMPTY;return}const d=t.errorThreshold!==void 0?t.errorThreshold:Fa;if(this.triangulation_=new ka(e,h,l,a,u*d,c),this.triangulation_.getTriangles().length===0){this.state=M.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(u);let f=this.triangulation_.calculateSourceExtent();if(a&&(e.canWrapX()?(f[1]=st(f[1],a[1],a[3]),f[3]=st(f[3],a[1],a[3])):f=Xt(f,a)),!Zi(f))this.state=M.EMPTY;else{let g=0,_=0;e.canWrapX()&&(g=q(i),_=Math.floor((f[0]-i[0])/g)),Js(f.slice(),e,!0).forEach(p=>{const y=this.sourceTileGrid_.getTileRangeForExtentAndZ(p,this.sourceZ_),x=t.getTileFunction;for(let E=y.minX;E<=y.maxX;E++)for(let w=y.minY;w<=y.maxY;w++){const v=x(this.sourceZ_,E,w,this.pixelRatio_);if(v){const T=_*g;this.sourceTiles_.push({tile:v,offset:T})}}++_}),this.sourceTiles_.length===0&&(this.state=M.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];let e=!1;if(this.sourceTiles_.forEach(g=>{const _=g.tile;if(!_||_.getState()!==M.LOADED)return;const m=_.getSize(),p=this.gutter_;let y;const x=Zu(_.getData());x?y=x:(e=!0,y=Bu(Gn(_.getData())));const E=[m[0]+2*p,m[1]+2*p],w=y instanceof Float32Array,v=E[0]*E[1],T=w?Float32Array:Uint8ClampedArray,R=new T(y.buffer),I=T.BYTES_PER_ELEMENT,G=I*R.length/v,D=R.byteLength/E[1],b=Math.floor(D/I/E[0]),O=v*b;let A=R;if(R.length!==O){A=new T(O);let Z=0,K=0;const et=E[0]*b;for(let k=0;k=0;--g){const _=[];for(let w=0,v=t.length;w{const i=e.getState();if(i!==M.IDLE&&i!==M.LOADING)return;t++;const s=V(e,z.CHANGE,()=>{const r=e.getState();(r==M.LOADED||r==M.ERROR||r==M.EMPTY)&&(tt(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e}){e.getState()==M.IDLE&&e.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(tt),this.sourcesListenerKeys_=null}}function Ss(n,t,e,i){return`${n},${_u(t,e,i)}`}function Ls(n,t,e){if(!(e in n))return n[e]=new Set([t]),!0;const i=n[e],s=i.has(t);return s||i.add(t),!s}function Hu(n,t,e){const i=n[e];return i?i.delete(t):!1}function So(n,t){const e=n.layerStatesArray[n.layerIndex];e.extent&&(t=Xt(t,Te(e.extent,n.viewState.projection)));const i=e.layer.getRenderSource();if(!i.getWrapX()){const s=i.getTileGridForProjection(n.viewState.projection).getExtent();s&&(t=Xt(t,s))}return t}class qu extends Ka{constructor(t,e){super(t),e=e||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=Ft(),this.tempTileRange_=new vr(0,0,0,0),this.tempTileCoord_=Nn(0,0,0);const i=e.cacheSize!==void 0?e.cacheSize:512;this.tileCache_=new Uu(i),this.renderedProjection_=void 0,this.maxStaleKeys=i*.5}getTileCache(){return this.tileCache_}getOrCreateTile(t,e,i,s){const r=this.tileCache_,a=this.getLayer().getSource(),l=Ss(a.getKey(),t,e,i);let c;if(r.containsKey(l))c=r.get(l);else{if(c=a.getTile(t,e,i,s.pixelRatio,s.viewState.projection),!c)return null;r.set(l,c)}return c}getTile(t,e,i,s){const r=this.getOrCreateTile(t,e,i,s);return r||null}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),s=dt(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!_i(r,s))return null;const o=e.viewState,a=i.getRenderSource(),l=a.getTileGridForProjection(o.projection),c=a.getTilePixelRatio(e.pixelRatio);for(let h=l.getZForResolution(o.resolution);h>=l.getMinZoom();--h){const u=l.getTileCoordForCoordAndZ(s,h),d=this.getTile(h,u[1],u[2],e);if(!d||d.getState()!==M.LOADED)continue;const f=l.getOrigin(h),g=vt(l.getTileSize(h)),_=l.getResolution(h);let m;if(d instanceof Oa||d instanceof Ys)m=d.getImage();else if(d instanceof Zs){if(m=Gn(d.getData()),!m)continue}else continue;const p=Math.floor(c*((s[0]-f[0])/_-u[1]*g[0])),y=Math.floor(c*((f[1]-s[1])/_-u[2]*g[1])),x=Math.round(c*a.getGutterForProjection(o.projection));return this.getImageData(m,p+x,y+x)}return null}prepareFrame(t){this.renderedProjection_?t.viewState.projection!==this.renderedProjection_&&(this.tileCache_.clear(),this.renderedProjection_=t.viewState.projection):this.renderedProjection_=t.viewState.projection;const e=this.getLayer().getSource();if(!e)return!1;const i=e.getRevision();return this.renderedRevision_?this.renderedRevision_!==i&&(this.renderedRevision_=i,this.renderedSourceKey_===e.getKey()&&this.tileCache_.clear()):this.renderedRevision_=i,!0}enqueueTiles(t,e,i,s,r){const o=t.viewState,a=this.getLayer(),l=a.getRenderSource(),c=l.getTileGridForProjection(o.projection),h=$(l);h in t.wantedTiles||(t.wantedTiles[h]={});const u=t.wantedTiles[h],d=a.getMapInternal(),f=Math.max(i-r,c.getMinZoom(),c.getZForResolution(Math.min(a.getMaxResolution(),d?d.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):c.getResolution(0)),l.zDirection));for(let g=i;g>=f;--g){const _=c.getTileRangeForExtentAndZ(e,g,this.tempTileRange_),m=c.getResolution(g);for(let p=_.minX;p<=_.maxX;++p)for(let y=_.minY;y<=_.maxY;++y){const x=this.getTile(g,p,y,t);if(!x||!Ls(s,x,g))continue;const w=x.getKey();if(u[w]=!0,x.getState()===M.IDLE&&!t.tileQueue.isKeyQueued(w)){const v=Nn(g,p,y,this.tempTileCoord_);t.tileQueue.enqueue([x,h,c.getTileCoordCenter(v),m])}}}}findStaleTile_(t,e){const i=this.tileCache_,s=t[0],r=t[1],o=t[2],a=this.getStaleKeys();for(let l=0;l0&&setTimeout(()=>{this.enqueueTiles(t,G,f-1,R,I-1)},0),!(f in R))return this.container;const D=$(this),b=t.time;for(const k of R[f]){const X=k.getState();if((k instanceof Ys||k instanceof ju)&&X===M.EMPTY)continue;const Q=k.tileCoord;if(X===M.LOADED&&k.getAlpha(D,b)===1){k.endTransition(D);continue}if(this.renderComplete=!1,this.findStaleTile_(Q,R)){Hu(R,k,f),t.animate=!0;continue}if(this.findAltTiles_(d,Q,f+1,R))continue;const xt=d.getMinZoom();for(let ut=f-1;ut>=xt&&!this.findAltTiles_(d,Q,ut,R);--ut);}const O=g/o*l/p,A=this.getRenderContext(t);de(this.tempTransform,y/2,x/2,O,O,0,-y/2,-x/2),i.extent&&this.clipUnrotated(A,t,E),h.getInterpolate()||(A.imageSmoothingEnabled=!1),this.preRender(A,t);const F=Object.keys(R).map(Number);F.sort(ae);let L;const Z=[],K=[];for(let k=F.length-1;k>=0;--k){const X=F[k],Q=h.getTilePixelSize(X,l,r),S=d.getResolution(X)/g,xt=Q[0]*S*O,ut=Q[1]*S*O,at=d.getTileCoordForCoordAndZ(Ye(T),X),Zt=d.getTileCoordExtent(at),Jt=dt(this.tempTransform,[p*(Zt[0]-T[0])/g,p*(T[3]-Zt[3])/g]),Lt=p*h.getGutterForProjection(r);for(const _e of R[X]){if(_e.getState()!==M.LOADED)continue;const Ri=_e.tileCoord,un=at[1]-Ri[1],rs=Math.round(Jt[0]-(un-1)*xt),Ti=at[2]-Ri[2],Me=Math.round(Jt[1]-(Ti-1)*ut),At=Math.round(Jt[0]-un*xt),Kt=Math.round(Jt[1]-Ti*ut),Ke=rs-At,Be=Me-Kt,Ii=F.length===1;let be=!1;L=[At,Kt,At+Ke,Kt,At+Ke,Kt+Be,At,Kt+Be];for(let Ve=0,Ue=Z.length;Ve{const Q=$(h),ct=X.wantedTiles[Q],S=ct?Object.keys(ct).length:0;this.updateCacheSize(S),this.tileCache_.expireCache()};return t.postRenderFunctions.push(et),this.container}updateCacheSize(t){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,t*2)}drawTile(t,e,i,s,r,o,a,l){let c;if(t instanceof Zs){if(c=Gn(t.getData()),!c)throw new Error("Rendering array data is not yet supported")}else c=this.getTileImage(t);if(!c)return;const h=this.getRenderContext(e),u=$(this),d=e.layerStatesArray[e.layerIndex],f=d.opacity*(l?t.getAlpha(u,e.time):1),g=f!==h.globalAlpha;g&&(h.save(),h.globalAlpha=f),h.drawImage(c,a,a,c.width-2*a,c.height-2*a,i,s,r,o),g&&h.restore(),f!==d.opacity?e.animate=!0:l&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}updateUsedTiles(t,e,i){const s=$(e);s in t||(t[s]={}),t[s][i.getKey()]=!0}}class $u extends zu{constructor(t){super(t)}createRenderer(){return new qu(this,{cacheSize:this.getCacheSize()})}}class Xi extends $t{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Xi(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(tt(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=V(t,z.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?Ju(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function Ju(n){if(typeof n=="function")return n;let t;return Array.isArray(n)?t=n:(j(typeof n.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),t=[n]),function(){return t}}function Ks(n,t,e,i,s,r,o){let a,l;const c=(e-t)/i;if(c===1)a=t;else if(c===2)a=t,l=s;else if(c!==0){let h=n[t],u=n[t+1],d=0;const f=[0];for(let m=t+i;m1?o:2,r=r||new Array(o);for(let h=0;h>1;sl&&(this.instructions.push([P.CUSTOM,l,h,t,i,ke,r]),this.hitDetectionInstructions.push([P.CUSTOM,l,h,t,s||i,ke,r]));break;case"Point":c=t.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),h=this.coordinates.length,this.instructions.push([P.CUSTOM,l,h,t,i,void 0,r]),this.hitDetectionInstructions.push([P.CUSTOM,l,h,t,s||i,void 0,r]);break}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[P.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[P.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const i=t.length;let s,r,o=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[P.SET_FILL_STYLE,e];return typeof e!="string"&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[P.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,s=t.lineCap,r=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,c=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=s||r!=t.currentLineDash&&!Ae(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=c)&&(i!==void 0&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=c)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[P.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Xo(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Hs(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class td extends cn{constructor(t,e,i,s){super(t,e,i,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!_i(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const s=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,a=this.appendFlatPointCoordinates(s,r);this.instructions.push([P.DRAW_IMAGE,o,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([P.DRAW_IMAGE,o,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const s=t.getFlatCoordinates(),r=[];for(let l=0,c=s.length;l=n){const g=(n-a+f)/f,_=St(c,u,g),m=St(h,d,g);l.push(_,m),r.push(l),l=[_,m],a==n&&(o+=s),a=0}else if(a0&&r.push(l),r}function nd(n,t,e,i,s){let r=e,o=e,a=0,l=0,c=e,h,u,d,f,g,_,m,p,y,x;for(u=e;un&&(l>a&&(a=l,r=c,o=u),l=0,c=u-s)),d=f,m=y,p=x),g=E,_=w}return l+=f,l>a?[c,u]:[r,o]}const Xn={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class sd extends cn{constructor(t,e,i,s){super(t,e,i,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[Ct]={fillStyle:Ct},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const s=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!s&&!r)return;const a=this.coordinates;let l=a.length;const c=t.getType();let h=null,u=t.getStride();if(o.placement==="line"&&(c=="LineString"||c=="MultiLineString"||c=="Polygon"||c=="MultiPolygon")){if(!Tt(this.maxExtent,t.getExtent()))return;let d;if(h=t.getFlatCoordinates(),c=="LineString")d=[h.length];else if(c=="MultiLineString")d=t.getEnds();else if(c=="Polygon")d=t.getEnds().slice(0,1);else if(c=="MultiPolygon"){const m=t.getEndss();d=[];for(let p=0,y=m.length;p{const w=a[(y+E)*2]===h[E*u]&&a[(y+E)*2+1]===h[E*u+1];return w||--y,w})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&this.updateFillStyle(this.state,this.createFill),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,i);let g=o.padding;if(g!=Ge&&(o.scale[0]<0||o.scale[1]<0)){let y=o.padding[0],x=o.padding[1],E=o.padding[2],w=o.padding[3];o.scale[0]<0&&(x=-x,w=-w),o.scale[1]<0&&(y=-y,E=-E),g=[y,x,E,w]}const _=this.pixelRatio;this.instructions.push([P.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,g==Ge?Ge:g.map(function(y){return y*_}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/_,p=this.state.fillStyle;o.backgroundFill&&(this.state.fillStyle=Ct,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([P.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,this.declutterMode_,this.declutterImageWithText_,g,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?Ct:this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),o.backgroundFill&&(this.state.fillStyle=p,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||$i,justify:e.justify,textBaseline:e.textBaseline||Dn,scale:e.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,c=Xn[s.textBaseline],h=this.textOffsetY_*l,u=this.text_,d=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([P.DRAW_CHARS,t,e,c,s.overflow,a,s.maxAngle,l,h,r,d*l,u,o,1,this.declutterMode_]),this.hitDetectionInstructions.push([P.DRAW_CHARS,t,e,c,s.overflow,a&&Ct,s.maxAngle,l,h,r,d*l,u,o,1/l,this.declutterMode_])}setTextStyle(t,e){let i,s,r;if(!t)this.text_="";else{const o=t.getFill();o?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=qt(o.getColor()||Ct)):(s=null,this.textFillState_=s);const a=t.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const g=a.getLineDash(),_=a.getLineDashOffset(),m=a.getWidth(),p=a.getMiterLimit();r.lineCap=a.getLineCap()||pi,r.lineDash=g?g.slice():le,r.lineDashOffset=_===void 0?he:_,r.lineJoin=a.getLineJoin()||yi,r.lineWidth=m===void 0?Ji:m,r.miterLimit=p===void 0?Hi:p,r.strokeStyle=qt(a.getColor()||qi)}i=this.textState_;const l=t.getFont()||ma;Wh(l);const c=t.getScaleArray();i.overflow=t.getOverflow(),i.font=l,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||Dn,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Ge,i.scale=c===void 0?[1,1]:c;const h=t.getOffsetX(),u=t.getOffsetY(),d=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=h===void 0?0:h,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=d===void 0?!1:d,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:$(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+$(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const rd={Circle:Ao,Default:cn,Image:td,LineString:ed,Polygon:Ao,Text:sd};class od{constructor(t,e,i,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const s in i){const r=i[s].finish();t[e][s]=r}}return t}getBuilder(t,e){const i=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[i];s===void 0&&(s={},this.buildersByZIndex_[i]=s);let r=s[e];if(r===void 0){const o=rd[e];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}function ad(n,t,e,i,s,r,o,a,l,c,h,u){let d=n[t],f=n[t+1],g=0,_=0,m=0,p=0;function y(){g=d,_=f,t+=i,d=n[t],f=n[t+1],p+=m,m=Math.sqrt((d-g)*(d-g)+(f-_)*(f-_))}do y();while(tL[2]}else D=E>I;const b=Math.PI,O=[],A=v+i===t;t=v,m=0,p=T,d=n[t],f=n[t+1];let F;if(A){y(),F=Math.atan2(f-_,d-g),D&&(F+=F>0?-b:b);const L=(I+E)/2,Z=(G+w)/2;return O[0]=[L,Z,(R-r)/2,F,s],O}s=s.replace(/\n/g," ");for(let L=0,Z=s.length;L0?-b:b),F!==void 0){let S=K-F;if(S+=S>b?-2*b:S<-b?2*b:0,Math.abs(S)>o)return null}F=K;const et=L;let k=0;for(;L0&&n.push(` +`,""),n.push(t,""),n}class hd{constructor(t,e,i,s,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=Wt(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new Za:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,s){const r=t+e+i+s;if(this.labels_[r])return this.labels_[r];const o=s?this.strokeStates[s]:null,a=i?this.fillStates[i]:null,l=this.textStates[e],c=this.pixelRatio,h=[l.scale[0]*c,l.scale[1]*c],u=l.justify?Xn[l.justify]:As(Array.isArray(t)?t[0]:t,l.textAlign||$i),d=s&&o.lineWidth?o.lineWidth:0,f=Array.isArray(t)?t:String(t).split(` +`).reduce(ld,[]),{width:g,height:_,widths:m,heights:p,lineWidths:y}=Zh(l,f),x=g+d,E=[],w=(x+2)*h[0],v=(_+d)*h[1],T={width:w<0?Math.floor(w):Math.ceil(w),height:v<0?Math.floor(v):Math.ceil(v),contextInstructions:E};(h[0]!=1||h[1]!=1)&&E.push("scale",h),s&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",d),E.push("lineCap",o.lineCap),E.push("lineJoin",o.lineJoin),E.push("miterLimit",o.miterLimit),E.push("setLineDash",[o.lineDash]),E.push("lineDashOffset",o.lineDashOffset)),i&&E.push("fillStyle",a.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");const R=.5-u;let I=u*x+R*d;const G=[],D=[];let b=0,O=0,A=0,F=0,L;for(let Z=0,K=f.length;Zt?t-c:r,E=o+h>e?e-h:o,w=g[3]+x*d[0]+g[1],v=g[0]+E*d[1]+g[2],T=p-g[3],R=y-g[0];(_||u!==0)&&(ye[0]=T,Ee[0]=T,ye[1]=R,ie[1]=R,ie[0]=T+w,ne[0]=ie[0],ne[1]=R+v,Ee[1]=ne[1]);let I;return u!==0?(I=de(Wt(),i,s,1,1,u,-i,-s),dt(I,ye),dt(I,ie),dt(I,ne),dt(I,Ee),Se(Math.min(ye[0],ie[0],ne[0],Ee[0]),Math.min(ye[1],ie[1],ne[1],Ee[1]),Math.max(ye[0],ie[0],ne[0],Ee[0]),Math.max(ye[1],ie[1],ne[1],Ee[1]),ei)):Se(Math.min(T,T+w),Math.min(R,R+v),Math.max(T,T+w),Math.max(R,R+v),ei),f&&(p=Math.round(p),y=Math.round(y)),{drawImageX:p,drawImageY:y,drawImageW:x,drawImageH:E,originX:c,originY:h,declutterBox:{minX:ei[0],minY:ei[1],maxX:ei[2],maxY:ei[3],value:m},canvasTransform:I,scale:d}}replayImageOrLabel_(t,e,i,s,r,o,a){const l=!!(o||a),c=s.declutterBox,h=a?a[2]*s.scale[0]/2:0;return c.minX-h<=e[0]&&c.maxX+h>=0&&c.minY-h<=e[1]&&c.maxY+h>=0&&(l&&this.replayTextBackground_(t,ye,ie,ne,Ee,o,a),Kh(t,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=dt(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(i[0]%s,i[1]%s),e!==1&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,s){const r=this.textStates[e],o=this.createLabel(t,e,s,i),a=this.strokeStates[i],l=this.pixelRatio,c=As(Array.isArray(t)?t[0]:t,r.textAlign||$i),h=Xn[r.textBaseline||Dn],u=a&&a.lineWidth?a.lineWidth:0,d=o.width/l-2*r.scale[0],f=c*d+2*(.5-c)*u,g=h*o.height/l+2*(.5-h)*u;return{label:o,anchorX:f,anchorY:g}}execute_(t,e,i,s,r,o,a,l){const c=this.zIndexContext_;let h;this.pixelCoordinates_&&Ae(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=ve(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Bl(this.renderedTransform_,i));let u=0;const d=s.length;let f=0,g,_,m,p,y,x,E,w,v,T,R,I,G,D=0,b=0,O=null,A=null;const F=this.coordinateCache_,L=this.viewRotation_,Z=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,K={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},et=this.instructions!=s||this.overlaps?0:200;let k,X,Q,ct;for(;uet&&(this.fill_(t),D=0),b>et&&(t.stroke(),b=0),!D&&!b&&(t.beginPath(),y=NaN,x=NaN),++u;break;case P.CIRCLE:f=S[1];const ut=h[f],at=h[f+1],Zt=h[f+2],Jt=h[f+3],Lt=Zt-ut,_e=Jt-at,Ri=Math.sqrt(Lt*Lt+_e*_e);t.moveTo(ut+Ri,at),t.arc(ut,at,Ri,0,2*Math.PI,!0),++u;break;case P.CLOSE_PATH:t.closePath(),++u;break;case P.CUSTOM:f=S[1],g=S[2];const un=S[3],rs=S[4],Ti=S[5];K.geometry=un,K.feature=k,u in F||(F[u]=[]);const Me=F[u];Ti?Ti(h,f,g,2,Me):(Me[0]=h[f],Me[1]=h[f+1],Me.length=2),c&&(c.zIndex=S[6]),rs(Me,K),++u;break;case P.DRAW_IMAGE:f=S[1],g=S[2],v=S[3],_=S[4],m=S[5];let At=S[6];const Kt=S[7],Ke=S[8],Be=S[9],Ii=S[10];let be=S[11];const Ve=S[12];let Ue=S[13];p=S[14]||"declutter";const lt=S[15];if(!v&&S.length>=20){T=S[19],R=S[20],I=S[21],G=S[22];const Mt=this.drawLabelWithPointPlacement_(T,R,I,G);v=Mt.label,S[3]=v;const De=S[23];_=(Mt.anchorX-De)*this.pixelRatio,S[4]=_;const bt=S[24];m=(Mt.anchorY-bt)*this.pixelRatio,S[5]=m,At=v.height,S[6]=At,Ue=v.width,S[13]=Ue}let os;S.length>25&&(os=S[25]);let as,dn,fn;S.length>17?(as=S[16],dn=S[17],fn=S[18]):(as=Ge,dn=!1,fn=!1),Ii&&Z?be+=L:!Ii&&!Z&&(be-=L);let $a=0;for(;f!Ua.includes(n));class ud{constructor(t,e,i,s,r,o,a){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Wt(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,a)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let s=this.executorsByZIndex_[i];s===void 0&&(s={},this.executorsByZIndex_[i]=s);const r=t[i];for(const o in r){const a=r[o];s[o]=new hd(this.resolution_,this.pixelRatio_,this.overlaps_,a,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let s=0,r=t.length;s0){if(!o||T==="none"||f!=="Image"&&f!=="Text"||o.includes(w)){const D=(d[I]-3)/4,b=s-D%a,O=s-(D/a|0),A=r(w,v,b*b+O*O);if(A)return A}h.clearRect(0,0,a,a);break}}const _=Object.keys(this.executorsByZIndex_).map(Number);_.sort(ae);let m,p,y,x,E;for(m=_.length-1;m>=0;--m){const w=_[m].toString();for(y=this.executorsByZIndex_[w],p=li.length-1;p>=0;--p)if(f=li[p],x=y[f],x!==void 0&&(E=x.executeHitDetection(h,l,i,g,u),E))return E}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],s=e[1],r=e[2],o=e[3],a=[i,s,i,o,r,o,r,s];return ve(a,0,8,2,t,a),a}isEmpty(){return gi(this.executorsByZIndex_)}execute(t,e,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(ae),o=o||li;const c=li.length;let h,u,d,f,g;for(a&&l.reverse(),h=0,u=l.length;hp.execute(w,e,i,s,r,a)),E&&x.restore(),y){y.offset();const w=l[h]*c+d;this.deferredZIndexContexts_[w]||(this.deferredZIndexContexts_[w]=[]),this.deferredZIndexContexts_[w].push(y)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(ae);for(let i=0,s=e.length;i{r.draw(this.renderedContext_),r.clear()}),t[e[i]].length=0}}const Ms={};function dd(n){if(Ms[n]!==void 0)return Ms[n];const t=n*2+1,e=n*n,i=new Array(e+1);for(let r=0;r<=n;++r)for(let o=0;o<=n;++o){const a=r*r+o*o;if(a>e)break;let l=i[a];l||(l=[],i[a]=l),l.push(((n+r)*t+(n+o))*4+3),r>0&&l.push(((n-r)*t+(n+o))*4+3),o>0&&(l.push(((n+r)*t+(n-o))*4+3),r>0&&l.push(((n-r)*t+(n-o))*4+3))}const s=[];for(let r=0,o=i.length;ru*this.pixelRatio_),lineDashOffset:(o||he)*this.pixelRatio_,lineJoin:a!==void 0?a:yi,lineWidth:(l!==void 0?l:Ji)*this.pixelRatio_,miterLimit:c!==void 0?c:Hi,strokeStyle:qt(i||qi)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const i=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const o=t.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:qt(f||Ct)}}const i=t.getStroke();if(!i)this.textStrokeState_=null;else{const f=i.getColor(),g=i.getLineCap(),_=i.getLineDash(),m=i.getLineDashOffset(),p=i.getLineJoin(),y=i.getWidth(),x=i.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:pi,lineDash:_||le,lineDashOffset:m||he,lineJoin:p!==void 0?p:yi,lineWidth:y!==void 0?y:Ji,miterLimit:x!==void 0?x:Hi,strokeStyle:qt(f||qi)}}const s=t.getFont(),r=t.getOffsetX(),o=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),c=t.getScaleArray(),h=t.getText(),u=t.getTextAlign(),d=t.getTextBaseline();this.textState_={font:s!==void 0?s:ma,textAlign:u!==void 0?u:$i,textBaseline:d!==void 0?d:Dn},this.text_=h!==void 0?Array.isArray(h)?h.reduce((f,g,_)=>f+=_%2?" ":g,""):h:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}}}const Ut=.5;function gd(n,t,e,i,s,r,o,a,l){const c=s,h=n[0]*Ut,u=n[1]*Ut,d=rt(h,u);d.imageSmoothingEnabled=!1;const f=d.canvas,g=new fd(d,Ut,s,null,o,a,null),_=e.length,m=Math.floor((256*256*256-1)/_),p={};for(let x=1;x<=_;++x){const E=e[x-1],w=E.getStyleFunction()||i;if(!w)continue;let v=w(E,r);if(!v)continue;Array.isArray(v)||(v=[v]);const R=(x*m).toString(16).padStart(7,"#00000");for(let I=0,G=v.length;I0;return u&&Promise.all(l).then(()=>s(null)),Ed(n,t,e,i,r,o,a),u}function Ed(n,t,e,i,s,r,o){const a=e.getGeometryFunction()(t);if(!a)return;const l=a.simplifyTransformed(i,s);if(e.getRenderer())qa(n,l,e,t,o);else{const h=ja[l.getType()];h(n,l,e,t,o,r)}}function qa(n,t,e,i,s){if(t.getType()=="GeometryCollection"){const o=t.getGeometries();for(let a=0,l=o.length;a{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=this.frameState.size.slice(),s=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,c=this.getLayer(),h=[],u=i[0]*Ut,d=i[1]*Ut;h.push(this.getRenderTransform(s,r,o,Ut,u,d,0).slice());const f=c.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!ai(g,l)){let _=l[0];const m=q(g);let p=0,y;for(;_g[2];)++p,y=m*p,h.push(this.getRenderTransform(s,r,o,Ut,u,d,y).slice()),_-=m}this.hitDetectionImageData_=gd(i,h,this.renderedFeatures_,c.getStyleFunction(),l,r,o,Do(r,this.renderedPixelRatio_))}e(_d(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,i,s,r){if(!this.replayGroup_)return;const o=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),c={},h=function(g,_,m){const p=$(g),y=c[p];if(y){if(y!==!0&&mu=g.forEachFeatureAtCoordinate(t,o,a,i,h,f&&e.declutter[f]?e.declutter[f].all().map(_=>_.value):null)),u}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const s=t.viewHints[mt.ANIMATING],r=t.viewHints[mt.INTERACTING],o=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!o&&s||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,c=t.viewState,h=c.projection,u=c.resolution,d=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let _=e.getRenderOrder();_===void 0&&(_=pd);const m=c.center.slice(),p=Hs(l,g*u),y=p.slice(),x=[p.slice()],E=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!ai(E,t.extent)){const A=q(E),F=Math.max(q(p)/2,A);p[0]=E[0]-F,p[2]=E[2]+F,Vo(m,h);const L=Bo(x[0],h);L[0]E[0]&&L[2]>E[2]&&x.push([L[0]-A,L[1],L[2]-A,L[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==f&&this.renderedRenderOrder_==_&&this.renderedFrameDeclutter_===!!t.declutter&&ai(this.wrappedRenderedExtent_,p))return Ae(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const w=new od(Ha(u,d),p,u,d);let v;for(let A=0,F=x.length;A{let L;const Z=A.getStyleFunction()||e.getStyleFunction();if(Z&&(L=Z(A,u)),L){const K=this.renderFeature(A,T,L,w,v,this.getLayer().getDeclutter(),F);R=R&&!K}},G=$o(p),D=i.getFeaturesInExtent(G);_&&D.sort(_);for(let A=0,F=D.length;A{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":i.length=$n(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=nh(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,s);break;case"Polygon":s=[],i.length=ea(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,s);break}return s&&(this.simplifiedGeometry_=new Gt(this.type_,i,s,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}Gt.prototype.getFlatCoordinates=Gt.prototype.getOrientedFlatCoordinates;const Pt={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Md(n,t){return[[-1/0,-1/0,1/0,1/0]]}let bd=!1;function Dd(n,t,e,i,s,r,o){const a=new XMLHttpRequest;a.open("GET",typeof n=="function"?n(e,i,s):n,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=bd,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const c=t.getType();try{let h;c=="text"||c=="json"?h=a.responseText:c=="xml"?h=a.responseXML||a.responseText:c=="arraybuffer"&&(h=a.response),h?r(t.readFeatures(h,{extent:e,featureProjection:s}),t.readProjection(h)):o()}catch{o()}}else o()},a.onerror=o,a.send()}function ko(n,t){return function(e,i,s,r,o){const a=this;Dd(n,t,e,i,s,function(l,c){a.addFeatures(l),r!==void 0&&r(l)},o||fi)}}class xe extends fe{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class Pd extends za{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=fi,this.format_=t.format||null,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(j(this.format_,"`format` must be set when `url` is set"),this.loader_=ko(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Md;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Oo:null,this.loadedExtentsRtree_=new Oo,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,s;Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),!e&&i===void 0&&(i=new jt(s)),s!==void 0&&this.addFeaturesInternal(s),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=$(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const s=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new xe(Pt.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof Gt||(this.featureChangeKeys_[t]=[V(e,z.CHANGE,this.handleFeatureChange_,this),V(e,di.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(e.getId()!==void 0){const s=String(e.getId());if(!(s in this.idIndex_))this.idIndex_[s]=e;else if(e instanceof Gt){const r=this.idIndex_[s];r instanceof Gt?Array.isArray(r)?r.push(e):this.idIndex_[s]=[r,e]:i=!1}else i=!1}return i&&(j(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],s=[];for(let r=0,o=t.length;r{e||(e=!0,this.addFeature(i.element),e=!1)}),t.addEventListener(wt.REMOVE,i=>{e||(e=!0,this.removeFeature(i.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(tt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(i);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new xe(Pt.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(s){const r=s.getGeometry();if(r instanceof Gt||r.intersectsCoordinate(t))return e(s)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(i){const s=i.getGeometry();if(s instanceof Gt||s.intersectsExtent(t)){const r=e(i);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),gi(this.nullGeometryFeatures_)||Yn(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(i){e.push(i)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const s=Js(t,e);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],s=t[1];let r=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Wi,this.featuresRtree_.forEachInExtent(l,function(c){if(e(c)){const h=c.getGeometry(),u=a;if(a=h instanceof Gt?0:h.closestPointXY(i,s,o,a),a{--this.loadingExtentsCount_,this.dispatchEvent(new xe(Pt.FEATURESLOADEND,void 0,h))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new xe(Pt.FEATURESLOADERROR))}),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,function(s){if(Yi(s.extent,t))return i=s,!0}),i&&e.remove(i)}removeFeatures(t){let e=!1;for(let i=0,s=t.length;it.geo&&t.geo.lat&&t.geo.lon);return n?[n.geo.lon,n.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(n=>{const t=new cu({target:"map",layers:[new $u({source:new Gu})],view:new Vt({center:us(this.getLastLonLat()),zoom:this.type==="traceroute"?3:10})}),e=[],i=new Pd;if(this.type==="traceroute")console.log(this.getLastLonLat()),this.d.forEach(a=>{if(a.geo&&a.geo.lat&&a.geo.lon){const l=us([a.geo.lon,a.geo.lat]);e.push(l);const c=this.getLastLonLat();console.log(a.geo.lon,a.geo.lat),console.log(a.geo.lon===c[0]&&a.geo.lat===c[1]);const h=new Xi({geometry:new Bi(l),last:a.geo.lon===c[0]&&a.geo.lat===c[1]});i.addFeature(h)}});else{const a=us([this.d.geo.lon,this.d.geo.lat]);e.push(a);const l=new Xi({geometry:new Bi(a)});i.addFeature(l)}const s=new zn(e),r=new Xi({geometry:s});i.addFeature(r);const o=new Ld({source:i,style:function(a){if(a.getGeometry().getType()==="Point")return new ce({image:new on({radius:10,fill:new wi({color:a.get("last")?"#dc3545":"#0d6efd"}),stroke:new Ei({color:"white",width:5})})});if(a.getGeometry().getType()==="LineString")return new ce({stroke:new Ei({color:"#0d6efd",width:2})})}});t.addLayer(o),this.store.Configuration.Server.dashboard_theme==="dark"&&t.on("postcompose",function(a){document.querySelector("#map").style.filter="grayscale(80%) invert(100%) "})}).catch(n=>{this.osmAvailable=!1})}},Fd={key:0,id:"map",class:"w-100 rounded-3"};function kd(n,t,e,i,s,r){return this.osmAvailable?(nl(),sl("div",Fd)):rl("",!0)}const zd=el(Od,[["render",kd]]);export{zd as O}; diff --git a/src/static/app/dist/assets/peerCreate.css b/src/static/app/dist/assets/peerCreate.css new file mode 100644 index 0000000..7925b6a --- /dev/null +++ b/src/static/app/dist/assets/peerCreate.css @@ -0,0 +1 @@ +.list-move[data-v-6d5fc831],.list-enter-active[data-v-6d5fc831],.list-leave-active[data-v-6d5fc831]{transition:all .3s ease}.list-enter-from[data-v-6d5fc831],.list-leave-to[data-v-6d5fc831]{opacity:0;transform:translateY(10px)}.list-leave-active[data-v-6d5fc831]{position:absolute}.peerSettingContainer[data-v-17eb547c]{background-color:#00000060;z-index:9998}div[data-v-17eb547c]{transition:.2s ease-in-out}.inactiveField[data-v-17eb547c]{opacity:.4}.card[data-v-17eb547c]{max-height:100%} diff --git a/src/static/app/dist/assets/peerCreate.js b/src/static/app/dist/assets/peerCreate.js new file mode 100644 index 0000000..d3a7e78 --- /dev/null +++ b/src/static/app/dist/assets/peerCreate.js @@ -0,0 +1 @@ +import{_ as b,o as n,c as r,a as e,b as o,k as p,p as u,n as h,e as d,D as g,W as y,v as I,G as L,w as C,F as P,r as S,d as K,t as x,T as E,j as f,f as F,m as G,g as k}from"./index.js";import{L as _}from"./localeText.js";import"./wireguard.js";const O={name:"nameInput",components:{LocaleText:_},props:{bulk:Boolean,data:Object,saving:Boolean}},R={for:"peer_name_textbox",class:"form-label"},j={class:"text-muted"},q=["disabled"];function W(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",{class:h({inactiveField:this.bulk})},[e("label",R,[e("small",j,[o(l,{t:"Name"})])]),p(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":t[0]||(t[0]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,q),[[u,this.data.name]])],2)}const J=b(O,[["render",W]]),z={name:"privatePublicKeyInput",components:{LocaleText:_},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const s=g(),t=y();return{dashboardStore:s,wgStore:t}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},testKey(s){return/^[A-Za-z0-9+/]{43}=?=?$/.test(s)},checkMatching(){try{this.keypair.privateKey&&this.wgStore.checkWGKeyLength(this.keypair.privateKey)&&(this.keypair.publicKey=window.wireguard.generatePublicKey(this.keypair.privateKey),window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey?(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private key does not match with the public key","danger")):(this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},H={for:"peer_private_key_textbox",class:"form-label"},Q={class:"text-muted"},Y={class:"input-group"},Z=["disabled"],X=["disabled"],ee={class:"d-flex"},te={for:"public_key",class:"form-label"},se={class:"text-muted"},ae={class:"form-check form-switch ms-auto"},le=["disabled"],oe={class:"form-check-label",for:"enablePublicKeyEdit"},ie=["disabled"];function ne(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",{class:h(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[e("div",null,[e("label",H,[e("small",Q,[o(l,{t:"Private Key"}),e("code",null,[o(l,{t:"(Required for QR Code and Download)"})])])]),e("div",Y,[p(e("input",{type:"text",class:h(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":t[0]||(t[0]=a=>this.keypair.privateKey=a),disabled:!this.editKey||this.bulk,onBlur:t[1]||(t[1]=a=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,Z),[[u,this.keypair.privateKey]]),e("button",{class:"btn btn-outline-info btn-sm rounded-end-3",onClick:t[2]||(t[2]=a=>this.genKeyPair()),disabled:this.bulk,type:"button",id:"button-addon2"},t[6]||(t[6]=[e("i",{class:"bi bi-arrow-repeat"},null,-1)]),8,X)])]),e("div",null,[e("div",ee,[e("label",te,[e("small",se,[o(l,{t:"Public Key"}),e("code",null,[o(l,{t:"(Required)"})])])]),e("div",ae,[p(e("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:this.bulk,id:"enablePublicKeyEdit","onUpdate:modelValue":t[3]||(t[3]=a=>this.editKey=a)},null,8,le),[[I,this.editKey]]),e("label",oe,[e("small",null,[o(l,{t:"Use your own Private and Public Key"})])])])]),p(e("input",{class:h(["form-control-sm form-control rounded-3",{"is-invalid":this.error}]),"onUpdate:modelValue":t[4]||(t[4]=a=>this.keypair.publicKey=a),onBlur:t[5]||(t[5]=a=>this.checkMatching()),disabled:!this.editKey||this.bulk,type:"text",id:"public_key"},null,42,ie),[[u,this.keypair.publicKey]])])],2)}const de=b(z,[["render",ne]]),re={name:"allowedIPsInput",components:{LocaleText:_},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const s=y(),t=g();return{store:s,dashboardStore:t}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp.filter(s=>s.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(s)):this.availableIp.filter(s=>!this.data.allowed_ips.includes(s))},inputGetLocale(){return L("Enter IP Address/CIDR")}},methods:{addAllowedIp(s){return this.store.checkCIDR(s)?(this.data.allowed_ips.push(s),this.customAvailableIp="",!0):(this.allowedIpFormatError=!0,this.dashboardStore.newMessage("WGDashboard","Allowed IPs is invalid","danger"),!1)}},watch:{customAvailableIp(){this.allowedIpFormatError=!1},availableIp(){this.availableIp!==void 0&&this.availableIp.length>0&&this.addAllowedIp(this.availableIp[0])}},mounted(){}},ce={for:"peer_allowed_ip_textbox",class:"form-label"},pe={class:"text-muted"},ue=["onClick"],he={class:"d-flex gap-2 align-items-center"},be={class:"input-group"},_e=["placeholder","disabled"],me=["disabled"],ve={class:"text-muted"},fe={class:"dropdown flex-grow-1"},ke=["disabled"],ge={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3",style:{"overflow-y":"scroll","max-height":"270px",width:"300px !important"}},ye={class:"px-3 pb-2 pt-1 d-flex gap-3 align-items-center"},we=["onClick"],Ie={class:"me-auto"},xe={key:0},$e={class:"px-3 text-muted"};function Ae(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",{class:h({inactiveField:this.bulk})},[e("label",ce,[e("small",pe,[o(l,{t:"Allowed IPs"}),e("code",null,[o(l,{t:"(Required)"})])])]),e("div",{class:h(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[o(E,{name:"list"},{default:C(()=>[(n(!0),r(P,null,S(this.data.allowed_ips,(a,w)=>(n(),r("span",{class:"badge rounded-pill text-bg-success",key:a},[K(x(a)+" ",1),e("a",{role:"button",onClick:$=>this.data.allowed_ips.splice(w,1)},t[3]||(t[3]=[e("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)]),8,ue)]))),128))]),_:1})],2),e("div",he,[e("div",be,[p(e("input",{type:"text",class:h(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:this.inputGetLocale,"onUpdate:modelValue":t[0]||(t[0]=a=>i.customAvailableIp=a),disabled:c.bulk},null,10,_e),[[u,i.customAvailableIp]]),e("button",{class:"btn btn-outline-success btn-sm rounded-end-3",disabled:c.bulk||!this.customAvailableIp,onClick:t[1]||(t[1]=a=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},t[4]||(t[4]=[e("i",{class:"bi bi-plus-lg"},null,-1)]),8,me)]),e("small",ve,[o(l,{t:"or"})]),e("div",fe,[e("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!c.availableIp||c.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[t[5]||(t[5]=e("i",{class:"bi bi-filter-circle me-2"},null,-1)),o(l,{t:"Pick Available IP"})],8,ke),this.availableIp?(n(),r("ul",ge,[e("li",null,[e("div",ye,[t[6]||(t[6]=e("label",{for:"availableIpSearchString",class:"text-muted"},[e("i",{class:"bi bi-search"})],-1)),p(e("input",{id:"availableIpSearchString",class:"form-control form-control-sm rounded-3","onUpdate:modelValue":t[2]||(t[2]=a=>this.availableIpSearchString=a)},null,512),[[u,this.availableIpSearchString]])])]),(n(!0),r(P,null,S(this.searchAvailableIps,a=>(n(),r("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:w=>this.addAllowedIp(a)},[e("span",Ie,[e("small",null,x(a),1)])],8,we)]))),256)),this.searchAvailableIps.length===0?(n(),r("li",xe,[e("small",$e,[o(l,{t:"No available IP containing"}),K(' "'+x(this.availableIpSearchString)+'"',1)])])):f("",!0)])):f("",!0)])])],2)}const Pe=b(re,[["render",Ae],["__scopeId","data-v-6d5fc831"]]),Se={name:"dnsInput",components:{LocaleText:_},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const s=y(),t=g();return{store:s,dashboardStore:t}},methods:{checkDNS(){if(this.dns){let s=this.dns.split(",").map(t=>t.replaceAll(" ",""));for(let t in s)if(!this.store.regexCheckIP(s[t])){this.error||this.dashboardStore.newMessage("WGDashboard","DNS format is incorrect","danger"),this.error=!0,this.data.DNS="";return}this.error=!1,this.data.DNS=this.dns}}},watch:{dns(){this.checkDNS()}}},Ke={for:"peer_DNS_textbox",class:"form-label"},Le={class:"text-muted"},Ce=["disabled"];function De(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("label",Ke,[e("small",Le,[o(l,{t:"DNS"})])]),p(e("input",{type:"text",class:h(["form-control form-control-sm rounded-3",{"is-invalid":this.error}]),disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=a=>this.dns=a),id:"peer_DNS_textbox"},null,10,Ce),[[u,this.dns]])])}const Te=b(Se,[["render",De]]),Be={name:"endpointAllowedIps",components:{LocaleText:_},props:{data:Object,saving:Boolean},setup(){const s=y(),t=g();return{store:s,dashboardStore:t}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let s=this.endpointAllowedIps.split(",").map(t=>t.replaceAll(" ",""));for(let t in s)if(!this.store.checkCIDR(s[t])){this.error||this.dashboardStore.newMessage("WGDashboard","Endpoint Allowed IPs format is incorrect","danger"),this.data.endpoint_allowed_ip="",this.error=!0;return}this.error=!1,this.data.endpoint_allowed_ip=this.endpointAllowedIps}},watch:{endpointAllowedIps(){this.checkAllowedIP()}}},Ne={for:"peer_endpoint_allowed_ips",class:"form-label"},Ve={class:"text-muted"},Ue=["disabled"];function Me(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("label",Ne,[e("small",Ve,[o(l,{t:"Endpoint Allowed IPs"}),e("code",null,[o(l,{t:"(Required)"})])])]),p(e("input",{type:"text",class:h(["form-control form-control-sm rounded-3",{"is-invalid":i.error}]),disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=a=>this.endpointAllowedIps=a),onBlur:t[1]||(t[1]=a=>this.checkAllowedIP()),id:"peer_endpoint_allowed_ips"},null,42,Ue),[[u,this.endpointAllowedIps]])])}const Ee=b(Be,[["render",Me]]),Fe={name:"presharedKeyInput",components:{LocaleText:_},props:{data:Object,saving:Boolean},data(){return{enable:!1}},watch:{enable(){this.enable?this.data.preshared_key=window.wireguard.generateKeypair().presharedKey:this.data.preshared_key=""}}},Ge={class:"d-flex align-items-start"},Oe={for:"peer_preshared_key_textbox",class:"form-label"},Re={class:"text-muted"},je={class:"form-check form-switch ms-auto"},qe=["disabled"];function We(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("div",Ge,[e("label",Oe,[e("small",Re,[o(l,{t:"Pre-Shared Key"})])]),e("div",je,[p(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":t[0]||(t[0]=a=>this.enable=a),id:"peer_preshared_key_switch"},null,512),[[I,this.enable]])])]),p(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||!this.enable,"onUpdate:modelValue":t[1]||(t[1]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,qe),[[u,this.data.preshared_key]])])}const Je=b(Fe,[["render",We]]),ze={name:"mtuInput",components:{LocaleText:_},props:{data:Object,saving:Boolean}},He={for:"peer_mtu",class:"form-label"},Qe={class:"text-muted"},Ye=["disabled"];function Ze(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("label",He,[e("small",Qe,[o(l,{t:"MTU"})])]),p(e("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=a=>this.data.mtu=a),min:"0",id:"peer_mtu"},null,8,Ye),[[u,this.data.mtu]])])}const Xe=b(ze,[["render",Ze]]),et={name:"persistentKeepAliveInput",components:{LocaleText:_},props:{data:Object,saving:Boolean}},tt={for:"peer_keep_alive",class:"form-label"},st={class:"text-muted"},at=["disabled"];function lt(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("label",tt,[e("small",st,[o(l,{t:"Persistent Keepalive"})])]),p(e("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,at),[[u,this.data.keepalive]])])}const ot=b(et,[["render",lt]]),it={name:"bulkAdd",components:{LocaleText:_},props:{saving:Boolean,data:Object,availableIp:void 0},computed:{bulkAddGetLocale(){return L("How many peers you want to add?")}}},nt={class:"form-check form-switch"},dt=["disabled"],rt={class:"form-check-label me-2",for:"bulk_add"},ct={class:"text-muted d-block"},pt={key:0,class:"form-group"},ut=["max","placeholder"],ht={class:"text-muted"};function bt(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("div",nt,[p(e("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:!this.availableIp,id:"bulk_add","onUpdate:modelValue":t[0]||(t[0]=a=>this.data.bulkAdd=a)},null,8,dt),[[I,this.data.bulkAdd]]),e("label",rt,[e("small",null,[e("strong",null,[o(l,{t:"Bulk Add"})])])])]),e("p",{class:h({"mb-0":!this.data.bulkAdd})},[e("small",ct,[o(l,{t:"By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP."})])],2),this.data.bulkAdd?(n(),r("div",pt,[p(e("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",max:this.availableIp.length,"onUpdate:modelValue":t[1]||(t[1]=a=>this.data.bulkAddAmount=a),placeholder:this.bulkAddGetLocale},null,8,ut),[[u,this.data.bulkAddAmount]]),e("small",ht,[o(l,{t:"You can add up to "+this.availableIp.length+" peers"},null,8,["t"])])])):f("",!0)])}const _t=b(it,[["render",bt]]),mt={name:"peerCreate",components:{LocaleText:_,BulkAdd:_t,PersistentKeepAliveInput:ot,MtuInput:Xe,PresharedKeyInput:Je,EndpointAllowedIps:Ee,DnsInput:Te,AllowedIPsInput:Pe,PrivatePublicKeyInput:de,NameInput:J},data(){return{data:{bulkAdd:!1,bulkAddAmount:0,name:"",allowed_ips:[],private_key:"",public_key:"",DNS:this.dashboardStore.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:this.dashboardStore.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(this.dashboardStore.Configuration.Peers.peer_keep_alive),mtu:parseInt(this.dashboardStore.Configuration.Peers.peer_mtu),preshared_key:"",preshared_key_bulkAdd:!1},availableIp:void 0,availableIpSearchString:"",saving:!1,allowedIpDropdown:void 0}},mounted(){F("/api/getAvailableIPs/"+this.$route.params.id,{},s=>{s.status&&(this.availableIp=s.data)})},setup(){const s=y(),t=g();return{store:s,dashboardStore:t}},methods:{peerCreate(){this.saving=!0,G("/api/addPeers/"+this.$route.params.id,this.data,s=>{s.status?(this.$router.push(`/configuration/${this.$route.params.id}/peers`),this.dashboardStore.newMessage("Server","Peer created successfully","success")):this.dashboardStore.newMessage("Server",s.message,"danger"),this.saving=!1})}},computed:{allRequireFieldsFilled(){let s=!0;return this.data.bulkAdd?(this.data.bulkAddAmount.length===0||this.data.bulkAddAmount>this.availableIp.length)&&(s=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(c=>{this.data[c].length===0&&(s=!1)}),s}},watch:{bulkAdd(s){s||(this.data.bulkAddAmount="")},"data.bulkAddAmount"(){this.data.bulkAddAmount>this.availableIp.length&&(this.data.bulkAddAmount=this.availableIp.length)}}},vt={class:"container"},ft={class:"mb-4"},kt={class:"mb-5 d-flex align-items-center gap-4"},gt={class:"mb-0"},yt={class:"d-flex flex-column gap-2"},wt={class:"row gy-3"},It={key:0,class:"col-sm"},xt={class:"col-sm"},$t={class:"col-sm"},At={key:1,class:"col-12"},Pt={class:"form-check form-switch"},St={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},Kt={class:"fw-bold"},Lt={class:"d-flex mt-2"},Ct=["disabled"],Dt={key:0,class:"bi bi-plus-circle-fill me-2"};function Tt(s,t,c,m,i,v){const l=d("RouterLink"),a=d("LocaleText"),w=d("BulkAdd"),$=d("NameInput"),D=d("PrivatePublicKeyInput"),T=d("AllowedIPsInput"),B=d("EndpointAllowedIps"),N=d("DnsInput"),V=d("PresharedKeyInput"),U=d("MtuInput"),M=d("PersistentKeepAliveInput");return n(),r("div",vt,[e("div",ft,[e("div",kt,[o(l,{to:"peers",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:C(()=>t[2]||(t[2]=[e("h2",{class:"mb-0",style:{"line-height":"0"}},[e("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1}),e("h2",gt,[o(a,{t:"Add Peers"})])])]),e("div",yt,[o(w,{saving:i.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),t[3]||(t[3]=e("hr",{class:"mb-0 mt-2"},null,-1)),this.data.bulkAdd?f("",!0):(n(),k($,{key:0,saving:i.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?f("",!0):(n(),k(D,{key:1,saving:i.saving,data:i.data},null,8,["saving","data"])),this.data.bulkAdd?f("",!0):(n(),k(T,{key:2,availableIp:this.availableIp,saving:i.saving,data:i.data},null,8,["availableIp","saving","data"])),o(B,{saving:i.saving,data:i.data},null,8,["saving","data"]),o(N,{saving:i.saving,data:i.data},null,8,["saving","data"]),t[4]||(t[4]=e("hr",{class:"mb-0 mt-2"},null,-1)),e("div",wt,[this.data.bulkAdd?f("",!0):(n(),r("div",It,[o(V,{saving:i.saving,data:i.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),e("div",xt,[o(U,{saving:i.saving,data:i.data},null,8,["saving","data"])]),e("div",$t,[o(M,{saving:i.saving,data:i.data},null,8,["saving","data"])]),this.data.bulkAdd?(n(),r("div",At,[e("div",Pt,[p(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":t[0]||(t[0]=A=>this.data.preshared_key_bulkAdd=A),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[I,this.data.preshared_key_bulkAdd]]),e("label",St,[e("small",Kt,[o(a,{t:"Pre-Shared Key"}),this.data.preshared_key_bulkAdd?(n(),k(a,{key:0,t:"Enabled"})):(n(),k(a,{key:1,t:"Disabled"}))])])])])):f("",!0)]),e("div",Lt,[e("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.allRequireFieldsFilled||this.saving,onClick:t[1]||(t[1]=A=>this.peerCreate())},[this.saving?f("",!0):(n(),r("i",Dt)),this.saving?(n(),k(a,{key:1,t:"Adding..."})):(n(),k(a,{key:2,t:"Add"}))],8,Ct)])])])}const Ut=b(mt,[["render",Tt],["__scopeId","data-v-17eb547c"]]);export{Ut as default}; diff --git a/src/static/app/dist/assets/peerList.css b/src/static/app/dist/assets/peerList.css new file mode 100644 index 0000000..b3c6c3c --- /dev/null +++ b/src/static/app/dist/assets/peerList.css @@ -0,0 +1,7 @@ +@charset "UTF-8";.animation__fadeInDropdown[data-v-162e14b9]{animation-name:fadeInDropdown-162e14b9;animation-duration:.2s;animation-timing-function:cubic-bezier(.82,.58,.17,.9)}@keyframes fadeInDropdown-162e14b9{0%{opacity:0;filter:blur(3px);transform:translateY(-60px)}to{opacity:1;filter:blur(0px);transform:translateY(-40px)}}.displayModal .dashboardModal[data-v-162e14b9]{width:400px!important}@media screen and (max-width: 768px){.peerSearchContainer[data-v-162e14b9]{flex-direction:column}.peerSettingContainer .dashboardModal[data-v-162e14b9]{width:100%!important}}/*! + * animate.css - https://animate.style/ + * Version - 4.1.1 + * Licensed under the MIT license - http://opensource.org/licenses/MIT + * + * Copyright (c) 2020 Animate.css + */:root{--animate-duration: 1s;--animate-delay: 1s;--animate-repeat: 1}.animate__animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both}.animate__animated.animate__infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animate__animated.animate__repeat-1{-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-iteration-count:var(--animate-repeat);animation-iteration-count:var(--animate-repeat)}.animate__animated.animate__repeat-2{-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 2);animation-iteration-count:calc(var(--animate-repeat) * 2)}.animate__animated.animate__repeat-3{-webkit-animation-iteration-count:3;animation-iteration-count:3;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 3);animation-iteration-count:calc(var(--animate-repeat) * 3)}.animate__animated.animate__delay-1s{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-delay:var(--animate-delay);animation-delay:var(--animate-delay)}.animate__animated.animate__delay-2s{-webkit-animation-delay:2s;animation-delay:2s;-webkit-animation-delay:calc(var(--animate-delay) * 2);animation-delay:calc(var(--animate-delay) * 2)}.animate__animated.animate__delay-3s{-webkit-animation-delay:3s;animation-delay:3s;-webkit-animation-delay:calc(var(--animate-delay) * 3);animation-delay:calc(var(--animate-delay) * 3)}.animate__animated.animate__delay-4s{-webkit-animation-delay:4s;animation-delay:4s;-webkit-animation-delay:calc(var(--animate-delay) * 4);animation-delay:calc(var(--animate-delay) * 4)}.animate__animated.animate__delay-5s{-webkit-animation-delay:5s;animation-delay:5s;-webkit-animation-delay:calc(var(--animate-delay) * 5);animation-delay:calc(var(--animate-delay) * 5)}.animate__animated.animate__faster{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-duration:calc(var(--animate-duration) / 2);animation-duration:calc(var(--animate-duration) / 2)}.animate__animated.animate__fast{-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-duration:calc(var(--animate-duration) * .8);animation-duration:calc(var(--animate-duration) * .8)}.animate__animated.animate__slow{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2)}.animate__animated.animate__slower{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-duration:calc(var(--animate-duration) * 3);animation-duration:calc(var(--animate-duration) * 3)}@media print,(prefers-reduced-motion: reduce){.animate__animated{-webkit-animation-duration:1ms!important;animation-duration:1ms!important;-webkit-transition-duration:1ms!important;transition-duration:1ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important}.animate__animated[class*=Out]{opacity:0}}@-webkit-keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}@keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}.animate__bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.animate__flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__pulse{-webkit-animation-name:pulse;animation-name:pulse;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.animate__shakeX{-webkit-animation-name:shakeX;animation-name:shakeX}@-webkit-keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}@keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}.animate__shakeY{-webkit-animation-name:shakeY;animation-name:shakeY}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}.animate__headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}.animate__swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}.animate__jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}.animate__heartBeat{-webkit-animation-name:heartBeat;animation-name:heartBeat;-webkit-animation-duration:1.3s;animation-duration:1.3s;-webkit-animation-duration:calc(var(--animate-duration) * 1.3);animation-duration:calc(var(--animate-duration) * 1.3);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInDown{-webkit-animation-name:backInDown;animation-name:backInDown}@-webkit-keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInLeft{-webkit-animation-name:backInLeft;animation-name:backInLeft}@-webkit-keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInRight{-webkit-animation-name:backInRight;animation-name:backInRight}@-webkit-keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInUp{-webkit-animation-name:backInUp;animation-name:backInUp}@-webkit-keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}@keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}.animate__backOutDown{-webkit-animation-name:backOutDown;animation-name:backOutDown}@-webkit-keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}@keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}.animate__backOutLeft{-webkit-animation-name:backOutLeft;animation-name:backOutLeft}@-webkit-keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}@keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}.animate__backOutRight{-webkit-animation-name:backOutRight;animation-name:backOutRight}@-webkit-keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}@keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}.animate__backOutUp{-webkit-animation-name:backOutUp;animation-name:backOutUp}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__bounceIn{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.animate__bounceOut{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}.animate__bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}.animate__bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}.animate__bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}.animate__bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate__fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopLeft{-webkit-animation-name:fadeInTopLeft;animation-name:fadeInTopLeft}@-webkit-keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopRight{-webkit-animation-name:fadeInTopRight;animation-name:fadeInTopRight}@-webkit-keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomLeft{-webkit-animation-name:fadeInBottomLeft;animation-name:fadeInBottomLeft}@-webkit-keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomRight{-webkit-animation-name:fadeInBottomRight;animation-name:fadeInBottomRight}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.animate__fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.animate__fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.animate__fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.animate__fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.animate__fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}@keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}.animate__fadeOutTopLeft{-webkit-animation-name:fadeOutTopLeft;animation-name:fadeOutTopLeft}@-webkit-keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}@keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}.animate__fadeOutTopRight{-webkit-animation-name:fadeOutTopRight;animation-name:fadeOutTopRight}@-webkit-keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}@keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}.animate__fadeOutBottomRight{-webkit-animation-name:fadeOutBottomRight;animation-name:fadeOutBottomRight}@-webkit-keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}@keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}.animate__fadeOutBottomLeft{-webkit-animation-name:fadeOutBottomLeft;animation-name:fadeOutBottomLeft}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animate__animated.animate__flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.animate__flipOutX{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.animate__flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInRight{-webkit-animation-name:lightSpeedInRight;animation-name:lightSpeedInRight;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInLeft{-webkit-animation-name:lightSpeedInLeft;animation-name:lightSpeedInLeft;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}@keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}.animate__lightSpeedOutRight{-webkit-animation-name:lightSpeedOutRight;animation-name:lightSpeedOutRight;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}@keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}.animate__lightSpeedOutLeft{-webkit-animation-name:lightSpeedOutLeft;animation-name:lightSpeedOutLeft;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.animate__rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.animate__rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.animate__rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.animate__hinge{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2);-webkit-animation-name:hinge;animation-name:hinge;-webkit-transform-origin:top left;transform-origin:top left}@-webkit-keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.animate__jackInTheBox{-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.animate__rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.animate__zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.animate__zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}.animate__zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft;-webkit-transform-origin:left center;transform-origin:left center}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}.animate__zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight;-webkit-transform-origin:right center;transform-origin:right center}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.dropdown-menu[data-v-f8d25e4d]{right:1rem;min-width:200px}.dropdown-item.disabled[data-v-f8d25e4d],.dropdown-item[data-v-f8d25e4d]:disabled{opacity:.7}.confirmDelete[data-v-f8d25e4d]{padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x)}.slide-fade-leave-active[data-v-4b600874],.slide-fade-enter-active[data-v-4b600874]{transition:all .2s cubic-bezier(.82,.58,.17,1.3)}.slide-fade-enter-from[data-v-4b600874],.slide-fade-leave-to[data-v-4b600874]{transform:translateY(20px);opacity:0;filter:blur(3px)}.subMenuBtn.active[data-v-4b600874]{background-color:#ffffff20}.peerCard[data-v-4b600874]{transition:box-shadow .1s cubic-bezier(.82,.58,.17,.9)}.peerCard[data-v-4b600874]:hover{box-shadow:var(--bs-box-shadow)!important}.toggleShowKey[data-v-a63ae8cb]{position:absolute;top:35px;right:12px}.btn.disabled[data-v-6a5aba2a]{opacity:1;background-color:#0d6efd17;border-color:transparent}[data-v-8f3f1b93]{font-size:.875rem}input[data-v-8f3f1b93]{padding:.1rem .4rem}input[data-v-8f3f1b93]:disabled{border-color:transparent;background-color:#0d6efd17;color:#0d6efd}.dp__main[data-v-8f3f1b93]{width:auto;flex-grow:1;--dp-input-padding: 2.5px 30px 2.5px 12px;--dp-border-radius: .5rem}.schedulePeerJobTransition-move[data-v-5bbdd42b],.schedulePeerJobTransition-enter-active[data-v-5bbdd42b],.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.schedulePeerJobTransition-enter-from[data-v-5bbdd42b],.schedulePeerJobTransition-leave-to[data-v-5bbdd42b]{opacity:0;transform:scale(.9)}.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{position:absolute;width:100%}.card[data-v-177407c1]{height:100%}.dashboardModal[data-v-177407c1]{height:calc(100% - 1rem)!important}@media screen and (min-height: 700px){.card[data-v-177407c1]{height:700px}}.peerBtn[data-v-177407c1]{border:var(--bs-border-width) solid var(--bs-border-color)}.peerBtn.active[data-v-177407c1]{border:var(--bs-border-width) solid var(--bs-body-color)}.confirmationContainer[data-v-a575be12]{background-color:#00000087;z-index:9999;backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px)}.list1-enter-active[data-v-a575be12]{transition-delay:var(--6919ade8)!important}.card[data-v-0b159317],.title[data-v-0b159317]{width:100%}@media screen and (min-width: 700px){.card[data-v-0b159317],.title[data-v-0b159317]{width:700px}}.animate__fadeInUp[data-v-0b159317]{animation-timing-function:cubic-bezier(.42,0,.22,1)}.list1-move[data-v-0b159317],.list1-enter-active[data-v-0b159317],.list1-leave-active[data-v-0b159317]{transition:all .5s cubic-bezier(.42,0,.22,1)}.list1-enter-from[data-v-0b159317],.list1-leave-to[data-v-0b159317]{opacity:0;transform:translateY(30px)}.list1-leave-active[data-v-0b159317]{width:100%;position:absolute}.peerNav .nav-link{&.active[data-v-7a0360ac]{background-color:#efefef}} diff --git a/src/static/app/dist/assets/peerList.js b/src/static/app/dist/assets/peerList.js new file mode 100644 index 0000000..b77b481 --- /dev/null +++ b/src/static/app/dist/assets/peerList.js @@ -0,0 +1,18 @@ +import{_ as pt,D as At,W as Ye,G as Lt,m as ut,f as $t,o as S,c as C,a as h,b as y,w as nt,k as K,p as rt,F as ct,r as Ot,t as F,j as T,h as gt,e as V,I as Oa,J as Aa,B as gs,E as Ss,d as st,n as it,g as j,q as U,K as ro,L as lo,M as Js,N as La,A as fi,O as Ta,P as Ks,Q as Ra,R as co,U as Ia,l as ho,T as gi,v as be,C as Xs,V as Gs,s as uo,X as Ms,u as Ea,H as Fa}from"./index.js";import{L as O}from"./localeText.js";import{d as Ut}from"./dayjs.min.js";import{b as Ba}from"./browser.js";import za from"./peerCreate.js";import{V as fo}from"./vue-datepicker.js";import"./wireguard.js";const Na={name:"peerSearch",components:{LocaleText:O},setup(){const s=At(),t=Ye();return{store:s,wireguardConfigurationStore:t}},props:{configuration:Object},data(){return{sort:{status:Lt("Status"),name:Lt("Name"),allowed_ip:Lt("Allowed IPs"),restricted:Lt("Restricted")},interval:{5e3:Lt("5 Seconds"),1e4:Lt("10 Seconds"),3e4:Lt("30 Seconds"),6e4:Lt("1 Minutes")},searchString:"",searchStringTimeout:void 0,showDisplaySettings:!1,showMoreSettings:!1}},methods:{debounce(){this.searchStringTimeout?(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)):this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)},updateSort(s){ut("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:s},t=>{t.status&&this.store.getConfiguration()})},updateRefreshInterval(s){ut("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:s},t=>{t.status&&this.store.getConfiguration()})},downloadAllPeer(){$t(`/api/downloadAllPeers/${this.configuration.Name}`,{},s=>{console.log(s),window.wireguard.generateZipFiles(s,this.configuration.Name)})}},computed:{searchBarPlaceholder(){return Lt("Search Peers...")}}},Va={class:"mb-3"},ja={class:"d-flex gap-2 z-3 peerSearchContainer"},Wa={class:"mt-3 mt-md-0 flex-grow-1"},Ha=["placeholder"],Ua={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},Ya={class:"container-md d-flex h-100 w-100"},Ja={class:"m-auto modal-dialog-centered dashboardModal"},Ka={class:"card rounded-3 shadow w-100"},Xa={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},Ga={class:"mb-0 fw-normal"},qa={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},Qa={class:"text-muted fw-bold mb-2"},Za={class:"list-group"},tr=["onClick"],er={class:"me-auto"},sr={key:0,class:"bi bi-check text-primary"},ir={class:"text-muted fw-bold mb-2"},nr={class:"list-group"},or=["onClick"],ar={class:"me-auto"},rr={key:0,class:"bi bi-check text-primary"},lr={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},cr={class:"container-md d-flex h-100 w-100"},dr={class:"m-auto modal-dialog-centered dashboardModal"},hr={class:"card rounded-3 shadow w-100"},ur={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},fr={class:"mb-0"},gr={class:"card-body px-4 pb-4 d-flex gap-3 flex-column pt-0"},pr={class:"text-muted fw-bold mb-2"},mr={class:"list-group"},br={class:"text-muted fw-bold mb-2"},_r={class:"list-group"};function xr(s,t,e,i,n,o){const a=V("LocaleText"),r=V("RouterLink");return S(),C("div",Va,[h("div",ja,[y(r,{to:"create",class:"text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm"},{default:nt(()=>[t[13]||(t[13]=h("i",{class:"bi bi-plus-lg me-2"},null,-1)),y(a,{t:"Peer"})]),_:1}),h("button",{class:"btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm",onClick:t[0]||(t[0]=l=>this.downloadAllPeer())},[t[14]||(t[14]=h("i",{class:"bi bi-download me-2"},null,-1)),y(a,{t:"Download All"})]),h("div",Wa,[K(h("input",{class:"form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100",placeholder:o.searchBarPlaceholder,id:"searchPeers",onKeyup:t[1]||(t[1]=l=>this.debounce()),"onUpdate:modelValue":t[2]||(t[2]=l=>this.searchString=l)},null,40,Ha),[[rt,this.searchString]])]),h("button",{onClick:t[3]||(t[3]=l=>this.showDisplaySettings=!0),class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",type:"button","aria-expanded":"false"},[t[15]||(t[15]=h("i",{class:"bi bi-filter-circle me-2"},null,-1)),y(a,{t:"Display"})]),h("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:t[4]||(t[4]=l=>this.$emit("editConfiguration")),type:"button","aria-expanded":"false"},t[16]||(t[16]=[h("i",{class:"bi bi-gear-fill"},null,-1)])),h("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:t[5]||(t[5]=l=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},t[17]||(t[17]=[h("i",{class:"bi bi-three-dots"},null,-1)])),y(gt,{name:"zoom"},{default:nt(()=>[this.showDisplaySettings?(S(),C("div",Ua,[h("div",Ya,[h("div",Ja,[h("div",Ka,[h("div",Xa,[h("h4",Ga,[y(a,{t:"Display"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:t[6]||(t[6]=l=>this.showDisplaySettings=!1)})]),h("div",qa,[h("div",null,[h("p",Qa,[h("small",null,[y(a,{t:"Sort by"})])]),h("div",Za,[(S(!0),C(ct,null,Ot(this.sort,(l,c)=>(S(),C("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:d=>this.updateSort(c)},[h("span",er,F(l),1),i.store.Configuration.Server.dashboard_sort===c?(S(),C("i",sr)):T("",!0)],8,tr))),256))])]),h("div",null,[h("p",ir,[h("small",null,[y(a,{t:"Refresh Interval"})])]),h("div",nr,[(S(!0),C(ct,null,Ot(this.interval,(l,c)=>(S(),C("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:d=>this.updateRefreshInterval(c)},[h("span",ar,F(l),1),i.store.Configuration.Server.dashboard_refresh_interval===c?(S(),C("i",rr)):T("",!0)],8,or))),256))])])])])])])])):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[this.showMoreSettings?(S(),C("div",lr,[h("div",cr,[h("div",dr,[h("div",hr,[h("div",ur,[h("h4",fr,[y(a,{t:"Other Settings"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:t[7]||(t[7]=l=>this.showMoreSettings=!1)})]),h("div",gr,[h("div",null,[h("p",pr,[h("small",null,[y(a,{t:"Peers"})])]),h("div",mr,[h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:t[8]||(t[8]=l=>this.$emit("selectPeers"))},[y(a,{t:"Select Peers"})]),h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:t[9]||(t[9]=l=>this.$emit("jobsAll"))},[y(a,{t:"Active Jobs"})]),h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:t[10]||(t[10]=l=>this.$emit("jobLogs"))},[y(a,{t:"Logs"})])])]),h("div",null,[h("p",br,[h("small",null,[y(a,{t:"Configuration"})])]),h("div",_r,[h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:t[11]||(t[11]=l=>this.$emit("backupRestore"))},[y(a,{t:"Backup & Restore"})]),h("a",{class:"list-group-item list-group-item-action d-flex text-danger fw-bold",role:"button",onClick:t[12]||(t[12]=l=>this.$emit("deleteConfiguration"))},[y(a,{t:"Delete Configuration"})])])])])])])])])):T("",!0)]),_:1})])])}const yr=pt(Na,[["render",xr],["__scopeId","data-v-162e14b9"]]);function vr(s){return Oa()?(Aa(s),!0):!1}function go(s){return typeof s=="function"?s():gs(s)}const po=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wr=Object.prototype.toString,kr=s=>wr.call(s)==="[object Object]",hs=()=>{},Sr=Mr();function Mr(){var s,t;return po&&((s=window?.navigator)==null?void 0:s.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Oe(s){var t;const e=go(s);return(t=e?.$el)!=null?t:e}const mo=po?window:void 0;function Ts(...s){let t,e,i,n;if(typeof s[0]=="string"||Array.isArray(s[0])?([e,i,n]=s,t=mo):[t,e,i,n]=s,!t)return hs;Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);const o=[],a=()=>{o.forEach(d=>d()),o.length=0},r=(d,u,f,g)=>(d.addEventListener(u,f,g),()=>d.removeEventListener(u,f,g)),l=Ss(()=>[Oe(t),go(n)],([d,u])=>{if(a(),!d)return;const f=kr(u)?{...u}:u;o.push(...e.flatMap(g=>i.map(p=>r(d,g,p,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),a()};return vr(c),c}let Li=!1;function Pr(s,t,e={}){const{window:i=mo,ignore:n=[],capture:o=!0,detectIframe:a=!1}=e;if(!i)return hs;Sr&&!Li&&(Li=!0,Array.from(i.document.body.children).forEach(f=>f.addEventListener("click",hs)),i.document.documentElement.addEventListener("click",hs));let r=!0;const l=f=>n.some(g=>{if(typeof g=="string")return Array.from(i.document.querySelectorAll(g)).some(p=>p===f.target||f.composedPath().includes(p));{const p=Oe(g);return p&&(f.target===p||f.composedPath().includes(p))}}),d=[Ts(i,"click",f=>{const g=Oe(s);if(!(!g||g===f.target||f.composedPath().includes(g))){if(f.detail===0&&(r=!l(f)),!r){r=!0;return}t(f)}},{passive:!0,capture:o}),Ts(i,"pointerdown",f=>{const g=Oe(s);r=!l(f)&&!!(g&&!f.composedPath().includes(g))},{passive:!0}),a&&Ts(i,"blur",f=>{setTimeout(()=>{var g;const p=Oe(s);((g=i.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!p?.contains(i.document.activeElement)&&t(f)},0)})].filter(Boolean);return()=>d.forEach(f=>f())}const Cr={name:"peerSettingsDropdown",components:{LocaleText:O},setup(){return{dashboardStore:At()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1,confirmDelete:!1}},methods:{downloadPeer(){$t("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},s=>{if(s.status){const t=new Blob([s.data.file],{type:"text/plain"}),e=URL.createObjectURL(t),i=`${s.data.fileName}.conf`,n=document.createElement("a");n.href=e,n.download=i,n.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",s.message,"danger")})},downloadQRCode(){$t("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},s=>{s.status?this.$emit("qrcode",s.data.file):this.dashboardStore.newMessage("Server",s.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,ut(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},s=>{this.dashboardStore.newMessage("Server",s.message,s.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,ut(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},s=>{this.dashboardStore.newMessage("Server",s.message,s.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,ut(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},s=>{this.dashboardStore.newMessage("Server",s.message,s.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},Dr={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},$r={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Or={class:"text-body d-flex"},Ar={class:"ms-auto"},Lr={key:1},Tr={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},Rr={key:2,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Ir={key:1,class:"confirmDelete"},Er={style:{"white-space":"break-spaces"},class:"mb-2 d-block fw-bold"},Fr={class:"d-flex w-100 gap-2"},Br=["disabled"],zr=["disabled"],Nr={key:1};function Vr(s,t,e,i,n,o){const a=V("LocaleText");return S(),C("ul",Dr,[this.Peer.restricted?(S(),C("li",Nr,[h("a",{class:it(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:t[9]||(t[9]=r=>this.allowAccessPeer()),role:"button"},[t[23]||(t[23]=h("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(S(),j(a,{key:1,t:"Allowing Access..."})):(S(),j(a,{key:0,t:"Allow Access"}))],2)])):(S(),C(ct,{key:0},[this.confirmDelete?(S(),C("li",Ir,[h("p",Er,[y(a,{t:"Are you sure to delete this peer?"})]),h("div",Fr,[h("button",{onClick:t[7]||(t[7]=r=>this.deletePeer()),disabled:this.deleteBtnDisabled,class:"flex-grow-1 ms-auto btn btn-sm bg-danger"},[y(a,{t:"Yes"})],8,Br),h("button",{disabled:this.deleteBtnDisabled,onClick:t[8]||(t[8]=r=>this.confirmDelete=!1),class:"flex-grow-1 btn btn-sm bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle"},[y(a,{t:"No"})],8,zr)])])):(S(),C(ct,{key:0},[this.Peer.status==="running"?(S(),C(ct,{key:0},[h("li",$r,[h("span",Or,[t[10]||(t[10]=h("i",{class:"bi bi-box-arrow-in-right"},null,-1)),h("span",Ar,F(this.Peer.endpoint),1)])]),t[11]||(t[11]=h("li",null,[h("hr",{class:"dropdown-divider"})],-1))],64)):T("",!0),this.Peer.private_key?(S(),C("li",Rr,[h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[0]||(t[0]=r=>this.downloadPeer())},t[12]||(t[12]=[h("i",{class:"me-auto bi bi-download"},null,-1)])),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[1]||(t[1]=r=>this.downloadQRCode())},t[13]||(t[13]=[h("i",{class:"me-auto bi bi-qr-code"},null,-1)])),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[2]||(t[2]=r=>this.$emit("share"))},t[14]||(t[14]=[h("i",{class:"me-auto bi bi-share"},null,-1)]))])):(S(),C("li",Lr,[h("small",Tr,[y(a,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),t[21]||(t[21]=h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:t[3]||(t[3]=r=>this.$emit("setting"))},[t[15]||(t[15]=h("i",{class:"me-auto bi bi-pen"},null,-1)),t[16]||(t[16]=st()),y(a,{t:"Peer Settings"})])]),h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:t[4]||(t[4]=r=>this.$emit("jobs"))},[t[17]||(t[17]=h("i",{class:"me-auto bi bi-app-indicator"},null,-1)),t[18]||(t[18]=st()),y(a,{t:"Schedule Jobs"})])]),t[22]||(t[22]=h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),h("li",null,[h("a",{class:it(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:t[5]||(t[5]=r=>this.restrictPeer()),role:"button"},[t[19]||(t[19]=h("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(S(),j(a,{key:1,t:"Restricting..."})):(S(),j(a,{key:0,t:"Restrict Access"}))],2)]),h("li",null,[h("a",{class:it(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:t[6]||(t[6]=r=>this.confirmDelete=!0),role:"button"},[t[20]||(t[20]=h("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(S(),j(a,{key:1,t:"Deleting..."})):(S(),j(a,{key:0,t:"Delete"}))],2)])],64))],64))])}const jr=pt(Cr,[["render",Vr],["__scopeId","data-v-f8d25e4d"]]),Wr={name:"peer",components:{LocaleText:O,PeerSettingsDropdown:jr},props:{Peer:Object},data(){return{}},setup(){const s=U(null),t=U(!1);return Pr(s,e=>{t.value=!1}),{target:s,subMenuOpened:t}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},Hr={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},Ur={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},Yr={class:"text-primary"},Jr={class:"text-success"},Kr={key:0,class:"text-secondary"},Xr={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},Gr={class:"card-body pt-1",style:{"font-size":"0.9rem"}},qr={class:"mb-1"},Qr={class:"text-muted"},Zr={class:"d-block"},tl={class:"text-muted"},el={class:"d-block"},sl={class:"d-flex align-items-end"};function il(s,t,e,i,n,o){const a=V("LocaleText"),r=V("PeerSettingsDropdown");return S(),C("div",{class:it(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":e.Peer.restricted}])},[h("div",null,[e.Peer.restricted?(S(),C("div",Xr,[t[11]||(t[11]=h("i",{class:"bi-lock-fill me-2"},null,-1)),y(a,{t:"Access Restricted"})])):(S(),C("div",Hr,[h("div",{class:it(["dot ms-0",{active:e.Peer.status==="running"}])},null,2),h("div",Ur,[h("span",Yr,[t[6]||(t[6]=h("i",{class:"bi bi-arrow-down"},null,-1)),h("strong",null,F((e.Peer.cumu_receive+e.Peer.total_receive).toFixed(4)),1),t[7]||(t[7]=st(" GB "))]),h("span",Jr,[t[8]||(t[8]=h("i",{class:"bi bi-arrow-up"},null,-1)),h("strong",null,F((e.Peer.cumu_sent+e.Peer.total_sent).toFixed(4)),1),t[9]||(t[9]=st(" GB "))]),e.Peer.latest_handshake!=="No Handshake"?(S(),C("span",Kr,[t[10]||(t[10]=h("i",{class:"bi bi-arrows-angle-contract"},null,-1)),st(" "+F(o.getLatestHandshake)+" ago ",1)])):T("",!0)])]))]),h("div",Gr,[h("h6",null,F(e.Peer.name?e.Peer.name:"Untitled Peer"),1),h("div",qr,[h("small",Qr,[y(a,{t:"Public Key"})]),h("small",Zr,[h("samp",null,F(e.Peer.id),1)])]),h("div",null,[h("small",tl,[y(a,{t:"Allowed IPs"})]),h("small",el,[h("samp",null,F(e.Peer.allowed_ip),1)])]),h("div",sl,[h("div",{class:it(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[h("a",{role:"button",class:"text-body",onClick:t[0]||(t[0]=l=>this.subMenuOpened=!0)},t[12]||(t[12]=[h("h5",{class:"mb-0"},[h("i",{class:"bi bi-three-dots"})],-1)])),y(gt,{name:"slide-fade"},{default:nt(()=>[this.subMenuOpened?(S(),j(r,{key:0,onQrcode:t[1]||(t[1]=l=>this.$emit("qrcode",l)),onSetting:t[2]||(t[2]=l=>this.$emit("setting")),onJobs:t[3]||(t[3]=l=>this.$emit("jobs")),onRefresh:t[4]||(t[4]=l=>this.$emit("refresh")),onShare:t[5]||(t[5]=l=>this.$emit("share")),Peer:e.Peer,ref:"target"},null,8,["Peer"])):T("",!0)]),_:1})],2)])])],2)}const nl=pt(Wr,[["render",il],["__scopeId","data-v-4b600874"]]);/*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + */function Je(s){return s+.5|0}const jt=(s,t,e)=>Math.max(Math.min(s,e),t);function Ae(s){return jt(Je(s*2.55),0,255)}function Yt(s){return jt(Je(s*255),0,255)}function Et(s){return jt(Je(s/2.55)/100,0,1)}function Ti(s){return jt(Je(s*100),0,100)}const vt={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},qs=[..."0123456789ABCDEF"],ol=s=>qs[s&15],al=s=>qs[(s&240)>>4]+qs[s&15],qe=s=>(s&240)>>4===(s&15),rl=s=>qe(s.r)&&qe(s.g)&&qe(s.b)&&qe(s.a);function ll(s){var t=s.length,e;return s[0]==="#"&&(t===4||t===5?e={r:255&vt[s[1]]*17,g:255&vt[s[2]]*17,b:255&vt[s[3]]*17,a:t===5?vt[s[4]]*17:255}:(t===7||t===9)&&(e={r:vt[s[1]]<<4|vt[s[2]],g:vt[s[3]]<<4|vt[s[4]],b:vt[s[5]]<<4|vt[s[6]],a:t===9?vt[s[7]]<<4|vt[s[8]]:255})),e}const cl=(s,t)=>s<255?t(s):"";function dl(s){var t=rl(s)?ol:al;return s?"#"+t(s.r)+t(s.g)+t(s.b)+cl(s.a,t):void 0}const hl=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function bo(s,t,e){const i=t*Math.min(e,1-e),n=(o,a=(o+s/30)%12)=>e-i*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function ul(s,t,e){const i=(n,o=(n+s/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function fl(s,t,e){const i=bo(s,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)i[n]*=1-t-e,i[n]+=t;return i}function gl(s,t,e,i,n){return s===n?(t-e)/i+(t.5?d/(2-o-a):d/(o+a),l=gl(e,i,n,d,o),l=l*60+.5),[l|0,c||0,r]}function mi(s,t,e,i){return(Array.isArray(t)?s(t[0],t[1],t[2]):s(t,e,i)).map(Yt)}function bi(s,t,e){return mi(bo,s,t,e)}function pl(s,t,e){return mi(fl,s,t,e)}function ml(s,t,e){return mi(ul,s,t,e)}function _o(s){return(s%360+360)%360}function bl(s){const t=hl.exec(s);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?Ae(+t[5]):Yt(+t[5]));const n=_o(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=pl(n,o,a):t[1]==="hsv"?i=ml(n,o,a):i=bi(n,o,a),{r:i[0],g:i[1],b:i[2],a:e}}function _l(s,t){var e=pi(s);e[0]=_o(e[0]+t),e=bi(e),s.r=e[0],s.g=e[1],s.b=e[2]}function xl(s){if(!s)return;const t=pi(s),e=t[0],i=Ti(t[1]),n=Ti(t[2]);return s.a<255?`hsla(${e}, ${i}%, ${n}%, ${Et(s.a)})`:`hsl(${e}, ${i}%, ${n}%)`}const Ri={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"},Ii={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 yl(){const s={},t=Object.keys(Ii),e=Object.keys(Ri);let i,n,o,a,r;for(i=0;i>16&255,o>>8&255,o&255]}return s}let Qe;function vl(s){Qe||(Qe=yl(),Qe.transparent=[0,0,0,0]);const t=Qe[s.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const wl=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function kl(s){const t=wl.exec(s);let e=255,i,n,o;if(t){if(t[7]!==i){const a=+t[7];e=t[8]?Ae(a):jt(a*255,0,255)}return i=+t[1],n=+t[3],o=+t[5],i=255&(t[2]?Ae(i):jt(i,0,255)),n=255&(t[4]?Ae(n):jt(n,0,255)),o=255&(t[6]?Ae(o):jt(o,0,255)),{r:i,g:n,b:o,a:e}}}function Sl(s){return s&&(s.a<255?`rgba(${s.r}, ${s.g}, ${s.b}, ${Et(s.a)})`:`rgb(${s.r}, ${s.g}, ${s.b})`)}const Rs=s=>s<=.0031308?s*12.92:Math.pow(s,1/2.4)*1.055-.055,ge=s=>s<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4);function Ml(s,t,e){const i=ge(Et(s.r)),n=ge(Et(s.g)),o=ge(Et(s.b));return{r:Yt(Rs(i+e*(ge(Et(t.r))-i))),g:Yt(Rs(n+e*(ge(Et(t.g))-n))),b:Yt(Rs(o+e*(ge(Et(t.b))-o))),a:s.a+e*(t.a-s.a)}}function Ze(s,t,e){if(s){let i=pi(s);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=bi(i),s.r=i[0],s.g=i[1],s.b=i[2]}}function xo(s,t){return s&&Object.assign(t||{},s)}function Ei(s){var t={r:0,g:0,b:0,a:255};return Array.isArray(s)?s.length>=3&&(t={r:s[0],g:s[1],b:s[2],a:255},s.length>3&&(t.a=Yt(s[3]))):(t=xo(s,{r:0,g:0,b:0,a:1}),t.a=Yt(t.a)),t}function Pl(s){return s.charAt(0)==="r"?kl(s):bl(s)}class ze{constructor(t){if(t instanceof ze)return t;const e=typeof t;let i;e==="object"?i=Ei(t):e==="string"&&(i=ll(t)||vl(t)||Pl(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=xo(this._rgb);return t&&(t.a=Et(t.a)),t}set rgb(t){this._rgb=Ei(t)}rgbString(){return this._valid?Sl(this._rgb):void 0}hexString(){return this._valid?dl(this._rgb):void 0}hslString(){return this._valid?xl(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=i.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,i.r=255&c*i.r+o*n.r+.5,i.g=255&c*i.g+o*n.g+.5,i.b=255&c*i.b+o*n.b+.5,i.a=a*i.a+(1-a)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=Ml(this._rgb,t._rgb,e)),this}clone(){return new ze(this.rgb)}alpha(t){return this._rgb.a=Yt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Je(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 Ze(this._rgb,2,t),this}darken(t){return Ze(this._rgb,2,-t),this}saturate(t){return Ze(this._rgb,1,t),this}desaturate(t){return Ze(this._rgb,1,-t),this}rotate(t){return _l(this._rgb,t),this}}/*! + * Chart.js v4.4.4 + * https://www.chartjs.org + * (c) 2024 Chart.js Contributors + * Released under the MIT License + */function Tt(){}const Cl=(()=>{let s=0;return()=>s++})();function N(s){return s===null||typeof s>"u"}function q(s){if(Array.isArray&&Array.isArray(s))return!0;const t=Object.prototype.toString.call(s);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function B(s){return s!==null&&Object.prototype.toString.call(s)==="[object Object]"}function Q(s){return(typeof s=="number"||s instanceof Number)&&isFinite(+s)}function _t(s,t){return Q(s)?s:t}function I(s,t){return typeof s>"u"?t:s}const Dl=(s,t)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100:+s/t,yo=(s,t)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100*t:+s;function Y(s,t,e){if(s&&typeof s.call=="function")return s.apply(e,t)}function W(s,t,e,i){let n,o,a;if(q(s))for(o=s.length,n=0;ns,x:s=>s.x,y:s=>s.y};function Al(s){const t=s.split("."),e=[];let i="";for(const n of t)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Ll(s){const t=Al(s);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function Jt(s,t){return(Fi[t]||(Fi[t]=Ll(t)))(s)}function _i(s){return s.charAt(0).toUpperCase()+s.slice(1)}const Ve=s=>typeof s<"u",Kt=s=>typeof s=="function",Bi=(s,t)=>{if(s.size!==t.size)return!1;for(const e of s)if(!t.has(e))return!1;return!0};function Tl(s){return s.type==="mouseup"||s.type==="click"||s.type==="contextmenu"}const G=Math.PI,X=2*G,Rl=X+G,bs=Number.POSITIVE_INFINITY,Il=G/180,et=G/2,te=G/4,zi=G*2/3,Wt=Math.log10,Dt=Math.sign;function Ee(s,t,e){return Math.abs(s-t)n-o).pop(),t}function xe(s){return!isNaN(parseFloat(s))&&isFinite(s)}function Fl(s,t){const e=Math.round(s);return e-t<=s&&e+t>=s}function wo(s,t,e){let i,n,o;for(i=0,n=s.length;il&&c=Math.min(t,e)-i&&s<=Math.max(t,e)+i}function yi(s,t,e){e=e||(a=>s[a]1;)o=n+i>>1,e(o)?n=o:i=o;return{lo:n,hi:i}}const Bt=(s,t,e,i)=>yi(s,e,i?n=>{const o=s[n][t];return os[n][t]yi(s,e,i=>s[i][t]>=e);function Vl(s,t,e){let i=0,n=s.length;for(;ii&&s[n-1]>e;)n--;return i>0||n{const i="_onData"+_i(e),n=s[e];Object.defineProperty(s,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return s._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...o)}),a}})})}function ji(s,t){const e=s._chartjs;if(!e)return;const i=e.listeners,n=i.indexOf(t);n!==-1&&i.splice(n,1),!(i.length>0)&&(So.forEach(o=>{delete s[o]}),delete s._chartjs)}function Mo(s){const t=new Set(s);return t.size===s.length?s:Array.from(t)}const Po=function(){return typeof window>"u"?function(s){return s()}:window.requestAnimationFrame}();function Co(s,t){let e=[],i=!1;return function(...n){e=n,i||(i=!0,Po.call(window,()=>{i=!1,s.apply(t,e)}))}}function Wl(s,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(s,t,i)):s.apply(this,i),t}}const vi=s=>s==="start"?"left":s==="end"?"right":"center",ht=(s,t,e)=>s==="start"?t:s==="end"?e:(t+e)/2,Hl=(s,t,e,i)=>s===(i?"left":"right")?e:s==="center"?(t+e)/2:t;function Do(s,t,e){const i=t.length;let n=0,o=i;if(s._sorted){const{iScale:a,_parsed:r}=s,l=a.axis,{min:c,max:d,minDefined:u,maxDefined:f}=a.getUserBounds();u&&(n=lt(Math.min(Bt(r,l,c).lo,e?i:Bt(t,l,a.getPixelForValue(c)).lo),0,i-1)),f?o=lt(Math.max(Bt(r,a.axis,d,!0).hi+1,e?0:Bt(t,l,a.getPixelForValue(d),!0).hi+1),n,i)-n:o=i-n}return{start:n,count:o}}function $o(s){const{xScale:t,yScale:e,_scaleRanges:i}=s,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return s._scaleRanges=n,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,n),o}const ts=s=>s===0||s===1,Wi=(s,t,e)=>-(Math.pow(2,10*(s-=1))*Math.sin((s-t)*X/e)),Hi=(s,t,e)=>Math.pow(2,-10*s)*Math.sin((s-t)*X/e)+1,Fe={linear:s=>s,easeInQuad:s=>s*s,easeOutQuad:s=>-s*(s-2),easeInOutQuad:s=>(s/=.5)<1?.5*s*s:-.5*(--s*(s-2)-1),easeInCubic:s=>s*s*s,easeOutCubic:s=>(s-=1)*s*s+1,easeInOutCubic:s=>(s/=.5)<1?.5*s*s*s:.5*((s-=2)*s*s+2),easeInQuart:s=>s*s*s*s,easeOutQuart:s=>-((s-=1)*s*s*s-1),easeInOutQuart:s=>(s/=.5)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2),easeInQuint:s=>s*s*s*s*s,easeOutQuint:s=>(s-=1)*s*s*s*s+1,easeInOutQuint:s=>(s/=.5)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2),easeInSine:s=>-Math.cos(s*et)+1,easeOutSine:s=>Math.sin(s*et),easeInOutSine:s=>-.5*(Math.cos(G*s)-1),easeInExpo:s=>s===0?0:Math.pow(2,10*(s-1)),easeOutExpo:s=>s===1?1:-Math.pow(2,-10*s)+1,easeInOutExpo:s=>ts(s)?s:s<.5?.5*Math.pow(2,10*(s*2-1)):.5*(-Math.pow(2,-10*(s*2-1))+2),easeInCirc:s=>s>=1?s:-(Math.sqrt(1-s*s)-1),easeOutCirc:s=>Math.sqrt(1-(s-=1)*s),easeInOutCirc:s=>(s/=.5)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1),easeInElastic:s=>ts(s)?s:Wi(s,.075,.3),easeOutElastic:s=>ts(s)?s:Hi(s,.075,.3),easeInOutElastic(s){return ts(s)?s:s<.5?.5*Wi(s*2,.1125,.45):.5+.5*Hi(s*2-1,.1125,.45)},easeInBack(s){return s*s*((1.70158+1)*s-1.70158)},easeOutBack(s){return(s-=1)*s*((1.70158+1)*s+1.70158)+1},easeInOutBack(s){let t=1.70158;return(s/=.5)<1?.5*(s*s*(((t*=1.525)+1)*s-t)):.5*((s-=2)*s*(((t*=1.525)+1)*s+t)+2)},easeInBounce:s=>1-Fe.easeOutBounce(1-s),easeOutBounce(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},easeInOutBounce:s=>s<.5?Fe.easeInBounce(s*2)*.5:Fe.easeOutBounce(s*2-1)*.5+.5};function wi(s){if(s&&typeof s=="object"){const t=s.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ui(s){return wi(s)?s:new ze(s)}function Is(s){return wi(s)?s:new ze(s).saturate(.5).darken(.1).hexString()}const Ul=["x","y","borderWidth","radius","tension"],Yl=["color","borderColor","backgroundColor"];function Jl(s){s.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),s.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),s.set("animations",{colors:{type:"color",properties:Yl},numbers:{type:"number",properties:Ul}}),s.describe("animations",{_fallback:"animation"}),s.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 Kl(s){s.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Yi=new Map;function Xl(s,t){t=t||{};const e=s+JSON.stringify(t);let i=Yi.get(e);return i||(i=new Intl.NumberFormat(s,t),Yi.set(e,i)),i}function Ke(s,t,e){return Xl(t,e).format(s)}const Oo={values(s){return q(s)?s:""+s},numeric(s,t,e){if(s===0)return"0";const i=this.chart.options.locale;let n,o=s;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=Gl(s,e)}const a=Wt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Ke(s,i,l)},logarithmic(s,t,e){if(s===0)return"0";const i=e[t].significand||s/Math.pow(10,Math.floor(Wt(s)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Oo.numeric.call(this,s,t,e):""}};function Gl(s,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&s!==Math.floor(s)&&(e=s-Math.floor(s)),e}var Ps={formatters:Oo};function ql(s){s.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:Ps.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),s.route("scale.ticks","color","","color"),s.route("scale.grid","color","","borderColor"),s.route("scale.border","color","","borderColor"),s.route("scale.title","color","","color"),s.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),s.describe("scales",{_fallback:"scale"}),s.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const ce=Object.create(null),Zs=Object.create(null);function Be(s,t){if(!t)return s;const e=t.split(".");for(let i=0,n=e.length;ii.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=(i,n)=>Is(n.backgroundColor),this.hoverBorderColor=(i,n)=>Is(n.borderColor),this.hoverColor=(i,n)=>Is(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 Es(this,t,e)}get(t){return Be(this,t)}describe(t,e){return Es(Zs,t,e)}override(t,e){return Es(ce,t,e)}route(t,e,i,n){const o=Be(this,t),a=Be(this,i),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[n];return B(l)?Object.assign({},c,l):I(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var Z=new Ql({_scriptable:s=>!s.startsWith("on"),_indexable:s=>s!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Jl,Kl,ql]);function Zl(s){return!s||N(s.size)||N(s.family)?null:(s.style?s.style+" ":"")+(s.weight?s.weight+" ":"")+s.size+"px "+s.family}function _s(s,t,e,i,n){let o=t[n];return o||(o=t[n]=s.measureText(n).width,e.push(n)),o>i&&(i=o),i}function tc(s,t,e,i){i=i||{};let n=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(n=i.data={},o=i.garbageCollect=[],i.font=t),s.save(),s.font=t;let a=0;const r=e.length;let l,c,d,u,f;for(l=0;le.length){for(l=0;l0&&s.stroke()}}function zt(s,t,e){return e=e||.5,!t||s&&s.x>t.left-e&&s.xt.top-e&&s.y0&&o.strokeColor!=="";let l,c;for(s.save(),s.font=n.string,ic(s,o),l=0;l+s||0;function ki(s,t){const e={},i=B(t),n=i?Object.keys(t):t,o=B(s)?i?a=>I(s[a],s[t[a]]):a=>s[a]:()=>s;for(const a of n)e[a]=cc(o(a));return e}function Lo(s){return ki(s,{top:"y",right:"x",bottom:"y",left:"x"})}function re(s){return ki(s,["topLeft","topRight","bottomLeft","bottomRight"])}function ft(s){const t=Lo(s);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ot(s,t){s=s||{},t=t||Z.font;let e=I(s.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=I(s.style,t.style);i&&!(""+i).match(rc)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const n={family:I(s.family,t.family),lineHeight:lc(I(s.lineHeight,t.lineHeight),e),size:e,style:i,weight:I(s.weight,t.weight),string:""};return n.string=Zl(n),n}function Le(s,t,e,i){let n,o,a;for(n=0,o=s.length;ne&&r===0?0:r+l;return{min:a(i,-Math.abs(o)),max:a(n,o)}}function Xt(s,t){return Object.assign(Object.create(s),t)}function Si(s,t=[""],e,i,n=()=>s[0]){const o=e||s;typeof i>"u"&&(i=Eo("_fallback",s));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:s,_rootScopes:o,_fallback:i,_getTarget:n,override:r=>Si([r,...s],t,o,i)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete s[0][l],!0},get(r,l){return Ro(r,l,()=>_c(l,t,s,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(s[0])},has(r,l){return Xi(r).includes(l)},ownKeys(r){return Xi(r)},set(r,l,c){const d=r._storage||(r._storage=n());return r[l]=d[l]=c,delete r._keys,!0}})}function ye(s,t,e,i){const n={_cacheable:!1,_proxy:s,_context:t,_subProxy:e,_stack:new Set,_descriptors:To(s,i),setContext:o=>ye(s,o,e,i),override:o=>ye(s.override(o),t,e,i)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete s[a],!0},get(o,a,r){return Ro(o,a,()=>uc(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(s,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(s,a)},getPrototypeOf(){return Reflect.getPrototypeOf(s)},has(o,a){return Reflect.has(s,a)},ownKeys(){return Reflect.ownKeys(s)},set(o,a,r){return s[a]=r,delete o[a],!0}})}function To(s,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:n=t.allKeys}=s;return{allKeys:n,scriptable:e,indexable:i,isScriptable:Kt(e)?e:()=>e,isIndexable:Kt(i)?i:()=>i}}const hc=(s,t)=>s?s+_i(t):t,Mi=(s,t)=>B(t)&&s!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ro(s,t,e){if(Object.prototype.hasOwnProperty.call(s,t)||t==="constructor")return s[t];const i=e();return s[t]=i,i}function uc(s,t,e){const{_proxy:i,_context:n,_subProxy:o,_descriptors:a}=s;let r=i[t];return Kt(r)&&a.isScriptable(t)&&(r=fc(t,r,s,e)),q(r)&&r.length&&(r=gc(t,r,s,a.isIndexable)),Mi(t,r)&&(r=ye(r,n,o&&o[t],a)),r}function fc(s,t,e,i){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(s))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+s);r.add(s);let l=t(o,a||i);return r.delete(s),Mi(s,l)&&(l=Pi(n._scopes,n,s,l)),l}function gc(s,t,e,i){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&i(s))return t[o.index%t.length];if(B(t[0])){const l=t,c=n._scopes.filter(d=>d!==l);t=[];for(const d of l){const u=Pi(c,n,s,d);t.push(ye(u,o,a&&a[s],r))}}return t}function Io(s,t,e){return Kt(s)?s(t,e):s}const pc=(s,t)=>s===!0?t:typeof s=="string"?Jt(t,s):void 0;function mc(s,t,e,i,n){for(const o of t){const a=pc(e,o);if(a){s.add(a);const r=Io(a._fallback,e,n);if(typeof r<"u"&&r!==e&&r!==i)return r}else if(a===!1&&typeof i<"u"&&e!==i)return null}return!1}function Pi(s,t,e,i){const n=t._rootScopes,o=Io(t._fallback,e,i),a=[...s,...n],r=new Set;r.add(i);let l=Ki(r,a,e,o||e,i);return l===null||typeof o<"u"&&o!==e&&(l=Ki(r,a,o,l,i),l===null)?!1:Si(Array.from(r),[""],n,o,()=>bc(t,e,i))}function Ki(s,t,e,i,n){for(;e;)e=mc(s,t,e,i,n);return e}function bc(s,t,e){const i=s._getTarget();t in i||(i[t]={});const n=i[t];return q(n)&&B(e)?e:n||{}}function _c(s,t,e,i){let n;for(const o of t)if(n=Eo(hc(o,s),e),typeof n<"u")return Mi(s,n)?Pi(e,i,s,n):n}function Eo(s,t){for(const e of t){if(!e)continue;const i=e[s];if(typeof i<"u")return i}}function Xi(s){let t=s._keys;return t||(t=s._keys=xc(s._scopes)),t}function xc(s){const t=new Set;for(const e of s)for(const i of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(i);return Array.from(t)}function Fo(s,t,e,i){const{iScale:n}=s,{key:o="r"}=this._parsing,a=new Array(i);let r,l,c,d;for(r=0,l=i;rts==="x"?"y":"x";function vc(s,t,e,i){const n=s.skip?t:s,o=t,a=e.skip?t:e,r=Qs(o,n),l=Qs(a,o);let c=r/(r+l),d=l/(r+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const u=i*c,f=i*d;return{previous:{x:o.x-u*(a.x-n.x),y:o.y-u*(a.y-n.y)},next:{x:o.x+f*(a.x-n.x),y:o.y+f*(a.y-n.y)}}}function wc(s,t,e){const i=s.length;let n,o,a,r,l,c=ve(s,0);for(let d=0;d!c.skip)),t.cubicInterpolationMode==="monotone")Sc(s,n);else{let c=i?s[s.length-1]:s[0];for(o=0,a=s.length;os.ownerDocument.defaultView.getComputedStyle(s,null);function Cc(s,t){return $s(s).getPropertyValue(t)}const Dc=["top","right","bottom","left"];function le(s,t,e){const i={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Dc[n];i[o]=parseFloat(s[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const $c=(s,t,e)=>(s>0||t>0)&&(!e||!e.shadowRoot);function Oc(s,t){const e=s.touches,i=e&&e.length?e[0]:s,{offsetX:n,offsetY:o}=i;let a=!1,r,l;if($c(n,o,s.target))r=n,l=o;else{const c=t.getBoundingClientRect();r=i.clientX-c.left,l=i.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function ne(s,t){if("native"in s)return s;const{canvas:e,currentDevicePixelRatio:i}=t,n=$s(e),o=n.boxSizing==="border-box",a=le(n,"padding"),r=le(n,"border","width"),{x:l,y:c,box:d}=Oc(s,e),u=a.left+(d&&r.left),f=a.top+(d&&r.top);let{width:g,height:p}=t;return o&&(g-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-u)/g*e.width/i),y:Math.round((c-f)/p*e.height/i)}}function Ac(s,t,e){let i,n;if(t===void 0||e===void 0){const o=s&&Di(s);if(!o)t=s.clientWidth,e=s.clientHeight;else{const a=o.getBoundingClientRect(),r=$s(o),l=le(r,"border","width"),c=le(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,i=xs(r.maxWidth,o,"clientWidth"),n=xs(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||bs,maxHeight:n||bs}}const ss=s=>Math.round(s*10)/10;function Lc(s,t,e,i){const n=$s(s),o=le(n,"margin"),a=xs(n.maxWidth,s,"clientWidth")||bs,r=xs(n.maxHeight,s,"clientHeight")||bs,l=Ac(s,t,e);let{width:c,height:d}=l;if(n.boxSizing==="content-box"){const f=le(n,"border","width"),g=le(n,"padding");c-=g.width+f.width,d-=g.height+f.height}return c=Math.max(0,c-o.width),d=Math.max(0,i?c/i:d-o.height),c=ss(Math.min(c,a,l.maxWidth)),d=ss(Math.min(d,r,l.maxHeight)),c&&!d&&(d=ss(c/2)),(t!==void 0||e!==void 0)&&i&&l.height&&d>l.height&&(d=l.height,c=ss(Math.floor(d*i))),{width:c,height:d}}function Gi(s,t,e){const i=t||1,n=Math.floor(s.height*i),o=Math.floor(s.width*i);s.height=Math.floor(s.height),s.width=Math.floor(s.width);const a=s.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${s.height}px`,a.style.width=`${s.width}px`),s.currentDevicePixelRatio!==i||a.height!==n||a.width!==o?(s.currentDevicePixelRatio=i,a.height=n,a.width=o,s.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Tc=function(){let s=!1;try{const t={get passive(){return s=!0,!1}};Ci()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return s}();function qi(s,t){const e=Cc(s,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function oe(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:s.y+e*(t.y-s.y)}}function Rc(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:i==="middle"?e<.5?s.y:t.y:i==="after"?e<1?s.y:t.y:e>0?t.y:s.y}}function Ic(s,t,e,i){const n={x:s.cp2x,y:s.cp2y},o={x:t.cp1x,y:t.cp1y},a=oe(s,n,e),r=oe(n,o,e),l=oe(o,t,e),c=oe(a,r,e),d=oe(r,l,e);return oe(c,d,e)}const Ec=function(s,t){return{x(e){return s+s+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Fc=function(){return{x(s){return s},setWidth(s){},textAlign(s){return s},xPlus(s,t){return s+t},leftForLtr(s,t){return s}}};function _e(s,t,e){return s?Ec(t,e):Fc()}function zo(s,t){let e,i;(t==="ltr"||t==="rtl")&&(e=s.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),s.prevTextDirection=i)}function No(s,t){t!==void 0&&(delete s.prevTextDirection,s.canvas.style.setProperty("direction",t[0],t[1]))}function Vo(s){return s==="angle"?{between:je,compare:Bl,normalize:xt}:{between:Ft,compare:(t,e)=>t-e,normalize:t=>t}}function Qi({start:s,end:t,count:e,loop:i,style:n}){return{start:s%e,end:t%e,loop:i&&(t-s+1)%e===0,style:n}}function Bc(s,t,e){const{property:i,start:n,end:o}=e,{between:a,normalize:r}=Vo(i),l=t.length;let{start:c,end:d,loop:u}=s,f,g;if(u){for(c+=l,d+=l,f=0,g=l;fl(n,k,_)&&r(n,k)!==0,x=()=>r(o,_)===0||l(o,k,_),M=()=>m||v(),P=()=>!m||x();for(let D=d,$=d;D<=u;++D)w=t[D%a],!w.skip&&(_=c(w[i]),_!==k&&(m=l(_,n,o),b===null&&M()&&(b=r(_,n)===0?D:$),b!==null&&P()&&(p.push(Qi({start:b,end:D,loop:f,count:a,style:g})),b=null),$=D,k=_));return b!==null&&p.push(Qi({start:b,end:u,loop:f,count:a,style:g})),p}function Wo(s,t){const e=[],i=s.segments;for(let n=0;nn&&s[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Nc(s,t,e,i){const n=s.length,o=[];let a=t,r=s[t],l;for(l=t+1;l<=e;++l){const c=s[l%n];c.skip||c.stop?r.skip||(i=!1,o.push({start:t%n,end:(l-1)%n,loop:i}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%n,end:a%n,loop:i}),o}function Vc(s,t){const e=s.points,i=s.options.spanGaps,n=e.length;if(!n)return[];const o=!!s._loop,{start:a,end:r}=zc(e,n,o,i);if(i===!0)return Zi(s,[{start:a,end:r,loop:o}],e,t);const l=rr({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Po.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const o=i.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,i,t,"progress")),o.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}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((i,n)=>Math.max(i,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 i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Rt=new Hc;const en="transparent",Uc={boolean(s,t,e){return e>.5?t:s},color(s,t,e){const i=Ui(s||en),n=i.valid&&Ui(t||en);return n&&n.valid?n.mix(i,e).hexString():t},number(s,t,e){return s+(t-s)*e}};class Yc{constructor(t,e,i,n){const o=e[i];n=Le([t.to,n,o,t.from]);const a=Le([t.from,o,n]);this._active=!0,this._fn=t.fn||Uc[t.type||typeof a],this._easing=Fe[t.easing]||Fe.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=i,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],o=i-this._start,a=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Le([t.to,e,n,t.from]),this._from=Le([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n{const o=t[n];if(!B(o))return;const a={};for(const r of e)a[r]=o[r];(q(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!i.has(r))&&i.set(r,a)})})}_animateOptions(t,e){const i=e.options,n=Kc(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&Jc(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const d=e[c];let u=o[c];const f=i.get(c);if(u)if(f&&u.active()){u.update(f,d,r);continue}else u.cancel();if(!f||!f.duration){t[c]=d;continue}o[c]=u=new Yc(f,t,c,d),n.push(u)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return Rt.add(this._chart,i),!0}}function Jc(s,t){const e=[],i=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function rn(s,t){const{chart:e,_cachedMeta:i}=s,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=i,l=o.axis,c=a.axis,d=Qc(o,a,i),u=t.length;let f;for(let g=0;ge[i].axis===t).shift()}function ed(s,t){return Xt(s,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function sd(s,t,e){return Xt(s,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Me(s,t){const e=s.controller.index,i=s.vScale&&s.vScale.axis;if(i){t=t||s._parsed;for(const n of t){const o=n._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const Bs=s=>s==="reset"||s==="none",ln=(s,t)=>t?s:Object.assign({},s),id=(s,t,e)=>s&&!t.hidden&&t._stacked&&{keys:Uo(e,!0),values:null};class Gt{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=on(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&&Me(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(u,f,g,p)=>u==="x"?f:u==="r"?p:g,o=e.xAxisID=I(i.xAxisID,Fs(t,"x")),a=e.yAxisID=I(i.yAxisID,Fs(t,"y")),r=e.rAxisID=I(i.rAxisID,Fs(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),d=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(d)}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&&ji(this._data,this),t._stacked&&Me(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(B(e)){const n=this._cachedMeta;this._data=qc(e,n)}else if(i!==e){if(i){ji(i,this);const n=this._cachedMeta;Me(n),n._parsed=[]}e&&Object.isExtensible(e)&&jl(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,i=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=on(e.vScale,e),e.stack!==i.stack&&(n=!0,Me(e),e.stack=i.stack),this._resyncElements(t),(n||o!==e._stacked)&&rn(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:o,_stacked:a}=i,r=o.axis;let l=t===0&&e===n.length?!0:i._sorted,c=t>0&&i._parsed[t-1],d,u,f;if(this._parsing===!1)i._parsed=n,i._sorted=!0,f=n;else{q(n[t])?f=this.parseArrayData(i,n,t,e):B(n[t])?f=this.parseObjectData(i,n,t,e):f=this.parsePrimitiveData(i,n,t,e);const g=()=>u[r]===null||c&&u[r]m||u=0;--f)if(!p()){this.updateRangeFromParsed(c,t,g,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,a;for(n=0,o=e.length;n=0&&tthis.getContext(i,n,e),m=c.resolveNamedOptions(f,g,p,u);return m.$shared&&(m.$shared=l,o[a]=Object.freeze(ln(m,l))),m}_resolveAnimations(t,e,i){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){const d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,e),f=d.getOptionScopes(this.getDataset(),u);l=d.createResolver(f,this.getContext(t,i,e))}const c=new Ho(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Bs(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(i),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:a}}updateElement(t,e,i,n){Bs(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Bs(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"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,i=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const n=i.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;rn-o))}return s._cache.$bar}function od(s){const t=s.iScale,e=nd(t,s.type);let i=t._length,n,o,a,r;const l=()=>{a===32767||a===-32768||(Ve(r)&&(i=Math.min(i,Math.abs(a-r)||i)),r=a)};for(n=0,o=e.length;n0?n[s-1]:null,r=sMath.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function Yo(s,t,e,i){return q(s)?ld(s,t,e,i):t[e.axis]=e.parse(s,i),t}function cn(s,t,e,i){const n=s.iScale,o=s.vScale,a=n.getLabels(),r=n===o,l=[];let c,d,u,f;for(c=e,d=e+i;c=e?1:-1)}function dd(s){let t,e,i,n,o;return s.horizontal?(t=s.base>s.x,e="left",i="right"):(t=s.based.controller.options.grouped),o=i.options.stacked,a=[],r=this._cachedMeta.controller.getParsed(e),l=r&&r[i.axis],c=d=>{const u=d._parsed.find(g=>g[i.axis]===l),f=u&&u[d.vScale.axis];if(N(f)||isNaN(f))return!0};for(const d of n)if(!(e!==void 0&&c(d))&&((o===!1||a.indexOf(d.stack)===-1||o===void 0&&d.stack===void 0)&&a.push(d.stack),d.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:i[t]||"",value:"("+r+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),d=a.axis,u=r.axis;for(let f=e;fje(k,r,l,!0)?1:Math.max(v,v*e,x,x*e),p=(k,v,x)=>je(k,r,l,!0)?-1:Math.min(v,v*e,x,x*e),m=g(0,c,u),b=g(et,d,f),_=p(G,c,u),w=p(G+et,d,f);i=(m-_)/2,n=(b-w)/2,o=-(m+_)/2,a=-(b+w)/2}return{ratioX:i,ratioY:n,offsetX:o,offsetY:a}}class Ko extends Gt{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=i;else{let o=l=>+i[l];if(B(i[t])){const{key:l="value"}=this._parsing;o=c=>+Jt(i[c],l)}let a,r;for(a=t,r=t+e;a0&&!isNaN(t)?X*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Ke(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,o,a,r,l;if(!t){for(n=0,o=i.data.datasets.length;n0&&this.getParsed(e-1);for(let x=0;x=w){P.skip=!0;continue}const D=this.getParsed(x),$=N(D[g]),R=P[f]=a.getPixelForValue(D[f],x),L=P[g]=o||$?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,D,l):D[g],x);P.skip=isNaN(R)||isNaN(L)||$,P.stop=x>0&&Math.abs(D[f]-v[f])>b,m&&(P.parsed=D,P.raw=c.data[x]),u&&(P.options=d||this.resolveDataElementOptions(x,M.active?"active":n)),_||this.updateElement(M,x,P,n),v=D}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class md extends Gt{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Ke(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,i,n){return Fo.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,n)=>{const o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(oe.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,n){const o=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,d=c.xCenter,u=c.yCenter,f=c.getIndexAngle(0)-.5*G;let g=f,p;const m=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?St(this.resolveDataElementOptions(t,e).angle||i):0}}class bd extends Ko{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class _d extends Gt{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return Fo.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(i.points=n,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(i,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r0&&this.getParsed(e-1);for(let v=e;v0&&Math.abs(M[g]-k[g])>_,b&&(P.parsed=M,P.raw=c.data[v]),f&&(P.options=u||this.resolveDataElementOptions(v,x.active?"active":n)),w||this.updateElement(x,v,P,n),k=M}this.updateSharedOptions(u,n,d)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}}function se(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class $i{static override(t){Object.assign($i.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return se()}parse(){return se()}format(){return se()}add(){return se()}diff(){return se()}startOf(){return se()}endOf(){return se()}}var yd={_date:$i};function vd(s,t,e,i){const{controller:n,data:o,_sorted:a}=s,r=n._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?Nl:Bt;if(i){if(n._sharedOptions){const c=o[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const u=l(o,t,e-d),f=l(o,t,e+d);return{lo:u.lo,hi:f.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function Xe(s,t,e,i,n){const o=s.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r{l[a]&&l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:d}),r=r||l.inRange(t.x,t.y,n))}),i&&!r?[]:o}var Md={evaluateInteractionItems:Xe,modes:{index(s,t,e,i){const n=ne(t,s),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?Ns(s,n,o,i,a):Vs(s,n,o,!1,i,a),l=[];return r.length?(s.getSortedVisibleDatasetMetas().forEach(c=>{const d=r[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(s,t,e,i){const n=ne(t,s),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?Ns(s,n,o,i,a):Vs(s,n,o,!1,i,a);if(r.length>0){const l=r[0].datasetIndex,c=s.getDatasetMeta(l).data;r=[];for(let d=0;de.pos===t)}function fn(s,t){return s.filter(e=>Go.indexOf(e.pos)===-1&&e.box.axis===t)}function Ce(s,t){return s.sort((e,i)=>{const n=t?i:e,o=t?e:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Pd(s){const t=[];let e,i,n,o,a,r;for(e=0,i=(s||[]).length;ec.box.fullSize),!0),i=Ce(Pe(t,"left"),!0),n=Ce(Pe(t,"right")),o=Ce(Pe(t,"top"),!0),a=Ce(Pe(t,"bottom")),r=fn(t,"x"),l=fn(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Pe(t,"chartArea"),vertical:i.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function gn(s,t,e,i){return Math.max(s[e],t[e])+Math.max(s[i],t[i])}function qo(s,t){s.top=Math.max(s.top,t.top),s.left=Math.max(s.left,t.left),s.bottom=Math.max(s.bottom,t.bottom),s.right=Math.max(s.right,t.right)}function Od(s,t,e,i){const{pos:n,box:o}=e,a=s.maxPadding;if(!B(n)){e.size&&(s[n]-=e.size);const u=i[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?o.height:o.width),e.size=u.size/u.count,s[n]+=e.size}o.getPadding&&qo(a,o.getPadding());const r=Math.max(0,t.outerWidth-gn(a,s,"left","right")),l=Math.max(0,t.outerHeight-gn(a,s,"top","bottom")),c=r!==s.w,d=l!==s.h;return s.w=r,s.h=l,e.horizontal?{same:c,other:d}:{same:d,other:c}}function Ad(s){const t=s.maxPadding;function e(i){const n=Math.max(t[i]-s[i],0);return s[i]+=n,n}s.y+=e("top"),s.x+=e("left"),e("right"),e("bottom")}function Ld(s,t){const e=t.maxPadding;function i(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return i(s?["left","right"]:["top","bottom"])}function Te(s,t,e,i){const n=[];let o,a,r,l,c,d;for(o=0,a=s.length,c=0;o{typeof m.beforeLayout=="function"&&m.beforeLayout()});const d=l.reduce((m,b)=>b.box.options&&b.box.options.display===!1?m:m+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/d,hBoxMaxHeight:a/2}),f=Object.assign({},n);qo(f,ft(i));const g=Object.assign({maxPadding:f,w:o,h:a,x:n.left,y:n.top},n),p=Dd(l.concat(c),u);Te(r.fullSize,g,u,p),Te(l,g,u,p),Te(c,g,u,p)&&Te(l,g,u,p),Ad(g),pn(r.leftAndTop,g,u,p),g.x+=g.w,g.y+=g.h,pn(r.rightAndBottom,g,u,p),s.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},W(r.chartArea,m=>{const b=m.box;Object.assign(b,s.chartArea),b.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class Qo{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Td extends Qo{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const us="$chartjs",Rd={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},mn=s=>s===null||s==="";function Id(s,t){const e=s.style,i=s.getAttribute("height"),n=s.getAttribute("width");if(s[us]={initial:{height:i,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",mn(n)){const o=qi(s,"width");o!==void 0&&(s.width=o)}if(mn(i))if(s.style.height==="")s.height=s.width/(t||2);else{const o=qi(s,"height");o!==void 0&&(s.height=o)}return s}const Zo=Tc?{passive:!0}:!1;function Ed(s,t,e){s&&s.addEventListener(t,e,Zo)}function Fd(s,t,e){s&&s.canvas&&s.canvas.removeEventListener(t,e,Zo)}function Bd(s,t){const e=Rd[s.type]||s.type,{x:i,y:n}=ne(s,t);return{type:e,chart:t,native:s,x:i!==void 0?i:null,y:n!==void 0?n:null}}function ys(s,t){for(const e of s)if(e===t||e.contains(t))return!0}function zd(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||ys(r.addedNodes,i),a=a&&!ys(r.removedNodes,i);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Nd(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||ys(r.removedNodes,i),a=a&&!ys(r.addedNodes,i);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const He=new Map;let bn=0;function ta(){const s=window.devicePixelRatio;s!==bn&&(bn=s,He.forEach((t,e)=>{e.currentDevicePixelRatio!==s&&t()}))}function Vd(s,t){He.size||window.addEventListener("resize",ta),He.set(s,t)}function jd(s){He.delete(s),He.size||window.removeEventListener("resize",ta)}function Wd(s,t,e){const i=s.canvas,n=i&&Di(i);if(!n)return;const o=Co((r,l)=>{const c=n.clientWidth;e(r,l),c{const l=r[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d)});return a.observe(n),Vd(s,o),a}function js(s,t,e){e&&e.disconnect(),t==="resize"&&jd(s)}function Hd(s,t,e){const i=s.canvas,n=Co(o=>{s.ctx!==null&&e(Bd(o,s))},s);return Ed(i,t,n),n}class Ud extends Qo{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Id(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[us])return!1;const i=e[us].initial;["height","width"].forEach(o=>{const a=i[o];N(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=i.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[us],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:zd,detach:Nd,resize:Wd}[e]||Hd;n[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:js,detach:js,resize:js}[e]||Fd)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return Lc(t,e,i,n)}isAttached(t){const e=t&&Di(t);return!!(e&&e.isConnected)}}function Yd(s){return!Ci()||typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas?Td:Ud}class Vt{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return xe(this.x)&&xe(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(o=>{n[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),n}}function Jd(s,t){const e=s.options.ticks,i=Kd(s),n=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?Gd(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>n)return qd(t,c,o,a/n),c;const d=Xd(o,t,n);if(a>0){let u,f;const g=a>1?Math.round((l-r)/(a-1)):null;for(ns(t,c,d,N(g)?0:r-g,r),u=0,f=a-1;un)return l}return Math.max(n,1)}function Gd(s){const t=[];let e,i;for(e=0,i=s.length;es==="left"?"right":s==="right"?"left":s,_n=(s,t,e)=>t==="top"||t==="left"?s[t]+e:s[t]-e,xn=(s,t)=>Math.min(t||s,s);function yn(s,t){const e=[],i=s.length/t,n=s.length;let o=0;for(;oa+r)))return l}function eh(s,t){W(s,e=>{const i=e.gc,n=i.length/2;let o;if(n>t){for(o=0;oi?i:e,i=n&&e>i?e:i,{min:_t(e,_t(i,e)),max:_t(i,_t(e,i))}}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(){Y(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=dc(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r=o||i<=1||!this.isHorizontal()){this.labelRotation=n;return}const d=this._getLabelSizes(),u=d.widest.width,f=d.highest.height,g=lt(this.chart.width-u,0,this.maxWidth);r=t.offset?this.maxWidth/i:g/(i-1),u+6>r&&(r=g/(i-(t.offset?.5:1)),l=this.maxHeight-De(t.grid)-e.padding-vn(t.title,this.chart.options.font),c=Math.sqrt(u*u+f*f),a=xi(Math.min(Math.asin(lt((d.highest.height+6)/r,-1,1)),Math.asin(lt(l/c,-1,1))-Math.asin(lt(f/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){Y(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Y(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=vn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=De(o)+l):(t.height=this.maxHeight,t.width=De(o)+l),i.display&&this.ticks.length){const{first:c,last:d,widest:u,highest:f}=this._getLabelSizes(),g=i.padding*2,p=St(this.labelRotation),m=Math.cos(p),b=Math.sin(p);if(r){const _=i.mirror?0:b*u.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+_+g)}else{const _=i.mirror?0:m*u.width+b*f.height;t.width=Math.min(this.maxWidth,t.width+_+g)}this._calculatePadding(c,d,b,m)}}this._handleMargins(),r?(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,i,n){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,g=0;l?c?(f=n*t.width,g=i*e.height):(f=i*t.height,g=n*e.width):o==="start"?g=e.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,g=e.width/2),this.paddingLeft=Math.max((f-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((g-u+a)*this.width/(this.width-u),0)}else{let d=e.height/2,u=t.height/2;o==="start"?(d=0,u=t.height):o==="end"&&(d=e.height,u=0),this.paddingTop=d+a,this.paddingBottom=u+a}}_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(){Y(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,i;for(e=0,i=t.length;e({width:a[$]||0,height:r[$]||0});return{first:D(0),last:D(e-1),widest:D(M),highest:D(P),widths:a,heights:r}}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 zl(this._alignToPixels?ee(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&&tr*n?r/i:l/n:l*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),f=De(o),g=[],p=r.setContext(this.getContext()),m=p.display?p.width:0,b=m/2,_=function(H){return ee(i,H,m)};let w,k,v,x,M,P,D,$,R,L,E,at;if(a==="top")w=_(this.bottom),P=this.bottom-f,$=w-b,L=_(t.top)+b,at=t.bottom;else if(a==="bottom")w=_(this.top),L=t.top,at=_(t.bottom)-b,P=w+b,$=this.top+f;else if(a==="left")w=_(this.right),M=this.right-f,D=w-b,R=_(t.left)+b,E=t.right;else if(a==="right")w=_(this.left),R=t.left,E=_(t.right)-b,M=w+b,D=this.left+f;else if(e==="x"){if(a==="center")w=_((t.top+t.bottom)/2+.5);else if(B(a)){const H=Object.keys(a)[0],tt=a[H];w=_(this.chart.scales[H].getPixelForValue(tt))}L=t.top,at=t.bottom,P=w+b,$=P+f}else if(e==="y"){if(a==="center")w=_((t.left+t.right)/2);else if(B(a)){const H=Object.keys(a)[0],tt=a[H];w=_(this.chart.scales[H].getPixelForValue(tt))}M=w-b,D=M-f,R=t.left,E=t.right}const J=I(n.ticks.maxTicksLimit,u),z=Math.max(1,Math.ceil(u/J));for(k=0;k0&&(Zt-=Qt/2);break}Ge={left:Zt,top:Se,width:Qt+fe.width,height:ke+fe.height,color:z.backdropColor}}b.push({label:v,font:$,textOffset:E,options:{rotation:m,color:tt,strokeColor:kt,strokeWidth:dt,textAlign:ue,textBaseline:at,translation:[x,M],backdrop:Ge}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-St(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:i,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,d;return e==="left"?n?(d=this.right+o,i==="near"?c="left":i==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-r,i==="near"?c="right":i==="center"?(c="center",d-=l/2):(c="left",d=this.left)):e==="right"?n?(d=this.left+o,i==="near"?c="right":i==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+r,i==="near"?c="left":i==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_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:i,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,a),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,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,d)=>{!d.width||!d.color||(i.save(),i.lineWidth=d.width,i.strokeStyle=d.color,i.setLineDash(d.borderDash||[]),i.lineDashOffset=d.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(e.display)for(o=0,a=n.length;o{this.draw(o)}}]:[{z:i,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(),i=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o{const i=e.split("."),n=i.pop(),o=[s].concat(i).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");Z.route(o,n,l,r)})}function lh(s){return"id"in s&&"defaults"in s}class ch{constructor(){this.controllers=new os(Gt,"datasets",!0),this.elements=new os(Vt,"elements"),this.plugins=new os(Object,"plugins"),this.scales=new os(he,"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,i){[...e].forEach(n=>{const o=i||this._getRegistryForType(n);i||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):W(n,a=>{const r=i||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,i){const n=_i(t);Y(i["before"+n],[],i),e[t](i),Y(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;eo.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function hh(s){const t={},e=[],i=Object.keys(Pt.plugins.items);for(let o=0;o1&&wn(s[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${s}' axis. Please provide 'axis' or 'position' option.`)}function kn(s,t,e){if(e[t+"AxisID"]===s)return{axis:t}}function _h(s,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===s||i.yAxisID===s);if(e.length)return kn(s,"x",e[0])||kn(s,"y",e[0])}return{}}function xh(s,t){const e=ce[s.type]||{scales:{}},i=t.scales||{},n=ei(s.type,t),o=Object.create(null);return Object.keys(i).forEach(a=>{const r=i[a];if(!B(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=si(a,r,_h(a,s),Z.scales[r.type]),c=mh(l,n),d=e.scales||{};o[a]=Ie(Object.create(null),[{axis:l},r,d[l],d[c]])}),s.data.datasets.forEach(a=>{const r=a.type||s.type,l=a.indexAxis||ei(r,t),d=(ce[r]||{}).scales||{};Object.keys(d).forEach(u=>{const f=ph(u,l),g=a[f+"AxisID"]||f;o[g]=o[g]||Object.create(null),Ie(o[g],[{axis:f},i[g],d[u]])})}),Object.keys(o).forEach(a=>{const r=o[a];Ie(r,[Z.scales[r.type],Z.scale])}),o}function ea(s){const t=s.options||(s.options={});t.plugins=I(t.plugins,{}),t.scales=xh(s,t)}function sa(s){return s=s||{},s.datasets=s.datasets||[],s.labels=s.labels||[],s}function yh(s){return s=s||{},s.data=sa(s.data),ea(s),s}const Sn=new Map,ia=new Set;function as(s,t){let e=Sn.get(s);return e||(e=t(),Sn.set(s,e),ia.add(e)),e}const $e=(s,t,e)=>{const i=Jt(t,e);i!==void 0&&s.add(i)};let vh=class{constructor(t){this._config=yh(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=sa(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(),ea(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return as(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return as(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return as(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return as(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return(!n||e)&&(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,a=this._cachedScopes(t,i),r=a.get(e);if(r)return r;const l=new Set;e.forEach(d=>{t&&(l.add(t),d.forEach(u=>$e(l,t,u))),d.forEach(u=>$e(l,n,u)),d.forEach(u=>$e(l,ce[o]||{},u)),d.forEach(u=>$e(l,Z,u)),d.forEach(u=>$e(l,Zs,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),ia.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,ce[e]||{},Z.datasets[e]||{},{type:e},Z,Zs]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Mn(this._resolverCache,t,n);let l=a;if(kh(a,e)){o.$shared=!1,i=Kt(i)?i():i;const c=this.createResolver(t,i,r);l=ye(a,i,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Mn(this._resolverCache,t,i);return B(e)?ye(o,e,void 0,n):o}};function Mn(s,t,e){let i=s.get(t);i||(i=new Map,s.set(t,i));const n=e.join();let o=i.get(n);return o||(o={resolver:Si(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},i.set(n,o)),o}const wh=s=>B(s)&&Object.getOwnPropertyNames(s).some(t=>Kt(s[t]));function kh(s,t){const{isScriptable:e,isIndexable:i}=To(s);for(const n of t){const o=e(n),a=i(n),r=(a||o)&&s[n];if(o&&(Kt(r)||wh(r))||a&&q(r))return!0}return!1}var Sh="4.4.4";const Mh=["top","bottom","left","right","chartArea"];function Pn(s,t){return s==="top"||s==="bottom"||Mh.indexOf(s)===-1&&t==="x"}function Cn(s,t){return function(e,i){return e[s]===i[s]?e[t]-i[t]:e[s]-i[s]}}function Dn(s){const t=s.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Y(e&&e.onComplete,[s],t)}function Ph(s){const t=s.chart,e=t.options.animation;Y(e&&e.onProgress,[s],t)}function na(s){return Ci()&&typeof s=="string"?s=document.getElementById(s):s&&s.length&&(s=s[0]),s&&s.canvas&&(s=s.canvas),s}const fs={},$n=s=>{const t=na(s);return Object.values(fs).filter(e=>e.canvas===t).pop()};function Ch(s,t,e){const i=Object.keys(s);for(const n of i){const o=+n;if(o>=t){const a=s[n];delete s[n],(e>0||o>t)&&(s[o+e]=a)}}}function Dh(s,t,e,i){return!e||s.type==="mouseout"?null:i?t:s}function rs(s,t,e){return s.options.clip?s[e]:t[e]}function $h(s,t){const{xScale:e,yScale:i}=s;return e&&i?{left:rs(e,t,"left"),right:rs(e,t,"right"),top:rs(i,t,"top"),bottom:rs(i,t,"bottom")}:t}let Os=class{static defaults=Z;static instances=fs;static overrides=ce;static registry=Pt;static version=Sh;static getChart=$n;static register(...t){Pt.add(...t),On()}static unregister(...t){Pt.remove(...t),On()}constructor(t,e){const i=this.config=new vh(e),n=na(t),o=$n(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 a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Yd(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,d=l&&l.width;if(this.id=Cl(),this.ctx=r,this.canvas=l,this.width=d,this.height=c,this._options=a,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 dh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Wl(u=>this.update(u),a.resizeDelay||0),this._dataChanges=[],fs[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Rt.listen(this,"complete",Dn),Rt.listen(this,"progress",Ph),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return N(t)?e&&o?o:n?i/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 Pt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Gi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ji(this.canvas,this.ctx),this}stop(){return Rt.stop(this),this}resize(t,e){Rt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Gi(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),Y(i.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};W(e,(i,n)=>{i.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=si(a,r),c=l==="r",d=l==="x";return{options:r,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),W(o,a=>{const r=a.options,l=r.id,c=si(l,r),d=I(r.type,a.dtype);(r.position===void 0||Pn(r.position,c)!==Pn(a.dposition))&&(r.position=a.dposition),n[l]=!0;let u=null;if(l in i&&i[l].type===d)u=i[l];else{const f=Pt.getScale(d);u=new f({id:l,type:d,ctx:this.ctx,chart:this}),i[u.id]=u}u.init(r,t)}),W(n,(a,r)=>{a||delete i[r]}),W(i,a=>{wt.configure(this,a,a.options),wt.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((n,o)=>n.index-o.index),i>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((i,n)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.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 a=0;for(let c=0,d=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Cn("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){W(this.scales,t=>{wt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Bi(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:o}of e){const a=i==="_removeElements"?-o:o;Ch(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=i(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;wt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],W(this.boxes,n=>{i&&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,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,o=$h(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&Cs(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&Ds(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return zt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const o=Md.modes[e];return typeof o=="function"?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.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},i.push(n)),n}getContext(){return this.$context||(this.$context=Xt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);Ve(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(o,{visible:i}),this.update(r=>r.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(),Rt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};W(this.options.events,o=>i(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(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 a;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",o),i("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){W(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},W(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!ps(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const n=this.options.hover,o=(l,c)=>l.filter(d=>!c.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),a=o(e,t),r=i?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,i,a),l=Tl(t),c=Dh(t,this._lastEvent,i,l);i&&(this._lastEvent=null,Y(o.onHover,[t,r,this],this),l&&Y(o.onClick,[t,r,this],this));const d=!ps(r,n);return(d||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,d}_getActiveElements(t,e,i,n){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}};function On(){return W(Os.instances,s=>s._plugins.invalidate())}function Oh(s,t,e){const{startAngle:i,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t;let c=n/r;s.beginPath(),s.arc(o,a,r,i-c,e+c),l>n?(c=n/l,s.arc(o,a,l,e+c,i-c,!0)):s.arc(o,a,n,e+et,i-et),s.closePath(),s.clip()}function Ah(s){return ki(s,["outerStart","outerEnd","innerStart","innerEnd"])}function Lh(s,t,e,i){const n=Ah(s.options.borderRadius),o=(e-t)/2,a=Math.min(o,i*t/2),r=l=>{const c=(e-Math.min(o,l))*i/2;return lt(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:lt(n.innerStart,0,a),innerEnd:lt(n.innerEnd,0,a)}}function pe(s,t,e,i){return{x:e+s*Math.cos(t),y:i+s*Math.sin(t)}}function vs(s,t,e,i,n,o){const{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:d}=t,u=Math.max(t.outerRadius+i+e-c,0),f=d>0?d+i+e+c:0;let g=0;const p=n-l;if(i){const z=d>0?d-i:0,H=u>0?u-i:0,tt=(z+H)/2,kt=tt!==0?p*tt/(tt+i):p;g=(p-kt)/2}const m=Math.max(.001,p*u-e/G)/u,b=(p-m)/2,_=l+b+g,w=n-b-g,{outerStart:k,outerEnd:v,innerStart:x,innerEnd:M}=Lh(t,f,u,w-_),P=u-k,D=u-v,$=_+k/P,R=w-v/D,L=f+x,E=f+M,at=_+x/L,J=w-M/E;if(s.beginPath(),o){const z=($+R)/2;if(s.arc(a,r,u,$,z),s.arc(a,r,u,z,R),v>0){const dt=pe(D,R,a,r);s.arc(dt.x,dt.y,v,R,w+et)}const H=pe(E,w,a,r);if(s.lineTo(H.x,H.y),M>0){const dt=pe(E,J,a,r);s.arc(dt.x,dt.y,M,w+et,J+Math.PI)}const tt=(w-M/f+(_+x/f))/2;if(s.arc(a,r,f,w-M/f,tt,!0),s.arc(a,r,f,tt,_+x/f,!0),x>0){const dt=pe(L,at,a,r);s.arc(dt.x,dt.y,x,at+Math.PI,_-et)}const kt=pe(P,_,a,r);if(s.lineTo(kt.x,kt.y),k>0){const dt=pe(P,$,a,r);s.arc(dt.x,dt.y,k,_-et,$)}}else{s.moveTo(a,r);const z=Math.cos($)*u+a,H=Math.sin($)*u+r;s.lineTo(z,H);const tt=Math.cos(R)*u+a,kt=Math.sin(R)*u+r;s.lineTo(tt,kt)}s.closePath()}function Th(s,t,e,i,n){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){vs(s,t,e,i,l,n);for(let c=0;ct!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:a}=ko(n,{x:t,y:e}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),f=(this.options.spacing+this.options.borderWidth)/2,g=I(u,l-r),p=je(o,r,l)&&r!==l,m=g>=X||p,b=Ft(a,c+f,d+f);return m&&b}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,d=(n+o)/2,u=(a+r+c+l)/2;return{x:e+Math.cos(d)*u,y:i+Math.sin(d)*u}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/4,o=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=i>X?Math.floor(i/X):0,i===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*n,Math.sin(r)*n);const l=1-Math.sin(Math.min(G,i||0)),c=n*l;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,Th(t,this,c,o,a),Rh(t,this,c,o,a),t.restore()}}function oa(s,t,e=t){s.lineCap=I(e.borderCapStyle,t.borderCapStyle),s.setLineDash(I(e.borderDash,t.borderDash)),s.lineDashOffset=I(e.borderDashOffset,t.borderDashOffset),s.lineJoin=I(e.borderJoinStyle,t.borderJoinStyle),s.lineWidth=I(e.borderWidth,t.borderWidth),s.strokeStyle=I(e.borderColor,t.borderColor)}function Eh(s,t,e){s.lineTo(e.x,e.y)}function Fh(s){return s.stepped?ec:s.tension||s.cubicInterpolationMode==="monotone"?sc:Eh}function aa(s,t,e={}){const i=s.length,{start:n=0,end:o=i-1}=e,{start:a,end:r}=t,l=Math.max(n,a),c=Math.min(o,r),d=nr&&o>r;return{count:i,start:l,loop:t.loop,ilen:c(a+(c?r-v:v))%o,k=()=>{m!==b&&(s.lineTo(d,b),s.lineTo(d,m),s.lineTo(d,_))};for(l&&(g=n[w(0)],s.moveTo(g.x,g.y)),f=0;f<=r;++f){if(g=n[w(f)],g.skip)continue;const v=g.x,x=g.y,M=v|0;M===p?(xb&&(b=x),d=(u*d+v)/++u):(k(),s.lineTo(v,x),p=M,u=0,m=b=x),_=x}k()}function ii(s){const t=s.options,e=t.borderDash&&t.borderDash.length;return!s._decimated&&!s._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?zh:Bh}function Nh(s){return s.stepped?Rc:s.tension||s.cubicInterpolationMode==="monotone"?Ic:oe}function Vh(s,t,e,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,i)&&n.closePath()),oa(s,t.options),s.stroke(n)}function jh(s,t,e,i){const{segments:n,options:o}=t,a=ii(t);for(const r of n)oa(s,o,r.style),s.beginPath(),a(s,t,r,{start:e,end:e+i-1})&&s.closePath(),s.stroke()}const Wh=typeof Path2D=="function";function Hh(s,t,e,i){Wh&&!t.options.segment?Vh(s,t,e,i):jh(s,t,e,i)}class As extends Vt{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 i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Pc(this._points,i,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=Vc(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,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],o=this.points,a=Wo(this,{property:e,start:n,end:n});if(!a.length)return;const r=[],l=Nh(i);let c,d;for(c=0,d=a.length;c=e)return s.slice(t,t+e);const a=[],r=(e-2)/(o-2);let l=0;const c=t+e-1;let d=t,u,f,g,p,m;for(a[l++]=s[d],u=0;ug&&(g=p,f=s[w],m=w);a[l++]=f,d=m}return a[l++]=s[c],a}function Zh(s,t,e,i){let n=0,o=0,a,r,l,c,d,u,f,g,p,m;const b=[],_=t+e-1,w=s[t].x,v=s[_].x-w;for(a=t;am&&(m=c,f=a),n=(o*n+r.x)/++o;else{const M=a-1;if(!N(u)&&!N(f)){const P=Math.min(u,f),D=Math.max(u,f);P!==g&&P!==M&&b.push({...s[P],x:n}),D!==g&&D!==M&&b.push({...s[D],x:n})}a>0&&M!==g&&b.push(s[M]),b.push(r),d=x,o=0,p=m=c,u=f=g=a}}return b}function la(s){if(s._decimated){const t=s._data;delete s._decimated,delete s._data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ln(s){s.data.datasets.forEach(t=>{la(t)})}function tu(s,t){const e=t.length;let i=0,n;const{iScale:o}=s,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(i=lt(Bt(t,o.axis,a).lo,0,e-1)),c?n=lt(Bt(t,o.axis,r).hi+1,i,e)-i:n=e-i,{start:i,count:n}}var eu={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(s,t,e)=>{if(!e.enabled){Ln(s);return}const i=s.width;s.data.datasets.forEach((n,o)=>{const{_data:a,indexAxis:r}=n,l=s.getDatasetMeta(o),c=a||n.data;if(Le([r,s.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const d=s.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||s.options.parsing)return;let{start:u,count:f}=tu(l,c);const g=e.threshold||4*i;if(f<=g){la(n);return}N(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(e.algorithm){case"lttb":p=Qh(c,u,f,i,e);break;case"min-max":p=Zh(c,u,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=p})},destroy(s){Ln(s)}};function su(s,t,e){const i=s.segments,n=s.points,o=t.points,a=[];for(const r of i){let{start:l,end:c}=r;c=Oi(l,c,n);const d=ni(e,n[l],n[c],r.loop);if(!t.segments){a.push({source:r,target:d,start:n[l],end:n[c]});continue}const u=Wo(t,d);for(const f of u){const g=ni(e,o[f.start],o[f.end],f.loop),p=jo(r,n,g);for(const m of p)a.push({source:m,target:f,start:{[e]:Tn(d,g,"start",Math.max)},end:{[e]:Tn(d,g,"end",Math.min)}})}}return a}function ni(s,t,e,i){if(i)return;let n=t[s],o=e[s];return s==="angle"&&(n=xt(n),o=xt(o)),{property:s,start:n,end:o}}function iu(s,t){const{x:e=null,y:i=null}=s||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Oi(a,r,n);const l=n[a],c=n[r];i!==null?(o.push({x:l.x,y:i}),o.push({x:c.x,y:i})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Oi(s,t,e){for(;t>s;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Tn(s,t,e,i){return s&&t?i(s[e],t[e]):s?s[e]:t?t[e]:0}function ca(s,t){let e=[],i=!1;return q(s)?(i=!0,e=s):e=iu(s,t),e.length?new As({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Rn(s){return s&&s.fill!==!1}function nu(s,t,e){let n=s[t].fill;const o=[t];let a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!Q(n))return n;if(a=s[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function ou(s,t,e){const i=cu(s);if(B(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return Q(n)&&Math.floor(n)===n?au(i[0],t,n,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function au(s,t,e,i){return(s==="-"||s==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function ru(s,t){let e=null;return s==="start"?e=t.bottom:s==="end"?e=t.top:B(s)?e=t.getPixelForValue(s.value):t.getBasePixel&&(e=t.getBasePixel()),e}function lu(s,t,e){let i;return s==="start"?i=e:s==="end"?i=t.options.reverse?t.min:t.max:B(s)?i=s.value:i=t.getBaseValue(),i}function cu(s){const t=s.options,e=t.fill;let i=I(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function du(s){const{scale:t,index:e,line:i}=s,n=[],o=i.segments,a=i.points,r=hu(t,e);r.push(ca({x:null,y:t.bottom},i));for(let l=0;l=0;--a){const r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),i&&r.fill&&Us(s.ctx,r,o))}},beforeDatasetsDraw(s,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=s.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const o=i[n].$filler;Rn(o)&&Us(s.ctx,o,s.chartArea)}},beforeDatasetDraw(s,t,e){const i=t.meta.$filler;!Rn(i)||e.drawTime!=="beforeDatasetDraw"||Us(s.ctx,i,s.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Bn=(s,t)=>{let{boxHeight:e=t,boxWidth:i=t}=s;return s.usePointStyle&&(e=Math.min(e,t),i=s.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},wu=(s,t)=>s!==null&&t!==null&&s.datasetIndex===t.datasetIndex&&s.index===t.index;class zn extends Vt{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,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,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=Y(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,n)=>t.sort(i,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 i=t.labels,n=ot(i.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Bn(i,o);let c,d;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(a,o,r,l)+10):(d=this.maxHeight,c=this._fitCols(a,n,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=n+r;let u=t;o.textAlign="left",o.textBaseline="middle";let f=-1,g=-d;return this.legendItems.forEach((p,m)=>{const b=i+e/2+o.measureText(p.text).width;(m===0||c[c.length-1]+b+2*r>a)&&(u+=d,c[c.length-(m>0?0:1)]=0,g+=d,f++),l[m]={left:0,top:g,row:f,width:b,height:n},c[c.length-1]+=b+r}),u}_fitCols(t,e,i,n){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=a-t;let u=r,f=0,g=0,p=0,m=0;return this.legendItems.forEach((b,_)=>{const{itemWidth:w,itemHeight:k}=ku(i,e,o,b,n);_>0&&g+k+2*r>d&&(u+=f+r,c.push({width:f,height:g}),p+=f+r,m++,f=g=0),l[_]={left:p,top:g,col:m,width:w,height:k},f=Math.max(f,w),g+=k+r}),u+=f,c.push({width:f,height:g}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:o}}=this,a=_e(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=ht(i,this.left+n,this.right-this.lineWidths[r]);for(const c of e)r!==c.row&&(r=c.row,l=ht(i,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=ht(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const c of e)c.col!==r&&(r=c.col,l=ht(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.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;Cs(t,this),this._draw(),Ds(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:o,labels:a}=t,r=Z.color,l=_e(t.rtl,this.left,this.width),c=ot(a.font),{padding:d}=a,u=c.size,f=u/2;let g;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:b}=Bn(a,u),_=function(M,P,D){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;n.save();const $=I(D.lineWidth,1);if(n.fillStyle=I(D.fillStyle,r),n.lineCap=I(D.lineCap,"butt"),n.lineDashOffset=I(D.lineDashOffset,0),n.lineJoin=I(D.lineJoin,"miter"),n.lineWidth=$,n.strokeStyle=I(D.strokeStyle,r),n.setLineDash(I(D.lineDash,[])),a.usePointStyle){const R={radius:m*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:$},L=l.xPlus(M,p/2),E=P+f;Ao(n,R,L,E,a.pointStyleWidth&&p)}else{const R=P+Math.max((u-m)/2,0),L=l.leftForLtr(M,p),E=re(D.borderRadius);n.beginPath(),Object.values(E).some(at=>at!==0)?We(n,{x:L,y:R,w:p,h:m,radius:E}):n.rect(L,R,p,m),n.fill(),$!==0&&n.stroke()}n.restore()},w=function(M,P,D){de(n,D.text,M,P+b/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},k=this.isHorizontal(),v=this._computeTitleHeight();k?g={x:ht(o,this.left+d,this.right-i[0]),y:this.top+d+v,line:0}:g={x:this.left+d,y:ht(o,this.top+v+d,this.bottom-e[0].height),line:0},zo(this.ctx,t.textDirection);const x=b+d;this.legendItems.forEach((M,P)=>{n.strokeStyle=M.fontColor,n.fillStyle=M.fontColor;const D=n.measureText(M.text).width,$=l.textAlign(M.textAlign||(M.textAlign=a.textAlign)),R=p+f+D;let L=g.x,E=g.y;l.setWidth(this.width),k?P>0&&L+R+d>this.right&&(E=g.y+=x,g.line++,L=g.x=ht(o,this.left+d,this.right-i[g.line])):P>0&&E+x>this.bottom&&(L=g.x=L+e[g.line].width+d,g.line++,E=g.y=ht(o,this.top+v+d,this.bottom-e[g.line].height));const at=l.x(L);if(_(at,E,M),L=Hl($,L+p+f,k?L+R:this.right,t.rtl),w(l.x(L),E,M),k)g.x+=R+d;else if(typeof M.text!="string"){const J=c.lineHeight;g.y+=ha(M,J)+d}else g.y+=x}),No(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=ot(e.font),n=ft(e.padding);if(!e.display)return;const o=_e(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=i.size/2,c=n.top+l;let d,u=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),d=this.top+c,u=ht(t.align,u,this.right-f);else{const p=this.columnSizes.reduce((m,b)=>Math.max(m,b.height),0);d=c+ht(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const g=ht(r,u,u+f);a.textAlign=o.textAlign(vi(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,de(a,e.text,g,d,i)}_computeTitleHeight(){const t=this.options.title,e=ot(t.font),i=ft(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,o;if(Ft(t,this.left,this.right)&&Ft(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;io.length>a.length?o:a)),t+e.size/2+i.measureText(n).width}function Mu(s,t,e){let i=s;return typeof t.text!="string"&&(i=ha(t,e)),i}function ha(s,t){const e=s.text?s.text.length:0;return t*e}function Pu(s,t){return!!((s==="mousemove"||s==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(s==="click"||s==="mouseup"))}var Cu={id:"legend",_element:zn,start(s,t,e){const i=s.legend=new zn({ctx:s.ctx,options:e,chart:s});wt.configure(s,i,e),wt.addBox(s,i)},stop(s){wt.removeBox(s,s.legend),delete s.legend},beforeUpdate(s,t,e){const i=s.legend;wt.configure(s,i,e),i.options=e},afterUpdate(s){const t=s.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(s,t){t.replay||s.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(s,t,e){const i=t.datasetIndex,n=e.chart;n.isDatasetVisible(i)?(n.hide(i),t.hidden=!0):(n.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:s=>s.chart.options.color,boxWidth:40,padding:10,generateLabels(s){const t=s.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=s.legend.options;return s._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),d=ft(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:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:s=>s.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:s=>!s.startsWith("on"),labels:{_scriptable:s=>!["generateLabels","filter","sort"].includes(s)}}};class ua extends Vt{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 i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=q(i.text)?i.text.length:1;this._padding=ft(i.padding);const o=n*ot(i.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:i,bottom:n,right:o,options:a}=this,r=a.align;let l=0,c,d,u;return this.isHorizontal()?(d=ht(r,i,o),u=e+t,c=o-i):(a.position==="left"?(d=i+t,u=ht(r,n,e),l=G*-.5):(d=o-t,u=ht(r,e,n),l=G*.5),c=n-e),{titleX:d,titleY:u,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=ot(e.font),o=i.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);de(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:c,textAlign:vi(e.align),textBaseline:"middle",translation:[a,r]})}}function Du(s,t){const e=new ua({ctx:s.ctx,options:t,chart:s});wt.configure(s,e,t),wt.addBox(s,e),s.titleBlock=e}var $u={id:"title",_element:ua,start(s,t,e){Du(s,e)},stop(s){const t=s.titleBlock;wt.removeBox(s,t),delete s.titleBlock},beforeUpdate(s,t,e){const i=s.titleBlock;wt.configure(s,i,e),i.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 Re={average(s){if(!s.length)return!1;let t,e,i=new Set,n=0,o=0;for(t=0,e=s.length;tr+l)/i.size,y:n/o}},nearest(s,t){if(!s.length)return!1;let e=t.x,i=t.y,n=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=s.length;o-1?s.split(` +`):s}function Ou(s,t){const{element:e,datasetIndex:i,index:n}=t,o=s.getDatasetMeta(i).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:s,label:a,parsed:o.getParsed(n),raw:s.data.datasets[i].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:i,element:e}}function Nn(s,t){const e=s.chart.ctx,{body:i,footer:n,title:o}=s,{boxWidth:a,boxHeight:r}=t,l=ot(t.bodyFont),c=ot(t.titleFont),d=ot(t.footerFont),u=o.length,f=n.length,g=i.length,p=ft(t.padding);let m=p.height,b=0,_=i.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(_+=s.beforeBody.length+s.afterBody.length,u&&(m+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),_){const v=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;m+=g*v+(_-g)*l.lineHeight+(_-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*d.lineHeight+(f-1)*t.footerSpacing);let w=0;const k=function(v){b=Math.max(b,e.measureText(v).width+w)};return e.save(),e.font=c.string,W(s.title,k),e.font=l.string,W(s.beforeBody.concat(s.afterBody),k),w=t.displayColors?a+2+t.boxPadding:0,W(i,v=>{W(v.before,k),W(v.lines,k),W(v.after,k)}),w=0,e.font=d.string,W(s.footer,k),e.restore(),b+=p.width,{width:b,height:m}}function Au(s,t){const{y:e,height:i}=t;return es.height-i/2?"bottom":"center"}function Lu(s,t,e,i){const{x:n,width:o}=i,a=e.caretSize+e.caretPadding;if(s==="left"&&n+o+a>t.width||s==="right"&&n-o-a<0)return!0}function Tu(s,t,e,i){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=s;let c="center";return i==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),Lu(c,s,t,e)&&(c="center"),c}function Vn(s,t,e){const i=e.yAlign||t.yAlign||Au(s,e);return{xAlign:e.xAlign||t.xAlign||Tu(s,t,e,i),yAlign:i}}function Ru(s,t){let{x:e,width:i}=s;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Iu(s,t,e){let{y:i,height:n}=s;return t==="top"?i+=e:t==="bottom"?i-=n+e:i-=n/2,i}function jn(s,t,e,i){const{caretSize:n,caretPadding:o,cornerRadius:a}=s,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=re(a);let p=Ru(t,r);const m=Iu(t,l,c);return l==="center"?r==="left"?p+=c:r==="right"&&(p-=c):r==="left"?p-=Math.max(d,f)+n:r==="right"&&(p+=Math.max(u,g)+n),{x:lt(p,0,i.width-t.width),y:lt(m,0,i.height-t.height)}}function ls(s,t,e){const i=ft(e.padding);return t==="center"?s.x+s.width/2:t==="right"?s.x+s.width-i.right:s.x+i.left}function Wn(s){return Mt([],It(s))}function Eu(s,t,e){return Xt(s,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Hn(s,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?s.override(e):s}const fa={beforeTitle:Tt,title(s){if(s.length>0){const t=s[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex"u"?fa[t].call(e,i):n}class Un extends Vt{static positioners=Re;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,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,o=new Ho(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Eu(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,n=mt(i,"beforeTitle",this,t),o=mt(i,"title",this,t),a=mt(i,"afterTitle",this,t);let r=[];return r=Mt(r,It(n)),r=Mt(r,It(o)),r=Mt(r,It(a)),r}getBeforeBody(t,e){return Wn(mt(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return W(t,o=>{const a={before:[],lines:[],after:[]},r=Hn(i,o);Mt(a.before,It(mt(r,"beforeLabel",this,o))),Mt(a.lines,mt(r,"label",this,o)),Mt(a.after,It(mt(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return Wn(mt(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=mt(i,"beforeFooter",this,t),o=mt(i,"footer",this,t),a=mt(i,"afterFooter",this,t);let r=[];return r=Mt(r,It(n)),r=Mt(r,It(o)),r=Mt(r,It(a)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],o=[],a=[];let r=[],l,c;for(l=0,c=e.length;lt.filter(d,u,f,i))),t.itemSort&&(r=r.sort((d,u)=>t.itemSort(d,u,i))),W(r,d=>{const u=Hn(t.callbacks,d);n.push(mt(u,"labelColor",this,d)),o.push(mt(u,"labelPointStyle",this,d)),a.push(mt(u,"labelTextColor",this,d))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const r=Re[i.position].call(this,n,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const l=this._size=Nn(this,i),c=Object.assign({},r,l),d=Vn(this.chart,i,c),u=jn(i,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=i,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:u}=re(r),{x:f,y:g}=t,{width:p,height:m}=e;let b,_,w,k,v,x;return o==="center"?(v=g+m/2,n==="left"?(b=f,_=b-a,k=v+a,x=v-a):(b=f+p,_=b+a,k=v-a,x=v+a),w=b):(n==="left"?_=f+Math.max(l,d)+a:n==="right"?_=f+p-Math.max(c,u)-a:_=this.caretX,o==="top"?(k=g,v=k-a,b=_-a,w=_+a):(k=g+m,v=k+a,b=_+a,w=_-a),x=k),{x1:b,x2:_,x3:w,y1:k,y2:v,y3:x}}drawTitle(t,e,i){const n=this.title,o=n.length;let a,r,l;if(o){const c=_e(i.rtl,this.x,this.width);for(t.x=ls(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=ot(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;lw!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,We(t,{x:m,y:p,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),We(t,{x:b,y:p+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(b,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:d}=i,u=ot(i.bodyFont);let f=u.lineHeight,g=0;const p=_e(i.rtl,this.x,this.width),m=function(D){e.fillText(D,p.x(t.x+g),t.y+f/2),t.y+=f+o},b=p.textAlign(a);let _,w,k,v,x,M,P;for(e.textAlign=a,e.textBaseline="middle",e.font=u.string,t.x=ls(this,b,i),e.fillStyle=i.bodyColor,W(this.beforeBody,m),g=r&&b!=="right"?a==="center"?c/2+d:c+2+d:0,v=0,M=n.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,o=i&&i.y;if(n||o){const a=Re[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=Nn(this,t),l=Object.assign({},a,this._size),c=Vn(e,t,l),d=jn(t,l,c,e);(n._to!==d.x||o._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=ft(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,n,e),zo(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),No(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:r,index:l})=>{const c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!ps(i,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,i),r=this._positionChanged(a,t),l=e||!ps(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(r=>this.chart.data.datasets[r.datasetIndex]&&this.chart.getDatasetMeta(r.datasetIndex).controller.getParsed(r.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,a=Re[o.position].call(this,t,e);return a!==!1&&(i!==a.x||n!==a.y)}}var Fu={id:"tooltip",_element:Un,positioners:Re,afterInit(s,t,e){e&&(s.tooltip=new Un({chart:s,options:e}))},beforeUpdate(s,t,e){s.tooltip&&s.tooltip.initialize(e)},reset(s,t,e){s.tooltip&&s.tooltip.initialize(e)},afterDraw(s){const t=s.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(s.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(s.ctx),s.notifyPlugins("afterTooltipDraw",e)}},afterEvent(s,t){if(s.tooltip){const e=t.replay;s.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:(s,t)=>t.bodyFont.size,boxWidth:(s,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:fa},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:s=>s!=="filter"&&s!=="itemSort"&&s!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Bu=(s,t,e,i)=>(typeof t=="string"?(e=s.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function zu(s,t,e,i){const n=s.indexOf(t);if(n===-1)return Bu(s,t,e,i);const o=s.lastIndexOf(t);return n!==o?e:n}const Nu=(s,t)=>s===null?null:lt(Math.round(s),0,t);function Yn(s){const t=this.getLabels();return s>=0&&se.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 ju(s,t){const e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:d,maxDigits:u,includeBounds:f}=s,g=o||1,p=d-1,{min:m,max:b}=t,_=!N(a),w=!N(r),k=!N(c),v=(b-m)/(u+1);let x=Ni((b-m)/p/g)*g,M,P,D,$;if(x<1e-14&&!_&&!w)return[{value:m},{value:b}];$=Math.ceil(b/x)-Math.floor(m/x),$>p&&(x=Ni($*x/p/g)*g),N(l)||(M=Math.pow(10,l),x=Math.ceil(x*M)/M),n==="ticks"?(P=Math.floor(m/x)*x,D=Math.ceil(b/x)*x):(P=m,D=b),_&&w&&o&&Fl((r-a)/o,x/1e3)?($=Math.round(Math.min((r-a)/x,d)),x=(r-a)/$,P=a,D=r):k?(P=_?a:P,D=w?r:D,$=c-1,x=(D-P)/$):($=(D-P)/x,Ee($,Math.round($),x/1e3)?$=Math.round($):$=Math.ceil($));const R=Math.max(Vi(x),Vi(P));M=Math.pow(10,N(l)?R:l),P=Math.round(P*M)/M,D=Math.round(D*M)/M;let L=0;for(_&&(f&&P!==a?(e.push({value:a}),Pr)break;e.push({value:E})}return w&&f&&D!==r?e.length&&Ee(e[e.length-1].value,r,Jn(r,v,s))?e[e.length-1].value=r:e.push({value:r}):(!w||D===r)&&e.push({value:D}),e}function Jn(s,t,{horizontal:e,minRotation:i}){const n=St(i),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+s).length;return Math.min(t/o,a)}class ws extends he{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 N(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:o}=this;const a=l=>n=e?n:l,r=l=>o=i?o:l;if(t){const l=Dt(n),c=Dt(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} 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 i=this.getTickLimit();i=Math.max(2,i);const n={maxTicks:i,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,a=ju(n,o);return t.bounds==="ticks"&&wo(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Ke(t,this.chart.options.locale,this.options.ticks.format)}}class Wu extends ws{static id="linear";static defaults={ticks:{callback:Ps.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Q(t)?t:0,this.max=Q(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=St(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.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 Ue=s=>Math.floor(Wt(s)),ie=(s,t)=>Math.pow(10,Ue(s)+t);function Kn(s){return s/Math.pow(10,Ue(s))===1}function Xn(s,t,e){const i=Math.pow(10,e),n=Math.floor(s/i);return Math.ceil(t/i)-n}function Hu(s,t){const e=t-s;let i=Ue(e);for(;Xn(s,t,i)>10;)i++;for(;Xn(s,t,i)<10;)i--;return Math.min(i,Ue(s))}function Uu(s,{min:t,max:e}){t=_t(s.min,t);const i=[],n=Ue(t);let o=Hu(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=n>o?Math.pow(10,n):0,c=Math.round((t-l)*a)/a,d=Math.floor((t-l)/r/10)*r*10;let u=Math.floor((c-d)/Math.pow(10,o)),f=_t(s.min,Math.round((l+d+u*Math.pow(10,o))*a)/a);for(;f=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,a=o>=0?1:a),f=Math.round((l+d+u*Math.pow(10,o))*a)/a;const g=_t(s.max,f);return i.push({value:g,major:Kn(g),significand:u}),i}class Yu extends he{static id="logarithmic";static defaults={ticks:{callback:Ps.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=ws.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return Q(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Q(t)?Math.max(0,t):null,this.max=Q(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Q(this._userMin)&&(this.min=t===ie(this.min,0)?ie(this.min,-1):ie(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const o=r=>i=t?i:r,a=r=>n=e?n:r;i===n&&(i<=0?(o(1),a(10)):(o(ie(i,-1)),a(ie(n,1)))),i<=0&&o(ie(n,-1)),n<=0&&a(ie(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=Uu(e,this);return t.bounds==="ticks"&&wo(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Ke(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Wt(t),this._valueRange=Wt(this.max)-Wt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Wt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function oi(s){const t=s.ticks;if(t.display&&s.display){const e=ft(t.backdropPadding);return I(t.font&&t.font.size,Z.font.size)+e.height}return 0}function Ju(s,t,e){return e=q(e)?e:[e],{w:tc(s,t.string,e),h:e.length*t.lineHeight}}function Gn(s,t,e,i,n){return s===i||s===n?{start:t-e/2,end:t+e/2}:sn?{start:t-e,end:t}:{start:t,end:t+e}}function Ku(s){const t={l:s.left+s._padding.left,r:s.right-s._padding.right,t:s.top+s._padding.top,b:s.bottom-s._padding.bottom},e=Object.assign({},t),i=[],n=[],o=s._pointLabels.length,a=s.options.pointLabels,r=a.centerPointLabels?G/o:0;for(let l=0;lt.r&&(r=(i.end-t.r)/o,s.r=Math.max(s.r,t.r+r)),n.startt.b&&(l=(n.end-t.b)/a,s.b=Math.max(s.b,t.b+l))}function Gu(s,t,e){const i=s.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=e,l=s.getPointPosition(t,i+n+a,o),c=Math.round(xi(xt(l.angle+et))),d=ef(l.y,r.h,c),u=Zu(c),f=tf(l.x,r.w,u);return{visible:!0,x:l.x,y:d,textAlign:u,left:f,top:d,right:f+r.w,bottom:d+r.h}}function qu(s,t){if(!t)return!0;const{left:e,top:i,right:n,bottom:o}=s;return!(zt({x:e,y:i},t)||zt({x:e,y:o},t)||zt({x:n,y:i},t)||zt({x:n,y:o},t))}function Qu(s,t,e){const i=[],n=s._pointLabels.length,o=s.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:oi(o)/2,additionalAngle:a?G/n:0};let c;for(let d=0;d270||e<90)&&(s-=t),s}function sf(s,t,e){const{left:i,top:n,right:o,bottom:a}=e,{backdropColor:r}=t;if(!N(r)){const l=re(t.borderRadius),c=ft(t.backdropPadding);s.fillStyle=r;const d=i-c.left,u=n-c.top,f=o-i+c.width,g=a-n+c.height;Object.values(l).some(p=>p!==0)?(s.beginPath(),We(s,{x:d,y:u,w:f,h:g,radius:l}),s.fill()):s.fillRect(d,u,f,g)}}function nf(s,t){const{ctx:e,options:{pointLabels:i}}=s;for(let n=t-1;n>=0;n--){const o=s._pointLabelItems[n];if(!o.visible)continue;const a=i.setContext(s.getPointLabelContext(n));sf(e,a,o);const r=ot(a.font),{x:l,y:c,textAlign:d}=o;de(e,s._pointLabels[n],l,c+r.lineHeight/2,r,{color:a.color,textAlign:d,textBaseline:"middle"})}}function ga(s,t,e,i){const{ctx:n}=s;if(e)n.arc(s.xCenter,s.yCenter,t,0,X);else{let o=s.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a{const n=Y(this.options.pointLabels.callback,[e,i],this);return n||n===0?n:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Ku(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){const e=X/(this._pointLabels.length||1),i=this.options.startAngle||0;return xt(t*e+St(i))}getDistanceFromCenterForValue(t){if(N(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(N(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t{if(u!==0||u===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);const f=this.getContext(u),g=n.setContext(f),p=o.setContext(f);of(this,g,l,a,p)}}),i.display){for(t.save(),r=a-1;r>=0;r--){const d=i.setContext(this.getPointLabelContext(r)),{color:u,lineWidth:f}=d;!f||!u||(t.lineWidth=f,t.strokeStyle=u,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),c=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const c=i.setContext(this.getContext(l)),d=ot(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=d.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;const u=ft(c.backdropPadding);t.fillRect(-a/2-u.left,-o-d.size/2-u.top,a+u.width,d.size+u.height)}de(t,r.label,0,-o,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}const Ls={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}},bt=Object.keys(Ls);function qn(s,t){return s-t}function Qn(s,t){if(N(t))return null;const e=s._adapter,{parser:i,round:n,isoWeekday:o}=s._parseOpts;let a=t;return typeof i=="function"&&(a=i(a)),Q(a)||(a=typeof i=="string"?e.parse(a,i):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(xe(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function Zn(s,t,e,i){const n=bt.length;for(let o=bt.indexOf(s);o=bt.indexOf(e);o--){const a=bt[o];if(Ls[a].common&&s._adapter.diff(n,i,a)>=t-1)return a}return bt[e?bt.indexOf(e):0]}function cf(s){for(let t=bt.indexOf(s)+1,e=bt.length;t=t?e[i]:e[n];s[o]=!0}}function df(s,t,e,i){const n=s._adapter,o=+n.startOf(t[0].value,i),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+n.add(r,1,i))l=e[r],l>=0&&(t[l].major=!0);return t}function eo(s,t,e){const i=[],n={},o=t.length;let a,r;for(a=0;a+t.value))}initOffsets(t=[]){let e=0,i=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?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=lt(e,0,a),i=lt(i,0,a),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,a=o.unit||Zn(o.minUnit,e,i,this._getLabelCapacity(e)),r=I(n.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=xe(l)||l===!0,d={};let u=e,f,g;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":a),t.diff(i,e,a)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+a);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(f=u,g=0;f+m)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,a=e||n[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,n){const o=this.options,a=o.ticks.callback;if(a)return Y(a,[t,e,i],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&r[l],u=c&&r[c],f=i[e],g=c&&u&&f&&f.major;return this._adapter.format(t,n||(g?u:d))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,i;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,i=n.length;e=s[i].pos&&t<=s[n].pos&&({lo:i,hi:n}=Bt(s,"pos",t)),{pos:o,time:r}=s[i],{pos:a,time:l}=s[n]):(t>=s[i].time&&t<=s[n].time&&({lo:i,hi:n}=Bt(s,"time",t)),{time:o,pos:r}=s[i],{time:a,pos:l}=s[n]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class hf extends ai{static id="timeseries";static defaults=ai.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=cs(e,this.min),this._tableRange=cs(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let a,r,l,c,d;for(a=0,r=t.length;a=e&&c<=i&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,r=n.length;an-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(cs(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return cs(this._table,i*this._tableRange+this._minPos,!0)}}const pa={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},uf={ariaLabel:{type:String},ariaDescribedby:{type:String}},ff={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...pa,...uf},gf=La[0]==="2"?(s,t)=>Object.assign(s,{attrs:t}):(s,t)=>Object.assign(s,t);function me(s){return co(s)?Ks(s):s}function pf(s){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return co(t)?new Proxy(s,{}):s}function mf(s,t){const e=s.options;e&&t&&Object.assign(e,t)}function ma(s,t){s.labels=t}function ba(s,t,e){const i=[];s.datasets=t.map(n=>{const o=s.datasets.find(a=>a[e]===n[e]);return!o||!n.data||i.includes(o)?{...n}:(i.push(o),Object.assign(o,n),o)})}function bf(s,t){const e={labels:[],datasets:[]};return ma(e,s.labels),ba(e,s.datasets,t),e}const _f=ro({props:ff,setup(s,t){let{expose:e,slots:i}=t;const n=U(null),o=lo(null);e({chart:o});const a=()=>{if(!n.value)return;const{type:c,data:d,options:u,plugins:f,datasetIdKey:g}=s,p=bf(d,g),m=pf(p,d);o.value=new Os(n.value,{type:c,data:m,options:{...u},plugins:f})},r=()=>{const c=Ks(o.value);c&&(s.destroyDelay>0?setTimeout(()=>{c.destroy(),o.value=null},s.destroyDelay):(c.destroy(),o.value=null))},l=c=>{c.update(s.updateMode)};return fi(a),Ta(r),Ss([()=>s.options,()=>s.data],(c,d)=>{let[u,f]=c,[g,p]=d;const m=Ks(o.value);if(!m)return;let b=!1;if(u){const _=me(u),w=me(g);_&&_!==w&&(mf(m,_),b=!0)}if(f){const _=me(f.labels),w=me(p.labels),k=me(f.datasets),v=me(p.datasets);_!==w&&(ma(m.config.data,_),b=!0),k&&k!==v&&(ba(m.config.data,k,s.datasetIdKey),b=!0)}b&&Ra(()=>{l(m)})},{deep:!0}),()=>Js("canvas",{role:"img",ariaLabel:s.ariaLabel,ariaDescribedby:s.ariaDescribedby,ref:n},[Js("p",{},[i.default?i.default():""])])}});function _a(s,t){return Os.register(t),ro({props:pa,setup(e,i){let{expose:n}=i;const o=lo(null),a=r=>{o.value=r?.chart};return n({chart:o}),()=>Js(_f,gf({ref:a},{type:s,...e}))}})}const xf=_a("bar",Jo),yf=_a("line",Xo);function Nt(s){return Array.isArray?Array.isArray(s):va(s)==="[object Array]"}const vf=1/0;function wf(s){if(typeof s=="string")return s;let t=s+"";return t=="0"&&1/s==-vf?"-0":t}function kf(s){return s==null?"":wf(s)}function Ct(s){return typeof s=="string"}function xa(s){return typeof s=="number"}function Sf(s){return s===!0||s===!1||Mf(s)&&va(s)=="[object Boolean]"}function ya(s){return typeof s=="object"}function Mf(s){return ya(s)&&s!==null}function yt(s){return s!=null}function Ys(s){return!s.trim().length}function va(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}const Pf="Incorrect 'index' type",Cf=s=>`Invalid value for key ${s}`,Df=s=>`Pattern length exceeds max of ${s}.`,$f=s=>`Missing ${s} property in key`,Of=s=>`Property 'weight' in key '${s}' must be a positive integer`,so=Object.prototype.hasOwnProperty;class Af{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(i=>{let n=wa(i);this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(i=>{i.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function wa(s){let t=null,e=null,i=null,n=1,o=null;if(Ct(s)||Nt(s))i=s,t=io(s),e=ri(s);else{if(!so.call(s,"name"))throw new Error($f("name"));const a=s.name;if(i=a,so.call(s,"weight")&&(n=s.weight,n<=0))throw new Error(Of(a));t=io(a),e=ri(a),o=s.getFn}return{path:t,id:e,weight:n,src:i,getFn:o}}function io(s){return Nt(s)?s:s.split(".")}function ri(s){return Nt(s)?s.join("."):s}function Lf(s,t){let e=[],i=!1;const n=(o,a,r)=>{if(yt(o))if(!a[r])e.push(o);else{let l=a[r];const c=o[l];if(!yt(c))return;if(r===a.length-1&&(Ct(c)||xa(c)||Sf(c)))e.push(kf(c));else if(Nt(c)){i=!0;for(let d=0,u=c.length;ds.score===t.score?s.idx{this._keysMap[e.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ct(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();Ct(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,i=this.size();e{let a=n.getFn?n.getFn(t):this.getFn(t,n.path);if(yt(a)){if(Nt(a)){let r=[];const l=[{nestedArrIndex:-1,value:a}];for(;l.length;){const{nestedArrIndex:c,value:d}=l.pop();if(yt(d))if(Ct(d)&&!Ys(d)){let u={v:d,i:c,n:this.norm.get(d)};r.push(u)}else Nt(d)&&d.forEach((u,f)=>{l.push({nestedArrIndex:f,value:u})})}i.$[o]=r}else if(Ct(a)&&!Ys(a)){let r={v:a,n:this.norm.get(a)};i.$[o]=r}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function ka(s,t,{getFn:e=A.getFn,fieldNormWeight:i=A.fieldNormWeight}={}){const n=new Ai({getFn:e,fieldNormWeight:i});return n.setKeys(s.map(wa)),n.setSources(t),n.create(),n}function zf(s,{getFn:t=A.getFn,fieldNormWeight:e=A.fieldNormWeight}={}){const{keys:i,records:n}=s,o=new Ai({getFn:t,fieldNormWeight:e});return o.setKeys(i),o.setIndexRecords(n),o}function ds(s,{errors:t=0,currentLocation:e=0,expectedLocation:i=0,distance:n=A.distance,ignoreLocation:o=A.ignoreLocation}={}){const a=t/s.length;if(o)return a;const r=Math.abs(i-e);return n?a+r/n:r?1:a}function Nf(s=[],t=A.minMatchCharLength){let e=[],i=-1,n=-1,o=0;for(let a=s.length;o=t&&e.push([i,n]),i=-1)}return s[o-1]&&o-i>=t&&e.push([i,o-1]),e}const ae=32;function Vf(s,t,e,{location:i=A.location,distance:n=A.distance,threshold:o=A.threshold,findAllMatches:a=A.findAllMatches,minMatchCharLength:r=A.minMatchCharLength,includeMatches:l=A.includeMatches,ignoreLocation:c=A.ignoreLocation}={}){if(t.length>ae)throw new Error(Df(ae));const d=t.length,u=s.length,f=Math.max(0,Math.min(i,u));let g=o,p=f;const m=r>1||l,b=m?Array(u):[];let _;for(;(_=s.indexOf(t,p))>-1;){let P=ds(t,{currentLocation:_,expectedLocation:f,distance:n,ignoreLocation:c});if(g=Math.min(P,g),p=_+d,m){let D=0;for(;D=R;J-=1){let z=J-1,H=e[s.charAt(z)];if(m&&(b[z]=+!!H),E[J]=(E[J+1]<<1|1)&H,P&&(E[J]|=(w[J+1]|w[J])<<1|1|w[J+1]),E[J]&x&&(k=ds(t,{errors:P,currentLocation:z,expectedLocation:f,distance:n,ignoreLocation:c}),k<=g)){if(g=k,p=z,p<=f)break;R=Math.max(1,2*f-p)}}if(ds(t,{errors:P+1,currentLocation:f,expectedLocation:f,distance:n,ignoreLocation:c})>g)break;w=E}const M={isMatch:p>=0,score:Math.max(.001,k)};if(m){const P=Nf(b,r);P.length?l&&(M.indices=P):M.isMatch=!1}return M}function jf(s){let t={};for(let e=0,i=s.length;e{this.chunks.push({pattern:f,alphabet:jf(f),startIndex:g})},u=this.pattern.length;if(u>ae){let f=0;const g=u%ae,p=u-g;for(;f{const{isMatch:_,score:w,indices:k}=Vf(t,p,m,{location:n+b,distance:o,threshold:a,findAllMatches:r,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});_&&(f=!0),u+=w,_&&k&&(d=[...d,...k])});let g={isMatch:f,score:f?u/this.chunks.length:1};return f&&i&&(g.indices=d),g}}class qt{constructor(t){this.pattern=t}static isMultiMatch(t){return no(t,this.multiRegex)}static isSingleMatch(t){return no(t,this.singleRegex)}search(){}}function no(s,t){const e=s.match(t);return e?e[1]:null}class Wf extends qt{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Hf extends qt{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const i=t.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class Uf extends qt{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Yf extends qt{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Jf extends qt{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Kf extends qt{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Ma extends qt{constructor(t,{location:e=A.location,threshold:i=A.threshold,distance:n=A.distance,includeMatches:o=A.includeMatches,findAllMatches:a=A.findAllMatches,minMatchCharLength:r=A.minMatchCharLength,isCaseSensitive:l=A.isCaseSensitive,ignoreLocation:c=A.ignoreLocation}={}){super(t),this._bitapSearch=new Sa(t,{location:e,threshold:i,distance:n,includeMatches:o,findAllMatches:a,minMatchCharLength:r,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Pa extends qt{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e=0,i;const n=[],o=this.pattern.length;for(;(i=t.indexOf(this.pattern,e))>-1;)e=i+o,n.push([i,e-1]);const a=!!n.length;return{isMatch:a,score:a?0:1,indices:n}}}const li=[Wf,Pa,Uf,Yf,Kf,Jf,Hf,Ma],oo=li.length,Xf=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Gf="|";function qf(s,t={}){return s.split(Gf).map(e=>{let i=e.trim().split(Xf).filter(o=>o&&!!o.trim()),n=[];for(let o=0,a=i.length;o!!(s[ks.AND]||s[ks.OR]),eg=s=>!!s[hi.PATH],sg=s=>!Nt(s)&&ya(s)&&!ui(s),ao=s=>({[ks.AND]:Object.keys(s).map(t=>({[t]:s[t]}))});function Ca(s,t,{auto:e=!0}={}){const i=n=>{let o=Object.keys(n);const a=eg(n);if(!a&&o.length>1&&!ui(n))return i(ao(n));if(sg(n)){const l=a?n[hi.PATH]:o[0],c=a?n[hi.PATTERN]:n[l];if(!Ct(c))throw new Error(Cf(l));const d={keyId:ri(l),pattern:c};return e&&(d.searcher=di(c,t)),d}let r={children:[],operator:o[0]};return o.forEach(l=>{const c=n[l];Nt(c)&&c.forEach(d=>{r.children.push(i(d))})}),r};return ui(s)||(s=ao(s)),i(s)}function ig(s,{ignoreFieldNorm:t=A.ignoreFieldNorm}){s.forEach(e=>{let i=1;e.matches.forEach(({key:n,norm:o,score:a})=>{const r=n?n.weight:null;i*=Math.pow(a===0&&r?Number.EPSILON:a,(r||1)*(t?1:o))}),e.score=i})}function ng(s,t){const e=s.matches;t.matches=[],yt(e)&&e.forEach(i=>{if(!yt(i.indices)||!i.indices.length)return;const{indices:n,value:o}=i;let a={indices:n,value:o};i.key&&(a.key=i.key.src),i.idx>-1&&(a.refIndex=i.idx),t.matches.push(a)})}function og(s,t){t.score=s.score}function ag(s,t,{includeMatches:e=A.includeMatches,includeScore:i=A.includeScore}={}){const n=[];return e&&n.push(ng),i&&n.push(og),s.map(o=>{const{idx:a}=o,r={item:t[a],refIndex:a};return n.length&&n.forEach(l=>{l(o,r)}),r})}class we{constructor(t,e={},i){this.options={...A,...e},this.options.useExtendedSearch,this._keyStore=new Af(this.options.keys),this.setCollection(t,i)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof Ai))throw new Error(Pf);this._myIndex=e||ka(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){yt(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let i=0,n=this._docs.length;i-1&&(l=l.slice(0,e)),ag(l,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(t){const e=di(t,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:o,i:a,n:r})=>{if(!yt(o))return;const{isMatch:l,score:c,indices:d}=e.searchIn(o);l&&n.push({item:o,idx:a,matches:[{score:c,value:o,norm:r,indices:d}]})}),n}_searchLogical(t){const e=Ca(t,this.options),i=(r,l,c)=>{if(!r.children){const{keyId:u,searcher:f}=r,g=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:f});return g&&g.length?[{idx:c,item:l,matches:g}]:[]}const d=[];for(let u=0,f=r.children.length;u{if(yt(r)){let c=i(e,r,l);c.length&&(o[l]||(o[l]={idx:l,item:r,matches:[]},a.push(o[l])),c.forEach(({matches:d})=>{o[l].matches.push(...d)}))}}),a}_searchObjectList(t){const e=di(t,this.options),{keys:i,records:n}=this._myIndex,o=[];return n.forEach(({$:a,i:r})=>{if(!yt(a))return;let l=[];i.forEach((c,d)=>{l.push(...this._findMatches({key:c,value:a[d],searcher:e}))}),l.length&&o.push({idx:r,item:a,matches:l})}),o}_findMatches({key:t,value:e,searcher:i}){if(!yt(e))return[];let n=[];if(Nt(e))e.forEach(({v:o,i:a,n:r})=>{if(!yt(o))return;const{isMatch:l,score:c,indices:d}=i.searchIn(o);l&&n.push({score:c,key:t,value:o,idx:a,norm:r,indices:d})});else{const{v:o,n:a}=e,{isMatch:r,score:l,indices:c}=i.searchIn(o);r&&n.push({score:l,key:t,value:o,norm:a,indices:c})}return n}}we.version="7.0.0";we.createIndex=ka;we.parseIndex=zf;we.config=A;we.parseQuery=Ca;tg(Zf);const rg={name:"peerSettings",components:{LocaleText:O},props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:At()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,ut(`/api/updatePeerSettings/${this.$route.params.id}`,this.data,s=>{this.saving=!1,s.status?this.dashboardConfigurationStore.newMessage("Server","Peer saved","success"):this.dashboardConfigurationStore.newMessage("Server",s.message,"danger"),this.$emit("refresh")})},resetPeerData(s){this.saving=!0,ut(`/api/resetPeerData/${this.$route.params.id}`,{id:this.data.id,type:s},t=>{this.saving=!1,t.status?this.dashboardConfigurationStore.newMessage("Server","Peer data usage reset successfully","success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.$emit("refresh")})}},beforeMount(){this.reset()},mounted(){this.$el.querySelectorAll("input").forEach(s=>{s.addEventListener("keyup",()=>{this.dataChanged=!0})})}},lg={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},cg={class:"container d-flex h-100 w-100"},dg={class:"m-auto modal-dialog-centered dashboardModal"},hg={class:"card rounded-3 shadow flex-grow-1"},ug={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},fg={class:"mb-0"},gg={key:0,class:"card-body px-4 pb-4"},pg={class:"d-flex flex-column gap-2 mb-4"},mg={class:"d-flex align-items-center"},bg={class:"text-muted"},_g={class:"ms-auto"},xg={for:"peer_name_textbox",class:"form-label"},yg={class:"text-muted"},vg=["disabled"],wg={class:"d-flex position-relative"},kg={for:"peer_private_key_textbox",class:"form-label"},Sg={class:"text-muted"},Mg=["type","disabled"],Pg={for:"peer_allowed_ip_textbox",class:"form-label"},Cg={class:"text-muted"},Dg=["disabled"],$g={for:"peer_endpoint_allowed_ips",class:"form-label"},Og={class:"text-muted"},Ag=["disabled"],Lg={for:"peer_DNS_textbox",class:"form-label"},Tg={class:"text-muted"},Rg=["disabled"],Ig={class:"accordion mt-3",id:"peerSettingsAccordion"},Eg={class:"accordion-item"},Fg={class:"accordion-header"},Bg={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},zg={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},Ng={class:"accordion-body d-flex flex-column gap-2 mb-2"},Vg={for:"peer_preshared_key_textbox",class:"form-label"},jg={class:"text-muted"},Wg=["disabled"],Hg={for:"peer_mtu",class:"form-label"},Ug={class:"text-muted"},Yg=["disabled"],Jg={for:"peer_keep_alive",class:"form-label"},Kg={class:"text-muted"},Xg=["disabled"],Gg={class:"d-flex gap-2 align-items-center"},qg={class:"d-flex gap-2 ms-auto"},Qg={class:"d-flex align-items-center gap-2"},Zg=["disabled"],tp=["disabled"];function ep(s,t,e,i,n,o){const a=V("LocaleText");return S(),C("div",lg,[h("div",cg,[h("div",dg,[h("div",hg,[h("div",ug,[h("h4",fg,[y(a,{t:"Peer Settings"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=r=>this.$emit("close"))})]),this.data?(S(),C("div",gg,[h("div",pg,[h("div",mg,[h("small",bg,[y(a,{t:"Public Key"})]),h("small",_g,[h("samp",null,F(this.data.id),1)])]),h("div",null,[h("label",xg,[h("small",yg,[y(a,{t:"Name"})])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[1]||(t[1]=r=>this.data.name=r),id:"peer_name_textbox",placeholder:""},null,8,vg),[[rt,this.data.name]])]),h("div",null,[h("div",wg,[h("label",kg,[h("small",Sg,[y(a,{t:"Private Key"}),h("code",null,[y(a,{t:"(Required for QR Code and Download)"})])])]),h("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:t[2]||(t[2]=r=>this.showKey=!this.showKey)},[h("i",{class:it(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),K(h("input",{type:[this.showKey?"text":"password"],class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[3]||(t[3]=r=>this.data.private_key=r),id:"peer_private_key_textbox",style:{"padding-right":"40px"}},null,8,Mg),[[Ia,this.data.private_key]])]),h("div",null,[h("label",Pg,[h("small",Cg,[y(a,{t:"Allowed IPs"}),h("code",null,[y(a,{t:"(Required)"})])])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[4]||(t[4]=r=>this.data.allowed_ip=r),id:"peer_allowed_ip_textbox"},null,8,Dg),[[rt,this.data.allowed_ip]])]),h("div",null,[h("label",$g,[h("small",Og,[y(a,{t:"Endpoint Allowed IPs"}),h("code",null,[y(a,{t:"(Required)"})])])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[5]||(t[5]=r=>this.data.endpoint_allowed_ip=r),id:"peer_endpoint_allowed_ips"},null,8,Ag),[[rt,this.data.endpoint_allowed_ip]])]),h("div",null,[h("label",Lg,[h("small",Tg,[y(a,{t:"DNS"})])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[6]||(t[6]=r=>this.data.DNS=r),id:"peer_DNS_textbox"},null,8,Rg),[[rt,this.data.DNS]])]),h("div",Ig,[h("div",Eg,[h("h2",Fg,[h("button",Bg,[y(a,{t:"Optional Settings"})])]),h("div",zg,[h("div",Ng,[h("div",null,[h("label",Vg,[h("small",jg,[y(a,{t:"Pre-Shared Key"})])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[7]||(t[7]=r=>this.data.preshared_key=r),id:"peer_preshared_key_textbox"},null,8,Wg),[[rt,this.data.preshared_key]])]),h("div",null,[h("label",Hg,[h("small",Ug,[y(a,{t:"MTU"})])]),K(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[8]||(t[8]=r=>this.data.mtu=r),id:"peer_mtu"},null,8,Yg),[[rt,this.data.mtu]])]),h("div",null,[h("label",Jg,[h("small",Kg,[y(a,{t:"Persistent Keepalive"})])]),K(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[9]||(t[9]=r=>this.data.keepalive=r),id:"peer_keep_alive"},null,8,Xg),[[rt,this.data.keepalive]])])])])])]),t[18]||(t[18]=h("hr",null,null,-1)),h("div",Gg,[h("strong",null,[y(a,{t:"Reset Data Usage"})]),h("div",qg,[h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:t[10]||(t[10]=r=>this.resetPeerData("total"))},[t[15]||(t[15]=h("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),y(a,{t:"Total"})]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:t[11]||(t[11]=r=>this.resetPeerData("receive"))},[t[16]||(t[16]=h("i",{class:"bi bi-arrow-down me-2"},null,-1)),y(a,{t:"Received"})]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:t[12]||(t[12]=r=>this.resetPeerData("sent"))},[t[17]||(t[17]=h("i",{class:"bi bi-arrow-up me-2"},null,-1)),y(a,{t:"Sent"})])])])]),h("div",Qg,[h("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto px-3 py-2",onClick:t[13]||(t[13]=r=>this.reset()),disabled:!this.dataChanged||this.saving},t[19]||(t[19]=[h("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,Zg),h("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 px-3 py-2 shadow",disabled:!this.dataChanged||this.saving,onClick:t[14]||(t[14]=r=>this.savePeer())},t[20]||(t[20]=[h("i",{class:"bi bi-save-fill"},null,-1)]),8,tp)])])):T("",!0)])])])])}const sp=pt(rg,[["render",ep],["__scopeId","data-v-a63ae8cb"]]),ip={name:"peerQRCode",components:{LocaleText:O},props:{peerConfigData:String},mounted(){Ba.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,s=>{s&&console.error(s)})}},np={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},op={class:"container d-flex h-100 w-100"},ap={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},rp={class:"card rounded-3 shadow"},lp={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},cp={class:"mb-0"},dp={class:"card-body"},hp={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function up(s,t,e,i,n,o){const a=V("LocaleText");return S(),C("div",np,[h("div",op,[h("div",ap,[h("div",rp,[h("div",lp,[h("h4",cp,[y(a,{t:"QR Code"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=r=>this.$emit("close"))})]),h("div",dp,[h("canvas",hp,null,512)])])])])])}const fp=pt(ip,[["render",up]]),gp={name:"scheduleDropdown",props:{options:Array,data:String,edit:!1},setup(s){s.data===void 0&&this.$emit("update",this.options[0].value)},computed:{currentSelection(){return this.options.find(s=>s.value===this.data)}}},pp={class:"dropdown scheduleDropdown"},mp={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},bp=["onClick"],_p={key:0,class:"bi bi-check ms-auto"};function xp(s,t,e,i,n,o){return S(),C("div",pp,[h("button",{class:it(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!e.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[h("samp",null,F(this.currentSelection.display),1)],2),h("ul",mp,[e.edit?(S(!0),C(ct,{key:0},Ot(this.options,a=>(S(),C("li",null,[h("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:r=>s.$emit("update",a.value)},[h("samp",null,F(a.display),1),a.value===this.currentSelection.value?(S(),C("i",_p)):T("",!0)],8,bp)]))),256)):T("",!0)])])}const Da=pt(gp,[["render",xp],["__scopeId","data-v-6a5aba2a"]]),yp={name:"schedulePeerJob",components:{LocaleText:O,VueDatePicker:fo,ScheduleDropdown:Da},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(s){const t=U({}),e=U(!1),i=U(!1);t.value=JSON.parse(JSON.stringify(s.pjob)),t.value.CreationDate||(e.value=!0,i.value=!0);const n=At();return{job:t,edit:e,newJob:i,store:n}},data(){return{inputType:void 0}},watch:{pjob:{deep:!0,immediate:!0,handler(s){this.edit||(this.job=JSON.parse(JSON.stringify(s)))}}},methods:{save(){this.job.Field&&this.job.Operator&&this.job.Action&&this.job.Value?ut("/api/savePeerScheduleJob/",{Job:this.job},s=>{s.status?(this.edit=!1,this.store.newMessage("Server","Peer job saved","success"),console.log(s.data),this.$emit("refresh",s.data[0]),this.newJob=!1):this.store.newMessage("Server",s.message,"danger")}):this.alert()},alert(){let s="animate__flash",t=this.$el.querySelectorAll(".scheduleDropdown"),e=this.$el.querySelectorAll("input");t.forEach(i=>i.classList.add("animate__animated",s)),e.forEach(i=>i.classList.add("animate__animated",s)),setTimeout(()=>{t.forEach(i=>i.classList.remove("animate__animated",s)),e.forEach(i=>i.classList.remove("animate__animated",s))},2e3)},reset(){this.job.CreationDate?(this.job=JSON.parse(JSON.stringify(this.pjob)),this.edit=!1):this.$emit("delete")},delete(){this.job.CreationDate&&ut("/api/deletePeerScheduleJob/",{Job:this.job},s=>{s.status?this.store.newMessage("Server","Peer job deleted","success"):(this.store.newMessage("Server",s.message,"danger"),this.$emit("delete"))}),this.$emit("delete")},parseTime(s){s&&(this.job.Value=Ut(s).format("YYYY-MM-DD HH:mm:ss"))}}},vp={class:"card-header bg-transparent text-muted border-0"},wp={key:0,class:"d-flex"},kp={class:"me-auto"},Sp={key:1},Mp={class:"badge text-bg-warning"},Pp={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},Cp={class:"d-flex gap-2 align-items-center mb-2"},Dp=["disabled"],$p={class:"px-5 d-flex gap-2 align-items-center"},Op={class:"d-flex gap-3"},Ap={key:0,class:"ms-auto d-flex gap-3"},Lp={key:1,class:"ms-auto d-flex gap-3"};function Tp(s,t,e,i,n,o){const a=V("LocaleText"),r=V("ScheduleDropdown"),l=V("VueDatePicker");return S(),C("div",{class:it(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[h("div",vp,[this.newJob?(S(),C("small",Sp,[h("span",Mp,[y(a,{t:"Unsaved Job"})])])):(S(),C("small",wp,[h("strong",kp,[y(a,{t:"Job ID"})]),h("samp",null,F(this.job.JobID),1)]))]),h("div",Pp,[h("div",Cp,[h("samp",null,[y(a,{t:"if"})]),y(r,{edit:i.edit,options:this.dropdowns.Field,data:this.job.Field,onUpdate:t[0]||(t[0]=c=>{this.job.Field=c})},null,8,["edit","options","data"]),h("samp",null,[y(a,{t:"is"})]),y(r,{edit:i.edit,options:this.dropdowns.Operator,data:this.job.Operator,onUpdate:t[1]||(t[1]=c=>this.job.Operator=c)},null,8,["edit","options","data"]),this.job.Field==="date"?(S(),j(l,{key:0,is24:!0,"min-date":new Date,"model-value":this.job.Value,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:!i.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):K((S(),C("input",{key:1,class:"form-control form-control-sm form-control-dark rounded-3 flex-grow-1",disabled:!i.edit,"onUpdate:modelValue":t[2]||(t[2]=c=>this.job.Value=c),style:{width:"auto"}},null,8,Dp)),[[rt,this.job.Value]]),h("samp",null,F(this.dropdowns.Field.find(c=>c.value===this.job.Field)?.unit)+" { ",1)]),h("div",$p,[h("samp",null,[y(a,{t:"then"})]),y(r,{edit:i.edit,options:this.dropdowns.Action,data:this.job.Action,onUpdate:t[3]||(t[3]=c=>this.job.Action=c)},null,8,["edit","options","data"])]),h("div",Op,[t[12]||(t[12]=h("samp",null,"}",-1)),this.edit?(S(),C("div",Lp,[h("a",{role:"button",class:"text-secondary text-decoration-none",onClick:t[6]||(t[6]=c=>this.reset())},[t[10]||(t[10]=st("[C] ")),y(a,{t:"Cancel"})]),h("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:t[7]||(t[7]=c=>this.save())},[t[11]||(t[11]=st("[S] ")),y(a,{t:"Save"})])])):(S(),C("div",Ap,[h("a",{role:"button",class:"ms-auto text-decoration-none",onClick:t[4]||(t[4]=c=>this.edit=!0)},[t[8]||(t[8]=st("[E] ")),y(a,{t:"Edit"})]),h("a",{role:"button",onClick:t[5]||(t[5]=c=>this.delete()),class:"text-danger text-decoration-none"},[t[9]||(t[9]=st("[D] ")),y(a,{t:"Delete"})])]))])])],2)}const $a=pt(yp,[["render",Tp],["__scopeId","data-v-8f3f1b93"]]),Rp={name:"peerJobs",setup(){return{store:Ye()}},props:{selectedPeer:Object},components:{LocaleText:O,SchedulePeerJob:$a,ScheduleDropdown:Da},data(){return{}},methods:{deleteJob(s){this.selectedPeer.jobs=this.selectedPeer.jobs.filter(t=>t.JobID!==s.JobID)},addJob(){this.selectedPeer.jobs.unshift(JSON.parse(JSON.stringify({JobID:ho().toString(),Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,Field:this.store.PeerScheduleJobs.dropdowns.Field[0].value,Operator:this.store.PeerScheduleJobs.dropdowns.Operator[0].value,Value:"",CreationDate:"",ExpireDate:"",Action:this.store.PeerScheduleJobs.dropdowns.Action[0].value})))}}},Ip={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},Ep={class:"container d-flex h-100 w-100"},Fp={class:"m-auto modal-dialog-centered dashboardModal"},Bp={class:"card rounded-3 shadow",style:{width:"700px"}},zp={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},Np={class:"mb-0 fw-normal"},Vp={class:"card-body px-4 pb-4 pt-2 position-relative"},jp={class:"d-flex align-items-center mb-3"},Wp={class:"card shadow-sm",key:"none",style:{height:"153px"}},Hp={class:"card-body text-muted text-center d-flex"},Up={class:"m-auto"};function Yp(s,t,e,i,n,o){const a=V("LocaleText"),r=V("SchedulePeerJob");return S(),C("div",Ip,[h("div",Ep,[h("div",Fp,[h("div",Bp,[h("div",zp,[h("h4",Np,[y(a,{t:"Schedule Jobs"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=l=>this.$emit("close"))})]),h("div",Vp,[h("div",jp,[h("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow",onClick:t[1]||(t[1]=l=>this.addJob())},[t[3]||(t[3]=h("i",{class:"bi bi-plus-lg me-2"},null,-1)),y(a,{t:"Job"})])]),y(gi,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:nt(()=>[(S(!0),C(ct,null,Ot(this.selectedPeer.jobs,(l,c)=>(S(),j(r,{onRefresh:t[2]||(t[2]=d=>this.$emit("refresh")),onDelete:d=>this.deleteJob(l),dropdowns:this.store.PeerScheduleJobs.dropdowns,key:l.JobID,pjob:l},null,8,["onDelete","dropdowns","pjob"]))),128)),this.selectedPeer.jobs.length===0?(S(),C("div",Wp,[h("div",Hp,[h("h6",Up,[y(a,{t:"This peer does not have any job yet."})])])])):T("",!0)]),_:1})])])])])])}const Jp=pt(Rp,[["render",Yp],["__scopeId","data-v-5bbdd42b"]]),Kp={name:"peerJobsAllModal",setup(){return{store:Ye()}},components:{LocaleText:O,SchedulePeerJob:$a},props:{configurationPeers:Array[Object]},methods:{getuuid(){return ho()}},computed:{getAllJobs(){return this.configurationPeers.filter(s=>s.jobs.length>0)}}},Xp={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},Gp={class:"container d-flex h-100 w-100"},qp={class:"m-auto modal-dialog-centered dashboardModal"},Qp={class:"card rounded-3 shadow",style:{width:"700px"}},Zp={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},tm={class:"mb-0 fw-normal"},em={class:"card-body px-4 pb-4 pt-2"},sm={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},im={class:"accordion-header"},nm=["data-bs-target"],om={key:0},am={class:"text-muted"},rm=["id"],lm={class:"accordion-body"},cm={key:1,class:"card shadow-sm",style:{height:"153px"}},dm={class:"card-body text-muted text-center d-flex"},hm={class:"m-auto"};function um(s,t,e,i,n,o){const a=V("LocaleText"),r=V("SchedulePeerJob");return S(),C("div",Xp,[h("div",Gp,[h("div",qp,[h("div",Qp,[h("div",Zp,[h("h4",tm,[y(a,{t:"All Active Jobs"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=l=>this.$emit("close"))})]),h("div",em,[this.getAllJobs.length>0?(S(),C("div",sm,[(S(!0),C(ct,null,Ot(this.getAllJobs,(l,c)=>(S(),C("div",{class:"accordion-item",key:l.id},[h("h2",im,[h("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+c},[h("small",null,[h("strong",null,[l.name?(S(),C("span",om,F(l.name)+" • ",1)):T("",!0),h("samp",am,F(l.id),1)])])],8,nm)]),h("div",{id:"collapse_"+c,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[h("div",lm,[(S(!0),C(ct,null,Ot(l.jobs,d=>(S(),j(r,{onDelete:t[1]||(t[1]=u=>this.$emit("refresh")),onRefresh:t[2]||(t[2]=u=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:d.JobID,pjob:d},null,8,["dropdowns","pjob"]))),128))])],8,rm)]))),128))])):(S(),C("div",cm,[h("div",dm,[h("span",hm,[y(a,{t:"No active job at the moment."})])])]))])])])])])}const fm=pt(Kp,[["render",um]]),gm={name:"peerJobsLogsModal",components:{LocaleText:O},props:{configurationInfo:Object},data(){return{dataLoading:!0,data:[],logFetchTime:void 0,showLogID:!1,showJobID:!0,showSuccessJob:!0,showFailedJob:!0,showLogAmount:10}},async mounted(){await this.fetchLog()},methods:{async fetchLog(){this.dataLoading=!0,await $t(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},s=>{this.data=s.data,this.logFetchTime=Ut().format("YYYY-MM-DD HH:mm:ss"),this.dataLoading=!1})}},computed:{getLogs(){return this.data.filter(s=>this.showSuccessJob&&s.Status==="1"||this.showFailedJob&&s.Status==="0")},showLogs(){return this.getLogs.slice(0,this.showLogAmount)}}},pm={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},mm={class:"container-fluid d-flex h-100 w-100"},bm={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},_m={class:"card rounded-3 shadow w-100"},xm={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},ym={class:"mb-0"},vm={class:"card-body px-4 pb-4 pt-2"},wm={key:0},km={class:"mb-2 d-flex gap-3"},Sm={class:"d-flex gap-3 align-items-center"},Mm={class:"text-muted"},Pm={class:"form-check"},Cm={class:"form-check-label",for:"jobLogsShowSuccessCheck"},Dm={class:"badge text-success-emphasis bg-success-subtle"},$m={class:"form-check"},Om={class:"form-check-label",for:"jobLogsShowFailedCheck"},Am={class:"badge text-danger-emphasis bg-danger-subtle"},Lm={class:"d-flex gap-3 align-items-center ms-auto"},Tm={class:"text-muted"},Rm={class:"form-check"},Im={class:"form-check-label",for:"jobLogsShowJobIDCheck"},Em={class:"form-check"},Fm={class:"form-check-label",for:"jobLogsShowLogIDCheck"},Bm={class:"table"},zm={scope:"col"},Nm={key:0,scope:"col"},Vm={key:1,scope:"col"},jm={scope:"col"},Wm={scope:"col"},Hm={style:{"font-size":"0.875rem"}},Um={scope:"row"},Ym={key:0},Jm={class:"text-muted"},Km={key:1},Xm={class:"text-muted"},Gm={class:"d-flex gap-2"},qm={key:1,class:"d-flex align-items-center flex-column"};function Qm(s,t,e,i,n,o){const a=V("LocaleText");return S(),C("div",pm,[h("div",mm,[h("div",bm,[h("div",_m,[h("div",xm,[h("h4",ym,[y(a,{t:"Jobs Logs"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=r=>this.$emit("close"))})]),h("div",vm,[this.dataLoading?(S(),C("div",qm,t[11]||(t[11]=[h("div",{class:"spinner-border text-body",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1)]))):(S(),C("div",wm,[h("p",null,[y(a,{t:"Updated at"}),st(" : "+F(this.logFetchTime),1)]),h("div",km,[h("button",{onClick:t[1]||(t[1]=r=>this.fetchLog()),class:"btn btn-sm rounded-3 shadow-sm text-info-emphasis bg-info-subtle border-1 border-info-subtle me-1"},[t[8]||(t[8]=h("i",{class:"bi bi-arrow-clockwise me-2"},null,-1)),y(a,{t:"Refresh"})]),h("div",Sm,[h("span",Mm,[y(a,{t:"Filter"})]),h("div",Pm,[K(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[2]||(t[2]=r=>this.showSuccessJob=r),id:"jobLogsShowSuccessCheck"},null,512),[[be,this.showSuccessJob]]),h("label",Cm,[h("span",Dm,[y(a,{t:"Success"})])])]),h("div",$m,[K(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=r=>this.showFailedJob=r),id:"jobLogsShowFailedCheck"},null,512),[[be,this.showFailedJob]]),h("label",Om,[h("span",Am,[y(a,{t:"Failed"})])])])]),h("div",Lm,[h("span",Tm,[y(a,{t:"Display"})]),h("div",Rm,[K(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=r=>n.showJobID=r),id:"jobLogsShowJobIDCheck"},null,512),[[be,n.showJobID]]),h("label",Im,[y(a,{t:"Job ID"})])]),h("div",Em,[K(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[5]||(t[5]=r=>n.showLogID=r),id:"jobLogsShowLogIDCheck"},null,512),[[be,n.showLogID]]),h("label",Fm,[y(a,{t:"Log ID"})])])])]),h("table",Bm,[h("thead",null,[h("tr",null,[h("th",zm,[y(a,{t:"Date"})]),n.showLogID?(S(),C("th",Nm,[y(a,{t:"Log ID"})])):T("",!0),n.showJobID?(S(),C("th",Vm,[y(a,{t:"Job ID"})])):T("",!0),h("th",jm,[y(a,{t:"Status"})]),h("th",Wm,[y(a,{t:"Message"})])])]),h("tbody",null,[(S(!0),C(ct,null,Ot(this.showLogs,r=>(S(),C("tr",Hm,[h("th",Um,F(r.LogDate),1),n.showLogID?(S(),C("td",Ym,[h("samp",Jm,F(r.LogID),1)])):T("",!0),n.showJobID?(S(),C("td",Km,[h("samp",Xm,F(r.JobID),1)])):T("",!0),h("td",null,[h("span",{class:it(["badge",[r.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},F(r.Status==="1"?"Success":"Failed"),3)]),h("td",null,F(r.Message),1)]))),256))])]),h("div",Gm,[this.getLogs.length>this.showLogAmount?(S(),C("button",{key:0,onClick:t[6]||(t[6]=r=>this.showLogAmount+=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},t[9]||(t[9]=[h("i",{class:"bi bi-chevron-down me-2"},null,-1),st(" Show More ")]))):T("",!0),this.showLogAmount>20?(S(),C("button",{key:1,onClick:t[7]||(t[7]=r=>this.showLogAmount=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},t[10]||(t[10]=[h("i",{class:"bi bi-chevron-up me-2"},null,-1),st(" Collapse ")]))):T("",!0)])]))])])])])])}const Zm=pt(gm,[["render",Qm]]),tb={name:"peerShareLinkModal",props:{peer:Object},components:{LocaleText:O,VueDatePicker:fo},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:At()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0)},watch:{"peer.ShareLink":{deep:!0,handler(s,t){t.length!==s.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,ut("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:Ut().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},s=>{s.status?(this.peer.ShareLink=s.data,this.dataCopy=s.data.at(0)):this.store.newMessage("Server","Share link failed to create. Reason: "+s.message,"danger"),this.loading=!1})},updateLinkExpireDate(){ut("/api/sharePeer/update",this.dataCopy,s=>{s.status?(this.dataCopy=s.data.at(0),this.peer.ShareLink=s.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+s.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=Ut().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(s){s?this.dataCopy.ExpireDate=Ut(s).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const s=this.store.getActiveCrossServer();return s?`${s.host}/${this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}`:window.location.origin+window.location.pathname+this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}}},eb={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},sb={class:"container d-flex h-100 w-100"},ib={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},nb={class:"card rounded-3 shadow flex-grow-1"},ob={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},ab={class:"mb-0"},rb={key:0,class:"card-body px-4 pb-4"},lb={key:0},cb={class:"mb-3 text-muted"},db=["disabled"],hb={key:1},ub={class:"d-flex gap-2 mb-4"},fb=["href"],gb={class:"d-flex flex-column gap-2 mb-3"},pb=["disabled"];function mb(s,t,e,i,n,o){const a=V("LocaleText"),r=V("VueDatePicker");return S(),C("div",eb,[h("div",sb,[h("div",ib,[h("div",nb,[h("div",ob,[h("h4",ab,[y(a,{t:"Share Peer"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=l=>this.$emit("close"))})]),this.peer.ShareLink?(S(),C("div",rb,[this.dataCopy?(S(),C("div",hb,[h("div",ub,[t[4]||(t[4]=h("i",{class:"bi bi-link-45deg"},null,-1)),h("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},F(o.getUrl),9,fb)]),h("div",gb,[h("small",null,[t[5]||(t[5]=h("i",{class:"bi bi-calendar me-2"},null,-1)),y(a,{t:"Expire At"})]),y(r,{is24:!0,"min-date":new Date,"model-value":this.dataCopy.ExpireDate,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","dark"])]),h("button",{onClick:t[2]||(t[2]=l=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[h("span",{class:it({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},t[6]||(t[6]=[h("i",{class:"bi bi-send-slash-fill me-2"},null,-1)]),2),this.loading?(S(),j(a,{key:0,t:"Stop Sharing..."})):(S(),j(a,{key:1,t:"Stop Sharing"}))],8,pb)])):(S(),C("div",lb,[h("h6",cb,[y(a,{t:"Currently the peer is not sharing"})]),h("button",{onClick:t[1]||(t[1]=l=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[h("span",{class:it({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},t[3]||(t[3]=[h("i",{class:"bi bi-send-fill me-2"},null,-1)]),2),this.loading?(S(),j(a,{key:0,t:"Sharing..."})):(S(),j(a,{key:1,t:"Start Sharing"}))],8,db)]))])):T("",!0)])])])])}const bb=pt(tb,[["render",mb]]),_b={class:"container d-flex h-100 w-100"},xb={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},yb={class:"card rounded-3 shadow flex-grow-1"},vb={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},wb={class:"mb-0"},kb={class:"card-body px-4 pb-4"},Sb={class:"d-flex gap-2 flex-column"},Mb={class:"d-flex align-items-center"},Pb={class:"text-muted"},Cb={class:"ms-auto"},Db={class:"d-flex align-items-center"},$b={class:"text-muted"},Ob={class:"ms-auto"},Ab={for:"configuration_private_key",class:"form-label d-flex"},Lb={class:"text-muted d-block"},Tb={class:"form-check form-switch ms-auto"},Rb=["disabled"],Ib={for:"configuration_ipaddress_cidr",class:"form-label"},Eb={class:"text-muted"},Fb=["disabled"],Bb={for:"configuration_listen_port",class:"form-label"},zb={class:"text-muted"},Nb=["disabled"],Vb={for:"configuration_preup",class:"form-label"},jb={class:"text-muted"},Wb=["disabled"],Hb={for:"configuration_predown",class:"form-label"},Ub={class:"text-muted"},Yb=["disabled"],Jb={for:"configuration_postup",class:"form-label"},Kb={class:"text-muted"},Xb=["disabled"],Gb={for:"configuration_postdown",class:"form-label"},qb={class:"text-muted"},Qb=["disabled"],Zb={class:"d-flex align-items-center gap-2 mt-4"},t_=["disabled"],e_=["disabled"],s_={__name:"editConfiguration",props:{configurationInfo:Object},emits:["changed","close"],setup(s,{emit:t}){const e=s,i=Ye(),n=At(),o=U(!1),a=Xs(JSON.parse(JSON.stringify(e.configurationInfo))),r=U(!1),l=U(!1);U(!1);const c=Xs({PrivateKey:!0,IPAddress:!0,ListenPort:!0}),d=Gs("editConfigurationContainer"),u=()=>{i.checkWGKeyLength(a.PrivateKey)?(c.PrivateKey=!0,a.PublicKey=window.wireguard.generatePublicKey(a.PrivateKey)):c.PrivateKey=!1},f=()=>{l.value=!1,Object.assign(a,JSON.parse(JSON.stringify(e.configurationInfo)))},g=t,p=()=>{o.value=!0,ut("/api/updateWireguardConfiguration",a,m=>{o.value=!1,m.status?(n.newMessage("Server","Configuration saved","success"),l.value=!1,g("dataChanged",m.data)):n.newMessage("Server",m.message,"danger")})};return Ss(a,()=>{l.value=JSON.stringify(a)!==JSON.stringify(e.configurationInfo)},{deep:!0}),U(!1),(m,b)=>(S(),C("div",{class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref_key:"editConfigurationContainer",ref:d},[h("div",_b,[h("div",xb,[h("div",yb,[h("div",vb,[h("h4",wb,[y(O,{t:"Configuration Settings"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:b[0]||(b[0]=_=>m.$emit("close"))})]),h("div",kb,[h("div",Sb,[h("div",Mb,[h("small",Pb,[y(O,{t:"Name"})]),h("small",Cb,[h("samp",null,F(a.Name),1)])]),h("div",Db,[h("small",$b,[y(O,{t:"Public Key"})]),h("small",Ob,[h("samp",null,F(a.PublicKey),1)])]),b[15]||(b[15]=h("hr",null,null,-1)),h("div",null,[h("label",Ab,[h("small",Lb,[y(O,{t:"Private Key"})]),h("div",Tb,[K(h("input",{class:"form-check-input",type:"checkbox",role:"switch",id:"editPrivateKeySwitch","onUpdate:modelValue":b[1]||(b[1]=_=>r.value=_)},null,512),[[be,r.value]]),b[12]||(b[12]=h("label",{class:"form-check-label",for:"editPrivateKeySwitch"},[h("small",null,"Edit")],-1))])]),K(h("input",{type:"text",class:it(["form-control form-control-sm rounded-3",{"is-invalid":!c.PrivateKey}]),disabled:o.value||!r.value,onKeyup:b[2]||(b[2]=_=>u()),"onUpdate:modelValue":b[3]||(b[3]=_=>a.PrivateKey=_),id:"configuration_private_key"},null,42,Rb),[[rt,a.PrivateKey]])]),h("div",null,[h("label",Ib,[h("small",Eb,[y(O,{t:"IP Address/CIDR"})])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:o.value,"onUpdate:modelValue":b[4]||(b[4]=_=>a.Address=_),id:"configuration_ipaddress_cidr"},null,8,Fb),[[rt,a.Address]])]),h("div",null,[h("label",Bb,[h("small",zb,[y(O,{t:"Listen Port"})])]),K(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:o.value,"onUpdate:modelValue":b[5]||(b[5]=_=>a.ListenPort=_),id:"configuration_listen_port"},null,8,Nb),[[rt,a.ListenPort]])]),h("div",null,[h("label",Vb,[h("small",jb,[y(O,{t:"PreUp"})])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:o.value,"onUpdate:modelValue":b[6]||(b[6]=_=>a.PreUp=_),id:"configuration_preup"},null,8,Wb),[[rt,a.PreUp]])]),h("div",null,[h("label",Hb,[h("small",Ub,[y(O,{t:"PreDown"})])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:o.value,"onUpdate:modelValue":b[7]||(b[7]=_=>a.PreDown=_),id:"configuration_predown"},null,8,Yb),[[rt,a.PreDown]])]),h("div",null,[h("label",Jb,[h("small",Kb,[y(O,{t:"PostUp"})])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:o.value,"onUpdate:modelValue":b[8]||(b[8]=_=>a.PostUp=_),id:"configuration_postup"},null,8,Xb),[[rt,a.PostUp]])]),h("div",null,[h("label",Gb,[h("small",qb,[y(O,{t:"PostDown"})])]),K(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:o.value,"onUpdate:modelValue":b[9]||(b[9]=_=>a.PostDown=_),id:"configuration_postdown"},null,8,Qb),[[rt,a.PostDown]])]),h("div",Zb,[h("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto",onClick:b[10]||(b[10]=_=>f()),disabled:!l.value||o.value},b[13]||(b[13]=[h("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,t_),h("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 shadow",disabled:!l.value||o.value,onClick:b[11]||(b[11]=_=>p())},b[14]||(b[14]=[h("i",{class:"bi bi-save-fill"},null,-1)]),8,e_)])])])])])])],512))}},i_={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref:"selectPeersContainer"},n_={class:"container d-flex h-100 w-100"},o_={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},a_={class:"card rounded-3 shadow flex-grow-1"},r_={class:"card-header bg-transparent d-flex align-items-center gap-2 p-4 flex-column pb-3"},l_={class:"mb-2 w-100 d-flex"},c_={class:"mb-0"},d_={class:"d-flex w-100 align-items-center gap-2"},h_={class:"d-flex gap-3"},u_={class:"card-body px-4 flex-grow-1 d-flex gap-2 flex-column position-relative",ref:"card-body",style:{"overflow-y":"scroll"}},f_=["onClick","disabled","data-id"],g_={key:0},p_={class:"d-flex flex-column"},m_={class:"fw-bold"},b_={class:"text-muted"},__={key:1,class:"ms-auto"},x_={key:0,class:"spinner-border spinner-border-sm",role:"status"},y_={class:"card-footer px-4 py-3 gap-2 d-flex align-items-center"},v_=["disabled"],w_={key:0,class:"flex-grow-1 text-center"},k_=["disabled"],S_={key:0,class:"flex-grow-1 text-center"},M_=["disabled"],P_={key:0,class:"flex-grow-1 text-center"},C_=["disabled"],D_={__name:"selectPeers",props:{configurationPeers:Array},emits:["refresh","close"],setup(s,{emit:t}){const e=s,i=U(!1),n=U(!1),o=U([]),a=U(""),r=k=>{o.value.find(v=>v===k)?o.value=o.value.filter(v=>v!==k):o.value.push(k)},l=uo(()=>i.value||n.value?e.configurationPeers.filter(k=>o.value.find(v=>v===k.id)):a.value.length>0?e.configurationPeers.filter(k=>k.id.includes(a.value)||k.name.includes(a.value)):e.configurationPeers);Ss(o,()=>{o.value.length===0&&(i.value=!1,n.value=!1)});const c=Ms(),d=At(),u=t,f=U(!1),g=()=>{f.value=!0,ut(`/api/deletePeers/${c.params.id}`,{peers:o.value},k=>{d.newMessage("Server",k.message,k.status?"success":"danger"),k.status&&(o.value=[],i.value=!1),u("refresh"),f.value=!1})},p=Xs({success:[],failed:[]}),m=Gs("card-body"),b=Gs("sp"),_=async()=>{n.value=!0;for(const k of o.value)m.value.scrollTo({top:b.value.find(v=>v.dataset.id===k).offsetTop-20,behavior:"smooth"}),await $t("/api/downloadPeer/"+c.params.id,{id:k},v=>{if(v.status){const x=new Blob([v.data.file],{type:"text/plain"}),M=URL.createObjectURL(x),P=`${v.data.fileName}.conf`,D=document.createElement("a");D.href=M,D.download=P,D.click(),p.success.push(k)}else p.failed.push(k)})},w=()=>{p.success=[],p.failed=[],n.value=!1};return(k,v)=>(S(),C("div",i_,[h("div",n_,[h("div",o_,[h("div",a_,[h("div",r_,[h("div",l_,[h("h4",c_,[y(O,{t:"Select Peers"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:v[0]||(v[0]=x=>u("close"))})]),h("div",d_,[h("div",h_,[!n.value&&o.value.length!==s.configurationPeers.map(x=>x.id).length?(S(),C("a",{key:0,role:"button",onClick:v[1]||(v[1]=x=>o.value=s.configurationPeers.map(M=>M.id)),class:"text-decoration-none text-body"},[h("small",null,[v[9]||(v[9]=h("i",{class:"bi bi-check-all me-2"},null,-1)),y(O,{t:"Select All"})])])):T("",!0),o.value.length>0&&!n.value?(S(),C("a",{key:1,role:"button",class:"text-decoration-none text-body",onClick:v[2]||(v[2]=x=>o.value=[])},[h("small",null,[v[10]||(v[10]=h("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),y(O,{t:"Clear Selection"})])])):T("",!0)]),v[11]||(v[11]=h("label",{class:"ms-auto",for:"selectPeersSearchInput"},[h("i",{class:"bi bi-search"})],-1)),K(h("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":v[3]||(v[3]=x=>a.value=x),id:"selectPeersSearchInput",style:{width:"200px !important"},type:"text"},null,512),[[rt,a.value]])])]),h("div",u_,[(S(!0),C(ct,null,Ot(l.value,x=>(S(),C("button",{type:"button",class:it(["btn w-100 peerBtn text-start rounded-3 d-flex align-items-center gap-3",{active:o.value.find(M=>M===x.id)}]),onClick:M=>r(x.id),key:x.id,disabled:i.value||n.value,ref_for:!0,ref:"sp","data-id":x.id},[n.value?T("",!0):(S(),C("span",g_,[h("i",{class:it(["bi",[o.value.find(M=>M===x.id)?"bi-check-circle-fill":"bi-circle"]])},null,2)])),h("span",p_,[h("small",m_,F(x.name?x.name:"Untitled Peer"),1),h("small",b_,[h("samp",null,F(x.id),1)])]),n.value?(S(),C("span",__,[!p.success.find(M=>M===x.id)&&!p.failed.find(M=>M===x.id)?(S(),C("span",x_)):(S(),C("i",{key:1,class:it(["bi",[p.failed.find(M=>M===x.id)?"bi-x-circle-fill":"bi-check-circle-fill"]])},null,2))])):T("",!0)],10,f_))),128))],512),h("div",y_,[!i.value&&!n.value?(S(),C(ct,{key:0},[h("button",{class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3",disabled:o.value.length===0||f.value,onClick:v[4]||(v[4]=x=>_())},v[12]||(v[12]=[h("i",{class:"bi bi-download"},null,-1)]),8,v_),o.value.length>0?(S(),C("span",w_,[v[13]||(v[13]=h("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),y(O,{t:o.value.length+" Peer"+(o.value.length>1?"s":"")},null,8,["t"])])):T("",!0),h("button",{class:"btn bg-danger-subtle text-danger-emphasis border-danger-subtle ms-auto rounded-3",onClick:v[5]||(v[5]=x=>i.value=!0),disabled:o.value.length===0||f.value},v[14]||(v[14]=[h("i",{class:"bi bi-trash"},null,-1)]),8,k_)],64)):n.value?(S(),C(ct,{key:1},[p.failed.length+p.success.length1?"s":"")},null,8,["t"]),v[16]||(v[16]=st("... "))])):(S(),C(ct,{key:1},[h("strong",null,[y(O,{t:"Download Finished"})]),h("button",{onClick:v[6]||(v[6]=x=>w()),class:"btn bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle rounded-3 ms-auto"},[y(O,{t:"Done"})])],64))],64)):i.value?(S(),C(ct,{key:2},[h("button",{class:"btn btn-danger rounded-3",disabled:o.value.length===0||f.value,onClick:v[7]||(v[7]=x=>g())},[y(O,{t:"Yes"})],8,M_),o.value.length>0?(S(),C("strong",P_,[y(O,{t:"Are you sure to delete"}),v[17]||(v[17]=st()),y(O,{t:o.value.length+" Peer"+(o.value.length>1?"s":"")},null,8,["t"]),v[18]||(v[18]=st("? "))])):T("",!0),h("button",{class:"btn bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle ms-auto rounded-3",disabled:o.value.length===0||f.value,onClick:v[8]||(v[8]=x=>i.value=!1)},[y(O,{t:"No"})],8,C_)],64)):T("",!0)])])])])],512))}},$_=pt(D_,[["__scopeId","data-v-177407c1"]]),O_={class:"card my-0 rounded-3"},A_={class:"card-body position-relative"},L_={key:0,class:"position-absolute w-100 h-100 confirmationContainer start-0 top-0 rounded-3 d-flex p-2"},T_={class:"m-auto"},R_={class:"d-flex gap-2 align-items-center justify-content-center"},I_=["disabled"],E_=["disabled"],F_={key:0,class:"position-absolute w-100 h-100 confirmationContainer start-0 top-0 rounded-3 d-flex p-2"},B_={class:"m-auto"},z_={class:"d-flex gap-2 align-items-center justify-content-center"},N_=["disabled"],V_=["disabled"],j_={class:"d-flex gap-3"},W_={class:"d-flex flex-column"},H_={class:"text-muted"},U_={class:"d-flex flex-column"},Y_={class:"text-muted"},J_={class:"d-flex gap-2 align-items-center ms-auto"},K_={class:"card rounded-3"},X_={key:0,class:"card-body"},G_=["value"],q_={class:"d-flex"},Q_={__name:"backup",props:["b","delay"],emits:["refresh","refreshPeersList"],setup(s,{emit:t}){Ea(g=>({"6919ade8":u.value}));const e=s,i=U(!1),n=U(!1),o=Ms(),a=t,r=At(),l=U(!1),c=()=>{l.value=!0,ut("/api/deleteWireguardConfigurationBackup",{configurationName:o.params.id,backupFileName:e.b.filename},g=>{l.value=!1,g.status?(a("refresh"),r.newMessage("Server","Backup deleted","success")):r.newMessage("Server","Backup failed to delete","danger")})},d=()=>{l.value=!0,ut("/api/restoreWireguardConfigurationBackup",{configurationName:o.params.id,backupFileName:e.b.filename},g=>{l.value=!1,n.value=!1,g.status?(a("refresh"),r.newMessage("Server","Backup restored with "+e.b.filename,"success")):r.newMessage("Server","Backup failed to restore","danger")})},u=uo(()=>e.delay+"s"),f=U(!1);return(g,p)=>(S(),C("div",O_,[h("div",A_,[y(gt,{name:"zoomReversed"},{default:nt(()=>[i.value?(S(),C("div",L_,[h("div",T_,[h("h5",null,[y(O,{t:"Are you sure to delete this backup?"})]),h("div",R_,[h("button",{class:"btn btn-danger rounded-3",disabled:l.value,onClick:p[0]||(p[0]=m=>c())},[y(O,{t:"Yes"})],8,I_),h("button",{onClick:p[1]||(p[1]=m=>i.value=!1),disabled:l.value,class:"btn bg-secondary-subtle text-secondary-emphasis border-secondary-subtle rounded-3"},[y(O,{t:"No"})],8,E_)])])])):T("",!0)]),_:1}),y(gt,{name:"zoomReversed"},{default:nt(()=>[n.value?(S(),C("div",F_,[h("div",B_,[h("h5",null,[y(O,{t:"Are you sure to restore this backup?"})]),h("div",z_,[h("button",{disabled:l.value,onClick:p[2]||(p[2]=m=>d()),class:"btn btn-success rounded-3"},[y(O,{t:"Yes"})],8,N_),h("button",{onClick:p[3]||(p[3]=m=>n.value=!1),disabled:l.value,class:"btn bg-secondary-subtle text-secondary-emphasis border-secondary-subtle rounded-3"},[y(O,{t:"No"})],8,V_)])])])):T("",!0)]),_:1}),h("div",j_,[h("div",W_,[h("small",H_,[y(O,{t:"Backup"})]),h("samp",null,F(s.b.filename),1)]),h("div",U_,[h("small",Y_,[y(O,{t:"Backup Date"})]),st(" "+F(gs(Ut)(s.b.backupDate,"YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss")),1)]),h("div",J_,[h("button",{onClick:p[4]||(p[4]=m=>n.value=!0),class:"btn bg-warning-subtle text-warning-emphasis border-warning-subtle rounded-3 btn-sm"},p[7]||(p[7]=[h("i",{class:"bi bi-clock-history"},null,-1)])),h("button",{onClick:p[5]||(p[5]=m=>i.value=!0),class:"btn bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3 btn-sm"},p[8]||(p[8]=[h("i",{class:"bi bi-trash-fill"},null,-1)]))])]),p[12]||(p[12]=h("hr",null,null,-1)),h("div",K_,[h("a",{role:"button",class:it(["card-header d-flex text-decoration-none align-items-center",{"border-bottom-0":!f.value}]),style:{cursor:"pointer"},onClick:p[6]||(p[6]=m=>f.value=!f.value)},[h("small",null,[p[9]||(p[9]=st(".conf ")),y(O,{t:"File"})]),p[10]||(p[10]=h("i",{class:"bi bi-chevron-down ms-auto"},null,-1))],2),f.value?(S(),C("div",X_,[h("textarea",{class:"form-control rounded-3",value:s.b.content,disabled:"",style:{height:"300px","font-family":"var(--bs-font-monospace),sans-serif !important"}},null,8,G_)])):T("",!0)]),p[13]||(p[13]=h("hr",null,null,-1)),h("div",q_,[h("span",null,[p[11]||(p[11]=h("i",{class:"bi bi-database me-1"},null,-1)),y(O,{t:"Database File"})]),h("i",{class:it(["bi ms-auto",[s.b.database?"text-success bi-check-circle-fill":"text-danger bi-x-circle-fill"]])},null,2)])])]))}},Z_=pt(Q_,[["__scopeId","data-v-a575be12"]]),tx={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref:"editConfigurationContainer"},ex={class:"d-flex h-100 w-100"},sx={class:"modal-dialog-centered dashboardModal w-100 h-100 overflow-x-scroll flex-column gap-3 mx-3"},ix={class:"my-5 d-flex gap-3 flex-column position-relative"},nx={class:"title"},ox={class:"d-flex mb-3"},ax={class:"mb-0"},rx={class:"position-relative d-flex flex-column gap-3"},lx={class:"text-center title",key:"spinner"},cx={class:"card my-0 rounded-3",key:"noBackups"},dx={class:"card-body text-center text-muted"},hx={__name:"configurationBackupRestore",emits:["close","refreshPeersList"],setup(s,{emit:t}){const e=Ms(),i=U([]),n=U(!0),o=t;fi(()=>{a()});const a=()=>{n.value=!0,$t("/api/getWireguardConfigurationBackup",{configurationName:e.params.id},l=>{i.value=l.data,n.value=!1})},r=()=>{$t("/api/createWireguardConfigurationBackup",{configurationName:e.params.id},l=>{i.value=l.data,n.value=!1})};return(l,c)=>(S(),C("div",tx,[h("div",ex,[h("div",sx,[h("div",ix,[h("div",nx,[h("div",ox,[h("h4",ax,[y(O,{t:"Backup & Restore"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:c[0]||(c[0]=d=>l.$emit("close"))})]),h("button",{onClick:c[1]||(c[1]=d=>r()),class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3 w-100"},[c[4]||(c[4]=h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),y(O,{t:"Create Backup"})])]),h("div",rx,[y(gi,{name:"list1"},{default:nt(()=>[n.value&&i.value.length===0?(S(),C("div",lx,c[5]||(c[5]=[h("div",{class:"spinner-border"},null,-1)]))):!n.value&&i.value.length===0?(S(),C("div",cx,[h("div",dx,[c[6]||(c[6]=h("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),y(O,{t:"No backup yet, click the button above to create backup."})])])):T("",!0),(S(!0),C(ct,null,Ot(i.value,(d,u)=>(S(),j(Z_,{onRefresh:c[2]||(c[2]=f=>a()),onRefreshPeersList:c[3]||(c[3]=f=>o("refreshPeersList")),b:d,delay:u*.05,key:d.filename},null,8,["b","delay"]))),128))]),_:1})])])])])],512))}},ux=pt(hx,[["__scopeId","data-v-0b159317"]]),fx={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},gx={class:"container d-flex h-100 w-100"},px={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},mx={class:"card rounded-3 shadow flex-grow-1 bg-danger-subtle border-danger-subtle",id:"deleteConfigurationContainer"},bx={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},_x={class:"mb-0"},xx={class:"card-body px-4 text-muted"},yx={class:"mb-0"},vx={key:0},wx={key:1},kx={key:2,class:"d-flex align-items-center gap-2"},Sx=["placeholder"],Mx=["disabled"],Px={__name:"deleteConfiguration",emits:["backup"],setup(s,{emit:t}){const i=Ms().params.id,n=U(""),o=Fa(),a=At(),r=U(!1),l=()=>{clearInterval(a.Peers.RefreshInterval),r.value=!0,ut("/api/deleteWireguardConfiguration",{Name:i},g=>{g.status?(o.push("/"),a.newMessage("Server","Configuration deleted","success")):r.value=!1})},c=U(!0),d=U([]),u=()=>{c.value=!0,$t("/api/getWireguardConfigurationBackup",{configurationName:i},g=>{d.value=g.data,c.value=!1})};fi(()=>{u()});const f=t;return(g,p)=>(S(),C("div",fx,[h("div",gx,[h("div",px,[h("div",mx,[h("div",bx,[h("h5",_x,[y(O,{t:"Are you sure to delete this configuration?"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:p[0]||(p[0]=m=>g.$emit("close"))})]),h("div",xx,[h("p",yx,[y(O,{t:"Once you deleted this configuration:"})]),h("ul",null,[h("li",null,[y(O,{t:"All connected peers will get disconnected"})]),h("li",null,[y(O,{t:"Both configuration file (.conf) and database table related to this configuration will get deleted"})])]),h("div",{class:it(["alert",[c.value?"alert-secondary":d.value.length>0?"alert-success":"alert-danger"]])},[c.value?(S(),C("div",vx,[p[5]||(p[5]=h("i",{class:"bi bi-search me-2"},null,-1)),y(O,{t:"Checking backups..."})])):d.value.length>0?(S(),C("div",wx,[p[6]||(p[6]=h("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),y(O,{t:"This configuration have "+d.value.length+" backups"},null,8,["t"])])):(S(),C("div",kx,[p[9]||(p[9]=h("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),y(O,{t:"This configuration have no backup"}),h("a",{role:"button",onClick:p[1]||(p[1]=m=>f("backup")),class:"ms-auto btn btn-sm btn-primary rounded-3"},[p[7]||(p[7]=h("i",{class:"bi bi-clock-history me-2"},null,-1)),y(O,{t:"Backup"})]),h("a",{role:"button",onClick:p[2]||(p[2]=m=>u()),class:"btn btn-sm btn-primary rounded-3"},p[8]||(p[8]=[h("i",{class:"bi bi-arrow-clockwise"},null,-1)]))]))],2),p[11]||(p[11]=h("hr",null,null,-1)),h("p",null,[y(O,{t:"If you're sure, please type in the configuration name below and click Delete"})]),K(h("input",{class:"form-control rounded-3 mb-3",placeholder:gs(i),"onUpdate:modelValue":p[3]||(p[3]=m=>n.value=m),type:"text"},null,8,Sx),[[rt,n.value]]),h("button",{class:"btn btn-danger w-100",onClick:p[4]||(p[4]=m=>l()),disabled:n.value!==gs(i)||r.value},[p[10]||(p[10]=h("i",{class:"bi bi-trash-fill me-2 rounded-3"},null,-1)),y(O,{t:"Delete"})],8,Mx)])])])])]))}};Os.register(Ih,As,qh,Uh,Jo,gd,Ko,Xo,bd,md,_d,xd,Vu,Wu,Yu,rf,ai,hf,eu,vu,Cu,$u,Fu);const Cx={name:"peerList",components:{DeleteConfiguration:Px,ConfigurationBackupRestore:ux,SelectPeers:$_,EditConfiguration:s_,LocaleText:O,PeerShareLinkModal:bb,PeerJobsLogsModal:Zm,PeerJobsAllModal:fm,PeerJobs:Jp,PeerCreate:za,PeerQRCode:fp,PeerSettings:sp,PeerSearch:yr,Peer:nl,Line:yf,Bar:xf},setup(){const s=At(),t=Ye(),e=U(void 0);return{dashboardConfigurationStore:s,wireguardConfigurationStore:t,interval:e}},data(){return{configurationToggling:!1,loading:!1,error:null,configurationInfo:[],configurationPeers:[],historyDataSentDifference:[],historyDataReceivedDifference:[],historySentData:{labels:[],datasets:[{label:"Data Sent",data:[],fill:!1,borderColor:"#198754",tension:0}]},historyReceiveData:{labels:[],datasets:[{label:"Data Received",data:[],fill:!1,borderColor:"#0d6efd",tension:0}]},peerSetting:{modalOpen:!1,selectedPeer:void 0},peerScheduleJobs:{modalOpen:!1,selectedPeer:void 0},peerQRCode:{modalOpen:!1,peerConfigData:void 0},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1,selectedPeer:void 0},editConfiguration:{modalOpen:!1},selectPeers:{modalOpen:!1},backupRestore:{modalOpen:!1},deleteConfiguration:{modalOpen:!1}}},mounted(){},watch:{$route:{immediate:!0,handler(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.loading=!0;let s=this.$route.params.id;this.configurationInfo=[],this.configurationPeers=[],s&&(this.getPeers(s),this.setPeerInterval())}},"dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval"(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.setPeerInterval()}},beforeRouteLeave(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval)},methods:{toggle(){this.configurationToggling=!0,$t("/api/toggleWireguardConfiguration/",{configurationName:this.configurationInfo.Name},s=>{s.status?this.dashboardConfigurationStore.newMessage("Server",`${this.configurationInfo.Name} ${s.data?"is on":"is off"}`,"success"):this.dashboardConfigurationStore.newMessage("Server",s.message,"danger"),this.configurationInfo.Status=s.data,this.configurationToggling=!1})},getPeers(s=this.$route.params.id){$t("/api/getWireguardConfigurationInfo",{configurationName:s},t=>{if(this.configurationInfo=t.data.configurationInfo,this.configurationPeers=t.data.configurationPeers,this.configurationPeers.forEach(e=>{e.restricted=!1}),t.data.configurationRestrictedPeers.forEach(e=>{e.restricted=!0,this.configurationPeers.push(e)}),this.loading=!1,this.configurationPeers.length>0){const e=this.configurationPeers.map(n=>n.total_sent+n.cumu_sent).reduce((n,o)=>n+o).toFixed(4),i=this.configurationPeers.map(n=>n.total_receive+n.cumu_receive).reduce((n,o)=>n+o).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==e&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,Ut().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((e-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(e)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==i&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,Ut().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((i-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(i))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval))}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(t=>t.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_data+t.cumu_data).reduce((t,e)=>t+e,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_receive+t.cumu_receive).reduce((t,e)=>t+e,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_sent+t.cumu_sent).reduce((t,e)=>t+e,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(s=>s.name?s.name:`Untitled Peer - ${s.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(s=>s.cumu_data+s.total_data),backgroundColor:this.configurationPeers.map(s=>"#0dcaf0"),tooltip:{callbacks:{label:s=>`${s.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(s,t)=>`${s} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:s=>`${s.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(s,t)=>`${s} MB/s`},grid:{display:!1}}}}},searchPeers(){new we(this.configurationPeers,{keys:["name","id","allowed_ip"]});const s=this.wireguardConfigurationStore.searchString?this.configurationPeers.filter(t=>t.name.includes(this.wireguardConfigurationStore.searchString)||t.id.includes(this.wireguardConfigurationStore.searchString)||t.allowed_ip.includes(this.wireguardConfigurationStore.searchString)):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?s.slice().sort((t,e)=>t[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):s.slice().sort((t,e)=>t[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:0)}}},Dx={key:0,class:"container-md"},$x={class:"d-flex align-items-center"},Ox={CLASS:"text-muted"},Ax={class:"d-flex align-items-center gap-3"},Lx={class:"mb-0 display-4"},Tx={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},Rx={class:"card-body py-2 d-flex align-items-center"},Ix={class:"mb-0 text-muted"},Ex={class:"form-check form-switch ms-auto"},Fx=["for"],Bx={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},zx=["disabled","id"],Nx={class:"row mt-3 gy-2 gx-2 mb-2"},Vx={class:"col-12 col-lg-3"},jx={class:"card rounded-3 bg-transparent shadow-sm"},Wx={class:"card-body py-2"},Hx={class:"mb-0 text-muted"},Ux={class:"col-12 col-lg-3"},Yx={class:"card rounded-3 bg-transparent shadow-sm"},Jx={class:"card-body py-2"},Kx={class:"mb-0 text-muted"},Xx={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},Gx={class:"card rounded-3 bg-transparent shadow-sm"},qx={class:"card-body py-2"},Qx={class:"mb-0 text-muted"},Zx={class:"row gx-2 gy-2 mb-2"},t0={class:"col-12 col-lg-3"},e0={class:"card rounded-3 bg-transparent shadow-sm"},s0={class:"card-body d-flex"},i0={class:"mb-0 text-muted"},n0={class:"h4"},o0={class:"col-12 col-lg-3"},a0={class:"card rounded-3 bg-transparent shadow-sm"},r0={class:"card-body d-flex"},l0={class:"mb-0 text-muted"},c0={class:"h4"},d0={class:"col-12 col-lg-3"},h0={class:"card rounded-3 bg-transparent shadow-sm"},u0={class:"card-body d-flex"},f0={class:"mb-0 text-muted"},g0={class:"h4 text-primary"},p0={class:"col-12 col-lg-3"},m0={class:"card rounded-3 bg-transparent shadow-sm"},b0={class:"card-body d-flex"},_0={class:"mb-0 text-muted"},x0={class:"h4 text-success"},y0={class:"row gx-2 gy-2 mb-3"},v0={class:"col-12 col-lg-6"},w0={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},k0={class:"card-header bg-transparent border-0"},S0={class:"text-muted"},M0={class:"card-body pt-1"},P0={class:"col-sm col-lg-3"},C0={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},D0={class:"card-header bg-transparent border-0"},$0={class:"text-muted"},O0={class:"card-body pt-1"},A0={class:"col-sm col-lg-3"},L0={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},T0={class:"card-header bg-transparent border-0"},R0={class:"text-muted"},I0={class:"card-body pt-1"},E0={class:"mb-3"};function F0(s,t,e,i,n,o){const a=V("LocaleText"),r=V("Bar"),l=V("Line"),c=V("PeerSearch"),d=V("Peer"),u=V("PeerSettings"),f=V("PeerQRCode"),g=V("PeerJobs"),p=V("PeerJobsAllModal"),m=V("PeerJobsLogsModal"),b=V("PeerShareLinkModal"),_=V("EditConfiguration"),w=V("SelectPeers"),k=V("DeleteConfiguration"),v=V("ConfigurationBackupRestore");return this.loading?T("",!0):(S(),C("div",Dx,[h("div",$x,[h("div",null,[h("small",Ox,[y(a,{t:"CONFIGURATION"})]),h("div",Ax,[h("h1",Lx,[h("samp",null,F(this.configurationInfo.Name),1)])])]),h("div",Tx,[h("div",Rx,[h("div",null,[h("p",Ix,[h("small",null,[y(a,{t:"Status"})])]),h("div",Ex,[h("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[!this.configurationInfo.Status&&this.configurationToggling?(S(),j(a,{key:0,t:"Turning Off..."})):this.configurationInfo.Status&&this.configurationToggling?(S(),j(a,{key:1,t:"Turning On..."})):this.configurationInfo.Status&&!this.configurationToggling?(S(),j(a,{key:2,t:"On"})):!this.configurationInfo.Status&&!this.configurationToggling?(S(),j(a,{key:3,t:"Off"})):T("",!0),this.configurationToggling?(S(),C("span",Bx)):T("",!0)],8,Fx),K(h("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+this.configurationInfo.id,onChange:t[0]||(t[0]=x=>this.toggle()),"onUpdate:modelValue":t[1]||(t[1]=x=>this.configurationInfo.Status=x)},null,40,zx),[[be,this.configurationInfo.Status]])])]),h("div",{class:it(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),t[31]||(t[31]=h("hr",null,null,-1)),h("div",Nx,[h("div",Vx,[h("div",jx,[h("div",Wx,[h("p",Hx,[h("small",null,[y(a,{t:"Address"})])]),st(" "+F(this.configurationInfo.Address),1)])])]),h("div",Ux,[h("div",Yx,[h("div",Jx,[h("p",Kx,[h("small",null,[y(a,{t:"Listen Port"})])]),st(" "+F(this.configurationInfo.ListenPort),1)])])]),h("div",Xx,[h("div",Gx,[h("div",qx,[h("p",Qx,[h("small",null,[y(a,{t:"Public Key"})])]),h("samp",null,F(this.configurationInfo.PublicKey),1)])])])]),h("div",Zx,[h("div",t0,[h("div",e0,[h("div",s0,[h("div",null,[h("p",i0,[h("small",null,[y(a,{t:"Connected Peers"})])]),h("strong",n0,F(o.configurationSummary.connectedPeers)+" / "+F(n.configurationPeers.length),1)]),t[27]||(t[27]=h("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),h("div",o0,[h("div",a0,[h("div",r0,[h("div",null,[h("p",l0,[h("small",null,[y(a,{t:"Total Usage"})])]),h("strong",c0,F(o.configurationSummary.totalUsage)+" GB",1)]),t[28]||(t[28]=h("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),h("div",d0,[h("div",h0,[h("div",u0,[h("div",null,[h("p",f0,[h("small",null,[y(a,{t:"Total Received"})])]),h("strong",g0,F(o.configurationSummary.totalReceive)+" GB",1)]),t[29]||(t[29]=h("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),h("div",p0,[h("div",m0,[h("div",b0,[h("div",null,[h("p",_0,[h("small",null,[y(a,{t:"Total Sent"})])]),h("strong",x0,F(o.configurationSummary.totalSent)+" GB",1)]),t[30]||(t[30]=h("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),h("div",y0,[h("div",v0,[h("div",w0,[h("div",k0,[h("small",S0,[y(a,{t:"Peers Data Usage"})])]),h("div",M0,[y(r,{data:o.individualDataUsage,options:o.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),h("div",P0,[h("div",C0,[h("div",D0,[h("small",$0,[y(a,{t:"Real Time Received Data Usage"})])]),h("div",O0,[y(l,{options:o.chartOptions,data:o.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),h("div",A0,[h("div",L0,[h("div",T0,[h("small",R0,[y(a,{t:"Real Time Sent Data Usage"})])]),h("div",I0,[y(l,{options:o.chartOptions,data:o.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),h("div",E0,[y(c,{onJobsAll:t[2]||(t[2]=x=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:t[3]||(t[3]=x=>this.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:t[4]||(t[4]=x=>this.editConfiguration.modalOpen=!0),onSelectPeers:t[5]||(t[5]=x=>this.selectPeers.modalOpen=!0),onBackupRestore:t[6]||(t[6]=x=>this.backupRestore.modalOpen=!0),onDeleteConfiguration:t[7]||(t[7]=x=>this.deleteConfiguration.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),y(gi,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:nt(()=>[(S(!0),C(ct,null,Ot(this.searchPeers,x=>(S(),C("div",{class:"col-12 col-lg-6 col-xl-4",key:x.id},[y(d,{Peer:x,onShare:M=>{this.peerShare.selectedPeer=x.id,this.peerShare.modalOpen=!0},onRefresh:t[8]||(t[8]=M=>this.getPeers()),onJobs:M=>{n.peerScheduleJobs.modalOpen=!0,n.peerScheduleJobs.selectedPeer=this.configurationPeers.find(P=>P.id===x.id)},onSetting:M=>{n.peerSetting.modalOpen=!0,n.peerSetting.selectedPeer=this.configurationPeers.find(P=>P.id===x.id)},onQrcode:t[9]||(t[9]=M=>{this.peerQRCode.peerConfigData=M,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),y(gt,{name:"zoom"},{default:nt(()=>[this.peerSetting.modalOpen?(S(),j(u,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:t[10]||(t[10]=x=>this.getPeers()),onClose:t[11]||(t[11]=x=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[n.peerQRCode.modalOpen?(S(),j(f,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:t[12]||(t[12]=x=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[this.peerScheduleJobs.modalOpen?(S(),j(g,{key:0,onRefresh:t[13]||(t[13]=x=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:t[14]||(t[14]=x=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[this.peerScheduleJobsAll.modalOpen?(S(),j(p,{key:0,onRefresh:t[15]||(t[15]=x=>this.getPeers()),onClose:t[16]||(t[16]=x=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[this.peerScheduleJobsLogs.modalOpen?(S(),j(m,{key:0,onClose:t[17]||(t[17]=x=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[this.peerShare.modalOpen?(S(),j(b,{key:0,onClose:t[18]||(t[18]=x=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(x=>x.id===this.peerShare.selectedPeer)},null,8,["peer"])):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[this.editConfiguration.modalOpen?(S(),j(_,{key:0,onClose:t[19]||(t[19]=x=>this.editConfiguration.modalOpen=!1),onDataChanged:t[20]||(t[20]=x=>this.configurationInfo=x),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[this.selectPeers.modalOpen?(S(),j(w,{key:0,onRefresh:t[21]||(t[21]=x=>this.getPeers()),configurationPeers:this.configurationPeers,onClose:t[22]||(t[22]=x=>this.selectPeers.modalOpen=!1)},null,8,["configurationPeers"])):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[n.deleteConfiguration.modalOpen?(S(),j(k,{key:0,onBackup:t[23]||(t[23]=x=>n.backupRestore.modalOpen=!0),onClose:t[24]||(t[24]=x=>n.deleteConfiguration.modalOpen=!1)})):T("",!0)]),_:1}),y(gt,{name:"zoom"},{default:nt(()=>[n.backupRestore.modalOpen?(S(),j(v,{key:0,onClose:t[25]||(t[25]=x=>n.backupRestore.modalOpen=!1),onRefreshPeersList:t[26]||(t[26]=x=>this.getPeers())})):T("",!0)]),_:1})]))}const J0=pt(Cx,[["render",F0],["__scopeId","data-v-7a0360ac"]]);export{J0 as default}; diff --git a/src/static/app/dist/assets/ping.css b/src/static/app/dist/assets/ping.css new file mode 100644 index 0000000..89e427e --- /dev/null +++ b/src/static/app/dist/assets/ping.css @@ -0,0 +1 @@ +.pingPlaceholder[data-v-a08ce97e]{width:100%;height:79.98px}.ping-move[data-v-a08ce97e],.ping-enter-active[data-v-a08ce97e],.ping-leave-active[data-v-a08ce97e]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-a08ce97e]{position:absolute;width:100%}.ping-enter-from[data-v-a08ce97e],.ping-leave-to[data-v-a08ce97e]{opacity:0;filter:blur(3px)} diff --git a/src/static/app/dist/assets/ping.js b/src/static/app/dist/assets/ping.js new file mode 100644 index 0000000..04c7d49 --- /dev/null +++ b/src/static/app/dist/assets/ping.js @@ -0,0 +1 @@ +import{_ as R,D as k,f as b,c as l,a as e,b as d,k as u,x as _,F as c,r as p,j as m,p as I,t as i,w as f,h as v,o as n,d as g,n as h,y as P,g as w,e as x}from"./index.js";import{L as C}from"./localeText.js";import{O as A}from"./osmap.js";const S={name:"ping",components:{OSMap:A,LocaleText:C},data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:k()}},mounted(){b("/api/ping/getAllPeersIpAddress",{},a=>{a.status&&(this.loading=!0,this.cips=a.data,console.log(this.cips))})},methods:{execute(){this.selectedIp&&(this.pinging=!0,this.pingResult=void 0,b("/api/ping/execute",{ipAddress:this.selectedIp,count:this.count},a=>{a.status?this.pingResult=a.data:this.store.newMessage("Server",a.message,"danger"),this.pinging=!1}))}},watch:{selectedConfiguration(){this.selectedPeer=void 0,this.selectedIp=void 0},selectedPeer(){this.selectedIp=void 0}}},M={class:"mt-md-5 mt-3 text-body"},T={class:"container"},V={class:"row"},$={class:"col-sm-4 d-flex gap-2 flex-column"},L={class:"mb-1 text-muted",for:"configuration"},N=["disabled"],O=["value"],B={class:"mb-1 text-muted",for:"peer"},D=["disabled"],U=["value"],z={class:"mb-1 text-muted",for:"ip"},E=["disabled"],F={class:"d-flex align-items-center gap-2"},G={class:"text-muted"},j={class:"mb-1 text-muted",for:"ipAddress"},H=["disabled"],Y={class:"mb-1 text-muted",for:"count"},q={class:"d-flex gap-3 align-items-center"},J=["disabled"],K=["disabled"],Q={key:0,class:"d-block"},W={key:1,class:"d-block"},X={class:"col-sm-8 position-relative"},Z={key:"pingPlaceholder"},ee={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},se={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},te={class:"card-body row"},ie={class:"col-sm"},ne={class:"mb-0 text-muted"},le={key:0,class:"col-sm"},de={class:"mb-0 text-muted"},oe={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},ae={class:"card-body"},re={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},ue={class:"card-body"},ce={class:"mb-0 text-muted"},pe={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},me={class:"card-body"},ge={class:"mb-0 text-muted"};function _e(a,s,he,be,fe,ve){const o=x("LocaleText"),y=x("OSMap");return n(),l("div",M,[e("div",T,[s[19]||(s[19]=e("h3",{class:"mb-3 text-body"},"Ping",-1)),e("div",V,[e("div",$,[e("div",null,[e("label",L,[e("small",null,[d(o,{t:"Configuration"})])]),u(e("select",{class:"form-select","onUpdate:modelValue":s[0]||(s[0]=t=>this.selectedConfiguration=t),disabled:this.pinging},[s[7]||(s[7]=e("option",{disabled:"",selected:"",value:void 0},null,-1)),(n(!0),l(c,null,p(this.cips,(t,r)=>(n(),l("option",{value:r},i(r),9,O))),256))],8,N),[[_,this.selectedConfiguration]])]),e("div",null,[e("label",B,[e("small",null,[d(o,{t:"Peer"})])]),u(e("select",{id:"peer",class:"form-select","onUpdate:modelValue":s[1]||(s[1]=t=>this.selectedPeer=t),disabled:this.selectedConfiguration===void 0||this.pinging},[s[8]||(s[8]=e("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedConfiguration!==void 0?(n(!0),l(c,{key:0},p(this.cips[this.selectedConfiguration],(t,r)=>(n(),l("option",{value:r},i(r),9,U))),256)):m("",!0)],8,D),[[_,this.selectedPeer]])]),e("div",null,[e("label",z,[e("small",null,[d(o,{t:"IP Address"})])]),u(e("select",{id:"ip",class:"form-select","onUpdate:modelValue":s[2]||(s[2]=t=>this.selectedIp=t),disabled:this.selectedPeer===void 0||this.pinging},[s[9]||(s[9]=e("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedPeer!==void 0?(n(!0),l(c,{key:0},p(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,t=>(n(),l("option",null,i(t),1))),256)):m("",!0)],8,E),[[_,this.selectedIp]])]),e("div",F,[s[10]||(s[10]=e("div",{class:"flex-grow-1 border-top"},null,-1)),e("small",G,[d(o,{t:"OR"})]),s[11]||(s[11]=e("div",{class:"flex-grow-1 border-top"},null,-1))]),e("div",null,[e("label",j,[e("small",null,[d(o,{t:"Enter IP Address / Hostname"})])]),u(e("input",{class:"form-control",type:"text",id:"ipAddress",disabled:this.pinging,"onUpdate:modelValue":s[3]||(s[3]=t=>this.selectedIp=t)},null,8,H),[[I,this.selectedIp]])]),s[16]||(s[16]=e("div",{class:"w-100 border-top my-2"},null,-1)),e("div",null,[e("label",Y,[e("small",null,[d(o,{t:"Count"})])]),e("div",q,[e("button",{onClick:s[4]||(s[4]=t=>this.count--),disabled:this.count===1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},s[12]||(s[12]=[e("i",{class:"bi bi-dash-lg"},null,-1)]),8,J),e("strong",null,i(this.count),1),e("button",{role:"button",onClick:s[5]||(s[5]=t=>this.count++),class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},s[13]||(s[13]=[e("i",{class:"bi bi-plus-lg"},null,-1)]))])]),e("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:!this.selectedIp||this.pinging,onClick:s[6]||(s[6]=t=>this.execute())},[d(v,{name:"slide"},{default:f(()=>[this.pinging?(n(),l("span",W,s[15]||(s[15]=[e("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),e("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(n(),l("span",Q,s[14]||(s[14]=[e("i",{class:"bi bi-person-walking me-2"},null,-1),g("Ping! ")])))]),_:1})],8,K)]),e("div",X,[d(v,{name:"ping"},{default:f(()=>[this.pingResult?(n(),l("div",ee,[this.pingResult.geo&&this.pingResult.geo.status==="success"?(n(),w(y,{key:0,d:this.pingResult},null,8,["d"])):m("",!0),e("div",se,[e("div",te,[e("div",ie,[e("p",ne,[e("small",null,[d(o,{t:"IP Address"})])]),g(" "+i(this.pingResult.address),1)]),this.pingResult.geo&&this.pingResult.geo.status==="success"?(n(),l("div",le,[e("p",de,[e("small",null,[d(o,{t:"Geolocation"})])]),g(" "+i(this.pingResult.geo.city)+", "+i(this.pingResult.geo.country),1)])):m("",!0)])]),e("div",oe,[e("div",ae,[s[18]||(s[18]=e("p",{class:"mb-0 text-muted"},[e("small",null,"Is Alive")],-1)),e("span",{class:h([this.pingResult.is_alive?"text-success":"text-danger"])},[e("i",{class:h(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),g(" "+i(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),e("div",re,[e("div",ue,[e("p",ce,[e("small",null,[d(o,{t:"Average / Min / Max Round Trip Time"})])]),e("samp",null,i(this.pingResult.avg_rtt)+"ms / "+i(this.pingResult.min_rtt)+"ms / "+i(this.pingResult.max_rtt)+"ms ",1)])]),e("div",pe,[e("div",me,[e("p",ge,[e("small",null,[d(o,{t:"Sent / Received / Lost Package"})])]),e("samp",null,i(this.pingResult.package_sent)+" / "+i(this.pingResult.package_received)+" / "+i(this.pingResult.package_loss),1)])])])):(n(),l("div",Z,[s[17]||(s[17]=e("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px"}},null,-1)),(n(),l(c,null,p(4,t=>e("div",{class:h(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:P({"animation-delay":`${t*.15}s`})},null,6)),64))]))]),_:1})])])])])}const ke=R(S,[["render",_e],["__scopeId","data-v-a08ce97e"]]);export{ke as default}; diff --git a/src/static/app/dist/assets/restoreConfiguration.css b/src/static/app/dist/assets/restoreConfiguration.css new file mode 100644 index 0000000..46bfcc8 --- /dev/null +++ b/src/static/app/dist/assets/restoreConfiguration.css @@ -0,0 +1 @@ +.dropdownIcon[data-v-626f1988]{transition:all .2s ease-in-out}.dropdownIcon.active[data-v-626f1988]{transform:rotate(180deg)}.steps{&[data-v-e5d78cfb]{transition:all .3s ease-in-out;opacity:.3}&.active[data-v-e5d78cfb]{opacity:1}} diff --git a/src/static/app/dist/assets/restoreConfiguration.js b/src/static/app/dist/assets/restoreConfiguration.js new file mode 100644 index 0000000..f4e8e40 --- /dev/null +++ b/src/static/app/dist/assets/restoreConfiguration.js @@ -0,0 +1,4 @@ +import{_ as R,q as x,A as B,o as l,c as r,a as e,t as _,b as n,n as v,F as V,r as O,B as j,g as m,j as C,C as M,W as Y,s as h,E as W,D as F,k as b,p as g,d as $,H as G,m as z,f as H,w as S,h as Z,e as J}from"./index.js";import{L as o}from"./localeText.js";import{d as Q}from"./dayjs.min.js";import{p as K}from"./index3.js";const X={class:"card rounded-3 shadow-sm"},ee={class:"d-flex gap-3 align-items-center"},te={class:"mb-0"},se={class:"text-muted"},oe={key:0,class:"card-footer p-3 d-flex flex-column gap-2"},ne=["onClick","id"],le={class:"card-body d-flex p-3 gap-3 align-items-center"},ie={__name:"backupGroup",props:{configurationName:String,backups:Array,open:!1,selectedConfigurationBackup:Object},emits:["select"],setup(f,{emit:u}){const t=f,k=u,p=x(t.open);return B(()=>{t.selectedConfigurationBackup&&document.querySelector(`#${t.selectedConfigurationBackup.filename.replace(".conf","")}`).scrollIntoView({behavior:"smooth"})}),(P,i)=>(l(),r("div",X,[e("a",{role:"button",class:"card-body d-flex align-items-center text-decoration-none",onClick:i[0]||(i[0]=c=>p.value=!p.value)},[e("div",ee,[e("h6",te,[e("samp",null,_(f.configurationName),1)]),e("small",se,[n(o,{t:f.backups.length+(f.backups.length>1?" Backups":" Backup")},null,8,["t"])])]),e("h5",{class:v(["ms-auto mb-0 dropdownIcon text-muted",{active:p.value}])},i[1]||(i[1]=[e("i",{class:"bi bi-chevron-down"},null,-1)]),2)]),p.value?(l(),r("div",oe,[(l(!0),r(V,null,O(f.backups,c=>(l(),r("div",{class:"card rounded-3 shadow-sm animate__animated",key:c.filename,onClick:()=>{k("select",c)},id:c.filename.replace(".conf",""),role:"button"},[e("div",le,[e("small",null,[i[2]||(i[2]=e("i",{class:"bi bi-file-earmark me-2"},null,-1)),e("samp",null,_(c.filename),1)]),e("small",null,[i[3]||(i[3]=e("i",{class:"bi bi-clock-history me-2"},null,-1)),e("samp",null,_(j(Q)(c.backupDate).format("YYYY-MM-DD HH:mm:ss")),1)]),e("small",null,[i[4]||(i[4]=e("i",{class:"bi bi-database me-2"},null,-1)),c.database?(l(),m(o,{key:0,t:"Yes"})):(l(),m(o,{key:1,t:"No"}))]),i[5]||(i[5]=e("small",{class:"text-muted ms-auto"},[e("i",{class:"bi bi-chevron-right"})],-1))])],8,ne))),128))])):C("",!0)]))}},ae=R(ie,[["__scopeId","data-v-626f1988"]]),de={class:"d-flex flex-column gap-5",id:"confirmBackup"},re={class:"d-flex flex-column gap-3"},ue={class:"d-flex flex-column flex-sm-row align-items-start align-items-sm-center gap-3"},ce={class:"mb-0"},me={class:"text-muted mb-1",for:"ConfigurationName"},fe={class:"invalid-feedback"},pe={key:0},ve={key:1},be={class:"mb-0"},ge={class:"row g-3"},_e={class:"col-sm"},ke={class:"text-muted mb-1",for:"PrivateKey"},ye={class:"input-group"},he={class:"col-sm"},xe={class:"text-muted mb-1",for:"PublicKey"},Ce={class:"text-muted mb-1",for:"ListenPort"},Pe={class:"invalid-feedback"},we={key:0},$e={key:1},Be={class:"mb-0"},Ne={class:"text-muted mb-1 d-flex",for:"ListenPort"},De={class:"invalid-feedback"},Ae={key:0},Le={key:1},Ue={class:"accordion",id:"newConfigurationOptionalAccordion"},Ie={class:"accordion-item"},Se={class:"accordion-header"},Ke={class:"accordion-button collapsed rounded-3",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},Re={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Ve={class:"accordion-body d-flex flex-column gap-3"},Oe={class:"text-muted mb-1",for:"PreUp"},Te={class:"text-muted mb-1",for:"PreDown"},qe={class:"text-muted mb-1",for:"PostUp"},Ee={class:"text-muted mb-1",for:"PostDown"},je={class:"d-flex flex-column gap-3"},Me={class:"d-flex flex-column flex-sm-row align-items-start align-items-sm-center gap-3"},Ye={class:"mb-0"},We={key:0},Fe={class:"row g-3"},Ge={class:"col-sm"},ze={class:"card text-bg-success rounded-3"},He={class:"card-body"},Ze={class:"col-sm"},Je={class:"card text-bg-warning rounded-3"},Qe={class:"card-body"},Xe={class:"d-flex"},et=["disabled"],tt={__name:"confirmBackup",props:{selectedConfigurationBackup:Object},setup(f){const u=f,t=M({ConfigurationName:u.selectedConfigurationBackup.filename.split("_")[0],Backup:u.selectedConfigurationBackup.filename}),k=u.selectedConfigurationBackup.content.split(` +`);for(let a of k){if(a==="[Peer]")break;if(a.length>0){let s=a.replace(" = ","=").split("=");s[0]==="ListenPort"?t[s[0]]=parseInt(s[1]):t[s[0]]=s[1]}}const p=x(!1),P=x(!1),i=x(""),c=Y(),y=h(()=>/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t.ConfigurationName)&&t.ConfigurationName.length>0&&!c.Configurations.find(a=>a.Name===t.ConfigurationName)),w=h(()=>{try{wireguard.generatePublicKey(t.PrivateKey)}catch{return!1}return!0}),N=h(()=>t.ListenPort>0&&t.ListenPort<=65353&&Number.isInteger(t.ListenPort)&&!c.Configurations.find(a=>parseInt(a.ListenPort)===t.ListenPort)),D=h(()=>{try{return K(t.Address),!0}catch{return!1}}),A=h(()=>D.value&&N.value&&w.value&&y.value);B(()=>{document.querySelector("main").scrollTo({top:0,behavior:"smooth"}),W(()=>w,a=>{a&&(t.PublicKey=wireguard.generatePublicKey(t.PrivateKey))},{immediate:!0})});const L=h(()=>{let a;try{a=K(t.Address)}catch{return 0}return a.end-a.start}),U=h(()=>u.selectedConfigurationBackup.database?u.selectedConfigurationBackup.databaseContent.split(` +`).filter(s=>s.search(`INSERT INTO "${t.ConfigurationName}"`)>=0).length:0),I=h(()=>u.selectedConfigurationBackup.database?u.selectedConfigurationBackup.databaseContent.split(` +`).filter(s=>s.search(`INSERT INTO "${t.ConfigurationName}_restrict_access"`)>=0).length:0),T=F(),q=G(),E=async()=>{A.value&&await z("/api/addWireguardConfiguration",t,async a=>{a.status&&(T.newMessage("Server","Configuration restored","success"),await c.getConfigurations(),await q.push(`/configuration/${t.ConfigurationName}/peers`))})};return(a,s)=>(l(),r("div",de,[e("form",re,[e("div",ue,[e("h4",ce,[n(o,{t:"Configuration"})])]),e("div",null,[e("label",me,[e("small",null,[n(o,{t:"Configuration Name"})])]),b(e("input",{type:"text",class:v(["form-control rounded-3",[y.value?"is-valid":"is-invalid"]]),placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":s[0]||(s[0]=d=>t.ConfigurationName=d),disabled:"",required:""},null,2),[[g,t.ConfigurationName]]),e("div",fe,[p.value?(l(),r("div",pe,_(i.value),1)):(l(),r("div",ve,[n(o,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",be,[e("li",null,[n(o,{t:"Configuration name already exist."})]),e("li",null,[n(o,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])]),e("div",ge,[e("div",_e,[e("div",null,[e("label",ke,[e("small",null,[n(o,{t:"Private Key"})])]),e("div",ye,[b(e("input",{type:"text",class:v(["form-control rounded-start-3",[w.value?"is-valid":"is-invalid"]]),id:"PrivateKey",required:"","onUpdate:modelValue":s[1]||(s[1]=d=>t.PrivateKey=d),disabled:""},null,2),[[g,t.PrivateKey]])])])]),e("div",he,[e("div",null,[e("label",xe,[e("small",null,[n(o,{t:"Public Key"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PublicKey","onUpdate:modelValue":s[2]||(s[2]=d=>t.PublicKey=d),disabled:""},null,512),[[g,t.PublicKey]])])])]),e("div",null,[e("label",Ce,[e("small",null,[n(o,{t:"Listen Port"})])]),b(e("input",{type:"number",class:v(["form-control rounded-3",[N.value?"is-valid":"is-invalid"]]),placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":s[3]||(s[3]=d=>t.ListenPort=d),disabled:"",required:""},null,2),[[g,t.ListenPort]]),e("div",Pe,[p.value?(l(),r("div",we,_(i.value),1)):(l(),r("div",$e,[n(o,{t:"Listen Port is invalid. Possible reasons:"}),e("ul",Be,[e("li",null,[n(o,{t:"Invalid port."})]),e("li",null,[n(o,{t:"Port is assigned to existing WireGuard Configuration."})])])]))])]),e("div",null,[e("label",Ne,[e("small",null,[n(o,{t:"IP Address/CIDR"})]),e("small",{class:v(["ms-auto",[L.value>0?"text-success":"text-danger"]])},[n(o,{t:L.value+" Available IP Address"},null,8,["t"])],2)]),b(e("input",{type:"text",class:v(["form-control",[D.value?"is-valid":"is-invalid"]]),placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":s[4]||(s[4]=d=>t.Address=d),disabled:"",required:""},null,2),[[g,t.Address]]),e("div",De,[p.value?(l(),r("div",Ae,_(i.value),1)):(l(),r("div",Le,[n(o,{t:"IP Address/CIDR is invalid"})]))])]),e("div",Ue,[e("div",Ie,[e("h2",Se,[e("button",Ke,[n(o,{t:"Optional Settings"})])]),e("div",Re,[e("div",Ve,[e("div",null,[e("label",Oe,[e("small",null,[n(o,{t:"PreUp"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PreUp",disabled:"","onUpdate:modelValue":s[5]||(s[5]=d=>t.PreUp=d)},null,512),[[g,t.PreUp]])]),e("div",null,[e("label",Te,[e("small",null,[n(o,{t:"PreDown"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PreDown",disabled:"","onUpdate:modelValue":s[6]||(s[6]=d=>t.PreDown=d)},null,512),[[g,t.PreDown]])]),e("div",null,[e("label",qe,[e("small",null,[n(o,{t:"PostUp"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PostUp",disabled:"","onUpdate:modelValue":s[7]||(s[7]=d=>t.PostUp=d)},null,512),[[g,t.PostUp]])]),e("div",null,[e("label",Ee,[e("small",null,[n(o,{t:"PostDown"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PostDown",disabled:"","onUpdate:modelValue":s[8]||(s[8]=d=>t.PostDown=d)},null,512),[[g,t.PostDown]])])])])])])]),e("div",je,[e("div",Me,[e("h4",Ye,[n(o,{t:"Database File"})]),e("h4",{class:v(["mb-0 ms-auto",[f.selectedConfigurationBackup.database?"text-success":"text-danger"]])},[e("i",{class:v(["bi",[f.selectedConfigurationBackup.database?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2)],2)]),f.selectedConfigurationBackup.database?(l(),r("div",We,[e("div",Fe,[e("div",Ge,[e("div",ze,[e("div",He,[s[10]||(s[10]=e("i",{class:"bi bi-person-fill me-2"},null,-1)),n(o,{t:"Contain"}),s[11]||(s[11]=$()),e("strong",null,_(U.value),1),s[12]||(s[12]=$()),U.value>1?(l(),m(o,{key:0,t:"Peer"})):(l(),m(o,{key:1,t:"Peer"}))])])]),e("div",Ze,[e("div",Je,[e("div",Qe,[s[13]||(s[13]=e("i",{class:"bi bi-person-fill-lock me-2"},null,-1)),n(o,{t:"Contain"}),s[14]||(s[14]=$()),e("strong",null,_(I.value),1),s[15]||(s[15]=$()),I.value>1?(l(),m(o,{key:0,t:"Restricted Peers"})):(l(),m(o,{key:1,t:"Restricted Peers"}))])])])])])):C("",!0)]),e("div",Xe,[e("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!A.value||P.value,onClick:s[9]||(s[9]=d=>E())},[s[16]||(s[16]=e("i",{class:"bi bi-clock-history me-2"},null,-1)),n(o,{t:P.value?"Restoring...":"Restore"},null,8,["t"])],8,et)])]))}},st={class:"mt-5 text-body"},ot={class:"container mb-4"},nt={class:"mb-5 d-flex align-items-center gap-4"},lt={class:"mb-0"},it={key:0},at={class:"d-flex text-decoration-none text-body flex-grow-1 align-items-center gap-3"},dt={class:"mb-0"},rt={class:"text-muted"},ut={key:0,class:"ms-sm-auto"},ct={class:"text-muted"},mt={key:0,id:"step1Detail"},ft={class:"mb-4"},pt={class:"d-flex gap-3 flex-column"},vt={key:0},bt={class:"card rounded-3"},gt={class:"card-body"},_t={class:"mb-0"},kt={class:"my-5",key:"step2",id:"step2"},yt={class:"text-muted"},ht={__name:"restoreConfiguration",setup(f){const u=x(void 0);B(()=>{H("/api/getAllWireguardConfigurationBackup",{},P=>{u.value=P.data})});const t=x(!1),k=x(void 0),p=x("");return(P,i)=>{const c=J("RouterLink");return l(),r("div",st,[e("div",ot,[e("div",nt,[n(c,{to:"/",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:S(()=>i[1]||(i[1]=[e("h2",{class:"mb-0",style:{"line-height":"0"}},[e("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1}),e("h2",lt,[n(o,{t:"Restore Configuration"})])]),u.value?(l(),r("div",it,[e("div",{class:v(["d-flex mb-5 align-items-center steps",{active:!t.value}]),role:"button",onClick:i[0]||(i[0]=y=>t.value=!1),key:"step1"},[e("div",at,[i[2]||(i[2]=e("h1",{class:"mb-0",style:{"line-height":"0"}},[e("i",{class:"bi bi-1-circle-fill"})],-1)),e("div",null,[e("h4",dt,[n(o,{t:"Step 1"})]),e("small",rt,[t.value?(l(),m(o,{key:1,t:"Click to change a backup"})):(l(),m(o,{key:0,t:"Select a backup you want to restore"}))])])]),n(Z,{name:"zoomReversed"},{default:S(()=>[t.value?(l(),r("div",ut,[e("small",ct,[n(o,{t:"Selected Backup"})]),e("h6",null,[e("samp",null,_(k.value.filename),1)])])):C("",!0)]),_:1})],2),t.value?C("",!0):(l(),r("div",mt,[e("div",ft,[e("div",pt,[(l(!0),r(V,null,O(Object.keys(u.value.NonExistingConfigurations),y=>(l(),m(ae,{onSelect:w=>{k.value=w,p.value=y,t.value=!0},selectedConfigurationBackup:k.value,open:p.value===y,"configuration-name":y,backups:u.value.NonExistingConfigurations[y]},null,8,["onSelect","selectedConfigurationBackup","open","configuration-name","backups"]))),256)),Object.keys(u.value.NonExistingConfigurations).length===0?(l(),r("div",vt,[e("div",bt,[e("div",gt,[e("p",_t,[n(o,{t:"You don't have any configuration to restore"})])])])])):C("",!0)])])])),e("div",kt,[e("div",{class:v(["steps d-flex text-decoration-none text-body flex-grow-1 align-items-center gap-3",{active:t.value}])},[i[4]||(i[4]=e("h1",{class:"mb-0",style:{"line-height":"0"}},[e("i",{class:"bi bi-2-circle-fill"})],-1)),e("div",null,[i[3]||(i[3]=e("h4",{class:"mb-0"},"Step 2",-1)),e("small",yt,[t.value?(l(),m(o,{key:1,t:"Confirm & edit restore information"})):(l(),m(o,{key:0,t:"Backup not selected"}))])])],2)]),t.value?(l(),m(tt,{selectedConfigurationBackup:k.value,key:"confirm"},null,8,["selectedConfigurationBackup"])):C("",!0)])):C("",!0)])])}}},$t=R(ht,[["__scopeId","data-v-e5d78cfb"]]);export{$t as default}; diff --git a/src/static/app/dist/assets/settings.css b/src/static/app/dist/assets/settings.css new file mode 100644 index 0000000..dae571d --- /dev/null +++ b/src/static/app/dist/assets/settings.css @@ -0,0 +1 @@ +@media screen and (max-width: 992px){.apiKey-card-body{&[data-v-a76253c8]{flex-direction:column!important;align-items:start!important}div.ms-auto[data-v-a76253c8]{margin-left:0!important}div[data-v-a76253c8]{width:100%;align-items:start!important}small[data-v-a76253c8]{margin-right:auto}}}.apiKey-move[data-v-100ee9f9],.apiKey-enter-active[data-v-100ee9f9],.apiKey-leave-active[data-v-100ee9f9]{transition:all .5s ease}.apiKey-enter-from[data-v-100ee9f9],.apiKey-leave-to[data-v-100ee9f9]{opacity:0;transform:translateY(30px) scale(.9)}.apiKey-leave-active[data-v-100ee9f9]{position:absolute;width:100%}.dropdown-menu[data-v-0f26916d]{width:100%}.list-group{&[data-v-4aa2aed9]:first-child{border-top-left-radius:var(--bs-border-radius-lg);border-top-right-radius:var(--bs-border-radius-lg)}&[data-v-4aa2aed9]:last-child{border-bottom-left-radius:var(--bs-border-radius-lg);border-bottom-right-radius:var(--bs-border-radius-lg)}} diff --git a/src/static/app/dist/assets/settings.js b/src/static/app/dist/assets/settings.js new file mode 100644 index 0000000..f52e09d --- /dev/null +++ b/src/static/app/dist/assets/settings.js @@ -0,0 +1 @@ +import{_,D as f,l as I,m as b,o,c as d,a as t,b as n,k as w,p as x,n as g,t as y,j as m,e as l,W as F,d as D,v as V,g as v,F as P,f as L,w as T,r as S,T as H,h as M,q as j,s as B}from"./index.js";import{L as $}from"./localeText.js";import{d as C}from"./dayjs.min.js";import{V as R}from"./vue-datepicker.js";const z={components:{LocaleText:$},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const s=f(),e=`input_${I()}`;return{store:s,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Peers[this.targetData]},methods:{async useValidation(){this.changed&&await b("/api/updateDashboardConfigurationItem",{section:"Peers",key:this.targetData,value:this.value},s=>{s.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Peers[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=s.message),this.changed=!1,this.updating=!1})}}},O={class:"form-group mb-2"},q=["for"],Q=["id","disabled"],J={class:"invalid-feedback"},X={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"};function Z(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",O,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:this.title},null,8,["t"])])])],8,q),w(t("input",{type:"text",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=i=>this.value=i),onKeydown:e[1]||(e[1]=i=>this.changed=!0),onBlur:e[2]||(e[2]=i=>h.useValidation()),disabled:this.updating},null,42,Q),[[x,this.value]]),t("div",J,y(this.invalidFeedback),1),u.warning?(o(),d("div",X,[t("small",null,[e[3]||(e[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),n(a,{t:u.warningText},null,8,["t"])])])):m("",!0)])}const tt=_(z,[["render",Z]]),et=s=>{},st={name:"accountSettingsInputUsername",components:{LocaleText:$},props:{targetData:String,title:String},setup(){const s=f(),e=`input_${I()}`;return{store:s,uuid:e}},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(s){this.changed&&(this.updating=!0,await b("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},e=>{e.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=e.message),this.changed=!1,this.updating=!1}))}}},at={class:"form-group mb-2"},it=["for"],ot=["id","disabled"],nt={class:"invalid-feedback"};function dt(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",at,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:this.title},null,8,["t"])])])],8,it),w(t("input",{type:"text",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=i=>this.value=i),onKeydown:e[1]||(e[1]=i=>this.changed=!0),onBlur:e[2]||(e[2]=i=>h.useValidation()),disabled:this.updating},null,42,ot),[[x,this.value]]),t("div",nt,y(this.invalidFeedback),1)])}const rt=_(st,[["render",dt]]),lt={name:"accountSettingsInputPassword",components:{LocaleText:$},props:{targetData:String,warning:!1,warningText:""},setup(){const s=f(),e=`input_${I()}`;return{store:s,uuid:e}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(s=>s.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await b("/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,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=s.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(s=>s.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},ut={class:"d-flex flex-column gap-2"},ct={class:"row g-2"},ht={class:"col-sm"},pt={class:"form-group"},mt=["for"],gt=["id"],bt={key:0,class:"invalid-feedback d-block"},_t={class:"col-sm"},ft={class:"form-group"},vt=["for"],wt=["id"],yt={class:"col-sm"},$t={class:"form-group"},kt=["for"],xt=["id"],Dt=["disabled"];function It(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("form",ut,[t("div",ct,[t("div",ht,[t("div",pt,[t("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:"Current Password"})])])],8,mt),w(t("input",{type:"password",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),autocomplete:"current-password","onUpdate:modelValue":e[0]||(e[0]=i=>this.value.currentPassword=i),id:"currentPassword_"+this.uuid},null,10,gt),[[x,this.value.currentPassword]]),r.showInvalidFeedback?(o(),d("div",bt,y(this.invalidFeedback),1)):m("",!0)])]),t("div",_t,[t("div",ft,[t("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:"New Password"})])])],8,vt),w(t("input",{type:"password",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),autocomplete:"new-password","onUpdate:modelValue":e[1]||(e[1]=i=>this.value.newPassword=i),id:"newPassword_"+this.uuid},null,10,wt),[[x,this.value.newPassword]])])]),t("div",yt,[t("div",$t,[t("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:"Repeat New Password"})])])],8,kt),w(t("input",{type:"password",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),autocomplete:"new-password","onUpdate:modelValue":e[2]||(e[2]=i=>this.value.repeatNewPassword=i),id:"repeatNewPassword_"+this.uuid},null,10,xt),[[x,this.value.repeatNewPassword]])])])]),t("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:e[3]||(e[3]=i=>this.useValidation())},[e[4]||(e[4]=t("i",{class:"bi bi-save2-fill me-2"},null,-1)),n(a,{t:"Update Password"})],8,Dt)])}const Pt=_(lt,[["render",It]]),At={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:$},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const s=f(),e=F(),u=`input_${I()}`;return{store:s,uuid:u,WireguardConfigurationStore:e}},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 b("/api/updateDashboardConfigurationItem",{section:"Server",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.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=s.message),this.changed=!1,this.updating=!1}))}}},Ct={class:"card"},St={class:"card-header"},Kt={class:"my-2"},Tt={class:"card-body"},Vt={class:"form-group"},Ft=["for"],Lt={class:"d-flex gap-2 align-items-start"},Mt={class:"flex-grow-1"},Wt=["id","disabled"],Nt={class:"invalid-feedback fw-bold"},Ut=["disabled"],Et={key:0,class:"bi bi-save2-fill"},Yt={key:1,class:"spinner-border spinner-border-sm"},Gt={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 Ht(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",Ct,[t("div",St,[t("h6",Kt,[n(a,{t:"Path"})])]),t("div",Tt,[t("div",Vt,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:this.title},null,8,["t"])])])],8,Ft),t("div",Lt,[t("div",Mt,[w(t("input",{type:"text",class:g(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=i=>this.value=i),onKeydown:e[1]||(e[1]=i=>this.changed=!0),disabled:this.updating},null,42,Wt),[[x,this.value]]),t("div",Nt,y(this.invalidFeedback),1)]),t("button",{onClick:e[2]||(e[2]=i=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(o(),d("span",Yt)):(o(),d("i",Et))],8,Ut)]),u.warning?(o(),d("div",Gt,[t("small",null,[e[3]||(e[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),n(a,{t:u.warningText},null,8,["t"])])])):m("",!0)])])])}const jt=_(At,[["render",Ht]]),Bt={name:"dashboardTheme",components:{LocaleText:$},setup(){return{dashboardConfigurationStore:f()}},methods:{async switchTheme(s){await b("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:s},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=s)})}}},Rt={class:"text-muted mb-1 d-block"},zt={class:"d-flex gap-1"};function Ot(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",null,[t("small",Rt,[t("strong",null,[n(a,{t:"Theme"})])]),t("div",zt,[t("button",{class:g(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=i=>this.switchTheme("light"))},[e[2]||(e[2]=t("i",{class:"bi bi-sun-fill me-2"},null,-1)),n(a,{t:"Light"})],2),t("button",{class:g(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=i=>this.switchTheme("dark"))},[e[3]||(e[3]=t("i",{class:"bi bi-moon-fill me-2"},null,-1)),n(a,{t:"Dark"})],2)])])}const qt=_(Bt,[["render",Ot]]),Qt={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const s=f(),e=`input_${I()}`;return{store:s,uuid:e}},data(){return{app_ip:"",app_port:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.app_ip=this.store.Configuration.Server.app_ip,this.app_port=this.store.Configuration.Server.app_port},methods:{async useValidation(){this.changed&&await b("/api/updateDashboardConfigurationItem",{section:"Server",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)})}}},Jt={class:"invalid-feedback d-block mt-0"},Xt={class:"row"},Zt={class:"form-group mb-2 col-sm"},te=["for"],ee=["id"],se={class:"form-group col-sm"},ae=["for"],ie=["id"];function oe(s,e,u,c,r,h){return o(),d("div",null,[t("div",Jt,y(this.invalidFeedback),1),t("div",Xt,[t("div",Zt,[t("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},e[2]||(e[2]=[t("strong",null,[t("small",null,"Dashboard IP Address")],-1)]),8,te),w(t("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.app_ip=a)},null,8,ee),[[x,this.app_ip]]),e[3]||(e[3]=t("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[t("small",null,[t("i",{class:"bi bi-exclamation-triangle-fill me-2"}),t("code",null,"0.0.0.0"),D(" means it can be access by anyone with your server IP Address.")])],-1))]),t("div",se,[t("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},e[4]||(e[4]=[t("strong",null,[t("small",null,"Dashboard Port")],-1)]),8,ae),w(t("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=a=>this.app_port=a)},null,8,ie),[[x,this.app_port]])])]),e[5]||(e[5]=t("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[t("i",{class:"bi bi-floppy-fill me-2"}),D("Update Dashboard Settings & Restart ")],-1))])}const ne=_(Qt,[["render",oe]]),de={name:"newDashboardAPIKey",components:{LocaleText:$,VueDatePicker:R},data(){return{newKeyData:{ExpiredAt:C().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:f()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,b("/api/newDashboardAPIKey",this.newKeyData,s=>{s.status?(this.$emit("created",s.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",s.message,"danger"),this.submitting=!1})},fixDate(s){return console.log(C(s).format("YYYY-MM-DDTHH:mm:ss")),C(s).format("YYYY-MM-DDTHH:mm:ss")},parseTime(s){s?this.newKeyData.ExpiredAt=C(s).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},re={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)"}},le={class:"card m-auto rounded-3 mt-5"},ue={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},ce={class:"mb-0"},he={class:"card-body d-flex gap-2 p-4 flex-column"},pe={class:"text-muted"},me={class:"d-flex align-items-center gap-2"},ge={class:"form-check"},be=["disabled"],_e={class:"form-check-label",for:"neverExpire"},fe={key:0,class:"bi bi-check-lg me-2"};function ve(s,e,u,c,r,h){const a=l("LocaleText"),i=l("VueDatePicker");return o(),d("div",re,[t("div",le,[t("div",ue,[t("h6",ce,[n(a,{t:"Create API Key"})]),t("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=k=>this.$emit("close"))})]),t("div",he,[t("small",pe,[n(a,{t:"When should this API Key expire?"})]),t("div",me,[n(i,{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"])]),t("div",ge,[w(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=k=>this.newKeyData.neverExpire=k),id:"neverExpire",disabled:this.submitting},null,8,be),[[V,this.newKeyData.neverExpire]]),t("label",_e,[n(a,{t:"Never Expire"}),e[3]||(e[3]=D(" (")),e[4]||(e[4]=t("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),n(a,{t:"Don't think that's a good idea"}),e[5]||(e[5]=D(") "))])]),t("button",{class:g(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:e[2]||(e[2]=k=>this.submitNewAPIKey())},[this.submitting?m("",!0):(o(),d("i",fe)),this.submitting?(o(),v(a,{key:1,t:"Creating..."})):(o(),v(a,{key:2,t:"Create"}))],2)])])])}const we=_(de,[["render",ve]]),ye={name:"dashboardAPIKey",components:{LocaleText:$},props:{apiKey:Object},setup(){return{store:f()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){b("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},s=>{s.status?(this.$emit("deleted",s.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",s.message,"danger")})}}},$e={class:"card rounded-3 shadow-sm"},ke={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},xe={class:"d-flex align-items-center gap-2"},De={class:"text-muted"},Ie={style:{"word-break":"break-all"}},Pe={class:"d-flex align-items-center gap-2 ms-auto"},Ae={class:"text-muted"},Ce={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function Se(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",$e,[this.confirmDelete?(o(),d(P,{key:1},[this.store.getActiveCrossServer()?m("",!0):(o(),d("div",Ce,[n(a,{t:"Are you sure to delete this API key?"}),t("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:e[1]||(e[1]=i=>this.deleteAPIKey())},e[4]||(e[4]=[t("i",{class:"bi bi-check-lg"},null,-1)])),t("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:e[2]||(e[2]=i=>this.confirmDelete=!1)},e[5]||(e[5]=[t("i",{class:"bi bi-x-lg"},null,-1)]))]))],64)):(o(),d("div",ke,[t("div",xe,[t("small",De,[n(a,{t:"Key"})]),t("span",Ie,y(this.apiKey.Key),1)]),t("div",Pe,[t("small",Ae,[n(a,{t:"Expire At"})]),this.apiKey.ExpiredAt?m("",!0):(o(),v(a,{key:0,t:"Never Expire"})),t("span",null,y(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?m("",!0):(o(),d("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=i=>this.confirmDelete=!0)},e[3]||(e[3]=[t("i",{class:"bi bi-trash-fill"},null,-1)])))]))])}const Ke=_(ye,[["render",Se],["__scopeId","data-v-a76253c8"]]),Te={name:"dashboardAPIKeys",components:{LocaleText:$,DashboardAPIKey:Ke,NewDashboardAPIKey:we},setup(){return{store:f()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await b("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},s=>{s.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(s){s?L("/api/getDashboardAPIKeys",{},e=>{e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},Ve={class:"card rounded-3"},Fe={class:"my-2"},Le={key:0,class:"form-check form-switch ms-auto"},Me={class:"form-check-label",for:"allowAPIKeysSwitch"},We={key:0,class:"card-body position-relative d-flex flex-column gap-2"},Ne={key:1,class:"card",style:{height:"300px"}},Ue={class:"card-body d-flex text-muted"},Ee={class:"m-auto"},Ye={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function Ge(s,e,u,c,r,h){const a=l("LocaleText"),i=l("DashboardAPIKey"),k=l("NewDashboardAPIKey");return o(),d("div",Ve,[t("div",{class:g(["card-header d-flex align-items-center",{"border-bottom-0 rounded-3":!this.value}])},[t("h6",Fe,[n(a,{t:"API Keys"})]),this.store.getActiveCrossServer()?m("",!0):(o(),d("div",Le,[w(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=p=>this.value=p),onChange:e[1]||(e[1]=p=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[V,this.value]]),t("label",Me,[this.value?(o(),v(a,{key:0,t:"Enabled"})):(o(),v(a,{key:1,t:"Disabled"}))])]))],2),this.value?(o(),d("div",We,[this.store.getActiveCrossServer()?m("",!0):(o(),d("button",{key:0,class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:e[2]||(e[2]=p=>this.newDashboardAPIKey=!0)},[e[6]||(e[6]=t("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),n(a,{t:"API Key"})])),this.apiKeys.length===0?(o(),d("div",Ne,[t("div",Ue,[t("span",Ee,[n(a,{t:"No WGDashboard API Key"})])])])):(o(),d("div",Ye,[n(H,{name:"apiKey"},{default:T(()=>[(o(!0),d(P,null,S(this.apiKeys,p=>(o(),v(i,{apiKey:p,key:p.Key,onDeleted:e[3]||(e[3]=A=>this.apiKeys=A)},null,8,["apiKey"]))),128))]),_:1})])),n(M,{name:"zoomReversed"},{default:T(()=>[this.newDashboardAPIKey?(o(),v(k,{key:0,onCreated:e[4]||(e[4]=p=>this.apiKeys=p),onClose:e[5]||(e[5]=p=>this.newDashboardAPIKey=!1)})):m("",!0)]),_:1})])):m("",!0)])}const He=_(Te,[["render",Ge],["__scopeId","data-v-100ee9f9"]]),je={name:"accountSettingsMFA",components:{LocaleText:$},setup(){const s=f(),e=`input_${I()}`;return{store:s,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await b("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async s=>{await b("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},Be={class:"d-flex align-items-center"},Re={class:"form-check form-switch"},ze={for:"allowMFAKeysSwitch"};function Oe(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",null,[t("div",Be,[t("div",Re,[w(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=i=>this.status=i),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[V,this.status]]),t("label",ze,[this.status?(o(),v(a,{key:0,t:"Enabled"})):(o(),v(a,{key:1,t:"Disabled"}))])]),this.status?(o(),d("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:e[1]||(e[1]=i=>this.resetMFA())},[e[2]||(e[2]=t("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(o(),v(a,{key:0,t:"Reset"})):(o(),v(a,{key:1,t:"Setup"})),e[3]||(e[3]=D(" MFA "))])):m("",!0)])])}const qe=_(je,[["render",Oe]]),Qe={name:"dashboardLanguage",components:{LocaleText:$},setup(){return{store:f()}},data(){return{languages:void 0}},mounted(){L("/api/locale/available",{},s=>{this.languages=s.data})},methods:{changeLanguage(s){b("/api/locale/update",{lang_id:s},e=>{e.status?(this.store.Configuration.Server.dashboard_language=s,this.store.Locale=e.data):this.store.newMessage("Server","WGDashboard language update failed","danger")})}},computed:{currentLanguage(){let s=this.store.Configuration.Server.dashboard_language;return this.languages.find(e=>e.lang_id===s)}}},Je={class:"text-muted d-block mb-1"},Xe={class:"d-flex gap-2"},Ze={class:"dropdown w-100"},ts=["disabled"],es={key:1},ss={class:"dropdown-menu rounded-3 shadow"},as=["onClick"],is={class:"me-auto mb-0"},os={class:"d-block",style:{"font-size":"0.8rem"}},ns={key:0,class:"bi bi-check text-primary fs-5"};function ds(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",null,[t("small",Je,[t("strong",null,[n(a,{t:"Language"})])]),t("div",Xe,[t("div",Ze,[t("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?(o(),d("span",es,y(h.currentLanguage?.lang_name_localized),1)):(o(),v(a,{key:0,t:"Loading..."}))],8,ts),t("ul",ss,[(o(!0),d(P,null,S(this.languages,i=>(o(),d("li",null,[t("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:k=>this.changeLanguage(i.lang_id)},[t("p",is,[D(y(i.lang_name_localized)+" ",1),t("small",os,y(i.lang_name),1)]),h.currentLanguage?.lang_id===i.lang_id?(o(),d("i",ns)):m("",!0)],8,as)]))),256))])])])])}const rs=_(Qe,[["render",ds],["__scopeId","data-v-0f26916d"]]),ls={name:"dashboardIPPortInput",components:{LocaleText:$},setup(){return{store:f()}},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(s,e,u){this.changed&&(this.updating=!0,await b("/api/updateDashboardConfigurationItem",{section:"Server",key:e,value:u},c=>{c.status?(s.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[e]=u,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{s.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=c.message),this.changed=!1,this.updating=!1}))}}},us={class:"row g-2"},cs={class:"col-sm"},hs={class:"form-group"},ps={for:"input_dashboard_ip",class:"text-muted mb-1"},ms=["disabled"],gs={class:"invalid-feedback"},bs={class:"col-sm"},_s={class:"form-group"},fs={for:"input_dashboard_ip",class:"text-muted mb-1"},vs=["disabled"],ws={class:"invalid-feedback"},ys={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 $s(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",null,[t("div",us,[t("div",cs,[t("div",hs,[t("label",ps,[t("strong",null,[t("small",null,[n(a,{t:"IP Address / Hostname"})])])]),w(t("input",{type:"text",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[0]||(e[0]=i=>this.ipAddress=i),onKeydown:e[1]||(e[1]=i=>this.changed=!0),onBlur:e[2]||(e[2]=i=>h.useValidation(i,"app_ip",this.ipAddress)),disabled:this.updating},null,42,ms),[[x,this.ipAddress]]),t("div",gs,y(this.invalidFeedback),1)])]),t("div",bs,[t("div",_s,[t("label",fs,[t("strong",null,[t("small",null,[n(a,{t:"Listen Port"})])])]),w(t("input",{type:"number",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[3]||(e[3]=i=>this.port=i),onKeydown:e[4]||(e[4]=i=>this.changed=!0),onBlur:e[5]||(e[5]=i=>h.useValidation(i,"app_port",this.port)),disabled:this.updating},null,42,vs),[[x,this.port]]),t("div",ws,y(this.invalidFeedback),1)])])]),t("div",ys,[t("small",null,[e[6]||(e[6]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),n(a,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])}const ks=_(ls,[["render",$s]]),xs={class:"card rounded-3"},Ds={class:"card-header"},Is={class:"my-2"},Ps={class:"card-body d-flex gap-2"},As={class:"list-group w-100"},Cs=["onClick"],Ss={__name:"dashboardSettingsWireguardConfigurationAutostart",setup(s){const e=f(),u=F(),c=j(e.Configuration.WireGuardConfiguration.autostart),r=B(()=>u.Configurations.map(i=>i.Name)),h=async()=>{await b("/api/updateDashboardConfigurationItem",{section:"WireGuardConfiguration",key:"autostart",value:c.value},async i=>{i.status?(e.newMessage("Server","Start up configurations saved","success"),c.value=i.data):e.newMessage("Server","Start up configurations failed to save","danger")})},a=i=>{c.value.includes(i)?c.value=c.value.filter(k=>k!==i):c.value.push(i),h()};return(i,k)=>(o(),d("div",xs,[t("div",Ds,[t("h6",Is,[n($,{t:"Toggle When Start Up"})])]),t("div",Ps,[t("div",As,[(o(!0),d(P,null,S(r.value,p=>(o(),d("button",{type:"button",key:p,onClick:A=>a(p),class:"list-group-item list-group-item-action py-2 w-100 d-flex align-items-center"},[t("samp",null,y(p),1),t("i",{class:g(["ms-auto",[c.value.includes(p)?"bi-check-circle-fill":"bi-circle"]])},null,2)],8,Cs))),128))])])]))}},Ks=_(Ss,[["__scopeId","data-v-4aa2aed9"]]),Ts={name:"settings",methods:{ipV46RegexCheck:et},components:{DashboardSettingsWireguardConfigurationAutostart:Ks,DashboardIPPortInput:ks,DashboardLanguage:rs,LocaleText:$,AccountSettingsMFA:qe,DashboardAPIKeys:He,DashboardSettingsInputIPAddressAndPort:ne,DashboardTheme:qt,DashboardSettingsInputWireguardConfigurationPath:jt,AccountSettingsInputPassword:Pt,AccountSettingsInputUsername:rt,PeersDefaultSettingsInput:tt},setup(){return{dashboardConfigurationStore:f()}},data(){return{activeTab:"WGDashboard",tabs:[{id:"WGDashboard",title:"WGDashboard Settings"},{id:"Peers",title:"Peers Settings"},{id:"WireGuardConfiguration",title:"WireGuard Configuration Settings"}]}}},Vs={class:"mt-md-5 mt-3 text-body mb-3"},Fs={class:"container-md d-flex flex-column gap-4"},Ls={class:"nav nav-pills nav-justified align-items-center gap-2"},Ms={class:"nav-item"},Ws=["onClick"],Ns={class:"my-2"},Us={key:0,class:"d-flex gap-3 flex-column"},Es={key:1,class:"d-flex gap-3 flex-column"},Ys={class:"card rounded-3"},Gs={class:"card-header"},Hs={class:"my-2"},js={class:"card-body"},Bs={key:2,class:"d-flex gap-3 flex-column"},Rs={class:"card rounded-3"},zs={class:"card-header"},Os={class:"my-2"},qs={class:"card-body"},Qs={class:"row g-2"},Js={class:"col-sm"},Xs={class:"col-sm"},Zs={class:"card"},ta={class:"card-header"},ea={class:"my-2"},sa={class:"card-body"},aa={class:"card"},ia={class:"card-header"},oa={class:"my-2"},na={class:"card-body d-flex flex-column gap-3"},da={class:"card"},ra={class:"card-header"},la={class:"my-2"},ua={class:"card-body"};function ca(s,e,u,c,r,h){const a=l("LocaleText"),i=l("DashboardSettingsInputWireguardConfigurationPath"),k=l("DashboardSettingsWireguardConfigurationAutostart"),p=l("PeersDefaultSettingsInput"),A=l("DashboardTheme"),W=l("DashboardLanguage"),N=l("DashboardIPPortInput"),U=l("AccountSettingsInputUsername"),E=l("AccountSettingsInputPassword"),Y=l("AccountSettingsMFA"),G=l("DashboardAPIKeys");return o(),d("div",Vs,[t("div",Fs,[t("div",null,[t("ul",Ls,[(o(!0),d(P,null,S(this.tabs,K=>(o(),d("li",Ms,[t("a",{class:g(["nav-link rounded-3",{active:this.activeTab===K.id}]),onClick:ha=>this.activeTab=K.id,role:"button"},[t("h6",Ns,[n(a,{t:K.title},null,8,["t"])])],10,Ws)]))),256))]),e[1]||(e[1]=t("hr",null,null,-1)),t("div",null,[n(M,{name:"fade2",mode:"out-in"},{default:T(()=>[r.activeTab==="WireGuardConfiguration"?(o(),d("div",Us,[n(i,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"}),n(k)])):r.activeTab==="Peers"?(o(),d("div",Es,[t("div",Ys,[t("div",Gs,[t("h6",Hs,[n(a,{t:"Peer Default Settings"})])]),t("div",js,[t("div",null,[n(p,{targetData:"peer_global_dns",title:"DNS"}),n(p,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),n(p,{targetData:"peer_mtu",title:"MTU"}),n(p,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),n(p,{targetData:"remote_endpoint",title:"Peer Remote Endpoint",warning:!0,warningText:"This will be changed globally, and will be apply to all peer's QR code and configuration file."})])])])])):r.activeTab==="WGDashboard"?(o(),d("div",Bs,[t("div",Rs,[t("div",zs,[t("h6",Os,[n(a,{t:"Appearance"})])]),t("div",qs,[t("div",Qs,[t("div",Js,[n(A)]),t("div",Xs,[n(W)])])])]),t("div",Zs,[t("div",ta,[t("h6",ea,[n(a,{t:"Dashboard IP Address & Listen Port"})])]),t("div",sa,[n(N)])]),t("div",aa,[t("div",ia,[t("h6",oa,[n(a,{t:"Account Settings"})])]),t("div",na,[t("div",null,[n(U,{targetData:"username",title:"Username"})]),e[0]||(e[0]=t("hr",null,null,-1)),t("div",null,[n(E,{targetData:"password"})])])]),t("div",da,[t("div",ra,[t("h6",la,[n(a,{t:"Multi-Factor Authentication (MFA)"})])]),t("div",ua,[this.dashboardConfigurationStore.getActiveCrossServer()?m("",!0):(o(),v(Y,{key:0}))])]),n(G)])):m("",!0)]),_:1})])])])])}const _a=_(Ts,[["render",ca]]);export{_a as default}; diff --git a/src/static/app/dist/assets/setup.js b/src/static/app/dist/assets/setup.js new file mode 100644 index 0000000..6e2dee0 --- /dev/null +++ b/src/static/app/dist/assets/setup.js @@ -0,0 +1 @@ +import{_ as u,D as m,m as p,c as r,a as e,b as o,d as c,t as h,j as f,k as l,p as d,o as i,e as w}from"./index.js";import{L as g}from"./localeText.js";const b={name:"setup",components:{LocaleText:g},setup(){return{store:m()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!0},loading:!1,errorMessage:"",done:!1}},computed:{goodToSubmit(){return this.setup.username&&this.setup.newPassword.length>=8&&this.setup.repeatNewPassword.length>=8&&this.setup.newPassword===this.setup.repeatNewPassword}},methods:{submit(){this.loading=!0,p("/api/Welcome_Finish",this.setup,n=>{n.status?(this.done=!0,this.$router.push("/2FASetup")):(document.querySelectorAll("#createAccount input").forEach(s=>s.classList.add("is-invalid")),this.errorMessage=n.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},_=["data-bs-theme"],x={class:"m-auto text-body",style:{width:"500px"}},v={class:"dashboardLogo display-4"},y={class:"mb-5"},P={key:0,class:"alert alert-danger"},N={class:"d-flex flex-column gap-3"},k={id:"createAccount",class:"d-flex flex-column gap-2"},S={class:"form-group text-body"},T={for:"username",class:"mb-1 text-muted"},C={class:"form-group text-body"},L={for:"password",class:"mb-1 text-muted"},V={class:"form-group text-body"},$={for:"confirmPassword",class:"mb-1 text-muted"},q=["disabled"],A={key:0,class:"d-flex align-items-center w-100"},M={key:1,class:"d-flex align-items-center w-100"};function B(n,s,D,E,U,F){const t=w("LocaleText");return i(),r("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[e("div",x,[e("span",v,[o(t,{t:"Nice to meet you!"})]),e("p",y,[o(t,{t:"Please fill in the following fields to finish setup"}),s[4]||(s[4]=c(" 😊"))]),e("div",null,[e("h3",null,[o(t,{t:"Create an account"})]),this.errorMessage?(i(),r("div",P,h(this.errorMessage),1)):f("",!0),e("div",N,[e("form",k,[e("div",S,[e("label",T,[e("small",null,[o(t,{t:"Enter an username you like"})])]),l(e("input",{type:"text",autocomplete:"username","onUpdate:modelValue":s[0]||(s[0]=a=>this.setup.username=a),class:"form-control",id:"username",name:"username",required:""},null,512),[[d,this.setup.username]])]),e("div",C,[e("label",L,[e("small",null,[o(t,{t:"Enter a password"}),e("code",null,[o(t,{t:"(At least 8 characters and make sure is strong enough!)"})])])]),l(e("input",{type:"password",autocomplete:"new-password","onUpdate:modelValue":s[1]||(s[1]=a=>this.setup.newPassword=a),class:"form-control",id:"password",name:"password",required:""},null,512),[[d,this.setup.newPassword]])]),e("div",V,[e("label",$,[e("small",null,[o(t,{t:"Confirm password"})])]),l(e("input",{type:"password",autocomplete:"confirm-new-password","onUpdate:modelValue":s[2]||(s[2]=a=>this.setup.repeatNewPassword=a),class:"form-control",id:"confirmPassword",name:"confirmPassword",required:""},null,512),[[d,this.setup.repeatNewPassword]])])]),e("button",{class:"btn btn-dark btn-lg mb-5 d-flex btn-brand shadow align-items-center",ref:"signInBtn",disabled:!this.goodToSubmit||this.loading||this.done,onClick:s[3]||(s[3]=a=>this.submit())},[!this.loading&&!this.done?(i(),r("span",A,[o(t,{t:"Next"}),s[5]||(s[5]=e("i",{class:"bi bi-chevron-right ms-auto"},null,-1))])):(i(),r("span",M,[o(t,{t:"Saving..."}),s[6]||(s[6]=e("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[e("span",{class:"visually-hidden"},"Loading...")],-1))]))],8,q)])])])],8,_)}const W=u(b,[["render",B]]);export{W as default}; diff --git a/src/static/app/dist/assets/share.css b/src/static/app/dist/assets/share.css new file mode 100644 index 0000000..586f852 --- /dev/null +++ b/src/static/app/dist/assets/share.css @@ -0,0 +1 @@ +.animate__fadeInUp[data-v-1b44aacd]{animation-timing-function:cubic-bezier(.42,0,.22,1)} diff --git a/src/static/app/dist/assets/share.js b/src/static/app/dist/assets/share.js new file mode 100644 index 0000000..8776f77 --- /dev/null +++ b/src/static/app/dist/assets/share.js @@ -0,0 +1 @@ +import{_,q as r,D as p,f as u,c as m,a as t,b as c,X as h,o as f,e as b}from"./index.js";import{b as v}from"./browser.js";import{L as y}from"./localeText.js";const g={name:"share",components:{LocaleText:y},async setup(){const o=h(),e=r(!1),i=p(),n=r(""),s=r(void 0),l=r(new Blob);await u("/api/getDashboardTheme",{},d=>{n.value=d.data});const a=o.query.ShareID;return a===void 0||a.length===0?(s.value=void 0,e.value=!0):await u("/api/sharePeer/get",{ShareID:a},d=>{d.status?(s.value=d.data,l.value=new Blob([s.value.file],{type:"text/plain"})):s.value=void 0,e.value=!0}),{store:i,theme:n,peerConfiguration:s,blob:l}},mounted(){this.peerConfiguration&&v.toCanvas(document.querySelector("#qrcode"),this.peerConfiguration.file,o=>{o&&console.error(o)})},methods:{download(){const o=new Blob([this.peerConfiguration.file],{type:"text/plain"}),e=URL.createObjectURL(o),i=`${this.peerConfiguration.fileName}.conf`,n=document.createElement("a");n.href=e,n.download=i,n.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},w=["data-bs-theme"],x={class:"m-auto text-body",style:{width:"500px"}},C={key:0,class:"text-center position-relative",style:{}},U={class:"position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp",style:{"animation-delay":"0.1s"}},I={class:"m-auto"},L={key:1,class:"d-flex align-items-center flex-column gap-3"},B={class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},k={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},q={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},D=["download","href"];function R(o,e,i,n,s,l){const a=b("LocaleText");return f(),m("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[t("div",x,[this.peerConfiguration?(f(),m("div",L,[t("div",B,[e[1]||(e[1]=t("h6",null,"WGDashboard",-1)),c(a,{t:"Scan QR Code with the WireGuard App to add peer"})]),t("canvas",k,null,512),t("p",q,[c(a,{t:"or click the button below to download the "}),e[2]||(e[2]=t("samp",null,".conf",-1)),c(a,{t:" file"})]),t("a",{download:this.peerConfiguration.fileName+".conf",href:l.getBlob,class:"btn btn-lg bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle animate__animated animate__fadeInUp shadow-sm",style:{"animation-delay":"0.25s"}},e[3]||(e[3]=[t("i",{class:"bi bi-download"},null,-1)]),8,D)])):(f(),m("div",C,[e[0]||(e[0]=t("div",{class:"animate__animated animate__fadeInUp"},[t("h1",{style:{"font-size":"20rem",filter:"blur(1rem)","animation-duration":"7s"},class:"animate__animated animate__flash animate__infinite"},[t("i",{class:"bi bi-file-binary"})])],-1)),t("div",U,[t("h3",I,[c(a,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,w)}const N=_(g,[["render",R],["__scopeId","data-v-1b44aacd"]]);export{N as default}; diff --git a/src/static/app/dist/assets/signin.css b/src/static/app/dist/assets/signin.css new file mode 100644 index 0000000..119a0aa --- /dev/null +++ b/src/static/app/dist/assets/signin.css @@ -0,0 +1 @@ +.dot.inactive[data-v-ed7817c7]{background-color:#dc3545;box-shadow:0 0 0 .2rem #dc354545}.spin[data-v-ed7817c7]{animation:spin-ed7817c7 1s infinite cubic-bezier(.82,.58,.17,.9)}@keyframes spin-ed7817c7{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media screen and (max-width: 768px){.remoteServerContainer[data-v-ed7817c7]{flex-direction:column}.remoteServerContainer .button-group button[data-v-ed7817c7]{width:100%}}@media screen and (max-width: 768px){.login-box[data-v-95530d22]{width:100%!important}.login-box div[data-v-95530d22]{width:auto!important}} diff --git a/src/static/app/dist/assets/signin.js b/src/static/app/dist/assets/signin.js new file mode 100644 index 0000000..990a771 --- /dev/null +++ b/src/static/app/dist/assets/signin.js @@ -0,0 +1 @@ +import{_ as g,G as u,o as r,c as i,a as t,k as f,p as k,n as w,t as T,D as C,b as n,F as L,r as E,g as S,j as y,e as c,U as M,f as _,m as D,v as A,d as R,w as P,T as V}from"./index.js";import{M as B}from"./message.js";import{d as $}from"./dayjs.min.js";import{L as I}from"./localeText.js";const O={name:"RemoteServer",props:{server:Object},data(){return{active:!1,startTime:void 0,endTime:void 0,errorMsg:"",refreshing:!1}},methods:{async handshake(){this.active=!1,this.server.host&&this.server.apiKey&&(this.refreshing=!0,this.startTime=void 0,this.endTime=void 0,this.startTime=$(),await fetch(`${this.server.host}/api/handshake`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},method:"GET",signal:AbortSignal.timeout(5e3)}).then(s=>{if(s.status===200)return s.json();throw new Error(s.statusText)}).then(()=>{this.endTime=$(),this.active=!0}).catch(s=>{this.active=!1,this.errorMsg=s}),this.refreshing=!1)},async connect(){await fetch(`${this.server.host}/api/authenticate`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},body:JSON.stringify({host:window.location.hostname}),method:"POST",signal:AbortSignal.timeout(5e3)}).then(s=>s.json()).then(s=>{this.$emit("setActiveServer"),this.$router.push("/")})}},mounted(){this.handshake()},computed:{getHandshakeTime(){return this.startTime&&this.endTime?`${$().subtract(this.startTime).millisecond()}ms`:this.refreshing?u("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},j={class:"card rounded-3"},G={class:"card-body"},U={class:"d-flex gap-3 w-100 remoteServerContainer"},q={class:"d-flex gap-3 align-items-center flex-grow-1"},N={class:"d-flex gap-3 align-items-center flex-grow-1"},z={class:"d-flex gap-2 button-group"},K={class:"card-footer gap-2 d-flex align-items-center"},W={key:0,class:"spin ms-auto text-primary-emphasis"};function F(s,e,l,d,a,h){return r(),i("div",j,[t("div",G,[t("div",U,[t("div",q,[e[7]||(e[7]=t("i",{class:"bi bi-server"},null,-1)),f(t("input",{class:"form-control form-control-sm",onBlur:e[0]||(e[0]=o=>this.handshake()),"onUpdate:modelValue":e[1]||(e[1]=o=>this.server.host=o),type:"url"},null,544),[[k,this.server.host]])]),t("div",N,[e[8]||(e[8]=t("i",{class:"bi bi-key-fill"},null,-1)),f(t("input",{class:"form-control form-control-sm",onBlur:e[2]||(e[2]=o=>this.handshake()),"onUpdate:modelValue":e[3]||(e[3]=o=>this.server.apiKey=o),type:"text"},null,544),[[k,this.server.apiKey]])]),t("div",z,[t("button",{onClick:e[4]||(e[4]=o=>this.$emit("delete")),class:"ms-auto btn btn-sm bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle"},e[9]||(e[9]=[t("i",{class:"bi bi-trash"},null,-1)])),t("button",{onClick:e[5]||(e[5]=o=>this.connect()),class:w([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},e[10]||(e[10]=[t("i",{class:"bi bi-arrow-right-circle"},null,-1)]),2)])])]),t("div",K,[t("span",{class:w(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),t("small",null,T(this.getHandshakeTime),1),this.refreshing?(r(),i("div",W,e[11]||(e[11]=[t("i",{class:"bi bi-arrow-clockwise"},null,-1)]))):(r(),i("a",{key:1,role:"button",onClick:e[6]||(e[6]=o=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},e[12]||(e[12]=[t("i",{class:"bi bi-arrow-clockwise me"},null,-1)])))])])}const H=g(O,[["render",F],["__scopeId","data-v-ed7817c7"]]),J={name:"RemoteServerList",setup(){return{store:C()}},components:{LocaleText:I,RemoteServer:H}},Z={class:"w-100 mt-3"},Q={class:"d-flex align-items-center mb-3"},X={class:"mb-0"},Y={class:"w-100 d-flex gap-3 flex-column p-3 border border-1 border-secondary-subtle rounded-3",style:{height:"400px","overflow-y":"scroll"}},ee={key:0,class:"text-muted m-auto"};function te(s,e,l,d,a,h){const o=c("LocaleText"),b=c("RemoteServer");return r(),i("div",Z,[t("div",Q,[t("h5",X,[n(o,{t:"Server List"})]),t("button",{onClick:e[0]||(e[0]=v=>this.store.addCrossServerConfiguration()),class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle shadow-sm ms-auto"},[e[1]||(e[1]=t("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),n(o,{t:"Server"})])]),t("div",Y,[(r(!0),i(L,null,E(this.store.CrossServerConfiguration.ServerList,(v,p)=>(r(),S(b,{onSetActiveServer:x=>this.store.setActiveCrossServer(p),onDelete:x=>this.store.deleteCrossServerConfiguration(p),key:p,server:v},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(r(),i("h6",ee,[n(o,{t:"Click"}),e[2]||(e[2]=t("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1)),n(o,{t:"to add your server"})])):y("",!0)])])}const se=g(J,[["render",te]]),oe={name:"signInInput",methods:{GetLocale:u},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return u(this.placeholder)}}},re=["type","id","name","placeholder"];function ie(s,e,l,d,a,h){return f((r(),i("input",{type:l.type,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data[this.id]=o),class:"form-control",id:this.id,name:this.id,autocomplete:"on",placeholder:this.getLocaleText,required:""},null,8,re)),[[M,this.data[this.id]]])}const ne=g(oe,[["render",ie]]),ae={name:"signInTOTP",methods:{GetLocale:u},props:{data:""},computed:{getLocaleText(){return u("OTP from your authenticator")}}},le=["placeholder"];function de(s,e,l,d,a,h){return f((r(),i("input",{class:"form-control totp",required:"",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code",placeholder:this.getLocaleText,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data.totp=o)},null,8,le)),[[k,this.data.totp]])}const ce=g(ae,[["render",de]]),ue={name:"signin",components:{SignInTOTP:ce,SignInInput:ne,LocaleText:I,RemoteServerList:se,Message:B},async setup(){const s=C();let e="dark",l=!1,d;return s.IsElectronApp||await Promise.all([_("/api/getDashboardTheme",{},a=>{e=a.data}),_("/api/isTotpEnabled",{},a=>{l=a.data}),_("/api/getDashboardVersion",{},a=>{d=a.data})]),s.removeActiveCrossServer(),{store:s,theme:e,totpEnabled:l,version:d}},data(){return{data:{username:"",password:"",totp:""},loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(s=>s.show)},applyLocale(s){return u(s)}},methods:{GetLocale:u,async auth(){this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)?(this.loading=!0,await D("/api/authenticate",this.data,s=>{s.status?(this.loginError=!1,this.$refs.signInBtn.classList.add("signedIn"),s.message?this.$router.push("/welcome"):this.store.Redirect!==void 0?this.$router.push(this.store.Redirect):this.$router.push("/")):(this.loginError=!0,this.loginErrorMessage=s.message,document.querySelectorAll("input[required]").forEach(e=>{e.classList.remove("is-valid"),e.classList.add("is-invalid")}),this.loading=!1)})):document.querySelectorAll("input[required]").forEach(s=>{s.value.length===0?(s.classList.remove("is-valid"),s.classList.add("is-invalid")):(s.classList.remove("is-invalid"),s.classList.add("is-valid"))})}}},me=["data-bs-theme"],he={class:"login-box m-auto"},pe={class:"m-auto",style:{width:"700px"}},fe={class:"mb-0 text-body"},ge={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},be={class:"form-group text-body"},ve={class:"form-group text-body"},ye={key:0,class:"form-group text-body"},xe={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},_e={key:0,class:"d-flex w-100"},$e={key:1,class:"d-flex w-100 align-items-center"},ke={key:3,class:"d-flex mt-3"},Se={class:"form-check form-switch ms-auto"},we={class:"form-check-label",for:"flexSwitchCheckChecked"},Te={class:"text-muted pb-3 d-block w-100 text-center mt-3"},Ce={class:"messageCentre text-body position-absolute end-0 m-3"};function Le(s,e,l,d,a,h){const o=c("LocaleText"),b=c("SignInInput"),v=c("SignInTOTP"),p=c("RemoteServerList"),x=c("Message");return r(),i("div",{class:"container-fluid login-container-fluid d-flex main flex-column py-4 text-body",style:{"overflow-y":"scroll"},"data-bs-theme":this.theme},[t("div",he,[t("div",pe,[t("h4",fe,[n(o,{t:"Welcome to"})]),e[7]||(e[7]=t("span",{class:"dashboardLogo display-3"},[t("strong",null,"WGDashboard")],-1)),a.loginError?(r(),i("div",ge,[n(o,{t:this.loginErrorMessage},null,8,["t"])])):y("",!0),this.store.CrossServerConfiguration.Enable?(r(),S(p,{key:2})):(r(),i("form",{key:1,onSubmit:e[0]||(e[0]=m=>{m.preventDefault(),this.auth()})},[t("div",be,[e[2]||(e[2]=t("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[t("i",{class:"bi bi-person-circle"})],-1)),n(b,{id:"username",data:this.data,type:"text",placeholder:"Username"},null,8,["data"])]),t("div",ve,[e[3]||(e[3]=t("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[t("i",{class:"bi bi-key-fill"})],-1)),n(b,{id:"password",data:this.data,type:"password",placeholder:"Password"},null,8,["data"])]),d.totpEnabled?(r(),i("div",ye,[e[4]||(e[4]=t("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[t("i",{class:"bi bi-lock-fill"})],-1)),n(v,{data:this.data},null,8,["data"])])):y("",!0),t("button",xe,[this.loading?(r(),i("span",$e,[n(o,{t:"Signing In..."}),e[6]||(e[6]=t("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1))])):(r(),i("span",_e,[n(o,{t:"Sign In"}),e[5]||(e[5]=t("i",{class:"ms-auto bi bi-chevron-right"},null,-1))]))],512)],32)),this.store.IsElectronApp?y("",!0):(r(),i("div",ke,[t("div",Se,[f(t("input",{"onUpdate:modelValue":e[1]||(e[1]=m=>this.store.CrossServerConfiguration.Enable=m),class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,512),[[A,this.store.CrossServerConfiguration.Enable]]),t("label",we,[n(o,{t:"Access Remote Server"})])])]))])]),t("small",Te,[R(" WGDashboard "+T(this.version)+" | Developed with ❤️ by ",1),e[8]||(e[8]=t("a",{href:"https://github.com/donaldzou",target:"_blank"},[t("strong",null,"Donald Zou")],-1))]),t("div",Ce,[n(V,{name:"message",tag:"div",class:"position-relative"},{default:P(()=>[(r(!0),i(L,null,E(h.getMessages.slice().reverse(),m=>(r(),S(x,{message:m,key:m.id},null,8,["message"]))),128))]),_:1})])],8,me)}const Ae=g(ue,[["render",Le],["__scopeId","data-v-95530d22"]]);export{Ae as default}; diff --git a/src/static/app/dist/assets/totp.js b/src/static/app/dist/assets/totp.js new file mode 100644 index 0000000..1884447 --- /dev/null +++ b/src/static/app/dist/assets/totp.js @@ -0,0 +1 @@ +import{_ as h,D as m,f as p,m as f,c as b,a as t,b as i,t as _,k as v,p as g,g as d,w as r,e as c,o as n}from"./index.js";import{b as x}from"./browser.js";import{L as y}from"./localeText.js";const T={name:"totp",components:{LocaleText:y},async setup(){const s=m();let e="";return await p("/api/Welcome_GetTotpLink",{},a=>{a.status&&(e=a.data)}),{l:e,store:s}},mounted(){this.l&&x.toCanvas(document.getElementById("qrcode"),this.l,function(s){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(s){const e=document.querySelector("#totp");e.classList.remove("is-invalid","is-valid"),s.length===6&&(console.log(s),/[0-9]{6}/.test(s)?f("/api/Welcome_VerifyTotpLink",{totp:s},a=>{a.status?(this.verified=!0,e.classList.add("is-valid"),this.$emit("verified")):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},k=["data-bs-theme"],w={class:"m-auto text-body",style:{width:"500px"}},L={class:"d-flex flex-column"},M={class:"dashboardLogo display-4"},C={class:"mb-2"},P={class:"text-muted"},I={class:"p-3 bg-body-secondary rounded-3 border mb-3"},O={class:"text-muted mb-0"},B=["href"],$={style:{"line-break":"anywhere"}},D={for:"totp",class:"mb-2"},S={class:"text-muted"},q={class:"form-group mb-2"},A=["disabled"],E={class:"invalid-feedback"},F={class:"valid-feedback"},R={class:"d-flex gap-3 mt-5 flex-column"};function G(s,e,a,N,W,Q){const o=c("LocaleText"),l=c("RouterLink");return n(),b("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[t("div",w,[t("div",L,[t("div",null,[t("h1",M,[i(o,{t:"Multi-Factor Authentication (MFA)"})]),t("p",C,[t("small",P,[i(o,{t:"1. Please scan the following QR Code to generate TOTP with your choice of authenticator"})])]),e[1]||(e[1]=t("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1)),t("div",I,[t("p",O,[t("small",null,[i(o,{t:"Or you can click the link below:"})])]),t("a",{href:this.l},[t("code",$,_(this.l),1)],8,B)]),t("label",D,[t("small",S,[i(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),t("div",q,[v(t("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":e[0]||(e[0]=u=>this.totp=u),disabled:this.verified},null,8,A),[[g,this.totp]]),t("div",E,[i(o,{t:this.totpInvalidMessage},null,8,["t"])]),t("div",F,[i(o,{t:"TOTP verified!"})])])]),e[4]||(e[4]=t("hr",null,null,-1)),t("div",R,[this.verified?(n(),d(l,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:r(()=>[i(o,{t:"Complete"}),e[3]||(e[3]=t("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1})):(n(),d(l,{key:0,to:"/",class:"btn bg-secondary-subtle text-secondary-emphasis rounded-3 flex-grow-1 btn-lg border-1 border-secondary-subtle shadow d-flex"},{default:r(()=>[i(o,{t:"I don't need MFA"}),e[2]||(e[2]=t("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1}))])])])],8,k)}const z=h(T,[["render",G]]);export{z as default}; diff --git a/src/static/app/dist/assets/traceroute.css b/src/static/app/dist/assets/traceroute.css new file mode 100644 index 0000000..2c16b83 --- /dev/null +++ b/src/static/app/dist/assets/traceroute.css @@ -0,0 +1 @@ +.pingPlaceholder[data-v-549eb223]{width:100%;height:40px}.ping-leave-active[data-v-549eb223]{position:absolute}table th[data-v-549eb223],table td[data-v-549eb223]{padding:.5rem}.table[data-v-549eb223]>:not(caption)>*>*{background-color:transparent!important}.ping-move[data-v-549eb223],.ping-enter-active[data-v-549eb223],.ping-leave-active[data-v-549eb223]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-549eb223]{position:absolute;width:100%}.ping-enter-from[data-v-549eb223],.ping-leave-to[data-v-549eb223]{opacity:0;filter:blur(3px)} diff --git a/src/static/app/dist/assets/traceroute.js b/src/static/app/dist/assets/traceroute.js new file mode 100644 index 0000000..d522236 --- /dev/null +++ b/src/static/app/dist/assets/traceroute.js @@ -0,0 +1 @@ +import{_ as h,W as b,f as g,c as o,a as t,b as n,k as y,p as f,z as v,w as r,h as c,o as a,d as x,F as u,r as m,n as k,y as T,t as i,j as A,e as _}from"./index.js";import{O as w}from"./osmap.js";import{L as R}from"./localeText.js";const M={name:"traceroute",components:{LocaleText:R,OSMap:w},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:b()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,g("/api/traceroute/execute",{ipAddress:this.ipAddress},d=>{d.status?this.tracerouteResult=d.data:this.store.newMessage("Server",d.message,"danger"),this.tracing=!1}))}}},S={class:"mt-md-5 mt-3 text-body"},$={class:"container-md"},C={class:"mb-3 text-body"},L={class:"d-flex gap-2 flex-column mb-5"},P={class:"mb-1 text-muted",for:"ipAddress"},V=["disabled"],N=["disabled"],O={key:0,class:"d-block"},z={key:1,class:"d-block"},B={class:"position-relative"},I={key:"pingPlaceholder"},D={key:1},E={key:"table",class:"w-100 mt-2"},F={class:"table table-sm rounded-3 w-100"},G={scope:"col"},H={scope:"col"},K={scope:"col"},W={scope:"col"},j={scope:"col"},U={scope:"col"},q={key:0};function J(d,s,Q,X,Y,Z){const l=_("LocaleText"),p=_("OSMap");return a(),o("div",S,[t("div",$,[t("h3",C,[n(l,{t:"Traceroute"})]),t("div",L,[t("div",null,[t("label",P,[t("small",null,[n(l,{t:"Enter IP Address / Hostname"})])]),y(t("input",{disabled:this.tracing,id:"ipAddress",class:"form-control","onUpdate:modelValue":s[0]||(s[0]=e=>this.ipAddress=e),onKeyup:s[1]||(s[1]=v(e=>this.execute(),["enter"])),type:"text"},null,40,V),[[f,this.ipAddress]])]),t("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:this.tracing||!this.ipAddress,onClick:s[2]||(s[2]=e=>this.execute())},[n(c,{name:"slide"},{default:r(()=>[this.tracing?(a(),o("span",z,s[4]||(s[4]=[t("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),t("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(a(),o("span",O,s[3]||(s[3]=[t("i",{class:"bi bi-person-walking me-2"},null,-1),x("Trace! ")])))]),_:1})],8,N)]),t("div",B,[n(c,{name:"ping"},{default:r(()=>[this.tracerouteResult?(a(),o("div",D,[n(p,{d:this.tracerouteResult,type:"traceroute"},null,8,["d"]),t("div",E,[t("table",F,[t("thead",null,[t("tr",null,[t("th",G,[n(l,{t:"Hop"})]),t("th",H,[n(l,{t:"IP Address"})]),t("th",K,[n(l,{t:"Average RTT (ms)"})]),t("th",W,[n(l,{t:"Min RTT (ms)"})]),t("th",j,[n(l,{t:"Max RTT (ms)"})]),t("th",U,[n(l,{t:"Geolocation"})])])]),t("tbody",null,[(a(!0),o(u,null,m(this.tracerouteResult,(e,tt)=>(a(),o("tr",null,[t("td",null,[t("small",null,i(e.hop),1)]),t("td",null,[t("small",null,i(e.ip),1)]),t("td",null,[t("small",null,i(e.avg_rtt),1)]),t("td",null,[t("small",null,i(e.min_rtt),1)]),t("td",null,[t("small",null,i(e.max_rtt),1)]),t("td",null,[e.geo.city&&e.geo.country?(a(),o("span",q,[t("small",null,i(e.geo.city)+", "+i(e.geo.country),1)])):A("",!0)])]))),256))])])])])):(a(),o("div",I,[s[5]||(s[5]=t("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),(a(),o(u,null,m(5,e=>t("div",{class:k(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:T({"animation-delay":`${e*.05}s`})},null,6)),64))]))]),_:1})])])])}const ot=h(M,[["render",J],["__scopeId","data-v-549eb223"]]);export{ot as default}; diff --git a/src/static/app/dist/assets/vue-datepicker.js b/src/static/app/dist/assets/vue-datepicker.js new file mode 100644 index 0000000..b6455b5 --- /dev/null +++ b/src/static/app/dist/assets/vue-datepicker.js @@ -0,0 +1 @@ +import{C as ha,q as Z,K as ze,Y as qt,Z as ca,A as Ke,Q as it,O as Ca,E as ct,s as G,o as P,c as W,b as ot,$ as je,r as Ye,w as _e,a0 as ue,a1 as We,a2 as at,B as d,a3 as Qe,a4 as Pn,g as De,h as ta,j,i as Oa,a5 as Br,n as ke,a as ye,F as we,y as dt,a6 as va,t as Ge,M as Nr,a7 as An,a8 as Lr,d as Dt,a9 as Hr,k as Ma,aa as Da,z as Vr,I as Fr,J as qr}from"./index.js";function ve(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Te(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function mt(e,t){const n=ve(e);return isNaN(t)?Te(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ft(e,t){const n=ve(e);if(isNaN(t))return Te(e,NaN);if(!t)return n;const a=n.getDate(),r=Te(e,n.getTime());r.setMonth(n.getMonth()+t+1,0);const l=r.getDate();return a>=l?r:(n.setFullYear(r.getFullYear(),r.getMonth(),a),n)}function Xn(e,t){const{years:n=0,months:a=0,weeks:r=0,days:l=0,hours:i=0,minutes:p=0,seconds:c=0}=t,C=ve(e),m=a||n?ft(C,a+n*12):C,v=l||r?mt(m,l+r*7):m,h=p+i*60,Y=(c+h*60)*1e3;return Te(e,v.getTime()+Y)}function Wr(e,t){const n=+ve(e);return Te(e,n+t)}const Gn=6048e5,Qr=864e5,zr=6e4,jn=36e5,Ur=1e3;function Xr(e,t){return Wr(e,t*jn)}let Gr={};function Wt(){return Gr}function ht(e,t){const n=Wt(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=ve(e),l=r.getDay(),i=(l=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Cn(e){const t=ve(e);return t.setHours(0,0,0,0),t}function Ta(e){const t=ve(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Jn(e,t){const n=Cn(e),a=Cn(t),r=+n-Ta(n),l=+a-Ta(a);return Math.round((r-l)/Qr)}function jr(e){const t=Kn(e),n=Te(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Gt(n)}function Kr(e,t){const n=t*3;return ft(e,n)}function un(e,t){return ft(e,t*12)}function On(e,t){const n=ve(e),a=ve(t),r=n.getTime()-a.getTime();return r<0?-1:r>0?1:r}function Zn(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ua(e){if(!Zn(e)&&typeof e!="number")return!1;const t=ve(e);return!isNaN(Number(t))}function $n(e){const t=ve(e);return Math.trunc(t.getMonth()/3)+1}function Jr(e,t){const n=ve(e),a=ve(t);return n.getFullYear()-a.getFullYear()}function Zr(e,t){const n=ve(e),a=ve(t),r=On(n,a),l=Math.abs(Jr(n,a));n.setFullYear(1584),a.setFullYear(1584);const i=On(n,a)===-r,p=r*(l-+i);return p===0?0:p}function er(e,t){const n=ve(e.start),a=ve(e.end);let r=+n>+a;const l=r?+n:+a,i=r?a:n;i.setHours(0,0,0,0);let p=1;const c=[];for(;+i<=l;)c.push(ve(i)),i.setDate(i.getDate()+p),i.setHours(0,0,0,0);return r?c.reverse():c}function Ht(e){const t=ve(e),n=t.getMonth(),a=n-n%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}function el(e,t){const n=ve(e.start),a=ve(e.end);let r=+n>+a;const l=r?+Ht(n):+Ht(a);let i=Ht(r?a:n),p=1;const c=[];for(;+i<=l;)c.push(ve(i)),i=Kr(i,p);return r?c.reverse():c}function tl(e){const t=ve(e);return t.setDate(1),t.setHours(0,0,0,0),t}function tr(e){const t=ve(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function ma(e){const t=ve(e),n=Te(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ar(e,t){const n=Wt(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=ve(e),l=r.getDay(),i=(l{let a;const r=al[e];return typeof r=="string"?a=r:t===1?a=r.one:a=r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Wa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const rl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ll={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ol={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},il={date:Wa({formats:rl,defaultWidth:"full"}),time:Wa({formats:ll,defaultWidth:"full"}),dateTime:Wa({formats:ol,defaultWidth:"full"})},sl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ul=(e,t,n,a)=>sl[e];function oa(e){return(t,n)=>{const a=n?.context?String(n.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,p=n?.width?String(n.width):i;r=e.formattingValues[p]||e.formattingValues[i]}else{const i=e.defaultWidth,p=n?.width?String(n.width):e.defaultWidth;r=e.values[p]||e.values[i]}const l=e.argumentCallback?e.argumentCallback(t):t;return r[l]}}const dl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},cl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},vl={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ml={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},pl={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},fl={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},hl=(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yl={ordinalNumber:hl,era:oa({values:dl,defaultWidth:"wide"}),quarter:oa({values:cl,defaultWidth:"wide",argumentCallback:e=>e-1}),month:oa({values:vl,defaultWidth:"wide"}),day:oa({values:ml,defaultWidth:"wide"}),dayPeriod:oa({values:pl,defaultWidth:"wide",formattingValues:fl,defaultFormattingWidth:"wide"})};function ia(e){return(t,n={})=>{const a=n.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],l=t.match(r);if(!l)return null;const i=l[0],p=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(p)?bl(p,v=>v.test(i)):gl(p,v=>v.test(i));let C;C=e.valueCallback?e.valueCallback(c):c,C=n.valueCallback?n.valueCallback(C):C;const m=t.slice(i.length);return{value:C,rest:m}}}function gl(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function bl(e,t){for(let n=0;n{const a=t.match(e.matchPattern);if(!a)return null;const r=a[0],l=t.match(e.parsePattern);if(!l)return null;let i=e.valueCallback?e.valueCallback(l[0]):l[0];i=n.valueCallback?n.valueCallback(i):i;const p=t.slice(r.length);return{value:i,rest:p}}}const _l=/^(\d+)(th|st|nd|rd)?/i,kl=/\d+/i,xl={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ml={any:[/^b/i,/^(a|c)/i]},Dl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Tl={any:[/1/i,/2/i,/3/i,/4/i]},Pl={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Al={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Cl={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ol={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$l={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Yl={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Sl={ordinalNumber:wl({matchPattern:_l,parsePattern:kl,valueCallback:e=>parseInt(e,10)}),era:ia({matchPatterns:xl,defaultMatchWidth:"wide",parsePatterns:Ml,defaultParseWidth:"any"}),quarter:ia({matchPatterns:Dl,defaultMatchWidth:"wide",parsePatterns:Tl,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ia({matchPatterns:Pl,defaultMatchWidth:"wide",parsePatterns:Al,defaultParseWidth:"any"}),day:ia({matchPatterns:Cl,defaultMatchWidth:"wide",parsePatterns:Ol,defaultParseWidth:"any"}),dayPeriod:ia({matchPatterns:$l,defaultMatchWidth:"any",parsePatterns:Yl,defaultParseWidth:"any"})},nr={code:"en-US",formatDistance:nl,formatLong:il,formatRelative:ul,localize:yl,match:Sl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Rl(e){const t=ve(e);return Jn(t,ma(t))+1}function dn(e){const t=ve(e),n=+Gt(t)-+jr(t);return Math.round(n/Gn)+1}function cn(e,t){const n=ve(e),a=n.getFullYear(),r=Wt(),l=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=Te(e,0);i.setFullYear(a+1,0,l),i.setHours(0,0,0,0);const p=ht(i,t),c=Te(e,0);c.setFullYear(a,0,l),c.setHours(0,0,0,0);const C=ht(c,t);return n.getTime()>=p.getTime()?a+1:n.getTime()>=C.getTime()?a:a-1}function Il(e,t){const n=Wt(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=cn(e,t),l=Te(e,0);return l.setFullYear(r,0,a),l.setHours(0,0,0,0),ht(l,t)}function vn(e,t){const n=ve(e),a=+ht(n,t)-+Il(n,t);return Math.round(a/Gn)+1}function Ae(e,t){const n=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return n+a}const Ct={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return Ae(t==="yy"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ae(n+1,2)},d(e,t){return Ae(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ae(e.getHours()%12||12,t.length)},H(e,t){return Ae(e.getHours(),t.length)},m(e,t){return Ae(e.getMinutes(),t.length)},s(e,t){return Ae(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),r=Math.trunc(a*Math.pow(10,n-3));return Ae(r,t.length)}},Qt={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Sn={G:function(e,t,n){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const a=e.getFullYear(),r=a>0?a:1-a;return n.ordinalNumber(r,{unit:"year"})}return Ct.y(e,t)},Y:function(e,t,n,a){const r=cn(e,a),l=r>0?r:1-r;if(t==="YY"){const i=l%100;return Ae(i,2)}return t==="Yo"?n.ordinalNumber(l,{unit:"year"}):Ae(l,t.length)},R:function(e,t){const n=Kn(e);return Ae(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ae(n,t.length)},Q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return Ae(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return Ae(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,n){const a=e.getMonth();switch(t){case"M":case"MM":return Ct.M(e,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,n){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return Ae(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,n,a){const r=vn(e,a);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):Ae(r,t.length)},I:function(e,t,n){const a=dn(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):Ae(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ct.d(e,t)},D:function(e,t,n){const a=Rl(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):Ae(a,t.length)},E:function(e,t,n){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,n,a){const r=e.getDay(),l=(r-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(l);case"ee":return Ae(l,2);case"eo":return n.ordinalNumber(l,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,a){const r=e.getDay(),l=(r-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(l);case"cc":return Ae(l,t.length);case"co":return n.ordinalNumber(l,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const a=e.getDay(),r=a===0?7:a;switch(t){case"i":return String(r);case"ii":return Ae(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const a=e.getHours();let r;switch(a===12?r=Qt.noon:a===0?r=Qt.midnight:r=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const a=e.getHours();let r;switch(a>=17?r=Qt.evening:a>=12?r=Qt.afternoon:a>=4?r=Qt.morning:r=Qt.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let a=e.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return Ct.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ct.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):Ae(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):Ae(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ct.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ct.s(e,t)},S:function(e,t){return Ct.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return In(a);case"XXXX":case"XX":return Nt(a);case"XXXXX":case"XXX":default:return Nt(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return In(a);case"xxxx":case"xx":return Nt(a);case"xxxxx":case"xxx":default:return Nt(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Rn(a,":");case"OOOO":default:return"GMT"+Nt(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Rn(a,":");case"zzzz":default:return"GMT"+Nt(a,":")}},t:function(e,t,n){const a=Math.trunc(e.getTime()/1e3);return Ae(a,t.length)},T:function(e,t,n){const a=e.getTime();return Ae(a,t.length)}};function Rn(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Math.trunc(a/60),l=a%60;return l===0?n+String(r):n+String(r)+t+Ae(l,2)}function In(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):Nt(e,t)}function Nt(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Ae(Math.trunc(a/60),2),l=Ae(a%60,2);return n+r+t+l}const En=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},rr=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},El=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],r=n[2];if(!r)return En(e,t);let l;switch(a){case"P":l=t.dateTime({width:"short"});break;case"PP":l=t.dateTime({width:"medium"});break;case"PPP":l=t.dateTime({width:"long"});break;case"PPPP":default:l=t.dateTime({width:"full"});break}return l.replace("{{date}}",En(a,t)).replace("{{time}}",rr(r,t))},an={p:rr,P:El},Bl=/^D+$/,Nl=/^Y+$/,Ll=["D","DD","YY","YYYY"];function lr(e){return Bl.test(e)}function or(e){return Nl.test(e)}function nn(e,t,n){const a=Hl(e,t,n);if(console.warn(a),Ll.includes(e))throw new RangeError(a)}function Hl(e,t,n){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Vl=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ql=/^'([^]*?)'?$/,Wl=/''/g,Ql=/[a-zA-Z]/;function kt(e,t,n){const a=Wt(),r=n?.locale??a.locale??nr,l=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,p=ve(e);if(!ua(p))throw new RangeError("Invalid time value");let c=t.match(Fl).map(m=>{const v=m[0];if(v==="p"||v==="P"){const h=an[v];return h(m,r.formatLong)}return m}).join("").match(Vl).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const v=m[0];if(v==="'")return{isToken:!1,value:zl(m)};if(Sn[v])return{isToken:!0,value:m};if(v.match(Ql))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:m}});r.localize.preprocessor&&(c=r.localize.preprocessor(p,c));const C={firstWeekContainsDate:l,weekStartsOn:i,locale:r};return c.map(m=>{if(!m.isToken)return m.value;const v=m.value;(!n?.useAdditionalWeekYearTokens&&or(v)||!n?.useAdditionalDayOfYearTokens&&lr(v))&&nn(v,t,String(e));const h=Sn[v[0]];return h(p,v,r.localize,C)}).join("")}function zl(e){const t=e.match(ql);return t?t[1].replace(Wl,"'"):e}function Ul(e){return ve(e).getDay()}function Xl(e){const t=ve(e),n=t.getFullYear(),a=t.getMonth(),r=Te(e,0);return r.setFullYear(n,a+1,0),r.setHours(0,0,0,0),r.getDate()}function Gl(){return Object.assign({},Wt())}function Tt(e){return ve(e).getHours()}function jl(e){let n=ve(e).getDay();return n===0&&(n=7),n}function Rt(e){return ve(e).getMinutes()}function xe(e){return ve(e).getMonth()}function jt(e){return ve(e).getSeconds()}function he(e){return ve(e).getFullYear()}function Kt(e,t){const n=ve(e),a=ve(t);return n.getTime()>a.getTime()}function pa(e,t){const n=ve(e),a=ve(t);return+n<+a}function Xt(e,t){const n=ve(e),a=ve(t);return+n==+a}function Kl(e,t){const n=t instanceof Date?Te(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const Jl=10;class ir{subPriority=0;validate(t,n){return!0}}class Zl extends ir{constructor(t,n,a,r,l){super(),this.value=t,this.validateValue=n,this.setValue=a,this.priority=r,l&&(this.subPriority=l)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,a){return this.setValue(t,n,this.value,a)}}class eo extends ir{priority=Jl;subPriority=-1;set(t,n){return n.timestampIsSet?t:Te(t,Kl(t,Date))}}class Pe{run(t,n,a,r){const l=this.parse(t,n,a,r);return l?{setter:new Zl(l.value,this.validate,this.set,this.priority,this.subPriority),rest:l.rest}:null}validate(t,n,a){return!0}}class to extends Pe{priority=140;parse(t,n,a){switch(n){case"G":case"GG":case"GGG":return a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"});case"GGGGG":return a.era(t,{width:"narrow"});case"GGGG":default:return a.era(t,{width:"wide"})||a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"})}}set(t,n,a){return n.era=a,t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Le={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},bt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function He(e,t){return e&&{value:t(e.value),rest:e.rest}}function Re(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function wt(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const a=n[1]==="+"?1:-1,r=n[2]?parseInt(n[2],10):0,l=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:a*(r*jn+l*zr+i*Ur),rest:t.slice(n[0].length)}}function sr(e){return Re(Le.anyDigitsSigned,e)}function Ee(e,t){switch(e){case 1:return Re(Le.singleDigit,t);case 2:return Re(Le.twoDigits,t);case 3:return Re(Le.threeDigits,t);case 4:return Re(Le.fourDigits,t);default:return Re(new RegExp("^\\d{1,"+e+"}"),t)}}function Pa(e,t){switch(e){case 1:return Re(Le.singleDigitSigned,t);case 2:return Re(Le.twoDigitsSigned,t);case 3:return Re(Le.threeDigitsSigned,t);case 4:return Re(Le.fourDigitsSigned,t);default:return Re(new RegExp("^-?\\d{1,"+e+"}"),t)}}function mn(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function ur(e,t){const n=t>0,a=n?t:1-t;let r;if(a<=50)r=e||100;else{const l=a+50,i=Math.trunc(l/100)*100,p=e>=l%100;r=e+i-(p?100:0)}return n?r:1-r}function dr(e){return e%400===0||e%4===0&&e%100!==0}class ao extends Pe{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,a){const r=l=>({year:l,isTwoDigitYear:n==="yy"});switch(n){case"y":return He(Ee(4,t),r);case"yo":return He(a.ordinalNumber(t,{unit:"year"}),r);default:return He(Ee(n.length,t),r)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a){const r=t.getFullYear();if(a.isTwoDigitYear){const i=ur(a.year,r);return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}const l=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(l,0,1),t.setHours(0,0,0,0),t}}class no extends Pe{priority=130;parse(t,n,a){const r=l=>({year:l,isTwoDigitYear:n==="YY"});switch(n){case"Y":return He(Ee(4,t),r);case"Yo":return He(a.ordinalNumber(t,{unit:"year"}),r);default:return He(Ee(n.length,t),r)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a,r){const l=cn(t,r);if(a.isTwoDigitYear){const p=ur(a.year,l);return t.setFullYear(p,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),ht(t,r)}const i=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(i,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),ht(t,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class ro extends Pe{priority=130;parse(t,n){return Pa(n==="R"?4:n.length,t)}set(t,n,a){const r=Te(t,0);return r.setFullYear(a,0,4),r.setHours(0,0,0,0),Gt(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class lo extends Pe{priority=130;parse(t,n){return Pa(n==="u"?4:n.length,t)}set(t,n,a){return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class oo extends Pe{priority=120;parse(t,n,a){switch(n){case"Q":case"QQ":return Ee(n.length,t);case"Qo":return a.ordinalNumber(t,{unit:"quarter"});case"QQQ":return a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(t,{width:"wide",context:"formatting"})||a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class io extends Pe{priority=120;parse(t,n,a){switch(n){case"q":case"qq":return Ee(n.length,t);case"qo":return a.ordinalNumber(t,{unit:"quarter"});case"qqq":return a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(t,{width:"wide",context:"standalone"})||a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class so extends Pe{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,a){const r=l=>l-1;switch(n){case"M":return He(Re(Le.month,t),r);case"MM":return He(Ee(2,t),r);case"Mo":return He(a.ordinalNumber(t,{unit:"month"}),r);case"MMM":return a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(t,{width:"wide",context:"formatting"})||a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}class uo extends Pe{priority=110;parse(t,n,a){const r=l=>l-1;switch(n){case"L":return He(Re(Le.month,t),r);case"LL":return He(Ee(2,t),r);case"Lo":return He(a.ordinalNumber(t,{unit:"month"}),r);case"LLL":return a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(t,{width:"wide",context:"standalone"})||a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function co(e,t,n){const a=ve(e),r=vn(a,n)-t;return a.setDate(a.getDate()-r*7),a}class vo extends Pe{priority=100;parse(t,n,a){switch(n){case"w":return Re(Le.week,t);case"wo":return a.ordinalNumber(t,{unit:"week"});default:return Ee(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a,r){return ht(co(t,a,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function mo(e,t){const n=ve(e),a=dn(n)-t;return n.setDate(n.getDate()-a*7),n}class po extends Pe{priority=100;parse(t,n,a){switch(n){case"I":return Re(Le.week,t);case"Io":return a.ordinalNumber(t,{unit:"week"});default:return Ee(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a){return Gt(mo(t,a))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const fo=[31,28,31,30,31,30,31,31,30,31,30,31],ho=[31,29,31,30,31,30,31,31,30,31,30,31];class yo extends Pe{priority=90;subPriority=1;parse(t,n,a){switch(n){case"d":return Re(Le.date,t);case"do":return a.ordinalNumber(t,{unit:"date"});default:return Ee(n.length,t)}}validate(t,n){const a=t.getFullYear(),r=dr(a),l=t.getMonth();return r?n>=1&&n<=ho[l]:n>=1&&n<=fo[l]}set(t,n,a){return t.setDate(a),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class go extends Pe{priority=90;subpriority=1;parse(t,n,a){switch(n){case"D":case"DD":return Re(Le.dayOfYear,t);case"Do":return a.ordinalNumber(t,{unit:"date"});default:return Ee(n.length,t)}}validate(t,n){const a=t.getFullYear();return dr(a)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,a){return t.setMonth(0,a),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function pn(e,t,n){const a=Wt(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,l=ve(e),i=l.getDay(),c=(t%7+7)%7,C=7-r,m=t<0||t>6?t-(i+C)%7:(c+C)%7-(i+C)%7;return mt(l,m)}class bo extends Pe{priority=90;parse(t,n,a){switch(n){case"E":case"EE":case"EEE":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,r){return t=pn(t,a,r),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class wo extends Pe{priority=90;parse(t,n,a,r){const l=i=>{const p=Math.floor((i-1)/7)*7;return(i+r.weekStartsOn+6)%7+p};switch(n){case"e":case"ee":return He(Ee(n.length,t),l);case"eo":return He(a.ordinalNumber(t,{unit:"day"}),l);case"eee":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeeee":return a.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,r){return t=pn(t,a,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class _o extends Pe{priority=90;parse(t,n,a,r){const l=i=>{const p=Math.floor((i-1)/7)*7;return(i+r.weekStartsOn+6)%7+p};switch(n){case"c":case"cc":return He(Ee(n.length,t),l);case"co":return He(a.ordinalNumber(t,{unit:"day"}),l);case"ccc":return a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"ccccc":return a.day(t,{width:"narrow",context:"standalone"});case"cccccc":return a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(t,{width:"wide",context:"standalone"})||a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,r){return t=pn(t,a,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function ko(e,t){const n=ve(e),a=jl(n),r=t-a;return mt(n,r)}class xo extends Pe{priority=90;parse(t,n,a){const r=l=>l===0?7:l;switch(n){case"i":case"ii":return Ee(n.length,t);case"io":return a.ordinalNumber(t,{unit:"day"});case"iii":return He(a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return He(a.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return He(a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),r);case"iiii":default:return He(a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),r)}}validate(t,n){return n>=1&&n<=7}set(t,n,a){return t=ko(t,a),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Mo extends Pe{priority=80;parse(t,n,a){switch(n){case"a":case"aa":case"aaa":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(mn(a),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Do extends Pe{priority=80;parse(t,n,a){switch(n){case"b":case"bb":case"bbb":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(mn(a),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class To extends Pe{priority=80;parse(t,n,a){switch(n){case"B":case"BB":case"BBB":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(mn(a),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class Po extends Pe{priority=70;parse(t,n,a){switch(n){case"h":return Re(Le.hour12h,t);case"ho":return a.ordinalNumber(t,{unit:"hour"});default:return Ee(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,a){const r=t.getHours()>=12;return r&&a<12?t.setHours(a+12,0,0,0):!r&&a===12?t.setHours(0,0,0,0):t.setHours(a,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class Ao extends Pe{priority=70;parse(t,n,a){switch(n){case"H":return Re(Le.hour23h,t);case"Ho":return a.ordinalNumber(t,{unit:"hour"});default:return Ee(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,a){return t.setHours(a,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class Co extends Pe{priority=70;parse(t,n,a){switch(n){case"K":return Re(Le.hour11h,t);case"Ko":return a.ordinalNumber(t,{unit:"hour"});default:return Ee(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.getHours()>=12&&a<12?t.setHours(a+12,0,0,0):t.setHours(a,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class Oo extends Pe{priority=70;parse(t,n,a){switch(n){case"k":return Re(Le.hour24h,t);case"ko":return a.ordinalNumber(t,{unit:"hour"});default:return Ee(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,a){const r=a<=24?a%24:a;return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class $o extends Pe{priority=60;parse(t,n,a){switch(n){case"m":return Re(Le.minute,t);case"mo":return a.ordinalNumber(t,{unit:"minute"});default:return Ee(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setMinutes(a,0,0),t}incompatibleTokens=["t","T"]}class Yo extends Pe{priority=50;parse(t,n,a){switch(n){case"s":return Re(Le.second,t);case"so":return a.ordinalNumber(t,{unit:"second"});default:return Ee(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setSeconds(a,0),t}incompatibleTokens=["t","T"]}class So extends Pe{priority=30;parse(t,n){const a=r=>Math.trunc(r*Math.pow(10,-n.length+3));return He(Ee(n.length,t),a)}set(t,n,a){return t.setMilliseconds(a),t}incompatibleTokens=["t","T"]}class Ro extends Pe{priority=10;parse(t,n){switch(n){case"X":return wt(bt.basicOptionalMinutes,t);case"XX":return wt(bt.basic,t);case"XXXX":return wt(bt.basicOptionalSeconds,t);case"XXXXX":return wt(bt.extendedOptionalSeconds,t);case"XXX":default:return wt(bt.extended,t)}}set(t,n,a){return n.timestampIsSet?t:Te(t,t.getTime()-Ta(t)-a)}incompatibleTokens=["t","T","x"]}class Io extends Pe{priority=10;parse(t,n){switch(n){case"x":return wt(bt.basicOptionalMinutes,t);case"xx":return wt(bt.basic,t);case"xxxx":return wt(bt.basicOptionalSeconds,t);case"xxxxx":return wt(bt.extendedOptionalSeconds,t);case"xxx":default:return wt(bt.extended,t)}}set(t,n,a){return n.timestampIsSet?t:Te(t,t.getTime()-Ta(t)-a)}incompatibleTokens=["t","T","X"]}class Eo extends Pe{priority=40;parse(t){return sr(t)}set(t,n,a){return[Te(t,a*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Bo extends Pe{priority=20;parse(t){return sr(t)}set(t,n,a){return[Te(t,a),{timestampIsSet:!0}]}incompatibleTokens="*"}const No={G:new to,y:new ao,Y:new no,R:new ro,u:new lo,Q:new oo,q:new io,M:new so,L:new uo,w:new vo,I:new po,d:new yo,D:new go,E:new bo,e:new wo,c:new _o,i:new xo,a:new Mo,b:new Do,B:new To,h:new Po,H:new Ao,K:new Co,k:new Oo,m:new $o,s:new Yo,S:new So,X:new Ro,x:new Io,t:new Eo,T:new Bo},Lo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ho=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vo=/^'([^]*?)'?$/,Fo=/''/g,qo=/\S/,Wo=/[a-zA-Z]/;function rn(e,t,n,a){const r=Gl(),l=a?.locale??r.locale??nr,i=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,p=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0;if(t==="")return e===""?ve(n):Te(n,NaN);const c={firstWeekContainsDate:i,weekStartsOn:p,locale:l},C=[new eo],m=t.match(Ho).map(f=>{const S=f[0];if(S in an){const I=an[S];return I(f,l.formatLong)}return f}).join("").match(Lo),v=[];for(let f of m){!a?.useAdditionalWeekYearTokens&&or(f)&&nn(f,t,e),!a?.useAdditionalDayOfYearTokens&&lr(f)&&nn(f,t,e);const S=f[0],I=No[S];if(I){const{incompatibleTokens:U}=I;if(Array.isArray(U)){const q=v.find(ae=>U.includes(ae.token)||ae.token===S);if(q)throw new RangeError(`The format string mustn't contain \`${q.fullToken}\` and \`${f}\` at the same time`)}else if(I.incompatibleTokens==="*"&&v.length>0)throw new RangeError(`The format string mustn't contain \`${f}\` and any other token at the same time`);v.push({token:S,fullToken:f});const A=I.run(e,f,l.match,c);if(!A)return Te(n,NaN);C.push(A.setter),e=A.rest}else{if(S.match(Wo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(f==="''"?f="'":S==="'"&&(f=Qo(f)),e.indexOf(f)===0)e=e.slice(f.length);else return Te(n,NaN)}}if(e.length>0&&qo.test(e))return Te(n,NaN);const h=C.map(f=>f.priority).sort((f,S)=>S-f).filter((f,S,I)=>I.indexOf(f)===S).map(f=>C.filter(S=>S.priority===f).sort((S,I)=>I.subPriority-S.subPriority)).map(f=>f[0]);let k=ve(n);if(isNaN(k.getTime()))return Te(n,NaN);const Y={};for(const f of h){if(!f.validate(k,c))return Te(n,NaN);const S=f.set(k,Y,c);Array.isArray(S)?(k=S[0],Object.assign(Y,S[1])):k=S}return Te(n,k)}function Qo(e){return e.match(Vo)[1].replace(Fo,"'")}function Bn(e,t){const n=Ht(e),a=Ht(t);return+n==+a}function zo(e,t){return mt(e,-t)}function cr(e,t){const n=ve(e),a=n.getFullYear(),r=n.getDate(),l=Te(e,0);l.setFullYear(a,t,15),l.setHours(0,0,0,0);const i=Xl(l);return n.setMonth(t,Math.min(r,i)),n}function Ce(e,t){let n=ve(e);return isNaN(+n)?Te(e,NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=cr(n,t.month)),t.date!=null&&n.setDate(t.date),t.hours!=null&&n.setHours(t.hours),t.minutes!=null&&n.setMinutes(t.minutes),t.seconds!=null&&n.setSeconds(t.seconds),t.milliseconds!=null&&n.setMilliseconds(t.milliseconds),n)}function Uo(e,t){const n=ve(e);return n.setHours(t),n}function vr(e,t){const n=ve(e);return n.setMilliseconds(t),n}function Xo(e,t){const n=ve(e);return n.setMinutes(t),n}function mr(e,t){const n=ve(e);return n.setSeconds(t),n}function _t(e,t){const n=ve(e);return isNaN(+n)?Te(e,NaN):(n.setFullYear(t),n)}function Jt(e,t){return ft(e,-t)}function Go(e,t){const{years:n=0,months:a=0,weeks:r=0,days:l=0,hours:i=0,minutes:p=0,seconds:c=0}=t,C=Jt(e,a+n*12),m=zo(C,l+r*7),v=p+i*60,k=(c+v*60)*1e3;return Te(e,m.getTime()-k)}function pr(e,t){return un(e,-t)}function aa(){const e=Lr();return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...e},[ye("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),ye("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),ye("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),ye("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}aa.compatConfig={MODE:3};function fr(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),ye("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}fr.compatConfig={MODE:3};function fn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}fn.compatConfig={MODE:3};function hn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}hn.compatConfig={MODE:3};function yn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),ye("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}yn.compatConfig={MODE:3};function gn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}gn.compatConfig={MODE:3};function bn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}bn.compatConfig={MODE:3};const nt=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),wn=(e,t,n)=>ln(e,t,n)||Q(),jo=(e,t,n)=>{const a=t.dateInTz?nt(new Date(e),t.dateInTz):Q(e);return n?tt(a,!0):a},ln=(e,t,n)=>{if(!e)return null;const a=n?tt(Q(e),!0):Q(e);return t?t.exactMatch?jo(e,t,n):nt(a,t.timezone):a},Ko=e=>{if(!e)return 0;const t=new Date,n=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),a=new Date(t.toLocaleString("en-US",{timeZone:e})),r=a.getTimezoneOffset()/60;return(+n-+a)/(1e3*60*60)-r};var vt=(e=>(e.month="month",e.year="year",e))(vt||{}),Lt=(e=>(e.top="top",e.bottom="bottom",e))(Lt||{}),Vt=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(Vt||{}),Xe=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(Xe||{});const Jo=["timestamp","date","iso"];var Ze=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(Ze||{}),$e=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))($e||{});function Nn(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function Zo(e){return t=>kt(nt(new Date(`2017-01-0${t}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:e})}const ei=(e,t,n)=>{const a=[1,2,3,4,5,6,7];let r;if(e!==null)try{r=a.map(Zo(e))}catch{r=a.map(Nn(t))}else r=a.map(Nn(t));const l=r.slice(0,n),i=r.slice(n+1,r.length);return[r[n]].concat(...i).concat(...l)},_n=(e,t,n)=>{const a=[];for(let r=+e[0];r<=+e[1];r++)a.push({value:+r,text:br(r,t)});return n?a.reverse():a},hr=(e,t,n)=>{const a=[1,2,3,4,5,6,7,8,9,10,11,12].map(l=>{const i=l<10?`0${l}`:l;return new Date(`2017-${i}-01T00:00:00+00:00`)});if(e!==null)try{const l=n==="long"?"LLLL":"LLL";return a.map((i,p)=>{const c=kt(nt(i,"UTC"),l,{locale:e});return{text:c.charAt(0).toUpperCase()+c.substring(1),value:p}})}catch{}const r=new Intl.DateTimeFormat(t,{month:n,timeZone:"UTC"});return a.map((l,i)=>{const p=r.format(l);return{text:p.charAt(0).toUpperCase()+p.substring(1),value:i}})},ti=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],Fe=e=>{const t=d(e);return t!=null&&t.$el?t?.$el:t},ai=e=>({type:"dot",...e??{}}),yr=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,kn={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},qe=e=>e,Ln=e=>e===0?e:!e||isNaN(+e)?null:+e,Hn=e=>e===null,gr=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},ni=e=>{const t=[],n=a=>a.filter(r=>r);for(let a=0;a{const a=n!=null,r=t!=null;if(!a&&!r)return!1;const l=+n,i=+t;return a&&r?+e>l||+el:r?+eni(e).map(n=>n.map(a=>{const{active:r,disabled:l,isBetween:i,highlighted:p}=t(a);return{...a,active:r,disabled:l,className:{dp__overlay_cell_active:r,dp__overlay_cell:!r,dp__overlay_cell_disabled:l,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:l&&r,dp__cell_in_between:i,"dp--highlighted":p}}})),Yt=(e,t,n=!1)=>{e&&t.allowStopPropagation&&(n&&e.stopImmediatePropagation(),e.stopPropagation())},ri=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function li(e,t){let n=[...document.querySelectorAll(ri())];n=n.filter(r=>!e.contains(r)||r.hasAttribute("data-datepicker-instance"));const a=n.indexOf(e);if(a>=0&&(t?a-1>=0:a+1<=n.length))return n[a+(t?-1:1)]}const on=(e,t)=>e?.querySelector(`[data-dp-element="${t}"]`),br=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),xn=e=>kt(e,"dd-MM-yyyy"),Qa=e=>Array.isArray(e),Aa=(e,t)=>t.get(xn(e)),oi=(e,t)=>e?t?t instanceof Map?!!Aa(e,t):t(Q(e)):!1:!0,et=(e,t,n=!1,a)=>{if(e.key===$e.enter||e.key===$e.space)return n&&e.preventDefault(),t();if(a)return a(e)},Vn=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(e=>navigator.userAgent.includes(e))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Fn=(e,t,n,a,r,l)=>{const i=rn(e,t.slice(0,e.length),new Date,{locale:l});return ua(i)&&Zn(i)?a||r?i:Ce(i,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},ii=(e,t,n,a,r,l)=>{const i=Array.isArray(n)?n[0]:n;if(typeof t=="string")return Fn(e,t,i,a,r,l);if(Array.isArray(t)){let p=null;for(const c of t)if(p=Fn(e,c,i,a,r,l),p)break;return p}return typeof t=="function"?t(e):null},Q=e=>e?new Date(e):new Date,si=(e,t,n)=>{if(t){const r=(e.getMonth()+1).toString().padStart(2,"0"),l=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),p=e.getMinutes().toString().padStart(2,"0"),c=n?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${r}-${l}T${i}:${p}:${c}.000Z`}const a=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(a).toISOString()},tt=(e,t)=>{const n=Q(JSON.parse(JSON.stringify(e))),a=Ce(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return t?tl(a):a},St=(e,t,n,a)=>{let r=e?Q(e):Q();return(t||t===0)&&(r=Uo(r,+t)),(n||n===0)&&(r=Xo(r,+n)),(a||a===0)&&(r=mr(r,+a)),vr(r,0)},Ie=(e,t)=>!e||!t?!1:pa(tt(e),tt(t)),Me=(e,t)=>!e||!t?!1:Xt(tt(e),tt(t)),Ne=(e,t)=>!e||!t?!1:Kt(tt(e),tt(t)),$a=(e,t,n)=>e!=null&&e[0]&&e!=null&&e[1]?Ne(n,e[0])&&Ie(n,e[1]):e!=null&&e[0]&&t?Ne(n,e[0])&&Ie(n,t)||Ie(n,e[0])&&Ne(n,t):!1,pt=e=>{const t=Ce(new Date(e),{date:1});return tt(t)},za=(e,t,n)=>t&&(n||n===0)?Object.fromEntries(["hours","minutes","seconds"].map(a=>a===t?[a,n]:[a,isNaN(+e[a])?void 0:+e[a]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},Ft=e=>({hours:Tt(e),minutes:Rt(e),seconds:jt(e)}),wr=(e,t)=>{if(t){const n=he(Q(t));if(n>e)return 12;if(n===e)return xe(Q(t))}},_r=(e,t)=>{if(t){const n=he(Q(t));return n{if(e)return he(Q(e))},kr=(e,t)=>{const n=Ne(e,t)?t:e,a=Ne(t,e)?t:e;return er({start:n,end:a})},ui=e=>{const t=ft(e,1);return{month:xe(t),year:he(t)}},xt=(e,t)=>{const n=ht(e,{weekStartsOn:+t}),a=ar(e,{weekStartsOn:+t});return[n,a]},xr=(e,t)=>{const n={hours:Tt(Q()),minutes:Rt(Q()),seconds:t?jt(Q()):0};return Object.assign(n,e)},$t=(e,t,n)=>[Ce(Q(e),{date:1}),Ce(Q(),{month:t,year:n,date:1})],Mt=(e,t,n)=>{let a=e?Q(e):Q();return(t||t===0)&&(a=cr(a,t)),n&&(a=_t(a,n)),a},Mr=(e,t,n,a,r)=>{if(!a||r&&!t||!r&&!n)return!1;const l=r?ft(e,1):Jt(e,1),i=[xe(l),he(l)];return r?!ci(...i,t):!di(...i,n)},di=(e,t,n)=>Ie(...$t(n,e,t))||Me(...$t(n,e,t)),ci=(e,t,n)=>Ne(...$t(n,e,t))||Me(...$t(n,e,t)),Dr=(e,t,n,a,r,l,i)=>{if(typeof t=="function"&&!i)return t(e);const p=n?{locale:n}:void 0;return Array.isArray(e)?`${kt(e[0],l,p)}${r&&!e[1]?"":a}${e[1]?kt(e[1],l,p):""}`:kt(e,l,p)},zt=e=>{if(e)return null;throw new Error(kn.prop("partial-range"))},ka=(e,t)=>{if(t)return e();throw new Error(kn.prop("range"))},sn=e=>Array.isArray(e)?ua(e[0])&&(e[1]?ua(e[1]):!0):e?ua(e):!1,vi=(e,t)=>Ce(t??Q(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),Ua=(e,t,n,a)=>{if(!e)return!0;if(a){const r=n==="max"?pa(e,t):Kt(e,t),l={seconds:0,milliseconds:0};return r||Xt(Ce(e,l),Ce(t,l))}return n==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},Xa=(e,t,n)=>e?vi(e,t):Q(n??t),qn=(e,t,n,a,r)=>{if(Array.isArray(a)){const i=Xa(e,a[0],t),p=Xa(e,a[1],t);return Ua(a[0],i,n,!!t)&&Ua(a[1],p,n,!!t)&&r}const l=Xa(e,a,t);return Ua(a,l,n,!!t)&&r},Ga=e=>Ce(Q(),Ft(e)),mi=(e,t)=>e instanceof Map?Array.from(e.values()).filter(n=>he(Q(n))===t).map(n=>xe(n)):[],Tr=(e,t,n)=>typeof e=="function"?e({month:t,year:n}):!!e.months.find(a=>a.month===t&&a.year===n),Mn=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),Pr=e=>kt(e,"yyyy-MM-dd"),sa=ha({menuFocused:!1,shiftKeyInMenu:!1}),Ar=()=>{const e=n=>{sa.menuFocused=n},t=n=>{sa.shiftKeyInMenu!==n&&(sa.shiftKeyInMenu=n)};return{control:G(()=>({shiftKeyInMenu:sa.shiftKeyInMenu,menuFocused:sa.menuFocused})),setMenuFocused:e,setShiftKey:t}},Oe=ha({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),ja=Z(null),xa=Z(!1),Ka=Z(!1),Ja=Z(!1),Za=Z(!1),Ue=Z(0),Be=Z(0),It=()=>{const e=G(()=>xa.value?[...Oe.selectionGrid,Oe.actionRow].filter(v=>v.length):Ka.value?[...Oe.timePicker[0],...Oe.timePicker[1],Za.value?[]:[ja.value],Oe.actionRow].filter(v=>v.length):Ja.value?[...Oe.monthPicker,Oe.actionRow]:[Oe.monthYear,...Oe.calendar,Oe.time,Oe.actionRow].filter(v=>v.length)),t=v=>{Ue.value=v?Ue.value+1:Ue.value-1;let h=null;e.value[Be.value]&&(h=e.value[Be.value][Ue.value]),!h&&e.value[Be.value+(v?1:-1)]?(Be.value=Be.value+(v?1:-1),Ue.value=v?0:e.value[Be.value].length-1):h||(Ue.value=v?Ue.value-1:Ue.value+1)},n=v=>{Be.value===0&&!v||Be.value===e.value.length&&v||(Be.value=v?Be.value+1:Be.value-1,e.value[Be.value]?e.value[Be.value]&&!e.value[Be.value][Ue.value]&&Ue.value!==0&&(Ue.value=e.value[Be.value].length-1):Be.value=v?Be.value-1:Be.value+1)},a=v=>{let h=null;e.value[Be.value]&&(h=e.value[Be.value][Ue.value]),h?h.focus({preventScroll:!xa.value}):Ue.value=v?Ue.value-1:Ue.value+1},r=()=>{t(!0),a(!0)},l=()=>{t(!1),a(!1)},i=()=>{n(!1),a(!0)},p=()=>{n(!0),a(!0)},c=(v,h)=>{Oe[h]=v},C=(v,h)=>{Oe[h]=v},m=()=>{Ue.value=0,Be.value=0};return{buildMatrix:c,buildMultiLevelMatrix:C,setTimePickerBackRef:v=>{ja.value=v},setSelectionGrid:v=>{xa.value=v,m(),v||(Oe.selectionGrid=[])},setTimePicker:(v,h=!1)=>{Ka.value=v,Za.value=h,m(),v||(Oe.timePicker[0]=[],Oe.timePicker[1]=[])},setTimePickerElements:(v,h=0)=>{Oe.timePicker[h]=v},arrowRight:r,arrowLeft:l,arrowUp:i,arrowDown:p,clearArrowNav:()=>{Oe.monthYear=[],Oe.calendar=[],Oe.time=[],Oe.actionRow=[],Oe.selectionGrid=[],Oe.timePicker[0]=[],Oe.timePicker[1]=[],xa.value=!1,Ka.value=!1,Za.value=!1,Ja.value=!1,m(),ja.value=null},setMonthPicker:v=>{Ja.value=v,m()},refSets:Oe}},Wn=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),pi=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:t=>`Month picker${t?" overlay":""}`,yearPicker:t=>`Year picker${t?" overlay":""}`,timeOverlay:t=>`${t} overlay`,...e??{}}),Qn=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,fi=e=>{const t=typeof e=="object"&&e,n={static:!0,solo:!1};if(!e)return{...n,count:Qn(!1)};const a=t?e:{},r=t?a.count??!0:e,l=Qn(r);return Object.assign(n,a,{count:l})},hi=(e,t,n)=>e||(typeof n=="string"?n:t),yi=e=>typeof e=="boolean"?e?Wn({}):!1:Wn(e),gi=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},bi=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),wi=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),_i=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},ki=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,...e??{}}),xi=e=>{const t={dates:Array.isArray(e)?e.map(n=>Q(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},Mi=e=>typeof e=="object"?{type:e?.type??"local",hideOnOffsetDates:e?.hideOnOffsetDates??!1}:{type:e,hideOnOffsetDates:!1},Di=e=>{const t={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof e=="object"?{enabled:!0,...t,...e}:{enabled:e,...t}},Ti=e=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:e.emitTimezone??void 0,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},en=(e,t,n)=>new Map(e.map(a=>{const r=wn(a,t,n);return[xn(r),r]})),Pi=(e,t)=>e.length?new Map(e.map(n=>{const a=wn(n.date,t);return[xn(a),n]})):null,Ai=e=>{var t;return{minDate:ln(e.minDate,e.timezone,e.isSpecific),maxDate:ln(e.maxDate,e.timezone,e.isSpecific),disabledDates:Qa(e.disabledDates)?en(e.disabledDates,e.timezone,e.isSpecific):e.disabledDates,allowedDates:Qa(e.allowedDates)?en(e.allowedDates,e.timezone,e.isSpecific):null,highlight:typeof e.highlight=="object"&&Qa((t=e.highlight)==null?void 0:t.dates)?en(e.highlight.dates,e.timezone):e.highlight,markers:Pi(e.markers,e.timezone)}},Ci=e=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:null}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},Oi=e=>({...Object.fromEntries(Object.keys(e).map(t=>{const n=t,a=e[n],r=typeof e[n]=="string"?{[a]:!0}:Object.fromEntries(a.map(l=>[l,!0]));return[t,r]}))}),Se=e=>{const t=()=>{const E=e.enableSeconds?":ss":"",B=e.enableMinutes?":mm":"";return e.is24?`HH${B}${E}`:`hh${B}${E} aa`},n=()=>{var E;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((E=S.value)==null?void 0:E.type)==="iso"?"RR":"ww"}-yyyy`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},a=E=>xr(E,e.enableSeconds),r=()=>q.value.enabled?e.startTime&&Array.isArray(e.startTime)?[a(e.startTime[0]),a(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?a(e.startTime):null,l=G(()=>fi(e.multiCalendars)),i=G(()=>r()),p=G(()=>pi(e.ariaLabels)),c=G(()=>bi(e.filters)),C=G(()=>yi(e.transitions)),m=G(()=>wi(e.actionRow)),v=G(()=>hi(e.previewFormat,e.format,n())),h=G(()=>gi(e.textInput)),k=G(()=>_i(e.inline)),Y=G(()=>ki(e.config)),f=G(()=>xi(e.highlight)),S=G(()=>Mi(e.weekNumbers)),I=G(()=>Ti(e.timezone)),U=G(()=>Ci(e.multiDates)),A=G(()=>Ai({minDate:e.minDate,maxDate:e.maxDate,disabledDates:e.disabledDates,allowedDates:e.allowedDates,highlight:f.value,markers:e.markers,timezone:I.value,isSpecific:e.monthPicker||e.yearPicker||e.quarterPicker})),q=G(()=>Di(e.range)),ae=G(()=>Oi(e.ui));return{defaultedTransitions:C,defaultedMultiCalendars:l,defaultedStartTime:i,defaultedAriaLabels:p,defaultedFilters:c,defaultedActionRow:m,defaultedPreviewFormat:v,defaultedTextInput:h,defaultedInline:k,defaultedConfig:Y,defaultedHighlight:f,defaultedWeekNumbers:S,defaultedRange:q,propDates:A,defaultedTz:I,defaultedMultiDates:U,defaultedUI:ae,getDefaultPattern:n,getDefaultStartTime:r}},$i=(e,t,n)=>{const a=Z(),{defaultedTextInput:r,defaultedRange:l,defaultedTz:i,defaultedMultiDates:p,getDefaultPattern:c}=Se(t),C=Z(""),m=ca(t,"format"),v=ca(t,"formatLocale");ct(a,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",a.value,z(!0))},{deep:!0}),ct(l,(u,le)=>{u.enabled!==le.enabled&&(a.value=null)}),ct(m,()=>{re()});const h=u=>i.value.timezone&&i.value.convertModel?nt(u,i.value.timezone):u,k=u=>{if(i.value.timezone&&i.value.convertModel){const le=Ko(i.value.timezone);return Xr(u,le)}return u},Y=(u,le,fe=!1)=>Dr(u,t.format,t.formatLocale,r.value.rangeSeparator,t.modelAuto,le??c(),fe),f=u=>u?t.modelType?b(u):{hours:Tt(u),minutes:Rt(u),seconds:t.enableSeconds?jt(u):0}:null,S=u=>t.modelType?b(u):{month:xe(u),year:he(u)},I=u=>Array.isArray(u)?p.value.enabled?u.map(le=>U(le,_t(Q(),le))):ka(()=>[_t(Q(),u[0]),u[1]?_t(Q(),u[1]):zt(l.value.partialRange)],l.value.enabled):_t(Q(),+u),U=(u,le)=>(typeof u=="string"||typeof u=="number")&&t.modelType?R(u):le,A=u=>Array.isArray(u)?[U(u[0],St(null,+u[0].hours,+u[0].minutes,u[0].seconds)),U(u[1],St(null,+u[1].hours,+u[1].minutes,u[1].seconds))]:U(u,St(null,u.hours,u.minutes,u.seconds)),q=u=>{const le=Ce(Q(),{date:1});return Array.isArray(u)?p.value.enabled?u.map(fe=>U(fe,Mt(le,+fe.month,+fe.year))):ka(()=>[U(u[0],Mt(le,+u[0].month,+u[0].year)),U(u[1],u[1]?Mt(le,+u[1].month,+u[1].year):zt(l.value.partialRange))],l.value.enabled):U(u,Mt(le,+u.month,+u.year))},ae=u=>{if(Array.isArray(u))return u.map(le=>R(le));throw new Error(kn.dateArr("multi-dates"))},E=u=>{if(Array.isArray(u)&&l.value.enabled){const le=u[0],fe=u[1];return[Q(Array.isArray(le)?le[0]:null),Array.isArray(fe)&&fe.length?Q(fe[0]):null]}return Q(u[0])},B=u=>t.modelAuto?Array.isArray(u)?[R(u[0]),R(u[1])]:t.autoApply?[R(u)]:[R(u),null]:Array.isArray(u)?ka(()=>u[1]?[R(u[0]),u[1]?R(u[1]):zt(l.value.partialRange)]:[R(u[0])],l.value.enabled):R(u),ne=()=>{Array.isArray(a.value)&&l.value.enabled&&a.value.length===1&&a.value.push(zt(l.value.partialRange))},F=()=>{const u=a.value;return[b(u[0]),u[1]?b(u[1]):zt(l.value.partialRange)]},N=()=>a.value[1]?F():b(qe(a.value[0])),ie=()=>(a.value||[]).map(u=>b(u)),ce=(u=!1)=>(u||ne(),t.modelAuto?N():p.value.enabled?ie():Array.isArray(a.value)?ka(()=>F(),l.value.enabled):b(qe(a.value))),pe=u=>!u||Array.isArray(u)&&!u.length?null:t.timePicker?A(qe(u)):t.monthPicker?q(qe(u)):t.yearPicker?I(qe(u)):p.value.enabled?ae(qe(u)):t.weekPicker?E(qe(u)):B(qe(u)),g=u=>{const le=pe(u);sn(qe(le))?(a.value=qe(le),re()):(a.value=null,C.value="")},D=()=>{const u=le=>kt(le,r.value.format);return`${u(a.value[0])} ${r.value.rangeSeparator} ${a.value[1]?u(a.value[1]):""}`},y=()=>n.value&&a.value?Array.isArray(a.value)?D():kt(a.value,r.value.format):Y(a.value),H=()=>a.value?p.value.enabled?a.value.map(u=>Y(u)).join("; "):r.value.enabled&&typeof r.value.format=="string"?y():Y(a.value):"",re=()=>{!t.format||typeof t.format=="string"||r.value.enabled&&typeof r.value.format=="string"?C.value=H():C.value=t.format(a.value)},R=u=>{if(t.utc){const le=new Date(u);return t.utc==="preserve"?new Date(le.getTime()+le.getTimezoneOffset()*6e4):le}return t.modelType?Jo.includes(t.modelType)?h(new Date(u)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?h(rn(u,c(),new Date,{locale:v.value})):h(rn(u,t.modelType,new Date,{locale:v.value})):h(new Date(u))},b=u=>u?t.utc?si(u,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+k(u):t.modelType==="iso"?k(u).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?Y(k(u)):Y(k(u),t.modelType,!0):k(u):"",oe=(u,le=!1,fe=!1)=>{if(fe)return u;if(e("update:model-value",u),i.value.emitTimezone&&le){const Ve=Array.isArray(u)?u.map(T=>nt(qe(T),i.value.emitTimezone)):nt(qe(u),i.value.emitTimezone);e("update:model-timezone-value",Ve)}},V=u=>Array.isArray(a.value)?p.value.enabled?a.value.map(le=>u(le)):[u(a.value[0]),a.value[1]?u(a.value[1]):zt(l.value.partialRange)]:u(qe(a.value)),M=()=>{if(Array.isArray(a.value)){const u=xt(a.value[0],t.weekStart),le=a.value[1]?xt(a.value[1],t.weekStart):[];return[u.map(fe=>Q(fe)),le.map(fe=>Q(fe))]}return xt(a.value,t.weekStart).map(u=>Q(u))},o=(u,le)=>oe(qe(V(u)),!1,le),w=u=>{const le=M();return u?le:e("update:model-value",M())},z=(u=!1)=>(u||re(),t.monthPicker?o(S,u):t.timePicker?o(f,u):t.yearPicker?o(he,u):t.weekPicker?w(u):oe(ce(u),!0,u));return{inputValue:C,internalModelValue:a,checkBeforeEmit:()=>a.value?l.value.enabled?l.value.partialRange?a.value.length>=1:a.value.length===2:!!a.value:!1,parseExternalModelValue:g,formatInputValue:re,emitModelValue:z}},Yi=(e,t)=>{const{defaultedFilters:n,propDates:a}=Se(e),{validateMonthYearInRange:r}=Et(e),l=(m,v)=>{let h=m;return n.value.months.includes(xe(h))?(h=v?ft(m,1):Jt(m,1),l(h,v)):h},i=(m,v)=>{let h=m;return n.value.years.includes(he(h))?(h=v?un(m,1):pr(m,1),i(h,v)):h},p=(m,v=!1)=>{const h=Ce(Q(),{month:e.month,year:e.year});let k=m?ft(h,1):Jt(h,1);e.disableYearSelect&&(k=_t(k,e.year));let Y=xe(k),f=he(k);n.value.months.includes(Y)&&(k=l(k,m),Y=xe(k),f=he(k)),n.value.years.includes(f)&&(k=i(k,m),f=he(k)),r(Y,f,m,e.preventMinMaxNavigation)&&c(Y,f,v)},c=(m,v,h)=>{t("update-month-year",{month:m,year:v,fromNav:h})},C=G(()=>m=>Mr(Ce(Q(),{month:e.month,year:e.year}),a.value.maxDate,a.value.minDate,e.preventMinMaxNavigation,m));return{handleMonthYearChange:p,isDisabled:C,updateMonthYear:c}},Ya={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},yt={...Ya,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},Si=["title"],Ri=["disabled"],Ii=ze({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...yt},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const n=t,a=e,{defaultedActionRow:r,defaultedPreviewFormat:l,defaultedMultiCalendars:i,defaultedTextInput:p,defaultedInline:c,defaultedRange:C,defaultedMultiDates:m}=Se(a),{isTimeValid:v,isMonthValid:h}=Et(a),{buildMatrix:k}=It(),Y=Z(null),f=Z(null),S=Z(!1),I=Z({}),U=Z(null),A=Z(null);Ke(()=>{a.arrowNavigation&&k([Fe(Y),Fe(f)],"actionRow"),q(),window.addEventListener("resize",q)}),Ca(()=>{window.removeEventListener("resize",q)});const q=()=>{S.value=!1,setTimeout(()=>{var g,D;const y=(g=U.value)==null?void 0:g.getBoundingClientRect(),H=(D=A.value)==null?void 0:D.getBoundingClientRect();y&&H&&(I.value.maxWidth=`${H.width-y.width-20}px`),S.value=!0},0)},ae=G(()=>C.value.enabled&&!C.value.partialRange&&a.internalModelValue?a.internalModelValue.length===2:!0),E=G(()=>!v.value(a.internalModelValue)||!h.value(a.internalModelValue)||!ae.value),B=()=>{const g=l.value;return a.timePicker||a.monthPicker,g(qe(a.internalModelValue))},ne=()=>{const g=a.internalModelValue;return i.value.count>0?`${F(g[0])} - ${F(g[1])}`:[F(g[0]),F(g[1])]},F=g=>Dr(g,l.value,a.formatLocale,p.value.rangeSeparator,a.modelAuto,l.value),N=G(()=>!a.internalModelValue||!a.menuMount?"":typeof l.value=="string"?Array.isArray(a.internalModelValue)?a.internalModelValue.length===2&&a.internalModelValue[1]?ne():m.value.enabled?a.internalModelValue.map(g=>`${F(g)}`):a.modelAuto?`${F(a.internalModelValue[0])}`:`${F(a.internalModelValue[0])} -`:F(a.internalModelValue):B()),ie=()=>m.value.enabled?"; ":" - ",ce=G(()=>Array.isArray(N.value)?N.value.join(ie()):N.value),pe=()=>{v.value(a.internalModelValue)&&h.value(a.internalModelValue)&&ae.value?n("select-date"):n("invalid-select")};return(g,D)=>(P(),W("div",{ref_key:"actionRowRef",ref:A,class:"dp__action_row"},[g.$slots["action-row"]?ue(g.$slots,"action-row",We(Qe({key:0},{internalModelValue:g.internalModelValue,disabled:E.value,selectDate:()=>g.$emit("select-date"),closePicker:()=>g.$emit("close-picker")}))):(P(),W(we,{key:1},[d(r).showPreview?(P(),W("div",{key:0,class:"dp__selection_preview",title:ce.value,style:dt(I.value)},[g.$slots["action-preview"]&&S.value?ue(g.$slots,"action-preview",{key:0,value:g.internalModelValue}):j("",!0),!g.$slots["action-preview"]&&S.value?(P(),W(we,{key:1},[Dt(Ge(ce.value),1)],64)):j("",!0)],12,Si)):j("",!0),ye("div",{ref_key:"actionBtnContainer",ref:U,class:"dp__action_buttons","data-dp-element":"action-row"},[g.$slots["action-buttons"]?ue(g.$slots,"action-buttons",{key:0,value:g.internalModelValue}):j("",!0),g.$slots["action-buttons"]?j("",!0):(P(),W(we,{key:1},[!d(c).enabled&&d(r).showCancel?(P(),W("button",{key:0,ref_key:"cancelButtonRef",ref:Y,type:"button",class:"dp__action_button dp__action_cancel",onClick:D[0]||(D[0]=y=>g.$emit("close-picker")),onKeydown:D[1]||(D[1]=y=>d(et)(y,()=>g.$emit("close-picker")))},Ge(g.cancelText),545)):j("",!0),d(r).showNow?(P(),W("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:D[2]||(D[2]=y=>g.$emit("select-now")),onKeydown:D[3]||(D[3]=y=>d(et)(y,()=>g.$emit("select-now")))},Ge(g.nowButtonLabel),33)):j("",!0),d(r).showSelect?(P(),W("button",{key:2,ref_key:"selectButtonRef",ref:f,type:"button",class:"dp__action_button dp__action_select",disabled:E.value,"data-test":"select-button",onKeydown:D[4]||(D[4]=y=>d(et)(y,()=>pe())),onClick:pe},Ge(g.selectText),41,Ri)):j("",!0)],64))],512)],64))],512))}}),Ei=["role","aria-label","tabindex"],Bi={class:"dp__selection_grid_header"},Ni=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],Li=["aria-label"],ya=ze({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:n}){const{setSelectionGrid:a,buildMultiLevelMatrix:r,setMonthPicker:l}=It(),i=n,p=e,{defaultedAriaLabels:c,defaultedTextInput:C,defaultedConfig:m}=Se(p),{hideNavigationButtons:v}=Ia(),h=Z(!1),k=Z(null),Y=Z(null),f=Z([]),S=Z(),I=Z(null),U=Z(0),A=Z(null);Hr(()=>{k.value=null}),Ke(()=>{it().then(()=>ie()),p.noOverlayFocus||ae(),q(!0)}),Ca(()=>q(!1));const q=V=>{var M;p.arrowNavigation&&((M=p.headerRefs)!=null&&M.length?l(V):a(V))},ae=()=>{var V;const M=Fe(Y);M&&(C.value.enabled||(k.value?(V=k.value)==null||V.focus({preventScroll:!0}):M.focus({preventScroll:!0})),h.value=M.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!p.useRelative,"dp--overlay-relative":p.useRelative})),B=G(()=>p.useRelative?{height:`${p.height}px`,width:"var(--dp-menu-min-width)"}:void 0),ne=G(()=>({dp__overlay_col:!0})),F=G(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:p.isLast})),N=G(()=>{var V,M;return{dp__overlay_container:!0,dp__container_flex:((V=p.items)==null?void 0:V.length)<=6,dp__container_block:((M=p.items)==null?void 0:M.length)>6}});ct(()=>p.items,()=>ie(!1),{deep:!0});const ie=(V=!0)=>{it().then(()=>{const M=Fe(k),o=Fe(Y),w=Fe(I),z=Fe(A),u=w?w.getBoundingClientRect().height:0;o&&(o.getBoundingClientRect().height?U.value=o.getBoundingClientRect().height-u:U.value=m.value.modeHeight-u),M&&z&&V&&(z.scrollTop=M.offsetTop-z.offsetTop-(U.value/2-M.getBoundingClientRect().height)-u)})},ce=V=>{V.disabled||i("selected",V.value)},pe=()=>{i("toggle"),i("reset-flow")},g=()=>{p.escClose&&pe()},D=(V,M,o,w)=>{V&&((M.active||M.value===p.focusValue)&&(k.value=V),p.arrowNavigation&&(Array.isArray(f.value[o])?f.value[o][w]=V:f.value[o]=[V],y()))},y=()=>{var V,M;const o=(V=p.headerRefs)!=null&&V.length?[p.headerRefs].concat(f.value):f.value.concat([p.skipButtonRef?[]:[I.value]]);r(qe(o),(M=p.headerRefs)!=null&&M.length?"monthPicker":"selectionGrid")},H=V=>{p.arrowNavigation||Yt(V,m.value,!0)},re=V=>{S.value=V,i("hover-value",V)},R=()=>{if(pe(),!p.isLast){const V=on(p.menuWrapRef??null,"action-row");if(V){const M=gr(V);M?.focus()}}},b=V=>{switch(V.key){case $e.esc:return g();case $e.arrowLeft:return H(V);case $e.arrowRight:return H(V);case $e.arrowUp:return H(V);case $e.arrowDown:return H(V);default:return}},oe=V=>{if(V.key===$e.enter)return pe();if(V.key===$e.tab)return R()};return t({focusGrid:ae}),(V,M)=>{var o;return P(),W("div",{ref_key:"gridWrapRef",ref:Y,class:ke(E.value),style:dt(B.value),role:V.useRelative?void 0:"dialog","aria-label":V.overlayLabel,tabindex:V.useRelative?void 0:"0",onKeydown:b,onClick:M[0]||(M[0]=va(()=>{},["prevent"]))},[ye("div",{ref_key:"containerRef",ref:A,class:ke(N.value),style:dt({"--dp-overlay-height":`${U.value}px`}),role:"grid"},[ye("div",Bi,[ue(V.$slots,"header")]),V.$slots.overlay?ue(V.$slots,"overlay",{key:0}):(P(!0),W(we,{key:1},Ye(V.items,(w,z)=>(P(),W("div",{key:z,class:ke(["dp__overlay_row",{dp__flex_row:V.items.length>=3}]),role:"row"},[(P(!0),W(we,null,Ye(w,(u,le)=>(P(),W("div",{key:u.value,ref_for:!0,ref:fe=>D(fe,u,z,le),role:"gridcell",class:ke(ne.value),"aria-selected":u.active||void 0,"aria-disabled":u.disabled||void 0,tabindex:"0","data-test":u.text,onClick:va(fe=>ce(u),["prevent"]),onKeydown:fe=>d(et)(fe,()=>ce(u),!0),onMouseover:fe=>re(u.value)},[ye("div",{class:ke(u.className)},[V.$slots.item?ue(V.$slots,"item",{key:0,item:u}):j("",!0),V.$slots.item?j("",!0):(P(),W(we,{key:1},[Dt(Ge(u.text),1)],64))],2)],42,Ni))),128))],2))),128))],6),V.$slots["button-icon"]?Ma((P(),W("button",{key:0,ref_key:"toggleButton",ref:I,type:"button","aria-label":(o=d(c))==null?void 0:o.toggleOverlay,class:ke(F.value),tabindex:"0",onClick:pe,onKeydown:oe},[ue(V.$slots,"button-icon")],42,Li)),[[Da,!d(v)(V.hideNavigation,V.type)]]):j("",!0)],46,Ei)}}}),Sa=ze({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(e){const t=e,n=G(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),a=G(()=>({dp__instance_calendar:t.multiCalendars>0}));return(r,l)=>(P(),W("div",{class:ke({dp__menu_inner:!r.stretch,"dp--menu--inner-stretched":r.stretch,dp__flex_display:r.multiCalendars>0,"dp--flex-display-collapsed":r.collapse})},[(P(!0),W(we,null,Ye(n.value,(i,p)=>(P(),W("div",{key:i,class:ke(a.value)},[ue(r.$slots,"default",{instance:i,index:p})],2))),128))],2))}}),Hi=["data-dp-element","aria-label","aria-disabled"],da=ze({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const n=t,a=Z(null);return Ke(()=>n("set-ref",a)),(r,l)=>(P(),W("button",{ref_key:"elRef",ref:a,type:"button","data-dp-element":r.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":r.ariaLabel,"aria-disabled":r.disabled||void 0,onClick:l[0]||(l[0]=i=>r.$emit("activate")),onKeydown:l[1]||(l[1]=i=>d(et)(i,()=>r.$emit("activate"),!0))},[ye("span",{class:ke(["dp__inner_nav",{dp__inner_nav_disabled:r.disabled}])},[ue(r.$slots,"default")],2)],40,Hi))}}),Vi=["aria-label","data-test"],Cr=ze({__name:"YearModePicker",props:{...yt,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const n=t,a=e,{showRightIcon:r,showLeftIcon:l}=Ia(),{defaultedConfig:i,defaultedMultiCalendars:p,defaultedAriaLabels:c,defaultedTransitions:C,defaultedUI:m}=Se(a),{showTransition:v,transitionName:h}=ga(C),k=Z(!1),Y=(I=!1,U)=>{k.value=!k.value,n("toggle-year-picker",{flow:I,show:U})},f=I=>{k.value=!1,n("year-select",I)},S=(I=!1)=>{n("handle-year",I)};return(I,U)=>{var A,q,ae,E,B;return P(),W(we,null,[ye("div",{class:ke(["dp--year-mode-picker",{"dp--hidden-el":k.value}])},[d(l)(d(p),e.instance)?(P(),De(da,{key:0,ref:"mpPrevIconRef","aria-label":(A=d(c))==null?void 0:A.prevYear,disabled:e.isDisabled(!1),class:ke((q=d(m))==null?void 0:q.navBtnPrev),onActivate:U[0]||(U[0]=ne=>S(!1))},{default:_e(()=>[I.$slots["arrow-left"]?ue(I.$slots,"arrow-left",{key:0}):j("",!0),I.$slots["arrow-left"]?j("",!0):(P(),De(d(fn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):j("",!0),ye("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${e.year}-${(ae=d(c))==null?void 0:ae.openYearsOverlay}`,"data-test":`year-mode-btn-${e.instance}`,onClick:U[1]||(U[1]=()=>Y(!1)),onKeydown:U[2]||(U[2]=Vr(()=>Y(!1),["enter"]))},[I.$slots.year?ue(I.$slots,"year",{key:0,year:e.year}):j("",!0),I.$slots.year?j("",!0):(P(),W(we,{key:1},[Dt(Ge(e.year),1)],64))],40,Vi),d(r)(d(p),e.instance)?(P(),De(da,{key:1,ref:"mpNextIconRef","aria-label":(E=d(c))==null?void 0:E.nextYear,disabled:e.isDisabled(!0),class:ke((B=d(m))==null?void 0:B.navBtnNext),onActivate:U[3]||(U[3]=ne=>S(!0))},{default:_e(()=>[I.$slots["arrow-right"]?ue(I.$slots,"arrow-right",{key:0}):j("",!0),I.$slots["arrow-right"]?j("",!0):(P(),De(d(hn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):j("",!0)],2),ot(ta,{name:d(h)(e.showYearPicker),css:d(v)},{default:_e(()=>{var ne,F;return[e.showYearPicker?(P(),De(ya,{key:0,items:e.items,"text-input":I.textInput,"esc-close":I.escClose,config:I.config,"is-last":I.autoApply&&!d(i).keepActionRow,"hide-navigation":I.hideNavigation,"aria-labels":I.ariaLabels,"overlay-label":(F=(ne=d(c))==null?void 0:ne.yearPicker)==null?void 0:F.call(ne,!0),type:"year",onToggle:Y,onSelected:U[4]||(U[4]=N=>f(N))},je({"button-icon":_e(()=>[I.$slots["calendar-icon"]?ue(I.$slots,"calendar-icon",{key:0}):j("",!0),I.$slots["calendar-icon"]?j("",!0):(P(),De(d(aa),{key:1}))]),_:2},[I.$slots["year-overlay-value"]?{name:"item",fn:_e(({item:N})=>[ue(I.$slots,"year-overlay-value",{text:N.text,value:N.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):j("",!0)]}),_:3},8,["name","css"])],64)}}}),Dn=(e,t,n)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(a=>Me(e,a))){const a=t.value.filter(r=>!Me(r,e));t.value=a.length?a:null}else(n&&+n>t.value.length||!n)&&t.value.push(e);else t.value=[e]},Tn=(e,t,n)=>{let a=e.value?e.value.slice():[];return a.length===2&&a[1]!==null&&(a=[]),a.length?Ie(t,a[0])?(a.unshift(t),n("range-start",a[0]),n("range-start",a[1])):(a[1]=t,n("range-end",t)):(a=[t],n("range-start",t)),a},Ra=(e,t,n,a)=>{e&&(e[0]&&e[1]&&n&&t("auto-apply"),e[0]&&!e[1]&&a&&n&&t("auto-apply"))},Or=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>nt(Q(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=nt(Q(e.value),e.timezone))},$r=(e,t,n,a)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&a.value.partialRange)?a.value.fixedStart&&(Ne(e,t.value[0])||Me(e,t.value[0]))?[t.value[0],e]:a.value.fixedEnd&&(Ie(e,t.value[1])||Me(e,t.value[1]))?[e,t.value[1]]:(n("invalid-fixed-range",e),t.value):[],Yr=({multiCalendars:e,range:t,highlight:n,propDates:a,calendars:r,modelValue:l,props:i,filters:p,year:c,month:C,emit:m})=>{const v=G(()=>_n(i.yearRange,i.locale,i.reverseYears)),h=Z([!1]),k=G(()=>(N,ie)=>{const ce=Ce(pt(new Date),{month:C.value(N),year:c.value(N)}),pe=ie?tr(ce):ma(ce);return Mr(pe,a.value.maxDate,a.value.minDate,i.preventMinMaxNavigation,ie)}),Y=()=>Array.isArray(l.value)&&e.value.solo&&l.value[1],f=()=>{for(let N=0;N{if(!N)return f();const ie=Ce(Q(),r.value[N]);return r.value[0].year=he(pr(ie,e.value.count-1)),f()},I=(N,ie)=>{const ce=Zr(ie,N);return t.value.showLastInRange&&ce>1?ie:N},U=N=>i.focusStartDate||e.value.solo?N[0]:N[1]?I(N[0],N[1]):N[0],A=()=>{if(l.value){const N=Array.isArray(l.value)?U(l.value):l.value;r.value[0]={month:xe(N),year:he(N)}}},q=()=>{A(),e.value.count&&f()};ct(l,(N,ie)=>{i.isTextInputDate&&JSON.stringify(N??{})!==JSON.stringify(ie??{})&&q()}),Ke(()=>{q()});const ae=(N,ie)=>{r.value[ie].year=N,m("update-month-year",{instance:ie,year:N,month:r.value[ie].month}),e.value.count&&!e.value.solo&&S(ie)},E=G(()=>N=>Zt(v.value,ie=>{var ce;const pe=c.value(N)===ie.value,g=fa(ie.value,ea(a.value.minDate),ea(a.value.maxDate))||((ce=p.value.years)==null?void 0:ce.includes(c.value(N))),D=Mn(n.value,ie.value);return{active:pe,disabled:g,highlighted:D}})),B=(N,ie)=>{ae(N,ie),F(ie)},ne=(N,ie=!1)=>{if(!k.value(N,ie)){const ce=ie?c.value(N)+1:c.value(N)-1;ae(ce,N)}},F=(N,ie=!1,ce)=>{ie||m("reset-flow"),ce!==void 0?h.value[N]=ce:h.value[N]=!h.value[N],h.value[N]?m("overlay-toggle",{open:!0,overlay:Xe.year}):(m("overlay-closed"),m("overlay-toggle",{open:!1,overlay:Xe.year}))};return{isDisabled:k,groupedYears:E,showYearPicker:h,selectYear:ae,toggleYearPicker:F,handleYearSelect:B,handleYear:ne}},Fi=(e,t)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:a,defaultedTransitions:r,defaultedConfig:l,defaultedRange:i,defaultedHighlight:p,propDates:c,defaultedTz:C,defaultedFilters:m,defaultedMultiDates:v}=Se(e),h=()=>{e.isTextInputDate&&q(he(Q(e.startDate)),0)},{modelValue:k,year:Y,month:f,calendars:S}=ba(e,t,h),I=G(()=>hr(e.formatLocale,e.locale,e.monthNameFormat)),U=Z(null),{checkMinMaxRange:A}=Et(e),{selectYear:q,groupedYears:ae,showYearPicker:E,toggleYearPicker:B,handleYearSelect:ne,handleYear:F,isDisabled:N}=Yr({modelValue:k,multiCalendars:n,range:i,highlight:p,calendars:S,year:Y,propDates:c,month:f,filters:m,props:e,emit:t});Ke(()=>{e.startDate&&(k.value&&e.focusStartDate||!k.value)&&q(he(Q(e.startDate)),0)});const ie=o=>o?{month:xe(o),year:he(o)}:{month:null,year:null},ce=()=>k.value?Array.isArray(k.value)?k.value.map(o=>ie(o)):ie(k.value):ie(),pe=(o,w)=>{const z=S.value[o],u=ce();return Array.isArray(u)?u.some(le=>le.year===z?.year&&le.month===w):z?.year===u.year&&w===u.month},g=(o,w,z)=>{var u,le;const fe=ce();return Array.isArray(fe)?Y.value(w)===((u=fe[z])==null?void 0:u.year)&&o===((le=fe[z])==null?void 0:le.month):!1},D=(o,w)=>{if(i.value.enabled){const z=ce();if(Array.isArray(k.value)&&Array.isArray(z)){const u=g(o,w,0)||g(o,w,1),le=Mt(pt(Q()),o,Y.value(w));return $a(k.value,U.value,le)&&!u}return!1}return!1},y=G(()=>o=>Zt(I.value,w=>{var z;const u=pe(o,w.value),le=fa(w.value,wr(Y.value(o),c.value.minDate),_r(Y.value(o),c.value.maxDate))||mi(c.value.disabledDates,Y.value(o)).includes(w.value)||((z=m.value.months)==null?void 0:z.includes(w.value)),fe=D(w.value,o),Ve=Tr(p.value,w.value,Y.value(o));return{active:u,disabled:le,isBetween:fe,highlighted:Ve}})),H=(o,w)=>Mt(pt(Q()),o,Y.value(w)),re=(o,w)=>{const z=k.value?k.value:pt(new Date);k.value=Mt(z,o,Y.value(w)),t("auto-apply"),t("update-flow-step")},R=(o,w)=>{const z=H(o,w);i.value.fixedEnd||i.value.fixedStart?k.value=$r(z,k,t,i):k.value?A(z,k.value)&&(k.value=Tn(k,H(o,w),t)):k.value=[H(o,w)],it().then(()=>{Ra(k.value,t,e.autoApply,e.modelAuto)})},b=(o,w)=>{Dn(H(o,w),k,v.value.limit),t("auto-apply",!0)},oe=(o,w)=>(S.value[w].month=o,M(w,S.value[w].year,o),v.value.enabled?b(o,w):i.value.enabled?R(o,w):re(o,w)),V=(o,w)=>{q(o,w),M(w,o,null)},M=(o,w,z)=>{let u=z;if(!u&&u!==0){const le=ce();u=Array.isArray(le)?le[o].month:le.month}t("update-month-year",{instance:o,year:w,month:u})};return{groupedMonths:y,groupedYears:ae,year:Y,isDisabled:N,defaultedMultiCalendars:n,defaultedAriaLabels:a,defaultedTransitions:r,defaultedConfig:l,showYearPicker:E,modelValue:k,presetDate:(o,w)=>{Or({value:o,modelValue:k,range:i.value.enabled,timezone:w?void 0:C.value.timezone}),t("auto-apply")},setHoverDate:(o,w)=>{U.value=H(o,w)},selectMonth:oe,selectYear:V,toggleYearPicker:B,handleYearSelect:ne,handleYear:F,getModelMonthYear:ce}},qi=ze({compatConfig:{MODE:3},__name:"MonthPicker",props:{...yt},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(e,{expose:t,emit:n}){const a=n,r=qt(),l=lt(r,"yearMode"),i=e;Ke(()=>{i.shadow||a("mount",null)});const{groupedMonths:p,groupedYears:c,year:C,isDisabled:m,defaultedMultiCalendars:v,defaultedConfig:h,showYearPicker:k,modelValue:Y,presetDate:f,setHoverDate:S,selectMonth:I,selectYear:U,toggleYearPicker:A,handleYearSelect:q,handleYear:ae,getModelMonthYear:E}=Fi(i,a);return t({getSidebarProps:()=>({modelValue:Y,year:C,getModelMonthYear:E,selectMonth:I,selectYear:U,handleYear:ae}),presetDate:f,toggleYearPicker:B=>A(0,B)}),(B,ne)=>(P(),De(Sa,{"multi-calendars":d(v).count,collapse:B.collapse,stretch:""},{default:_e(({instance:F})=>[B.$slots["top-extra"]?ue(B.$slots,"top-extra",{key:0,value:B.internalModelValue}):j("",!0),B.$slots["month-year"]?ue(B.$slots,"month-year",We(Qe({key:1},{year:d(C),months:d(p)(F),years:d(c)(F),selectMonth:d(I),selectYear:d(U),instance:F}))):(P(),De(ya,{key:2,items:d(p)(F),"arrow-navigation":B.arrowNavigation,"is-last":B.autoApply&&!d(h).keepActionRow,"esc-close":B.escClose,height:d(h).modeHeight,config:B.config,"no-overlay-focus":!!(B.noOverlayFocus||B.textInput),"use-relative":"",type:"month",onSelected:N=>d(I)(N,F),onHoverValue:N=>d(S)(N,F)},je({header:_e(()=>[ot(Cr,Qe(B.$props,{items:d(c)(F),instance:F,"show-year-picker":d(k)[F],year:d(C)(F),"is-disabled":N=>d(m)(F,N),onHandleYear:N=>d(ae)(F,N),onYearSelect:N=>d(q)(N,F),onToggleYearPicker:N=>d(A)(F,N?.flow,N?.show)}),je({_:2},[Ye(d(l),(N,ie)=>({name:N,fn:_e(ce=>[ue(B.$slots,N,We(at(ce)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[B.$slots["month-overlay-value"]?{name:"item",fn:_e(({item:N})=>[ue(B.$slots,"month-overlay-value",{text:N.text,value:N.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),Wi=(e,t)=>{const n=()=>{e.isTextInputDate&&(m.value=he(Q(e.startDate)))},{modelValue:a}=ba(e,t,n),r=Z(null),{defaultedHighlight:l,defaultedMultiDates:i,defaultedFilters:p,defaultedRange:c,propDates:C}=Se(e),m=Z();Ke(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(m.value=he(Q(e.startDate)))});const v=f=>Array.isArray(a.value)?a.value.some(S=>he(S)===f):a.value?he(a.value)===f:!1,h=f=>c.value.enabled&&Array.isArray(a.value)?$a(a.value,r.value,Y(f)):!1,k=G(()=>Zt(_n(e.yearRange,e.locale,e.reverseYears),f=>{const S=v(f.value),I=fa(f.value,ea(C.value.minDate),ea(C.value.maxDate))||p.value.years.includes(f.value),U=h(f.value)&&!S,A=Mn(l.value,f.value);return{active:S,disabled:I,isBetween:U,highlighted:A}})),Y=f=>_t(pt(ma(new Date)),f);return{groupedYears:k,modelValue:a,focusYear:m,setHoverValue:f=>{r.value=_t(pt(new Date),f)},selectYear:f=>{var S;if(t("update-month-year",{instance:0,year:f}),i.value.enabled)return a.value?Array.isArray(a.value)&&(((S=a.value)==null?void 0:S.map(I=>he(I))).includes(f)?a.value=a.value.filter(I=>he(I)!==f):a.value.push(_t(tt(Q()),f))):a.value=[_t(tt(ma(Q())),f)],t("auto-apply",!0);c.value.enabled?(a.value=Tn(a,Y(f),t),it().then(()=>{Ra(a.value,t,e.autoApply,e.modelAuto)})):(a.value=Y(f),t("auto-apply"))}}},Qi=ze({compatConfig:{MODE:3},__name:"YearPicker",props:{...yt},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:n}){const a=n,r=e,{groupedYears:l,modelValue:i,focusYear:p,selectYear:c,setHoverValue:C}=Wi(r,a),{defaultedConfig:m}=Se(r);return t({getSidebarProps:()=>({modelValue:i,selectYear:c})}),(v,h)=>(P(),W("div",null,[v.$slots["top-extra"]?ue(v.$slots,"top-extra",{key:0,value:v.internalModelValue}):j("",!0),v.$slots["month-year"]?ue(v.$slots,"month-year",We(Qe({key:1},{years:d(l),selectYear:d(c)}))):(P(),De(ya,{key:2,items:d(l),"is-last":v.autoApply&&!d(m).keepActionRow,height:d(m).modeHeight,config:v.config,"no-overlay-focus":!!(v.noOverlayFocus||v.textInput),"focus-value":d(p),type:"year","use-relative":"",onSelected:d(c),onHoverValue:d(C)},je({_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:_e(({item:k})=>[ue(v.$slots,"year-overlay-value",{text:k.text,value:k.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),zi={key:0,class:"dp__time_input"},Ui=["data-test","aria-label","onKeydown","onClick","onMousedown"],Xi=["aria-label","disabled","data-test","onKeydown","onClick"],Gi=["data-test","aria-label","onKeydown","onClick","onMousedown"],ji={key:0},Ki=["aria-label"],Ji=ze({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...yt},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:n}){const a=n,r=e,{setTimePickerElements:l,setTimePickerBackRef:i}=It(),{defaultedAriaLabels:p,defaultedTransitions:c,defaultedFilters:C,defaultedConfig:m,defaultedRange:v}=Se(r),{transitionName:h,showTransition:k}=ga(c),Y=ha({hours:!1,minutes:!1,seconds:!1}),f=Z("AM"),S=Z(null),I=Z([]),U=Z(),A=Z(!1);Ke(()=>{a("mounted")});const q=s=>Ce(new Date,{hours:s.hours,minutes:s.minutes,seconds:r.enableSeconds?s.seconds:0,milliseconds:0}),ae=G(()=>s=>H(s,r[s])||B(s,r[s])),E=G(()=>({hours:r.hours,minutes:r.minutes,seconds:r.seconds})),B=(s,L)=>v.value.enabled&&!v.value.disableTimeRangeValidation?!r.validateTime(s,L):!1,ne=(s,L)=>{if(v.value.enabled&&!v.value.disableTimeRangeValidation){const J=L?+r[`${s}Increment`]:-+r[`${s}Increment`],$=r[s]+J;return!r.validateTime(s,$)}return!1},F=G(()=>s=>!V(+r[s]+ +r[`${s}Increment`],s)||ne(s,!0)),N=G(()=>s=>!V(+r[s]-+r[`${s}Increment`],s)||ne(s,!1)),ie=(s,L)=>Xn(Ce(Q(),s),L),ce=(s,L)=>Go(Ce(Q(),s),L),pe=G(()=>({dp__time_col:!0,dp__time_col_block:!r.timePickerInline,dp__time_col_reg_block:!r.enableSeconds&&r.is24&&!r.timePickerInline,dp__time_col_reg_inline:!r.enableSeconds&&r.is24&&r.timePickerInline,dp__time_col_reg_with_button:!r.enableSeconds&&!r.is24,dp__time_col_sec:r.enableSeconds&&r.is24,dp__time_col_sec_with_button:r.enableSeconds&&!r.is24})),g=G(()=>{const s=[{type:"hours"}];return r.enableMinutes&&s.push({type:"",separator:!0},{type:"minutes"}),r.enableSeconds&&s.push({type:"",separator:!0},{type:"seconds"}),s}),D=G(()=>g.value.filter(s=>!s.separator)),y=G(()=>s=>{if(s==="hours"){const L=le(+r.hours);return{text:L<10?`0${L}`:`${L}`,value:L}}return{text:r[s]<10?`0${r[s]}`:`${r[s]}`,value:r[s]}}),H=(s,L)=>{var J;if(!r.disabledTimesConfig)return!1;const $=r.disabledTimesConfig(r.order,s==="hours"?L:void 0);return $[s]?!!((J=$[s])!=null&&J.includes(L)):!0},re=(s,L)=>L!=="hours"||f.value==="AM"?s:s+12,R=s=>{const L=r.is24?24:12,J=s==="hours"?L:60,$=+r[`${s}GridIncrement`],ge=s==="hours"&&!r.is24?$:0,x=[];for(let X=ge;X({active:!1,disabled:C.value.times[s].includes(X.value)||!V(X.value,s)||H(s,X.value)||B(s,X.value)}))},b=s=>s>=0?s:59,oe=s=>s>=0?s:23,V=(s,L)=>{const J=r.minTime?q(za(r.minTime)):null,$=r.maxTime?q(za(r.maxTime)):null,ge=q(za(E.value,L,L==="minutes"||L==="seconds"?b(s):oe(s)));return J&&$?(pa(ge,$)||Xt(ge,$))&&(Kt(ge,J)||Xt(ge,J)):J?Kt(ge,J)||Xt(ge,J):$?pa(ge,$)||Xt(ge,$):!0},M=s=>r[`no${s[0].toUpperCase()+s.slice(1)}Overlay`],o=s=>{M(s)||(Y[s]=!Y[s],Y[s]?(A.value=!0,a("overlay-opened",s)):(A.value=!1,a("overlay-closed",s)))},w=s=>s==="hours"?Tt:s==="minutes"?Rt:jt,z=()=>{U.value&&clearTimeout(U.value)},u=(s,L=!0,J)=>{const $=L?ie:ce,ge=L?+r[`${s}Increment`]:-+r[`${s}Increment`];V(+r[s]+ge,s)&&a(`update:${s}`,w(s)($({[s]:+r[s]},{[s]:+r[`${s}Increment`]}))),!(J!=null&&J.keyboard)&&m.value.timeArrowHoldThreshold&&(U.value=setTimeout(()=>{u(s,L)},m.value.timeArrowHoldThreshold))},le=s=>r.is24?s:(s>=12?f.value="PM":f.value="AM",ti(s)),fe=()=>{f.value==="PM"?(f.value="AM",a("update:hours",r.hours-12)):(f.value="PM",a("update:hours",r.hours+12)),a("am-pm-change",f.value)},Ve=s=>{Y[s]=!0},T=(s,L,J)=>{if(s&&r.arrowNavigation){Array.isArray(I.value[L])?I.value[L][J]=s:I.value[L]=[s];const $=I.value.reduce((ge,x)=>x.map((X,de)=>[...ge[de]||[],x[de]]),[]);i(r.closeTimePickerBtn),S.value&&($[1]=$[1].concat(S.value)),l($,r.order)}},K=(s,L)=>(o(s),a(`update:${s}`,L));return t({openChildCmp:Ve}),(s,L)=>{var J;return s.disabled?j("",!0):(P(),W("div",zi,[(P(!0),W(we,null,Ye(g.value,($,ge)=>{var x,X,de;return P(),W("div",{key:ge,class:ke(pe.value)},[$.separator?(P(),W(we,{key:0},[A.value?j("",!0):(P(),W(we,{key:0},[Dt(":")],64))],64)):(P(),W(we,{key:1},[ye("button",{ref_for:!0,ref:be=>T(be,ge,0),type:"button",class:ke({dp__btn:!0,dp__inc_dec_button:!s.timePickerInline,dp__inc_dec_button_inline:s.timePickerInline,dp__tp_inline_btn_top:s.timePickerInline,dp__inc_dec_button_disabled:F.value($.type),"dp--hidden-el":A.value}),"data-test":`${$.type}-time-inc-btn-${r.order}`,"aria-label":(x=d(p))==null?void 0:x.incrementValue($.type),tabindex:"0",onKeydown:be=>d(et)(be,()=>u($.type,!0,{keyboard:!0}),!0),onClick:be=>d(m).timeArrowHoldThreshold?void 0:u($.type,!0),onMousedown:be=>d(m).timeArrowHoldThreshold?u($.type,!0):void 0,onMouseup:z},[r.timePickerInline?(P(),W(we,{key:1},[s.$slots["tp-inline-arrow-up"]?ue(s.$slots,"tp-inline-arrow-up",{key:0}):(P(),W(we,{key:1},[L[2]||(L[2]=ye("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),L[3]||(L[3]=ye("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(P(),W(we,{key:0},[s.$slots["arrow-up"]?ue(s.$slots,"arrow-up",{key:0}):j("",!0),s.$slots["arrow-up"]?j("",!0):(P(),De(d(gn),{key:1}))],64))],42,Ui),ye("button",{ref_for:!0,ref:be=>T(be,ge,1),type:"button","aria-label":`${y.value($.type).text}-${(X=d(p))==null?void 0:X.openTpOverlay($.type)}`,class:ke({dp__time_display:!0,dp__time_display_block:!s.timePickerInline,dp__time_display_inline:s.timePickerInline,"dp--time-invalid":ae.value($.type),"dp--time-overlay-btn":!ae.value($.type),"dp--hidden-el":A.value}),disabled:M($.type),tabindex:"0","data-test":`${$.type}-toggle-overlay-btn-${r.order}`,onKeydown:be=>d(et)(be,()=>o($.type),!0),onClick:be=>o($.type)},[s.$slots[$.type]?ue(s.$slots,$.type,{key:0,text:y.value($.type).text,value:y.value($.type).value}):j("",!0),s.$slots[$.type]?j("",!0):(P(),W(we,{key:1},[Dt(Ge(y.value($.type).text),1)],64))],42,Xi),ye("button",{ref_for:!0,ref:be=>T(be,ge,2),type:"button",class:ke({dp__btn:!0,dp__inc_dec_button:!s.timePickerInline,dp__inc_dec_button_inline:s.timePickerInline,dp__tp_inline_btn_bottom:s.timePickerInline,dp__inc_dec_button_disabled:N.value($.type),"dp--hidden-el":A.value}),"data-test":`${$.type}-time-dec-btn-${r.order}`,"aria-label":(de=d(p))==null?void 0:de.decrementValue($.type),tabindex:"0",onKeydown:be=>d(et)(be,()=>u($.type,!1,{keyboard:!0}),!0),onClick:be=>d(m).timeArrowHoldThreshold?void 0:u($.type,!1),onMousedown:be=>d(m).timeArrowHoldThreshold?u($.type,!1):void 0,onMouseup:z},[r.timePickerInline?(P(),W(we,{key:1},[s.$slots["tp-inline-arrow-down"]?ue(s.$slots,"tp-inline-arrow-down",{key:0}):(P(),W(we,{key:1},[L[4]||(L[4]=ye("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),L[5]||(L[5]=ye("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(P(),W(we,{key:0},[s.$slots["arrow-down"]?ue(s.$slots,"arrow-down",{key:0}):j("",!0),s.$slots["arrow-down"]?j("",!0):(P(),De(d(bn),{key:1}))],64))],42,Gi)],64))],2)}),128)),s.is24?j("",!0):(P(),W("div",ji,[s.$slots["am-pm-button"]?ue(s.$slots,"am-pm-button",{key:0,toggle:fe,value:f.value}):j("",!0),s.$slots["am-pm-button"]?j("",!0):(P(),W("button",{key:1,ref_key:"amPmButton",ref:S,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(J=d(p))==null?void 0:J.amPmButton,tabindex:"0",onClick:fe,onKeydown:L[0]||(L[0]=$=>d(et)($,()=>fe(),!0))},Ge(f.value),41,Ki))])),(P(!0),W(we,null,Ye(D.value,($,ge)=>(P(),De(ta,{key:ge,name:d(h)(Y[$.type]),css:d(k)},{default:_e(()=>{var x,X;return[Y[$.type]?(P(),De(ya,{key:0,items:R($.type),"is-last":s.autoApply&&!d(m).keepActionRow,"esc-close":s.escClose,type:$.type,"text-input":s.textInput,config:s.config,"arrow-navigation":s.arrowNavigation,"aria-labels":s.ariaLabels,"overlay-label":(X=(x=d(p)).timeOverlay)==null?void 0:X.call(x,$.type),onSelected:de=>K($.type,de),onToggle:de=>o($.type),onResetFlow:L[1]||(L[1]=de=>s.$emit("reset-flow"))},je({"button-icon":_e(()=>[s.$slots["clock-icon"]?ue(s.$slots,"clock-icon",{key:0}):j("",!0),s.$slots["clock-icon"]?j("",!0):(P(),De(Oa(s.timePickerInline?d(aa):d(yn)),{key:1}))]),_:2},[s.$slots[`${$.type}-overlay-value`]?{name:"item",fn:_e(({item:de})=>[ue(s.$slots,`${$.type}-overlay-value`,{text:de.text,value:de.value})]),key:"0"}:void 0,s.$slots[`${$.type}-overlay-header`]?{name:"header",fn:_e(()=>[ue(s.$slots,`${$.type}-overlay-header`,{toggle:()=>o($.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):j("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),Zi={class:"dp--tp-wrap"},es=["aria-label","tabindex"],ts=["role","aria-label","tabindex"],as=["aria-label"],Sr=ze({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...yt},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:n}){const a=n,r=e,{buildMatrix:l,setTimePicker:i}=It(),p=qt(),{defaultedTransitions:c,defaultedAriaLabels:C,defaultedTextInput:m,defaultedConfig:v,defaultedRange:h}=Se(r),{transitionName:k,showTransition:Y}=ga(c),{hideNavigationButtons:f}=Ia(),S=Z(null),I=Z(null),U=Z([]),A=Z(null),q=Z(!1);Ke(()=>{a("mount"),!r.timePicker&&r.arrowNavigation?l([Fe(S.value)],"time"):i(!0,r.timePicker)});const ae=G(()=>h.value.enabled&&r.modelAuto?yr(r.internalModelValue):!0),E=Z(!1),B=R=>({hours:Array.isArray(r.hours)?r.hours[R]:r.hours,minutes:Array.isArray(r.minutes)?r.minutes[R]:r.minutes,seconds:Array.isArray(r.seconds)?r.seconds[R]:r.seconds}),ne=G(()=>{const R=[];if(h.value.enabled)for(let b=0;b<2;b++)R.push(B(b));else R.push(B(0));return R}),F=(R,b=!1,oe="")=>{b||a("reset-flow"),E.value=R,a(R?"overlay-opened":"overlay-closed",Xe.time),r.arrowNavigation&&i(R),it(()=>{oe!==""&&U.value[0]&&U.value[0].openChildCmp(oe)})},N=G(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:r.autoApply&&!v.value.keepActionRow})),ie=lt(p,"timePicker"),ce=(R,b,oe)=>h.value.enabled?b===0?[R,ne.value[1][oe]]:[ne.value[0][oe],R]:R,pe=R=>{a("update:hours",R)},g=R=>{a("update:minutes",R)},D=R=>{a("update:seconds",R)},y=()=>{if(A.value&&!m.value.enabled&&!r.noOverlayFocus){const R=gr(A.value);R&&R.focus({preventScroll:!0})}},H=R=>{q.value=!1,a("overlay-closed",R)},re=R=>{q.value=!0,a("overlay-opened",R)};return t({toggleTimePicker:F}),(R,b)=>{var oe;return P(),W("div",Zi,[!R.timePicker&&!R.timePickerInline?Ma((P(),W("button",{key:0,ref_key:"openTimePickerBtn",ref:S,type:"button",class:ke({...N.value,"dp--hidden-el":E.value}),"aria-label":(oe=d(C))==null?void 0:oe.openTimePicker,tabindex:R.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:b[0]||(b[0]=V=>d(et)(V,()=>F(!0))),onClick:b[1]||(b[1]=V=>F(!0))},[R.$slots["clock-icon"]?ue(R.$slots,"clock-icon",{key:0}):j("",!0),R.$slots["clock-icon"]?j("",!0):(P(),De(d(yn),{key:1}))],42,es)),[[Da,!d(f)(R.hideNavigation,"time")]]):j("",!0),ot(ta,{name:d(k)(E.value),css:d(Y)&&!R.timePickerInline},{default:_e(()=>{var V,M;return[E.value||R.timePicker||R.timePickerInline?(P(),W("div",{key:0,ref_key:"overlayRef",ref:A,role:R.timePickerInline?void 0:"dialog",class:ke({dp__overlay:!R.timePickerInline,"dp--overlay-absolute":!r.timePicker&&!R.timePickerInline,"dp--overlay-relative":r.timePicker}),style:dt(R.timePicker?{height:`${d(v).modeHeight}px`}:void 0),"aria-label":(V=d(C))==null?void 0:V.timePicker,tabindex:R.timePickerInline?void 0:0},[ye("div",{class:ke(R.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[R.$slots["time-picker-overlay"]?ue(R.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:pe,setMinutes:g,setSeconds:D}):j("",!0),R.$slots["time-picker-overlay"]?j("",!0):(P(),W("div",{key:1,class:ke(R.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(P(!0),W(we,null,Ye(ne.value,(o,w)=>Ma((P(),De(Ji,Qe({key:w,ref_for:!0},{...R.$props,order:w,hours:o.hours,minutes:o.minutes,seconds:o.seconds,closeTimePickerBtn:I.value,disabledTimesConfig:e.disabledTimesConfig,disabled:w===0?d(h).fixedStart:d(h).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:U,"validate-time":(z,u)=>e.validateTime(z,ce(u,w,z)),"onUpdate:hours":z=>pe(ce(z,w,"hours")),"onUpdate:minutes":z=>g(ce(z,w,"minutes")),"onUpdate:seconds":z=>D(ce(z,w,"seconds")),onMounted:y,onOverlayClosed:H,onOverlayOpened:re,onAmPmChange:b[2]||(b[2]=z=>R.$emit("am-pm-change",z))}),je({_:2},[Ye(d(ie),(z,u)=>({name:z,fn:_e(le=>[ue(R.$slots,z,Qe({ref_for:!0},le))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[Da,w===0?!0:ae.value]])),128))],2)),!R.timePicker&&!R.timePickerInline?Ma((P(),W("button",{key:2,ref_key:"closeTimePickerBtn",ref:I,type:"button",class:ke({...N.value,"dp--hidden-el":q.value}),"aria-label":(M=d(C))==null?void 0:M.closeTimePicker,tabindex:"0",onKeydown:b[3]||(b[3]=o=>d(et)(o,()=>F(!1))),onClick:b[4]||(b[4]=o=>F(!1))},[R.$slots["calendar-icon"]?ue(R.$slots,"calendar-icon",{key:0}):j("",!0),R.$slots["calendar-icon"]?j("",!0):(P(),De(d(aa),{key:1}))],42,as)),[[Da,!d(f)(R.hideNavigation,"time")]]):j("",!0)],2)],14,ts)):j("",!0)]}),_:3},8,["name","css"])])}}}),Rr=(e,t,n,a)=>{const{defaultedRange:r}=Se(e),l=(A,q)=>Array.isArray(t[A])?t[A][q]:t[A],i=A=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[A]:t.seconds:0,p=(A,q)=>A?q!==void 0?St(A,l("hours",q),l("minutes",q),i(q)):St(A,t.hours,t.minutes,i()):mr(Q(),i(q)),c=(A,q)=>{t[A]=q},C=G(()=>e.modelAuto&&r.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:r.value.enabled),m=(A,q)=>{const ae=Object.fromEntries(Object.keys(t).map(E=>E===A?[E,q]:[E,t[E]].slice()));if(C.value&&!r.value.disableTimeRangeValidation){const E=ne=>n.value?St(n.value[ne],ae.hours[ne],ae.minutes[ne],ae.seconds[ne]):null,B=ne=>vr(n.value[ne],0);return!(Me(E(0),E(1))&&(Kt(E(0),B(1))||pa(E(1),B(0))))}return!0},v=(A,q)=>{m(A,q)&&(c(A,q),a&&a())},h=A=>{v("hours",A)},k=A=>{v("minutes",A)},Y=A=>{v("seconds",A)},f=(A,q,ae,E)=>{q&&h(A),!q&&!ae&&k(A),ae&&Y(A),n.value&&E(n.value)},S=A=>{if(A){const q=Array.isArray(A),ae=q?[+A[0].hours,+A[1].hours]:+A.hours,E=q?[+A[0].minutes,+A[1].minutes]:+A.minutes,B=q?[+A[0].seconds,+A[1].seconds]:+A.seconds;c("hours",ae),c("minutes",E),e.enableSeconds&&c("seconds",B)}},I=(A,q)=>{const ae={hours:Array.isArray(t.hours)?t.hours[A]:t.hours,disabledArr:[]};return(q||q===0)&&(ae.hours=q),Array.isArray(e.disabledTimes)&&(ae.disabledArr=r.value.enabled&&Array.isArray(e.disabledTimes[A])?e.disabledTimes[A]:e.disabledTimes),ae},U=G(()=>(A,q)=>{var ae;if(Array.isArray(e.disabledTimes)){const{disabledArr:E,hours:B}=I(A,q),ne=E.filter(F=>+F.hours===B);return((ae=ne[0])==null?void 0:ae.minutes)==="*"?{hours:[B],minutes:void 0,seconds:void 0}:{hours:[],minutes:ne?.map(F=>+F.minutes)??[],seconds:ne?.map(F=>F.seconds?+F.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:c,updateHours:h,updateMinutes:k,updateSeconds:Y,getSetDateTime:p,updateTimeValues:f,getSecondsValue:i,assignStartTime:S,validateTime:m,disabledTimesConfig:U}},ns=(e,t)=>{const n=()=>{e.isTextInputDate&&q()},{modelValue:a,time:r}=ba(e,t,n),{defaultedStartTime:l,defaultedRange:i,defaultedTz:p}=Se(e),{updateTimeValues:c,getSetDateTime:C,setTime:m,assignStartTime:v,disabledTimesConfig:h,validateTime:k}=Rr(e,r,a,Y);function Y(){t("update-flow-step")}const f=E=>{const{hours:B,minutes:ne,seconds:F}=E;return{hours:+B,minutes:+ne,seconds:F?+F:0}},S=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const B=f(e.startTime[0]),ne=f(e.startTime[1]);return[Ce(Q(),B),Ce(Q(),ne)]}const E=f(e.startTime);return Ce(Q(),E)}return i.value.enabled?[null,null]:null},I=()=>{if(i.value.enabled){const[E,B]=S();a.value=[nt(C(E,0),p.value.timezone),nt(C(B,1),p.value.timezone)]}else a.value=nt(C(S()),p.value.timezone)},U=E=>Array.isArray(E)?[Ft(Q(E[0])),Ft(Q(E[1]))]:[Ft(E??Q())],A=(E,B,ne)=>{m("hours",E),m("minutes",B),m("seconds",e.enableSeconds?ne:0)},q=()=>{const[E,B]=U(a.value);return i.value.enabled?A([E.hours,B.hours],[E.minutes,B.minutes],[E.seconds,B.seconds]):A(E.hours,E.minutes,E.seconds)};Ke(()=>{if(!e.shadow)return v(l.value),a.value?q():I()});const ae=()=>{Array.isArray(a.value)?a.value=a.value.map((E,B)=>E&&C(E,B)):a.value=C(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:h,updateTime:(E,B=!0,ne=!1)=>{c(E,B,ne,ae)},validateTime:k}},rs=ze({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...yt},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:n}){const a=n,r=e,l=qt(),i=lt(l,"timePicker"),p=Z(null),{time:c,modelValue:C,disabledTimesConfig:m,updateTime:v,validateTime:h}=ns(r,a);return Ke(()=>{r.shadow||a("mount",null)}),t({getSidebarProps:()=>({modelValue:C,time:c,updateTime:v}),toggleTimePicker:(k,Y=!1,f="")=>{var S;(S=p.value)==null||S.toggleTimePicker(k,Y,f)}}),(k,Y)=>(P(),De(Sa,{"multi-calendars":0,stretch:""},{default:_e(()=>[ot(Sr,Qe({ref_key:"tpRef",ref:p},k.$props,{hours:d(c).hours,minutes:d(c).minutes,seconds:d(c).seconds,"internal-model-value":k.internalModelValue,"disabled-times-config":d(m),"validate-time":d(h),"onUpdate:hours":Y[0]||(Y[0]=f=>d(v)(f)),"onUpdate:minutes":Y[1]||(Y[1]=f=>d(v)(f,!1)),"onUpdate:seconds":Y[2]||(Y[2]=f=>d(v)(f,!1,!0)),onAmPmChange:Y[3]||(Y[3]=f=>k.$emit("am-pm-change",f)),onResetFlow:Y[4]||(Y[4]=f=>k.$emit("reset-flow")),onOverlayClosed:Y[5]||(Y[5]=f=>k.$emit("overlay-toggle",{open:!1,overlay:f})),onOverlayOpened:Y[6]||(Y[6]=f=>k.$emit("overlay-toggle",{open:!0,overlay:f}))}),je({_:2},[Ye(d(i),(f,S)=>({name:f,fn:_e(I=>[ue(k.$slots,f,We(at(I)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),ls={class:"dp--header-wrap"},os={key:0,class:"dp__month_year_wrap"},is={key:0},ss={class:"dp__month_year_wrap"},us=["data-dp-element","aria-label","data-test","onClick","onKeydown"],ds=ze({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...yt},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:n}){const a=n,r=e,{defaultedTransitions:l,defaultedAriaLabels:i,defaultedMultiCalendars:p,defaultedFilters:c,defaultedConfig:C,defaultedHighlight:m,propDates:v,defaultedUI:h}=Se(r),{transitionName:k,showTransition:Y}=ga(l),{buildMatrix:f}=It(),{handleMonthYearChange:S,isDisabled:I,updateMonthYear:U}=Yi(r,a),{showLeftIcon:A,showRightIcon:q}=Ia(),ae=Z(!1),E=Z(!1),B=Z(!1),ne=Z([null,null,null,null]);Ke(()=>{a("mount")});const F=M=>({get:()=>r[M],set:o=>{const w=M===vt.month?vt.year:vt.month;a("update-month-year",{[M]:o,[w]:r[w]}),M===vt.month?H(!0):re(!0)}}),N=G(F(vt.month)),ie=G(F(vt.year)),ce=G(()=>M=>({month:r.month,year:r.year,items:M===vt.month?r.months:r.years,instance:r.instance,updateMonthYear:U,toggle:M===vt.month?H:re})),pe=G(()=>r.months.find(o=>o.value===r.month)||{text:"",value:0}),g=G(()=>Zt(r.months,M=>{const o=r.month===M.value,w=fa(M.value,wr(r.year,v.value.minDate),_r(r.year,v.value.maxDate))||c.value.months.includes(M.value),z=Tr(m.value,M.value,r.year);return{active:o,disabled:w,highlighted:z}})),D=G(()=>Zt(r.years,M=>{const o=r.year===M.value,w=fa(M.value,ea(v.value.minDate),ea(v.value.maxDate))||c.value.years.includes(M.value),z=Mn(m.value,M.value);return{active:o,disabled:w,highlighted:z}})),y=(M,o,w)=>{w!==void 0?M.value=w:M.value=!M.value,M.value?(B.value=!0,a("overlay-opened",o)):(B.value=!1,a("overlay-closed",o))},H=(M=!1,o)=>{R(M),y(ae,Xe.month,o)},re=(M=!1,o)=>{R(M),y(E,Xe.year,o)},R=M=>{M||a("reset-flow")},b=(M,o)=>{r.arrowNavigation&&(ne.value[o]=Fe(M),f(ne.value,"monthYear"))},oe=G(()=>{var M,o,w,z,u,le;return[{type:vt.month,index:1,toggle:H,modelValue:N.value,updateModelValue:fe=>N.value=fe,text:pe.value.text,showSelectionGrid:ae.value,items:g.value,ariaLabel:(M=i.value)==null?void 0:M.openMonthsOverlay,overlayLabel:((w=(o=i.value).monthPicker)==null?void 0:w.call(o,!0))??void 0},{type:vt.year,index:2,toggle:re,modelValue:ie.value,updateModelValue:fe=>ie.value=fe,text:br(r.year,r.locale),showSelectionGrid:E.value,items:D.value,ariaLabel:(z=i.value)==null?void 0:z.openYearsOverlay,overlayLabel:((le=(u=i.value).yearPicker)==null?void 0:le.call(u,!0))??void 0}]}),V=G(()=>r.disableYearSelect?[oe.value[0]]:r.yearFirst?[...oe.value].reverse():oe.value);return t({toggleMonthPicker:H,toggleYearPicker:re,handleMonthYearChange:S}),(M,o)=>{var w,z,u,le,fe,Ve;return P(),W("div",ls,[M.$slots["month-year"]?(P(),W("div",os,[ue(M.$slots,"month-year",We(at({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:d(U),handleMonthYearChange:d(S),instance:e.instance})))])):(P(),W(we,{key:1},[M.$slots["top-extra"]?(P(),W("div",is,[ue(M.$slots,"top-extra",{value:M.internalModelValue})])):j("",!0),ye("div",ss,[d(A)(d(p),e.instance)&&!M.vertical?(P(),De(da,{key:0,"aria-label":(w=d(i))==null?void 0:w.prevMonth,disabled:d(I)(!1),class:ke((z=d(h))==null?void 0:z.navBtnPrev),"el-name":"action-prev",onActivate:o[0]||(o[0]=T=>d(S)(!1,!0)),onSetRef:o[1]||(o[1]=T=>b(T,0))},{default:_e(()=>[M.$slots["arrow-left"]?ue(M.$slots,"arrow-left",{key:0}):j("",!0),M.$slots["arrow-left"]?j("",!0):(P(),De(d(fn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):j("",!0),ye("div",{class:ke(["dp__month_year_wrap",{dp__year_disable_select:M.disableYearSelect}])},[(P(!0),W(we,null,Ye(V.value,(T,K)=>(P(),W(we,{key:T.type},[ye("button",{ref_for:!0,ref:s=>b(s,K+1),type:"button","data-dp-element":`overlay-${T.type}`,class:ke(["dp__btn dp__month_year_select",{"dp--hidden-el":B.value}]),"aria-label":`${T.text}-${T.ariaLabel}`,"data-test":`${T.type}-toggle-overlay-${e.instance}`,onClick:T.toggle,onKeydown:s=>d(et)(s,()=>T.toggle(),!0)},[M.$slots[T.type]?ue(M.$slots,T.type,{key:0,text:T.text,value:r[T.type]}):j("",!0),M.$slots[T.type]?j("",!0):(P(),W(we,{key:1},[Dt(Ge(T.text),1)],64))],42,us),ot(ta,{name:d(k)(T.showSelectionGrid),css:d(Y)},{default:_e(()=>[T.showSelectionGrid?(P(),De(ya,{key:0,items:T.items,"arrow-navigation":M.arrowNavigation,"hide-navigation":M.hideNavigation,"is-last":M.autoApply&&!d(C).keepActionRow,"skip-button-ref":!1,config:M.config,type:T.type,"header-refs":[],"esc-close":M.escClose,"menu-wrap-ref":M.menuWrapRef,"text-input":M.textInput,"aria-labels":M.ariaLabels,"overlay-label":T.overlayLabel,onSelected:T.updateModelValue,onToggle:T.toggle},je({"button-icon":_e(()=>[M.$slots["calendar-icon"]?ue(M.$slots,"calendar-icon",{key:0}):j("",!0),M.$slots["calendar-icon"]?j("",!0):(P(),De(d(aa),{key:1}))]),_:2},[M.$slots[`${T.type}-overlay-value`]?{name:"item",fn:_e(({item:s})=>[ue(M.$slots,`${T.type}-overlay-value`,{text:s.text,value:s.value})]),key:"0"}:void 0,M.$slots[`${T.type}-overlay`]?{name:"overlay",fn:_e(()=>[ue(M.$slots,`${T.type}-overlay`,Qe({ref_for:!0},ce.value(T.type)))]),key:"1"}:void 0,M.$slots[`${T.type}-overlay-header`]?{name:"header",fn:_e(()=>[ue(M.$slots,`${T.type}-overlay-header`,{toggle:T.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):j("",!0)]),_:2},1032,["name","css"])],64))),128))],2),d(A)(d(p),e.instance)&&M.vertical?(P(),De(da,{key:1,"aria-label":(u=d(i))==null?void 0:u.prevMonth,"el-name":"action-prev",disabled:d(I)(!1),class:ke((le=d(h))==null?void 0:le.navBtnPrev),onActivate:o[2]||(o[2]=T=>d(S)(!1,!0))},{default:_e(()=>[M.$slots["arrow-up"]?ue(M.$slots,"arrow-up",{key:0}):j("",!0),M.$slots["arrow-up"]?j("",!0):(P(),De(d(gn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):j("",!0),d(q)(d(p),e.instance)?(P(),De(da,{key:2,ref:"rightIcon","el-name":"action-next",disabled:d(I)(!0),"aria-label":(fe=d(i))==null?void 0:fe.nextMonth,class:ke((Ve=d(h))==null?void 0:Ve.navBtnNext),onActivate:o[3]||(o[3]=T=>d(S)(!0,!0)),onSetRef:o[4]||(o[4]=T=>b(T,M.disableYearSelect?2:3))},{default:_e(()=>[M.$slots[M.vertical?"arrow-down":"arrow-right"]?ue(M.$slots,M.vertical?"arrow-down":"arrow-right",{key:0}):j("",!0),M.$slots[M.vertical?"arrow-down":"arrow-right"]?j("",!0):(P(),De(Oa(M.vertical?d(bn):d(hn)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):j("",!0)])],64))])}}}),cs={class:"dp__calendar_header",role:"row"},vs={key:0,class:"dp__calendar_header_item",role:"gridcell"},ms=["aria-label"],ps={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},fs={class:"dp__cell_inner"},hs=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],ys=ze({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...yt},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:n}){const a=n,r=e,{buildMultiLevelMatrix:l}=It(),{defaultedTransitions:i,defaultedConfig:p,defaultedAriaLabels:c,defaultedMultiCalendars:C,defaultedWeekNumbers:m,defaultedMultiDates:v,defaultedUI:h}=Se(r),k=Z(null),Y=Z({bottom:"",left:"",transform:""}),f=Z([]),S=Z(null),I=Z(!0),U=Z(""),A=Z({startX:0,endX:0,startY:0,endY:0}),q=Z([]),ae=Z({left:"50%"}),E=Z(!1),B=G(()=>r.calendar?r.calendar(r.mappedDates):r.mappedDates),ne=G(()=>r.dayNames?Array.isArray(r.dayNames)?r.dayNames:r.dayNames(r.locale,+r.weekStart):ei(r.formatLocale,r.locale,+r.weekStart));Ke(()=>{a("mount",{cmp:"calendar",refs:f}),p.value.noSwipe||S.value&&(S.value.addEventListener("touchstart",b,{passive:!1}),S.value.addEventListener("touchend",oe,{passive:!1}),S.value.addEventListener("touchmove",V,{passive:!1})),r.monthChangeOnScroll&&S.value&&S.value.addEventListener("wheel",w,{passive:!1})});const F=T=>T?r.vertical?"vNext":"next":r.vertical?"vPrevious":"previous",N=(T,K)=>{if(r.transitions){const s=tt(Mt(Q(),r.month,r.year));U.value=Ne(tt(Mt(Q(),T,K)),s)?i.value[F(!0)]:i.value[F(!1)],I.value=!1,it(()=>{I.value=!0})}},ie=G(()=>({...h.value.calendar??{}})),ce=G(()=>T=>{const K=ai(T);return{dp__marker_dot:K.type==="dot",dp__marker_line:K.type==="line"}}),pe=G(()=>T=>Me(T,k.value)),g=G(()=>({dp__calendar:!0,dp__calendar_next:C.value.count>0&&r.instance!==0})),D=G(()=>T=>r.hideOffsetDates?T.current:!0),y=async(T,K)=>{const{width:s,height:L}=T.getBoundingClientRect();k.value=K.value;let J={left:`${s/2}px`},$=-50;if(await it(),q.value[0]){const{left:ge,width:x}=q.value[0].getBoundingClientRect();ge<0&&(J={left:"0"},$=0,ae.value.left=`${s/2}px`),window.innerWidth{var L,J,$;const ge=Fe(f.value[K][s]);ge&&((L=T.marker)!=null&&L.customPosition&&($=(J=T.marker)==null?void 0:J.tooltip)!=null&&$.length?Y.value=T.marker.customPosition(ge):await y(ge,T),a("tooltip-open",T.marker))},re=async(T,K,s)=>{var L,J;if(E.value&&v.value.enabled&&v.value.dragSelect)return a("select-date",T);a("set-hover-date",T),(J=(L=T.marker)==null?void 0:L.tooltip)!=null&&J.length&&await H(T,K,s)},R=T=>{k.value&&(k.value=null,Y.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),a("tooltip-close",T.marker))},b=T=>{A.value.startX=T.changedTouches[0].screenX,A.value.startY=T.changedTouches[0].screenY},oe=T=>{A.value.endX=T.changedTouches[0].screenX,A.value.endY=T.changedTouches[0].screenY,M()},V=T=>{r.vertical&&!r.inline&&T.preventDefault()},M=()=>{const T=r.vertical?"Y":"X";Math.abs(A.value[`start${T}`]-A.value[`end${T}`])>10&&a("handle-swipe",A.value[`start${T}`]>A.value[`end${T}`]?"right":"left")},o=(T,K,s)=>{T&&(Array.isArray(f.value[K])?f.value[K][s]=T:f.value[K]=[T]),r.arrowNavigation&&l(f.value,"calendar")},w=T=>{r.monthChangeOnScroll&&(T.preventDefault(),a("handle-scroll",T))},z=T=>m.value.type==="local"?vn(T.value,{weekStartsOn:+r.weekStart}):m.value.type==="iso"?dn(T.value):typeof m.value.type=="function"?m.value.type(T.value):"",u=T=>{const K=T[0];return m.value.hideOnOffsetDates?T.some(s=>s.current)?z(K):"":z(K)},le=(T,K,s=!0)=>{s&&Vn()||!s&&!Vn()||v.value.enabled||(Yt(T,p.value),a("select-date",K))},fe=T=>{Yt(T,p.value)},Ve=T=>{v.value.enabled&&v.value.dragSelect?(E.value=!0,a("select-date",T)):v.value.enabled&&a("select-date",T)};return t({triggerTransition:N}),(T,K)=>(P(),W("div",{class:ke(g.value)},[ye("div",{ref_key:"calendarWrapRef",ref:S,class:ke(ie.value),role:"grid"},[ye("div",cs,[T.weekNumbers?(P(),W("div",vs,Ge(T.weekNumName),1)):j("",!0),(P(!0),W(we,null,Ye(ne.value,(s,L)=>{var J,$;return P(),W("div",{key:L,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":($=(J=d(c))==null?void 0:J.weekDay)==null?void 0:$.call(J,L)},[T.$slots["calendar-header"]?ue(T.$slots,"calendar-header",{key:0,day:s,index:L}):j("",!0),T.$slots["calendar-header"]?j("",!0):(P(),W(we,{key:1},[Dt(Ge(s),1)],64))],8,ms)}),128))]),K[2]||(K[2]=ye("div",{class:"dp__calendar_header_separator"},null,-1)),ot(ta,{name:U.value,css:!!T.transitions},{default:_e(()=>[I.value?(P(),W("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:K[1]||(K[1]=s=>E.value=!1)},[(P(!0),W(we,null,Ye(B.value,(s,L)=>(P(),W("div",{key:L,class:"dp__calendar_row",role:"row"},[T.weekNumbers?(P(),W("div",ps,[ye("div",fs,Ge(u(s.days)),1)])):j("",!0),(P(!0),W(we,null,Ye(s.days,(J,$)=>{var ge,x,X;return P(),W("div",{id:d(Pr)(J.value),ref_for:!0,ref:de=>o(de,L,$),key:$+L,role:"gridcell",class:"dp__calendar_item","aria-pressed":(J.classData.dp__active_date||J.classData.dp__range_start||J.classData.dp__range_start)??void 0,"aria-disabled":J.classData.dp__cell_disabled||void 0,"aria-label":(x=(ge=d(c))==null?void 0:ge.day)==null?void 0:x.call(ge,J),tabindex:!J.current&&T.hideOffsetDates?void 0:0,"data-test":J.value,onClick:va(de=>le(de,J),["prevent"]),onTouchend:de=>le(de,J,!1),onKeydown:de=>d(et)(de,()=>T.$emit("select-date",J)),onMouseenter:de=>re(J,L,$),onMouseleave:de=>R(J),onMousedown:de=>Ve(J),onMouseup:K[0]||(K[0]=de=>E.value=!1)},[ye("div",{class:ke(["dp__cell_inner",J.classData])},[T.$slots.day&&D.value(J)?ue(T.$slots,"day",{key:0,day:+J.text,date:J.value}):j("",!0),T.$slots.day?j("",!0):(P(),W(we,{key:1},[Dt(Ge(J.text),1)],64)),J.marker&&D.value(J)?(P(),W(we,{key:2},[T.$slots.marker?ue(T.$slots,"marker",{key:0,marker:J.marker,day:+J.text,date:J.value}):(P(),W("div",{key:1,class:ke(ce.value(J.marker)),style:dt(J.marker.color?{backgroundColor:J.marker.color}:{})},null,6))],64)):j("",!0),pe.value(J.value)?(P(),W("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:q,class:"dp__marker_tooltip",style:dt(Y.value)},[(X=J.marker)!=null&&X.tooltip?(P(),W("div",{key:0,class:"dp__tooltip_content",onClick:fe},[(P(!0),W(we,null,Ye(J.marker.tooltip,(de,be)=>(P(),W("div",{key:be,class:"dp__tooltip_text"},[T.$slots["marker-tooltip"]?ue(T.$slots,"marker-tooltip",{key:0,tooltip:de,day:J.value}):j("",!0),T.$slots["marker-tooltip"]?j("",!0):(P(),W(we,{key:1},[ye("div",{class:"dp__tooltip_mark",style:dt(de.color?{backgroundColor:de.color}:{})},null,4),ye("div",null,Ge(de.text),1)],64))]))),128)),ye("div",{class:"dp__arrow_bottom_tp",style:dt(ae.value)},null,4)])):j("",!0)],4)):j("",!0)],2)],40,hs)}),128))]))),128))],32)):j("",!0)]),_:3},8,["name","css"])],2)],2))}}),zn=e=>Array.isArray(e),gs=(e,t,n,a)=>{const r=Z([]),l=Z(new Date),i=Z(),p=()=>b(e.isTextInputDate),{modelValue:c,calendars:C,time:m,today:v}=ba(e,t,p),{defaultedMultiCalendars:h,defaultedStartTime:k,defaultedRange:Y,defaultedConfig:f,defaultedTz:S,propDates:I,defaultedMultiDates:U}=Se(e),{validateMonthYearInRange:A,isDisabled:q,isDateRangeAllowed:ae,checkMinMaxRange:E}=Et(e),{updateTimeValues:B,getSetDateTime:ne,setTime:F,assignStartTime:N,validateTime:ie,disabledTimesConfig:ce}=Rr(e,m,c,a),pe=G(()=>_=>C.value[_]?C.value[_].month:0),g=G(()=>_=>C.value[_]?C.value[_].year:0),D=_=>!f.value.keepViewOnOffsetClick||_?!0:!i.value,y=(_,te,O,ee=!1)=>{var se,Je;D(ee)&&(C.value[_]||(C.value[_]={month:0,year:0}),C.value[_].month=Hn(te)?(se=C.value[_])==null?void 0:se.month:te,C.value[_].year=Hn(O)?(Je=C.value[_])==null?void 0:Je.year:O)},H=()=>{e.autoApply&&t("select-date")};Ke(()=>{e.shadow||(c.value||(T(),k.value&&N(k.value)),b(!0),e.focusStartDate&&e.startDate&&T())});const re=G(()=>{var _;return(_=e.flow)!=null&&_.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),R=()=>{e.autoApply&&re.value&&t("auto-apply",e.partialFlow?e.flowStep!==e.flow.length:!1)},b=(_=!1)=>{if(c.value)return Array.isArray(c.value)?(r.value=c.value,u(_)):M(c.value,_);if(h.value.count&&_&&!e.startDate)return V(Q(),_)},oe=()=>Array.isArray(c.value)&&Y.value.enabled?xe(c.value[0])===xe(c.value[1]??c.value[0]):!1,V=(_=new Date,te=!1)=>{if((!h.value.count||!h.value.static||te)&&y(0,xe(_),he(_)),h.value.count&&(!h.value.solo||!c.value||oe()))for(let O=1;O{V(_),F("hours",Tt(_)),F("minutes",Rt(_)),F("seconds",jt(_)),h.value.count&&te&&Ve()},o=_=>{if(h.value.count){if(h.value.solo)return 0;const te=xe(_[0]),O=xe(_[1]);return Math.abs(O-te){_[1]&&Y.value.showLastInRange?V(_[o(_)],te):V(_[0],te);const O=(ee,se)=>[ee(_[0]),_[1]?ee(_[1]):m[se][1]];F("hours",O(Tt,"hours")),F("minutes",O(Rt,"minutes")),F("seconds",O(jt,"seconds"))},z=(_,te)=>{if((Y.value.enabled||e.weekPicker)&&!U.value.enabled)return w(_,te);if(U.value.enabled&&te){const O=_[_.length-1];return M(O,te)}},u=_=>{const te=c.value;z(te,_),h.value.count&&h.value.solo&&Ve()},le=(_,te)=>{const O=Ce(Q(),{month:pe.value(te),year:g.value(te)}),ee=_<0?ft(O,1):Jt(O,1);A(xe(ee),he(ee),_<0,e.preventMinMaxNavigation)&&(y(te,xe(ee),he(ee)),t("update-month-year",{instance:te,month:xe(ee),year:he(ee)}),h.value.count&&!h.value.solo&&fe(te),n())},fe=_=>{for(let te=_-1;te>=0;te--){const O=Jt(Ce(Q(),{month:pe.value(te+1),year:g.value(te+1)}),1);y(te,xe(O),he(O))}for(let te=_+1;te<=h.value.count-1;te++){const O=ft(Ce(Q(),{month:pe.value(te-1),year:g.value(te-1)}),1);y(te,xe(O),he(O))}},Ve=()=>{if(Array.isArray(c.value)&&c.value.length===2){const _=Q(Q(c.value[1]?c.value[1]:ft(c.value[0],1))),[te,O]=[xe(c.value[0]),he(c.value[0])],[ee,se]=[xe(c.value[1]),he(c.value[1])];(te!==ee||te===ee&&O!==se)&&h.value.solo&&y(1,xe(_),he(_))}else c.value&&!Array.isArray(c.value)&&(y(0,xe(c.value),he(c.value)),V(Q()))},T=()=>{e.startDate&&(y(0,xe(Q(e.startDate)),he(Q(e.startDate))),h.value.count&&fe(0))},K=(_,te)=>{if(e.monthChangeOnScroll){const O=new Date().getTime()-l.value.getTime(),ee=Math.abs(_.deltaY);let se=500;ee>1&&(se=100),ee>100&&(se=0),O>se&&(l.value=new Date,le(e.monthChangeOnScroll!=="inverse"?-_.deltaY:_.deltaY,te))}},s=(_,te,O=!1)=>{e.monthChangeOnArrows&&e.vertical===O&&L(_,te)},L=(_,te)=>{le(_==="right"?-1:1,te)},J=_=>{if(I.value.markers)return Aa(_.value,I.value.markers)},$=(_,te)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[_==0,!0];case"fair":return[_==0||te>_,!0];case"append":return[!1,!1];default:return[!1,!1]}},ge=(_,te,O,ee)=>{if(e.sixWeeks&&_.length<6){const se=6-_.length,Je=(te.getDay()+7-ee)%7,ut=6-(O.getDay()+7-ee)%7,[Bt,_a]=$(Je,ut);for(let la=1;la<=se;la++)if(_a?!!(la%2)==Bt:Bt){const At=_[0].days[0],qa=x(mt(At.value,-7),xe(te));_.unshift({days:qa})}else{const At=_[_.length-1],qa=At.days[At.days.length-1],Er=x(mt(qa.value,1),xe(te));_.push({days:Er})}}return _},x=(_,te)=>{const O=Q(_),ee=[];for(let se=0;se<7;se++){const Je=mt(O,se),ut=xe(Je)!==te;ee.push({text:e.hideOffsetDates&&ut?"":Je.getDate(),value:Je,current:!ut,classData:{}})}return ee},X=(_,te)=>{const O=[],ee=new Date(te,_),se=new Date(te,_+1,0),Je=e.weekStart,ut=ht(ee,{weekStartsOn:Je}),Bt=_a=>{const la=x(_a,_);if(O.push({days:la}),!O[O.length-1].days.some(At=>Me(tt(At.value),tt(se)))){const At=mt(_a,7);Bt(At)}};return Bt(ut),ge(O,ee,se,Je)},de=_=>{const te=St(Q(_.value),m.hours,m.minutes,rt());t("date-update",te),U.value.enabled?Dn(te,c,U.value.limit):c.value=te,a(),it().then(()=>{R()})},be=_=>Y.value.noDisabledRange?kr(r.value[0],_).some(te=>q(te)):!1,st=()=>{r.value=c.value?c.value.slice():[],r.value.length===2&&!(Y.value.fixedStart||Y.value.fixedEnd)&&(r.value=[])},me=(_,te)=>{const O=[Q(_.value),mt(Q(_.value),+Y.value.autoRange)];ae(O)?(te&&Pt(_.value),r.value=O):t("invalid-date",_.value)},Pt=_=>{const te=xe(Q(_)),O=he(Q(_));if(y(0,te,O),h.value.count>0)for(let ee=1;ee{if(be(_.value)||!E(_.value,c.value,Y.value.fixedStart?0:1))return t("invalid-date",_.value);r.value=$r(Q(_.value),c,t,Y)},na=(_,te)=>{if(st(),Y.value.autoRange)return me(_,te);if(Y.value.fixedStart||Y.value.fixedEnd)return gt(_);r.value[0]?E(Q(_.value),c.value)&&!be(_.value)?Ie(Q(_.value),Q(r.value[0]))?(r.value.unshift(Q(_.value)),t("range-end",r.value[0])):(r.value[1]=Q(_.value),t("range-end",r.value[1])):(e.autoApply&&t("auto-apply-invalid",_.value),t("invalid-date",_.value)):(r.value[0]=Q(_.value),t("range-start",r.value[0]))},rt=(_=!0)=>e.enableSeconds?Array.isArray(m.seconds)?_?m.seconds[0]:m.seconds[1]:m.seconds:0,ra=_=>{r.value[_]=St(r.value[_],m.hours[_],m.minutes[_],rt(_!==1))},Ea=()=>{var _,te;r.value[0]&&r.value[1]&&+((_=r.value)==null?void 0:_[0])>+((te=r.value)==null?void 0:te[1])&&(r.value.reverse(),t("range-start",r.value[0]),t("range-end",r.value[1]))},wa=()=>{r.value.length&&(r.value[0]&&!r.value[1]?ra(0):(ra(0),ra(1),a()),Ea(),c.value=r.value.slice(),Ra(r.value,t,e.autoApply,e.modelAuto))},Ba=(_,te=!1)=>{if(q(_.value)||!_.current&&e.hideOffsetDates)return t("invalid-date",_.value);if(i.value=JSON.parse(JSON.stringify(_)),!Y.value.enabled)return de(_);zn(m.hours)&&zn(m.minutes)&&!U.value.enabled&&(na(_,te),wa())},Na=(_,te)=>{var O;y(_,te.month,te.year,!0),h.value.count&&!h.value.solo&&fe(_),t("update-month-year",{instance:_,month:te.month,year:te.year}),n(h.value.solo?_:void 0);const ee=(O=e.flow)!=null&&O.length?e.flow[e.flowStep]:void 0;!te.fromNav&&(ee===Xe.month||ee===Xe.year)&&a()},La=(_,te)=>{Or({value:_,modelValue:c,range:Y.value.enabled,timezone:te?void 0:S.value.timezone}),H(),e.multiCalendars&&it().then(()=>b(!0))},Ha=()=>{const _=wn(Q(),S.value);Y.value.enabled?c.value&&Array.isArray(c.value)&&c.value[0]?c.value=Ie(_,c.value[0])?[_,c.value[0]]:[c.value[0],_]:c.value=[_]:c.value=_,H()},Va=()=>{if(Array.isArray(c.value))if(U.value.enabled){const _=Fa();c.value[c.value.length-1]=ne(_)}else c.value=c.value.map((_,te)=>_&&ne(_,te));else c.value=ne(c.value);t("time-update")},Fa=()=>Array.isArray(c.value)&&c.value.length?c.value[c.value.length-1]:null;return{calendars:C,modelValue:c,month:pe,year:g,time:m,disabledTimesConfig:ce,today:v,validateTime:ie,getCalendarDays:X,getMarker:J,handleScroll:K,handleSwipe:L,handleArrow:s,selectDate:Ba,updateMonthYear:Na,presetDate:La,selectCurrentDate:Ha,updateTime:(_,te=!0,O=!1)=>{B(_,te,O,Va)},assignMonthAndYear:V}},bs={key:0},ws=ze({__name:"DatePicker",props:{...yt},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:n}){const a=n,r=e,{calendars:l,month:i,year:p,modelValue:c,time:C,disabledTimesConfig:m,today:v,validateTime:h,getCalendarDays:k,getMarker:Y,handleArrow:f,handleScroll:S,handleSwipe:I,selectDate:U,updateMonthYear:A,presetDate:q,selectCurrentDate:ae,updateTime:E,assignMonthAndYear:B}=gs(r,a,oe,V),ne=qt(),{setHoverDate:F,getDayClassData:N,clearHoverDate:ie}=Is(c,r),{defaultedMultiCalendars:ce}=Se(r),pe=Z([]),g=Z([]),D=Z(null),y=lt(ne,"calendar"),H=lt(ne,"monthYear"),re=lt(ne,"timePicker"),R=K=>{r.shadow||a("mount",K)};ct(l,()=>{r.shadow||setTimeout(()=>{a("recalculate-position")},0)},{deep:!0}),ct(ce,(K,s)=>{K.count-s.count>0&&B()},{deep:!0});const b=G(()=>K=>k(i.value(K),p.value(K)).map(s=>({...s,days:s.days.map(L=>(L.marker=Y(L),L.classData=N(L),L))})));function oe(K){var s;K||K===0?(s=g.value[K])==null||s.triggerTransition(i.value(K),p.value(K)):g.value.forEach((L,J)=>L.triggerTransition(i.value(J),p.value(J)))}function V(){a("update-flow-step")}const M=(K,s=!1)=>{U(K,s),r.spaceConfirm&&a("select-date")},o=(K,s,L=0)=>{var J;(J=pe.value[L])==null||J.toggleMonthPicker(K,s)},w=(K,s,L=0)=>{var J;(J=pe.value[L])==null||J.toggleYearPicker(K,s)},z=(K,s,L)=>{var J;(J=D.value)==null||J.toggleTimePicker(K,s,L)},u=(K,s)=>{var L;if(!r.range){const J=c.value?c.value:v,$=s?new Date(s):J,ge=K?ht($,{weekStartsOn:1}):ar($,{weekStartsOn:1});U({value:ge,current:xe($)===i.value(0),text:"",classData:{}}),(L=document.getElementById(Pr(ge)))==null||L.focus()}},le=K=>{var s;(s=pe.value[0])==null||s.handleMonthYearChange(K,!0)},fe=K=>{A(0,{month:i.value(0),year:p.value(0)+(K?1:-1),fromNav:!0})},Ve=(K,s)=>{K===Xe.time&&a(`time-picker-${s?"open":"close"}`),a("overlay-toggle",{open:s,overlay:K})},T=K=>{a("overlay-toggle",{open:!1,overlay:K}),a("focus-menu")};return t({clearHoverDate:ie,presetDate:q,selectCurrentDate:ae,toggleMonthPicker:o,toggleYearPicker:w,toggleTimePicker:z,handleArrow:f,updateMonthYear:A,getSidebarProps:()=>({modelValue:c,month:i,year:p,time:C,updateTime:E,updateMonthYear:A,selectDate:U,presetDate:q}),changeMonth:le,changeYear:fe,selectWeekDate:u}),(K,s)=>(P(),W(we,null,[ot(Sa,{"multi-calendars":d(ce).count,collapse:K.collapse},{default:_e(({instance:L,index:J})=>[K.disableMonthYearSelect?j("",!0):(P(),De(ds,Qe({key:0,ref:$=>{$&&(pe.value[J]=$)},months:d(hr)(K.formatLocale,K.locale,K.monthNameFormat),years:d(_n)(K.yearRange,K.locale,K.reverseYears),month:d(i)(L),year:d(p)(L),instance:L},K.$props,{onMount:s[0]||(s[0]=$=>R(d(Vt).header)),onResetFlow:s[1]||(s[1]=$=>K.$emit("reset-flow")),onUpdateMonthYear:$=>d(A)(L,$),onOverlayClosed:T,onOverlayOpened:s[2]||(s[2]=$=>K.$emit("overlay-toggle",{open:!0,overlay:$}))}),je({_:2},[Ye(d(H),($,ge)=>({name:$,fn:_e(x=>[ue(K.$slots,$,We(at(x)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),ot(ys,Qe({ref:$=>{$&&(g.value[J]=$)},"mapped-dates":b.value(L),month:d(i)(L),year:d(p)(L),instance:L},K.$props,{onSelectDate:$=>d(U)($,L!==1),onHandleSpace:$=>M($,L!==1),onSetHoverDate:s[3]||(s[3]=$=>d(F)($)),onHandleScroll:$=>d(S)($,L),onHandleSwipe:$=>d(I)($,L),onMount:s[4]||(s[4]=$=>R(d(Vt).calendar)),onResetFlow:s[5]||(s[5]=$=>K.$emit("reset-flow")),onTooltipOpen:s[6]||(s[6]=$=>K.$emit("tooltip-open",$)),onTooltipClose:s[7]||(s[7]=$=>K.$emit("tooltip-close",$))}),je({_:2},[Ye(d(y),($,ge)=>({name:$,fn:_e(x=>[ue(K.$slots,$,We(at({...x})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),K.enableTimePicker?(P(),W("div",bs,[K.$slots["time-picker"]?ue(K.$slots,"time-picker",We(Qe({key:0},{time:d(C),updateTime:d(E)}))):(P(),De(Sr,Qe({key:1,ref_key:"timePickerRef",ref:D},K.$props,{hours:d(C).hours,minutes:d(C).minutes,seconds:d(C).seconds,"internal-model-value":K.internalModelValue,"disabled-times-config":d(m),"validate-time":d(h),onMount:s[8]||(s[8]=L=>R(d(Vt).timePicker)),"onUpdate:hours":s[9]||(s[9]=L=>d(E)(L)),"onUpdate:minutes":s[10]||(s[10]=L=>d(E)(L,!1)),"onUpdate:seconds":s[11]||(s[11]=L=>d(E)(L,!1,!0)),onResetFlow:s[12]||(s[12]=L=>K.$emit("reset-flow")),onOverlayClosed:s[13]||(s[13]=L=>Ve(L,!1)),onOverlayOpened:s[14]||(s[14]=L=>Ve(L,!0)),onAmPmChange:s[15]||(s[15]=L=>K.$emit("am-pm-change",L))}),je({_:2},[Ye(d(re),(L,J)=>({name:L,fn:_e($=>[ue(K.$slots,L,We(at($)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):j("",!0)],64))}}),_s=(e,t)=>{const n=Z(),{defaultedMultiCalendars:a,defaultedConfig:r,defaultedHighlight:l,defaultedRange:i,propDates:p,defaultedFilters:c,defaultedMultiDates:C}=Se(e),{modelValue:m,year:v,month:h,calendars:k}=ba(e,t),{isDisabled:Y}=Et(e),{selectYear:f,groupedYears:S,showYearPicker:I,isDisabled:U,toggleYearPicker:A,handleYearSelect:q,handleYear:ae}=Yr({modelValue:m,multiCalendars:a,range:i,highlight:l,calendars:k,propDates:p,month:h,year:v,filters:c,props:e,emit:t}),E=(D,y)=>[D,y].map(H=>kt(H,"MMMM",{locale:e.formatLocale})).join("-"),B=G(()=>D=>m.value?Array.isArray(m.value)?m.value.some(y=>Bn(D,y)):Bn(m.value,D):!1),ne=D=>{if(i.value.enabled){if(Array.isArray(m.value)){const y=Me(D,m.value[0])||Me(D,m.value[1]);return $a(m.value,n.value,D)&&!y}return!1}return!1},F=(D,y)=>D.quarter===$n(y)&&D.year===he(y),N=D=>typeof l.value=="function"?l.value({quarter:$n(D),year:he(D)}):!!l.value.quarters.find(y=>F(y,D)),ie=G(()=>D=>{const y=Ce(new Date,{year:v.value(D)});return el({start:ma(y),end:tr(y)}).map(H=>{const re=Ht(H),R=Yn(H),b=Y(H),oe=ne(re),V=N(re);return{text:E(re,R),value:re,active:B.value(re),highlighted:V,disabled:b,isBetween:oe}})}),ce=D=>{Dn(D,m,C.value.limit),t("auto-apply",!0)},pe=D=>{m.value=Tn(m,D,t),Ra(m.value,t,e.autoApply,e.modelAuto)},g=D=>{m.value=D,t("auto-apply")};return{defaultedConfig:r,defaultedMultiCalendars:a,groupedYears:S,year:v,isDisabled:U,quarters:ie,showYearPicker:I,modelValue:m,setHoverDate:D=>{n.value=D},selectYear:f,selectQuarter:(D,y,H)=>{if(!H)return k.value[y].month=xe(Yn(D)),C.value.enabled?ce(D):i.value.enabled?pe(D):g(D)},toggleYearPicker:A,handleYearSelect:q,handleYear:ae}},ks={class:"dp--quarter-items"},xs=["data-test","disabled","onClick","onMouseover"],Ms=ze({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...yt},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:n}){const a=n,r=e,l=qt(),i=lt(l,"yearMode"),{defaultedMultiCalendars:p,defaultedConfig:c,groupedYears:C,year:m,isDisabled:v,quarters:h,modelValue:k,showYearPicker:Y,setHoverDate:f,selectQuarter:S,toggleYearPicker:I,handleYearSelect:U,handleYear:A}=_s(r,a);return t({getSidebarProps:()=>({modelValue:k,year:m,selectQuarter:S,handleYearSelect:U,handleYear:A})}),(q,ae)=>(P(),De(Sa,{"multi-calendars":d(p).count,collapse:q.collapse,stretch:""},{default:_e(({instance:E})=>[ye("div",{class:"dp-quarter-picker-wrap",style:dt({minHeight:`${d(c).modeHeight}px`})},[q.$slots["top-extra"]?ue(q.$slots,"top-extra",{key:0,value:q.internalModelValue}):j("",!0),ye("div",null,[ot(Cr,Qe(q.$props,{items:d(C)(E),instance:E,"show-year-picker":d(Y)[E],year:d(m)(E),"is-disabled":B=>d(v)(E,B),onHandleYear:B=>d(A)(E,B),onYearSelect:B=>d(U)(B,E),onToggleYearPicker:B=>d(I)(E,B?.flow,B?.show)}),je({_:2},[Ye(d(i),(B,ne)=>({name:B,fn:_e(F=>[ue(q.$slots,B,We(at(F)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),ye("div",ks,[(P(!0),W(we,null,Ye(d(h)(E),(B,ne)=>(P(),W("div",{key:ne},[ye("button",{type:"button",class:ke(["dp--qr-btn",{"dp--qr-btn-active":B.active,"dp--qr-btn-between":B.isBetween,"dp--qr-btn-disabled":B.disabled,"dp--highlighted":B.highlighted}]),"data-test":B.value,disabled:B.disabled,onClick:F=>d(S)(B.value,E,B.disabled),onMouseover:F=>d(f)(B.value)},[q.$slots.quarter?ue(q.$slots,"quarter",{key:0,value:B.value,text:B.text}):(P(),W(we,{key:1},[Dt(Ge(B.text),1)],64))],42,xs)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),Ds=["id","tabindex","role","aria-label"],Ts={key:0,class:"dp--menu-load-container"},Ps={key:1,class:"dp--menu-header"},As={key:0,class:"dp__sidebar_left"},Cs=["data-test","onClick","onKeydown"],Os={key:2,class:"dp__sidebar_right"},$s={key:3,class:"dp__action_extra"},Un=ze({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...Ya,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:n}){const a=n,r=e,l=Z(null),i=G(()=>{const{openOnTop:x,...X}=r;return{...X,flowStep:F.value,collapse:r.collapse,noOverlayFocus:r.noOverlayFocus,menuWrapRef:l.value}}),{setMenuFocused:p,setShiftKey:c,control:C}=Ar(),m=qt(),{defaultedTextInput:v,defaultedInline:h,defaultedConfig:k,defaultedUI:Y}=Se(r),f=Z(null),S=Z(0),I=Z(null),U=Z(!1),A=Z(null);Ke(()=>{if(!r.shadow){U.value=!0,q(),window.addEventListener("resize",q);const x=Fe(l);if(x&&!v.value.enabled&&!h.value.enabled&&(p(!0),y()),x){const X=de=>{k.value.allowPreventDefault&&de.preventDefault(),Yt(de,k.value,!0)};x.addEventListener("pointerdown",X),x.addEventListener("mousedown",X)}}}),Ca(()=>{window.removeEventListener("resize",q)});const q=()=>{const x=Fe(I);x&&(S.value=x.getBoundingClientRect().width)},{arrowRight:ae,arrowLeft:E,arrowDown:B,arrowUp:ne}=It(),{flowStep:F,updateFlowStep:N,childMount:ie,resetFlow:ce,handleFlow:pe}=Es(r,a,A),g=G(()=>r.monthPicker?qi:r.yearPicker?Qi:r.timePicker?rs:r.quarterPicker?Ms:ws),D=G(()=>{var x;if(k.value.arrowLeft)return k.value.arrowLeft;const X=(x=l.value)==null?void 0:x.getBoundingClientRect(),de=r.getInputRect();return de?.width=(X?.right??0)&&de?.width{const x=Fe(l);x&&x.focus({preventScroll:!0})},H=G(()=>{var x;return((x=A.value)==null?void 0:x.getSidebarProps())||{}}),re=()=>{r.openOnTop&&a("recalculate-position")},R=lt(m,"action"),b=G(()=>r.monthPicker||r.yearPicker?lt(m,"monthYear"):r.timePicker?lt(m,"timePicker"):lt(m,"shared")),oe=G(()=>r.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),V=G(()=>({dp__menu_disabled:r.disabled,dp__menu_readonly:r.readonly,"dp-menu-loading":r.loading})),M=G(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,...Y.value.menu??{}})),o=x=>{Yt(x,k.value,!0)},w=()=>{r.escClose&&a("close-picker")},z=x=>{if(r.arrowNavigation){if(x===Ze.up)return ne();if(x===Ze.down)return B();if(x===Ze.left)return E();if(x===Ze.right)return ae()}else x===Ze.left||x===Ze.up?T("handleArrow",Ze.left,0,x===Ze.up):T("handleArrow",Ze.right,0,x===Ze.down)},u=x=>{c(x.shiftKey),!r.disableMonthYearSelect&&x.code===$e.tab&&x.target.classList.contains("dp__menu")&&C.value.shiftKeyInMenu&&(x.preventDefault(),Yt(x,k.value,!0),a("close-picker"))},le=()=>{y(),a("time-picker-close")},fe=x=>{var X,de,be;(X=A.value)==null||X.toggleTimePicker(!1,!1),(de=A.value)==null||de.toggleMonthPicker(!1,!1,x),(be=A.value)==null||be.toggleYearPicker(!1,!1,x)},Ve=(x,X=0)=>{var de,be,st;return x==="month"?(de=A.value)==null?void 0:de.toggleMonthPicker(!1,!0,X):x==="year"?(be=A.value)==null?void 0:be.toggleYearPicker(!1,!0,X):x==="time"?(st=A.value)==null?void 0:st.toggleTimePicker(!0,!1):fe(X)},T=(x,...X)=>{var de,be;(de=A.value)!=null&&de[x]&&((be=A.value)==null||be[x](...X))},K=()=>{T("selectCurrentDate")},s=(x,X)=>{T("presetDate",x,X)},L=()=>{T("clearHoverDate")},J=(x,X)=>{T("updateMonthYear",x,X)},$=(x,X)=>{x.preventDefault(),z(X)},ge=x=>{var X,de,be;if(u(x),x.key===$e.home||x.key===$e.end)return T("selectWeekDate",x.key===$e.home,x.target.getAttribute("id"));switch((x.key===$e.pageUp||x.key===$e.pageDown)&&(x.shiftKey?(T("changeYear",x.key===$e.pageUp),(X=on(l.value,"overlay-year"))==null||X.focus()):(T("changeMonth",x.key===$e.pageUp),(de=on(l.value,x.key===$e.pageUp?"action-prev":"action-next"))==null||de.focus()),x.target.getAttribute("id")&&((be=l.value)==null||be.focus({preventScroll:!0}))),x.key){case $e.esc:return w();case $e.arrowLeft:return $(x,Ze.left);case $e.arrowRight:return $(x,Ze.right);case $e.arrowUp:return $(x,Ze.up);case $e.arrowDown:return $(x,Ze.down);default:return}};return t({updateMonthYear:J,switchView:Ve,handleFlow:pe}),(x,X)=>{var de,be,st;return P(),W("div",{id:x.uid?`dp-menu-${x.uid}`:void 0,ref_key:"dpMenuRef",ref:l,tabindex:d(h).enabled?void 0:"0",role:d(h).enabled?void 0:"dialog","aria-label":(de=x.ariaLabels)==null?void 0:de.menu,class:ke(M.value),style:dt({"--dp-arrow-left":D.value}),onMouseleave:L,onClick:o,onKeydown:ge},[(x.disabled||x.readonly)&&d(h).enabled||x.loading?(P(),W("div",{key:0,class:ke(V.value)},[x.loading?(P(),W("div",Ts,X[19]||(X[19]=[ye("span",{class:"dp--menu-loader"},null,-1)]))):j("",!0)],2)):j("",!0),x.$slots["menu-header"]?(P(),W("div",Ps,[ue(x.$slots,"menu-header")])):j("",!0),!d(h).enabled&&!x.teleportCenter?(P(),W("div",{key:2,class:ke(oe.value)},null,2)):j("",!0),ye("div",{ref_key:"innerMenuRef",ref:I,class:ke({dp__menu_content_wrapper:((be=x.presetDates)==null?void 0:be.length)||!!x.$slots["left-sidebar"]||!!x.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((st=x.presetDates)==null?void 0:st.length)||!!x.$slots["left-sidebar"]||!!x.$slots["right-sidebar"])}),style:dt({"--dp-menu-width":`${S.value}px`})},[x.$slots["left-sidebar"]?(P(),W("div",As,[ue(x.$slots,"left-sidebar",We(at(H.value)))])):j("",!0),x.presetDates.length?(P(),W("div",{key:1,class:ke({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0})},[(P(!0),W(we,null,Ye(x.presetDates,(me,Pt)=>(P(),W(we,{key:Pt},[me.slot?ue(x.$slots,me.slot,{key:0,presetDate:s,label:me.label,value:me.value}):(P(),W("button",{key:1,type:"button",style:dt(me.style||{}),class:ke(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test":me.testId??void 0,onClick:va(gt=>s(me.value,me.noTz),["prevent"]),onKeydown:gt=>d(et)(gt,()=>s(me.value,me.noTz),!0)},Ge(me.label),47,Cs))],64))),128))],2)):j("",!0),ye("div",{ref_key:"calendarWrapperRef",ref:f,class:"dp__instance_calendar",role:"document"},[(P(),De(Oa(g.value),Qe({ref_key:"dynCmpRef",ref:A},i.value,{"flow-step":d(F),onMount:d(ie),onUpdateFlowStep:d(N),onResetFlow:d(ce),onFocusMenu:y,onSelectDate:X[0]||(X[0]=me=>x.$emit("select-date")),onDateUpdate:X[1]||(X[1]=me=>x.$emit("date-update",me)),onTooltipOpen:X[2]||(X[2]=me=>x.$emit("tooltip-open",me)),onTooltipClose:X[3]||(X[3]=me=>x.$emit("tooltip-close",me)),onAutoApply:X[4]||(X[4]=me=>x.$emit("auto-apply",me)),onRangeStart:X[5]||(X[5]=me=>x.$emit("range-start",me)),onRangeEnd:X[6]||(X[6]=me=>x.$emit("range-end",me)),onInvalidFixedRange:X[7]||(X[7]=me=>x.$emit("invalid-fixed-range",me)),onTimeUpdate:X[8]||(X[8]=me=>x.$emit("time-update")),onAmPmChange:X[9]||(X[9]=me=>x.$emit("am-pm-change",me)),onTimePickerOpen:X[10]||(X[10]=me=>x.$emit("time-picker-open",me)),onTimePickerClose:le,onRecalculatePosition:re,onUpdateMonthYear:X[11]||(X[11]=me=>x.$emit("update-month-year",me)),onAutoApplyInvalid:X[12]||(X[12]=me=>x.$emit("auto-apply-invalid",me)),onInvalidDate:X[13]||(X[13]=me=>x.$emit("invalid-date",me)),onOverlayToggle:X[14]||(X[14]=me=>x.$emit("overlay-toggle",me)),"onUpdate:internalModelValue":X[15]||(X[15]=me=>x.$emit("update:internal-model-value",me))}),je({_:2},[Ye(b.value,(me,Pt)=>({name:me,fn:_e(gt=>[ue(x.$slots,me,We(at({...gt})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),x.$slots["right-sidebar"]?(P(),W("div",Os,[ue(x.$slots,"right-sidebar",We(at(H.value)))])):j("",!0),x.$slots["action-extra"]?(P(),W("div",$s,[x.$slots["action-extra"]?ue(x.$slots,"action-extra",{key:0,selectCurrentDate:K}):j("",!0)])):j("",!0)],6),!x.autoApply||d(k).keepActionRow?(P(),De(Ii,Qe({key:3,"menu-mount":U.value},i.value,{"calendar-width":S.value,onClosePicker:X[16]||(X[16]=me=>x.$emit("close-picker")),onSelectDate:X[17]||(X[17]=me=>x.$emit("select-date")),onInvalidSelect:X[18]||(X[18]=me=>x.$emit("invalid-select")),onSelectNow:K}),je({_:2},[Ye(d(R),(me,Pt)=>({name:me,fn:_e(gt=>[ue(x.$slots,me,We(at({...gt})))])}))]),1040,["menu-mount","calendar-width"])):j("",!0)],46,Ds)}}});var Ut=(e=>(e.center="center",e.left="left",e.right="right",e))(Ut||{});const Ys=({menuRef:e,menuRefInner:t,inputRef:n,pickerWrapperRef:a,inline:r,emit:l,props:i,slots:p})=>{const{defaultedConfig:c}=Se(i),C=Z({}),m=Z(!1),v=Z({top:"0",left:"0"}),h=Z(!1),k=ca(i,"teleportCenter");ct(k,()=>{v.value=JSON.parse(JSON.stringify({})),ae()});const Y=y=>{if(i.teleport){const H=y.getBoundingClientRect();return{left:H.left+window.scrollX,top:H.top+window.scrollY}}return{top:0,left:0}},f=(y,H)=>{v.value.left=`${y+H-C.value.width}px`},S=y=>{v.value.left=`${y}px`},I=(y,H)=>{i.position===Ut.left&&S(y),i.position===Ut.right&&f(y,H),i.position===Ut.center&&(v.value.left=`${y+H/2-C.value.width/2}px`)},U=y=>{const{width:H,height:re}=y.getBoundingClientRect(),{top:R,left:b}=i.altPosition?i.altPosition(y):Y(y);return{top:+R,left:+b,width:H,height:re}},A=()=>{v.value.left="50%",v.value.top="50%",v.value.transform="translate(-50%, -50%)",v.value.position="fixed",delete v.value.opacity},q=()=>{const y=Fe(n),{top:H,left:re,transform:R}=i.altPosition(y);v.value={top:`${H}px`,left:`${re}px`,transform:R??""}},ae=(y=!0)=>{var H;if(!r.value.enabled){if(k.value)return A();if(i.altPosition!==null)return q();if(y){const re=i.teleport?(H=t.value)==null?void 0:H.$el:e.value;re&&(C.value=re.getBoundingClientRect()),l("recalculate-position")}return ce()}},E=({inputEl:y,left:H,width:re})=>{window.screen.width>768&&!m.value&&I(H,re),F(y)},B=y=>{const{top:H,left:re,height:R,width:b}=U(y);v.value.top=`${R+H+ +i.offset}px`,h.value=!1,m.value||(v.value.left=`${re+b/2-C.value.width/2}px`),E({inputEl:y,left:re,width:b})},ne=y=>{const{top:H,left:re,width:R}=U(y);v.value.top=`${H-+i.offset-C.value.height}px`,h.value=!0,E({inputEl:y,left:re,width:R})},F=y=>{if(i.autoPosition){const{left:H,width:re}=U(y),{left:R,right:b}=C.value;if(!m.value){if(Math.abs(R)!==Math.abs(b)){if(R<=0)return m.value=!0,S(H);if(b>=document.documentElement.clientWidth)return m.value=!0,f(H,re)}return I(H,re)}}},N=()=>{const y=Fe(n);if(y){const{height:H}=C.value,{top:re,height:R}=y.getBoundingClientRect(),b=window.innerHeight-re-R,oe=re;return H<=b?Lt.bottom:H>b&&H<=oe?Lt.top:b>=oe?Lt.bottom:Lt.top}return Lt.bottom},ie=y=>N()===Lt.bottom?B(y):ne(y),ce=()=>{const y=Fe(n);if(y)return i.autoPosition?ie(y):B(y)},pe=function(y){if(y){const H=y.scrollHeight>y.clientHeight,re=window.getComputedStyle(y).overflowY.indexOf("hidden")!==-1;return H&&!re}return!0},g=function(y){return!y||y===document.body||y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:pe(y)?y:g(y.assignedSlot&&c.value.shadowDom?y.assignedSlot.parentNode:y.parentNode)},D=y=>{if(y)switch(i.position){case Ut.left:return{left:0,transform:"translateX(0)"};case Ut.right:return{left:`${y.width}px`,transform:"translateX(-100%)"};default:return{left:`${y.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:h,menuStyle:v,xCorrect:m,setMenuPosition:ae,getScrollableParent:g,shadowRender:(y,H)=>{var re,R,b;const oe=document.createElement("div"),V=(re=Fe(n))==null?void 0:re.getBoundingClientRect();oe.setAttribute("id","dp--temp-container");const M=(R=a.value)!=null&&R.clientWidth?a.value:document.body;M.append(oe);const o=D(V),w=c.value.shadowDom?Object.keys(p).filter(u=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(u)):Object.keys(p),z=Nr(y,{...H,shadow:!0,style:{opacity:0,position:"absolute",...o}},Object.fromEntries(w.map(u=>[u,p[u]])));An(z,oe),C.value=(b=z.el)==null?void 0:b.getBoundingClientRect(),An(null,oe),M.removeChild(oe)}}},Ot=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],Ss=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],Rs={all:()=>Ot,monthYear:()=>Ot.filter(e=>e.use.includes("month-year")),input:()=>Ss,timePicker:()=>Ot.filter(e=>e.use.includes("time")),action:()=>Ot.filter(e=>e.use.includes("action")),calendar:()=>Ot.filter(e=>e.use.includes("calendar")),menu:()=>Ot.filter(e=>e.use.includes("menu")),shared:()=>Ot.filter(e=>e.use.includes("shared")),yearMode:()=>Ot.filter(e=>e.use.includes("year-mode"))},lt=(e,t,n)=>{const a=[];return Rs[t]().forEach(r=>{e[r.name]&&a.push(r.name)}),n!=null&&n.length&&n.forEach(r=>{r.slot&&a.push(r.slot)}),a},ga=e=>{const t=G(()=>a=>e.value?a?e.value.open:e.value.close:""),n=G(()=>a=>e.value?a?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:n}},ba=(e,t,n)=>{const{defaultedRange:a,defaultedTz:r}=Se(e),l=Q(nt(Q(),r.value.timezone)),i=Z([{month:xe(l),year:he(l)}]),p=h=>{const k={hours:Tt(l),minutes:Rt(l),seconds:0};return a.value.enabled?[k[h],k[h]]:k[h]},c=ha({hours:p("hours"),minutes:p("minutes"),seconds:p("seconds")});ct(a,(h,k)=>{h.enabled!==k.enabled&&(c.hours=p("hours"),c.minutes=p("minutes"),c.seconds=p("seconds"))},{deep:!0});const C=G({get:()=>e.internalModelValue,set:h=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",h)}}),m=G(()=>h=>i.value[h]?i.value[h].month:0),v=G(()=>h=>i.value[h]?i.value[h].year:0);return ct(C,(h,k)=>{n&&JSON.stringify(h??{})!==JSON.stringify(k??{})&&n()},{deep:!0}),{calendars:i,time:c,modelValue:C,month:m,year:v,today:l}},Is=(e,t)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:a,defaultedUI:r,defaultedHighlight:l,defaultedTz:i,propDates:p,defaultedRange:c}=Se(t),{isDisabled:C}=Et(t),m=Z(null),v=Z(nt(new Date,i.value.timezone)),h=o=>{!o.current&&t.hideOffsetDates||(m.value=o.value)},k=()=>{m.value=null},Y=o=>Array.isArray(e.value)&&c.value.enabled&&e.value[0]&&m.value?o?Ne(m.value,e.value[0]):Ie(m.value,e.value[0]):!0,f=(o,w)=>{const z=()=>e.value?w?e.value[0]||null:e.value[1]:null,u=e.value&&Array.isArray(e.value)?z():null;return Me(Q(o.value),u)},S=o=>{const w=Array.isArray(e.value)?e.value[0]:null;return o?!Ie(m.value??null,w):!0},I=(o,w=!0)=>(c.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!o.current?!1:Me(Q(o.value),e.value[w?0:1]):c.value.enabled?f(o,w)&&S(w)||Me(o.value,Array.isArray(e.value)?e.value[0]:null)&&Y(w):!1,U=(o,w)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const z=Me(o.value,m.value);return w?Ne(e.value[0],o.value)&&z:Ie(e.value[0],o.value)&&z}return!1},A=o=>!e.value||t.hideOffsetDates&&!o.current?!1:c.value.enabled?t.modelAuto&&Array.isArray(e.value)?Me(o.value,e.value[0]?e.value[0]:v.value):!1:a.value.enabled&&Array.isArray(e.value)?e.value.some(w=>Me(w,o.value)):Me(o.value,e.value?e.value:v.value),q=o=>{if(c.value.autoRange||t.weekPicker){if(m.value){if(t.hideOffsetDates&&!o.current)return!1;const w=mt(m.value,+c.value.autoRange),z=xt(Q(m.value),t.weekStart);return t.weekPicker?Me(z[1],Q(o.value)):Me(w,Q(o.value))}return!1}return!1},ae=o=>{if(c.value.autoRange||t.weekPicker){if(m.value){const w=mt(m.value,+c.value.autoRange);if(t.hideOffsetDates&&!o.current)return!1;const z=xt(Q(m.value),t.weekStart);return t.weekPicker?Ne(o.value,z[0])&&Ie(o.value,z[1]):Ne(o.value,m.value)&&Ie(o.value,w)}return!1}return!1},E=o=>{if(c.value.autoRange||t.weekPicker){if(m.value){if(t.hideOffsetDates&&!o.current)return!1;const w=xt(Q(m.value),t.weekStart);return t.weekPicker?Me(w[0],o.value):Me(m.value,o.value)}return!1}return!1},B=o=>$a(e.value,m.value,o.value),ne=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,F=()=>t.modelAuto?yr(t.internalModelValue):!0,N=o=>{if(t.weekPicker)return!1;const w=c.value.enabled?!I(o)&&!I(o,!1):!0;return!C(o.value)&&!A(o)&&!(!o.current&&t.hideOffsetDates)&&w},ie=o=>c.value.enabled?t.modelAuto?ne()&&A(o):!1:A(o),ce=o=>l.value?oi(o.value,p.value.highlight):!1,pe=o=>{const w=C(o.value);return w&&(typeof l.value=="function"?!l.value(o.value,w):!l.value.options.highlightDisabled)},g=o=>{var w;return typeof l.value=="function"?l.value(o.value):(w=l.value.weekdays)==null?void 0:w.includes(o.value.getDay())},D=o=>(c.value.enabled||t.weekPicker)&&(!(n.value.count>0)||o.current)&&F()&&!(!o.current&&t.hideOffsetDates)&&!A(o)?B(o):!1,y=o=>{const{isRangeStart:w,isRangeEnd:z}=b(o),u=c.value.enabled?w||z:!1;return{dp__cell_offset:!o.current,dp__pointer:!t.disabled&&!(!o.current&&t.hideOffsetDates)&&!C(o.value),dp__cell_disabled:C(o.value),dp__cell_highlight:!pe(o)&&(ce(o)||g(o))&&!ie(o)&&!u&&!E(o)&&!(D(o)&&t.weekPicker)&&!z,dp__cell_highlight_active:!pe(o)&&(ce(o)||g(o))&&ie(o),dp__today:!t.noToday&&Me(o.value,v.value)&&o.current,"dp--past":Ie(o.value,v.value),"dp--future":Ne(o.value,v.value)}},H=o=>({dp__active_date:ie(o),dp__date_hover:N(o)}),re=o=>{if(e.value&&!Array.isArray(e.value)){const w=xt(e.value,t.weekStart);return{...V(o),dp__range_start:Me(w[0],o.value),dp__range_end:Me(w[1],o.value),dp__range_between_week:Ne(o.value,w[0])&&Ie(o.value,w[1])}}return{...V(o)}},R=o=>{if(e.value&&Array.isArray(e.value)){const w=xt(e.value[0],t.weekStart),z=e.value[1]?xt(e.value[1],t.weekStart):[];return{...V(o),dp__range_start:Me(w[0],o.value)||Me(z[0],o.value),dp__range_end:Me(w[1],o.value)||Me(z[1],o.value),dp__range_between_week:Ne(o.value,w[0])&&Ie(o.value,w[1])||Ne(o.value,z[0])&&Ie(o.value,z[1]),dp__range_between:Ne(o.value,w[1])&&Ie(o.value,z[0])}}return{...V(o)}},b=o=>{const w=n.value.count>0?o.current&&I(o)&&F():I(o)&&F(),z=n.value.count>0?o.current&&I(o,!1)&&F():I(o,!1)&&F();return{isRangeStart:w,isRangeEnd:z}},oe=o=>{const{isRangeStart:w,isRangeEnd:z}=b(o);return{dp__range_start:w,dp__range_end:z,dp__range_between:D(o),dp__date_hover:Me(o.value,m.value)&&!w&&!z&&!t.weekPicker,dp__date_hover_start:U(o,!0),dp__date_hover_end:U(o,!1)}},V=o=>({...oe(o),dp__cell_auto_range:ae(o),dp__cell_auto_range_start:E(o),dp__cell_auto_range_end:q(o)}),M=o=>c.value.enabled?c.value.autoRange?V(o):t.modelAuto?{...H(o),...oe(o)}:t.weekPicker?R(o):oe(o):t.weekPicker?re(o):H(o);return{setHoverDate:h,clearHoverDate:k,getDayClassData:o=>t.hideOffsetDates&&!o.current?{}:{...y(o),...M(o),[t.dayClass?t.dayClass(o.value,t.internalModelValue):""]:!0,...r.value.calendarCell??{}}}},Et=e=>{const{defaultedFilters:t,defaultedRange:n,propDates:a,defaultedMultiDates:r}=Se(e),l=g=>a.value.disabledDates?typeof a.value.disabledDates=="function"?a.value.disabledDates(Q(g)):!!Aa(g,a.value.disabledDates):!1,i=g=>a.value.maxDate?e.yearPicker?he(g)>he(a.value.maxDate):Ne(g,a.value.maxDate):!1,p=g=>a.value.minDate?e.yearPicker?he(g){const D=i(g),y=p(g),H=l(g),re=t.value.months.map(M=>+M).includes(xe(g)),R=e.disabledWeekDays.length?e.disabledWeekDays.some(M=>+M===Ul(g)):!1,b=k(g),oe=he(g),V=oe<+e.yearRange[0]||oe>+e.yearRange[1];return!(D||y||H||re||V||R||b)},C=(g,D)=>Ie(...$t(a.value.minDate,g,D))||Me(...$t(a.value.minDate,g,D)),m=(g,D)=>Ne(...$t(a.value.maxDate,g,D))||Me(...$t(a.value.maxDate,g,D)),v=(g,D,y)=>{let H=!1;return a.value.maxDate&&y&&m(g,D)&&(H=!0),a.value.minDate&&!y&&C(g,D)&&(H=!0),H},h=(g,D,y,H)=>{let re=!1;return H&&(a.value.minDate||a.value.maxDate)?a.value.minDate&&a.value.maxDate?re=v(g,D,y):(a.value.minDate&&C(g,D)||a.value.maxDate&&m(g,D))&&(re=!0):re=!0,re},k=g=>Array.isArray(a.value.allowedDates)&&!a.value.allowedDates.length?!0:a.value.allowedDates?!Aa(g,a.value.allowedDates):!1,Y=g=>!c(g),f=g=>n.value.noDisabledRange?!er({start:g[0],end:g[1]}).some(D=>Y(D)):!0,S=g=>{if(g){const D=he(g);return D>=+e.yearRange[0]&&D<=e.yearRange[1]}return!0},I=(g,D)=>!!(Array.isArray(g)&&g[D]&&(n.value.maxRange||n.value.minRange)&&S(g[D])),U=(g,D,y=0)=>{if(I(D,y)&&S(g)){const H=Jn(g,D[y]),re=kr(D[y],g),R=re.length===1?0:re.filter(oe=>Y(oe)).length,b=Math.abs(H)-(n.value.minMaxRawRange?0:R);if(n.value.minRange&&n.value.maxRange)return b>=+n.value.minRange&&b<=+n.value.maxRange;if(n.value.minRange)return b>=+n.value.minRange;if(n.value.maxRange)return b<=+n.value.maxRange}return!0},A=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,q=g=>Array.isArray(g)?[g[0]?Ga(g[0]):null,g[1]?Ga(g[1]):null]:Ga(g),ae=(g,D,y)=>g.find(H=>+H.hours===Tt(D)&&H.minutes==="*"?!0:+H.minutes===Rt(D)&&+H.hours===Tt(D))&&y,E=(g,D,y)=>{const[H,re]=g,[R,b]=D;return!ae(H,R,y)&&!ae(re,b,y)&&y},B=(g,D)=>{const y=Array.isArray(D)?D:[D];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?E(e.disabledTimes,y,g):!y.some(H=>ae(e.disabledTimes,H,g)):g},ne=(g,D)=>{const y=Array.isArray(D)?[Ft(D[0]),D[1]?Ft(D[1]):void 0]:Ft(D),H=!e.disabledTimes(y);return g&&H},F=(g,D)=>e.disabledTimes?Array.isArray(e.disabledTimes)?B(D,g):ne(D,g):D,N=g=>{let D=!0;if(!g||A())return!0;const y=!a.value.minDate&&!a.value.maxDate?q(g):g;return(e.maxTime||a.value.maxDate)&&(D=qn(e.maxTime,a.value.maxDate,"max",qe(y),D)),(e.minTime||a.value.minDate)&&(D=qn(e.minTime,a.value.minDate,"min",qe(y),D)),F(g,D)},ie=g=>{if(!e.monthPicker)return!0;let D=!0;const y=Q(pt(g));if(a.value.minDate&&a.value.maxDate){const H=Q(pt(a.value.minDate)),re=Q(pt(a.value.maxDate));return Ne(y,H)&&Ie(y,re)||Me(y,H)||Me(y,re)}if(a.value.minDate){const H=Q(pt(a.value.minDate));D=Ne(y,H)||Me(y,H)}if(a.value.maxDate){const H=Q(pt(a.value.maxDate));D=Ie(y,H)||Me(y,H)}return D},ce=G(()=>g=>!e.enableTimePicker||e.ignoreTimeValidation?!0:N(g)),pe=G(()=>g=>e.monthPicker?Array.isArray(g)&&(n.value.enabled||r.value.enabled)?!g.filter(D=>!ie(D)).length:ie(g):!0);return{isDisabled:Y,validateDate:c,validateMonthYearInRange:h,isDateRangeAllowed:f,checkMinMaxRange:U,isValidTime:N,isTimeValid:ce,isMonthValid:pe}},Ia=()=>{const e=G(()=>(a,r)=>a?.includes(r)),t=G(()=>(a,r)=>a.count?a.solo?!0:r===0:!0),n=G(()=>(a,r)=>a.count?a.solo?!0:r===a.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:n}},Es=(e,t,n)=>{const a=Z(0),r=ha({[Vt.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[Vt.calendar]:!1,[Vt.header]:!1}),l=G(()=>e.monthPicker||e.timePicker),i=v=>{var h;if((h=e.flow)!=null&&h.length){if(!v&&l.value)return m();r[v]=!0,Object.keys(r).filter(k=>!r[k]).length||m()}},p=()=>{var v,h;(v=e.flow)!=null&&v.length&&a.value!==-1&&(a.value+=1,t("flow-step",a.value),m()),((h=e.flow)==null?void 0:h.length)===a.value&&it().then(()=>c())},c=()=>{a.value=-1},C=(v,h,...k)=>{var Y,f;e.flow[a.value]===v&&n.value&&((f=(Y=n.value)[h])==null||f.call(Y,...k))},m=(v=0)=>{v&&(a.value+=v),C(Xe.month,"toggleMonthPicker",!0),C(Xe.year,"toggleYearPicker",!0),C(Xe.calendar,"toggleTimePicker",!1,!0),C(Xe.time,"toggleTimePicker",!0,!0);const h=e.flow[a.value];(h===Xe.hours||h===Xe.minutes||h===Xe.seconds)&&C(h,"toggleTimePicker",!0,!0,h)};return{childMount:i,updateFlowStep:p,resetFlow:c,handleFlow:m,flowStep:a}},Bs={key:1,class:"dp__input_wrap"},Ns=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],Ls={key:2,class:"dp--clear-btn"},Hs=["aria-label"],Vs=ze({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Ya},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(e,{expose:t,emit:n}){const a=n,r=e,{defaultedTextInput:l,defaultedAriaLabels:i,defaultedInline:p,defaultedConfig:c,defaultedRange:C,defaultedMultiDates:m,defaultedUI:v,getDefaultPattern:h,getDefaultStartTime:k}=Se(r),{checkMinMaxRange:Y}=Et(r),f=Z(),S=Z(null),I=Z(!1),U=Z(!1),A=G(()=>({dp__pointer:!r.disabled&&!r.readonly&&!l.value.enabled,dp__disabled:r.disabled,dp__input_readonly:!l.value.enabled,dp__input:!0,dp__input_icon_pad:!r.hideInputIcon,dp__input_valid:typeof r.state=="boolean"?r.state:!1,dp__input_invalid:typeof r.state=="boolean"?!r.state:!1,dp__input_focus:I.value||r.isMenuOpen,dp__input_reg:!l.value.enabled,...v.value.input??{}})),q=()=>{a("set-input-date",null),r.clearable&&r.autoApply&&(a("set-empty-date"),f.value=null)},ae=b=>{const oe=k();return ii(b,l.value.format??h(),oe??xr({},r.enableSeconds),r.inputValue,U.value,r.formatLocale)},E=b=>{const{rangeSeparator:oe}=l.value,[V,M]=b.split(`${oe}`);if(V){const o=ae(V.trim()),w=M?ae(M.trim()):null;if(Kt(o,w))return;const z=o&&w?[o,w]:[o];Y(w,z,0)&&(f.value=o?z:null)}},B=()=>{U.value=!0},ne=b=>{if(C.value.enabled)E(b);else if(m.value.enabled){const oe=b.split(";");f.value=oe.map(V=>ae(V.trim())).filter(V=>V)}else f.value=ae(b)},F=b=>{var oe;const V=typeof b=="string"?b:(oe=b.target)==null?void 0:oe.value;V!==""?(l.value.openMenu&&!r.isMenuOpen&&a("open"),ne(V),a("set-input-date",f.value)):q(),U.value=!1,a("update:input-value",V),a("text-input",b,f.value)},N=b=>{l.value.enabled?(ne(b.target.value),l.value.enterSubmit&&sn(f.value)&&r.inputValue!==""?(a("set-input-date",f.value,!0),f.value=null):l.value.enterSubmit&&r.inputValue===""&&(f.value=null,a("clear"))):pe(b)},ie=(b,oe)=>{l.value.enabled&&l.value.tabSubmit&&!oe&&ne(b.target.value),l.value.tabSubmit&&sn(f.value)&&r.inputValue!==""?(a("set-input-date",f.value,!0,!0),f.value=null):l.value.tabSubmit&&r.inputValue===""&&(f.value=null,a("clear",!0))},ce=()=>{I.value=!0,a("focus"),it().then(()=>{var b;l.value.enabled&&l.value.selectOnFocus&&((b=S.value)==null||b.select())})},pe=b=>{if(Yt(b,c.value,!0),l.value.enabled&&l.value.openMenu&&!p.value.input){if(l.value.openMenu==="open"&&!r.isMenuOpen)return a("open");if(l.value.openMenu==="toggle")return a("toggle")}else l.value.enabled||a("toggle")},g=()=>{a("real-blur"),I.value=!1,(!r.isMenuOpen||p.value.enabled&&p.value.input)&&a("blur"),r.autoApply&&l.value.enabled&&f.value&&!r.isMenuOpen&&(a("set-input-date",f.value),a("select-date"),f.value=null)},D=b=>{Yt(b,c.value,!0),a("clear")},y=b=>{if(b.key==="Tab"&&ie(b),b.key==="Enter"&&N(b),!l.value.enabled){if(b.code==="Tab")return;b.preventDefault()}},H=()=>{var b;(b=S.value)==null||b.focus({preventScroll:!0})},re=b=>{f.value=b},R=b=>{b.key===$e.tab&&ie(b,!0)};return t({focusInput:H,setParsedDate:re}),(b,oe)=>{var V,M,o;return P(),W("div",{onClick:pe},[b.$slots.trigger&&!b.$slots["dp-input"]&&!d(p).enabled?ue(b.$slots,"trigger",{key:0}):j("",!0),!b.$slots.trigger&&(!d(p).enabled||d(p).input)?(P(),W("div",Bs,[b.$slots["dp-input"]&&!b.$slots.trigger&&(!d(p).enabled||d(p).enabled&&d(p).input)?ue(b.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:F,onEnter:N,onTab:ie,onClear:D,onBlur:g,onKeypress:y,onPaste:B,onFocus:ce,openMenu:()=>b.$emit("open"),closeMenu:()=>b.$emit("close"),toggleMenu:()=>b.$emit("toggle")}):j("",!0),b.$slots["dp-input"]?j("",!0):(P(),W("input",{key:1,id:b.uid?`dp-input-${b.uid}`:void 0,ref_key:"inputRef",ref:S,"data-test":"dp-input",name:b.name,class:ke(A.value),inputmode:d(l).enabled?"text":"none",placeholder:b.placeholder,disabled:b.disabled,readonly:b.readonly,required:b.required,value:e.inputValue,autocomplete:b.autocomplete,"aria-label":(V=d(i))==null?void 0:V.input,"aria-disabled":b.disabled||void 0,"aria-invalid":b.state===!1?!0:void 0,onInput:F,onBlur:g,onFocus:ce,onKeypress:y,onKeydown:oe[0]||(oe[0]=w=>y(w)),onPaste:B},null,42,Ns)),ye("div",{onClick:oe[3]||(oe[3]=w=>a("toggle"))},[b.$slots["input-icon"]&&!b.hideInputIcon?(P(),W("span",{key:0,class:"dp__input_icon",onClick:oe[1]||(oe[1]=w=>a("toggle"))},[ue(b.$slots,"input-icon")])):j("",!0),!b.$slots["input-icon"]&&!b.hideInputIcon&&!b.$slots["dp-input"]?(P(),De(d(aa),{key:1,"aria-label":(M=d(i))==null?void 0:M.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:oe[2]||(oe[2]=w=>a("toggle"))},null,8,["aria-label"])):j("",!0)]),b.$slots["clear-icon"]&&e.inputValue&&b.clearable&&!b.disabled&&!b.readonly?(P(),W("span",Ls,[ue(b.$slots,"clear-icon",{clear:D})])):j("",!0),b.clearable&&!b.$slots["clear-icon"]&&e.inputValue&&!b.disabled&&!b.readonly?(P(),W("button",{key:3,"aria-label":(o=d(i))==null?void 0:o.clearInput,class:"dp--clear-btn",type:"button",onKeydown:oe[4]||(oe[4]=w=>d(et)(w,()=>D(w),!0,R)),onClick:oe[5]||(oe[5]=va(w=>D(w),["prevent"]))},[ot(d(fr),{class:"dp__input_icons","data-test":"clear-icon"})],40,Hs)):j("",!0)])):j("",!0)])}}}),Fs=typeof window<"u"?window:void 0,tn=()=>{},qs=e=>Fr()?(qr(e),!0):!1,Ws=(e,t,n,a)=>{if(!e)return tn;let r=tn;const l=ct(()=>d(e),p=>{r(),p&&(p.addEventListener(t,n,a),r=()=>{p.removeEventListener(t,n,a),r=tn})},{immediate:!0,flush:"post"}),i=()=>{l(),r()};return qs(i),i},Qs=(e,t,n,a={})=>{const{window:r=Fs,event:l="pointerdown"}=a;return r?Ws(r,l,i=>{const p=Fe(e),c=Fe(t);!p||!c||p===i.target||i.composedPath().includes(p)||i.composedPath().includes(c)||n(i)},{passive:!0}):void 0},zs=ze({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...Ya},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(e,{expose:t,emit:n}){const a=n,r=e,l=qt(),i=Z(!1),p=ca(r,"modelValue"),c=ca(r,"timezone"),C=Z(null),m=Z(null),v=Z(null),h=Z(!1),k=Z(null),Y=Z(!1),f=Z(!1),S=Z(!1),I=Z(!1),{setMenuFocused:U,setShiftKey:A}=Ar(),{clearArrowNav:q}=It(),{validateDate:ae,isValidTime:E}=Et(r),{defaultedTransitions:B,defaultedTextInput:ne,defaultedInline:F,defaultedConfig:N,defaultedRange:ie,defaultedMultiDates:ce}=Se(r),{menuTransition:pe,showTransition:g}=ga(B);Ke(()=>{w(r.modelValue),it().then(()=>{if(!F.value.enabled){const O=oe(k.value);O?.addEventListener("scroll",J),window?.addEventListener("resize",$)}}),F.value.enabled&&(i.value=!0),window?.addEventListener("keyup",ge),window?.addEventListener("keydown",x)}),Ca(()=>{if(!F.value.enabled){const O=oe(k.value);O?.removeEventListener("scroll",J),window?.removeEventListener("resize",$)}window?.removeEventListener("keyup",ge),window?.removeEventListener("keydown",x)});const D=lt(l,"all",r.presetDates),y=lt(l,"input");ct([p,c],()=>{w(p.value)},{deep:!0});const{openOnTop:H,menuStyle:re,xCorrect:R,setMenuPosition:b,getScrollableParent:oe,shadowRender:V}=Ys({menuRef:C,menuRefInner:m,inputRef:v,pickerWrapperRef:k,inline:F,emit:a,props:r,slots:l}),{inputValue:M,internalModelValue:o,parseExternalModelValue:w,emitModelValue:z,formatInputValue:u,checkBeforeEmit:le}=$i(a,r,h),fe=G(()=>({dp__main:!0,dp__theme_dark:r.dark,dp__theme_light:!r.dark,dp__flex_display:F.value.enabled,"dp--flex-display-collapsed":S.value,dp__flex_display_with_input:F.value.input})),Ve=G(()=>r.dark?"dp__theme_dark":"dp__theme_light"),T=G(()=>r.teleport?{to:typeof r.teleport=="boolean"?"body":r.teleport,disabled:!r.teleport||F.value.enabled}:{}),K=G(()=>({class:"dp__outer_menu_wrap"})),s=G(()=>F.value.enabled&&(r.timePicker||r.monthPicker||r.yearPicker||r.quarterPicker)),L=()=>{var O,ee;return(ee=(O=v.value)==null?void 0:O.$el)==null?void 0:ee.getBoundingClientRect()},J=()=>{i.value&&(N.value.closeOnScroll?rt():b())},$=()=>{var O;i.value&&b();const ee=(O=m.value)==null?void 0:O.$el.getBoundingClientRect().width;S.value=document.body.offsetWidth<=ee},ge=O=>{O.key==="Tab"&&!F.value.enabled&&!r.teleport&&N.value.tabOutClosesMenu&&(k.value.contains(document.activeElement)||rt()),f.value=O.shiftKey},x=O=>{f.value=O.shiftKey},X=()=>{!r.disabled&&!r.readonly&&(V(Un,r),b(!1),i.value=!0,i.value&&a("open"),i.value||na(),w(r.modelValue))},de=()=>{var O;M.value="",na(),(O=v.value)==null||O.setParsedDate(null),a("update:model-value",null),a("update:model-timezone-value",null),a("cleared"),N.value.closeOnClearValue&&rt()},be=()=>{const O=o.value;return!O||!Array.isArray(O)&&ae(O)?!0:Array.isArray(O)?ce.value.enabled||O.length===2&&ae(O[0])&&ae(O[1])?!0:ie.value.partialRange&&!r.timePicker?ae(O[0]):!1:!1},st=()=>{le()&&be()?(z(),rt()):a("invalid-select",o.value)},me=O=>{Pt(),z(),N.value.closeOnAutoApply&&!O&&rt()},Pt=()=>{v.value&&ne.value.enabled&&v.value.setParsedDate(o.value)},gt=(O=!1)=>{r.autoApply&&E(o.value)&&be()&&(ie.value.enabled&&Array.isArray(o.value)?(ie.value.partialRange||o.value.length===2)&&me(O):me(O))},na=()=>{ne.value.enabled||(o.value=null)},rt=()=>{F.value.enabled||(i.value&&(i.value=!1,R.value=!1,U(!1),A(!1),q(),a("closed"),M.value&&w(p.value)),na(),a("blur"))},ra=(O,ee,se=!1)=>{if(!O){o.value=null;return}const Je=Array.isArray(O)?!O.some(Bt=>!ae(Bt)):ae(O),ut=E(O);Je&&ut?(I.value=!0,o.value=O,ee&&(Y.value=se,st(),a("text-submit")),it().then(()=>{I.value=!1})):a("invalid-date",O)},Ea=()=>{r.autoApply&&E(o.value)&&z(),Pt()},wa=()=>i.value?rt():X(),Ba=O=>{o.value=O},Na=()=>{ne.value.enabled&&(h.value=!0,u()),a("focus")},La=()=>{if(ne.value.enabled&&(h.value=!1,w(r.modelValue),Y.value)){const O=li(k.value,f.value);O?.focus()}a("blur")},Ha=O=>{m.value&&m.value.updateMonthYear(0,{month:Ln(O.month),year:Ln(O.year)})},Va=O=>{w(O??r.modelValue)},Fa=(O,ee)=>{var se;(se=m.value)==null||se.switchView(O,ee)},_=O=>N.value.onClickOutside?N.value.onClickOutside(O):rt(),te=(O=0)=>{var ee;(ee=m.value)==null||ee.handleFlow(O)};return Qs(C,v,()=>_(be)),t({closeMenu:rt,selectDate:st,clearValue:de,openMenu:X,onScroll:J,formatInputValue:u,updateInternalModelValue:Ba,setMonthYear:Ha,parseModel:Va,switchView:Fa,toggleMenu:wa,handleFlow:te,dpWrapMenuRef:C}),(O,ee)=>(P(),W("div",{ref_key:"pickerWrapperRef",ref:k,class:ke(fe.value),"data-datepicker-instance":""},[ot(Vs,Qe({ref_key:"inputRef",ref:v,"input-value":d(M),"onUpdate:inputValue":ee[0]||(ee[0]=se=>Pn(M)?M.value=se:null),"is-menu-open":i.value},O.$props,{onClear:de,onOpen:X,onSetInputDate:ra,onSetEmptyDate:d(z),onSelectDate:st,onToggle:wa,onClose:rt,onFocus:Na,onBlur:La,onRealBlur:ee[1]||(ee[1]=se=>h.value=!1),onTextInput:ee[2]||(ee[2]=se=>O.$emit("text-input",se))}),je({_:2},[Ye(d(y),(se,Je)=>({name:se,fn:_e(ut=>[ue(O.$slots,se,We(at(ut)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(P(),De(Oa(O.teleport?Br:"div"),We(at(T.value)),{default:_e(()=>[ot(ta,{name:d(pe)(d(H)),css:d(g)&&!d(F).enabled},{default:_e(()=>[i.value?(P(),W("div",Qe({key:0,ref_key:"dpWrapMenuRef",ref:C},K.value,{class:{"dp--menu-wrapper":!d(F).enabled},style:d(F).enabled?void 0:d(re)}),[ot(Un,Qe({ref_key:"dpMenuRef",ref:m},O.$props,{"internal-model-value":d(o),"onUpdate:internalModelValue":ee[3]||(ee[3]=se=>Pn(o)?o.value=se:null),class:{[Ve.value]:!0,"dp--menu-wrapper":O.teleport},"open-on-top":d(H),"no-overlay-focus":s.value,collapse:S.value,"get-input-rect":L,"is-text-input-date":I.value,onClosePicker:rt,onSelectDate:st,onAutoApply:gt,onTimeUpdate:Ea,onFlowStep:ee[4]||(ee[4]=se=>O.$emit("flow-step",se)),onUpdateMonthYear:ee[5]||(ee[5]=se=>O.$emit("update-month-year",se)),onInvalidSelect:ee[6]||(ee[6]=se=>O.$emit("invalid-select",d(o))),onAutoApplyInvalid:ee[7]||(ee[7]=se=>O.$emit("invalid-select",se)),onInvalidFixedRange:ee[8]||(ee[8]=se=>O.$emit("invalid-fixed-range",se)),onRecalculatePosition:d(b),onTooltipOpen:ee[9]||(ee[9]=se=>O.$emit("tooltip-open",se)),onTooltipClose:ee[10]||(ee[10]=se=>O.$emit("tooltip-close",se)),onTimePickerOpen:ee[11]||(ee[11]=se=>O.$emit("time-picker-open",se)),onTimePickerClose:ee[12]||(ee[12]=se=>O.$emit("time-picker-close",se)),onAmPmChange:ee[13]||(ee[13]=se=>O.$emit("am-pm-change",se)),onRangeStart:ee[14]||(ee[14]=se=>O.$emit("range-start",se)),onRangeEnd:ee[15]||(ee[15]=se=>O.$emit("range-end",se)),onDateUpdate:ee[16]||(ee[16]=se=>O.$emit("date-update",se)),onInvalidDate:ee[17]||(ee[17]=se=>O.$emit("invalid-date",se)),onOverlayToggle:ee[18]||(ee[18]=se=>O.$emit("overlay-toggle",se))}),je({_:2},[Ye(d(D),(se,Je)=>({name:se,fn:_e(ut=>[ue(O.$slots,se,We(at({...ut})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):j("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),Ir=(()=>{const e=zs;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),Us=Object.freeze(Object.defineProperty({__proto__:null,default:Ir},Symbol.toStringTag,{value:"Module"}));Object.entries(Us).forEach(([e,t])=>{e!=="default"&&(Ir[e]=t)});export{Ir as V}; diff --git a/src/static/app/dist/assets/wireguard.js b/src/static/app/dist/assets/wireguard.js new file mode 100644 index 0000000..4e4f500 --- /dev/null +++ b/src/static/app/dist/assets/wireguard.js @@ -0,0 +1,4 @@ +/*! SPDX-License-Identifier: GPL-2.0 + * + * Copyright (C) 2015-2020 Jason A. Donenfeld . All Rights Reserved. + */(function(){function c(n){var r=new Float64Array(16);if(n)for(var a=0;a>16&1),e[t-1]&=65535;e[15]=f[15]-32767-(e[14]>>16&1),a=e[15]>>16&1,e[14]&=65535,h(f,e,1-a)}for(var t=0;t<16;++t)n[2*t]=f[t]&255,n[2*t+1]=f[t]>>8}function b(n){for(var r=0;r<16;++r)n[(r+1)%16]+=(r<15?1:38)*Math.floor(n[r]/65536),n[r]&=65535}function h(n,r,a){for(var e,f=~(a-1),t=0;t<16;++t)e=f&(n[t]^r[t]),n[t]^=e,r[t]^=e}function g(n,r,a){for(var e=0;e<16;++e)n[e]=r[e]+a[e]|0}function i(n,r,a){for(var e=0;e<16;++e)n[e]=r[e]-a[e]|0}function v(n,r,a){for(var e=new Float64Array(31),f=0;f<16;++f)for(var t=0;t<16;++t)e[f+t]+=r[f]*a[t];for(var f=0;f<15;++f)e[f]+=38*e[f+16];for(var f=0;f<16;++f)n[f]=e[f];b(n),b(n)}function B(n,r){for(var a=c(),e=0;e<16;++e)a[e]=r[e];for(var e=253;e>=0;--e)v(a,a,a),e!==2&&e!==4&&v(a,a,r);for(var e=0;e<16;++e)n[e]=a[e]}function A(n){n[31]=n[31]&127|64,n[0]&=248}function m(n){for(var r,a=new Uint8Array(32),e=c([1]),f=c([9]),t=c(),u=c([1]),y=c(),U=c(),L=c([56129,1]),S=c([9]),d=0;d<32;++d)a[d]=n[d];A(a);for(var d=254;d>=0;--d)r=a[d>>>3]>>>(d&7)&1,h(e,f,r),h(t,u,r),g(y,e,t),i(e,e,t),g(t,f,u),i(f,f,u),v(u,y,y),v(U,e,e),v(e,t,e),v(t,f,y),g(y,e,t),i(e,e,t),v(f,e,e),i(t,u,U),v(e,t,L),g(e,e,u),v(t,t,e),v(e,u,U),v(u,f,S),v(f,y,y),h(e,f,r),h(t,u,r);return B(t,t),v(e,e,t),F(a,e),a}function K(){var n=new Uint8Array(32);return window.crypto.getRandomValues(n),n}function P(){var n=K();return A(n),n}function s(n,r){for(var a=Uint8Array.from([r[0]>>2&63,(r[0]<<4|r[1]>>4)&63,(r[1]<<2|r[2]>>6)&63,r[2]&63]),e=0;e<4;++e)n[e]=a[e]+65+(25-a[e]>>8&6)-(51-a[e]>>8&75)-(61-a[e]>>8&15)+(62-a[e]>>8&3)}function x(n){var r,a=new Uint8Array(44);for(r=0;r<32/3;++r)s(a.subarray(r*4),n.subarray(r*3));return s(a.subarray(r*4),Uint8Array.from([n[r*3+0],n[r*3+1],0])),a[43]=61,String.fromCharCode.apply(null,a)}function R(n){let r=window.atob(n),a=r.length,e=new Uint8Array(a);for(let t=0;t>>8&255,r>>>16&255,r>>>24&255)}function o(n,r){n.push(r&255,r>>>8&255)}function w(n,r){for(var a=0;a>>1:r>>>1;p.table[a]=r}}for(var f=-1,t=0;t>>8^p.table[(f^n[t])&255];return(f^-1)>>>0}function _(n){for(var r=[],a=[],e=0,f=0;f { let result = false @@ -39,7 +39,7 @@ const router = createRouter({ { name: "Index", path: '/', - component: Index, + component: () => import('@/views/index.vue'), meta: { requiresAuth: true, }, @@ -47,7 +47,7 @@ const router = createRouter({ { name: "Configuration List", path: '', - component: ConfigurationList, + component: () => import('@/components/configurationList.vue'), meta: { title: "WireGuard Configurations" } @@ -55,7 +55,7 @@ const router = createRouter({ { name: "Settings", path: '/settings', - component: Settings, + component: () => import('@/views/settings.vue'), meta: { title: "Settings" } @@ -63,17 +63,17 @@ const router = createRouter({ { path: '/ping', name: "Ping", - component: Ping, + component: () => import('@/views/ping.vue'), }, { path: '/traceroute', name: "Traceroute", - component: Traceroute, + component: () => import('@/views/traceroute.vue'), }, { name: "New Configuration", path: '/new_configuration', - component: NewConfiguration, + component: () => import('@/views/newConfiguration.vue'), meta: { title: "New Configuration" } @@ -81,7 +81,7 @@ const router = createRouter({ { name: "Restore Configuration", path: '/restore_configuration', - component: RestoreConfiguration, + component: () => import('@/views/restoreConfiguration.vue'), meta: { title: "Restore Configuration" } @@ -89,7 +89,7 @@ const router = createRouter({ { name: "Configuration", path: '/configuration/:id', - component: Configuration, + component: () => import('@/views/configuration.vue'), meta: { title: "Configuration" }, @@ -97,12 +97,12 @@ const router = createRouter({ { name: "Peers List", path: 'peers', - component: PeerList + component: () => import('@/components/configurationComponents/peerList.vue') }, { name: "Peers Create", path: 'create', - component: PeerCreate + component: () => import('@/components/configurationComponents/peerCreate.vue') }, ] }, @@ -110,27 +110,31 @@ const router = createRouter({ ] }, { - path: '/signin', component: Signin, + path: '/signin', + component: () => import('@/views/signin.vue'), meta: { title: "Sign In" } }, { - path: '/welcome', component: Setup, + path: '/welcome', + component: () => import("@/views/setup.vue"), meta: { requiresAuth: true, title: "Welcome to WGDashboard" }, }, { - path: '/2FASetup', component: Totp, + path: '/2FASetup', + component: () => import("@/components/setupComponent/totp.vue"), meta: { requiresAuth: true, title: "Multi-Factor Authentication Setup" }, }, { - path: '/share', component: Share, + path: '/share', + component: () => import("@/views/share.vue"), meta: { title: "Share" } diff --git a/src/static/app/src/utilities/locale.js b/src/static/app/src/utilities/locale.js index 4f06d0a..e0e986e 100644 --- a/src/static/app/src/utilities/locale.js +++ b/src/static/app/src/utilities/locale.js @@ -8,8 +8,7 @@ export const GetLocale = (key) => { const match = reg.filter(x => { return key.match(new RegExp('^' + x + '$', 'gi')) !== null }) - if (match.length === 0 || match.length > 1){ - // console.log(`[Translation Needed] Language: ${store.Configuration.Server.dashboard_language} \nKey: ${key}`) + if (match.length === 0 || match.length > 1 || store.Locale[match[0]].length === 0){ return key } return key.replace(new RegExp(match[0], 'gi'), store.Locale[match[0]]) diff --git a/src/static/app/src/views/ping.vue b/src/static/app/src/views/ping.vue index 4da299e..bdecbf7 100644 --- a/src/static/app/src/views/ping.vue +++ b/src/static/app/src/views/ping.vue @@ -246,7 +246,7 @@ export default { width: 100%; height: 79.98px; } - .ping-move, /* apply transition to moving elements */ + .ping-move, .ping-enter-active, .ping-leave-active { transition: all 0.4s cubic-bezier(0.82, 0.58, 0.17, 0.9); @@ -259,7 +259,6 @@ export default { .ping-enter-from, .ping-leave-to { opacity: 0; - //transform: scale(1.1); filter: blur(3px); } \ No newline at end of file diff --git a/src/static/app/src/views/traceroute.vue b/src/static/app/src/views/traceroute.vue index 33db64c..a55cfdf 100644 --- a/src/static/app/src/views/traceroute.vue +++ b/src/static/app/src/views/traceroute.vue @@ -166,12 +166,9 @@ export default { .ping-enter-from, .ping-leave-to { opacity: 0; - //transform: scale(1.1); filter: blur(3px); } -/* ensure leaving items are taken out of layout flow so that moving - animations can be calculated correctly. */ .ping-leave-active { position: absolute; } @@ -184,7 +181,7 @@ table th, table td{ background-color: transparent !important; } -.ping-move, /* apply transition to moving elements */ +.ping-move, .ping-enter-active, .ping-leave-active { transition: all 0.4s cubic-bezier(0.82, 0.58, 0.17, 0.9); @@ -197,7 +194,6 @@ table th, table td{ .ping-enter-from, .ping-leave-to { opacity: 0; - //transform: scale(1.1); filter: blur(3px); } \ No newline at end of file diff --git a/src/static/locale/de.json b/src/static/locale/de.json index 9a03daa..302224b 100644 --- a/src/static/locale/de.json +++ b/src/static/locale/de.json @@ -236,5 +236,76 @@ "IP Address": "IP-Adresse", "Enter IP Address / Hostname": "IP-Adresse/Hostnamen eingeben", "IP Address / Hostname": "IP-Adresse/Hostnamen", - "Count": "Zählen" + "Count": "Zählen", + "Geolocation": "", + "Is Alive": "", + "Average / Min / Max Round Trip Time": "", + "Sent / Received / Lost Package": "", + "Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port": "", + "Restore Configuration": "", + "Step (.*)": "", + "Select a backup you want to restore": "", + "Click to change a backup": "", + "Selected Backup": "", + "You don't have any configuration to restore": "", + "Help": "", + "Backup": "", + "([0-9].*) Backups?": "", + "Yes": "", + "No": "", + "Backup not selected": "", + "Confirm \\& edit restore information": "", + "(.*) Available IP Address": "", + "Database File": "", + "Contain": "", + "Restricted Peers?": "", + "Restore": "", + "Restoring": "", + "WGDashboard Settings": "", + "Peers Settings": "", + "WireGuard Configuration Settings": "", + "Appearance": "", + "Theme": "", + "Language": "", + "Account Settings": "", + "Peer Default Settings": "", + "Toggle When Start Up": "", + "Other Settings": "", + "Select Peers": "", + "Backup & Restore": "", + "Delete Configuration": "", + "Create Backup": "", + "No backup yet, click the button above to create backup\\.": "", + "Are you sure to delete this backup\\?": "", + "Are you sure to restore this backup?\\": "", + "Backup Date": "", + "File": "", + "Are you sure to delete this configuration\\?": "", + "Once you deleted this configuration\\:": "", + "All connected peers will get disconnected": "", + "Both configuration file \\(\\.conf\\) and database table related to this configuration will get deleted": "", + "Checking backups...": "", + "This configuration have ([0-9].*) backups": "", + "This configuration have no backup": "", + "If you're sure, please type in the configuration name below and click Delete": "", + "Select All": "", + "Clear Selection": "", + "([0-9].*) Peers?": "", + "Downloading": "", + "Download Finished": "", + "Done": "", + "Are you sure to delete": "", + "Are you sure to delete this peer\\?": "", + "Configuration deleted": "", + "Configuration saved": "", + "WGDashboard language update failed": "", + "Configuration restored": "", + "Allowed IP already taken by another peer": "", + "Failed to allow access of peer (.*)": "", + "Failed to save configuration through WireGuard": "", + "Allow access successfully": "", + "Deleted ([0-9]{1,}) peer\\(s\\)": "", + "Deleted ([0-9]{1,}) peer\\(s\\) successfully. Failed to delete ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\) successfully. Failed to restrict ([0-9]{1,}) peer\\(s\\)": "" } diff --git a/src/static/locale/it-IT.json b/src/static/locale/it-IT.json index 350a094..cd69060 100644 --- a/src/static/locale/it-IT.json +++ b/src/static/locale/it-IT.json @@ -232,5 +232,81 @@ "Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen\\.": "Il nome della configurazione può contenere solo 15 lettere tra minuscole/maiuscole, numeri, segno '_', segno '=', segno '>', punto e virgola.", "Invalid Port": "Porta non valida", "Save Configuration": "Salva la configurazione", - "IP Address/CIDR is invalid": "L'indirizzo IP/CIDR non è valido" + "IP Address/CIDR is invalid": "L'indirizzo IP/CIDR non è valido", + "IP Address": "", + "Enter IP Address / Hostname": "", + "IP Address / Hostname": "", + "Dashboard IP Address \\& Listen Port": "", + "Count": "", + "Geolocation": "", + "Is Alive": "", + "Average / Min / Max Round Trip Time": "", + "Sent / Received / Lost Package": "", + "Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port": "", + "Restore Configuration": "", + "Step (.*)": "", + "Select a backup you want to restore": "", + "Click to change a backup": "", + "Selected Backup": "", + "You don't have any configuration to restore": "", + "Help": "", + "Backup": "", + "([0-9].*) Backups?": "", + "Yes": "", + "No": "", + "Backup not selected": "", + "Confirm \\& edit restore information": "", + "(.*) Available IP Address": "", + "Database File": "", + "Contain": "", + "Restricted Peers?": "", + "Restore": "", + "Restoring": "", + "WGDashboard Settings": "", + "Peers Settings": "", + "WireGuard Configuration Settings": "", + "Appearance": "", + "Theme": "", + "Language": "", + "Account Settings": "", + "Peer Default Settings": "", + "Toggle When Start Up": "", + "Other Settings": "", + "Select Peers": "", + "Backup & Restore": "", + "Delete Configuration": "", + "Create Backup": "", + "No backup yet, click the button above to create backup\\.": "", + "Are you sure to delete this backup\\?": "", + "Are you sure to restore this backup?\\": "", + "Backup Date": "", + "File": "", + "Are you sure to delete this configuration\\?": "", + "Once you deleted this configuration\\:": "", + "All connected peers will get disconnected": "", + "Both configuration file \\(\\.conf\\) and database table related to this configuration will get deleted": "", + "Checking backups...": "", + "This configuration have ([0-9].*) backups": "", + "This configuration have no backup": "", + "If you're sure, please type in the configuration name below and click Delete": "", + "Select All": "", + "Clear Selection": "", + "([0-9].*) Peers?": "", + "Downloading": "", + "Download Finished": "", + "Done": "", + "Are you sure to delete": "", + "Are you sure to delete this peer\\?": "", + "Configuration deleted": "", + "Configuration saved": "", + "WGDashboard language update failed": "", + "Configuration restored": "", + "Allowed IP already taken by another peer": "", + "Failed to allow access of peer (.*)": "", + "Failed to save configuration through WireGuard": "", + "Allow access successfully": "", + "Deleted ([0-9]{1,}) peer\\(s\\)": "", + "Deleted ([0-9]{1,}) peer\\(s\\) successfully. Failed to delete ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\) successfully. Failed to restrict ([0-9]{1,}) peer\\(s\\)": "" } \ No newline at end of file diff --git a/src/static/locale/ru.json b/src/static/locale/ru.json index 7945dba..205fdc7 100644 --- a/src/static/locale/ru.json +++ b/src/static/locale/ru.json @@ -236,6 +236,76 @@ "IP Address": "IP-адрес", "Enter IP Address / Hostname": "Введите IP-адрес/имя хоста", "IP Address / Hostname": "IP-адрес/имя хоста", - "Count": "Считать" - + "Count": "Считать", + "Geolocation": "", + "Is Alive": "", + "Average / Min / Max Round Trip Time": "", + "Sent / Received / Lost Package": "", + "Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port": "", + "Restore Configuration": "", + "Step (.*)": "", + "Select a backup you want to restore": "", + "Click to change a backup": "", + "Selected Backup": "", + "You don't have any configuration to restore": "", + "Help": "", + "Backup": "", + "([0-9].*) Backups?": "", + "Yes": "", + "No": "", + "Backup not selected": "", + "Confirm \\& edit restore information": "", + "(.*) Available IP Address": "", + "Database File": "", + "Contain": "", + "Restricted Peers?": "", + "Restore": "", + "Restoring": "", + "WGDashboard Settings": "", + "Peers Settings": "", + "WireGuard Configuration Settings": "", + "Appearance": "", + "Theme": "", + "Language": "", + "Account Settings": "", + "Peer Default Settings": "", + "Toggle When Start Up": "", + "Other Settings": "", + "Select Peers": "", + "Backup & Restore": "", + "Delete Configuration": "", + "Create Backup": "", + "No backup yet, click the button above to create backup\\.": "", + "Are you sure to delete this backup\\?": "", + "Are you sure to restore this backup?\\": "", + "Backup Date": "", + "File": "", + "Are you sure to delete this configuration\\?": "", + "Once you deleted this configuration\\:": "", + "All connected peers will get disconnected": "", + "Both configuration file \\(\\.conf\\) and database table related to this configuration will get deleted": "", + "Checking backups...": "", + "This configuration have ([0-9].*) backups": "", + "This configuration have no backup": "", + "If you're sure, please type in the configuration name below and click Delete": "", + "Select All": "", + "Clear Selection": "", + "([0-9].*) Peers?": "", + "Downloading": "", + "Download Finished": "", + "Done": "", + "Are you sure to delete": "", + "Are you sure to delete this peer\\?": "", + "Configuration deleted": "", + "Configuration saved": "", + "WGDashboard language update failed": "", + "Configuration restored": "", + "Allowed IP already taken by another peer": "", + "Failed to allow access of peer (.*)": "", + "Failed to save configuration through WireGuard": "", + "Allow access successfully": "", + "Deleted ([0-9]{1,}) peer\\(s\\)": "", + "Deleted ([0-9]{1,}) peer\\(s\\) successfully. Failed to delete ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\) successfully. Failed to restrict ([0-9]{1,}) peer\\(s\\)": "" } \ No newline at end of file diff --git a/src/static/locale/uk.json b/src/static/locale/uk.json index 149b760..f9530f7 100644 --- a/src/static/locale/uk.json +++ b/src/static/locale/uk.json @@ -236,6 +236,76 @@ "IP Address": "IP-адреса", "Enter IP Address / Hostname": "Введіть IP-адресу / ім’я хоста", "IP Address / Hostname": "IP-адресу / ім’я хоста", - "Count": "Граф" - + "Count": "Граф", + "Geolocation": "", + "Is Alive": "", + "Average / Min / Max Round Trip Time": "", + "Sent / Received / Lost Package": "", + "Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port": "", + "Restore Configuration": "", + "Step (.*)": "", + "Select a backup you want to restore": "", + "Click to change a backup": "", + "Selected Backup": "", + "You don't have any configuration to restore": "", + "Help": "", + "Backup": "", + "([0-9].*) Backups?": "", + "Yes": "", + "No": "", + "Backup not selected": "", + "Confirm \\& edit restore information": "", + "(.*) Available IP Address": "", + "Database File": "", + "Contain": "", + "Restricted Peers?": "", + "Restore": "", + "Restoring": "", + "WGDashboard Settings": "", + "Peers Settings": "", + "WireGuard Configuration Settings": "", + "Appearance": "", + "Theme": "", + "Language": "", + "Account Settings": "", + "Peer Default Settings": "", + "Toggle When Start Up": "", + "Other Settings": "", + "Select Peers": "", + "Backup & Restore": "", + "Delete Configuration": "", + "Create Backup": "", + "No backup yet, click the button above to create backup\\.": "", + "Are you sure to delete this backup\\?": "", + "Are you sure to restore this backup?\\": "", + "Backup Date": "", + "File": "", + "Are you sure to delete this configuration\\?": "", + "Once you deleted this configuration\\:": "", + "All connected peers will get disconnected": "", + "Both configuration file \\(\\.conf\\) and database table related to this configuration will get deleted": "", + "Checking backups...": "", + "This configuration have ([0-9].*) backups": "", + "This configuration have no backup": "", + "If you're sure, please type in the configuration name below and click Delete": "", + "Select All": "", + "Clear Selection": "", + "([0-9].*) Peers?": "", + "Downloading": "", + "Download Finished": "", + "Done": "", + "Are you sure to delete": "", + "Are you sure to delete this peer\\?": "", + "Configuration deleted": "", + "Configuration saved": "", + "WGDashboard language update failed": "", + "Configuration restored": "", + "Allowed IP already taken by another peer": "", + "Failed to allow access of peer (.*)": "", + "Failed to save configuration through WireGuard": "", + "Allow access successfully": "", + "Deleted ([0-9]{1,}) peer\\(s\\)": "", + "Deleted ([0-9]{1,}) peer\\(s\\) successfully. Failed to delete ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\) successfully. Failed to restrict ([0-9]{1,}) peer\\(s\\)": "" } \ No newline at end of file